27 lines
401 B
Python
27 lines
401 B
Python
![]() |
import os
|
||
|
import sys
|
||
|
|
||
|
|
||
|
TARGET="wave"
|
||
|
|
||
|
SRC = ["testbench.v"]
|
||
|
|
||
|
INC = []
|
||
|
|
||
|
IVER="iverilog"
|
||
|
VVP="vvp"
|
||
|
GTKWAVE="gtkwave"
|
||
|
|
||
|
def make():
|
||
|
cmd=' '.join([IVER,'-o',TARGET]+SRC)
|
||
|
if(os.system(cmd)):
|
||
|
sys.exit(-1)
|
||
|
cmd=' '.join([VVP,'-n',TARGET,'lxt2'])
|
||
|
if(os.system(cmd)):
|
||
|
sys.exit(-1)
|
||
|
cmd=' '.join([GTKWAVE,TARGET+'.vcd'])
|
||
|
if(os.system(cmd)):
|
||
|
sys.exit(-1)
|
||
|
|
||
|
if __name__ == "__main__":
|
||
|
make()
|