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

Subversion Repositories usbhostslave

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 39 sfielding
//////////////////////////////////////////////////////////////////////
2
////                                                              ////
3
//// usbHostCyc2Wrap_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 usbHostCyc2Wrap_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
   );
65
 
66
input clk_i;
67
input rst_i;
68
input [7:0] address_i;
69
input [7:0] data_i;
70
output [7:0] data_o;
71
input we_i;
72
input strobe_i;
73
output ack_o;
74
output irq;
75
input usbClk;
76
input USBWireVPin /* synthesis useioff=1 */;
77
input USBWireVMin /* synthesis useioff=1 */;
78
output USBWireVPout /* synthesis useioff=1 */;
79
output USBWireVMout /* synthesis useioff=1 */;
80
output USBWireOE_n /* synthesis useioff=1 */;
81
output USBFullSpeed /* synthesis useioff=1 */;
82
 
83
wire clk_i;
84
wire rst_i;
85
wire [7:0] address_i;
86
wire [7:0] data_i;
87
wire [7:0] data_o;
88
wire irq;
89
wire usbClk;
90
wire USBWireDataOutTick;
91
wire USBWireDataInTick;
92
wire USBFullSpeed;
93
 
94
//internal wiring 
95
wire hostSOFSentIntOut;
96
wire hostConnEventIntOut;
97
wire hostResumeIntOut;
98
wire hostTransDoneIntOut;
99
wire slaveSOFRxedIntOut;
100
wire slaveResetEventIntOut;
101
wire slaveResumeIntOut;
102
wire slaveTransDoneIntOut;
103
wire slaveNAKSentIntOut;
104
wire USBWireCtrlOut;
105
wire [1:0] USBWireDataIn;
106
wire [1:0] USBWireDataOut;
107
 
108
 
109
assign irq = hostSOFSentIntOut | hostConnEventIntOut |
110
             hostResumeIntOut | hostTransDoneIntOut;
111
 
112
assign USBWireDataIn = {USBWireVPin, USBWireVMin};
113
assign {USBWireVPout, USBWireVMout} = USBWireDataOut;
114
assign USBWireOE_n = ~USBWireCtrlOut;
115
 
116
//Parameters declaration: 
117
defparam usbHostInst.HOST_FIFO_DEPTH = 64;
118
parameter HOST_FIFO_DEPTH = 64;
119
defparam usbHostInst.HOST_FIFO_ADDR_WIDTH = 6;
120
parameter HOST_FIFO_ADDR_WIDTH = 6;
121
 
122
usbHost usbHostInst (
123
  .clk_i(clk_i),
124
  .rst_i(rst_i),
125
  .address_i(address_i),
126
  .data_i(data_i),
127
  .data_o(data_o),
128
  .we_i(we_i),
129
  .strobe_i(strobe_i),
130
  .ack_o(ack_o),
131
  .usbClk(usbClk),
132
  .hostSOFSentIntOut(hostSOFSentIntOut),
133
  .hostConnEventIntOut(hostConnEventIntOut),
134
  .hostResumeIntOut(hostResumeIntOut),
135
  .hostTransDoneIntOut(hostTransDoneIntOut),
136
  .USBWireDataIn(USBWireDataIn),
137
  .USBWireDataInTick(USBWireDataInTick),
138
  .USBWireDataOut(USBWireDataOut),
139
  .USBWireDataOutTick(USBWireDataOutTick),
140
  .USBWireCtrlOut(USBWireCtrlOut),
141
  .USBFullSpeed(USBFullSpeed));
142
 
143
 
144
endmodule
145
 
146
 
147
 
148
 
149
 
150
 
151
 

powered by: WebSVN 2.1.0

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