Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Voltage controlled delay line in verilog AMS

Status
Not open for further replies.

Ata_sa16

Full Member level 6
Joined
Mar 29, 2016
Messages
343
Helped
59
Reputation
118
Reaction score
58
Trophy points
28
Location
Milky Way Galaxy, 179° 56′ 39.4″
Activity points
2,221
Hi all,

I need to write a verilog AMS code for Voltage controlled delay line.
There is an available code but this is made for pulse input and ouput.
I need to have sine wave input and output.


Code:
module vcdl ( VC, CK_IN, CK_OUT );
input VC, CK_IN; output CK_OUT;
electrical VC, CK_IN, CK_OUT;
parameter real Fref=200M from (0:inf);
parameter real Vlo=0, Vhi=1.8;
parameter real tt=50p from (0:inf);
parameter real ttol=1f from (0:(1/Fref));
parameter integer seed0=-500;
parameter real Da1=1.29e+7, Db1=-10.08,
Dc1=828.5, Dd1=-1.065;
parameter real Ja1=6.753e+10, Jb1=-17.18,
Jc1=2194, Jd1=-2.164;
real Delay,jitter, dTp, dT, vout;
integer seed;
analog begin
@(initial_step) begin
seed=seed0;
end
@(cross(V(CK_IN)-0.9,+1,ttol))begin
jitter = ( (Ja1*exp(Jb1*V(VC)))
+(Jc1*exp(Jd1*V(VC))) )*1f;
Delay = ( (Da1*exp(Db1*V(VC)))
+(Dc1*exp(Dd1*V(VC))) )*1p;
dT=jitter*$rdist_normal(seed,0,1);
dTp=dT+Delay-tt/2;
vout=Vhi;
end
@(cross(V(CK_IN)-0.9,-1,ttol))begin
jitter = ( (Ja1*exp(Jb1*V(VC)))
+(Jc1*exp(Jd1*V(VC))) )*1f;
Delay = ( (Da1*exp(Db1*V(VC)))
+(Dc1*exp(Dd1*V(VC))) )*1p;
dT=jitter*$rdist_normal(seed,0,1);
dTp=dT+Delay-tt/2;
vout=Vlo;
end
V(CK_OUT)<+ transition(vout,dTp,tt);
end


Thank you.
 

Review your Verilog-A reference for absdelay() statement.
 
Thank you, I made it work. I am sharing my code for other people

Code:
`include "constants.vams"
`include "disciplines.vams"

module vcdl_va ( VC, CK_IN , CK_OUT );

input CK_IN, VC; output CK_OUT ; electrical CK_OUT, CK_IN, VC ;

parameter real fixed_delay=50e-12;

real time_delay;

analog begin


time_delay = V(VC)*(0.1e-9)+fixed_delay;

V(CK_OUT) <+ absdelay(V(CK_IN),time_delay,{10e-9});


end

endmodule
 
Last edited:
I have another problem with this code when I do pss noise simulation.
It works with transient simulation

ERROR (SPCRTRF-15177): HB analysis doesn't support behavioral module components with hidden states found in component 'vcdl_va'. Skipped.

I tried to fix this error with using (*ignore_hidden_states*) but still does not work


Error message from ahdl:
absdelay. Delay time is not constant and maxdelay exist.

Rewrite the module and rerun.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top