Xcell Journal Issue 78: Charge to Market with Xilinx 7 Series ...
Xcell Journal Issue 78: Charge to Market with Xilinx 7 Series ...
Xcell Journal Issue 78: Charge to Market with Xilinx 7 Series ...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
XPLANATION: FPGA 101<br />
Parameter Binary format (base, b = 2) Decimal format (base, b = 10)<br />
need <strong>to</strong> take care of certain things before finalizing the<br />
design. We need <strong>to</strong> examine if numbers from the data set<br />
can be very close in floating-point representation, very big<br />
or very small. Let us consider the roots of a quadratic equation<br />
as an example. The two roots, α and β are given by the<br />
following two formulas:<br />
α=(-b+√(b^2-4ac))/2a ; β= (-b-√(b^2-4ac))/2a<br />
Clearly b^2 and 4ac will be subject <strong>to</strong> rounding errors<br />
when they are floating-point numbers. If b^2 >> 4ac,<br />
then √(b^2 ) = |b|. Additionally, if b > 0, β will give some<br />
result but α will give zero as result because the terms in its<br />
numera<strong>to</strong>r get canceled. On the other hand, if b < 0, then β<br />
will be zero while α will give some result. This is erroneous<br />
design, since roots that become zero unintentionally<br />
because of floating-point calculations, when used later in<br />
some part of the design, can easily cause a faulty output.<br />
One way <strong>to</strong> prevent such erroneous cancellation is <strong>to</strong><br />
multiply the numera<strong>to</strong>r and denomina<strong>to</strong>r of α and β by<br />
-b-√(b^2-4ac). Doing so will give us:<br />
α’ = 2c/(-b-√(b^2-4ac)) ; β’= 2c/(-b+√(b^2-4ac))<br />
Now, when b>0, we should use α’ and β <strong>to</strong> get the values of<br />
the two roots and when b