怎样用VHDL设计含有异步清零和同步时钟使能的10位加法计数器

魅力ww 1年前 已收到1个回答 举报

布衣女孩 幼苗

共回答了20个问题采纳率:80% 举报

library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity add is
port(clr,en,clkin:in std_logic; ---------清零,使能及触发时钟
a,b:in std_logic_vector(9 downto 0);---------加数
c:out std_logic_vector(9 downto 0);----------和
ci:out std_logic ---------进位
);
end add;
architecture arch of add is
---------;
signal reg:std_logic_vector(10 downto 0):="00000000000";
----------------------------------------------------------------------------
begin
----------------
process(clr,clkin,en,a,b)
begin
if(clr='0') then --------------异步清零
reg

1年前

6
可能相似的问题
Copyright © 2024 YULUCN.COM - 雨露学习互助 - 17 q. 2.729 s. - webmaster@yulucn.com