• 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. Custom IC SKILL
  3. Question on OCEAN standalone evaluation

Stats

  • Locked Locked
  • Replies 15
  • Subscribers 145
  • Views 20706
  • 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

Question on OCEAN standalone evaluation

trdastidar
trdastidar over 13 years ago

Hi,

Got a question on OCEAN scripts (same applies to artil as well)

I have an ADE L state, from which I save the OCEAN script, and then run it. It runs fine.

Suppose, there is a calculator function in this OCEAN script, which looks like this:

gain_1 = value(dB20(mag(v("/outp" ?result "ac-ac"))) 1)

plot( gain_1 ?expr '( "gain_1" ) )

Now, suppose I want to run the calculator function again (with possibly some modifications). Since the simulation is already run, I remove the entire top part of the OCEAN script, and replace it with a call to openResults, like below:

openResults( "results.psf" ) ; Replace "results.psf" with the actual path of the PSF directory

I run the OCEAN script, but it fails, with the following error:

> WARNING (OCN-6054): The output '/outp' you selected does not exist. Type outputs() to see the list

Now comes the funny part. I change the calculator expression to the following:

gain_1 = value(dB20(mag(v("outp" ?result "ac-ac"))) 1)

That is, I removed the "/" character in the signal name. The script now runs fine!

Could anyone tell me why this happens? I know the workaround for it, but would like to understand why that workaround is necessary at all.

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 13 years ago

    When you refer to a signal name in one of the access functions (e.g. v(), i(), etc), then if the name starts with a "/" it is a name using the schematic namespace. If it doesn't begin with a slash, it is in the netlist namespace. In the schematic namespace, the names have / as the hierarchy delimiter, and will ultimately need to be mapped to whatever name was actually used in the netlist and then saved into the result database. In order to do this mapping, the ADE netlisters save some additional information in the map and amap directories in the netlist directory. This information is then consulted to do the same mapping when somebody wants to access a result signal using the output database. However, for that to work, the results access has to know where the map directories are. This can be done if the simulation is run from OCEAN or ADE, by virtue of a line in the runObjFile which tells it where the "netlistDir" is. In the absence of this, I think it assumes it is in ../netlist. However, if this mapping data is missing, it cannot do the mapping and hence cannot see signals using the source database namespace.

    If you omit the slash, it's always using the netlist name and so that will work regardless of whether the mapping directories are present. However, you do need to then know how any name was mapped - this mapping can happen due to illegal characters, spectre keywords and so on that have been used.

    In your specific example, outp on the schematic ended up as outp in the netlist, so it was relatively straightforward to resolve.

    Regards,

    Andrew. 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • trdastidar
    trdastidar over 13 years ago

    Hi Andrew,

    Thanks for the reply.

    My next questions then would be:

    - Which is the "mapping directory"? I see two directories in the spectre/spectre/schematic/netlist directories - "map" and "amap". Which is the relevant one?

    - What is the OCEAN command for specifying the location of the mapping directory?

    Thanks in advance

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 13 years ago

    As far as I know, it's the amap dir that's needed (this is consistent with experiments I tried). There's no public API to create the runObjFile (which would then allow arbitrary location of the netlist directory), but provided there is a netlist directory at the same level as the psf directory, and the netlist dir contains the amap, the mapping works fine even without the presence of the runObjFile (i.e. if the simulation has been run standalone outside of OCEAN) (the output below has been trimmed a bit):

    unix_45> ls -R schematic
    schematic:
    netlist/  results.psf/

    schematic/netlist:
    amap/        

    schematic/netlist/amap:
    __multiplefiles_amap_format__  analogLib_npn_spectre.inst
    __new_amap_format__            analogLib_pmos4_spectre.inst
    __nmp_amap_format__            analogLib_pnp_spectre.inst
    __simulator_information__      analogLib_res_spectre.inst
    ampTest.inst                   analogLib_vdc_spectre.inst
    ampTest.net                    analogLib_vsin_spectre.inst
    ampTest.port                   supply.inst
    amplifier.inst                 supply.net
    amplifier.net                  top_level_map.inst
    analogLib_cap_spectre.inst     top_level_map.net
    analogLib_idc_spectre.inst     top_level_map.port
    analogLib_nmos4_spectre.inst

    schematic/results.psf:
    ac.ac                 logFile                     tran.tran
    dcOp.dc               modelParameter.info         tran.tran.0.sig.tmp
    dcOp.sens.dc          outputParameter.info        tran.tran.dat
    dcOpInfo.info         primitives.info.primitives  tran.tran.sig
    designParamVals.info  sens.output                 tran.tran.sig.tmp@
    element.info          spectre.out
    finalTimeOP.info      subckts.info.subckts

    Then I can do:

    ocean> openResults("schematic/results.psf")
    "schematic/results.psf"
    ocean> selectResult('tran)
    stdobj@0x14d09048
    ocean> outputs()
    ("/net9" "/net12" "/out" "/V2/PLUS" "/vdd!"
        "/vin" "/vss!" "/I3/V0/PLUS" "/I3/V2/PLUS" "/I7/gnode"
        "/I7/net7" "/I7/net18" "/I7/net29" "/I7/net39"
    )

    If it can't find the mapping info, outputs() will names in the netlist namespace.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • trdastidar
    trdastidar over 13 years ago

     I could get it to work partially, but not fully. If I place the amap directory in the right place (under schematic/netlist), I can see that the output names are in the schematic space. However, the expressions still do not evaluate correctly. Is there any other command that needs to be issued before the expressions?

    ls schematic/
    AC1.psf/  netlist/

    cd schematic/

     artil

    > openResults( "test_simulation/schematic/AC1.psf" )
    > selectResult('ac)
    stdobj@0x145c3110
    > outputs()
    ("/AOP" "/AOPIN" "/INM" "/INP" "/net017"
        "/net028" "/OUTM" "/OUTP" "/V3/PLUS" "/V_IMON1/PLUS" ...
    > gain_1k = dB20(value((VF("/OUTP") - VF("/OUTM")) 1000))
    *Error* difference: can't handle (nil - nil)
     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • trdastidar
    trdastidar over 13 years ago

    Oh, I think I figured it out.

     The psf directory name has to be "psf". It can't be anything else. In that case, things work fine.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 13 years ago

    Does it work if you use v("/OUTP") etc instead of VF()? If you've not done selectResult('ac) first you'd need to do v("/OUTP" ?result 'ac) .

    The VF, VT functions etc were historically for ADE rather than OCEAN and certainly in IC5141 are quite dependent upon the simulation having run in ADE. We've improved that in later releases (I didn't check this specific issue) but thought I'd suggest you try v()

    Regards,

    Andrew

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 13 years ago

    I checked, and this is only the case if you use the VF(), VT() type ADE functions (even in IC615). If you use the v() OCEAN function it works fine if the results directory is not called "psf".

    Regards,

    Andrew

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • tito80
    tito80 over 11 years ago

    Hi Andrew,

    Unfortunately, I am facing the same problem.

    WARNING (OCN-6054): The output '/a/b/c<node1>' you selected does not exist. Type outputs() to see the list...., etc. etc.

    Things I did: 

    1) I did check outputs() to make sure the name was correct

    2) I checked runObjFile file and it does show: "netlistDir" "../netlist"

    3) I plotted the signal fine and sent it to calculator to check the name -- it's still showing '/a/b/c<node1>'

    However, taking some pointers from your post, I changed "/a/b/bus<n1>" to "a.b.bus<n1>" and that worked instead. But may be for this example it worked Ok b'cos of similar names. But technically, they are not the same ----

    "/a/b/bus<n1>" -- bus is a net under subckt definition of instance b) while

    "a.b.bus<n1>"  --- bus is a node of instance b, and it may or may not be connected to the net 'bus' as per b's subckt definition).

    So I am worried I cannot generalize this solution. Looking forward to your help.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 11 years ago

    I'm not sure why you don't think they are the same thing.

    A name with "/" at the beginning is the hierarchical name as it appears in the schematic. A name with "." as hierarchy delimiters (without a leading slash) is using netlist names - so it will be bus<n1> inside subckt instance b inside subckt instance a. That sounds the same to me.

    Without seeing the details, it's hard to be certain why this didn't work - probably we'd need to see your data and understand the versions of the tools you're using - and for this, you may be better off going to customer support.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • tito80
    tito80 over 11 years ago

    I don;t have much clue what's going on here. In save outputs, if I give "allpub" its saving everything and I am plotting fine -- not sure in what format it is accepting the net names internally. However, if I select something selectively from schematic, netlist it, I see this in netlist:

    save I0.rxcpdqrx.ctlep\<5\> ....

    And spectre (while running) gives me a warning:

    WARNING (SPECTRE-8281): `I0.rxcpdqrx.ctlep<5>' is not a node nor an instance name.

    And if I change the netlist to this

    save /I0/rxcpdqrx/ctlep\<5\> ....

    Spectre crashes:

     ERROR (SFE-874): "input.mod.scs" 8028: Unexpected operator "/". Expected end of file or end of line

    It seems like the hierarchical delimiter is "." for psf data but not for nelist. There is a clear disconnect. Things run fine for signal nets but croak for bus nets (probably because of "<" ">" special characters). By the way, initially, I had already tried special charcters in v("/a/b/c\<node1\>), but it gave me warnings:

    PARSER WARNING at line 192 column 35 of file *ciwInPort*

    *WARNING* (Parser): character found after backslash is not meaningful - /I0/rxcpdqrx/ctlep\<5\> 

     

    • 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