Finsh后就生成了一個(gè)sinxdata的波形數(shù)據(jù)項(xiàng)目文件,綜合后就可元件化使用。
Library ieee;
Use ieee.std_logic_1164.all;
Use ieee.std_logic_unsigned.all;
Entity sinx is
Port(clk:in std_logic;
Q:out std_logic_vector(7 downto 0));
end;
Architecture ss of sinx is
signal qq:std_logic_vector(9 downto 0);
component sinxdata IS --調(diào)用剛生成的波形數(shù)據(jù)文件。
PORT ( address : IN STD_LOGIC_VECTOR (9 DOWNTO 0);
clock : IN STD_LOGIC ;
q : OUT STD_LOGIC_VECTOR (7 DOWNTO 0) );
end component;
begin
process(clk)
begin
if clk'event and clk='1' then
qq<=qq+1;
end if;
end process;
U:sinxdata port map(qq,clk,q);
end;