Re: [myhdl-list] TypeError: Unexpected type
Brought to you by:
jandecaluwe
From: Josy B. <jos...@gm...> - 2015-03-24 16:06:32
|
> It gets another exception in the toVHDL conversion: > File "C:\Python27\lib\site-packages\myhdl\conversion\_toVHDL.py", line > 713, in BitRepr > return '"%s"' % bin(item, len(var)) > TypeError: object of type '_loopInt' has no len() > The fix for _toVHDL: in function 'def mapToCase(self, node):' insert elif isinstance(item, (int,long)): itemRepr = i in: if isinstance(item, EnumItemType): itemRepr = item._toVHDL() -> else: itemRepr = self.BitRepr(item, obj) Regards, Josy |