FreeCalypso > hg > freecalypso-schem2
annotate venus/src/usb/usb_domain.v @ 37:9c2f913fa5cf
venus/doc/MEMIF-fixed-2.8V: explanatory article
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Wed, 24 Nov 2021 18:14:11 +0000 |
parents | 4722b265cb8c |
children | 3becdb3b6dce |
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 domain of FC Venus. |
4722b265cb8c
Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3 */ |
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 module usb_domain (GND, VBUS, Host_TxD, Host_RxD, Host_RTS, Host_CTS, |
4722b265cb8c
Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 Host_DTR, Host_DCD, Host_RI, Host_TxD2, Host_RxD2, |
4722b265cb8c
Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 RPWON, nTESTRESET); |
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; |
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 output Host_TxD, Host_RTS, Host_DTR, Host_TxD2; |
4722b265cb8c
Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 input Host_RxD, Host_CTS, Host_DCD, Host_RI, Host_RxD2; |
4722b265cb8c
Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
14 output RPWON, nTESTRESET; |
4722b265cb8c
Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
15 |
4722b265cb8c
Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
16 /* USB domain wires */ |
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 wire P_5V, P_3V3; |
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 [7:0] ADBUS, BDBUS; |
4722b265cb8c
Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
21 wire [3:0] ACBUS, BCBUS; |
4722b265cb8c
Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
22 |
4722b265cb8c
Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
23 usb_core usb ( .GND(GND), |
4722b265cb8c
Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
24 .VBUS(VBUS), |
4722b265cb8c
Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
25 .P_5V(P_5V), |
4722b265cb8c
Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
26 .VCCIOA(P_3V3), |
4722b265cb8c
Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
27 .VCCIOB(P_3V3), |
4722b265cb8c
Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
28 .ADBUS(ADBUS), |
4722b265cb8c
Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
29 .ACBUS(ACBUS), |
4722b265cb8c
Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
30 .SI_WUA(P_3V3), |
4722b265cb8c
Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
31 .BDBUS(BDBUS), |
4722b265cb8c
Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
32 .BCBUS(BCBUS), |
4722b265cb8c
Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
33 .SI_WUB(P_3V3), |
4722b265cb8c
Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
34 .PWREN() /* no connect */ |
4722b265cb8c
Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
35 ); |
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 regulator_with_caps reg_3V3 (.GND(GND), .IN(P_5V), .OUT(P_3V3)); |
4722b265cb8c
Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
38 |
4722b265cb8c
Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
39 usb_domain_buf buf (.GND(GND), |
4722b265cb8c
Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
40 .P_3V3(P_3V3), |
4722b265cb8c
Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
41 .Int_TxD(ADBUS[0]), |
4722b265cb8c
Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
42 .Int_RxD(ADBUS[1]), |
4722b265cb8c
Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
43 .Int_RTS(ADBUS[2]), |
4722b265cb8c
Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
44 .Int_CTS(ADBUS[3]), |
4722b265cb8c
Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
45 .Int_DTR(ADBUS[4]), |
4722b265cb8c
Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
46 .Int_DCD(ADBUS[6]), |
4722b265cb8c
Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
47 .Int_RI(ADBUS[7]), |
4722b265cb8c
Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
48 .Int_TxD2(BDBUS[0]), |
4722b265cb8c
Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
49 .Int_RxD2(BDBUS[1]), |
4722b265cb8c
Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
50 .Host_TxD(Host_TxD), |
4722b265cb8c
Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
51 .Host_RxD(Host_RxD), |
4722b265cb8c
Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
52 .Host_RTS(Host_RTS), |
4722b265cb8c
Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
53 .Host_CTS(Host_CTS), |
4722b265cb8c
Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
54 .Host_DTR(Host_DTR), |
4722b265cb8c
Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
55 .Host_DCD(Host_DCD), |
4722b265cb8c
Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
56 .Host_RI(Host_RI), |
4722b265cb8c
Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
57 .Host_TxD2(Host_TxD2), |
4722b265cb8c
Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
58 .Host_RxD2(Host_RxD2) |
4722b265cb8c
Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
59 ); |
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 usb_domain_bctl bctl ( .GND(GND), |
4722b265cb8c
Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
62 .P_3V3(P_3V3), |
4722b265cb8c
Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
63 .ChanB_RTS(BDBUS[2]), |
4722b265cb8c
Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
64 .ChanB_DTR(BDBUS[4]), |
4722b265cb8c
Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
65 .CTL1_out(RPWON), |
4722b265cb8c
Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
66 .CTL2_out(nTESTRESET) |
4722b265cb8c
Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
67 ); |
4722b265cb8c
Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
68 |
4722b265cb8c
Venus src: USB domain captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
69 endmodule |