The attached reference design is intended to show a possible flow to integrate VHDL and Verilog code generated with the AutoESL tool from a C source into a System Generator design using the Blackbox flow.
The System Generator design contains a SysGen FFT block v8.0 using the AXI-Stream interface. A simple peak search module has been written in C and synthesized with AutoESL with two different interfaces:
The SysGen design incorporates both HDL modules using the HDL Blackbox flow. The peak search modules determine the maximum power value of the frequency spectrum (FFT result) and its frequency index and output both values.
Design Languages (HDL/SW): System Generator, AutoESL
Design Reference Document
The attached ZIP file contains the System Generator model and both AutoESL projects including the generated Verilog and VHDL files.
The C souce has been synthesized with AutoESL (project C_AP_FIFO/proj_peak_search) using the directive:
set_directive_interface -mode ap_fifo "peak_search" data_in
to generate an AP_FIFO interface to connect to the FFT block within SysGen.
In a second AutoESL project (C_AXI_STREAM/proj_peak_search_axis), the same C source code has been slightly modified to allow the generation of an AXI_Stream interface. The following lines have been added:
The design needs to be implemented within AutoESL after HL synthesis to generate a pcore which contains a wrapper file with the AXI_Stream interface adapter (directory C_AXI_STREAM\proj_peak_search_axis\solution1_axi_stream\impl\pcores\peak_search_top_v1_00_a\synhdl\verilog). All of the files contained in this directory, along with the *.v and *.dat files generated within directory C_AXI_STREAM\proj_peak_search_axis\solution1_axi_stream\impl\verilog need to be copied to an include directory within the SysGen design (SysGen\verilog_peak_search_axi_stream), since they need to be added to the Matlab setup script for the Blackbox modules (SysGen\peak_search_top_wrap_config.m). AutoESL currently only allows generation of Verilog HDL code for AXI_Stream interface support. A CR has been filed to get the support for VHDL as well.
A Verilog wrapper file has been written to comply with all System Generator blackbox module restrictions:
The necessary connections between the FFT block AXI_Stream IF and the AutoESL blackbox modules using AP_FIFO and AXI_Stream interfaces can be reviewed within the System Generator design module. Simulation within System Generator shows that both AutoESL generated HDL designs generate the same (expected) results.
The following screenshot shows the System Generator design, containing the FFT block and both AutoESL generated modules, incorporated as lackboxes.