On 27/02/15 15:12, Christopher Felton wrote:
> 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'
Unless toVHDL.name is set ;) (and also toVHDL.directory in dev)
Thanks, it confirms what I thought. That's not too onerous a work around.
Cheers,
Henry
|