Skip to content

Commit 7a1e4cb

Browse files
mwalleSebastien Bourdeauducq
authored and
Sebastien Bourdeauducq
committedNov 30, 2012
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 <michael@walle.cc>
1 parent 293a62d commit 7a1e4cb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎verilog/lm32/lm32_debug.v

+1-1
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ wire [0:breakpoints-1]bp_match_n; // Indicates if a h/w instructio
167167

168168
reg [`LM32_WPC_C_RNG] wpc_c[0:watchpoints-1]; // Watchpoint enable
169169
reg [`LM32_WORD_RNG] wp[0:watchpoints-1]; // Watchpoint address
170-
wire [0:watchpoints]wp_match_n; // Indicates if a h/w data watchpoint matched
170+
wire [0:watchpoints-1]wp_match_n; // Indicates if a h/w data watchpoint matched
171171

172172
wire debug_csr_write_enable; // Debug CSR write enable (from either a wcsr instruction of external debugger)
173173
wire [`LM32_WORD_RNG] debug_csr_write_data; // Data to write to debug CSR

0 commit comments

Comments
 (0)
Please sign in to comment.