1
0
mirror of https://github.com/myhdl/myhdl.git synced 2025-01-24 21:52:56 +08:00
myhdl/cosimulation/icarus/test/dff_clkout.py

16 lines
416 B
Python
Raw Normal View History

2003-05-12 16:57:17 +00:00
import os
2003-05-17 16:21:40 +00:00
import os.path as path
2003-05-12 16:57:17 +00:00
from myhdl import Cosimulation
2005-10-03 15:49:36 +00:00
cmd = "iverilog -o dff_clkout.o " + \
2003-05-12 16:57:17 +00:00
"../../test/verilog/dff_clkout.v " + \
"../../test/verilog/dut_dff_clkout.v "
def dff_clkout(clkout, q, d, clk, reset):
2003-05-17 16:21:40 +00:00
if path.exists("dff_clkout"):
os.remove("dff_clkout")
2003-05-12 16:57:17 +00:00
os.system(cmd)
2005-10-03 15:49:36 +00:00
return Cosimulation("vvp -m ../myhdl.vpi dff_clkout.o", **locals())
2003-05-12 16:57:17 +00:00