Skip to content
This repository was archived by the owner on Feb 12, 2026. It is now read-only.

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

Merged
tomalin merged 2 commits intomasterfrom
ian_MemNentArr
Mar 14, 2021
Merged

Make compatible with new tf_mem version that uses array for nentries …#16
tomalin merged 2 commits intomasterfrom
ian_MemNentArr

Conversation

@tomalin
Copy link
Copy Markdown
Contributor

@tomalin tomalin commented Feb 25, 2021

This update makes the VHDL written by the scripts compatible with the new tf_mem*.vhd interface created by HLS PR cms-L1TK/firmware-hls#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 tomalin requested a review from djcranshaw February 26, 2021 08:27
@tomalin tomalin requested a review from pwittich March 8, 2021 17:01
Copy link
Copy Markdown
Contributor

@pwittich pwittich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@tomalin
Copy link
Copy Markdown
Contributor Author

tomalin commented Mar 14, 2021

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.

@tomalin tomalin merged commit 358465d into master Mar 14, 2021
@pwittich
Copy link
Copy Markdown
Contributor

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

@tomalin tomalin deleted the ian_MemNentArr branch April 28, 2021 13:10
rzouCERN pushed a commit that referenced this pull request May 28, 2021
#16)

* Make compatible with new tf_mem version that uses array for nentries port

* Use triple quotes for all comments explaining a function
tomalin added a commit that referenced this pull request Jun 8, 2021
* iterate through list of memModules

* working on fixing chain

* templatepars returns empty string

* resolved some bugs with memory lists

* fixed more list stuff

* fix top level file to include all needed modules

* get rid of old comment

* comment out lines

* works for current firmware

* add lut tables to top level

* cleanup

* finish adding luts

* dividing VMStubsTE into VMStubsTEInner and VMStubsTEOuter as VMStubsTEOuter is binned memory

* fixing typos

* undo userlabel addition, fixing matchArgPortNames_TC. fixing writeModuleInst_generic so that it works for portname like outervmstubin

* fixing typos

* iterate through list of memModules

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

* Make compatible with new tf_mem version that uses array for nentries port

* Use triple quotes for all comments explaining a function

* working on fixing chain

* templatepars returns empty string

* resolved some bugs with memory lists

* resolving conflicts due to rebase

* fixed more list stuff

* fix top level file to include all needed modules

* get rid of old comment

* comment out lines

* works for current firmware

* add lut tables to top level

* cleanup

* finish adding luts

* dividing VMStubsTE into VMStubsTEInner and VMStubsTEOuter as VMStubsTEOuter is binned memory

* fixing typos

* undo userlabel addition, fixing matchArgPortNames_TC. fixing writeModuleInst_generic so that it works for portname like outervmstubin

* fixing typos

* simplifying hls ip name for TE as we can use the same ip for all TEs. fix t_arr_8_5b

* fixing small bug with trackpar TE

* fixing index for projout ports on TC

* getting rid of D5 for projout ports on TC

* adding back D5 for projout ports on TC

* moving LUT detection in WriteHDLUtils.py. fixing TE ipname to include seed layers

* removing pointless checks on memModule being a list

* adding TETC chain example to README

Co-authored-by: Fatima Yousef <fy56@lnx231.classe.cornell.edu>
Co-authored-by: Rui Zou <rz393@cornell.edu>
Co-authored-by: Ian Tomalin <ian.tomalin@stfc.ac.uk>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants