• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Custom IC Design
  3. spectremdl and "print fmt" function

Stats

  • Locked Locked
  • Replies 3
  • Subscribers 125
  • Views 2274
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

spectremdl and "print fmt" function

samung
samung over 12 years ago
Hello !!

I would like to use the "print fmt" function of spectremdl, however, I have not managed yet in printing something in an ouput file with this function.
I have written some extracted data from a transient simu with export command but the "print fmt" doesn't work for me.

I would like to better configure what is inside the results_file, meaning removing the default template :
"Exported variables from results directory:  ./input.raw

date               :  31:18:59 AM, Wed Jun 19, 2023
design             :  (no title)
simulator          :  spectre"


I launch : spectremdl -batch input.mdl -design input.scs -measure results_file +log log_file.log



I have the following input.mdl file :


/* mdl measurement file */


alias measurement run_tran_simu {

input string out="aaa/bbb/ccc/results_file"

run tran


export real out_value_50n = V(out)@50n
export real out_value_0 = V(out)@0

export real diff_out_50n_0 = abs(V(out)@50n - V(out)@0)

print fmt ("****Cell functionnality : TEST****") addto=out

if (diff_out_50n_0 > 1)
    {
    print fmt ("****Cell functionnality : GOOD****") addto=out
    }
else
{
    print fmt ("****Cell functionnality : BAD****") addto=out
}

}

run run_tran_simu



and the following results_file :

Exported variables from results directory:  ./input.raw

date               :  31:18:59 AM, Wed Jun 19, 2033
design             :  (no title)
simulator          :  spectre


Measurement Name   :  run_tran_simu
Analysis Type      :  tran
diff_out_50n_0     =  1.1
out_value_0        =  1.1
out_value_50n      =  4.89856e-06
 
NB : we don't see any "print fmt" written stuff !! 

The log file is clean :
sam@clust:/xxx/yyy/.../zzz> grep -i error log_file.log
spectre completes with 0 errors, 0 warnings, and 3594 notices.


How can I do to use this "print fmt" function with success ? How can i customize the "template" of the results_file ??

Thanks !!

P.
  • Cancel
  • Andrew Beckett
    Andrew Beckett over 12 years ago

    It does work - but the issue is that it would try to write into the file called: "aaa/bbb/ccc/results_file" (the definition of the out variable at the top). If this file is not writable, it won't write it. It certainly would not write it into the conventional output, because you used addto=out.

    I tried changing out="results_file" and that worked perfectly.

    Regards,

    Andrew.

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • samung
    samung over 12 years ago

    Hi Andrew,

    you are right, if I change to : to=out & input string out="results_file" as below it works :

    .mdl : 

    ...

    alias measurement run_tran_simu {

    input string out="results_file"

    run tran

    export real out_value_50n = V(out)@50n

    export real out_value_0 = V(out)@0 

    print fmt (\"****Cell functionnality : TEST****\") to=out 

    ...

     

    However, I would like to write the string (print fmt) in a file defined by something like : "/aaa/bbb/ccc/results_file" 

     

    The commandline is :

    spectremdl -batch /aaa/bbb/ccc/input.mdl -design /aaa/bbb/ccc/input.scs -measure /aaa/bbb/ccc/results_file +log /aaa/bbb/ccc/log_file.log 

     

    For the export commands, it works well. Indeed, the output file for the export commands is defined by : -measure /aaa/bbb/ccc/results_file.

    So the output file exists. However, for the "print fmt" command and the "to=out", the file doesn't exist yet. I tried removing the input string out="results_file" with straigth print fmt (\"****Cell functionnality : TEST****\")  to=/aaa/bbb/ccc/results_file, and it doesnt find the file.

    The question, is : is it possible to write both the export and the print fmt commands in the same results_file, which is created by the  spectremdl -batch /aaa/bbb/ccc/input.mdl -design /aaa/bbb/ccc/input.scs -measure /aaa/bbb/ccc/results_file +log /aaa/bbb/ccc/log_file.log command ?

     

    Thanks !!

    P. 

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 12 years ago

    You can certainly write to aaa/bbb/ccc/results_file , provided that the intervening directories exist already.

    However, you can't write to the same file as the -measure file is pointing to - this is because both outputs will compete with each other - and I think the -measure results win. There's no facility that I can see to also print to the same file as the -measure specification.

    If that's what you want, you should contact customer support for an enhancement request.

    Kind Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information