comparison venus/src/usb/usb_domain.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 3becdb3b6dce
comparison
equal deleted inserted replaced
23:9f70dc110ad7 24:4722b265cb8c
1 /*
2 * This module encapsulates the USB domain of FC Venus.
3 */
4
5 module usb_domain (GND, VBUS, Host_TxD, Host_RxD, Host_RTS, Host_CTS,
6 Host_DTR, Host_DCD, Host_RI, Host_TxD2, Host_RxD2,
7 RPWON, nTESTRESET);
8
9 input GND;
10 output VBUS;
11
12 output Host_TxD, Host_RTS, Host_DTR, Host_TxD2;
13 input Host_RxD, Host_CTS, Host_DCD, Host_RI, Host_RxD2;
14 output RPWON, nTESTRESET;
15
16 /* USB domain wires */
17
18 wire P_5V, P_3V3;
19
20 wire [7:0] ADBUS, BDBUS;
21 wire [3:0] ACBUS, BCBUS;
22
23 usb_core usb ( .GND(GND),
24 .VBUS(VBUS),
25 .P_5V(P_5V),
26 .VCCIOA(P_3V3),
27 .VCCIOB(P_3V3),
28 .ADBUS(ADBUS),
29 .ACBUS(ACBUS),
30 .SI_WUA(P_3V3),
31 .BDBUS(BDBUS),
32 .BCBUS(BCBUS),
33 .SI_WUB(P_3V3),
34 .PWREN() /* no connect */
35 );
36
37 regulator_with_caps reg_3V3 (.GND(GND), .IN(P_5V), .OUT(P_3V3));
38
39 usb_domain_buf buf (.GND(GND),
40 .P_3V3(P_3V3),
41 .Int_TxD(ADBUS[0]),
42 .Int_RxD(ADBUS[1]),
43 .Int_RTS(ADBUS[2]),
44 .Int_CTS(ADBUS[3]),
45 .Int_DTR(ADBUS[4]),
46 .Int_DCD(ADBUS[6]),
47 .Int_RI(ADBUS[7]),
48 .Int_TxD2(BDBUS[0]),
49 .Int_RxD2(BDBUS[1]),
50 .Host_TxD(Host_TxD),
51 .Host_RxD(Host_RxD),
52 .Host_RTS(Host_RTS),
53 .Host_CTS(Host_CTS),
54 .Host_DTR(Host_DTR),
55 .Host_DCD(Host_DCD),
56 .Host_RI(Host_RI),
57 .Host_TxD2(Host_TxD2),
58 .Host_RxD2(Host_RxD2)
59 );
60
61 usb_domain_bctl bctl ( .GND(GND),
62 .P_3V3(P_3V3),
63 .ChanB_RTS(BDBUS[2]),
64 .ChanB_DTR(BDBUS[4]),
65 .CTL1_out(RPWON),
66 .CTL2_out(nTESTRESET)
67 );
68
69 endmodule