mirror of
https://github.com/myhdl/myhdl.git
synced 2024-12-14 07:44:38 +08:00
cursory conf_sim method
This commit is contained in:
parent
49053b352e
commit
f261156e54
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user