From 69fe59c5d5ae9da40abcd1b09b47cf6c18089890 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Tue, 13 Apr 2021 17:38:55 +0100 Subject: [PATCH] resolving pin names (to litex ls180) --- ls180/pre_pnr/test.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/ls180/pre_pnr/test.py b/ls180/pre_pnr/test.py index dae23b5..cb1611c 100644 --- a/ls180/pre_pnr/test.py +++ b/ls180/pre_pnr/test.py @@ -10,7 +10,7 @@ from c4m.nmigen.jtag.tap import IOType from c4m.cocotb.jtag.c4m_jtag import JTAG_Master from c4m.cocotb.jtag.c4m_jtag_svfcocotb import SVF_Executor -from soc.config.pinouts import get_pinspecs +from soc.config.pinouts import get_pinspecs, load_pinouts from soc.debug.jtag import Pins @@ -40,9 +40,13 @@ class DUTWrapper: class JTAGPin: def __init__(self, pin): + self.pin = pin self.type_ = pin[2] self.name = pin[3] + def __repr__(self): + return str(self.pin) + def log(self, wrap): if self.type_ == IOType.In: core_i = getattr(wrap.ti, f"{self.name}__core__i").value @@ -287,7 +291,12 @@ def boundary_scan_reset(dut): # demo / debug how to get boundary scan names. run "python3 test.py" if __name__ == '__main__': + chip = load_pinouts() + pinmap = chip['litex.map'] pinouts = get_jtag_boundary() for pin in pinouts: - # example: ('eint', '2', , 'eint_2', 125) print (pin) + # example: ('eint', '2', , 'eint_2', 125) + padname = pinmap[pin.pin[3]] + print (" ", padname) + -- 2.30.2