Unsigned subtracted by Natural VHDL

Discussion in 'Hardware' started by caosjr, Jun 12, 2014.

  1. caosjr

    caosjr

    Joined:
    Jun 12, 2014
    Messages:
    1
    Likes Received:
    0
    Hi guys,

    I am implementing CORDIC for floating point, and I have a problem with the subtraction between UNSIGNED type and NATURAL. I tested on Modelsim and the result is completely different from I what I expected. For example

    "01111111111" - 1023
    -
    1
    ----------------------------
    "11111111101" - 2045

    all the variables are UNSIGNED and i is NATURAL RANGE 0 to 31. I'm doing this because I need to divide the value of new_y by power of 2, I can't use shift because this is the exponent, so I have to subtract by 1, 2, 4, 8 ... 2^31. Can you help me?

    exp_y := new_y(word_size-2 DOWNTO mantissa);
    exp_y := exp_y - i;
    new_x <= arith_operation_float(new_x, shifted_y);
     

    Attached Files:

    caosjr, Jun 12, 2014
    #1
    1. Advertisements

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.
Similar Threads
  1. Dave Thomas

    XP unsigned Modem Driver!

    Dave Thomas, Apr 15, 2004, in forum: Computer Support
    Replies:
    5
    Views:
    991
    Dave Thomas
    Apr 22, 2004
  2. mcbacon@gmail.com

    Windows Vista Unsigned Drivers

    mcbacon@gmail.com, Dec 11, 2006, in forum: Windows 64bit
    Replies:
    1
    Views:
    652
    Charlie Russel - MVP
    Dec 11, 2006
  3. Kue2
    Replies:
    16
    Views:
    1,710
    chinga69
    Jan 30, 2007
  4. Kue2

    signed & unsigned drivers?

    Kue2, Aug 29, 2007, in forum: Windows 64bit
    Replies:
    2
    Views:
    2,052
    Carlos
    Sep 1, 2007
  5. BENAGLIA

    vista 64 - Unsigned drivers

    BENAGLIA, Sep 7, 2007, in forum: Windows 64bit
    Replies:
    8
    Views:
    926
    R. C. White
    Sep 10, 2007
  6. =?Utf-8?B?S2VudA==?=

    unsigned code

    =?Utf-8?B?S2VudA==?=, Sep 26, 2007, in forum: Windows 64bit
    Replies:
    2
    Views:
    775
    Charlie Russel - MVP
    Sep 26, 2007
  7. stevebarly

    Division by repeated multiplication VHDL

    stevebarly, May 21, 2008, in forum: Software
    Replies:
    0
    Views:
    1,465
    stevebarly
    May 21, 2008
  8. becool_nikks
    Replies:
    0
    Views:
    3,277
    becool_nikks
    Mar 6, 2009
Loading...