o1553_core: Architecture and Design Description¶
1. Block diagram¶
| Entity | Content |
|---|---|
o1553_core |
Top level (struct): o1553_host, o1553_rt, o1553_bc (with IncludeBc_g), o1553_bm (with IncludeBm_g), o1553_core_role and o1553_codec and their connections; no logic of its own |
o1553_core_role |
The role of D20 (section 3.1): the encoder stream and the fail-safe release of the active engine, the result of a transmission to the engine that started it, the transmission abort and the record events of both engines, the RT held disabled in the BC role, the start condition of the BC with the BM (D27); one register (the owner of the transmission in progress) |
The top level has no register and no process: every function is in a module or in o1553_core_role, and the top level
only connects them (CORE-ST-01). The internal interfaces are those of the core architecture, section 6.
2. Interfaces¶
2.1 Generics¶
| Generic | Type | Default | Range | To |
|---|---|---|---|---|
ClkFreq_g |
real |
none | 16.0e6 to 400.0e6, integer multiple of 2.0e6 | o1553_codec, o1553_rt, o1553_bc, o1553_bm, o1553_host |
ScrubPeriod_g |
real |
0.0 | 0.0 or at least 1.0e-3 | o1553_host |
SyncStages_g |
positive |
2 | 2 to 4 | o1553_codec, o1553_rt, o1553_bc, o1553_bm |
RamRdLatency_g |
positive |
1 | 1 to 4 | o1553_host |
EccPipeline_g |
natural |
1 | 0 to 2 | o1553_host |
IncludeBc_g |
boolean |
false | instance of o1553_bc; o1553_host (CORE_STATUS.BC_INCLUDED) |
|
AllowOpenProfile_g |
boolean |
false | o1553_bc, o1553_host (CORE_STATUS.OPEN_PROFILE) |
|
IncludeBm_g |
boolean |
false | instance of o1553_bm; o1553_host (CORE_STATUS.BM_INCLUDED) |
o1553_rt, o1553_bc and o1553_bm get MemLatency_g = RamRdLatency_g + EccPipeline_g + 1
(o1553_host_pkg.memLatency, 2 to 7). The checks of the generics are those of the modules: ClkFreq_g in
o1553_codec, o1553_rt, o1553_bc, o1553_bm and o1553_host (checkClkFreq), ScrubPeriod_g in o1553_host.
2.2 Ports¶
| Port | Width | Dir | Description |
|---|---|---|---|
Clk |
1 | in | Clock (D1) |
Rst |
1 | in | Reset input, asynchronous, high-active; synchronised in o1553_host |
S_AxiLite_ArAddr, S_AxiLite_ArValid, S_AxiLite_ArReady |
16, 1, 1 | in, in, out | Host port, read address |
S_AxiLite_RData, S_AxiLite_RResp, S_AxiLite_RValid, S_AxiLite_RReady |
32, 2, 1, 1 | out, out, out, in | Host port, read data |
S_AxiLite_AwAddr, S_AxiLite_AwValid, S_AxiLite_AwReady |
16, 1, 1 | in, in, out | Host port, write address |
S_AxiLite_WData, S_AxiLite_WStrb, S_AxiLite_WValid, S_AxiLite_WReady |
32, 4, 1, 1 | in, in, in, out | Host port, write data |
S_AxiLite_BResp, S_AxiLite_BValid, S_AxiLite_BReady |
2, 1, 1 | out, out, in | Host port, write response |
Irq |
1 | out | Interrupt, level, high-active (D10) |
Bus_TxP, Bus_TxN, Bus_TxInh |
2 each | out | Transmitter of each bus (index 0 bus A, 1 bus B) |
Bus_RxP, Bus_RxN |
2 each | in | Receiver comparator outputs of each bus, asynchronous |
Bus_RxEn |
2 | out | Receiver enable of each bus |
Rt_Addr, Rt_AddrParity |
5, 1 | in | Address straps and their odd parity, asynchronous |
Rt_TimeSync, Rt_FrameSync, Rt_SyncData, Rt_ResetReq, Rt_SelfTestReq |
1, 1, 16, 1, 1 | out | Indications (D19) |
ErrInj_BitFlip, ErrInj_Valid |
22, 1 | in | Error injection into the buffer memory, default no injection |
Bc_TimeTick |
1 | in | Tick of the on-board time master, asynchronous, default '0' (D22) |
Bc_FrameSync, Bc_FrameNum |
1, 8 | out | Frame start pulse and frame number of the BC (D22); '0' without the BC |
ErrInj_RoleFlip |
1 | in | Test input: inverts the complement copy of the role (D20), default '0'; a system ties it to '0' |
ErrInj_BmBitFlip, ErrInj_BmValid |
44, 2 | in | Error injection into the message buffers of the BM, bus b in bits 22b + 21 to 22b and bit b (semantics of olo_ft_ram_sdp), default no injection |
3. Connections¶
| Signals | From | To | Content |
|---|---|---|---|
Rst (synchronised) |
o1553_host |
o1553_codec, o1553_rt, o1553_bc, o1553_bm, o1553_core_role |
Reset of the modules; o1553_host resets itself with it |
Rx_Valid, Rx_Sync, Rx_Data, Rx_Error, Rx_Contig, Rx_Gap, Rx_Own, Rx_Active |
o1553_codec |
o1553_rt, o1553_bc, o1553_bm (without Rx_Active) |
Word events and line activity of both buses |
Rx_NoWord, Rx_NoWordLen |
o1553_codec |
o1553_bm |
Line activity without a word and its duration (o1553_codec CD-DE-14) |
Tx_Valid, Tx_Sync, Tx_Data, Tx_Last, Tx_Bus, Tx_Abort / Tx_Ready, Tx_Done, Tx_Result, Tx_Suppressed |
o1553_rt, o1553_bc / o1553_codec |
o1553_core_role |
Transmit word streams of both engines and the result (section 3.1) |
Tx_* (selected), Tx_Abort (both) / Tx_Busy |
o1553_core_role / o1553_codec |
o1553_codec / o1553_core_role |
Transmit word stream of the active engine, transmission in progress |
Sd_Set, Sd_Clr |
o1553_rt |
o1553_codec |
Transmitter shutdown |
Fs_Clr |
o1553_rt, o1553_bc |
o1553_core_role, then o1553_codec |
Fail-safe release of the active engine |
Stat_FailSafe, Mon_Error |
o1553_codec |
o1553_rt, o1553_host (Stat_FailSafe) |
Fail-safe state and loopback errors |
Stat_TxEn, Stat_Shutdown |
o1553_codec |
o1553_host, o1553_bc (Stat_TxEn) |
Transmitter state of both buses |
Cfg_BusEn, Cfg_MonEn |
o1553_host |
o1553_codec |
Bus enables, loopback monitor |
Mem_Req_*, Mem_Rsp_*, Mem_InitDone |
o1553_rt / o1553_host |
o1553_host / o1553_rt, o1553_bc, o1553_bm (Mem_InitDone) |
Memory port of the RT |
BcMem_Req_*, BcMem_Rsp_* |
o1553_bc / o1553_host |
o1553_host / o1553_bc |
Memory port of the BC (Mem_Req_*, Mem_Rsp_* of o1553_bc) |
BmMem_Req_*, BmMem_Rsp_* |
o1553_bm / o1553_host |
o1553_host / o1553_bm |
Memory port of the BM (Mem_Req_*, Mem_Rsp_* of o1553_bm) |
Log_WrIdx, Time_Tag |
o1553_host |
o1553_rt, o1553_bc, o1553_bm (Time_Tag) |
Event log index, time tag |
Log_Push, Log_Irq |
o1553_rt, o1553_bc |
o1553_core_role, then o1553_host |
Record events of both engines |
Cfg_* (RT), Ecc_DedEvent |
o1553_host |
o1553_rt (Cfg_RtEn through o1553_core_role) |
Configuration of the RT, double error event |
Cfg_*, Cmd_* (BC) |
o1553_host |
o1553_bc |
Configuration and commands of the BC; Cfg_RtEn and Cfg_LogErrors of the BC are those of the host register |
Stat_* (RT) |
o1553_rt |
o1553_host, o1553_core_role (Stat_MsgActive) |
State of the RT |
Stat_*, Ev_* (BC) |
o1553_bc |
o1553_host, o1553_core_role and o1553_bm (Stat_BcActive) |
State and events of the BC |
Cfg_Bm*, Cmd_BmLostClr |
o1553_host |
o1553_bm, o1553_core_role (Cfg_BmEn) |
Configuration and command of the BM |
Stat_Bm*, Ev_Bm* |
o1553_bm |
o1553_host, o1553_core_role (Stat_BmActive) |
State and events of the BM |
Bc_StartBlock |
o1553_core_role |
o1553_bc (Rt_MsgActive) |
Start condition of the BC: a message of the RT in progress, or the BM enabled or active (section 3.1) |
Rt_TimeSync, Rt_FrameSync, Rt_SyncData, Rt_ResetReq, Rt_SelfTestReq |
o1553_rt |
o1553_host and the ports |
Indications |
Bc_TimeTick, ErrInj_RoleFlip / Bc_FrameSync, Bc_FrameNum |
the ports / o1553_bc |
o1553_bc / the ports |
Tick, role injection, frame start |
ErrInj_BmBitFlip, ErrInj_BmValid |
the ports | o1553_bm |
Error injection of the message buffers |
With IncludeBc_g = false there is no o1553_bc: its outputs into the core are constant inactive (Stat_BcActive,
Stat_*, Ev_*, Tx_Valid, Tx_Abort, Fs_Clr, Log_Push, BcMem_Req_Valid '0'), Bc_FrameSync and
Bc_FrameNum are '0', and Bc_TimeTick and ErrInj_RoleFlip stay unused; o1553_core_role then passes the RT
through (CORE-RL-06). With IncludeBm_g = false there is no o1553_bm: its outputs into the core are constant
inactive (Stat_Bm*, Ev_Bm*, BmMem_Req_Valid '0'), o1553_core_role gets '0' for the enable and the activity of
the BM, and ErrInj_BmBitFlip, ErrInj_BmValid, Rx_NoWord and Rx_NoWordLen stay unused (CORE-BM-07). Every
other output of a module has a user; every input of a module is driven (CORE-ST-03).
3.1 Role (o1553_core_role)¶
The role is Stat_BcActive of o1553_bc, which is '1' only while its two role copies are complementary and say BC
(BC-RO-04): it changes to RT in the cycle of a role error. o1553_core_role uses it as follows:
| Path | Behaviour |
|---|---|
Encoder stream (Tx_Valid, Tx_Sync, Tx_Data, Tx_Last, Tx_Bus) |
From the BC while the role is BC, from the RT otherwise; Tx_Ready to the same engine only |
Transmission result (Tx_Done, Tx_Result, Tx_Suppressed) |
To the engine that started the transmission in progress, the other gets '0': a register takes the role while the encoder is idle (Tx_Busy = '0') and holds it during a transmission, so the end of a transmission of the BC aborted at a role error reaches the BC, never the RT |
| Transmission abort | Tx_Abort of the RT or of the BC: the abort of the BC in the cycle of a role error reaches the encoder although the stream already follows the RT (CORE-RL-03) |
Fail-safe release (Fs_Clr) |
From the BC while the role is BC, from the RT otherwise (I20, CORE-RL-02) |
| RT enable | Cfg_RtEn of the RT = CONTROL.RT_EN and not the role BC (D20) |
| Record events | Log_Push = Log_Push of the RT or of the BC; Log_Irq = the Log_Irq of the engine that pushes. A concurrent assertion of severity error reports a cycle with a push of both (CORE-RL-05); synthesis ignores it |
Start condition of the BC (Bc_StartBlock) |
Rt_MsgActive of the BC = Stat_MsgActive of the RT or Cfg_BmEn or Stat_BmActive (D27): the BC refuses a start while the RT has a message in progress or the BM is enabled or active. The enable covers the cycle in which the BM and the BC would both start at the end of the memory initialisation, the activity the cycle in which the BM ends after a clear of the enable |
The memory ports need no path through the role: each engine has its own port in o1553_host, and every read response
goes only to its requester (HI-MEM-05). The BM needs none either: it never transmits (BM-IF-02) and takes
Stat_BcActive itself, so it is inactive while the BC is active (BM-EN-01). With the start condition above, the BC and
the BM are never active in the same cycle: the BC starts only while the BM is neither enabled nor active, and the BM
becomes active only in the cycle after one in which the BC is not active. The paths of the encoder stream are
combinational, so the timing of the RT and the BC at the ports is that of the modules (txLatency from the presentation
of a word to its sync).
The record events never coincide: the RT pushes its last record at most MemLatency + 18 cycles and 8 record writes
after its last message (o1553_rt architecture section 6.1), before the BC can have finished a message; the BC pushes
only after a message it sent, and a role error ends a record of the BC without a push. In the other direction, the RT
answers its first command at least a response time after the BC has ended. The assertion checks this argument in
every simulation of the core.
4. Reset and start-up¶
Rstasserts the synchronised reset of all modules (olo_base_reset_genino1553_host,SyncTmr_g= true).- After its release,
o1553_hostinitialises the buffer memory: 8192 writes, 8192 cycles without host traffic (82 us at 100 MHz), the default illegal command tables of I8 and 0 elsewhere; thenMem_InitDoneandCORE_STATUS.INIT_DONE. o1553_rtvalidates the address straps at the end of the reset (RT-AD-02) and answers no command beforeMem_InitDone(RT-CV-01). The host programs the registers and the buffers fromINIT_DONEon; with the reset values the RT answers every legal command at 6.0 us response time.- In the BC role (
IncludeBc_g), the host writes the bus profile into the buffer memory and the BC registers, clearsCONTROL.RT_ENand writesBC_COMMAND.START. The BC starts when the RT has no message in progress and the memory is initialised; otherwise the start is refused withBC_START_REFUSED(CORE-RL-01). The jobs of the last message of the RT complete on its own memory port while the BC begins its latch walk. A stop or a role error returns the core to the RT role with the RT disabled until the host setsCONTROL.RT_EN. - With the BM (
IncludeBm_g), the host writes the filter table into the buffer memory if it uses one, sets the BM registers and thenBM_CONTROL.EN. The BM is active fromINIT_DONEon while the BC is not active, beside the RT (CONTROL.RT_EN= '1') or alone. Before a start of the BC the host clearsBM_CONTROL.EN; a start while it is set is refused withBC_START_REFUSED(CORE-BM-04).BM_CONTROL.ENset while the BC is active makes the BM active when the BC stops or ends at a role error.
5. Timing at the ports¶
The response time is measured from the reference crossing of the last word at Bus_RxP/Bus_RxN to the mid-sync
crossing of the status word at Bus_TxP/Bus_TxN (D6, I11). The shortest value, rtRespMin (RT architecture
section 8), depends on the generics:
ClkFreq_g |
SyncStages_g |
MemLatency_g |
rtRespMin |
|---|---|---|---|
| 16 MHz | 2 | 3 | 68 cycles (4.25 us) |
| 16 MHz | 4 | 3 | 70 cycles (4.375 us) |
| 16 MHz | 2 | 7 | 72 cycles (4.5 us) |
| 100 MHz | 2 to 4 | 2 to 7 | 400 cycles (4.0 us) |
| 400 MHz | 2 to 4 | 2 to 7 | 1600 cycles (4.0 us) |
A request of the RT waits at most one cycle for the memory behind a host access (HI-MEM-02); rtRespMin includes that
wait (RT architecture section 6.2), so host traffic does not change the response time.
In the BC role the timing is that of o1553_bc at the ports of its codec, which are the core ports: the gap from the
reference crossing of the last word to the mid-sync crossing of the next command (BC-TM-01), the no-response time-out
(BC-TM-02, accurate to about 1.5 cycles), Bc_FrameSync txLatency cycles before the start of the sync of each
synchronization message at Bus_TxP/Bus_TxN (BC-FR-06), and frame 0 Cfg_BcTsDelay and SyncStages_g + 5 cycles
after the first clock edge at which Bc_TimeTick is '1' (o1553_bc architecture section 5.3).
o1553_core_role adds no register in the encoder stream. A request of the BC waits behind host accesses (and, once at
its start, behind the last jobs of the RT); the BC holds its timing with waits on every request (o1553_bc
architecture section 8).
The BM adds no register to a path of the RT or the BC and never transmits. Its memory port has the lowest priority of
the protocol engines, so the response time of the RT stays as above while the BM records; a request of the BM waits
for the host access and the RT within the budget of o1553_bm architecture section 7.
6. Host sequences of D9¶
The two sequences below are those the user guide gives; the test cases of CORE-BO-01 and CORE-BO-02 run them as
written. Word addresses of the buffer memory (window address 0x8000 + 4 x word): receive descriptor of subaddress
sa at sa x 4 (word 0 control, 1 status, 2 message count), transmit descriptor at 0x0080 + sa x 4, receive
buffer b at 0x1000 + sa x 64 + b x 32, transmit buffer b at 0x1800 + sa x 64 + b x 32.
Receive (sequence lock):
- Read the message count C1 (descriptor word 2).
- Read the status word (descriptor word 1): published buffer
b(bit 0), word countn(bits 6 to 1). - Read
ndata words of bufferb. - Read the message count C2. If C2 differs from C1, repeat from 1; otherwise the words of step 3 are one complete message. C1 = 0 means no message yet.
Transmit (buffer switch):
- Read the control word of the transmit descriptor (selected buffer
s, bit 0) andTX_IN_USE. - The free buffer is
f= nots. IfTX_IN_USEshowsIN_USEfor this subaddress withPENDINGor withBUF=f, wait and repeat from 1. - Write the data words into buffer
f. - Write the control word with bit 0 =
f, the enables unchanged. From the next transmit command on, the RT sends bufferf; a command that has latchedsfinishes withs.
The reads of each sequence may be slowed down by the host at any point (an interrupt between two accesses); the sequences stay correct, since the core writes only the buffer that is not published (receive) and reads only the selected buffer (transmit).
7. Notes for the user guide¶
- The core resets the protocol state on mode code 8 and the whole core on
Rst; the buffer memory is initialised only byRst(D11). - The response time range starts at
rtRespMinof section 5;RESP_TIMEbelow it givesrtRespMin. - The two host sequences of section 6, with their addresses.
- The BC role: the start sequence of section 4 (step 4), a refused start retried after the message of the RT, the
return to the RT role with
CONTROL.RT_ENset by the host,CORE_STATUS.BC_INCLUDEDbefore any access to the BC registers, and the BC registers without effect in a core without the BC. - The BM: the filter table and the BM registers before
BM_CONTROL.EN, the reading of the ring withBM_WRITE_INDEXandBM_READ_INDEX, the BM beside the RT or alone,BM_CONTROL.ENcleared before a start of the BC,CORE_STATUS.BM_INCLUDEDbefore any access to the BM registers, and the BM registers without effect in a core without the BM.