Line 39... |
Line 39... |
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
//
|
//
|
// CVS Revision History
|
// CVS Revision History
|
//
|
//
|
// $Log: not supported by cvs2svn $
|
// $Log: not supported by cvs2svn $
|
|
// Revision 1.25 2002/05/03 10:15:50 mohor
|
|
// Outputs registered. Reset changed for eth_wishbone module.
|
|
//
|
// Revision 1.24 2002/04/22 14:15:42 mohor
|
// Revision 1.24 2002/04/22 14:15:42 mohor
|
// Wishbone signals are registered when ETH_REGISTERED_OUTPUTS is
|
// Wishbone signals are registered when ETH_REGISTERED_OUTPUTS is
|
// selected in eth_defines.v
|
// selected in eth_defines.v
|
//
|
//
|
// Revision 1.23 2002/03/25 13:33:53 mohor
|
// Revision 1.23 2002/03/25 13:33:53 mohor
|
Line 151... |
Line 154... |
wb_clk_i, wb_rst_i, wb_dat_i, wb_dat_o,
|
wb_clk_i, wb_rst_i, wb_dat_i, wb_dat_o,
|
|
|
// WISHBONE slave
|
// WISHBONE slave
|
wb_adr_i, wb_sel_i, wb_we_i, wb_cyc_i, wb_stb_i, wb_ack_o, wb_err_o,
|
wb_adr_i, wb_sel_i, wb_we_i, wb_cyc_i, wb_stb_i, wb_ack_o, wb_err_o,
|
|
|
`ifdef EXTERNAL_DMA
|
|
wb_ack_i, wb_req_o, wb_nd_o, wb_rd_o,
|
|
`else
|
|
// WISHBONE master
|
// WISHBONE master
|
m_wb_adr_o, m_wb_sel_o, m_wb_we_o,
|
m_wb_adr_o, m_wb_sel_o, m_wb_we_o,
|
m_wb_dat_o, m_wb_dat_i, m_wb_cyc_o,
|
m_wb_dat_o, m_wb_dat_i, m_wb_cyc_o,
|
m_wb_stb_o, m_wb_ack_i, m_wb_err_i,
|
m_wb_stb_o, m_wb_ack_i, m_wb_err_i,
|
`endif
|
|
|
|
//TX
|
//TX
|
mtx_clk_pad_i, mtxd_pad_o, mtxen_pad_o, mtxerr_pad_o,
|
mtx_clk_pad_i, mtxd_pad_o, mtxen_pad_o, mtxerr_pad_o,
|
|
|
//RX
|
//RX
|
Line 193... |
Line 192... |
input wb_we_i; // WISHBONE write enable input
|
input wb_we_i; // WISHBONE write enable input
|
input wb_cyc_i; // WISHBONE cycle input
|
input wb_cyc_i; // WISHBONE cycle input
|
input wb_stb_i; // WISHBONE strobe input
|
input wb_stb_i; // WISHBONE strobe input
|
output wb_ack_o; // WISHBONE acknowledge output
|
output wb_ack_o; // WISHBONE acknowledge output
|
|
|
`ifdef EXTERNAL_DMA
|
|
// DMA
|
|
input [1:0] wb_ack_i; // DMA acknowledge input
|
|
output [1:0] wb_req_o; // DMA request output
|
|
output [1:0] wb_nd_o; // DMA force new descriptor output
|
|
output wb_rd_o; // DMA restart descriptor output
|
|
`else
|
|
// WISHBONE master
|
// WISHBONE master
|
output [31:0] m_wb_adr_o;
|
output [31:0] m_wb_adr_o;
|
output [3:0] m_wb_sel_o;
|
output [3:0] m_wb_sel_o;
|
output m_wb_we_o;
|
output m_wb_we_o;
|
input [31:0] m_wb_dat_i;
|
input [31:0] m_wb_dat_i;
|
output [31:0] m_wb_dat_o;
|
output [31:0] m_wb_dat_o;
|
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;
|
`endif
|
|
|
|
|
|
// Tx
|
// Tx
|
input mtx_clk_pad_i; // Transmit clock (from PHY)
|
input mtx_clk_pad_i; // Transmit clock (from PHY)
|
output [3:0] mtxd_pad_o; // Transmit nibble (to PHY)
|
output [3:0] mtxd_pad_o; // Transmit nibble (to PHY)
|
Line 347... |
Line 338... |
reg temp_wb_err_o_reg;
|
reg temp_wb_err_o_reg;
|
`endif
|
`endif
|
|
|
assign DWord = &wb_sel_i;
|
assign DWord = &wb_sel_i;
|
assign RegCs = wb_stb_i & wb_cyc_i & DWord & ~wb_adr_i[11] & ~wb_adr_i[10]; // 0x0 - 0x3FF
|
assign RegCs = wb_stb_i & wb_cyc_i & DWord & ~wb_adr_i[11] & ~wb_adr_i[10]; // 0x0 - 0x3FF
|
assign BDCs = wb_stb_i & wb_cyc_i & DWord & ~wb_adr_i[11] & wb_adr_i[10]; // 0x400 - 0x5FF
|
assign BDCs = wb_stb_i & wb_cyc_i & DWord & ~wb_adr_i[11] & wb_adr_i[10]; // 0x400 - 0x7FF
|
assign temp_wb_ack_o = RegCs | BDAck;
|
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 & ~DWord;
|
assign temp_wb_err_o = wb_stb_i & wb_cyc_i & ~DWord;
|
|
|
`ifdef ETH_REGISTERED_OUTPUTS
|
`ifdef ETH_REGISTERED_OUTPUTS
|
Line 627... |
Line 618... |
end
|
end
|
|
|
|
|
|
|
|
|
// Connecting WishboneDMA module
|
// Connecting Wishbone module
|
`ifdef EXTERNAL_DMA
|
|
eth_wishbonedma wishbone
|
|
`else
|
|
eth_wishbone wishbone
|
eth_wishbone wishbone
|
`endif
|
|
(
|
(
|
.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]), .WB_WE_I(wb_we_i),
|
.BDCs(BDCs), .WB_ACK_O(BDAck),
|
.BDCs(BDCs), .WB_ACK_O(BDAck),
|
|
|
.Reset(r_Rst),
|
.Reset(r_Rst),
|
|
|
`ifdef EXTERNAL_DMA
|
|
.WB_REQ_O(wb_req_o), .WB_ND_O(wb_nd_o), .WB_RD_O(wb_rd_o),
|
|
.WB_ACK_I(wb_ack_i), .r_DmaEn(1'b1),
|
|
`else
|
|
// 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_o), .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),
|
`endif
|
|
|
|
|
|
|
|
//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),
|
.TxRetry(TxRetry), .TxAbort(TxAbort), .TxUnderRun(TxUnderRun),
|
.TxRetry(TxRetry), .TxAbort(TxAbort), .TxUnderRun(TxUnderRun),
|