From 094fc1cfd1aebd3556747e9aca0ea03fc624c441 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Sat, 22 Aug 2015 11:49:38 +0800 Subject: [PATCH] qc2: DDS selection is active low --- artiq/gateware/ad9xxx.py | 5 ++++- artiq/gateware/nist_qc2.py | 6 +++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/artiq/gateware/ad9xxx.py b/artiq/gateware/ad9xxx.py index aa087053f..439ece554 100644 --- a/artiq/gateware/ad9xxx.py +++ b/artiq/gateware/ad9xxx.py @@ -62,7 +62,10 @@ class AD9xxx(Module): self.comb += pads.rst.eq(gpio[0]) else: self.comb += pads.rst_n.eq(~gpio[0]) - self.comb += pads.sel.eq(gpio[1:]) + if hasattr(pads, "sel"): + self.comb += pads.sel.eq(gpio[1:]) + else: + self.comb += pads.sel_n.eq(~gpio[1:]) bus_r_gpio = Signal() self.comb += If(bus_r_gpio, diff --git a/artiq/gateware/nist_qc2.py b/artiq/gateware/nist_qc2.py index 9d6896781..da3997f91 100644 --- a/artiq/gateware/nist_qc2.py +++ b/artiq/gateware/nist_qc2.py @@ -26,9 +26,9 @@ fmc_adapter_io = [ "LPC:LA11_N LPC:LA12_N LPC:LA11_P LPC:LA12_P " "LPC:LA07_N LPC:LA08_N LPC:LA07_P LPC:LA08_P " "LPC:LA04_N LPC:LA03_N LPC:LA04_P LPC:LA03_P")), - Subsignal("sel", Pins("LPC:LA24_N LPC:LA29_P LPC:LA28_P LPC:LA29_N " - "LPC:LA28_N LPC:LA31_P LPC:LA30_P LPC:LA31_N " - "LPC:LA30_N LPC:LA33_P LPC:LA33_N")), + Subsignal("sel_n", Pins("LPC:LA24_N LPC:LA29_P LPC:LA28_P LPC:LA29_N " + "LPC:LA28_N LPC:LA31_P LPC:LA30_P LPC:LA31_N " + "LPC:LA30_N LPC:LA33_P LPC:LA33_N")), Subsignal("fud", Pins("LPC:LA21_N")), Subsignal("wr_n", Pins("LPC:LA24_P")), Subsignal("rd_n", Pins("LPC:LA25_N")),