From 99578bc68cacfa962d49764ed6a7fa29499d5250 Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Sun, 9 Dec 2018 09:46:10 +0100 Subject: [PATCH] gen/sim/core: add args support on Display --- litex/gen/sim/core.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/litex/gen/sim/core.py b/litex/gen/sim/core.py index 3aca202bd..1ff34795e 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