mirror of
https://github.com/m-labs/artiq.git
synced 2024-12-25 03:08:27 +08:00
ad9910/2: add sw invariant only when passed
This commit is contained in:
parent
82831a85b6
commit
37ec97eb28
@ -49,7 +49,7 @@ class AD9910:
|
||||
:param pll_cp: DDS PLL charge pump setting.
|
||||
:param pll_vco: DDS PLL VCO range selection.
|
||||
"""
|
||||
kernel_invariants = {"chip_select", "cpld", "core", "bus", "sw",
|
||||
kernel_invariants = {"chip_select", "cpld", "core", "bus",
|
||||
"ftw_per_hz", "pll_n", "pll_cp", "pll_vco"}
|
||||
|
||||
def __init__(self, dmgr, chip_select, cpld_device, sw_device=None,
|
||||
@ -61,6 +61,7 @@ class AD9910:
|
||||
self.chip_select = chip_select
|
||||
if sw_device:
|
||||
self.sw = dmgr.get(sw_device)
|
||||
self.kernel_invariants.add("sw")
|
||||
assert 12 <= pll_n <= 127
|
||||
self.pll_n = pll_n
|
||||
assert self.cpld.refclk/4 <= 60e6
|
||||
|
@ -24,7 +24,7 @@ class AD9912:
|
||||
f_ref*pll_n where f_ref is the reference frequency (set in the parent
|
||||
Urukul CPLD instance).
|
||||
"""
|
||||
kernel_invariants = {"chip_select", "cpld", "core", "bus", "sw",
|
||||
kernel_invariants = {"chip_select", "cpld", "core", "bus",
|
||||
"ftw_per_hz", "sysclk", "pll_n"}
|
||||
|
||||
def __init__(self, dmgr, chip_select, cpld_device, sw_device=None,
|
||||
@ -36,6 +36,7 @@ class AD9912:
|
||||
self.chip_select = chip_select
|
||||
if sw_device:
|
||||
self.sw = dmgr.get(sw_device)
|
||||
self.kernel_invariants.add("sw")
|
||||
self.pll_n = pll_n
|
||||
self.sysclk = self.cpld.refclk*pll_n
|
||||
assert self.sysclk <= 1e9
|
||||
|
Loading…
Reference in New Issue
Block a user