ext_host_ctl.v
1.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
module ext_host_ctl(
usb_dminus,
usb_dplus,
usb_dp_high,
usb_d_low_n,
usb_vbus_vld,
usb_id,
usb_vbus_on,
usbxr_oen
);
inout usb_dminus; // D-
inout usb_dplus; // D+
input usb_dp_high; // pullup resistor
input usb_d_low_n;
input usbxr_oen;
output usb_id;
output usb_vbus_vld;
input usb_vbus_on;
parameter LOW_SPEED_DEV = 0;
wire [16:1] usb_speed_dp;
wire [16:1] usb_power_dp;
assign usb_speed_dp = 16'd0;
assign usb_power_dp = 16'd0;
//defparam u_host_ctl.lsdev = LOW_SPEED_DEV;
wire tb_is_device;
wire bb_is_device ;
wire bb_is_disconnect ;
wire tb_is_disconnect ;
wire dplus, dminus;
usb_hostio usb_hostio(
.t_p(usb_dplus),
.t_m(usb_dminus),
.w_p(dplus),
.w_m(dminus),
.oe(usbxr_oen));
vusb_host_ctl u_host_ctl(
.dplus(dplus),
.dminus(dminus),
.port_sel(),
.low_speed_dp(),
.connect_dp(),
.rmt_wake_dp(),
.speed_dp(usb_speed_dp),
.power_dp(usb_power_dp),
.usb_b_sess_end_n(), //XXXX OTG test end
.tb_is_device(tb_is_device),
.sim_done());
usb_bb_term u_vusb_term (
.usb_dp_high(usb_dp_high) ,
.usb_d_low_n(usb_d_low_n) ,
.usb_vbus_on(usb_vbus_on) ,
.tb_is_device(tb_is_device) ,
.tb_is_disconnect(tb_is_disconnect) ,
.usb_id(usb_id) ,
.usb_sess_vld(usb_vbus_vld) ,
.bb_device(bb_is_device) ,
.bb_is_disconnect(bb_is_disconnect) ,
.dplus(dplus) ,
.dminus(dminus)
) ;
usb_arc_term u_vusb_bias (
.bb_is_device(bb_is_device) ,
.bb_is_disconnect(bb_is_disconnect) ,
.tb_is_disconnect(tb_is_disconnect) ,
.tb_is_device(tb_is_device) ,
.dplus(dplus) ,
.dminus(dminus)
) ;
vusb_otg_lpbck u_vusb_otg_lpbck0 (
.usb_id(),
.usb_sess_vld_n(),
.usb_a_vbus_vld_n(),
.usb_b_sess_end_n(),
.usb_vbus_on_n(~usb_vbus_on),
.usb_vbus_chg_n(1'b1),
.usb_vbus_dschg_n());
endmodule