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

Subversion Repositories ethmac

[/] [ethmac/] [trunk/] [rtl/] [verilog/] [ethmac.v] - Diff between revs 364 and 365

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 364 Rev 365
Line 394... Line 394...
 
 
 
 
// Connecting Miim module
// Connecting Miim module
eth_miim miim1
eth_miim miim1
(
(
  .Clk(wb_clk_i),                         .Reset(wb_rst_i),                   .Divider(r_ClkDiv),
  .Clk(wb_clk_i),
  .NoPre(r_MiiNoPre),                     .CtrlData(r_CtrlData),              .Rgad(r_RGAD),
  .Reset(wb_rst_i),
  .Fiad(r_FIAD),                          .WCtrlData(r_WCtrlData),            .RStat(r_RStat),
  .Divider(r_ClkDiv),
  .ScanStat(r_ScanStat),                  .Mdi(md_pad_i),                     .Mdo(md_pad_o),
  .NoPre(r_MiiNoPre),
  .MdoEn(md_padoe_o),                     .Mdc(mdc_pad_o),                    .Busy(Busy_stat),
  .CtrlData(r_CtrlData),
  .Prsd(Prsd),                            .LinkFail(LinkFail),                .Nvalid(NValid_stat),
  .Rgad(r_RGAD),
  .WCtrlDataStart(WCtrlDataStart),        .RStatStart(RStatStart),            .UpdateMIIRX_DATAReg(UpdateMIIRX_DATAReg)
  .Fiad(r_FIAD),
 
  .WCtrlData(r_WCtrlData),
 
  .RStat(r_RStat),
 
  .ScanStat(r_ScanStat),
 
  .Mdi(md_pad_i),
 
  .Mdo(md_pad_o),
 
  .MdoEn(md_padoe_o),
 
  .Mdc(mdc_pad_o),
 
  .Busy(Busy_stat),
 
  .Prsd(Prsd),
 
  .LinkFail(LinkFail),
 
  .Nvalid(NValid_stat),
 
  .WCtrlDataStart(WCtrlDataStart),
 
  .RStatStart(RStatStart),
 
  .UpdateMIIRX_DATAReg(UpdateMIIRX_DATAReg)
);
);
 
 
 
 
 
 
 
 
Line 452... Line 466...
wire        Busy_IRQ;       // Interrupt Busy (lack of buffers)
wire        Busy_IRQ;       // Interrupt Busy (lack of buffers)
 
 
//wire        DWord;
//wire        DWord;
wire        ByteSelected;
wire        ByteSelected;
wire        BDAck;
wire        BDAck;
wire [31:0] BD_WB_DAT_O;    // wb_dat_o that comes from the Wishbone module (for buffer descriptors read/write)
wire [31:0] BD_WB_DAT_O;    // wb_dat_o that comes from the Wishbone module
 
                            //(for buffer descriptors read/write)
wire  [3:0] BDCs;           // Buffer descriptor CS
wire  [3:0] BDCs;           // Buffer descriptor CS
wire        CsMiss;         // When access to the address between 0x800 and 0xfff occurs, acknowledge is set
wire        CsMiss;         // When access to the address between 0x800
 
                            // and 0xfff occurs, acknowledge is set
                            // but data is not valid.
                            // but data is not valid.
