Presentation is loading. Please wait.

Presentation is loading. Please wait.

CAS 721 Course Project Implementing Branch and Bound, and Tabu search for combinatorial computing problem By Ho Fai Ko (9700749)

Similar presentations


Presentation on theme: "CAS 721 Course Project Implementing Branch and Bound, and Tabu search for combinatorial computing problem By Ho Fai Ko (9700749)"— Presentation transcript:

1 CAS 721 Course Project Implementing Branch and Bound, and Tabu search for combinatorial computing problem By Ho Fai Ko (9700749)

2 Overview Background of problem Background of problem Background of algorithms Background of algorithms Branch and Bound Branch and Bound Tabu Search Tabu Search Implementation detail Implementation detail Analysis of algorithm Analysis of algorithm

3 Chip Realization Process Requirements Specification Design Implementation Chip Fabrication Good chips Source: Essentials of Electronic Testing, Kluwer 2000 Audit Design verification Manufacturing test

4 Manufacturing Test Identify faulty chips before shipping them to customers Identify faulty chips before shipping them to customers During volume production phase for mature process technologies During volume production phase for mature process technologies Improve yield through fault diagnosis Improve yield through fault diagnosis During yield ramp phase for new process technologies During yield ramp phase for new process technologies * Technology yield learning rates * Source Intel corporation Defect density

5 Introduction of SOC System-on-a-chip (SOC) integrates multiple functional components (cores) on a single silicon die System-on-a-chip (SOC) integrates multiple functional components (cores) on a single silicon die Sample SOC* Sample SOC* 8 million-gate design 8 million-gate design 2 ARM processors and 8 ADSL cores 2 ARM processors and 8 ADSL cores Compared to board-level system, SOCs are: Compared to board-level system, SOCs are: Smaller and faster Smaller and faster More reliable, lower power and cost More reliable, lower power and cost Facing more challenges for test Facing more challenges for test *Source: A DFT and Test Generation Methodology for a Large SoC Design , SNUG Europe 2001

6 Testing cores in SOCs To test a core in a SOC To test a core in a SOC Test patterns are applied to the circuit-under-test (CUT) Test patterns are applied to the circuit-under-test (CUT) Test responses from the CUT are obtained for failure analysis Test responses from the CUT are obtained for failure analysis Questions to be answered: Questions to be answered: How to apply test patterns to CUT? How to apply test patterns to CUT? How to obtain test responses from CUT? How to obtain test responses from CUT? Problems: Problems: Limited number of primary inputs and outputs on chips Limited number of primary inputs and outputs on chips Solution: Solution: Using test access mechanism (TAM) to transport test data Using test access mechanism (TAM) to transport test data

7 Background of problem

8 Problem formulation Given m TAM lines Given m TAM lines Given n cores in a SOC Given n cores in a SOC Given connectivity matrix C, such that Given connectivity matrix C, such that C[i][j] = 1 if TAM (i) can cover core (j) C[i][j] = 1 if TAM (i) can cover core (j) Find the assignment for each TAM line to cover all the cores in the SOC such that Find the assignment for each TAM line to cover all the cores in the SOC such that Number of TAM lines needed is sufficiently small Number of TAM lines needed is sufficiently small Objective function: min sum c[i][j] for all i and j Objective function: min sum c[i][j] for all i and j Subject to: Subject to: c[i][j] <= C[i][j] c[i][j] <= C[i][j] Sum[i=1..m] c[i][j] >= 1 Sum[i=1..m] c[i][j] >= 1 c[i][j] = 0 or 1 c[i][j] = 0 or 1

9 Branch and Bound (BB) A general exhaustive search algorithm A general exhaustive search algorithm Can be implemented as a backtracking algorithm Can be implemented as a backtracking algorithm Depth-first search approach Depth-first search approach Can be implemented using a priority queue Can be implemented using a priority queue Breadth-first search approach Breadth-first search approach Terminate when lower bound of solution is found, or when all possible solution are checked Terminate when lower bound of solution is found, or when all possible solution are checked Can speed up algorithm by carefully choosing the branch condition Can speed up algorithm by carefully choosing the branch condition

10 Tabu search (TS) Originally developed by Glover in 1986 Originally developed by Glover in 1986 History-based heuristic search technique History-based heuristic search technique Prohibits (Tabu) the reversal of previous moves Prohibits (Tabu) the reversal of previous moves Encourage exploration of parts of the solution space that have not been visited previously Encourage exploration of parts of the solution space that have not been visited previously Speed and quality of solution depends on: Speed and quality of solution depends on: Choice of initial solution Choice of initial solution The size, variability, and adaptability of the Tabu memory The size, variability, and adaptability of the Tabu memory How it works: How it works: Begins by marching to a local optimum Begins by marching to a local optimum Since recent moved are tabu, it is forced to search in new solution space Since recent moved are tabu, it is forced to search in new solution space Do not guarantee to reach the optimal solution Do not guarantee to reach the optimal solution

