The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl
Simulators >> Circuit Simulators >> How to simulating multiple netlists in a single ocean script
https://designers-guide.org/forum/YaBB.pl?num=1281568558

Message started by pkd on Aug 11th, 2010, 4:15pm

Title: How to simulating multiple netlists in a single ocean script
Post by pkd on Aug 11th, 2010, 4:15pm

Hi,
I want to systematically add few stuff to my circuit and then obtain the result from it by running a single ocean script. In my case I want to add two more inverter in each subsequent netlist to study the effect of tapping from delayed stages. But when I run the simulation by adding multiple design() statements, I don't see ant change in results. Perhaps even though it's running, but it's not able to change the netlist which it simulates multiple times in a single ocean script. When I print the variable which is passed as the name of the design netlist file, it prints  properly, but while it simulates in a single script, it doesn't seem to be simulating the changed netlists in each run.

Please suggest me a way to achieve the required goal ie simulate multiple netlists in a single ocean script. as soon as possible.

Here is the part of the code I had written to try simulating multiple netlists in the main ocean script file.

design_file_list='( "~/simulation/fight_model_variable_fb_delayy/spectre/schematic/netlist/netlist_2fb_inv" "~/simulation/fight_model_variable_fb_delayy/spectre/schematic/netlist/netlist_4fb_inv" "~/simulation/fight_model_variable_fb_delayy/spectre/schematic/netlist/netlist_6fb_inv" "~/simulation/fight_model_variable_fb_delayy/spectre/schematic/netlist/netlist_8fb_inv")

foreach(design_file design_file_list
design(design_file)
analysis('tran ?stop "30n"  ?errpreset "conservative"  ?step "1p"  
           ?maxstep "5p"  )
run()
.
.
.
)

Title: Re: How to simulating multiple netlists in a single ocean script
Post by rfcooltools.com on Aug 12th, 2010, 2:15pm

