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 PartsAbsolute Value (absval)Absolute Value (absval)This part takes the absolute value of the input port din and places the resultin the output port dout. din is assumed to be a signed number in 2’scomplement format.This part is equivalent to n of 2-bit multiplexers, n inverters and an n-bitwide incrementer; where n is the width of the ports.Functiondout= din= (NOT(din)) + 1if the MSB of the input port din = 0OtherwiseTruth TableA 3-bit example:Table 6-3. Absolute Value Truth Tabledin Value of din dout Value of dout000 0 000 0001 1 001 1010 2 010 2011 3 011 3100 -4 100 4101 -3 011 3110 -2 010 2111 -1 001 1ParametersTable 6-4. Absolute Value ParametersParameter Values Defaultdin, dout Port widths (must be > 1) Automaticdout_type ActiveHigh, ActiveLow ActiveHighDesign Rule Checks• An error is issued if the width of any port cannot be determined.• A warning is issued and HDL generation fails for this part if any of the ports are notconnected.102<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!