最新文章专题视频专题问答1问答10问答100问答1000问答2000关键字专题1关键字专题50关键字专题500关键字专题1500TAG最新视频文章推荐1 推荐3 推荐5 推荐7 推荐9 推荐11 推荐13 推荐15 推荐17 推荐19 推荐21 推荐23 推荐25 推荐27 推荐29 推荐31 推荐33 推荐35 推荐37视频文章20视频文章30视频文章40视频文章50视频文章60 视频文章70视频文章80视频文章90视频文章100视频文章120视频文章140 视频2关键字专题关键字专题tag2tag3文章专题文章专题2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章专题3
当前位置: 首页 - 正文

vhdl 加法器

来源:动视网 责编:小OO 时间:2025-10-03 00:42:59
文档

vhdl 加法器

ADD4,8,1-,8-,16-BitCascadableFullAdderswithCarry-In,Carry-Out,andOverflowAArchitecturesSupportedADD4,ADD8,andADD16addtwowordsandacarry-in(CI),producingasumoutputandcarry-out(CO)oroverflow(OFL).ADD4addsA3–A0,B3–B0,andCIproducingthesumoutputS3–S0and
推荐度:
导读ADD4,8,1-,8-,16-BitCascadableFullAdderswithCarry-In,Carry-Out,andOverflowAArchitecturesSupportedADD4,ADD8,andADD16addtwowordsandacarry-in(CI),producingasumoutputandcarry-out(CO)oroverflow(OFL).ADD4addsA3–A0,B3–B0,andCIproducingthesumoutputS3–S0and


ADD4, 8, 16

4-, 8-, 16-Bit Cascadable Full Adders with Carry-In, Carry-Out, and OverflowA

Architectures Supported

ADD4, ADD8, and ADD16 add two words and a carry-in (CI), producing a sum output and carry-out (CO) or overflow (OFL). ADD4 adds A3 – A0, B3 – B0, and CI producing the sum output S3 – S0 and CO (or OFL). ADD8 adds A7 – A0, B7 – B0, and CI, producing the sum output S7 – S0 and CO (or OFL). ADD16 adds A15 – A0, B15 – B0 and CI, producing the sum output S15 – S0 and CO (or OFL).

Unsigned Binary Versus Twos Complement

ADD4, ADD8, ADD16 can operate on either 4-, 8-, 16-bit unsigned binary numbers or 4-, 8-, 16-bit twos-complement numbers, respectively. If the inputs are interpreted as unsigned binary, the result can be interpreted as unsigned binary. If the inputs are interpreted as twos complement, the output can be interpreted as twos complement. The only functional difference between an unsigned binary operation and a twos-complement operation is how they determine when “overflow” occurs. Unsigned binary uses CO, while twos-complement uses OFL to determine when “overflow” occurs. To interpret the inputs as unsigned binary, follow the CO output. To interpret the inputs as twos complement, follow the OFL output.

Unsigned Binary Operation

For unsigned binary operation, ADD4 can represent numbers between 0 and 15, inclusive; ADD8 between 0 and 255, inclusive; ADD16 between 0 and 65535, inclusive. CO is active (High) when the sum exceeds the bounds of the adder.OFL is ignored in unsigned binary operation.

T wos-Complement Operation

For twos-complement operation, ADD4 can represent numbers between -8 and +7, inclusive; ADD8 between -128 and +127, inclusive; ADD16 between -32768 and +32767, inclusive. OFL is active (High) when the sum exceeds the bounds of the adder. CO is ignored in twos-complement operation.

ADD4, 8, 16

Spartan-II, Spartan-IIE No Spartan-3No Virtex, Virtex-E

No Virtex-II, Virtex-II Pro, Virtex-II Pro X No

XC9500, XC9500XV , XC9500XL Primitive CoolRunner XPLA3Primitive CoolRunner-II

Primitive

ADD8 Implementation Spartan-II, Spartan-IIE, Virtex, Virtex-E

90www.xilinx.com Libraries Guide

ADD8 Implementation Spartan-3, Virtex-II, Virtex-II Pro, Virtex-II Pro X

ADD4 Implementation XC9500/XV/XL, CoolRunner XPLA3, CoolRunner-II

92www.xilinx.com Libraries Guide

ADD8 Implementation XC9500/XV/XL, CoolRunner XPLA3, CoolRunner-II Usage

This design element is schematic or inference only -- no instantiation.

VHDL Inference Code (ADD4)

architecture Behavioral of ADD is

signal sum: std_logic_vector(WIDTH-1 downto 0);

signal zeros: std_logic_vector(WIDTH-1 downto 0) := (others => '0'); begin

process (CI, A, B, sum)

begin

sum <= ('0' & A) + ('0' & B) + (zeros & CI);

S <= sum(WIDTH-1 downto 0);

CO <= sum(WIDTH);

end process;

end Behavioral;

Verilog Inference Code (ADD4)

always @ (A or B or CI)

begin

{CO,sum} <= A + B + CI;

end

94www.xilinx.com Libraries Guide

文档

vhdl 加法器

ADD4,8,1-,8-,16-BitCascadableFullAdderswithCarry-In,Carry-Out,andOverflowAArchitecturesSupportedADD4,ADD8,andADD16addtwowordsandacarry-in(CI),producingasumoutputandcarry-out(CO)oroverflow(OFL).ADD4addsA3–A0,B3–B0,andCIproducingthesumoutputS3–S0and
推荐度:
  • 热门焦点

最新推荐

猜你喜欢

热门推荐

专题
Top