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 Parts181 ALU (alu181)181 ALU (alu181)This part provides the standard 181 Arithmetic Logic Unit (ALU)operations. The input data bus ports are a and b. The result is placedin the output port f.You can consult vendor data sheets for details of this part (forexample, Texas Instruments' TTL Data Book, 74181 series).The arithmetic operation is controlled by the value of theenumerated parameter sign_type (Signed, Unsigned).The mode of the ALU is controlled by the scalar input port modewhich can be set to either logical (1) or arithmetic (0). The polarityof port mode is controlled by the enumerated parameter mode_type(ActiveHigh, ActiveLow).Scalar input port cin is available as a carry in for the arithmeticoperations. The polarity of cin is controlled by the enumerated parameter cin_type (ActiveHigh,ActiveLow).Two scalar carry ports are available from the ALU: cout and ovfl. They differ only for thesigned arithmetic operations (parameter sign_type = signed). The bit after the most significantbit of the output port f is placed in the scalar output port cout. The result of an exclusive ORbetween the most significant bit of output port f and the bit after the most significant bit of theoutput port f is placed in the scalar output port ovfl.The polarities of cout and ovfl are controlled by the enumerated parameters cout_type(ActiveHigh, ActiveLow) and ovfl_type (ActiveHigh, ActiveLow). If the mode of the ALU islogical, both the carry output ports are set to 0.The operation (arithmetic or logical) is defined by the value of the 4-bit wide input port s. Notethat in a standard 181 component the functionality of this port is available via four scalar ports(namely s0, s1, s2 and s3).This part is very costly in terms of the gate count. Different implementation strategies areneeded to achieve better hardware performance. Even though synthesis tools may generate areasonable implementation other options such as silicon compilers and optimized hard macrosshould be explored.If the input port cin is unconnected, it is driven by 0.This part is equivalent to an n-bit wide 181 ALU, where n is width of input port a, b and f.98<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!