I need a function to truncate a SIGNED vector efficiently

Discussion in 'VHDL' started by omara007, May 21, 2009.

  1. omara007

    omara007

    Joined:
    Jun 30, 2008
    Messages:
    10
    Hi Folks

    I am trying to find a function that can truncate a VHDL SIGNED vector efficiently. In other words, trim the extra sign-bit duplicates (if existing) then truncate the SINGED vector to a given new length.

    For example :

    If the input vector that needs to be efficiently truncated is:

    "11111011"

    After trimming it should look like this:
    "1011"

    And if we want to truncate it to only 2 bits, the final result should look like this:
    "10"

    This allows for better truncation precision.
     
    omara007, May 21, 2009
    #1
    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. Steven Reddie
    Replies:
    5
    Views:
    5,454
    tom_usenet
    Feb 9, 2004
  2. Allerdyce.John@gmail.com
    Replies:
    8
    Views:
    2,004
    Csaba
    Feb 18, 2006
  3. kyrpa83
    Replies:
    1
    Views:
    658
    kyrpa83
    Oct 17, 2007
  4. Timothy Madden
    Replies:
    3
    Views:
    339
    jameskuyper
    Nov 10, 2008
  5. Rob1bureau
    Replies:
    1
    Views:
    843
    joris
    Feb 27, 2010
Loading...

Share This Page