~ruther/verilog-riscv-semestral-project

ref: 7581533cf757a3434d732348b90205ff6be3b404 verilog-riscv-semestral-project/src/stages/fetch.sv -rw-r--r-- 378 bytes
7581533c — Rutherther fix: temporarily turn off switching fetch valid 1 year, 4 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import cpu_types::*;

module fetch(
  input        clk,
  input [31:0] pc,
  input [31:0] mem_instruction,
  input        jump,

  output       stage_status_t stage_out
);
  assign stage_out.instruction.instruction = mem_instruction;
  assign stage_out.pc = pc;

  assign stage_out.valid = 1; // !jump; -- TODO make jumps one cycle after
  assign stage_out.ready = 1;
endmodule
Do not follow this link