ashrafsazid
Advanced Member level 4
Hi,
I would like to generate a step function which will generate a stair signal. The code is following:
But there are some sharp transitions which are creating convergence error, even I am using a transition when the value is assigned to output.
I would like to use some smoothing function which will provide some smooth transition from one step to another. Can anybody please help me out to get a solution for this problem? Please give me some idea.
I would like to generate a step function which will generate a stair signal. The code is following:
Code:
if (count <=(stps-1) ) begin
@(timer(period, period, time_tol)) begin
x = x + (0.6/(stps-1));
count = count+1;
end
end else begin
x = x;
end
But there are some sharp transitions which are creating convergence error, even I am using a transition when the value is assigned to output.
Code:
V(out) <+ transition(x, time_tol, time_tol, time_tol);
where, time_tol =1n
I would like to use some smoothing function which will provide some smooth transition from one step to another. Can anybody please help me out to get a solution for this problem? Please give me some idea.