[hw, rv_core_ibex] Enable hardware breakpoints
This change enables hardware breakpoints, which allows the usage of
hbreak in GDB.
Fixes #574
Signed-off-by: Silvestrs Timofejevs <silvestrst@lowrisc.org>
diff --git a/hw/ip/rv_core_ibex/rtl/rv_core_ibex.sv b/hw/ip/rv_core_ibex/rtl/rv_core_ibex.sv
index 0022dcc..90edc6a 100644
--- a/hw/ip/rv_core_ibex/rtl/rv_core_ibex.sv
+++ b/hw/ip/rv_core_ibex/rtl/rv_core_ibex.sv
@@ -16,6 +16,7 @@
parameter int unsigned MHPMCounterWidth = 40,
parameter bit RV32E = 0,
parameter bit RV32M = 1,
+ parameter bit DbgTriggerEn = 1'b1,
parameter int unsigned DmHaltAddr = 32'h1A110800,
parameter int unsigned DmExceptionAddr = 32'h1A110808,
parameter bit PipeLine = 0
@@ -116,6 +117,7 @@
.MHPMCounterWidth ( MHPMCounterWidth ),
.RV32E ( RV32E ),
.RV32M ( RV32M ),
+ .DbgTriggerEn ( DbgTriggerEn ),
.DmHaltAddr ( DmHaltAddr ),
.DmExceptionAddr ( DmExceptionAddr )
) u_core (
diff --git a/hw/top_earlgrey/data/top_earlgrey.sv.tpl b/hw/top_earlgrey/data/top_earlgrey.sv.tpl
index 3db8590..4e1b84e 100644
--- a/hw/top_earlgrey/data/top_earlgrey.sv.tpl
+++ b/hw/top_earlgrey/data/top_earlgrey.sv.tpl
@@ -242,6 +242,7 @@
.MHPMCounterWidth (40),
.RV32E (0),
.RV32M (1),
+ .DbgTriggerEn (1),
.DmHaltAddr (ADDR_SPACE_DEBUG_MEM + dm::HaltAddress),
.DmExceptionAddr (ADDR_SPACE_DEBUG_MEM + dm::ExceptionAddress),
.PipeLine (IbexPipeLine)
diff --git a/hw/top_earlgrey/rtl/autogen/top_earlgrey.sv b/hw/top_earlgrey/rtl/autogen/top_earlgrey.sv
index ab17a23..bf931c7 100644
--- a/hw/top_earlgrey/rtl/autogen/top_earlgrey.sv
+++ b/hw/top_earlgrey/rtl/autogen/top_earlgrey.sv
@@ -273,6 +273,7 @@
.MHPMCounterWidth (40),
.RV32E (0),
.RV32M (1),
+ .DbgTriggerEn (1),
.DmHaltAddr (ADDR_SPACE_DEBUG_MEM + dm::HaltAddress),
.DmExceptionAddr (ADDR_SPACE_DEBUG_MEM + dm::ExceptionAddress),
.PipeLine (IbexPipeLine)