Floating Point Arithmetic Final
Floating Point Arithmetic Final
c
aaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa a
c
c
?
aaa
We would like to express our deep gratitude to Dr.Rahul Dubey, who not
only gave us this opportunity to work on this project, but also guided and
encouraged us throughout the course. He and TAs of the course, Neeraj
Chasta and Purushothaman, patiently helped us throughout the project. We
take this as opportunity to thank them and our classmates and friends for
extending their support and worked together in a friendly learning
environment. And last but not the least, we would like to thank non-teaching
lab staff who patiently helped us to understand that all kits were working
properly.
By
Subhash C
A N Manoj Kumar
Parth Goswami
?
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa a
c
c
?
aaa
?
m. PROBLEM STATEMENT 4
2. ABSTRACT 4
3. INTRODUCTION 5
6. VERIFICATION PLAN m4
m . CONCLUSION 26
m2. REFERENCES 27
m3. APPENDIX 28
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa a
c
c
?
aaa
?
?
?
? :
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa a
c
c
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa a
c
c
m
This gives us an exponent range from
Emin = -m26 to = m27.
The fractional part must not be confused with the significand, which is m plus
the fractional part. The leading m in the significand is implicit. When
performing arithmetic with this format, the implicit bit is usually made explicit.
To determine the value of a floating point number in this format we use the
following formula:
??
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa a
c
c
integer bit) and the maximum biased exponent allowed in the specified format
(for example, 255m for the single-real format).
?
Since NaNs are non-numbers, they are not part of the real number line.
The encoding space for NaNs in the FPU floating-point formats is shown above
the ends of the real number line. This space includes any value with the
maximum allowable biased exponent and a non-zero fraction. (The sign bit is
ignored for NaNs.)
The IEEE standard defines two classes of NaNs: quiet NaNs (QNaNs) and
signaling NaNs (SNaNs). A QNaN is a NaN with the most significant fraction bit
set; an SNaN is a NaN with the most significant fraction bit clear. QNaNs are
allowed to propagate through most arithmetic operations without signaling an
exception. SNaNs generally signal an invalid-operation exception whenever they
appear as operands in arithmetic operations.
Though zero is not a special input, if one of the operands is zero, then
the result is known without performing any operation, so a zero which is
denoted by zero exponent and zero mantissa. One more reason to detect zeroes
is that it is difficult to find the result as adder may interpret it to decimal value
m after adding the hidden ¶m to mantissa.
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa a
c
c
The initial mantissa is of 23-bits wide. After adding the hidden ¶m ,it is
24-bits wide.
First the exponents are compared by subtracting one from the other and
looking at the sign (MSB which is carry) of the result. To equalize the
exponents, the mantissa part of the number with lesser exponent is shifted
right d-times. where ¶d is the absolute value difference between the exponents.
The sign of larger number is anchored. The xor of sign bits of the two
numbers decide the operation (addition/ subtraction) to be performed.
Now, as the shifting may cause loss of some bits and to prevent this to
some extent, generally the length of mantissas to be added is no longer 24-bits.
In our implementation, the mantissas to be added are 25-bits wide. The two
mantissas are added (subtracted) and the most significant 24-bits of the
absolute value of the result form the normalized mantissa for the final packed
floating point result.
Again xor of anchor-sign bit and the sign of result forms the sign bit for
the final packed floating point result.
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa a
c
c
aa a
?
??????????????????????Fig 2. Architecture for floating point adder/subtractor
?
?
?
"? ??
The single precision floating point algorithm is divided into three main
parts corresponding to the three parts of the single precision format. The first
part of the product which is the sign is determined by an exclusive OR function
of the two input signs. The exponent of the product which is the second part is
Calculated by adding the two input exponents. The third part which is the
significand of the product is determined by multiplying the two input
significands each with a ´m concatenated to it.
Below figure shows the architecture and flowchart of the single precision
floating point multiplier. It can be easily observed from the Figure that 24x24
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa a
c
c
bit integer multiplier is the main performance bottleneck for high speed and
low power operations. In FPGAs, the availability of the dedicated m8xm8
multipliers instead of dedicated 24x24 bit multiply blocks further complicates
this problem.
aaa
"?
? #??
??
?
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa a
c
c
aaa
$%? &?
The additional advantage of the proposed CIFM is that floating point
multiplication operation can now be performed easily in FPGA without any
resource and performance bottleneck. In the single precision floating point
multiplication, the mantissas are of 23 bits. Thus, 24x24 bit (23 bit mantissa
+m hidden bit) multiply operation is required for getting the intermediate
product. With the proposed architecture, the 24x24 bit mantissa multiplication
can now be easily performed by passing it to the dedicated 24x24 bit multiply
block, which will generate the product with its dedicated small 4x4 bit
multipliers.
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa a
c
c
This forms the first level of computation. The partial sums thus
generated are added again in block 5 & 6 (parallel adders), working in parallel
by appropriately choosing the combination of half adders and full adders. This
forms the second level of computation. The partial sums generated in the
second level are utilized in the third level (blocks 7 &8) to arrive at the final
product. Hence, there is a significant reduction in the power consumption
since the whole computation has been hierarchically divided to levels. The
reason for this stems from the fact that power is provided only to the level that
is involved in computation and thereby rendering the remaining two levels
switched off (by employing a control circuitry). Working in parallel significantly
improves the speed of the proposed multiplier.
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa a
c
c
aaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa a
c
c
î?' ? ?
?
()?*$+??
?
? We chose inputs to various sub blocks such that all the logic blocks are aaa
ensured to function properly. All the internal signals are verified as follows.
?
*%,-?*$+??
?
We gave various random inputs even without knowing what the order of
the inputs means and then analyzed the same inputs to know the expected
output and then verified using simulation as shown below.
?
?
? ./?0' ?
?
BFAE6666 -m.3625
4423m762 652.3654
C479C8 -999.m25
C25m 83m -52.258
ZERO
7FC NOT A NUMBER
7F8 +VE INFINITY
FF8 -VE INFINITY
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa a
c
c
a??
#
? ?
?
?
?
?
#
? ?
?
?
? ? #?
#?
aa a
?
?
a
?
a
? a a
?
a
?
a
? aaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa a
c
c
aa
a
?#? ? ?
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa a
c
c
aaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa a
c
c
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa a
c
c
aa a
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa a
c
c
aaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa a
c
c
aaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa a
c
c
aaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa a
c
c
.#
??
?
======================================================================
* Final Report *
======================================================================
Final Results aaa
RTL Top Level Output File Name : TOPMODULE.ngr
Top Level Output File Name : TOPMODULE
Output Format : NGC
Optimization Goal : Speed
Keep Hierarchy : NO
Design Statistics
# IOs : 38
Cell Usage:
# BELS : 3944
# GND :3
# INV : mm
# LUTm : 48
# LUT2 : 4m7
# LUT3 : 628
# LUT4 : m777
# MULT_AND : mm2
# MUXCY : 375
# MUXF5 :2 7
# MUXF6 :2
# MUXF7 :m
# VCC :3
# XORCY : 36
# RAMS :2
# RAMBm6_S36 :2
# Clock Buffers :m
# BUFGP :m
# IO Buffers : 37
# IBUF :5
# OBUF : 32
======================================================================
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa a
c
c
TIMING REPORT
======================================================================
Clock Information:
------------------
No clock signals found in this design aaa
Asynchronous Control Signals Information:
----------------------------------------
No asynchronous control signals found in this design
Timing Summary:
---------------
Speed Grade: -5
Timing Detail:
--------------
All values displayed in nanoseconds (ns)
======================================================================
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa a
c
c
?
?
?
1?? .
?
? ? ./?
?
? aa a
?
?
?
?
?
?
?
? .
??
?
?
?
?
?
?
?
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa a
c
c
2?
?
?
We have successfully implemented arithmetic (adder/subtract &
multiplication) for IEEE single precision floating point numbers on FPGA, and
displayed the corresponding output values on LCD as well. aa
a
?
??
?
?
? ?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa a
c
c
?
?
?
?
m. www.xilinx.com
2. Himanshu Thapliyal, Hamid R. Arabnia, A.P Vinod , # # aaa
$%&'
3. Computer arithmetic: Algorithms and hardware design by Behrooz Parhami
4. Computer arithmetic algorithm by Isreal Koren
5. www.randelshofer.ch/fhw/gri/lcd-init for some part of code in lcd
interfacing.
6.a http://babbage.cs.qc.cuny.edu/IEEE-754/Decimal.html for java applets
regarding floating point conversions
7. HITACHI HD4478 _LCD data sheet.
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa a
c
c
?????????????????????????????????????????? ?
endmodule
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa a
c
c
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa a
c
c
// MODULE FOR ADDER INPUT BIT LENGTH IS 24 & OUTPUT BIT LENGTH
IS 36
module ADDER24IN36OUT(input [23: X, input [23: Y, output [35: W);
wire [35: XM = { m2b ,X };
wire [35: YM = { Y,m2b };
assign W = XM + YM;
endmodule
// MODULE FOR ADDER INPUT BIT LENGTH IS 36 & OUTPUT BIT LENGTH
IS 48
module ADDER36IN48OUT(input [35: X, input [35: Y, output [47: W);
wire [47: XM = { m2b ,X };
wire [47: YM = { Y,m2b };
assign W = XM + YM;
endmodule
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa a
c
c
// MODULE FOR ADDER INPUT BIT LENGTH IS 8 & OUTPUT BIT LENGTH IS
m6
module ADDER8INm6OUT(input [7: X, input [7: Y, input [7: Z, output
[m5: W);
wire [m5: XM = { 8b ,X };
wire [m5: YM = { 4b ,Y,4b };
wire [m5: ZM = { Z,8b };
assign W = XM + YM + ZM;
endmodule
// MODULE FOR ADDER INPUT BIT LENGTH IS m6 & OUTPUT BIT LENGTH
IS 24
module ADDERm6IN24OUT(input [m5: X, input [m5: Y, input [m5: Z,
output [23: W);
wire [23: XM = { 8b ,X };
wire [23: YM = { 4b ,Y,4b };
wire [23: ZM = { Z,8b };
assign W = XM + YM + ZM;
endmodule
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa a
c
c
wire fsm,fcm,fs2,fc2,fs3,fc3,fs4,fc4,fs5,fc5,fc6,fc7;
// INSTANTIATION OF PARTIAL PRODUCTS BY ORDER
PARTIALPRODUCTS pp
(A,B,pp ,pp m,pp 2,pp 3,ppm ,ppmm,ppm2,ppm3,pp2 ,pp2m,pp22,pp23,pp3 ,
pp3m,pp32,pp33);
assign P[ = pp ; aaa
// INSTANTIATION OF HALF ADDERS & FULL ADDERS BY PORT NAMES
// LEVEL m
HA ham (.a(pp m),.b(ppm ),.s(P[m),.c(hcm));
FA fam (.a(ppmm),.b(pp2 ),.cin(hcm),.s(fsm),.cout(fcm));
HA ha2 (.a(pp2m),.b(pp3 ),.s(hs2),.c(hc2));
HA ha3 (.a(pp3m),.b(hc2),.s(hs3),.c(hc3));
HA ha4 (.a(pp 3),.b(ppm2),.s(hs4),.c(hc4));
FA fa2 (.a(ppm3),.b(pp22),.cin(hc4),.s(fs2),.cout(fc2));
HA ha5 (.a(pp23),.b(pp32),.s(hs5),.c(hc5));
HA ha6 (.a(pp33),.b(hc5),.s(hs6),.c(hc6));
// LEVEL 2
HA ha7 (.a(pp 2),.b(fsm),.s(P[2),.c(hc7));
FA fa3 (.a(fcm),.b(hs2),.cin(hc7),.s(fs3),.cout(fc3));
FA fa4 (.a(hs3),.b(fs2),.cin(fc3),.s(fs4),.cout(fc4));
FA fa5 (.a(hc3),.b(fc2),.cin(hs5),.s(fs5),.cout(fc5));
// LEVEL 3
HA ha8 (.a(fs3),.b(hs4),.s(P[3),.c(hc8));
HA ha9 (.a(fs4),.b(hc8),.s(P[4),.c(hc9));
FA fa6 (.a(hc9),.b(fc4),.cin(fs5),.s(P[5),.cout(fc6));
FA fa7 (.a(fc6),.b(fc5),.cin(hs6),.s(P[6),.cout(fc7));
HA ham (.a(hc6),.b(fc7),.s(P[7));
endmodule
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa a
c
c
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa a
c
c
end
endmodule
?
' ???'
?
? .??
?
?
?
.???
?
module CONVERSION(input [3m: A, output [63: COUT);
wire [3: A8 = A [3m:28;
wire [3: A7 = A [27:24;
wire [3: A6 = A [23:2 ;
wire [3: A5 = A [m9:m6;
wire [3: A4 = A [m5:m2;
wire [3: A3 = A [mm:8;
wire [3: A2 = A [7:4;
wire [3: Am = A [3: ;
SUBBLOCK blockm(.IN(Am),.OUT(COUTm));
SUBBLOCK block2(.IN(A2),.OUT(COUT2));
SUBBLOCK block3(.IN(A3),.OUT(COUT3));
SUBBLOCK block4(.IN(A4),.OUT(COUT4));
SUBBLOCK block5(.IN(A5),.OUT(COUT5));
SUBBLOCK block6(.IN(A6),.OUT(COUT6));
SUBBLOCK block7(.IN(A7),.OUT(COUT7));
SUBBLOCK block8(.IN(A8),.OUT(COUT8));
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa a
c
c
assign COUT = {
COUT8,COUT7,COUT6,COUT5,COUT4,COUT3,COUT2,COUTm };
endmodule
aa a
module SUBBLOCK(input [3: IN, output reg [7: OUT);
always @ (IN)
begin
case(IN)
4b : OUT <= 8b mm ;
4b m: OUT <= 8b mm m;
4b m : OUT <= 8b mm m ;
4b mm: OUT <= 8b mm mm;
4b m : OUT <= 8b mm m ;
4b m m: OUT <= 8b mm m m;
4b mm : OUT <= 8b mm mm ;
4b mmm: OUT <= 8b mm mmm;
4bm : OUT <= 8b mmm ;
4bm m: OUT <= 8b mmm m;
4bm m : OUT <= 8b m m;
4bm mm: OUT <= 8b m m ;
4bmm : OUT <= 8b m mm;
4bmm m: OUT <= 8b m m ;
4bmmm : OUT <= 8b m m m;
4bmmmm: OUT <= 8b m mm ;
default: $display("Sir, please enter the correct value...");
endcase
end
endmodule
wire Zm = ~(|INm);
wire Z2 = ~(|IN2);
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa a
c
c
FLOATINGPOINTARITHEMATIC
FPARITH(.INm(INm),.IN2(IN2),.ZeroAdd(ZA),.cntr(CNTR),.OUT(FPOUT));
CONVERSION CONV(.A(FPOUT),.COUT(OUTm));
endmodule
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa a
c
c
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa a
c
c
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa a