• 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. nlSetPcellName for a resistor

Stats

  • Locked Locked
  • Replies 3
  • Subscribers 125
  • Views 13597
  • 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

nlSetPcellName for a resistor

chqian
chqian over 6 years ago

Hi Andrew:

I had lines below in a libInitCustomExit.il file

;; Adds a random number and time-stamp to the end of the mdoule name of subcircuits.
pcellNameTable = makeTable("PcellNameTable" nil)
procedure( nlSetPcellName( cv paramNames paramValues )
  let( ( tmpStr )
  if( pcellNameTable[cv]
    then
       sprintf(tmpStr "%s" pcellNameTable[cv])
    else
       sprintf(tmpStr "%s_pcell%d%d" cv->cellName random() stringToTime(getCurrentTime()))
       pcellNameTable[cv] = tmpStr
    )
  tmpStr
  )
) ; procedure ** nlSetPcellName **

Here are the netlist it generated from a resistor.

subckt ppolyf_u_pcell1575840381553782469 PLUS MINUS B
parameters segL=2u segW=2u
    R0 (PLUS MINUS B) ppolyf_u l=segL w=segW
ends ppolyf_u_pcell1575840381553782469
// End of subcircuit definition.

R2 (net03 net02 net01) ppolyf_u_pcell890174431553784620 m=1 segL=2u   segW=2u
        
As you can see: ppolyf_u_pcell890174431553784620 and ppolyf_u_pcell1575840381553782469
are not the same.It will report an error in spectre simulation.

I want to change the code, then it does not add random number but a fix number.
For eg:
R2 (net03 net02 net01) ppolyf_u_pcell_0 m=1 segL=2u segW=2u
        
Then I can ignore

subckt ppolyf_u_pcell1575840381553782469 PLUS MINUS B
parameters segL=2u segW=2u
    R0 (PLUS MINUS B) ppolyf_u l=segL w=segW
ends ppolyf_u_pcell1575840381553782469

and include a definition:

subckt ppolyf_u_pcell_0 PLUS MINUS B
parameters segL=2u segW=2u
    R0 (PLUS MINUS B) ppolyf_u l=segL w=segW
ends ppolyf_u_pcell1575840381553782469
// End of subcircuit definition.

So there will be no error when I run spectre.

How can I change the skill code ?

  • Cancel
  • chqian
    chqian over 6 years ago

    any one can help about this? thanks.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 6 years ago in reply to chqian
    chqian said:
    any one can help about this? thanks

    If this was urgent, you should contact customer support. The forums are community supported, and even those of us from Cadence on the forums only do this in our spare time. You addressed the original question to me, which rather narrowed the audience for getting an answer, and I was out of the office most of last week and rather busy on the one day that I was available.

    If you just want a fixed number afterwards, simply don't define nlSetPcellName - that's the normal behaviour.

    However, if you wanted to have your random/date related unique number, the issue is that your table for recording the info is using the cellView id which won't necessarily be fixed as you change the top level schematic. So instead you should have your table use the parameter names and values as the key. For example:

    pcellNameTable = makeTable("PcellNameTable" nil)
    procedure( nlSetPcellName( cv paramNames paramValues )
      let( ( tmpStr key)
      key=list(paramNames paramValues)
      if( pcellNameTable[key]
        then
           sprintf(tmpStr "%s" pcellNameTable[key])
        else
           sprintf(tmpStr "%s_pcell%d%d" cv->cellName random() stringToTime(getCurrentTime()))
           pcellNameTable[key]= tmpStr
        )
      tmpStr
      )
    ) ; procedure ** nlSetPcellName **

    This should then work fine.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • chqian
    chqian over 6 years ago in reply to Andrew Beckett

    Hi Andrew

    Thanks a lot. I will try your method.

    cqian

    • 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