Leon3ft Rtax Ag
Leon3ft Rtax Ag
Leon3ft Rtax Ag
LEON3FT-RTAX
GAISLER Data Sheet and User’s Manual
Features Description
• SPARC V8 integer unit with The LEON3FT-RTAX product is an
7-stage pipeline, 8 register implementation of the LEON3FT
windows, 8 kByte instruction SPARC V8 processor using the Actel
and 4 kByte data caches, RTAX FPGA technology. The fault
hardware multiplier and tolerant design of the processor in
divider, power-down mode, combination with the radiation
hardware watchpoints, etc. tolerant FPGA technology provides
• Double precision IEEE-754 floating point unit total immunity to radiation effects.
• Memory management unit
• EDAC protected (BCH and optional Reed- Specification
Solomon) interface to multiple 8/32-bits PROM/ • CQ352 and CG624 packages
SRAM/SDRAM memory banks • Total Ionizing Dose (TID)
• Advanced on-chip debug support unit up to 300 krad (Si, functional)
• UARTs, Timers & Watchdog, GPIO port, • Single-Event Latch-Up Immunity (SEL)
Interrupt controller, Status registers to LETTH > 104 MeV-cm2/mg
• Multiple SpaceWire links with RMAP CRC • Immune to Single-Event Upsets (SEU)
• Redundant 1553 BC/RT/MT interfaces to LETTH > 37 MeV-cm2/mg
• Redundant CAN 2.0 interfaces • 1.5V & 3.3V supply, 500 mW consumption
• Multiple Ethernet 10/100 Mbit MAC interfaces • Up to 25 MHz system frequency
• PCI Initiator/Target and Arbiter interface • Up to 20 MIPS, 4 MFLOPS
Applications
The LEON3FT-RTAX processor is provided in multiple
configurations, covering instrument, payload and spacecraft control
applications. Custom configurations are offered on request.
The LEON3FT-RTAX processor is ideally suited for space and other
high-rel applications.
1 Introduction
1.1 Overview
The LEON3FT-RTAX processor family is based on a common architecture from which standard con-
figurations are derived. The architecture is centered around the AMBA Advanced High-speed Bus
(AHB), to which the LEON3FT processor and other high-bandwidth units are connected. Low-band-
width units are connected to the AMBA Advanced Peripheral Bus (APB) which is accessed through
an AHB to APB bridge. The architecture is shown in figure 1.
32
data[31:0] address[27:0]
cb[15:0] SRAM interface ramsn[]
brdyn ramoen[]
bexcn ramben[3:0]
rwen[3:0]
romsn[]
iosn
oen
read
writen
sd[31:0] sa[14:0]
scb[15:0] SDRAM interface sdcsn[1:0]
sdwen
sdrasn
sdcasn
sddqm[5:0]
spw_clk
SpaceWire Links
spw_rxd[] spw_txd[]
spw_rxdn[] spw_txdn[]
spw_rxs[] spw_txs[]
spw_rxsn[] spw_txsn[]
canrx[] CAN interfaces cantx[]
busainen[] busboutin[]
busainp[], busainn[] 1553 interfaces busaoutp[], busaoutn[]
busbinen[] busaoutin[]
busbinp[], busbinn[] busboutp[], busboutn[]
e*rx_clk e*mdio
e*rx_dv Ethernet MAC e*mdc
e*rx_crs e*mdint
e*rx_er e*tx_clk
e*rx_col e*tx_en
e*rxd[3:0] e*txd[3:0]
pci_clk pci_frame
PCI pci_par
pci_rst
Initiator & Target pci_req
pci_gnt
pci_idsel pci_devsel
pci_host pci_stop
pci_int[3:0] pci_irdy
pci_ad[31:0] pci_trdy
pci_cbe[31:0] pci_perr
pci_serr
pci_arb_req[7:0] Arbiter pci_arb_gnt[7:0]
Controller-2
Controller-1
Controller-2
Controller-3
Controller-4
Controller-1
Controller-2
Instrument
Instrument
Spacecraft
Spacecraft
Spacecraft
Spacecraft
Payload
Payload
Configuration name
Configuration ID (CID) 1 2 3 4 5 6 7 8
LEON3FT Integer Unit Yes Yes Yes Yes Yes Yes Yes Yes
Hardware multiply÷ Yes Yes Yes
Multiply & accumulate
Single-vector trapping Yes Yes Yes Yes Yes Yes Yes Yes
Power down mode Yes Yes Yes Yes Yes Yes Yes Yes
Memory Management Unit Yes Yes
Floating Point Unit Yes Yes Yes Yes Yes
Debug Support Unit Yes Yes Yes Yes Yes Yes Yes Yes
UART Debug Link Yes Yes Yes Yes Yes Yes Yes Yes
JTAG Debug Link
On-Chip Memory 4 kByte 4 kByte
1553 RT 1
1553 BC/RT/MT 1
SpaceWire 2 3 2 2
SpaceWire LVDS Yes 2) Yes 2) Yes 2) Yes 2)
CAN 2.0B 1 1
PCI Initiator/Target Yes
PCI Arbiter Yes
Ethernet MAC 10/100 Mbit 1 2
Memory Controller Yes Yes Yes Yes Yes Yes Yes Yes
SDRAM Support Yes Yes Yes Yes Yes
Reed-Solomon for SDRAM Yes 1)
Yes 1)
Yes 1)
Standard peripherals Yes Yes Yes Yes Yes Yes Yes Yes
Additional 16-bit GPIO Yes
Package CQFP352 CQFP352 CQFP352 CCGA624 CCGA624 CCGA624 CQFP352 CQFP352
Note 1: Optional Reed-Solomon protection for SDRAM memory can be included upon request.
Note 2: Optional LVTTL instead of LVDS drivers/receivers for SpaceWire links can be included
upon request.
2 Architecture
2.1 Cores
The common architecture of the LEON3FT RTAX family is based on cores from the GRLIB IP
library. The vendor and device identifiers for each core can be extracted from the plug & play infor-
mation. The used IP cores are listed in table 2.
2.2 Interrupts
The LEON3FT RTAX family uses the same interrupt assignment for all configurations. See the
description of the individual cores for how and when the interrupts are raised. All interrupts are han-
dled by the interrupt controller and forwarded to the LEON3 processor.
The control registers of most on-chip peripherals are accessible via the AHB/APB bridge, which is
mapped at address 0x80000000. The memory map shown in table 5 is based on the AMBA AHB
address space.
The plug & play memory map and bus indexes for AMBA AHB slaves are shown in table 7 and is
based on the AMBA AHB address space.
The plug & play memory map and bus indexes for AMBA APB slaves are shown in table 8 and is
based on the AMBA AHB address space.
2.5 Configuration
The LEON3 SPARC V8 Integer Unit is configured as follows:
• 8 kByte instruction cache, single set, 32 bytes per line
• 4 kByte data cache, single set, 16 bytes per line
• 8 register windows
• 2 hardware watchpoints
• Optional Memory Management Unit (see table 1)
• Optional Floating Point Unit (see table 1)
• Optional hardware multiplier (see table 1)
• Power down support
• Single-vector trapping support
• No multiply and accumulate instructions
2.6 Signals
The common architecture has the external signals shown in table 9.
Note 1: All bus signal elements are not used in all listed configurations. See pin assignment at end
of document for details.
Note 2: Refer to signal definitions of each memory controller for detailed usage of these signals.
3.1 Overview
LEON3 is a 32-bit processor core conforming to the IEEE-1754 (SPARC V8) architecture. It is
designed for embedded applications, combining high performance with low complexity and low
power consumption.
The LEON3 core has the following main features: 7-stage pipeline with Harvard architecture, sepa-
rate instruction and data caches, hardware multiplier and divider, on-chip debug support and multi-
processor extensions.
7-Stage
Debug port Debug support unit
Integer pipeline
Interrupt port Interrupt controller
I-Cache D-Cache
AHB I/F
3.2.1 Overview
The LEON3 integer unit implements the integer part of the SPARC V8 instruction set. The implemen-
tation is focused on high performance and low complexity. The LEON3 integer unit has the following
main features:
• 7-stage instruction pipeline
• Separate instruction and data cache interface
• Support for 8 register windows
• Radix-2 divider (non-restoring)
call/branch address
I-cache +1 Add
data address ‘0’ jmpa tbr
f_pc
Fetch
d_inst d_pc
Decode
r_inst r_pc r_imm
rd
30 jmpl address
m_inst m_pc result m_y
D-cache
32
Memory 32
address/dataout
datain
Exception
w_inst w_pc wres Y
Writeback 30
Table 10 lists the cycles per instruction (assuming cache hit and no icc or load interlock):
Instruction Cycles
JMPL, RETT 3
Double load 2
Single store 2
Double store 3
SMUL/UMUL 4*
SDIV/UDIV 35
Taken Trap 5
Atomic load/store 3
All other instructions 1
umacrs1, reg_imm, rd
smacrs1, reg_imm, rd
Operation:
prod[31:0] = rs1[15:0] * reg_imm[15:0]
result[39:0] = (Y[7:0] & %asr18[31:0]) + prod[31:0]
(Y[7:0] & %asr18[31:0]) = result[39:0]
rd = result[31:0]
%asr18 can be read and written using the RDASR and WRASR instructions.
31 2 1 0
%asr24, %asr26
%asr28, %asr30 WADDR[31:2] IF
31 2 0
%asr25, %asr27
%asr29, %asr31 WMASK[31:2] DL DS
Any binary aligned address range can be watched - the range is defined by the WADDR field, masked
by the WMASK field (WMASK[x] = 1 enables comparison). On a breakpoint hit, trap 0x0B is gener-
ated. By setting the IF, DL and DS bits, a hit can be generated on instruction fetch, data load or data
store. Clearing these three bits will effectively disable the breakpoint function.
The operation and control of the trace buffer is further described in section 6.4. Note that in multi-pro-
cessor systems, each processor has its own trace buffer allowing simultaneous tracing of all instruc-
tion streams.
31 28 13 12 11 10 9 8 7 5 4 0
%asr17 INDEX RESERVED SV LD FPU M V8 NWP NWIN
Field Definitions:
[31:28]: Processor index. In multi-processor systems, each LEON core gets a unique index to support enumeration.
[14]: Disable write error trap (DWT). When set, a write error trap (tt = 0x2b) will be ignored. Set to zero after reset.
[13]: Single-vector trapping (SVT) enable. If set, will enable single-vector trapping. Fixed to zero if SVT is not
implemented. Set to zero after reset.
[12]: Load delay. If set, the pipeline uses a 2-cycle load delay. Otherwise, a 1-cycle load delay i s used.
[11:10]: FPU option. “00” = no FPU; “01” = GRFPU; “10” = Meiko FPU, “11” = GRFPU-Lite
[9]: If set, the optional multiply-accumulate (MAC) instruction is available
[8]: If set, the SPARC V8 multiply and divide instructions are available.
[7:5]: Number of implemented watchpoints (0 - 4)
[4:0]: Number of implemented registers windows corresponds to NWIN+1.
3.2.10 Exceptions
LEON adheres to the general SPARC trap model. The table below shows the implemented traps and
their individual priority. When PSR (processor status register) bit ET=0, an exception trap causes the
processor to halt execution and enter error mode, and the external error signal will then be asserted.
ASI Usage
0x01 Forced cache miss
0x02 System control registers (cache control register)
0x08, 0x09, 0x0A, 0x0B Normal cached access (replace if cacheable)
0x0C Instruction cache tags
0x0D Instruction cache data
0x0E Data cache tags
0x0F Data cache data
0x10 Flush instruction cache
0x11 Flush data cache
3.2.13 Power-down
The processor can be configured to include a power-down feature to minimize power consumption
during idle periods. The power-down mode is entered by performing a WRASR instruction to
%asr19: wr %g0, %asr19
During power-down, the pipeline is halted until the next interrupt occurs. Signals inside the processor
pipeline and caches are then static, reducing power consumption from dynamic switching.
By default, the execution will start from address 0. This can be overridden by setting the RSTADDR
generic in the model to a non-zero value. The reset address is however always aligned on a 4 kByte
boundary.
3.3.1 Operation
The instruction cache can be configured as a direct-mapped cache or as a multi-set cache with asso-
ciativity of 2 - 4 implementing either LRU or random replacement policy or as 2-way associative
cache implementing LRR algorithm. The set size is configurable to 1 - 64 kByte and divided into
cache lines of 16- 32 bytes. Each line has a cache tag associated with it consisting of a tag field, valid
field with one valid bit for each 4-byte sub-block and optional LRR and lock bits. On an instruction
cache miss to a cachable location, the instruction is fetched and the corresponding tag and data line
updated. In a multi-set configuration a line to be replaced is chosen according to the replacement pol-
icy.
If instruction burst fetch is enabled in the cache control register (CCR) the cache line is filled from
main memory starting at the missed address and until the end of the line. At the same time, the
instructions are forwarded to the IU (streaming). If the IU cannot accept the streamed instructions due
to internal dependencies or multi-cycle instruction, the IU is halted until the line fill is completed. If
the IU executes a control transfer instruction (branch/CALL/JMPL/RETT/TRAP) during the line fill,
the line fill will be terminated on the next fetch. If instruction burst fetch is enabled, instruction
streaming is enabled even when the cache is disabled. In this case, the fetched instructions are only
forwarded to the IU and the cache is not updated. During cache line refill, incremental burst are gener-
ated on the AHB bus.
If a memory access error occurs during a line fill with the IU halted, the corresponding valid bit in the
cache tag will not be set. If the IU later fetches an instruction from the failed address, a cache miss
will occur, triggering a new access to the failed address. If the error remains, an instruction access
error trap (tt=0x1) will be generated.
31 10 9 8 7 0
ATAG LRR LOCK VALID
Field Definitions:
[31:10]: Address Tag (ATAG) - Contains the tag address of the cache line.
[9]: LRR - Used by LRR algorithm to store replacement history, otherwise 0.
[8]: LOCK - Locks a cache line when set. 0 if cache locking not implemented.
[7:0]: Valid (V) - When set, the corresponding sub-block of the cache line contains valid data. These bits is set when a
sub-block is filled due to a successful cache miss; a cache fill which results in a memory error will leave the valid
bit unset. A FLUSH instruction will clear all valid bits. V[0] corresponds to address 0 in the cache line, V[1] to
address 1, V[2] to address 2 and so on.
NOTE: only the necessary bits will be implemented in the cache tag, depending on the cache configu-
ration. As an example, a 4 kByte cache with 16 bytes per line would only have four valid bits and 20
tag bits. The cache rams are sized automatically by the ram generators in the model.
3.4.1 Operation
The data cache can be configured as a direct-mapped cache or as a multi-set cache with associativity
of 2 - 4 implementing either LRU or (pseudo-) random replacement policy or as 2-way associative
cache implementing LRR algorithm. The set size is configurable to 1 - 64 kByte and divided into
cache lines of 16 - 32 bytes. Each line has a cache tag associated with it consisting of a tag field, valid
field with one valid bit for each 4-byte sub-block and optional lock and LRR bits. On a data cache
read-miss to a cachable location 4 bytes of data are loaded into the cache from main memory. The
write policy for stores is write-through with no-allocate on write-miss. In a multi-set configuration a
line to be replaced on read-miss is chosen according to the replacement policy. If a memory access
error occurs during a data load, the corresponding valid bit in the cache tag will not be set. and a data
access error trap (tt=0x9) will be generated.
Since the processor executes in parallel with the write buffer, a write error will not cause an exception
to the store instruction. Depending on memory and cache activity, the write cycle may not occur until
several clock cycles after the store instructions has completed. If a write error occurs, the currently
executing instruction will take trap 0x2b.
Note: the 0x2b trap handler should flush the data cache, since a write hit would update the cache while
the memory would keep the old value due the write error.
31 10 9 8 7 0
ATAG LRR LOCK VALID
Field Definitions:
[31:10]: Address Tag (ATAG) - Contains the address of the data held in the cache line.
[9]: LRR - Used by LRR algorithm to store replacement history. ‘0’ if LRR is not used.
[8]: LOCK - Locks a cache line when set. ‘0’ if instruction cache locking was not enabled in the configuration.
[3:0]: Valid (V) - When set, the corresponding sub-block of the cache line contains valid data. These bits is set when a
sub-block is filled due to a successful cache miss; a cache fill which results in a memory error will leave the valid
bit unset. V[0] corresponds to address 0 in the cache line, V[1] to address 1, V[2] to address 2 and V[3] to address 3.
NOTE: only the necessary bits will be implemented in the cache tag, depending on the cache configu-
ration. As an example, a 2 kByte cache with 32 bytes per line would only have eight valid bits and 21
tag bits. The cache rams are sized automatically by the ram generators in the model.
Diagnostic read of tags is possible by executing an LDA instruction with ASI=0xC for instruction
cache tags and ASI=0xE for data cache tags. A cache line and set are indexed by the address bits mak-
ing up the cache offset and the least significant bits of the address bits making up the address tag. Sim-
ilarly, the data sub-blocks may be read by executing an LDA instruction with ASI=0xD for instruction
cache data and ASI=0xF for data cache data. The sub-block to be read in the indexed cache line and
set is selected by A[4:2].
The tags can be directly written by executing a STA instruction with ASI=0xC for the instruction
cache tags and ASI=0xE for the data cache tags. The cache line and set are indexed by the address bits
making up the cache offset and the least significant bits of the address bits making up the address tag.
D[31:10] is written into the ATAG filed (see above) and the valid bits are written with the D[7:0] of
the write data. Bit D[9] is written into the LRR bit (if enabled) and D[8] is written into the lock bit (if
enabled). The data sub-blocks can be directly written by executing a STA instruction with ASI=0xD
for the instruction cache data and ASI=0xF for the data cache data. The sub-block to be read in the
indexed cache line and set is selected by A[4:2].
31 29 28 27 24 23 22 21 20 19 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
PS TB DS FD FI FT IB IP DP ITE IDE DTE DDE DF IF DCS ICS
[28]: Parity Select [PS] - if set diagnostic read will return 4 check bits in the lsb bits, otherwise tag or data word is
returned.
[27:24]: Test Bits [TB] - if set, check bits will be xored with test bits TB during diagnostic write
[23]: Data cache snoop enable [DS] - if set, will enable data cache snooping.
[22]: Flush data cache (FD). If set, will flush the instruction cache. Always reads as zero.
[21]: Flush Instruction cache (FI). If set, will flush the instruction cache. Always reads as zero.
[20:19]: FT scheme: “00” = no FT, “01” = 4-bit checking implemented
[16]: Instruction burst fetch (IB). This bit enables burst fill during instruction fetch.
[15]: Instruction cache flush pending (IP). This bit is set when an instruction cache flush operation is in progress.
[14]: Data cache flush pending (DP). This bit is set when an data cache flush operation is in progress.
[13:12]: Instruction Tag Errors (ITE) - Number of detected parity errors in the instruction tag cache.
[11:10]: Instruction Data Errors (IDE) - Number of detected parity errors in the instruction data cache.
[9:8]: Data Tag Errors (DTE) - Number of detected parity errors in the data tag cache.
[7:6]: Data Data Errors (IDE) - Number of detected parity errors in the data data cache.
[5]: Data Cache Freeze on Interrupt (DF) - If set, the data cache will automatically be frozen when an asynchronous
interrupt is taken.
[4]: Instruction Cache Freeze on Interrupt (IF) - If set, the instruction cache will automatically be frozen when an
asynchronous interrupt is taken.
[3:2]: Data Cache state (DCS) - Indicates the current data cache state according to the following: X0= disabled, 01 =
frozen, 11 = enabled.
[1:0]: Instruction Cache state (ICS) - Indicates the current data cache state according to the following: X0= disabled, 01
= frozen, 11 = enabled.
If the DF or IF bit is set, the corresponding cache will be frozen when an asynchronous interrupt is
taken. This can be beneficial in real-time system to allow a more accurate calculation of worst-case
execution time for a code segment. The execution of the interrupt handler will not evict any cache
lines and when control is returned to the interrupted task, the cache state is identical to what it was
before the interrupt. If a cache has been frozen by an interrupt, it can only be enabled again by
enabling it in the CCR. This is typically done at the end of the interrupt handler before control is
returned to the interrupted task.
31 30 29 28 27 26 25 24 23 20 19 18 16 15 12 11 4 3 0
CL REPL SN SETS SSIZE LR LSIZE LRSIZE LRSTART M
All cache registers are accessed through load/store operations to the alternate address space (LDA/
STA), using ASI = 2. The table below shows the register addresses:
Address Register
0x00 Cache control register
0x04 Reserved
0x08 Instruction cache configuration register
0x0C Data cache configuration register
ASI Usage
0x10 Flush page
0x10 MMU flush page
0x13 MMU flush context
0x14 MMU diagnostic dcache context access
0x15 MMU diagnostic icache context access
0x19 MMU registers
0x1C MMU bypass
0x1D MMU diagnostic access
Address Register
0x000 MMU control register
0x100 Context pointer register
0x200 Context register
0x300 Fault status register
0x400 Fault address register
When the GRFPU-Lite is enabled in the model, the version field in %fsr has the value of 3.
[31:30]: FP FT ID - Defines which SEU protection is implemented in the FPU (0x1 = 4-bit parity with restart).
[29:27]: FP RF error counter - Number of detected parity errors in the FP register file.
[26:17]: Reserved
[16]: FP RF protection disable (FDI) - Disables FP RF parity protection when set.
[15:14]: IU FT ID - Defines which SEU protection is implemented in the IU (0x2 = 8-bit parity without restart).
[13:11]: IU RF error counter - Number of detected parity errors in the IU register file.
[10:3]: RF Test bits (FTB) - In test mode, these bits are xored with correct parity bits before written to the register file.
[2]: DP ram select (DP) - Only applicable if the IU or FPU register files consists of two dual-port rams. See text below
for details.
[1]: IU RF Test Enable - Enables register file test mode. Parity bits are xored with TB before written to the register file.
[0]: IU RF protection disable (IDI) - Disables IU RF parity protection when set.
TE DP Function
1 0 Write to IU register (%i, %l, %o, %g) will only write location of %rs2
Write to FPU register (%f) will only write location of %rs2
1 1 Write to IU register (%i, %l, %o, %g) will only write location of %rs1
Write to IU register (%f) will only write location of %rs1
0 X IU and FPU registers written nominally
3.8.7 Initialisation
After power-on, the check bits in the IU and FPU register files are not initialized. This means that
access to an uninitialized (un-written) register could cause a register access trap (tt = 0x20). Such
behaviour is considered as a software error, as the software should not read a register before it has
been written. It is recommended that the boot code for the processor writes all registers in the IU and
FPU register files before launching the main application.
The check bits in the cache memories do not need to be initialized as this is done automatically during
cache line filling.
3.10 Timing
The timing waveforms and timing parameters are shown in figure 12 and are defined in table 20.
clk
tLEON3_0 tLEON3_0
errorn
4.1 Overview
The floating-point unit implements floating-point operations as defined in IEEE Standard for Binary
Floating-Point Arithmetic (IEEE-754) and SPARC V8 standard (IEEE-1754).
Supported formats are single and double precision floating-point numbers. The floating-point unit is
not pipelined and executes one floating-point operation at a time.
GRFPU
Lite
clk
reset
ctrl_out
Unpack
opcode Pack result
Iteration unit
operand1 (Add/Sub/Mul/Div)
except
operand2
cc
round
ctrl_in
Control
unit
4.2.2 FP operations
The floating-point unit supports four types of floating-point operations: arithmetic, compare, convert
and move. The operations implement all FP instructions specified by SPARC V8 instruction set. All
operations are summarized in the table below.
4.2.3 Exceptions
The floating-point unit detects all exceptions defined by the IEEE-754 standard. This includes detec-
tion of Invalid Operation (NV), Overflow (OF), Underflow (UF), Division-by-Zero (DZ) and Inexact
(NX) exception conditions. Generation of special results such as NaNs and infinity is also imple-
mented.
4.2.4 Rounding
All four rounding modes defined in the IEEE-754 standard are supported: round-to-nearest, round-to-
+inf, round-to--inf and round-to-zero.
5.1 Overview
The Floating-Point Unit Controller is used to attach the floating-point unit (FPU) to the LEON integer
unit (IU). It performs decoding and dispatching of the floating-point (FP) operations to the floating-
point units as well as managing the floating-point register file, the floating-point state register (FSR)
and the floating-point deferred-trap queue (FQ).
The floating-point unit is not pipelined and executes only one instruction at a time. To improve perfor-
mance, the controller allows the floating-point unit to execute in parallel with the processor pipeline
as long as no new floating-point instructions are pending.
The trap is deferred to the next floating-point instruction (FPop, FP load/store, FP branch) following
the trap-inducing instruction. When the trap is taken the floating-point deferred-queue (FQ) contains
the trap-inducing instruction.
After the trap is taken the qne bit of the FSR is set and remains set until the FQ is emptied. STDFQ
instruction reads a double-word from the floating-point deferred queue, the first word is the address of
the instruction and the second word is the instruction code.
6.1 Overview
To simplify debugging on target hardware, the LEON3 processor implements a debug mode during
which the pipeline is idle and the processor is controlled through a special debug interface. The
LEON3 Debug Support Unit (DSU) is used to control the processor during debug mode. The DSU
acts as an AHB slave and can be accessed by any AHB master. An external debug host can therefore
access the DSU through several different interfaces.
Debug I/F
LEON3
LEON3
Processor(s)
LEON3
Processor Debug Support
LEON3
Processor(s) Unit
Processor(s)
DEBUG HOST
6.2 Operation
Through the DSU AHB slave interface, any AHB master can access the processor registers and the
contents of the instruction trace buffer. The DSU control registers can be accessed at any time, while
the processor registers, caches and trace buffer can only be accessed when the processor has entered
debug mode. In debug mode, the processor pipeline is held and the processor state can be accessed by
the DSU. Entering the debug mode can occur on the following events:
• executing a breakpoint instruction (ta 1)
• integer unit hardware breakpoint/watchpoint hit (trap 0xb)
• rising edge of the external break signal (DSUBRE)
• setting the break-now (BN) bit in the DSU control register
• a trap that would cause the processor to enter error mode
• occurrence of any, or a selection of traps as defined in the DSU control register
In addition to the AHB signals, the DSU time tag counter is also stored in the trace.
The trace buffer is enabled by setting the enable bit (EN) in the trace control register. Each AHB
transfer is then stored in the buffer in a circular manner. The address to which the next transfer is writ-
ten is held in the trace buffer index register, and is automatically incremented after each transfer.
Tracing is stopped when the EN bit is reset, or when a AHB breakpoint is hit. Tracing is temporarily
suspended when the processor enters debug mode. Note that neither the trace buffer memory nor the
breakpoint registers (see below) can be read/written by software when the trace buffer is enabled.
During tracing, one instruction is stored per line in the trace buffer with the exception of multi-cycle
instructions. Multi-cycle instructions are entered two or three times in the trace buffer. For store
instructions, bits [63:32] correspond to the store address on the first entry and to the stored data on the
second entry (and third in case of STD). Bit 126 is set on the second and third entry to indicate this. A
double load (LDD) is entered twice in the trace buffer, with bits [63:32] containing the loaded data.
Multiply and divide instructions are entered twice, but only the last entry contains the result. Bit 126
is set for the second entry. For FPU operation producing a double-precision result, the first entry puts
the MSB 32 bits of the results in bit [63:32] while the second entry puts the LSB 32 bits in this field.
When the processor enters debug mode, tracing is suspended. The trace buffer and the trace buffer
control register can be read and written while the processor is in the debug mode. During the instruc-
tion tracing (processor in normal mode) the trace buffer and the trace buffer control register can not be
accessed.
The addresses of the IU registers depends on how many register windows has been implemented:
• %on : 0x300000 + (((psr.cwp * 64) + 32 + n*4) mod (NWINDOWS*64))
• %ln : 0x300000 + (((psr.cwp * 64) + 64 + n*4) mod (NWINDOWS*64))
• %in : 0x300000 + (((psr.cwp * 64) + 96 + n*4) mod (NWINDOWS*64))
• %gn : 0x300000 + (NWINDOWS*64) + n*4
• %fn : 0x301000 + n*4
31 11 10 9 8 7 6 5 4 3 2 1 0
PW HL PE EB EE DM BZ BX BS BW BE TE
31 18 17 16 15 2 1 0
SS15 ... SS2 SS1 SS0 BN15 ... BN2 BN1 BN0
[15:0]: Break now (BNx) -Force processor x into debug mode if the Break on S/W breakpoint (BS) bit in the processors
DSU control register is set. If cleared, the processor x will resume execution.
[31:16] : Single step (SSx) - if set, the processor x will execute one instruction and return to debug mode. The bit remains set
after the processor goes into the debug mode.
31 18 17 16 15 2 1 0
DM15 ... DM2 DM1DM0 ED15 ... ED2 ED1 ED0
[15:0] : Enter debug mode (EDx) - Force processor x into debug mode if any of processors in a multiprocessor system enters
the debug mode. If 0, the processor x will not enter the debug mode.
[31:16]: Debug mode mask. If set, the corresponding processor will not be able to force running processors into debug mode
even if it enters debug mode.
31 29 0
00 DSU TIME TAG VALUE
The value is used as time tag in the instruction and AHB trace buffer.
The width of the timer (up to 30 bits) is configurable through the DSU generic port.
31 7 0
ASI
31 16 1 0
DCNT RESERVED DM EN
31 0
INDEX
27:4 Trace buffer index counter (INDEX). Note that the number of bits actually implemented depends on the size of the
trace buffer. (During write)
31:4 Trace buffer index counter (INDEX). Note that the number of bits actually implemented depends on the size of the
trace buffer. (During read)
31 2 1 0
Break address reg.
BADDR[31:2] 0 0
31 2 1 0
Break mask reg.
BMASK[31:2] LD ST
31 16 0
RESERVED IT POINTER
[15:0] Instruction trace pointer. Note that the number of bits actually implemented depends on the size of the trace buffer.
6.8 Timing
The timing waveforms and timing parameters are shown in figure 24 and are defined in table 27.
clk
Note: The dsubre and dsuen are re-synchronized internally. These signals do not have to meet any
setup or hold requirements.
7.1 Overview
The fault tolerant 32-bit PROM/SRAM memory interface uses a common 32-bit memory bus to inter-
face PROM, SRAM and I/O devices. Support for 8-bit PROM banks can also be separately enabled.
In addition it also provides an Error Detection And Correction Unit (EDAC), correcting one and
detecting two errors. Configuration of the memory controller functions is performed through the APB
bus interface.
AHB A D CB
SRO.ROMSN CS A
SRO.OEN OE PROM D
SRO.WRITEN WE CB
MEMORY
CONTROLLER
A
SRO.RAMSN CS
OE SRAM D
SRO.RAMOEN
SRO.RWEN[3:0] WE CB
A
SRO.IOSN CS
OE IO D
WE
SRI.A[27:0]
SRI.D[31:0]
SRO.D[31:0]
CB[7:0]
AHB/APB APB
Bridge
7.2 Operation
The controller is configured through to decode three address ranges: PROM, SRAM and I/O area. By
default the PROM area is mapped into address range 0x0 - 0x00FFFFFF, the SRAM area is mapped
into address range 0x40000000 - 0x40FFFFFF, and the I/O area is mapped to 0x20000000 -
0x20FFFFFF.
One chip select is decoded for the I/O area, while SRAM has 4 and PROM 4 chip select signals. The
controller generates both a common write-enable signal (WRITEN) as well as four byte-write enable
signals (WREN). If the SRAM uses a common write enable signal the controller can be configured to
perform read-modify-write cycles for byte and half-word write accesses. Number of waitstates is sep-
arately configurable for the three address ranges.
The configuration of the EDAC is done through a configuration register accessed from the APB bus.
During nominal operation, the EDAC checksum is generated and checked automatically. Single errors
are corrected without generating any indication of this condition in the bus response. If a multiple
error is detected, a two cycle error response is given on the AHB bus.
When EDAC is enabled, one extra latency cycle is generated during reads and subword writes.
The EDAC function can be enabled for SRAM and PROM area accesses, but not for I/O area
accesses. For the SRAM area, the EDAC functionality is only supported for accessing 32-bit wide
SRAM banks. For the PROM area, the EDAC functionality is supported for accessing 32-bit wide
PROM banks, as well as for read accesses to 8-bit wide PROM banks.
The equations below show how the EDAC checkbits are generated:
CB0 = D0 ^ D4 ^ D6 ^ D7 ^ D8 ^ D9 ^ D11 ^ D14 ^ D17 ^ D18 ^ D19 ^ D21 ^ D26 ^ D28 ^ D29 ^ D31
CB1 = D0 ^ D1 ^ D2 ^ D4 ^ D6 ^ D8 ^ D10 ^ D12 ^ D16 ^ D17 ^ D18 ^ D20 ^ D22 ^ D24 ^ D26 ^ D28
CB2 = D0 ^ D3 ^ D4 ^ D7 ^ D9 ^ D10 ^ D13 ^ D15 ^ D16 ^ D19 ^ D20 ^ D23 ^ D25 ^ D26 ^ D29 ^ D31
CB3 = D0 ^ D1 ^ D5 ^ D6 ^ D7 ^ D11 ^ D12 ^ D13 ^ D16 ^ D17 ^ D21 ^ D22 ^ D23 ^ D27 ^ D28 ^ D29
CB4 = D2 ^ D3 ^ D4 ^ D5 ^ D6 ^ D7 ^ D14 ^ D15 ^ D18 ^ D19 ^ D20 ^ D21 ^ D22 ^ D23 ^ D30 ^ D31
CB5 = D8 ^ D9 ^ D10 ^ D11 ^ D12 ^ D13 ^ D14 ^ D15 ^ D24 ^ D25 ^ D26 ^ D27 ^ D28 ^ D29 ^ D30 ^ D31
CB6 = D0 ^ D1 ^ D2 ^ D3 ^ D4 ^ D5 ^ D6 ^ D7 ^ D24 ^ D25 ^ D26 ^ D27 ^ D28 ^ D29 ^ D30 ^ D31
means of the EBSZ field and the ROMBSZ field. When set to 0, the size of the available EDAC area is
defined as the PROM bank size. When set to 1, as twice the PROM bank size. When set to 2, as four
times the PROM bank size. And when set to 3, as eight times the PROM bank size. For any other
value than 0, the use of multiple PROM banks is required.
Example, if ROMBSZ=10 and EBSZ=1, the EDAC area is 8 kByte*2^ROMBSZ*2^EBSZ = 16
MByte = 0x01000000. The checksum byte for the first word located at address 0x00000000 to
0x00000003 is located at 0x00C00000. The checksum byte for the second word located at address
0x00000004 to 0x00000007 is located at 0x00C00001, and so on. Since EBSZ=1, two PROM banks
are required for implementing the EDAC area, each bank with size 8 MByte = 0x00800000.
data lead-out
clk
address
A1
romsn/iosn/ramsn
oen
data D1
bexcn
address
A1
romsn/iosn/ramsn
rwen
data D1
bexcn
address
A1
iosn
oen
data D1
brdyn
first
sample
Figure 28. I/O READ cycle, programmed with 1 wait state, and with an extra data cycle added with BRDYN.
address A1 A2
romsn
ramsn
oen
data D1 D2
cb CB1 CB2
haddr A1 A2 A3
htrans
10 10 00
hready
hrdata D1 D2
address A1 A2 A3 A4
romsn
ramsn
oen
data D1 D2 D3 D4
cb
CB1 CB2 CB3 CB4
haddr A1 A2 A3 A4 A5
htrans 00
10 11
hready
hrdata
D1 D2 D3 D4
Figure 30. 32-bit PROM/SRAM sequential read access with 0 wait-states and EDAC disabled.
address A1 A2
romsn
ramsn
oen
data D1 D2
cb
CB1 CB2
haddr A1 A2 A3
htrans
10 10 00
hready
hrdata D1 D2
Figure 31. 32-bit PROM/SRAM non-sequential read access with 0 wait-states and EDAC enabled.
address A1 A2 A3 A4
romsn
ramsn
oen
data D1 D2 D3 D4
cb
CB1 CB2 CB3 CB4
haddr A1 A2 A3 A4 A5
htrans 00
10 11
hready
hrdata
D1 D2 D3 D4
Figure 32. 32-bit PROM/SRAM sequential read access with 0 wait-states and EDAC enabled..
address A1 A2
romsn
ramsn
writen
data D1 D2
cb
CB1 CB2
haddr A1 A2 A3
htrans
10 10 00
hready
hwdata
D1 D2
Figure 33. 32-bit PROM/SRAM non-sequential write access with 0 wait-states and EDAC disabled.
address A1 A2 A3
romsn
ramsn
writen
data D1 D2 D3
haddr A1 A2 A3 A4
htrans
10 11 00
hready
hwdata
D1 D2 D3
Figure 34. 32-bit PROM/SRAM sequential write access with 0 wait-states and EDAC disabled.
If waitstates are configured, one extra data cycle will be inserted for each waitstate in both read and
write cycles. The timing for write accesses is not affected when EDAC is enabled while one extra
latency cycle is introduced for single access reads and at the beginning of read bursts.
clk
address A1
romsn
ramsn
writen
oen
data D1 D1/M1
cb CM1
CB1
haddr A1 A2
htrans
10 00
hready
hwdata
M1
Figure 35. 32-bit PROM/SRAM rmw access with 0 wait-states and EDAC disabled.
I/O accesses are similar to PROM and SRAM accesses but a lead-in and lead-out cycle is always
present.
lead-in data1 data2 data3 lead-out
clk
address A1
iosn
writen
data D1
haddr A1 A2
htrans
10 00
hready
hwdata
D1
address A1
iosn
oen
data D1
haddr A1 A2
htrans
10 00
hready
hrdata
D1
7.4 Registers
The core is programmed through registers mapped into APB address space.
31: 27 RESERVED
26 Bus ready enable (BR) - Enables the bus ready signal (BRDYN) for I/O area.
25 Bus exception enable (BE) - Enables the bus exception signal (BEXCEN) for PROM, SRAM and I/
O areas
24 RESERVED
23: 20 I/O wait states (IOWS) - Sets the number of waitstates for accesses to the I/O-area.
19: 18 RESERVED
17: 14 ROM bank size (ROMBSZ) - Sets the PROM bank size. 0=8 kByte, 1=16 kByte, ..., 15=256 MByte
13: 12 EDAC bank size (EBSZ) - Sets the EDAC bank size for 8-bit PROM support. The resulting EDAC
bank size is 2^EBSZ * 2^ROMBSZ * 8kByte. Note that only the three lower quarters of the bank
can be used for user data. The EDAC checksums are placed in the upper quarter of the bank.
11 ROM write enable (RW) - Enables writes to the PROM memory area. When disabled, writes to the
PROM area will generate an ERROR response on the AHB bus.
10 RESERVED
9: 8 ROM data bus width (RBW) - Sets the PROM data bus width. “00” = 8-bit, “10” = 32-bit, others
reserved. At reset, these bits are initialized with the value of gpio[1:0].
7: 4 RESERVED
3: 0 ROM waitstates (ROMWS) - Sets the number of waitstates for accesses to the PROM area. Reset to
all-ones.
During reset, the ROM width (bits [9:8]) are set with value on gpio[1:0] inputs. ROM bank size is set
to 8 kByte. External bus error and bus ready are disabled. All other fields are undefined.
31: 13 RESERVED
12: 9 RAM bank size (RAMBSZ) - Sets the number of waitstates for accesses to the RAM area.
8: 7 RESERVED
6 Read-modify-write enable (RW) - Enables read-modify-write cycles for write accesses.
5: 2 RESERVED
1: 0 RAM waitstates (RAMW) - Sets the number of waitstates for accesses to the RAM area.
31: 12 RESERVED
11 Write bypass (WB) - Enables EDAC write bypass. When enabled the TCB field will be used as
checkbits in all write operations.
10 Read bypass (RB) - Enables EDAC read bypass. When enabled checkbits read from memory in all
read operations will be stored in the TCB field.
9 SRAM EDAC enable (SE) - Enables EDAC for the SRAM area.
8 PROM EDAC enable (PE) - Enables EDAC for the PROM area. Reset value is taken from the input
signal gpio[2].
7: 0 Test checkbits (TCB) - Used as checkbits in write operations when WB is activated and checkbits
from read operations are stored here when RB is activated.
During reset, the prom EDAC usage (bit [8]) is set with the value on gpio[2].
7.6 Timing
The timing waveforms and timing parameters are shown in figure 38 and are defined in table 33.
clk
tFTSRCTRL0
address[]
tFTSRCTRL1 tFTSRCTRL1
ramsn[], romsn[]
iosn
tFTSRCTRL2 tFTSRCTRL2
rwen[], writen
tFTSRCTRL3, tFTSRCTRL4 tFTSRCTRL5
data[], cb[]
(output) tFTSRCTRL3
clk
address[]
ramsn[], romsn[]
iosn
tFTSRCTRL6 tFTSRCTRL6
ramoen[]
ramben[], oen, read tFTSRCTRL7 tFTSRCTRL8
data[], cb[]
(input)
tFTSRCTRL9 tFTSRCTRL10
brdyn, bexcn
8.1 Overview
The combined 8/32-bit memory controller provides a bridge between external memory and the AHB
bus. The memory controller can handle four types of devices: PROM, asynchronous static ram
(SRAM), synchronous dynamic ram (SDRAM) and memory mapped I/O devices (IO). The PROM,
SRAM and SDRAM areas can be EDAC-protected using a (39,7) BCH code. The BCH code provides
single-error correction and double-error detection for each 32-bit memory word.
The SDRAM area can optionally also be protected using Reed-Solomon coding. In this case a 16-bit
checksum is used for each 32-bit word, and any two adjacent 4-bit (nibble) errors can be corrected.
The memory controller is configured through three configuration registers accessible via an APB bus
interface. The external data bus can be configured in 8-, or 32-bit mode, depending on application
requirements. The controller decodes three address spaces on the AHB bus (PROM, IO, and SRAM/
SDRAM).
External chip-selects are provided for up to four PROM banks, one IO bank, five SRAM banks and
two SDRAM banks. Figure 39 below shows how the connection to the different device types is made.
APB AHB A D CB
ROMSN[3 :0] CS A
OEN OE PROM D
WRITEN WE CB
APB CS A
IOSN
OE I/O D
WE
FTMCTRL
RAMSN[4:0] CS A
RAMOEN[4:0] OE SRAM D
RWEN[3:0] WE
CB
MBEN[3:0] MBEN
A[27:0]
D[31:0]
CB[7:0]
slow turn-off time of PROM devices. Figure 40 shows the basic read cycle waveform (zero waitstate)
for non-consecutive PROM reads. Note that the address is undefined in the lead-out cycle. Figure 41
shows the timing for consecutive cycles (zero waitstate). Waitstates are added by extending the data2
phase. This is shown in figure 42 and applies to both consecutive and non-consecutive cycles. Only an
even number of waitstates can be assigned to the PROM area.
address
A1 A2
romsn
oen
data D1 D2
cb CB1 CB2
address
A1 A2
romsn
oen
data D1 D2
cb CB1 CB2
address
A1
romsn
oen
data D1
cb CB1
address A1
romsn
rwen
data D1
cb
CB1
address A1
romsn
rwen
data D1
cb
CB1
address A1
iosn
oen
data D1
cb
CB1
address A1
iosn
writen
data D1
cb
CB1
shows the basic read cycle waveform (zero waitstate). Waitstates are added in the same way as for
PROM in figure 42.
data1 data2 lead-out data1 data2 lead-out
clk
address
A1 A2
ramsn
oen,
ramoen
data D1 D2
cb CB1 CB2
For read accesses to RAMSN[4:0], a separate output enable signal (RAMOEN[n]) is provided for
each RAM bank and only asserted when that bank is selected. A write access is similar to the read
access but takes a minimum of three cycles. Waitstates are added in the same way as for PROM.
Each byte lane has an individual write strobe to allow efficient byte and half-word writes. If the mem-
ory uses a common write strobe for the full 32-bit data, the read-modify-write bit MCFG2 should be
set to enable read-modify-write cycles for sub-word writes.
address A1
ramsn
rwen
data D1
cb
CB1
The RMW bit must not be set if RAM EDAC is not enabled when RAM width is set to 8-bit.
8-bit PROM A D
ROMSN[0] A[25:0]
CS A
OEN OE PROM D[31:24]
WRITEN WE D
MEMORY
CONTROLLER 8-bit RAM
RAMSN[0] A[25:0]
CS A
RAMOEN[0]
RWE[0]
OE SRAM D[31:24]
RWEN[0] WE D
A[27:0]
D[31:24]/
D[31:24]
In 8-bit mode, the PROM/SRAM devices should be connected to the MSB byte of the data bus
(D[31:24]). The LSB address bus should be used for addressing (A[25:0]).
8.8.1 General
Synchronous dynamic RAM (SDRAM) access is supported to two banks of PC100/PC133 compati-
ble devices. This is implemented by a special version of the SDCTRL SDRAM controller core, which
is optionally instantiated as a sub-block. The SDRAM controller supports 64M, 256M and 512M
devices with 8 - 12 column-address bits, and up to 13 row-address bits. The size of the two banks can
be programmed in binary steps between 4 MByte and 512 MByte. The operation of the SDRAM con-
troller is controlled through MCFG2 and MCFG3 (see below).
8.8.3 Initialisation
When the SDRAM controller is enabled, it automatically performs the SDRAM initialisation
sequence of PRECHARGE, 8x AUTO-REFRESH and LOAD-MODE-REG on both banks simulta-
neously. The controller programs the SDRAM to use single location access on write. The controller
programs the SDRAM to use line burst of length 8, selectable via the MCFG2 register.
If the TCAS, TRP and TRFC are programmed such that the PC100/133 specifications are fulfilled, the
remaining SDRAM timing parameters will also be met. The table below shows typical settings for
100 and 133 MHz operation and the resulting SDRAM timing (in ns):
8.9 Refresh
The SDRAM controller contains a refresh function that periodically issues an AUTO-REFRESH
command to both SDRAM banks. The period between the commands (in clock periods) is pro-
grammed in the refresh counter reload field in the MCFG3 register. Depending on SDRAM type, the
required period is typically 7.8 or 15.6 µs (corresponding to 780 or 1560 clocks at 100 MHz). The
generated refresh period is calculated as (reload value+1)/sysclk. The refresh function is enabled by
setting bit 31 in MCFG2.
8.9.5 Initialisation
Each time the SDRAM is enabled (bit 14 in MCFG2), an SDRAM initialisation sequence will be sent
to both SDRAM banks. The sequence consists of one PRECHARGE, eight AUTO-REFRESH and
one LOAD-COMMAND-REGISTER command.
If the SRAM is configured in 8-bit mode, the EDAC checkbit bus (CB[7:0]) is not used but it is still
possible to use EDAC protection. Data is always accessed as words (4 bytes at a time) and the corre-
sponding checkbits are located at the address acquired by inverting the word address (bits 2 to 27) and
using it as a byte address. The same chip-select is kept active. A word written as four bytes to
addresses 0, 1, 2, 3 will have its checkbits at address 0xFFFFFFF, addresses 4, 5, 6, 7 at 0xFFFFFFE
and so on. All the bits up to the maximum bank size will be inverted while the same chip-select is
always asserted. This way all the bank sizes can be supported and no memory will be unused (except
for a maximum of 4 byte in the gap between the data and checkbit area). A read access will automati-
cally read the four data bytes individually from the nominal addresses and the EDAC checkbit byte
from the top part of the bank. A write cycle is performed the same way. Byte or half-word write
accesses will result in an automatic read-modify-write access where 4 data bytes and the checkbit byte
are firstly read, and then 4 data bytes and the newly calculated checkbit byte are writen back to the
memory. This 8-bit mode applies to SRAM while SDRAM always uses 32-bit accesses. The size of
the memory bank is determined from the settings in MCFG2.
If the ROM is configured in 8-bit mode, EDAC protection is provided in a similar way as for the
SRAM memory described above. The difference is that write accesses are not being handled automat-
ically. Instead, write accesses must only be performed as individual byte accesses by the software,
writing one byte at a time, and the corresponding checkbit byte must be calculated and be written to
the correct location by the software.
The operation of the EDAC can be tested trough the MCFG3 register. If the WB (write bypass) bit is
set, the value in the TCB field will replace the normal checkbits during memory write cycles. If the
RB (read bypass) is set, the memory checkbits of the loaded data will be stored in the TCB field dur-
ing memory read cycles.
NOTE: when the EDAC is enabled, the RMW bit in memory configuration register 2 must be set.
EDAC is not supported for 64-bit wide SDRAM data busses.
NOTE: when the EDAC is enabled in 8-bit bus mode, only the first bank select (RAMSN[0],
PROMSN[0]) can be used.
∏ (x + α ) ∑ gj ⋅ x
i j
g( x) = =
i=0 j=0
c1,11 = sd[11:8]
c0,12 = sd[7:4]
c1,12 = sd[3:0]
c0,13 = scb[15:12]
c1,13 = scb[11:8]
c0,14 = scb[7:4]
c1,14 = scb[3:0]
where SD[ ] is interchanable with DATA[] and SCB[ ] is interchangable with CB[ ]
address
A1
romsn/iosn/ramsn[4]
oen
data D1
brdyn
Figure 50. READ cycle with one extra data2 cycle added with BRDYN (synchronous sampling). Lead-out cycle is only
applicable for I/O accesses.
Figure 51 shows the use of BRDYN with asynchronous sampling. BRDYN is kept asserted for more
than 1.5 clock-cycle. Two synchronization registers are used so it will take at least one additional
cycle from when BRDYN is first asserted until it is visible internally. In figure 51 one cycle is added
to the data2 phase.
address
A1
romsn/iosn/ramsn[4]
oen
data D1
brdyn
bexcn
Figure 51. BRDYN (asynchronous) sampling and BEXCN timing. Lead-out cycle is only applicable for I/O-accesses.
address
A1
romsn/iosn/ramsn[4]
oen
data D1
brdyn
Figure 52. Read cycle with one waitstate (configured) and one BRDYN generated waitstate (synchronous sampling).
mode for RAM and PROM. That is, when four bytes are written for a word access to 8-bit wide mem-
ory BEXCN is only sampled in the last access with the same timing as a single access in 32-bit mode.
address A1
romsn/iosn/ramsn
oen
data D1
bexcn
address A1
romsn/iosn/ramsn
rwen
data D1
bexcn
Figure 54. Write cycle with BEXCN. Chip-select (iosn) is not asserted in lead-in cycle for I/O-accesses.
8.15 Registers
The core is programmed through registers mapped into APB address space.
31 RESERVED
30 PROM area bus ready enable (PBRDY) - Enables bus ready (BRDYN) signalling for the PROM
area. Reset to ‘0’.
29 Asynchronous bus ready (ABRDY) - Enables asynchronous bus ready.
28 : 27 I/O bus width (IOBUSW) - Sets the data width of the I/O area (“00”=8, “10” =32).
26 I/O bus ready enable (IBRDY) - Enables bus ready (BRDYN) signalling for the I/O area. Reset to
‘0’.
25 Bus error enable (BEXCN) - Enables bus error signalling for all areas. Reset to ‘0’.
24 RESERVED
23 : 20 I/O waitstates (IO WAITSTATES) - Sets the number of waitstates during I/O accesses (“0000”=0,
“0001”=1, “0010”=2,..., “1111”=15).
19 I/O enable (IOEN) - Enables accesses to the memory bus I/O area.
18 RESERVED
17 : 14 PROM bank size (ROMBANKSZ) - Returns current PROM bank size when read. “0000” is a special
case and corresponds to a bank size of 256 MByte. All other values give the bank size in binary
steps: “0001”=16 kByte, “0010”=32 kByte, ... , “1111”=256 MByte. For value “0000” or “1111”
only two chip selects are available. For other values, two chip select signals are available for fixed
bank sizes. For other values, four chip select signals are available for programmable bank sizes.
Programmable bank sizes can be changed by writing to this register field. The written values corre-
spond to the bank sizes and number of chip-selects as above. Reset to “0000” when programmable.
13:12 RESERVED
11 PROM write enable (PWEN) - Enables write cycles to the PROM area.
10 RESERVED
9:8 PROM width (PROM WIDTH) - Sets the data width of the PROM area (“00”=8, “10”=32).
At reset, these bits are initialized with the value of gpio[1:0].
7:4 PROM write waitstates (PROM WRITE WS) - Sets the number of wait states for PROM write cycles
(“0000”=0, “0001”=2, “0010”=4,..., “1111”=30).
3:0 PROM read waitstates (PROM READ WS) - Sets the number of wait states for PROM read cycles
(“0000”=0, “0001”=2, “0010”=4,...,”1111”=30). Reset to “1111”.
During reset, the prom width (bits [9:8]) are set with value on gpio[1:0] inputs. The PROM waitstates
fields are set to 15 (maximum). External bus error and bus ready are disabled. All other fields are
undefined.
31 : 29 RESERVED
28 Reed-Solomon EDAC enable (RSE) - if set, will enable Reed-Solomon protection of SDRAM area
when implemented
27 Memory EDAC (ME) - Indicates if memory EDAC is present.
26 : 12 SDRAM refresh counter reload value (SDRAM REFRESH COUNTER)
11 EDAC diagnostic write bypass (WB) - Enables EDAC write bypass.
10 EDAC diagnostic read bypass (RB) - Enables EDAC read bypass.
9 RAM EDAC enable (RE) - Enable EDAC checking of the RAM area (including SDRAM).
8 PROM EDAC enable (PE) - Enable EDAC checking of the PROM area. Ar reset, this bit is initial-
ized with the value of gpio[2].
7:0 Test checkbits (TCB) - This field replaces the normal checkbits during write cycles when WB is set.
It is also loaded with the memory checkbits during read cycles when RB is set.
During reset, the prom EDAC usage (bit [8]) is set with the value on gpio[2].
The period between each AUTO-REFRESH command is calculated as follows:
tREFRESH = ((reload value) + 1) / SYSCLK
31 : 17 RESERVED
16 EDAC diagnostic write bypass (WB) - Enables EDAC write bypass. Identical to WB in MCFG3.
15 : 0 Test checkbits (TCB) - This field replaces the normal checkbits during write cycles when WB is set.
It is also loaded with the memory checkbits during read cycles when RB is set. Note that TCB[7:0]
are identical to TCB[7:0] in MCFG3
8.17 Timing
The timing waveforms and timing parameters are shown in figure 55 and 56 are defined in table 42.
clk
tFTMCTRL0
address[]
tFTMCTRL1 tFTMCTRL1
ramsn[], romsn[]
tFTMCTRL2 tFTMCTRL2
rwen[], writen
tFTMCTRL2 tFTMCTRL2
read
tFTMCTRL3, tFTMCTRL4
data[], cb[]
(output) tFTMCTRL5
clk
address[]
ramsn[], romsn[]
tFTMCTRL6 tFTMCTRL6
ramoen[], ramben[], oen
read
tFTMCTRL7 tFTMCTRL8
data[], cb[]
(input)
tFTMCTRL9 tFTMCTRL10
brdyn, bexcn
clk
tFTMCTRL0
address[]
tFTMCTRL1 tFTMCTRL1
iosn[]
tFTMCTRL2 tFTMCTRL2
rwen[], writen
tFTMCTRL2 tFTMCTRL2
read
tFTMCTRL3, tFTMCTRL4
data[]
(output) tFTMCTRL5
clk
address[]
iosn[]
tFTMCTRL6 tFTMCTRL6
oen
read
tFTMCTRL7 tFTMCTRL8
data[]
(input)
tFTMCTRL9 tFTMCTRL10
brdyn, bexcn
The timing waveforms and timing parameters are shown in figure 57 and are defined in table 43.
clk
tFTMCTRL11
sdcasn, sdrasn
sdwen, sdcsn[] write nop read nop nop term nop nop nop
sddqm[]
tFTMCTRL11
address[], sa[]
tFTMCTRL12 tFTMCTRL13 tFTMCTRL14
data[], cb[],
sd[], scb[] tFTMCTRL15
Figure 57. Timing waveforms - SDRAM accesses
9 Interrupt Controller
9.1 Overview
The interrupts generated on the interrupt bus are all forwarded to the interrupt controller. The interrupt
controller prioritizes, masks and propagates the interrupt with the highest priority to the processor.
9.2 Operation
Priority
select
IRQ
Pending
Priority
encoder
15 4
APBI.PIRQ[15:1] IRQO[0].IRL[3:0]
IRQ IRQ
Force[0] mask[0]
Priority
encoder
4
IRQO[n].IRL[3:0]
IRQ IRQ
Force[n] mask[n]
When a processor acknowledges the interrupt, the corresponding pending bit will automatically be
cleared. Interrupt can also be forced by setting a bit in the interrupt force register. In this case, the pro-
cessor acknowledgement will clear the force bit rather than the pending bit. After reset, the interrupt
mask register is set to all zeros while the remaining control registers are undefined. Note that interrupt
15 cannot be maskable by the LEON3 processor and should be used with care - most operating sys-
tems do not safely handle this interrupt.
9.3 Registers
The core is controlled through registers mapped into APB address space. The number of implemented
registers depend on number of processor in the multiprocessor system.
31 17 16 1 0
“000..0” IL[15:1] 0
[31:16] Reserved.
[15:1] Interrupt Level n (IL[n]): Interrupt level for interrupt n.
[0] Reserved.
31 16 15 1 0
“000...0” IP[15:1] 0
[31:17] Reserved.
[16:1] Interrupt Pending n (IP[n]): Interrupt pending for interrupt n.
[0] Reserved
31 16 15 1 0
“000...0” IF[15:1] 0
[31:16] Reserved.
[15:1] Interrupt Force n (IF[n]): Force interrupt no. n. The resulting IF[n] is the value of the written value to IF[n].
[0] Reserved.
31 16 15 1 0
“000...0” IC[15:1] 0
[31:16] Reserved.
[15:1] Interrupt Clear n (IC[n]): Writing ‘1’ to ICn will clear interrupt n.Write only, reads zeros.
[0] Reserved.
31 28 16 15 0
NCPU “000...0” STATUS[15:0]
[31:28] NCPU. Number of CPU’s in the system -1. Read only. Fixed to +, i.e. 1processor.
[27:16] Reserved.
[15:1] Power-down status of CPU [n]: reads ‘1’ = power-down, ‘0’ = running. Write to start processor n: ‘1’=to start,
‘0=has no effect.
31 16 15 1 0
“000...0” IM[15:1] 0
[31:16] Reserved.
[15:1] Interrupt Mask n (IM[n]): If IMn = 0 the interrupt n is masked, otherwise it is enabled.
[0] Reserved.
10.1 Overview
The interface is provided for serial communications. The UART supports data frames with 8 data bits,
one optional parity bit and one stop bit. To generate the bit-rate, each UART has a programmable 12-
bit clock divider. Two FIFOs, each 2 bytes deep, are used for data transfer between the bus and UART.
Hardware flow-control is supported through the RTSN/CTSN hand-shake signals. Parity is supported.
CTSN
Serial port
Baud-rate Controller RTSN
8*bitclk
generator
APB
10.2 Operation
Following the transmission of the stop bit, if a new character is not available in the transmitter FIFO,
the transmitter serial data output remains high and the transmitter shift register empty bit (TS) will be
set in the UART status register. Transmission resumes and the TS is cleared when a new character is
loaded into the transmitter FIFO. When the FIFO is empty the TE bit is set in the status register. If the
transmitter is disabled, it will immediately stop any active transmissions including the character cur-
rently being shifted out from the transmitter shift register. The transmitter holding register may not be
loaded when the transmitter is disabled or when the FIFO (or holding register) is full. If this is done,
data might be overwritten and one or more frames are lost.
The TF status bit (not to be confused with the TF control bit) is set if the transmitter FIFO is currently
full and the TH bit is set as long as the FIFO is less than half-full (less than half of entries in the FIFO
contain data). The TF control bit enables FIFO interrupts when set. The status register also contains a
counter (TCNT) showing the current number of data entries in the FIFO.
When flow control is enabled, the CTSN input must be low in order for the character to be transmit-
ted. If it is deasserted in the middle of a transmission, the character in the shift register is transmitted
and the transmitter serial output then remains inactive until CTSN is asserted again. If the CTSN is
connected to a receivers RTSN, overrun can effectively be prevented.
An interrupt can also be enabled for the transmitter shift register. When enabled the core will generate
an interrupt each time the shift register goes from a non-empty to an empty state.
10.7 Registers
The core is controlled through registers mapped into APB address space.
31: 26 Receiver FIFO count (RCNT) - shows the number of data frames in the receiver FIFO. Reset 0.
25: 20 Transmitter FIFO count (TCNT) - shows the number of data frames in the transmitter FIFO. Reset 0.
10 Receiver FIFO full (RF) - indicates that the Receiver FIFO is full. Reset 0.
9 Transmitter FIFO full (TF) - indicates that the Transmitter FIFO is full. Reset 0.
8 Receiver FIFO half-full (RH) -indicates that at least half of the FIFO is holding data. Reset 0.
7 Transmitter FIFO half-full (TH) - indicates that the FIFO is less than half-full. Reset 0.
6 Framing error (FE) - indicates that a framing error was detected. Reset 0.
5 Parity error (PE) - indicates that a parity error was detected. Reset 0.
4 Overrun (OV) - indicates that one or more character have been lost due to overrun. Reset 0.
3 Break received (BR) - indicates that a BREAK has been received. Reset 0.
2 Transmitter FIFO empty (TE) - indicates that the transmitter FIFO is empty. Reset 1.
1 Transmitter shift register empty (TS) - indicates that the transmitter shift register is empty. Reset 1.
0 Data ready (DR) - indicates that new data is available in the receiver holding register. Reset 0.
31 FIFOs available (FA) - Set to 1 when receiver and transmitter FIFOs are available. When 0, only
holding register are available. Read only.
30: 15 RESERVED
14 Transmitter shift register empty interrupt enable (SI) - When set, an interrupt will be generated when
the transmitter shift register becomes empty. See section 10.6 for more details.
13 Delayed interrupt enable (DI) - When set, delayed receiver interrupts will be enabled and an inter-
rupt will only be generated for received characters after a delay of 4 character times + 4 bits if no
new character has been received during that interval. This is only applicable if receiver interrupt
enable is set. See section 10.6 for more details. Not Reset.
12 Break interrupt enable (BI) - When set, an interrupt will be generated each time a break character is
received. See section 10.6 for more details. Not Reset.
11 FIFO debug mode enable (DB) - when set, it is possible to read and write the FIFO debug register.
Not Reset.
10 Receiver FIFO interrupt enable (RF) - when set, Receiver FIFO level interrupts are enabled
9 Transmitter FIFO interrupt enable (TF) - when set, Transmitter FIFO level interrupts are enabled.
8 External Clock (EC) - if set, the UART scaler will not be clocked.
7 Loop back (LB) - if set, loop back mode will be enabled. Not reset.
6 Flow control (FL) - if set, enables flow control using CTS/RTS (when implemented). Reset 0.
5 Parity enable (PE) - if set, enables parity generation and checking (when implemented). Not reset.
4 Parity select (PS) - selects parity polarity (0 = even parity, 1 = odd parity) (when implemented). Not
reset.
3 Transmitter interrupt enable (TI) - if set, interrupts are generated when characters are transmitted
(see section 10.6 for details). Not Reset.
2 Receiver interrupt enable (RI) - if set, interrupts are generated when characters are received (see sec-
tion 10.6 for details). Not Reset.
1 Transmitter enable (TE) - if set, enables the transmitter. Reset 0.
0 Receiver enable (RE) - if set, enables the receiver. Reset 0.
10.9 Timing
The timing waveforms and timing parameters are shown in figure 67 and are defined in table 52.
clk
Note: The ctsn[] and rxd[] inputs are re-synchronized internally. These signals do not have to meet
any setup or hold requirements.
11.1 Overview
The General Purpose Timer Unit provides a common prescaler and decrementing timer(s). The unit
implements one 16 bit prescaler and 3 decrementing 32 bit timer(s). The unit is capable of asserting
interrupt on timer(s) underflow.
timer 1 reload
timer 2 reload
-1
11.2 Operation
The prescaler is clocked by the system clock and decremented on each clock cycle. When the pres-
caler underflows, it is reloaded from the prescaler reload register and a timer tick is generated. Timers
share the decrementer to save area.
The operation of each timers is controlled through its control register. A timer is enabled by setting
the enable bit in the control register. The timer value is then decremented on each prescaler tick.
When a timer underflows, it will automatically be reloaded with the value of the corresponding timer
reload register if the restart bit in the control register is set, otherwise it will stop at -1 and reset the
enable bit.
The timer unit will signal an interrupt on appropriate line when a timer underflows (if the interrupt
enable bit for the current timer is set). The interrupt pending bit in the control register of the under-
flown timer will be set and remain set until cleared by writing ‘0’.
To minimize complexity, timers share the same decrementer. This means that the minimum allowed
prescaler division factor is ntimers+1 (reload register = ntimers) where ntimers is the number of
implemented timers, i.e. 3.
By setting the chain bit in the control register timer n can be chained with preceding timer n-1. Timer
n will be decremented every time when timer n-1 underflows.
Each timer can be reloaded with the value in its reload register at any time by writing a ‘one’ to the
load bit in the control register. The last timer acts as a watchdog, driving a watchdog output signal
when expired. At reset, the scaler is set to all ones and the watchdog timer is set to 0xFFF. (This is
done for new releases of the part, older parts have a timer initialization value of 0xFFFFFF.)
11.3 Registers
The core is programmed through registers mapped into APB address space. The number of imple-
mented registers depend on number of implemented timers.
32-1: 0 Timer Reload value. This value is loaded into the timer counter value register when ‘1’ is written to
load bit in the timers control register or when the RS bit is set in the control register and the timer
underflows.
Any unused most significant bits are reserved. Always reads as ‘000...0’.
11.5 Timing
The timing waveforms and timing parameters are shown in figure 69 and are defined in table 61.
clk
tGPTIMER0 tGPTIMER1
wdogn
12.1 Overview
Each bit in the general purpose input output port can be individually set to input or output, and can
optionally generate an interrupt. For interrupt generation, the input can be filtered for polarity and
level/edge detection.
The figure 70 shows a diagram for one I/O line.
Direction D Q
Output D Q PAD
Value
Input
Value Input D
Q Q D
Value
12.2 Operation
The I/O ports are implemented as bi-directional buffers with programmable output enable. The input
from each buffer is synchronized by two flip-flops in series to remove potential meta-stability. The
synchronized values can be read-out from the I/O port data register. The output enable is controlled by
the I/O port direction register. A ‘1’ in a bit position will enable the output buffer for the correspond-
ing I/O line. The output value driven is taken from the I/O port output register.
Each I/O port, except gpio[0], can drive a separate interrupt line on the APB interrupt bus. The inter-
rupt number is equal to the I/O line index (gpio[1] = interrupt 1, etc.). The interrupt generation is con-
trolled by three registers: interrupt mask, polarity and edge registers. To enable an interrupt, the
corresponding bit in the interrupt mask register must be set. If the edge register is ‘0’, the interrupt is
treated as level sensitive. If the polarity register is ‘0’, the interrupt is active low. If the polarity regis-
ter is ‘1’, the interrupt is active high. If the edge register is ‘1’, the interrupt is edge-triggered. The
polarity register then selects between rising edge (‘1’) or falling edge (‘0’).
12.3 Registers
The core is programmed through registers mapped into APB address space.
12.5 Timing
The timing waveforms and timing parameters are shown in figure 71 and are defined in table 70.
clk
tGRGPIO1 tGRGPIO2
gpio[ ]
(output)
Note: The gpio inputs are re-synchronized internally. The signals do not have to meet any setup or
hold requirements.
13.1 Overview
The on-chip memory is accessed via an AMBA AHB slave interface. The memory implements 4 or
2 kBytes of data, depending on configuration (see table 1). Registers are accessed via an AMB APB
interface.
The on-chip memory implements volatile memory that is protected by means of Error Detection And
Correction (EDAC). One error can be corrected and two errors can be detected, which is performed by
using a (32, 7) BCH code. Some of the optional features available are single error counter, diagnostic
reads and writes. Configuration is performed via a configuration register.
Figure 72 shows a block diagram of the internals of the memory.
AHB Bus
AHB Slave
FTAHBRAM Interface
AHB/APB
Bridge
data
Mux
error Configuration Register
cb APB Bus
Decoding
Mux
data cb
Syncram
13.2 Operation
The on-chip fault tolerant memory is accessed through an AMBA AHB slave interface.
Run-time configuration is done by writing to a configuration register accessed through an AMBA
APB interface.
The following can be configured during run-time: EDAC can be enabled and disabled. When it is dis-
abled, reads and writes will behave as the standard memory. Read and write diagnostics can be con-
trolled through separate bits. The single error counter can be reset.
If EDAC is disabled (EN bit in configuration register set to 0) write data is passed directly to the mem-
ory area and read data will appear on the AHB bus immediately after it arrives from memory. If
EDAC is enabled write data is passed to an encoder which outputs a 7-bit checksum. The checksum is
stored together with the data in memory and the whole operation is performed without any added
waitstates. This applies to word stores (32-bit). If a byte or halfword store is performed, the whole
word to which the byte or halfword belongs must first be read from memory (read - modify - write). A
new checksum is calculated when the new data is placed in the word and both data and checksum are
stored in memory. This is done with 1 - 2 additional waitstates compared to the non EDAC case.
Reads with EDAC disabled are performed with 0 or 1 waitstates while there could also be 2 waitstates
when EDAC is enabled. There is no difference between word and subword reads. Table 71 shows a
summary of the number of waitstates for the different operations with and without EDAC.
Table 71. Summary of the number of waitstates for the different operations for the memory.
When EDAC is used, the data is decoded the first cycle after it arrives from the memory and appears
on the bus the next cycle if no uncorrectable error is detected. The decoding is done by comparing the
stored checksum with a new one which is calculated from the stored data. This decoding is also done
during the read phase for a subword write. A so-called syndrome is generated from the comparison
between the checksum and it determines the number of errors that occurred. One error is automati-
cally corrected and this situation is not visible on the bus. Two or more detected errors cannot be cor-
rected so the operation is aborted and the required two cycle error response is given on the AHB bus
(see the AMBA manual for more details). If no errors are detected data is passed through the decoder
unaltered.
As mentioned earlier the memory provides read and write diagnostics when EDAC is enabled. When
write diagnostics are enabled, the calculated checksum is not stored in memory during the write
phase. Instead, the TCB field from the configuration register is used. In the same manner, if read diag-
nostics are enabled, the stored checksum from memory is stored in the TCB field during a read (and
also during a subword write). This way, the EDAC functionality can be tested during run-time. Note
that checkbits are stored in TCB during reads and subword writes even if a multiple error is detected.
A single error counter (SEC) field is present in the configuration register, and is incremented each
time a single databit error is encountered (reads or subword writes). The number of bits of this counter
is 8. It is accessed through the configuration register. Each counter bit can be reset to zero by writing a
one to it. The counter saturates at the value 28 - 1.
13.3 Registers
The core is programmed through registers mapped into APB address space.
12+8: 13 Single error counter (SEC): Incremented each time a single error is corrected (includes errors on
checkbits). Each bit can be set to zero by writing a one to it.
12: 10 Log2 of the current memory size
14 Status Registers
14.1 Overview
The status registers store information about AMBA AHB accesses triggering an error response. There
is a status register and a failing address register capturing the control and address signal values of a
failing AMBA bus transaction, or the occurrence of a correctable error being signaled from a fault tol-
erant core.
14.2 Operation
14.2.1 Errors
The registers monitor AMBA AHB bus transactions and store the current HADDR, HWRITE,
HMASTER and HSIZE internally. The monitoring are always active after startup and reset until an
error response (HRESP = “01”) is detected. When the error is detected, the status and address register
contents are frozen and the New Error (NE) bit is set to one. At the same time an interrupt is gener-
ated, as described hereunder.
Note that many of the fault tolerant units containing EDAC signal an un-correctable error as an
AMBA error response, so that it can be detected by the processor as described above.
14.2.3 Interrupts
The interrupt is connected to the interrupt controller to inform the processor of the error condition.
The normal procedure is that an interrupt routine handles the error with the aid of the information in
the status registers. When it is finished it resets the NE bit and the monitoring becomes active again.
Interrupts are generated for both AMBA error responses and correctable errors as described above.
14.3 Registers
The core is programmed through registers mapped into APB address space.
31: 10 RESERVED
9 CE: Correctable Error. Set if the detected error was caused by a single error and zero otherwise.
8 NE: New Error. Deasserted at start-up and after reset. Asserted when an error is detected. Reset by
writing a zero to it.
7 The HWRITE signal of the AHB transaction that caused the error.
6: 3 The HMASTER signal of the AHB transaction that caused the error.
2: 0 The HSIZE signal of the AHB transaction that caused the error
31: 0 The HADDR signal of the AHB transaction that caused the error.
15 SpaceWire Interface
15.1 Overview
The SpaceWire core provides an interface between the AHB bus and a SpaceWire network. It imple-
ments the SpaceWire standard (ECSS-E-ST-50-12C) with the protocol identification extension
(ECSS-E-ST-50-51C).
The core is configured through a set of registers accessed through an APB interface. Data is trans-
ferred through DMA channels using an AHB master interface.
TXCLK
D(1:0)
SEND TRANSMITTER
TRANSMITTER
FSM FSM
S(1:0)
{unused} TRANSMITTER
TRANSMITTER DMA ENGINE
LINKINTERFACE AHB
FSM MASTER INTERFACE
RECEIVER
DMA ENGINE
D0
RXCLK RXCLK RECEIVER0 {unused} RECEIVER
REGISTERS
APB
S0 RECOVERY RECEIVER AHB FIFO INTERFACE
D1
RXCLK RXCLK RECEIVER1 N-CHAR RECEIVER DATA
S1 FIFO PARALLELIZATION
RECOVERY
15.2 Operation
15.2.1 Overview
The main sub-blocks of the core are the link-interface and the AMBA interface. A block diagram of
the internal structure can be found in figure 73.
The link interface consists of the receiver, transmitter and the link interface FSM. They handle com-
munication on the SpaceWire network. The AMBA interface consists of the DMA engines, the AHB
master interface and the APB interface. The link interface provides FIFO interfaces to the DMA
engines. These FIFOs are used to transfer N-Chars between the AMBA and SpaceWire domains dur-
ing reception and transmission.
The core has support for the protocol ID specified in ECSS-E-ST-50-51C. Note that packets with the
reserved extended protocol identifier (ID = 0x000000) are not ignored by the core. It is up to the client
receiving the packets to ignore them.
When transmitting packets, the address and protocol-ID fields must be included in the buffers from
where data is fetched. They are not automatically added by the core.
Figure 74 shows the packet types supported by the core. The core also allows reception and transmis-
sion with extended protocol identifiers but without support for RMAP CRC calculations.
15.3.2 Transmitter
The state of the FSM, credit counters, requests from the time-interface and requests from the DMA-
interface are used to decide the next character to be transmitted. The type of character and the charac-
ter itself (for N-Chars and Time-codes) to be transmitted are presented to the low-level transmitter
which is located in a separate clock-domain.
This is done because one usually wants to run the SpaceWire link on a different frequency than the
host system clock. The core has a separate clock input which is used to generate the transmitter clock.
Since the transmitter often runs on high frequency clocks (> 100 MHz) as much logic as possible has
been placed in the system clock domain to minimize power consumption and timing issues.
The transmitter logic in the host clock domain decides what character to send next and sets the proper
control signal and presents any needed character to the low-level transmitter as shown in figure 75.
The transmitter sends the requested characters and generates parity and control bits as needed. If no
requests are made from the host domain, NULLs are sent as long as the transmitter is enabled. Most
of the signal and character levels of the SpaceWire standard is handled in the transmitter. External
LVDS drivers are needed for the data and strobe signals.
D
Send Time-code
Send FCT
S Transmitter Send NChar
Time-code[7:0]
NChar[8:0]
A transmission FSM reads N-Chars for transmission from the transmitter FIFO. It is given packet
lengths from the DMA interface and appends EOPs/EEPs and RMAP CRC values if requested. When
it is finished with a packet the DMA interface is notified and a new packet length value is given.
15.3.3 Receiver
The receiver detects connections from other nodes and receives characters as a bit stream on the data
and strobe signals. It is also located in a separate clock domain which runs on a clock generated from
the received data and strobe signals.
The receiver is activated as soon as the link interface leaves the error reset state. Then after a NULL is
received it can start receiving any characters. It detects parity, escape and credit errors which causes
the link interface to enter the error reset state. Disconnections are handled in the link interface part in
the system clock domain because no receiver clock is available when disconnected.
Received Characters are flagged to the host domain and the data is presented in parallel form. The
interface to the host domain is shown in figure 76. L-Chars are the handled automatically by the host
domain link interface part while all N-Chars are stored in the receiver FIFO for further handling. If
two or more consecutive EOPs/EEPs are received all but the first are discarded.
There are no signals going directly from the transmitter clock domain to the receiver clock domain
and vice versa. All the synchronization is done to the system clock.
D Got Time-code
Got FCT
Got EOP
Receiver Got EEP
S Got NChar
Time-code[7:0]
NChar[7:0]
Receiver Clock Domain Host Clock Domain
A descriptor is enabled by setting the address pointer to point at a location where data can be stored
and then setting the enable bit. The WR bit can be set to cause the selector to be set to zero when
reception has finished to this descriptor. IE should be set if an interrupt is wanted when the reception
has finished. The DMA control register interrupt enable bit must also be set for this to happen.
The descriptor packet address should be word aligned. All accesses on the bus are word accesses so
complete words will always be overwritten regardless of whether all 32-bit contain received data.
Also if the packet does not end on a word boundary the complete word containing the last data byte
will be overwritten.
31: 0 Packet address (PACKETADDRESS) - The address pointing at the buffer which will be used to store
the received packet.
time descriptors are enabled as mentioned above. If the rxdescav bit is ‘0’ and the nospill bit is ‘0’ the
packets will be discarded. If nospill is one the core waits until rxdescav is set.
When rxdescav is set the next descriptor is read and if enabled the packet is received to the buffer. If
the read descriptor is not enabled, rxdescav is set to ‘0’ and the packet is spilled depending on the
value of nospill.
The receiver can be disabled at any time and will cause all packets received afterwards to be dis-
carded. If a packet is currently received when the receiver is disabled the reception will still be fin-
ished. The rxdescav bit can also be cleared at any time. It will not affect any ongoing receptions but no
more descriptors will be read until it is set again. Rxdescav is also cleared by the core when it reads a
disabled descriptor.
CRC at the end of the packet calculated according to RMAP standard can be checked using the DC
bit.
If the packet is neither of RMAP type nor of the type above with RMAP CRC at the end, then both the
HC and DC bits should be ignored.
31: 18 RESERVED
17 Append data CRC (DC) - Unused. Append CRC calculated according to the RMAP specification
after the data sent from the data pointer. The CRC covers all the bytes from this pointer. A null
CRC will be sent if the length of the data field is zero.
16 Append header CRC (HC) - Unused. Append CRC calculated according to the RMAP specification
after the data sent from the header pointer. The CRC covers all bytes from this pointer except a num-
ber of bytes in the beginning specified by the non-crc bytes field. The CRC will not be sent if the
header length field is zero.
15 Link error (LE) - A Link error occurred during the transmission of this packet.
14 Interrupt enable (IE) - If set, an interrupt will be generated when the packet has been transmitted and
the transmitter interrupt enable bit in the DMA control register is set.
13 Wrap (WR) - If set, the descriptor pointer will wrap and the next descriptor read will be the first one
in the table (at the base address). Otherwise the pointer is increased with 0x10 to use the descriptor at
the next higher memory location.
31: 0 Header address (HEADERADDRESS) - Address from where the packet header is fetched. Does not
need to be word aligned.
31: 24 RESERVED
23: 0 Data length (DATALEN) - Length of data part of packet. If set to zero, no data will be sent. If both
data- and header-lengths are set to zero no packet will be sent.
31: 0 Data address (DATAADDRESS) - Address from where data is read. Does not need to be word
aligned.
The descriptor table register can be updated with a new table anytime when no transmission is active.
No transmission is active if the transmit enable bit is zero and the complete table has been sent or if
the table is aborted (explained below). If the table is aborted one has to wait until the transmit enable
bit is zero before updating the table pointer.
burst containing the last data might have shorter length if the packet is not an even number of bursts in
size.
The receiver DMA works in the same way except that it checks if the FIFO is half-full and then per-
forms a burst write to the bus which is half the fifo size in length. The last burst might be shorter. Byte
accesses are used for non word-aligned buffers and/or packet lengths that are not a multiple of four
bytes. There might be 1 to 3 single byte writes when writing the beginning and end of the received
packets.
15.7 References
[SPW] ECSS - Space Engineering, SpaceWire - Links, Nodes, Routers and Networks, ECSS-E-
ST-50-12C, 31 July 2008
[RMAPID]ECSS - Space Engineering, SpaceWire Protocols, ECSS-E-ST-50-51C, February 2010
[RMAP] ECSS - Space Engineering, SpaceWire Protocols, ECSS-E-ST-50-52C, February 2010
[OLD] Space Engineering, Remote Memory Access Protocol, Draft ECSS-E50-11, Draft F
December 2006 1) 2) 3)
Note 1: The old ECSS-E50-11 Draft F document of the draft standard contains an informative
VHDL description of the CRC implementation used in the RMAP protocol which is con-
sidered as incorrect with respect to the normative part of the draft standard. The VHDL
descriptions in the ECSS-E50-11 Draft F document should therefore be ignored.
Note 2: The old ECSS-E50-11 Draft F document of the draft standard specifies that an all-zero
CRC byte should be sent for RMAP write commands and read replies with null length data
fields. This implementation does not support the transmission of an all-zero CRC byte for
null length data fields. If this atypical functionality is required, the automatic CRC genera-
tion should be disabled for the packet in question.
Note 3: The old ECSS-E50-11 Draft F document of the draft standard specifies that error code 12
should be returned as a reply to RMAP commands with an unexpected destination address.
This behavior is in conflict with the ECSS-E-ST-50-12C SpaceWire standard which speci-
fies that packets with an unexpected destination address shall be discarded.
15.8 Registers
The core is programmed through registers mapped into APB address space.
31 RMAP available (RA) - Set to one if the RMAP command handler is available. Only readable.
30 RX unaligned access (RX) - Set to one if unaligned writes are available for the receiver. Only read-
able.
29 RMAP CRC available (RC) - Set to one if RMAP CRC is enabled in the core. Only readable.
28: 27 RESERVED
26 Number of ports (PO) - The number of available SpaceWire ports minus one. Only readable.
25: 22 RESERVED
21 Port select (PS) - Selects the active port when the no port force bit is zero. ‘0’ selects the port con-
nected to data and strobe on index 0 while ‘1’ selects index 1.
20 No port force (NP) - Disable port force. When disabled the port select bit cannot be used to select the
active port. Instead, it is automatically selected by checking the activity on the respective receive
links. Reset value: ‘0’.
19: 18 RESERVED
17 RMAP buffer disable (RD) - Unused.
16 RMAP Enable (RE) - Unused.
15: 12 RESERVED
11 Time Rx Enable (TR) - Enable time-code receptions. Reset value: ‘0’.
10 Time Tx Enable (TT) - Enable time-code transmissions. Reset value: ‘0’.
9 Link error IRQ (LI) - Generate interrupt when a link error occurs. Not reset.
8 Tick-out IRQ (TQ) - Generate interrupt when a valid time-code is received. Not reset.
7 RESERVED
6 Reset (RS) - Make complete reset of the SpaceWire node. Self clearing. Reset value: ‘0’.
5 Promiscuous Mode (PM) - Enable Promiscuous mode. Reset value: ‘0’.
4 Tick In (TI) - The host can generate a tick by writing a one to this field. This will increment the timer
counter and the new value is transmitted after the current character is transferred. A tick can also be
generated by asserting the tick_in signal (not supported). Reset value: ‘0’.
3 Interrupt Enable (IE) - If set, an interrupt is generated when one or both of bit 8 to 9 is set and its cor-
responding event occurs. Reset value: ‘0’.
2 Autostart (AS) - Automatically start the link when a NULL has been received. Not reset.
1 Link Start (LS) - Start the link, i.e. allow a transition from ready to started state. Reset value: ‘0’.
0 Link Disable (LD) - Disable the SpaceWire codec. Reset value: ‘0’.
31: 24 RESERVED
23: 21 Link State (LS) - The current state of the start-up sequence. 0 = Error-reset, 1 = Error-wait, 2 =
Ready, 3 = Started, 4 = Connecting, 5 = Run. Reset value: 0.
20: 10 RESERVED
9 Active port (AP) - Shows the currently active port. ‘0’ = Port 0 and ‘1’ = Port 1 where the port num-
bers refer to the index number of the data and strobe signals.
8 Early EOP/EEP (EE) - Set to one when a packet is received with an EOP after the first byte. Cleared
when written with a one. Reset value: ‘0’.
7 Invalid Address (IA) - Set to one when a packet is received with an invalid destination address field,
i.e it does not match the nodeaddr register. Cleared when written with a one. Reset value: ‘0’.
6 Write synchronization Error (WE) - A synchronization problem has occurred when receiving N-
Chars. Cleared when written with a one. Reset value: ‘0’.
5 RESERVED
4 Parity Error (PE) - A parity error has occurred. Cleared when written with a one. Reset value: ‘0’.
3 Disconnect Error (DE) - A disconnection error has occurred. Cleared when written with a one. Reset
value: ‘0’.
2 Escape Error (ER) - An escape error has occurred. Cleared when written with a one. Reset value: ‘0’.
1 Credit Error (CE) - A credit has occurred. Cleared when written with a one. Reset value: ‘0’.
0 Tick Out (TO) - A new time count value was received and is stored in the time counter field. Cleared
when written with a one. Reset value: ‘0’.
31: 8 RESERVED
7: 0 Node address (NODEADDR) - 8-bit node address used for node identification on the SpaceWire
network. Reset value: 254.
31: 16 RESERVED
15: 8 Clock divisor startup (CLKDIVSTART) - 8-bit Clock divisor value used for the clock-divider
during startup (link-interface is in other states than run). The actual divisor value is Clock Divi-
sor register + 1. Reset value taken from gpio[5:3] inputs, in the range 0 to 7 . “000” corresponds
to spw_clk frequency divided by 1. “001” corresponds to the spw_clk frequency divided by 2,
etc.
7: 0 Clock divisor run (CLKDIVRUN) - 8-bit Clock divisor value used for the clock-divider when the
link-interface is in the run-state. The actual divisor value is Clock Divisor register + 1. Reset value
taken from gpio[5:3] inputs, in the range 0 to 7 . “000” corresponds to spw_clk frequency divided by
1. “001” corresponds to the spw_clk frequency divided by 2, etc.
31: 8 RESERVED
7: 0 Destination key (DESTKEY) - RMAP destination key. Reset value: 0.
31: 8 RESERVED
7: 6 Time control flags (TCTRL) - The current value of the time control flags. Sent with time-code result-
ing from a tick-in. Received control flags are also stored in this register. Reset value: ‘0’.
5: 0 Time counter (TIMECNT) - The current value of the system time counter. It is incremented for each
tick-in and the incremented value is transmitted. The register can also be written directly but the
written value will not be transmitted. Received time-counter values are also stored in this register.
Reset value: ‘0’.
31: 22 RESERVED
21: 12 Disconnect (DISCONNECT) - Used to generate the 850 ns disconnect time period. The disconnect
period is the number is the number of clock cycles in the disconnect register + 3. So to get a 850 ns
period, the smallest number of clock cycles that is greater than or equal to 850 ns should be calcu-
lated and this values - 3 should be stored in the register. Reset value is set to correspond to 25 MHz
system frequency.
11: 0 6.4 us timer (TIMER64) - Used to generate the 6.4 and 12.8 us time periods. Should be set to the
smallest number of clock cycles that is greater than or equal to 6.4 us. Reset value is set to corre-
spond to 25 MHz system frequency.
31: 17 RESERVED
16 Link error disable (LE) - Disable transmitter when a link error occurs. No more packets will be
transmitted until the transmitter is enabled again. Reset value: ‘0’.
15: 13 RESERVED
12 No spill (NS) - If cleared, packets will be discarded when a packet is arriving and there are no active
descriptors. If set, the GRSPW will wait for a descriptor to be activated.
11 Rx descriptors available (RD) - Set to one, to indicate to the GRSPW that there are enabled descrip-
tors in the descriptor table. Cleared by the GRSPW when it encounters a disabled descriptor: Reset
value: ‘0’.
10 RX active (RX) - Is set to ‘1’ if a reception to the DMA channel is currently active otherwise it is ‘0’.
Only readable.
9 Abort TX (AT) - Set to one to abort the currently transmitting packet and disable transmissions. If no
transmission is active the only effect is to disable transmissions. Self clearing. Reset value: ‘0’.
8 RX AHB error (RA) - An error response was detected on the AHB bus while this receive DMA
channel was accessing the bus. Cleared when written with a one. Reset value: ‘0’.
7 TX AHB error (TA) - An error response was detected on the AHB bus while this transmit DMA
channel was accessing the bus. Cleared when written with a one. Reset value: ‘0’.
6 Packet received (PR) - This bit is set each time a packet has been received. never cleared by the SW-
node. Cleared when written with a one. Reset value: ‘0’.
5 Packet sent (PS) - This bit is set each time a packet has been sent. Never cleared by the SW-node.
Cleared when written with a one. Reset value: ‘0’.
4 AHB error interrupt (AI) - If set, an interrupt will be generated each time an AHB error occurs when
this DMA channel is accessing the bus. Not reset.
3 Receive interrupt (RI) - If set, an interrupt will be generated each time a packet has been received.
This happens both if the packet is terminated by an EEP or EOP. Not reset.
2 Transmit interrupt (TI) - If set, an interrupt will be generated each time a packet is transmitted. The
interrupt is generated regardless of whether the transmission was successful or not. Not reset.
1 Receiver enable (RE) - Set to one when packets are allowed to be received to this channel. Reset
value: ‘0’.
0 Transmitter enable (TE) - Write a one to this bit each time new descriptors are activated in the table.
Writing a one will cause the SW-node to read a new descriptor and try to transmit the packet it points
to. This bit is automatically cleared when the SW-node encounters a descriptor which is disabled.
Reset value: ‘0’.
31: 25 RESERVED
24: 0 RX maximum length (RXMAXLEN) - Receiver packet maximum length in bytes. Only bits 24 - 2
are writable. Bits 1 - 0 are always 0. Not reset.
31: 10 Descriptor table base address (DESCBASEADDR) - Sets the base address of the descriptor table.
Not reset.
9: 4 Descriptor selector (DESCSEL) - Offset into the descriptor table. Shows which descriptor is cur-
rently used by the GRSPW. For each new descriptor read, the selector will increase with 16 and
eventually wrap to zero again. Reset value: 0.
3: 0 RESERVED
31: 10 Descriptor table base address (DESCBASEADDR) - Sets the base address of the descriptor table.
Not reset.
9: 3 Descriptor selector (DESCSEL) - Offset into the descriptor table. Shows which descriptor is cur-
rently used by the GRSPW. For each new descriptor read, the selector will increase with 8 and even-
tually wrap to zero again. Reset value: 0.
2: 0 RESERVED
15.10 Timing
The timing waveforms and timing parameters are shown in figure 77 and are defined in table 96.
tSPW0
spw_clk
tSPW6
tSPW7
spw_txd, spw_txdn
spw_txs, spw_txsn
16.1 Overview
The interface provides a complete Mil-Std-1553B Bus Controller (BC), Remote Terminal (RT) or
Monitor Terminal (MT). The interface connects to the MIL-STD-1553B bus through external trans-
ceivers and transformers. The interface is based on the Actel Core1553BRM core.
The interface consists of six main blocks: 1553 encoder, 1553B decoders, a protocol controller block,
AMBA bus interface, command word legality interface, and a backend interface.
The interface can be configured to provide all three functions BC, RT and MT or any combination of
the three. All variations use all six blocks except for the command legalization interface, which is
only required on RT functions that implement RT legalization function externally. The device does
not implement command legalization support.
A single 1553 encoder takes each word to be transmitted and serializes it using Manchester encoding.
The encoder also includes independent logic to prevent the interface from transmitting for greater
than the allowed period as well as loopback fail logic. The loopback logic monitors the received data
and verifies that the interface has correctly received every word that it transmits. The output of the
encoder is gated with the bus enable signals to select which buses the interface should be transmitting
on. Two decoders take the serial Manchester received data from each bus and extract the received data
words.
The decoder contains a digital phased lock loop (PLL) that generates a recovery clock used to sample
the incoming serial data. The data is then de-serialized and the 16-bit word decoded. The decoder
detects whether a command, status, or data word has been received, and checks that no Manchester
encoding or parity errors occurred in the word.
The protocol controller block handles all the message sequencing and error recovery for all three
operating modes, Bus Controller, Remote Terminal, and Bus Monitor. This is complex state machine
that processes messages based on the message tables setup in memory, or reacts to incoming com-
mand words. The protocol controller implementation varies depending on which functions are imple-
mented. The AMBA interface allows a system processor to access the control registers. It also allows
the processor to directly access the memory connected to the backend interface, this simplifies the
system design.
The interface comprises 33 16-bit registers. Of the 33 registers, 17 are used for control function and
16 for RT command legalization. Note that device does not implement command legalization support,
all commands are always considered legal.
B1553BRM
GR1553BRM
AMBA AHB
Figure 78. Block diagram
16.3 Registers
The core is programmed through registers mapped into APB address space. The internal registers of
Core1553BRM are mapped on the 33 lowest APB addresses. These addresses are 32-bit word aligned
although only the lowest 16 bits are used. Refer to the Actel Core1553BRM MIL-STD-1553 BC, RT,
and MT data sheet for detailed information.
31 12 13 12 5 4 3 2 1 0
RESERVED busrst RESERVED rtaderr memfail busy active ssysfn
13: Bus reset indicator. If set a bus reset mode code has been received. Generates an interrupt when set.
12:5 Reserved
4: Address error. Shows the value of the rtaderr output from Core1553BRM.
3: Memory failure. Shows the value of the memfail output from Core1553BRM.
2: Busy. Shows the value of the busy output from Core1553BRM.
1: Active. Show the value of the active output from Core1553BRM.
0: Ssyfn. Connects directly to the ssyfn input of the Core1553BRM core. Resets to 1.
31 2 1 0
RESERVED intackm intackh intlevel
2: Message interrupt acknowledge. Controls the intackm input signal of the Core1553BRM core.
1: Hardware interrupt acknowledge. Controls the intackh input signal of the Core1553BRM core.
0: Interrupt level. Controls the intlevel input signal of the Core1553BRM core.
31 abits 0
ahbaddr RESERVED
[31:17]: Holds the top most bits of the AHB address of the allocated memory area.
16.5 Timing
The timing waveforms and timing parameters are shown in figure 82 and are defined in table 99.
clk
t1553BRM1
outputs
t1553BRM3
inputs
t1553BRM2
Figure 82. Timing waveforms
17.1 Overview
The interface provides a complete Mil-Std-1553B Remote Terminal (RT). The interface connects to
the MIL-STD-1553B bus through external transceivers and transformers. The interface is based on
the Actel Core1553BRT core.
The interface provides a complete, dual-redundant MIL-STD-1553B remote terminal (RT) apart from
the transceivers required to interface to the bus. At a high level, the interface simply provides a set of
memory mapped sub-addresses that ‘receive data written to’ or ‘transmit data read from.’ The inter-
face requires 2,048 words of memory, which can be shared with a local processor. The interface sup-
ports all 1553B mode codes and allows the user to designate as illegal any mode code or any
particular sub-address for both transmit and receive operations. The command legalization can be
done internally or via an external command legalization interface. Note that device does not imple-
ment command legalization support, all commands are always considered legal.
The interface consists of six main blocks: 1553B encoders, 1553B decoders, backend interface, com-
mand decoder, RT controller blocks and a command legalization block.
A single 1553B encoder is used for the interface. This takes each word to be transmitted and serializes
it, after which the signal is Manchester encoded. The encoder also includes both logic to prevent the
RT from transmitting for greater than the allowed period and loopback fail logic. The loopback logic
monitors the received data and verifies that the interface has correctly received every word that it
transmits. The output of the encoder is gated with the bus enable signals to select which buses the RT
should use to transmit.
The interface includes two 1553B decoders. The decoder takes the serial Manchester data received
from the bus and extracts the received data words. The decoder contains a digital phased lock loop
(PLL) that generates a recovery clock used to sample the incoming serial data. The data is then deseri-
alized and the 16-bit word decoded. The decoder detects whether a command or data word is
received, and also performs Manchester encoding and parity error checking.
The command decoder and RT controller blocks decode the incoming command words, verifying the
legality. Then the protocol state machine responds to the command, transmitting or receiving data or
processing a mode code.
B1553RT
GR1553RT
AMBA APB
AMBA AHB
Figure 83. B1553RT block diagram
17.2 Operation
Address Content
0x000-0x03F RX transfer status/command words
0x040-0x07F Receive sub-address 1 ...
0x780-0x7BF Receive sub-address 30
0x7C0-0x7FF TX transfer status/command words
0x800-0x83F Not used, except 0x800-0x801 for vector word if register bit extmdata=1
0x840-0x87F Transfer sub-address 1 ...
0xF80-0xFBF Transfer sub-address 30
0xFC0-0xFFF Not used, except 0xFC0-0xFC1 for vector word if register bit extmdata=1
The AMBA AHB protection control signal is driven permanently with “0011”, i.e a not cacheable, not
bufferable, privileged data access. The AMBA AHB lock signal is driven with ‘0’.
NOTE: the remapping of the synchronized data word is only implemented in newer versions of the
LEON3FT-RTAX device, see the revision field in the status register to determine whether the remap-
ping is supported in a specific device.
The transfer BIT word mode code transfers a word as specified in the table below:
17.3 Registers
The core is programmed through registers mapped into APB address space.
31 28 27 4 3 2 1 0
revision RESERVED extleg rtaderr memfail busy
Control register
31 23 22 21 20 19 18 17 16 15 14 13 12 8 7 6 5 4 3 2 1 0
RESERVED brdis disabl reset sa30loop bcasten intenbbr extmdata wrtcmd wrttsw rtaddrp rtaddr clkspd clrerr intack tf ssf busy sreq
31:23 Reserved
22: If ‘1’ the disable bit (bit 21) will be set to ‘1’ automatically when a reset mode command is received.
21: Set to ‘1’ to disable external 1553 transceiver. Reset to ‘1’.
20: Writing ‘1’ will reset the Core1553RT and forces the B1553RT DMA to idle state. Self clearing.
19: Set to ‘1’ to enable internal loopback of subaddress 30. Transmits from sa 30 reads from the receive buffer for sa 30.
18: Set to ‘1’ to enable broadcasts messages. If ‘0’ address 31 is treated as normal RT address.
17: ‘1’ enables interrupts for bad messages. If ‘0’ only good messages generates interrupts.
16: If ‘1’ mode code data is written to / read from memory. If ‘0’ the vword register is used for transmit vector word
mode code and the data for synchronize with data is discarded.
15: If ‘1’ the command word is written to memory at the start of a bus transfer.
14: If ‘1’ the transfer status word is written to memory at the end of a bus transfer.
13: RT address parity bit. Odd parity over rtaddr and rtaddrp must be achieved.
12:8 RT address.
7:6 Clock speed. Should be set to indicate the clock frequency of the core. 0 - 12, 1 - 16, 2 - 20, 3 - 24 MHz
5: Set to ‘1’ and then to ‘0’ to clear internal errors.
4: Clear the interrupt. Should be set to ‘1’ to give a interrupt pulse on each message.
3: Controls the terminal flag bit in the 1553B status word. This can be masked by the "inhibit
terminal flag bit" mode code.
2: Controls the subsystem flag bit in the 1553B status word.
1: Controls the busy bit in the 1553B status word.
0: Controls the service request bit in the 1553B status word.
31 16 15 0
RESERVED vword
[15:0] Used for transmit vector word mode code if extmdata bit is ‘0’ in control register.
31 18 7 6 0
RESERVED cmdval intvect
[18:7] For each message the CMDVAL output of Core1553BRT is latched into this register.
18 - broadcast
17 - 1 for transmit, 0 for receive
16:12 - subaddress
11:7 - word count / mode code
[6:0] Shows the value of the interrupt vector output of the Core1553BRT.
31 12 0
ahbaddr RESERVED
[31:12]: Holds the 20 top most bits of the AHB address of the allocated memory area.
31 18 17 16 2 1 0
RESERVED MASK2 MASK1 MASK0 RESERVED AHBERR MEMFAIL RT
[31:19]: Reserved
18: MASK2 - Interrupt mask for AHBERR interrupt. Interrupt enabled if 1.
17: MASK1 - Interrupt mask for MEMFAIL interrupt. Interrupt enabled if 1.
16: MASK0 - Interrupt mask for RT interrupt. Interrupt enabled if 1.
[15:3]: Reserved
2: AHBERR - 1 if an AHB error has occurred. Cleared on read.
1: MEMFAIL - 1 if an Core1553RT DMA has not occurred in time. Cleared on read.
0: RT - 1 if the Core1553RT has received/transmitted a message. Cleared on read.
17.5 Timing
The timing waveforms and timing parameters are shown in figure 90 and are defined in table 106.
clk
t1553RT0
outputs
t1553RT2
inputs
t1553RT1
Figure 90. Timing waveforms
18.1 Overview
This CAN interface implements the CAN 20.A and 2.0B protocols. It is based on the Philips SJA1000
and has a compatible register map with a few exceptions.
CAN_OC Wrapper
CAN_TXO
CAN Core Syncram_2p
CAN_RXI
IRQ
AMBA AHB
A transmission is started by writing 1 to CMR.0. It can only be aborted by writing 1 to CMR.1 and
only if the transfer has not yet started. If the transmission has started it will not be aborted when set-
ting CMR.1 but it will not be retransmitted if an error occurs.
Giving the Release receive buffer command should be done after reading the contents of the receive
buffer in order to release this memory. If there is another message waiting in the FIFO a new receive
interrupt will be generated (if enabled) and the receive buffer status bit will be set again.
To clear the Data overrun status bit CMR.3 must be written with 1.
Receive buffer status is cleared when the Release receive buffer command is given and set high if
there are more messages available in the fifo.
The data overrun status signals that a message which was accepted could not be placed in the fifo
because not enough space left. NOTE: This bit differs from the SJA1000 behavior and is set first when
the fifo has been read out.
When the transmit buffer status is high the transmit buffer is available to be written into by the CPU.
During an on-going transmission the buffer is locked and this bit is 0.
The transmission complete bit is set to 0 when a transmission request has been issued and will not be
set to 1 again until a message has successfully been transmitted.
This register is reset on read with the exception of IR.0. Note that this differs from the SJA1000
behavior where all bits are reset on read in BasicCAN mode. This core resets the receive interrupt bit
when the release receive buffer command is given (like in PeliCAN mode).
Also note that bit IR.5 through IR.7 reads as 1 but IR.4 is 0.
7 6 5 4 3 2 1 0
10 ID byte 1 ID.10 ID.9 ID.8 ID.7 ID.6 ID.5 ID.4 ID.3
11 ID byte 2 ID.2 ID.1 ID.0 RTR DLC.3 DLC.2 DLC.1 DLC.0
12 TX data 1 TX byte 1
13 TX data 2 TX byte 2
14 TX data 3 TX byte 3
15 TX data 4 TX byte 4
16 TX data 5 TX byte 5
17 TX data 6 TX byte 6
18 TX data 7 TX byte 7
19 TX data 8 TX byte 8
If the RTR bit is set no data bytes will be sent but DLC is still part of the frame and must be specified
according to the requested frame. Note that it is possible to specify a DLC larger than 8 bytes but
should not be done for compatibility reasons. If DLC > 8 still only 8 bytes can be sent.
The transmit and receive buffers have different layout depending on if standard frame format (SFF) or
extended frame format (EFF) is to be transmitted/received. See the specific section below.
Writing to MOD.1-3 can only be done when reset mode has been entered previously.
In Listen only mode the core will not send any acknowledgements. Note that unlike the SJA1000 the
Opencores core does not become error passive and active error frames are still sent!
When in Self test mode the core can complete a successful transmission without getting an acknowl-
edgement if given the Self reception request command. Note that the core must still be connected to a
real bus, it does not do an internal loopback.
A transmission is started by writing 1 to CMR.0. It can only be aborted by writing 1 to CMR.1 and
only if the transfer has not yet started. Setting CMR.0 and CMR.1 simultaneously will result in a so
called single shot transfer, i.e. the core will not try to retransmit the message if not successful the first
time.
Giving the Release receive buffer command should be done after reading the contents of the receive
buffer in order to release this memory. If there is another message waiting in the FIFO a new receive
interrupt will be generated (if enabled) and the receive buffer status bit will be set again.
The Self reception request bit together with the self test mode makes it possible to do a self test of the
core without any other cores on the bus. A message will simultaneously be transmitted and received
and both receive and transmit interrupt will be generated.
Receive buffer status is cleared when there are no more messages in the fifo. The data overrun status
signals that a message which was accepted could not be placed in the fifo because not enough space
left. NOTE: This bit differs from the SJA1000 behavior and is set first when the fifo has been read out.
When the transmit buffer status is high the transmit buffer is available to be written into by the CPU.
During an on-going transmission the buffer is locked and this bit is 0.
The transmission complete bit is set to 0 when a transmission request or self reception request has
been issued and will not be set to 1 again until a message has successfully been transmitted.
This register is reset on read with the exception of IR.0 which is reset when the fifo has been emptied.
Table 119.Bit interpretation of arbitration lost capture register (ALC) (address 11)
When the core loses arbitration the bit position of the bit stream processor is captured into arbitration
lost capture register. The register will not change content again until read out.
Table 120.Bit interpretation of error code capture register (ECC) (address 12)
When a bus error occurs the error code capture register is set according to what kind of error occurred,
if it was while transmitting or receiving and where in the frame it happened. As with the ALC register
the ECC register will not change value until it has been read out. The table below shows how to inter-
pret bit 7-6 of ECC.
ECC.7-6 Description
0 Bit error
1 Form error
2 Stuff error
3 Other
ECC.4-0 Description
0x03 Start of frame
0x02 ID.28 - ID.21
0x06 ID.20 - ID.18
0x04 Bit SRTR
0x05 Bit IDE
0x07 ID.17 - ID.13
0x0F ID.12 - ID.5
0x0E ID.4 - ID.0
0x0C Bit RTR
0x0D Reserved bit 1
0x09 Reserved bit 0
0x0B Data length code
0x0A Data field
0x08 CRC sequence
0x18 CRC delimiter
0x19 Acknowledge slot
0x1B Acknowledge delimiter
0x1A End of frame
0x12 Intermission
0x11 Active error flag
0x16 Passive error flag
0x13 Tolerate dominant bits
0x17 Error delimiter
0x1C Overload flag
immediately and not first when entering operating mode. The bus-off recovery sequence starts when
entering operating mode after writing 255 to this register in reset mode.
Table 123.
TX frame information (this field has the same layout for both SFF and EFF frames)
Bit 7 - FF selects the frame format, i.e. whether this is to be interpreted as an extended or standard frame. 1 = EFF, 0 = SFF.
Bit 6 - RTR should be set to 1 for an remote transmission request frame.
Bit 5:4 - are don’t care.
Bit 3:0 - DLC specifies the Data Length Code and should be a value between 0 and 8. If a value greater than 8 is used 8 bytes
will be transmitted.
TX identifier 1 (this field is the same for both SFF and EFF frames)
Data field
For SFF frames the data field is located at address 19 to 26 and for EFF frames at 21 to 28. The data is
transmitted starting from the MSB at the lowest address.
Table 130.
RX frame information (this field has the same layout for both SFF and EFF frames)
RX identifier 1(this field is the same for both SFF and EFF frames)
Data field
For received SFF frames the data field is located at address 19 to 26 and for EFF frames at 21 to 28.
Address Description
16 Acceptance code 0 (ACR0)
17 Acceptance code 1 (ACR1)
18 Acceptance code 2 (ACR2)
19 Acceptance code 3 (ACR3)
20 Acceptance mask 0 (AMR0)
21 Acceptance mask 1 (AMR1)
22 Acceptance mask 2 (AMR2)
23 Acceptance mask 3 (AMR3)
The corresponding bits in the AMR registers selects if the results of the comparison doesn’t matter. A
set bit in the mask register means don’t care.
The corresponding bits in the AMR registers selects if the results of the comparison doesn’t matter. A
set bit in the mask register means don’t care.
The corresponding bits in the AMR registers selects if the results of the comparison doesn’t matter. A
set bit in the mask register means don’t care.
Filter 2
ACR2.7-0 & ACR3.7-0 are compared to ID.28-13
The corresponding bits in the AMR registers selects if the results of the comparison doesn’t matter. A
set bit in the mask register means don’t care.
The sync jump width defines how many clock cycles (tscl) a bit period may be adjusted with by one
re-synchronization.
The CAN bus bit period is determined by the CAN system clock and time segment 1 and 2 as shown
in the equations below:
ttseg1 = tscl * (TSEG1+1)
ttseg2 = tscl * (TSEG2+1)
tbit = ttseg1 + ttseg2 + tscl
The additional tscl term comes from the initial sync segment. Sampling is done between TSEG1 and
TSEG2 in the bit period.
18.9 Timing
The timing waveforms and timing parameters are shown in figure 92 and are defined in table 142.
clk
tCAN_OC0
cantx[], canen[]
tCAN_OC2
canrx[]
tCAN_OC1
Note: The canrx[] input is re-synchronized internally. The signal does not have to meet any setup or
hold requirements.
19.1 Overview
The Ethernet Media Access Controller (GRETH) provides an interface between an AMBA-AHB bus
and an Ethernet network. It supports 10/100 Mbit speed in both full- and half-duplex. The AMBA
interface consists of an APB interface for configuration and control and an AHB master interface
which handles the dataflow. The dataflow is handled through DMA channels. There is one DMA
engine for the transmitter and one for the receiver. Both share the same AHB master interface. The
ethernet interface supports the Media Independent Interface (MII) which should be connected to an
external PHY. The GRETH also provides access to the MII Management interface which is used to
configure the PHY. Optional hardware support for the Ethernet Debug Communication Link (EDCL)
protocol is also provided. This is an UDP/IP based protocol used for remote debugging.
APB
AHB
Ethernet MAC
EMDIO
Transmitter ETX_EN
DMA Engine FIFO ETXD(3:0)
Transmitter
ETX_CLK
EDCL ERX_CRS
AHB Master
Transmitter ERX_COL
Interface
EDCL
Receiver ERX_DV
ERX_ER
Receiver Receiver ERXD(3:0)
DMA Engine FIFO ERX_CLK
19.2 Operation
The Media Independent Interface (MII) is used for communicating with the PHY. There is an Ether-
net transmitter which sends all data from the AHB domain on the Ethernet using the MII interface.
Correspondingly, there is an Ethernet receiver which stores all data from the Ethernet on the AHB
bus. Both of these interfaces use FIFOs when transferring the data streams.
19.2.3 Clocking
GRETH has three clock domains: The AHB clock, Ethernet receiver clock and the Ethernet transmit-
ter clock. The ethernet transmitter and receiver clocks are generated by the external ethernet PHY,
and are inputs to the core through the MII interface. The three clock domains are unrelated to each
other and all signals crossing the clock regions are fully synchronized inside the core.
Both full-duplex and half-duplex operating modes are supported and both can be run in either 10 or
100 Mbit. The minimum AHB clock for 10 Mbit operation is 2.5 MHz, while 18 MHz is needed for
100 Mbit. Using a lower AHB clock than specified will lead to excessive packet loss.
31: 16 RESERVED
15 Attempt Limit Error (AL) - The packet was not transmitted because the maximum number of
attempts was reached.
14 Underrun Error (UE) - The packet was incorrectly transmitted due to a FIFO underrun error.
13 Interrupt Enable (IE) - Enable Interrupts. An interrupt will be generated when the packet from this
descriptor has been sent provided that the transmitter interrupt enable bit in the control register is set.
The interrupt is generated regardless if the packet was transmitted successfully or if it terminated
with an error.
12 Wrap (WR) - Set to one to make the descriptor pointer wrap to zero after this descriptor has been
used. If this bit is not set the pointer will increment by 8. The pointer automatically wraps to zero
when the 1 kByte boundary of the descriptor table is reached.
11 Enable (EN) - Set to one to enable the descriptor. Should always be set last of all the descriptor
fields.
10: 0 LENGTH - The number of bytes to be transmitted.
31: 2 Address (ADDRESS) - Pointer to the buffer area from where the packet data will be loaded.
1: 0 RESERVED
To enable a descriptor the enable (EN) bit should be set and after this is done, the descriptor should
not be touched until the enable bit has been cleared by the GRETH.
31: 19 RESERVED
18 Length error (LE) - The length/type field of the packet did not match the actual number of received
bytes.
17 Overrun error (OE) - The frame was incorrectly received due to a FIFO overrun.
16 CRC error (CE) - A CRC error was detected in this frame.
15 Frame too long (FT) - A frame larger than the maximum size was received. The excessive part
was truncated.
14 Alignment error (AE) - An odd number of nibbles were received.
13 Interrupt Enable (IE) - Enable Interrupts. An interrupt will be generated when a packet has been
received to this descriptor provided that the receiver interrupt enable bit in the control register is set.
The interrupt is generated regardless if the packet was received successfully or if it terminated with
an error.
12 Wrap (WR) - Set to one to make the descriptor pointer wrap to zero after this descriptor has been
used. If this bit is not set the pointer will increment by 8. The pointer automatically wraps to zero
when the 1 kByte boundary of the descriptor table is reached.
11 Enable (EN) - Set to one to enable the descriptor. Should always be set last of all the descriptor
fields.
10: 0 LENGTH - The number of bytes received to this descriptor.
31: 2 Address (ADDRESS) - Pointer to the buffer area from where the packet data will be loaded.
1: 0 RESERVED
19.7 Registers
The core is programmed through registers mapped into APB address space.
31 EDCL available (ED) - Set to one if the EDCL is available. Fixed to zero.
30: 28 EDCL buffer size (BS) - UNUSED.
27 RESERVED
26 MDIO interrupts available (MA) - Set to one when the core supports mdio interrupts. Read only.
27: 11 RESERVED
10 PHY status change interrupt enable (PI) - Enables interrupts for detected PHY status changes.
9: 8 RESERVED
7 Speed (SP) - Sets the current speed mode. 0 = 10 Mbit, 1 = 100 Mbit. Only used in RMII mode (not
implemented). A default value is automatically read from the PHY after reset.
6 Reset (RS) - A one written to this bit resets the GRETH core. Self clearing.
5 Promiscuous mode (PM) - If set, the GRETH operates in promiscuous mode which means it will
receive all packets regardless of the destination address. Not Reset.
4 Full duplex (FD) - If set, the GRETH operates in full-duplex mode otherwise it operates in half-
duplex. Not Reset.
3 Receiver interrupt (RI) - Enable Receiver Interrupts. An interrupt will be generated each time a
packet is received when this bit is set. The interrupt is generated regardless if the packet was received
successfully or if it terminated with an error. Not Reset.
2 Transmitter interrupt (TI) - Enable Transmitter Interrupts. An interrupt will be generated each time a
packet is transmitted when this bit is set. The interrupt is generated regardless if the packet was
transmitted successfully or if it terminated with an error. Not Reset.
1 Receive enable (RE) - Should be written with a one each time new descriptors are enabled. As long
as this bit is one the GRETH will read new descriptors and as soon as it encounters a disabled
descriptor it will stop until RE is set again. This bit should be written with a one after the new
descriptors have been enabled. Reset value: ‘0’.
0 Transmit enable (TE) - Should be written with a one each time new descriptors are enabled. As long
as this bit is one the GRETH will read new descriptors and as soon as it encounters a disabled
descriptor it will stop until TE is set again. This bit should be written with a one after the new
descriptors have been enabled. Reset value: ‘0’.
8 PHY status changes (PS) - Set each time a PHY status change is detected - UNUSED.
7 Invalid address (IA) - A packet with an address not accepted by the MAC was received. Cleared
when written with a one. Reset value: ‘0’.
6 Too small (TS) - A packet smaller than the minimum size was received. Cleared when written with a
one. Reset value: ‘0’.
5 Transmitter AHB error (TA) - An AHB error was encountered in transmitter DMA engine. Cleared
when written with a one. Not Reset.
4 Receiver AHB error (RA) - An AHB error was encountered in receiver DMA engine. Cleared when
written with a one. Not Reset.
3 Transmitter interrupt (TI) - A packet was transmitted without errors. Cleared when written with a
one. Not Reset.
2 Receiver interrupt (RI) - A packet was received without errors. Cleared when written with a one. Not
Reset.
1 Transmitter error (TE) - A packet was transmitted which terminated with an error. Cleared when
written with a one. Not Reset.
0 Receiver error (RE) - A packet has been received which terminated with an error. Cleared when writ-
ten with a one. Not Reset.
15: 0 The two most significant bytes of the MAC Address. Not Reset.
31: 0 The four least significant bytes of the MAC Address. Not Reset.
31: 16 Data (DATA) - Contains data read during a read operation and data that is transmitted is taken from
this field. Not Reset.
15: 11 PHY address (PHYADDR) - This field contains the address of the PHY that should be accessed dur-
ing a write or read operation. Not Reset.
10: 6 Register address (REGADDR) - This field contains the address of the register that should be accessed
during a write or read operation. Not Reset.
5 RESERVED
4 Not valid (NV) - When an operation is finished (BUSY = 0) this bit indicates whether valid data has
been received that is, the data field contains correct data. Not Reset.
3 Busy (BU) - When an operation is performed this bit is set to one. As soon as the operation is finished
and the management link is idle this bit is cleared. Reset value: ‘0’.
2 Linkfail (LF) - When an operation completes (BUSY = 0) this bit is set if a functional management
link was not detected. Not Reset.
1 Read (RD) - Start a read operation on the management interface. Data is stored in the data field. Reset
value: ‘0’.
0 Write (WR) - Start a write operation on the management interface. Data is taken from the Data field.
Reset value: ‘0’.
31: 10 Transmitter descriptor table base address (BASEADDR) - Base address to the transmitter descriptor
table.Not Reset.
9: 3 Descriptor pointer (DESCPNT) - Pointer to individual descriptors. Automatically incremented by
the Ethernet MAC.
2: 0 RESERVED
31: 10 Receiver descriptor table base address (BASEADDR) - Base address to the receiver descriptor
table.Not Reset.
9: 3 Descriptor pointer (DESCPNT) - Pointer to individual descriptors. Automatically incremented by
the Ethernet MAC.
2: 0 RESERVED
19.9 Timing
The timing waveforms and timing parameters are shown in figure 94 and are defined in table 156.
clock
outputs
tGRETH0 tGRETH0
inputs
tGRETH1 tGRETH2
Note 1: The erx_crs, erx_col, emdio andi emdint inputs are re-synchronized internally. The signals
do not have to meet any setup or hold requirements.
Note 2: The emdio and emdc outputs are low speed signals without any timing relationship with
the erx_clk or etx_clk clocks.
Note 3 The minimum clock period, and the resulting maximum clock frequency, is dependent on
the manufacturing lot for the Actel RTAX2000S parts and expected radiation levels.
The degradation criterion for Propagation Delays for the RTAX2000S parts is according
to Actel Total Ionizing Dose Test Report 10% at 300 krad (Si). The above specified timing
values are guaranteed up to 50 krad (Si).
If a higher total ionizing dose is expected than 50 krad (Si), the corresponding post-anneal-
ing propagation delays that can be found in the Actel Total Ionizing Dose Test Report can
be used to degrade the timing more accurately (typical degradation is within 1% after 300
krad (Si)).
20 PCI Initiator/Target
20.1 Overview
This core provides a complete interface to an external PCI bus, with both initiator and target func-
tions. The PCI initiator has PCI system host capability. The interface is based on the Actel CorePCIF
IP and provides an AMBA bus backend.
PCI bridge
AMBA interface
AMBA AHB
Master
FIFO
Interrupt
control
AMBA APB
Slave
20.2 Operation
PCI I/O cycles: Accesses to the lower half of the AHB I/O bank is translated to PCI I/O cycles. The
upper 16 bits of the PCI address are defined by a mapping register (AMBA to PCI mapping for PCI I/
O cycles) while the lower 16 bits are transferred form the AMBA bus.
To generate PCI I/O accesses, The master function must be enabled, preferably by the PCI system
host during the PCI configuration and the mapping register must be programmed with the most signif-
icant bits of the PCI address that should be accessed. After this, read and write accesses to the lower
half of the AHB I/O bank will be translated to “I/O read” and “I/O write” on the PCI bus.
PCI configuration cycles: Accesses to the upper half of the AHB I/O bank translates to PCI configu-
ration cycles. The core can generate both type 0 and type 1 PCI configuration cycles. Type 0 configu-
ration cycles is generated when bit 16 to 23 in the PCI Configuration register is zero. In this case the
upper 21 bits of the PCI address is calculated from bit 15:11 of the AMBA address
(PCI_address[AMBA_address[15:11] + 10] = ’1’). The lower 11 bits of the PCI address is directly
transferred from AMBA address except for bit 1 and 0 which are always set to "00". When
AMBA_address[15:11] is equal to zero, the core will access its own PCI configuration space (through
the backend without generating a PCI access on the PCI bus). Accesses to the core\u2019s own PCI
configuration space are allowed before the master function is enabled, to be able to enable the master.
For type 1 configuration cycles bit 16 to 23 in the PCI Configuration register indicates which PCI bus
to configure. In this case the bit 16 to 23 of the PCI address is set by bit 16 to 23 of the PCI configura-
tion register. Bit 2 to 15 is directly transferred from the AMBA address and bit 0 and 1 is set to "01".
20.2.3 Configuration
The core has configuration registers accessible via the AMBA APB interface and via the PCI BAR 0.
The PCI BAR to AMBA address mapping registers and the interrupt controller registers are accessi-
ble via the PCI BAR 0. The interrupt registers must be setup to enable interrupt handling. The PCI to
AMBA address mapping registers must be setup to translate the PCI access into the correct AMBA
access. These mapping registers are also accessible via the AMBA APB interface. The AMBA to PCI
address mapping registers are accessible via the AMBA APB interface. These registers must be setup
to translate the access to the AMBA AHB slave interface into the correct PCI address.
20.3 Registers
The core is programmed via registers mapped into the APB address space and into PCI BAR 0.
The AMBA master to PCI mapping registers are all word aligned. Only the registers corresponding to
a master included in the system are implemented (i.e. if a system includes 8 masters, with master ID 0
to 7, the 8 first mapping registers are implemented).
Table 159. PCIF: PCI to AMBA mapping for PCI BAR 1 register
31 28 27 0
ABH address RESERVED
Table 160. PCIF: PCI to AMBA mapping for PCI BAR 2 register
31 23 22 0
ABH address RESERVED
31 : 24 RESERVED
23 : 16 Indicates which PCI bus should be addressed during a type 1 PCI configuration access. When this
register is zero, type 0 PCI configuration accesses will be generated. This register is zero after reset.
15 : 0 RESERVED
Table 162. PCIF: AMBA to PCI address mapping for PCI I/O cycles
31 16 15 0
PCI address RESERVED
31 : 30 RESERVED
29 : 28 Master and Target abort status from PCI configuration space
27 : 1 RESERVED
0 System host (’0’ = in host slot, ’1’ = in peripheral slot)
31 : 4 RESERVED
3:0 Interrupt mask for the four PCI interrupt signals. If bit number 0 is ‘1’ then PCI Interrupt A is
unmasked, and so on. Reset to all zeros.
31 : 16 RESERVED
15 : 1 Interrupt level n (IL[n]): Interrupt level for interrupt n
0 RESERVED
31 : 16 RESERVED
15 : 1 Interrupt pending n (IP[n]): Interrupt pending for interrupt n
0 RESERVED
31 : 16 RESERVED
15 : 1 Interrupt force n (IF[n]): Force interrupt nr n
0 RESERVED
31 : 4 RESERVED
3:0 Interrupt status
31 : 16 RESERVED
15 : 1 Interrupt clear n (IC[n]): Writing ‘1’ to IC[n] will clear interrupt n
0 RESERVED
31 : 16 RESERVED
15 : 1 Interrupt mask n(IM[n]): If IM[n] = 0 the interrupt n is masked, otherwise it is enabled
0 RESERVED
20.5 Timing
The timing waveforms and timing parameters are shown in figure 96 and are defined in table 173.
pci_clk
pci_ad[ ], pci_cbe[ ],
pci_frame, pci_irdy, tPCIFT0 tPCIFT0
pci_trdy, pci_stop,
pci_idsel, pci_devsel,
pci_perr, pci_serr,
pci_par, pci_int
pci_ad[ ], pci_cbe[ ],
pci_frame, pci_irdy, tPCIFT1 tPCIFT2
pci_trdy, pci_stop,
pci_idsel, pci_devsel,
pci_perr, pci_serr,
pci_par
pci_gnt,pci_req
tPCIFT3 tPCIFT3
pci_gnt,pci_req
tPCIFT4 tPCIFT5
Note 1: The minimum clock period, and the resulting maximum clock frequency, is dependent on
the manufacturing lot for the Actel RTAX2000S parts and expected radiation levels.
The degradation criterion for Propagation Delays for the RTAX2000S parts is according
to Actel Total Ionizing Dose Test Report 10% at 300 krad (Si). The above specified timing
values are guaranteed up to 50 krad (Si).
If a higher total ionizing dose is expected than 50 krad (Si), the corresponding post-anneal-
ing propagation delays that can be found in the Actel Total Ionizing Dose Test Report can
be used to degrade the timing more accurately (typical degradation is within 1% after 300
krad (Si)).
The functional behavior of the part is guaranteed up to 300 krad (Si).
21 PCI Arbiter
21.1 Overview
PCIARB is an arbiter for the PCI bus, according to the PCI specification version 2.1. It supports 8
agents. The arbiter uses nested round-robbing policy in two priority levels. The priority assignment is
programmable through an APB interface.
21.2 Operation
21.2.2 Time-out
The “broken master” time-out is another reason for re-arbitration (section 3.4.1 of the PCI standard).
Grant is removed from an agent, which has not started a cycle within 16 cycles after request (and
grant). Reporting of such a ‘broken’ master is not implemented.
21.2.3 Turn-over
A turn-over cycle is required by the standard, when re-arbitration occurs during idle state of the bus.
Notwithstanding to the standard, “idle state” is assumed, when FRAMEN is high for more than 1
cycle.
21.2.5 Lock
Lock is defined as a resource lock by the PCI standard. The optional bus lock mentioned in the stan-
dard is not considered here and there are no special conditions to handle when LOCKN is active dur-
ing in arbitration.
21.2.6 Latency
Latency control in PCI is via the latency counters of each agent. The arbiter does not perform any
latency check and a once granted agent continues its transaction until its grant is removed AND its
own latency counter has expired. Even though, a bus re-arbitration occurs during a transaction, the
hand-over only becomes effective, when the current owner deasserts FRAMEN.
21.4 Timing
The timing waveforms and timing parameters are shown in figure 97 and are defined in table 175.
pci_clk
pci_arb_gnt[ ]
tPCIARB0 tPCIARB0
pci_arb_req[ ]
tPCIARB1 tPCIARB2
22.1 Overview
The interface consists of a UART connected to the AMBA AHB bus as a master. A simple communi-
cation protocol is supported to transmit access parameters and data. Through the communication link,
a read or write transfer can be generated to any address on the AMBA AHB bus.
AMBA AHB
22.2 Operation
Start D0 D1 D2 D3 D4 D5 D6 D7 Stop
Write Command
Send 11 Length -1 Addr[31:24] Addr[23:16] Addr[15:8] Addr[7:0] Data[31:24] Data[23:16] Data[15:8] Data[7:0]
Read command
Block transfers can be performed be setting the length field to n-1, where n denotes the number of
transferred words. For write accesses, the control byte and address is sent once, followed by the num-
ber of data words to be written. The address is automatically incremented after each data word. For
read accesses, the control byte and address is sent once and the corresponding number of data words
is returned.
22.3 Registers
The core is programmed through registers mapped into APB address space.
31 2 1 0
RESERVED BL EN
0: Receiver enable (EN) - if set, enables both the transmitter and receiver. Reset value: ‘0’.
1: Baud rate locked (BL) - is automatically set when the baud rate is locked. Reset value: ‘0’.
31 7 6 5 4 3 2 1 0
RESERVED FE OV BR TH TS DR
2: Transmitter hold register empty (TH) - indicates that the transmitter hold register is empty. Read only. Reset value:
‘1’.
3: Break (BR) - indicates that a BREAKE has been received. Reset value: ‘0’.
4: Overrun (OV) - indicates that one or more character have been lost due to overrun. Reset value: ‘0’.
6: Framing error (FE) - indicates that a framing error was detected. Reset value: ‘0’.
31 18 17 0
RESERVED SCALER RELOAD VALUE
22.5 Timing
The timing waveforms and timing parameters are shown in figure 104 and are defined in table 178.
clk
Note: The dsurx input is re-synchronized internally. The signal does not have to meet any setup or
hold requirements.
23.1 Overview
The JTAG debug interface provides access to on-chip AMBA AHB bus through JTAG. The JTAG
debug interface implements a simple protocol which translates JTAG instructions to AHB transfers.
Through this link, a read or write transfer can be generated to any address on the AHB bus.
TDI
TDO
AHB master interface
AMBA AHB
23.2 Operation
32 Sequential transfer (SEQ) - If ‘1’ is shifted in this bit position when read data is shifted out or write
data shifted in, the subsequent transfer will be to next word address.
31 30 AHB Data - AHB write/read data. For byte and half-word transfers data is aligned according to big-
endian order where data with address offset 0 data is placed in MSB bits.
23.3 Registers
The core does not implement any registers mapped in the AMBA AHB or APB address space.
23.5 Timing
The timing waveforms and timing parameters are shown in figure 106 and are defined in table 182.
tAHBJTAG0 tAHBJTAG1
dsutck
tAHBJTAG2
dsutdi, dsutms
tAHBJTAG4 tAHBJTAG3
dsutdo
24 Clock generation
24.1 Overview
The clock generator implements internal clock generation and buffering.
24.3 Timing
The timing waveforms and timing parameters are shown in figure 107 and are defined in table 184.
tCLKGEN0
clk
Note 1: The minimum clock period, and the resulting maximum clock frequency, is dependent on
the manufacturing lot for the Actel RTAX2000S parts and expected radiation levels.
The degradation criterion for Propagation Delays for the RTAX2000S parts is according to
Actel Total Ionizing Dose Test Report 10% at 300 krad (Si). The above specified timing
values are guaranteed up to 50 krad (Si).
If a higher total ionizing dose is expected than 50 krad (Si), the corresponding post-anneal-
ing propagation delays that can be found in the Actel Total Ionizing Dose Test Report can
be used to degrade the timing more accurately (typical degradation is within 1% after 300
krad (Si)).
25 Reset generation
25.1 Overview
The reset generator implements input reset signal synchronization with glitch filtering and generates
the internal reset signal. The input reset signal can be asynchronous.
25.3 Timing
The timing waveforms and timing parameters are shown in figure 108 and are defined in table 186.
clk
resetn tRSTGEN0
Note: The resetn input is re-synchronized internally. The signals does not have to meet any setup or
hold requirements.
26.1 Overview
The AMBA AHB controller is a combined AHB arbiter, bus multiplexer and slave decoder according
to the AMBA 2.0 standard.
MASTER MASTER
AHBCTRL
ARBITER/
DECODER
SLAVE SLAVE
26.2 Operation
26.2.1 Arbitration
In round-robin mode, priority is rotated one step after each AHB transfer. If no master requests the
bus, the last owner will be granted (bus parking).
26.2.2 Decoding
Decoding of AHB slaves is done using the plug&play method explained in the GRLIB User’s Man-
ual. A slave can occupy any binary aligned address space with a size of 1 - 4096 Mbyte. A specific I/
O area is also decoded, where slaves can occupy 256 byte - 1 Mbyte. The default address of the I/O
area is 0xFFF00000. Access to unused addresses will cause an AHB error response.
31 24 23 12 11 10 9 5 4 0
04 USER-DEFINED
08 USER-DEFINED
0C USER-DEFINED
BAR0 10 HADDR
ADDR 00 P C MASK
MASK TYPE
31 20 19 18 17 16 15 4 3 0
TYPE
P = Prefetchable
C = Cacheable 0001 = APB I/O space
0010 = AHB Memory space
0011 = AHB I/O space
26.3 Registers
The core does not implement any registers.
27.1 Overview
The AMBA AHB/APB bridge is a APB bus master according the AMBA 2.0 standard.
•••
APBI
27.2 Operation
27.2.1 Decoding
Decoding of APB slaves is done using the plug&play method explained in the GRLIB IP Library
User’s Manual. A slave can occupy any binary aligned address space with a size of 256 bytes - 1
Mbyte.
31 24 23 12 11 10 9 5 4 0
31 20 19 16 15 4 3 0
28 Electrical description
29 Mechanical description
cb[9] inout 53 - LVTTL 3.3 Low 12 35 None High Reed-Solomon option only 2) 7
cb[10] inout 54 - LVTTL 3.3 Low 12 35 None High Reed-Solomon option only 2) 7
cb[11] inout 55 - LVTTL 3.3 Low 12 35 None High Reed-Solomon option only 2) 7
cb[12] inout 58 - LVTTL 3.3 Low 12 35 None High Reed-Solomon option only 2) 7
cb[13] inout 137 - LVTTL 3.3 Low 12 35 None High Reed-Solomon option only 2) 7
cb[14] inout 313 - LVTTL 3.3 Low 12 35 None High Reed-Solomon option only 2) 7
cb[15] inout 319 - LVTTL 3.3 Low 12 35 None High Reed-Solomon option only 2) 7
ramsn[0] out 146 M2 LVTTL 3.3 Low 12 35 None Low SRAM chip select All
ramsn[1] out 147 P4 LVTTL 3.3 Low 12 35 None Low All
ramsn[2] out 152 P1 LVTTL 3.3 Low 12 35 None Low All
ramsn[3] out 153 P6 LVTTL 3.3 Low 12 35 None Low All
ramsn[4] out 142 P5 LVTTL 3.3 Low 12 35 None Low 4-8
ramoen[0] out 154 P3 LVTTL 3.3 Low 12 35 None Low SRAM output enable All
ramoen[1] out 155 N4 LVTTL 3.3 Low 12 35 None Low All
ramoen[2] out 158 U1 LVTTL 3.3 Low 12 35 None Low All
ramoen[3] out 159 T1 LVTTL 3.3 Low 12 35 None Low All
ramoen[4] out 143 R2 LVTTL 3.3 Low 12 35 None Low 4-8
rwen[0] out 272 H3 LVTTL 3.3 Low 12 35 None Low SRAM write strobe 1) All
scb[9] inout - B11 LVTTL 3.3 Low 12 35 None High Reed-Solomon option only 2) 4, 5
scb[10] inout - B10 LVTTL 3.3 Low 12 35 None High Reed-Solomon option only 2) 4, 5
scb[11] inout - E11 LVTTL 3.3 Low 12 35 None High Reed-Solomon option only 2) 4, 5
scb[12] inout - F11 LVTTL 3.3 Low 12 35 None High Reed-Solomon option only 2) 4, 5
scb[13] inout - D12 LVTTL 3.3 Low 12 35 None High Reed-Solomon option only 2) 4, 5
scb[14] inout - D11 LVTTL 3.3 Low 12 35 None High Reed-Solomon option only 2) 4, 5
scb[15] inout - A11 LVTTL 3.3 Low 12 35 None High Reed-Solomon option only 2) 4, 5
sdcsn[0] out 300 A10 LVTTL 3.3 Low 12 35 None Low SDRAM chip select 4-8
sdcsn[1] out 299 J13 LVTTL 3.3 Low 12 35 None Low 4-8
sdwen out 305 G11 LVTTL 3.3 Low 12 35 None Low SDRAM write enable 4-8
sdrasn out 306 H11 LVTTL 3.3 Low 12 35 None Low SDRAM row strobe 4-8
sdcasn out 122 K13 LVTTL 3.3 Low 12 35 None Low SDRAM column strobe 4-8
sddqm[0] out 123 C9 LVTTL 3.3 Low 12 35 None Low SDRAM data mask 1) 4-8
Pins not used in a given configuration (see CID column) should be left unconnected (or tied to
ground), including the pins marked as {reserved}. The only exception is if the unused pin is mapped
on a hardwired clock input or a routed clock input, which should then be tied to ground:
CQ352 package: spw_clk, ramsn[4], ramoen[4], sdcsn[0], sdcsn[1], sdwen, sdrasn, sdcasn,
sddqm[0], sddqm[1], sddqm[2], sddqm[3],
cb[13], cb[14], cb[15]
CG624 package: spw_clk, sd[17], sd[18], sd[19], sd[20], sdclk, sdclkfb,
pci_arb_req[2], pci_arb_req[3], pci_arb_req[4], pci_arb_req[7]
For the usage of all other pins, please refer to the specific pins of the selected package, as described in
the next sections and the Actel data sheet [RTAX].
Note 1: Refer to signal definitions of each memory controller for detailed usage of these signals.
Note 2: Signals only used in custom configurations with Reed-Solomon protected SDRAM.
30 Reference documents
[AMBA] AMBATM Specification, Rev 2.0, ARM IHI 0011A, 13 May 1999, Issue A, first release,
ARM Limited
[GRLIB] GRLIB IP Library User's Manual, Aeroflex Gaisler, www.aeroflex.com/gaisler
[GRIP] GRLIB IP Core User's Manual, Aeroflex Gaisler, www.aeroflex.com/gaisler
[SPARC] The SPARC Architecture Manual, Version 8, Revision SAV080SI9308, SPARC Interna-
tional Inc.
[SPW] ECSS - Space Engineering, SpaceWire - Links, Nodes, Routers and Networks, ECSS-E-
ST-50-12C, 31 July 2008
[RMAPID]ECSS - Space Engineering, SpaceWire Protocols, ECSS-E-ST-50-51C, February 2010
[RMAP] ECSS - Space Engineering, SpaceWire Protocols, ECSS-E-ST-50-52C, February 2010
[RTAX] RTAX-S/SL RadTolerant FPGAs, 5172169-13/8.10, Revision 13, August 2010, Actel Cor-
poration
[PACK] Package Mechanical Drawings, 5193068-39/8.10, Revision 39, August 2008, 2010 Corpo-
ration
[PCIF] CorePCIF Handbook, 50200087-1 /2.07, v2.1, February 2007, Actel Corporation
CorePCIF PCI Interface Core, 51700057-3/02.06, V 5.0, February 2006,
Actel Corporation
CorePCIF User's Guide Actel IP Solutions, 50200051-1/3.06, March 2006,
Actel Corporation
CorePCIF v2.03 Release Notes, 51300025-2/2.06, February 2006, Actel Corporation
[1553BRM]Core1553BRM Product Handbook, 50200040-0/11-04, November 2004, Actel
Corporation
Core1553BRM MIL-STD-1553 BC, RT, and MT, 51700052-4/12.05, v 5.0,
December 2005, Actel Corporation
Core1553BRM User's Guide, 50200023-0/06.04, June 2004, Actel Corporation
Core1553BRM v2.16 Release Notes, 51300019-8/6.06, June 2006, Actel Corporation
[1553RT] Core1553BRT MIL-STD-1553B Remote Terminal, 5172165-10/9.05, v 5.0,
September 2005, Actel Corporation
Core1553BRT User’s Guide, 5029140-1/9.05, September 2005, Actel Corporation
Core1553BRT v3.0 Release Notes, 5139125-7/08.05, August 2005, Actel Corporation
31 Ordering information
Ordering information is provided in table 190 and a legend is provided in table 191.
Table 190.Ordering information
Product Configuration Reed- SpaceWire Device Speed Grade Package Lead Application
ID (CID) Solomon LVTTL Type Count
STD -1 EV E B
LEON3FT-RTAX-IC1 1 RTAX2000S STD CQ 352 EV E B
LEON3FT-RTAX-IC2 2 No / (Yes) RTAX2000S -1 CQ 352 EV E B
LEON3FT-RTAX-SC1 3 RTAX2000S STD CQ 352 EV E B
LEON3FT-RTAX-SC2 4 No / (Yes) No / (Yes) RTAX2000S -1 CG 624 EV E B
LEON3FT-RTAX-SC3 5 No / (Yes) No / (Yes) RTAX2000S -1 CG 624 EV E B
LEON3FT-RTAX-SC4 6 RTAX2000S -1 CG 624 EV E B
LEON3FT-RTAX-PC1 7 No / (Yes) No / (Yes) RTAX2000S -1 CQ 352 EV E B
LEON3FT-RTAX-PC2 8 RTAX2000S -1 CQ 352 EV E B
Table 191.Ordering legend
32 Change record
Change record information is provided in table 192.
Table of contents
1 Introduction.............................................................................................................................. 2
1.1 Overview ................................................................................................................................................. 2
1.2 Signal overview ....................................................................................................................................... 3
1.3 Standard configurations ........................................................................................................................... 4
2 Architecture.............................................................................................................................. 5
2.1 Cores........................................................................................................................................................ 5
2.2 Interrupts ................................................................................................................................................. 6
2.3 Memory map ........................................................................................................................................... 6
2.4 Plug & play information.......................................................................................................................... 8
2.5 Configuration........................................................................................................................................... 9
2.6 Signals ................................................................................................................................................... 11
3 LEON3FT - Fault-Tolerant SPARC V8 Processor ................................................................ 15
3.1 Overview ............................................................................................................................................... 15
3.2 LEON3 integer unit ............................................................................................................................... 15
3.2.1 Overview ................................................................................................................................. 15
3.2.2 Instruction pipeline ................................................................................................................. 16
3.2.3 SPARC Implementor’s ID....................................................................................................... 17
3.2.4 Divide instructions .................................................................................................................. 17
3.2.5 Multiply instructions ............................................................................................................... 17
3.2.6 Multiply and accumulate instructions ..................................................................................... 17
3.2.7 Hardware breakpoints ............................................................................................................. 18
3.2.8 Instruction trace buffer ............................................................................................................ 18
3.2.9 Processor configuration register.............................................................................................. 19
3.2.10 Exceptions............................................................................................................................... 20
3.2.11 Single vector trapping (SVT) .................................................................................................. 21
3.2.12 Address space identifiers (ASI)............................................................................................... 21
3.2.13 Power-down ............................................................................................................................ 21
3.2.14 Processor reset operation ........................................................................................................ 21
3.2.15 Cache sub-system.................................................................................................................... 22
3.3 Instruction cache.................................................................................................................................... 22
3.3.1 Operation................................................................................................................................. 22
3.3.2 Instruction cache tag ............................................................................................................... 23
3.4 Data cache ............................................................................................................................................. 23
3.4.1 Operation................................................................................................................................. 23
3.4.2 Write buffer ............................................................................................................................. 23
3.4.3 Data cache tag ......................................................................................................................... 24
3.5 Additional cache functionality .............................................................................................................. 24
3.5.1 Cache flushing......................................................................................................................... 24
3.5.2 Diagnostic cache access .......................................................................................................... 24
3.5.3 Cache Control Register ........................................................................................................... 25
3.5.4 Cache configuration registers.................................................................................................. 26
3.5.5 Software consideration............................................................................................................ 26
3.6 Memory management unit..................................................................................................................... 27
3.6.1 ASI mappings.......................................................................................................................... 27
3.6.2 Cache operation....................................................................................................................... 27
3.6.3 MMU registers ........................................................................................................................ 27
3.6.4 Translation look-aside buffer (TLB) ....................................................................................... 27
3.7 Floating-point unit and custom co-processor interface ......................................................................... 28