• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. RF Design
  3. Reading parmetric sweep data through ocean

Stats

  • Locked Locked
  • Replies 12
  • Subscribers 63
  • Views 20223
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Reading parmetric sweep data through ocean

lahsivece
lahsivece over 12 years ago

Hi All,

I have a set of parmetric sweep results generated through spectre simulation . These file names are of the format 

"sweep_variablename_-<iteration numbers>_sweep_another_variable_name-<iteration_number>_....tran.tran"

I am trying to read the file through Ocean and perform some analysis on data generated. My ocean script looks like following:

sprintf(rdir "<path_to_spectre_simulation_directory>/spectre/schematic")
openResults(strcat(rdir,"/psf")) 

; The above sets the results directory to the psf folder. All parametric sweep results are dumped there.

 

selectResult('tran)
clip_v1p=clip(v("/V1P" ?result "sweepb2_1-000_sweepb1_1-000_sweepb0_1-001_tran-tran") 010e-09 28e-09)

On executing the script  i get following error message

The output '/V1P' you selected does not exist.  Type
          outputs() to see the list of available outputs or type
          help('v) for more information on the 'v' command.


However when I execute outputs() I get the netname in the list.

What am I doing wrong ?

I can read single spectre simulation data through ocean but Can I read parametric sweep spectre simulation data through ocean ?

Please advise.

Thanks & regards

Vishal

  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 12 years ago

    OK, I have a very simple example with a similar sweep to you:


    include "models.scs" section=nn

    parameters b2=0.0 b1=0.0 b0=0.0

    // silly circuit just to do something
    M1 (d g 0 0) nch w=1u l=0.5u
    vd (d 0) vsource type=dc dc=b1
    vg (g 0) vsource type=sine freq=1M ampl=b2

    sweepb2_1 sweep param=b2 values=[0.0 1.2] {
      sweepb1_1 sweep param=b1 values=[0.0 1.2] {
        sweepb0_1 sweep param=b0 values=[0.0 1.2] {
        tran_1 tran stop=1u
        }
      }
    }

    When I run spectre, and then look in the resulting raw directory, I have:

     > ls testsweep.raw                                                                     
    logFile                                                                                          
    sweepb2_1-000_sweepb1_1-000_sweepb0_1-000_tran_1.tran                                            
    sweepb2_1-000_sweepb1_1-000_sweepb0_1-001_tran_1.tran                                            
    sweepb2_1-000_sweepb1_1-000_sweepb0_1_tran_1.sweep                                               
    sweepb2_1-000_sweepb1_1-001_sweepb0_1-000_tran_1.tran                                            
    sweepb2_1-000_sweepb1_1-001_sweepb0_1-001_tran_1.tran                                            
    sweepb2_1-000_sweepb1_1-001_sweepb0_1_tran_1.sweep                                               
    sweepb2_1-000_sweepb1_1_tran_1.sweep                                                             
    sweepb2_1-001_sweepb1_1-000_sweepb0_1-000_tran_1.tran                                            
    sweepb2_1-001_sweepb1_1-000_sweepb0_1-001_tran_1.tran                                            
    sweepb2_1-001_sweepb1_1-000_sweepb0_1_tran_1.sweep                                               
    sweepb2_1-001_sweepb1_1-001_sweepb0_1-000_tran_1.tran                                            
    sweepb2_1-001_sweepb1_1-001_sweepb0_1-001_tran_1.tran                                            
    sweepb2_1-001_sweepb1_1-001_sweepb0_1_tran_1.sweep                                               
    sweepb2_1-001_sweepb1_1_tran_1.sweep                                                             
    sweepb2_1_tran_1.sweep    

    Now, you shouldn't worry too much about the file names, because these get organized in the logFile to  provide the structure of the family data because of the nested sweeps.

    In OCEAN, if I do:

    openResults("testsweep.raw")
    results()

    Then results will return that there is a result called tran - this is the "aliased" name for the result because you have a single transient analysis - it makes it easier because you don't have to worry about the particulars of the result naming. Alternatively, if I do:

    results(?noAlias t)

    you see it returns  ("sweepb2_1_tran_1-sweep") - which is the name of the outer sweep. It's the same thing, and either name will do.

    So if I then call:

        selectResult('tran)
    or selectResult("tran")
    or selectResult("sweepb2_1_tran_1-sweep")

    then I'll access the results, and can type outputs() to see what is there.

    ocean> outputs()
    ("d" "g" "vd:p" "vg:p")

    Then if I do: plot(v("d")) I willl plot the drain voltage over all the sweeps.

    I can also do:

    ocean> sweepNames()
    ("b2" "b1" "b0" "time")
    ocean> sweepValues()
    (0.0 1.2)

    The sweepNames tells me all the sweep names, and sweepValues tells me the values of the outer sweeps. If I then do:

      d=v("d")
      plot(value(d 0.2u))

    it would plot the values across the sweep at the value of the inner sweep (0.2u on the time axis). Or I can do:

      value(value(value(value(d 0.2u) 1.2) 0.0) 1.2)

    which will successively remove an inner sweep and give me a particular combination. Or I can do:

      plot(value(d 'b1 1.2))

    which will give me the family curves (i.e. still time on x-axis, and with b2 and b0 around them, but for a specific value of b1).

    Note that rather than using selectResult(), I could have just done:

      v("d" ?result 'tran)

    or

      v("d" ?result  "sweepb2_1_tran_1-sweep")

    All the selectResult does is give me a convenient default.

    Regards,

    Andrew.

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 12 years ago

    OK, I have a very simple example with a similar sweep to you:


    include "models.scs" section=nn

    parameters b2=0.0 b1=0.0 b0=0.0

    // silly circuit just to do something
    M1 (d g 0 0) nch w=1u l=0.5u
    vd (d 0) vsource type=dc dc=b1
    vg (g 0) vsource type=sine freq=1M ampl=b2

    sweepb2_1 sweep param=b2 values=[0.0 1.2] {
      sweepb1_1 sweep param=b1 values=[0.0 1.2] {
        sweepb0_1 sweep param=b0 values=[0.0 1.2] {
        tran_1 tran stop=1u
        }
      }
    }

    When I run spectre, and then look in the resulting raw directory, I have:

     > ls testsweep.raw                                                                     
    logFile                                                                                          
    sweepb2_1-000_sweepb1_1-000_sweepb0_1-000_tran_1.tran                                            
    sweepb2_1-000_sweepb1_1-000_sweepb0_1-001_tran_1.tran                                            
    sweepb2_1-000_sweepb1_1-000_sweepb0_1_tran_1.sweep                                               
    sweepb2_1-000_sweepb1_1-001_sweepb0_1-000_tran_1.tran                                            
    sweepb2_1-000_sweepb1_1-001_sweepb0_1-001_tran_1.tran                                            
    sweepb2_1-000_sweepb1_1-001_sweepb0_1_tran_1.sweep                                               
    sweepb2_1-000_sweepb1_1_tran_1.sweep                                                             
    sweepb2_1-001_sweepb1_1-000_sweepb0_1-000_tran_1.tran                                            
    sweepb2_1-001_sweepb1_1-000_sweepb0_1-001_tran_1.tran                                            
    sweepb2_1-001_sweepb1_1-000_sweepb0_1_tran_1.sweep                                               
    sweepb2_1-001_sweepb1_1-001_sweepb0_1-000_tran_1.tran                                            
    sweepb2_1-001_sweepb1_1-001_sweepb0_1-001_tran_1.tran                                            
    sweepb2_1-001_sweepb1_1-001_sweepb0_1_tran_1.sweep                                               
    sweepb2_1-001_sweepb1_1_tran_1.sweep                                                             
    sweepb2_1_tran_1.sweep    

    Now, you shouldn't worry too much about the file names, because these get organized in the logFile to  provide the structure of the family data because of the nested sweeps.

    In OCEAN, if I do:

    openResults("testsweep.raw")
    results()

    Then results will return that there is a result called tran - this is the "aliased" name for the result because you have a single transient analysis - it makes it easier because you don't have to worry about the particulars of the result naming. Alternatively, if I do:

    results(?noAlias t)

    you see it returns  ("sweepb2_1_tran_1-sweep") - which is the name of the outer sweep. It's the same thing, and either name will do.

    So if I then call:

        selectResult('tran)
    or selectResult("tran")
    or selectResult("sweepb2_1_tran_1-sweep")

    then I'll access the results, and can type outputs() to see what is there.

    ocean> outputs()
    ("d" "g" "vd:p" "vg:p")

    Then if I do: plot(v("d")) I willl plot the drain voltage over all the sweeps.

    I can also do:

    ocean> sweepNames()
    ("b2" "b1" "b0" "time")
    ocean> sweepValues()
    (0.0 1.2)

    The sweepNames tells me all the sweep names, and sweepValues tells me the values of the outer sweeps. If I then do:

      d=v("d")
      plot(value(d 0.2u))

    it would plot the values across the sweep at the value of the inner sweep (0.2u on the time axis). Or I can do:

      value(value(value(value(d 0.2u) 1.2) 0.0) 1.2)

    which will successively remove an inner sweep and give me a particular combination. Or I can do:

      plot(value(d 'b1 1.2))

    which will give me the family curves (i.e. still time on x-axis, and with b2 and b0 around them, but for a specific value of b1).

    Note that rather than using selectResult(), I could have just done:

      v("d" ?result 'tran)

    or

      v("d" ?result  "sweepb2_1_tran_1-sweep")

    All the selectResult does is give me a convenient default.

    Regards,

    Andrew.

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information