fixed instruction fetch during stall
Stefan Schuermans

Stefan Schuermans commited on 2012-02-09 21:31:07
Showing 1 changed files, with 5 additions and 1 deletions.

... ...
@@ -269,9 +269,13 @@ BEGIN
269 269
         END IF;
270 270
     END PROCESS p_sync_pc;
271 271
 
272
-    p_fetch: PROCESS(n_pc, i_instr_data)
272
+    p_fetch: PROCESS(s_stall, r_pc, n_pc, i_instr_data)
273 273
     BEGIN
274
+        IF s_stall = '1' THEN
275
+            o_instr_addr <= r_pc;
276
+        ELSE
274 277
             o_instr_addr <= n_pc;
278
+        END IF;
275 279
         s_instr      <= i_instr_data;
276 280
     END PROCESS p_fetch;
277 281
 
278 282