cms-L1TK / project_generation_scripts

Python scripts to generate the wiring map of the tracklet pattern recognition & the top-level HDL that calls the HLS modules in the Hybrid Chain.
1 stars 2 forks source link

Make compatible with new tf_mem version that uses array for nentries … #16

Closed tomalin closed 3 years ago

tomalin commented 3 years ago

This update makes the VHDL written by the scripts compatible with the new tf_mem*.vhd interface created by HLS PR https://github.com/cms-L1TK/firmware-hls/pull/135 (which has now been merged) . It means that the assignment of the "nent_o" port of the memories is now done in a single line of VHDL for each memory.

To do this, the signals "nentries" inside the SectorProcessor.vhd written by the scripts are now arrays, with one element for each page of the memory.

tomalin commented 3 years ago

Nice to add comments to the functions to explain further. We should probably move towards adding docstrings rather than comments in with a prepended "#", that is more pythonic and easier to look at. See e.g. this stack exchange post

Done. All non-trivial functions in WriteVHDLSyntax.py now have a comment explaining their purpose. And all such comments in any function in WriteVHDLSyntax.py, WriteHDLUtils.py or generator_hdl.py now enclosed in triple quotes.

pwittich commented 3 years ago

In the future the docstrings don't need a comment character.