• 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 14234
  • 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
  • skillUser
    skillUser over 16 years ago

    Hi Zheng,

    This message appears for different reasons, sometimes due to bugs, or perhaps due to SKILL syntax problems in the code.  You can use the SKILL Lint checker to help identify syntax issues. If this does not help, I suggest that you may want to contact Cadence Customer Support for additional help.  Be sure to provide the subversion that you are using since some of these issues have already been fixed.

    Hope this helps!

    Regards,

    Lawrence.

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • 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
  • stevenLiu
    stevenLiu over 16 years ago

    Hi,

    I further tried another ocn file written with cadence analog env and it can be loaded well:

     ocnWaveformTool( 'wavescan )
    simulator( 'spectre )
    design(  "/nfs/users.labnet.st5/mnt/zl3140/simulation/lnaSimple/spectre/schematic/netlist/netlist")
    resultsDir( "/nfs/users.labnet.st5/mnt/zl3140/simulation/lnaSimple/spectre/schematic" )
    modelFile(
        '("/nfs/users.labnet.st5/mnt/zl3140/NEOCELLRUN/NeoCell/models/spectre/rfModels.scs" "")
    )
    analysis('ac ?start "1 "  ?stop "20 "  )
    desVar(   "prf" -10     )
    save( 'v "/net28" )
    temp( 27 )
    run()

    By the way, the sample ocn codes in artist/spectre/*.ocn also bring error messages of "string/symbol" or similar stuff which are not supposed to appear.

     Right now I am comparing the good ocn above and previous error ocn to find some hints.

     

    Steven.L

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • skillUser
    skillUser over 16 years ago

    Hi Steven,

     One suggestion I can make is to insert debug messages at various locations, something like the following:

    fprintf(stderr "DEBUG1: before foreach\n") ;;debug

    foreach( sweepVariable resistorList
        fprintf(stderr "DEBUG2: before parametric analysis\n") ;;debug

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

        fprintf(stderr "DEBUG3: before S parameter analysis setup\n") ;;debug

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


    This way you can get useful information as to where the problem is arising; once the offending code has been isolated, it will be easier to track down and debug the cause.  By putting DEBUG in the print output and "debug" in the comment you have two chances to find these statements later when they need to be removed.

    I hope that this helps you to find and solve the problem.

    Regards,

    Lawrence.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • skillUser
    skillUser over 16 years ago

     Zheng,

    By the way, this question may get better responses if posted to a more appropriate forum, i.e the Custom IC Design forum or even the Custom IC SKILL Forum

    Regards,

    Lawrence.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

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