projects
/
pinmux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8904999
)
take record of boundary scan pads to make a set of ports for rtlil
author
Luke Kenneth Casson Leighton
<lkcl@lkcl.net>
Sun, 28 Nov 2021 15:10:15 +0000
(15:10 +0000)
committer
Luke Kenneth Casson Leighton
<lkcl@lkcl.net>
Sun, 28 Nov 2021 15:10:15 +0000
(15:10 +0000)
src/spec/testing_stage1.py
patch
|
blob
|
history
diff --git
a/src/spec/testing_stage1.py
b/src/spec/testing_stage1.py
index b4531b31496c4b6a780642814be11c1d8f5dfadf..1c747a33a410a42d1532286faedad33c6cc07da4 100644
(file)
--- a/
src/spec/testing_stage1.py
+++ b/
src/spec/testing_stage1.py
@@
-132,6
+132,7
@@
class Blinker(Elaboratable):
# record resource lookup between core IO names and pads
self.jtag.padlookup = {}
self.jtag.requests_made = []
# record resource lookup between core IO names and pads
self.jtag.padlookup = {}
self.jtag.requests_made = []
+ self.jtag.boundary_scan_pads = []
memory = Memory(width=32, depth=16)
self.sram = SRAM(memory=memory, bus=self.jtag.wb)
memory = Memory(width=32, depth=16)
self.sram = SRAM(memory=memory, bus=self.jtag.wb)
@@
-182,6
+183,7
@@
class Blinker(Elaboratable):
yield self.jtag.bus.tdo
yield self.jtag.bus.tck
yield self.jtag.bus.tms
yield self.jtag.bus.tdo
yield self.jtag.bus.tck
yield self.jtag.bus.tms
+ yield from self.jtag.boundary_scan_pads
def jtag_request(self, m, name, number=0, *, dir=None, xdr=None):
"""request a Resource (e.g. name="uart", number=0) which will
def jtag_request(self, m, name, number=0, *, dir=None, xdr=None):
"""request a Resource (e.g. name="uart", number=0) which will
@@
-245,7
+247,10
@@
class Blinker(Elaboratable):
io = self.jtag.add_io(iotype=iotype, name=padpin.name) # IOConn
self.jtag.ios[padpin.name] = io # store IOConn Record by pin name
io = self.jtag.add_io(iotype=iotype, name=padpin.name) # IOConn
self.jtag.ios[padpin.name] = io # store IOConn Record by pin name
- # and connect up core to pads based on type
+ # and connect up core to pads based on type. could create
+ # Modules here just like in Platform.get_input/output but
+ # in some ways it is clearer by being simpler to wire them globally
+
if padpin.dir == 'i':
print ("jtag_request add input pin", padpin)
print (" corepin", corepin)
if padpin.dir == 'i':
print ("jtag_request add input pin", padpin)
print (" corepin", corepin)
@@
-255,6
+260,7
@@
class Blinker(Elaboratable):
m.d.comb += corepin.i.eq(io.core.i)
# and padpin to JTAG pad
m.d.comb += io.pad.i.eq(padpin.i)
m.d.comb += corepin.i.eq(io.core.i)
# and padpin to JTAG pad
m.d.comb += io.pad.i.eq(padpin.i)
+ self.jtag.boundary_scan_pads.append(padpin.i)
elif padpin.dir == 'o':
print ("jtag_request add output pin", padpin)
print (" corepin", corepin)
elif padpin.dir == 'o':
print ("jtag_request add output pin", padpin)
print (" corepin", corepin)
@@
-264,6
+270,7
@@
class Blinker(Elaboratable):
m.d.comb += io.core.o.eq(corepin.o)
# and JTAG pad to padpin
m.d.comb += padpin.o.eq(io.pad.o)
m.d.comb += io.core.o.eq(corepin.o)
# and JTAG pad to padpin
m.d.comb += padpin.o.eq(io.pad.o)
+ self.jtag.boundary_scan_pads.append(padpin.o)
elif padpin.dir == 'io':
print ("jtag_request add io pin", padpin)
print (" corepin", corepin)
elif padpin.dir == 'io':
print ("jtag_request add io pin", padpin)
print (" corepin", corepin)
@@
-281,6
+288,10
@@
class Blinker(Elaboratable):
m.d.comb += io.core.oe.eq(corepin.oe)
# and JTAG pad to padpin
m.d.comb += padpin.oe.eq(io.pad.oe)
m.d.comb += io.core.oe.eq(corepin.oe)
# and JTAG pad to padpin
m.d.comb += padpin.oe.eq(io.pad.oe)
+`
+ self.jtag.boundary_scan_pads.append(padpin.i)
+ self.jtag.boundary_scan_pads.append(padpin.o)
+ self.jtag.boundary_scan_pads.append(padpin.oe)
# finally return the *CORE* value just like ResourceManager.request()
# so that the module using this can connect to *CORE* i/o to the
# finally return the *CORE* value just like ResourceManager.request()
# so that the module using this can connect to *CORE* i/o to the