-
Notifications
You must be signed in to change notification settings - Fork 0
/
if_id.v
44 lines (40 loc) · 828 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
33
34
35
36
37
38
39
40
41
42
43
44
`timescale 1ns / 1ps
//////////////////////////////////////////////////////////////////////////////////
// Company:
// Engineer:
//
// Create Date: 00:02:52 02/25/2013
// Design Name:
// Module Name: if_id
// Project Name:
// Target Devices:
// Tool versions:
// Description:
//
// Dependencies:
//
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
//
//////////////////////////////////////////////////////////////////////////////////
module if_id_reg(
input [31:0] entrada,
input clock,
input enable_if_id,
input flush,
output [31:0] salida
);
reg [31:0] out;
always @(posedge clock)
begin
if(enable_if_id)
begin
if(flush)
out = 32'b00000_00000_00000_00000_00000_00000_00; //nop
else
out = entrada;
end
end
assign salida = out;
endmodule