我有一堆.sp
文件,需要使用Cadence Spectre模拟。代替run spectre
一样-
run spectre 1.sp->exit->run spectre 2.sp->exit->...
-Spectre中是否存在某种批处理模式,这样我就可以启动Spectre并依次执行这些任务(按住Spectre并运行下一个任务)?我该如何实现?
我需要这样做,因为每次启动Spectre时都需要检查许可证并执行其他操作,这会花费不必要的时间。
谢谢。
错误消息:
invalid command name "if{!0}"
while executing
"if{![eof $log]} {
puts [gets $log]
} else {
close $log
incr event_flag
}"
(procedure "GetData" line 3)
invoked from within
"GetData file3"
can't wait for variable "event_flag": would wait forever
while executing
答案 0 :(得分:0)
您可以在工具交互模式下使用打开命令
#!/bin/sh
# \
exec tclsh "$0" ${1+"$@"}
set event_flag 0
proc GetData {log} {
global event_flag
if {![eof $log]} {
puts [gets $log]
} else {
close $log
incr event_flag
}
}
# Run the following in loop
set log [open "|spectre 1.sp"]
fconfigure $log -blocking 0
fileevent $log readable [ list GetData $log ]
vwait event_flag