我必须编写一个必须运行tcl脚本的python程序。这个tcl脚本是一个打开modelsim的脚本。在打开modelsim之后(在cmd中,而不是gui)我必须运行comman“run -all”(模拟sim的命令)。
我尝试了以下内容:
import os
os.popen("cd C:/raft/raftortwo/girobo2/ver/sim")
os.system("vsim -c -do top_tb_simulate.tcl")
我可以在python控制台中看到modelsin正在运行,我正在努力运行run -all
看起来像是:
....
....
....
# .windowmgr isa className
# while executing
# "layout load NoDesign"
VSIM 2> here I have to run the `run -all`
如何从python程序执行它?