test_output_beat_declarations

A tile’s declared record shape must be able to hold the beat its RTL emits.

datetime-format declared output_record_words: 1 – 64 bits – while its output_data port is 152 bits wide. Its description said so in prose, in capitals, for the tile’s whole life. Prose is not what the composition layer reads: check_record_width_compatibility compares the declared word counts, and it is detection-only, so a 152-bit beat wired into a one-word consumer would have dropped 11 of the 19 characters with nothing raised.

The guard is deliberately narrow. output_record_words counts words in a logical RECORD, not bits in a beat, and 35 of the 36 literal-width tiles declare MORE words than one beat holds – rolling-moments declares 3 on a 64-bit port and streams them as three consecutive beats. That is the convention and it is fine. The only thing that is never fine is a record declared too small to hold a single beat of itself, which is unsatisfiable under any beat count.

Parameterized widths (OUT_WIDTH-1, SLOTS*128-1) are skipped: their width is not known until elaboration, so there is nothing to compare here.

Attributes

HDL

_PORT

Functions

_literal_bits(source) → int | None

Width of output_data when it is a constant, else None.

_declared_words(definition) → int | None

cores_with_literal_output_ports()

test_a_record_is_wide_enough_for_one_beat_of_itself(...) → None

test_the_guard_actually_inspects_the_rtl() → None

A parse that silently matched nothing would make every case above vacuous.

test_datetime_format_is_the_one_tile_that_widens_its_port() → None

The deviation is real and load-bearing, so it is pinned rather than left

Module Contents

test_output_beat_declarations.HDL
test_output_beat_declarations._PORT
test_output_beat_declarations._literal_bits(source: str) → int | None

Width of output_data when it is a constant, else None.

test_output_beat_declarations._declared_words(definition) → int | None
test_output_beat_declarations.cores_with_literal_output_ports()
test_output_beat_declarations.test_a_record_is_wide_enough_for_one_beat_of_itself(name: str, bits: int, words: int) → None
test_output_beat_declarations.test_the_guard_actually_inspects_the_rtl() → None

A parse that silently matched nothing would make every case above vacuous.

test_output_beat_declarations.test_datetime_format_is_the_one_tile_that_widens_its_port() → None

The deviation is real and load-bearing, so it is pinned rather than left to be rediscovered: every other tile keeps the row-stream contract’s 64-bit port and takes more beats. This one widened the port instead, which is why nothing in the palette can consume it without an adapter.