We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6acf0eb commit c4fe99cCopy full SHA for c4fe99c
ctrl.v
@@ -109,13 +109,26 @@ always @(posedge clk)
109
else if(present_state == execute)
110
begin
111
$display("in execute");
112
-
+ if(opcode == alu_op)
113
+ begin
114
+ if(mm == 4'b1000)
115
116
+ alu_op <= 2'b01;
117
+ end
118
+ else
119
120
+ alu_op <= 2'b00;
121
122
123
end
124
// mem
125
else if(present_state == mem)
126
127
$display("in mem");
128
+ if(op_code == alu_op)
129
130
+ rf_we <= 1;
131
132
133
// write back
134
else if(present_state == writeback)
0 commit comments