-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinsFetch2insDecode.v
44 lines (40 loc) · 1006 Bytes
/
insFetch2insDecode.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
33
34
35
36
37
38
39
40
41
42
43
44
`timescale 1ns / 1ps
//////////////////////////////////////////////////////////////////////////////////
// Company:
// Engineer:
//
// Create Date: 14:22:01 12/04/2015
// Design Name:
// Module Name: insFetch2insDecode
// Project Name:
// Target Devices:
// Tool versions:
// Description:
//
// Dependencies:
//
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
//
//////////////////////////////////////////////////////////////////////////////////
module insFetch2insDecode(
input clk,
input rst,
input wire[31:0] insFetchPC,
input wire[31:0] insFetchInst,
output reg[31:0] insDecodePC,
output reg[31:0] insDecodeInst,
input wire[5:0] control
);
always @ (posedge clk) begin
if (rst == 1) begin
insDecodePC <= 0;
insDecodeInst <= 0;
end
else if(control[1] == 0) begin
insDecodePC <= insFetchPC;
insDecodeInst <= insFetchInst;
end
end
endmodule