Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with generating bit while building simple adder #51

Open
mohammedrafi-sk opened this issue Mar 19, 2022 · 11 comments
Open

Issue with generating bit while building simple adder #51

mohammedrafi-sk opened this issue Mar 19, 2022 · 11 comments

Comments

@mohammedrafi-sk
Copy link
Contributor

While building the simple_adder, I am seeing the below error.

--- stderr: simple_adder
ERROR: The following input file does not exist: /home/mr/krs_ws/build-kv260/simple_adder/simple_adder.xclbin
[ERROR]  : Cannot read BIT file - simple_adder.bit
---
Finished <<< simple_adder [1min 49s]

I figured the error was due to the unavailability of board part xilinx.com:k26c:part0:1.1 in Vivado 2021.2 as shown in the log v++_simple_adder.log, I downloaded all the available file revisions for this board from the catalogue, but I only see 1.2 and 1.3 but no 1.1

Further, If I rebuild, the error goes away, but there was no xclbin/bit in ~/krs_ws/build-kv260/simple_adder.
But, if I do rebuild by adding --cmake-clean-cache flag to force CMake configure, I see the error every time.
colcon build --merge-install --build-base=build-kv260 --install-base=install-kv260 --mixin kv260 --packages-select simple_adder --cmake-clean-cache

I am seeing the same issue with offloaded_doublevadd too.

@vmayoral
Copy link
Contributor

Hello @mohammedrafi-sk, this is known to work but I think some of the Xilinx/AMD folks should be able to help you debugging this in your setup and see if there's some additional input to incorporate in the documentation.

Friendly ping to @kevinkeryk, @jasvinderkhurana, @surender009 and @giuliocorradi.

@jasvinderkhurana
Copy link
Collaborator

@mohammedrafi-sk, were you able to resolve this, if not let work together on this.

@sachinkum0009
Copy link

Hi,

I am also facing this issue related to Cannot read BIT file for simple_adder as well as offloaded_double_vadd while building.

Can you please help to solve this issue?

Thanks

@sachinkum0009
Copy link

@vmayoral @jasvinderkhurana

Can you please help to solve this issue?

Thanks 🙏

@jasvinderkhurana
Copy link
Collaborator

@sachinkum0009,

Can you please let me know if you are using Ubuntu flow or petalinux flow? I will check this at my end and will let you know.

@sachinkum0009
Copy link

Thanks, I am using Petalinux flow with KV260.

@vmayoral
Copy link
Contributor

vmayoral commented Jan 6, 2024

Hello folks,

I haven't reproduced this myself and without further investigation I can only make a few guesses.


Shortly, It's highly like that folks are missing some dependencies, drivers (or devices in Vitis/Vivado) versions, as hinted by @mohammedrafi-sk. This is likely causing the Vivado build effort to fail, and thereby ending up in the errors you see reported above (which I fully agree, could be more descriptive however we didn't have time to improve things on this regard in the past).


@mohammedrafi-sk your report at #51 (comment) is pretty good. It'd be useful to add to that additional details (Vitis/Vivado suite being used? 2021.2?) for reproducibility so that we could give it a try if the issues persists. Shortly, from what I've understood, several of you are experiencing:

--- stderr: simple_adder
ERROR: The following input file does not exist: /home/mr/krs_ws/build-kv260/simple_adder/simple_adder.xclbin
[ERROR]  : Cannot read BIT file - simple_adder.bit
---
Finished <<< simple_adder [1min 49s]

I'll break this a bit further and explain it:

[ERROR]  : Cannot read BIT file - simple_adder.bit

This error is reporting that the simple_adder.bit file wasn't found in the build process. This is likely caused because Vivado is encountering an error. Such an error can be found in the Vivado log files generated in the corresponding build stage directory: /home/mr/krs_ws/build-kv260/simple_adder/. The way to debug this out would be to search in the vivado files generated under that directory and find the error.

ERROR: The following input file does not exist: /home/mr/krs_ws/build-kv260/simple_adder/simple_adder.xclbin

This error line is related to the one above. Since the .bit file wasn't generated, the .xclbin file (which is a container for the .bit) is neither generated and thereby, things similarly fail.

Bottom line,

Look for the error found in the Vivado log files generated in the corresponding build stage directory: /home/mr/krs_ws/build-kv260/simple_adder/.

Forward looking, the error handling can certainly improve. given the complexity of the layers integrated in here (ROS 2 build system (ament), ROS 2 build tools (colcon), Vitis, Vivado and plenty of Tcl logic) it's probably a good idea to consider reporting better errors (e.g. outputing in stdout the errors from Vivado, instead of keeping them in log files). This would however require additional development.

@sachinkum0009
Copy link

Thanks for the suggestions. I am using Vivado 2022.1

This is the error message in log

[3.511s] ERROR: [v++ 82-29] Exception in main() -- ERROR: [v++ 84-18] Application not found: 'vitis_hls'.
[3.511s] 
[3.511s] INFO: [v++ 60-1662] Stopping dispatch session having empty uuid.
[3.511s] INFO: [v++ 60-1653] Closing dispatch client.
[3.525s] -- CMD_ERROR: 1

It is quite weird, as the vitis_hls is available through cli.

>>echo $XILINX_VIVADO 
/media/asus/backup/Xilinx/Vivado/2022.1
>>echo $XILINX_VITIS 
/media/asus/backup/Xilinx/Vitis/2022.1
>>echo $XILINX_HLS 
/media/asus/backup/Xilinx/Vitis_HLS/2022.1

I am attaching the log file.

log file

@vmayoral
Copy link
Contributor

vmayoral commented Jan 6, 2024

[3.511s] ERROR: [v++ 82-29] Exception in main() -- ERROR: [v++ 84-18] Application not found: 'vitis_hls'.
[3.511s] 
[3.511s] INFO: [v++ 60-1662] Stopping dispatch session having empty uuid.
[3.511s] INFO: [v++ 60-1653] Closing dispatch client.
[3.525s] -- CMD_ERROR: 1

Seems to be a path issue then in the corresponding environmental variables for the ament (CMake) build process. In principle. Last time I tested, the KRS tooling dealt with that.

@sachinkum0009
Copy link

Thanks for the response. TBH I am not much sure about the issue, any suggestion on how to solve it.

@sachinkum0009
Copy link

Hi,
Can you please help with this issue?
Is it more related to installation of Vivado? Should I try different version?

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants