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.

VerilogA smoothing function (spline)

Status
Not open for further replies.

ashrafsazid

Advanced Member level 4
Joined
Sep 17, 2016
Messages
104
Helped
1
Reputation
2
Reaction score
2
Trophy points
18
Location
Germany
Activity points
935
Hi,

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.
 

Hi FvM,

How can I use a FIR Filter in a VerilogA module? Actually I am searchign if there are some smoothing function which I can use in this verilog code.
 

"transition()" is "Zero-Order-Hold".
However you can realize one-order-interpolation by "transition()" of trise=tfall=tdata.

Create codes of higher order interpolation by yourself.
This is true for any programming language.

If you have smart higher order interpolation code, you can port it to Verilog-A.

Can you have enough ability to write higher order interpolation by yourself ?
 
Last edited:

I am new to verilog coding and dont have so much knowledge. I saw some smoothing function but did not find any solution for that. Can you please give me a hint or solution?
 

I am new to verilog coding
There is no relation to Verilog.
You can write code by any programming language.

If you don't have any ability, your available options for filtering in Verilog-A are "transition()", "slew()", "laplace_nd()" and z_nd()".
 
Last edited:

There is no relation to Verilog.
You can write code by any programming language.

Honestly, I am bad at coding, I am trying with tanh() function to smooth the transition between the steps from last 3 days but nothing positive comes out.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top