From: Florent Kermarrec Date: Sun, 9 Dec 2018 08:46:10 +0000 (+0100) Subject: gen/sim/core: add args support on Display X-Git-Tag: 24jan2021_ls180~1446 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=99578bc68cacfa962d49764ed6a7fa29499d5250;p=litex.git gen/sim/core: add args support on Display --- diff --git a/litex/gen/sim/core.py b/litex/gen/sim/core.py index 3aca202b..1ff34795 100644 --- a/litex/gen/sim/core.py +++ b/litex/gen/sim/core.py @@ -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