[an error occurred while processing this directive]
|
XST сделал как надо.
Нужно правда все хорошо проверить, первый раз так делал.
component coun is
generic(n : integer);
port(
CLK : in STD_LOGIC;
RST : in STD_LOGIC;
A_IN : in STD_LOGIC_VECTOR(n downto 0);
O_OUT : out STD_LOGIC_VECTOR(n downto 0)
);
end component;
constant c0 : integer := 12345;
constant i0 : integer := integer(trunc(log2(real(c0))));
signal a,o : std_logic_vector(i0 downto 0);
begin
a <= conv_std_logic_vector(c0,i0 + 1);
u_c0 : coun
generic map(n => i0)
port map(
CLK => clk, RST => rst,
A_IN => a,
O_OUT => o
);
E-mail: info@telesys.ru