forked from steveicarus/iverilog
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix left shift of unsized constants in sef-determined context.
When left-shifting unsized constants in self-determined contexts, the constant value is normally pared down to its minimum required width. But this practically guarantees loss of bits. Instead, detect this special case and give the unsized constant a width of an integer. Still allow for the super-special case that the shifted value and the shift amount are constants. In that case, the result width (and value) can be calculated precisely and there is no need to resort to default widths.
- Loading branch information
1 parent
5ab0c20
commit a12a6d9
Showing
3 changed files
with
63 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters