• 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. I cannot use basic functions of skill in virtuoso (ex. nindex...

Stats

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

I cannot use basic functions of skill in virtuoso (ex. nindex)

YS202501078642
YS202501078642 7 months ago

fstInst=car(MchInstList)
numMchInst=length(MchInstList)
remdMchInstList=remove(fstInst MchInstList)
(setq name2 (fstInst~>name)) 
(setq index2 (nindex( name2 "<"))) 
(setq nameBeforeLessThan (substring name2 0 index2))
fstInst~>name=strcat(nameBeforeLessThan "<" artMakeString(numMchInst-1) ":" "0" ">" )

I want to find position of "<" in variable name2

so i search the skill code documentation and I found "nindex" function

but when i tried to use "nindex" function, 

*Error* eval: not a function - nindex(name2 "<")

this error has become.

is there any file to load before using such functions?

Now I use 6.1.8-64b version virtuoso

  • Cancel
  • ebecheto
    ebecheto 7 months ago

    Hi YS,

    (setq index2 nindex( name "<"))

    You have extra parenthesis around. That is your mistake.

    I am not sure what you want to do, but see below and example to reverse bits in a bus or translate it in a bracket like syntaxe.

    name="bus<1:0>"
    ; nindex(name "<");=> 4
    splitName=parseString(name "<:>");=> ("bus" "1" "0")
    dbGetNameNumBit(name);=> 2
    ; check splitName length mayby
    strcat(nth(0 splitName) "<" nth(2 splitName) ":" nth(1 splitName) ">");=> "bus<0:1>"
    strcat(nth(0 splitName) "[" nth(2 splitName) ":" nth(1 splitName) "]");=> "bus[0:1]"
    

    ___ Hope it helps __

    ++Ed

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • YS202501078642
    YS202501078642 7 months ago in reply to ebecheto

    Actually I would like to do combine multiple instance which has same name

    For example, there are instances which name is "I0<0>", "I0<1>", "I0<2>", "I0<3>"... "I0<12>" 

    So, I want to combin them as "I0<12:0>".

    That's why I need position of "<".

    Of course, there is some way to do something like that. But, there is some error

    SKILL: How to combine multiple instances of same master connected to the same net name in a design into an iterated instance

    I want to combine all of the instance which has same name before bracket.

    Also, if I can, I want to make that skill code that can do on same name instance and same net (ex, in<0>, in<1> ...) either.

    Thanks.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett 7 months ago in reply to YS202501078642

    You could use the code in this post: Generating Schematic pin list to collapse a list of names into a vector. 

    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