MarkJ90
Newbie
Hi,
I would like to create a current generator in Virtuoso using VarilogA that generates pulses with gaussian shape that are poissonian distributed in time.
I have already created a current generator that produces pulses with this shape but at a constant rate. Now I want to modify it in order to have these pulses poissonian distributed in time.
I put here the code that I used for constant rate current generator:
Someone knows how can I do it?
I would like to create a current generator in Virtuoso using VarilogA that generates pulses with gaussian shape that are poissonian distributed in time.
I have already created a current generator that produces pulses with this shape but at a constant rate. Now I want to modify it in order to have these pulses poissonian distributed in time.
I put here the code that I used for constant rate current generator:
Code:
`include "constants.vams"
`include "disciplines.vams"
module Gaussian_Pulse(plus,minus);
inout plus,minus;
electrical plus,minus;
parameter real t_width = 100p;
parameter real t_centre = 100p;
real sigma = t_width/10;
parameter real Gain = 1000;
parameter real ICR= 1.5G;
real Q_tot = `P_Q * Gain;
real amplitude = Q_tot/sqrt(`M_TWO_PI*sigma*sigma);
real clock=1/(2*ICR);
real trf=1p;
real tdelay1=0;
real V;
integer y1;
integer cycle;
integer count;
real Vth=0.0000001;
analog begin
@(timer(0,clock)) begin
cycle=cycle+1;
if(cycle%2==0) begin
y1=0;
tdelay1=0;
end
else begin
y1=1;
tdelay1=trf;
end
end
V= transition(y1,tdelay1,trf);
@(cross(V-Vth, +1)) begin
count = count + 1;
end
I(plus,minus) <+ amplitude*exp(-pow(($abstime - t_centre-(count*2*clock))/sigma,2)/2);
end
endmodule
Someone knows how can I do it?