From: Luke Kenneth Casson Leighton Date: Thu, 8 Apr 2021 23:24:42 +0000 (+0100) Subject: sort out pc reset when DMI interface requests reset X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=504e7cf208acdcbb275a0cd6a951491ff303509b;p=soc.git sort out pc reset when DMI interface requests reset --- 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<