cocotb_benches.dau_record_gearbox_tb

Record gearbox: wide beats in, one WHOLE RECORD PER CYCLE out.

Correctness here is nearly trivial — the gearbox is a pure reframing, so the golden is the identity on the record sequence. The property that justifies the core is the RATE, so this bench measures it: under continuous valid input and an always-ready sink it must sustain one record per cycle, which is what turns a 3-cycles-per-record front into a 1-cycle one. A version that was correct but slow would pass a values-only bench and be worthless.

Attributes

_MASK64

Functions

_beat_words(dut) → int

_record_words(dut) → int

_start(dut) → None

_beats(words, beat_words)

_send(dut, beats, *[, gap_pattern]) → None

_collect(dut, count, *[, ready_pattern])

_records(rng, count, record_words)

_run(dut, records, *[, ready_pattern, gap_pattern])

records_reframe_across_beat_boundaries(dut)

The interesting case is a record size that does NOT divide the beat:

sustains_one_record_per_cycle(dut)

THE property this core exists for. A 64-bit front costs N cycles per

a_ragged_tail_beat_emits_no_padding_record(dut)

The final beat is padded to the bus width; the record count — not the

backpressure_and_input_gaps_stay_golden(dut)

back_to_back_batches_rearm(dut)

a_short_stream_reports_a_framing_error(dut)

The record COUNT and the byte length must agree. Nothing else in this

Module Contents

cocotb_benches.dau_record_gearbox_tb._MASK64 = 18446744073709551615
cocotb_benches.dau_record_gearbox_tb._beat_words(dut) → int
cocotb_benches.dau_record_gearbox_tb._record_words(dut) → int
async cocotb_benches.dau_record_gearbox_tb._start(dut) → None
cocotb_benches.dau_record_gearbox_tb._beats(words, beat_words)
async cocotb_benches.dau_record_gearbox_tb._send(dut, beats, *, gap_pattern=(1,)) → None
async cocotb_benches.dau_record_gearbox_tb._collect(dut, count, *, ready_pattern=(1,))
cocotb_benches.dau_record_gearbox_tb._records(rng, count, record_words)
async cocotb_benches.dau_record_gearbox_tb._run(dut, records, *, ready_pattern=(1,), gap_pattern=(1,))
async cocotb_benches.dau_record_gearbox_tb.records_reframe_across_beat_boundaries(dut)

The interesting case is a record size that does NOT divide the beat: 3-word records over 8-word beats straddle every boundary.

async cocotb_benches.dau_record_gearbox_tb.sustains_one_record_per_cycle(dut)

THE property this core exists for. A 64-bit front costs N cycles per N-word record; this must cost one, or the whole point is lost.

async cocotb_benches.dau_record_gearbox_tb.a_ragged_tail_beat_emits_no_padding_record(dut)

The final beat is padded to the bus width; the record count — not the byte length — decides how many records exist.

async cocotb_benches.dau_record_gearbox_tb.backpressure_and_input_gaps_stay_golden(dut)
async cocotb_benches.dau_record_gearbox_tb.back_to_back_batches_rearm(dut)
async cocotb_benches.dau_record_gearbox_tb.a_short_stream_reports_a_framing_error(dut)

The record COUNT and the byte length must agree. Nothing else in this bench exercises the error branch — without this, deleting it entirely would still pass.