Closed tomalin closed 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.
In the future the docstrings don't need a comment character.
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.