Last change
on this file since 86 was 83, checked in by demin, 15 years ago |
first working version
|
-
Property svn:executable
set to
*
|
File size:
411 bytes
|
Line | |
---|
1 | module trigger
|
---|
2 | (
|
---|
3 | input wire clk, reset,
|
---|
4 | input wire data_ready,
|
---|
5 | input wire [11:0] data, threshold,
|
---|
6 | output wire trigger
|
---|
7 | );
|
---|
8 |
|
---|
9 | reg int_trigger;
|
---|
10 |
|
---|
11 | always @(posedge clk)
|
---|
12 | begin
|
---|
13 | if (reset)
|
---|
14 | begin
|
---|
15 | int_trigger <= 1'b0;
|
---|
16 | end
|
---|
17 | else if (data_ready)
|
---|
18 | begin
|
---|
19 | int_trigger <= (data >= threshold);
|
---|
20 | end
|
---|
21 | end
|
---|
22 |
|
---|
23 | assign trigger = int_trigger;
|
---|
24 |
|
---|
25 | endmodule
|
---|
Note:
See
TracBrowser
for help on using the repository browser.