mirror of
https://github.com/YosysHQ/yosys
synced 2025-08-26 21:16:03 +00:00
Added proper === and !== support in constant expressions
This commit is contained in:
parent
11ffa78677
commit
ecc30255ba
9 changed files with 79 additions and 15 deletions
|
@ -728,6 +728,8 @@ void AstNode::detectSignWidthWorker(int &width_hint, bool &sign_hint)
|
|||
case AST_LE:
|
||||
case AST_EQ:
|
||||
case AST_NE:
|
||||
case AST_EQX:
|
||||
case AST_NEX:
|
||||
case AST_GE:
|
||||
case AST_GT:
|
||||
width_hint = std::max(width_hint, 1);
|
||||
|
@ -1113,12 +1115,14 @@ RTLIL::SigSpec AstNode::genRTLIL(int width_hint, bool sign_hint)
|
|||
}
|
||||
|
||||
// generate cells for binary operations: $lt, $le, $eq, $ne, $ge, $gt
|
||||
if (0) { case AST_LT: type_name = "$lt"; }
|
||||
if (0) { case AST_LE: type_name = "$le"; }
|
||||
if (0) { case AST_EQ: type_name = "$eq"; }
|
||||
if (0) { case AST_NE: type_name = "$ne"; }
|
||||
if (0) { case AST_GE: type_name = "$ge"; }
|
||||
if (0) { case AST_GT: type_name = "$gt"; }
|
||||
if (0) { case AST_LT: type_name = "$lt"; }
|
||||
if (0) { case AST_LE: type_name = "$le"; }
|
||||
if (0) { case AST_EQ: type_name = "$eq"; }
|
||||
if (0) { case AST_NE: type_name = "$ne"; }
|
||||
if (0) { case AST_EQX: type_name = "$eq"; }
|
||||
if (0) { case AST_NEX: type_name = "$ne"; }
|
||||
if (0) { case AST_GE: type_name = "$ge"; }
|
||||
if (0) { case AST_GT: type_name = "$gt"; }
|
||||
{
|
||||
int width = std::max(width_hint, 1);
|
||||
width_hint = -1, sign_hint = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue