Skip to content

o1553_bc: Architecture and Design Description

1. Block diagram

Bus controller: role and configuration (top level), frame scheduler (BC-1), message sequencer with the profile
check and the time message rule (BC-2, BC-3) and memory jobs, with the word events and the transmit stream of the
codec, the memory port, the tick input, the frame start outputs and the configuration, state and event signals of
the host interface

The frame scheduler (BC-1) keeps the time of the BC: it counts microseconds from the start of frame 0, receives the tick, decides when each frame starts and when its latch window begins, and tells the sequencer which synchronization message to send and until when a message may end (the frame guard). The message sequencer (BC-2) sends the synchronization messages, takes the slots of the frame's message list in order, checks each message against the profile (with the time message rule of BC-3), waits for its start, sends its words, follows the response word by word and decides the result. For every memory access it hands a job to the memory jobs block, which owns the memory port, computes the addresses from the bus profile of section 4, runs the latch walk and writes the results, the status table and the event records. The top level holds the role state and the configuration taken at the start.

Block Entity Function
o1553_bc Top level: role state (section 9), start and stop, configuration taken at the start, events
o1553_bc_pkg Memory formats, result codes, the profile check function (section 7), timing functions
BC-1 o1553_bc_sched Microsecond time base, frame timing, tick input, latch window, frame start outputs, frame guard limit
BC-2, BC-3 o1553_bc_seq Message sequencer: synchronization messages, slots, profile check, timers, response validation, results
BC-2 o1553_bc_mem Memory jobs: latch walk, slot fetch, data words, publication, results, status table, event records

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 Bc_TimeTick
MemLatency_g positive 3 1 to 8 Cycles from the acceptance of a memory read to its response
AllowOpenProfile_g boolean false The open profile can be selected (BC-PC-01)

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
Fs_Clr 2 out One-cycle release of the fail-safe state per bus (Cmd_BcFsClr)
Stat_TxEn 2 in Transmitter enabled per bus (o1553_codec)
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
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)
Bc_TimeTick 1 in Tick of the on-board time master, asynchronous
Bc_FrameSync, Bc_FrameNum 1, 8 out Frame start pulse and frame number
ErrInj_RoleFlip 1 in Test input: invert RoleN (default '0')
Rt_MsgActive 1 in A message of the RT is in progress (Stat_MsgActive of o1553_rt); in the core also '1' while the BM is enabled or active, so that the start is refused (D27, o1553_core architecture section 3.1)
Cfg_*, Cmd_* section 3 in Configuration and commands from the register file
Stat_*, Ev_* section 3 out State and events for the register file and the interrupt flags

3. Configuration, commands, state and events

3.1 Configuration inputs

The register names are those of o1553_host (register map 0.2, host architecture section 3.3). The inputs marked "start" are taken when the BC starts and kept while it is active (BC-FR-09); the others act at once.

Input Width Register field Taken Reset value of the register Meaning
Cfg_RtEn 1 CONTROL.RT_EN at once 1 RT enabled; the BC starts only while it is '0'
Cfg_LogErrors 1 CONTROL.LOG_ERRORS at once 1 Records of messages with an error or not sent
Cfg_BcProfile 2 BC_CONTROL.PROFILE start "00" "00" ECSS, "01" MIL, "10" open (only with AllowOpenProfile_g), "11" ECSS
Cfg_BcTimeSync 1 BC_CONTROL.TIME_SYNC start 0 Frames with time synchronization
Cfg_BcTickSrc 1 BC_CONTROL.TICK_SRC start 0 Tick from Bc_TimeTick ('0') or Cmd_BcTick ('1')
Cfg_BcFrames 9 BC_FRAMES.N start 8 Frames per time synchronization cycle or per second, bounded to 1 (2) to 256
Cfg_BcFrameTime 20 BC_FRAME_TIME.D start 125000 Frame duration D in us, bounded to at least 2000
Cfg_BcTickTimeout 24 BC_TICK_TIMEOUT start 1010000 Time after a tick by which the next is missing, in us, bounded to at least D
Cfg_BcTsDelay 16 BC_TS_DELAY start 1000 Tick to time synchronization message, in us
Cfg_BcLatchTime 10 BC_LATCH_TIME start 200 Latch window in us, bounded to 20 to 1000
Cfg_BcTimeout 16 BC_TIMEOUT start 18.0 us in cycles No-response time-out in cycles, bounded to at least 28H (14.0 us)
Cfg_BcGap 16 BC_GAP start 4.0 us in cycles Intermessage gap in cycles, bounded to at least 8H (4.0 us)
Cfg_BcFrameTable 13 BC_TABLES.FRAME_TABLE start 0x0200 Word address of the frame table
Cfg_BcStatusTable 8 BC_TABLES.STATUS_TABLE start 0x0300 Word address of the status table, bits 12 to 5 (32-word aligned)
Cfg_BcRtBus 32 BC_RT_BUS at once 0 Bus per RT address ('1' = bus B); bit 31 for the synchronization messages and for broadcast messages whose control word selects this register
Cfg_BcFrameRsvd 8 BC_FRAME_RSVD at once 0 Bits 15 to 8 of the data word of the frame synchronization message

