comparison venus/src/usb/usb_core.v @ 24:4722b265cb8c

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