Hierarchy | Files | Modules | Signals | Tasks | Functions | Help |
// debounce & synchronize module debounce (clock, noisy, clean); parameter DELAY = 500000; // .01 sec with a 50MHz clock input clock, noisy; output clean; reg [18:0] count; reg new, clean; always @(posedge clock) if (noisy != new) begin new <= noisy; count <= 0; end else if (count == DELAY) clean <= new; else count <= count+1; endmodule // debounce
Hierarchy | Files | Modules | Signals | Tasks | Functions | Help |
This page: | Created: | Thu Dec 8 21:44:34 2005 |
From: | ./debounce.v |
Verilog converted to html by v2html 7.30 (written by Costas Calamvokis). | Help |