Skip to content

o1553_bm: Specification

1. Overview

o1553_bm is the bus monitor of Open1553 (architecture block BM-1). It receives the traffic of both buses of the dual-redundant bus, reconstructs every message from the words and their timing, and writes one record per message, per word outside a message and per line activity without a word into a ring in the buffer memory, from where the host reads them. A filter table selects the messages it records. It never transmits: it runs alone, so that the core answers no command, or beside the remote terminal, which then answers only the commands to its own address.

Block Function
BM-1 Bus monitor: message reconstruction on both buses, records, ring in the buffer memory, filter table, events

The module connects to o1553_codec (word events and the events of line activity without a word), to the buffer memory of o1553_host (memory port) and to its register file (configuration inputs, state outputs, events). The core includes it with IncludeBm_g and keeps it inactive while the BC role is active (core architecture D27). All blocks run in Clk. Clause references: MIL = MIL-STD-1553B (Notice 2), ECSS = ECSS-E-ST-50-13C. The architecture decisions (D) and interpretations (I) are those of the core architecture, section 6.

Terms used below:

  • Word event: a word reported by a decoder of o1553_codec (Rx_Valid) with its bus, sync type, 16 data bits, validation result, contiguous flag, gap and own flag. Its reference crossing is the mid-bit zero crossing of its parity bit; the event comes rxLatency clock cycles after it (o1553_codec CD-DE-08).
  • Gap of a word: Rx_Gap, the time from the reference crossing of the previous valid word on the same bus to the mid-sync crossing of the word, in clock cycles (o1553_codec CD-DE-09). For a status word it is the response time of MIL 4.3.3.8, measured at the core ports (I11).
  • Half bit: 0.5 us, H = ClkFreq_g / 2 MHz clock cycles; a word lasts 40H cycles.
  • Message: the words of one command on one bus, from command word 1 to the last word of its response, as MIL 4.3.3.6 defines them for each format.
  • Record: what the BM writes into the ring for a message, for a word outside a message or for line activity without a word (architecture section 4).
  • The configuration inputs Cfg_Bm* are register fields of o1553_host; architecture section 3 lists them.

2. Requirements

2.1 Interfaces

ID Requirement Clauses
BM-IF-01 The BM shall take the word events of both buses from o1553_codec (Rx_Valid, Rx_Sync, Rx_Data, Rx_Error, Rx_Contig, Rx_Gap, Rx_Own) and the events of line activity without a word with their duration (Rx_NoWord, Rx_NoWordLen, o1553_codec CD-DE-14). MIL 4.4.4, 4.6.3
BM-IF-02 The BM shall have no output to the encoder, to the bus selector or to the fail-safe timers of o1553_codec, and no output to o1553_rt. MIL 4.4.4
BM-IF-03 The BM shall access the buffer memory through one memory port: requests as a valid / ready stream of 13-bit word address, write flag and 16 data bits; for every read one response, in the order of the requests, with the data and the double error flag of the ECC. It shall make no request before Mem_InitDone. none
BM-IF-04 The BM shall take its configuration as levels from the register file, and present its state as levels and its events as one-cycle pulses (architecture section 3). none
BM-IF-05 The BM shall take the 32-bit time tag (Time_Tag) of the core time base for its records. none
BM-IF-06 The BM shall take whether the BC is active (Stat_BcActive) for BM-EN-01. MIL 4.4.4
BM-IF-07 The BM shall have the error injection ports of its message buffer (ErrInj_BitFlip, ErrInj_Valid, semantics of olo_ft_ram_sdp), inactive by default. none

2.2 Enable

ID Requirement Clauses
BM-EN-01 The BM shall be active (Stat_BmActive) while Cfg_BmEn = '1', the BC is not active and the buffer memory is initialised. When it becomes active it shall take Cfg_BmTimeout, Cfg_BmRingBase, Cfg_BmRingSize, Cfg_BmFilterBase and the control bits Cfg_BmFilter, Cfg_BmOutside and Cfg_BmActivity, and keep them while it is active; the write index and the sequence number shall start at 0. MIL 4.4.4
BM-EN-02 While the BM is not active it shall make no memory request, write no record and give no event, and its state machines shall be in their idle state. none
BM-EN-03 When the BM becomes inactive it shall write no further record: messages in progress and records not yet written shall be discarded, and a record whose writing is in progress shall not be completed (the write index does not advance over it). The write index and the lost count shall keep their values until the BM becomes active again. none

2.3 Message reconstruction

