-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathDECODESTART.v
More file actions
49 lines (42 loc) · 1.1 KB
/
Copy pathDECODESTART.v
File metadata and controls
49 lines (42 loc) · 1.1 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
`timescale 1ns / 1ps
//////////////////////////////////////////////////////////////////////////////////
// Company:
// Engineer:
//
// Create Date: 11.01.2018 11:39:02
// Design Name:
// Module Name: DECODESTART
// Project Name:
// Target Devices:
// Tool Versions:
// Description:
//
// Dependencies:
//
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
//
//////////////////////////////////////////////////////////////////////////////////
`include "Defines.v"
(* keep_hierarchy = "TRUE" *) module DECODESTART(
input [`NUM_STAGES-1:0] iTHERMOMETERSTART,
output [`NUM_BITS-1:0] oBINSTART
);
reg [`NUM_BITS-1:0] rBINSTART;
integer i;
wire [`NUM_STAGES-1:0] wTHERMOMETERSTART;
assign wTHERMOMETERSTART = iTHERMOMETERSTART;// << 10;
always @(wTHERMOMETERSTART)
begin
rBINSTART = 0;
for(i=0;i<`NUM_STAGES -20; i = i + 1'b1)
begin
if(wTHERMOMETERSTART[i] & ~wTHERMOMETERSTART[i+1] & ~wTHERMOMETERSTART[i+2] & ~wTHERMOMETERSTART[i+3] & ~wTHERMOMETERSTART[i+4])
begin
rBINSTART = i + 1;
end
end
end
assign oBINSTART = rBINSTART;
endmodule