Community Feedback, Suggestions, and Questions How to find the pulse length with MDL?

How to find the pulse length with MDL?

I am trying to find the equation to calculate the total length of a signal. So the code should find the moment the signal starts to rise, plateau, and fall duration. After that, the duration of these times should be added. And at the end, I should get 150ns as a result. I tried to implement something like the below but it did not work suggestion are welcome :)

export real rise_time       = cross(sig=V(BL), dir='rise', n=1, thresh=0.0)
export real fall_time        = cross(sig=V(BL), dir='fall', n=1, thresh=0.0)
export real pulse_length = fall_time - rise_time

Parents
  • Two issues:

    1. The dir argument should be 'rise or 'fall (no close quote after the name - that's not the correct syntax in MDL)
    2. The threshold should be above 0.0 because otherwise it never crosses if (if it starts at 0).

    Here's a suggested MDL file which worked for me:

    alias measurement tran_pulse
     {
        run tran
        export real rise_time       = cross(sig=V(BL), dir='rise, n=1, thresh=0.01)
        export real fall_time        = cross(sig=V(BL), dir='fall, n=1, thresh=0.01)
        export real pulse_length = fall_time - rise_time
      }
    
    run tran_pulse
    

    Andrew

Reply
  • Two issues:

    1. The dir argument should be 'rise or 'fall (no close quote after the name - that's not the correct syntax in MDL)
    2. The threshold should be above 0.0 because otherwise it never crosses if (if it starts at 0).

    Here's a suggested MDL file which worked for me:

    alias measurement tran_pulse
     {
        run tran
        export real rise_time       = cross(sig=V(BL), dir='rise, n=1, thresh=0.01)
        export real fall_time        = cross(sig=V(BL), dir='fall, n=1, thresh=0.01)
        export real pulse_length = fall_time - rise_time
      }
    
    run tran_pulse
    

    Andrew

Children
CDNS Forum Thread CSS JS
CDNS - Fix Layout