Massive Audio D2500.1 block series User Manual Page 30

  • Download
  • Add to my manuals
  • Print
  • Page
    / 245
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 29
A Source Code
Source code for the project may be obtained on GitHub: https://github.com/
gajjanag/6111_Project. For completeness, we include all source code here as
well. For ease of browsing through the code, we have divided the modules into
roughly three categories:
Staff Modules: modules that are essentially the same as staff provided
modules, with minor modifications for our specific needs.
Labkit: top level labkit module with general instantiations, including clock
generators, and ucf file
Our Modules: modules created by us for our project
A.1 Staff Modules
A.1.1 debounce.v
1 // Switch Debounce Module
2 // use your system clock for the clock input
3 // to produce a synchronous, debounced output
4 module debounce #(parameter DELAY=270000) // .01 sec with a 27Mhz clock
5 (input reset, clock, noisy,
6 output reg clean);
7
8 reg [18:0] count;
9 reg new;
10
11 always @(posedge clock)
12 if (reset)
13 begin
14 count <= 0;
15 new <= noisy;
16 clean <= noisy;
17 end
18 else if (noisy != new)
19 begin
20 new <= noisy;
21 count <= 0;
22 end
23 else if (count == DELAY)
24 clean <= new;
25 else
26 count <= count+1;
27
28 endmodule
30
Page view 29
1 2 ... 25 26 27 28 29 30 31 32 33 34 35 ... 244 245

Comments to this Manuals

No comments