3.2 Commands

Input Register field Effect
Cmd_BcStart BC_COMMAND.START Start (BC-RO-01)
Cmd_BcStop BC_COMMAND.STOP Stop after the message in progress (BC-RO-03)
Cmd_BcTick BC_COMMAND.TICK Tick from the host (BC-TK-01)
Cmd_BcFsClr (2) BC_COMMAND.FS_CLR Release the fail-safe state of bus A (bit 0) or B (bit 1) (BC-FT-04)

3.3 State outputs and events

Output Width Meaning
Stat_BcActive 1 The BC is active (BC-RO-01); the core holds the RT disabled while it is '1'
Stat_BcState 2 "00" inactive, "01" waiting for the first frame, "10" running, "11" stopping
Stat_BcFrameNum 8 Frame number of the current frame
Stat_BcFrameCount 16 Frames since the start, modulo 65536
Ev_BcFrame 1 Frame start (with Bc_FrameSync)
Ev_BcBusy 1 A status word with the busy bit
Ev_BcNotSent 1 A message was not sent (frame guard, refused, line busy, transmitter, memory)
Ev_BcLate 1 A frame, a time synchronization message or a timed slot started late
Ev_BcTickMissing, Ev_BcTickEarly 1, 1 BC-TK-04, BC-TK-05
Ev_BcListEnd 1 A list without a last flag ended after 256 slots
Ev_BcStopped, Ev_BcStartRefused, Ev_BcRoleErr 1 each BC-RO-01, BC-RO-03, BC-RO-04, BC-RV-07

4. Bus profile in the buffer memory

4.1 Memory use

The BC uses the 8192 words of the buffer memory except the event log (0x0800 to 0x0FFF, D10) as the host places its bus profile: the frame table, the status table and the descriptors at fixed alignments, the message lists and the data buffers anywhere. While the core is a BC, the regions of the RT (descriptors, tables, subaddress buffers) are free; a core that runs as RT and prepares its BC role uses the reserved region 0x0200 to 0x07FF and the buffers of subaddresses that its RT does not use. The BC reads and writes only what the bus profile points to.

Structure Size Alignment Writer
Frame table N words none host
Message list 2 words per slot, at most 256 slots none host
Descriptor 16 words 16 words host (words 0 to 7), BC (words 8 to 15)
Data buffers of a descriptor 2 x n words none host (transmit), BC (receive)
Status table 32 words 32 words BC

Example: 100 descriptors with 16 data words each take 1600 + 3200 words; with lists of 10 slots for 8 frames (160 words), the frame table and the status table, 4992 of the 6144 words are used.

4.2 Frame table entry

Bits Content
12 to 0 Word address of the message list
14, 13 '0'
15 Valid: '0' = the frame has no messages

4.3 Slot

Word Bits Content
0 8 to 0 Descriptor index: the descriptor is at word address index x 16
0 12 to 9 Start time, bits 19 to 16
0 13 '0'
0 14 Timed: the start time applies
0 15 Last slot of the list
1 15 to 0 Start time, bits 15 to 0, in us after the frame start

4.4 Descriptor

