Skip to content

Commit 86f3465

Browse files
committed
revert cpld gateware to backwards compatible
* to a strictly backwards compatible (to v1.3 proto rev 8) implementation for v1.4 hardware * exception: OSK (which is high now and was low in v1.3) * to make the transition to a future v1.4-specific gateware and ARTIQ coredevice driver smoother and is a fallback. close #8
1 parent 9056d98 commit 86f3465

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

urukul.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33

44
# increment this if the behavior (LEDs, registers, EEM pins) changes
5-
__proto_rev__ = 0
5+
__proto_rev__ = 8
66

77

88
class SR(Module):
@@ -161,8 +161,7 @@ class Status(Module):
161161
| SMP_ERR | 4 | DDS[0:3].SMP_ERR |
162162
| PLL_LOCK | 4 | DDS[0:3].PLL_LOCK |
163163
| IFC_MODE | 4 | IFC_MODE[0:3] |
164-
| PROTO_REV | 3 | Protocol revision (see __proto_rev__) |
165-
| HW_REV | 4 | Hardware revision |
164+
| PROTO_REV | 7 | Protocol revision (see __proto_rev__) |
166165
| DUMMY | 1 | Not used, not usable, undefined |
167166
"""
168167
def __init__(self, platform, n=4):
@@ -171,23 +170,20 @@ def __init__(self, platform, n=4):
171170
("smp_err", n),
172171
("pll_lock", n),
173172
("ifc_mode", 4),
174-
("proto_rev", 3),
175-
("hw_rev", 4),
173+
("proto_rev", 7),
176174
("dummy", 1)
177175
])
178176
self.comb += [
179177
self.data.ifc_mode.eq(platform.lookup_request("ifc_mode")),
180178
self.data.proto_rev.eq(__proto_rev__),
181-
self.data.hw_rev.eq(platform.request("hw_rev")),
179+
# self.data.hw_rev.eq(platform.request("hw_rev")),
182180
]
183181
for i in range(n):
184182
dds = platform.lookup_request("dds", i)
185183
self.comb += [
186184
self.data.rf_sw[i].eq(dds.rf_sw),
187185
self.data.smp_err[i].eq(dds.smp_err),
188-
self.data.pll_lock[i].eq(dds.pll_lock
189-
| dds.drover # FIXME debug
190-
),
186+
self.data.pll_lock[i].eq(dds.pll_lock),
191187
]
192188

193189

0 commit comments

Comments
 (0)