diff options
Diffstat (limited to 'core/rtl/fetch.sv')
-rw-r--r-- | core/rtl/fetch.sv | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/core/rtl/fetch.sv b/core/rtl/fetch.sv new file mode 100644 index 0000000..7cbff6a --- /dev/null +++ b/core/rtl/fetch.sv @@ -0,0 +1,20 @@ +module fetch +( + input logic clk, + input logic rst_l, + + // IMEM interface + output logic [63:0] if_imem_addr_IF +); + +logic [63:0] pc_IF; +logic [63:0] pcNxt_IF; + +assign if_imem_addr_IF = pc_IF; // Always fetch PC from IMEM, truncate addresses to be 64 bit aligned? + +// Program Counter (PC) +assign pcNxt_IF = pc_IF + 64'd4; + +AFFR #(.WIDTH(64)) ff_IF_pc ( .clk(clk), .rst_l(rst_l), .en(1'b1), .q(pc_IF), .d(pcNxt_IF) ); + +endmodule |