-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathClockDivider.v
46 lines (45 loc) · 884 Bytes
/
ClockDivider.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
`timescale 1ns / 1ps
//////////////////////////////////////////////////////////////////////////////////
// Company:
// Engineer: chandula
//
// Create Date: 20:16:50 03/21/2018
// Design Name:
// Module Name: ClockDivider
// Project Name:
// Target Devices:
// Tool versions:
// Description:
//
// Dependencies:
//
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
//
//////////////////////////////////////////////////////////////////////////////////
module ClockDivider(
input clock_100,
output reg clk=0
);
reg [2:0] count =0;
always@(posedge clock_100)
//begin
//if (enable)
//begin
if (count== 3'd5)
begin
clk<=~clk;
count = 0;
end
else
begin
count= count+ 3'd1;
end
//end
/* else
begin
clk <= 0;
end
end*/
endmodule