usb_hostio.v
3.02 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
//**************************************************************************************
//
// Model Name : usb_hostio.v
// Revision : $Revision: 1.2 $
// Date : $Date: 2002/12/24 02:01:58 $
// Author : Bill Saperstein
// Description : USB bus filter to remove x's on bus
//
//**************************************************************************************
//**************************************************************************************
// Module Definition
//**************************************************************************************
`timescale 1ps / 1ps
module usb_hostio
(
// Inputs
oe , // output enable to transceiver
// Bi-directionals
t_p , // d+ on transceiver side
t_m , // d- on transceiver side
w_p , // d+ on wire side
w_m // d- on wire side
) ;
//**************************************************************************************
// Define Parameters (optional)
//**************************************************************************************
// Not Applicable
//**************************************************************************************
// Port Declarations
//**************************************************************************************
input
oe ;
inout
t_p, t_m, w_p, w_m ;
//**************************************************************************************
// Net Assignments and Declarations
//**************************************************************************************
// Not Applicable
//**************************************************************************************
// Pre-Defined Module Instantiations
//**************************************************************************************
// Not Applicable
//**************************************************************************************
// Gate and Structural Declarations
//**************************************************************************************
// define filter which removes x's on usb bus when host controller
// is master
assign
w_p = oe ? (t_p === 1'bx) | (t_p === 1'bZ) | (t_p === 1'bz) ? 1'b0 :t_p : 'bz,
w_m = oe ? (t_m === 1'bx) | (t_m === 1'bZ) | (t_m === 1'bz) ? 1'b0 :t_m : 'bz,
t_p = oe ? 'bz : (w_p === 1'bx ) | (w_p === 1'bz) | (w_p === 1'bZ) ? 0 : w_p,
t_m = oe ? 'bz : (w_m === 1'bx ) | (w_m === 1'bz) | (w_m === 1'bZ) ? 0 : w_m;
//**************************************************************************************
// Procedural Assignments
//**************************************************************************************
// Not Applicable
//**************************************************************************************
// Task and Function Definitions
//**************************************************************************************
// Not Applicable
//**************************************************************************************
// End of Model
//**************************************************************************************
endmodule // usb_hostio