





















































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
An overview of parallel processing of irregular computations through discrete event simulation using vhdl. It includes the vhdl code for a simple circuit, descriptions of discrete event simulation basics, and depth-first search algorithms for finding solutions in graphs. The document also covers various search techniques and their applications.
Typology: Slides
1 / 61
This page cannot be seen from the preview
Don't miss anything!






















































Discrete Even Simulation—Basics (cont’d)
Parallel DES for Logic Simulation
A
B C
D
E
F
G
A
B C
D
E
F
G
1
2
3
4
5 6
7
DFS (black arcs) and Soln_DFS (black+red arcs)
Graph BFS
dfs(v) /* for basic graph visit or for soln finding when nodes are partial or full solns */ v.mark = 1; for each (v,u) in E if (u.mark != 1) then dfs(u)
Algorithm Depth_First_Search_Soln for each v in V v.mark = 0; for each v in V if v.mark = 0 then if G has partial soln nodes then dfs(v); else soln_dfs(v);
soln_dfs(v) /* used when nodes are basic elts of the problem and not partial soln nodes, and a soln. is a path / v.mark = 1; If path to v is a soln, then return(1); for each (v,u) in E if (u.mark != 1) then soln_found = soln_dfs(u) if (soln_found = 1) then return(soln_found) end for; v.mark = 0; / can visit v again to form another soln on a different path */ return(0)
A
B C
D
E
F
G
1
2
3
4 5
6
7
8
9
Soln found (A,B,E,C,F)
10
Best-First Search
BeFS (root) begin open = {root} /* open is list of gen. but not expanded nodes—partial solns / best_soln_cost = infinity; while open != nullset do begin curr = first(open); if curr is a soln then return(curr) / curr is an optimal soln / else children = Expand_&_est_cost(curr); / generate all children of curr & estimate their costs---cost(u) should be a lower bound of cost of the best soln reachable from u / for each child in children do begin if child is a soln then delete all nodes w in open s.t. cost(w) >= cost(child); endif store child in open in increasing order of cost; endfor endwhile end / BFS */
Expand_&est_cost(Y) begin children = nullset; for each basic elt x of problem “reachable” from Y & can be part of current partial soln. Y do begin if x not in Y and if feasible child = Y U {x}; path_cost(child) = path_cost(Y) + cost(Y, x) /* cost(Y, x) is cost of reaching x from Y / est(child) = lower bound cost of best soln reachable from child; cost(child) = path_cost(child) + est(child); children = children U {child}; endfor end / Expand&_est_cost(Y);
Y = partial soln. = a path from root to current “node” (a basic elt. of the problem, e.g., a city in TSP, a vertex in V0 or V1 in min-cut partitioning). We go from each such “node” u to the next one u that is “reachable “ from u in the problem “graph” (which is part of what you have to formulate)
u 10
(^12 ) 19
18 17
18
16
(1)
(2)
(3)
costs
root
u 10
(^12 ) 19
18
17
18
16
(1)
(2)
(3)
costs
root
Y = partial soln.