Skip to content

o1553_rt: Architecture and Design Description

1. Block diagram

Remote terminal: message sequencer (RT-1), status registers (RT-2), mode code handler (RT-3), buffer access (RT-4),
address input (RT-5) and ECSS services (RT-6), with the word events and the transmit stream of the codec, the memory
port and the configuration, status and event signals of the host
interface

The message sequencer (RT-1) receives the word events of both decoders and the line activity. It validates commands, follows each message word by word, measures the response time and the time-outs, and sends the status word and the data words to the encoder. For every memory access it hands a job to the buffer access (RT-4), which owns the memory port, computes the addresses from the memory map of section 4, substitutes the words of the ECSS services and the data wrap-around, and writes the event records. The status registers (RT-2) compose the status word and keep the last command word, the BIT word and the terminal flag. The mode code handler (RT-3) executes the mode codes when the sequencer releases them. The address input (RT-5) synchronises and validates the address straps; the ECSS services (RT-6) keep the frame number and the health word.

Block Entity Function
o1553_rt Top level: connects the blocks
o1553_rt_pkg Memory map, word formats, error codes, timing functions (rtRespMin, rtDecision)
RT-1 o1553_rt_seq Message sequencer
RT-2 o1553_rt_status Status word, last command word, BIT word, terminal flag
RT-3 o1553_rt_mode Mode code execution, transmitter shutdown commands, indications
RT-4 o1553_rt_mem Memory jobs, address generation, substitutions, event record writer
RT-5 o1553_rt_addr Address straps: olo_intf_sync, parity, validation
RT-6 o1553_rt_svc Frame number, health word

2. Interfaces

2.1 Generics

Generic Type Default Range Description
ClkFreq_g real none 16.0e6 to 400.0e6, integer multiple of 2.0e6 Frequency of Clk in Hz, as o1553_codec; checked by checkClkFreq of o1553_codec_pkg
SyncStages_g positive 2 2 to 4 Synchroniser stages of the codec (for rxLatency) and of the address straps
MemLatency_g positive 3 1 to 8 Cycles from the acceptance of a memory read to its response; enters rtDecision and rtRespMin

2.2 Ports

Port Width Dir Description
Clk, Rst 1 in Clock and synchronous high-active reset
Rx_Valid, Rx_Sync, Rx_Data, Rx_Error, Rx_Contig, Rx_Gap, Rx_Own 2, 2, 32, 6, 2, 32, 2 in Word events of both decoders (o1553_codec)
Rx_Active 2 in Line activity per bus (o1553_codec)
Tx_Valid, Tx_Ready, Tx_Sync, Tx_Data, Tx_Last, Tx_Bus 1, 1, 1, 16, 1, 1 out, in, out, out, out, out Transmit stream to the encoder
Tx_Abort 1 out End the transmission at once
Tx_Done, Tx_Result, Tx_Suppressed 1, 2, 1 in Transmission result; Tx_Suppressed is a level, sampled when a message ends (record bit 6)
Sd_Set, Sd_Clr, Fs_Clr 2 each out One-cycle transmitter commands per bus
Stat_FailSafe, Mon_Error 2 each in Fail-safe states, loopback error events
Mem_Req_Valid, Mem_Req_Ready, Mem_Req_Addr, Mem_Req_Write, Mem_Req_WrData 1, 1, 13, 1, 16 out, in, out, out, out Memory requests
Mem_Rsp_Valid, Mem_Rsp_Data, Mem_Rsp_Ded 1, 16, 1 in Read responses in request order with the double error flag (single errors are corrected and counted by the EDAC monitor of the host)
Mem_InitDone 1 in Buffer memory initialised (D11)
Log_WrIdx 8 in Record index for the next event record
Log_Push, Log_Irq 1, 1 out Record complete; it requests an interrupt
Time_Tag 32 in Time tag in microseconds (D18)
Rt_Addr, Rt_AddrParity 5, 1 in Address straps, asynchronous
Rt_TimeSync, Rt_FrameSync, Rt_SyncData, Rt_ResetReq, Rt_SelfTestReq 1, 1, 16, 1, 1 out Indications (D19)
Cfg_*, Ecc_DedEvent section 3 in Configuration from the register file, double error events of the EDAC monitor
Stat_* section 3 out State for the register file

