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 PartsVariable Shifter (varshift)Variable Shifter (varshift)This part right or left shifts the input data port din by the value given by theinput port shift. The result of this shift operation is placed in the output portdout.Logical and Arithmetic left shift behave the same way because the negativedata is assumed to be in 2's complement format Thus the generated code inboth cases are the same.The direction is decided by interpreting the bits of the input port shift in 2’scompliment. A negative number implies right shift while a positive numberimplies left shift.The shift operation can be performed in one of three modes set by the enumerated parametermode (Logical, Arithmetic, Circular).For logical mode in right shift, 0 is shifted in the most significant bit.For arithmetic mode in right shift, the most significant bit of input port din is retained.For circular mode in right shift, the least significant bit of the input port din is shifted into themost significant bit. For logical and arithmetic mode in left shift, 0 is shifted in the leastsignificant bit.For circular mode in left shift, the most significant bit of the input port din is shifted into theleast significant bit.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.This part is equivalent to an n-bit right and left shifter; where n is the width of the ports din anddout. The implementation can be controlled via the synthesis script.136<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!