Home
  • Products
  • Solutions
  • Support
  • Company
  • Products
  • Solutions
  • Support
  • Company
Community Forums Custom IC Design Adexl - dynamically stop transient run on event trigger

Stats

  • Replies 11
  • Subscribers 123
  • Views 573
  • Members are here 0

Adexl - dynamically stop transient run on event trigger

firebolt
firebolt 2 months ago

I tried to use MDL control as mentioned in support link here. It works fine for event tigger but not for additonal 10us delay. Please help here.

tran_autostop.mdl file contents:

alias measurement tran_autostop
{
export real rise2
run tran
rise1=risetime(sig=V(clk_en), initval=0, inittype='y, finalval=1.8, finaltype='y, theta1=10, theta2=90)
rise2=rise1+10E-6
}
run tran_autostop

Trasient Options > Misc

Test > right click options > MDL Control

  • Reply
  • Cancel
  • Cancel
  • Andrew Beckett
    Andrew Beckett 2 months ago

    You're lucky that I responded to this given that the MDL script is in Comic Sans. That's a cardinal sin (I probably should state that in the forum guidelines!). Just kidding...

    If you read the documentation (Spectre Circuit Simulator Measurement Description Language Reference), in the section on autostop, it says:

    Only functions that determine specific events, such as delay and event measurements, can cause an automatic stop.

    Well, your rise2=rise1+10e-6 is not going to create an event. It's just an addition. Even if it did create an event, it's adding 10u to the rise time, not the time at which the rise time was measured. You also didn't declare rise1 in your MDL code either. I think you want something like this:

    alias measurement tran_autostop
     {
        export real rise1
        real tcross
        real clkDel
    
        run tran
        rise1=risetime(sig=V(clk_en), initval=0, inittype='y, finalval=1.8, finaltype='y, theta1=10, theta2=90)
        // find the time at which the risetime was measured - 90% of the finalval
        tcross=cross(sig=V(clk_en), dir='rise, thresh=0.9*1.8)
        // measure something 10us later
        clkDel=V(clk_en)@(tcross+10u)
      }
    
    run tran_autostop

    This will run for 10us beyond the point at which the rise time was measured (I tested it). The @ is an event operator, and is measuring the clk_en signal 10u after the time of the crossing.

    Regards,

    Andrew

    • Cancel
    • Up +1 Down
    • Reply
    • Cancel
  • firebolt
    firebolt 2 months ago in reply to Andrew Beckett

    Thanks Andrew. It's working. My first mistake was adding 10u to risetime to stop simualtion. That's not correct. tcross is correct one. Operator @ really helped me. Sorry about font, I will stick to default one.

    • Cancel
    • Up 0 Down
    • Reply
    • Cancel
  • firebolt
    firebolt 2 months ago in reply to Andrew Beckett

    Can vdd value be variable? Autostop is not working with VAR("vdd"). 

    Is it possible to make stoptime=clkdel? Because expressions depending on stoptime like clip, are failing.

    alias measurement tran_autostop
    {
    export
    real tcross
    real clkDel

    run tran
    tcross=cross(sig=V(clk_en), dir='rise, thresh=VAR("vdd")/2)
    clkDel=V(clk_en)@(tcross+10u)
    }
    run tran_autostop
    • Cancel
    • Up 0 Down
    • Reply
    • Cancel
  • Andrew Beckett
    Andrew Beckett 2 months ago in reply to firebolt

    Yes. This is covered in the MDL manual that I mentioned earlier in the section headed Accessing Netlist or Model Parameters. You wouldn't use a SKILL function (VAR("vdd")) in an MDL file; SpectreMDL knows about Spectre parameters, and since the vdd parameter would be in a parameters statement in the netlist - like this:

    parameters vdd=1.8

    you can simply reference it in the MDL:

    alias measurement tran_autostop
     {
        export real rise1
        real tcross
        real clkDel
    
        run tran
        rise1=risetime(sig=V(clk_en), initval=0, inittype='y, finalval=vdd, finaltype='y, theta1=10, theta2=90)
        // find the time at which the risetime was measured - 90% of the finalval
        tcross=cross(sig=V(clk_en), dir='rise, thresh=0.9*vdd)
        // measure something 10us later
        clkDel=V(clk_en)@(tcross+10u)
      }
    
    run tran_autostop

    Regards,

    Andrew

    • Cancel
    • Up +1 Down
    • Reply
    • Cancel
  • firebolt
    firebolt 2 months ago in reply to Andrew Beckett

    Parameter is working. How to assign new stop_time to output expressions? For e.g., I have clip(vout meas_start stop_time). Tried below code. It's not working. Please help.

    alias measurement tran_autostop
    {
    export
    real tcross
    real clkdelay
    real stop_time

    run tran
    tcross=cross(sig=V(ok_hv), dir='rise, thresh=vdd/2)
    clkdelay=V(ok_hv)@(tcross+2000/myfreq)
    stop_time=clkdelay
    }
    run tran_autostop
    • Cancel
    • Up 0 Down
    • Reply
    • Cancel
  • Andrew Beckett
    Andrew Beckett 2 months ago in reply to firebolt

    That's not going to work. I'm assuming you're talking about adjusting an ADE output expression (using clip). For a start, you're not exporting clkdelay or stop_time, and even if you were, the dimensions are completely wrong (clkdelay is a voltage not a time, and hence so is stop_time). You could use the mechanism described in How to use an MDL script within ADE (remembering to set the mdlpsfoutput setting in current versions) to use an expression to read the exported results back into ADE, but in this case it's unnecessary.

    The clip() function (see the documentation) accepts nil as the third argument which means that it will be the final x-value of the waveform. 

    If you really need to know what the final x-value is in an ADE output expression, you can use lastVal(VT("/vout")) (use an appropriate signal name that you have in the design). As I said though, with clip() this is unnecessary you can just do: clip(VT("/vout") 13u nil) or something like that.

    Andrew

    • Cancel
    • Up +1 Down
    • Reply
    • Cancel
  • firebolt
    firebolt 2 months ago in reply to Andrew Beckett

    I am injecting noise at noise_start=stop_time-20u. Is there a way to make noise_start as a function of some trigger? say, after clkok_rise, start noise.

    • Cancel
    • Up 0 Down
    • Reply
    • Cancel
  • Andrew Beckett
    Andrew Beckett 2 months ago in reply to firebolt

    By "injecting noise" what do you mean? How are you injecting it?

    By the way, you're lucky I saw this, since nobody gets notifiers on post edits - only on the initial post which didn't include this additional question.

    Andrew

    • Cancel
    • Up 0 Down
    • Reply
    • Cancel
  • firebolt
    firebolt 1 month ago in reply to Andrew Beckett

    Adding vsouce vdd noise by delaying it to stop_time-20u

    • Cancel
    • Up 0 Down
    • Reply
    • Cancel
  • Andrew Beckett
    Andrew Beckett 1 month ago in reply to firebolt

    I don't think you can alter the delay on a source on the fly based on a measurement. It's not obvious to me how that could be done anyway.

    I had originally been assuming that you might be talking about turning transient noise on or off based on a measurement event; this ought to work (it works with .measure statements and asserts), but it doesn't work (for me) if the measurement is defined in MDL. I created a CCR earlier today about that.

    Regards,

    Andrew

    • Cancel
    • Up 0 Down
    • Reply
    • 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.

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

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