annotate venus/src/usb/usb_core.v @ 72:f0038b3d255f

new 32.768 kHz crystal part, same specs as before
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 03 Dec 2021 02:51:51 +0000
parents 4722b265cb8c
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
24
4722b265cb8c Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 /*
4722b265cb8c Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 * This module encapsulates the USB connector, the FT2232D block and
4722b265cb8c Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 * the glue components between them.
4722b265cb8c Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 */
4722b265cb8c Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5
4722b265cb8c Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6 module usb_core (GND, VBUS, P_5V, VCCIOA, VCCIOB,
4722b265cb8c Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 ADBUS, ACBUS, SI_WUA, BDBUS, BCBUS, SI_WUB, PWREN);
4722b265cb8c Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8
4722b265cb8c Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9 input GND;
4722b265cb8c Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10 output VBUS, P_5V;
4722b265cb8c Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11
4722b265cb8c Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 input VCCIOA, VCCIOB;
4722b265cb8c Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13 inout [7:0] ADBUS, BDBUS;
4722b265cb8c Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 inout [3:0] ACBUS, BCBUS;
4722b265cb8c Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 input SI_WUA, SI_WUB;
4722b265cb8c Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16 output PWREN;
4722b265cb8c Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17
4722b265cb8c Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 /* interconnecting wires */
4722b265cb8c Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19
4722b265cb8c Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20 wire DM_connector_side, DM_chip_side;
4722b265cb8c Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21 wire DP_connector_side, DP_chip_side;
4722b265cb8c Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22 wire RSTOUT;
4722b265cb8c Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23
4722b265cb8c Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24 usb_conn conn (.GND(GND),
4722b265cb8c Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25 .VBUS(VBUS),
4722b265cb8c Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26 .Dminus(DM_connector_side),
4722b265cb8c Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27 .Dplus(DP_connector_side),
4722b265cb8c Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28 .ID() /* no connect */
4722b265cb8c Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29 );
4722b265cb8c Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30
4722b265cb8c Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31 /* ferrite bead on the power supply */
4722b265cb8c Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32
4722b265cb8c Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33 inductor VBUS_ferrite (VBUS, P_5V);
4722b265cb8c Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34
4722b265cb8c Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35 /* series resistors on USB data lines */
4722b265cb8c Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36
4722b265cb8c Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37 resistor DM_series_R (DM_connector_side, DM_chip_side);
4722b265cb8c Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
38 resistor DP_series_R (DP_connector_side, DP_chip_side);
4722b265cb8c Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
39
4722b265cb8c Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
40 /* we can now bring in the FT2232D block */
4722b265cb8c Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
41
4722b265cb8c Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
42 FT2232D_block FT2232D (.GND(GND),
4722b265cb8c Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
43 .VCC(P_5V),
4722b265cb8c Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
44 .VCCIOA(VCCIOA),
4722b265cb8c Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
45 .VCCIOB(VCCIOB),
4722b265cb8c Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
46 .USBDP(DP_chip_side),
4722b265cb8c Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
47 .USBDM(DM_chip_side),
4722b265cb8c Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
48 .RESET(P_5V),
4722b265cb8c Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
49 .RSTOUT(RSTOUT),
4722b265cb8c Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
50 .PWREN(PWREN),
4722b265cb8c Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
51 .ADBUS(ADBUS),
4722b265cb8c Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
52 .ACBUS(ACBUS),
4722b265cb8c Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
53 .SI_WUA(SI_WUA),
4722b265cb8c Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
54 .BDBUS(BDBUS),
4722b265cb8c Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
55 .BCBUS(BCBUS),
4722b265cb8c Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
56 .SI_WUB(SI_WUB)
4722b265cb8c Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
57 );
4722b265cb8c Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
58
4722b265cb8c Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
59 resistor DP_pullup_R (DP_chip_side, RSTOUT);
4722b265cb8c Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
60
4722b265cb8c Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
61 /* power bypass caps */
4722b265cb8c Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
62
4722b265cb8c Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
63 capacitor P_5V_cap (P_5V, GND);
4722b265cb8c Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
64 capacitor P_5V_cap2 (P_5V, GND);
4722b265cb8c Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
65
4722b265cb8c Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
66 endmodule