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

Subversion Repositories ethmac

[/] [ethmac/] [trunk/] [rtl/] [verilog/] [ethmac.v] - Diff between revs 20 and 21

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

Rev 20 Rev 21
Line 39... Line 39...
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
//
//
// CVS Revision History
// CVS Revision History
//
//
// $Log: not supported by cvs2svn $
// $Log: not supported by cvs2svn $
 
// Revision 1.3  2001/09/24 15:02:56  mohor
 
// Defines changed (All precede with ETH_). Small changes because some
 
// tools generate warnings when two operands are together. Synchronization
 
// between two clocks domains in eth_wishbonedma.v is changed (due to ASIC
 
// demands).
 
//
// Revision 1.2  2001/08/15 14:03:59  mohor
// Revision 1.2  2001/08/15 14:03:59  mohor
// Signal names changed on the top level for easier pad insertion (ASIC).
// Signal names changed on the top level for easier pad insertion (ASIC).
//
//
// Revision 1.1  2001/08/06 14:44:29  mohor
// Revision 1.1  2001/08/06 14:44:29  mohor
// A define FPGA added to select between Artisan RAM (for ASIC) and Block Ram (For Virtex).
// A define FPGA added to select between Artisan RAM (for ASIC) and Block Ram (For Virtex).
Line 83... Line 89...
 
 
  //RX
  //RX
  mrx_clk_pad_i, mrxd_pad_i, mrxdv_pad_i, mrxerr_pad_i, mcoll_pad_i, mcrs_pad_i,
  mrx_clk_pad_i, mrxd_pad_i, mrxdv_pad_i, mrxerr_pad_i, mcoll_pad_i, mcrs_pad_i,
 
 
  // MIIM
  // MIIM
  mdc_pad_o, md_pad_i, md_pad_o, md_padoen_o
  mdc_pad_o, md_pad_i, md_pad_o, md_padoen_o,
 
 
 
  int_o
 
 
 
 
);
);
 
 
 
 
Line 135... Line 143...
input           md_pad_i;     // MII data input (from I/O cell)
input           md_pad_i;     // MII data input (from I/O cell)
output          mdc_pad_o;    // MII Management data clock (to PHY)
output          mdc_pad_o;    // MII Management data clock (to PHY)
output          md_pad_o;     // MII data output (to I/O cell)
output          md_pad_o;     // MII data output (to I/O cell)
output          md_padoen_o;    // MII data output enable (to I/O cell)
output          md_padoen_o;    // MII data output enable (to I/O cell)
 
 
 
output          int_o;         // Interrupt output
 
 
wire     [7:0]  r_ClkDiv;
wire     [7:0]  r_ClkDiv;
wire            r_MiiNoPre;
wire            r_MiiNoPre;
wire    [15:0]  r_CtrlData;
wire    [15:0]  r_CtrlData;
wire     [4:0]  r_FIAD;
wire     [4:0]  r_FIAD;
Line 215... Line 224...
wire        TPauseRq;       // Sinhronized Tx PAUSE request
wire        TPauseRq;       // Sinhronized Tx PAUSE request
wire [15:0] TxPauseTV;      // Tx PAUSE timer value
wire [15:0] TxPauseTV;      // Tx PAUSE timer value
wire        r_TxFlow;       // Tx flow control enable
wire        r_TxFlow;       // Tx flow control enable
wire        r_IFG;          // Minimum interframe gap for incoming packets
wire        r_IFG;          // Minimum interframe gap for incoming packets
 
 
wire        EthAddMatch;
wire        TxB_IRQ;        // Interrupt Tx Buffer
wire        WB_STB_I_eth;
wire        TxE_IRQ;        // Interrupt Tx Error
wire        WB_CYC_I_eth;
wire        RxB_IRQ;        // Interrupt Rx Buffer
 
wire        RxF_IRQ;        // Interrupt Rx Frame
 
wire        Busy_IRQ;       // Interrupt Busy (lack of buffers)
 
 
wire        DWord;
wire        DWord;
wire        RegAck;
 
wire        BDAck;
wire        BDAck;
wire [31:0] DMA_WB_DAT_O;   // wb_dat_o that comes from the WishboneDMA module
wire [31:0] DMA_WB_DAT_O;   // wb_dat_o that comes from the WishboneDMA module
 
wire        BDCs;           // Buffer descriptor CS
 
 
 
 
 
 
assign EthAddMatch = wb_adr_i[31:16] == `ETH_ETHERNET_SPACE;
 
assign WB_STB_I_eth = wb_stb_i & EthAddMatch;
 
assign WB_CYC_I_eth = wb_stb_i & EthAddMatch;
 
 
 
assign wb_err_o = wb_stb_i & wb_cyc_i & EthAddMatch & ~DWord;
 
assign DWord = &wb_sel_i;
assign DWord = &wb_sel_i;
assign RegCs = wb_stb_i & wb_cyc_i & DWord & EthAddMatch & (wb_adr_i[15:12] == `ETH_REG_SPACE);
assign RegCs = wb_stb_i & wb_cyc_i & DWord & ~wb_adr_i[17] & ~wb_adr_i[16];
assign RegAck = RegCs;
assign BDCs  = wb_stb_i & wb_cyc_i & DWord & ~wb_adr_i[17] &  wb_adr_i[16];
assign wb_ack_o = RegAck | BDAck;
assign wb_ack_o = RegCs | BDAck;
 
