13.07.2015 Views

ModuleWare Reference Guide - Hornad

ModuleWare Reference Guide - Hornad

ModuleWare Reference Guide - Hornad

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Arithmetic PartsUni-function Comparator (comp)Uni-function Comparator (comp)This part is a highly parameterized comparator which compares the inputports din0 and din1. The result is placed in the scalar output port fout.The output is controlled by an enumerated parameter Fout_functionwhich supports the comparison functions: EqualTo, NotEqualTo,GreaterThan, GreaterOrEqualTo, LessThan and LessOrEqualTo.If both din0 and din1 are signed, the comparison is a signed operation. Ifboth are unsigned, the comparison is an unsigned operation, otherwise thesign_type parameter is used to determine the type of the comparisonoperation. The polarity of the output port is controlled by an enumeratedparameter fout_type (ActiveHigh, ActiveLow).This part is equivalent to an n-bit comparator; where n is the width of the ports din0 and din1.The implementation is controlled via the synthesis script.FunctionIf fout_function is EqualTo:fout = 1= 0if din0 value is equal to din1 valueotherwiseIf fout_function is NotEqualTo:fout = 1= 0if din0 value is not equal to din1 valueotherwiseIf fout_function is GreaterThan:fout = 1= 0if din0 value is greater than din1 valueotherwiseIf fout_function is GreaterOrEqualTo:fout = 1= 0if din0 value is greater than or equal to din1 valueotherwiseIf fout_function is LessThan:fout = 1= 0if din0 value is less than din1 valueotherwiseIf fout_function is LessOrEqualTo:fout = 1= 0if din0 value is less than or equal to din1 valueotherwise134<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!