The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Jul 18th, 2024, 1:24am
Pages: 1
Send Topic Print
How to simulating multiple netlists in a single ocean script (Read 6600 times)
pkd
Junior Member
**
Offline



Posts: 25
India
How to simulating multiple netlists in a single ocean script
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_2
fb_inv" "~/simulation/fight_model_variable_fb_delayy/spectre/schematic/netlist/netlist_4
fb_inv" "~/simulation/fight_model_variable_fb_delayy/spectre/schematic/netlist/netlist_6
fb_inv" "~/simulation/fight_model_variable_fb_delayy/spectre/schematic/netlist/netlist_8
fb_inv")

foreach(design_file design_file_list
design(design_file)
analysis('tran ?stop "30n"  ?errpreset "conservative"  ?step "1p"  
           ?maxstep "5p"  )
run()
.
.
.
)
Back to top
 
View Profile   IP Logged
rfcooltools.com
Senior Member
****
Offline



Posts: 159

Re: How to simulating multiple netlists in a single ocean script
Reply #1 - 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
Back to top
 
 
View Profile   IP Logged
pkd
Junior Member
**
Offline



Posts: 25
India
Re: How to simulating multiple netlists in a single ocean script
Reply #2 - 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.  :-[
Back to top
 
 
View Profile   IP Logged
pkd
Junior Member
**
Offline



Posts: 25
India
Re: How to simulating multiple netlists in a single ocean script
Reply #3 - 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.
Back to top
 
 
View Profile   IP Logged
pancho_hideboo
Senior Fellow
******
Offline



Posts: 1424
Real Homeless
Re: How to simulating multiple netlists in a single ocean script
Reply #4 - 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_2
fb_inv"
"~/simulation/fight_model_variable_fb_delayy/spectre/schematic/netlist/netlist_4
fb_inv"
"~/simulation/fight_model_variable_fb_delayy/spectre/schematic/netlist/netlist_6
fb_inv"
"~/simulation/fight_model_variable_fb_delayy/spectre/schematic/netlist/netlist_8
fb_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.
Back to top
 
 
View Profile WWW Top+Secret Top+Secret   IP Logged
pkd
Junior Member
**
Offline



Posts: 25
India
Re: How to simulating multiple netlists in a single ocean script
Reply #5 - 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") )
)
) 

Back to top
 
 
View Profile   IP Logged
pancho_hideboo
Senior Fellow
******
Offline



Posts: 1424
Real Homeless
Re: How to simulating multiple netlists in a single ocean script
Reply #6 - 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()".
Back to top
 
 
View Profile WWW Top+Secret Top+Secret   IP Logged
Pages: 1
Send Topic Print
Copyright 2002-2024 Designer’s Guide Consulting, Inc. Designer’s Guide® is a registered trademark of Designer’s Guide Consulting, Inc. All rights reserved. Send comments or questions to editor@designers-guide.org. Consider submitting a paper or model.