From: Michael Walle Date: Thu, 29 Nov 2012 23:19:44 +0000 (+0100) Subject: lm32: fix watchpoints X-Git-Tag: 24jan2021_ls180~3067^2 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7a1e4cb66b21ba0e0f7c18d2b4e7b1afd6776d95;p=litex.git lm32: fix watchpoints The wp_match_n vector is off by one. Which results in undefined states, at least in simulation. Signed-off-by: Michael Walle --- diff --git a/verilog/lm32/lm32_debug.v b/verilog/lm32/lm32_debug.v index e7f73cb1..5a22a2e0 100644 --- a/verilog/lm32/lm32_debug.v +++ b/verilog/lm32/lm32_debug.v @@ -167,7 +167,7 @@ wire [0:breakpoints-1]bp_match_n; // Indicates if a h/w instructio reg [`LM32_WPC_C_RNG] wpc_c[0:watchpoints-1]; // Watchpoint enable reg [`LM32_WORD_RNG] wp[0:watchpoints-1]; // Watchpoint address -wire [0:watchpoints]wp_match_n; // Indicates if a h/w data watchpoint matched +wire [0:watchpoints-1]wp_match_n; // Indicates if a h/w data watchpoint matched wire debug_csr_write_enable; // Debug CSR write enable (from either a wcsr instruction of external debugger) wire [`LM32_WORD_RNG] debug_csr_write_data; // Data to write to debug CSR