0% found this document useful (0 votes)
27 views3 pages

Ieeemul Thiru

Uploaded by

btmurugan
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX or read online on Scribd
0% found this document useful (0 votes)
27 views3 pages

Ieeemul Thiru

Uploaded by

btmurugan
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX or read online on Scribd
You are on page 1/ 3

IEEE MULTIPLICATION

module ieee(a, b,clk,ans);


input [31:0]a;
input [31:0]b;
input clk;
output reg [31:0]ans=0;
reg [46:0]tempans;
reg [46:0]temp;
integer expa;
integer expb;
integer expans;
integer i=0;
integer j=0;
integer k=46;
integer max;
always@( posedge clk)
begin
tempans=0;
for(i=0;i<=22;i=i+1)
begin
temp=0;
for(j=0;j<=22;j=j+1)
begin
temp[j]=b[i] & a[j];
end
temp=temp<<i;
tempans=tempans+temp;
end
expa=a[30:23];
expb=b[30:23];
expa=expa-127;
expb=expb-127;
expans=expa+expb-127;
for(k=46;k>22;k=k-1)
begin
if(tempans[k]==0)
tempans=tempans<<1;
else
k=21;
end
ans=0;
ans[22:0]=tempans[46:24];
ans[30:23]=expans;
if((a[31]==0 && b[31]==0) || (a[31]==1 && b[31]==1))
ans[31]=0;
else
ans[31]=1;
end

endmodule
IEEE Multiplication:
IEEE multiplication:

IEEEMUL_INT_EXPONENTIAL Project Status


Project File: ieeemul_int_exponential.ise Current State: Synthesized
 Errors:
Module Name: ieee No Errors

 Warnings:
Target Device: xc3s500e-4ft256 7 Warnings

 Updated:
Product Version: ISE, 8.1i Fri 2. Oct 09:50:18 2009
 
Device Utilization Summary (estimated values)
Logic Utilization Used Available Utilization
Number of Slices 722 4656 15%
Number of 4 input LUTs 1306 9312 14%
Number of bonded IOBs 97 190 51%
Number of GCLKs 1 24 4%

You might also like