FreeCalypso > hg > fc-small-hw
annotate duart28/src/vsrc/application_block.v @ 72:c2a3670c7aca
lunalcd3.pcb: manually add bottom strap to LCD footprint
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Thu, 18 Nov 2021 06:11:27 +0000 |
parents | bd7eec55ebc0 |
children |
rev | line source |
---|---|
23
22aba3a61a4b
duart28: vsrc passes sverp
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 /* |
22aba3a61a4b
duart28: vsrc passes sverp
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2 * This module encapsulates the application function of our board: |
22aba3a61a4b
duart28: vsrc passes sverp
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3 * dual UART with 2.8V outputs. |
22aba3a61a4b
duart28: vsrc passes sverp
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 */ |
22aba3a61a4b
duart28: vsrc passes sverp
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 |
28
bd7eec55ebc0
duart28: new design ideas
Mychaela Falconia <falcon@freecalypso.org>
parents:
23
diff
changeset
|
6 module application_block (GND, P_3V3, P_2V8, ADBUS, BDBUS); |
23
22aba3a61a4b
duart28: vsrc passes sverp
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 |
28
bd7eec55ebc0
duart28: new design ideas
Mychaela Falconia <falcon@freecalypso.org>
parents:
23
diff
changeset
|
8 input GND, P_3V3, P_2V8; |
23
22aba3a61a4b
duart28: vsrc passes sverp
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
9 |
22aba3a61a4b
duart28: vsrc passes sverp
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 inout [7:0] ADBUS, BDBUS; |
22aba3a61a4b
duart28: vsrc passes sverp
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 |
22aba3a61a4b
duart28: vsrc passes sverp
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
12 /* 2.8V output wires */ |
22aba3a61a4b
duart28: vsrc passes sverp
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 |
28
bd7eec55ebc0
duart28: new design ideas
Mychaela Falconia <falcon@freecalypso.org>
parents:
23
diff
changeset
|
14 wire TxD_2V8_before_R, RTS_2V8_before_R, DTR_2V8_before_R, TxD2_2V8_before_R; |
bd7eec55ebc0
duart28: new design ideas
Mychaela Falconia <falcon@freecalypso.org>
parents:
23
diff
changeset
|
15 wire TxD_2V8_after_R, RTS_2V8_after_R, DTR_2V8_after_R, TxD2_2V8_after_R; |
bd7eec55ebc0
duart28: new design ideas
Mychaela Falconia <falcon@freecalypso.org>
parents:
23
diff
changeset
|
16 |
bd7eec55ebc0
duart28: new design ideas
Mychaela Falconia <falcon@freecalypso.org>
parents:
23
diff
changeset
|
17 /* input signal wires */ |
bd7eec55ebc0
duart28: new design ideas
Mychaela Falconia <falcon@freecalypso.org>
parents:
23
diff
changeset
|
18 |
bd7eec55ebc0
duart28: new design ideas
Mychaela Falconia <falcon@freecalypso.org>
parents:
23
diff
changeset
|
19 wire RxD_in, CTS_in, DSR_in, DCD_in, RI_in, RxD2_in; |
23
22aba3a61a4b
duart28: vsrc passes sverp
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
20 |
22aba3a61a4b
duart28: vsrc passes sverp
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
21 /* output buffers */ |
22aba3a61a4b
duart28: vsrc passes sverp
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
22 |
28
bd7eec55ebc0
duart28: new design ideas
Mychaela Falconia <falcon@freecalypso.org>
parents:
23
diff
changeset
|
23 buffer_ic_common output_buf_common (.Vcc(P_2V8), |
bd7eec55ebc0
duart28: new design ideas
Mychaela Falconia <falcon@freecalypso.org>
parents:
23
diff
changeset
|
24 .GND(GND), |
bd7eec55ebc0
duart28: new design ideas
Mychaela Falconia <falcon@freecalypso.org>
parents:
23
diff
changeset
|
25 .nOE1(GND), |
bd7eec55ebc0
duart28: new design ideas
Mychaela Falconia <falcon@freecalypso.org>
parents:
23
diff
changeset
|
26 .nOE2(GND) |
bd7eec55ebc0
duart28: new design ideas
Mychaela Falconia <falcon@freecalypso.org>
parents:
23
diff
changeset
|
27 ); |
bd7eec55ebc0
duart28: new design ideas
Mychaela Falconia <falcon@freecalypso.org>
parents:
23
diff
changeset
|
28 |
23
22aba3a61a4b
duart28: vsrc passes sverp
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
29 capacitor output_buf_bypass_cap (P_2V8, GND); |
22aba3a61a4b
duart28: vsrc passes sverp
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
30 |
28
bd7eec55ebc0
duart28: new design ideas
Mychaela Falconia <falcon@freecalypso.org>
parents:
23
diff
changeset
|
31 buffer_ic_slot buf_TxD (.A(ADBUS[0]), .Y(TxD_2V8_before_R)); |
bd7eec55ebc0
duart28: new design ideas
Mychaela Falconia <falcon@freecalypso.org>
parents:
23
diff
changeset
|
32 buffer_ic_slot buf_RTS (.A(ADBUS[2]), .Y(RTS_2V8_before_R)); |
bd7eec55ebc0
duart28: new design ideas
Mychaela Falconia <falcon@freecalypso.org>
parents:
23
diff
changeset
|
33 buffer_ic_slot buf_DTR (.A(ADBUS[4]), .Y(DTR_2V8_before_R)); |
bd7eec55ebc0
duart28: new design ideas
Mychaela Falconia <falcon@freecalypso.org>
parents:
23
diff
changeset
|
34 buffer_ic_slot buf_TxD2 (.A(BDBUS[0]), .Y(TxD2_2V8_before_R)); |
bd7eec55ebc0
duart28: new design ideas
Mychaela Falconia <falcon@freecalypso.org>
parents:
23
diff
changeset
|
35 |
bd7eec55ebc0
duart28: new design ideas
Mychaela Falconia <falcon@freecalypso.org>
parents:
23
diff
changeset
|
36 buffer_ic_slot unused_output_buf1 (.A(GND), .Y()); |
bd7eec55ebc0
duart28: new design ideas
Mychaela Falconia <falcon@freecalypso.org>
parents:
23
diff
changeset
|
37 buffer_ic_slot unused_output_buf2 (.A(GND), .Y()); |
bd7eec55ebc0
duart28: new design ideas
Mychaela Falconia <falcon@freecalypso.org>
parents:
23
diff
changeset
|
38 buffer_ic_slot unused_output_buf3 (.A(GND), .Y()); |
bd7eec55ebc0
duart28: new design ideas
Mychaela Falconia <falcon@freecalypso.org>
parents:
23
diff
changeset
|
39 buffer_ic_slot unused_output_buf4 (.A(GND), .Y()); |
bd7eec55ebc0
duart28: new design ideas
Mychaela Falconia <falcon@freecalypso.org>
parents:
23
diff
changeset
|
40 |
bd7eec55ebc0
duart28: new design ideas
Mychaela Falconia <falcon@freecalypso.org>
parents:
23
diff
changeset
|
41 /* output series resistors */ |
bd7eec55ebc0
duart28: new design ideas
Mychaela Falconia <falcon@freecalypso.org>
parents:
23
diff
changeset
|
42 |
bd7eec55ebc0
duart28: new design ideas
Mychaela Falconia <falcon@freecalypso.org>
parents:
23
diff
changeset
|
43 resistor TxD_series_R (TxD_2V8_before_R, TxD_2V8_after_R); |
bd7eec55ebc0
duart28: new design ideas
Mychaela Falconia <falcon@freecalypso.org>
parents:
23
diff
changeset
|
44 resistor RTS_series_R (RTS_2V8_before_R, RTS_2V8_after_R); |
bd7eec55ebc0
duart28: new design ideas
Mychaela Falconia <falcon@freecalypso.org>
parents:
23
diff
changeset
|
45 resistor DTR_series_R (DTR_2V8_before_R, DTR_2V8_after_R); |
bd7eec55ebc0
duart28: new design ideas
Mychaela Falconia <falcon@freecalypso.org>
parents:
23
diff
changeset
|
46 resistor TxD2_series_R (TxD2_2V8_before_R, TxD2_2V8_after_R); |
bd7eec55ebc0
duart28: new design ideas
Mychaela Falconia <falcon@freecalypso.org>
parents:
23
diff
changeset
|
47 |
bd7eec55ebc0
duart28: new design ideas
Mychaela Falconia <falcon@freecalypso.org>
parents:
23
diff
changeset
|
48 /* input buffers */ |
bd7eec55ebc0
duart28: new design ideas
Mychaela Falconia <falcon@freecalypso.org>
parents:
23
diff
changeset
|
49 |
bd7eec55ebc0
duart28: new design ideas
Mychaela Falconia <falcon@freecalypso.org>
parents:
23
diff
changeset
|
50 buffer_ic_common input_buf_common (.Vcc(P_3V3), |
bd7eec55ebc0
duart28: new design ideas
Mychaela Falconia <falcon@freecalypso.org>
parents:
23
diff
changeset
|
51 .GND(GND), |
bd7eec55ebc0
duart28: new design ideas
Mychaela Falconia <falcon@freecalypso.org>
parents:
23
diff
changeset
|
52 .nOE1(GND), |
bd7eec55ebc0
duart28: new design ideas
Mychaela Falconia <falcon@freecalypso.org>
parents:
23
diff
changeset
|
53 .nOE2(GND) |
bd7eec55ebc0
duart28: new design ideas
Mychaela Falconia <falcon@freecalypso.org>
parents:
23
diff
changeset
|
54 ); |
bd7eec55ebc0
duart28: new design ideas
Mychaela Falconia <falcon@freecalypso.org>
parents:
23
diff
changeset
|
55 |
bd7eec55ebc0
duart28: new design ideas
Mychaela Falconia <falcon@freecalypso.org>
parents:
23
diff
changeset
|
56 capacitor input_buf_bypass_cap (P_3V3, GND); |
bd7eec55ebc0
duart28: new design ideas
Mychaela Falconia <falcon@freecalypso.org>
parents:
23
diff
changeset
|
57 |
bd7eec55ebc0
duart28: new design ideas
Mychaela Falconia <falcon@freecalypso.org>
parents:
23
diff
changeset
|
58 buffer_ic_slot buf_RxD (.A(RxD_in), .Y(ADBUS[1])); |
bd7eec55ebc0
duart28: new design ideas
Mychaela Falconia <falcon@freecalypso.org>
parents:
23
diff
changeset
|
59 buffer_ic_slot buf_CTS (.A(CTS_in), .Y(ADBUS[3])); |
bd7eec55ebc0
duart28: new design ideas
Mychaela Falconia <falcon@freecalypso.org>
parents:
23
diff
changeset
|
60 buffer_ic_slot buf_DSR (.A(DSR_in), .Y(ADBUS[5])); |
bd7eec55ebc0
duart28: new design ideas
Mychaela Falconia <falcon@freecalypso.org>
parents:
23
diff
changeset
|
61 buffer_ic_slot buf_DCD (.A(DCD_in), .Y(ADBUS[6])); |
bd7eec55ebc0
duart28: new design ideas
Mychaela Falconia <falcon@freecalypso.org>
parents:
23
diff
changeset
|
62 buffer_ic_slot buf_RI (.A(RI_in), .Y(ADBUS[7])); |
bd7eec55ebc0
duart28: new design ideas
Mychaela Falconia <falcon@freecalypso.org>
parents:
23
diff
changeset
|
63 buffer_ic_slot buf_RxD2 (.A(RxD2_in), .Y(BDBUS[1])); |
bd7eec55ebc0
duart28: new design ideas
Mychaela Falconia <falcon@freecalypso.org>
parents:
23
diff
changeset
|
64 |
bd7eec55ebc0
duart28: new design ideas
Mychaela Falconia <falcon@freecalypso.org>
parents:
23
diff
changeset
|
65 buffer_ic_slot unused_input_buf1 (.A(GND), .Y()); |
bd7eec55ebc0
duart28: new design ideas
Mychaela Falconia <falcon@freecalypso.org>
parents:
23
diff
changeset
|
66 buffer_ic_slot unused_input_buf2 (.A(GND), .Y()); |
bd7eec55ebc0
duart28: new design ideas
Mychaela Falconia <falcon@freecalypso.org>
parents:
23
diff
changeset
|
67 |
bd7eec55ebc0
duart28: new design ideas
Mychaela Falconia <falcon@freecalypso.org>
parents:
23
diff
changeset
|
68 /* input pull-up resistors */ |
bd7eec55ebc0
duart28: new design ideas
Mychaela Falconia <falcon@freecalypso.org>
parents:
23
diff
changeset
|
69 |
bd7eec55ebc0
duart28: new design ideas
Mychaela Falconia <falcon@freecalypso.org>
parents:
23
diff
changeset
|
70 resistor RxD_pullup (RxD_in, P_2V8); |
bd7eec55ebc0
duart28: new design ideas
Mychaela Falconia <falcon@freecalypso.org>
parents:
23
diff
changeset
|
71 resistor CTS_pullup (CTS_in, P_2V8); |
bd7eec55ebc0
duart28: new design ideas
Mychaela Falconia <falcon@freecalypso.org>
parents:
23
diff
changeset
|
72 resistor DSR_pullup (DSR_in, P_2V8); |
bd7eec55ebc0
duart28: new design ideas
Mychaela Falconia <falcon@freecalypso.org>
parents:
23
diff
changeset
|
73 resistor DCD_pullup (DCD_in, P_2V8); |
bd7eec55ebc0
duart28: new design ideas
Mychaela Falconia <falcon@freecalypso.org>
parents:
23
diff
changeset
|
74 resistor RI_pullup (RI_in, P_2V8); |
bd7eec55ebc0
duart28: new design ideas
Mychaela Falconia <falcon@freecalypso.org>
parents:
23
diff
changeset
|
75 resistor RxD2_pullup (RxD2_in, P_2V8); |
23
22aba3a61a4b
duart28: vsrc passes sverp
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
76 |
22aba3a61a4b
duart28: vsrc passes sverp
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
77 /* target interface headers */ |
22aba3a61a4b
duart28: vsrc passes sverp
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
78 |
22aba3a61a4b
duart28: vsrc passes sverp
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
79 target_if target_if ( .GND(GND), |
28
bd7eec55ebc0
duart28: new design ideas
Mychaela Falconia <falcon@freecalypso.org>
parents:
23
diff
changeset
|
80 .UART0_TxD(TxD_2V8_after_R), |
bd7eec55ebc0
duart28: new design ideas
Mychaela Falconia <falcon@freecalypso.org>
parents:
23
diff
changeset
|
81 .UART0_RxD(RxD_in), |
bd7eec55ebc0
duart28: new design ideas
Mychaela Falconia <falcon@freecalypso.org>
parents:
23
diff
changeset
|
82 .UART0_RTS(RTS_2V8_after_R), |
bd7eec55ebc0
duart28: new design ideas
Mychaela Falconia <falcon@freecalypso.org>
parents:
23
diff
changeset
|
83 .UART0_CTS(CTS_in), |
bd7eec55ebc0
duart28: new design ideas
Mychaela Falconia <falcon@freecalypso.org>
parents:
23
diff
changeset
|
84 .UART0_DTR(DTR_2V8_after_R), |
bd7eec55ebc0
duart28: new design ideas
Mychaela Falconia <falcon@freecalypso.org>
parents:
23
diff
changeset
|
85 .UART0_DSR(DSR_in), |
bd7eec55ebc0
duart28: new design ideas
Mychaela Falconia <falcon@freecalypso.org>
parents:
23
diff
changeset
|
86 .UART0_DCD(DCD_in), |
bd7eec55ebc0
duart28: new design ideas
Mychaela Falconia <falcon@freecalypso.org>
parents:
23
diff
changeset
|
87 .UART0_RI(RI_in), |
bd7eec55ebc0
duart28: new design ideas
Mychaela Falconia <falcon@freecalypso.org>
parents:
23
diff
changeset
|
88 .UART1_TxD(TxD2_2V8_after_R), |
bd7eec55ebc0
duart28: new design ideas
Mychaela Falconia <falcon@freecalypso.org>
parents:
23
diff
changeset
|
89 .UART1_RxD(RxD2_in) |
23
22aba3a61a4b
duart28: vsrc passes sverp
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
90 ); |
22aba3a61a4b
duart28: vsrc passes sverp
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
91 |
22aba3a61a4b
duart28: vsrc passes sverp
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
92 endmodule |