hdl.ast: fix Const.cast(Cat(...)) handling for signed numbers.
This commit is contained in:
parent
82d35fb932
commit
6780c838b2
2 changed files with 12 additions and 1 deletions
|
|
@ -727,7 +727,8 @@ class Const(Value):
|
|||
width = 0
|
||||
for part in obj.parts:
|
||||
const = Const.cast(part)
|
||||
value |= const.value << width
|
||||
part_value = Const(const.value, unsigned(const.width)).value
|
||||
value |= part_value << width
|
||||
width += len(const)
|
||||
return Const(value, width)
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue