Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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>
  • Loading branch information...
commit 7a1e4cb66b21ba0e0f7c18d2b4e7b1afd6776d95 1 parent 293a62d
Michael Walle authored November 30, 2012 sbourdeauducq committed November 30, 2012

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  verilog/lm32/lm32_debug.v
2  verilog/lm32/lm32_debug.v
@@ -167,7 +167,7 @@ wire [0:breakpoints-1]bp_match_n;               // Indicates if a h/w instructio
167 167
 
168 168
 reg [`LM32_WPC_C_RNG] wpc_c[0:watchpoints-1];   // Watchpoint enable
169 169
 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
171 171
 
172 172
 wire debug_csr_write_enable;                    // Debug CSR write enable (from either a wcsr instruction of external debugger)
173 173
 wire [`LM32_WORD_RNG] debug_csr_write_data;     // Data to write to debug CSR

0 notes on commit 7a1e4cb

Please sign in to comment.
Something went wrong with that request. Please try again.