设计一个4位串行加法器,并说明原理 。
来源:百度知道 编辑:UC知道 时间:2024/06/06 09:22:30
大家速度帮下忙,忙我写个,,在线求救!!!
这是四位串行加法器采用四次例化全加器实现
a,b为两个加数,sum为和的输出,也是四位,cout为进位输出
至于具体原理,我就不多说了,网上很多的也比我说的好
再给你一张波形图
library ieee;
entity mux8 is
port(a,b:in bit_vector(4 downto 1);
sum:out bit_vector(4 downto 1);
cout:out bit);
end mux8;
architecture exam of mux8 is
component add
port(ain,bin,cin:in bit;
sum:out bit;
cout:out bit);
end component;
signal temp:bit_vector(4 downto 1);
constant x: bit:='0';
begin
u4:add port map(ain=>a(4),bin=>b(4),cin=>temp(3),sum=>sum(4),cout=>cout)