From f0f6183c9a425208ac39a6c2383250afae54173d Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Wed, 21 Jan 2015 11:47:20 +0100 Subject: [PATCH] link/crc: use OrderedDict to generate the same code on each iteration --- litesata/core/link/crc.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/litesata/core/link/crc.py b/litesata/core/link/crc.py index 1f5ac617..89e4a13b 100644 --- a/litesata/core/link/crc.py +++ b/litesata/core/link/crc.py @@ -1,3 +1,4 @@ +from collections import OrderedDict from litesata.common import * from migen.actorlib.crc import CRCInserter, CRCChecker @@ -36,7 +37,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 -- 2.30.2