mirror of
https://github.com/myhdl/myhdl.git
synced 2025-01-24 21:52:56 +08:00
15 lines
327 B
Python
15 lines
327 B
Python
import os
|
|
|
|
from myhdl import Cosimulation
|
|
|
|
cmd = "iverilog -o bin2gray.o -Dwidth=%s " + \
|
|
"../../test/verilog/bin2gray.v " + \
|
|
"../../test/verilog/dut_bin2gray.v "
|
|
|
|
def bin2gray(B, G, width):
|
|
os.system(cmd % width)
|
|
return Cosimulation("vvp -m ../myhdl.vpi bin2gray.o", B=B, G=G)
|
|
|
|
|
|
|