cocotb_benches.dau_hash_grouped_aggregation_tb¶
Hash-mode grouped field-sum aggregation tile against its golden: one record per DISTINCT key with input in any order, a signed-key-ascending drain, overflow as a defined close-out, and fresh state per batch — plus the randomized-delay patience harness that binds every stateful tile.
Attributes¶
Functions¶
|
Skip predicate for cases whose POINT is holding several groups at |
The property the ordered tile cannot have: the answer does not |
|
Keys congruent modulo CAPACITY share a hash slot; the linear probe |
|
A new key with the table full invalidates the batch — never an |
|
Overflow NOT on the final row exercises the DISCARD path: the rest |
|
group_count reads the batch's emitted groups, and exactly one |
|
The binding LID requirement: randomized relay-station delays on |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Accept the close-out. |
Module Contents¶
- cocotb_benches.dau_hash_grouped_aggregation_tb.CAPACITY¶
- cocotb_benches.dau_hash_grouped_aggregation_tb._MASK32 = 4294967295¶
- cocotb_benches.dau_hash_grouped_aggregation_tb._ROWS¶
- cocotb_benches.dau_hash_grouped_aggregation_tb._MASK = 10¶
- cocotb_benches.dau_hash_grouped_aggregation_tb._needs_slots(count: int) bool¶
Skip predicate for cases whose POINT is holding several groups at once: at a table too small for them the case would test the overflow path instead, which its own case already covers. Weakening the fixture to fit would weaken it at the default capacity too.
- async cocotb_benches.dau_hash_grouped_aggregation_tb.hash_grouped_matches_golden(dut)¶
- async cocotb_benches.dau_hash_grouped_aggregation_tb.hash_grouped_is_permutation_invariant(dut)¶
The property the ordered tile cannot have: the answer does not depend on arrival order.
- async cocotb_benches.dau_hash_grouped_aggregation_tb.hash_grouped_drain_is_signed_key_ascending(dut)¶
- async cocotb_benches.dau_hash_grouped_aggregation_tb.hash_grouped_all_four_fields(dut)¶
- async cocotb_benches.dau_hash_grouped_aggregation_tb.hash_grouped_colliding_keys_probe_correctly(dut)¶
Keys congruent modulo CAPACITY share a hash slot; the linear probe must keep them distinct.
- async cocotb_benches.dau_hash_grouped_aggregation_tb.hash_grouped_overflow_is_a_defined_close_out(dut)¶
A new key with the table full invalidates the batch — never an eviction, never a silent drop, and never a partial the host could double-count against its own re-run.
- async cocotb_benches.dau_hash_grouped_aggregation_tb.hash_grouped_overflow_mid_batch_drains_and_recovers(dut)¶
Overflow NOT on the final row exercises the DISCARD path: the rest of the batch is consumed, one error close-out is raised, and the NEXT batch starts from clean state.
- async cocotb_benches.dau_hash_grouped_aggregation_tb.hash_grouped_reports_group_count_and_one_close_out(dut)¶
group_count reads the batch’s emitted groups, and exactly one close-out is raised — checked by stalling status_ready first, so a tile that dropped or repeated it would fail here.
- async cocotb_benches.dau_hash_grouped_aggregation_tb.hash_grouped_full_table_without_a_new_key_succeeds(dut)¶
- async cocotb_benches.dau_hash_grouped_aggregation_tb.hash_grouped_state_is_fresh_per_batch(dut)¶
- async cocotb_benches.dau_hash_grouped_aggregation_tb.hash_grouped_bad_configuration_is_refused(dut)¶
- async cocotb_benches.dau_hash_grouped_aggregation_tb.hash_grouped_torn_row_is_refused(dut)¶
- async cocotb_benches.dau_hash_grouped_aggregation_tb.hash_grouped_is_patient(dut)¶
The binding LID requirement: randomized relay-station delays on every channel change NOTHING about the emitted records.
- cocotb_benches.dau_hash_grouped_aggregation_tb._record_words(groups) list[int]¶
- async cocotb_benches.dau_hash_grouped_aggregation_tb._start(dut) None¶
- async cocotb_benches.dau_hash_grouped_aggregation_tb._run(dut, rows, *, field_mask: int, delay_seed=None, expect_error: bool = False, hold_status: int = 0)¶
- cocotb_benches.dau_hash_grouped_aggregation_tb._pack_rows(rows) list[int]¶
- async cocotb_benches.dau_hash_grouped_aggregation_tb._send_words(dut, words, *, gap=None) None¶
- async cocotb_benches.dau_hash_grouped_aggregation_tb._collect_output(dut, *, stall=None, expect_error: bool = False) list[int]¶
- async cocotb_benches.dau_hash_grouped_aggregation_tb._accept_status(dut, *, hold: int = 0)¶
Accept the close-out.
holdkeeps status_ready low for N cycles once status_valid asserts, checking the status channel obeys the same hold rule as the data channel.