//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
//// ////
|
//// ////
|
//// usbHostControl.v ////
|
//// usbHostControl.v ////
|
//// ////
|
//// ////
|
//// This file is part of the usbhostslave opencores effort.
|
//// This file is part of the usbhostslave opencores effort.
|
//// <http://www.opencores.org/cores//> ////
|
//// <http://www.opencores.org/cores//> ////
|
//// ////
|
//// ////
|
//// Module Description: ////
|
//// Module Description: ////
|
////
|
////
|
//// ////
|
//// ////
|
//// To Do: ////
|
//// To Do: ////
|
////
|
////
|
//// ////
|
//// ////
|
//// Author(s): ////
|
//// Author(s): ////
|
//// - Steve Fielding, sfielding@base2designs.com ////
|
//// - Steve Fielding, sfielding@base2designs.com ////
|
//// ////
|
//// ////
|
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
//// ////
|
//// ////
|
//// Copyright (C) 2004 Steve Fielding and OPENCORES.ORG ////
|
//// Copyright (C) 2004 Steve Fielding and OPENCORES.ORG ////
|
//// ////
|
//// ////
|
//// This source file may be used and distributed without ////
|
//// This source file may be used and distributed without ////
|
//// restriction provided that this copyright statement is not ////
|
//// restriction provided that this copyright statement is not ////
|
//// removed from the file and that any derivative work contains ////
|
//// removed from the file and that any derivative work contains ////
|
//// the original copyright notice and the associated disclaimer. ////
|
//// the original copyright notice and the associated disclaimer. ////
|
//// ////
|
//// ////
|
//// This source file is free software; you can redistribute it ////
|
//// This source file is free software; you can redistribute it ////
|
//// and/or modify it under the terms of the GNU Lesser General ////
|
//// and/or modify it under the terms of the GNU Lesser General ////
|
//// Public License as published by the Free Software Foundation; ////
|
//// Public License as published by the Free Software Foundation; ////
|
//// either version 2.1 of the License, or (at your option) any ////
|
//// either version 2.1 of the License, or (at your option) any ////
|
//// later version. ////
|
//// later version. ////
|
//// ////
|
//// ////
|
//// This source is distributed in the hope that it will be ////
|
//// This source is distributed in the hope that it will be ////
|
//// useful, but WITHOUT ANY WARRANTY; without even the implied ////
|
//// useful, but WITHOUT ANY WARRANTY; without even the implied ////
|
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ////
|
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ////
|
//// PURPOSE. See the GNU Lesser General Public License for more ////
|
//// PURPOSE. See the GNU Lesser General Public License for more ////
|
//// details. ////
|
//// details. ////
|
//// ////
|
//// ////
|
//// You should have received a copy of the GNU Lesser General ////
|
//// You should have received a copy of the GNU Lesser General ////
|
//// 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> ////
|
//// ////
|
//// ////
|
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
//
|
//
|
`timescale 1ns / 1ps
|
`timescale 1ns / 1ps
|
|
|
module usbHostControl(
|
module usbHostControl(
|
clk, rst,
|
clk, rst,
|
//sendPacket
|
//sendPacket
|
TxFifoRE, TxFifoData, TxFifoEmpty,
|
TxFifoRE, TxFifoData, TxFifoEmpty,
|
//getPacket
|
//getPacket
|
RxFifoWE, RxFifoData, RxFifoFull,
|
RxFifoWE, RxFifoData, RxFifoFull,
|
RxByteStatus, RxData, RxDataValid,
|
RxByteStatus, RxData, RxDataValid,
|
SIERxTimeOut,
|
SIERxTimeOut,
|
//speedCtrlMux
|
//speedCtrlMux
|
fullSpeedRate, fullSpeedPol,
|
fullSpeedRate, fullSpeedPol,
|
//HCTxPortArbiter
|
//HCTxPortArbiter
|
HCTxPortEn, HCTxPortRdy,
|
HCTxPortEn, HCTxPortRdy,
|
HCTxPortData, HCTxPortCtrl,
|
HCTxPortData, HCTxPortCtrl,
|
//rxStatusMonitor
|
//rxStatusMonitor
|
connectStateIn,
|
connectStateIn,
|
resumeDetectedIn,
|
resumeDetectedIn,
|
//USBHostControlBI
|
//USBHostControlBI
|
busAddress,
|
busAddress,
|
busDataIn,
|
busDataIn,
|
busDataOut,
|
busDataOut,
|
busWriteEn,
|
busWriteEn,
|
busStrobe_i,
|
busStrobe_i,
|
SOFSentIntOut,
|
SOFSentIntOut,
|
connEventIntOut,
|
connEventIntOut,
|
resumeIntOut,
|
resumeIntOut,
|
transDoneIntOut,
|
transDoneIntOut,
|
hostControlSelect
|
hostControlSelect
|
);
|
);
|
|
|
input clk, rst;
|
input clk, rst;
|
//sendPacket
|
//sendPacket
|
output TxFifoRE;
|
output TxFifoRE;
|
input [7:0] TxFifoData;
|
input [7:0] TxFifoData;
|
input TxFifoEmpty;
|
input TxFifoEmpty;
|
//getPacket
|
//getPacket
|
output RxFifoWE;
|
output RxFifoWE;
|
output [7:0] RxFifoData;
|
output [7:0] RxFifoData;
|
input RxFifoFull;
|
input RxFifoFull;
|
input [7:0] RxByteStatus;
|
input [7:0] RxByteStatus;
|
input [7:0] RxData;
|
input [7:0] RxData;
|
input RxDataValid;
|
input RxDataValid;
|
input SIERxTimeOut;
|
input SIERxTimeOut;
|
//speedCtrlMux
|
//speedCtrlMux
|
output fullSpeedRate;
|
output fullSpeedRate;
|
output fullSpeedPol;
|
output fullSpeedPol;
|
//HCTxPortArbiter
|
//HCTxPortArbiter
|
output HCTxPortEn;
|
output HCTxPortEn;
|
input HCTxPortRdy;
|
input HCTxPortRdy;
|
output [7:0] HCTxPortData;
|
output [7:0] HCTxPortData;
|
output [7:0] HCTxPortCtrl;
|
output [7:0] HCTxPortCtrl;
|
//rxStatusMonitor
|
//rxStatusMonitor
|
input [1:0] connectStateIn;
|
input [1:0] connectStateIn;
|
input resumeDetectedIn;
|
input resumeDetectedIn;
|
//USBHostControlBI
|
//USBHostControlBI
|
input [3:0] busAddress;
|
input [3:0] busAddress;
|
input [7:0] busDataIn;
|
input [7:0] busDataIn;
|
output [7:0] busDataOut;
|
output [7:0] busDataOut;
|
input busWriteEn;
|
input busWriteEn;
|
input busStrobe_i;
|
input busStrobe_i;
|
output SOFSentIntOut;
|
output SOFSentIntOut;
|
output connEventIntOut;
|
output connEventIntOut;
|
output resumeIntOut;
|
output resumeIntOut;
|
output transDoneIntOut;
|
output transDoneIntOut;
|
input hostControlSelect;
|
input hostControlSelect;
|
|
|
wire clk;
|
wire clk;
|
wire rst;
|
wire rst;
|
wire [10:0] frameNum;
|
wire [10:0] frameNum;
|
wire SOFSent;
|
wire SOFSent;
|
wire TxFifoRE;
|
wire TxFifoRE;
|
wire [7:0] TxFifoData;
|
wire [7:0] TxFifoData;
|
wire TxFifoEmpty;
|
wire TxFifoEmpty;
|
wire RxFifoWE;
|
wire RxFifoWE;
|
wire [7:0] RxFifoData;
|
wire [7:0] RxFifoData;
|
wire RxFifoFull;
|
wire RxFifoFull;
|
wire [7:0] RxByteStatus;
|
wire [7:0] RxByteStatus;
|
wire [7:0] RxData;
|
wire [7:0] RxData;
|
wire RxDataValid;
|
wire RxDataValid;
|
wire SIERxTimeOut;
|
wire SIERxTimeOut;
|
wire fullSpeedRate;
|
wire fullSpeedRate;
|
wire fullSpeedPol;
|
wire fullSpeedPol;
|
wire HCTxPortEn;
|
wire HCTxPortEn;
|
wire HCTxPortRdy;
|
wire HCTxPortRdy;
|
wire [7:0] HCTxPortData;
|
wire [7:0] HCTxPortData;
|
wire [7:0] HCTxPortCtrl;
|
wire [7:0] HCTxPortCtrl;
|
wire [1:0] connectStateIn;
|
wire [1:0] connectStateIn;
|
wire resumeDetectedIn;
|
wire resumeDetectedIn;
|
wire [3:0] busAddress;
|
wire [3:0] busAddress;
|
wire [7:0] busDataIn;
|
wire [7:0] busDataIn;
|
wire [7:0] busDataOut;
|
wire [7:0] busDataOut;
|
wire busWriteEn;
|
wire busWriteEn;
|
wire busStrobe_i;
|
wire busStrobe_i;
|
wire SOFSentIntOut;
|
wire SOFSentIntOut;
|
wire connEventIntOut;
|
wire connEventIntOut;
|
wire resumeIntOut;
|
wire resumeIntOut;
|
wire transDoneIntOut;
|
wire transDoneIntOut;
|
wire hostControlSelect;
|
wire hostControlSelect;
|
|
|
//internal wiring
|
//internal wiring
|
wire SOFTimerClr;
|
wire SOFTimerClr;
|
wire getPacketREn;
|
wire getPacketREn;
|
wire getPacketRdy;
|
wire getPacketRdy;
|
wire HCTxGnt;
|
wire HCTxGnt;
|
wire HCTxReq;
|
wire HCTxReq;
|
wire [3:0] HC_PID;
|
wire [3:0] HC_PID;
|
wire HC_SP_WEn;
|
wire HC_SP_WEn;
|
wire SOFTxGnt;
|
wire SOFTxGnt;
|
wire SOFTxReq;
|
wire SOFTxReq;
|
wire SOF_SP_WEn;
|
wire SOF_SP_WEn;
|
wire SOFEnable;
|
wire SOFEnable;
|
wire SOFSyncEn;
|
wire SOFSyncEn;
|
wire sendPacketCPReadyIn;
|
wire sendPacketCPReadyIn;
|
wire sendPacketCPReadyOut;
|
wire sendPacketCPReadyOut;
|
wire [3:0] sendPacketCPPIDIn;
|
wire [3:0] sendPacketCPPIDIn;
|
wire [3:0] sendPacketCPPIDOut;
|
wire [3:0] sendPacketCPPIDOut;
|
wire sendPacketCPWEnIn;
|
wire sendPacketCPWEnIn;
|
wire sendPacketCPWEnOut;
|
wire sendPacketCPWEnOut;
|
wire [7:0] SOFCntlCntl;
|
wire [7:0] SOFCntlCntl;
|
wire [7:0] SOFCntlData;
|
wire [7:0] SOFCntlData;
|
wire SOFCntlGnt;
|
wire SOFCntlGnt;
|
wire SOFCntlReq;
|
wire SOFCntlReq;
|
wire SOFCntlWEn;
|
wire SOFCntlWEn;
|
wire [7:0] directCntlCntl;
|
wire [7:0] directCntlCntl;
|
wire [7:0] directCntlData;
|
wire [7:0] directCntlData;
|
wire directCntlGnt;
|
wire directCntlGnt;
|
wire directCntlReq;
|
wire directCntlReq;
|
wire directCntlWEn;
|
wire directCntlWEn;
|
wire [7:0] sendPacketCntl;
|
wire [7:0] sendPacketCntl;
|
wire [7:0] sendPacketData;
|
wire [7:0] sendPacketData;
|
wire sendPacketGnt;
|
wire sendPacketGnt;
|
wire sendPacketReq;
|
wire sendPacketReq;
|
wire sendPacketWEn;
|
wire sendPacketWEn;
|
wire [15:0] SOFTimer;
|
wire [15:0] SOFTimer;
|
wire clrTxReq;
|
wire clrTxReq;
|
wire transDone;
|
wire transDone;
|
wire transReq;
|
wire transReq;
|
wire isoEn;
|
wire isoEn;
|
wire [1:0] transType;
|
wire [1:0] transType;
|
wire preAmbleEnable;
|
wire preAmbleEnable;
|
wire [1:0] directLineState;
|
wire [1:0] directLineState;
|
wire directLineCtrlEn;
|
wire directLineCtrlEn;
|
wire [6:0] TxAddr;
|
wire [6:0] TxAddr;
|
wire [3:0] TxEndP;
|
wire [3:0] TxEndP;
|
wire [7:0] RxPktStatus;
|
wire [7:0] RxPktStatus;
|
wire [3:0] RxPID;
|
wire [3:0] RxPID;
|
wire [1:0] connectStateOut;
|
wire [1:0] connectStateOut;
|
wire resumeIntFromRxStatusMon;
|
wire resumeIntFromRxStatusMon;
|
wire connectionEventFromRxStatusMon;
|
wire connectionEventFromRxStatusMon;
|
|
|
USBHostControlBI u_USBHostControlBI
|
USBHostControlBI u_USBHostControlBI
|
(.address(busAddress),
|
(.address(busAddress),
|
.dataIn(busDataIn),
|
.dataIn(busDataIn),
|
.dataOut(busDataOut),
|
.dataOut(busDataOut),
|
.writeEn(busWriteEn),
|
.writeEn(busWriteEn),
|
.strobe_i(busStrobe_i),
|
.strobe_i(busStrobe_i),
|
.clk(clk),
|
.clk(clk),
|
.rst(rst),
|
.rst(rst),
|
.SOFSentIntOut(SOFSentIntOut),
|
.SOFSentIntOut(SOFSentIntOut),
|
.connEventIntOut(connEventIntOut),
|
.connEventIntOut(connEventIntOut),
|
.resumeIntOut(resumeIntOut),
|
.resumeIntOut(resumeIntOut),
|
.transDoneIntOut(transDoneIntOut),
|
.transDoneIntOut(transDoneIntOut),
|
.TxTransTypeReg(transType),
|
.TxTransTypeReg(transType),
|
.TxSOFEnableReg(SOFEnable),
|
.TxSOFEnableReg(SOFEnable),
|
.TxAddrReg(TxAddr),
|
.TxAddrReg(TxAddr),
|
.TxEndPReg(TxEndP),
|
.TxEndPReg(TxEndP),
|
.frameNumIn(frameNum),
|
.frameNumIn(frameNum),
|
.RxPktStatusIn(RxPktStatus),
|
.RxPktStatusIn(RxPktStatus),
|
.RxPIDIn(RxPID),
|
.RxPIDIn(RxPID),
|
.connectStateIn(connectStateOut),
|
.connectStateIn(connectStateOut),
|
.SOFSentIn(SOFSent),
|
.SOFSentIn(SOFSent),
|
.connEventIn(connectionEventFromRxStatusMon),
|
.connEventIn(connectionEventFromRxStatusMon),
|
.resumeIntIn(resumeIntFromRxStatusMon),
|
.resumeIntIn(resumeIntFromRxStatusMon),
|
.transDoneIn(transDone),
|
.transDoneIn(transDone),
|
.hostControlSelect(hostControlSelect),
|
.hostControlSelect(hostControlSelect),
|
.clrTransReq(clrTxReq),
|
.clrTransReq(clrTxReq),
|
.preambleEn(preAmbleEnable),
|
.preambleEn(preAmbleEnable),
|
.SOFSync(SOFSyncEn),
|
.SOFSync(SOFSyncEn),
|
.TxLineState(directLineState),
|
.TxLineState(directLineState),
|
.LineDirectControlEn(directLineCtrlEn),
|
.LineDirectControlEn(directLineCtrlEn),
|
.fullSpeedPol(fullSpeedPol),
|
.fullSpeedPol(fullSpeedPol),
|
.fullSpeedRate(fullSpeedRate),
|
.fullSpeedRate(fullSpeedRate),
|
.transReq(transReq),
|
.transReq(transReq),
|
.isoEn(isoEn)
|
.isoEn(isoEn),
|
|
.SOFTimer(SOFTimer)
|
);
|
);
|
|
|
|
|
hostcontroller u_hostController
|
hostcontroller u_hostController
|
(.RXStatus(RxPktStatus),
|
(.RXStatus(RxPktStatus),
|
.clearTXReq(clrTxReq),
|
.clearTXReq(clrTxReq),
|
.clk(clk),
|
.clk(clk),
|
.getPacketREn(getPacketREn),
|
.getPacketREn(getPacketREn),
|
.getPacketRdy(getPacketRdy),
|
.getPacketRdy(getPacketRdy),
|
.rst(rst),
|
.rst(rst),
|
.sendPacketArbiterGnt(HCTxGnt),
|
.sendPacketArbiterGnt(HCTxGnt),
|
.sendPacketArbiterReq(HCTxReq),
|
.sendPacketArbiterReq(HCTxReq),
|
.sendPacketPID(HC_PID),
|
.sendPacketPID(HC_PID),
|
.sendPacketRdy(sendPacketCPReadyOut),
|
.sendPacketRdy(sendPacketCPReadyOut),
|
.sendPacketWEn(HC_SP_WEn),
|
.sendPacketWEn(HC_SP_WEn),
|
.transDone(transDone),
|
.transDone(transDone),
|
.transReq(transReq),
|
.transReq(transReq),
|
.transType(transType),
|
.transType(transType),
|
.isoEn(isoEn) );
|
.isoEn(isoEn) );
|
|
|
SOFController u_SOFController
|
SOFController u_SOFController
|
(.HCTxPortCntl(SOFCntlCntl),
|
(.HCTxPortCntl(SOFCntlCntl),
|
.HCTxPortData(SOFCntlData),
|
.HCTxPortData(SOFCntlData),
|
.HCTxPortGnt(SOFCntlGnt),
|
.HCTxPortGnt(SOFCntlGnt),
|
.HCTxPortRdy(HCTxPortRdy),
|
.HCTxPortRdy(HCTxPortRdy),
|
.HCTxPortReq(SOFCntlReq),
|
.HCTxPortReq(SOFCntlReq),
|
.HCTxPortWEn(SOFCntlWEn),
|
.HCTxPortWEn(SOFCntlWEn),
|
.SOFEnable(SOFEnable),
|
.SOFEnable(SOFEnable),
|
.SOFTimerClr(SOFTimerClr),
|
.SOFTimerClr(SOFTimerClr),
|
.SOFTimer(SOFTimer),
|
.SOFTimer(SOFTimer),
|
.clk(clk),
|
.clk(clk),
|
.rst(rst) );
|
.rst(rst) );
|
|
|
SOFTransmit u_SOFTransmit
|
SOFTransmit u_SOFTransmit
|
(.SOFEnable(SOFEnable),
|
(.SOFEnable(SOFEnable),
|
.SOFSent(SOFSent),
|
.SOFSent(SOFSent),
|
.SOFSyncEn(SOFSyncEn),
|
.SOFSyncEn(SOFSyncEn),
|
.SOFTimerClr(SOFTimerClr),
|
.SOFTimerClr(SOFTimerClr),
|
.SOFTimer(SOFTimer),
|
.SOFTimer(SOFTimer),
|
.clk(clk),
|
.clk(clk),
|
.rst(rst),
|
.rst(rst),
|
.sendPacketArbiterGnt(SOFTxGnt),
|
.sendPacketArbiterGnt(SOFTxGnt),
|
.sendPacketArbiterReq(SOFTxReq),
|
.sendPacketArbiterReq(SOFTxReq),
|
.sendPacketRdy(sendPacketCPReadyOut),
|
.sendPacketRdy(sendPacketCPReadyOut),
|
.sendPacketWEn(SOF_SP_WEn) );
|
.sendPacketWEn(SOF_SP_WEn) );
|
|
|
|
|
sendPacketArbiter u_sendPacketArbiter
|
sendPacketArbiter u_sendPacketArbiter
|
(.HCTxGnt(HCTxGnt),
|
(.HCTxGnt(HCTxGnt),
|
.HCTxReq(HCTxReq),
|
.HCTxReq(HCTxReq),
|
.HC_PID(HC_PID),
|
.HC_PID(HC_PID),
|
.HC_SP_WEn(HC_SP_WEn),
|
.HC_SP_WEn(HC_SP_WEn),
|
.SOFTxGnt(SOFTxGnt),
|
.SOFTxGnt(SOFTxGnt),
|
.SOFTxReq(SOFTxReq),
|
.SOFTxReq(SOFTxReq),
|
.SOF_SP_WEn(SOF_SP_WEn),
|
.SOF_SP_WEn(SOF_SP_WEn),
|
.clk(clk),
|
.clk(clk),
|
.rst(rst),
|
.rst(rst),
|
.sendPacketPID(sendPacketCPPIDIn),
|
.sendPacketPID(sendPacketCPPIDIn),
|
.sendPacketWEnable(sendPacketCPWEnIn) );
|
.sendPacketWEnable(sendPacketCPWEnIn) );
|
|
|
sendPacketCheckPreamble u_sendPacketCheckPreamble
|
sendPacketCheckPreamble u_sendPacketCheckPreamble
|
(.sendPacketCPPID(sendPacketCPPIDIn),
|
(.sendPacketCPPID(sendPacketCPPIDIn),
|
.clk(clk),
|
.clk(clk),
|
.preAmbleEnable(preAmbleEnable),
|
.preAmbleEnable(preAmbleEnable),
|
.rst(rst),
|
.rst(rst),
|
.sendPacketCPReady(sendPacketCPReadyOut),
|
.sendPacketCPReady(sendPacketCPReadyOut),
|
.sendPacketCPWEn(sendPacketCPWEnIn),
|
.sendPacketCPWEn(sendPacketCPWEnIn),
|
.sendPacketPID(sendPacketCPPIDOut),
|
.sendPacketPID(sendPacketCPPIDOut),
|
.sendPacketRdy(sendPacketCPReadyIn),
|
.sendPacketRdy(sendPacketCPReadyIn),
|
.sendPacketWEn(sendPacketCPWEnOut) );
|
.sendPacketWEn(sendPacketCPWEnOut) );
|
|
|
sendPacket u_sendPacket
|
sendPacket u_sendPacket
|
(.HCTxPortCntl(sendPacketCntl),
|
(.HCTxPortCntl(sendPacketCntl),
|
.HCTxPortData(sendPacketData),
|
.HCTxPortData(sendPacketData),
|
.HCTxPortGnt(sendPacketGnt),
|
.HCTxPortGnt(sendPacketGnt),
|
.HCTxPortRdy(HCTxPortRdy),
|
.HCTxPortRdy(HCTxPortRdy),
|
.HCTxPortReq(sendPacketReq),
|
.HCTxPortReq(sendPacketReq),
|
.HCTxPortWEn(sendPacketWEn),
|
.HCTxPortWEn(sendPacketWEn),
|
.PID(sendPacketCPPIDOut),
|
.PID(sendPacketCPPIDOut),
|
.TxAddr(TxAddr),
|
.TxAddr(TxAddr),
|
.TxEndP(TxEndP),
|
.TxEndP(TxEndP),
|
.clk(clk),
|
.clk(clk),
|
.fifoData(TxFifoData),
|
.fifoData(TxFifoData),
|
.fifoEmpty(TxFifoEmpty),
|
.fifoEmpty(TxFifoEmpty),
|
.fifoReadEn(TxFifoRE),
|
.fifoReadEn(TxFifoRE),
|
.frameNum(frameNum),
|
.frameNum(frameNum),
|
.rst(rst),
|
.rst(rst),
|
.sendPacketRdy(sendPacketCPReadyIn),
|
.sendPacketRdy(sendPacketCPReadyIn),
|
.sendPacketWEn(sendPacketCPWEnOut),
|
.sendPacketWEn(sendPacketCPWEnOut),
|
.fullSpeedPolarity(fullSpeedPol) );
|
.fullSpeedPolarity(fullSpeedPol) );
|
|
|
directControl u_directControl
|
directControl u_directControl
|
(.HCTxPortCntl(directCntlCntl),
|
(.HCTxPortCntl(directCntlCntl),
|
.HCTxPortData(directCntlData),
|
.HCTxPortData(directCntlData),
|
.HCTxPortGnt(directCntlGnt),
|
.HCTxPortGnt(directCntlGnt),
|
.HCTxPortRdy(HCTxPortRdy),
|
.HCTxPortRdy(HCTxPortRdy),
|
.HCTxPortReq(directCntlReq),
|
.HCTxPortReq(directCntlReq),
|
.HCTxPortWEn(directCntlWEn),
|
.HCTxPortWEn(directCntlWEn),
|
.clk(clk),
|
.clk(clk),
|
.directControlEn(directLineCtrlEn),
|
.directControlEn(directLineCtrlEn),
|
.directControlLineState(directLineState),
|
.directControlLineState(directLineState),
|
.rst(rst) );
|
.rst(rst) );
|
|
|
HCTxPortArbiter u_HCTxPortArbiter
|
HCTxPortArbiter u_HCTxPortArbiter
|
(.HCTxPortCntl(HCTxPortCtrl),
|
(.HCTxPortCntl(HCTxPortCtrl),
|
.HCTxPortData(HCTxPortData),
|
.HCTxPortData(HCTxPortData),
|
.HCTxPortWEnable(HCTxPortEn),
|
.HCTxPortWEnable(HCTxPortEn),
|
.SOFCntlCntl(SOFCntlCntl),
|
.SOFCntlCntl(SOFCntlCntl),
|
.SOFCntlData(SOFCntlData),
|
.SOFCntlData(SOFCntlData),
|
.SOFCntlGnt(SOFCntlGnt),
|
.SOFCntlGnt(SOFCntlGnt),
|
.SOFCntlReq(SOFCntlReq),
|
.SOFCntlReq(SOFCntlReq),
|
.SOFCntlWEn(SOFCntlWEn),
|
.SOFCntlWEn(SOFCntlWEn),
|
.clk(clk),
|
.clk(clk),
|
.directCntlCntl(directCntlCntl),
|
.directCntlCntl(directCntlCntl),
|
.directCntlData(directCntlData),
|
.directCntlData(directCntlData),
|
.directCntlGnt(directCntlGnt),
|
.directCntlGnt(directCntlGnt),
|
.directCntlReq(directCntlReq),
|
.directCntlReq(directCntlReq),
|
.directCntlWEn(directCntlWEn),
|
.directCntlWEn(directCntlWEn),
|
.rst(rst),
|
.rst(rst),
|
.sendPacketCntl(sendPacketCntl),
|
.sendPacketCntl(sendPacketCntl),
|
.sendPacketData(sendPacketData),
|
.sendPacketData(sendPacketData),
|
.sendPacketGnt(sendPacketGnt),
|
.sendPacketGnt(sendPacketGnt),
|
.sendPacketReq(sendPacketReq),
|
.sendPacketReq(sendPacketReq),
|
.sendPacketWEn(sendPacketWEn) );
|
.sendPacketWEn(sendPacketWEn) );
|
|
|
getPacket u_getPacket
|
getPacket u_getPacket
|
(.RXDataIn(RxData),
|
(.RXDataIn(RxData),
|
.RXDataValid(RxDataValid),
|
.RXDataValid(RxDataValid),
|
.RXFifoData(RxFifoData),
|
.RXFifoData(RxFifoData),
|
.RXFifoFull(RxFifoFull),
|
.RXFifoFull(RxFifoFull),
|
.RXFifoWEn(RxFifoWE),
|
.RXFifoWEn(RxFifoWE),
|
.RXPacketRdy(getPacketRdy),
|
.RXPacketRdy(getPacketRdy),
|
.RXPktStatus(RxPktStatus),
|
.RXPktStatus(RxPktStatus),
|
.RXStreamStatusIn(RxByteStatus),
|
.RXStreamStatusIn(RxByteStatus),
|
.RxPID(RxPID),
|
.RxPID(RxPID),
|
.SIERxTimeOut(SIERxTimeOut),
|
.SIERxTimeOut(SIERxTimeOut),
|
.clk(clk),
|
.clk(clk),
|
.getPacketEn(getPacketREn),
|
.getPacketEn(getPacketREn),
|
.rst(rst) );
|
.rst(rst) );
|
|
|
rxStatusMonitor u_rxStatusMonitor
|
rxStatusMonitor u_rxStatusMonitor
|
(.connectStateIn(connectStateIn),
|
(.connectStateIn(connectStateIn),
|
.connectStateOut(connectStateOut),
|
.connectStateOut(connectStateOut),
|
.resumeDetectedIn(resumeDetectedIn),
|
.resumeDetectedIn(resumeDetectedIn),
|
.connectionEventOut(connectionEventFromRxStatusMon),
|
.connectionEventOut(connectionEventFromRxStatusMon),
|
.resumeIntOut(resumeIntFromRxStatusMon),
|
.resumeIntOut(resumeIntFromRxStatusMon),
|
.clk(clk),
|
.clk(clk),
|
.rst(rst) );
|
.rst(rst) );
|
|
|
endmodule
|
endmodule
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|