how to run multiple sp file using spectre

458 views Asked by At

I have a bunch of .sp files that need to be simulated with Cadence Spectre. Instead of run spectre as --

run spectre 1.sp->exit->run spectre 2.sp->exit->...

-- is there some kind of batch mode in Spectre so that i can launch Spectre once and execute these tasks sequentially (hold the spectre and run next task)? How can I achieve this?

I need this because each time launching the Spectre it needs check the license and does other things, costing unnecessary time.

Thanks in advance.

error message:

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
1

There are 1 answers

8
Roman Kaganovich On

You can use open command in tool interactive mode

#!/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