How to add TCL script to HDL Coder IP Core generation

7 ビュー (過去 30 日間)
Alex Aronov
Alex Aronov 2023 年 9 月 15 日
コメント済み: Alex Aronov 2023 年 9 月 22 日
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.
Any suggestions?
Thank you, alex

採用された回答

Wang Chen
Wang Chen 2023 年 9 月 18 日
Hi Alex,
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.
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.
Thanks,
Wang
  1 件のコメント
Alex Aronov
Alex Aronov 2023 年 9 月 22 日
Hi Wang,
Sorry for the delay in my reply. Thank you for your suggestion. It seams to me that it would do what I need. I need to verify it in my project but I would need few more days before I can get to do this.
Thanks,
alex

サインインしてコメントする。

その他の回答 (1 件)

Kiran Kintali
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.

製品


リリース

R2023a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by