[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [ethmac] bug found?




   Hi,

        What does this CarrierSenseLoss used for at all?

crs usualy is used to tell if the line is busy or not.

assuming the above is used for the trasmite machine than in full duplex you
usualy count ipg base on when you deasert the txen.

btw I assume you wanted to write that in half duplex the phy asser the crs
when trasmiting OR reciving.

have a nice day

   Illan


-----Original Message-----
From: davidmertens@freegates.be [mailto:davidmertens@freegates.be]
Sent: Wednesday, December 18, 2002 11:45 AM
To: ethmac@opencores.org
Subject: [ethmac] bug found?


I think I found a bug.
It has something to do with the carrier sense bit in the TxBD when 
working in full duplex.

When using full duplex, the carrier sense line from the PHY will not be 
asserted when transmitting data, only when it is receiving data (in half 
duplex it will be asserted when sending AND receiving data).
In eth_macstatus.v, the last lines of the code:

// CarrierSenseLost
always @ (posedge MTxClk or posedge Reset)
begin
  if(Reset)
    CarrierSenseLost <=#Tp 1'b0;
  else
  if((StatePreamble | (|StateData)) & ~CarrierSense & ~Loopback & 
~Collision)
    CarrierSenseLost <=#Tp 1'b1;
  else
  if(TxStartFrm)
    CarrierSenseLost <=#Tp 1'b0;
end


--> shouldn't there be something like :
if((StatePreamble | (|StateData)) & ~CarrierSense & ~Loopback & 
~Collision) & ~r_FullD )

If you don't use ~r_FullD, you always get an Tx error, because the 
carrier sense of the PHY isn't asserted when transmitting.

Greetings,
David
--
To unsubscribe from ethmac mailing list please visit
http://www.opencores.org/mailinglists.shtml
--
To unsubscribe from ethmac mailing list please visit http://www.opencores.org/mailinglists.shtml