11 Why choose Tabu search? Other heuristics take advantage on exploring the relationships between decisions Other heuristics take advantage on exploring the relationships between decisions Simulated Annealing Simulated Annealing Genetic Algorithm Genetic Algorithm Decision on a variable c[i][j] = 0 or 1 does not depends on the decisions for other variables Decision on a variable c[i][j] = 0 or 1 does not depends on the decisions for other variables The only concern for this problem is to not go backward so often when searching in solution space The only concern for this problem is to not go backward so often when searching in solution space Thus, by changing the Tabu length, the search direction from Tabu search can be better directed Thus, by changing the Tabu length, the search direction from Tabu search can be better directed

12 Implementation – Data structure Double link list Double link list Store location of 1’s in the sparse matrix Store location of 1’s in the sparse matrix Double link to speed up search process Double link to speed up search process Priority queue Priority queue Simple PUSH and POP operation to the queue Simple PUSH and POP operation to the queue For branch and bound For branch and bound Breadth-first-search technique Breadth-first-search technique For Tabu search For Tabu search Act as a FIFO queue with variable length Act as a FIFO queue with variable length

13 Implementation – Problem Randomly generate a problem Randomly generate a problem Parameters Parameters m: Number of TAM lines available m: Number of TAM lines available n: Number of Cores to be covered in a SOC n: Number of Cores to be covered in a SOC K: A TAM line has to cover at least K cores K: A TAM line has to cover at least K cores The smaller K is, the less likely to find a solution The smaller K is, the less likely to find a solution K <= n K <= n To ensure randomness of the problem To ensure randomness of the problem If use a single random number generator, the problem is skewed If use a single random number generator, the problem is skewed Use multiple generators to generate problem iteratively Use multiple generators to generate problem iteratively

14 Implementation - Problem Example: n = 10, and K = 5 Example: n = 10, and K = 5 Single generator Single generator Choose random number R between K and n Choose random number R between K and n How to randomly distribute the R 1’s in n column? How to randomly distribute the R 1’s in n column? Multiple generators Multiple generators Random select a sample size 1 <= S <= n for 1 iteration Random select a sample size 1 <= S <= n for 1 iteration Randomly decide if a 1 is assigned to a column Randomly decide if a 1 is assigned to a column If total 1’s are not enough (i.e. < K), repeat If total 1’s are not enough (i.e. < K), repeat Iteration | Sample size | Selected size | |C| Iteration | Sample size | Selected size | |C| 1 | 4 | 3 | 3 1 | 4 | 3 | 3 2 | 2 | 1 | 4 2 | 2 | 1 | 4 3 | 6 | 4 | 8 3 | 6 | 4 | 8

15 Implementation – BB Use priority queue and breadth first search technique for branch and bound Use priority queue and breadth first search technique for branch and bound The lower bound: The lower bound: The value of objective function has to be >= n The value of objective function has to be >= n If the constraint is satisfied: If the constraint is satisfied: Sum[i=1..m] c[i][j] >= 1 for all j Sum[i=1..m] c[i][j] >= 1 for all j Solution is found Solution is found The branching condition: The branching condition: The constraint to the problem: The constraint to the problem: c[i][j] <= C[i][j] c[i][j] <= C[i][j] If constraint is violated, it is a dead end If constraint is violated, it is a dead end If the cost of unfinished solution + number of cores that yet to be covered is already higher than the best one found so far, declare it as dead end If the cost of unfinished solution + number of cores that yet to be covered is already higher than the best one found so far, declare it as dead end

16 Implementation - TS Use a FIFO queue with length specified as Tabu list Use a FIFO queue with length specified as Tabu list Start by trying to find an initial solution that satisfies all constraints without worrying about optimality Start by trying to find an initial solution that satisfies all constraints without worrying about optimality Length of Tabu list is changed every 20 iteration Length of Tabu list is changed every 20 iteration To helps exploring new solution space To helps exploring new solution space For each iteration: For each iteration: Find the column with most 1’s to change Find the column with most 1’s to change Check changes for each element in the column for constraint violation Check changes for each element in the column for constraint violation If not violated, check if solution is better If not violated, check if solution is better If is better, keep the current best solution, and Tabu the move to avoid reversal moves If is better, keep the current best solution, and Tabu the move to avoid reversal moves

17 Program output

18 Analysis The size of solution space is 2^(mn) The size of solution space is 2^(mn) Even with really good branching condition Even with really good branching condition The size of solution space is 2^(Kn) The size of solution space is 2^(Kn) Still really large Still really large Thus, execution time increases exponentially Thus, execution time increases exponentially For Branch and bound For Branch and bound Impossible to perform exhaustive search Impossible to perform exhaustive search For Tabu search For Tabu search Fast Fast Does not know optimal solution is reached unless it reaches the lower bound of the solution space Does not know optimal solution is reached unless it reaches the lower bound of the solution space Does not guarantee the optimality of solution Does not guarantee the optimality of solution

19 Summary Implemented two algorithms for a combinatorial computing problem Implemented two algorithms for a combinatorial computing problem Branch and Bound Branch and Bound Exhaustive search Exhaustive search Execution time grows exponentially Execution time grows exponentially Tabu search Tabu search Fast Fast Does not guarantee to reach optimality Does not guarantee to reach optimality


Download ppt "CAS 721 Course Project Implementing Branch and Bound, and Tabu search for combinatorial computing problem By Ho Fai Ko (9700749)"

Similar presentations


Ads by Google