Issue with vivado in batch mode while connecting to hw_server
Creating a tracker for the issue @tjshep is running into with using Vivado command line version for Prgramming bitfile.
Following doesn't work reliably fusesoc --cores-root . pgm lowrisc:systems:top_earlgrey_nexysvideo:0.1
Following changes make it work
- add open_project to *pgm.tcl
- disconnect_hw_server and connect_hw_server again.
Changes(in BOLD letters) below Change#1 : ~/.local/lib/python3.6/site-packages/edalize/vivado.py self.render_template('vivado-program.tcl.j2', self.name+"_pgm.tcl", {'part' : self.tool_options.get('part', ""), 'project_name' : self.name+'.xpr', 'bitstream_name' : self.name+'.bit'})
Change#2: ~/.local/lib/python3.6/site-packages/edalize/templates/vivado/vivado-program.tcl.j2 set bit {{ bitstream_name }} set part {{ part }} set prj {{ project_name }}
open_project ${prj} open_hw connect_hw_server disconnect_hw_server connect_hw_server
- @moidx
Two comments here:
- Please make sure you're using the latest version of edalize by running
pip3 install -U --user python-requirements.txt(run this from our repository toplevel). @towoe recently included code to make this process more robust. - If you have found a way to make the flashing more reliable, please propose it as a pull request upstream. The upstream file is at https://github.com/olofk/edalize/blob/master/edalize/templates/vivado/vivado-program.tcl.j2
The problem I tried to solve was that the programming failed because the Nexys board has two targets and if the first was not the correct one, it instantly exited. This resulted in a behavior in which the programming was mostly successful. Could you post the error message of a failed attempt?
The latest edalize version fixes the issue.
- pip3 install -U --user -r python-requirements.txt
Hi Tobias , the prior error was as well related to two targets and first one being not the one JTAG is connected, so it errored out.
On Sun, Oct 6, 2019 at 11:01 PM Tobias Woelfel [email protected] wrote:
The problem I tried to solve was that the programming failed because the Nexys board has two targets and if the first was not the correct one, it instantly exited. This resulted in a behavior in which the programming was mostly successful. Could you post the error message of a failed attempt?
— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/lowRISC/opentitan/issues/354?email_source=notifications&email_token=ALULWCIELVTISQWUUMEJXK3QNLGDNA5CNFSM4I5VLT5KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAPDQ4I#issuecomment-538851441, or mute the thread https://github.com/notifications/unsubscribe-auth/ALULWCP5L3EYX774XK3YV6DQNLGDNANCNFSM4I5VLT5A .
I think we are ok with this setup and can close this issue if there are no more concerns
I ran into this issue again when preparing CI, and we need a solid solution there. Seems like Vivado 2018.3 needs two tries to actually connect to a target if it's freshly connected to a PC. I'm working on a more robust flashing script right now which retries this process.
(Note: I get the same behavior in the GUI and in a batch script, so it's not really related to our scripting, but more a workaround for a Vivado bug.)
A PR with an updated script is submitted at https://github.com/olofk/edalize/pull/61; I also updated the ot branch which we use in our python-requirements.txt. All people (and CI) running pip3 install -U -r python-requirements.txt will now a version of edalize containing this change.