[myhdl-list] Calling regular python code during simulation
Brought to you by:
jandecaluwe
From: Matti <mat...@gm...> - 2012-01-18 12:40:26
|
I want to do something like this: def myfunc(data): return float(data) def Int2Float(inval, outval, clock): @always(clock.posedge) def Int2FloatLogic(): out.next = myfunc(data) return instances Of course this will not pass the convertor. But I would like to use it in simulation, and at a later date replace the float() call with an appropriate vendor-supplied library. In the real example myfunc is more complicated. Questions: - How can I get the simulator to just execute the python code without trying to convert it to myhdl primitives? - How do I tell the simulator that myfunc requires 28 clock cycles? Thanks, Matti |