assign wb_err_o = wb_stb_i & wb_cyc_i & ~DWord;
 
 
 
 
// Selecting the WISHBONE output data
// Selecting the WISHBONE output data
assign wb_dat_o[31:0] = (RegCs & ~wb_we_i)? RegDataOut : DMA_WB_DAT_O;
assign wb_dat_o[31:0] = (RegCs & ~wb_we_i)? RegDataOut : DMA_WB_DAT_O;
 
 
Line 252... Line 258...
  .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),
  .r_RxEn(r_RxEn),                        .Busy_IRQ(),                                .RxF_IRQ(),
  .r_RxEn(r_RxEn),                        .Busy_IRQ(Busy_IRQ),                        .RxF_IRQ(RxF_IRQ),
  .RxB_IRQ(),                             .TxE_IRQ(),                                 .TxB_IRQ(),
  .RxB_IRQ(RxB_IRQ),                      .TxE_IRQ(TxE_IRQ),                          .TxB_IRQ(TxB_IRQ),
  .Busy_MASK(),                           .RxF_MASK(),                                .RxB_MASK(),
  .r_IPGT(r_IPGT),
  .TxE_MASK(),                            .TxB_MASK(),                                .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),
  .r_TxFlow(r_TxFlow),                    .r_RxFlow(r_RxFlow),                        .r_PassAll(r_PassAll),
  .r_TxFlow(r_TxFlow),                    .r_RxFlow(r_RxFlow),                        .r_PassAll(r_PassAll),
  .r_MiiMRst(r_MiiMRst),                  .r_MiiNoPre(r_MiiNoPre),                    .r_ClkDiv(r_ClkDiv),
  .r_MiiMRst(r_MiiMRst),                  .r_MiiNoPre(r_MiiNoPre),                    .r_ClkDiv(r_ClkDiv),
  .r_WCtrlData(r_WCtrlData),              .r_RStat(r_RStat),                          .r_ScanStat(r_ScanStat),
  .r_WCtrlData(r_WCtrlData),              .r_RStat(r_RStat),                          .r_ScanStat(r_ScanStat),
  .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_RxBDAddress(r_RxBDAddress),          .RX_BD_ADR_Wr(RX_BD_ADR_Wr)
  .r_RxBDAddress(r_RxBDAddress),          .RX_BD_ADR_Wr(RX_BD_ADR_Wr),                .int_o(int_o)
);
);
 
 
 
 
 
 
wire  [7:0] RxData;
wire  [7:0] RxData;
Line 477... Line 482...
  .WB_CLK_I(wb_clk_i),                .WB_RST_I(wb_rst_i),                      .WB_DAT_I(wb_dat_i),
  .WB_CLK_I(wb_clk_i),                .WB_RST_I(wb_rst_i),                      .WB_DAT_I(wb_dat_i),
  .WB_DAT_O(DMA_WB_DAT_O),
  .WB_DAT_O(DMA_WB_DAT_O),
 
 
  // WISHBONE slave
  // WISHBONE slave
  .WB_ADR_I(wb_adr_i),                .WB_SEL_I(wb_sel_i),                      .WB_WE_I(wb_we_i),
  .WB_ADR_I(wb_adr_i),                .WB_SEL_I(wb_sel_i),                      .WB_WE_I(wb_we_i),
  .WB_CYC_I(WB_CYC_I_eth),            .WB_STB_I(WB_STB_I_eth),                  .WB_ACK_O(BDAck),
  .BDCs(BDCs),                        .WB_ACK_O(BDAck),
  .WB_REQ_O(wb_req_o),                .WB_ACK_I(wb_ack_i),                      .WB_ND_O(wb_nd_o),
  .WB_REQ_O(wb_req_o),                .WB_ACK_I(wb_ack_i),                      .WB_ND_O(wb_nd_o),
  .WB_RD_O(wb_rd_o),
  .WB_RD_O(wb_rd_o),
 
 
    //TX
    //TX
  .MTxClk(mtx_clk_pad_i),              .TxStartFrm(TxStartFrm),                  .TxEndFrm(TxEndFrm),
  .MTxClk(mtx_clk_pad_i),              .TxStartFrm(TxStartFrm),                  .TxEndFrm(TxEndFrm),
Line 495... Line 500...
  .r_TxEn(r_TxEn),                    .r_RxEn(r_RxEn),                          .r_RxBDAddress(r_RxBDAddress),
  .r_TxEn(r_TxEn),                    .r_RxEn(r_RxEn),                          .r_RxBDAddress(r_RxBDAddress),
  .r_DmaEn(r_DmaEn),                  .RX_BD_ADR_Wr(RX_BD_ADR_Wr),
  .r_DmaEn(r_DmaEn),                  .RX_BD_ADR_Wr(RX_BD_ADR_Wr),
 
 
  //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),
 
  .TxE_IRQ(TxE_IRQ),                  .TxB_IRQ(TxB_IRQ)
 
 
);
);
 
 
 
 
 
 
// Connecting MacStatus module
// Connecting MacStatus module

powered by: WebSVN 2.1.0

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