Re: [myhdl-list] written conversion filename?
Brought to you by:
jandecaluwe
From: Christopher F. <chr...@gm...> - 2015-02-27 15:13:15
|
On 2/27/2015 8:48 AM, Henry Gomersall wrote: > Am I correct in asserting that there is no way to directly get the > converted filename from the results of e.g. toVHDL? > > It seems like this would be a useful thing to know for programmatic > control of the outputs. > Yes and no, after conversion you can't poll the toV*.filename and get the name of the recently created file. But, you can only pass a single top-level to the conversion functions, and this function can be queried for its name and simply append the extension. In [62]: def m_foobot(clock, reset, x, y): ...: @always_seq(clock.posedge, reset=reset) ...: def rtl(): ...: x.next = y ...: return rtl ...: In [63]: m_foobot.func_name Out[63]: 'm_foobot' In [64]: Regards, Chris |