我想定义一个这样的记录类型:
package my_package is
type natural_array is array (NATURAL RANGE <> ) of natural_sub;
type floating_point is
record
sign : integer range -1 to 1;
mantissa : natural_array; --I am asking about this;
exponent : integer range -50 to 50;
end record;
end my_package;
并希望使用我的模块中的类型进行声明:
entity arithematic_unit is
Port (
a_in: in floating_point(3 downto 0); --want to define mantissa length here
b_in : in floating_point(3 downto 0);
op: in natural range 1 to 7;
c_out : out floating_point(7 downto 0) );
end arithematic_unit;
我该怎么做? 我使用的是vivado webpack 2013.4版本。