ID Requirement Clauses
BM-MR-01 The BM shall reconstruct the messages of each bus from the word events of that bus alone, independently of the other bus (BM-MR-09 excepted). A valid word with command sync while no message of the bus is in progress shall begin a message as its command word 1, with the time tag of its word event. MIL 4.4.4, 4.6.3
BM-MR-02 From command word 1 the BM shall expect the words of its format: BC to RT, RT to BC, mode command without data word, with a transmitted or a received data word, and their broadcast forms. A receive command word 1 that is not a mode command, followed by a valid contiguous word with command sync and T/R = '1', shall be an RT to RT transfer (broadcast when command word 1 has address 31) with that word as command word 2. MIL 4.3.3.6.1 to 4.3.3.6.7
BM-MR-03 Where a data word of the BC is expected (after the command words) the BM shall take a valid contiguous word with data sync as that data word. MIL 4.3.3.6, 4.4.1.2
BM-MR-04 Where a status word is expected, the BM shall take the next valid word with command sync whose gap is at most Cfg_BmTimeout as the status word, and its gap as the response time. When the next word event of the bus has a larger gap, or when no word event comes within Cfg_BmTimeout + 36H + rxLatency + 2 cycles after the word event of the last word before the status word, the message shall end with the flag "no response". MIL 4.3.3.8, 4.3.3.9
BM-MR-05 A status word whose RT address is not that of its command (command word 2 for the status word of the transmitting RT of an RT to RT transfer, command word 1 otherwise) shall be taken as the status word with the flag "status address". MIL 4.3.3.5.3.2
BM-MR-06 After a status word the BM shall take the data words of the RT as BM-MR-03 states. A status word with the message error bit or the busy bit set followed by no data word shall end the message without a flag (I25); otherwise fewer data words than the format expects shall give the flag "word count low". MIL 4.3.3.5.3.3, 4.3.3.5.3.8, 4.3.3.6
BM-MR-07 After the last word that the format expects, a valid contiguous word with data sync shall give the flag "word count high" and be taken as a data word; the message shall end at the next word event that is not such a word, or when no word event comes within 40H + rxLatency + 2 cycles after the last word event of the message. MIL 4.3.3.6, 4.4.1.2
BM-MR-08 Where a word of the message is expected, an invalid word (CD-DE-07) shall end the message with the flag "invalid word", its error class and its position in the message; a valid word with the wrong sync type (data sync where a status word is expected, command sync where a data word is expected) shall end it with the flag "sync"; a valid data word that is not contiguous where a contiguous word is expected shall end it with the flag "gap". These flags come with "word count low" where data words are missing. The word that ends the message shall then be taken as a word with no message in progress (BM-MR-01, BM-MR-10). MIL 4.4.1.1, 4.4.1.2
BM-MR-09 A command word 1 on one bus while a message of the other bus is in progress shall give that message the flag "superseded"; that message shall continue to its own end. MIL 4.6.3.2
BM-MR-10 A word event while no message of the bus is in progress that does not begin a message (a valid word with data sync, or an invalid word) shall be a word outside a message. MIL 4.4.4
BM-MR-11 A message shall have the flag "own" when one of its words has the own-transmission flag (Rx_Own). MIL 4.4.4
BM-MR-12 The BM shall store at most 32 data words of a message; further data words shall be counted in the flags only (BM-MR-07). none

2.4 Records

ID Requirement Clauses
BM-RC-01 At the end of each message the BM shall complete a message record: a header of 12 words (record type, bus, number of data words, sequence number, flags, error class and position of an invalid word, command words 1 and 2, status words 1 and 2, the response time of each status word in clock cycles, 16 bits saturating, the 32-bit time tag) followed by the data words of the message in their order on the bus, the mode data word included (architecture section 4.2). Words of the header that the message does not have shall be 0. MIL 4.4.4
BM-RC-02 With Cfg_BmOutside = '1', the BM shall complete a word record of 6 words for each word outside a message: record type, bus, sync type, error class, own and contiguous flags, sequence number, the 16 data bits, its gap and the time tag of its word event (architecture section 4.3). With Cfg_BmOutside = '0' such words shall not be recorded. MIL 4.4.4
BM-RC-03 With Cfg_BmActivity = '1', the BM shall complete an activity record of 6 words for each event of line activity without a word: record type, bus, sequence number, the duration (Rx_NoWordLen) and the time tag of the event (architecture section 4.4). With Cfg_BmActivity = '0' such events shall not be recorded. MIL 4.4.4
BM-RC-04 The sequence number shall count, modulo 2^16, every record that the BM offers to the ring and does not discard by the filter, whether the ring takes it or not (a record lost for want of a slot, BM-RG-05, takes none); each record shall carry its number, so that a record lost for want of ring space shows as a gap in the numbers. none
BM-RC-05 Records shall be written into the ring in the order in which they are completed, each in consecutive ring words. none

