hdl,back,sim: accept .as_signed() and .as_unsigned() on LHS.
These operators are ignored when they are encountered on LHS, as the signedness of the assignment target does not matter in Amaranth. .as_signed() appears on LHS of assigns to signed aggregate fields.
This commit is contained in:
parent
90fcbfc357
commit
da26f1c915
4 changed files with 20 additions and 0 deletions
|
|
@ -279,6 +279,8 @@ class _LHSValueCompiler(_ValueCompiler):
|
|||
return gen
|
||||
|
||||
def on_Operator(self, value):
|
||||
if value.operator in ("u", "s"):
|
||||
return self(value.operands[0])
|
||||
raise TypeError # :nocov:
|
||||
|
||||
def on_Slice(self, value):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue