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

Subversion Repositories ethmac

[/] [ethmac/] [branches/] [unneback/] [rtl/] [verilog/] [eth_top.v] - Diff between revs 321 and 327

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

Rev 321 Rev 327
Line 39... Line 39...
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
//
//
// CVS Revision History
// CVS Revision History
//
//
// $Log: not supported by cvs2svn $
// $Log: not supported by cvs2svn $
 
// Revision 1.50  2004/04/26 15:26:23  igorm
 
// - Bug connected to the TX_BD_NUM_Wr signal fixed (bug came in with the
 
//   previous update of the core.
 
// - TxBDAddress is set to 0 after the TX is enabled in the MODER register.
 
// - RxBDAddress is set to r_TxBDNum<<1 after the RX is enabled in the MODER
 
//   register. (thanks to Mathias and Torbjorn)
 
// - Multicast reception was fixed. Thanks to Ulrich Gries
 
//
// Revision 1.49  2003/11/12 18:24:59  tadejm
// Revision 1.49  2003/11/12 18:24:59  tadejm
// WISHBONE slave changed and tested from only 32-bit accesss to byte access.
// WISHBONE slave changed and tested from only 32-bit accesss to byte access.
//
//
// Revision 1.48  2003/10/17 07:46:16  markom
// Revision 1.48  2003/10/17 07:46:16  markom
// mbist signals updated according to newest convention
// mbist signals updated according to newest convention
Line 294... Line 302...
output          m_wb_cyc_o;
output          m_wb_cyc_o;
output          m_wb_stb_o;
output          m_wb_stb_o;
input           m_wb_ack_i;
input           m_wb_ack_i;
input           m_wb_err_i;
input           m_wb_err_i;
 
 
 
wire    [29:0]  m_wb_adr_tmp;
 
 
`ifdef ETH_WISHBONE_B3
`ifdef ETH_WISHBONE_B3
output   [2:0]  m_wb_cti_o;   // Cycle Type Identifier
output   [2:0]  m_wb_cti_o;   // Cycle Type Identifier
output   [1:0]  m_wb_bte_o;   // Burst Type Extension
output   [1:0]  m_wb_bte_o;   // Burst Type Extension
`endif
`endif
 
 
Line 434... Line 444...
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_CrcEn;
 
wire        r_FullD;
 
wire        r_Pro;
 
wire        r_Bro;
 
wire        r_NoPre;
 
wire        r_RxFlow;
 
wire        r_PassAll;
 
wire        TxCtrlEndFrm;
 
wire        StartTxDone;
 
wire        SetPauseTimer;
 
wire        TxUsedDataIn;
 
wire        TxDoneIn;
 
wire        TxAbortIn;
 
wire        PerPacketPad;
 
wire        PadOut;
 
wire        PerPacketCrcEn;
 
wire        CrcEnOut;
 
wire        TxStartFrmOut;
 
wire        TxEndFrmOut;
 
wire        ReceivedPauseFrm;
 
wire        ControlFrmAddressOK;
 
wire        RxStatusWriteLatched_sync2;
 
wire        LateCollision;
 
wire        DeferIndication;
 
wire        LateCollLatched;
 
wire        DeferLatched;
 
wire        RstDeferLatched;
 
wire        CarrierSenseLost;
 
 
wire        temp_wb_ack_o;
wire        temp_wb_ack_o;
wire [31:0] temp_wb_dat_o;
wire [31:0] temp_wb_dat_o;
wire        temp_wb_err_o;
wire        temp_wb_err_o;
 
 
Line 456... Line 495...
assign BDCs[3]  = wb_stb_i & wb_cyc_i & ByteSelected & ~wb_adr_i[11] &  wb_adr_i[10] & wb_sel_i[3];   // 0x400 - 0x7FF
assign BDCs[3]  = wb_stb_i & wb_cyc_i & ByteSelected & ~wb_adr_i[11] &  wb_adr_i[10] & wb_sel_i[3];   // 0x400 - 0x7FF
assign BDCs[2]  = wb_stb_i & wb_cyc_i & ByteSelected & ~wb_adr_i[11] &  wb_adr_i[10] & wb_sel_i[2];   // 0x400 - 0x7FF
assign BDCs[2]  = wb_stb_i & wb_cyc_i & ByteSelected & ~wb_adr_i[11] &  wb_adr_i[10] & wb_sel_i[2];   // 0x400 - 0x7FF
assign BDCs[1]  = wb_stb_i & wb_cyc_i & ByteSelected & ~wb_adr_i[11] &  wb_adr_i[10] & wb_sel_i[1];   // 0x400 - 0x7FF
assign BDCs[1]  = wb_stb_i & wb_cyc_i & ByteSelected & ~wb_adr_i[11] &  wb_adr_i[10] & wb_sel_i[1];   // 0x400 - 0x7FF
assign BDCs[0]  = wb_stb_i & wb_cyc_i & ByteSelected & ~wb_adr_i[11] &  wb_adr_i[10] & wb_sel_i[0];   // 0x400 - 0x7FF
assign BDCs[0]  = wb_stb_i & wb_cyc_i & ByteSelected & ~wb_adr_i[11] &  wb_adr_i[10] & wb_sel_i[0];   // 0x400 - 0x7FF
assign CsMiss = wb_stb_i & wb_cyc_i & ByteSelected & wb_adr_i[11];                   // 0x800 - 0xfFF
assign CsMiss = wb_stb_i & wb_cyc_i & ByteSelected & wb_adr_i[11];                   // 0x800 - 0xfFF
assign temp_wb_ack_o = (|RegCs) | BDAck;
 
assign temp_wb_dat_o = ((|RegCs) & ~wb_we_i)? RegDataOut : BD_WB_DAT_O;
assign temp_wb_dat_o = ((|RegCs) & ~wb_we_i)? RegDataOut : BD_WB_DAT_O;
assign temp_wb_err_o = wb_stb_i & wb_cyc_i & (~ByteSelected | CsMiss);
assign temp_wb_err_o = wb_stb_i & wb_cyc_i & (~ByteSelected | CsMiss);
 
 
`ifdef ETH_REGISTERED_OUTPUTS
`ifdef ETH_REGISTERED_OUTPUTS
  assign wb_ack_o = temp_wb_ack_o_reg;
  assign wb_ack_o = temp_wb_ack_o_reg;
Line 470... Line 508...
  assign wb_ack_o = temp_wb_ack_o;
  assign wb_ack_o = temp_wb_ack_o;
  assign wb_dat_o[31:0] = temp_wb_dat_o;
  assign wb_dat_o[31:0] = temp_wb_dat_o;
  assign wb_err_o = temp_wb_err_o;
  assign wb_err_o = temp_wb_err_o;
`endif
`endif
 
 
 
`ifdef ETH_AVALON_BUS
 
  // As Avalon has no corresponding "error" signal, I (erroneously) will
 
  // send an ack to Avalon, even when accessing undefined memory. This
 
  // is a grey area in Avalon vs. Wishbone specs: My understanding
 
  // is that Avalon expects all memory addressable by the addr bus feeding
 
  // a slave to be, at the very minimum, readable.
 
  assign temp_wb_ack_o = (|RegCs) | BDAck | CsMiss;
 
`else // WISHBONE
 
  assign temp_wb_ack_o = (|RegCs) | BDAck;
 
