efc: Avoid repeated afe_adc_spis in Shuttler IO#2921
Conversation
|
I see another bug: the AFE I/O is appended to the global list every time artiq/artiq/gateware/targets/efc.py Line 277 in 4aec72d I suggest: (1) capitalizing the names of global variables to clearly mark them as such (2) either: shuttler_io = SHUTTLER_IO + afe_adc_ioor, simply: platform.add_extension(afe_adc_io)This bug is silent right now since the class is only instantiated once per Python process, but it's certainly not best practices and could cause confusion in future use cases. |
4aec72d to
15fdd6e
Compare
These will require wrapping For (1) all Python global constants will be capitalized in a separate PR since that's going to be a repo-wide change. |
afe_adc_spi from Shuttler IOafe_adc_spis in Shuttler IO
15fdd6e to
b0e1b96
Compare
afe_adc_spis in Shuttler IOafe_adc_spis in Shuttler IO
b736cf0 to
529419d
Compare
Having repeated `afe_adc_spi` entries of disparate Shuttler AFE HW revs caused the ADC SPI communication of Shuttler AFE v1.3 to be incoherent, and it seemed to behave the same regardless of the specified Shuttler AFE HW rev. Co-authored-by: occheung <dc@m-labs.hk>
529419d to
333b022
Compare
|
Force-pushes re: metadata like commit message changes and authorship. |
Having repeated
afe_adc_spientries for disparate Shuttler AFE HW revs caused the ADC SPI communication of Shuttler AFE v1.3 to be incoherent, and it seemed to behave the same regardless of the specified Shuttler AFE HW rev.