From 8e5df9cc934a61de8c942430d981bd45cbf45f8e Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Thu, 8 Oct 2020 13:47:42 +0100 Subject: [PATCH] rework jtag test to use JTAG class not DMITAP --- src/soc/debug/jtag.py | 4 +-- src/soc/debug/jtagutils.py | 4 +-- src/soc/debug/test/dmi_sim.py | 1 + src/soc/debug/test/test_jtag_tap_srv.py | 45 +++++++++++-------------- 4 files changed, 24 insertions(+), 30 deletions(-) diff --git a/src/soc/debug/jtag.py b/src/soc/debug/jtag.py index c7c96454..2a9507a1 100644 --- a/src/soc/debug/jtag.py +++ b/src/soc/debug/jtag.py @@ -60,7 +60,7 @@ class Pins: class JTAG(DMITAP, Pins): - def __init__(self, pinset): + def __init__(self, pinset, wb_data_wid=64): DMITAP.__init__(self, ir_width=4) Pins.__init__(self, pinset) @@ -77,7 +77,7 @@ class JTAG(DMITAP, Pins): # create and connect wishbone self.wb = self.add_wishbone(ircodes=[5, 6, 7], - address_width=29, data_width=64, + address_width=29, data_width=wb_data_wid, name="jtag_wb") # create DMI2JTAG (goes through to dmi_sim()) diff --git a/src/soc/debug/jtagutils.py b/src/soc/debug/jtagutils.py index 1dee686c..f0b1830d 100644 --- a/src/soc/debug/jtagutils.py +++ b/src/soc/debug/jtagutils.py @@ -41,7 +41,7 @@ def tms_data_getset(dut, tms, d_len, d_in=0): tdi = 1 if (d_in & (1<