Skip to content

Commit

Permalink
analysis: add support for Eq
Browse files Browse the repository at this point in the history
  • Loading branch information
ekiwi committed Jan 9, 2024
1 parent c38ecb1 commit eea9f20
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions rtlrepair/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,8 @@ def eval_const_expr(node: vast.Node, const_values: dict[str, int], widths: [vast
value = eval_const_expr(node.left, const_values, widths) // eval_const_expr(node.right, const_values, widths)
elif isinstance(node, vast.Land):
value = eval_const_expr(node.left, const_values, widths) & eval_const_expr(node.right, const_values, widths)
elif isinstance(node, vast.Eq):
value = int(eval_const_expr(node.left, const_values, widths) == eval_const_expr(node.right, const_values, widths))
elif isinstance(node, vast.Ulnot):
value = ~eval_const_expr(node.left, const_values, widths)
elif isinstance(node, vast.Width):
Expand Down

0 comments on commit eea9f20

Please sign in to comment.