Word Writer Content
0: control word host 1, 0: bus ("00" A, "01" B, "10" and "11" the bus of Cfg_BcRtBus for the RT address of command word 1); 2: RT to RT; 3: selected transmit buffer; 4: event record enable; 5: interrupt enable; 6: service request condition; 7: on demand; 11 to 8: request count; 15 to 12: '0'
1 host Command word 1 (the receive command of an RT to RT transfer)
2 host Command word 2 of an RT to RT transfer (the transmit command), or the data word of a receive mode command
3 host 12 to 0: word address of the data buffers
4 to 7 host Reserved, '0' (data block transfer, phase d)
8: result BC 3 to 0: result code (section 4.7); 4: bus used ('1' = B); 5: exception (BC-RV-04); 6: buffer (receive: published, transmit: sent); 12 to 7: data words transferred, 0 to 32; 13: started late; 14: not sent; 15: '0'
9 BC Status word of the RT of command word 1, or of the transmitting RT of an RT to RT transfer; 0 when none was received
10 BC Status word of the receiving RT of an RT to RT transfer, otherwise 0
11 BC Message count: messages without an error, modulo 65536
12 BC Frame count of the last execution (Stat_BcFrameCount)
13: latch word BC 0: latched transmit buffer; 4 to 1: latched request count; 5: double error in the control word at the latch; 15 to 6: '0'
14 BC 3 to 0: done count of an on-demand slot; 15 to 4: '0'
15 none Reserved

The data buffers: buffer b starts at the address in word 3 plus b x n, n the word count of the message (32 for word count 0, 1 for a mode command with a data word). A BC to RT message (also in broadcast) sends from the latched buffer; a message that receives data words (RT to BC, the data word of a transmit mode command, the data words that the BC observes in an RT to RT transfer) writes the buffer that word 8 bit 6 does not name and publishes it (BC-DX-02). The single writer rule of D9 holds: the host writes words 0 to 7 and the transmit buffers, the BC words 8 to 15 and the receive buffers.

4.5 Status table

Word r (r = 0 to 30) holds the last valid status word received from RT r in a message of the BC; word 31 is not written. The BC writes it at the end of the message, before it evaluates the condition of the next slot; for a next slot to the same RT it uses the status word of the message just ended directly (section 6.4).

4.6 Event record

Word Content
0 Command word 1
1 Status word (descriptor word 9)
2 3 to 0: result code; 4: bus ('1' = B); 5: broadcast; 6: exception; 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 (sent or received); the status word of the receiving RT of an RT to RT transfer; otherwise 0
4 Command word 2 of an RT to RT transfer, otherwise 0
5, 6 Time tag at the presentation of the command word, low and high half
7 7 to 0: frame number; 8: started late; 9: not sent; 14 to 10: '0'; 15: '1' (record of the BC; records of the RT have 0)

4.7 Result codes

Code Meaning Code Meaning
0 None 8 Transmitter not available (not enabled, underrun, abort)
1 No response 9 Memory double error
2 Invalid word in the response 10 Not sent: frame guard
3 Sync type (status with data sync, data with command sync) 11 Not sent: refused by the profile check
4 Status word of another RT address 12 Not sent: line busy
5 Data word not contiguous 13 Reserved
6 Word count too low 14 Not published: double error in the message count
7 Word count too high 15 Reserved

The number of no-response results of the descriptors of one SetData or GetData identifier is NbNoResp of ECSS 7.3.2a and 7.4.2a; the OR of their status words (word 9, and word 10 for RT to RT) is its Status (I24).

5. Frame scheduler (BC-1, o1553_bc_sched)

5.1 Time base

The scheduler has its own microsecond prescaler (ClkFreq_g / 1 MHz cycles, an integer by D1) and a microsecond counter of the frame cycle. Both restart in the cycle in which frame 0 is presented (with time synchronization) or in which the first frame is presented (without). All frame starts, latch windows and timed slots are therefore whole microseconds after the presentation of the first synchronization message of the cycle, exact to the clock cycle; the host time base (D18) is used only for the time tags of the records.

