From bf3b4eec34836f8d64e2fd0d95dff14dab257a62 Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Tue, 4 Dec 2018 21:06:51 +0100 Subject: [PATCH] gen: integrate migen changes --- litex/gen/fhdl/verilog.py | 4 ++-- litex/gen/sim/core.py | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/litex/gen/fhdl/verilog.py b/litex/gen/fhdl/verilog.py index 07efc0115..9f3d1b672 100644 --- a/litex/gen/fhdl/verilog.py +++ b/litex/gen/fhdl/verilog.py @@ -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: diff --git a/litex/gen/sim/core.py b/litex/gen/sim/core.py index 2ba0cebc8..3aca202bd 100644 --- a/litex/gen/sim/core.py +++ b/litex/gen/sim/core.py @@ -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)