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
Support for "disable" keyword for self-disabling blocks #1083
Comments
I wonder what kind of circuit you'd expect this to synthesize into. |
@Kmanfi Can you provide a little more context as to when/why myhdl outputs the disable statement? Is it intended to be synthesisable? |
Verilog doesn't have the Example 1 This example illustrates how a block disables itself. begin: l_foo
rega = regb;
disable l_foo;
regc = rega; // This assignment will never execute.
end Example 2 This example shows the disable statement being used within a named block in a manner similar to a forward goto. The next statement executed after the disable statement is the one following the named block. begin: l_foo
... statements ...
if (a == 0)
disable l_foo;
... statements ...
end // End of named block (l_foo).
// Continue with code following named block. Example 3 - Early return from a task isn't generally synthesisable. Example 4 This example shows the disable statement being used in an equivalent way to the two statements begin: l_break
for (i = 0; i < n; i = i+1) begin: l_continue
if (a == 0) // In C terminology, "continue" the loop
disable l_continue;
... statements ...
if (a == b) // In C terminology, "break" from the loop
disable l_break;
... statements ...
end // End of l_continue
end // End of l_break Examples 5 and 6 are not generally synthesisable. The example given by @Kmanfi is equivalent to Could Yosys support the |
Steps to reproduce the issue
Python http://www.myhdl.org produce code like the example below.
Expected behavior
Should read.
Actual behavior
ERROR: syntax error, unexpected TOK_ID
The text was updated successfully, but these errors were encountered: