def __init__(self, pinset):
self.jtag = JTAG({}, "sync")
self.jtag.core_mgr = ResourceManager([], [])
def __init__(self, pinset):
self.jtag = JTAG({}, "sync")
self.jtag.core_mgr = ResourceManager([], [])
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)
def elaborate(self, platform):
m = Module()
m.submodules.jtag = self.jtag
def elaborate(self, platform):
m = Module()
m.submodules.jtag = self.jtag
# create set of pin resources based on the pinset, this is for the core
self.add_resources(resources)
# create set of pin resources based on the pinset, this is for the core
self.add_resources(resources)
# okaaaay, bit of shenanigens going on: the important data structure
# here is Resourcemanager._ports. requests add to _ports, which is
# what needs redirecting. therefore what has to happen is to
# okaaaay, bit of shenanigens going on: the important data structure
# here is Resourcemanager._ports. requests add to _ports, which is
# what needs redirecting. therefore what has to happen is to
if pin is None: continue # skip when pin is None
assert corepin is not None # if pad was None, core should be too
print ("iter", pad, pin.name)
if pin is None: continue # skip when pin is None
assert corepin is not None # if pad was None, core should be too
print ("iter", pad, pin.name)
- print ("existing pads", self.padlookup.keys())
- assert pin.name not in self.padlookup # no overwrites allowed!
+ print ("existing pads", padlookup.keys())
+ assert pin.name not in padlookup # no overwrites allowed!
# now add the IO Shift Register. first identify the type
# then request a JTAG IOConn. we can't wire it up (yet) because
# now add the IO Shift Register. first identify the type
# then request a JTAG IOConn. we can't wire it up (yet) because
# phase is to add JTAG Boundary Scan so it maaay be worth adding?
# at least for the print statements
def get_input(self, pin, port, attrs, invert):
# phase is to add JTAG Boundary Scan so it maaay be worth adding?
# at least for the print statements
def get_input(self, pin, port, attrs, invert):
self._check_feature("single-ended input", pin, attrs,
valid_xdrs=(0,), valid_attrs=None)
self._check_feature("single-ended input", pin, attrs,
valid_xdrs=(0,), valid_attrs=None)
print("No JTAG chain in-between")
m.d.comb += pin.i.eq(self._invert_if(invert, port))
return m
print("No JTAG chain in-between")
m.d.comb += pin.i.eq(self._invert_if(invert, port))
return m
print("No pin named %s, not connecting to JTAG BS" % pin.name)
m.d.comb += pin.i.eq(self._invert_if(invert, port))
return m
print("No pin named %s, not connecting to JTAG BS" % pin.name)
m.d.comb += pin.i.eq(self._invert_if(invert, port))
return m
- (padres, padpin, padport, padattrs) = self.padlookup[pin.name]
+ (padres, padpin, padport, padattrs) = padlookup[pin.name]
io = self.jtag.ios[pin.name]
print (" pad", padres, padpin, padport, attrs)
print (" padpin", padpin.layout)
io = self.jtag.ios[pin.name]
print (" pad", padres, padpin, padport, attrs)
print (" padpin", padpin.layout)
return m
def get_output(self, pin, port, attrs, invert):
return m
def get_output(self, pin, port, attrs, invert):
self._check_feature("single-ended output", pin, attrs,
valid_xdrs=(0,), valid_attrs=None)
self._check_feature("single-ended output", pin, attrs,
valid_xdrs=(0,), valid_attrs=None)
print("No JTAG chain in-between")
m.d.comb += port.eq(self._invert_if(invert, pin.o))
return m
print("No JTAG chain in-between")
m.d.comb += port.eq(self._invert_if(invert, pin.o))
return m
print("No pin named %s, not connecting to JTAG BS" % pin.name)
m.d.comb += port.eq(self._invert_if(invert, pin.o))
return m
print("No pin named %s, not connecting to JTAG BS" % pin.name)
m.d.comb += port.eq(self._invert_if(invert, pin.o))
return m
- (padres, padpin, padport, padattrs) = self.padlookup[pin.name]
+ (padres, padpin, padport, padattrs) = padlookup[pin.name]
io = self.jtag.ios[pin.name]
print (" pad", padres, padpin, padport, padattrs)
print (" pin", padpin.layout)
io = self.jtag.ios[pin.name]
print (" pad", padres, padpin, padport, padattrs)
print (" pin", padpin.layout)
return m
def get_tristate(self, pin, port, attrs, invert):
return m
def get_tristate(self, pin, port, attrs, invert):
self._check_feature("single-ended tristate", pin, attrs,
valid_xdrs=(0,), valid_attrs=None)
self._check_feature("single-ended tristate", pin, attrs,
valid_xdrs=(0,), valid_attrs=None)
- (res, pin, port, attrs) = self.padlookup[pin.name]
+ (res, pin, port, attrs) = padlookup[pin.name]
io = self.jtag.ios[pin.name]
print (" pad", res, pin, port, attrs)
print (" pin", pin.layout)
io = self.jtag.ios[pin.name]
print (" pad", res, pin, port, attrs)
print (" pin", pin.layout)
return m
def get_input_output(self, pin, port, attrs, invert):
return m
def get_input_output(self, pin, port, attrs, invert):
self._check_feature("single-ended input/output", pin, attrs,
valid_xdrs=(0,), valid_attrs=None)
self._check_feature("single-ended input/output", pin, attrs,
valid_xdrs=(0,), valid_attrs=None)
- (padres, padpin, padport, padattrs) = self.padlookup[pin.name]
+ (padres, padpin, padport, padattrs) = padlookup[pin.name]
io = self.jtag.ios[pin.name]
print (" pad", padres, padpin, padport, padattrs)
print (" pin", padpin.layout)
io = self.jtag.ios[pin.name]
print (" pad", padres, padpin, padport, padattrs)
print (" pin", padpin.layout)