cocotb_benches.dau_fixed_point_divide_tb

The fixed-point divide tile against its golden, with NO tolerance.

The quotient is exact by construction – (A << F) // B – and FLOOR, which is the convention MULSHR already set with its arithmetic shift. The negative cases here are the ones that would catch a tile that truncated toward zero instead, because that is the plausible wrong choice.

Attributes

_MASK32

_INT32_MAX

_INT32_MIN

_ONE

_ROWS

_DIVIDE

Functions

sustained_ingest_meets_registry_floor(dut)

exact_quotients_are_exact(dut)

Cases a human can check by hand, so a wrong scale factor cannot hide.

negative_operands_floor_rather_than_truncate(dut)

The convention check. Truncation toward zero is the plausible wrong

directed_rows_match_golden(dut)

dst_may_be_either_source_and_updates_in_place(dut)

boundaries_around_every_power_of_two(dut)

order_and_count_preserved_with_backpressure(dut)

constrained_random_batches_match_golden(dut)

zero_divisor_reports_domain_error(dut)

overflowing_quotient_reports_range_error(dut)

1.0 / (1 * 2**-16) is 2**32: defined, but not an int32. The tile must

the_representable_negative_extreme_is_accepted(dut)

The range check is inclusive only when the signs agree. -2**31 is

refused_rows_never_escape_while_the_close_out_waits(dut)

The ingest guards are only load-bearing under status backpressure.

torn_row_reports_stream_error(dut)

error_status_survives_backpressure(dut)

_signed32(value) → int

_drive_config(dut, config) → None

_start(dut) → None

_run(dut, rows, config, *[, ready_pattern])

_pack_rows(rows) → list[int]

_send_words(dut, words) → None

_send_rows(dut, rows) → None

_drain_and_record(dut, seen) → None

Drain the output, keeping what came out so a test can assert on it.

_drain_words(dut) → None

_collect_output(dut, ready_pattern, *, expect_words) → list[int]

_assert_quiescent(dut) → None

_expect_status(dut, *, error[, code]) → None

Module Contents

cocotb_benches.dau_fixed_point_divide_tb._MASK32 = 4294967295
cocotb_benches.dau_fixed_point_divide_tb._INT32_MAX = 2147483647
cocotb_benches.dau_fixed_point_divide_tb._INT32_MIN = -2147483648
cocotb_benches.dau_fixed_point_divide_tb._ONE = 65536
cocotb_benches.dau_fixed_point_divide_tb._ROWS
cocotb_benches.dau_fixed_point_divide_tb._DIVIDE
async cocotb_benches.dau_fixed_point_divide_tb.sustained_ingest_meets_registry_floor(dut)
async cocotb_benches.dau_fixed_point_divide_tb.exact_quotients_are_exact(dut)

Cases a human can check by hand, so a wrong scale factor cannot hide.

async cocotb_benches.dau_fixed_point_divide_tb.negative_operands_floor_rather_than_truncate(dut)

The convention check. Truncation toward zero is the plausible wrong answer and differs from the golden on every inexact negative quotient.

async cocotb_benches.dau_fixed_point_divide_tb.directed_rows_match_golden(dut)
async cocotb_benches.dau_fixed_point_divide_tb.dst_may_be_either_source_and_updates_in_place(dut)
async cocotb_benches.dau_fixed_point_divide_tb.boundaries_around_every_power_of_two(dut)
async cocotb_benches.dau_fixed_point_divide_tb.order_and_count_preserved_with_backpressure(dut)
async cocotb_benches.dau_fixed_point_divide_tb.constrained_random_batches_match_golden(dut)
async cocotb_benches.dau_fixed_point_divide_tb.zero_divisor_reports_domain_error(dut)
async cocotb_benches.dau_fixed_point_divide_tb.overflowing_quotient_reports_range_error(dut)

1.0 / (1 * 2**-16) is 2**32: defined, but not an int32. The tile must refuse rather than wrap or saturate.

async cocotb_benches.dau_fixed_point_divide_tb.the_representable_negative_extreme_is_accepted(dut)

The range check is inclusive only when the signs agree. -2**31 is representable and must go through; +2**31 is one too large and must not. A single symmetric comparison would get one of these wrong.

async cocotb_benches.dau_fixed_point_divide_tb.refused_rows_never_escape_while_the_close_out_waits(dut)

The ingest guards are only load-bearing under status backpressure.

Taken promptly, the close-out flushes the pipeline and a refused row would be dropped before it retired, making the guard look redundant. Hold status_ready low for longer than the pipeline is deep and the row reaches the output instead – which is the case that must not emit a quotient the tile does not have.

async cocotb_benches.dau_fixed_point_divide_tb.torn_row_reports_stream_error(dut)
async cocotb_benches.dau_fixed_point_divide_tb.error_status_survives_backpressure(dut)
cocotb_benches.dau_fixed_point_divide_tb._signed32(value: int) → int
cocotb_benches.dau_fixed_point_divide_tb._drive_config(dut, config: dau_core.operators.RowDivideConfig) → None
async cocotb_benches.dau_fixed_point_divide_tb._start(dut) → None
async cocotb_benches.dau_fixed_point_divide_tb._run(dut, rows, config: dau_core.operators.RowDivideConfig, *, ready_pattern=(1,))
cocotb_benches.dau_fixed_point_divide_tb._pack_rows(rows) → list[int]
async cocotb_benches.dau_fixed_point_divide_tb._send_words(dut, words) → None
async cocotb_benches.dau_fixed_point_divide_tb._send_rows(dut, rows) → None
async cocotb_benches.dau_fixed_point_divide_tb._drain_and_record(dut, seen: list[int]) → None

Drain the output, keeping what came out so a test can assert on it.

async cocotb_benches.dau_fixed_point_divide_tb._drain_words(dut) → None
async cocotb_benches.dau_fixed_point_divide_tb._collect_output(dut, ready_pattern, *, expect_words: int) → list[int]
async cocotb_benches.dau_fixed_point_divide_tb._assert_quiescent(dut) → None
async cocotb_benches.dau_fixed_point_divide_tb._expect_status(dut, *, error: bool, code: int = 0) → None