wire        r_Pad;
wire        r_Pad;
wire        r_CrcEn;
wire        r_CrcEn;
wire        r_FullD;
wire        r_FullD;
wire        r_Pro;
wire        r_Pro;
Line 553... Line 569...
 
 
 
 
// Connecting Ethernet registers
// Connecting Ethernet registers
eth_registers ethreg1
eth_registers ethreg1
(
(
  .DataIn(wb_dat_i),                      .Address(wb_adr_i[9:2]),                    .Rw(wb_we_i),
  .DataIn(wb_dat_i),
  .Cs(RegCs),                             .Clk(wb_clk_i),                             .Reset(wb_rst_i),
  .Address(wb_adr_i[9:2]),
  .DataOut(RegDataOut),                   .r_RecSmall(r_RecSmall),
  .Rw(wb_we_i),
  .r_Pad(r_Pad),                          .r_HugEn(r_HugEn),                          .r_CrcEn(r_CrcEn),
  .Cs(RegCs),
  .r_DlyCrcEn(r_DlyCrcEn),                .r_FullD(r_FullD),
  .Clk(wb_clk_i),
  .r_ExDfrEn(r_ExDfrEn),                  .r_NoBckof(r_NoBckof),                      .r_LoopBck(r_LoopBck),
  .Reset(wb_rst_i),
  .r_IFG(r_IFG),                          .r_Pro(r_Pro),                              .r_Iam(),
  .DataOut(RegDataOut),
  .r_Bro(r_Bro),                          .r_NoPre(r_NoPre),                          .r_TxEn(r_TxEn),
  .r_RecSmall(r_RecSmall),
  .r_RxEn(r_RxEn),                        .Busy_IRQ(Busy_IRQ),                        .RxE_IRQ(RxE_IRQ),
  .r_Pad(r_Pad),
  .RxB_IRQ(RxB_IRQ),                      .TxE_IRQ(TxE_IRQ),                          .TxB_IRQ(TxB_IRQ),
  .r_HugEn(r_HugEn),
 
  .r_CrcEn(r_CrcEn),
 
  .r_DlyCrcEn(r_DlyCrcEn),
 
  .r_FullD(r_FullD),
 
  .r_ExDfrEn(r_ExDfrEn),
 
  .r_NoBckof(r_NoBckof),
 
  .r_LoopBck(r_LoopBck),
 
  .r_IFG(r_IFG),
 
  .r_Pro(r_Pro),
 
  .r_Iam(),
 
  .r_Bro(r_Bro),
 
  .r_NoPre(r_NoPre),
 
  .r_TxEn(r_TxEn),
 
  .r_RxEn(r_RxEn),
 
  .Busy_IRQ(Busy_IRQ),
 
  .RxE_IRQ(RxE_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_MaxFL(r_MaxFL),                      .r_MaxRet(r_MaxRet),                        .r_CollValid(r_CollValid),
  .r_IPGR2(r_IPGR2),
  .r_TxFlow(r_TxFlow),                    .r_RxFlow(r_RxFlow),                        .r_PassAll(r_PassAll),
  .r_MinFL(r_MinFL),
  .r_MiiNoPre(r_MiiNoPre),                .r_ClkDiv(r_ClkDiv),
  .r_MaxFL(r_MaxFL),
  .r_WCtrlData(r_WCtrlData),              .r_RStat(r_RStat),                          .r_ScanStat(r_ScanStat),
  .r_MaxRet(r_MaxRet),
  .r_RGAD(r_RGAD),                        .r_FIAD(r_FIAD),                            .r_CtrlData(r_CtrlData),
  .r_CollValid(r_CollValid),
  .NValid_stat(NValid_stat),              .Busy_stat(Busy_stat),
  .r_TxFlow(r_TxFlow),
  .LinkFail(LinkFail),                    .r_MAC(r_MAC),                              .WCtrlDataStart(WCtrlDataStart),
  .r_RxFlow(r_RxFlow),
  .RStatStart(RStatStart),                .UpdateMIIRX_DATAReg(UpdateMIIRX_DATAReg),  .Prsd(Prsd),
  .r_PassAll(r_PassAll),
  .r_TxBDNum(r_TxBDNum),                  .int_o(int_o),
  .r_MiiNoPre(r_MiiNoPre),
  .r_HASH0(r_HASH0),                      .r_HASH1(r_HASH1),                          .r_TxPauseRq(r_TxPauseRq),
  .r_ClkDiv(r_ClkDiv),
  .r_TxPauseTV(r_TxPauseTV),              .RstTxPauseRq(RstTxPauseRq),                .TxCtrlEndFrm(TxCtrlEndFrm),
  .r_WCtrlData(r_WCtrlData),
  .StartTxDone(StartTxDone),              .TxClk(mtx_clk_pad_i),                      .RxClk(mrx_clk_pad_i),
  .r_RStat(r_RStat),
 
  .r_ScanStat(r_ScanStat),
 
  .r_RGAD(r_RGAD),
 
  .r_FIAD(r_FIAD),
 
  .r_CtrlData(r_CtrlData),
 
  .NValid_stat(NValid_stat),
 
  .Busy_stat(Busy_stat),
 
  .LinkFail(LinkFail),
 
  .r_MAC(r_MAC),
 
  .WCtrlDataStart(WCtrlDataStart),
 
  .RStatStart(RStatStart),
 
  .UpdateMIIRX_DATAReg(UpdateMIIRX_DATAReg),
 
  .Prsd(Prsd),
 
  .r_TxBDNum(r_TxBDNum),
 
  .int_o(int_o),
 
  .r_HASH0(r_HASH0),
 
  .r_HASH1(r_HASH1),
 
  .r_TxPauseRq(r_TxPauseRq),
 
  .r_TxPauseTV(r_TxPauseTV),
 
  .RstTxPauseRq(RstTxPauseRq),
 
  .TxCtrlEndFrm(TxCtrlEndFrm),
 
  .StartTxDone(StartTxDone),
 
  .TxClk(mtx_clk_pad_i),
 
  .RxClk(mrx_clk_pad_i),
  .dbg_dat(wb_dbg_dat0),
  .dbg_dat(wb_dbg_dat0),
  .SetPauseTimer(SetPauseTimer)
  .SetPauseTimer(SetPauseTimer)
 
 
);
);
 
 
Line 591... Line 648...
wire        RxStartFrm;
wire        RxStartFrm;
wire        RxEndFrm;
wire        RxEndFrm;
wire        RxAbort;
wire        RxAbort;
 
 
wire        WillTransmit;            // Will transmit (to RxEthMAC)
wire        WillTransmit;            // Will transmit (to RxEthMAC)
wire        ResetCollision;          // Reset Collision (for synchronizing collision)
wire        ResetCollision;          // Reset Collision (for synchronizing 
 
                                     // collision)
wire  [7:0] TxDataOut;               // Transmit Packet Data (to TxEthMAC)
wire  [7:0] TxDataOut;               // Transmit Packet Data (to TxEthMAC)
wire        WillSendControlFrame;
wire        WillSendControlFrame;
wire        ReceiveEnd;
wire        ReceiveEnd;
wire        ReceivedPacketGood;
wire        ReceivedPacketGood;
wire        ReceivedLengthOK;
wire        ReceivedLengthOK;
Line 611... Line 669...
wire  [1:0] StateData;
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),
  .TxPauseTV(r_TxPauseTV),                      .TxDataIn(TxData),
  .TPauseRq(TPauseRq),
  .TxStartFrmIn(TxStartFrm),                    .TxEndFrmIn(TxEndFrm),
  .TxPauseTV(r_TxPauseTV),
  .TxUsedDataIn(TxUsedDataIn),                  .TxDoneIn(TxDoneIn),
  .TxDataIn(TxData),
  .TxAbortIn(TxAbortIn),                        .MRxClk(mrx_clk_pad_i),
  .TxStartFrmIn(TxStartFrm),
  .RxData(RxData),                              .RxValid(RxValid),
  .TxEndFrmIn(TxEndFrm),
  .RxStartFrm(RxStartFrm),                      .RxEndFrm(RxEndFrm),
  .TxUsedDataIn(TxUsedDataIn),
  .ReceiveEnd(ReceiveEnd),                      .ReceivedPacketGood(ReceivedPacketGood),
  .TxDoneIn(TxDoneIn),
 
  .TxAbortIn(TxAbortIn),
 
  .MRxClk(mrx_clk_pad_i),
 
  .RxData(RxData),
 
  .RxValid(RxValid),
 
  .RxStartFrm(RxStartFrm),
 
  .RxEndFrm(RxEndFrm),
 
  .ReceiveEnd(ReceiveEnd),
 
  .ReceivedPacketGood(ReceivedPacketGood),
  .TxFlow(r_TxFlow),
  .TxFlow(r_TxFlow),
  .RxFlow(r_RxFlow),                            .DlyCrcEn(r_DlyCrcEn),
  .RxFlow(r_RxFlow),
  .MAC(r_MAC),                                  .PadIn(r_Pad | PerPacketPad),
  .DlyCrcEn(r_DlyCrcEn),
  .PadOut(PadOut),                              .CrcEnIn(r_CrcEn | PerPacketCrcEn),
  .MAC(r_MAC),
  .CrcEnOut(CrcEnOut),                          .TxReset(wb_rst_i),
  .PadIn(r_Pad | PerPacketPad),
  .RxReset(wb_rst_i),                           .ReceivedLengthOK(ReceivedLengthOK),
  .PadOut(PadOut),
  .TxDataOut(TxDataOut),                        .TxStartFrmOut(TxStartFrmOut),
  .CrcEnIn(r_CrcEn | PerPacketCrcEn),
  .TxEndFrmOut(TxEndFrmOut),                    .TxUsedDataOut(TxUsedData),
  .CrcEnOut(CrcEnOut),
  .TxDoneOut(TxDone),                           .TxAbortOut(TxAbort),
  .TxReset(wb_rst_i),
  .WillSendControlFrame(WillSendControlFrame),  .TxCtrlEndFrm(TxCtrlEndFrm),
  .RxReset(wb_rst_i),
  .ReceivedPauseFrm(ReceivedPauseFrm),          .ControlFrmAddressOK(ControlFrmAddressOK),
  .ReceivedLengthOK(ReceivedLengthOK),
 
  .TxDataOut(TxDataOut),
 
  .TxStartFrmOut(TxStartFrmOut),
 
  .TxEndFrmOut(TxEndFrmOut),
 
  .TxUsedDataOut(TxUsedData),
 
  .TxDoneOut(TxDone),
 
  .TxAbortOut(TxAbort),
 
  .WillSendControlFrame(WillSendControlFrame),
 
  .TxCtrlEndFrm(TxCtrlEndFrm),
 
  .ReceivedPauseFrm(ReceivedPauseFrm),
 
  .ControlFrmAddressOK(ControlFrmAddressOK),
  .SetPauseTimer(SetPauseTimer),
  .SetPauseTimer(SetPauseTimer),
  .RxStatusWriteLatched_sync2(RxStatusWriteLatched_sync2),                .r_PassAll(r_PassAll)
  .RxStatusWriteLatched_sync2(RxStatusWriteLatched_sync2),
 
  .r_PassAll(r_PassAll)
);
);
 
 
 
 
 
 
wire TxCarrierSense;          // Synchronized CarrierSense (to Tx clock)
wire TxCarrierSense;          // Synchronized CarrierSense (to Tx clock)
Line 664... Line 741...
 
 
 
 
// Connecting TxEthMAC
// Connecting TxEthMAC
eth_txethmac txethmac1
eth_txethmac txethmac1
(
(
  .MTxClk(mtx_clk_pad_i),             .Reset(wb_rst_i),                   .CarrierSense(TxCarrierSense),
  .MTxClk(mtx_clk_pad_i),
  .Collision(Collision),              .TxData(TxDataOut),                 .TxStartFrm(TxStartFrmOut),
  .Reset(wb_rst_i),
  .TxUnderRun(TxUnderRun),            .TxEndFrm(TxEndFrmOut),             .Pad(PadOut),
  .CarrierSense(TxCarrierSense),
  .MinFL(r_MinFL),                    .CrcEn(CrcEnOut),                   .FullD(r_FullD),
  .Collision(Collision),
  .HugEn(r_HugEn),                    .DlyCrcEn(r_DlyCrcEn),              .IPGT(r_IPGT),
  .TxData(TxDataOut),
  .IPGR1(r_IPGR1),                    .IPGR2(r_IPGR2),                    .CollValid(r_CollValid),
  .TxStartFrm(TxStartFrmOut),
  .MaxRet(r_MaxRet),                  .NoBckof(r_NoBckof),                .ExDfrEn(r_ExDfrEn),
  .TxUnderRun(TxUnderRun),
  .MaxFL(r_MaxFL),                    .MTxEn(mtxen_pad_o),                .MTxD(mtxd_pad_o),
  .TxEndFrm(TxEndFrmOut),
  .MTxErr(mtxerr_pad_o),              .TxUsedData(TxUsedDataIn),          .TxDone(TxDoneIn),
  .Pad(PadOut),
  .TxRetry(TxRetry),                  .TxAbort(TxAbortIn),                .WillTransmit(WillTransmit),
  .MinFL(r_MinFL),
  .ResetCollision(ResetCollision),    .RetryCnt(RetryCnt),                .StartTxDone(StartTxDone),
  .CrcEn(CrcEnOut),
  .StartTxAbort(StartTxAbort),        .MaxCollisionOccured(MaxCollisionOccured), .LateCollision(LateCollision),
  .FullD(r_FullD),
  .DeferIndication(DeferIndication),  .StatePreamble(StatePreamble),      .StateData(StateData)
  .HugEn(r_HugEn),
 
  .DlyCrcEn(r_DlyCrcEn),
 
  .IPGT(r_IPGT),
 
  .IPGR1(r_IPGR1),
 
  .IPGR2(r_IPGR2),
 
  .CollValid(r_CollValid),
 
  .MaxRet(r_MaxRet),
 
  .NoBckof(r_NoBckof),
 
  .ExDfrEn(r_ExDfrEn),
 
  .MaxFL(r_MaxFL),
 
  .MTxEn(mtxen_pad_o),
 
  .MTxD(mtxd_pad_o),
 
  .MTxErr(mtxerr_pad_o),
 
  .TxUsedData(TxUsedDataIn),
 
  .TxDone(TxDoneIn),
 
  .TxRetry(TxRetry),
 
  .TxAbort(TxAbortIn),
 
  .WillTransmit(WillTransmit),
 
  .ResetCollision(ResetCollision),
 
  .RetryCnt(RetryCnt),
 
  .StartTxDone(StartTxDone),
 
  .StartTxAbort(StartTxAbort),
 
  .MaxCollisionOccured(MaxCollisionOccured),
 
  .LateCollision(LateCollision),
 
  .DeferIndication(DeferIndication),
 
  .StatePreamble(StatePreamble),
 
  .StateData(StateData)
);
);
 
 
 
 
 
 
 
 
Line 698... Line 801...
 
 
 
 
// Connecting RxEthMAC
// Connecting RxEthMAC
eth_rxethmac rxethmac1
eth_rxethmac rxethmac1
(
(
  .MRxClk(mrx_clk_pad_i),               .MRxDV(MRxDV_Lb),                     .MRxD(MRxD_Lb),
  .MRxClk(mrx_clk_pad_i),
  .Transmitting(Transmitting),          .HugEn(r_HugEn),                      .DlyCrcEn(r_DlyCrcEn),
  .MRxDV(MRxDV_Lb),
  .MaxFL(r_MaxFL),                      .r_IFG(r_IFG),                        .Reset(wb_rst_i),
  .MRxD(MRxD_Lb),
  .RxData(RxData),                      .RxValid(RxValid),                    .RxStartFrm(RxStartFrm),
  .Transmitting(Transmitting),
  .RxEndFrm(RxEndFrm),                  .ByteCnt(RxByteCnt),
  .HugEn(r_HugEn),
  .ByteCntEq0(RxByteCntEq0),            .ByteCntGreat2(RxByteCntGreat2),      .ByteCntMaxFrame(RxByteCntMaxFrame),
  .DlyCrcEn(r_DlyCrcEn),
  .CrcError(RxCrcError),                .StateIdle(RxStateIdle),              .StatePreamble(RxStatePreamble),
  .MaxFL(r_MaxFL),
  .StateSFD(RxStateSFD),                .StateData(RxStateData),
  .r_IFG(r_IFG),
  .MAC(r_MAC),                          .r_Pro(r_Pro),                        .r_Bro(r_Bro),
  .Reset(wb_rst_i),
  .r_HASH0(r_HASH0),                    .r_HASH1(r_HASH1),                    .RxAbort(RxAbort),
  .RxData(RxData),
  .AddressMiss(AddressMiss),            .PassAll(r_PassAll),                  .ControlFrmAddressOK(ControlFrmAddressOK)
  .RxValid(RxValid),
 
  .RxStartFrm(RxStartFrm),
 
  .RxEndFrm(RxEndFrm),
 
  .ByteCnt(RxByteCnt),
 
  .ByteCntEq0(RxByteCntEq0),
 
  .ByteCntGreat2(RxByteCntGreat2),
 
  .ByteCntMaxFrame(RxByteCntMaxFrame),
 
  .CrcError(RxCrcError),
 
  .StateIdle(RxStateIdle),
 
  .StatePreamble(RxStatePreamble),
 
  .StateSFD(RxStateSFD),
 
  .StateData(RxStateData),
 
  .MAC(r_MAC),
 
  .r_Pro(r_Pro),
 
  .r_Bro(r_Bro),
 
  .r_HASH0(r_HASH0),
 
  .r_HASH1(r_HASH1),
 
  .RxAbort(RxAbort),
 
  .AddressMiss(AddressMiss),
 
  .PassAll(r_PassAll),
 
  .ControlFrmAddressOK(ControlFrmAddressOK)
);
);
 
 
 
 
// MII Carrier Sense Synchronization
// MII Carrier Sense Synchronization
always @ (posedge mtx_clk_pad_i or posedge wb_rst_i)
always @ (posedge mtx_clk_pad_i or posedge wb_rst_i)
Line 854... Line 977...
// Synchronizing RxAbort to the WISHBONE clock
// Synchronizing RxAbort to the WISHBONE clock
always @ (posedge mrx_clk_pad_i or posedge wb_rst_i)
always @ (posedge mrx_clk_pad_i or posedge wb_rst_i)
begin
begin
  if(wb_rst_i)
  if(wb_rst_i)
    RxAbort_latch <=  1'b0;
    RxAbort_latch <=  1'b0;
  else if(RxAbort | (ShortFrame & ~r_RecSmall) | LatchedMRxErr & ~InvalidSymbol | (ReceivedPauseFrm & (~r_PassAll)))
  else if(RxAbort | (ShortFrame & ~r_RecSmall) | LatchedMRxErr &
 
          ~InvalidSymbol | (ReceivedPauseFrm & (~r_PassAll)))
    RxAbort_latch <=  1'b1;
    RxAbort_latch <=  1'b1;
  else if(RxAbortRst)
  else if(RxAbortRst)
    RxAbort_latch <=  1'b0;
    RxAbort_latch <=  1'b0;
