Skip to content

Commit

Permalink
lm32: fix watchpoints
Browse files Browse the repository at this point in the history
The wp_match_n vector is off by one. Which results in undefined states, at
least in simulation.

Signed-off-by: Michael Walle <michael@walle.cc>
  • Loading branch information
mwalle authored and Sebastien Bourdeauducq committed Nov 30, 2012
1 parent 293a62d commit 7a1e4cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion verilog/lm32/lm32_debug.v
Expand Up @@ -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
Expand Down

0 comments on commit 7a1e4cb

Please sign in to comment.