5.2 Frame timing

   tick              frame 0 (MC1)        frame 1 (MC17)                    frame N-1        next tick
    |<- TsDelay ->|<--------- D -------->|<--------- D -------->|  ...  |<--- rest --->|
                  |  slots ... | latch  ||  slots ... | latch  ||       |  slots ...  ||
                                window                window             ends at the tick
  • Nominal start of frame k: T0 + k x D us, T0 the presentation of frame 0 (or of the first frame). The frame start signal (Bc_FrameSync, Ev_BcFrame) comes in the cycle in which the sequencer presents the command word of the synchronization message to the encoder; the encoder is idle then, so its sync starts txLatency cycles later (BC-FR-06).
  • Latch window of frame k: from Cfg_BcLatchTime us before the nominal start of frame k + 1. At its start the scheduler asks the memory jobs block for the latch walk of frame k + 1 (section 8.2); the frame guard ends the messages of frame k there.
  • The last frame of a time synchronization cycle has no nominal end: it ends at the tick, or Cfg_BcTickTimeout us after the previous tick (not earlier than D after its own start) when the tick is missing; its frame guard uses that latest end less the latch time.
  • A frame starts late when the latch walk is not complete at its nominal start or the line of the bus of the synchronization message is active: the scheduler then presents the frame start with the sequencer as soon as both allow, gives Ev_BcLate and keeps the nominal grid for the next frames. When the line is still active at the start of the latch window of that frame, the frame is skipped: no synchronization message, no slots, Ev_BcLate. The latch walk of the frame after it starts in that latch window as for any other frame.
  • A frame also starts late when its start is due while the sequencer decides a slot of the list before that is not sent (frame guard, from the start of the latch window or from a tick on). The sequencer ends that decision and takes the frame start in Idle_s. At worst the request meets Fetch_s in the cycle in which the slot is fetched; the slot then passes Wait_s and End_s, so the frame start comes at most 3 cycles late, with Ev_BcLate (the scheduler counts the cycles from the due frame to Fs_Go). A slot still being fetched is dropped, and the slots after it are not executed.

5.3 Tick

olo_intf_sync (Width_g = 1, SyncStages_g, SyncTmr_g = true) synchronises Bc_TimeTick; a register after it detects the rising edge (a '1' after at least two cycles of '0'). With Cfg_BcTickSrc = '1' Cmd_BcTick is the tick. Bc_FrameSync of frame 0 comes Cfg_BcTsDelay us and a constant number of cycles after the first clock edge at which the tick is '1': SyncStages_g + 5 cycles from Bc_TimeTick, 4 cycles from Cmd_BcTick, when the latch walk of frame 0 and the message in progress are complete by then (otherwise the frame starts late).

Situation Behaviour
Tick in a frame of the cycle at index N-1 or later No new message starts (the sequencer ends the slot in progress); latch walk of frame 0 at once; frame 0 presented Cfg_BcTsDelay us after the tick (cycle counter), or after the message in progress and the gap with Ev_BcLate
Tick in a frame with index below N-1 As above, Ev_BcTickEarly (cycle cut)
Tick between a tick and the presentation of its frame 0 Ignored, Ev_BcTickEarly
No tick within Cfg_BcTickTimeout us of the previous one Ev_BcTickMissing; the last frame ends then (not earlier than D after its start); frames continue every D, frame numbers counting on (BC-FR-03), frame index modulo N
Before the first tick after the start Frames from number 1 every D, index = number modulo N; no Ev_BcTickMissing

5.4 Frame number, index and count

Mode Frame number Frame index
Without time synchronization 0 to N-1, modulo N, from 0 = frame number
With time synchronization 0 at frame 0, then +1 per frame, modulo 256 Frames since the last frame 0 (since the start: + 1), modulo N

Stat_BcFrameCount counts every frame start from the start command, modulo 65536; the descriptors record it (word 12).

5.5 Frame guard limit

The scheduler gives the sequencer the remaining clock cycles to the start of the latch window of the current frame (30 bits, saturating at 2^30 - 1: the last frame of a synchronized cycle ends up to Cfg_BcTickTimeout = 2^24 - 1 us after the tick, more than 2^30 cycles above 64 MHz), and '0' from a tick on. The sequencer compares the worst-case duration of a message (section 6.5) with it before it presents the command word.

6. Message sequencer (BC-2, o1553_bc_seq)

6.1 State machine

Message sequencer: Idle_s, Sync_s, Fetch_s, Wait_s, Send_s, Status_s, Data_s, Status2_s, Check_s,
End_s

