Download presentation
Presentation is loading. Please wait.
1
ICS 252 Introduction to Computer Design
Lecture 7 Winter 2004 Eli Bozorgzadeh Computer Science Department-UCI
2
ICS 252-Intro to Computer Design
Reference Lecture note by Rajesh Gupta on resource sharing[©Gupta] Chapter 6.1 and 6.2 of the textbook Administrative Midterm 1: Feb 13, 10 a.m. in the class Winter 2004 ICS 252-Intro to Computer Design
3
Resources in High level synthesis
Resource allocation Determine number of resources Resource binding Associate a resource to each operation Resource sharing More than one operation bound to same resource. Resource selection Select appropriate type to implement each operation [©Gupta] Winter 2004 ICS 252-Intro to Computer Design
4
ICS 252-Intro to Computer Design
Resource allocation Limiting cases of allocation One resource for each operation One resource per operation type Determined based on implementation size constraints Relation to scheduling [©Gupta] Winter 2004 ICS 252-Intro to Computer Design
5
ICS 252-Intro to Computer Design
Resource sharing Operation compatibility Operations that share resources Same type Non-concurrent Resource compatibility graph Resource conflict graph Complement of compatibility graph Winter 2004 ICS 252-Intro to Computer Design
6
ICS 252-Intro to Computer Design
Example * * + * * < - * * - + [©Gupta] Winter 2004 ICS 252-Intro to Computer Design
7
ICS 252-Intro to Computer Design
Optimum solution On conflict graph Disjoint graph for different types Problem of? On compatibility graph Problem of ? Conflict graph is an interval graph Hence, compatibility graph is comparability graph Min coloring problem can be solve optimally in polynomial time in interval graphs. Winter 2004 ICS 252-Intro to Computer Design
8
ICS 252-Intro to Computer Design
Greedy approach Left-edge algorithm Left-edge(I){ Lelements of I sorted in ascending order; c=0; While (L){ S=; Repeat{ sfirst element in L whose left edge is higher than the rightmost edge in S; S S U {s}; }until no more element s; c = c +1; Color elements of S with c; L L-S; } [©Gupta] Winter 2004 ICS 252-Intro to Computer Design
9
ICS 252-Intro to Computer Design
Memory elements Registers Hold data across cycles Data: value of a variable Variable lifetime in scheduled graph Can be re-used (shared) across variables Memory blocks [©Gupta] Winter 2004 ICS 252-Intro to Computer Design
10
ICS 252-Intro to Computer Design
Register sharing Given lifetime intervals of variables, determine minimum number of registers to store all the variables. Standard resource sharing problem Build register conflict/comparability graphs Use left-edge for conflict graph [©Gupta] Winter 2004 ICS 252-Intro to Computer Design
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.