Line 39... |
Line 39... |
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
//
|
//
|
// CVS Revision History
|
// CVS Revision History
|
//
|
//
|
// $Log: not supported by cvs2svn $
|
// $Log: not supported by cvs2svn $
|
// Revision 1.12 2002/02/11 09:18:22 mohor
|
|
// Tx status is written back to the BD.
|
|
//
|
|
// Revision 1.11 2002/02/08 16:21:54 mohor
|
// Revision 1.11 2002/02/08 16:21:54 mohor
|
// Rx status is written back to the BD.
|
// Rx status is written back to the BD.
|
//
|
//
|
// Revision 1.10 2002/02/06 14:10:21 mohor
|
// Revision 1.10 2002/02/06 14:10:21 mohor
|
// non-DMA host interface added. Select the right configutation in eth_defines.
|
// non-DMA host interface added. Select the right configutation in eth_defines.
|
Line 269... |
Line 266... |
wire ShortFrame;
|
wire ShortFrame;
|
wire DribbleNibble; // Extra nibble received
|
wire DribbleNibble; // Extra nibble received
|
wire ReceivedPacketTooBig; // Received packet is too big
|
wire ReceivedPacketTooBig; // Received packet is too big
|
wire [47:0] r_MAC; // MAC address
|
wire [47:0] r_MAC; // MAC address
|
wire LoadRxStatus; // Rx status was loaded
|
wire LoadRxStatus; // Rx status was loaded
|
|
wire [31:0] r_HASH0; // HASH table, lower 4 bytes
|
|
wire [31:0] r_HASH1; // HASH table, upper 4 bytes
|
wire [7:0] r_TxBDNum; // Receive buffer descriptor number
|
wire [7:0] r_TxBDNum; // Receive buffer descriptor number
|
wire [6:0] r_IPGT; //
|
wire [6:0] r_IPGT; //
|
wire [6:0] r_IPGR1; //
|
wire [6:0] r_IPGR1; //
|
wire [6:0] r_IPGR2; //
|
wire [6:0] r_IPGR2; //
|
wire [5:0] r_CollValid; //
|
wire [5:0] r_CollValid; //
|
Line 318... |
Line 316... |
.Cs(RegCs), .Clk(wb_clk_i), .Reset(wb_rst_i),
|
.Cs(RegCs), .Clk(wb_clk_i), .Reset(wb_rst_i),
|
.DataOut(RegDataOut), .r_DmaEn(r_DmaEn), .r_RecSmall(r_RecSmall),
|
.DataOut(RegDataOut), .r_DmaEn(r_DmaEn), .r_RecSmall(r_RecSmall),
|
.r_Pad(r_Pad), .r_HugEn(r_HugEn), .r_CrcEn(r_CrcEn),
|
.r_Pad(r_Pad), .r_HugEn(r_HugEn), .r_CrcEn(r_CrcEn),
|
.r_DlyCrcEn(r_DlyCrcEn), .r_Rst(r_Rst), .r_FullD(r_FullD),
|
.r_DlyCrcEn(r_DlyCrcEn), .r_Rst(r_Rst), .r_FullD(r_FullD),
|
.r_ExDfrEn(r_ExDfrEn), .r_NoBckof(r_NoBckof), .r_LoopBck(r_LoopBck),
|
.r_ExDfrEn(r_ExDfrEn), .r_NoBckof(r_NoBckof), .r_LoopBck(r_LoopBck),
|
.r_IFG(r_IFG), .r_Pro(), .r_Iam(),
|
.r_IFG(r_IFG), .r_Pro(r_Pro), .r_Iam(),
|
.r_Bro(), .r_NoPre(r_NoPre), .r_TxEn(r_TxEn),
|
.r_Bro(r_Bro), .r_NoPre(r_NoPre), .r_TxEn(r_TxEn),
|
.r_RxEn(r_RxEn), .Busy_IRQ(Busy_IRQ), .RxF_IRQ(RxF_IRQ),
|
.r_RxEn(r_RxEn), .Busy_IRQ(Busy_IRQ), .RxF_IRQ(RxF_IRQ),
|
.RxB_IRQ(RxB_IRQ), .TxE_IRQ(TxE_IRQ), .TxB_IRQ(TxB_IRQ),
|
.RxB_IRQ(RxB_IRQ), .TxE_IRQ(TxE_IRQ), .TxB_IRQ(TxB_IRQ),
|
.r_IPGT(r_IPGT),
|
.r_IPGT(r_IPGT),
|
.r_IPGR1(r_IPGR1), .r_IPGR2(r_IPGR2), .r_MinFL(r_MinFL),
|
.r_IPGR1(r_IPGR1), .r_IPGR2(r_IPGR2), .r_MinFL(r_MinFL),
|
.r_MaxFL(r_MaxFL), .r_MaxRet(r_MaxRet), .r_CollValid(r_CollValid),
|
.r_MaxFL(r_MaxFL), .r_MaxRet(r_MaxRet), .r_CollValid(r_CollValid),
|
Line 333... |
Line 331... |
.r_RGAD(r_RGAD), .r_FIAD(r_FIAD), .r_CtrlData(r_CtrlData),
|
.r_RGAD(r_RGAD), .r_FIAD(r_FIAD), .r_CtrlData(r_CtrlData),
|
.NValid_stat(NValid_stat), .Busy_stat(Busy_stat),
|
.NValid_stat(NValid_stat), .Busy_stat(Busy_stat),
|
.LinkFail(LinkFail), .r_MAC(r_MAC), .WCtrlDataStart(WCtrlDataStart),
|
.LinkFail(LinkFail), .r_MAC(r_MAC), .WCtrlDataStart(WCtrlDataStart),
|
.RStatStart(RStatStart), .UpdateMIIRX_DATAReg(UpdateMIIRX_DATAReg), .Prsd(Prsd),
|
.RStatStart(RStatStart), .UpdateMIIRX_DATAReg(UpdateMIIRX_DATAReg), .Prsd(Prsd),
|
.r_TxBDNum(r_TxBDNum), .TX_BD_NUM_Wr(TX_BD_NUM_Wr), .int_o(int_o),
|
.r_TxBDNum(r_TxBDNum), .TX_BD_NUM_Wr(TX_BD_NUM_Wr), .int_o(int_o),
|
.r_HASH0(), .r_HASH1()
|
.r_HASH0(r_HASH0), .r_HASH1(r_HASH1)
|
);
|
);
|
|
|
|
|
|
|
wire [7:0] RxData;
|
wire [7:0] RxData;
|
Line 356... |
Line 354... |
wire ReceivedPacketGood;
|
wire ReceivedPacketGood;
|
wire ReceivedLengthOK;
|
wire ReceivedLengthOK;
|
wire InvalidSymbol;
|
wire InvalidSymbol;
|
wire LatchedCrcError;
|
wire LatchedCrcError;
|
wire RxLateCollision;
|
wire RxLateCollision;
|
wire [3:0] RetryCntLatched;
|
|
wire [3:0] RetryCnt;
|
|
wire StartTxDone;
|
|
wire StartTxAbort;
|
|
wire MaxCollisionOccured;
|
|
wire RetryLimit;
|
|
wire StatePreamble;
|
|
wire [1:0] StateData;
|
|
|
|
|
|
// Connecting MACControl
|
// Connecting MACControl
|
eth_maccontrol maccontrol1
|
eth_maccontrol maccontrol1
|
(
|
(
|
.MTxClk(mtx_clk_pad_i), .TPauseRq(TPauseRq),
|
.MTxClk(mtx_clk_pad_i), .TPauseRq(TPauseRq),
|
Line 432... |
Line 421... |
.IPGR1(r_IPGR1), .IPGR2(r_IPGR2), .CollValid(r_CollValid),
|
.IPGR1(r_IPGR1), .IPGR2(r_IPGR2), .CollValid(r_CollValid),
|
.MaxRet(r_MaxRet), .NoBckof(r_NoBckof), .ExDfrEn(r_ExDfrEn),
|
.MaxRet(r_MaxRet), .NoBckof(r_NoBckof), .ExDfrEn(r_ExDfrEn),
|
.MaxFL(r_MaxFL), .MTxEn(mtxen_pad_o), .MTxD(mtxd_pad_o),
|
.MaxFL(r_MaxFL), .MTxEn(mtxen_pad_o), .MTxD(mtxd_pad_o),
|
.MTxErr(mtxerr_pad_o), .TxUsedData(TxUsedDataIn), .TxDone(TxDoneIn),
|
.MTxErr(mtxerr_pad_o), .TxUsedData(TxUsedDataIn), .TxDone(TxDoneIn),
|
.TxRetry(TxRetry), .TxAbort(TxAbortIn), .WillTransmit(WillTransmit),
|
.TxRetry(TxRetry), .TxAbort(TxAbortIn), .WillTransmit(WillTransmit),
|
.ResetCollision(ResetCollision), .RetryCnt(RetryCnt), .StartTxDone(StartTxDone),
|
.ResetCollision(ResetCollision)
|
.StartTxAbort(StartTxAbort), .MaxCollisionOccured(MaxCollisionOccured), .LateCollision(LateCollision),
|
|
.StartDefer(StartDefer), .StatePreamble(StatePreamble), .StateData(StateData)
|
|
|
|
);
|
);
|
|
|
|
|
|
|
|
|
Line 465... |
Line 451... |
.RxData(RxData), .RxValid(RxValid), .RxStartFrm(RxStartFrm),
|
.RxData(RxData), .RxValid(RxValid), .RxStartFrm(RxStartFrm),
|
.RxEndFrm(RxEndFrm), .CrcHash(), .CrcHashGood(),
|
.RxEndFrm(RxEndFrm), .CrcHash(), .CrcHashGood(),
|
.Broadcast(), .Multicast(), .ByteCnt(RxByteCnt),
|
.Broadcast(), .Multicast(), .ByteCnt(RxByteCnt),
|
.ByteCntEq0(RxByteCntEq0), .ByteCntGreat2(RxByteCntGreat2), .ByteCntMaxFrame(RxByteCntMaxFrame),
|
.ByteCntEq0(RxByteCntEq0), .ByteCntGreat2(RxByteCntGreat2), .ByteCntMaxFrame(RxByteCntMaxFrame),
|
.CrcError(RxCrcError), .StateIdle(RxStateIdle), .StatePreamble(RxStatePreamble),
|
.CrcError(RxCrcError), .StateIdle(RxStateIdle), .StatePreamble(RxStatePreamble),
|
.StateSFD(RxStateSFD), .StateData(RxStateData)
|
.StateSFD(RxStateSFD), .StateData(RxStateData),
|
|
.MAC(r_MAC), .r_Pro(r_Pro), .r_Bro(r_Bro), // ditt
|
|
.r_HASH0(r_HASH0), .r_HASH1(r_HASH1)
|
);
|
);
|
|
|
|
|
// MII Carrier Sense Synchronization
|
// MII Carrier Sense Synchronization
|
always @ (posedge mtx_clk_pad_i or posedge r_Rst)
|
always @ (posedge mtx_clk_pad_i or posedge r_Rst)
|
Line 583... |
Line 571... |
|
|
|
|
|
|
//TX
|
//TX
|
.MTxClk(mtx_clk_pad_i), .TxStartFrm(TxStartFrm), .TxEndFrm(TxEndFrm),
|
.MTxClk(mtx_clk_pad_i), .TxStartFrm(TxStartFrm), .TxEndFrm(TxEndFrm),
|
.TxUsedData(TxUsedData), .TxData(TxData),
|
.TxUsedData(TxUsedData), .TxData(TxData), .StatusIzTxEthMACModula(16'h0),
|
.TxRetry(TxRetry), .TxAbort(TxAbort), .TxUnderRun(TxUnderRun),
|
.TxRetry(TxRetry), .TxAbort(TxAbort), .TxUnderRun(TxUnderRun),
|
.TxDone(TxDone), .TPauseRq(TPauseRq), .TxPauseTV(TxPauseTV),
|
.TxDone(TxDone), .TPauseRq(TPauseRq), .TxPauseTV(TxPauseTV),
|
.PerPacketCrcEn(PerPacketCrcEn), .PerPacketPad(PerPacketPad), .WillSendControlFrame(WillSendControlFrame),
|
.PerPacketCrcEn(PerPacketCrcEn), .PerPacketPad(PerPacketPad), .WillSendControlFrame(WillSendControlFrame),
|
.TxCtrlEndFrm(TxCtrlEndFrm),
|
.TxCtrlEndFrm(TxCtrlEndFrm),
|
|
|
Line 606... |
Line 594... |
.RxAbort(RxAbort),
|
.RxAbort(RxAbort),
|
`endif
|
`endif
|
|
|
.InvalidSymbol(InvalidSymbol), .LatchedCrcError(LatchedCrcError), .RxLength(RxByteCnt),
|
.InvalidSymbol(InvalidSymbol), .LatchedCrcError(LatchedCrcError), .RxLength(RxByteCnt),
|
.RxLateCollision(RxLateCollision), .ShortFrame(ShortFrame), .DribbleNibble(DribbleNibble),
|
.RxLateCollision(RxLateCollision), .ShortFrame(ShortFrame), .DribbleNibble(DribbleNibble),
|
.ReceivedPacketTooBig(ReceivedPacketTooBig), .LoadRxStatus(LoadRxStatus), .RetryCntLatched(RetryCntLatched),
|
.ReceivedPacketTooBig(ReceivedPacketTooBig), .LoadRxStatus(LoadRxStatus)
|
.RetryLimit(RetryLimit), .LateCollLatched(LateCollLatched), .DeferLatched(DeferLatched),
|
|
.CarrierSenseLost(CarrierSenseLost)
|
|
|
|
);
|
);
|
|
|
|
|
|
|
Line 628... |
Line 614... |
.ReceivedPauseFrm(ReceivedPauseFrm),.InvalidSymbol(InvalidSymbol),
|
.ReceivedPauseFrm(ReceivedPauseFrm),.InvalidSymbol(InvalidSymbol),
|
.MRxD(MRxD_Lb), .LatchedCrcError(LatchedCrcError), .Collision(mcoll_pad_i),
|
.MRxD(MRxD_Lb), .LatchedCrcError(LatchedCrcError), .Collision(mcoll_pad_i),
|
.CollValid(r_CollValid), .RxLateCollision(RxLateCollision), .r_RecSmall(r_RecSmall),
|
.CollValid(r_CollValid), .RxLateCollision(RxLateCollision), .r_RecSmall(r_RecSmall),
|
.r_MinFL(r_MinFL), .r_MaxFL(r_MaxFL), .ShortFrame(ShortFrame),
|
.r_MinFL(r_MinFL), .r_MaxFL(r_MaxFL), .ShortFrame(ShortFrame),
|
.DribbleNibble(DribbleNibble), .ReceivedPacketTooBig(ReceivedPacketTooBig), .r_HugEn(r_HugEn),
|
.DribbleNibble(DribbleNibble), .ReceivedPacketTooBig(ReceivedPacketTooBig), .r_HugEn(r_HugEn),
|
.LoadRxStatus(LoadRxStatus), .RetryCnt(RetryCnt), .StartTxDone(StartTxDone),
|
.LoadRxStatus(LoadRxStatus)
|
.StartTxAbort(StartTxAbort), .RetryCntLatched(RetryCntLatched), .MTxClk(mtx_clk_pad_i),
|
|
.MaxCollisionOccured(MaxCollisionOccured), .RetryLimit(RetryLimit), .LateCollision(LateCollision),
|
|
.LateCollLatched(LateCollLatched), .StartDefer(StartDefer), .DeferLatched(DeferLatched),
|
|
.TxStartFrm(TxStartFrmOut), .StatePreamble(StatePreamble), .StateData(StateData),
|
|
.CarrierSense(CarrierSense_Tx2), .CarrierSenseLost(CarrierSenseLost), .TxUsedData(TxUsedDataIn)
|
|
);
|
);
|
|
|
|
|
|
|
endmodule
|
endmodule
|
|
|
No newline at end of file
|
No newline at end of file
|