This repository was archived by the owner on Dec 21, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathProgram_Counter.v
More file actions
52 lines (51 loc) · 1.58 KB
/
Copy pathProgram_Counter.v
File metadata and controls
52 lines (51 loc) · 1.58 KB
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
48
49
50
51
52
`timescale 1ns / 1ps
//////////////////////////////////////////////////////////////////////////////////
// Company:
// Engineer:
//
// Create Date: 00:20:10 12/03/2016
// Design Name:
// Module Name: Program_Counter
// Project Name:
// Target Devices:
// Tool versions:
// Description:
//
// Dependencies:
//
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
//
//////////////////////////////////////////////////////////////////////////////////
module Program_Counter(clk,notEnable,reset,enableDebug,resetDebug,addr_in,addr_out);
//-------------------------------------------Entradas-----------------------------------------//
input clk;
input notEnable;
input reset;
input enableDebug;
input resetDebug;
input [7:0] addr_in;
//--------------------------------------------Salidas-----------------------------------------//
output reg [7:0] addr_out;
//---------------------------------------------Wires------------------------------------------//
//-------------------------------------------Registros----------------------------------------//
//-----------------------------------------Inicializacion-------------------------------------//
initial
begin
addr_out = 0;
end
//--------------------------------------Declaracion de Bloques--------------------------------//
//--------------------------------------------Logica------------------------------------------//
always @(negedge clk)
begin
if(reset || resetDebug)
begin
addr_out <= 0;
end
else if(~notEnable && enableDebug)
begin
addr_out <= addr_in;
end
end
endmodule