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

Updated the scripts to support generation of files for a CM (slim) chain #45

Closed aryd closed 1 year ago

aryd commented 2 years ago

This pull request adds the capability of generating the code for a chain with combined modules. The combined module code generated runs and mostly produced the correct results. Some further debugging will be needed. Though care was take to not break the old functionality in the script I have not done a systematic test of the old functionality. I don't really know how to do this. This was discussed in one of the HLS meetings and I was still encouraged to go ahead with this pull request.

aehart commented 2 years ago

@aryd In your presentation, you mentioned tweaks to makeReducedConfig.py, but I don't see any changes to that file. Can you add those here?

aryd commented 2 years ago

Andrew,

Sorry I missed this email earlier. I don’t recall a reason. I think at some point I was confused, maybe still am confused, by this special case. I’m currently traveling and I’m not really able to try this out. I suggest that you restore ‘AllStubs’ and if there are problem with the combined module configuration I will look into this when I get back online. (I will mostly be mostly offline until the 27th.)

-Anders

Anders Ryd @.**@.>

On Jun 13, 2022, at 5:14 PM, Andrew Hart @.**@.>> wrote:

@aehart commented on this pull request.


In TrackletGraph.pyhttps://github.com/cms-L1TK/project_generation_scripts/pull/45#discussion_r896141647:

@@ -744,8 +755,8 @@ def add_upstream_proc_modules(aMemModule, ProcList=[], MemList=[]): if aMemModule is None: return ProcList, MemList

@arydhttps://github.com/aryd Without 'AllStubs' in this list and the similar list below in the add_downstream_proc_modules method, the generation of the IRtoTB chain (both with non-combined and with combined modules) fails with the following:

╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮ │ │ │ /home/hart/Research/CMS/tracklets/firmware-hls/emData/project_generation_scripts/./generator_hdl │ │ .py:508 in │ │ │ │ 505 │ │ │ 506 │ for mem in memory_list: │ │ 507 │ │ # Get widths of all needed memories │ │ ❱ 508 │ │ TrackletGraph.populate_bitwidths(mem,args.hls_dir) │ │ 509 │ │ TrackletGraph.populate_is_binned(mem,args.hls_dir) │ │ 510 │ │ │ │ 511 │ │ # Determine which memories need numEntries output ports │ │ /home/hart/Research/CMS/tracklets/firmware-hls/emData/project_generation_scripts/TrackletGraph.p │ │ y:240 in populate_bitwidths │ │ │ │ 237 │ │ elif mem.mtype == "DiskStubWord": │ │ 238 │ │ │ mem.bitwidth = 49 │ │ 239 │ │ else: │ │ ❱ 240 │ │ │ raise ValueError("Bitwidth undefined for "+mem.mtype) │ │ 241 │ │ │ │ 242 │ │ # Populate BX bit width │ │ 243 │ │ if ( mem.mtype == "TrackletProjections" or mem.mtype == "VMProjections" │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ ValueError: Bitwidth undefined for CleanTrack

If I restore 'AllStubs', then it seems to produce correct results in both cases. Was there a reason for removing 'AllStubs'?

— Reply to this email directly, view it on GitHubhttps://github.com/cms-L1TK/project_generation_scripts/pull/45#pullrequestreview-1004959804, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABI4LTLEWD2G5JE5DPCUH5TVO6QE3ANCNFSM5XL6MLZQ. You are receiving this because you were mentioned.Message ID: @.***>