forked from M-Labs/artiq
1
0
Fork 0

ad9xxx -> ad9_dds

This commit is contained in:
Sebastien Bourdeauducq 2017-01-04 11:34:52 +01:00
parent 52fda27cb5
commit 86f6b391b7
2 changed files with 8 additions and 8 deletions

View File

@ -4,7 +4,7 @@ from migen.genlib.misc import WaitTimer
from misoc.interconnect import wishbone from misoc.interconnect import wishbone
class AD9xxx(Module): class AD9_DDS(Module):
"""Wishbone interface to the AD9858 and AD9914 DDS chips. """Wishbone interface to the AD9858 and AD9914 DDS chips.
Addresses 0-2**len(pads.a)-1 map the AD9xxx registers. Addresses 0-2**len(pads.a)-1 map the AD9xxx registers.
@ -178,5 +178,5 @@ class _TestPads:
if __name__ == "__main__": if __name__ == "__main__":
pads = _TestPads() pads = _TestPads()
dut = AD9xxx(pads) dut = AD9_DDS(pads)
run_simulation(dut, _test_gen(dut.bus), vcd_name="ad9xxx.vcd") run_simulation(dut, _test_gen(dut.bus), vcd_name="ad9_dds.vcd")

View File

@ -1,13 +1,13 @@
from migen import * from migen import *
from artiq.gateware import ad9xxx from artiq.gateware import ad9_dds
from artiq.gateware.rtio.phy.wishbone import RT2WB from artiq.gateware.rtio.phy.wishbone import RT2WB
class _AD9xxx(Module): class _AD9_DDS(Module):
def __init__(self, ftw_base, pads, nchannels, onehot=False, **kwargs): def __init__(self, ftw_base, pads, nchannels, onehot=False, **kwargs):
self.submodules._ll = ClockDomainsRenamer("rio_phy")( self.submodules._ll = ClockDomainsRenamer("rio_phy")(
ad9xxx.AD9xxx(pads, **kwargs)) ad9_dds.AD9_DDS(pads, **kwargs))
self.submodules._rt2wb = RT2WB(len(pads.a)+1, self._ll.bus) self.submodules._rt2wb = RT2WB(len(pads.a)+1, self._ll.bus)
self.rtlink = self._rt2wb.rtlink self.rtlink = self._rt2wb.rtlink
self.probes = [Signal(32) for i in range(nchannels)] self.probes = [Signal(32) for i in range(nchannels)]
@ -56,6 +56,6 @@ class _AD9xxx(Module):
for c, (probe, ftw) in enumerate(zip(self.probes, ftws))]) for c, (probe, ftw) in enumerate(zip(self.probes, ftws))])
class AD9914(_AD9xxx): class AD9914(_AD9_DDS):
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
_AD9xxx.__init__(self, 0x2d, *args, **kwargs) _AD9_DDS.__init__(self, 0x2d, *args, **kwargs)