
2个回答
2013-06-18
展开全部
解: 设clr为异步清零端,en为计数使能端
LIBRARY ieee;
USE ieee.std_logic_1164.all;
USE ieee.std_logic_unsigned.all;
USE ieee.std_logic_arith.all;
ENTITY ex6_9 IS
port(
clk : IN STD_LOGIC;
clr,en : in std_logic;
cnt : OUT std_logic_vector(15 downto 0)
);
END ;
ARCHITECTURE hdlarch OF ex6_9 IS
signal cnttmp : std_logic_vector(15 downto 0);
BEGIN
process(clk,clr) begin
if clr = '1' then
cnttmp <= (others => '0');
elsif(rising_edge(clk)) then
if en = '1' then
cnttmp <= cnttmp + 1;
end if;
end if;
end process;
cnt <= cnttmp;
END;
LIBRARY ieee;
USE ieee.std_logic_1164.all;
USE ieee.std_logic_unsigned.all;
USE ieee.std_logic_arith.all;
ENTITY ex6_9 IS
port(
clk : IN STD_LOGIC;
clr,en : in std_logic;
cnt : OUT std_logic_vector(15 downto 0)
);
END ;
ARCHITECTURE hdlarch OF ex6_9 IS
signal cnttmp : std_logic_vector(15 downto 0);
BEGIN
process(clk,clr) begin
if clr = '1' then
cnttmp <= (others => '0');
elsif(rising_edge(clk)) then
if en = '1' then
cnttmp <= cnttmp + 1;
end if;
end if;
end process;
cnt <= cnttmp;
END;

2023-08-25 广告
LS161的1脚(Q3)和13脚(Q1)接到LS20的其中一个与非门的两个输入端,LS20是双4输入与非门,也就是一个与非门有四个输入端,所以另外两个输入端应该接高电平,然后把这个与非门的输出端接到LS161的CR非端(1脚)。输出就是一个...
点击进入详情页
本回答由北京埃德思远电气技术咨询有限公司提供
2013-06-18
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询