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

Subversion Repositories usbhostslave

[/] [usbhostslave/] [trunk/] [RTL/] [include/] [usbSlaveControl_h.v] - Blame information for rev 2

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

Line No. Rev Author Line
1 2 sfielding
//////////////////////////////////////////////////////////////////////
2
////                                                              ////
3
//// usbSlaveControl.v                                            ////
4
////                                                              ////
5
//// This file is part of the usbhostslave opencores effort.
6
//// <http://www.opencores.org/cores//>                           ////
7
////                                                              ////
8
//// Module Description:                                          ////
9
//// 
10
////                                                              ////
11
//// To Do:                                                       ////
12
//// 
13
////                                                              ////
14
//// Author(s):                                                   ////
15
//// - Steve Fielding, sfielding@base2designs.com                 ////
16
////                                                              ////
17
//////////////////////////////////////////////////////////////////////
18
////                                                              ////
19
//// Copyright (C) 2004 Steve Fielding and OPENCORES.ORG          ////
20
////                                                              ////
21
//// This source file may be used and distributed without         ////
22
//// restriction provided that this copyright statement is not    ////
23
//// removed from the file and that any derivative work contains  ////
24
//// the original copyright notice and the associated disclaimer. ////
25
////                                                              ////
26
//// This source file is free software; you can redistribute it   ////
27
//// and/or modify it under the terms of the GNU Lesser General   ////
28
//// Public License as published by the Free Software Foundation; ////
29
//// either version 2.1 of the License, or (at your option) any   ////
30
//// later version.                                               ////
31
////                                                              ////
32
//// This source is distributed in the hope that it will be       ////
33
//// useful, but WITHOUT ANY WARRANTY; without even the implied   ////
34
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      ////
35
//// PURPOSE. See the GNU Lesser General Public License for more  ////
36
//// details.                                                     ////
37
////                                                              ////
38
//// You should have received a copy of the GNU Lesser General    ////
39
//// Public License along with this source; if not, download it   ////
40
//// from <http://www.opencores.org/lgpl.shtml>                   ////
41
////                                                              ////
42
//////////////////////////////////////////////////////////////////////
43
//
44
// $Id: usbSlaveControl_h.v,v 1.1.1.1 2004-10-11 04:00:57 sfielding Exp $
45
//
46
// CVS Revision History
47
//
48
// $Log: not supported by cvs2svn $
49
//
50
 
51
 
52
//endPointConstants 
53
`define NUM_OF_ENDPOINTS 4
54
`define NUM_OF_REGISTERS_PER_ENDPOINT 4
55
`define BASE_INDEX_FOR_ENDPOINT_REGS 0
56
`define ENDPOINT_CONTROL_REG 0
57
`define ENDPOINT_STATUS_REG 1
58
`define ENDPOINT_TRANSTYPE_STATUS_REG 2
59
`define NAK_TRANSTYPE_STATUS_REG 3
60
`define EP0_CTRL_REG 5'h0
61
`define EP0_STS_REG 5'h1
62
`define EP0_TRAN_TYPE_STS_REG 5'h2
63
`define EP0_NAK_TRAN_TYPE_STS_REG 5'h3
64
`define EP1_CTRL_REG 5'h4
65
`define EP1_STS_REG 5'h5
66
`define EP1_TRAN_TYPE_STS_REG 5'h6
67
`define EP1_NAK_TRAN_TYPE_STS_REG 5'h7
68
`define EP2_CTRL_REG 5'h8
69
`define EP2_STS_REG 5'h9
70
`define EP2_TRAN_TYPE_STS_REG 5'ha
71
`define EP2_NAK_TRAN_TYPE_STS_REG 5'hb
72
`define EP3_CTRL_REG 5'hc
73
`define EP3_STS_REG 5'hd
74
`define EP3_TRAN_TYPE_STS_REG 5'he
75
`define EP3_NAK_TRAN_TYPE_STS_REG 5'hf
76
 
77
 
78
//SCRegIndices 
79
`define LAST_ENDP_REG = `BASE_INDEX_FOR_ENDPOINT_REGS + (`NUM_OF_REGISTERS_PER_ENDPOINT * `NUM_OF_ENDPOINTS) - 1
80
`define SC_CONTROL_REG 5'h10
81
`define SC_LINE_STATUS_REG 5'h11
82
`define SC_INTERRUPT_STATUS_REG 5'h12
83
`define SC_INTERRUPT_MASK_REG 5'h13
84
`define SC_ADDRESS 5'h14
85
`define SC_FRAME_NUM_MSP 5'h15
86
`define SC_FRAME_NUM_LSP 5'h16
87
`define SCREG_BUFFER_LEN 5'h17
88
//SCRXStatusRegIndices 
89
`define NAK_SET_MASK 8'h10
90
//`define CRC_ERROR_BIT 0
91
//`define BIT_STUFF_ERROR_BIT 1
92
//`define RX_OVERFLOW_BIT 2
93
//`define RX_TIME_OUT_BIT 3
94
//`define NAK_SENT_BIT 4
95
//`define STALL_SENT_BIT 5
96
//`define ACK_RXED_BIT 6
97
//`define DATA_SEQUENCE_BIT 7
98
//SCEndPointControlRegIndices 
99
`define ENDPOINT_ENABLE_BIT 0
100
`define ENDPOINT_READY_BIT 1
101
`define ENDPOINT_OUTDATA_SEQUENCE_BIT 2
102
`define ENDPOINT_SEND_STALL_BIT 3
103
//SCMasterControlegIndices 
104
`define SC_GLOBAL_ENABLE_BIT 0
105
`define SC_TX_LINE_STATE_LSBIT 1
106
`define SC_TX_LINE_STATE_MSBIT 2
107
`define SC_DIRECT_CONTROL_BIT 3
108
`define SC_FULL_SPEED_LINE_POLARITY_BIT 4
109
`define SC_FULL_SPEED_LINE_RATE_BIT 5
110
//SCinterruptRegIndices 
111
`define TRANS_DONE_BIT 0
112
`define RESUME_INT_BIT 1
113
`define RESET_EVENT_BIT 2  //Line has entered reset state or left reset state
114
`define SOF_RECEIVED_BIT 3
115
`define NAK_SENT_INT_BIT 4
116
//TXTransactionTypes 
117
`define SC_SETUP_TRANS 0
118
`define SC_IN_TRANS 1
119
`define SC_OUTDATA_TRANS 2
120
//timeOuts 
121
`define SC_RX_PACKET_TOUT 18
122
 

powered by: WebSVN 2.1.0

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