资源描述
实验一、EDA软件及PLD器件的设计应用一.程序设计十进制计数器的程序library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;entity CNT10 isport(clk,rst,en: in std_logic;cq: out std_logic_vector(3 downto 0);count: out std_logic);end CNT10;architecture xu of CNT10 isbeginprocess(clk,rst,en)variable CQI: std_logic_vector(3 downto 0);beginif rst=1 then CQI:=(others=0);elsif clkevent and clk=1 thenif en=1 thenif CQI0);end if;end if;end if;if CQI=9 then count=1;else count=0;end if;cq LED7S LED7S LED7S LED7S LED7S LED7S LED7S LED7S LED7S LED7S LED7S LED7S LED7S LED7S LED7S LED7S NULL;END CASE;END PROCESS;END;2.波形图功能仿真波形图如下所示End time为50ns 占空比50% period为1ns,得到下面两个波形图3.电路原理图电路图功能仿真波形图如下
展开阅读全文