From fd54731cf66ccab8fc4096ab9d90cf4660c37ba9 Mon Sep 17 00:00:00 2001 From: Matthew Otto <106996253+Matthew-Otto@users.noreply.github.com> Date: Fri, 5 Jul 2024 09:45:00 -0500 Subject: [PATCH] Update SVF test --- testbench/jtag/svf_convert.py | 2 +- testbench/jtag/test.svf | 14 +++++++++----- testbench/testbench.sv | 2 +- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/testbench/jtag/svf_convert.py b/testbench/jtag/svf_convert.py index 3f61543bf..704115a81 100644 --- a/testbench/jtag/svf_convert.py +++ b/testbench/jtag/svf_convert.py @@ -11,7 +11,7 @@ MAXLEN = 2**LENGTH_BITS def main(): filepath = "testbench/jtag/test.svf" - dest_filepath = "testbench/jtag/test.mem" + dest_filepath = "testbench/jtag/test.memfile" with open(filepath, "r") as file: data = file.read() data = data.lower() diff --git a/testbench/jtag/test.svf b/testbench/jtag/test.svf index 62150cd16..3d8b48850 100644 --- a/testbench/jtag/test.svf +++ b/testbench/jtag/test.svf @@ -1,8 +1,12 @@ // SVF commands to pull to idcode out of jtag module SIR 5 TDI(1); // IDCODE -SDR 32 TDO(DEADBEEF); -SDR 32 TDO(DEADBEAF); // JTAG_Driver should throw error if TDO value doesn't match what is scanned out -RUNTEST 55; -sir 8 !and multiline commands -tdo(99); +SDR 32 TDO(1002AC05); +//SDR 32 TDO(DEADBEAF); ! JTAG_Driver should throw error if TDO value doesn't match what is scanned out +!RUNTEST 55; +SIR 5 TDI(10); // DTMCS +SDR 32 TDO(71) MASK(FFFF8FFF); +SIR 5 TDI(11); // DMI +SDR 41 TDI(4000000006); // Activate DM +SDR 41 TDI(4400000001); // Send Read DMStatus command +SDR 41 TDO(A3) MASK(FF); // Scan out DMStatus diff --git a/testbench/testbench.sv b/testbench/testbench.sv index f32f0b879..3465b062c 100644 --- a/testbench/testbench.sv +++ b/testbench/testbench.sv @@ -583,7 +583,7 @@ module testbench; // TODO: drive jtag clock at 1/10th core clock (variable) if (P.DEBUG_SUPPORTED) begin always @(posedge clk) begin - jtagmemfilename = "../tests/test.svf.memfile"; + jtagmemfilename = "../tests/jtag/test.memfile"; if (LoadMem) begin $readmemh(jtagmemfilename, jtag.MEM); $display("Read memfile %s", jtagmemfilename);