How to set SKILL floating point precision to XX.XX

Discussion in 'Cadence' started by Peter Holm, Jun 20, 2006.

  1. Peter Holm

    Peter Holm Guest

    Hi,

    I am writing a SKILL function which modifies transistor elements in a
    schematic. Some calculations result in width properties with values
    like 2.32222222. Is there a way to round this to 2.32 in the database?
    Thanks.
     
    Peter Holm, Jun 20, 2006
    #1
  2. Depends on if you really want to do a mathematical rounding
    round( 2.32222222 * 100.0 ) / 100.0
    or if you just want the value to be displayed that way
    printf( "%.2f\n" 2.32222222 )
    Then have also a look at the function 'aelPushSignifDigits'.

    Bernd
     
    Bernd Fischer, Jun 21, 2006
    #2

  3. May be if you want round off to a grid value than try this
    in this every calculation will be a multiple of .005


    w_mj_true=w_mj
    w_mj=round(w_mj/.005)*.005

    Bye
    Manish jain
     
    jainmanish123, Jun 22, 2006
    #3
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.