Skip to content

Commit

Permalink
migen/sim: support special_overrides
Browse files Browse the repository at this point in the history
sbourdeauducq committed Oct 17, 2016
1 parent 9cd4900 commit 20ef480
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions migen/sim/core.py
Original file line number Diff line number Diff line change
@@ -218,7 +218,8 @@ def execute(self, statements):

# TODO: instances via Iverilog/VPI
class Simulator:
def __init__(self, fragment_or_module, generators, clocks={"sys": 10}, vcd_name=None):
def __init__(self, fragment_or_module, generators, clocks={"sys": 10}, vcd_name=None,
special_overrides={}):
if isinstance(fragment_or_module, _Fragment):
self.fragment = fragment_or_module
else:
@@ -227,7 +228,7 @@ def __init__(self, fragment_or_module, generators, clocks={"sys": 10}, vcd_name=
mta = MemoryToArray()
mta.transform_fragment(None, self.fragment)

fs, lowered = lower_specials(overrides={}, specials=self.fragment.specials)
fs, lowered = lower_specials(overrides=special_overrides, specials=self.fragment.specials)
self.fragment += fs
self.fragment.specials -= lowered
if self.fragment.specials:

0 comments on commit 20ef480

Please sign in to comment.