3. Configuration and state signals

3.1 Configuration inputs

Signal Width Kind Reset value in the register file Use
Cfg_RtEn 1 level '1' RT enabled (RT-CV-01, RT-FT-04)
Cfg_BcstEn 1 level '1' Broadcast commands accepted (RT-CV-01)
Cfg_IllegalEn 1 level '1' Illegal command tables used (RT-IL-01)
Cfg_LogErrors 1 level '1' Records for messages that end with an error (RT-EV-01)
Cfg_RespTime 16 level 6.0 us in cycles Response time in clock cycles at the ports (RT-TM-01)
Cfg_ServiceReq, Cfg_Busy, Cfg_SubsysFlag, Cfg_TermFlag 1 each level '0' Status conditions of the host (RT-ST-02, RT-ST-03)
Cfg_Vector 16 level 0 Vector word (RT-MC-09)
Cfg_BitHost 8 level 0 BIT word bits 15 to 8
Cfg_BitClr 8 one-cycle Clear the latched BIT bits 7 to 0 (write 1 to clear)
Cfg_WrapEn, Cfg_TimeEn, Cfg_FrameEn, Cfg_HealthEn 1 each level '1' ECSS functions of D12
Cfg_HealthSet 16 one-cycle Set health word bits (RT-SV-05)
Cfg_AddrCheck 1 one-cycle Validate the address again (RT-AD-02)
Ecc_DedEvent 1 one-cycle Double error of any read of the buffer memory: the scrubber, a host read, a read of the RT, also one of a superseded message (the EDAC monitor of o1553_host, D14)

3.2 State outputs

Signal Width Content
Stat_Addr, Stat_AddrValid, Stat_AddrErr 5, 1, 2 Validated address, valid, error (bit 0 parity, bit 1 address 31)
Stat_StatusWord 16 Current status word (what mode code 2 would send)
Stat_LastCmd 16 Last command word
Stat_Bit 16 BIT word
Stat_TfInhibit 1 Terminal flag inhibited (mode code 6)
Stat_Health, Stat_Frame 16, 8 RT health word, frame number
Stat_TxInUse, Stat_TxInUseSa, Stat_TxInUsePend, Stat_TxInUseBuf 1, 5, 1, 1 Transmit buffer in use (D9): the subaddress from the start of the lookup of a transmit command; the buffer pending until the control word has been read, then the buffer; until the last data word has been read. The host has given up buffer X of a subaddress when not (Stat_TxInUse and Stat_TxInUseSa = the subaddress and (Stat_TxInUsePend or Stat_TxInUseBuf = X))
Stat_MsgActive 1 A message is in progress

3.3 Reset values

After the reset: sequencer idle, no message, status word = address and all bits '0', last command word 0, BIT bits 7 to 0 '0', terminal flag not inhibited, health word 0, frame number 0, no transmit buffer in use. The address is validated in the first cycles after the reset (RT-AD-02); until then and until Mem_InitDone the RT does not respond.

3.4 BIT word

Bit Meaning Set by
0, 1 Loopback error on bus A, bus B Mon_Error
2, 3 Fail-safe time-out on bus A, bus B rising edge of Stat_FailSafe
4 Memory double error RT-FT-01, RT-FT-02, Ecc_DedEvent
5 Transmission not completed (underrun not caused by a double error) Tx_Result
6 Address validation failed RT-AD-02
7 Reserved, '0'
15 to 8 Host BIT bits Cfg_BitHost

Bits 7 to 0 stay set until the host clears them (Cfg_BitClr); while one of them is set, the terminal flag condition is present (RT-ST-08).

4. Buffer memory

4.1 Memory map

The buffer memory holds 8192 words of 16 bits (core architecture section 7.7). The RT uses this map; the specification of o1553_host adopts it, and the constants are in o1553_rt_pkg.

