Line 39... |
Line 39... |
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
//
|
//
|
// CVS Revision History
|
// CVS Revision History
|
//
|
//
|
// $Log: not supported by cvs2svn $
|
// $Log: not supported by cvs2svn $
|
|
// Revision 1.48 2003/10/17 07:46:16 markom
|
|
// mbist signals updated according to newest convention
|
|
//
|
// Revision 1.47 2003/10/06 15:43:45 knguyen
|
// Revision 1.47 2003/10/06 15:43:45 knguyen
|
// Update RxEnSync only when mrxdv_pad_i is inactive (LOW).
|
// Update RxEnSync only when mrxdv_pad_i is inactive (LOW).
|
//
|
//
|
// Revision 1.46 2003/01/30 13:30:22 tadejm
|
// Revision 1.46 2003/01/30 13:30:22 tadejm
|
// Defer indication changed.
|
// Defer indication changed.
|
Line 377... |
Line 380... |
);
|
);
|
|
|
|
|
|
|
|
|
wire RegCs; // Connected to registers
|
wire [3:0] RegCs; // Connected to registers
|
wire [31:0] RegDataOut; // Multiplexed to wb_dat_o
|
wire [31:0] RegDataOut; // Multiplexed to wb_dat_o
|
wire r_RecSmall; // Receive small frames
|
wire r_RecSmall; // Receive small frames
|
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 421... |
Line 424... |
wire TxE_IRQ; // Interrupt Tx Error
|
wire TxE_IRQ; // Interrupt Tx Error
|
wire RxB_IRQ; // Interrupt Rx Buffer
|
wire RxB_IRQ; // Interrupt Rx Buffer
|
wire RxE_IRQ; // Interrupt Rx Error
|
wire RxE_IRQ; // Interrupt Rx Error
|
wire Busy_IRQ; // Interrupt Busy (lack of buffers)
|
wire Busy_IRQ; // Interrupt Busy (lack of buffers)
|
|
|
wire DWord;
|
//wire DWord;
|
|
wire ByteSelected;
|
|
wire [3:0] ByteSel;
|
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 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 temp_wb_ack_o;
|
wire temp_wb_ack_o;
|
wire [31:0] temp_wb_dat_o;
|
wire [31:0] temp_wb_dat_o;
|
Line 438... |
Line 443... |
reg temp_wb_ack_o_reg;
|
reg temp_wb_ack_o_reg;
|
reg [31:0] temp_wb_dat_o_reg;
|
reg [31:0] temp_wb_dat_o_reg;
|
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 ByteSelected = |wb_sel_i;
|
assign BDCs = wb_stb_i & wb_cyc_i & DWord & ~wb_adr_i[11] & wb_adr_i[10]; // 0x400 - 0x7FF
|
assign RegCs[3] = wb_stb_i & wb_cyc_i & ByteSelected & ~wb_adr_i[11] & ~wb_adr_i[10] & wb_sel_i[3]; // 0x0 - 0x3FF
|
assign CsMiss = wb_stb_i & wb_cyc_i & DWord & wb_adr_i[11]; // 0x800 - 0xfFF
|
assign RegCs[2] = wb_stb_i & wb_cyc_i & ByteSelected & ~wb_adr_i[11] & ~wb_adr_i[10] & wb_sel_i[2]; // 0x0 - 0x3FF
|
assign temp_wb_ack_o = RegCs | BDAck;
|
assign RegCs[1] = wb_stb_i & wb_cyc_i & ByteSelected & ~wb_adr_i[11] & ~wb_adr_i[10] & wb_sel_i[1]; // 0x0 - 0x3FF
|
assign temp_wb_dat_o = (RegCs & ~wb_we_i)? RegDataOut : BD_WB_DAT_O;
|
assign RegCs[0] = wb_stb_i & wb_cyc_i & ByteSelected & ~wb_adr_i[11] & ~wb_adr_i[10] & wb_sel_i[0]; // 0x0 - 0x3FF
|
assign temp_wb_err_o = wb_stb_i & wb_cyc_i & (~DWord | CsMiss);
|
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[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 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_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;
|
assign wb_dat_o[31:0] = temp_wb_dat_o_reg;
|
assign wb_dat_o[31:0] = temp_wb_dat_o_reg;
|
assign wb_err_o = temp_wb_err_o_reg;
|
assign wb_err_o = temp_wb_err_o_reg;
|