The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Mar 28th, 2024, 2:24pm
Pages: 1
Send Topic Print
Regarding issue with absdelta (Read 3491 times)
AMS_ei
Community Member
***
Offline



Posts: 67

Regarding issue with absdelta
May 28th, 2017, 5:37am
 
Hi,

I am trying to achieve electrical to real conversion using "absdelta".
Here is my code:

//code starts here/////////
module elec2real(signal);
 input signal;
 electrical signal;

 real sig_vol;

 initial begin
   sig_vol = 0;
 end
 always @(absdelta(V(signal), 0.01)) begin
   sig_vol = V(signal);
 end

endmodule

//Code ends here///////////////

The issue is that when V(signal) is 0V, sig_vol is driven to -4.44089e-16 as shown in the attached file.

Could anyone please explain me how can I resolve this issue?

Thank you.

Kind regards.
Back to top
 

absdelta.png
View Profile   IP Logged
AMS_ei
Community Member
***
Offline



Posts: 67

Re: Regarding issue with absdelta
Reply #1 - May 28th, 2017, 6:21am
 
The waves of V(signal) and sig_vol is attached
Back to top
 

absdelta_waves.png
View Profile   IP Logged
Ken Kundert
Global Moderator
*****
Offline



Posts: 2384
Silicon Valley
Re: Regarding issue with absdelta
Reply #2 - May 28th, 2017, 4:30pm
 
What issue? Are you concerned with a difference of less than a fV?

-Ken
Back to top
 
 
View Profile WWW   IP Logged
AMS_ei
Community Member
***
Offline



Posts: 67

Re: Regarding issue with absdelta
Reply #3 - May 29th, 2017, 8:48pm
 
Hi Ken,

Thank you for your interest
I am bit concerned about its -ve value.
I was expecting a +ve value (may be in the order of fV) but, it should be +ve.
Is it possible to obtain that?

Thank you.

Kind regards.
Back to top
 
 
View Profile   IP Logged
Ken Kundert
Global Moderator
*****
Offline



Posts: 2384
Silicon Valley
Re: Regarding issue with absdelta
Reply #4 - May 30th, 2017, 12:08am
 
Simulators cannot provide the accuracy you are looking for. There is always a small amount of uncertainty in the result.

-Ken
Back to top
 
 
View Profile WWW   IP Logged
Pages: 1
Send Topic Print
Copyright 2002-2024 Designer’s Guide Consulting, Inc. Designer’s Guide® is a registered trademark of Designer’s Guide Consulting, Inc. All rights reserved. Send comments or questions to editor@designers-guide.org. Consider submitting a paper or model.