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

Subversion Repositories usbhostslave

[/] [usbhostslave/] [trunk/] [RTL/] [wrapper/] [usbSlaveCyc2Wrap_usb1t11.v] - Blame information for rev 40

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 39 sfielding
//////////////////////////////////////////////////////////////////////
2
////                                                              ////
3
//// usbSlaveCyc2Wrap_usb1t11.v                                           ////
4
////                                                              ////
5
//// This file is part of the usbhostslave opencores effort.
6
//// <http://www.opencores.org/cores//>                           ////
7
////                                                              ////
8
//// Module Description:                                          ////
9
////   Top level module wrapper. 
10
////                                                              ////
11
//// To Do:                                                       ////
12
//// 
13
////                                                              ////
14
//// Author(s):                                                   ////
15
//// - Steve Fielding, sfielding@base2designs.com                 ////
16
////                                                              ////
17
//////////////////////////////////////////////////////////////////////
18
////                                                              ////
19
//// Copyright (C) 2008 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
`include "timescale.v"
45
 
46
 
47
module usbSlaveCyc2Wrap_usb1t11(
48
  clk_i,
49
  rst_i,
50
  address_i,
51
  data_i,
52
  data_o,
53
  we_i,
54
  strobe_i,
55
  ack_o,
56
  irq,
57
  usbClk,
58
  USBWireVPin,
59
  USBWireVMin,
60
  USBWireVPout,
61
  USBWireVMout,
62
  USBWireOE_n,
63
  USBFullSpeed,
64
  USBDPlusPullup,
65
  USBDMinusPullup,
66
  vBusDetect
67
   );
68
 
69
input clk_i;
70
input rst_i;
71
input [7:0] address_i;
72
input [7:0] data_i;
73
output [7:0] data_o;
74
input we_i;
75
input strobe_i;
76
output ack_o;
77
output irq;
78
input usbClk;
79
input USBWireVPin /* synthesis useioff=1 */;
80
input USBWireVMin /* synthesis useioff=1 */;
81
output USBWireVPout /* synthesis useioff=1 */;
82
output USBWireVMout /* synthesis useioff=1 */;
83
output USBWireOE_n /* synthesis useioff=1 */;
84
output USBFullSpeed /* synthesis useioff=1 */;
85
output USBDPlusPullup;
86
output USBDMinusPullup;
87
input vBusDetect;
88
 
89
wire clk_i;
90
wire rst_i;
91
wire [7:0] address_i;
92
wire [7:0] data_i;
93
wire [7:0] data_o;
94
wire irq;
95
wire usbClk;
96
wire USBWireDataOutTick;
97
wire USBWireDataInTick;
98
wire USBFullSpeed;
99
 
100
//internal wiring 
101
wire slaveSOFRxedIntOut;
102
wire slaveResetEventIntOut;
103
wire slaveResumeIntOut;
104
wire slaveTransDoneIntOut;
105
wire slaveNAKSentIntOut;
106
wire slaveVBusDetIntOut;
107
wire USBWireCtrlOut;
108
wire [1:0] USBWireDataIn;
109
wire [1:0] USBWireDataOut;
110
 
111
 
112
assign irq = slaveSOFRxedIntOut | slaveResetEventIntOut |
113
             slaveResumeIntOut | slaveTransDoneIntOut |
114
             slaveNAKSentIntOut | slaveVBusDetIntOut;
115
 
116
assign USBWireDataIn = {USBWireVPin, USBWireVMin};
117
assign {USBWireVPout, USBWireVMout} = USBWireDataOut;
118
assign USBWireOE_n = ~USBWireCtrlOut;
119
 
120
//Parameters declaration: 
121
defparam usbSlaveInst.EP0_FIFO_DEPTH = 64;
122
defparam usbSlaveInst.EP0_FIFO_ADDR_WIDTH = 6;
123
defparam usbSlaveInst.EP1_FIFO_DEPTH = 64;
124
defparam usbSlaveInst.EP1_FIFO_ADDR_WIDTH = 6;
125
defparam usbSlaveInst.EP2_FIFO_DEPTH = 64;
126
defparam usbSlaveInst.EP2_FIFO_ADDR_WIDTH = 6;
127
defparam usbSlaveInst.EP3_FIFO_DEPTH = 64;
128
defparam usbSlaveInst.EP3_FIFO_ADDR_WIDTH = 6;
129
usbSlave usbSlaveInst (
130
  .clk_i(clk_i),
131
  .rst_i(rst_i),
132
  .address_i(address_i),
133
  .data_i(data_i),
134
  .data_o(data_o),
135
  .we_i(we_i),
136
  .strobe_i(strobe_i),
137
  .ack_o(ack_o),
138
  .usbClk(usbClk),
139
  .slaveSOFRxedIntOut(slaveSOFRxedIntOut),
140
  .slaveResetEventIntOut(slaveResetEventIntOut),
141
  .slaveResumeIntOut(slaveResumeIntOut),
142
  .slaveTransDoneIntOut(slaveTransDoneIntOut),
143
  .slaveNAKSentIntOut(slaveNAKSentIntOut),
144
  .slaveVBusDetIntOut(slaveVBusDetIntOut),
145
  .USBWireDataIn(USBWireDataIn),
146
  .USBWireDataInTick(USBWireDataInTick),
147
  .USBWireDataOut(USBWireDataOut),
148
  .USBWireDataOutTick(USBWireDataOutTick),
149
  .USBWireCtrlOut(USBWireCtrlOut),
150
  .USBFullSpeed(USBFullSpeed),
151
  .USBDPlusPullup(USBDPlusPullup),
152
  .USBDMinusPullup(USBDMinusPullup),
153
  .vBusDetect(vBusDetect)
154
);
155
 
156
 
157
endmodule
158
 
159
 
160
 
161
 
162
 
163
 
164
 

powered by: WebSVN 2.1.0

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