The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Apr 18th, 2024, 11:54pm
Pages: 1
Send Topic Print
assign file name to a variable in ADEXL (Read 63 times)
sutapanaki
Community Member
***
Offline



Posts: 41

assign file name to a variable in ADEXL
Feb 15th, 2017, 9:14pm
 
Hi,

I have a variable which I want to get a file name as a value. This is supposed to go into the corners setup and for each corner modify the file name based on the values of two other variables that get set up with the corner. Something like file_70MHz_4pf.dat, file_75MHz_150ff.dat etc.
Of course, I can manually go and write the file in the particular corner but I would prefer to have that file variable track the values of the other two variables and automatically modify the file name.
Is this possible to be done and how can I do it?

Thanks
S
Back to top
 
 
View Profile   IP Logged
Andrew Beckett
Senior Fellow
******
Offline

Life, don't talk to
me about Life...

Posts: 1742
Bracknell, UK
Re: assign file name to a variable in ADEXL
Reply #1 - Feb 16th, 2017, 9:48am
 
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.
Back to top
 
 
View Profile WWW   IP Logged
sutapanaki
Community Member
***
Offline



Posts: 41

Re: assign file name to a variable in ADEXL
Reply #2 - Feb 16th, 2017, 11:59am
 
Thanks, Andrew,

I'll try this right now. Hopefully works for me too.
Back to top
 
 
View Profile   IP Logged
Pages: 1
Send Topic Print
Copyright 2002-2024 Designer’s Guide Consulting, Inc. Designer’s Guide® is a registered trademark of Designer’s Guide Consulting, Inc. All rights reserved. Send comments or questions to editor@designers-guide.org. Consider submitting a paper or model.