Skip to content

Commit b714137

Browse files
committedNov 19, 2016
phaser: 150 MHz rtio/jesd clock
1 parent 0ee47e7 commit b714137

File tree

2 files changed

+14
-19
lines changed

2 files changed

+14
-19
lines changed
 

‎artiq/examples/phaser/device_db.pyon

+5-5
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"module": "artiq.coredevice.core",
1313
"class": "Core",
1414
"arguments": {
15-
"ref_period": 1e-9,
15+
"ref_period": 5/6,
Has a conversation. Original line has a conversation.
1616
"external_clock": True
1717
}
1818
},
@@ -54,24 +54,24 @@
5454
"type": "local",
5555
"module": "artiq.coredevice.sawg",
5656
"class": "SAWG",
57-
"arguments": {"channel_base": 4, "parallelism": 4}
57+
"arguments": {"channel_base": 4, "parallelism": 2}
5858
},
5959
"sawg1": {
6060
"type": "local",
6161
"module": "artiq.coredevice.sawg",
6262
"class": "SAWG",
63-
"arguments": {"channel_base": 7, "parallelism": 4}
63+
"arguments": {"channel_base": 7, "parallelism": 2}
6464
},
6565
"sawg2": {
6666
"type": "local",
6767
"module": "artiq.coredevice.sawg",
6868
"class": "SAWG",
69-
"arguments": {"channel_base": 10, "parallelism": 4}
69+
"arguments": {"channel_base": 10, "parallelism": 2}
7070
},
7171
"sawg3": {
7272
"type": "local",
7373
"module": "artiq.coredevice.sawg",
7474
"class": "SAWG",
75-
"arguments": {"channel_base": 13, "parallelism": 4}
75+
"arguments": {"channel_base": 13, "parallelism": 2}
7676
}
7777
}

‎artiq/gateware/targets/kc705.py

+9-14
Original file line numberDiff line numberDiff line change
@@ -397,13 +397,13 @@ def __init__(self, platform, refclk):
397397
p_STARTUP_WAIT="FALSE", o_LOCKED=pll_locked,
398398

399399
p_REF_JITTER1=0.01, p_REF_JITTER2=0.01,
400-
p_CLKIN1_PERIOD=4.0, p_CLKIN2_PERIOD=4.0,
400+
p_CLKIN1_PERIOD=20/3, p_CLKIN2_PERIOD=20/3,
401401
i_CLKIN1=0, i_CLKIN2=refclk,
402402
# Warning: CLKINSEL=0 means CLKIN2 is selected
403403
i_CLKINSEL=~self._clock_sel.storage,
404404

405-
# VCO @ 1GHz when using 250MHz input
406-
p_CLKFBOUT_MULT=8, p_DIVCLK_DIVIDE=2,
405+
# VCO @ 1.2GHz when using 150MHz input
406+
p_CLKFBOUT_MULT=8, p_DIVCLK_DIVIDE=1,
407407
i_CLKFBIN=self.cd_rtio.clk,
408408
i_RST=self._pll_reset.storage,
409409

@@ -419,17 +419,17 @@ def __init__(self, platform, refclk):
419419
self._pll_locked.status)
420420
]
421421
self.cd_rtio.clk.attr.add("keep")
422-
platform.add_period_constraint(self.cd_rtio.clk, 8.)
422+
platform.add_period_constraint(self.cd_rtio.clk, 20/3)
423423

424424

425425
class AD9154JESD(Module, AutoCSR):
426426
def __init__(self, platform):
427427
ps = JESD204BPhysicalSettings(l=4, m=4, n=16, np=16)
428428
ts = JESD204BTransportSettings(f=2, s=1, k=16, cs=1)
429429
settings = JESD204BSettings(ps, ts, did=0x5a, bid=0x5)
430-
linerate = 10e9
431-
refclk_freq = 250e6
432-
fabric_freq = 250*1000*1000
430+
linerate = 6e9
431+
refclk_freq = 150e6
432+
fabric_freq = 150*1000*1000
433433

434434
sync_pads = platform.request("ad9154_sync")
435435
self.jsync = Signal()
@@ -494,16 +494,11 @@ def __init__(self, platform):
494494

495495
self.submodules.jesd = AD9154JESD(platform)
496496

497-
self.sawgs = [sawg.Channel(width=16, parallelism=4) for i in range(4)]
497+
self.sawgs = [sawg.Channel(width=16, parallelism=2) for i in range(4)]
498498
self.submodules += self.sawgs
499499

500-
x = Signal()
501-
y = Signal()
502-
z = Signal()
503-
self.sync.jesd += x.eq(~x), z.eq(x == y)
504-
self.sync.rio_phy += y.eq(x)
505500
for conv, ch in zip(self.jesd.core.sink.flatten(), self.sawgs):
506-
self.sync.jesd += conv.eq(Mux(z, Cat(ch.o[:2]), Cat(ch.o[2:])))
501+
self.sync.jesd += conv.eq(Cat(ch.o))
507502

508503

509504
class Phaser(MiniSoC, AMPSoC):

0 commit comments

Comments
 (0)
Please sign in to comment.