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

Subversion Repositories usb1_funct

[/] [usb1_funct/] [trunk/] [rtl/] [verilog/] [usb1_defines.v] - Blame information for rev 2

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 rudi
/////////////////////////////////////////////////////////////////////
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.1.1.1 2002-09-19 12:07:40 rudi Exp $
42
//
43
//  $Date: 2002-09-19 12:07:40 $
44
//  $Revision: 1.1.1.1 $
45
//  $Author: rudi $
46
//  $Locker:  $
47
//  $State: Exp $
48
//
49
// Change History:
50
//               $Log: not supported by cvs2svn $
51
//
52
//
53
//
54
//
55
//
56
//
57
//
58
 
59
`include "timescale.v"
60
 
61
//`define USBF_DEBUG
62
//`define USBF_VERBOSE_DEBUG
63
 
64
 
65
// Enable or disable using chunkc for isochronous endpoints
66
`USB1_ISO_CHUNKS
67
 
68
/////////////////////////////////////////////////////////////////////
69
//
70
// Items below this point should NOT be modified by the end user
71
// UNLESS you know exactly what you are doing !
72
// Modify at you own risk !!!
73
//
74
/////////////////////////////////////////////////////////////////////
75
 
76
`define IN      14'b00_001_000000000
77
`define OUT     14'b00_010_000000000
78
`define CTRL    14'b10_100_000000000
79
`define ISO     14'b01_000_000000000
80
`define BULK    14'b10_000_000000000
81
`define INT     14'b00_000_000000000
82
 
83
// PID Encodings
84
`define USBF_T_PID_OUT          4'b0001
85
`define USBF_T_PID_IN           4'b1001
86
`define USBF_T_PID_SOF          4'b0101
87
`define USBF_T_PID_SETUP        4'b1101
88
`define USBF_T_PID_DATA0        4'b0011
89
`define USBF_T_PID_DATA1        4'b1011
90
`define USBF_T_PID_DATA2        4'b0111
91
`define USBF_T_PID_MDATA        4'b1111
92
`define USBF_T_PID_ACK          4'b0010
93
`define USBF_T_PID_NACK         4'b1010
94
`define USBF_T_PID_STALL        4'b1110
95
`define USBF_T_PID_NYET         4'b0110
96
`define USBF_T_PID_PRE          4'b1100
97
`define USBF_T_PID_ERR          4'b1100
98
`define USBF_T_PID_SPLIT        4'b1000
99
`define USBF_T_PID_PING         4'b0100
100
`define USBF_T_PID_RES          4'b0000
101
 
102
// The HMS_DEL is a constant for the "Half Micro Second"
103
// Clock pulse generator. This constant specifies how many
104
// Phy clocks there are between two hms_clock pulses. This
105
// constant plus 2 represents the actual delay.
106
// Example: For a 60 Mhz (16.667 nS period) Phy Clock, the
107
// delay must be 30 phy clock: 500ns / 16.667nS = 30 clocks
108
`define USBF_HMS_DEL            5'h16
109
 
110
// After sending Data in response to an IN token from host, the
111
// host must reply with an ack. The host has 622nS in Full Speed
112
// mode and 400nS in High Speed mode to reply. RX_ACK_TO_VAL_FS
113
// and RX_ACK_TO_VAL_HS are the numbers of UTMI clock cycles
114
// minus 2 for Full and High Speed modes.
115
//`define USBF_RX_ACK_TO_VAL_FS 8'd36
116
`define USBF_RX_ACK_TO_VAL_FS   8'd200
117
 
118
// After sending a OUT token the host must send a data packet.
119
// The host has 622nS in Full Speed mode and 400nS in High Speed
120
// mode to send the data packet.
121
// TX_DATA_TO_VAL_FS and TX_DATA_TO_VAL_HS are is the numbers of
122
// UTMI clock cycles minus 2.
123
//`define USBF_TX_DATA_TO_VAL_FS        8'd36
124
`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.