mirror of
https://github.com/myhdl/myhdl.git
synced 2024-12-14 07:44:38 +08:00
better error message for unsupported types
This commit is contained in:
parent
a07a9ce322
commit
20b9a4af22
@ -160,9 +160,9 @@ def _analyzeGens(top, absnames):
|
||||
for n, c in zip(f.func_code.co_freevars, f.func_closure):
|
||||
obj = _cell_deref(c)
|
||||
if isinstance(g, _AlwaysComb):
|
||||
# print type(obj)
|
||||
assert isinstance(obj, (int, long, _Signal)) or \
|
||||
_isMem(obj) or _isTupleOfInts(obj)
|
||||
if not (isinstance(obj, (int, long, _Signal)) or _isMem(obj) or _isTupleOfInts(obj)):
|
||||
info = "File %s, line %s: " % (tree.sourcefile, tree.lineoffset)
|
||||
raise ConversionError(_error.UnsupportedType, n, info)
|
||||
tree.symdict[n] = obj
|
||||
tree.name = absnames.get(id(g), str(_Label("BLOCK"))).upper()
|
||||
v = _FirstPassVisitor(tree)
|
||||
|
Loading…
x
Reference in New Issue
Block a user