OpenCores
URL https://opencores.org/ocsvn/usb2uart/usb2uart/trunk

Subversion Repositories usb2uart

[/] [usb2uart/] [trunk/] [rtl/] [usb1_core/] [usb1_defines.v] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 dinesha
/////////////////////////////////////////////////////////////////////
2
////                                                             ////
3
////  USB 1.1 function defines file                              ////
4
////                                                             ////
5
////                                                             ////
6
////  Author: Rudolf Usselmann                                   ////
7
////          rudi@asics.ws                                      ////
8
////                                                             ////
9
////                                                             ////
10
////  Downloaded from: http://www.opencores.org/cores/usb1_funct/////
11
////                                                             ////
12
/////////////////////////////////////////////////////////////////////
13
////                                                             ////
14
//// Copyright (C) 2000-2002 Rudolf Usselmann                    ////
15
////                         www.asics.ws                        ////
16
////                         rudi@asics.ws                       ////
17
////                                                             ////
18
//// This source file may be used and distributed without        ////
19
//// restriction provided that this copyright statement is not   ////
20
//// removed from the file and that any derivative work contains ////
21
//// the original copyright notice and the associated disclaimer.////
22
////                                                             ////
23
////     THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY     ////
24
//// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED   ////
25
//// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS   ////
26
//// FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL THE AUTHOR      ////
27
//// OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,         ////
28
//// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES    ////
29
//// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE   ////
30
//// GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR        ////
31
//// BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF  ////
32
//// LIABILITY, WHETHER IN  CONTRACT, STRICT LIABILITY, OR TORT  ////
33
//// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT  ////
34
//// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE         ////
35
//// POSSIBILITY OF SUCH DAMAGE.                                 ////
36
////                                                             ////
37
/////////////////////////////////////////////////////////////////////
38
 
39
//  CVS Log
40
//
41
//  $Id: usb1_defines.v,v 1.3 2002-09-25 06:06:49 rudi Exp $
42
//
43
//  $Date: 2002-09-25 06:06:49 $
44
//  $Revision: 1.3 $
45
//  $Author: rudi $
46
//  $Locker:  $
47
//  $State: Exp $
48
//
49
// Change History:
50
//               $Log: not supported by cvs2svn $
51
//               Revision 1.2  2002/09/20 11:46:54  rudi
52
//               fixed a type 'define' was missing ...
53
//
54
//               Revision 1.1.1.1  2002/09/19 12:07:40  rudi
55
//               Initial Checkin
56
//
57
//
58
//
59
//
60
//
61
//
62
//
63
//
64
 
65
`include "timescale.v"
66
 
67
//`define USBF_DEBUG
68
//`define USBF_VERBOSE_DEBUG
69
 
70
// Enable or disable Block Frames
71
//`define USB1_BF_ENABLE
72
 
73
/////////////////////////////////////////////////////////////////////
74
//
75
// Items below this point should NOT be modified by the end user
76
// UNLESS you know exactly what you are doing !
77
// Modify at you own risk !!!
78
//
79
/////////////////////////////////////////////////////////////////////
80
 
81
`define ROM_SIZE0       7'd018  // Device Descriptor Length
82
`define ROM_SIZE1       7'd053  // Configuration Descriptor Length
83
`define ROM_SIZE2A      7'd004  // Language ID Descriptor Start Length
84
`define ROM_SIZE2B      7'd010  // String Descriptor Length
85
`define ROM_SIZE2C      7'd010  // for future use
86
`define ROM_SIZE2D      7'd010  // for future use
87
 
88
`define ROM_START0      7'h00   // Device Descriptor Start Address
89
`define ROM_START1      7'h12   // Configuration Descriptor Start Address
90
`define ROM_START2A     7'h47   // Language ID Descriptor Start Address
91
`define ROM_START2B     7'h50   // String Descriptor Start Address
92
`define ROM_START2C     7'h60   // for future use
93
`define ROM_START2D     7'h70   // for future use
94
 
95
// Endpoint Configuration Constants
96
`define IN      14'b00_001_000000000
97
`define OUT     14'b00_010_000000000
98
`define CTRL    14'b10_100_000000000
99
`define ISO     14'b01_000_000000000
100
`define BULK    14'b10_000_000000000
101
`define INT     14'b00_000_000000000
102
 
103
// PID Encodings
104
`define USBF_T_PID_OUT          4'b0001
105
`define USBF_T_PID_IN           4'b1001
106
`define USBF_T_PID_SOF          4'b0101
107
`define USBF_T_PID_SETUP        4'b1101
108
`define USBF_T_PID_DATA0        4'b0011
109
`define USBF_T_PID_DATA1        4'b1011
110
`define USBF_T_PID_DATA2        4'b0111
111
`define USBF_T_PID_MDATA        4'b1111
112
`define USBF_T_PID_ACK          4'b0010
113
`define USBF_T_PID_NACK         4'b1010
114
`define USBF_T_PID_STALL        4'b1110
115
`define USBF_T_PID_NYET         4'b0110
116
`define USBF_T_PID_PRE          4'b1100
117
`define USBF_T_PID_ERR          4'b1100
118
`define USBF_T_PID_SPLIT        4'b1000
119
`define USBF_T_PID_PING         4'b0100
120
`define USBF_T_PID_RES          4'b0000
121
 
122
// The HMS_DEL is a constant for the "Half Micro Second"
123
// Clock pulse generator. This constant specifies how many
124
// Phy clocks there are between two hms_clock pulses. This
125
// constant plus 2 represents the actual delay.
126
// Example: For a 60 Mhz (16.667 nS period) Phy Clock, the
127
// delay must be 30 phy clock: 500ns / 16.667nS = 30 clocks
128
`define USBF_HMS_DEL            5'h16
129
 
130
// After sending Data in response to an IN token from host, the
131
// host must reply with an ack. The host has 622nS in Full Speed
132
// mode and 400nS in High Speed mode to reply. RX_ACK_TO_VAL_FS
133
// and RX_ACK_TO_VAL_HS are the numbers of UTMI clock cycles
134
// minus 2 for Full and High Speed modes.
135
//`define USBF_RX_ACK_TO_VAL_FS 8'd36
136
`define USBF_RX_ACK_TO_VAL_FS   8'd200
137
 
138
// After sending a OUT token the host must send a data packet.
139
// The host has 622nS in Full Speed mode and 400nS in High Speed
140
// mode to send the data packet.
141
// TX_DATA_TO_VAL_FS and TX_DATA_TO_VAL_HS are is the numbers of
142
// UTMI clock cycles minus 2.
143
//`define USBF_TX_DATA_TO_VAL_FS        8'd36
144
`define USBF_TX_DATA_TO_VAL_FS  8'd200

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.