divide by zero

Discussion in 'Cadence' started by bedoune, Feb 14, 2008.

  1. bedoune

    bedoune Guest

    hi,

    I'm trying to develop a pcell.
    I have an expression like:
    if(n>>1 then
    tmp = foo/(n-1))

    When compiling, i have an error message:
    *Error* quotient: Attempted to divide by zero - (0.0 0)

    how to solve this problem ?

    Thanks ^^
     
    bedoune, Feb 14, 2008
    #1
  2. Don't right shift n by one, but do a comparison to check it's greater than 1.

    You probably meant:

    if(n>1 then
    ....

    Andrew.
     
    Andrew Beckett, Feb 14, 2008
    #2
  3. bedoune

    bedoune Guest

    ok, i was not aware about this (i'm a beginner in skill development)

    Thanks a lot for your help ! ^^v
     
    bedoune, Feb 15, 2008
    #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.