FreeCalypso > hg > fc-small-hw
annotate lunalcd2/src/vsrc/board.v @ 71:31c8b1291b4a
lunalcd3 project started
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Thu, 18 Nov 2021 04:59:47 +0000 |
parents | d5d14b426faa |
children |
rev | line source |
---|---|
5
839e9b527e69
lunalcd1 board project started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 module board (); |
839e9b527e69
lunalcd1 board project started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2 |
59
d5d14b426faa
lunalcd2: structural Verilog source captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
9
diff
changeset
|
3 wire GND, VBAT, Vio, Vio_LCD; |
5
839e9b527e69
lunalcd1 board project started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 wire [15:0] DB; |
839e9b527e69
lunalcd1 board project started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 wire RD, WR, RS, CS, RESET; |
59
d5d14b426faa
lunalcd2: structural Verilog source captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
9
diff
changeset
|
6 wire BL_EN; |
d5d14b426faa
lunalcd2: structural Verilog source captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
9
diff
changeset
|
7 wire [1:3] LEDK; /* 1=left, 2=middle, 3=right for layout */ |
5
839e9b527e69
lunalcd1 board project started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 |
839e9b527e69
lunalcd1 board project started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
9 /* main interface connector */ |
839e9b527e69
lunalcd1 board project started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 |
839e9b527e69
lunalcd1 board project started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 header_26pin main_if ( .pin_1(DB[15]), |
839e9b527e69
lunalcd1 board project started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
12 .pin_2(DB[14]), |
839e9b527e69
lunalcd1 board project started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 .pin_3(DB[13]), |
839e9b527e69
lunalcd1 board project started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
14 .pin_4(DB[12]), |
839e9b527e69
lunalcd1 board project started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
15 .pin_5(DB[11]), |
839e9b527e69
lunalcd1 board project started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
16 .pin_6(DB[10]), |
839e9b527e69
lunalcd1 board project started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
17 .pin_7(DB[9]), |
839e9b527e69
lunalcd1 board project started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
18 .pin_8(DB[8]), |
839e9b527e69
lunalcd1 board project started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
19 .pin_9(DB[7]), |
839e9b527e69
lunalcd1 board project started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
20 .pin_10(DB[6]), |
839e9b527e69
lunalcd1 board project started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
21 .pin_11(DB[5]), |
839e9b527e69
lunalcd1 board project started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
22 .pin_12(DB[4]), |
839e9b527e69
lunalcd1 board project started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
23 .pin_13(DB[3]), |
839e9b527e69
lunalcd1 board project started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
24 .pin_14(DB[2]), |
839e9b527e69
lunalcd1 board project started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
25 .pin_15(DB[1]), |
839e9b527e69
lunalcd1 board project started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
26 .pin_16(DB[0]), |
839e9b527e69
lunalcd1 board project started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
27 .pin_17(CS), |
839e9b527e69
lunalcd1 board project started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
28 .pin_18(RD), |
839e9b527e69
lunalcd1 board project started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
29 .pin_19(WR), |
839e9b527e69
lunalcd1 board project started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
30 .pin_20(RS), |
839e9b527e69
lunalcd1 board project started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
31 .pin_21(GND), |
839e9b527e69
lunalcd1 board project started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
32 .pin_22(GND), |
839e9b527e69
lunalcd1 board project started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
33 .pin_23(RESET), |
839e9b527e69
lunalcd1 board project started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
34 .pin_24(Vio), |
839e9b527e69
lunalcd1 board project started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
35 .pin_25(BL_EN), |
839e9b527e69
lunalcd1 board project started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
36 .pin_26(GND) |
839e9b527e69
lunalcd1 board project started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
37 ); |
839e9b527e69
lunalcd1 board project started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
38 |
59
d5d14b426faa
lunalcd2: structural Verilog source captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
9
diff
changeset
|
39 resistor BL_EN_pulldown (BL_EN, GND); |
d5d14b426faa
lunalcd2: structural Verilog source captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
9
diff
changeset
|
40 |
d5d14b426faa
lunalcd2: structural Verilog source captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
9
diff
changeset
|
41 /* backlight power supply */ |
5
839e9b527e69
lunalcd1 board project started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
42 |
839e9b527e69
lunalcd1 board project started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
43 header_2pin VBAT_conn ( .pin_1(VBAT), |
839e9b527e69
lunalcd1 board project started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
44 .pin_2(GND) |
839e9b527e69
lunalcd1 board project started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
45 ); |
839e9b527e69
lunalcd1 board project started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
46 |
59
d5d14b426faa
lunalcd2: structural Verilog source captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
9
diff
changeset
|
47 /* LCD module */ |
d5d14b426faa
lunalcd2: structural Verilog source captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
9
diff
changeset
|
48 |
d5d14b426faa
lunalcd2: structural Verilog source captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
9
diff
changeset
|
49 resistor LCD_current_meas (Vio, Vio_LCD); |
d5d14b426faa
lunalcd2: structural Verilog source captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
9
diff
changeset
|
50 |
d5d14b426faa
lunalcd2: structural Verilog source captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
9
diff
changeset
|
51 capacitor LCD_bypass_cap (Vio_LCD, GND); |
5
839e9b527e69
lunalcd1 board project started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
52 |
59
d5d14b426faa
lunalcd2: structural Verilog source captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
9
diff
changeset
|
53 lcd_module lcd (.GND(GND), |
d5d14b426faa
lunalcd2: structural Verilog source captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
9
diff
changeset
|
54 .VCI(Vio_LCD), |
d5d14b426faa
lunalcd2: structural Verilog source captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
9
diff
changeset
|
55 .IOVCC(Vio_LCD), |
d5d14b426faa
lunalcd2: structural Verilog source captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
9
diff
changeset
|
56 .DB(DB), |
d5d14b426faa
lunalcd2: structural Verilog source captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
9
diff
changeset
|
57 .RD(RD), |
d5d14b426faa
lunalcd2: structural Verilog source captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
9
diff
changeset
|
58 .WR(WR), |
d5d14b426faa
lunalcd2: structural Verilog source captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
9
diff
changeset
|
59 .RS(RS), |
d5d14b426faa
lunalcd2: structural Verilog source captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
9
diff
changeset
|
60 .CS(CS), |
d5d14b426faa
lunalcd2: structural Verilog source captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
9
diff
changeset
|
61 .RESET(RESET), |
d5d14b426faa
lunalcd2: structural Verilog source captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
9
diff
changeset
|
62 .IM0(GND), |
d5d14b426faa
lunalcd2: structural Verilog source captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
9
diff
changeset
|
63 .LEDA(VBAT), |
d5d14b426faa
lunalcd2: structural Verilog source captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
9
diff
changeset
|
64 /* LEDK order for layout */ |
d5d14b426faa
lunalcd2: structural Verilog source captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
9
diff
changeset
|
65 .LEDK[1](LEDK[3]), |
d5d14b426faa
lunalcd2: structural Verilog source captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
9
diff
changeset
|
66 .LEDK[2](LEDK[2]), |
d5d14b426faa
lunalcd2: structural Verilog source captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
9
diff
changeset
|
67 .LEDK[3](LEDK[1]) |
5
839e9b527e69
lunalcd1 board project started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
68 ); |
839e9b527e69
lunalcd1 board project started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
69 |
59
d5d14b426faa
lunalcd2: structural Verilog source captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
9
diff
changeset
|
70 /* MAX1916-based backlight LED current sink */ |
5
839e9b527e69
lunalcd1 board project started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
71 |
59
d5d14b426faa
lunalcd2: structural Verilog source captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
9
diff
changeset
|
72 bl_current_sink bl_current_sink (.GND(GND), |
d5d14b426faa
lunalcd2: structural Verilog source captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
9
diff
changeset
|
73 .Vio(Vio), |
d5d14b426faa
lunalcd2: structural Verilog source captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
9
diff
changeset
|
74 .BL_EN(BL_EN), |
d5d14b426faa
lunalcd2: structural Verilog source captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
9
diff
changeset
|
75 .LEDK(LEDK) |
d5d14b426faa
lunalcd2: structural Verilog source captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
9
diff
changeset
|
76 ); |
9
28a0574af823
lunalcd1: added pull-down resistor on BL_EN line
Mychaela Falconia <falcon@freecalypso.org>
parents:
5
diff
changeset
|
77 |
5
839e9b527e69
lunalcd1 board project started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
78 endmodule |