-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtrigger_right.sv
More file actions
35 lines (31 loc) · 909 Bytes
/
Copy pathtrigger_right.sv
File metadata and controls
35 lines (31 loc) · 909 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
`timescale 1ns / 1ps
//////////////////////////////////////////////////////////////////////////////////
// Company:
// Engineer:
//
// Create Date: 12/20/2016 10:07:48 PM
// Design Name:
// Module Name: trigger_right
// Project Name:
// Target Devices:
// Tool Versions:
// Description:
//
// Dependencies:
//
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
//
//////////////////////////////////////////////////////////////////////////////////
module trigger_right( input logic clk, input logic detected, output logic sigR);
int count;
int trigEnd = 6501200;
int trigStart = 6500000;
always@( posedge clk) begin
if ( ((count <= trigEnd) & ( count >= trigStart )) && (detected == 1'b1) ) sigR = 1'b1;
else sigR = 1'b0;
if ( count <= trigEnd) count <= count + 1;
else count <= 0;
end
endmodule