Region Word addresses Size Content
Subaddress descriptors 0x0000 to 0x00FF 256 4 words per T/R bit and subaddress: 0x0000 + T/R x 128 + SA x 4
Illegal command tables 0x0100 to 0x01FF 256 4 words per T/R bit and subaddress: 0x0100 + T/R x 128 + SA x 4
Reserved 0x0200 to 0x07FF 1536 Bus controller and bus monitor (phases b, c)
Event log 0x0800 to 0x0FFF 2048 256 records of 8 words: 0x0800 + index x 8
Subaddress buffers 0x1000 to 0x1FFF 4096 Two buffers of 32 words per T/R bit and subaddress: 0x1000 + T/R x 2048 + SA x 64 + buffer x 32 + word

Subaddresses 0 and 31 have no buffers and no descriptors of their own; the table entry of subaddress 31 serves the mode codes of both, and the control word of subaddress 31 enables their records and interrupts.

4.2 Subaddress descriptor

Word Writer Bits
0: control word host 0: selected transmit buffer (T/R = 1); 1: event record enable; 2: interrupt enable; 15 to 3: '0'
1: status word RT 0: buffer (receive: published; transmit: last used); 6 to 1: word count of the last valid message, 1 to 32; 7: broadcast; 15 to 8: '0'
2: message count RT Valid messages, modulo 65536
3 none Reserved

4.3 Illegal command table entry

Word Content
0 Own commands: bit w = '1' when word count (mode code) w is legal, for w = 0 to 15
1 Own commands, w = 16 to 31
2 Broadcast commands, w = 0 to 15
3 Broadcast commands, w = 16 to 31

The word count field w = 0 stands for 32 data words. The fixed rules of RT-IL-02 apply after the table.

4.4 Event record

Word Content
0 Command word
1 Status word (as sent, or as it would have been sent; after a message error with the message error bit)
2 3 to 0: error code (section 4.5); 4: bus ('1' = B); 5: broadcast; 6: status word sent (presented, and the outputs of its bus driven from the start of the transmission to the end of the message, Tx_Suppressed sampled at the end; a message that ends before the codec starts the transmission has '0'); 7: RT to RT transfer; 8: buffer; 14 to 9: data words transferred (0 to 32); 15: interrupt requested
3 Data word of a mode command, otherwise 0
4 Transmit command of an RT to RT transfer, otherwise 0
5, 6 Time tag at the command event, low and high half
7 Reserved, 0

4.5 Error codes

Code Meaning Code Meaning
0 None 7 RT to RT format
1 Invalid data word 8 Illegal command
2 Data word with command sync 9 Superseded
3 Data word not contiguous 10 Memory double error
4 Word count too low 11 Busy
5 Word count too high 12 Transmission not completed
6 RT to RT time-out 13 RT disabled or address invalid
14 Not published: double error in the message count

5. Message sequencer (RT-1, o1553_rt_seq)

5.1 State machine

Message sequencer: Idle_s, Lookup_s, RxCmd_s, RxStatus_s, RxData_s, Respond_s, TxWords_s, Reset_s

State Meaning Leaves on
Idle_s No message Valid command: Lookup_s
Lookup_s The buffer access reads the table entry and the descriptors of the command (section 6.2); the sequencer decodes the format Lookup done: by format to RxCmd_s, RxData_s or Respond_s
RxCmd_s After a receive command: the first data word or the transmit command of an RT to RT transfer is expected Contiguous data word: RxData_s; RT to RT transmit command: RxStatus_s; time-out or error: end
RxStatus_s RT to RT: the status word of the other terminal is expected Status word with its address: RxData_s; time-out or error: end
RxData_s Data word k of n expected Last word: Respond_s; time-out or error: end
Respond_s Waiting for the presentation cycle of the status word Presentation cycle: line activity check, then TxWords_s or end
TxWords_s Status word and data words to the encoder Tx_Done: end
Reset_s Mode code 8: reset of the protocol state Reset done: Idle_s

"End" finishes the message: the publication and the counts (valid messages), the release of the mode code, the event record job, then Idle_s. A valid command in any state supersedes the message (RT-SU-01): Tx_Abort if transmitting, the message ends with error code 9, and the new command enters Lookup_s in the same cycle.

