URL
https://opencores.org/ocsvn/an-fpga-implementation-of-low-latency-noc-based-mpsoc/an-fpga-implementation-of-low-latency-noc-based-mpsoc/trunk
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 42 |
Rev 48 |
Line 17... |
Line 17... |
end
|
end
|
i2s = tmp[15:0];
|
i2s = tmp[15:0];
|
end
|
end
|
endfunction //i2s
|
endfunction //i2s
|
|
|
No newline at end of file
|
No newline at end of file
|
|
/*
|
|
function [159:0]f2s;
|
|
input real f; reg s;reg b; integer i; integer j;integer a; real tmp; begin
|
|
s=0;
|
|
b=0;
|
|
f2s={160{1'b0}};
|
|
if(f<0)begin
|
|
s=1;
|
|
f=-f;
|
|
end
|
|
f=f*1000;
|
|
a=f;
|
|
i=0;
|
|
j=0;
|
|
while(a>0)begin
|
|
j=j+1;
|
|
|
|
if((a%10)!=0 || j>3 || b)begin
|
|
//f2s=(f2s & ~(8'hFF<< (i*8)));
|
|
f2s=f2s + (((a%10)+48)<< i*8);
|
|
i=i+1;
|
|
b=1;
|
|
end
|
|
a=a/10;
|
|
|
|
if(j==3 && b==1)begin
|
|
//f2s=(f2s & ~(8'hFF<< (i*8)));
|
|
f2s=f2s + ("."<< i*8);
|
|
i=i+1;
|
|
j=j+1;
|
|
end
|
|
end
|
|
if(s) begin
|
|
//f2s=(f2s & ~(8'hFF<< (i*8)));
|
|
f2s=f2s + ("-"<< i*8);
|
|
|
|
end
|
|
end
|
|
endfunction //f2s
|
|
*/
|
|
|
No newline at end of file
|
No newline at end of file
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.