2.5 Ring

ID Requirement Clauses
BM-RG-01 The ring shall be the S words from Cfg_BmRingBase (S = Cfg_BmRingSize, 64 to 8192 words); ring word i is memory word Cfg_BmRingBase + i modulo 8192. A record shall be written at ring words w to w + L - 1 modulo S (w the write index, L its length), so that a record may wrap around the end of the ring. none
BM-RG-02 The write index (Stat_BmWrIdx) shall advance by L modulo S only after every word of the record has been written. none
BM-RG-03 The host shall keep its read index in Cfg_BmRdIdx, which acts at once. A record shall be written only when it fits: L <= S - 1 - ((w - Cfg_BmRdIdx) modulo S). A record that does not fit shall not be written: the lost count (Stat_BmLost, 16 bits, saturating, cleared by the host) shall count it and the event "overflow" shall be given. none
BM-RG-04 The BM shall write only ring words and shall read only words of the filter table. none
BM-RG-05 The BM shall hold up to four records per bus, from the beginning of a record until it is written. A record that begins while four records of its bus are held, and a line activity without a word that comes while the one before it on its bus is not yet recorded, shall be lost: the lost count shall count it and the event "overflow" shall be given; it takes no sequence number. With at most one message record, one word record and one activity record per bus and word time no record shall be lost this way, at every clock frequency (architecture section 7). none

2.6 Filter

ID Requirement Clauses
BM-FI-01 The filter table at Cfg_BmFilterBase (256 words, the base a multiple of 256) shall have a record bit and an interrupt bit per RT address, T/R bit and subaddress (architecture section 4.5); the mode commands of an RT use the bits of subaddresses 0 and 31. MIL 4.4.4
BM-FI-02 With Cfg_BmFilter = '1', a message record shall be completed only when the record bit of command word 1 is set or, for an RT to RT transfer, that of command word 2; otherwise the message shall be discarded without a sequence number. With Cfg_BmFilter = '0' every message shall be recorded. Word and activity records shall not be filtered. MIL 4.4.4
BM-FI-03 With Cfg_BmFilter = '1', a message record written into the ring whose interrupt bit (of command word 1 or, for an RT to RT transfer, of command word 2) is set shall give the event "record". none
BM-FI-04 A bit of the filter table read with a double error shall be taken as '1', and the message record shall have the flag "filter error". none

2.7 Events

ID Requirement Clauses
BM-EV-01 The BM shall give one-cycle events: "record" (BM-FI-03), "overflow" (BM-RG-03, BM-RG-05) and "level" for each record written into the ring after which the number of unread words, (w - Cfg_BmRdIdx) modulo S, is at least Cfg_BmIrqLevel. none

2.8 Fault tolerance and bounded waits

ID Requirement Clauses
BM-FT-01 Every state machine of the BM shall return to its idle state from an illegal state, and the reset shall bring every register to its reset value. none
BM-FT-02 Every wait of the BM shall have the bound of section 3, and every timer shall end its wait at or beyond its limit (>=). none
BM-FT-03 The records shall be held in a message buffer with single error correction and double error detection (olo_ft_ram_sdp); a double error in a word read from it shall write that word as read and mark the record: the flag "buffer error" of a message record, bit 6 of word 0 of a word or activity record. none
BM-FT-04 The BM shall not depend on the other protocol engine: its memory requests shall wait at most for the requests of the RT and the host (D8), and no state of the BM shall hold back the RT, the codec or the host. MIL 4.4.4

2.9 Configuration

ID Requirement Clauses
BM-CF-01 ClkFreq_g and SyncStages_g shall be those of the codec; the BM shall stop the elaboration for a ClkFreq_g that the codec does not accept. none
BM-CF-02 MemLatency_g (1 to 8) shall be the latency of the memory port in clock cycles from the acceptance of a read to its response. none
BM-CF-03 Cfg_BmTimeout shall be bounded to at least 28H (14.0 us); the BM shall use the bound for a smaller value. Cfg_BmRingSize shall be bounded to 64 to 8192 words. MIL 4.3.3.9

3. Waits and counters