5.2 Message positions

The sequencer keeps the bus of the message and the expected word. A word event of that bus that is not an own word is taken by the state:

State Command candidate Valid word with data sync Invalid word
Idle_s, Lookup_s, Respond_s, TxWords_s Valid command: new message (supersedes) Ignored Ignored
RxCmd_s Contiguous: transmit command to another RT (not 31, subaddress 1 to 30): RT to RT; valid command: supersedes; otherwise error 7. Not contiguous: error 4, then evaluated as a command Contiguous: first data word; otherwise error 3 Error 1
RxStatus_s Address of the transmit command: status word of the other RT; valid command: supersedes; otherwise error 7 Error 7 Error 7
RxData_s Contiguous: error 2. Not contiguous: error 4, then evaluated as a command Contiguous: data word; otherwise error 3 Error 1

Words of the other bus are only checked for valid commands (supersede). After a message error the sequencer marks the bus of the message: while the mark is set, no command candidate of that bus is evaluated (the rest of the corrupted word sequence, RT-DV-06). The mark ends when the line of the bus has been idle (Rx_Active = '0') for 2H cycles (1.0 us). A message error that a timer finds (word count too low, RT to RT time-out) after the line has already been idle for 1.0 us since the last word event of the bus sets no mark: the word sequence of the message has ended, and the next word, typically a new command, is evaluated.

  • Rx_Contig cannot end the mark: it refers to the previous valid word, so a word after an invalid one never appears contiguous, and the decoder reports Manchester, sync and bit count errors before the end of the word.
  • Nor can the fall of Rx_Active itself: it comes ceil(0.8H) + S + 2 cycles (0.4 us) after the end of the last word, 1.2H + F - 1 cycles before the event of that word (rxLatency after its reference crossing). 2H is longer than that at every allowed clock frequency, so the last word of the corrupted sequence is reported while the mark is still set.
  • Margin: the mark ends about 1.4 us after the end of the last word. A bus controller starts the next message at least 4.0 us after it, about 2.6 us after the mark has ended. A word that starts less than about 1.4 us after the end of a corrupted sequence is still skipped; a word within 0.4 us of it is contiguous anyway.

5.3 Timers

All timers count clock cycles from a word event:

Timer Start Length Action
Word Event of every received word of the message, and of the status word of the other terminal 42H (21.0 us) No next word: error 4; no first data word of an RT to RT transfer: error 6
RT to RT Event of the receive command 152H (76 us: 57 us to the mid-sync crossing plus the first data word) No status word of the other terminal, or no first data word: error 6
Response Event of the last word Cfg_RespTime (bounded as RT-TM-01) - 3H - txLatency - rxLatency Presentation cycle

At the first data word of an RT to RT transfer the sequencer checks the time-out exactly: (event of the status word - event of the receive command) + Rx_Gap of the data word, in cycles, against 114H (57.0 us).

5.4 Presentation cycle

In the presentation cycle the sequencer checks Rx_Active of the bus of a receive message (RT-DV-03). If the line is idle, or for transmit and mode commands, it presents the status word (Tx_Valid, Tx_Sync = '1', the status word of RT-2, Tx_Bus) and releases the mode code to RT-3. RT-2 shows the message error bit of an illegal command or of a lookup double error two cycles after the lookup result; the sequencer sets it in the presented status word itself, so that it is present at rtRespMin. A valid receive message is published when its status word is complete (Tx_Done with the result "complete"), a broadcast receive message in the presentation cycle; a message that a new command supersedes while its status word is sent is therefore not published (RT-SU-01). A new command reported in the presentation cycle supersedes the message before its status word: no status word, no mode code. The encoder accepts the first word of a transmission in the cycle it is presented, so the sync starts txLatency cycles later and the mid-sync crossing 3H after that. The data words follow at the acceptance cycles of the encoder; the buffer access reads each word while the word before it is sent. A broadcast message has the same presentation cycle without transmission. The indications of mode codes 1, 3 and 17 come in the presentation cycle (the cycle in which Tx_Valid is '1'); RT-3 decodes them from the registered release of the sequencer. Since a word event comes 0.5 cycle before to one cycle after rxLatency, they come Cfg_RespTime - 3H - txLatency cycles (+/- 1) after the reference crossing of the command or of its data word.

