0

我已经在运行 Ubuntu 20.04.3 LTS 的计算机上安装了 Vivado 2019.2。我已经在 Google colab 上安装了 hls4ml。

我还指定了 Vivado 安装路径

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

我在这里按照教程:hls4ml github教程/我运行的代码

https://github.com/fastmachinelearning/hls4ml

但是,当我运行命令时: hls_model.build() 我得到以下输出

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

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.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
4

1 回答 1

0

如果您在某个 Google 云服务器上运行 Colab,那么您将无法使用 Vivado HLS(因为它没有安装在那里,而只是安装在您的计算机上)。

也许您可以尝试在本地运行 Colab(指南)。

另请检查此github 问题

编辑

现在我看到了。我认为您错误地将 Vivado 路径附加到 PATH,因为它缺少路径分隔符:

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

请检查这个stackoverflow 问题

于 2021-11-03T10:21:20.093 回答