• 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. Cadence Liberate Characterization Help

Stats

  • Locked Locked
  • Replies 48
  • Subscribers 126
  • Views 32309
  • 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

Cadence Liberate Characterization Help

anurans
anurans over 7 years ago

Hi All,

For the characterization of a standard cell library, I am using LIBERATE_15.14.070 version. The cell spice model was generated using IC6.1.5, and I am using Spectre as the external simulator for the characterization. I have a question specifically on the leakage_power nodes of the .lib file generated by Liberate. For an example, for a simple inverter, I ended up having leakage_power values as follows (in the link):

https://pastebin.com/grfasa1s

However the resulting leakage values do not follow the circuit simulation values in IC6-Spectre.

> Can anybody explain why the leakage value related to VSS pin is always 0 ? 

> How does the Liberate calculate these values ? Is there a way to evaluate the accuracy of Liberate-Spectre simulation ?

Thanks in advance

Anuradha

  • Cancel
Parents
  • sazjad
    sazjad over 7 years ago

    Hi Anuradha,

    I am also trying to generate .lib files using the Liberate tool. Since you have already gone through the process, can you please help me with one issue?
    I have created a netlist from my circuit and used it in liberate to generate .lib file. However, it seems like the generated netlist is not compatible with the liberate or maybe be I am missing something. Have you had a this kind of issue?

    Thanks in advance.

    Best regards.
    Hossain

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • anurans
    anurans over 7 years ago in reply to sazjad

    Hi, can you be more specific about the issue you have ? Does Liberate give errors when reading the netlist ? 

    Anuradha

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Guangjun Cao
    Guangjun Cao over 6 years ago in reply to fengye

    Hi Fengye,

    I do not have access to hspice. Can you use the exact command to run hspice on a netlist standalone?

    Regards,

    guangjun

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • fengye
    fengye over 6 years ago in reply to Guangjun Cao

    Hi Guangjun,

    I can run hspice on a netlist standalone. But I can't use it as my external simulator in Liberate. Besides, I use spectre and spectre-ski have large different on switching power but with the same delay and hidden power.

    Thanks,

    fengye 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Guangjun Cao
    Guangjun Cao over 6 years ago in reply to fengye

    Is your hspice run with the exact command like you specified in Liberate?

    On the dynamic power difference between with/without SKI,

    1. do you see differences in leakage?

    2. are you using the latest Liberate? 

    3. which results, ski or non-ski,  look correct to you?

    regards,

    guangjun

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • fengye
    fengye over 6 years ago in reply to Guangjun Cao

    Hi Guangjun,

    Thanks for your reply.My default setting is ski, then I just change "char_library   -extsim spectre -ccs -ecsm -cells ${cells}", I get the two types results.  

    1)The leakage,hidden power and delay are the same, the only different is switch power. 

    Besides,when I change "char_library   -extsim spectre-ski -ccs -ecsm -cells ${cells}", then the results are totally  the same. I guess the ski and spectre-ski are different?

    2) The liberate is not the latest.

    3) All my cells are simulated by hspice, then I use liberate to characterize them. But the power unit of Liberate  is Pj. I can't compare them. I don't know how it calculates? So I can't kow which is correct? This is also my one question?

    Thanks,

    fengye

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Guangjun Cao
    Guangjun Cao over 6 years ago in reply to fengye

    Hi Fengye,

    1. ideally, the results should be the same wi/wo SKI enabled. There may some minor differences. who provided you "-extsim spectre_ski"? this is not a documented option.

    2. please switch to the latest Liberate. Always use the build-in spectre, unless there is an issue. Sometimes, there might be some issues with a particular Spectre version.

    3. unit can be changed, using set_units command. you can also use the expression in power.info and the waveform from Liberate, compare them with your hspice results. I would be VERY supprized if there are difference between the two simulations, when the exact decks are used. 

    Regards,

    guangjun 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • fengye
    fengye over 6 years ago in reply to Guangjun Cao

    Hi Guangjun,

    Thanks for your suggestion. 

    1. About external simulator

    1> Just with default setting, the default simulator is ski not  Alspice. The log file shows "

    LIBERATE parameter "simulator" set to "ski"
    Start Characterizing Library at (Wed Dec 5 22:21:39 HKT 2018)

    WARNING (LIB-103): When using Spectre-SKI, runtime may significantly improve when using an extsim_model_include/define_leafcell flow. This is needed to enable the Spectre modellib flow.

    INFO (LIB-966): Using Spectre version 15.1.0.627.isr12 located at: /eda/cadence/2016-17/RHELx86/MMSIM_15.10.627/bin/spectre.
    *Info* Use temporary directory '/tmp'.
    Initializing Spice

    *Info* : Initializing SKI environment...

    ".

    The reslut is the same when using "-extsim ski"

    2> Then I use -extsim spectre ,the log file shows "LIBERATE parameter "simulator" set to "spectre"
    Start Characterizing Library at (Wed Dec 5 22:24:49 HKT 2018)". Here no show of spectre version.

    I m

    3> Then I use "-extsim spectre-ski", the log file shows "

    LIBERATE parameter "simulator" set to "spectre-ski"
    LIBERATE parameter "spectre_use_char_opt_license" set to "0"
    Start Characterizing Library at (Wed Dec 5 22:28:43 HKT 2018)

    Spectre is available
    *Info* Use temporary directory '/tmp'.
    Initializing Spice
    *Info* Adding 2 global models to Spice.

    "

    the results of "-extsim spectre-ski" and "-extsim spectre" are the same.

    4> The results have very large difference in switch power, but with the same delay ,leakage and power.

    2. The difference of unit means it's W in my hspice run, but it's pJ in the lib from liberate. I don't the time how to attain between power and energy. So I don't know how to compare power. In fact , I have compared the leakage and delay, for the same arc setting , all above have nearly leakage and delay.

    3. According to your suggestion, I get the power information., like these "

    * Cell=ND2M0R_st Pin=Z RelatedPin=A RelatedPGPin=VDD Type=combinational Direction=rise_power When= Deck= Vector_space=FFR Vector_used=110
    - Leakage_state =
    - Leakage_value =
    - Raw_equation = (((-Q(VDD))*(VDD(VDD)-GND(GND))*0.5-(((Cload(Z)*(VDDfinal(Z)-GND(Z)))*(VDDfinal(Z)-GND(Z))*0.5))))/capacitance_unit

    - Eval_equation = (((5.11052e-12)*(0.3-0)*0.5-(((1e-15*(0.299998-0))*(0.299998-0)*0.5))))/1e-12
    - Value = 0.766533"

    Besides, by setting "set_var extsim_save_passed deck", I get some information ,but still don't understand.

    My problem has made me for a  long time ,I can't solve it. When you are in your spare time ,can you help me solve it. I am grateful for your reply.

    Thanks,

    fengye

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Guangjun Cao
    Guangjun Cao over 6 years ago in reply to fengye

    Fengye,

    1. R&D confirmed that there is no such a settings as char_library -extsim spectre-ski. Are you sure this is exactly what you used in the script? My understanding is spectre-ski is an internal settings, when SKI is enabled. This is NOT a directly specified by user.

    2. please switch to latest Liberate ASAP!

    3. Some times, the SKI option may not give correct results, due to Spectre version. In general, DO NOT load a Spectre module before your run. Let Liberate use its owb build-in mmsim or Spectre! When there a difference, R&D will need a full test case. 

    4. for power calculation, I suggest you start with an invertor. Use this as an example to understand how witching power is calculated. then look at the another cell to debug. The raw expression =Total_charge_at_power_pin(current integration as shown in sim.sp)* related_Rail_ground_voltage_difference *0.5 - Load_index_2 * Voltage_swing_at_load^2 /capunit. This is equivalently an energy value. For debug, you should get the waveform of your standalone simulations with a simulator using the exact sim.sp. Then check if the waveforms are identical. if identical, this means there is no simulation issue. Next, you can focus on the measurement. For this, you need to check the waveform and the measurement statement in sim.sp. One common issue can be the end time is not correct when the tool integrate the current of powe supply. But this is very rare with Liberate. In most cases, it is due to circuit behavior and can be corrected with settings.

    Guangjun

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • fengye
    fengye over 6 years ago in reply to Guangjun Cao

    Thanks a lot. It's so kind of you to spend time to answer my questions. From what you said,

    1)For the default simulator, I think you are right. Because th results of using "-extsim ski" and just using the default setting are the same. Do you have a good way to make sure which is the default simulator?

    2)I will try to find the latest Liberat.

    3) As you have said, spectre may be a good choice for much correct result. That means I can use "char_libray -extsim spectre xxx", besides, what other setting should I make? I just want to verify my setting is true or false?

    4) I can't use spectre, so I use hspice to simulate the sim.sp. But it's too slow. In the sim.sp,
    ".param icap_tend6=2.0000000e-12
    .meas tran AltosCap6 INTEG i(VA) from='icap_tend0' to='icap_tend6'
    .param icap_tend7=2.2500000e-12
    .meas tran AltosCap7 INTEG i(VA) from='icap_tend0' to='icap_tend7'
    .meas tran AltosPower000 INTEG i(VVDD) from=0 to='power_tend'
    .meas tran AltosPower001 INTEG i(VGND) from=0 to='power_tend'

    .meas tran AltosBgnVoltage000000 FIND v(Z) AT=0.0
    .meas tran AltosEndVoltage000000 FIND v(Z) AT=tran_tend"
    In fact, the integration of current is Q, is it necessary to calculate the integral of input i(VA).

    Thanks

    fengye

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Guangjun Cao
    Guangjun Cao over 6 years ago in reply to fengye

    You are welcome. And thanks for using Cadence tools.

    I will be on vacation from tomorrow afternoon UK time. So, I will not be available to help untill new year.

    the correct option char_library -extsim is spectre or hspice. No other options is legal.

    SKI issue can often happen with certain Spectre version. Sometime, you can try manually load a different Spectre version.

    If you use define_arc command, then add -user_arcs_only(for standard cells) or -io (for IO or custom-designed cells) mode.

    AltosCap is for pin cap measurement, ie. C=deltQ/deltaV. you example shows it is for pin A capacitance.

    AltosPower is for power calculation. In most cases, a simple cell should have power more or less independent of load index, if the load power is excluded, ie. -C * V * V is used in the expression. If you see trend like larger power for higher load(index-2), then your simulation time is too short. default, I think, is 1e-6s.

    when you do debug run, you can also use set_var debug_flow 1x1 or 2x2. This way, there is limited iter in the sim.sp, which makes the debug much easier. I normall start with 1x1.

    Guangjun

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • fengye
    fengye over 6 years ago in reply to Guangjun Cao

    Hi, Guangjun

    Thank you very much. According to you have said, I have  learned more information about liberate. Next, I will think more about you have told me. 

    Thanks again,

    Hope you have a good vocation!

    fengye

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • fengye
    fengye over 6 years ago in reply to Guangjun Cao

    Hi, Guangjun

    Thank you very much. According to you have said, I have  learned more information about liberate. Next, I will think more about you have told me. 

    Thanks again,

    Hope you have a good vocation!

    fengye

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
  • Guangjun Cao
    Guangjun Cao over 6 years ago in reply to fengye

    Very glad that I have helped you.

    One correction to my earlier comments on power at higher index_2. it should be "lower power at high load may indicate insufficient simulation time".

    I also want to mention this, with Spectre, standalone simulation also generates a sim.measure file, in which results of all the measure is listed. 

    Wish you a very happy new year!

    Guangjun

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Guangjun Cao
    Guangjun Cao over 6 years ago in reply to Guangjun Cao

    in case you do not already have them, below are recommended settings for Spectre in Liberate

    # Spectre
    set_var extsim_cmd_option   "+spice +lorder MMSIM:PRODUCT +aps -mt +rcopt=2 +liberate"
    set_var extsim_deck_header  "simulator lang=spectre\nOpt1 options reltol=1e-4\nsimulator lang=spice"
    set_var extsim_leakage_option     "method=gear gmin=1e-15 gminfloatdefault=gmindc redefinedparams=ignore rabsshort=1m limit=delta save=nooutput"
    set_var extsim_option       "method=gear gmin=1e-15 gminfloatdefault=gmindc redefinedparams=ignore rabsshort=1m limit=delta save=nooutput"
    set_var extsim_tran_append      "lteratio=10 ckptperiod=1800"
    set_var extsim_reuse_ic           3

    # Licensing
    set_var spectre_use_char_opt_license 1

    ## Spectre-SKI
    set_var ski_enable          1
    set_var ski_clean_mode      2
    set_var extsim_use_node_name 1
    set_var extsim_save_passed  none  ; # Do not save the decks with SKI as the disk storage requirement is too high
    set env(TMPDIR) "$env(PWD)/ski_temp"    ; # Put SKI tmp files here

    # Use compatible methodologies between Alspice, SKI, and Spectre ###
    # Standardize transient window
    set_var power_sim_estimate_duration     1
    set_var power_tend_match_tran           1
    set_var tran_tend_estimation_mode 1
    # Match SKI methodologies to Spectre
    set_var ski_alter_mode            3
    set_var ski_mdlthreshold_exact          1
    set_var ski_power_subtract_output_load_match_extsim 1
    # Match Alspice methodologies to Spectre
    set_var alspice_power_subtract_output_load_match_extsim      1
     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • fengye
    fengye over 6 years ago in reply to Guangjun Cao

    Hi,Guangjun,

        I really appreciate you. When you have started your vocation, you still remember my question and provide help to me. It's so kind of you. Above command setting will help me to check my setting for using external simulator. 

       Have a good vocation!

    Best wishes!

    fengye

    • 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