Add force-empty hwif_in/hwif_out generation options#39
Add force-empty hwif_in/hwif_out generation options#39Topi-ab wants to merge 1 commit intoSystemRDL:mainfrom
Conversation
|
Hi @Topi-ab, thanks for the PR and the thorough unit tests. Before merging, can you describe what the use case for this new feature would be? In general my preferred workflow for adding new features to this project is to add them first to the upstream SystemVerilog exporter, then merge them into this repo. That maintains feature parity and ensures users of either language have access to both features. |
Hi, The need is to have consistent interface to/from the regblock even when e.g. read direction has zero signals. As the code is now, the interface signature changes depending on RDL contents. With the change on this PR, the signature can be forced to be constant (the record content changes, but the record itself is listed on port declaration, even if empty). |
Description of change
Summary
This PR adds support for forcing HWIF ports to be generated even when the inferred HWIF side is empty.
New capability
hwif_ingeneration.hwif_outgeneration.What changed
CLI / config / exporter API
--force-hwif-in--force-hwif-out[regblock-vhdl]:force_hwif_inforce_hwif_outforce_hwif_inforce_hwif_outHWIF generation behavior
\0_dummy_entry\ : std_logic;Deterministic generated behavior
hwif_in : in <type> := (\0_dummy_entry\ => '0')hwif_out.\0_dummy_entry\ <= '0';Tests
tests/test_force_empty_hwif/Validation
Notes
Checklist