From 504e7cf208acdcbb275a0cd6a951491ff303509b Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Fri, 9 Apr 2021 00:24:42 +0100 Subject: [PATCH] sort out pc reset when DMI interface requests reset --- src/soc/debug/firmware_upload.py | 12 ++++++++--- src/soc/simple/issuer.py | 37 ++++++++++++++++++++------------ 2 files changed, 32 insertions(+), 17 deletions(-) diff --git a/src/soc/debug/firmware_upload.py b/src/soc/debug/firmware_upload.py index b16309cc..7480e8d4 100644 --- a/src/soc/debug/firmware_upload.py +++ b/src/soc/debug/firmware_upload.py @@ -29,6 +29,10 @@ def test_pinset(): 'test': ['io0-', 'io1+', 'io2>', 'io3*'], } +def brev(n, width): + b = '{:0{width}b}'.format(n, width=width) + return int(b[::-1], 2) + # JTAG-ircodes for accessing DMI DMI_ADDR = 8 @@ -83,7 +87,9 @@ def jtag_sim(dut, firmware): print ("dmi ctrl status", bin(status)) # write DMI CTRL register - STOP and RESET - status = yield from writeread_dmi_addr(dut, DBGCore.CTRL, 0b011) + status = yield from writeread_dmi_addr(dut, DBGCore.CTRL, + (1<