-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProg_Count.v
More file actions
47 lines (39 loc) · 943 Bytes
/
Copy pathProg_Count.v
File metadata and controls
47 lines (39 loc) · 943 Bytes
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
47
`timescale 1ns / 1ps
//////////////////////////////////////////////////////////////////////////////////
// Company:
// Engineer:
//
// Create Date: 05.02.2025 11:40:23
// Design Name:
// Module Name: Prog_Count
// Project Name:
// Target Devices:
// Tool Versions:
// Description:
//
// Dependencies:
//
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
//
//////////////////////////////////////////////////////////////////////////////////
module Prog_Count(
input clk, Reset, Jump,
input [9:0] JumpTo,
output reg [9:0] Address, Previous
);
initial Address = 10'd0;
reg start=1;
initial #3 start = 0;
always @(posedge clk || start)
begin
#2 Previous = Address;
if(Reset)
Address = 10'd0;
else if(Jump)
Address = JumpTo;
else
Address = Address + 10'd1;
end
endmodule