• 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 Design
  3. Can I convert ocean to statement?

Stats

  • Locked Locked
  • Replies 4
  • Subscribers 125
  • Views 13403
  • 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

Can I convert ocean to statement?

bobbygang
bobbygang over 14 years ago

Hello,

In recently work I have found some new questions.

The first question perhaps is simple but I can't achieve it. In some case I may assign some variables. Then I want to know the command which can converts the variable to string.

For example I define  an array its first element is variable A

then I want to use string "A" in the code later.

but if I change the first element to B, I also want to get string "B" How can I do this?

Conversely  how to convert string to variable?

The second question, how can I change the plot curve color?

Now default curve color order of my plot is "red" "blue" "magenta " "black" "orange".......

How can I set the color order?

The third question, after an ocean run, is there anyway to store last analysis statement ?

 

 

 

 

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 14 years ago

    I'm afraid I don't understand what you're trying to do here. I suspect you're going about your problem in the wrong way, which may explain why I can't understand your question. Are you trying to conver the variable's value to a string, or the variable's name? Why?

    You can plot with colour using:

    win=newWindow()
    awvPlotWaveform(win list(wave1 wave2) ?color list("y3" "y5"))

    where y3, y5 etc correspond to your "y3" and "y5" layers in the tech file, and hence colours defined by the display.drf.

    The analysis() function with no arguments will return the analyses currently defined. Note that if you run() a second time, it will re-use the last analysis() - unless you've done a simulator() call to reset the "session".

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • bobbygang
    bobbygang over 14 years ago

    Hello Andrew,

    Thank you for your reply.
    The first question means that I sometimes need to convert the variable's name to string for some explaination or title work.

    For second question, how to know the path of tech file? Moreover I do use command color list("y3" "y5") to plot curve. But In my test, from "y0" to "y10" I skip some color such as "blue" and "black". Why?

    The statement I mentioned means the one in ADE. I want to get and name a statement file after an ocean run. It contains not only analysis but also output set and variable set etc.I can load it in ADE.

    Regards,
    Bobby.

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

    If you have the name of a variable stored somewhere, you can then manipulate it. For example:

    A=23
    theVar='A  ; use a quote (normal quote) to prevent evaluation and thus theVar contains the symbol A
    symeval(theVar) => 23
    printf("The variable name is %s\n" theVar)
    set(theVar 56)
    A => 56
    theVarAsString=symbolToString(theVar) => "A"

    To find out colours, look in Tools->Display Resource Manager->Edit . Then look for the y0 to y9 layers (probably need to use "All" to see all layers). This will then (when you select it) show you the colour, and also the name of the "packet" used. You can also find the packet names by dumping the tech file from Tools->Technology File Manager. Once you have the packet name, you can look it up in the display.drf file (this may be in your PDK, or you may have it somewhere else) which defines the mapping of packet name to colour/line style etc. The idea is that the tech file merely says what packet name is used for each layer-purpose-pair, and the display.drf defines the meaning of that packet - so each user could have different colours if they wanted without needing to modify the tech fle.

    I don't really understand your last sentence. Do you mean an ADE "state" (i.e. what you save with Session->Save State)? If so, you cannot produce one of these from OCEAN (and I'm not sure why you would want to) - but this is based on a guess of what you really mean by your last sentence.

    Best Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • bobbygang
    bobbygang over 14 years ago

    Hello Andrew,

    Thank you. Now I know how to define color. But there is still some problems.
    When I input "yn" in code, it gives me the color "yn-1" which defined in drf. For example,I input "y3" it displays "y2" color. Moreover I define "y8" blue in drf. But when I input "y9" it dislay gray.  Why?
    Another problem is how to change default plot curve color and order. I mean if I plot five curves without defining color list.
    It also give me five different color curve, but I don't like it. Can I change the default set?

    I'm afraid you got my purpose. Why I want to do this is because some variables set is more complicate in ADE than in ocean.

    Regards,
    Bobby.

     

    • 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