annotate venus/src/usb/FT2232D_block.v @ 98:3ab69117b09f default tip

minnie/doc/Design-spec: finished in the first pass
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 01 Oct 2023 08:17:05 +0000
parents 8f3df7a222f5
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
23
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 /*
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 * This module encapsulates the FT2232D chip and its immediate accessories:
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 * the oscillator crystal, the EEPROM, the AVCC filter and the cap on 3V3OUT.
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 */
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6 module FT2232D_block (GND, VCC, VCCIOA, VCCIOB,
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 USBDP, USBDM, RESET, RSTOUT, PWREN,
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8 ADBUS, ACBUS, SI_WUA, BDBUS, BCBUS, SI_WUB);
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10 input GND, VCC, VCCIOA, VCCIOB;
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 inout USBDP, USBDM;
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 input RESET;
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 output RSTOUT, PWREN;
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17 inout [7:0] ADBUS, BDBUS;
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 inout [3:0] ACBUS, BCBUS;
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19 input SI_WUA, SI_WUB;
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21 /* FT2232D pins handled within this block */
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 wire EECS, EESK, EEDATA;
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24 wire XTIN, XTOUT;
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25 wire AVCC, FTDI_3V3;
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27 /* instantiate the FT2232D */
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29 FT2232D_chip FT2232D (.GND(GND),
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30 .AGND(GND),
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31 .VCC(VCC),
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32 .AVCC(AVCC),
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33 .VCCIOA(VCCIOA),
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34 .VCCIOB(VCCIOB),
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35 .OUT_3V3(FTDI_3V3),
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36 .USBDP(USBDP),
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37 .USBDM(USBDM),
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
38 .EECS(EECS),
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
39 .EESK(EESK),
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
40 .EEDATA(EEDATA),
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
41 .RESET(RESET),
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
42 .RSTOUT(RSTOUT),
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
43 .TEST(GND),
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
44 .PWREN(PWREN),
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
45 .XTIN(XTIN),
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
46 .XTOUT(XTOUT),
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
47 .ADBUS(ADBUS),
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
48 .ACBUS(ACBUS),
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
49 .SI_WUA(SI_WUA),
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
50 .BDBUS(BDBUS),
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
51 .BCBUS(BCBUS),
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
52 .SI_WUB(SI_WUB)
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
53 );
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
54
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
55 /* VCCIO bypass caps */
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
56
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
57 capacitor VCCIOA_bypass_cap (VCCIOA, GND);
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
58 capacitor VCCIOB_bypass_cap (VCCIOB, GND);
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
59
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
60 /* AVCC filter */
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
61
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
62 resistor AVCC_filter_R (VCC, AVCC);
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
63 capacitor AVCC_cap (AVCC, GND);
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
64
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
65 /* 3V3OUT */
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
66
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
67 capacitor FTDI_3V3_cap (FTDI_3V3, GND);
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
68
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
69 /* crystal oscillator */
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
70
67
8f3df7a222f5 change USB 6.0 MHz crystal to a smaller part
Mychaela Falconia <falcon@freecalypso.org>
parents: 23
diff changeset
71 usb_xtal_wrap xtal (XTIN, XTOUT, GND);
23
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
72 capacitor XTIN_cap (XTIN, GND);
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
73 capacitor XTOUT_cap (XTOUT, GND);
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
74
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
75 /* serial EEPROM */
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
76
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
77 wire EEPROM_DOUT;
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
78
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
79 eeprom_93Cx6_16bit eeprom (.GND(GND),
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
80 .VCC(VCC),
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
81 .CS(EECS),
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
82 .SK(EESK),
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
83 .DIN(EEDATA),
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
84 .DOUT(EEPROM_DOUT)
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
85 );
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
86
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
87 resistor DOUT_series_R (EEPROM_DOUT, EEDATA);
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
88 resistor DOUT_pullup_R (EEPROM_DOUT, VCC);
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
89
9f70dc110ad7 venus/src/usb: building blocks from DUART28
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
90 endmodule