Ограничение типа записи во время объявления порта / сигнала - PullRequest
0 голосов
/ 14 мая 2018

Я хочу определить тип записи следующим образом:

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.

...