gen: integrate migen changes
authorFlorent Kermarrec <florent@enjoy-digital.fr>
Tue, 4 Dec 2018 20:06:51 +0000 (21:06 +0100)
committerFlorent Kermarrec <florent@enjoy-digital.fr>
Tue, 4 Dec 2018 20:06:51 +0000 (21:06 +0100)
litex/gen/fhdl/verilog.py
litex/gen/sim/core.py

index 07efc01153d6e4bf2979bd64eb5097b59aa7602a..9f3d1b6723212c1002bd47294b4c33a893e26f9d 100644 (file)
@@ -377,8 +377,8 @@ def convert(f, ios=None, name="top",
     f = lower_complex_slices(f)
     insert_resets(f)
     f = lower_basics(f)
-    fs, lowered_specials = lower_specials(special_overrides, f.specials)
-    f += lower_basics(fs)
+    f, lowered_specials = lower_specials(special_overrides, f)
+    f = lower_basics(f)
 
     for io in sorted(ios, key=lambda x: x.duid):
         if io.name_override is None:
index 2ba0cebc8bbd0d27a3daf9dd08c5693591a39ea0..3aca202bd89ca6b229594f0811ae3fcb67a8225e 100644 (file)
@@ -250,9 +250,7 @@ class Simulator:
 
         overrides = {AsyncResetSynchronizer: DummyAsyncResetSynchronizer}
         overrides.update(special_overrides)
-        fs, lowered = lower_specials(overrides=overrides, specials=self.fragment.specials)
-        self.fragment += fs
-        self.fragment.specials -= lowered
+        f, lowered = lower_specials(overrides, self.fragment)
         if self.fragment.specials:
             raise ValueError("Could not lower all specials", self.fragment.specials)