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 ?
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.scsvclk (clk 0) vsource type=pulse period=80n val0=0 val1=1 rise=0.3n fall=0.3n delay=3nv1 (high 0) vsource type=prbs period=40n val0=0 val1=1 rise=0.3n fall=0.3n delay=3n //seed=1942del (withdelay high) randdelay sd=1n rise=0.3nrl (withdelay jitter) resistor r=100cl (jitter 0) capacitor c=50pr1 (high 0) resistor r=1kahdl_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;endendmodule
I run the simulation using spectre prbs.scs and then in Matlab I do:
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).