Generate Board-Independent HDL IP Core for Microchip Platforms - MATLAB & Simulink (original) (raw)

This example shows how to generate an HDL IP core for generic Microchip platform. You generate an HDL IP core for an LED blinking model, then integrate this HDL IP core into a target Microchip platform of your choice. You can generate a board-independent custom IP core to use in an embedded system integration environment, such as Microchip Libero SoC tool.

Generate Board-Independent IP Core

To generate a board-independent custom IP core for an LED blinking model, follow these steps:

1. Open the hdlcoder_led_blinking_4bit model and click the led_counter subsystem.

open_system('hdlcoder_led_blinking_4bit');

2. Set the path to the Microchip Libero SoC synthesis tool by using the hdlsetuptoolpath function:

hdlsetuptoolpath('ToolName', 'Microchip Libero SoC', 'ToolPath', liberopath);

Use your own Libero SoC installation path when executing the command. See HDL Language Support and Supported Third-Party Tools and Hardware for the latest supported version of the synthesis tool.

3. Open the HDL Workflow Advisor for the subsystem representing the device under test (DUT). For the LED blinking model, the led_counter subsystem represents the DUT. In the Set Target > Set Target Device and Synthesis Tool task:

4. In the Set Target > Set Target Interface task, select a Target Platform Interface value for each port, and then click Apply. You can map each DUT port to the AXI4-Lite or AXI4 interface. For more information about these interfaces, see Target Platform Interfaces.

If you do not want to map the DUT ports to AXI4 slave interfaces, map them to external Port interfaces.

5. In the HDL Code Generation > Set HDL Options, click HDL Code Generation Settings to set HDL configuration parameters.

6. In the HDL Code Generation > Generate RTL Code and IP Core task, you can specify these options:

After running the task, HDL Coder generates the IP core files in the output folder in the IP core folder field, including the HTML documentation. To view the IP core report, click the link in the message window.

Insert HDL IP Core in Microchip Libero SoC SmartDesign Project

To import generated HDL IP Core into Libero SmartDesign Project, follow the below process.

1. Open Microchip Libero Project in which HDL Coder IP needs to be imported. In the Project pane, click Execute Script.

2. In Script file, choose the led_count_hw_ip.tcl file from N:/Libero_Projects/hdl_prj/ipcore/led_count_ip_v1_0 folder. Click Run.

3. After running led_count_hw_ip.tcl script, HDL Coder IP gets imported into Microchip Libero Project.

4. Instantiate HDL Coder IP by drag and drop of led_count_ip module into SmartDesign.

5. Connect led_count_ip Clock, Reset ports and Interfaces to other IP's Ports and interface as per requirement. This will form a complete Reference Design.

6. Now, You can follow next steps of implementation in Microchip Libero Tool.

Conclusion and Further Exploration

This example shows how to generate an HDL IP core using a generic microchip platform and integrate the generated IP core into Libero SmartDesign. You can integrate other IP cores into Libero SmartDesign and use these cores to create a complete reference design.

See Also