From f3e44b0c265b4fdcbcf1d9b09ffe0d4ba90945ac Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Thu, 1 Apr 2021 23:05:51 +0100 Subject: [PATCH] show how to get the boundary scan information from the JSON file generated by "make mkpinpux" in soc --- ls180/pre_pnr/test.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/ls180/pre_pnr/test.py b/ls180/pre_pnr/test.py index c73790b..f86be15 100644 --- a/ls180/pre_pnr/test.py +++ b/ls180/pre_pnr/test.py @@ -7,10 +7,27 @@ from cocotb.binary import BinaryValue 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.debug.jtag import Pins + # # Helper functions # +def get_jtag_boundary(): + """gets the list of information for jtag boundary scan + """ + # currently only a subset of pins is enabled. nuisance + subset = ['uart', + # 'mtwi', - disabled for now + 'eint', 'gpio', 'mspi0', + # 'mspi1', - disabled for now + # 'pwm', 'sd0', - disabled for now + 'sdr'] + pins = Pins(get_pinspecs(subset=subset)) + return pins + + def setup_sim(dut, *, clk_period, run): """Initialize CPU and setup clock""" @@ -115,3 +132,10 @@ def idcode_run(dut): dut._log.info("IDCODE test completed") + +# demo / debug how to get boundary scan names. run "python3 test.py" +if __name__ == '__main__': + pinouts = get_jtag_boundary() + for pin in pinouts: + # example: ('eint', '2', , 'eint_2', 125) + print (pin) -- 2.30.2