(fn, pin, iotype, pin_name, scan_idx) = pin
#serial_tx__core__o, serial_rx__pad__i,
# special-case sdram_clock
- if pin == 'clock' and fn == 'sdr':
- cpu = cpupads['sdram_clock']
- io = iopads['sdram_clock']
- else:
- cpu = cpupads[fn]
- io = iopads[fn]
+ #if pin == 'clock' and fn == 'sdr':
+ # cpu = cpupads['sdram_clock']
+ # io = iopads['sdram_clock']
+ #else:
+ # cpu = cpupads[fn]
+ # io = iopads[fn]
+ cpu = cpupads[fn]
+ io = iopads[fn]
print ("make_jtag_ioconn", scan_idx)
print ("cpupads", cpupads)
print ("iopads", iopads)
if iotype in (IOType.In, IOType.Out):
ps = pin.split("_")
- if pin == 'clock' and fn == 'sdr':
- cpup = cpu
- iop = io
- elif len(ps) == 2 and ps[-1].isdigit():
+ #if pin == 'clock' and fn == 'sdr':
+ # cpup = cpu
+ # iop = io
+ if len(ps) == 2 and ps[-1].isdigit():
pin, idx = ps
idx = int(idx)
print ("ps split", pin, idx)
cpup = getattr(cpu, pin)[idx]
iop = getattr(io, pin)[idx]
- elif pin.isdigit():
+ elif pin.isdigit() and fn != 'eint':
idx = int(pin)
print ("digit", idx)
cpup = cpu[idx]
iop = io[idx]
else:
+ print ("attr", cpu)
cpup = getattr(cpu, pin)
iop = getattr(io, pin)
litexmap[origperiph] = (periph, num)
self.cpupads[origperiph] = self.pad_cm.request(periph, num)
iopads[origperiph] = platform.request(periph, num)
- if periph == 'sdram':
- # special-case sdram clock
- ck = self.pad_cm.request("sdram_clock")
- self.cpupads['sdram_clock'] = ck
- ck = platform.request("sdram_clock")
- iopads['sdram_clock'] = ck
+ #if periph == 'sdram':
+ # # special-case sdram clock
+ # ck = self.pad_cm.request("sdram_clock")
+ # self.cpupads['sdram_clock'] = ck
+ # ck = platform.request("sdram_clock")
+ # iopads['sdram_clock'] = ck
pinset = get_pinspecs(subset=subset)
p = Pins(pinset)
Subsignal("rx", Pins("M1"), IOStandard("LVCMOS33"))
)
+def make_eint(name, num):
+ return (name, num,
+ Subsignal("0", Pins("E0"), IOStandard("LVCMOS33")),
+ Subsignal("1", Pins("E1"), IOStandard("LVCMOS33")),
+ Subsignal("2", Pins("E2"), IOStandard("LVCMOS33")),
+ )
+
def make_gpio(name, num, n_gpio):
pins = []
for i in range(n_gpio):
),
# SDRAM: 39 pins
- ("sdram_clock", 0, Pins("F19"), IOStandard("LVCMOS33")),
+ #("sdram_clock", 0, Pins("F19"), IOStandard("LVCMOS33")),
("sdram", 0,
Subsignal("a", Pins(
"M20 M19 L20 L19 K20 K19 K18 J20",
Subsignal("cke", Pins("F21")),
Subsignal("ba", Pins("P19 N20")),
Subsignal("dm", Pins("U19 E20")),
+ Subsignal("clock", Pins("F19")),
IOStandard("LVCMOS33"),
Misc("SLEWRATE=FAST"),
),
_io.append( make_gpio("gpio", 0, n_gpio) )
# EINT: 3 pins
- _io.append( ("eint", 0, Pins("E0 E1 E2"), IOStandard("LVCMOS33")) )
+ _io.append(make_eint("eint", 0))
# UART0: 2 pins
_io.append(make_uart("uart", 0))
# not connected - eurgh have to adjust this to match the total pincount.
num_nc = 24
num_nc += 4 # mspi1 comments out, litex problems 25mar2021
- #num_nc += 6 # sd0 comments out, litex problems 25mar2021
+ num_nc += 6 # sd0 comments out, litex problems 25mar2021
num_nc += 2 # pwm comments out, litex problems 25mar2021
nc = ' '.join("NC%d" % i for i in range(num_nc))
_io.append(("nc", 0, Pins(nc), IOStandard("LVCMOS33")))
# SDRAM clock
sys_clk = ClockSignal()
- sdr_clk = self.cpu.cpupads['sdram_clock']
+ #sdr_clk = self.cpu.cpupads['sdram_clock']
+ sdr_clk = sdram_pads.clock
#self.specials += DDROutput(1, 0, , sdram_clk)
self.specials += SDROutput(clk=sys_clk, i=sys_clk, o=sdr_clk)
# EINTs - very simple, wire up top 3 bits to ls180 "eint" pins
eintpads = self.cpu.cpupads['eint']
print ("eintpads", eintpads)
- self.comb += self.cpu.interrupt[13:16].eq(eintpads)
+ self.eint_tmp = Signal(len(eintpads))
+ for i in range(len(eintpads)):
+ self.comb += self.cpu.interrupt[13+i].eq(self.eint_tmp[i])
+ self.comb += self.eint_tmp[i].eq(getattr(eintpads, "%d" % i))
# JTAG
jtagpads = platform.request("jtag")