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.

Trying to use veriloga to write an edge detector

foshanno1

Newbie
Newbie level 1
Joined
Feb 25, 2025
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
20
Hi,

So i am trying to use verilogA to write an edge detector. I can't think of a good way to do this. all i need is to trip the output whenever the input changes. I would have the cross function but the crossing threshold can change. so for example, if the input goes from 0V to 5V, I want to trip the output, but in the case when I go from -2V to -8V, I also want to trip the output. I am not sure how to do this since this requires me to keep recording the previous voltage and current voltage value? would I need a clock to do this ? Any help would appreciate it. Thanks
 
Hi,

A design starts with requirements, a functional description, specifications.
Not only what and when it should work ... but also the limits where it should not react.
Noise comes to my mind.

Voltages, rise rates, timing....

A sketch with input signals and output signals and the according timing.


Klaus
 
If you have a deriv() function (and I'm prone to
assume so) then that would seem appropriate.
Amplify into clipping and put a known good
logic buffer on the back if you mean to use,
not just plot the output signal.

"Qualifying" the "edges" vs other noises /
interferers / aggressors will probably be more
of the work if you have non-ideal inputs.
 
The better choice might be to define the "release" voltage and current such as a 12V 20 mA relay goes to 0 mA or open circuit when released.

Then release thresholds could be >2.5 or < -5 using a dual comparator as a window detector.
Does that work for you?
 


 
Hi,

So i am trying to use verilogA to write an edge detector. I can't think of a good way to do this. all i need is to trip the output whenever the input changes. I would have the cross function but the crossing threshold can change. so for example, if the input goes from 0V to 5V, I want to trip the output, but in the case when I go from -2V to -8V, I also want to trip the output. I am not sure how to do this since this requires me to keep recording the previous voltage and current voltage value? would I need a clock to do this ? Any help would appreciate it. Thanks
You can't define an edge detector unless you define state boundaries and absolute I/O levels.

You wanted +ve edge above 0 and -ve edge below 0 but this can be defined by levels alone.

You must start by a proper spec before implementation.

I did ask you to respond to a simple solution.
RSVP
 

LaTeX Commands Quick-Menu:

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top