realtimeradio / souk-firmware

Simons Observatory UK RFSoC Firmware
GNU General Public License v3.0
3 stars 1 forks source link

typo in v7.1 sync delay #40

Closed sr-cdf closed 7 months ago

sr-cdf commented 7 months ago

Getting started with version 7.1, first issue:

In [62]: r.print_status_all()
Block fpga stats:
antname: None
fw_build_time: 2024-04-11T14:59:19
fw_supported: True
fw_type: 2
fw_version: 7.1.0.0
host: localhost.localdomain:localhost
programmed: True
sw_version: 0.0.1+v7.1
timestamp: 2024-04-15T16:37:01.041614
Block rfdc stats:
ADC0_enabled: True
ADC0_pll: 1
ADC0_state: 15
ADC1_enabled: False
ADC2_enabled: False
ADC3_enabled: False
DAC0_enabled: True
DAC0_pll: 1
DAC0_state: 15
DAC1_enabled: False
DAC2_enabled: False
DAC3_enabled: False
lmkfile: None
lmxfile: None
Block sync stats:
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-62-9bf990e7fca2> in <module>
----> 1 r.print_status_all()

~/py3venv/lib/python3.6/site-packages/souk_mkid_readout/souk_mkid_readout.py in print_status_all(self, use_color, ignore_ok)
    183             for blockname, block in self.blocks.items():
    184                 print('Block %s stats:' % blockname)
--> 185                 block.print_status(use_color=use_color, ignore_ok=ignore_ok)
    186 
    187     def program(self, fpgfile=None):

~/py3venv/lib/python3.6/site-packages/souk_mkid_readout/blocks/block.py in print_status(self, use_color, ignore_ok, use_logger)
     74         }
     75         try:
---> 76             stats, flags = self.get_status()
     77         except TypeError:
     78             # If the block was too lazy to provide flags

~/py3venv/lib/python3.6/site-packages/souk_mkid_readout/blocks/sync.py in get_status(self)
    499         stats['uptime_fpga_clks'] = self.uptime()
    500         stats['period_fpga_clks'] = self.period()
--> 501         stats['sync_delay'] = self.get_sync_delay()
    502         stats['ext_count'] = self.count_ext()
    503         stats['error_count'] = self.get_error_count()

AttributeError: 'Sync' object has no attribute 'get_sync_delay'

Looks like the attribute is called get_delay, not get_sync_delay.

jack-h commented 7 months ago

Sorry, this stuff really needs some automated tests. Fixed in main

On Mon, 15 Apr 2024 at 16:40, Sam Rowe @.***> wrote:

Getting started with version 7.1, first issue:

In [62]: r.print_status_all() Block fpga stats: antname: None fw_build_time: 2024-04-11T14:59:19 fw_supported: True fw_type: 2 fw_version: 7.1.0.0 host: localhost.localdomain:localhost programmed: True sw_version: 0.0.1+v7.1 timestamp: 2024-04-15T16:37:01.041614 Block rfdc stats: ADC0_enabled: True ADC0_pll: 1 ADC0_state: 15 ADC1_enabled: False ADC2_enabled: False ADC3_enabled: False DAC0_enabled: True DAC0_pll: 1 DAC0_state: 15 DAC1_enabled: False DAC2_enabled: False DAC3_enabled: False lmkfile: None lmxfile: None Block sync stats:

AttributeError Traceback (most recent call last)

in ----> 1 r.print_status_all() ~/py3venv/lib/python3.6/site-packages/souk_mkid_readout/souk_mkid_readout.py in print_status_all(self, use_color, ignore_ok) 183 for blockname, block in self.blocks.items(): 184 print('Block %s stats:' % blockname) --> 185 block.print_status(use_color=use_color, ignore_ok=ignore_ok) 186 187 def program(self, fpgfile=None): ~/py3venv/lib/python3.6/site-packages/souk_mkid_readout/blocks/block.py in print_status(self, use_color, ignore_ok, use_logger) 74 } 75 try: ---> 76 stats, flags = self.get_status() 77 except TypeError: 78 # If the block was too lazy to provide flags ~/py3venv/lib/python3.6/site-packages/souk_mkid_readout/blocks/sync.py in get_status(self) 499 stats['uptime_fpga_clks'] = self.uptime() 500 stats['period_fpga_clks'] = self.period() --> 501 stats['sync_delay'] = self.get_sync_delay() 502 stats['ext_count'] = self.count_ext() 503 stats['error_count'] = self.get_error_count() AttributeError: 'Sync' object has no attribute 'get_sync_delay' Looks like the attribute is called attribute is called get_delay, not get_sync_delay. — Reply to this email directly, view it on GitHub , or unsubscribe . You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>