Define Unsigned Type

A

a_Conan

Guest
Hi,
Can I define Unsigned Type in vhdl as:

package MyTypes is
Type UNS16 is array(15 downto 0) of unsigned;
end MyTypes;

Thanks
 
Can I define Unsigned Type in vhdl as:
package MyTypes is
Type UNS16 is array(15 downto 0) of unsigned;
end MyTypes;
No, you must use a fixed length unsigned.

Nicolas
 
Thank you Nicolas, but what do you meen by I must use a fixed length
unsigned?
Can you give example?

Thank you
 
You have to constrain your unsigned:
type uns16 is array(15 downto 0) of unsigned(7 downto 0);

Unless your unsigned type is not the one defined in numeric_std...

You can also define a 2D array of std_logic elements if you want your
type to be scalable but it has many drawbacks.

Nicolas
 

Welcome to EDABoard.com

Sponsor

Back
Top