-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIF_ID.v
32 lines (25 loc) · 806 Bytes
/
IF_ID.v
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
`timescale 1ns / 1ps
////////////////////////////////////////////////////////////////////////////
// Michael Tangy
// ECE 483-001
// 7/14/2015
// This file contains the behavioral description of the Instruction fetch/
// Instruction decode module used in our pipelined CPU
////////////////////////////////////////////////////////////////////////////
module IF_ID(
input clk,
input rst,
input [31:0] in,
output [31:0] out
);
reg [31:0] inst;
assign out = inst;
always @ (posedge clk) begin
if(rst == 1)
begin
inst <= 0;
end
else
inst <= in;
end
endmodule