Closed jsturdy closed 5 years ago
@mexanick, also rebased and I think all your comments addressed. Would still like a cursory review from @evka85 to ensure that the framework makes sense from the FW perspective
This looks very nice! Although it would be nice to introduce a few most common high level functions like:
This looks very nice! Although it would be nice to introduce a few most common high level functions like:
Absolutely, this was just to have the necessary components before handing the expansion task off. Just wanted to have the core set up in the "right" way, i.e., if certain actions need to happen for every type of transaction, putting those in the wrappers (e.g., "disable monitoring")
Oh.. yeah disable monitoring I think should just always be done, so maybe even put it in sendScaCommand function. But if this way of ADC readout tests ok (which it does on GE2/1), then I would like to take the firmware based ADC monitoring out completely, because its potential to interfere with other functions as well as non-portability between GE1/1 and GE2/1..
Actually after taking a second look, I think you overlooked setting the GEM_AMC.SLOW_CONTROL.SCA.MANUAL_CONTROL.LINK_ENABLE_MASK, which defines to which OHs the command will go. It's a bitmask, I think you should just write linkMask to it on sendSCACommand()
@evka85, OK, I added the monitoring on/off at the level of the wrappers (one layer abstracted from the sendSCACommand
to minimize the number of times it is toggled)
I also added the per-link setting of the module reset, but in the python tool this is protected with a "check if the register exists", but perhaps this is only relevant for old firmware? If it needs to be protected, that can be added by the next person.
Description
Initial placeholders for SCA interface functionality, as discussed in #93
sendSCACommand
and then interfaces to the different blocks that call this commandsendSCACommandWithReply
for transactions that expect returned dataCTRL
interfaceADC
interface placeholderGPIO
interface placeholderI2C
interface placeholderTypes of changes
Motivation and Context
Need to be able to reliably interface with the various interfaces on the SCA for GPIO/ADC/I2C
How Has This Been Tested?
Has not been, for now just placeholders and framework for future development.