黑色三棱军刺:各位,有没有好的关于EDA方面的毕业设计题目啊,,急用!!

来源:百度文库 编辑:高考问答 时间:2024/05/05 17:46:37
是有关于电子信息专业的

可增可减的10进制计数器。
--***********************************************
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;
--***********************************************
entity count10 is
port(
clr,en,updown,clk:in std_logic;
cyut std_logic;
qut std_logic_vector(3 downto 0)
);
end count10;
--***********************************************
architecture a of count10 is
signal q_tmp:std_logic_vector(3 downto 0);
begin
q<=q_tmp;
cy<='1' when (q_tmp=9 and updown='1') else
'1' when (q_tmp=0 and updown='0') else
'0';
process(clr,en,updown,clk)
begin
if clr='0' then
q_tmp<="0000";
elsif (clk 'event and clk='1') then
if en='1' then
if updown='1' then
if q_tmp=9 then
q_tmp<="0000";
else q_tmp<=q_tmp+1;
end if;
elsif updown='0' then
if q_tmp=0 then
q_tmp<="1001";
else q_tmp<=q_tmp-1;
end if;
else q_tmp<=q_tmp;
end if;
end if;
end if;
end process;
end a;