rtl

Discussion in 'VHDL' started by teamgda, Jul 15, 2004.

  1. teamgda

    teamgda Guest

    i need details about RTL coding
     
    teamgda, Jul 15, 2004
    #1
    1. Advertising

  2. Mike Treseler, Jul 15, 2004
    #2
    1. Advertising

  3. teamgda

    Patrice Guest

    square root function ???

    Helo
    I use quartus web edition, and made me some routines but
    sundely a saw that there is no math_real library in quarus !
    Does it mean what mathematical operation on real cannot be made
    with this board ?? (i'm interrested in sqrt function)

    Thanks for reply
     
    Patrice, Jul 31, 2004
    #3
  4. Re: square root function ???

    On Sat, 31 Jul 2004 12:41:03 +0200, "Patrice" <>
    wrote:

    >Helo
    >I use quartus web edition, and made me some routines but
    >sundely a saw that there is no math_real library in quarus !
    >Does it mean what mathematical operation on real cannot be made
    >with this board ?? (i'm interrested in sqrt function)


    Synthesisers don't support real numbers for general use (AFAIK), so
    this will be a problem with any board.

    You have several options:
    - recode your design to use fixed point
    - implement your own floating point
    - use some sort of hybrid approach, e.g. block floating point.

    Also reconsider your "need" for a square root. Are you performing a
    cartesian to polar conversion? There are several ways of doing that
    which are more efficient that the canonical schemes.

    Regards,
    Allan.
     
    Allan Herriman, Jul 31, 2004
    #4
  5. Re: square root function ???

    "Patrice" <> wrote in message news:<cefsvq$2cbb$>...
    > Helo
    > I use quartus web edition, and made me some routines but
    > sundely a saw that there is no math_real library in quarus !
    > Does it mean what mathematical operation on real cannot be made
    > with this board ?? (i'm interrested in sqrt function)
    >
    > Thanks for reply


    As a side note (this has nothing to do with Quartus or even VHDL), for
    some applications calculating the inverse square root may prove more
    useful or be faster. (e.g., if you have to divide by the square root
    of something, it's faster to multiply by its inverse.)

    http://www.finesse.demon.co.uk/steven/invsqrt.html

    -t
     
    Anthony J Bybell, Aug 2, 2004
    #5
  6. teamgda

    Ken Smith Guest

    Re: square root function ???

    In article <cefsvq$2cbb$>,
    Patrice <> wrote:
    >Helo
    >I use quartus web edition, and made me some routines but
    >sundely a saw that there is no math_real library in quarus !
    >Does it mean what mathematical operation on real cannot be made
    >with this board ?? (i'm interrested in sqrt function)


    real=sqrt(real) Forget it

    integer=sqrt(integer) Yes in more than one clock

    fixedpoint=sqrt(fixedpoint) same as integer

    If you can take more than one clock cycle to do it, you can make an
    integer or fixedpoint SQRT. The trick is to use Booths[1] method.

    [1] At least I think it was Booth, Gauss may be the real father of this.


    Basic rule:

    N^2 = the sum of the first N odd numbers.

    Stupid method = subtract 1,3,5,7.. until it crosses zero.

    Optimization:
    If you multiply N by 2, you multiply N^2 by 4. As a result, you can get
    there quicker if you include some shifting.




    --
    --
    forging knowledge
     
    Ken Smith, Aug 2, 2004
    #6
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. santhosh
    Replies:
    1
    Views:
    1,134
    Mike Treseler
    Aug 21, 2003
  2. Zyd

    VHDL RTL description

    Zyd, Apr 14, 2004, in forum: VHDL
    Replies:
    1
    Views:
    1,502
    H. Li
    Apr 14, 2004
  3. Anand P Paralkar

    ASIC RTL and FPGA RTL

    Anand P Paralkar, Apr 26, 2004, in forum: VHDL
    Replies:
    1
    Views:
    4,990
    Alexander Gnusin
    Apr 26, 2004
  4. gpi5
    Replies:
    1
    Views:
    1,186
    Mike Treseler
    Nov 9, 2004
  5. Crimson_M
    Replies:
    2
    Views:
    901
    Yttrium
    Nov 23, 2004
Loading...

Share This Page