07-23-2020 04:21 AM
Hello,
I'm currently developing a TCL library to handle vivado. In this library (CLI mode) I can export .bit and .ltx when implementation is finished with any problem. However some job colleagues want to use vivado GUI instead of TCL library, so I need to give them an alternative of this step. I thought to add this step in a hook tcl script loaded as: "set_property STEPS.WRITE_BITSTREAM.TCL.POST $dir/tcl/usr/vds_bitstream_post.tcl [get_runs impl_1]"
I call export command (that works on CLI mode) in vds_bitstream_post.tcl but I realize that .ltx is not exported to destiny folder because the .ltx file is created later than bitstream and later that this script is executed.
I tried to add in vds_bitstream_post.tcl (before export command) the following commands:
open_run impl_1
write_debug_probes "../../bin/${design_name}.ltx"
But I get an error : ERROR: [runtcl-1] ERROR: [Common 17-69] Command failed: Run 'impl_1' has not been launched. Unable to open
So I decided to add an earlier command:
wait_on_run impl_1
And I get the next error : ERROR: [runtcl-1] ERROR: [Common 17-69] Command failed: Run 'impl_1' is not active
How could call the export TCL function I created from vivado GUI?
09-02-2020 11:54 PM
Hello @driesd
I found the solution in a some way you said.
When write_bitstream.tcl.post is executed, the project is executing at impl_1 folder.
If I write something like the follow command never exports .ltx file:
write_debug_probes "../../wave_gen.ltx"
However, if If write that command and then copy the file to bin folder, it works:
write_debug_probes "wave_gen.ltx"
Thanks.
Best regards.
08-10-2020 09:14 AM
Hi @jocorso
all runs in Vivado project mode are running in their own context. You don't need to open the run as it is actually still running in that context.
So, I think it should just work if your Tcl script runs:
write_debug_probes "../../bin/${design_name}.ltx"
and this bin folder 2 levels up (../../bin) from the impl_1 runs folder.
Best regards
Dries
08-14-2020 02:00 AM
Hi @driesd
As you said, in the beginning I only had that line. Due to the unexpected result, i tried to wait until open implementation design to get ltx, but vivado tells me that there is no implementation....
My target in that flow design is: when I create a bitstream and ltx file associated, i want to copy to ../../bin/ folder to save that version of .bit and .ltx files.
If I execute my TCL library and I export from another place (not from STEPS.WRITE_BITSTREAM.TCL.POST) it works.
But if try to export both files from STEPS.WRITE_BITSTREAM.TCL.POST .bit is the only file that is exported.
As STEPS.WRITE_BITSTREAM.TCL.POST is called, I understand is executed later than bitstream (and .ltx) is created, but it looks like this is not real...
08-14-2020 03:24 AM
Hi @jocorso
unfortunately I cannot reproduce your issue with a small testcase based on the wavegen example design.
I've done exactly what you did and what I expected to work: WRITE_BITSTREAM.TCL.POST with just
write_debug_probes "../../wave_gen.ltx"
And it works fine: I see the LTX written to the project folder.
Please find my 2020.1 testcase in attachment. Could try that?
Could you share a testcase that shows the issue?
By the way, the LTX is automatically written to the impl_1 runs folder. You could actually just issue a copy in your Tcl using:
exec cp {*}[glob *.ltx] ../../bin/
Best regards
Dries
ps: I will be out the coming 10 days. Excuse for my delay in response
09-02-2020 11:54 PM
Hello @driesd
I found the solution in a some way you said.
When write_bitstream.tcl.post is executed, the project is executing at impl_1 folder.
If I write something like the follow command never exports .ltx file:
write_debug_probes "../../wave_gen.ltx"
However, if If write that command and then copy the file to bin folder, it works:
write_debug_probes "wave_gen.ltx"
Thanks.
Best regards.