[myhdl-list] Function calls in combinatorial blocks
Brought to you by:
jandecaluwe
From: Per K. <bas...@gm...> - 2013-03-01 20:41:22
|
Hi! Is there a particular reason that we do not support function calls in combinatorial blocks? In 0.7 I get: File "[...]_analyze.py", line 165, in _analyzeGens _isMem(obj) or _isTupleOfInts(obj) In 0.8dev I get: File "[...]_analyze.py", line 168, in _analyzeGens raise ConversionError(_error.UnsupportedType, n, info) myhdl.ConversionError: File file.py, line 11: Object type is not supported in this context: f Here is a test snippet: ######################### from myhdl import * def w(a, b, c, clk): def f(a): out = intbv(0)[len(a):] if a<3: out[:] = a else: out[:] = 0 return out @always_comb def cm(): b.next = a @always(clk.posedge) def ck(): c.next = f(a) return instances() def test(): a = Signal(intbv(0)[10:]) b = Signal(intbv(0)[10:]) c = Signal(intbv(0)[10:]) clk = Signal(bool(0)) dut = toVerilog(w, a, b,c ,clk) return instances() s = Simulation(test()) s.run() ########################## -Cheers! /Per |