0

i have installed Vivado 2019.2 on my computer running on Ubuntu 20.04.3 LTS. I have installed hls4ml on Google colab.

i have also specified the Vivado installation path

os.environ['PATH'] = '/home/gegerin/Vivado_HLS/Vivado/2019.2/bin' + os.environ['PATH']

i followed the tutorial here: hls4ml github tutorial/ Code i ran

https://github.com/fastmachinelearning/hls4ml

However, when i run the command : hls_model.build() i get the following output

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Exception Traceback (most recent call last)

in ()
4 os.environ['PATH'] = '/home/gegerin/Vivado_HLS/Vivado/2019.2/bin' + os.environ['PATH']
5
----> 6 hls_model.build()
7
8 #Print out the report if you want

/usr/local/lib/python3.7/dist-packages/hls4ml/model/hls_model.py in build(self, reset, csim, synth, cosim, validation, export, vsynth)
548 found = os.system('command -v vivado_hls > /dev/null')
549 if found != 0:
--> 550 raise Exception('Vivado HLS installation not found. Make sure "vivado_hls" is on PATH.')
551
552 elif backend == 'Intel':

Exception: Vivado HLS installation not found. Make sure "vivado_hls" is on PATH.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
desertnaut
  • 57,590
  • 26
  • 140
  • 166
Geg
  • 19
  • 4
  • One thing I see is a missing separator between the new path for `PATH` and the existing ones. – Michael Butscher Nov 02 '21 at 16:48
  • Can you please point out where, i am very new to this and appreciate your help – Geg Nov 02 '21 at 16:53
  • The paths in the "PATH" environment variable are separated by `:` on Linux (better use "os.pathsep" for portability) Your new string for "PATH" directly prepends the existing paths so that it is merged with the following path to an invalid result. – Michael Butscher Nov 02 '21 at 21:01
  • I tried your suggestion, i ran: os.pathsep['PATH'] = '/home/gegerin/Vivado_HLS/Vivado/2019.2/bin' + os.pathsep['PATH'] and the result is : TypeError Traceback (most recent call last) in () 2 #This might take several minutes 3 import os ----> 4 os.pathsep['PATH'] = '/home/gegerin/Vivado_HLS/Vivado/2019.2/bin' + os.pathsep['PATH'] 5 6 hls_model.build() TypeError: string indices must be integers – Geg Nov 03 '21 at 02:12
  • You should work through the [Python tutorial](https://docs.python.org/3/tutorial/) if not done yet. – Michael Butscher Nov 03 '21 at 04:16

1 Answers1

0

If you are running Colab on some Google cloud server, then you won't have Vivado HLS available (since it's not installed there, but just locally on your machine).

Maybe you can try running Colab locally (guide).

Please also check this github issue.

Edit

Now I see it. I think you're wrongly appending the Vivado path to PATH, as it's missing the path separator:

os.environ['PATH'] += os.pathsep + '/home/gegerin/Vivado_HLS/Vivado/2019.2/bin'

Please check this stackoverflow question.

Stefano Ribes
  • 326
  • 1
  • 7
  • I also tried jupyter notebook ...so thats on my computer.. it should have worked but i get the same output i.e. vivado installation not found .. the GitHub link is routing to my question lol . I posted it , in hopes of solving this issue – Geg Nov 04 '21 at 02:13
  • Thank you so much. I tried what you said and it worked. God bless you man. i'll never forget this. – Geg Nov 04 '21 at 14:00