In my VLAB python scripts, I am repeatedly typing the same arguments for time_unit and blocking:
# nothing for a while
write_port("pwm_0.period", 0)
run(200, "ns", blocking=True)
# start a waveform
write_port("pwm_0.period", 100)
# see it operate for 2 cycle)
run(230, "ns", blocking=True)
# change duty cycle
write_port("pwm_0.duty", 10)
run(200, "ns", blocking=True)
# change period
write_port("pwm_0.period", 50)
run(200, "ns", blocking=True)
Is there some way I can avoid having to type
"ns", blocking=True
every time I call run()
?