test_dr_reference (TC-CO-01) |
The reference scenario of the model (dr_reference, the scenario of the golden files of odma_pkg): soft reset, one MM2S and one S2MM transfer with interrupt at unaligned addresses above 4 GB, the S2MM buffer longer than the packet, one MM2S transfer by polling |
CO-SQ-01, CO-SQ-02, CO-CF-01 |
test_dr_random (TC-CO-02) |
Scenario dr_random: 12 transfers of random channels, among them 1 byte and the longest length (2**LengthWidth_g - 1, at most 16384 bytes), random unaligned addresses, 40 % of them across a 4 KB boundary, above 32 address bits half of them in the region with the most significant address bit set, completion by interrupt or by polling, S2MM buffers as long as or longer than the packet; then a halt and a restart of each channel with one more transfer; both memory models with 30 % stall and a latency of 8 cycles |
CO-IF-01, CO-IF-02, CO-CF-01, CO-SQ-01, CO-SQ-02, CO-SQ-04 |
test_concurrent (TC-CO-03) |
Scenario dr_concurrent: four pairs of MM2S and S2MM transfers of 8000 bytes (at most the longest length), both programmed before the first completion is awaited, three by interrupt and one by polling; the read memory model with a latency of 50 cycles, so that the read data arrive while S2MM writes also where the MM2S buffers hold a whole transfer (lw8); a read beat and a write beat in the same clock cycle are observed |
CO-SQ-03 |
test_errors (TC-CO-04) |
Scenario dr_errors: an MM2S read with SLVERR (the packet still sent, DMASlvErr) and one with DECERR (DMADecErr), an S2MM write with SLVERR (DMASlvErr and DMAIntErr) and one with DECERR (DMADecErr and DMAIntErr), an S2MM packet longer than its buffer (DMAIntErr, no byte beyond the buffer), MM2S and S2MM buffers beyond the top of the address space (DMADecErr, S2MM also DMAIntErr, no access, no stream data); each error with Err_Irq, the interrupt output, DMASR.Halted after the interrupt and the write-one-to-clear of Err_Irq; after each error a transfer of the other channel without a reset, then a soft reset that clears the flags; finally a transfer of each channel |
CO-ER-01, CO-ER-02, CO-SQ-03 |
test_soft_reset_load (TC-CO-05) |
Both memory models with a latency of 100 cycles and 50 % stall; an MM2S transfer whose stream peer takes nothing and an S2MM packet of three data buffers from the resettable stream peer; with read and write bursts outstanding and the peer in the middle of its packet, a soft reset: both reset outputs high during the reset, every accepted burst completed or answered, no burst after the reset, no S2MM beat taken while S2mm_RstOut is high, the peer abandoned its packet, DMACR and DMASR of both channels at their reset values; then scenario after_reset (a reset and four random transfers) without stall: no beat of the interrupted transfers appears |
CO-RS-01 |
test_ecc_index (TC-CO-06) |
For each buffer index 0 to 6: counters and flags cleared, ECC_ENABLE = SEC, a single error injected at the index, one transfer of 256 bytes (at most the longest length) through the channel of the index; the SEC counter of the index counts, the DED counter stays 0, every other counter stays 0, ECC_STATUS shows the SEC flag and Ecc_Irq rises; index 6 (no buffer in DR mode), indices of an excluded channel and the configuration without the extension window count nothing and keep Ecc_Irq low; the transfer data is correct. Then for each index 0 to 5 of an included channel: a single error injected, a soft reset, a transfer through the channel: no counter counts (the reset cancelled the pending injection) |
CO-FT-01, CO-RS-01 |
test_ecc_data (TC-CO-10) |
Error injections in data mode (ECC_INJECT.Data), a single and then a double error into every buffer of the included channels, after a soft reset each. MM2S: the error is injected before a transfer of 254 bytes from an aligned buffer, so it goes into its first read data word (index 0), its entry (index 4) or its response (index 5). S2MM: packet A of 62 bytes waits in the data buffer before the error is injected and its transfer programmed, packet B of 62 bytes follows, both into buffers of 128 bytes; the error goes into the write data of A (index 3), the first data word of B (index 1) or the chunk entry of B (index 2). A single error leaves every packet, length and result unchanged and counts one SEC at its index. A double error counts one DED at its index and has the consequence of its buffer: index 0 byte 0 of the MM2S packet with bits 0 and 1 inverted; index 4 a packet of 253 bytes; index 5 a complete packet and the transfer halted with DMADecErr; index 3 byte 0 of packet A inverted in bits 0 and 1; index 1 byte 0 of packet B inverted; index 2 packet B of 61 bytes in memory and in S2MM_LENGTH. The other counters stay 0 |
CO-FT-01, CO-FT-02 |
test_configuration (TC-CO-07) |
DMACR and DMASR reset values of both channels (0 for an excluded channel, SGIncld with IncludeSg_g); EXT_ID, EXT_CONFIG, EXT_MM2S_CONFIG, EXT_S2MM_CONFIG and ECC_INFO against the generics (0 without the extension window). DR mode: the address registers and the MSB registers hold AddrWidth_g bits, the length registers LengthWidth_g bits; a length written while the channel is halted starts no memory access. SG mode: CURDESC, TAILDESC and their MSB registers hold AddrWidth_g bits without bits 5 to 0, the length registers read 0; the pointer writes of a halted channel start no access on any memory port. In DR mode the monitor of the harness checks the idle descriptor port in every test |
CO-CF-01, CO-FT-01, CO-SG-01 |
test_excluded_channel (TC-CO-08) |
The registers of the excluded channel read 0 after writes (start, address, length) and start nothing; the scenario single_channel (six random transfers, a halt and a restart) runs on the included channel; no access of the excluded channel; the idle monitor of the harness checks every port of the excluded channel in every clock cycle |
CO-CF-03 |
lint/synth_check.py (TC-CO-09) |
GHDL synthesis of the core in its boundary configurations (address and length widths 32/8 and 64/26, every memory width with an 8-bit stream and the shortest burst, equal widths 32 and 1024 with the longest burst, different channel configurations, buffers of two bursts, each channel excluded, no extension window; in SG mode the default configuration, address and length widths 32/8 and 64/26, each channel excluded, equal widths 1024 with the longest burst and a 32-bit memory with an 8-bit stream and the shortest burst, so that the stream join and split are synthesised at the widest and at the narrowest stream) without errors and inferred latches; each inconsistent configuration (no channel, StsCntrlStrm_g, UseRxLength_g, MicroDma_g, a memory width that is not a power of two, a stream wider than the memory, a burst size that is not a power of two, a buffer of less than two bursts) stops the elaboration with the message of its check |
CO-CF-01, CO-CF-02, CO-SG-01 |
test_sg_reference (TC-CO-11) |
Scenario sg_reference: soft reset, then per channel the Scatter/Gather programming sequence ([PG021] chapter 4: CURDESC, DMACR with RS, IOC_IrqEn, Err_IrqEn and the threshold 1, Halted polled to 0, TAILDESC; above 32 address bits the MSB words, the upper word last) for a chain of four descriptors above 32 address bits when the address width allows; MM2S sends every buffer as one packet, S2MM writes every packet into its buffer with 16 unwritten bytes before and after it; afterwards Idle, IOC_Irq set and cleared by writing one, the interrupt output low, CURDESC at the tail; the status of every descriptor in the descriptor memory (transferred bytes, RXSOF and RXEOF of S2MM, Cmplt), no other descriptor word changed |
CO-SG-02, CO-SG-03 |
test_sg_tail_moves (TC-CO-12) |
Scenario sg_tail_moves: chains of 12 descriptors per channel, both channels started with the threshold 2; the tail pointer of each channel moved by one to four descriptors at a time, while the engine still works or, after about half of the rounds, once both engines have reached the tail (Idle polled); MM2S and S2MM memory with 20 % stall, the descriptor memory with 30 % stall and a latency of 6 cycles; every packet in order and in memory, every status written, CURDESC at the last descriptor |
CO-SG-04, CO-SG-02, CO-SG-03 |
test_sg_cyclic (TC-CO-13) |
Scenario sg_cyclic: rings of three descriptors per channel with CyclicBD, the tail pointer at the second descriptor; two laps per channel (the S2MM packets of the first lap with other bytes of the same lengths, so that the buffers hold those of the last lap), the status of every descriptor after the last lap; the S2MM channel halted after its last packet (CURDESC at the first descriptor, which was not started, odma_sg SGI-10), the MM2S channel, which is sending its third lap, stopped by a soft reset |
CO-SG-05 |
test_sg_errors (TC-CO-14) |
Scenario sg_errors, per channel after a soft reset each: a descriptor fetch with SLVERR (SGSlvErr; MM2S the second descriptor, after the packet of the first, which sets IOC_Irq; S2MM the first descriptor) and one with DECERR (SGDecErr, the same positions), a stale descriptor (SGIntErr, the same positions), a buffer length of 0 (DMAIntErr in DMASR and bit 28 in the status, Cmplt 0), a status write with SLVERR (SGSlvErr, no IOC_Irq) and one with DECERR (SGDecErr); each with Err_Irq, the interrupt output, Halted, CURDESC at the descriptor of the error and the write-one-to-clear of Err_Irq; the descriptor memory unchanged except the statuses written; a soft reset at the end and the flags cleared |
CO-SG-06 |
test_sg_delay (TC-CO-16) |
Scenarios sg_delay and sg_delay_overlap, threshold 2, IRQDelay 4 (500 clock cycles) with Dly_IrqEn, per channel. The stream VVCs pause every packet after its first beat. With a pause of 1500 clock cycles: one packet, then Dly_Irq and the interrupt output when the timer expires, no IOC_Irq; a second packet that completes, the threshold counter at 1 (IRQThresholdSts), then a third packet that starts after this completion and pauses longer than the delay: IOC_Irq at its completion and no Dly_Irq, also 1000 clock cycles later. With a pause of 400 clock cycles: two packets back to back, the first completes during the pause of the second, which then runs for at least 250 beats: Dly_Irq is set, IOC_Irq is not, the threshold counter reads 1 |
CO-SG-07 |
test_sg_soft_reset (TC-CO-17) |
All three memories with a latency of 100 cycles and 50 % stall; chains of four descriptors per channel started, the MM2S stream peer takes nothing, the resettable peer of the harness sends one S2MM packet; a soft reset when a descriptor access is outstanding, then, after a restart, a soft reset when data bursts are outstanding (S2MM writes; MM2S reads without S2MM) and no descriptor access: after each, every accepted burst of the three ports completed or answered, no burst after the reset, no S2MM beat taken while S2mm_RstOut is high, the peer has ended its packet, DMACR and DMASR at their reset values; then scenario sg_reference without stall |
CO-SG-08 |
test_sg_ecc_index (TC-CO-15) |
For each index 6 to 9: soft reset, counters and flags cleared, ECC_ENABLE = SEC, a single error injected at the index, scenario sg_reference without its soft reset (which would cancel the injection); the SEC counter of the index counts one when its buffer exists (6 with MM2S, 7 with S2MM, 8 and 9 always), every other counter stays 0; the chains are transferred correctly |
CO-FT-01 |
test_sg_multi_buffer (TC-CO-18) |
Scenario sg_multi_buffer: per channel a chain of 12 descriptors forming packets of one to five descriptors, each buffer at a random unaligned address and of a random length (among them 1 byte), the threshold 1. MM2S: every packet one stream packet, TLast only at its end, the status of every descriptor written, one IOC_Irq per packet. S2MM: packets of random lengths over one to four buffers, one packet that ends exactly at a buffer end and one packet without bytes; the statuses with the bytes of each buffer, RXSOF in the first, RXEOF in the last (both in the buffer of the packet without bytes), 16 unwritten bytes around every buffer. Then an MM2S packet of three descriptors with the tail at the first one and a halt after its transfer: the packet ends with TLast on its last byte before DMASR.Halted is set. The S2MM write error inside a packet of several buffers is TC-CO-21 |
CO-SG-09, CO-SG-10, CO-SG-12 |
test_keyhole (TC-CO-19) |
Scenario keyhole: S2MM transfers with S2MM_DMACR.Keyhole in DR mode, and in SG mode both channels with DMACR.Keyhole, of 1 byte, 16 and 17 memory words and three bursts at aligned and unaligned buffer addresses: every burst of the data ports FIXED with at most 16 beats at the address with the bits below the memory width cleared (monitor of the harness); the buffer address is the FIFO window of the memory model (PKG-12), which maps the k-th beat to the k-th word of a backing range: MM2S sends the backing data in order, S2MM writes the packet packed from lane 0 into the backing range and nothing else: the window word and 16 bytes on each side of it, 16 bytes before and after the backing range and the rest of the last word of each transfer stay unwritten; MM2S_DMACR.Keyhole in DR mode changes nothing (interpretation I1) |
CO-SG-11 |
test_sg_boundary_rate (TC-CO-20) |
Two S2MM packets of 16 KB over buffers of 1 KB and of 4 KB at multiples of 64 bytes and over buffers of 4 KB 1 byte above a multiple of 64 bytes (at most the longest buffer length), with a write response latency of 0, 50 and 100 clock cycles, the stream without gaps: every packet complete; the clock cycles per buffer boundary (the difference of the 1 KB and 4 KB runs over the difference of their numbers of boundaries), the clock cycles per KB that unaligned buffers add and the average stream beats per clock cycle are logged and listed in the verification report |
CO-SG-10 |
test_sg_write_overlap (TC-CO-21) |
Scenario sg_write_overlap, the write responses of the data memory 400 clock cycles late. First a packet of one chunk that ends in its buffer in the SLVERR range, no further packet before the halt: the next descriptor received no byte and is not written, CURDESC at the failed one, DMASlvErr with DMAIntErr, Err_Irq, Halted, the third descriptor unchanged, both buffers unwritten. Then an S2MM packet over three buffers whose first buffer, one chunk, lies in the SLVERR range; the second buffer, two chunks, is written before the error arrives: DMASlvErr with DMAIntErr, Err_Irq, Halted, CURDESC at the first descriptor, its status with the error flags and Cmplt 0, the status of the second with its bytes, RXSOF and RXEOF 0 and Cmplt 1, the third descriptor unchanged and its buffer not written; the bytes of the second buffer in memory beyond the failing one, 16 unwritten bytes around it; after the end of the discarded packet, a soft reset and a new start the next packet is complete in a new chain |
CO-SG-13 |