cms-gem-daq-project / reg_utils

0 stars 9 forks source link

Extract minimum number of supported OptoHybrids from HW *or* address table #37

Open jsturdy opened 6 years ago

jsturdy commented 6 years ago

Brief summary of issue

When doing quick tests, to save time, a stripped down address table is often used that is different from the generated FW. In this case, doing something a la:

nOH = readRegister(amc,"GEM_AMC.GEM_SYSTEM.CONFIG.NUM_OF_OH")

will result in looping over, e.g., nOH=12 > generate_size="2" nodes. This will result in errors on read.

A mechanism that could extract the minimum of either the FW or the XML file would be useful to mitigate such issues.

Types of issue

Expected Behavior

If I modify the xml file to change the generate_size from 12 to 2 for quick testing, I would like to avoid having tools throw errors on missing addresses

Possible Solution

For discussion..., but encoding the nOH in an easily extractable parameter in the address table seems simplest.

mexanick commented 5 years ago

well, generate_size field can easily be extracted, however I don't see a really good reason to do so. I would rather advocate for a correct usage (sync-ed) of address table and FW. However if you have a strong use case, I will implement this through node attribute.