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

RE: [ethmac] RX MAC




Hi,

	Just a small comment as it seem to me that we "exsust" this issue, and yes
it for sure a good thing to use same equation for generation as well as
verification (at least I did so in the past), and the only differance is
than in one case you make comparision and in the other you make rot-inv, and
those thing can be in the "calling module".

the reflection if I got this word right is not only lsb and msb rotation
which is only wireing so no logic waste BUT also invert of the bits and this
can "cost you space".

while in fpga the FF's have the Q and QB in so you get the invert for "free"
in asic the story is not the same and you can save some space using smaller
component that have only the Q. in this case using the QB mean "waste". and
this way the comparission will be somewhat more "effecient" if you simple
compare the 32FF as they are and not reflect and than compare.

on the other hand if it is only lsb to msb than it is just the same and it
simple compare different number but than I was wonder why doing this lsb-msb
at all.

have a nice day

   Illan

-----Original Message-----
From: owner-ethmac@opencores.org [mailto:owner-ethmac@opencores.org]On
Behalf Of Woody Johnson
Sent: Friday, October 13, 2000 1:57 PM
To: 'ethmac@opencores.org'
Subject: RE: [ethmac] RX MAC


The "after reflecting, ", etc was something I just copied from some
comments I have in a CRC generation/checking module I wrote.  Reflecting,
or rotating as you stated, doesn't waste logic, it just presents the same
logic in a different bit order.  (My crc module uses generics to allow it
to work with (I think) any type of crc generation (crc-16, 802.3, xmodem,
etc.  Some of these process bit lsb to msb, some msb to lsb - hence the
need to sometime reflect input data, sometimes output data.)

I think its worthwhile to use the same module for generation as well as
checking.  The only difference need be the comparison of the crc output
of the module against the "magic number".

-----Original Message-----
From: NewsGroup [mailto:nbase@nbase.com]
Sent: Friday, October 13, 2000 3:05 PM
To: ethmac@opencores.org
Subject: RE: [ethmac] RX MAC


Hi,

  This is strange , I wonder how come you got my Email before I got it as I
got my own post after your replay ?

Any way why all "after reflecting and xoring result with all 1's" ? it seem
to me that you waste logic for nothing simple get the result and see it is
the magic number (which will of course be not the one you mention).

the xoring (or since it is with all 1 simple inverting) and reflecting (I
guess you mean rotating) is done and needed ONLY when you genrate the crc it
is waste when you check crc.

Lastly the point od initial value it is all 1's ONLY (as in this case) when
the data is in the boundry of the equation like in this case we have
equation for 4 bit data and the data come in 4 bit. however you might want
to think about the case where the equation are for example 32 bit and the
data come let say in 8 bit what than.

BUT as I said it is just somethign to think in general as it is not
importnet in this case, here {32{1'b1}} will do the job or what ever way you
like to write 32 bit of 1.

have a nice day

   Illan

-----Original Message-----
From: owner-ethmac@opencores.org [mailto:owner-ethmac@opencores.org]On
Behalf Of Woody Johnson
Sent: Friday, October 13, 2000 4:24 AM
To: 'ethmac@opencores.org'
Subject: RE: [ethmac] RX MAC




	well this is one way but another way relay on the property of the
CRC that
	when you computer the CRCof the data AS WELL AS the CRC field you
should
	ALWAYS get the 32FF of the CRC to show the SAME number and this
number is
	also called the "magic number".

	I don't recall by memorey this number but simple pass the data with
the crc
	and see the number you get, than pass another packet and you will be
	surprise to see that the result is just the same number :-)

To check an ethernet CRC, feed in the entire packet less the preamble
(but including the checksum), and the resulting value will be the constant
value of 0x2144DF1C (after reflecting and xoring result with all 1's).

	one EXTREMLY importent thing but it is also right for the compare
way is
	that you always start with the right initial value.

Right, you need to start with all 1's.

- WJ