-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcontroller.v
More file actions
37 lines (30 loc) · 731 Bytes
/
controller.v
File metadata and controls
37 lines (30 loc) · 731 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
36
37
/*
BIST Controller
Controller of the blocks of BIST functionality
*/
`timescale 1ns/1ns
module controller
#(parameter ERR_BITS = 8, parameter SETUP_DELAY = 13)
(
input clk,
input TPG_END,
input ORA_RES,
input FIL_END,
output reg RESET,
output TPG_RESET,
output FIL_INC,
output [ERR_BITS-1:0] ERR_COUNTER
);
reg TPG_R_INT;
reg INC_INT;
counter #(ERR_BITS) ERR_COUNT(.clk(clk), .rst(RESET), .inc(ORA_RES), .counter(ERR_COUNTER));
initial begin
RESET <= 1;
TPG_R_INT <= 1;
#SETUP_DELAY
RESET <= 0;
TPG_R_INT <= 0;
end
or OR_TPG(TPG_RESET, ORA_RES, TPG_R_INT);
or OR_FIC(FIL_INC, ORA_RES, TPG_END);
endmodule