-
Notifications
You must be signed in to change notification settings - Fork 134
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
RTL codegen "line" error #1403
RTL codegen "line" error #1403
Conversation
Should be fixed properly.
…ions which target mode they're inteded for.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix! Two minor comments.
dace/codegen/targets/rtl.py
Outdated
elif isinstance(arr, data.Stream): | ||
# TODO Streams are currently unsupported, as the proper behaviour has to be implemented to avoid deadlocking. | ||
line: str = "// Unsupported read from ({}) variable '{}' from stream '{}'".format( | ||
dst_node.in_connectors[edge.dst_conn].ctype, edge.dst_conn, edge.src_conn) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it not better to raise a verbose error or at least a warning in this case? It will likely produce erroneous code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An error no, as the RTL backend is used by the Xilinx backend, which may hit this case without using the faulty code. I've further elaborated this in the comment. I've added the information as a warning as well.
""" | ||
Two sequential RTL tasklets connected through a memlet. | ||
""" | ||
# Copyright 2019-2023 ETH Zurich and the DaCe authors. All rights reserved. | ||
# | ||
# Two sequential RTL tasklets connected through a memlet. | ||
# | ||
# It is intended for running simulation xilinx targets. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The previous docstring version is the standard way of defining a file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, right, I see! I've reverted them "back" to this format! :)
The issue in #1383 uncovered flaws in the RTL samples:
The specific error arose when an RTL tasklet tried to access a stream during simulation mode, which is currently not supported in simulation mode, as the produced Verilator code does not mimick actual behaviour, resulting in a deadlock. Current "fix" is to emit this shortcoming as a comment in the resulting code. It should not always fail (hence the emission to a comment), since the RTL code generator is partially used by the Xilinx code generator, leading to said faulty code to be omitted anyways; at least for the samples/tests that reach this point.
Some of the samples did correctly use
with dace.config.set_temporary()
, forcing them to run as they're inteded to be run. This has been changed, so all RTL samples run in their respective modes. Furthermore, some of the samples did not have this requirement mentioned in their comments, which has also been fixed.