• 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. Functional Verification
  3. OCEAN script Problem

Stats

  • Locked Locked
  • Replies 5
  • Subscribers 67
  • Views 14240
  • 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

OCEAN script Problem

stevenLiu
stevenLiu over 16 years ago

Hi all,

 When I was using "load" command to run OCEAN script for simulating an LNA netlist, the following error came out:

 *Error* ilGetString: arg must be symbol or string - nil

 I am a starter and hope any one give a help.

 

Zheng

 

  • Cancel
Parents
  • stevenLiu
    stevenLiu over 16 years ago

    Hi,

    Really cool thanks. The code used to be loaded well in another server and it is a simulation script for an LNA circuit. Right now I just paste the code and hopefully you are interested.

    I provide the problematic sample.ocn code in two parts: Run-through part and error-warning part.

     The code can be successfully loaded the first half:

    simulator( 'spectre )
    design(  "./netlist")
    resultsDir( "./schematic" )
    modelFile(  "./mitllfdsoi0p18um/MP6_2p2/models/spectre/nom/mitllfdsoi0p18um.scs")
    desVar(   "cw3" 10f )
    desVar(   "cw1" 10f )
    desVar(   "rw3" 1 )
    desVar(   "rw1" 1 )
    desVar(   "rls" 2 )
    desVar(   "rlg" 7 )
    desVar(   "rld" 6 )
    desVar(   "rg" 0.5 )
    desVar(   "Ls" .65n )
    desVar(   "Lg" 2n )
    desVar(   "Ld" 2.3n )
    desVar(   "cds" 28.8f )
    desVar(   "Cd" 160f )
    desVar(   "Co" 120f )
    desVar(   "cw4" "cw3" )
    desVar(   "cw2" "cw1" )
    desVar(   "rw4" "rw3" )
    desVar(   "rw2" "rw1" )
    Cnominal = desVar( "Cnominal" 0 )
    Rnominal = desVar( "Rnominal" 0 )
    R14 = desVar( "R14"  0)
          desVar( "C14" Cnominal )
    R18 = desVar( "R18"  0)
          desVar( "C18" Cnominal )
    R15 = desVar( "R15"  0)
          desVar( "C15" Cnominal )
    R19 = desVar( "R19"  0)
          desVar( "C19" Cnominal )
    R24 = desVar( "R24"  0)
          desVar( "C24" Cnominal )
    R23 = desVar( "R23"  0)
          desVar( "C23" Cnominal )
    R25 = desVar( "R25"  0)
          desVar( "C25" Cnominal )
    R26 = desVar( "R26"  0)
          desVar( "C26" Cnominal )
    desVar(   "frf" 5.6G )
    desVar(   "df" 10M )
    desVar(   "frf2" "frf+df" )
    desVar(   "prf" -30 )
    temp( 27 )
    ResDir = "./sample"
    resultsDir(ResDir)
    sprintf( resultsFile "%s.txt" ResDir )
    of = outfile(resultsFile)
    startPoint = 2
    stopPoint = 2
    totalPoints = 1
    resistorList = list("rls")

    But when the second half below is loaded, the error came out". The second half is:

    foreach( sweepVariable resistorList

             paramAnalysis(sweepVariable ?start startPoint ?stop stopPoint ?lin totalPoints)

         ;S-Parameter analysis
             analysis('sp ?ports list("/PORT1" "/PORT2")  ?start "400M"  ?stop "8G" 
            ?lin "601"  ?donoise "yes"  ?oprobe "/PORT2"  ?iprobe "/PORT1"  )

    ;1dB compression point and IIP3
    ;
    ;Periodic Steady State
             analysis('pss ?fund "frf"  ?harms "20"  ?errpreset "moderate" 
             ?param "prf"  ?start "-30"  ?stop "10"  ?lin "20"  )
             analysis('pac ?sweeptype "absolute"  ?start "frf2"  ?stop ""  ?maxsideband "2"  )

     

             paramRun()


             openResults(ResDir)
    ;selectResults('sp)

    ;;;;;5.6GHz
             freq = 5.6e+09

    ;Input Port Reflection (S11)
    ;measured @ 5.6G (lower s11 is better)
             s11 = value(dB20(aaSP(1 1)) freq)
    ;         s12 = value(dB20(aaSP(1 2)) freq)
    ;         s21 = value(dB20(aaSP(2 1)) freq)
             s22 = value(dB20(aaSP(2 2)) freq)
    ;minimum input reflection in frequency range simulated
    ;minreflection = ymin(dB20(aaSP(1 1)))
    ;other S-parameters

    ;Noise Figure
             noiseFigure = value(dB10(NF()) freq)
    ;noiseFigureMin = value(dB10(NFmin()) freq)

    ;Gain
    ;         transducerPowerGain = value(dB10(GT()) freq)
    ;         operatingPowerGain = value(dB10(GP()) freq)
             availablePowerGain = value(dB10(GA()) freq)
            
    ;selectResults('sweeppss_fd-sweep)
    ;         onedBcompPt = compressionVRI((v("/net016" ?result "pss_fd") - 0.0) '1 ?rport resultParam("PORT2:r" ?result "pss_fd") ?gcomp 1)
    ;selectResults('sweeppss_pac-sweeep)
             iip3 = ipnVRI((v("/net016" ?result "pac") - 0.0) '-2 '0 ?rport resultParam("PORT2:r" ?result "pac"))

    ;;;;;header
    ;         fprintf(of
    ;          "%s\ts11\ts12\ts21\ts22\
    ;\tnoiseFigure\ttransducerPowerGain\toperatingPowerGain\tavailablePowerGain\tonedBcompPt\tiip3\n" sweepVariable)
             fprintf(of "%s\ts11\ts22\tnoiseFigure\tavailablePowerGain\tiip3\n" sweepVariable)
    ;         ocnPrint( s11 s12 s21 s22 noiseFigure transducerPowerGain operatingPowerGain availablePowerGain onedBcompPt iip3 ?output of)
             ocnPrint( s11 s22 noiseFigure availablePowerGain iip3 ?output of)
            
             ) ; foreach(sweepVariable resistorList

    drain(of)
    close(of)

     

    Thanks a lot before hand and after.

    Steven.L

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • stevenLiu
    stevenLiu over 16 years ago

    Hi,

    Really cool thanks. The code used to be loaded well in another server and it is a simulation script for an LNA circuit. Right now I just paste the code and hopefully you are interested.

    I provide the problematic sample.ocn code in two parts: Run-through part and error-warning part.

     The code can be successfully loaded the first half:

    simulator( 'spectre )
    design(  "./netlist")
    resultsDir( "./schematic" )
    modelFile(  "./mitllfdsoi0p18um/MP6_2p2/models/spectre/nom/mitllfdsoi0p18um.scs")
    desVar(   "cw3" 10f )
    desVar(   "cw1" 10f )
    desVar(   "rw3" 1 )
    desVar(   "rw1" 1 )
    desVar(   "rls" 2 )
    desVar(   "rlg" 7 )
    desVar(   "rld" 6 )
    desVar(   "rg" 0.5 )
    desVar(   "Ls" .65n )
    desVar(   "Lg" 2n )
    desVar(   "Ld" 2.3n )
    desVar(   "cds" 28.8f )
    desVar(   "Cd" 160f )
    desVar(   "Co" 120f )
    desVar(   "cw4" "cw3" )
    desVar(   "cw2" "cw1" )
    desVar(   "rw4" "rw3" )
    desVar(   "rw2" "rw1" )
    Cnominal = desVar( "Cnominal" 0 )
    Rnominal = desVar( "Rnominal" 0 )
    R14 = desVar( "R14"  0)
          desVar( "C14" Cnominal )
    R18 = desVar( "R18"  0)
          desVar( "C18" Cnominal )
    R15 = desVar( "R15"  0)
          desVar( "C15" Cnominal )
    R19 = desVar( "R19"  0)
          desVar( "C19" Cnominal )
    R24 = desVar( "R24"  0)
          desVar( "C24" Cnominal )
    R23 = desVar( "R23"  0)
          desVar( "C23" Cnominal )
    R25 = desVar( "R25"  0)
          desVar( "C25" Cnominal )
    R26 = desVar( "R26"  0)
          desVar( "C26" Cnominal )
    desVar(   "frf" 5.6G )
    desVar(   "df" 10M )
    desVar(   "frf2" "frf+df" )
    desVar(   "prf" -30 )
    temp( 27 )
    ResDir = "./sample"
    resultsDir(ResDir)
    sprintf( resultsFile "%s.txt" ResDir )
    of = outfile(resultsFile)
    startPoint = 2
    stopPoint = 2
    totalPoints = 1
    resistorList = list("rls")

    But when the second half below is loaded, the error came out". The second half is:

    foreach( sweepVariable resistorList

             paramAnalysis(sweepVariable ?start startPoint ?stop stopPoint ?lin totalPoints)

         ;S-Parameter analysis
             analysis('sp ?ports list("/PORT1" "/PORT2")  ?start "400M"  ?stop "8G" 
            ?lin "601"  ?donoise "yes"  ?oprobe "/PORT2"  ?iprobe "/PORT1"  )

    ;1dB compression point and IIP3
    ;
    ;Periodic Steady State
             analysis('pss ?fund "frf"  ?harms "20"  ?errpreset "moderate" 
             ?param "prf"  ?start "-30"  ?stop "10"  ?lin "20"  )
             analysis('pac ?sweeptype "absolute"  ?start "frf2"  ?stop ""  ?maxsideband "2"  )

     

             paramRun()


             openResults(ResDir)
    ;selectResults('sp)

    ;;;;;5.6GHz
             freq = 5.6e+09

    ;Input Port Reflection (S11)
    ;measured @ 5.6G (lower s11 is better)
             s11 = value(dB20(aaSP(1 1)) freq)
    ;         s12 = value(dB20(aaSP(1 2)) freq)
    ;         s21 = value(dB20(aaSP(2 1)) freq)
             s22 = value(dB20(aaSP(2 2)) freq)
    ;minimum input reflection in frequency range simulated
    ;minreflection = ymin(dB20(aaSP(1 1)))
    ;other S-parameters

    ;Noise Figure
             noiseFigure = value(dB10(NF()) freq)
    ;noiseFigureMin = value(dB10(NFmin()) freq)

    ;Gain
    ;         transducerPowerGain = value(dB10(GT()) freq)
    ;         operatingPowerGain = value(dB10(GP()) freq)
             availablePowerGain = value(dB10(GA()) freq)
            
    ;selectResults('sweeppss_fd-sweep)
    ;         onedBcompPt = compressionVRI((v("/net016" ?result "pss_fd") - 0.0) '1 ?rport resultParam("PORT2:r" ?result "pss_fd") ?gcomp 1)
    ;selectResults('sweeppss_pac-sweeep)
             iip3 = ipnVRI((v("/net016" ?result "pac") - 0.0) '-2 '0 ?rport resultParam("PORT2:r" ?result "pac"))

    ;;;;;header
    ;         fprintf(of
    ;          "%s\ts11\ts12\ts21\ts22\
    ;\tnoiseFigure\ttransducerPowerGain\toperatingPowerGain\tavailablePowerGain\tonedBcompPt\tiip3\n" sweepVariable)
             fprintf(of "%s\ts11\ts22\tnoiseFigure\tavailablePowerGain\tiip3\n" sweepVariable)
    ;         ocnPrint( s11 s12 s21 s22 noiseFigure transducerPowerGain operatingPowerGain availablePowerGain onedBcompPt iip3 ?output of)
             ocnPrint( s11 s22 noiseFigure availablePowerGain iip3 ?output of)
            
             ) ; foreach(sweepVariable resistorList

    drain(of)
    close(of)

     

    Thanks a lot before hand and after.

    Steven.L

    • 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