6. Buffer access (RT-4, o1553_rt_mem)

6.1 Jobs

The sequencer gives jobs to the buffer access; it serves them in this priority: lookup, publication, data word, event record. Only one lookup and one data word access can be pending at a time.

Job Accesses Result
Lookup Read the table word of the word count and the control word Legal, control bits, double error flag
Data write Word 0 first reads the receive status word of the subaddress (the buffer that is not published); write word k of that buffer. With a double error in that read nothing of the message is written (RT-FT-05) Double error flag
Data read Read word k of the transmit buffer, or the substituted word (section 6.3); word 0 of subaddresses 29 and 30 with their service enabled first reads the receive status word (the published buffer and its word count) Data word, double error flag
Publication Read the message count; write the status word; write the count + 1. With a double error in the count read nothing is written (RT-FT-06), so that every publication changes the count for sure Publication failed
Record Write the 8 words of the event record at Log_WrIdx, then Log_Push. A record requested only for a failed publication (Cfg_LogErrors) is written only when the publication fails; a failed publication sets error code 14 and the interrupt flag in the record

The event record job takes the record from a register set that the sequencer fills when the message ends, so that the next message can start while the record is written.

A publication starts in the cycle in which its message ends; from the next cycle on Stat_MsgActive is '0', and no other job is in progress (the data jobs of the message ended at least rtDecision cycles before, the jobs of the message before it at least one word time before). Its last write is accepted by the memory at most MemLatency_g + 8 cycles after that cycle: one cycle to take the job, one to issue the count read, its acceptance with at most one wait cycle (MemWait), MemLatency_g cycles to the response, and the two writes with one request cycle and at most one wait cycle each. Data jobs and records come after it (the job priority), but each new command whose lookup starts meanwhile delays it by up to 5 cycles: the cycle of the lookup start and the two lookup reads, each with a wait cycle. Within these cycles a command can come on each bus at most once, since the command events of one bus are at least a word time apart. The publication is therefore complete MemLatency_g + 18 cycles after the first cycle with Stat_MsgActive = '0', 25 cycles at the largest memory latency of the core (7). An illegal command starts no data job and no publication, so it neither reads nor writes the status word, the message count or the buffers of its subaddress; the repair of a descriptor by the host (user guide, section 7) relies on both properties.

The receive status word is read at data word 0, not in the lookup: the publication of the message before (at the end of its status word) may still be pending when the next command arrives, and a read in the lookup could find the old status word. Data word 0 comes at least 20 us after the command, long after every publication.

6.2 Lookup timing

The two reads of a lookup are requested in consecutive cycles, before every other job; in the cycle in which a new lookup starts no other job issues a request, so that the request register is free for the first read. The result is complete rtDecision cycles after the command event: rtDecision = MemLatency_g + 2 MemWait + 7, with MemWait = 1, the longest time a request waits for the memory port behind a host access (D8), once for each read. TC-RT-05 measures it at rtRespMin with a wait cycle on every request, also while the publication and the record of the message before are written.

A new lookup ends the data job of the message that it superseded. The reads of that message still in flight keep their place in the response order but are marked stale, and their responses are dropped. A result of its data job that the buffer access registered in the cycle before the new lookup reached it is ignored by the sequencer in the cycle after the new lookup started, as the result of a superseded lookup is. A double error read for a superseded message therefore marks neither message; the EDAC monitor reports it through Ecc_DedEvent (BIT bit 4), as every double error of the buffer memory.

6.3 Substitutions

Transmit subaddress Words Source
1, health service enabled 0 Health word (RT-6)
1, frame service enabled 1 Frame number (RT-6), bits 15 to 8 '0'
29, time service enabled 0 to 4 Published buffer of subaddress 29 receive; words at and beyond its word count 0x0000
30, wrap-around enabled all Published buffer of subaddress 30 receive

All other words come from the transmit buffer selected in the control word.

7. Status registers (RT-2) and mode code handler (RT-3)

  • RT-2 updates the status word on events of the sequencer: valid command (reset of ME and BCR, unless mode code 2 or 18; last command word, unless mode code 18), message error, broadcast message. SR, busy, SSF and TF are taken from their conditions when the status word is composed, so that a condition that persists is set again (I10).
  • RT-3 receives the released mode code with its data word and bus. It drives Sd_Set and Sd_Clr of the other bus (mode codes 4, 5, 20, 21), the terminal flag inhibit (6, 7), the indications (1, 3, 17) and the frame number (17, to RT-6). For mode code 8 it tells the sequencer to enter Reset_s after the status word: the sequencer, RT-2 and RT-3 return to their reset values except the address and the BIT word, Sd_Clr clears both shutdowns, and Rt_ResetReq is pulsed.
  • The data words of mode codes 16, 18 and 19 (vector, last command, BIT) come from RT-2 and the configuration.
  • Mode codes 17, 20 and 21 are released only with T/R = '0', the T/R bit MIL 4.3.3.5.1.7 gives them; with T/R = '1' they are reserved mode codes (RT-MC-14): the data word 0x0000, no action. Mode codes 16, 18 and 19 with T/R = '0' receive their data word and do nothing else.
  • The indications (Rt_TimeSync, Rt_FrameSync with Rt_SyncData, Rt_ResetReq, Rt_SelfTestReq) are decoded from the registered release of the sequencer and come in its cycle; the other outputs of RT-3 are registered.

8. Timing budget

The status word must be presented Cfg_RespTime - 3H - txLatency - rxLatency cycles after the event of the last word, and the decision of the lookup must be complete then:

rtRespMin = max(8H (4.0 us), rxLatency + 3H + txLatency + rtDecision + 1) cycles.

ClkFreq_g SyncStages_g rxLatency rtDecision (MemLatency_g = 3) rtRespMin
16 MHz 2 29 12 68 cycles (4.25 us)
16 MHz 4 31 12 70 cycles (4.375 us)
100 MHz 2 159 12 400 cycles (4.0 us)
400 MHz 2 624 12 1600 cycles (4.0 us)

The response time at the bus is the time at the ports plus the receiver and transmitter delays of the transceiver (I11). The largest effective value of Cfg_RespTime is 24H (12.0 us).

Line activity check: after the last data word the line returns to zero 0.5 us after its reference crossing and Rx_Active falls 0.4 us later plus the filter delay of the decoder, well before the earliest presentation cycle (2.5 us after the reference crossing at rtRespMin). A contiguous word beyond the word count keeps the line active.

9. Address input (RT-5, o1553_rt_addr)

olo_intf_sync (Width_g = 6, SyncStages_g, SyncTmr_g = true) synchronises the straps. A validation, at the end of the reset (after the synchroniser delay) and on Cfg_AddrCheck, samples the six signals, checks odd parity and the address 31, and latches the address and the result. The sequencer uses only the latched address.

10. ECSS services (RT-6, o1553_rt_svc)

  • Frame number: 8-bit register, written by RT-3 from bits 7 to 0 of the data word of a valid mode code 17.
  • Health word: 16-bit register; Cfg_HealthSet sets bits, the sequencer clears the bits of word 0 of a valid receive message to subaddress 1 (captured while it is received) when the message is published.
  • Both are read by the buffer access for the substitutions of section 6.3.

11. Reset and fault tolerance

  • Every state machine has a when others branch to its idle state that is evaluated in every cycle (D15). All registers rely on the TMR of the synthesis tool; the address straps are synchronised with SyncTmr_g = true.
  • Double errors (D14): a lookup with a double error ends the decision with "status word only" and error code 10; a data word read with a double error is not presented, so the encoder ends the transmission after the word before it (underrun); both set BIT bit 4. Every double error of the buffer memory, also one read for a superseded message, sets BIT bit 4 through Ecc_DedEvent (section 6.2).
  • The RT has no memory of its own; the buffer memory and its ECC belong to o1553_host.