3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-08-04 02:10:24 +00:00

fix width detection of array querying function in case and case item expressions

I also removed the unnecessary shadowing of `width_hint` and `sign_hint`
in the corresponding case in `simplify()`.
This commit is contained in:
Zachary Snow 2021-12-15 18:15:09 -07:00 committed by Zachary Snow
parent 60c3ea367c
commit 7608985d2c
5 changed files with 50 additions and 2 deletions

View file

@ -1087,6 +1087,11 @@ void AstNode::detectSignWidthWorker(int &width_hint, bool &sign_hint, bool *foun
}
break;
}
if (str == "\\$size" || str == "\\$bits" || str == "\\$high" || str == "\\$low" || str == "\\$left" || str == "\\$right") {
width_hint = 32;
sign_hint = true;
break;
}
if (current_scope.count(str))
{
// This width detection is needed for function calls which are