test_generated_cores¶
Generated cores go through the same seams as checked-in ones.
A tile whose HDL is rendered is the first thing in this registry that has no
file beside its entry. That is a place where a parallel mechanism could
easily grow – a build-layer side channel that renders somewhere the registry
cannot see. The rule against it is the one already learned the hard way: a
tile known only to the build layer never reaches core_names, so its HDL
goes unstaged, its spec hash collides with its siblings, and its resources
go unpriced.
So: the generator is reached through the registry, its parameters are hydra
configuration like every other fact, and the rendered file arrives at
source_path() – the same accessor dependency closure and synthesis
already use.
Attributes¶
Functions¶
|
|
|
|
|
Rendering implicitly on read would hide which parameters produced the |
|
|
The inverse mistake: rendering over a hand-written tile would replace |
|
|
The parameters are hydra-injected, not Python literals — the same rule |
|
Two points must not render identical HDL, or the spec hash could not |
|
A generated file with no record of its inputs is untraceable back to |
Module Contents¶
- test_generated_cores._BASE: dict[str, Any]¶
- test_generated_cores._registered_point(name: str) dau_core.fixed_point.ExpDatapath¶
- test_generated_cores.EXP_EXACT¶
- test_generated_cores.EXP_LIGHT¶
- test_generated_cores._definition(**overrides) dau_core.cores.CoreDefinition¶
- test_generated_cores.test_a_generated_core_refuses_its_source_until_rendered(tmp_path: pathlib.Path, monkeypatch) None¶
Rendering implicitly on read would hide which parameters produced the file that then gets synthesized.
Points the render root at an empty directory: the session fixture renders the real palette, and without this isolation that fixture would satisfy the very refusal under test.
- test_generated_cores.test_rendering_writes_the_source_the_entry_names(tmp_path: pathlib.Path) None¶
- test_generated_cores.test_a_checked_in_core_refuses_to_be_rendered() None¶
The inverse mistake: rendering over a hand-written tile would replace reviewed HDL with generated text.
- test_generated_cores.test_the_operating_point_comes_from_configuration(tmp_path: pathlib.Path) None¶
The parameters are hydra-injected, not Python literals — the same rule the rest of the registry follows. Instantiating from a config tree is the thing that must work, so it is what is tested.
- test_generated_cores.test_each_operating_point_renders_a_different_source() None¶
Two points must not render identical HDL, or the spec hash could not tell them apart and one measurement would be quoted for both.
- test_generated_cores.test_the_rendered_source_carries_the_parameters_that_made_it() None¶
A generated file with no record of its inputs is untraceable back to the configuration that produced it.