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

Changes for barrel-only config #42

Closed aehart closed 2 years ago

aehart commented 2 years ago

This PR contains changes needed for the barrel-only config.

This includes a script, makeBarrelConfig.py, which generates the wires files for the barrel-only config, very much like makeReducedConfig.py generates wires files for the reduced config.

There are also three fixes in the existing scripts to accommodate the barrel-only config:

tomalin commented 2 years ago

Looks good.

I would expect that I could get the same output with "./generator_hdl.py -r L --mut IR -u 0 -d 7". This command crashes with the misleading message "Cannot find any modules TE_L2PHIK9_L3PHIJ8 " from line https://github.com/aehart/project_generation_scripts/blob/barrel_config/TrackletGraph.py#L624 . Please change this line to:

print("WARNING!! Cannot find any modules with name starting ", module,"!!")

One can avoid this crash by changing https://github.com/aehart/project_generation_scripts/blob/barrel_config/TrackletGraph.py#L379 - L383 to:

   elif mem_type in ['DTCLink']: # Dont try to assign DTC to barrel/disk
                isbarrel = True
                isdisk = True

and https://github.com/aehart/project_generation_scripts/blob/barrel_config/TrackletGraph.py#L390 - L395 to:

        if region == 'L': # barrel project
            if not isbarrel:
                continue
        elif region == 'D': # disk project
            if not isdisk:
                continue

Though the .vhd written is in a different order, so I couldn't check if it's really identical to your recipe for barrel only.

aehart commented 2 years ago

Looks good.

I would expect that I could get the same output with "./generator_hdl.py -r L --mut IR -u 0 -d 7". This command crashes with the misleading message "Cannot find any modules TE_L2PHIK9_L3PHIJ8 " from line https://github.com/aehart/project_generation_scripts/blob/barrel_config/TrackletGraph.py#L624 . Please change this line to:

print("WARNING!! Cannot find any modules with name starting ", module,"!!")

Done.

One can avoid this crash by changing https://github.com/aehart/project_generation_scripts/blob/barrel_config/TrackletGraph.py#L379 - L383 to:

   elif mem_type in ['DTCLink']: # Dont try to assign DTC to barrel/disk
                isbarrel = True
                isdisk = True

and https://github.com/aehart/project_generation_scripts/blob/barrel_config/TrackletGraph.py#L390 - L395 to:

        if region == 'L': # barrel project
            if not isbarrel:
                continue
        elif region == 'D': # disk project
            if not isdisk:
                continue

Though the .vhd written is in a different order, so I couldn't check if it's really identical to your recipe for barrel only.

It isn't the same because it includes the overlap seeds. For example, you can see the TC_L1D1 and TC_L2D1 modules are included, which of course, we do not want yet.

tomalin commented 2 years ago

Are you willing to implement my proposed code change above for L379-383 & L390-395, so the "-r L" option no longer crashes?

aehart commented 2 years ago

Are you willing to implement my proposed code change above for L379-383 & L390-395, so the "-r L" option no longer crashes?

Of course. Done!