mirror of
https://github.com/myhdl/myhdl.git
synced 2025-01-24 21:52:56 +08:00
Check for "augmented signal assignemnt" (unsupported).
This has no semantic equivalence in Verilog/VHDL --HG-- branch : 0.6-maint
This commit is contained in:
parent
3cf551cb65
commit
2b7f4696de
@ -739,7 +739,7 @@ class _AnalyzeVisitor(_ConversionMixin):
|
||||
elif access == _access.UNKNOWN:
|
||||
pass
|
||||
else:
|
||||
raise AssertionError
|
||||
self.raiseError(node, _error.NotSupported, "Augmented signal assignment")
|
||||
if n in self.ast.vardict:
|
||||
obj = self.ast.vardict[n]
|
||||
if access == _access.INOUT:
|
||||
|
23
myhdl/test/conversion/general/test_errors.py
Normal file
23
myhdl/test/conversion/general/test_errors.py
Normal file
@ -0,0 +1,23 @@
|
||||
from myhdl import *
|
||||
from myhdl import ConversionError
|
||||
from myhdl.conversion._misc import _error
|
||||
from myhdl.conversion import verify
|
||||
|
||||
|
||||
def sigAugmAssignUnsupported(z, a):
|
||||
@always(a)
|
||||
def logic():
|
||||
z.next += a
|
||||
return logic
|
||||
|
||||
def testSigAugmAssignUnsupported():
|
||||
z = Signal(intbv(0)[8:])
|
||||
a = Signal(intbv(0)[8:])
|
||||
try:
|
||||
verify(sigAugmAssignUnsupported, z, a)
|
||||
except ConversionError, e:
|
||||
assert e.kind == _error.NotSupported
|
||||
else:
|
||||
assert False
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user