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

Impossibility of using spare Urukul alongside with SUServo #2309

Open
thomasfire opened this issue Jan 19, 2024 · 1 comment
Open

Impossibility of using spare Urukul alongside with SUServo #2309

thomasfire opened this issue Jan 19, 2024 · 1 comment
Assignees

Comments

@thomasfire
Copy link
Contributor

Bug Report

One-Line Summary

Combining Urukul with and without SUServo in the same configuration result in compiler error when trying to use both.

Issue Details

Steps to Reproduce



class DDSTest(EnvExperiment):
    def build(self):
        self.setattr_device("core")
        self.setattr_device("urukul2_ch2")
        self.setattr_device("urukul2_cpld")

        self.setattr_device("suservo0")
        self.setattr_device("urukul0_cpld")
        self.setattr_device("suservo0_ch0")

    @kernel
    def run(self):
        self.core.reset()

        ################### Standalone Urukul ###################
        self.urukul2_cpld.init()
        self.urukul2_ch2.init()
        self.urukul2_ch2.sw.on()
        self.urukul2_ch2.set_att(0.0)
        self.urukul2_ch2.set(frequency=100*MHz, phase=0.0, amplitude=1.0)
        #####################################################

        ################### SUServo Urukul ###################
        self.suservo0.init()
        self.suservo0.set_config(enable=1)

        self.suservo0.set_pgia_mu(0, 1)
        self.urukul0_cpld.set_att(0, 0.0)

        self.suservo0_ch0.set_iir(profile=0, adc=0, kp=0.05, ki=-10000.0, g=0.0)
        self.suservo0_ch0.set_dds(profile=0, frequency=70 * MHz, offset=-0.15)
        self.suservo0_ch0.set(en_out=1, en_iir=1, profile=0)
        #####################################################

Expected Behavior

Every part of the code works fine without errors.

Actual (undesired) Behavior

image

Your System (omit irrelevant parts)

  • ARTIQ version: 7
  • JSON:
{
    "target": "kasli_soc",
    "min_artiq_version": "7.0",
    "variant": "test",
    "hw_rev": "v1.0",
    "base": "standalone",
    "core_addr": "192.168.1.75",
    "peripherals": [
...
        {
            "type": "suservo",
            "sampler_ports": [8, 9],
            "urukul0_ports": [5, 6],
            "urukul1_ports": [7, 10],
            "clk_sel": 2
        },
        {
            "type": "urukul",
            "dds": "ad9910",
            "ports": [3, 4],
            "clk_sel": 2,
            "synchronization": true
        }
...
    ]
}
@dnadlinger
Copy link
Collaborator

To work around this, you can make a subclass of CPLD (empty body) that is used in the device db for the suservo Urukuls. This is what we do in Oxford internally.

Of course, we should implement a workaround like that upstream as well (including integration with the JSON machinery which we are not using yet).

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

3 participants