State Meaning Leaves on
Idle_s No message; the BC inactive, between frames or after the last slot Frame start request: Sync_s; next slot of the frame: Fetch_s
Sync_s Frame or time synchronization message: wait for the idle line and the gap, present the command word (and the data word of mode code 17) Tx_Done: Idle_s (next slot)
Fetch_s The memory jobs block reads the slot, the descriptor words 0 to 3, 13 and 14, the status table entry for the condition and, for a time message, data word 0; the profile check (section 7) and the condition decide Skip: Idle_s; not sent: End_s; execute: Wait_s; a frame start or a stop before the slot is decided: Idle_s, the slot dropped
Wait_s Wait for the latest of: the gap after the last word, the timed start, the idle line; the frame guard is checked in every cycle Start: Send_s; frame guard or line busy: End_s (not sent)
Send_s Command word(s) and data words to the encoder; transmit data read one word ahead Tx_Done: broadcast without response: Check_s; otherwise Status_s
Status_s Status word of the RT (of the transmitting RT for RT to RT) expected Status word: by format Data_s, Status2_s or Check_s; error or time-out: End_s after the idle line
Data_s Data word k of n of the response expected Last word: Status2_s (RT to RT) or Check_s; error: End_s after the idle line
Status2_s RT to RT: status word of the receiving RT expected Status word: Check_s; error or time-out: End_s
Check_s Line activity 2.0 us after the reference crossing of the last word (word count too high) End_s
End_s Result, status table, publication and record jobs; the next slot is fetched meanwhile Idle_s

A stop command ends the BC in Idle_s, after End_s of the message in progress, once the results job of the last message is idle. A role error (section 9) leaves any state for Idle_s in the same cycle with Tx_Abort. The when others branch leads to Idle_s (D15).

6.2 Words of a message

Format BC sends Expected (on the bus of the message)
BC to RT Command word 1, n data words Status word
RT to BC Command word 1 Status word, n data words
RT to RT Command word 1, command word 2 Status word (transmitting RT), n data words, status word (receiving RT)
Mode, no data word Command word Status word
Mode, transmit data word Command word Status word, 1 data word
Mode, receive data word Command word, word 2 Status word
Broadcast receive Command word, n data words none
Broadcast RT to RT Command word 1, command word 2 Status word (transmitting RT), n data words
Broadcast mode Command word (and word 2 for a receive data word) none

The format follows from command word 1 (address, T/R bit, subaddress 0 or 31 = mode, word count or mode code) and the RT to RT bit of the control word. In the open profile a combination that MIL defines no format for is sent by these rules as well (a broadcast transmit command expects nothing, a mode code 16 to 31 with T/R = '0' sends word 2, a mode command with the RT to RT bit is the mode command alone).

6.3 Timers

All timers count clock cycles and end their wait at or beyond the limit (BC-FT-03).

Timer Start Limit Action
Gap Reference crossing of the last word of the previous message Cfg_BcGap - 3H - txLatency cycles to the presentation Earliest presentation
Response Reference crossing of the last word the BC sent (or of the last data word, for Status2_s) Cfg_BcTimeout + SyncStages_g + F + 2: no rising edge of the line activity since the state was entered and the line idle (no word started by the time-out): no response; Cfg_BcTimeout + 36H + rxLatency + 2: no word event: no response Result code 1
Word Event of the previous word of the response 42H Word count too low
Check Reference crossing of the last word 4H (2.0 us) Line active: word count too high

The reference crossing of a word the BC sent is txLatency + (40k + 39)H cycles after the acceptance of the first word of the transmission, k the position of the word in it; that of a received word is its event less rxLatency. A status word is in time when its mid-sync crossing, its reference crossing less 36H, is at most Cfg_BcTimeout after the reference crossing the response timer started from. The early decision needs both conditions: a word whose end has already dropped the line activity before its event comes is not taken for a missing response. After a no-response or an error the sequencer waits until the line of the bus has been idle, and the gap counts from the last reference crossing it saw; this wait is part of Wait_s of the next message and bounded by its frame guard.

Every command, also the first one of a frame, needs the line of its bus idle for at least F + 2H - ceil(0.8H) + 2 cycles. The line activity falls H + ceil(0.8H) + SyncStages_g + 2 cycles after the reference crossing of the last word on the line (0.4 us of zero line after its end), and the word event comes at most rxLatency + 1 cycles after that reference crossing, so the idle time ends two cycles after the latest event of the word, and the event has restarted the gap. The gap therefore counts from that word, also when it ended a response the sequencer had already given up.

6.4 Slot decisions

