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.coredevice.dds.frequency_to_ftw should work in prepare #621

Closed
dleibrandt opened this issue Nov 17, 2016 · 0 comments
Closed

artiq.coredevice.dds.frequency_to_ftw should work in prepare #621

dleibrandt opened this issue Nov 17, 2016 · 0 comments
Assignees
Labels
Milestone

Comments

@dleibrandt
Copy link
Contributor

I am attempting to speed up some of the code I use for submitting pulses to the RTIO by converting to machine units in prepare (using artiq 2.0). When I try to call artiq.coredevice.dds.frequency_to_ftw in prepare, I get an error TypeError: 'width' is an invalid keyword argument for this function. A test experiment is below:

class UnitConversionDDS(EnvExperiment):
    def build(self):
        self.setattr_device("core")
        self.dds = self.get_device("dds11")
    
    def prepare(self):
        self.ftw = self.dds.frequency_to_ftw(200.*MHz)
        self.pow = self.dds.turns_to_pow(0.5)
        self.asf = self.dds.amplitude_to_asf(0.5)

    @kernel
    def run(self):
        self.core.reset()
        self.dds.set_mu(self.ftw, phase=self.pow, amplitude=self.asf)

Would it be possible to make this work (analogous with issue #529)?

@whitequark whitequark self-assigned this Nov 18, 2016
@sbourdeauducq sbourdeauducq added this to the 2.1 milestone Nov 18, 2016
jordens added a commit that referenced this issue Nov 22, 2016
* master: (23 commits)
  RELEASE_NOTES: update
  pipistrello: add some inputs
  Remove last vestiges of nist_qc1.
  Fully drop AD9858 and kc705-nist_qc1 support (closes #576).
  coredevice.dds: reimplement fully in ARTIQ Python.
  compiler: unbreak casts to int32/int64.
  analyses.constness: fix false positive on x[...].
  inferencer: significantly improve the op-assignment diagnostic.
  Fix tests.
  Move mu_to_seconds, seconds_to_mu to Core.
  artiq_devtool: don't crash on invalid utf-8.
  artiq_devtool: detect a race condition during connect.
  llvm_ir_generator: handle no-op coercions.
  conda: use development version of migen/misoc
  Revert accidentally committed code.
  Revert "gateware: increase RTIO FIFO sizes for NIST_CLOCK. Closes #623"
  analyses.invariant_detection: implement (#622).
  Fix whitespace.
  coredevice.dds: work around the round(numpy.float64()) snafu.
  coredevice.dds: update from obsolete int(width=) syntax (fixes #621).
  ...
jordens added a commit that referenced this issue Nov 22, 2016
* phaser: (23 commits)
  RELEASE_NOTES: update
  pipistrello: add some inputs
  Remove last vestiges of nist_qc1.
  Fully drop AD9858 and kc705-nist_qc1 support (closes #576).
  coredevice.dds: reimplement fully in ARTIQ Python.
  compiler: unbreak casts to int32/int64.
  analyses.constness: fix false positive on x[...].
  inferencer: significantly improve the op-assignment diagnostic.
  Fix tests.
  Move mu_to_seconds, seconds_to_mu to Core.
  artiq_devtool: don't crash on invalid utf-8.
  artiq_devtool: detect a race condition during connect.
  llvm_ir_generator: handle no-op coercions.
  conda: use development version of migen/misoc
  Revert accidentally committed code.
  Revert "gateware: increase RTIO FIFO sizes for NIST_CLOCK. Closes #623"
  analyses.invariant_detection: implement (#622).
  Fix whitespace.
  coredevice.dds: work around the round(numpy.float64()) snafu.
  coredevice.dds: update from obsolete int(width=) syntax (fixes #621).
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants