~ruther/verilog-riscv-semestral-project

ref: 89310129c1470fe2c2cdd10d9b6c88d5eab747cc verilog-riscv-semestral-project/src/stages/writeback.sv -rw-r--r-- 379 bytes
89310129 — Rutherther feat: implement pipeline 1 year, 4 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
module writeback(
  input         clk,

  output [4:0]  reg_a_write,
  output        reg_we,
  output [31:0] reg_write,

  input         stage_status_t stage_in
);
  assign reg_a_write = stage_in.data.address;
  assign reg_we = stage_in.valid && stage_in.data.valid && stage_in.instruction.reg_we; // stage_in.data.address != 0
  assign reg_write = stage_in.data.data;
endmodule
Do not follow this link