HDL Coder natively supports integrating external HDL code into HDL Coder designs via its BlackBox architecture, available on both Subsystem and Model Reference blocks. To choose the BlackBox architecture:
- Select the block you wish to use your own HDL code for
- Right-click on it: choose HDL Code>HDL Block Properties
- Change the Architecture to 'BlackBox'
- Configure the block and its interface as desired
This is just a bare sketch of the process. Much more detail is available in the published documentation. Search for 'Black Box' and 'BlackBox' in the HDL Coder documentation for more detail.
Program Xilinx FPGAs Using HDL Coder with Xilinx System Generator for DSP
HDL Coder supports code generation for Simulink models constructed with a combination of blocks from Simulink and Xilinx-specific blocksets from System Generator for DSP. The System Generator Subsystem block in HDL Coder enables you to include models built with System Generator in Simulink as subsystems. HDL Coder uses System Generator to generate code from the subsystem blocks and integrates the complete design into synthesizeable HDL. This approach enables you to:
- Use HDL Coder area and speed optimizations for Simulink components.
- Leverage Xilinx-optimized blocks in System Generator.
- Reuse legacy models built with Xilinx-specific blocks for simulation and code generation.
In summary, please consider using blackbox way of integrating RTL into HDLCoder or use combination of XSG and Simulink blocks as shown in the paper above.