DSP Builder for Intel® FPGAs (Advanced Blockset): Handbook

ID 683337
Date 12/04/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

4.1. Creating a Fibonacci Design from the DSP Builder Primitive Library

Start DSP Builder in MATLAB

Procedure

  1. From an open Simulink model click DSP Builder > New Model Wizard.
    Note: When you open a model, DSP Builder produces a model_name_params.xml file that contains settings for the model. You must keep this file with the model.
  2. Specify the following New Model Settings:
    • Fixed
    • Fixed-point Primitive (simple)
    • my_fibonacci
  3. Browse to an appropriate output directory.
  4. Click Generate.
  5. In the Simulink Library Browser, click DSP Builder Advanced Blockset > Primitive > Primitive Basic Blocks .
  6. Open the my_fibonacci generated model.
  7. Open the dut > prim subsystem, which has a ChannelIn and ChannelOut block.
  8. Drag and drop two SampleDelay blocks into your model.
    Note: Specify the data type because this design contains loops and DSP Builder cannot determine the type if one of the inherit data options is set.
    Figure 44. Updated Fibonacci Subsystem
  9. Select both of the SampleDelay blocks and point to Rotate and Flip on the popup menu and click Flip Block to reverse the direction of the blocks.
  10. Drag and drop Add and Mux blocks into your model.
  11. Drag and drop a Const block. Double-click the block and:
    1. Select Specify via Dialog for Output data type mode.
    2. For Output type enter ufix(1).
    3. For Scaling enter 1
    4. For Value enter 1.
    5. Click OK.
  12. Connect the blocks.
  13. Double-click on the second SampleDelay block (SampleDelay1) to display the Function Block Parameters dialog box and change the Number of delays parameter to 2.
  14. Double-click on the Add block to display the Function Block Parameters dialog box and set the parameters.
    1. For Output data type mode, select Specify via Dialog .
    2. For Output type enter ufix(120).
    3. For Output scaling value enter 2^-0
    4. For Number of inputs enter 2.
    5. Click OK.