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"""
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', <IOType.In: 1>, 'eint_2', 125)
+ print (pin)