Andrew Beckett
Senior Fellow
Offline
Life, don't talk to me about Life...
Posts: 1742
Bracknell, UK
|
I thought that this should work if you define the filename as a global variable:
THEFILE: sprintf(nil "\"file_%n.dat\"" VAR("vdd"))
(I'm just referencing vdd here, but you get the idea). This works fine if it's a sweep, but if I do it where I vary vdd over corners, it breaks for some reason - the netlist actually looks OK, but it states that there's an error.
Rather surprising (to me), if I omit the quotes (I would normally expect to need to embed quotes in the string value so that the parameter in the spectre netlist has quotes around it), then all works fine:
sprintf(nil "file_%n.dat" VAR("vdd"))
Spectre is quite happy with it, and I see that the file is being consumed OK (I used write=VAR("THEFILE") on my dc analysis, and I see the appropriate filename being created in each corner).
Looks like I was over-complicating matters!
Regards,
Andrew.
|