13.07.2015 Views

ModuleWare Reference Guide - Hornad

ModuleWare Reference Guide - Hornad

ModuleWare Reference Guide - Hornad

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.

Arithmetic PartsAdder (add)Adder (add)This part adds the values of the input buses din0, din1 and scalar inputport cin and places the result in the output port dout.The carry out from the addition is placed in scalar output port cout.The addition can be performed in unsigned or signed mode by setting theparameter sign_type. Parameters cin_type and cout_type control thepolarity of ports cin and cout.This part is equivalent to n-bit adder; where n is the maximum width ofthe ports din and dout. The implementation of the adder is controlled byyour synthesis script.If input port cin is unconnected, it is driven by 0.Functiondout= din0 + din1 + cinThe addition is unsigned or signed depending of the value of sign_type.If cout_type = ActiveHigh:cout = 1= 0if there is a carry out during additionotherwiseIf cout_type = ActiveLow:cout = 0= 1if there is a carry out during additionotherwiseTruth TablesAll the following examples are for positive polarities and cin = 0.Unsigned, 3-bit din0, din1 and dout:Table 6-8. Adder Truth Table — Unsigned, 3-bit din0, din1 and doutdin0 din1 dout cout000 010 010 0001 010 011 0010 010 100 0011 010 101 0100 010 110 0101 010 111 0110 010 000 1106<strong>ModuleWare</strong> <strong>Reference</strong> Manual, Library Version 1.9September 18, 2008

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

Saved successfully!

Ooh no, something went wrong!