• 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. RF Design
  3. Eye diagram

Stats

  • Locked Locked
  • Replies 9
  • Subscribers 63
  • Views 22662
  • 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

Eye diagram

nevinalex1234
nevinalex1234 over 13 years ago

 hi

I have been trying to plot eye diagrams in cadence. The command eyediagram(signal,start,stop,period) is the format. But i am not able to control the no of eyes in my diagram. Say i run my simulation from 0 to 10u and my input clk is 5Ghz, typically to get a SINGLE EYE, i should give 200p as period rite ? I have added a 25p, 25p rise time fall time for it. But the thing seems going crazy.

Any ideas whats bugging ?

  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 13 years ago

    The matlab plot doesn't look like a proper eye diagram to me - so I assume you're asking about how to set things up in Matlab?

    Also, I didn't say in the other post that there is no such thing as a regular sampling frequency - I said that there isn't a sampling frequency unless you told it to sample. In order to compare with Matlab, I used this example netlist - which comes from my app note on Cadence Online Support (with a small modification to strobe the output):

     // prbs.scs

    vclk (clk 0) vsource type=pulse period=80n val0=0 val1=1 rise=0.3n fall=0.3n delay=3n
    v1 (high 0) vsource type=prbs period=40n val0=0 val1=1 rise=0.3n fall=0.3n delay=3n //seed=1942
    del (withdelay high) randdelay sd=1n rise=0.3n
    rl (withdelay jitter) resistor r=100
    cl (jitter 0) capacitor c=50p

    r1 (high 0) resistor r=1k

    ahdl_include "randdelay.va"
    tran tran stop=400u strobeperiod=0.5n

    Notice I've added strobeperiod=0.5n to force there to be fixed rate outputs every half a nanosecond.

    This uses  this VerilogA model to add random jitter (of sorts):

    // VerilogA for randdelay

    `include "constants.h"
    `include "discipline.h"

    module randdelay (op,ip);
    output op;
    input ip;
    electrical op,ip;
    parameter real sd=2.0n;
    parameter real gainsd=0.1;
    parameter real del=5.0n;
    parameter real rise=0.1n;
    parameter real thresh=0.5;
    parameter integer seed = 23133;

    integer vseed;
    real randnum,gain,delayed;

    analog begin

      @(cross(V(ip)-thresh)) begin
        randnum=$rdist_normal(vseed,0,1);
        randnum=randnum*sd+del;
        gain=$rdist_normal(vseed,0,1)*gainsd+1;
        if(randnum<0) randnum=0.0;
      end

      delayed= transition(V(ip),randnum,rise,rise);

      V(op) <+ gain*(delayed-thresh)+thresh;

    end

    endmodule

    I run the simulation using spectre prbs.scs and then in Matlab I do:

    jitter=cds_srr('prbs.raw','tran-tran','jitter')
    eye=commscope.eyediagram('SamplesPerSymbol',160,'SymbolsPerTrace',1,'SamplingFrequency',1/0.5e-9, 'MaximumAmplitude',1.25,'MinimumAmplitude',-0.25)
    eye.update(jitter.V)

    There are 160 samples per symbol, because the period of my signal is 80ns, and I have a sample every 0.5n - so there are 160 samples per symbol. I want to show one Period in the trace, and the SamplingFrequency is the inverse of my strobeperiod. I've told it the Max and Min amplitude to scale it OK.

    In ViVA I use the Eye Diagram assistant and tell it to use a period of 80n and I start from 160n (just to avoid a startup glitch, but that's not critical). The corresponding function is:

    eyeDiagram(v("jitter" ?result "tran") 160n 400.0u 80n ?intensityPlot t)

    (the intensityPlot bit is just to make it look prettier)

    I've captured the two results side by side. As you can see, they look rather similar (The colours in the Matlab graph don't show up as brightly for the rarer points, but other than that you can see they match well).

    Regards,

    Andrew.

     

    • viva_and_matlab.png
    • View
    • Hide
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 13 years ago

    The matlab plot doesn't look like a proper eye diagram to me - so I assume you're asking about how to set things up in Matlab?

    Also, I didn't say in the other post that there is no such thing as a regular sampling frequency - I said that there isn't a sampling frequency unless you told it to sample. In order to compare with Matlab, I used this example netlist - which comes from my app note on Cadence Online Support (with a small modification to strobe the output):

     // prbs.scs

    vclk (clk 0) vsource type=pulse period=80n val0=0 val1=1 rise=0.3n fall=0.3n delay=3n
    v1 (high 0) vsource type=prbs period=40n val0=0 val1=1 rise=0.3n fall=0.3n delay=3n //seed=1942
    del (withdelay high) randdelay sd=1n rise=0.3n
    rl (withdelay jitter) resistor r=100
    cl (jitter 0) capacitor c=50p

    r1 (high 0) resistor r=1k

    ahdl_include "randdelay.va"
    tran tran stop=400u strobeperiod=0.5n

    Notice I've added strobeperiod=0.5n to force there to be fixed rate outputs every half a nanosecond.

    This uses  this VerilogA model to add random jitter (of sorts):

    // VerilogA for randdelay

    `include "constants.h"
    `include "discipline.h"

    module randdelay (op,ip);
    output op;
    input ip;
    electrical op,ip;
    parameter real sd=2.0n;
    parameter real gainsd=0.1;
    parameter real del=5.0n;
    parameter real rise=0.1n;
    parameter real thresh=0.5;
    parameter integer seed = 23133;

    integer vseed;
    real randnum,gain,delayed;

    analog begin

      @(cross(V(ip)-thresh)) begin
        randnum=$rdist_normal(vseed,0,1);
        randnum=randnum*sd+del;
        gain=$rdist_normal(vseed,0,1)*gainsd+1;
        if(randnum<0) randnum=0.0;
      end

      delayed= transition(V(ip),randnum,rise,rise);

      V(op) <+ gain*(delayed-thresh)+thresh;

    end

    endmodule

    I run the simulation using spectre prbs.scs and then in Matlab I do:

    jitter=cds_srr('prbs.raw','tran-tran','jitter')
    eye=commscope.eyediagram('SamplesPerSymbol',160,'SymbolsPerTrace',1,'SamplingFrequency',1/0.5e-9, 'MaximumAmplitude',1.25,'MinimumAmplitude',-0.25)
    eye.update(jitter.V)

    There are 160 samples per symbol, because the period of my signal is 80ns, and I have a sample every 0.5n - so there are 160 samples per symbol. I want to show one Period in the trace, and the SamplingFrequency is the inverse of my strobeperiod. I've told it the Max and Min amplitude to scale it OK.

    In ViVA I use the Eye Diagram assistant and tell it to use a period of 80n and I start from 160n (just to avoid a startup glitch, but that's not critical). The corresponding function is:

    eyeDiagram(v("jitter" ?result "tran") 160n 400.0u 80n ?intensityPlot t)

    (the intensityPlot bit is just to make it look prettier)

    I've captured the two results side by side. As you can see, they look rather similar (The colours in the Matlab graph don't show up as brightly for the rarer points, but other than that you can see they match well).

    Regards,

    Andrew.

     

    • viva_and_matlab.png
    • View
    • Hide
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

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