end
end
 
 
Line 900... Line 1024...
               .RX_FIFO_DATA_WIDTH(RX_FIFO_DATA_WIDTH),
               .RX_FIFO_DATA_WIDTH(RX_FIFO_DATA_WIDTH),
               .RX_FIFO_DEPTH     (RX_FIFO_DEPTH),
               .RX_FIFO_DEPTH     (RX_FIFO_DEPTH),
               .RX_FIFO_CNT_WIDTH (RX_FIFO_CNT_WIDTH))
               .RX_FIFO_CNT_WIDTH (RX_FIFO_CNT_WIDTH))
wishbone
wishbone
(
(
  .WB_CLK_I(wb_clk_i),                .WB_DAT_I(wb_dat_i),
  .WB_CLK_I(wb_clk_i),
 
  .WB_DAT_I(wb_dat_i),
  .WB_DAT_O(BD_WB_DAT_O),
  .WB_DAT_O(BD_WB_DAT_O),
 
 
  // WISHBONE slave
  // WISHBONE slave
  .WB_ADR_I(wb_adr_i[9:2]),           .WB_WE_I(wb_we_i),
  .WB_ADR_I(wb_adr_i[9:2]),
  .BDCs(BDCs),                        .WB_ACK_O(BDAck),
  .WB_WE_I(wb_we_i),
 
  .BDCs(BDCs),
 
  .WB_ACK_O(BDAck),
  .Reset(wb_rst_i),
  .Reset(wb_rst_i),
 
 
  // WISHBONE master
  // WISHBONE master
  .m_wb_adr_o(m_wb_adr_tmp),          .m_wb_sel_o(m_wb_sel_o),                  .m_wb_we_o(m_wb_we_o),
  .m_wb_adr_o(m_wb_adr_tmp),
  .m_wb_dat_i(m_wb_dat_i),            .m_wb_dat_o(m_wb_dat_o),                  .m_wb_cyc_o(m_wb_cyc_o),
  .m_wb_sel_o(m_wb_sel_o),
  .m_wb_stb_o(m_wb_stb_o),            .m_wb_ack_i(m_wb_ack_i),                  .m_wb_err_i(m_wb_err_i),
  .m_wb_we_o(m_wb_we_o),
 
  .m_wb_dat_i(m_wb_dat_i),
 
  .m_wb_dat_o(m_wb_dat_o),
 
  .m_wb_cyc_o(m_wb_cyc_o),
 
  .m_wb_stb_o(m_wb_stb_o),
 
  .m_wb_ack_i(m_wb_ack_i),
 
  .m_wb_err_i(m_wb_err_i),
 
 
`ifdef ETH_WISHBONE_B3
`ifdef ETH_WISHBONE_B3
  .m_wb_cti_o(m_wb_cti_o),            .m_wb_bte_o(m_wb_bte_o),
  .m_wb_cti_o(m_wb_cti_o),
 
  .m_wb_bte_o(m_wb_bte_o),
`endif
`endif
 
 
 
 
    //TX
    //TX
  .MTxClk(mtx_clk_pad_i),             .TxStartFrm(TxStartFrm),                  .TxEndFrm(TxEndFrm),
  .MTxClk(mtx_clk_pad_i),
  .TxUsedData(TxUsedData),            .TxData(TxData),
  .TxStartFrm(TxStartFrm),
  .TxRetry(TxRetry),                  .TxAbort(TxAbort),                        .TxUnderRun(TxUnderRun),
  .TxEndFrm(TxEndFrm),
 
  .TxUsedData(TxUsedData),
 
  .TxData(TxData),
 
  .TxRetry(TxRetry),
 
  .TxAbort(TxAbort),
 
  .TxUnderRun(TxUnderRun),
  .TxDone(TxDone),
  .TxDone(TxDone),
  .PerPacketCrcEn(PerPacketCrcEn),    .PerPacketPad(PerPacketPad),
  .PerPacketCrcEn(PerPacketCrcEn),
 
  .PerPacketPad(PerPacketPad),
 
 
  // Register
  // Register
  .r_TxEn(r_TxEn),                    .r_RxEn(r_RxEn),                          .r_TxBDNum(r_TxBDNum),
  .r_TxEn(r_TxEn),
  .r_RxFlow(r_RxFlow),                      .r_PassAll(r_PassAll),
  .r_RxEn(r_RxEn),
 
  .r_TxBDNum(r_TxBDNum),
 
  .r_RxFlow(r_RxFlow),
 
  .r_PassAll(r_PassAll),
 
 
  //RX
  //RX
  .MRxClk(mrx_clk_pad_i),             .RxData(RxData),                          .RxValid(RxValid),
  .MRxClk(mrx_clk_pad_i),
  .RxStartFrm(RxStartFrm),            .RxEndFrm(RxEndFrm),
  .RxData(RxData),
  .Busy_IRQ(Busy_IRQ),                .RxE_IRQ(RxE_IRQ),                        .RxB_IRQ(RxB_IRQ),
  .RxValid(RxValid),
  .TxE_IRQ(TxE_IRQ),                  .TxB_IRQ(TxB_IRQ),
  .RxStartFrm(RxStartFrm),
 
  .RxEndFrm(RxEndFrm),
  .RxAbort(RxAbort_wb),               .RxStatusWriteLatched_sync2(RxStatusWriteLatched_sync2),
  .Busy_IRQ(Busy_IRQ),
 
  .RxE_IRQ(RxE_IRQ),
  .InvalidSymbol(InvalidSymbol),      .LatchedCrcError(LatchedCrcError),        .RxLength(RxByteCnt),
  .RxB_IRQ(RxB_IRQ),
  .RxLateCollision(RxLateCollision),  .ShortFrame(ShortFrame),                  .DribbleNibble(DribbleNibble),
  .TxE_IRQ(TxE_IRQ),
  .ReceivedPacketTooBig(ReceivedPacketTooBig), .LoadRxStatus(LoadRxStatus),     .RetryCntLatched(RetryCntLatched),
  .TxB_IRQ(TxB_IRQ),
  .RetryLimit(RetryLimit),            .LateCollLatched(LateCollLatched),        .DeferLatched(DeferLatched),
 
 
  .RxAbort(RxAbort_wb),
 
  .RxStatusWriteLatched_sync2(RxStatusWriteLatched_sync2),
 
 
 
  .InvalidSymbol(InvalidSymbol),
 
  .LatchedCrcError(LatchedCrcError),
 
  .RxLength(RxByteCnt),
 
  .RxLateCollision(RxLateCollision),
 
  .ShortFrame(ShortFrame),
 
  .DribbleNibble(DribbleNibble),
 
  .ReceivedPacketTooBig(ReceivedPacketTooBig),
 
  .LoadRxStatus(LoadRxStatus),
 
  .RetryCntLatched(RetryCntLatched),
 
  .RetryLimit(RetryLimit),
 
  .LateCollLatched(LateCollLatched),
 
  .DeferLatched(DeferLatched),
  .RstDeferLatched(RstDeferLatched),
  .RstDeferLatched(RstDeferLatched),
  .CarrierSenseLost(CarrierSenseLost),.ReceivedPacketGood(ReceivedPacketGood),  .AddressMiss(AddressMiss),
  .CarrierSenseLost(CarrierSenseLost),
 
  .ReceivedPacketGood(ReceivedPacketGood),
 
  .AddressMiss(AddressMiss),
  .ReceivedPauseFrm(ReceivedPauseFrm)
  .ReceivedPauseFrm(ReceivedPauseFrm)
 
 
`ifdef ETH_BIST
`ifdef ETH_BIST
  ,
  ,
  .mbist_si_i       (mbist_si_i),
  .mbist_si_i       (mbist_si_i),
Line 964... Line 1122...
assign m_wb_adr_o = {m_wb_adr_tmp, 2'h0};
assign m_wb_adr_o = {m_wb_adr_tmp, 2'h0};
 
 
// Connecting MacStatus module
// Connecting MacStatus module
eth_macstatus macstatus1
eth_macstatus macstatus1
(
(
  .MRxClk(mrx_clk_pad_i),             .Reset(wb_rst_i),
  .MRxClk(mrx_clk_pad_i),
  .ReceiveEnd(ReceiveEnd),            .ReceivedPacketGood(ReceivedPacketGood),     .ReceivedLengthOK(ReceivedLengthOK),
  .Reset(wb_rst_i),
  .RxCrcError(RxCrcError),            .MRxErr(MRxErr_Lb),                          .MRxDV(MRxDV_Lb),
  .ReceiveEnd(ReceiveEnd),
  .RxStateSFD(RxStateSFD),            .RxStateData(RxStateData),                   .RxStatePreamble(RxStatePreamble),
  .ReceivedPacketGood(ReceivedPacketGood),
  .RxStateIdle(RxStateIdle),          .Transmitting(Transmitting),                 .RxByteCnt(RxByteCnt),
     .ReceivedLengthOK(ReceivedLengthOK),
  .RxByteCntEq0(RxByteCntEq0),        .RxByteCntGreat2(RxByteCntGreat2),           .RxByteCntMaxFrame(RxByteCntMaxFrame),
  .RxCrcError(RxCrcError),
 
  .MRxErr(MRxErr_Lb),
 
  .MRxDV(MRxDV_Lb),
 
  .RxStateSFD(RxStateSFD),
 
  .RxStateData(RxStateData),
 
  .RxStatePreamble(RxStatePreamble),
 
  .RxStateIdle(RxStateIdle),
 
  .Transmitting(Transmitting),
 
  .RxByteCnt(RxByteCnt),
 
  .RxByteCntEq0(RxByteCntEq0),
 
  .RxByteCntGreat2(RxByteCntGreat2),
 
  .RxByteCntMaxFrame(RxByteCntMaxFrame),
  .InvalidSymbol(InvalidSymbol),
  .InvalidSymbol(InvalidSymbol),
  .MRxD(MRxD_Lb),                     .LatchedCrcError(LatchedCrcError),           .Collision(mcoll_pad_i),
  .MRxD(MRxD_Lb),
  .CollValid(r_CollValid),            .RxLateCollision(RxLateCollision),           .r_RecSmall(r_RecSmall),
  .LatchedCrcError(LatchedCrcError),
  .r_MinFL(r_MinFL),                  .r_MaxFL(r_MaxFL),                           .ShortFrame(ShortFrame),
  .Collision(mcoll_pad_i),
  .DribbleNibble(DribbleNibble),      .ReceivedPacketTooBig(ReceivedPacketTooBig), .r_HugEn(r_HugEn),
  .CollValid(r_CollValid),
  .LoadRxStatus(LoadRxStatus),        .RetryCnt(RetryCnt),                         .StartTxDone(StartTxDone),
  .RxLateCollision(RxLateCollision),
  .StartTxAbort(StartTxAbort),        .RetryCntLatched(RetryCntLatched),           .MTxClk(mtx_clk_pad_i),
  .r_RecSmall(r_RecSmall),
  .MaxCollisionOccured(MaxCollisionOccured), .RetryLimit(RetryLimit),              .LateCollision(LateCollision),
  .r_MinFL(r_MinFL),
  .LateCollLatched(LateCollLatched),  .DeferIndication(DeferIndication),           .DeferLatched(DeferLatched),
  .r_MaxFL(r_MaxFL),
 
  .ShortFrame(ShortFrame),
 
  .DribbleNibble(DribbleNibble),
 
  .ReceivedPacketTooBig(ReceivedPacketTooBig),
 
  .r_HugEn(r_HugEn),
 
  .LoadRxStatus(LoadRxStatus),
 
  .RetryCnt(RetryCnt),
 
  .StartTxDone(StartTxDone),
 
  .StartTxAbort(StartTxAbort),
 
  .RetryCntLatched(RetryCntLatched),
 
  .MTxClk(mtx_clk_pad_i),
 
  .MaxCollisionOccured(MaxCollisionOccured),
 
  .RetryLimit(RetryLimit),
 
  .LateCollision(LateCollision),
 
  .LateCollLatched(LateCollLatched),
 
  .DeferIndication(DeferIndication),
 
  .DeferLatched(DeferLatched),
  .RstDeferLatched(RstDeferLatched),
  .RstDeferLatched(RstDeferLatched),
  .TxStartFrm(TxStartFrmOut),         .StatePreamble(StatePreamble),               .StateData(StateData),
  .TxStartFrm(TxStartFrmOut),
  .CarrierSense(CarrierSense_Tx2),    .CarrierSenseLost(CarrierSenseLost),         .TxUsedData(TxUsedDataIn),
  .StatePreamble(StatePreamble),
  .LatchedMRxErr(LatchedMRxErr),      .Loopback(r_LoopBck),                        .r_FullD(r_FullD)
  .StateData(StateData),
 
  .CarrierSense(CarrierSense_Tx2),
 
  .CarrierSenseLost(CarrierSenseLost),
 
  .TxUsedData(TxUsedDataIn),
 
  .LatchedMRxErr(LatchedMRxErr),
 
  .Loopback(r_LoopBck),
 
  .r_FullD(r_FullD)
);
);
 
 
 
 
endmodule
endmodule
 
 
 No newline at end of file
 No newline at end of file

powered by: WebSVN 2.1.0

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