Prepare DUT For FIL Interface Generation
Files and Information Required for FIL Generation
For FIL Wizard
Have the following items or information ready:
Provide HDL code (either manually written or software generated) for the design you intend to test.
Select HDL files and specify the top-level module name.
Review port settings and make sure the FIL wizard identified input and output signals and signal sizes as expected.
If you are using Simulink®, provide a Simulink model ready to receive the generated FIL block.
Next Steps
If you are creating a FIL System object™, next go to Apply FIL System Object Requirements.
If you are creating a FIL block, next go to Apply FIL Block Requirements.
For HDL Workflow Advisor
You can generate code and run FIL from any suitable Simulink model.
Next Steps
If you are creating a FIL System object, next go to Apply FIL System Object Requirements.
If you are creating a FIL block, next go to Apply FIL Block Requirements.
Apply FIL System Object Requirements
The FIL Process for System Objects
The FIL wizard and HDL Coder™ HDL Workflow Advisor each perform the following actions:
Convert HDL code into System object inputs and outputs.
Walk you through identifying: FPGA device, source files, I/O ports, and port info.
Add logic to the device under test (DUT) to communicate with MATLAB®.
Generally, this logic is small and has minimal impact on the fit of your design onto the FPGA.
Create the programming file and a FIL System object.
Note
If a design does not fit in the device or does not meet timing goals, the software may not create a programming file. In this situation, you may see a warning that the design does not meet the timing goals, but it still generates a programming file, or you may get an error and no programming file. Either change your design, or use a different development board.
When FIL interface generation is complete, you can use the method
programFPGA
to load the programming file to the FPGA board. You
can also use this method to adjust runtime options and signal attributes.
When you are ready to begin, read through the following topics and make sure that your DUT adheres to the rules and guidelines described in each section:
When you are finished with these sections, next go to either System Object Generation with the FIL Wizard or FIL Simulation with HDL Workflow Advisor for MATLAB.
HDL Code Considerations for FIL System Objects
Follow these rules when using legacy or auto-generated HDL code for generating a FIL System object.
Category | Considerations |
---|---|
HDL files | All HDL names must be legal as defined in the VHDL® 1993 standard. |
Top-level design |
|
Inputs and outputs |
|
Clock |
|
Reset |
|
Clock enable |
|
DUT entity | All the ports at DUT level must specify a bit width. Using a variable as the bit width is not allowed. |
Clock edge | Clock the DUT input and output ports by positive edge. Negative edge is not allowed. |
Non-supported data types |
|
Non-supported constructs |
|
FIL-Specific Rules for System Objects
FIL input and output data set limits |
|
Output frame size |
Output frame size = Input frame size ×
|
MATLAB Code Considerations for FIL System Objects
MATLAB compatibilities |
HDL Verifier™ FIL simulation supports only the following data types:
|
Apply FIL Block Requirements
The FIL Process for Blocks
The FIL wizard and HDL Coder HDL Workflow Advisor each perform the following actions:
Convert HDL code into block signals with timing applied.
Walk you through identifying: FPGA device, source files, I/O ports, and port info.
Add logic to the device under test (DUT) to communicate with Simulink.
Generally, this logic is small and has minimal impact on the fit of your design onto the FPGA.
Create the programming file and a FIL simulation block.
Note
If a design does not fit in the device or does not meet timing goals, the software may not create a programming file. In this situation, you may see a warning that the design does not meet the timing goals, but it still generates a programming file, or you may get an error and no programming file. Either change your design, or use a different development board.
After FIL interface generation is complete, use the FIL block mask to load the programming file to the FPGA board. You can also adjust runtime options and signal attributes.
When you are ready to begin, read through the following topics and make sure that your DUT adheres to the rules and guidelines described in each section:
When you are finished with these sections, next go to Block Generation with the FIL Wizard or FIL Simulation with HDL Workflow Advisor for Simulink.
HDL Code Considerations for FIL Blocks
Follow these rules when using legacy or auto-generated HDL code for generating a FIL block.
Category | Considerations |
---|---|
HDL files | All HDL names must be legal as defined in the VHDL 1993 standard. |
Top-level design |
|
Inputs and outputs |
|
Clock |
|
Reset |
|
Clock enable |
|
DUT entity | All the ports at DUT level must specify a bit width. Using a variable as the bit width is not allowed. |
Clock edge | Clock the DUT input and output ports by positive edge. Negative edge is not allowed. |
Non-supported data types |
|
Non-supported constructs |
|
Simulink Model Considerations for FIL Blocks
Follow these rules for integrating the FIL block into your Simulink model.
Category | Considerations |
---|---|
General model rules |
|
Incompatibilities with Simulink |
HDL Verifier FIL simulation currently does not support the following:
|
Initialization |
RAM Initialization: Simulink starts from time 0 every time, which means the RAM in a Simulink model is initialized to zero for each run. However, this assumption is not true in hardware. RAM in the FPGA holds its value from the end of one simulation to the start of the next. If you have RAM in your design, the first simulation matches Simulink, but subsequent runs may not match. The workaround is to reload the FPGA bitstream before rerunning the simulation. To reload the bitstream, click the Load on the FIL block mask. |
FIL-Specific Rules for Blocks
FIL block settings rules |
|
FIL byte size limit |
|