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 PartsDecrementer (dec)Decrementer (dec)This part decrements the value of the input port din and places the resultin the output port dout.The carry out from this result is placed in scalar output port cout.The decrement can be performed in unsigned or signed mode by settingthe parameter sign_type. Parameter cout_type controls the polarity of portcout.This part is equivalent to an n-bit decrementer; where n is the width of theports din and dout. The implementation of the decrementer is controlledvia the synthesis script.Functiondout = din - 1The decrement is unsigned or signed depending of the value of sign_type.cout = 1= 0if there is a carry out during decrementotherwiseTruth TableA 3-bit example (sign_type = unsigned, positive polarities):Table 6-22. Decrementer Truth Table — 3-bit, Unsigned, Positive Polaritiesdin dout cout000 111 1001 000 0010 001 0011 010 0100 011 0101 100 0110 101 0111 110 0A 3-bit example (sign_type = signed):Table 6-23. Decrementer Truth Table — 3-bit, Signeddin dout cout000 111 0001 000 0116<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!