Re: [myhdl-list] TypeError: Unexpected type with toVerilog
Brought to you by:
jandecaluwe
From: Jan D. <ja...@ja...> - 2012-05-24 19:13:28
|
Looks like there is an upfront error check missing, could you post your code or a simplified version that exposes the error? On 05/24/2012 08:43 PM, Thoma HAUC wrote: > Hi Tom, > > I already simulated the design without any issue. > The exception raises only during verilog generation process. > > Thoma > >> Not sure but have you simulated it in MyHDL? Usually that will help >> expose problems better than trying to go directly to Verilog. >> >> On 05/21/2012 03:54 PM, Thoma HAUC wrote: >>> Hi, >>> >>> I am new to myHDL and it seems to be a powerful tool. >>> Today, I need some help to locate the reason of the below exception. >>> Because there are no clue to indicate the line of the issue, I am >>> currently blocked in my evaluation of myHDL. >>> >>> Thank you in advance. >>> >>> Thoma >>> >>> Traceback (most recent call last): >>> File "bidir_serial.py", line 209, in<module> >>> convert2verilog(bidir_serial) >>> File "bidir_serial.py", line 200, in convert2verilog >>> convert(toVerilog, architecture) >>> File "bidir_serial.py", line 194, in convert >>> converter(architecture, clr, clk, run, ld, datain, rdy, serialout) >>> File >>> "/usr/lib/python2.7/site-packages/myhdl/conversion/_toVerilog.py", >>> line 142, in __call__ >>> genlist = _analyzeGens(arglist, h.absnames) >>> File >>> "/usr/lib/python2.7/site-packages/myhdl/conversion/_analyze.py", >>> line 174, in _analyzeGens >>> v.visit(tree) >>> File "/usr/lib/python2.7/ast.py", line 241, in visit >>> return visitor(node) >>> File >>> "/usr/lib/python2.7/site-packages/myhdl/conversion/_analyze.py", >>> line 1078, in visit_Module >>> self.generic_visit(node) >>> File "/usr/lib/python2.7/ast.py", line 249, in generic_visit >>> self.visit(item) >>> File "/usr/lib/python2.7/ast.py", line 241, in visit >>> return visitor(node) >>> File >>> "/usr/lib/python2.7/site-packages/myhdl/conversion/_analyze.py", >>> line 1154, in visit_FunctionDef >>> self.visit(n) >>> File "/usr/lib/python2.7/ast.py", line 241, in visit >>> return visitor(node) >>> File >>> "/usr/lib/python2.7/site-packages/myhdl/conversion/_analyze.py", >>> line 744, in visit_If >>> self.visitList(node.else_) >>> File "/usr/lib/python2.7/site-packages/myhdl/conversion/_misc.py", >>> line >>> 161, in visitList >>> self.visit(n) >>> File "/usr/lib/python2.7/ast.py", line 241, in visit >>> return visitor(node) >>> File >>> "/usr/lib/python2.7/site-packages/myhdl/conversion/_analyze.py", >>> line 740, in visit_If >>> self.visitList(suite) >>> File "/usr/lib/python2.7/site-packages/myhdl/conversion/_misc.py", >>> line >>> 161, in visitList >>> self.visit(n) >>> File "/usr/lib/python2.7/ast.py", line 241, in visit >>> return visitor(node) >>> File >>> "/usr/lib/python2.7/site-packages/myhdl/conversion/_analyze.py", >>> line 770, in visit_If >>> if (len(choices) == _getNritems(var1.obj)) or node.else_: >>> File >>> "/usr/lib/python2.7/site-packages/myhdl/conversion/_analyze.py", >>> line 407, in _getNritems >>> raise TypeError("Unexpected type") >>> TypeError: Unexpected type > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ -- Jan Decaluwe - Resources bvba - http://www.jandecaluwe.com Python as a HDL: http://www.myhdl.org VHDL development, the modern way: http://www.sigasi.com World-class digital design: http://www.easics.com |