Skip to content

Commit

Permalink
targets/kc705: fix DDS_RTIO_CLK_RATIO for AD9914. Closes #238
Browse files Browse the repository at this point in the history
sbourdeauducq committed Jan 20, 2016
1 parent 3573a87 commit e664fe3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions artiq/gateware/targets/kc705.py
Original file line number Diff line number Diff line change
@@ -133,8 +133,6 @@ def add_rtio(self, rtio_channels):
self.submodules.rtio_crg = _RTIOCRG(self.platform, self.crg.cd_sys.clk)
self.submodules.rtio = rtio.RTIO(rtio_channels)
self.config["RTIO_FINE_TS_WIDTH"] = self.rtio.fine_ts_width
assert self.rtio.fine_ts_width <= 3
self.config["DDS_RTIO_CLK_RATIO"] = 8 >> self.rtio.fine_ts_width
self.submodules.rtio_moninj = rtio.MonInj(rtio_channels)

if isinstance(self.platform.toolchain, XilinxVivadoToolchain):
@@ -198,6 +196,8 @@ def __init__(self, cpu_type="or1k", **kwargs):
rtio_channels.append(rtio.Channel.from_phy(phy))

self.config["RTIO_DDS_CHANNEL"] = len(rtio_channels)
assert self.rtio.fine_ts_width <= 3
self.config["DDS_RTIO_CLK_RATIO"] = 8 >> self.rtio.fine_ts_width
self.config["DDS_CHANNEL_COUNT"] = 8
self.config["DDS_AD9858"] = True
phy = dds.AD9858(platform.request("dds"), 8)
@@ -246,6 +246,8 @@ def __init__(self, cpu_type="or1k", **kwargs):
rtio_channels.append(rtio.Channel.from_phy(phy))

self.config["RTIO_DDS_CHANNEL"] = len(rtio_channels)
assert self.rtio.fine_ts_width <= 3
self.config["DDS_RTIO_CLK_RATIO"] = 24 >> self.rtio.fine_ts_width
self.config["DDS_CHANNEL_COUNT"] = 11
self.config["DDS_AD9914"] = True
self.config["DDS_ONEHOT_SEL"] = True

0 comments on commit e664fe3

Please sign in to comment.