o1553_host: Architecture and Design Description¶
1. Block diagram¶
| Entity | Blocks | Content |
|---|---|---|
o1553_host |
HI-1, HI-6 | Top level: olo_axi_lite_slave, address decode between registers and memory window, reset generator, time base |
o1553_host_regs |
HI-2, HI-4, HI-5 | Register file with the event log index and the interrupt flags, from the generated o1553_regs_pkg; the EDAC monitor |
o1553_host_mem |
HI-3 | Arbiter (olo_base_arb_prio) of the host access, the RT, the BC, the BM and the initialisation, host access, initialisation, olo_ft_ram_sp_scrub, response routing by the owner of each read |
olo_ft_ecc_monitor |
HI-5 | In o1553_host_regs; three channels: protocol reads, host reads, scrubber |
o1553_host_pkg |
memLatency, default table words of the initialisation |
|
o1553_regs_pkg |
Generated: register addresses, field positions and reset values |
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; checked by checkClkFreq of o1553_codec_pkg |
RamRdLatency_g |
positive |
1 | 1 to 4 | RamRdLatency_g of olo_ft_ram_sp_scrub |
EccPipeline_g |
natural |
1 | 0 to 2 | EccPipeline_g of olo_ft_ram_sp_scrub |
ScrubPeriod_g |
real |
0.0 | 0.0 or at least 1.0e-3 | ScrubPeriod_g of olo_ft_ram_sp_scrub |
IncludeBc_g |
boolean |
false | CORE_STATUS.BC_INCLUDED (HI-CF-04) |
|
AllowOpenProfile_g |
boolean |
false | CORE_STATUS.OPEN_PROFILE (HI-CF-04) |
|
IncludeBm_g |
boolean |
false | CORE_STATUS.BM_INCLUDED (HI-CF-05) |
2.2 Ports¶
| Port | Width | Dir | Description |
|---|---|---|---|
Clk |
1 | in | Clock |
RstIn |
1 | in | Reset input of the core, asynchronous, high-active |
Rst |
1 | out | Synchronous high-active reset of all blocks of the core |
S_AxiLite_* |
address 16, data 32 | AXI4-Lite slave port | |
Irq |
1 | out | Interrupt, level, high-active |
ErrInj_BitFlip, ErrInj_Valid |
22, 1 | in | Error injection into the buffer memory (codeword of 16 data bits) |
Mem_Req_Valid, Mem_Req_Ready, Mem_Req_Addr, Mem_Req_Write, Mem_Req_WrData |
1, 1, 13, 1, 16 | in, out, in, in, in | Memory requests of the RT |
Mem_Rsp_Valid, Mem_Rsp_Data, Mem_Rsp_Ded |
1, 16, 1 | out | Read responses of the RT, MemLatency cycles after the acceptance |
BcMem_Req_Valid, BcMem_Req_Ready, BcMem_Req_Addr, BcMem_Req_Write, BcMem_Req_WrData |
1, 1, 13, 1, 16 | in, out, in, in, in | Memory requests of the BC |
BcMem_Rsp_Valid, BcMem_Rsp_Data, BcMem_Rsp_Ded |
1, 16, 1 | out | Read responses of the BC, MemLatency cycles after the acceptance |
BmMem_Req_Valid, BmMem_Req_Ready, BmMem_Req_Addr, BmMem_Req_Write, BmMem_Req_WrData |
1, 1, 13, 1, 16 | in, out, in, in, in | Memory requests of the BM |
BmMem_Rsp_Valid, BmMem_Rsp_Data, BmMem_Rsp_Ded |
1, 16, 1 | out | Read responses of the BM, MemLatency cycles after the acceptance |
Mem_InitDone |
1 | out | Buffer memory initialised |
Log_WrIdx |
8 | out | Record index of the next event record |
Log_Push, Log_Irq |
1, 1 | in | Record complete; it requests an interrupt (both protocol engines, combined in o1553_core_role) |
Time_Tag |
32 | out | Time tag in microseconds |
Ecc_DedEvent |
1 | out | Double error of any source (one-cycle pulse) |
Rt_TimeSync, Rt_FrameSync, Rt_SyncData, Rt_ResetReq, Rt_SelfTestReq |
1, 1, 16, 1, 1 | in | Indications of the RT |
Cfg_* (RT) |
o1553_rt architecture section 3.1 |
out | Configuration of the RT |
Stat_* (RT) |
o1553_rt architecture section 3.2 |
in | State of the RT |
Cfg_* (BC), Cmd_* (BC) |
o1553_bc architecture sections 3.1 and 3.2 |
out | Configuration and commands of the BC (Cfg_RtEn and Cfg_LogErrors are those of the RT) |
Stat_* (BC), Ev_* (BC) |
o1553_bc architecture section 3.3 |
in | State and events of the BC |
Cfg_Bm*, Cmd_BmLostClr |
o1553_bm architecture section 3.1 |
out | Configuration and command of the BM |
Stat_Bm*, Ev_Bm* |
o1553_bm architecture section 3.2 |
in | State and events of the BM |
Cfg_BusEn, Cfg_MonEn |
2, 1 | out | Configuration of the codec |
Stat_TxEn, Stat_Shutdown, Stat_FailSafe |
2 each | in | Transmitter state of the codec |
3. Address map and registers¶
3.1 Address map¶
| Byte address | Content |
|---|---|
| 0x0000 to 0x00C7 | Registers (section 3.3) |
| 0x00C8 to 0x7FFF | No register: reads 0, writes ignored |
| 0x8000 to 0xFFFF | Memory window: word w of the buffer memory at 0x8000 + 4 x w, in bits 15 to 0 |
The memory map of the buffer memory (descriptors, illegal command tables, event log, subaddress buffers) is that of
o1553_rt, architecture section 4.1.
3.2 Access types¶
| Access | Meaning |
|---|---|
| RO | Read only; writes ignored |
| RW | Read and write, with byte enables |
| W1 | Command: writing '1' gives a one-cycle pulse; reads 0 |
| W1C | Writing '1' clears the bit (a flag of the host interface, or through a one-cycle pulse a bit kept by the RT) |
| W1S | Writing '1' sets the bit kept by the RT (one-cycle pulse); reads the state |
| RC | Read only; the read clears the counters |
3.3 Registers¶
| Address | Register | Access | Fields (bits, reset value) |
|---|---|---|---|
| 0x0000 | ID |
RO | VERSION 15:0 (0x0003: register map 0.3), IDENT 31:16 (0x1553) |
| 0x0004 | CONTROL |
RW | RT_EN 0 (1), BCST_EN 1 (1), ILLEGAL_EN 2 (1), LOG_ERRORS 3 (1), MON_EN 4 (1), SCRUB_EN 5 (1), BUS_EN 9:8 (11), WRAP_EN 16 (1), TIME_EN 17 (1), FRAME_EN 18 (1), HEALTH_EN 19 (1) |
| 0x0008 | COMMAND |
W1 | ADDR_CHECK 0 (Cfg_AddrCheck), ECC_CLR 1 (clear all error counters) |
| 0x000C | RESP_TIME |
RW | RESP_TIME 15:0 (6.0 us in cycles) |
| 0x0010 | TERM_COND |
RW | SERVICE_REQ 0, BUSY 1, SUBSYS_FLAG 2, TERM_FLAG 3 (all 0) |
| 0x0014 | VECTOR |
RW | VECTOR 15:0 (0) |
| 0x0018 | BIT |
W1C, RW | FAULTS 7:0 (BIT word bits 7 to 0 of the RT; W1C through Cfg_BitClr), HOST 15:8 (RW, 0, Cfg_BitHost) |
| 0x001C | HEALTH |
W1S | HEALTH 15:0 (health word of the RT; W1S through Cfg_HealthSet) |
| 0x0020 | RT_ADDRESS |
RO | ADDR 4:0, VALID 8, PARITY_ERR 9, ADDR_31 10 |
| 0x0024 | RT_STATUS |
RO | STATUS_WORD 15:0, TF_INHIBIT 16, MSG_ACTIVE 17 |
| 0x0028 | RT_LAST_CMD |
RO | LAST_CMD 15:0 |
| 0x002C | RT_FRAME |
RO | FRAME 7:0 |
| 0x0030 | TX_IN_USE |
RO | SA 4:0, BUF 5, PENDING 6, IN_USE 7 |
| 0x0034 | BUS_STATUS |
RO | TX_EN 1:0, SHUTDOWN 3:2, FAIL_SAFE 5:4 |
| 0x0038 | CORE_STATUS |
RO | INIT_DONE 0, BC_INCLUDED 1 (IncludeBc_g), OPEN_PROFILE 2 (AllowOpenProfile_g), BM_INCLUDED 3 (IncludeBm_g) |
| 0x003C | TIME_TAG |
RO | TIME_TAG 31:0 |
| 0x0040 | LOG_WR_IDX |
RO | WR_IDX 7:0 |
| 0x0044 | LOG_RD_IDX |
RW | RD_IDX 7:0 (0) |
| 0x0048 | IRQ_FLAGS |
W1C | RECORD 0, LOG_OVF 1, TIME_SYNC 2, FRAME_SYNC 3, RESET_REQ 4, SELF_TEST 5, BIT 6, ECC_SEC 7, ECC_DED 8, SCRUB_OVR 9, BC_FRAME 10, BC_BUSY 11, BC_NOT_SENT 12, BC_LATE 13, BC_TICK_MISSING 14, BC_TICK_EARLY 15, BC_LIST_END 16, BC_STOPPED 17, BC_START_REFUSED 18, BC_ROLE_ERR 19, BM_RECORD 20, BM_OVERFLOW 21, BM_LEVEL 22 (all 0) |
| 0x004C | IRQ_ENABLE |
RW | Bits of IRQ_FLAGS (all 0) |
| 0x0050 | SYNC_DATA |
RO | SYNC_DATA 15:0: data word of the last mode code 17 |
| 0x0054 | ECC_PROTOCOL |
RC | SEC 15:0, DED 31:16: errors of the protocol reads |
| 0x0058 | ECC_HOST |
RC | SEC 15:0, DED 31:16: errors of the host reads |
| 0x005C | ECC_SCRUB |
RC | SEC 15:0, DED 31:16: errors found by the scrubber |
| 0x0060 | SCRUB_PASSES |
RO | PASSES 15:0: completed scrub passes, modulo 65536 |
| 0x0064 | BC_CONTROL |
RW | PROFILE 1:0 (00), TIME_SYNC 2 (0), TICK_SRC 3 (0) |
| 0x0068 | BC_FRAMES |
RW | N 8:0 (8) |
| 0x006C | BC_FRAME_TIME |
RW | D 19:0 (125000) |
| 0x0070 | BC_TICK_TIMEOUT |
RW | TIMEOUT 23:0 (1010000) |
| 0x0074 | BC_TS_DELAY |
RW | DELAY 15:0 (1000) |
| 0x0078 | BC_LATCH_TIME |
RW | LATCH_TIME 9:0 (200) |
| 0x007C | BC_TIMEOUT |
RW | TIMEOUT 15:0 (18.0 us in cycles) |
| 0x0080 | BC_GAP |
RW | GAP 15:0 (4.0 us in cycles) |
| 0x0084 | BC_TABLES |
RW | FRAME_TABLE 12:0 (0x0200), STATUS_TABLE 23:16 (0x18: bits 12 to 5 of the word address 0x0300) |
| 0x0088 | BC_RT_BUS |
RW | BUS 31:0 (0) |
| 0x008C | BC_FRAME_RSVD |
RW | RSVD 7:0 (0) |
| 0x0090 | BC_COMMAND |
W1 | START 0, STOP 1, TICK 2, FS_CLR 5:4 (bus B 5, bus A 4) |
| 0x0094 | BC_STATUS |
RO | ACTIVE 0, STATE 2:1, FRAME_NUM 15:8 |
| 0x0098 | BC_FRAME_COUNT |
RO | COUNT 15:0 |
| 0x009C | BM_CONTROL |
RW | EN 0 (0), FILTER 1 (0), OUTSIDE 2 (1), ACTIVITY 3 (1) |
| 0x00A0 | BM_COMMAND |
W1 | LOST_CLR 0 (clear BM_LOST) |
| 0x00A4 | BM_TIMEOUT |
RW | TIMEOUT 15:0 (18.0 us in cycles) |
| 0x00A8 | BM_RING_BASE |
RW | BASE 12:0 (0x0300) |
| 0x00AC | BM_RING_SIZE |
RW | SIZE 13:0 (1280) |
| 0x00B0 | BM_FILTER_BASE |
RW | BASE 12:8 (0x02: the word address 0x0200; bits 7 to 0 read 0) |
| 0x00B4 | BM_READ_INDEX |
RW | RD_IDX 12:0 (0) |
| 0x00B8 | BM_IRQ_LEVEL |
RW | LEVEL 12:0 (640) |
| 0x00BC | BM_STATUS |
RO | ACTIVE 0, SEQ 31:16 |
| 0x00C0 | BM_WRITE_INDEX |
RO | WR_IDX 12:0 |
| 0x00C4 | BM_LOST |
RO | LOST 15:0 |
The register description hdl/o1553_host/regs/o1553_regs.yml holds this table; tools/regmap.py generates
o1553_regs_pkg, the register map page and sw/o1553_regs.h from it. Register map 0.2 adds to
map 0.1 the registers of the BC from 0x0064 (the fields and meanings of o1553_bc architecture section 3), the flags
of its events in IRQ_FLAGS and IRQ_ENABLE and the two generics in CORE_STATUS. In the BC role the RT sees
CONTROL.RT_EN and not BC_STATUS.ACTIVE (D20); CONTROL.LOG_ERRORS applies to the records of both engines.
Register map 0.3 adds the registers of the BM from 0x009C (the fields and meanings of o1553_bm architecture
section 3), the flags of its events in IRQ_FLAGS and IRQ_ENABLE and BM_INCLUDED in CORE_STATUS. The reset
values place the filter table at 0x0200 and a ring of 1280 words at 0x0300, in the region that the RT leaves free
(o1553_bm architecture section 4.1), and give the event "level" at half that ring.
4. Host port (HI-1)¶
olo_axi_lite_slave (AxiAddrWidth_g = 16, AxiDataWidth_g = 32) serves one access at a time and presents it on its
register interface (Rb_*). Bit 15 of Rb_Addr selects the memory window. Register reads are answered in the cycle
after Rb_Rd, except the error counters (two cycles, the read port of olo_ft_ecc_monitor). Memory accesses go to
the host access of HI-3; a read is answered when its data returns.
The slave answers every write with OKAY at once and offers no error input for reads. A read with a double error
(HI-HP-02, D14) is therefore not acknowledged by the host access: the read time-out of the slave (ReadTimeoutClks_g
= 128) answers it with SLVERR (HI-HP-05). A regular read takes at most 64 cycles (HI-HP-04), so the time-out never ends
a regular read. The slave takes no other access during the 128 cycles; the memory keeps serving the protocol engine,
and the double error is counted and sets ECC_DED (section 7), so software learns about it also without the
response. A read error input of olo_axi_lite_slave (Rb_RdErr) would answer at once; it is a possible later item of
open-logic-ft.
5. Buffer memory (HI-3)¶
5.1 Arbitration and memory port¶
Five requesters share the single port of olo_ft_ram_sp_scrub: the host access, the RT, the BC, the BM and the
initialisation, in this priority (olo_base_arb_prio with Latency_g = 0, combinational grant). The granted request
drives Addr, WrEna, WrData and RdEna in the same cycle; Mem_Req_Ready is the grant of the RT,
BcMem_Req_Ready that of the BC, BmMem_Req_Ready that of the BM. The host access requests the memory for one cycle
per access of the host, and olo_axi_lite_slave presents these accesses at least 3 cycles apart, so a request of the RT
waits at most one cycle (MemWait = 1, the wait the response time budget of the RT holds, RT architecture section 6.2)
and never two requests in a row, whatever the BC or the BM request. In the BC role the RT is disabled; its jobs of the
last message before the start of the BC (MemLatency + 18 cycles for the publication, then the record) are the only
requests above the BC, so a request of the BC waits behind them once at its start and otherwise at most one cycle. The
grant is decided in every cycle, so a request that the BC withdraws (BC-RO-02) leaves no grant behind. The BM is never
active beside the BC (D27): a request of the BM waits only for the host access and the RT, the waits that the timing
budget of the BM holds (o1553_bm architecture section 7), and the requests of the BM never delay those of the RT. The
BM withdraws a request in the cycle in which it becomes inactive (BM-EN-03), which leaves no grant behind either. The
scrubber uses the cycles without a request.
A read returns from the RAM RamRdLatency_g + EccPipeline_g cycles after it was accepted (RdValid); shift registers
of the same length carry the owner of each read (host, RT, BC or BM, one bit per requester), and one output register
delivers the data, the double error flag and the valid of the owner only: MemLatency = RamRdLatency_g +
EccPipeline_g + 1. A response goes to its owner also when the owner no longer requests (HI-MEM-05); the reads of the
RT that end after its message and those of the BC in flight at a role error therefore never reach the other engine
(D20), and the reads of the BM in flight when it becomes inactive return to the BM, which drops them. The single and
double error flags of the reads go to the EDAC monitor, per owner (all engines in the channel of the protocol reads).
cycle c c+1 ... c+L c+L+1
request accepted
RdValid '1'
Mem_Rsp valid (L = RamRdLatency_g + EccPipeline_g)
5.2 Host access¶
The host access holds one access of the host and takes the memory in the next cycle:
- A write is taken from
Rb_Wr. The slave has already answered it and cannot hold it, so a write that waited behind the protocol engine could be overwritten by the next one; with the first priority it is written in the cycle after its arrival, before the slave can present the next access, whatever the protocol engine requests. Writes needRb_ByteEnabits 1 and 0 set (HI-HP-03); otherwise the access is dropped. - A read is taken from
Rb_Rd, requested in the next cycle and answered withRb_RdValidwhen its data returns,MemLatencycycles later. The slave takes no further access until then, so the read always follows the write before it.
A host read is answered MemLatency + 3 cycles after the read address handshake (6 cycles at MemLatency = 3), far
within 64 cycles and the read time-out of 128 cycles.
5.3 Initialisation¶
After the reset a counter walks the 8192 word addresses with the lowest priority and writes each word: the table
words of o1553_host_pkg.tableDefault (specification section 6) in 0x0100 to 0x01FF, 0 elsewhere. After the last
write Mem_InitDone and CORE_STATUS.INIT_DONE become '1'. Without other traffic the initialisation takes 8192
cycles (82 us at 100 MHz); the RT accepts no command before it ends (RT-CV-01).
6. Register file, event log and interrupts (HI-2, HI-4)¶
- Configuration fields are registers with the reset values of section 3.3, driving the
Cfg_*outputs.RESP_TIMEresets to round(6.0e-6 xClkFreq_g),BC_TIMEOUTto round(18.0e-6 xClkFreq_g),BC_GAPto round(4.0e-6 xClkFreq_g),BM_TIMEOUTto round(18.0e-6 xClkFreq_g).Cfg_BmFilterBaseisBM_FILTER_BASEwith bits 7 to 0 '0'. - Command fields (W1, W1C of
BIT, W1S ofHEALTH) give one-cycle pulses:Cfg_AddrCheck, the clear of the error counters,Cfg_BitClr(the written ones of bits 7 to 0),Cfg_HealthSet(the written ones), and the commands of the BC:Cmd_BcStart,Cmd_BcStop,Cmd_BcTick,Cmd_BcFsClr(the written ones of bits 5 and 4); the command of the BM:Cmd_BmLostClr. - Status fields read the
Stat_*inputs directly. - Event log:
WR_IDXadvances at everyLog_Push; a push withWR_IDX+ 1 =RD_IDX(modulo 256) setsLOG_OVF. - Interrupt flags: each flag is set by its event (
RECORD:Log_PushandLog_Irq;TIME_SYNC,FRAME_SYNC,RESET_REQ,SELF_TEST: the indications;BIT: a bit ofStat_Bit7 to 0 rising;ECC_SEC,ECC_DED: the event outputs of the EDAC monitor;SCRUB_OVR:Scrub_Overrun;BC_FRAMEtoBC_ROLE_ERR: theEv_Bc*inputs;BM_RECORD,BM_OVERFLOW,BM_LEVEL: theEv_Bm*inputs) and cleared by a written '1', the event winning in the same cycle.Irq= any (flags and enables), registered. CORE_STATUS.BC_INCLUDED,CORE_STATUS.OPEN_PROFILEandCORE_STATUS.BM_INCLUDEDare constants fromIncludeBc_g,AllowOpenProfile_gandIncludeBm_g.SYNC_DATAtakesRt_SyncDataatRt_FrameSync.
7. EDAC monitor (HI-5)¶
olo_ft_ecc_monitor with Channels_g = 3 and CounterWidth_g = 16: channel 0 the protocol reads (RT, BC and BM),
channel 1 the host reads (the flags of the RAM qualified by the owner of the read), channel 2 the scrubber
(Scrub_EccSec, Scrub_EccDed). A read of ECC_PROTOCOL, ECC_HOST or ECC_SCRUB reads the channel with
read-and-clear; COMMAND.ECC_CLR drives Clr. Evt_Sec and Evt_Ded set the interrupt flags; Evt_Ded is
Ecc_DedEvent, which sets BIT word bit 4 of the RT and so the terminal flag condition (D14).
8. Reset and time base (HI-6)¶
olo_base_reset_gen(SyncTmr_g= true,AsyncResetOutput_g= false) turnsRstInintoRst.olo_base_strobe_gen(FreqClkHz_g=ClkFreq_g,FreqStrobeHz_g= 1.0e6) gives the microsecond tick; at an integer multiple of 2 MHz the tick is exact. A 32-bit counter, 0 after the reset, counts the ticks (Time_Tag).- Every register of the module has a reset value (D16); the initialisation and the host access have a
when othersbranch to their idle state (D15).
9. Notes for the user guide¶
- A host read of a memory word with a double error is answered with SLVERR after the read time-out of 128 clock cycles;
the host port takes no other access meanwhile. The error is also counted (
ECC_HOST) and sets the interrupt flagECC_DED, so software learns about it without relying on the response. A read of a word with a single error is answered with OKAY and the corrected word. - The content of the buffer memory is defined from
CORE_STATUS.INIT_DONEon; host writes before may be overwritten by the initialisation. - A memory write needs both byte enables of bits 15 to 0; write whole 32-bit words.
- The host port serves one access at a time and, when a read and a write wait together, the read first
(
olo_axi_lite_slave). A master that issues reads continuously on its read channel can therefore delay its writes for as long as the reads continue; a processor that issues its accesses in program order is not affected.