Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

convert std_logic to integer

Status
Not open for further replies.

rakesh_aadhimoolam

Full Member level 4
Joined
Mar 14, 2006
Messages
206
Helped
19
Reputation
38
Reaction score
2
Trophy points
1,298
Activity points
2,751
vhdl convert std_logic to integer

hello folks i have a small doubt of how exactly to write a package to convert std_logic to integer or vice-versa.

thanks in advance
 

std_logic to integer

Do try to search the site more



the same question was asked here
 

vhdl std_logic to integer

rakesh_aadhimoolam said:
hello folks i have a small doubt of how exactly to write a package to convert std_logic to integer or vice-versa.

thanks in advance
I recommend you take a look at VHDL FAQ @ **broken link removed**

A quick answer is to use:

use ieee.numeric_std.all;

and then use the functions:

to_integer
to_unsgined

HTH
Ajeetha, CVC
www.noveldv.com
New Book: A Pragmatic Approach to VMM Adoption 2006 ISBN 0-9705394-9-5
http://www.systemverilog.us/
 

vhdl integer to std_logic

use conv_std_logic_vector(integer(name),no.of bits for standard logic vector needed);
for converting to integer use straightway
conv_integer(std logic vector(name));
no additional library needed for this
 

vhdl convert std_logic_vector to integer

amit_8561 said:
use conv_std_logic_vector(integer(name),no.of bits for standard logic vector needed);
for converting to integer use straightway
conv_integer(std logic vector(name));
no additional library needed for this
The usage of conv_* functions is discouraged as they are not *IEEE* standard functions and different vendors have/had different interpretations of these functions. Read VHDL FAQ for more on this. **broken link removed**

Regards,
Ajeetha, CVC
www.noveldv.com
New Book: A Pragmatic Approach to VMM Adoption 2006 ISBN 0-9705394-9-5
h**p://www.systemverilog.us/
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top