Line 39... |
Line 39... |
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
//
|
//
|
// CVS Revision History
|
// CVS Revision History
|
//
|
//
|
// $Log: not supported by cvs2svn $
|
// $Log: not supported by cvs2svn $
|
|
// Revision 1.9 2002/04/22 13:51:44 mohor
|
|
// Short frame and ReceivedLengthOK were not detected correctly.
|
|
//
|
// Revision 1.8 2002/02/18 10:40:17 mohor
|
// Revision 1.8 2002/02/18 10:40:17 mohor
|
// Small fixes.
|
// Small fixes.
|
//
|
//
|
// Revision 1.7 2002/02/15 17:07:39 mohor
|
// Revision 1.7 2002/02/15 17:07:39 mohor
|
// Status was not written correctly when frames were discarted because of
|
// Status was not written correctly when frames were discarted because of
|
Line 91... |
Line 94... |
RxByteCnt, RxByteCntEq0, RxByteCntGreat2, RxByteCntMaxFrame, ReceivedPauseFrm,
|
RxByteCnt, RxByteCntEq0, RxByteCntGreat2, RxByteCntMaxFrame, ReceivedPauseFrm,
|
InvalidSymbol, MRxD, LatchedCrcError, Collision, CollValid, RxLateCollision,
|
InvalidSymbol, MRxD, LatchedCrcError, Collision, CollValid, RxLateCollision,
|
r_RecSmall, r_MinFL, r_MaxFL, ShortFrame, DribbleNibble, ReceivedPacketTooBig, r_HugEn,
|
r_RecSmall, r_MinFL, r_MaxFL, ShortFrame, DribbleNibble, ReceivedPacketTooBig, r_HugEn,
|
LoadRxStatus, StartTxDone, StartTxAbort, RetryCnt, RetryCntLatched, MTxClk, MaxCollisionOccured,
|
LoadRxStatus, StartTxDone, StartTxAbort, RetryCnt, RetryCntLatched, MTxClk, MaxCollisionOccured,
|
RetryLimit, LateCollision, LateCollLatched, StartDefer, DeferLatched, TxStartFrm,
|
RetryLimit, LateCollision, LateCollLatched, StartDefer, DeferLatched, TxStartFrm,
|
StatePreamble, StateData, CarrierSense, CarrierSenseLost, TxUsedData
|
StatePreamble, StateData, CarrierSense, CarrierSenseLost, TxUsedData, LatchedMRxErr
|
);
|
);
|
|
|
|
|
|
|
parameter Tp = 1;
|
parameter Tp = 1;
|
Line 151... |
Line 154... |
output [3:0] RetryCntLatched;
|
output [3:0] RetryCntLatched;
|
output RetryLimit;
|
output RetryLimit;
|
output LateCollLatched;
|
output LateCollLatched;
|
output DeferLatched;
|
output DeferLatched;
|
output CarrierSenseLost;
|
output CarrierSenseLost;
|
|
output LatchedMRxErr;
|
|
|
|
|
reg ReceiveEnd;
|
reg ReceiveEnd;
|
|
|
reg LatchedCrcError;
|
reg LatchedCrcError;
|
Line 188... |
Line 192... |
always @ (posedge MRxClk or posedge Reset)
|
always @ (posedge MRxClk or posedge Reset)
|
begin
|
begin
|
if(Reset)
|
if(Reset)
|
LatchedMRxErr <=#Tp 1'b0;
|
LatchedMRxErr <=#Tp 1'b0;
|
else
|
else
|
if(~MRxErr & MRxDV & RxStateIdle & ~Transmitting)
|
|
LatchedMRxErr <=#Tp 1'b0;
|
|
else
|
|
if(MRxErr & MRxDV & (RxStatePreamble | RxStateSFD | (|RxStateData) | RxStateIdle & ~Transmitting))
|
if(MRxErr & MRxDV & (RxStatePreamble | RxStateSFD | (|RxStateData) | RxStateIdle & ~Transmitting))
|
LatchedMRxErr <=#Tp 1'b1;
|
LatchedMRxErr <=#Tp 1'b1;
|
|
else
|
|
LatchedMRxErr <=#Tp 1'b0;
|
end
|
end
|
|
|
|
|
// ReceivedPacketGood
|
// ReceivedPacketGood
|
assign ReceivedPacketGood = ~LatchedCrcError & ~LatchedMRxErr;
|
assign ReceivedPacketGood = ~LatchedCrcError;
|
|
|
|
|
// ReceivedLengthOK
|
// ReceivedLengthOK
|
assign ReceivedLengthOK = RxByteCnt[15:0] >= r_MinFL[15:0] & RxByteCnt[15:0] <= r_MaxFL[15:0];
|
assign ReceivedLengthOK = RxByteCnt[15:0] >= r_MinFL[15:0] & RxByteCnt[15:0] <= r_MaxFL[15:0];
|
|
|
Line 234... |
Line 237... |
ReceiveEnd <=#Tp LoadRxStatus;
|
ReceiveEnd <=#Tp LoadRxStatus;
|
end
|
end
|
|
|
|
|
// Invalid Symbol received during 100Mbps mode
|
// Invalid Symbol received during 100Mbps mode
|
assign SetInvalidSymbol = MRxDV & MRxErr & ~LatchedMRxErr & MRxD[3:0] == 4'he;
|
assign SetInvalidSymbol = MRxDV & MRxErr & MRxD[3:0] == 4'he;
|
|
|
|
|
// InvalidSymbol
|
// InvalidSymbol
|
always @ (posedge MRxClk or posedge Reset)
|
always @ (posedge MRxClk or posedge Reset)
|
begin
|
begin
|