• 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 Schematic Porting from X-Foundry PDK to Y-Foundry...

Stats

  • Locked Locked
  • Replies 9
  • Subscribers 144
  • Views 19444
  • 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 Schematic Porting from X-Foundry PDK to Y-Foundry PDK

yjwu
yjwu over 11 years ago

Hi,

I am trying to make a schematic conversion from X-Foundry PDK to Y-Foundry PDK.

I found the skill codes "abConvertComponentParams" by Andrew very helpful.

However, I have two questions below that would need some quidences:

(1) How to remove unwanted CDF properties in the original symbol of X-Foundry?

     After the skill code conversion, some CDF properties become user properties in the new symbol.

     Those proporties are specific to X-Foundry and it would be better to remove them during the conversion.

     Specifically, it would be even better to just map the parameters specified in "conv.config" only and remove all other parameters. 

(2) How to map a parameter type of "string" to type "integer"?

     The example fixIt procedure seemed to return a string and caused the following warning message:

      *WARNING* Invalid type (string) for property 'segments' on instance 'R1'

Any help/suggestions would be much appreciated.

Thanks.

Ethan

  • Cancel
  • tweeks
    tweeks over 10 years ago

    Just thinking about writing conversion code between the same foundry's PDK's gives me a headache.  Going from one foundry to another is even worse!

    For removing unwanted CDF properties, why don't you just delete them?

    For going from string to integer, just use

    pcFix(cdfParseFloatString("3.14k"))

    => 3140

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • ebecheto
    ebecheto over 10 years ago

     Here is my contribution.

     

    aelSuffixNotation(2e-5);=> "20u"
    pcFix(cdfParseFloatString("3.14k"));=> 3140
    pcFix(cdfParseFloatString("3.14u"));=> 0  humm..
    evalstring("3.14u");=> 3.14e-06

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • tweeks
    tweeks over 10 years ago

    Thanks!  I didn't know about aelSuffixNotation.

    I think it would be safer to use cdfParseFloatString instead of evalstring tho......

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

    aelSuffixNotation has its uses (probably aelNumber() is more useful in this context though), but I'd use cdfParseFloatString as a matter of good practice. The benefit of cdfParseFloatString is that it's in all executables - so is also "pcell safe", whereas aelSuffixNotation/aelNumber is not in dbAccess, the stream interfaces and so on, because it's ADE-related. Not a big issue for your application, but if you get into the habit of using cdfParseFloatString you won't be surprised.

    I always advise against using evalstring. One it's using run-time evaluation, but more importantly if the string happens to contain a bit of SKILL code, you may not get what you get. For example, if the string happens to contain "(exit)"...

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • yjwu
    yjwu over 10 years ago

    Thanks for all the replies and tips.

    I am using "abConvertComponentParams.il" to do the conversion.

    In "conv.config" file, I defined a fix function trying to do string to integer conversion:

      (nil
       fromLib   "foundrya"
       fromCell  "res1"
       toLib     "foundryb"
       toCell    "res1_ckt"
       runCallbacks (?useInstCDF t ?callInitProc t)
       params (
               ("connection" "connection")
               ("w" "segW")
               ("l" "segL")
               ("m" "m")
               ("segments" "segments" fixseg)
               )
      )

    The procedure "fixseg" is:

    procedure(fixseg(inst parName val)
      printf("Fixing %s on %s\n" parName inst~>name)
    /*  segs = evalstring(val) */
    /*  segs = aelNumber(val)  */
    /*  sprintf(nil "%n" segs) */
      sprintf(nil "%n" pcFix(cdfParseFloatString(val)))
    /*  sprintf(nil "%n" evalstring(val)) */
      )

     

    So I tried different ways but none of them worked.

    Somehow the procedure would always return a string.

    Maybe it is related to the "abConvertComponentParams.il" itself?

    Thanks.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • skillUser
    skillUser over 10 years ago

    Hi Yiwu,

    Your fixseg procedure shows what you've tried, but it also shows (mostly) why they didn't work - aelNumber will return a floating point number, and the sprintf() statements will only ever return a string, so if you need fixseg to return an integer (fixnum) then you should choose a function or statement that returns that data type. Examples might be atoi() or round() perhaps in combination with either aelNumber() or cdfParseFloatString()?

    Hopefully this helps you.

    Regards,

    Lawrence

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • yjwu
    yjwu over 10 years ago

    Hi Lawrence,

    Thanks for pointing out the key point.

    I thought format string "%n" should return an integer, but it does not.

    Adding atoi() solved the problem.

      atoi(sprintf(nil "%n" pcFix(cdfParseFloatString(val))))

    Thank you for the help.

    Best,

    Ethan

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • skillUser
    skillUser over 10 years ago

    Hi Ethan,

    in your example you are doing some unnecessary conversions to the string format and back again - if you just use pcFix() and pcRound() directly as needed, these return an integer and you don't need to use the sprintf or atoi functions.  E.g.

    pcFix(cdfParseFloatString(val))

    Hope it helps!

    Lawrence.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • yjwu
    yjwu over 10 years ago

    Hi Lawrence,

    Indeed,

            pcFix(cdfParseFloatString(val))

    is a more elgant solution.

    Thanks again!

    Ethan

    • 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