usb_ioblk.v
3.42 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
88
89
90
91
92
93
94
95
96
97
//**************************************************************************************
//
// Model Name : usb_ioblk.v
// Revision : $Revision: 1.2 $
// Date : $Date: 2002/10/11 23:52:58 $
// Author : Bill Saperstein
// Description : USB interface block to xcvr's
//
//**************************************************************************************
//**************************************************************************************
// Module Definition
//**************************************************************************************
`timescale 1ps / 1ps
module usb_ioblk
(
// Inputs
usb_suspnd , // usb suspend
usbxr_y1 , // usb receive data from transceiver
usb_oe_n , // usb output enable from core
usb_speed , // usb speed select from core
usb_dpo , // positive input to differential driver
usb_dmo , // negative input to differential driver
// Outputs
usbxr_oen , // usb transceiver output enable
usbxr_ien , // usb transceiver input enable
usbxr_fl , // usb transceiver speed select
usb_rcv , // usb qualified receive data to core
usbxr_ose // force SE0
) ;
//**************************************************************************************
// Define Parameters (optional)
//**************************************************************************************
// Not Applicable
//**************************************************************************************
// Port Declarations
//**************************************************************************************
input
usb_suspnd, usbxr_y1, usb_oe_n, usb_speed , usb_dpo,
usb_dmo ;
output
usbxr_oen, usbxr_ien, usbxr_ose, usbxr_fl, usb_rcv ;
//**************************************************************************************
// Net Assignments and Declarations
//**************************************************************************************
// Not Applicable
//**************************************************************************************
// Pre-Defined Module Instantiations
//**************************************************************************************
// Not Applicable
//**************************************************************************************
// Gate and Structural Declarations
//**************************************************************************************
// Define the qualification of input and output data with
// usb_suspnd. when usb_suspnd is asserted, input data is "0"
// and the input and output enables are deasserted
// define assertion of SE0 when both usb_dpo and usb_dmo
// are zero
assign
usb_rcv = usbxr_y1 & ~usb_suspnd ,
usbxr_fl = ~usb_speed ,
usbxr_oen = ~(usb_oe_n | usb_suspnd) ,
usbxr_ien = usb_oe_n & ~usb_suspnd ,
usbxr_ose = ~(usb_dpo | usb_dmo) ;
//**************************************************************************************
// Procedural Assignments
//**************************************************************************************
// Not Applicable
//**************************************************************************************
// Task and Function Definitions
//**************************************************************************************
// Not Applicable
//**************************************************************************************
// End of Model
//**************************************************************************************
endmodule // usb_ioblk