- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello everybody
Well for Edge detection we always use C language because it's much easier to code the algorithm !! What do you think is the best solution that can be coded in VHDL for edge detection or motion detection ? Best regardsLink Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
do you talk on detecting an external signal rising or falling edge (e.g. an HW-Switch "pressed" detection or a encoder's output)? In either case you should synchronise the external signal to your's system clock (twice to prevent metastability issues). Additionally I would suggest to implement a debouncing (especially when talking on HW-Switches...) by using a simple counter to ensure the external signal is stable for xyz clock cycles. This counter could also be used as the edge dectector. Just as a Quick'n dirty implementation: synchronise external signal to system clock (twice) when '0' => counter reset, when '1' => counter increments until a) external signal gets '0' again (reset) (i.e. signal was bouncing) or b) signals was stable '1' for xyz cylces (no bouncing and rising edge detected). (not to mention you could use the external signal directly for asynchronous detection by "if rising_edge(ext_Signal) then..." but be aware with asynchronous logic and not debounced signals) Best regards, Carlhermann- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Carl - I think its more complicated than edge detection on a single input signal. Sounds like the OP is talking about edge detection in an image.
The best thing to do is code up your algorithm in C/Matlab so that you know it works. Then learn digital design, and then covert it to VHDL. Compare the VHDL results to the C/Matlab model, and there you go. You can do plenty of edge detection algorithms in VHDL (sobel, Haas, lutz, wavelet ). Its really up to how good your engineering skills are.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I suggest the same as ^ matlab to model/sim before you get to the VHDL
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page