CPEN 311: Digital Systems Design Slide Set 19: High-Level Synthesis
CPEN 311: Digital Systems Design Slide Set 19: High-Level Synthesis
CPEN 311: Digital Systems Design Slide Set 19: High-Level Synthesis
2016/2017 Term 1
The intention is not to give you enough information to design something using HLS
But, when you get out in the real world, you might have to make the call: for a given
project, should your company stick with current hardware-design tools, or should you
try this “new” approach? This slide set will give you a start at gathering information to
make this decision.
HLS
Software Hardware
(FPGA)
Page 4
Software Hardware
Specification is C, but
ideally, you get the
benefits of a custom
hardware design (speed,
power)
Slide Set 19, Page 8
FPGA High-level synthesis: Current state of the art
Xilinx and Altera both offer HLS tools:
Xilinx Vivado HLS Many people think this stands
Altera OpenCL SDK for “Low Level Virtual
Machine” but the designers
insist it is not an acronym.
Used by many companies
including Apple, Nvidia, etc.
This is very difficult, and to get good results, today, the designer has to
either use a predetermined framework to specify parallelism (eg.
Altera’s OpenCL compiler) or give “hints” (eg. Xilinx’s pragmas).
Can also specify that some parameters are to follow AXI standard:
- Lite, Stream, Master
Can control block-level interfaces:
Pragmas to control:
Loop unrolling
Loop pipelining
Managing the amount of hardware resources used
Vectorize code (SIMD parallelism)
Optimize DRAM accesses
http://legup.eecg.toronto.edu
Supported Unsupported
Functions Dynamic Memory
Arrays, Structs Recursion
Global Variables
Pointer Arithmetic
Floating Point
This is challenging:
1. Circuit looks nothing like the original software
• Software is fundamentally different than hardware
• Many transformations and optimizations performed during HLS
Software
• Self-contained workstation (gdb).
int i;
}
• Debug in isolation
• Easy to reproduce
HLS
RTL-level bugs Run C/RTL co-simulation
Simulation
• C/RTL mismatch on workstation.
HLS Generated
RTL
• HLS tool errors or usage
errors
Hardware
Hardware • I/O data patterns internals of FPGA)
• Interaction timing
Other Other • Hard to reproduce, or
Hardware Hardware require long run times These are the
difficult bugs
Run
HLS
2. Stop and
retrieve
1. Execute
and record
3. Debug using the recorded data
On-Chip Memory
Step through
source code
Breakpoints
The intention is not to give you enough information to design something using HLS
But, when you get out in the real world, you might have to make the call: for a given
project, should your company stick with current hardware-design tools, or should you
try this “new” approach? This slide set will give you a start at gathering information to
make this decision.