`endif
 
 
`ifdef ETH_REGISTERED_OUTPUTS
`ifdef ETH_REGISTERED_OUTPUTS
  always @ (posedge wb_clk_i or posedge wb_rst_i)
  always @ (posedge wb_clk_i or posedge wb_rst_i)
  begin
  begin
    if(wb_rst_i)
    if(wb_rst_i)
Line 864... Line 911...
  .BDCs(BDCs),                        .WB_ACK_O(BDAck),
  .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_o),            .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_sel_o(m_wb_sel_o),                  .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_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),
  .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),
Line 896... Line 943...
 
 
  .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),     .RetryCntLatched(RetryCntLatched),
  .RetryLimit(RetryLimit),            .LateCollLatched(LateCollLatched),        .DeferLatched(DeferLatched),
  .RetryLimit(RetryLimit),            .LateCollLatched(LateCollLatched),        .DeferLatched(DeferLatched),
 
  .RstDeferLatched(RstDeferLatched),
  .CarrierSenseLost(CarrierSenseLost),.ReceivedPacketGood(ReceivedPacketGood),  .AddressMiss(AddressMiss),
  .CarrierSenseLost(CarrierSenseLost),.ReceivedPacketGood(ReceivedPacketGood),  .AddressMiss(AddressMiss),
  .ReceivedPauseFrm(ReceivedPauseFrm)
  .ReceivedPauseFrm(ReceivedPauseFrm)
 
 
`ifdef ETH_BIST
`ifdef ETH_BIST
  ,
  ,
Line 907... Line 955...
  .mbist_so_o       (mbist_so_o),
  .mbist_so_o       (mbist_so_o),
  .mbist_ctrl_i       (mbist_ctrl_i)
  .mbist_ctrl_i       (mbist_ctrl_i)
`endif
`endif
);
);
 
 
 
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),             .Reset(wb_rst_i),
Line 927... Line 975...
  .DribbleNibble(DribbleNibble),      .ReceivedPacketTooBig(ReceivedPacketTooBig), .r_HugEn(r_HugEn),
  .DribbleNibble(DribbleNibble),      .ReceivedPacketTooBig(ReceivedPacketTooBig), .r_HugEn(r_HugEn),
  .LoadRxStatus(LoadRxStatus),        .RetryCnt(RetryCnt),                         .StartTxDone(StartTxDone),
  .LoadRxStatus(LoadRxStatus),        .RetryCnt(RetryCnt),                         .StartTxDone(StartTxDone),
  .StartTxAbort(StartTxAbort),        .RetryCntLatched(RetryCntLatched),           .MTxClk(mtx_clk_pad_i),
  .StartTxAbort(StartTxAbort),        .RetryCntLatched(RetryCntLatched),           .MTxClk(mtx_clk_pad_i),
  .MaxCollisionOccured(MaxCollisionOccured), .RetryLimit(RetryLimit),              .LateCollision(LateCollision),
  .MaxCollisionOccured(MaxCollisionOccured), .RetryLimit(RetryLimit),              .LateCollision(LateCollision),
  .LateCollLatched(LateCollLatched),  .DeferIndication(DeferIndication),           .DeferLatched(DeferLatched),
  .LateCollLatched(LateCollLatched),  .DeferIndication(DeferIndication),           .DeferLatched(DeferLatched),
 
  .RstDeferLatched(RstDeferLatched),
  .TxStartFrm(TxStartFrmOut),         .StatePreamble(StatePreamble),               .StateData(StateData),
  .TxStartFrm(TxStartFrmOut),         .StatePreamble(StatePreamble),               .StateData(StateData),
  .CarrierSense(CarrierSense_Tx2),    .CarrierSenseLost(CarrierSenseLost),         .TxUsedData(TxUsedDataIn),
  .CarrierSense(CarrierSense_Tx2),    .CarrierSenseLost(CarrierSenseLost),         .TxUsedData(TxUsedDataIn),
  .LatchedMRxErr(LatchedMRxErr),      .Loopback(r_LoopBck),                        .r_FullD(r_FullD)
  .LatchedMRxErr(LatchedMRxErr),      .Loopback(r_LoopBck),                        .r_FullD(r_FullD)
);
);
 
 

powered by: WebSVN 2.1.0

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