-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
Detect and disallow invalid connections in JSON #10
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
How would you like digitaljs to react in such a case? I would propose to show a warning/error (e.g. using a red shadow) on the affected wire (or port?), perhaps with a tooltip shown on mouseover stating the problem, and only allow This would then also be another step towards #2 by handling invalid connections introduced by changing bit lengths after initialization. |
Your proposition is fine. The information about the circuit correctness should also be accessible by code, for example by a property on HeadlessCircuit. |
If the input JSON has a connection between different-sized ports, DigitalJS will happily connect them, with disastrous results. For example, yosys2digitaljs currently generates such a bad JSON for:
The text was updated successfully, but these errors were encountered: