How to add TCL script to HDL Coder IP Core generation
조회 수: 4 (최근 30일)
I use HDL Coder IP Core flow and I need to add a TCL script that I have to open Vivado, add the new IP core to the existing project and implement with it.
I tried "add additional sources" option in HDL Coder to point to my TCL script there. The TCL script was never executed.
Of course I can run the script manually after IP core is generated, but I want to have a pushbutton solution, such that I only start IP Core generation and everything else would work automatically.
One possible way would be to do everything (including IP core generation) in a TCL script, but I don't know how to make HDL coder to generate IP core in a TCL script.
Thank you, alex
Wang Chen 2023년 9월 18일
To clarify, "add additional sources" option (in HDL Workflow Advisor "Generate RTL code and IP core" step) is intended to include additional source files into the generated IP core. It will not execute the supplied Tcl script.
If you want to "I have to open Vivado, add the new IP core to the existing project and implement with it.", have you tried to create a custom reference design in IP core generation workflow? The steps to select a reference design (existing project), and run build tasks are exactly doing what you described. After you create a custom reference design, there are also callback functions you could use to execute your customized Tcl script.
Example of the IP core generation workflow with reference deisgn/bitstream build tasks; https://www.mathworks.com/help/hdlcoder/ug/getting-started-with-hardware-software-codesign-workflow-for-zynq-ultrascale-mpsoc-devices.html
Document/Examples of creating a custom reference design to include your existing project into the workflow:
Callback functions available when define custom reference design (where you could execute your tcl):
Alternatively, if you only want to run IP core generation (without the later build steps). You could Export a script from HDL Workflow Advisor, and run the IP core generaiton workflow in command-line. This way you could then execute your Tcl using command line, so you can have one combined script to do both IP core generation and the Tcl execution.
추가 답변 (1개)
Kiran Kintali 2023년 9월 17일
편집: Kiran Kintali 님. 2023년 9월 18일
In the HDL Workflow Advisor for Generic ASIC/FPGA workflow, in the FPGA Synthesis and Analysis > Create Project task, in the Additional source files field, enter the full path to the Tcl file manually, or by using the Add button. When HDL Coder™ creates the project, the specified Tcl script is executed to apply the synthesis project settings.
For your usecase custom reference design creation in IP core generation workflow would be more suitalbe. This workflow has steps for selecting a custom reference design and run build tasks which is what you are looking for. After Custom reference design creation you can execute additional callback functions to run Tcl scripts of your choice. See this example for additional details..
Can you reach out to tech support for additional features related to tcl specification? Thanks.