mirror of
https://github.com/myhdl/myhdl.git
synced 2024-12-14 07:44:38 +08:00
4af569adf9
--HG-- branch : 0.8-dev
14 lines
379 B
Python
14 lines
379 B
Python
import os
|
|
|
|
from myhdl import Cosimulation
|
|
|
|
cmd = 'vsim -c -quiet -pli myhdl_vpi.so -do cosim.do dut_bin2gray'
|
|
|
|
def bin2gray(B, G, width):
|
|
os.system('vlog -quiet +define+width=%s ../../test/verilog/bin2gray.v' % (width))
|
|
os.system('vlog -quiet +define+width=%s ../../test/verilog/dut_bin2gray.v' % (width))
|
|
|
|
return Cosimulation(cmd, B=B, G=G)
|
|
|
|
|