Hdlmake issueshttps://ohwr.org/project/hdl-make/issues2019-06-04T13:31:08Zhttps://ohwr.org/project/hdl-make/issues/96DISCUSSION: Find the best way to support 'attirbutes' kind for modules or files2019-06-04T13:31:08ZNicolas ChevillotDISCUSSION: Find the best way to support 'attirbutes' kind for modules or filesIn LATOME project, hdl-make has been enhanced with the possibility to add attributes to files or modules in Manifests.
The following attributes are added:
* action: uses the module/file only if the action matches
* dependencies: add fixed dependencies to a file, in order for example to compile Intel Quartus files (220model.v/20pack.vhd/altera_mf.v...) in the proper order as some of those files are encrypted and cannot therefore be checked with the VHDL/Verilog parser
* enable: uses the module/file only if the condition is True
* library: overrides the default library for the file. Useful for example to compile Intel Quartus files as they must be compiled in various libraries such that 1 Manifest only is used instead of 1 per library
* preprocess: used to preprocess the file, either replace an environment variable by its content (to have generic code) or calls C-preprocessor to use #if #else #endif constructs
* relations: to generate relation files locally to the Manifest for example if a module is common to many others and does not change like intel Quartus EDA files
* vcom_opt: allows to add a specific VHDL compiler option to the file
Example Manifest.py extracted from LATOME project:
```
# List of modules
modules = {
'local': [
'user_src',
'$REPOSITORY_ROOT_PATH/PoC',
'$REPOSITORY_ROOT_PATH/LATOME/src/ipctrl/src/ipctrl_util',
{'$REPOSITORY_ROOT_PATH/LATOME/src/pattern_generator': {'enable': 'PATTERN_GENERATOR_INTERNAL_ENABLE'}},
],
}
# Default library
library = 'istage'
# List of source files
files = [
{'istage_arch.vhd': {'preprocess': 'cpp'}},
'istage_comp.vhd',
'istage_ent.vhd',
]
```
This implementation is a choice. Other implementations can be made. Let's discuss on the best way to implement it.Tristan GingoldTristan Gingold