mirror of
https://github.com/supleed2/ELEC50010-IAC-CW.git
synced 2024-11-10 01:35:49 +00:00
Fix regfile hazard from storing when inputs change
This commit is contained in:
parent
f2f8e05010
commit
847bf92add
|
@ -27,7 +27,7 @@ always_comb begin
|
||||||
readdata2 = memory[readreg2]; //combinatorially output register value based on read port 2 selector
|
readdata2 = memory[readreg2]; //combinatorially output register value based on read port 2 selector
|
||||||
end
|
end
|
||||||
|
|
||||||
always_ff @(posedge clk) begin
|
always_ff @(negedge clk) begin
|
||||||
if (regwrite) begin
|
if (regwrite) begin
|
||||||
case (opcode)
|
case (opcode)
|
||||||
6'b100000: begin //lb, load byte
|
6'b100000: begin //lb, load byte
|
||||||
|
|
Loading…
Reference in a new issue