Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

artiq_ddb_template does not handle AD9910 & AD9912 Urukuls together on the same Kasli / Kasli SoC #2664

Open
dimitsev opened this issue Jan 30, 2025 · 2 comments

Comments

@dimitsev
Copy link

dimitsev commented Jan 30, 2025

Bug Report

  1. When at least one AD9910 Urukul and at least one AD9912 Urukul are present together on the same Kasli / Kasli SoC
  2. and when device_db.py is generated in the usual manner with artiq_ddb_template,

then self.setattr_device(f"urukul5_cpld"); self.urukul5_cpld.init() will not have the desired effect for the AD9912 Urukuls. (I think, at least.)

Fact is that the following work-around is suggested by knowledgeable people:

  • Prepend import urukul_workaround to device_db.py. Create urukul_workaround.py in the same directory as device.py with contents:
from artiq.coredevice import urukul
class CPLD(urukul.CPLD):
    pass
  • Find device_db["urukul5_cpld"] for all AD9912 Urukuls in device_db.py and change "module": "artiq.coredevice.urukul" to "module": "urukul_workaround".

I don't want to execute the above steps manually every single time, so I have written short script that executes them automatically.

Suggested bug fix

EITHER make artiq_ddb_template execute the above steps. The relevant lines are:

OR fix whatever needs to be fixed under the hood to let AD9910 Urukuls and AD9912 Urukuls find their CPLD classes correctly.

@Spaqin
Copy link
Collaborator

Spaqin commented Jan 30, 2025

Related #2309 (simpler workaround is to put the dummy CPLD class in device_db itself)

will not have the desired effect for the AD9912 Urukuls. (I think, at least.)

Well, artiq_sinara_tester works fine with both types; what's actually wrong in this case?

@dimitsev
Copy link
Author

dimitsev commented Jan 30, 2025

Well, artiq_sinara_tester works fine with both types; what's actually wrong in this case?

@Spaqin : I only know that Creotech gave us the workaround described above for a crate that contains 5x AD9910 Urukul and 1x AD9912 Urukul. I have not yet tested anything myself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants