Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
from tb import tb_barrel_shifter
def test(inst,**kwagrs):
inst.config_sim(**kwagrs)
inst.run_sim()
inst.quit_sim()
def testx(inst,**kwagrs):
from myhdl import Simulation,traceSignals
if kwagrs.get("trace",False):
print "Trace enabled"
if "filename" in kwagrs:
traceSignals.filename=kwagrs["filename"]
traceSignals.directory="./waveforms"
traceSignals(inst)
else:
print "Trace disabled"
sim=Simulation(inst)
sim.run()
print "--------"
sim.quit()
def convert_tb(inst,**kwargs):
inst.convert(**kwargs)
# print "Testing tb_barrel_left_shift_comb"
# test(tb_barrel_shifter.tb_barrel_left_shift_comb(),trace=True)
print "Testing tb_barrel_left_shift_pipelined"
testx(tb_barrel_shifter.tb_barrel_left_shift_pipelined(),trace=True,directory="./waveforms")
print "Testing tb_barrel_shift_pipelined"
testx(tb_barrel_shifter.tb_barrel_shift_pipelined(),trace=False,directory="./waveforms")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.