1 |
6 |
mitko |
//////////////////////////////////////////////////////////////////////
|
2 |
|
|
//// statled_par.v ////
|
3 |
|
|
//// ////
|
4 |
|
|
//// This file is part of the Status LED module. ////
|
5 |
|
|
//// http://www.opencores.org/projects/statled/ ////
|
6 |
|
|
//// ////
|
7 |
|
|
//// Author: ////
|
8 |
|
|
//// -Dimitar Dimitrov, d.dimitrov@bitlocker.eu ////
|
9 |
|
|
//// ////
|
10 |
|
|
//////////////////////////////////////////////////////////////////////
|
11 |
|
|
//// ////
|
12 |
|
|
//// Copyright (C) 2010 Authors ////
|
13 |
|
|
//// ////
|
14 |
|
|
//// This source file may be used and distributed without ////
|
15 |
|
|
//// restriction provided that this copyright statement is not ////
|
16 |
|
|
//// removed from the file and that any derivative work contains ////
|
17 |
|
|
//// the original copyright notice and the associated disclaimer. ////
|
18 |
|
|
//// ////
|
19 |
|
|
//// This source file is free software; you can redistribute it ////
|
20 |
|
|
//// and/or modify it under the terms of the GNU Lesser General ////
|
21 |
|
|
//// Public License as published by the Free Software Foundation; ////
|
22 |
|
|
//// either version 2.1 of the License, or (at your option) any ////
|
23 |
|
|
//// later version. ////
|
24 |
|
|
//// ////
|
25 |
|
|
//// This source is distributed in the hope that it will be ////
|
26 |
|
|
//// useful, but WITHOUT ANY WARRANTY; without even the implied ////
|
27 |
|
|
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ////
|
28 |
|
|
//// PURPOSE. See the GNU Lesser General Public License for more ////
|
29 |
|
|
//// details. ////
|
30 |
|
|
//// ////
|
31 |
|
|
//// You should have received a copy of the GNU Lesser General ////
|
32 |
|
|
//// Public License along with this source; if not, download it ////
|
33 |
|
|
//// from http://www.opencores.org/lgpl.shtml ////
|
34 |
|
|
//// ////
|
35 |
|
|
//////////////////////////////////////////////////////////////////////
|
36 |
2 |
mitko |
|
37 |
6 |
mitko |
/*********************************************************************
|
38 |
2 |
mitko |
* Clock to ouput used in simulation
|
39 |
6 |
mitko |
*********************************************************************/
|
40 |
2 |
mitko |
parameter tDLY = 1;
|
41 |
|
|
|
42 |
6 |
mitko |
/*********************************************************************
|
43 |
2 |
mitko |
* Clock speed, MHz
|
44 |
6 |
mitko |
*********************************************************************/
|
45 |
2 |
mitko |
parameter STATLED_CLK = 50_000_000;
|
46 |
|
|
|
47 |
6 |
mitko |
/*********************************************************************
|
48 |
2 |
mitko |
* LED pulse width, ms
|
49 |
6 |
mitko |
*********************************************************************/
|
50 |
2 |
mitko |
parameter STATLED_PULSE_MS = 225;
|
51 |
|
|
|
52 |
6 |
mitko |
/*********************************************************************
|
53 |
2 |
mitko |
* Number of clocks per pulse width
|
54 |
6 |
mitko |
*********************************************************************/
|
55 |
2 |
mitko |
parameter STATLED_PULSE_CLKCNT = STATLED_CLK/1000 * STATLED_PULSE_MS;
|
56 |
|
|
|
57 |
6 |
mitko |
/*********************************************************************
|
58 |
2 |
mitko |
* Codes
|
59 |
6 |
mitko |
*********************************************************************/
|
60 |
3 |
mitko |
parameter CODE_ONE = 16'b10_00_00_00_00_00_00_00;
|
61 |
|
|
parameter CODE_TWO = 16'b10_10_00_00_00_00_00_00;
|
62 |
|
|
parameter CODE_THREE = 16'b10_10_10_00_00_00_00_00;
|
63 |
|
|
parameter CODE_FOUR = 16'b10_10_10_10_00_00_00_00;
|
64 |
|
|
parameter CODE_FIVE = 16'b10_10_10_10_10_00_00_00;
|
65 |
|
|
parameter CODE_SIX = 16'b10_10_10_10_10_10_00_00;
|
66 |
|
|
parameter CODE_50_50 = 16'b10_10_10_10_10_10_10_10;
|