Check Source Outcome
Double error in the slot Memory jobs No descriptor known: nothing written, no further slot in the frame, Ev_BcNotSent
Double error in the control word, a command word, the buffer address, the result word, the latch word, the done count, the status table entry or data word 0 of a time message Memory jobs Not sent, code 9
On demand, latched request count = done count Words 13, 14 Skipped
Service request condition, the last status word of the RT without the service request bit Status table or the status word of the message just ended Skipped
Profile check (section 7) Command words, control word, frame index, time since frame 0, data word 0 of a time message Not sent, code 11
Transmitter of the bus not enabled (Stat_TxEn) Codec Not sent, code 8
Frame guard Section 6.5 Not sent, code 10

A skipped slot writes nothing; a slot not sent writes its result word (bit 14), word 12 and, when enabled, a record.

6.5 Worst-case duration

From the presentation of the command word to the earliest presentation of the next one, in cycles:

txLatency + 40H x w_bc + r x (Cfg_BcTimeout + 37H) + 40H x w_rt + Cfg_BcGap

with w_bc the words the BC sends, w_rt the data words the RTs send and r the number of status words expected (0, 1 or 2). A status word that ends 37H after its mid-sync crossing at the latest time-out bounds each response.

7. Profile check (o1553_bc_pkg)

A function of command word 1, command word 2, the control word, the profile, the frame index, the time since frame 0 and data word 0 of a time message decides whether a message may be sent. The profile is the latched Cfg_BcProfile, mapped as BC-PC-01: with AllowOpenProfile_g = false the value "10" is the ECSS profile.

Rule ECSS MIL Open
Reserved mode codes (9 to 15, 22 to 31) refused refused sent
Mode code with a T/R bit that MIL Table I does not give it (0 to 16, 18, 19 with T/R = '0'; 17, 20, 21 with T/R = '1') refused refused sent
Broadcast mode code that MIL Table I does not allow in broadcast (0, 2, 16, 18, 19) refused refused sent
Mode codes 0, 3, 19, 20, 21 refused sent sent
Mode code 16 without the service request condition refused sent sent
Mode command on subaddress 0 refused sent sent
Data message to subaddress 0 or 8 (subaddress 0 only as RT to RT receive side, since a subaddress 0 command is a mode command) refused sent sent
RT to RT transfer refused sent sent
RT to RT transfer with command word 1 a transmit command, command word 2 a receive command or a command to subaddress 0 or 31, or both command words to the same RT (MIL 4.3.3.6.3) refused refused sent
RT to RT bit with a mode command in command word 1 (no format of MIL 4.3.3.6.3) refused refused sent as the mode command
Broadcast data message (not a mode command) other than a receive message to subaddress 29 refused refused, also subaddress 29 sent
Transmit command with the broadcast address (command word 1, or command word 2 of an RT to RT transfer) refused refused sent
Time message (receive, subaddress 29) with time synchronization: frame index above N-2, or less than 10 ms after the start of frame 0 refused sent sent
Time message: data word 0 of the latched transmit buffer with bits 15 to 8 not zero, or word count other than 3 + ceil(f / 2) refused sent sent

8. Memory jobs (BC-2, o1553_bc_mem)

8.1 Jobs

The sequencer and the scheduler give jobs to the memory jobs block; it serves them in this priority: data word, fetch, latch walk, results and publication, status table, event record. Only one fetch and one data word access can be pending at a time.

Job Accesses Result
Fetch Read the slot (2 words); the descriptor words 0 to 3, 11, 13, 14; for the service request condition the status table entry; for a time message data word 0 of the latched buffer Words, double error flag
Data read Read data word k of the latched transmit buffer, one word ahead of the encoder Data word, double error flag
Data write Write received data word k into the buffer that is not published
Publication and results Write words 8, 9, 10, the message count + 1 (read at the fetch; a double error in that read leaves the buffer unpublished, code 14), word 12, and word 14 of an on-demand slot, in this order
Status table Write word r with the status word of RT r
Record Write the 8 words of the event record at Log_WrIdx, then Log_Push
Latch walk Section 8.2 Walk complete, list end missing

The result, status table and record jobs take their data from a register set that the sequencer fills in End_s, so that the next message can start while they are written.

