Skip to content

Conversation

kroening
Copy link
Collaborator

@kroening kroening commented Oct 1, 2025

The Boolean ID_xor, ID_xnor, ID_nand, ID_nor are only ever generated as output by the Verilog type checker, and should never be inputs.

This removes the case that handles them as inputs.

The Boolean ID_xor, ID_xnor, ID_nand, ID_nor are only ever generated as
output by the Verilog type checker, and should never be inputs.

This removes the case that handles them as inputs.
Comment on lines +3525 to +3531
else if(
expr.id() == ID_xor || expr.id() == ID_xnor || expr.id() == ID_nand ||
expr.id() == ID_nor)
{
// should not occur -- only generated by the typechecker
PRECONDITION(false);
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The n_input_gatetype in the parser has all these - should the parser be changed as well, or am I misreading this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just the gate type, and doesn't turn into an expression before synthesis.

@tautschnig tautschnig merged commit 434a656 into main Oct 2, 2025
20 of 21 checks passed
@tautschnig tautschnig deleted the verilog-tc-boolean-cleanup branch October 2, 2025 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants