clarify the comments in mac/crc.py code

This commit is contained in:
Felix Held 2018-02-21 21:15:51 +01:00
parent 8fc7161036
commit 2ceaa74caf
1 changed files with 3 additions and 3 deletions

View File

@ -40,8 +40,8 @@ class LiteEthMACCRCEngine(Module):
def _optimize_eq(l): def _optimize_eq(l):
""" """
Replace even numbers of XORs in the equation remove an even numbers of XORs with the same bit
with an equivalent XOR replace an odd number of XORs with a single XOR
""" """
d = OrderedDict() d = OrderedDict()
for e in l: for e in l:
@ -55,7 +55,7 @@ class LiteEthMACCRCEngine(Module):
r.append(key) r.append(key)
return r return r
# compute and optimize CRC's LFSR # compute and optimize the parallel implementation of the CRC's LFSR
curval = [[("state", i)] for i in range(width)] curval = [[("state", i)] for i in range(width)]
for i in range(data_width): for i in range(data_width):
feedback = curval.pop() + [("din", i)] feedback = curval.pop() + [("din", i)]