Home > Community > Forums > Custom IC Design > spectremdl and "print fmt" function

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 spectremdl and "print fmt" function 

Last post Tue, Jun 25 2013 1:26 PM by Andrew Beckett. 3 replies.
Started by samung 19 Jun 2013 02:29 AM. Topic has 3 replies and 600 views
Page 1 of 1 (4 items)
Sort Posts:
  • Wed, Jun 19 2013 2:29 AM

    • samung
    • Top 500 Contributor
    • Joined on Fri, Jun 14 2013
    • Posts 24
    • Points 285
    spectremdl and "print fmt" function Reply
    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.
    • Post Points: 20
  • Tue, Jun 25 2013 6:04 AM

    Re: spectremdl and "print fmt" function Reply

    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.

     

    • Post Points: 20
  • Tue, Jun 25 2013 8:45 AM

    • samung
    • Top 500 Contributor
    • Joined on Fri, Jun 14 2013
    • Posts 24
    • Points 285
    Re: spectremdl and "print fmt" function Reply

    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. 

     

    • Post Points: 20
  • Tue, Jun 25 2013 1:26 PM

    Re: spectremdl and "print fmt" function Reply

    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.

    • Post Points: 5
Page 1 of 1 (4 items)
Sort Posts:
Started by samung at 19 Jun 2013 02:29 AM. Topic has 3 replies.