vusb_p11.v
3.93 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
/*******************************************************************************
-- File Type: Verilog HDL
-- Tool Version: VHDL2verilog v4.4 Tue Sep 19 10:06:32 EDT 2000 SunOS 5.5.1
-- Input file was: vusb_p11
-- Date Created: Tue Jul 16 14:01:01 2002
*******************************************************************************/
`timescale 1 ns / 1 ps // timescale for following modules
// ------------------------------------------------------------------------------
// Copyright 1996 VAutomation Inc. Nashua NH USA ALL RIGHTS RESERVED.
// This software is provided under license and contains proprietary and
// confidential material which is the property of VAutomation Inc.
//
// File: vusb_p11.vhd
//
// Description:
// VHDL entity for the Philips Semiconductors generic USB
// transceiver. Only used for PCB generation.
// Phillips Semi part # PDIUSBP11D
//
// ---------------------------------------------------------------------------
// This product is licensed to:
// John Princen of RouteFree
// for use at site(s):
// broadon
// ------------------------------------------------------------------------------
// Revision History
// $Log:
// 4 VUSB 1.3 4/11/02 2:49:11 PM Patrick Koran all
// checked in from pats pc, week of Starteam upgrade 4.6 to 5.1
// 3 VUSB 1.2 6/22/01 1:19:20 PM Monika Leary Changed
// name from vusbp11 to vusb_p11
// 2 VUSB 1.1 6/22/01 1:13:40 PM Monika Leary
// 1 VUSB 1.0 6/21/01 10:43:25 AM Tom Frechette
// $
// Revision 1.5 1998/05/06 21:11:16 eric
// removed RCV driving Xes - sends noise instead.
//
// Revision 1.4 1997/02/20 22:01:39 chris
// Corrected input port functions.
//
// Revision 1.3 1997/02/07 20:00:54 chris
// Added greggs architecture to pass the appropriate signals.
//
// Revision 1.2 1996/11/11 19:55:04 eric
// Added architecture.
//
// ------------------------------------------------------------------------------
module vusb_p11 (oe_n,
rcv,
vp,
vm,
suspnd,
speed,
dminus,
dplus,
vpo,
vmo,
gnds,
pwr);
input oe_n; // Ouput enable
output rcv; // Receive data
output vp; // V plus
output vm; // V minus
input suspnd; // Suspend
input speed; // Speed
inout dminus; // D minus
inout dplus; // D plus
input vpo; // Data out
input vmo; // Data out
input gnds; // Ground
input pwr;
wire VHDL2V_dminus;
wire VHDL2V_dplus;
wire rcv;
wire vp;
wire vm;
wire dminus;
wire dplus;
reg pwron;
wire noise;
initial
begin
pwron <= 1'b 0;
#( 1000 );
pwron <= 1'b 1;
end
assign #(321) noise = ~noise & pwron; // 321 is arbitrary
// RCV by spec must be ignored during an SE0 as it is likely
// that RCV will bounce around when both sides of the differential
// receiver are at the same voltage.
// The NOISE signal injects random transitions on the RCV signal
// during a SE0. This is better than outputting an X because in
// most gate level simulations the X will propagate no matter what.
// When extracting test vectors. you may want to force
// pwron to be 0 so that the noise signal is always 0.
// Otherwise there will be various errors due to the asynchronous
// NOISE signal.
assign dplus = oe_n === 1'b 0 ? vpo :
oe_n === 1'b 1 ? 1'b Z :
1'b X;
assign dminus = oe_n === 1'b 0 ? vmo :
oe_n === 1'b 1 ? 1'b Z :
1'b X;
// differencial input reciever
assign rcv = (dplus === 1'b 1 | dplus === 1'b 1) &
(dminus === 1'b 0 | dminus === 1'b 0) ? 1'b 1 :
(dplus === 1'b 0 | dplus === 1'b 0) &
(dminus === 1'b 1 | dminus === 1'b 1) ? 1'b 0 :
noise;
// single ended input recievers
assign vp = dplus === 1'b 1 | dplus === 1'b 1 ? 1'b 1 :
dplus === 1'b 0 | dplus === 1'b 0 ? 1'b 0 :
1'b 0;
assign vm = dminus === 1'b 1 | dminus === 1'b 1 ? 1'b 1 :
dminus === 1'b 0 | dminus === 1'b 0 ? 1'b 0 :
1'b 0;
endmodule // module vusb_p11