实现根据时钟来自增计数器

This commit is contained in:
ranchuan
2024-12-30 16:19:10 +08:00
commit dcb6b4b7ec
5 changed files with 112 additions and 0 deletions

27
make.py Normal file
View File

@@ -0,0 +1,27 @@
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()