Line 39... |
Line 39... |
//// Public License along with this source; if not, download it ////
|
//// Public License along with this source; if not, download it ////
|
//// from <http://www.opencores.org/lgpl.shtml> ////
|
//// from <http://www.opencores.org/lgpl.shtml> ////
|
//// ////
|
//// ////
|
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
//
|
//
|
// $Id: usbHostSlave.v,v 1.2 2004-12-18 14:36:23 sfielding Exp $
|
`timescale 1ns / 1ps
|
//
|
|
// CVS Revision History
|
|
//
|
|
// $Log: not supported by cvs2svn $
|
|
// Revision 1.1.1.1 2004/10/11 04:01:11 sfielding
|
|
// Created
|
|
//
|
|
//
|
|
|
|
module usbHostSlave(
|
module usbHostSlave(
|
clk,
|
clk,
|
rst,
|
rst,
|
address_i,
|
address_i,
|
Line 71... |
Line 63... |
slaveTransDoneIntOut,
|
slaveTransDoneIntOut,
|
USBWireDataIn,
|
USBWireDataIn,
|
USBWireDataInTick,
|
USBWireDataInTick,
|
USBWireDataOut,
|
USBWireDataOut,
|
USBWireDataOutTick,
|
USBWireDataOutTick,
|
USBWireCtrlOut
|
USBWireCtrlOut,
|
|
USBFullSpeed
|
);
|
);
|
parameter HOST_FIFO_DEPTH = 64; //HOST_FIFO_DEPTH = HOST_ADDR_WIDTH^2
|
parameter HOST_FIFO_DEPTH = 64; //HOST_FIFO_DEPTH = HOST_ADDR_WIDTH^2
|
parameter HOST_FIFO_ADDR_WIDTH = 6;
|
parameter HOST_FIFO_ADDR_WIDTH = 6;
|
parameter EP0_FIFO_DEPTH = 64;
|
parameter EP0_FIFO_DEPTH = 64;
|
parameter EP0_FIFO_ADDR_WIDTH = 6;
|
parameter EP0_FIFO_ADDR_WIDTH = 6;
|
Line 106... |
Line 99... |
input [1:0] USBWireDataIn;
|
input [1:0] USBWireDataIn;
|
output [1:0] USBWireDataOut;
|
output [1:0] USBWireDataOut;
|
output USBWireDataOutTick;
|
output USBWireDataOutTick;
|
output USBWireDataInTick;
|
output USBWireDataInTick;
|
output USBWireCtrlOut;
|
output USBWireCtrlOut;
|
|
output USBFullSpeed;
|
|
|
wire clk;
|
wire clk;
|
wire rst;
|
wire rst;
|
wire [7:0] address_i;
|
wire [7:0] address_i;
|
wire [7:0] data_i;
|
wire [7:0] data_i;
|
Line 129... |
Line 123... |
wire [1:0] USBWireDataIn;
|
wire [1:0] USBWireDataIn;
|
wire [1:0] USBWireDataOut;
|
wire [1:0] USBWireDataOut;
|
wire USBWireDataOutTick;
|
wire USBWireDataOutTick;
|
wire USBWireDataInTick;
|
wire USBWireDataInTick;
|
wire USBWireCtrlOut;
|
wire USBWireCtrlOut;
|
|
wire USBFullSpeed;
|
|
|
//internal wiring
|
//internal wiring
|
wire hostControlSel;
|
wire hostControlSel;
|
wire slaveControlSel;
|
wire slaveControlSel;
|
wire hostRxFifoSel;
|
wire hostRxFifoSel;
|
Line 207... |
Line 202... |
wire slaveEP0TxFifoSel;
|
wire slaveEP0TxFifoSel;
|
wire slaveEP1TxFifoSel;
|
wire slaveEP1TxFifoSel;
|
wire slaveEP2TxFifoSel;
|
wire slaveEP2TxFifoSel;
|
wire slaveEP3TxFifoSel;
|
wire slaveEP3TxFifoSel;
|
|
|
|
assign USBFullSpeed = fullSpeedBitRateToSIE;
|
|
|
usbHostControl u_usbHostControl(
|
usbHostControl u_usbHostControl(
|
.clk(clk),
|
.clk(clk),
|
.rst(rst),
|
.rst(rst),
|
.TxFifoRE(hostTxFifoRE),
|
.TxFifoRE(hostTxFifoRE),
|
.TxFifoData(hostTxFifoData),
|
.TxFifoData(hostTxFifoData),
|
Line 344... |
Line 341... |
.fullSpeedBitRateToSIE(fullSpeedBitRateToSIE),
|
.fullSpeedBitRateToSIE(fullSpeedBitRateToSIE),
|
.fullSpeedBitRateFromHost(fullSpeedBitRateFromHost),
|
.fullSpeedBitRateFromHost(fullSpeedBitRateFromHost),
|
.fullSpeedBitRateFromSlave(fullSpeedBitRateFromSlave),
|
.fullSpeedBitRateFromSlave(fullSpeedBitRateFromSlave),
|
.dataIn(data_i),
|
.dataIn(data_i),
|
.dataOut(dataFromHostSlaveMux),
|
.dataOut(dataFromHostSlaveMux),
|
|
.address(address_i[0]),
|
.writeEn(writeEn),
|
.writeEn(writeEn),
|
.strobe_i(strobe_i),
|
.strobe_i(strobe_i),
|
.clk(clk),
|
.clk(clk),
|
.rst(rst),
|
.rst(rst),
|
.hostSlaveMuxSel(hostSlaveMuxSel) );
|
.hostSlaveMuxSel(hostSlaveMuxSel) );
|