Line 39... |
Line 39... |
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
//
|
//
|
// CVS Revision History
|
// CVS Revision History
|
//
|
//
|
// $Log: not supported by cvs2svn $
|
// $Log: not supported by cvs2svn $
|
|
// Revision 1.10 2002/02/06 14:10:21 mohor
|
|
// non-DMA host interface added. Select the right configutation in eth_defines.
|
|
//
|
// Revision 1.9 2002/01/23 10:28:16 mohor
|
// Revision 1.9 2002/01/23 10:28:16 mohor
|
// Link in the header changed.
|
// Link in the header changed.
|
//
|
//
|
// Revision 1.8 2001/12/05 15:00:16 mohor
|
// Revision 1.8 2001/12/05 15:00:16 mohor
|
// RX_BD_NUM changed to TX_BD_NUM (holds number of TX descriptors
|
// RX_BD_NUM changed to TX_BD_NUM (holds number of TX descriptors
|
Line 217... |
Line 220... |
wire [7:0] TxData;
|
wire [7:0] TxData;
|
wire TxRetry;
|
wire TxRetry;
|
wire TxAbort;
|
wire TxAbort;
|
wire TxUnderRun;
|
wire TxUnderRun;
|
wire TxDone;
|
wire TxDone;
|
|
wire [5:0] CollValid;
|
|
|
|
|
|
|
|
|
// Connecting Miim module
|
// Connecting Miim module
|
Line 239... |
Line 243... |
|
|
|
|
wire RegCs; // Connected to registers
|
wire RegCs; // Connected to registers
|
wire [31:0] RegDataOut; // Multiplexed to wb_dat_o
|
wire [31:0] RegDataOut; // Multiplexed to wb_dat_o
|
wire r_DmaEn; // DMA enable
|
wire r_DmaEn; // DMA enable
|
|
wire r_RecSmall; // Receive small frames
|
wire r_Rst; // Reset
|
wire r_Rst; // Reset
|
wire r_LoopBck; // Loopback
|
wire r_LoopBck; // Loopback
|
wire r_TxEn; // Tx Enable
|
wire r_TxEn; // Tx Enable
|
wire r_RxEn; // Rx Enable
|
wire r_RxEn; // Rx Enable
|
|
|
Line 253... |
Line 258... |
wire r_HugEn; // Huge packet enable
|
wire r_HugEn; // Huge packet enable
|
wire r_DlyCrcEn; // Delayed CRC enabled
|
wire r_DlyCrcEn; // Delayed CRC enabled
|
wire [15:0] r_MaxFL; // Maximum frame length
|
wire [15:0] r_MaxFL; // Maximum frame length
|
|
|
wire [15:0] r_MinFL; // Minimum frame length
|
wire [15:0] r_MinFL; // Minimum frame length
|
|
wire ShortFrame;
|
|
wire DribbleNibble; // Extra nibble received
|
|
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 [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; //
|
Line 299... |
Line 308... |
// Connecting Ethernet registers
|
// Connecting Ethernet registers
|
eth_registers ethreg1
|
eth_registers ethreg1
|
(
|
(
|
.DataIn(wb_dat_i), .Address(wb_adr_i[7:2]), .Rw(wb_we_i),
|
.DataIn(wb_dat_i), .Address(wb_adr_i[7:2]), .Rw(wb_we_i),
|
.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(),
|
.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_Iam(),
|
.r_Bro(), .r_NoPre(r_NoPre), .r_TxEn(r_TxEn),
|
.r_Bro(), .r_NoPre(r_NoPre), .r_TxEn(r_TxEn),
|
Line 337... |
Line 346... |
wire TxCtrlEndFrm;
|
wire TxCtrlEndFrm;
|
wire ReceivedPauseFrm;
|
wire ReceivedPauseFrm;
|
wire ReceiveEnd;
|
wire ReceiveEnd;
|
wire ReceivedPacketGood;
|
wire ReceivedPacketGood;
|
wire ReceivedLengthOK;
|
wire ReceivedLengthOK;
|
|
wire InvalidSymbol;
|
|
wire LatchedCrcError;
|
|
wire RxLateCollision;
|
|
|
// 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 560... |
Line 572... |
.PerPacketCrcEn(PerPacketCrcEn), .PerPacketPad(PerPacketPad), .WillSendControlFrame(WillSendControlFrame),
|
.PerPacketCrcEn(PerPacketCrcEn), .PerPacketPad(PerPacketPad), .WillSendControlFrame(WillSendControlFrame),
|
.TxCtrlEndFrm(TxCtrlEndFrm),
|
.TxCtrlEndFrm(TxCtrlEndFrm),
|
|
|
// Register
|
// Register
|
.r_TxEn(r_TxEn), .r_RxEn(r_RxEn), .r_TxBDNum(r_TxBDNum),
|
.r_TxEn(r_TxEn), .r_RxEn(r_RxEn), .r_TxBDNum(r_TxBDNum),
|
.r_DmaEn(r_DmaEn), .TX_BD_NUM_Wr(TX_BD_NUM_Wr),
|
.r_DmaEn(r_DmaEn), .TX_BD_NUM_Wr(TX_BD_NUM_Wr), .r_RecSmall(r_RecSmall),
|
|
|
//RX
|
//RX
|
.MRxClk(mrx_clk_pad_i), .RxData(RxData), .RxValid(RxValid),
|
.MRxClk(mrx_clk_pad_i), .RxData(RxData), .RxValid(RxValid),
|
.RxStartFrm(RxStartFrm), .RxEndFrm(RxEndFrm),
|
.RxStartFrm(RxStartFrm), .RxEndFrm(RxEndFrm),
|
.Busy_IRQ(Busy_IRQ), .RxF_IRQ(RxF_IRQ), .RxB_IRQ(RxB_IRQ),
|
.Busy_IRQ(Busy_IRQ), .RxF_IRQ(RxF_IRQ), .RxB_IRQ(RxB_IRQ),
|
.TxE_IRQ(TxE_IRQ), .TxB_IRQ(TxB_IRQ)
|
.TxE_IRQ(TxE_IRQ), .TxB_IRQ(TxB_IRQ),
|
|
|
`ifdef WISHBONE_DMA
|
`ifdef WISHBONE_DMA
|
`else
|
`else
|
,
|
.RxAbort(RxAbort),
|
.RxAbort(RxAbort)
|
|
`endif
|
`endif
|
|
|
|
.InvalidSymbol(InvalidSymbol), .LatchedCrcError(LatchedCrcError), .RxLength(RxByteCnt),
|
|
.RxLateCollision(RxLateCollision), .ShortFrame(ShortFrame), .DribbleNibble(DribbleNibble),
|
|
.ReceivedPacketTooBig(ReceivedPacketTooBig), .LoadRxStatus(LoadRxStatus)
|
|
|
);
|
);
|
|
|
|
|
|
|
// Connecting MacStatus module
|
// Connecting MacStatus module
|
eth_macstatus macstatus1
|
eth_macstatus macstatus1
|
(
|
(
|
.MRxClk(mrx_clk_pad_i), .Reset(r_Rst), .TransmitEnd(),
|
.MRxClk(mrx_clk_pad_i), .Reset(r_Rst),
|
.ReceiveEnd(ReceiveEnd), .ReceivedPacketGood(ReceivedPacketGood), .ReceivedLengthOK(ReceivedLengthOK),
|
.ReceiveEnd(ReceiveEnd), .ReceivedPacketGood(ReceivedPacketGood), .ReceivedLengthOK(ReceivedLengthOK),
|
.RxCrcError(RxCrcError), .MRxErr(MRxErr_Lb), .MRxDV(MRxDV_Lb),
|
.RxCrcError(RxCrcError), .MRxErr(MRxErr_Lb), .MRxDV(MRxDV_Lb),
|
.RxStateSFD(RxStateSFD), .RxStateData(RxStateData), .RxStatePreamble(RxStatePreamble),
|
.RxStateSFD(RxStateSFD), .RxStateData(RxStateData), .RxStatePreamble(RxStatePreamble),
|
.RxStateIdle(RxStateIdle), .Transmitting(Transmitting), .RxByteCnt(RxByteCnt),
|
.RxStateIdle(RxStateIdle), .Transmitting(Transmitting), .RxByteCnt(RxByteCnt),
|
.RxByteCntEq0(RxByteCntEq0), .RxByteCntGreat2(RxByteCntGreat2), .RxByteCntMaxFrame(RxByteCntMaxFrame),
|
.RxByteCntEq0(RxByteCntEq0), .RxByteCntGreat2(RxByteCntGreat2), .RxByteCntMaxFrame(RxByteCntMaxFrame),
|
.ReceivedPauseFrm(ReceivedPauseFrm)
|
.ReceivedPauseFrm(ReceivedPauseFrm),.InvalidSymbol(InvalidSymbol),
|
|
.MRxD(MRxD_Lb), .LatchedCrcError(LatchedCrcError), .Collision(mcoll_pad_i),
|
|
.CollValid(r_CollValid), .RxLateCollision(RxLateCollision), .r_RecSmall(r_RecSmall),
|
|
.r_MinFL(r_MinFL), .r_MaxFL(r_MaxFL), .ShortFrame(ShortFrame),
|
|
.DribbleNibble(DribbleNibble), .ReceivedPacketTooBig(ReceivedPacketTooBig), .r_HugEn(r_HugEn),
|
|
.LoadRxStatus(LoadRxStatus)
|
);
|
);
|
|
|
|
|
endmodule
|
endmodule
|
|
|
No newline at end of file
|
No newline at end of file
|