Jump to content


Can i use florting-point computing in my project?


  • You cannot reply to this topic
2 replies to this topic

#1 mmw119

    Member

  • Members
  • PipPip
  • 7 posts

Posted 02 March 2009 - 06:53 AM

Hi,

I have noticed that all the examples in "..\Impulse\CoDeveloper3\Examples\Embedded" are using the INT-type compute, so whether the code below:

double a, b, result;

a = 0.003568;
b = 2.3458925455;

result = a / b;// or a * b, a + b, a - b

can get the correct result by the FPGA. Because my project is going to run with MicroBlaze.
BTW, my Impulse version is V3.30, EDK version is 9.2i, and ise version is 9.2i.

Thanks!



#2 RalphBodenner

    Advanced Member

  • Admin
  • PipPipPip
  • 348 posts

Posted 03 March 2009 - 11:32 AM

Yes, floating-point is supported on Xilinx devices using IP libraries from Xilinx. To use floating-point, open the Project Options dialog and select the Generate tab, setting the options as follows:
  • Make sure a Xilinx-based Platform Support Package is selected
  • Check the "Use floating-point library" box
  • If using type 'double', check the "Allow double-precision types and operators" box
Then simply write your Impulse C code using the standard C floating-point types and operators.
Ralph Bodenner
Impulse Accelerated Technologies, Inc.

#3 mmw119

    Member

  • Members
  • PipPip
  • 7 posts

Posted 03 March 2009 - 04:12 PM

QUOTE (RalphBodenner @ Mar 3 2009, 11:32 AM) <{POST_SNAPBACK}>
Yes, floating-point is supported on Xilinx devices using IP libraries from Xilinx. To use floating-point, open the Project Options dialog and select the Generate tab, setting the options as follows:
  • Make sure a Xilinx-based Platform Support Package is selected
  • Check the "Use floating-point library" box
  • If using type 'double', check the "Allow double-precision types and operators" box
Then simply write your Impulse C code using the standard C floating-point types and operators.


Thanks a lot!





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users