gen/sim/core: add args support on Display

This commit is contained in:
Florent Kermarrec 2018-12-09 09:46:10 +01:00
parent fa260f5b42
commit 99578bc68c
1 changed files with 8 additions and 1 deletions

View File

@ -217,7 +217,14 @@ class Evaluator:
elif isinstance(s, collections.Iterable):
self.execute(s)
elif isinstance(s, Display):
print(s.s)
args = []
for arg in s.args:
assert isinstance(arg, _Value)
try:
args.append(self.signal_values[arg])
except: # not yet evaluated
args.append(arg.reset.value)
print(s.s %(*args,))
else:
raise NotImplementedError