-
Notifications
You must be signed in to change notification settings - Fork 0
/
ConSegsss.v
39 lines (36 loc) · 913 Bytes
/
ConSegsss.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
`timescale 1ns / 1ps
//////////////////////////////////////////////////////////////////////////////////
// Company:
// Engineer:
//
// Create Date: 01:26:16 03/27/2014
// Design Name:
// Module Name: ConSegsss
// Project Name:
// Target Devices:
// Tool versions:
// Description:
//
// Dependencies:
//
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
//
//////////////////////////////////////////////////////////////////////////////////
module ConSegsss(input rst, input clk, input enable, output wire tiempo);
reg [12:0] cuenta;
//Se elige el numero 1023 ya que representa 1111111111
wire Loco;
//assign Loco = (rst)||(cuenta==13'h1488);
assign Loco = (rst)||(cuenta==13'h1490);
assign tiempo = (cuenta==13'h1388);
always @(negedge clk, posedge Loco)
if (Loco)
cuenta <= 13'b0;
else
if(enable)
cuenta <= cuenta + 13'd1;
else
cuenta <= cuenta;
endmodule