projects
/
litex.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2175a79
)
genlib/crc: use OrderedDict
author
Florent Kermarrec
<florent@enjoy-digital.fr>
Thu, 22 Jan 2015 15:37:18 +0000
(16:37 +0100)
committer
Sebastien Bourdeauducq
<sb@m-labs.hk>
Thu, 22 Jan 2015 16:23:41 +0000
(
00:23
+0800)
migen/genlib/crc.py
patch
|
blob
|
history
diff --git
a/migen/genlib/crc.py
b/migen/genlib/crc.py
index 51a9ab1088bebcc4dd861e2f9d9a1a873a23e158..0c5714785945bddb4e6a509aaedd36e404b07ea4 100644
(file)
--- a/
migen/genlib/crc.py
+++ b/
migen/genlib/crc.py
@@
-1,3
+1,4
@@
+from collections import OrderedDict
from migen.fhdl.std import *
from migen.genlib.misc import optree
@@
-37,7
+38,7
@@
class CRCEngine(Module):
Replace even numbers of XORs in the equation
with an equivalent XOR
"""
- d =
{}
+ d =
OrderedDict()
for e in l:
if e in d:
d[e] += 1