by calling the function
simulator('spectre)
this will flush the resident netlist out of the memory so you can load a new one.  

You will have to set the results directory and modelfiles again

http://rfcooltools.com

Title: Re: How to simulating multiple netlists in a single ocean script
Post by pkd on Aug 12th, 2010, 6:18pm


Quote:
Posted by: rfcooltools.com      Posted on: Today at 2:15pm
by calling the function
simulator('spectre)
this will flush the resident netlist out of the memory so you can load a new one.  

You will have to set the results directory and modelfiles again


I already did that. Still it doesn't work.  :-[

Title: Re: How to simulating multiple netlists in a single ocean script
Post by pkd on Aug 13th, 2010, 6:44am

Specify the different directory for each run() where the PSF files are stored by inserting resultsDir( "/aho/boke/kasu/nasu" ) before run().

What do you mean by "different directory" ? I see only one option for specifying the results directory using resultsDir() function. Is there anything else? I am already putting resultsDir() function in each loop, hence it should get refresh each time. But unfortunately I get the same results for each run. Probably it's not changing the netlist it's simulating.

Title: Re: How to simulating multiple netlists in a single ocean script
Post by pancho_hideboo on Aug 13th, 2010, 6:56am


pkd wrote on Aug 11th, 2010, 4:15pm:
design_file_list='(
"~/simulation/fight_model_variable_fb_delayy/spectre/schematic/netlist/netlist_2fb_inv"
"~/simulation/fight_model_variable_fb_delayy/spectre/schematic/netlist/netlist_4fb_inv"
"~/simulation/fight_model_variable_fb_delayy/spectre/schematic/netlist/netlist_6fb_inv"
"~/simulation/fight_model_variable_fb_delayy/spectre/schematic/netlist/netlist_8fb_inv"
)

foreach(design_file design_file_list
design(design_file)
analysis('tran ?stop "30n"  ?errpreset "conservative"  ?step "1p"  
           ?maxstep "5p"  )
run()
.
.
.
)


pkd wrote on Aug 13th, 2010, 6:44am:
I am already putting resultsDir() function in each loop, hence it should get refresh each time.
There is no "resultDir()" in your code.

Show me true code which you use actually without any modification.

Title: Re: How to simulating multiple netlists in a single ocean script
Post by pkd on Aug 15th, 2010, 9:42pm

Here is my actual code...

Code:
ocnWaveformTool( 'awd )
out = outfile("/home/pkd/ocean_script/fine_delay_vs_tap_pt.txt" "w")
close( out )
design_file_list='( "/home/pkd/simulation/fight_model_variable_fb_delayy/spectre/schematic/netlist/netlist_0fb_inv" "/home/pkd/simulation/fight_model_variable_fb_delayy/spectre/schematic/netlist/netlist_2fb_inv" "/home/pkd/simulation/fight_model_variable_fb_delayy/spectre/schematic/netlist/netlist_4fb_inv" "/home/pkd/simulation/fight_model_variable_fb_delayy/spectre/schematic/netlist/netlist_6fb_inv" "/home/pkd/simulation/fight_model_variable_fb_delayy/spectre/schematic/netlist/netlist_8fb_inv")

corners='( "ss" "tt" "ff" "snfp" "fnsp")

extn="_dir"
foreach(corner corners
     foreach(design_file design_file_list
           dsn=sprintf( nil "%s%s" design_file,extn)
           net=sprintf( nil "%s%s/netlist" design_file,extn)
           simulator( 'spectre )
           design(      design_file )
 modelFile( list( "/home/pkd/cadence/foundry_data/umc13mmrf/../Models/Spectre/L130E_HS12_V241.lib.scs" sprintf( nil "%s" corner)) )
out = outfile("/home/pkd/ocean_script/fine_delay_vs_tap_pt.txt" "a")
fprintf(out "\n\n%s Corner\n\n   Tapping after zero delay\n" corner)
fprintf(out "\n%s\n" design_file)
close( out )
temp( 27 )
res=1e3
wf=1e-6
wr=5e-7
desVar(        "res" res )
desVar(        "wf" wf      )
desVar(        "wr" wr      )
analysis('tran ?stop "30n"  ?errpreset "conservative"  ?step "1p"  
           ?maxstep "5p"  )
resultsDir( "/home/pkd/simulation/fight_model_variable_fb_delayy/spectre/schematic" )
run()
selectResult( 'tran )
int_delay=delay(VT("/in_fine"),0.6,3,"rising",VT("/n1"),0.6,3,"rising")*1e12
ip_op_delay=delay(VT("/in_fine"),0.6,3,"rising",VT("/out_fine"),0.6,3,"rising")*1e12
test_delay=delay(VT("/in_fine"),0.6,3,"rising",VT("/nfb"),0.6,3,"falling")*1e12
wf=wf*1e9
wr=wr*1e9
out = outfile("/home/pkd/ocean_script/fine_delay_vs_tap_pt.txt" "a")
fprintf(out "           %4.0f  %4.0f  %4.0f  %4.1f  %4.1f  %4.1f \n" wf,wr,res,int_delay,ip_op_delay,test_delay)
fprintf(out "           %4.0f  %4.0f  %4.0f \n" wf,wr,res)
close( out )
;;plot(getData("/n1") getData("/in_fine") )
)
)

Title: Re: How to simulating multiple netlists in a single ocean script
Post by pancho_hideboo on Aug 15th, 2010, 11:20pm

Try the following code.
Quote:
simulator( 'spectre )
base_dir = "/home/pkd/simulation/fight_model_variable_fb_delayy/spectre/"

design_file_list = '(
    "netlist_0fb_inv", "netlist_2fb_inv", "netlist_4fb_inv", "netlist_6fb_inv", "netlist_8fb_inv"
)

temp( 27 )
res=1e3
wf=1e-6
wr=5e-7
desVar(        "res" res )
desVar(        "wf" wf      )
desVar(        "wr" wr      )
analysis('tran ?stop "30n"  ?errpreset "conservative"  ?step "1p"  
           ?maxstep "5p"  )

corners='( "ss" "tt" "ff" "snfp" "fnsp")

extn="_dir"
foreach(corner, corners
     foreach(design_file, design_file_list
           dsn=sprintf( nil "%s%s" design_file,extn)
           net=sprintf( nil "%s%s/netlist" design_file,extn)            
           design( strcat(base_dir, "schematic/netlist/", design_file) )
 modelFile( list( "/home/pkd/cadence/foundry_data/umc13mmrf/../Models/Spectre/L130E_HS12_V241.lib.scs" sprintf( nil "%s" corner)) )
out = outfile("/home/pkd/ocean_script/fine_delay_vs_tap_pt.txt" "a")
fprintf(out "\n\n%s Corner\n\n   Tapping after zero delay\n" corner)
fprintf(out "\n%s\n" design_file)
close( out )
proj_dir = strcat( base_dir, design_file, "_", corner )
resultsDir( proj_dir )
run()

openResults( strcat(proj_dir, "/psf") )
selectResult( 'tran )
int_delay=delay(VT("/in_fine"),0.6,3,"rising",VT("/n1"),0.6,3,"rising")*1e12
ip_op_delay=delay(VT("/in_fine"),0.6,3,"rising",VT("/out_fine"),0.6,3,"rising")*1e12
test_delay=delay(VT("/in_fine"),0.6,3,"rising",VT("/nfb"),0.6,3,"falling")*1e12
wf=wf*1e9
wr=wr*1e9
out = outfile("/home/pkd/ocean_script/fine_delay_vs_tap_pt.txt" "a")
fprintf(out "           %4.0f  %4.0f  %4.0f  %4.1f  %4.1f  %4.1f \n" wf,wr,res,int_delay,ip_op_delay,test_delay)
fprintf(out "           %4.0f  %4.0f  %4.0f \n" wf,wr,res)
close( out )
;;plot(getData("/n1") getData("/in_fine") )
)
)


Or delete "input.scs" before each run by using "system()".

The Designer's Guide Community Forum » Powered by YaBB 2.2.2!
YaBB © 2000-2008. All Rights Reserved.