"ENABLE_RUNTIME_MOD=YES,INSTANCE_NAME=ROM",Р lpm_type => "altsyncram"Р)Р?PORT MAP (clock0 => inclock,address_a => address,q_a => sub_wire0);РEND ;Р附录三РLIBRARY IEEE;РUSE IEEE.STD_LOGIC_1164.ALL;РUSE IEEE.STD_LOGIC_UNSIGNED.ALL;РENTITY autoplay ISРPORT(clk2:IN STD_LOGIC;Р index_auto:OUT STD_LOGIC_VECTOR(4 DOWNTO 0));РEND autoplay;РARCHITECTURE behav OF autoplay ISРcomponent music_romРPORTР?(Р address : IN STD_LOGIC_VECTOR (8 DOWNTO 0);Р inclock : IN STD_LOGIC ;Р q : OUT STD_LOGIC_VECTOR (4 DOWNTO 0));Р ponent;РSIGNAL CQI:STD_LOGIC_VECTOR(8 DOWNTO 0);РBEGINРPROCESS(clk2)РBEGINРIF clk2'EVENT AND clk2='1' THEN CQI<=CQI+1;РEND IF;РEND PROCESS;Рu1 : music_rom PORT MAP(address=>CQI,q=>index_auto,inclock=>clk2);РEND ;Р附录四:Рlibrary ieee;