Urukul 9910 sync: CompileError: type error (incompatible types) #273

Closed
opened 2022-04-22 13:09:47 +08:00 by mwojcik · 1 comment
*** Testing Urukul DDSes.
urukul0_cpld: initializing CPLD...
urukul0_cpld: testing attenuator digital control...
urukul0_cpld: done
Calibrating inter-device synchronization...
Traceback (most recent call last):
  File "/nix/store/38wk05jhdcg8nnsb1m15m3n38ana5f9l-python3.9-artiq-8.0.unknown.beta/bin/.artiq_sinara_tester-wrapped", line 9, in <module>
    sys.exit(main())
  File "/nix/store/zxbwijgrf9kr0xqkjqgk1gyl83l6a1jq-python3-3.9.11-env/lib/python3.9/site-packages/artiq/frontend/artiq_sinara_tester.py", line 808, in main
    experiment.run(tests)
  File "/nix/store/zxbwijgrf9kr0xqkjqgk1gyl83l6a1jq-python3-3.9.11-env/lib/python3.9/site-packages/artiq/frontend/artiq_sinara_tester.py", line 759, in run
    getattr(self, f"test_{name}")()
  File "/nix/store/zxbwijgrf9kr0xqkjqgk1gyl83l6a1jq-python3-3.9.11-env/lib/python3.9/site-packages/artiq/frontend/artiq_sinara_tester.py", line 319, in test_urukuls
    sync_delay_seed, io_update_delay = self.calibrate_urukul(channel_dev)
  File "/nix/store/zxbwijgrf9kr0xqkjqgk1gyl83l6a1jq-python3-3.9.11-env/lib/python3.9/site-packages/artiq/language/core.py", line 79, in run_on_core
    self.core.run(fake_method, args, kwargs)
  File "/nix/store/zxbwijgrf9kr0xqkjqgk1gyl83l6a1jq-python3-3.9.11-env/lib/python3.9/site-packages/artiq/coredevice/core.py", line 83, in run
    kernel_library = self.compile(function, args, kwargs, embedding_map)
  File "/nix/store/zxbwijgrf9kr0xqkjqgk1gyl83l6a1jq-python3-3.9.11-env/lib/python3.9/site-packages/artiq/coredevice/core.py", line 77, in compile
    return self.compiler.compile_method_to_mem(obj, name, args, embedding_map)
nac3artiq.CompileError: type error (error when getting type of field `sync_data` (Incompatible types: artiq.coredevice.ad9910.SyncDataEeprom and artiq.coredevice.ad9910.SyncDataUser)) at parameter #0 when calling kernel function

Well, at least that is marked as NAC3TODO:
https://github.com/m-labs/artiq/blob/nac3/artiq/coredevice/ad9910.py#L201

(disregarding another nac3todo in that file, to support generic EEPROM drivers)

What would be the course of action here? I assume the type of the class cannot change in a variable? First thing that popped to my mind was to merge both SyncDataUser and SyncDataEeprom into one bigger class and switch between user and eeprom internally.

``` *** Testing Urukul DDSes. urukul0_cpld: initializing CPLD... urukul0_cpld: testing attenuator digital control... urukul0_cpld: done Calibrating inter-device synchronization... Traceback (most recent call last): File "/nix/store/38wk05jhdcg8nnsb1m15m3n38ana5f9l-python3.9-artiq-8.0.unknown.beta/bin/.artiq_sinara_tester-wrapped", line 9, in <module> sys.exit(main()) File "/nix/store/zxbwijgrf9kr0xqkjqgk1gyl83l6a1jq-python3-3.9.11-env/lib/python3.9/site-packages/artiq/frontend/artiq_sinara_tester.py", line 808, in main experiment.run(tests) File "/nix/store/zxbwijgrf9kr0xqkjqgk1gyl83l6a1jq-python3-3.9.11-env/lib/python3.9/site-packages/artiq/frontend/artiq_sinara_tester.py", line 759, in run getattr(self, f"test_{name}")() File "/nix/store/zxbwijgrf9kr0xqkjqgk1gyl83l6a1jq-python3-3.9.11-env/lib/python3.9/site-packages/artiq/frontend/artiq_sinara_tester.py", line 319, in test_urukuls sync_delay_seed, io_update_delay = self.calibrate_urukul(channel_dev) File "/nix/store/zxbwijgrf9kr0xqkjqgk1gyl83l6a1jq-python3-3.9.11-env/lib/python3.9/site-packages/artiq/language/core.py", line 79, in run_on_core self.core.run(fake_method, args, kwargs) File "/nix/store/zxbwijgrf9kr0xqkjqgk1gyl83l6a1jq-python3-3.9.11-env/lib/python3.9/site-packages/artiq/coredevice/core.py", line 83, in run kernel_library = self.compile(function, args, kwargs, embedding_map) File "/nix/store/zxbwijgrf9kr0xqkjqgk1gyl83l6a1jq-python3-3.9.11-env/lib/python3.9/site-packages/artiq/coredevice/core.py", line 77, in compile return self.compiler.compile_method_to_mem(obj, name, args, embedding_map) nac3artiq.CompileError: type error (error when getting type of field `sync_data` (Incompatible types: artiq.coredevice.ad9910.SyncDataEeprom and artiq.coredevice.ad9910.SyncDataUser)) at parameter #0 when calling kernel function ``` Well, at least that is marked as NAC3TODO: https://github.com/m-labs/artiq/blob/nac3/artiq/coredevice/ad9910.py#L201 (disregarding another nac3todo in that file, to support generic EEPROM drivers) What would be the course of action here? I assume the type of the class cannot change in a variable? First thing that popped to my mind was to merge both SyncDataUser and SyncDataEeprom into one bigger class and switch between user and eeprom internally.

#69
Just change the type annotation to SyncDataEeprom for testing for now.

https://git.m-labs.hk/M-Labs/nac3/issues/69 Just change the type annotation to SyncDataEeprom for testing for now.
sb10q closed this issue 2022-04-22 15:23:23 +08:00
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: M-Labs/nac3#273
There is no content yet.