Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Testbench, need function convert from 2's complement

Status
Not open for further replies.

Bob108

Technical User
Jan 7, 2003
1
US
I am writing a test bench and need to convert a 16-bit std_logic_vector from 2's complement form to it integer equivalent. Is there a function available?
 
you can use function conv_integer for example:
a : integer ;
b : std_logic_vector;

a <= conv_integer(b) ;

make sure that you use std_logic_signed package;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top