• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Mixed-Signal Design
  3. Advice on Efficient and Accurate E2R module

Stats

  • Locked Locked
  • Replies 0
  • Subscribers 64
  • Views 13823
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Advice on Efficient and Accurate E2R module

acook
acook over 9 years ago

I was hoping someone could advise me on writing a "improved" E2R module:

 

Right now I see 2 ways of triggering a discrete time block:

 

1)      Use an analog event (the way the built in E2R work)

//discretize V(Ain) triggered by absdelta function
always @(absdelta(V(Ain), vdelta, ttol, vtol))
Dreg = V(Ain);

2)      Use a sample based system (the way I like to write it)

initial forever begin
Dreg = V(Ain);
#(tsample*1.0e9);
end

 

The problem with (1) and the default absdelta is that it assumes a level of accuracy. For a wreal, it could be 1million or 1 nano depending on what you are modeling!

The problem with (2) is with the sample based system I have to assume some kind of sample time which I suspect hurts performance if the sample time is much higher than the analog is taking steps (like if I have a DC signal and I am running for 1000 seconds with a hard coded sample time of 1ns).

What I really want is to just cause the verilog block to execute if an analog timestep occurs? I didn’t play with the absdelta function, maybe if I just set everything to 0 this does the trick? 

  • Cancel

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information