Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions src/verilog/verilog_typecheck_expr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3508,9 +3508,7 @@ exprt verilog_typecheck_exprt::convert_binary_expr(binary_exprt expr)

return std::move(expr);
}
else if(
expr.id() == ID_and || expr.id() == ID_or || expr.id() == ID_xor ||
expr.id() == ID_xnor || expr.id() == ID_nand || expr.id() == ID_nor)
else if(expr.id() == ID_and || expr.id() == ID_or)
{
for(auto &op : expr.operands())
{
Expand All @@ -3524,6 +3522,13 @@ exprt verilog_typecheck_exprt::convert_binary_expr(binary_exprt expr)

return std::move(expr);
}
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);
}
Comment on lines +3525 to +3531
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.

else if(expr.id() == ID_verilog_value_range)
{
for(auto &op : expr.operands())
Expand Down
Loading