-
Notifications
You must be signed in to change notification settings - Fork 0
/
ProgramCounter.v
46 lines (34 loc) · 981 Bytes
/
ProgramCounter.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
45
46
// Alden Rivera 0416329
// Jorge Pineda 0416330
//Subject: CO project 2 - PC
//--------------------------------------------------------------------------------
//Version: 1
//--------------------------------------------------------------------------------
//Writer:
//----------------------------------------------
//Date:
//----------------------------------------------
//Description:
//--------------------------------------------------------------------------------
module ProgramCounter(
clk_i,
rst_i,
pc_in_i,
pc_out_o
);
//I/O ports
input clk_i;
input rst_i;
input [32-1:0] pc_in_i;
output [32-1:0] pc_out_o;
//Internal Signals
reg [32-1:0] pc_out_o;
//Parameter
//Main function
always @(posedge clk_i) begin
if(~rst_i)
pc_out_o <= 0;
else
pc_out_o <= pc_in_i;
end
endmodule