blob: 577f21657724ecf844611c483b501a43bfbba4d5 (
plain)
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
|
`include "pll.v"
module top (
input pclk, // 100MHz clock
output led1,
output led2,
output led3
);
reg [20:0] cntr;
wire lock;
wire fclock;
pll mypll(pclk,fclock,lock);
always@(posedge fclock) begin
if (lock) cntr <= 21'h00000000;
else cntr<= cntr+1;
end
assign led1 = cntr[18];
assign led2 = cntr[19];
assign led3 = cntr[20];
endmodule
|