![]() |
|
|
|
#1 |
|
Hi,
i have to count several values from 0 to 99, at the moment i do it in an array of integer 0 to 99. As output-port i use a std_logic_vector(6 downto 0), but i may change this if necessary. How can i convert the integer to the vector? i have no idea and not found any solutions yet. Any hint would be helpful thanks Sebastian Sebastian Eggers |
|
|
|
|
#2 |
|
Posts: n/a
|
use the conversion functions in the ieee numeric package or the
std_logic package Neo |
|
|
|
#3 |
|
Posts: n/a
|
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all; conv_std_logic_vector(7, 9); converts integer 7 to a std_logic_vector with 9 bits. Rgds André ALuPin@web.de |
|
|
|
#4 |
|
Posts: n/a
|
> use ieee.std_logic_1164.all;
> use ieee.std_logic_arith.all; > > conv_std_logic_vector(7, 9); > > converts integer 7 to a std_logic_vector with 9 bits. Nope! Please stop using std_logic_arith package. use ieee.numeric_std.all std_logic_vector(to_unsigned(natural_number, nb_bits)); Nico Nicolas Matringe |
|
|
|
#5 |
|
Junior Member
Join Date: Nov 2006
Posts: 1
|
Why we should stop using std_logic_arith package?
Galloth |
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to convert string contain Hex data into integer | asifjavaid | Software | 0 | 09-09-2008 08:50 AM |
| Fast Integer Division In Vhdl | Vitrion | Hardware | 0 | 11-01-2007 07:33 AM |
| VHDL help needed | TomboT | Hardware | 2 | 11-21-2006 05:01 PM |
| getting integer values from electronic weigh scale through serial port | dotnet_smart | Software | 2 | 09-17-2006 05:24 AM |
| getting integer values from electrolnic weigh scale through serial port | dotnet_smart | Hardware | 0 | 07-28-2006 11:54 AM |