- class hdl_registers.generator.c.header.CHeaderGenerator(register_list: RegisterList, output_folder: Path, file_name: str | None = None)
Generate a C code header with register information.
There is no unit test of this class that checks the generated code. It is instead functionally tested in the file test_register_compilation.py. That test generates C code from an example register set, compiles it and performs some run-time assertions in a C program. That test is considered more meaningful and exhaustive than a unit test would be.
- SHORT_DESCRIPTION = 'C header'
- __init__(register_list: RegisterList, output_folder: Path, file_name: str | None = None)
For argument description, please see the super class.
file_name – Optionally specify an explicit result file name. If not specified, the name will be derived from the name of the register list.