锐单电子商城 , 一站式电子元器件采购平台!
  • 电话:400-990-0325

VHDL语言之另一种编法74LS290

时间:2024-05-17 13:07:10

另一种编法LS290

library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity LS290 is
port(R1,R0,S1,S0,clk:in std_logic;
Q:out std_logic_vector(3 downto 0);
Co:out std_logic);
end LS290;
architecture cccp of LS290 is
signal RR,SS:std_logic;
signal QI: std_logic_vector(3 downto 0);
signal C:std_logic;
begin
RR<=(R1 and R0) ;SS<=S1 and S0;
process(R1,R0,S1,S0,clk,RR,SS)
begin
if clk'event and clk='0' then
if QI<9 then QI<= QI+1;
else QI<="0000";
end if;
end if;
if RR='1' then QI<="0000";
end if;
if SS='1' then QI<="1001";
end if;
if QI=9 then C<='1';
else C<='0';
end if;
if clk'event and clk='0' then Co<=C;
end if;
Q<=QI;
end process;
end;


-电子元器件采购网(www.ruidan.com)是本土元器件目录分销商,采用“小批量、现货、样品”销售模式,致力于满足客户多型号、高质量、快速交付的采购需求。 自建高效智能仓储,拥有自营库存超过50,000种,提供一站式正品现货采购、个性化解决方案、选型替代等多元化服务。
锐单商城拥有海量元器件数据手册IC替代型号,打造电子元器件IC百科大全!

相关文章