请问下面这个代码中generic是什么用 library IEEE; use IEEE.std_logic_1164.all; use IEEE.std_logic_arith.all; use IEEE.std_logic_unsigned.all; use work.LPM_COMPONENTS.all;
entity LPM_CONSTANT is generic (LPM_WIDTH : natural; -- MUST be greater than 0 LPM_CVALUE : natural; LPM_STRENGTH : string := "UNUSED"; LPM_TYPE : string := "LPM_CONSTANT"; LPM_HINT : string := "UNUSED"); port (RESULT : out std_logic_vector(LPM_WIDTH-1 downto 0)); end LPM_CONSTANT;
architecture LPM_SYN of LPM_CONSTANT is begin
RESULT <= conv_std_logic_vector(LPM_CVALUE, LPM_WIDTH);
end LPM_SYN;
|