Read responses come back in the order of the reads; a queue of tags (up to 15 reads in flight) gives each response its destination. When the BC becomes inactive (BC-RO-02) every tag of the queue becomes stale and the count of reads in flight stays: their responses still return to the port of the BC and are dropped, with no memory write, record, event or word following, also when the BC starts again before they have returned, since the stale tags stay ahead of the tags of the new reads. A tag is counted when its read is presented; a read that the memory has not taken when the BC becomes inactive is withdrawn and never returns, so its tag leaves the count.

8.2 Latch walk

At the start of the latch window (frame 0: at the tick) the block reads the frame table entry of the next frame and, slot by slot, word 0 of the slot and the control word of its descriptor, and writes the latch word (word 13): the selected transmit buffer and the request count, or bit 5 for a double error in the control word. It ends at the slot with the last flag or after 256 slots (Ev_BcListEnd); a double error in the frame table entry or in a slot ends it, and the fetch of that slot later finds the error again. The reads of consecutive slots overlap: up to eight slot words are read ahead, and two control words and latch words together are in progress at a time (a queue of two latch words), which hides MemLatency_g up to 8. A slot takes three requests (slot word, control word, latch word), at most six cycles with a wait cycle on each request, so that 256 slots take at most 1536 cycles plus the latency of the first reads (about 3 x (MemLatency_g + 3) cycles), less than 100 us at 16 MHz and 16 us at 100 MHz. The reset value of Cfg_BcLatchTime (200 us) covers a list of 256 slots at every clock frequency.

9. Role state (o1553_bc)

The role is held as Role and RoleN (BC-RO-01, BC-RO-04):

Role, RoleN State Next cycle
'0', '1' Inactive (reset value) Cmd_BcStart with Cfg_RtEn = '0', Rt_MsgActive = '0' and Mem_InitDone = '1': '1', '0'
'1', '0' Active Stop (BC-RO-03), control passed (BC-RV-07): '0', '1'
'0', '0' or '1', '1' Not complementary: inactive at once, Tx_Abort, Ev_BcRoleErr '0', '1'

Stat_BcActive is Role and not RoleN, decoded combinationally; every block of the BC and the role mux of the core use it. In a cycle with ErrInj_RoleFlip = '1' RoleN is inverted in the register. The start command latches the configuration inputs marked "start" in section 3.1 in the same cycle.

10. Timing budget

Interval Budget at 16 MHz (H = 8)
Last word event of a response to the word count check (4H after its reference crossing) 4H - rxLatency = 3 cycles (SyncStages_g = 2) and 1 cycle (SyncStages_g = 4)
Word count check to the earliest presentation of the next command (Cfg_BcGap = 8H) H - txLatency = 6 cycles; the next slot is fetched during the message, so only the presentation is left
Event of the status word to the decision of a next slot to the same RT with the service request condition The status word of the message is used directly, no memory read
Latch walk of 256 slots 1536 cycles + about 3 x (MemLatency_g + 3) (section 8.2)

The worst case is the RT to BC message whose last data word ends the message: its event comes rxLatency after its reference crossing, the word count check 4H after it, and the next command at the gap. The sequencer fetches the next slot while it waits for the response, so the decision is complete long before.

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, except the role state, which is protected by its complement (section 9); the tick input is synchronised with SyncTmr_g = true.
  • Double errors (D14): a double error in the frame table leaves the frame without messages, one in a slot ends the messages of the frame at that slot, one in a descriptor leaves the slot without its message (code 9); a transmit data word read with a double error is not presented, so the encoder ends the transmission after the word before it (underrun) and the result is code 9.
  • Every wait is bounded (specification, section 3); the timers compare with >= (BC-FT-03).
  • The flag FtDrop of the sequencer marks a fetch in flight that belongs to the list before a frame start: it is set at the frame start only while a fetch is in flight and cleared when that fetch ends, so a dropped fetch is never the one the sequencer waits for. An upset of the flag can drop that fetch; the sequencer then waits in Fetch_s until the next frame start or a stop, which leave Fetch_s whatever the fetch: the frame loses its remaining slots, and the next frame runs normally.
  • An upset of FtBusy that the TMR does not mask (the flag stuck at '1' without a fetch in flight) is not recovered by the BC: Idle_s starts no fetch, so the frames go on with their synchronization messages but without slots, until a stop or a role error clears the flag. The user guide (section 7) gives the detection and the recovery by the host; a bounded wait for the fetch is a hardening candidate of the roadmap.
  • The BC has no memory of its own; the buffer memory and its ECC belong to o1553_host.