Build and Run the FPGA Emulation Image for Fast Compile
The FPGA emulation image is a fast-running compile that can help you achieve functionally correct code. For detailed information, refer to
Types of FPGA Compilation in the
Intel® oneAPI Programming Guide
. You can compile a basic FPGA sample to the FPGA emulator target by performing the following:
Not all oneAPI sample projects use
CMake
. The
README.md
file for each sample specifies how to build the sample. For samples that use
CMake
, Intel® recommends you refer to the
CMake Tools Extension for Visual Studio Code article that is maintained by Microsoft*.
- Under thesection, hover over the Compile Flow sample and click+to create a project.You are promoted to select a folder to save the project.
- Save the project. A new VS Code session is now open with the Compile Flow sample.
- Open a terminal in VS Code.
- Run thecdcommand to move to the top-level directory of the newly created project.
- Run the following command to create a directory namedbuild:mkdir build
- Run thecdcommand to move to the newly createdbuilddirectory.
- Run the following command to build the sample. The project build files are written into thebuilddirectory.cmake ..
- Run the following command to select the emulation build target:make fpga_emuRefer to the FPGA code sampleREADMEfile to find the rightmaketarget.You should now observe an executable namedcompile_flow.fpga_emuin your directory. Use this file as the emulator executable for the design.
- Execute the following command to run the emulator executable:./compile_flow.fpga_emu