• 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. How is the order of ports/terminals in portOrder/termOrder...

Stats

  • Locked Locked
  • Replies 7
  • Subscribers 143
  • Views 8856
  • 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

How is the order of ports/terminals in portOrder/termOrder defined?

Sheppie
Sheppie over 5 years ago

Hi,

I'm working on a bit of code to have a simple button to update the termOrder in CDF in a schematic editor. While working on this, I noticed something I would like to get explained. Hopefully someone can help me out.

It is the following:

I have created a test-cell with the following pins (in the order I created them): "a" "b" "busi<3:0>" "buso<7:0>" "z" "vdd" "vss"
inputs: "a" "b" "busi<3:0>"
inputs/outputs: "vdd" "vss"
outputs:"buso<7:0>" "z"
When I take a look at the schematic cell-view:
cv~>terminals~>name
The output is:
("busi<3:0>" "buso<7:0>" "vdd" "vss" "b"
    "a" "z"
)
When I look at the port order of the symbol cell-view (whicih is identical to the termOrder of simulators in the CDF):
cv~>portOrder
("buso<7:0>" "z" "vdd" "vss" "a"
    "b" "busi<3:0>"
)
As you can see, none of the orders match: creation order <not equal to> terminal order <not egual to> symbol port order
The order isn't alphabetical either (the "z" pin/terminal/port is (very) roughly in the middle).

Can someone explain to me what is happening here? What magic sauce Virtuoso is putting on top of the pins I create in order to have different orders everywhere?

What I think is part of the answer:
The portOrder can be split in sections: first the outputs, then the inputs/outputs and lastly the inputs. Each section is in alphabetic order.

Bonus question:

Would it hurt to use the cv~>terminals~>name order as the termOrder in the cell CDF?

Thank you in advance.

With kind regards,

Sjoerd

  • Cancel
Parents
  • skillUser
    skillUser over 5 years ago

    Hi Sjoerd,

    The order that is returned by cv~>terminals is not defined, essentially it would be random, so I wouldn't recommend using it for setting the termOrder, and this also explains why cv~>terminals~>name is not useful as an order but it is useful to obtain the values.  As you have noted the portOrder is the outputs, inputOutputs then inputs, each sorted alphabetically. I believe the terminal order that is used if termOrder is not defined is the same as the portOrder method. I would recommend setting termOrder in a consistent way, maybe the same as portOrder - for a given (analog) simulator, the termOrder for that simulator (in the simInfo section of the CDF) is used, so it is very important.

    Hopefully this helps a little?

    Best regards,

    Lawrence.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Sheppie
    Sheppie over 5 years ago in reply to skillUser

    Hi Lawrence,

    Thank you for your detailed answer.

    Since we're using Verilog as well, I understood from some of the documentation I've read that the portOrder cv property is important. Is there a special procedure to add the portOrder, or is simply a matter of:

    cv->portOrder = list( ... )

    Thanks in advance.

    With kind regards,

    Sjoerd

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Sheppie
    Sheppie over 5 years ago in reply to skillUser

    Hi Lawrence,

    Thank you for your detailed answer.

    Since we're using Verilog as well, I understood from some of the documentation I've read that the portOrder cv property is important. Is there a special procedure to add the portOrder, or is simply a matter of:

    cv->portOrder = list( ... )

    Thanks in advance.

    With kind regards,

    Sjoerd

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
  • Andrew Beckett
    Andrew Beckett over 5 years ago in reply to Sheppie

    Hi Sjoerd,

    Some thoughts on all of this.

    The portOrder property is really not very important. It only affects the Verilog netlister and doesn't impact any ADE netlisters which are CDF based (see later). Even with the Verilog netlister, it only really matters if you're using implicit netlisting (i.e. not connect by name, but connect by order) and even then it only truly matters at a stopping view. I've got a CCR asking that we should stop doing all the portOrder checks and at least have an option to turn them off (it's not been implemented yet though). The ADE netlisters use the CDF termOrder in the simInfo for the specific netlister.

    If the component is a leaf level then they must exist (actually I don't think that's true for portOrder if explicit netlisting is chosen). For order-based netlisters such as spectre, auCdl etc, then termOrder must exist at the leaf (stopping view) level because it has no idea what the order should be. Certainly for ADE netlisters, if the termOrder is missing or incorrect (i.e. references pins that no longer exist), then it reverts to a default order (alphanumerical – might be outputs, then inouts, then inputs – can't remember). Similarly the Verilog netlister also has a default order if portOrder isn't there (and the order doesn't matter if using explicit netlisting, which is always wise to use).

    My suggestion would be to set this:

    envSetVal("auCore.misc" "updateCDFtermOrder" 'boolean t)
    ; maybe below if you don't want to be asked to update the order
    envSetVal("auCore.misc" "queryCDFtermOrder" 'boolean nil)

    These update the termOrder in the CDF if the pins on the symbol are changed (it's done when you save the symbol). This tends to keep the termOrder updated and stops you getting so many warnings during netlisting. In practice these warnings should not matter because if there's any inconsistency in the termOrder then it will revert to a default order. For portOrder I typically just stop worrying about trying to get them consistent because it really doesn't matter any more (essentially if the portOrder is different between the symbol and the switch view, provided it consistently uses one or the other, all is OK; if it uses a different value for the instance and the definition of the module, that's a bug in the netlister).

    So to summarize, I think people end up worrying far too much about termOrder/portOrder for hierarchical blocks – not helped by the popups when there's a portOrder discrepancy! Hopefully the above settings (plus Lawrence's input) will avoid you having to write too much code...

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Sheppie
    Sheppie over 5 years ago in reply to Andrew Beckett

    Hi Andrew,

    As always, a very detailed and well written response. Thank you for your time and effort.

    I'll make sure that in our global cdsinit file (we split the setup in global/site/process/project init files) the variables are set (the two you mention).

    We're relying on Verilog netlists for top-level verification, and a colleague ran into problems because the termOrder/portOrder was inconsistent. After he fixed that inconsistency, the simulation ran without any problems. Therefor, I'll be writing a little bit of code to create a menu item which, once selected, fixes all termOrder/portOrder entries. Just to make it as low-effort as possible for my colleagues.

    With kind regards,

    Sjoerd

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 5 years ago in reply to Sheppie

    Hi Sjoerd,

    If you still have the data and can reproduce the problem, it would be great if you can contact customer support so that we can try to fix the root cause rather than relying on  you having to uncover such issues and fix them manually.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Sheppie
    Sheppie over 5 years ago in reply to Andrew Beckett

    Hi Andrew,

    I'll get in contact with the colleague who ran into problems. Hopefully he can easily reproduce it.

    The verilog netlister, at what view does it look for portOrder information? Does it look at the stop-view (VerilogA) or at the schematic view?

    With kind regards,

    Sjoerd

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 5 years ago in reply to Sheppie

    Hi Sjoerd,

    I believe (without testing it, as I'm on vacation at the moment) that it would use the stopping view (which wouldn't be verilogA, since that's not a view anything to do with the Verilog netlister; note that VerilogA views wouldn't normally be stopping views in spectre either because they might contain hierarchy in the textual view). It wouldn't be the schematic anyway - it would be either the placed master (typically the symbol) or the stopping view, but I would expect it to be the stopping view.

    Andrew

    • 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