• Что бы вступить в ряды "Принятый кодер" Вам нужно:
    Написать 10 полезных сообщений или тем и Получить 10 симпатий.
    Для того кто не хочет терять время,может пожертвовать средства для поддержки сервеса, и вступить в ряды VIP на месяц, дополнительная информация в лс.

  • Пользаватели которые будут спамить, уходят в бан без предупреждения. Спам сообщения определяется администрацией и модератором.

  • Гость, Что бы Вы хотели увидеть на нашем Форуме? Изложить свои идеи и пожелания по улучшению форума Вы можете поделиться с нами здесь. ----> Перейдите сюда
  • Все пользователи не прошедшие проверку электронной почты будут заблокированы. Все вопросы с разблокировкой обращайтесь по адресу электронной почте : info@guardianelinks.com . Не пришло сообщение о проверке или о сбросе также сообщите нам.

Does FPGA have Floating-Point?

Lomanu4 Оффлайн

Lomanu4

Команда форума
Администратор
Регистрация
1 Мар 2015
Сообщения
1,481
Баллы
155
Yes, FPGAs can perform floating-point arithmetic, but with important considerations.


Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.



1. Floating-Point Support in FPGAs

Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

do not natively execute floating-point operations like CPUs/GPUs. Instead, they implement them in three ways:

A. Soft Floating-Point (Software Emulation)
Uses logic elements (LUTs) to implement IEEE 754 floating-point math.

Pros:

  • Works on any FPGA.
  • Flexible (supports single/double precision).

Cons:

  • Slow (high latency, ~10-100x slower than fixed-point).
  • Consumes lots of logic resources.

B. Hard Floating-Point (Dedicated DSP Blocks)
Some FPGAs (e.g., Intel

Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

, Xilinx

Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

) have hardened

Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

blocks with floating-point support.

Pros:

  • Much faster than soft FP.
  • Lower power than emulated FP.

Cons:

Only available in high-end FPGAs.

C. External Floating-Point Cores (Licensed IP)
Vendors (Xilinx,

Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

,

Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

) offer optimized FP cores (e.g., Xilinx Floating-Point IP).

Pros:

  • Better performance than soft FP.
  • Configurable (precision, pipelining).

Cons:

Requires extra licensing (costly).

2. Floating-Point vs. Fixed-Point on FPGAs


Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.



3. When to Use Floating-Point on FPGAs?
✅ Needed Applications:

  • High-dynamic-range math (e.g., radar, AI inference).
  • Algorithms requiring IEEE 754 compliance (e.g., MATLAB-generated code).
  • When ease of development outweighs performance loss.

❌ Avoid Floating-Point If:

  • You need low latency (use fixed-point).
  • Targeting low-cost FPGAs (no hardened FP support).
  • Working on real-time signal processing (fixed-point is more efficient).

4. How to Implement Floating-Point on FPGAs?
Option 1: Using Vendor IP (Xilinx/Intel)


  • Xilinx: Floating-Point Operator IP (supports add, multiply, divide).
  • Intel: DSP Builder Advanced Blockset (for MATLAB/Simulink).

Option 2: Custom RTL (Verilog/VHDL)
Example (32-bit FP adder in Verilog):


verilog
module fp_adder (
input [31:0] a, b,
output [31:0] result
);
// IEEE 754 single-precision addition logic
// (Typically uses vendor IP or open-source FPU)
endmodule

Open-source FPUs:

  • FloPoCo (Flexible Floating-Point Cores).
  • Berkeley HardFloat (RISC-V-compatible FPU).

Option 3: High-Level Synthesis (HLS)
Write in C/C++ (Xilinx Vitis HLS, Intel OpenCL):


cpp
#pragma HLS PIPELINE
float fp_multiply(float a, float b) {
return a * b; // Auto-converted to FPGA logic
}

5. Performance Considerations

  • Pipelining: Essential for throughput (FP ops take multiple cycles).
  • Precision Trade-offs: Use half-precision (FP16) if possible.
  • Memory Bandwidth: Floating-point data consumes 2-4x more memory than fixed-point.

6. Best Practices

  1. Use fixed-point if possible (better resource usage).
  2. Use hardened FPUs if available (Stratix 10, Versal ACAP).
  3. Benchmark soft vs. hard FP for your application.

Final Verdict


  • Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

    can do floating-point, but often fixed-point is better for efficiency.
  • High-end FPGAs (Xilinx Versal, Intel Agilex) have dedicated FP support.
  • For AI/ML, consider new AI-optimized FPGAs with tensor cores.


Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

 
Вверх Снизу