main content

export custom reference design -凯发k8网页登录

this example shows how to export a custom reference design from an soc model by using the soc blockset™ socexportreferencedesign function. after creating the custom reference design, use the hdl workflow advisor tool from hdl coder™ to integrate an ip core into the reference design.

design task

this example uses the model soc_image_rotation to generate a custom reference design. the model has an external memory and an fpga dut. the dut contains an axi4 master read interface and an axi4 master write interface to perform read and write operations to memory. for a full description of the model, see . the model also uses an to read and write the external memory from the host computer.

when exporting a custom reference design from this model, the dut is not included in the reference design, and the interface to the dut is exposed. after generating the reference design you can integrate your custom ip by using the hdl workflow advisor tool. your custom ip must have the same interface as the fpga algorithm block.

open the model to view the structure of the top model and the interface to the fpga algorithm block.

open_system('soc_image_rotation');

prepare soc model for custom reference design export

in simulink®, open the configuration parameters dialog box by clicking model settings on the modeling tab. then, follow these steps to prepare the soc model for custom reference design export.

  1. on the left pane, select hardware implementation.

  2. set hardware board to match your board (if you are not using xilinx zynq zc706 evaluation kit).

  3. under feature set for selected hardware board, select soc blockset.

  4. expand target hardware resources, select fpga design (top-level), and then select include axi manager ip for host-based interaction.

  5. because this soc model does not include a processor, clear include processing system. if your soc model includes a processor subsystem, then select this option.

  6. in the ip core clock frequency (mhz) box, specify the ip core clock frequency in mhz.

export custom reference design

export the custom reference design for model soc_image_rotation by using the socexportreferencedesign function. enter this code at the matlab command prompt:

socexportreferencedesign('soc_image_rotation')

the function generates these artifacts in the current folder.

  • board registration files

  • reference design registration file

  • ip repository

  • design files

  • constraint files

add generated design folder to path

to add the generated design folder to the matlab path, right click on the folder named top-model-refdesign, where top-model is the name of the top soc model. then select add to path>selected folders and subfolders.

integrate ip core into custom reference design

after generating a reference design, you can save it or pass it to the ip developer for integration and deployment of their ip on a board.

this example uses the image rotation dut as the ip. this reference design is suitable for any ip that has the same interface.

open_system('soc_image_rotation_fpga');

in simulink, right-click the imagerotation block and select hdl code>hdl workflow advisor to open the hdl workflow advisor tool.

  1. in step 1.1, set target workflow to ip core generation and target platform to the platform generated by the socexportreferencedesign function. for this example, select xilinx zynq zc706 evaluation kit (generated by soc blockset).

  2. click run this task.

  3. select step 1.2. note that reference design is set to design exported from 'soc_image_rotation' model.

  4. in step 1.3, set the target interface by connecting each port in your ip to the corresponding port in the reference design.

5. continue with the remaining steps of the hdl workflow advisor tool.

6. in step 4.2, under generate a software interface model with ip core driver blocks for c code generation, select skip this task. for this example, select this value because the generated reference design includes only fpga and memory components. if the reference design also includes a processing system, clear this option.

7. in step 4.4, set programming method to jtag.

8. connect the host machine to a zc706 board, and follow the workflow to load your full design (ip and custom reference design) to the fpga.

9. use axi manager to interact with the fpga from the host machine.

conclusion

this example covered these workflows.

  • generating a reference design from an soc model

  • integrating an ip core into the generated reference design using the hdl workflow advisor tool

see also

|

related topics

网站地图