]> Joshua Wise's Git repositories - firearm.git/blobdiff - Decode.v
Add tests directory.
[firearm.git] / Decode.v
index 495942bee6d7282fb7ed9afa57348f067ef9d641..c63fd9d24422fa05bf0ebe4d7d6db6129f8a00c0 100644 (file)
--- a/Decode.v
+++ b/Decode.v
@@ -2,6 +2,7 @@
 
 module Decode(
        input clk,
+       input stall,
        input [31:0] insn,
        input [31:0] inpc,
        input [31:0] incpsr,
@@ -10,6 +11,7 @@ module Decode(
        output reg [31:0] op1,
        output reg [31:0] op2,
        output reg carry,
+       output reg [31:0] outcpsr,
        output reg [31:0] outspsr,
 
        output reg [3:0] read_0,
@@ -225,11 +227,15 @@ module Decode(
 
        
        always @ (posedge clk) begin
-               op0 <= op0_out;   /* Rn - always */
-               op1 <= op1_out; /* 'operand 2' - Rm */
-               op2 <= op2_out;   /* thirdedge - Rs */
-               carry <= carry_out;
-               outspsr <= inspsr;
+               if (!stall)
+               begin
+                       op0 <= op0_out;   /* Rn - always */
+                       op1 <= op1_out; /* 'operand 2' - Rm */
+                       op2 <= op2_out;   /* thirdedge - Rs */
+                       carry <= carry_out;
+                       outcpsr <= incpsr;
+                       outspsr <= inspsr;
+               end
        end
 
 endmodule
This page took 0.023202 seconds and 4 git commands to generate.