convert 2d array to 1d in vhdl

Status
Not open for further replies.

harian

Junior Member level 1
Joined
Jan 13, 2015
Messages
16
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
137
i am thinking,wheather it is possible in vhdl to convert 2D array in 1D array.
and secondly ,,how one can convert fixed point real number in floating point real number.. is it possible with ieee.numeric_std.all and ieee_std_logic_unsigned.all
thanks
 

Define a 2D array and a 1D array. Use a for loop and assign the elements of the 2D array to the 1D array.
 

i am thinking,wheather it is possible in vhdl to convert 2D array in 1D array.
and secondly ,,how one can convert fixed point real number in floating point real number.. is it possible with ieee.numeric_std.all and ieee_std_logic_unsigned.all
thanks

You can easily do it in a loop - probably in some handy conversion function.

As for fixed point - there is no definition for fixed point real number. You can use the unsigned type to represent fixed point. As for floating point, there is no standard conversion from fixed point - you will need to use a vendor IP core for this.
 
how one can convert fixed point real number in floating point real number.. is it possible with ieee.numeric_std.all and ieee_std_logic_unsigned.all
thanks
Not directly with ieee.numeric_std.all or ieee_std_logic_unsigned. Use ieee.fixed_pkg for all of your fixed point work. If you use numeric_std.all or std_logic_unsigned, you'll just be re-creating all of the work that is already done for you in fixed_pkg.

Kevin Jennings
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…