From: Tim Newsome Date: Mon, 13 Feb 2017 19:13:04 +0000 (-0800) Subject: dbus -> dmi X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ae67cde583dd4ff0226d0b878f5f158b92d2bd54;p=riscv-isa-sim.git dbus -> dmi --- diff --git a/riscv/debug_defines.h b/riscv/debug_defines.h index f9fdaa0..5666f46 100644 --- a/riscv/debug_defines.h +++ b/riscv/debug_defines.h @@ -572,31 +572,31 @@ #define DTM_INIT__SETUP__CLAMP 0x0c #define DTM_INIT__RUN 0x0d #define DTM_DTMCONTROL 0x10 -#define DTM_DTMCONTROL_DBUSRESET_OFFSET 16 -#define DTM_DTMCONTROL_DBUSRESET_LENGTH 1 -#define DTM_DTMCONTROL_DBUSRESET (0x1 << DTM_DTMCONTROL_DBUSRESET_OFFSET) +#define DTM_DTMCONTROL_DMIRESET_OFFSET 16 +#define DTM_DTMCONTROL_DMIRESET_LENGTH 1 +#define DTM_DTMCONTROL_DMIRESET (0x1 << DTM_DTMCONTROL_DMIRESET_OFFSET) #define DTM_DTMCONTROL_IDLE_OFFSET 12 #define DTM_DTMCONTROL_IDLE_LENGTH 3 #define DTM_DTMCONTROL_IDLE (0x7 << DTM_DTMCONTROL_IDLE_OFFSET) -#define DTM_DTMCONTROL_DBUSSTAT_OFFSET 10 -#define DTM_DTMCONTROL_DBUSSTAT_LENGTH 2 -#define DTM_DTMCONTROL_DBUSSTAT (0x3 << DTM_DTMCONTROL_DBUSSTAT_OFFSET) +#define DTM_DTMCONTROL_DMISTAT_OFFSET 10 +#define DTM_DTMCONTROL_DMISTAT_LENGTH 2 +#define DTM_DTMCONTROL_DMISTAT (0x3 << DTM_DTMCONTROL_DMISTAT_OFFSET) #define DTM_DTMCONTROL_ABITS_OFFSET 4 #define DTM_DTMCONTROL_ABITS_LENGTH 6 #define DTM_DTMCONTROL_ABITS (0x3f << DTM_DTMCONTROL_ABITS_OFFSET) #define DTM_DTMCONTROL_VERSION_OFFSET 0 #define DTM_DTMCONTROL_VERSION_LENGTH 4 #define DTM_DTMCONTROL_VERSION (0xf << DTM_DTMCONTROL_VERSION_OFFSET) -#define DTM_DBUS 0x11 -#define DTM_DBUS_ADDRESS_OFFSET 34 -#define DTM_DBUS_ADDRESS_LENGTH abits -#define DTM_DBUS_ADDRESS (((1L<dmi_read(address, &value)) { - dbus = set_field(dbus, DBUS_DATA, value); + dmi = set_field(dmi, DMI_DATA, value); } else { success = false; } } - if (success && op == DBUS_OP_READ_WRITE) { + if (success && op == DMI_OP_READ_WRITE) { success = dm->dmi_write(address, data); } if (success) { - dbus = set_field(dbus, DBUS_OP, DBUS_OP_STATUS_SUCCESS); + dmi = set_field(dmi, DMI_OP, DMI_OP_STATUS_SUCCESS); } else { - dbus = set_field(dbus, DBUS_OP, DBUS_OP_STATUS_FAILED); + dmi = set_field(dmi, DMI_OP, DMI_OP_STATUS_FAILED); } - D(fprintf(stderr, "dbus=0x%lx\n", dbus)); + D(fprintf(stderr, "dmi=0x%lx\n", dmi)); } break; } diff --git a/riscv/jtag_dtm.h b/riscv/jtag_dtm.h index 6d89c04..97ce521 100644 --- a/riscv/jtag_dtm.h +++ b/riscv/jtag_dtm.h @@ -48,7 +48,7 @@ class jtag_dtm_t // constructor. const unsigned abits = 6; uint32_t dtmcontrol; - uint64_t dbus; + uint64_t dmi; jtag_state_t state;