mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
sim: refactor comb commit
This commit is contained in:
parent
5fa7f7414f
commit
8ee361ffe2
1 changed files with 4 additions and 3 deletions
|
@ -141,7 +141,8 @@ class Simulator:
|
||||||
for signal in list_inputs(statement):
|
for signal in list_inputs(statement):
|
||||||
self.comb_dependent_statements[signal].append(statement)
|
self.comb_dependent_statements[signal].append(statement)
|
||||||
|
|
||||||
def _comb_propagate(self, modified):
|
def _commit_and_comb_propagate(self):
|
||||||
|
modified = self.evaluator.commit()
|
||||||
while modified:
|
while modified:
|
||||||
for signal in modified:
|
for signal in modified:
|
||||||
self.evaluator.execute(self.comb_dependent_statements[signal])
|
self.evaluator.execute(self.comb_dependent_statements[signal])
|
||||||
|
@ -180,7 +181,7 @@ class Simulator:
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
self.evaluator.execute(self.fragment.comb)
|
self.evaluator.execute(self.fragment.comb)
|
||||||
self._comb_propagate(self.evaluator.commit())
|
self._commit_and_comb_propagate()
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
cds = self.time.tick()
|
cds = self.time.tick()
|
||||||
|
@ -189,7 +190,7 @@ class Simulator:
|
||||||
self.evaluator.execute(self.fragment.sync[cd])
|
self.evaluator.execute(self.fragment.sync[cd])
|
||||||
if cd in self.generators:
|
if cd in self.generators:
|
||||||
self._process_generators(cd)
|
self._process_generators(cd)
|
||||||
self._comb_propagate(self.evaluator.commit())
|
self._commit_and_comb_propagate()
|
||||||
|
|
||||||
if not self._continue_simulation():
|
if not self._continue_simulation():
|
||||||
break
|
break
|
||||||
|
|
Loading…
Reference in a new issue