14.08.2013 Views

Xilinx CPLD Libraries Guide

Xilinx CPLD Libraries Guide

Xilinx CPLD Libraries Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

About Design Elements<br />

ADSU4<br />

Macro: 4-Bit Cascadable Adder/Subtracter with Carry-In, Carry-Out, and Overflow<br />

Supported Architectures<br />

This design element is supported in the following architectures only:<br />

• XC9500XL<br />

• CoolRunner XPLA3<br />

• CoolRunner-II<br />

Introduction<br />

When the ADD input is High, ADSU4 adds two 4-bit words (A3 – A0 and B3 – B0) and a CI are added, producing<br />

a 4-bit sum output (S3 – S0) and CO or OFL. For this element, two 4-bit words (A3 – A0 and B3 – B0) and a CI are<br />

added, producing a 4-bit sum output (S3 – S0) and CO or OFL<br />

When the ADD input is Low, this element subtracts Bz – B0 from Az– A0, producing a 4-bit difference (S3 – S0)<br />

and CO or OFL.<br />

In add mode, CO and CI are active-High. In subtract mode, CO and CI are active-Low. OFL is active-High in<br />

add and subtract modes.<br />

Logic Table<br />

Input Output<br />

ADD A B S<br />

1 An Bn An+Bn+CI*<br />

0 An Bn An-Bn-CI*<br />

CI*: ADD = 0, CI, CO active LOW<br />

CI*: ADD = 1, CI, CO active HIGH<br />

Unsigned Binary Versus Twos Complement<br />

<strong>CPLD</strong> <strong>Libraries</strong> <strong>Guide</strong><br />

ISE 10.1 www.xilinx.com 39

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!