LIBRARY IEEE; USE IEEE.STD_LOGIC_1164.ALL; USE IEEE.STD_LOGIC_UNSIGNED.ALL; ENTITY cnt4 IS PORT (clk:IN STD_LOGIC; q:OUT INTEGER RANGE 0 TO 15); END cnt4; ARCHITECTURE behavior OF cnt4 IS SIGNAL s: INTEGER RANGE 0 to 15; BEGIN PROCESS(clk,S) BEGIN IF clk'event AND clk='1' THEN s=s+1; END IF; q<=s; END PROCESS; END behavior; 各位高手,偶是初学者请问这个程序怎么修改啊..... |