-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtrigger_left.sv
35 lines (31 loc) · 907 Bytes
/
trigger_left.sv
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:08:05 PM
// Design Name:
// Module Name: trigger_left
// Project Name:
// Target Devices:
// Tool Versions:
// Description:
//
// Dependencies:
//
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
//
//////////////////////////////////////////////////////////////////////////////////
module trigger_left( input logic clk, input logic detected, output logic sigL);
int count;
int trigEnd = 6501200;
int trigStart = 6500000;
always@( posedge clk) begin
if ( ((count <= trigEnd) & ( count >= trigStart )) && (detected == 1'b1) ) sigL = 1'b1;
else sigL = 1'b0;
if ( count <= trigEnd) count <= count + 1;
else count <= 0;
end
endmodule