Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: m-labs/artiq
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 9af12230c8f5
Choose a base ref
...
head repository: m-labs/artiq
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: cfe72c72a241
Choose a head ref
  • 3 commits
  • 5 files changed
  • 1 contributor

Commits on Mar 3, 2016

  1. Copy the full SHA
    b662a6f View commit details
  2. Copy the full SHA
    a901971 View commit details
  3. Copy the full SHA
    cfe72c7 View commit details
Showing with 34 additions and 29 deletions.
  1. +2 −2 artiq/gateware/nist_clock.py
  2. +1 −1 artiq/gateware/nist_qc2.py
  3. +14 −8 artiq/gateware/soc.py
  4. +15 −8 artiq/gateware/targets/kc705.py
  5. +2 −10 artiq/gateware/targets/pipistrello.py
4 changes: 2 additions & 2 deletions artiq/gateware/nist_clock.py
Original file line number Diff line number Diff line change
@@ -38,8 +38,8 @@
Subsignal("rst", Pins("LPC:LA25_P")),
IOStandard("LVTTL")),

("i2c", 0,
Subsignal("scl", Pins("LPC:IIC_SLC")),
("i2c_fmc", 0,
Subsignal("scl", Pins("LPC:IIC_SCL")),
Subsignal("sda", Pins("LPC:IIC_SDA")),
IOStandard("LVCMOS25")),

2 changes: 1 addition & 1 deletion artiq/gateware/nist_qc2.py
Original file line number Diff line number Diff line change
@@ -48,7 +48,7 @@
Subsignal("rst", Pins("LPC:LA25_P")),
IOStandard("LVTTL")),

("i2c", 0,
("i2c_fmc", 0,
Subsignal("scl", Pins("LPC:IIC_SCL")),
Subsignal("sda", Pins("LPC:IIC_SDA")),
IOStandard("LVCMOS25")),
22 changes: 14 additions & 8 deletions artiq/gateware/soc.py
Original file line number Diff line number Diff line change
@@ -32,11 +32,17 @@ def __init__(self):
self.mem_map["mailbox"] | 0x80000000, 4)

self.submodules.timer_kernel = timer.Timer()
timer_csrs = self.timer_kernel.get_csrs()
timerwb = wishbone.CSRBank(timer_csrs)
self.submodules += timerwb
self.kernel_cpu.add_wb_slave(mem_decoder(self.mem_map["timer_kernel"]),
timerwb.bus)
self.add_csr_region("timer_kernel",
self.mem_map["timer_kernel"] | 0x80000000, 32,
timer_csrs)
self.register_kernel_cpu_csrdevice("timer_kernel")

def register_kernel_cpu_csrdevice(self, name):
# make sure the device is not getting connected to the comms-CPU already
assert self.csr_map[name] is None

csrs = getattr(self, name).get_csrs()
bank = wishbone.CSRBank(csrs)
self.submodules += bank
self.kernel_cpu.add_wb_slave(mem_decoder(self.mem_map[name]),
bank.bus)
self.add_csr_region(name,
self.mem_map[name] | 0x80000000, 32,
csrs)
23 changes: 15 additions & 8 deletions artiq/gateware/targets/kc705.py
Original file line number Diff line number Diff line change
@@ -134,6 +134,7 @@ def __init__(self, cpu_type="or1k", **kwargs):
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.register_kernel_cpu_csrdevice("rtio")
self.config["RTIO_FINE_TS_WIDTH"] = self.rtio.fine_ts_width
self.submodules.rtio_moninj = rtio.MonInj(rtio_channels)

@@ -154,13 +155,6 @@ def add_rtio(self, rtio_channels):
self.ethphy.crg.cd_eth_rx.clk,
self.ethphy.crg.cd_eth_tx.clk)

rtio_csrs = self.rtio.get_csrs()
self.submodules.rtiowb = wishbone.CSRBank(rtio_csrs)
self.kernel_cpu.add_wb_slave(mem_decoder(self.mem_map["rtio"]),
self.rtiowb.bus)
self.add_csr_region("rtio", self.mem_map["rtio"] | 0x80000000, 32,
rtio_csrs)

self.submodules.rtio_analyzer = rtio.Analyzer(self.rtio,
self.get_native_sdram_if())

@@ -297,8 +291,17 @@ def __init__(self, cpu_type="or1k", **kwargs):
class NIST_QC2(_NIST_Ions):
"""
NIST QC2 hardware, as used in Quantum I and Quantum II, with new backplane
and 12 DDS channels. Current implementation for single backplane.
and 12 DDS channels. Current implementation for single backplane.
"""
csr_map = {
"i2c": None
}
csr_map.update(_NIST_Ions.csr_map)
mem_map = {
"i2c": 0x30000000 # (shadow @0xb0000000)
}
mem_map.update(_NIST_Ions.mem_map)

def __init__(self, cpu_type="or1k", **kwargs):
_NIST_Ions.__init__(self, cpu_type, **kwargs)

@@ -347,6 +350,10 @@ def __init__(self, cpu_type="or1k", **kwargs):
assert self.rtio.fine_ts_width <= 3
self.config["DDS_RTIO_CLK_RATIO"] = 24 >> self.rtio.fine_ts_width

i2c = platform.request("i2c")
self.submodules.i2c = gpio.GPIOTristate([i2c.scl, i2c.sda])
self.register_kernel_cpu_csrdevice("i2c")


def main():
parser = argparse.ArgumentParser(
12 changes: 2 additions & 10 deletions artiq/gateware/targets/pipistrello.py
Original file line number Diff line number Diff line change
@@ -209,20 +209,12 @@ def __init__(self, cpu_type="or1k", **kwargs):
self.config["RTIO_LOG_CHANNEL"] = len(rtio_channels)
rtio_channels.append(rtio.LogChannel())

# RTIO core
# RTIO logic
self.submodules.rtio = rtio.RTIO(rtio_channels)
self.register_kernel_cpu_csrdevice("rtio")
self.config["RTIO_FINE_TS_WIDTH"] = self.rtio.fine_ts_width
self.config["DDS_RTIO_CLK_RATIO"] = 8 >> self.rtio.fine_ts_width
self.submodules.rtio_moninj = rtio.MonInj(rtio_channels)

# CPU connections
rtio_csrs = self.rtio.get_csrs()
self.submodules.rtiowb = wishbone.CSRBank(rtio_csrs)
self.kernel_cpu.add_wb_slave(mem_decoder(self.mem_map["rtio"]),
self.rtiowb.bus)
self.add_csr_region("rtio", self.mem_map["rtio"] | 0x80000000, 32,
rtio_csrs)

self.submodules.rtio_analyzer = rtio.Analyzer(self.rtio,
self.get_native_sdram_if())