Line 39... |
Line 39... |
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
//
|
//
|
// CVS Revision History
|
// CVS Revision History
|
//
|
//
|
// $Log: not supported by cvs2svn $
|
// $Log: not supported by cvs2svn $
|
|
// Revision 1.9 2002/02/15 11:59:10 mohor
|
|
// Changes that were lost when updating from 1.5 to 1.8 fixed.
|
|
//
|
// Revision 1.8 2002/02/14 20:54:33 billditt
|
// Revision 1.8 2002/02/14 20:54:33 billditt
|
// Addition of new module eth_addrcheck.v
|
// Addition of new module eth_addrcheck.v
|
//
|
//
|
// Revision 1.7 2002/02/12 17:03:47 mohor
|
// Revision 1.7 2002/02/12 17:03:47 mohor
|
// RxOverRun added to statuses.
|
// RxOverRun added to statuses.
|
Line 372... |
Line 375... |
.clk(WB_CLK_I), .rst(Reset), .ce(ram_ce), .we(ram_we), .oe(ram_oe), .addr(ram_addr), .di(ram_di), .do(ram_do)
|
.clk(WB_CLK_I), .rst(Reset), .ce(ram_ce), .we(ram_we), .oe(ram_oe), .addr(ram_addr), .di(ram_di), .do(ram_do)
|
);
|
);
|
|
|
assign ram_ce = 1'b1;
|
assign ram_ce = 1'b1;
|
assign ram_we = BDWrite & WbEn & WbEn_q | TxStatusWrite | RxStatusWrite;
|
assign ram_we = BDWrite & WbEn & WbEn_q | TxStatusWrite | RxStatusWrite;
|
assign ram_oe = BDRead & WbEn & WbEn_q | TxEn & TxEn_q & (TxBDRead | TxPointerRead) | RxEn & RxEn_q & (RxBDRead | RxPointerRead); // Tu manjka se read kadar se bere RxBD
|
assign ram_oe = BDRead & WbEn & WbEn_q | TxEn & TxEn_q & (TxBDRead | TxPointerRead) | RxEn & RxEn_q & (RxBDRead | RxPointerRead);
|
|
|
|
|
always @ (posedge WB_CLK_I or posedge Reset)
|
always @ (posedge WB_CLK_I or posedge Reset)
|
begin
|
begin
|
if(Reset)
|
if(Reset)
|
Line 887... |
Line 890... |
begin
|
begin
|
if(Reset)
|
if(Reset)
|
TxStartFrm <=#Tp 1'b0;
|
TxStartFrm <=#Tp 1'b0;
|
else
|
else
|
if(TxStartFrm_sync2)
|
if(TxStartFrm_sync2)
|
TxStartFrm <=#Tp 1'b1; // igor !!! Dodaj se pogoj, da ni vmes prisel kaksen abort ali kaj podobnega
|
TxStartFrm <=#Tp 1'b1;
|
else
|
else
|
if(TxUsedData_q)
|
if(TxUsedData_q | ~TxStartFrm_sync2 & (TxRetry | TxAbort))
|
TxStartFrm <=#Tp 1'b0;
|
TxStartFrm <=#Tp 1'b0;
|
end
|
end
|
// End: Generation of the TxStartFrm_wb which is then synchronized to the MTxClk
|
// End: Generation of the TxStartFrm_wb which is then synchronized to the MTxClk
|
|
|
|
|
Line 1311... |
Line 1314... |
RxBDReady <=#Tp 1'b0;
|
RxBDReady <=#Tp 1'b0;
|
else
|
else
|
if(RxEn & RxEn_q & RxBDRead)
|
if(RxEn & RxEn_q & RxBDRead)
|
RxBDReady <=#Tp ram_do[15]; // RxBDReady is sampled only once at the beginning
|
RxBDReady <=#Tp ram_do[15]; // RxBDReady is sampled only once at the beginning
|
else
|
else
|
if(ShiftEnded | RxAbort) // igor !!! tx del ima tu ResetTxBDReady
|
if(ShiftEnded | RxAbort)
|
RxBDReady <=#Tp 1'b0;
|
RxBDReady <=#Tp 1'b0;
|
end
|
end
|
|
|
// Latching Rx buffer descriptor status
|
// Latching Rx buffer descriptor status
|
// Data is avaliable one cycle after the access is started (at that time signal RxEn is not active)
|
// Data is avaliable one cycle after the access is started (at that time signal RxEn is not active)
|
Line 1735... |
Line 1738... |
RxOverrun <=#Tp 1'b1;
|
RxOverrun <=#Tp 1'b1;
|
end
|
end
|
|
|
|
|
// TX
|
// TX
|
// bit 15 od tx je ready
|
// bit 15 ready
|
// bit 14 od tx je interrupt (Tx buffer ali tx error bit se postavi v interrupt registru, ko se ta buffer odda)
|
// bit 14 interrupt
|
// bit 13 od tx je wrap
|
// bit 13 wrap
|
// bit 12 od tx je pad
|
// bit 12 pad
|
// bit 11 od tx je crc
|
// bit 11 crc
|
// bit 10 od tx je last (crc se doda le ce je bit 11 in hkrati bit 10)
|
// bit 10 last
|
// bit 9 od tx je pause request (control frame)
|
// bit 9 pause request (control frame)
|
// Vsi zgornji biti gredo ven, spodnji biti (od 8 do 0) pa so statusni in se vpisejo po koncu oddajanja
|
// bit 8 TxUnderRun
|
// bit 8 od tx je defer indication done
|
// bit 7-4 RetryCntLatched
|
// bit 7 od tx je late collision done
|
// bit 3 retransmittion limit
|
// bit 6 od tx je retransmittion limit done
|
// bit 2 LateCollLatched
|
// bit 5 od tx je underrun done
|
// bit 1 DeferLatched
|
// bit 4 od tx je carrier sense lost
|
// bit 0 CarrierSenseLost
|
// bit [3:0] od tx je retry count done
|
|
|
|
|
|
// RX
|
// RX
|
// bit 15 od rx je empty
|
// bit 15 od rx je empty
|
// bit 14 od rx je interrupt (Rx buffer ali rx frame received se postavi v interrupt registru, ko se ta buffer zapre)
|
// bit 14 od rx je interrupt
|
// bit 13 od rx je wrap
|
// bit 13 od rx je wrap
|
// bit 12 od rx je reserved
|
// bit 12 od rx je reserved
|
// bit 11 od rx je reserved
|
// bit 11 od rx je reserved
|
// bit 10 od rx je reserved
|
// bit 10 od rx je reserved
|
// bit 9 od rx je reserved
|
// bit 9 od rx je reserved
|