-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathProgCount.sv
39 lines (35 loc) · 820 Bytes
/
ProgCount.sv
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
`timescale 1ns / 1ps
//////////////////////////////////////////////////////////////////////////////////
// Company:
// Engineer: J. Callenes
//
// Create Date: 06/07/2018 04:21:54 PM
// Design Name:
// Module Name: ProgCount
// Project Name:
// Target Devices:
// Tool Versions:
// Description:
//
// Dependencies:
//
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
//
//////////////////////////////////////////////////////////////////////////////////
module ProgCount(
input PC_CLK,
input PC_RST,
input PC_LD,
input logic [31:0] PC_DIN,
output logic [31:0] PC_COUNT=0
);
always_ff @(posedge PC_CLK)
begin
if (PC_RST == 1'b1)
PC_COUNT <= '0;
else if (PC_LD == 1'b1)
PC_COUNT <= PC_DIN;
end
endmodule