Wait or counter Start End Bound
Response window Word event of the last word before an expected status word Status word event, or the end of BM-MR-04 Cfg_BmTimeout + 36H + rxLatency + 2 cycles; Cfg_BmTimeout < 2^16 cycles
Next contiguous word Word event of a word of the message The next word event, or 40H + rxLatency + 2 cycles 40H + rxLatency + 2 cycles
Message Command word 1 The end of the message The words of its format (at most 36 words of 40H cycles, and the words of BM-MR-07 while they come contiguously) and at most two response windows
Record writing End of a message, word outside a message or activity event Write index advanced, or the record discarded 44 memory writes, each waiting at most for the RT and the host (D8); architecture section 7
Records waiting to be written Completion of a record Its writing Four per bus (BM-RG-05); the writer empties them faster than the traffic of BM-RG-05 fills them (architecture section 7)
Filter reads A message record taken by the writer Their responses Two reads, four for an RT to RT transfer, each MemLatency_g plus the waits of D8
Lost count Activation Cleared by the host 2^16 - 1, saturating
Sequence number Activation Next activation Modulo 2^16

4. Partner behaviour

4.1 Bus traffic

The BM sees every word that any terminal sends on either bus, including words of the core itself when it runs beside the RT. A BC sends one message at a time on one bus (MIL 4.6.3.1); it may send a command on the other bus while a message is in progress (MIL 4.6.3.2), and an RT that receives it stops the message on the first bus, so the words of the first message may end at any point. Remote terminals respond within 4 to 12 us (MIL 4.3.3.8); a BC waits at least 14 us for a response (MIL 4.3.3.9) and then sends the next command after its gap, at least 4 us (MIL 4.3.3.7). Faulty terminals send invalid words, words with the wrong sync, too many or too few words, words with gaps and line activity without valid words; the BM records all of them.

4.2 Codec

o1553_codec reports every word of both buses with its validation result, contiguity, gap and own flag rxLatency cycles after its reference crossing, reports no further invalid word until the line has been idle after an invalid word (CD-DE-11), and reports line activity in which it recognised no sync half as one event with its duration when the activity ends (CD-DE-14). It reports nothing on a bus that the host has disabled.

4.3 Host and buffer memory

The memory answers every read after MemLatency_g cycles; a request may wait one cycle for a host access and for the requests of the RT (D8). The host writes the filter table and the configuration while the BM is inactive, reads the records between its read index and the write index, and then writes the read index. It places the ring and the filter table where the RT, if enabled, has no region (core architecture section 7.7).

5. Error conditions

Condition Detection Response
No status word within the time-out Response window of BM-MR-04 Flag "no response" (status 1 or 2)
Status word of another address RT address field Flag "status address" (status 1 or 2)
Invalid word in a message Validation result of the word event Flag "invalid word", error class, position; the message ends
Wrong sync type Sync type of the word event Flag "sync"; the message ends
Data word with a gap Contiguous flag Flag "gap"; the message ends
Too few or too many data words Count against the format Flag "word count low" or "word count high"
Command on the other bus during a message Command word 1 on the other bus Flag "superseded"
Word outside a message No message in progress Word record (when enabled)
Line activity without a word Rx_NoWord Activity record (when enabled)
Ring full Free words against the record length Record not written, lost count, event "overflow"
All four records of a bus held, or an activity before the one before it is recorded Slots and pending event of the tracker New record lost, lost count, event "overflow"
Double error in the filter table ECC flag of the read Bit taken as '1', flag "filter error"
Double error in the message buffer ECC flag of the buffer read Word written as read, flag "buffer error" (bit 6 of word 0 of a word or activity record)
Illegal state when others Idle state

6. Configuration parameters

Generic Default Range Description
ClkFreq_g (none) 16 MHz to 400 MHz, integer multiples of 2 MHz Clock frequency, that of the codec
SyncStages_g 2 2 to 4 Synchroniser stages of the codec, for rxLatency
MemLatency_g 3 1 to 8 Latency of the memory port

7. Interpretation of the standard

Clause Statement Interpretation
MIL 4.4.4 A bus monitor extracts selected information and answers no message except one with its own address if one is assigned Selection by the filter table per RT address, T/R bit and subaddress; with the RT disabled the core has no assigned address and answers nothing, beside the RT the RT answers its own address (D27)
MIL 4.3.3.5.3.4, ECSS 6.4d The instrumentation bit can distinguish a status word from a command word Not used to decide: profiles differ in the use of bit time ten, so the BM decides by context and timing (BM-MR-04) and records the word as received (I25)
MIL 4.3.3.8, 4.3.3.9 Response time 4 to 12 us; the BC waits at least 14 us A status word is taken up to Cfg_BmTimeout, which the host sets to the time-out of the BC of the bus; the response time is recorded so that the host can check the 4 to 12 us (I25)