What is High-Level Synthesis (HLS), and how does it differ from traditional HDL design?

High-Level Synthesis (HLS) is an advanced design methodology in digital hardware development that allows you to describe hardware functionality using high-level programming languages like C, C++, or SystemC, instead of traditional hardware description languages (HDLs) like Verilog or VHDL.




Definition of High-Level Synthesis (HLS)

HLS tools automatically generate synthesizable RTL (Register Transfer Level) code (usually in Verilog or VHDL) from high-level algorithmic descriptions. These tools optimize the design for area, speed, power, and throughput, just like a human RTL designer would.


Difference Between HLS and Traditional HDL

AspectTraditional HDL (Verilog/VHDL)HLS (C/C++/SystemC)
Design LevelLow-level (cycle-accurate RTL)High-level (algorithmic/functional)
LanguageVerilog, VHDLC, C++, SystemC
Control Over TimingFull control over clock cycles and FSMAbstracted; compiler decides timing
Development SpeedSlower; manual state machine designFaster; uses software-style coding
DebuggingMore difficult; waveform-levelEasier; similar to debugging C/C++
Reuse of AlgorithmsLimitedEasy to reuse existing C/C++ code
Optimization EffortManual pipelining, unrolling, resource useTool-guided via pragmas/directives
Best ForFine-tuned, performance-critical blocksQuick prototyping, algorithm-heavy logic

How HLS Works (Flow)

  1. Write Algorithm: Describe functionality in C/C++ or SystemC.

  2. Apply Pragmas: Guide the tool for loop unrolling, pipelining, etc.

  3. HLS Tool (e.g., Vivado HLS):

    • Translates code to RTL.

    • Allows simulation and verification.

  4. Export RTL: Resulting Verilog/VHDL is synthesized just like traditional RTL.

  5. Implement in FPGA or ASIC.


Pros of HLS

  • Much faster development and iteration.

  • Easier debugging and simulation.

  • Faster time-to-market.

  • Reuse of existing software algorithms.


Cons of HLS

  • Less control over timing and resources.

  • May generate inefficient RTL if not guided properly.

  • Learning curve for writing hardware-friendly C/C++.

  • Not ideal for control-heavy designs like FSMs.


Popular HLS Tools

ToolVendorLanguage Support
Vivado HLS / Vitis HLSXilinxC, C++
Intel HLS CompilerIntel (Altera)C++
Catapult HLSSiemens (Mentor)SystemC
LegUpUniversity of TorontoC

 Example

C (HLS style):

c

void add(int A[100], int B[100], int C[100]) { #pragma HLS PIPELINE for (int i = 0; i < 100; i++) { C[i] = A[i] + B[i]; } }

Equivalent Verilog (simplified):

verilog

always @(posedge clk) begin if (valid) begin C[i] <= A[i] + B[i]; i <= i + 1; end end

 Summary

  • HLS allows you to design hardware using software-like languages and methods.

  • It's best for algorithm-heavy or data path-focused blocks.

  • It does not replace RTL in every case—RTL is still better for finely optimized or control-heavy logic.

评论

此博客中的热门博文

How To Connect Stm32 To PC?

What is a Look-Up Table (LUT) in an FPGA, and how does it work?

Detailed Explanation of STM32 HAL Library Clock System