From f261156e540e0216013b431f925d37f42b259894 Mon Sep 17 00:00:00 2001 From: Keerthan Jaic Date: Tue, 15 Mar 2016 13:41:55 -0400 Subject: [PATCH] cursory conf_sim method --- myhdl/_block.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/myhdl/_block.py b/myhdl/_block.py index 7132cd2f..87635d19 100644 --- a/myhdl/_block.py +++ b/myhdl/_block.py @@ -143,6 +143,7 @@ class _BlockInstance(object): if hasattr(mod, 'vhdl_code'): self.vhdl_code = _UserVhdlCode(mod.vhdl_code, self.symdict, mod.name, mod.modfunc, mod.sourcefile, mod.sourceline) + self._conf_sim = {'trace': False} def _verifySubs(self): for inst in self.subs: @@ -237,7 +238,13 @@ class _BlockInstance(object): setattr(converter, k, v) return converter(self) + def conf_sim(self, trace=False): + self._conf_sim['trace'] = trace + def run(self, duration=None, quiet=0): if self.sim is None: - self.sim = myhdl._Simulation.Simulation(self) + sim = self + if self._conf_sim['trace']: + sim = myhdl.traceSignals(self) + self.sim = myhdl._Simulation.Simulation(sim) self.sim.run(duration, quiet)