essen - university of torontojzhu/publications/kluwer97.pdf · gro wth that has b een paral-leled...

47

Upload: others

Post on 14-Aug-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Essen - University of Torontojzhu/publications/kluwer97.pdf · gro wth that has b een paral-leled only b y the adv ances in IC fabrication. Since the design problems at lo w er lev

Essential Issues in Codesign

Daniel D. Gajski

Jianwen Zhu

Rainer D�omer

Technical Report ICS-97-26

June, 1997

Department of Information and Computer Science

University of California, Irvine

Irvine, CA 92697-3425, USA

(714) 824-8059

[email protected]

[email protected]

[email protected]

Abstract

In this report we discuss the main models of computation, the basic types of architectures, and

language features needed to specify systems. We also give an overview of a generic methodology for

designing systems, that include software and hardware parts, from executable speci�cations.

Page 2: Essen - University of Torontojzhu/publications/kluwer97.pdf · gro wth that has b een paral-leled only b y the adv ances in IC fabrication. Since the design problems at lo w er lev

Contents

1 Models 11.1 Model and architecture de�nition : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 11.2 Model taxonomy : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 31.3 Finite-state machine : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 41.4 Finite-state machine with datapath : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 51.5 Petri net : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 61.6 Hierarchical concurrent �nite-state machine : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 81.7 Programming languages : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 81.8 Program-state machine : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 9

2 Architectures 102.1 Controller architecture : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 102.2 Custom Datapath architecture : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 112.3 FSMD architecture : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 132.4 CISC architecture : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 132.5 RISC architecture : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 142.6 VLIW architecture : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 152.7 Parallel architecture : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 16

3 Languages 173.1 Introduction : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 173.2 Characteristics of system models : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 183.3 Concurrency : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 183.4 State transitions : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 203.5 Hierarchy : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 213.6 Programming constructs : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 233.7 Behavioral completion : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 233.8 Exception handling : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 243.9 Timing : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 243.10 Communication : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 253.11 Process synchronization : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 263.12 SpecC+ Language description : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 28

4 Generic codesign methodology 334.1 System speci�cation : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 334.2 Allocation : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 354.3 Partitioning and the model after partitioning : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 354.4 Scheduling and the scheduled model : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 364.5 Communication synthesis and the communication model : : : : : : : : : : : : : : : : : : : : : : : : 374.6 Analysis and validation ow : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 394.7 Backend : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 39

5 Conclusion and Future Work 40

6 Index 43

i

Page 3: Essen - University of Torontojzhu/publications/kluwer97.pdf · gro wth that has b een paral-leled only b y the adv ances in IC fabrication. Since the design problems at lo w er lev

List of Figures

2 Implementation architectures : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 21 Conceptual views of an elevator controller : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 33 FSM model for the elevator controller. (y) : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 44 State-based FSM model for the elevator controller. (y) : : : : : : : : : : : : : : : : : : : : : : : : : 55 FSMD model for the elevator controller. (y) : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 66 A Petri net example. (y) : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 77 Petri net representations : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 78 Statecharts: hierarchical concurrent states. (y) : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 89 An example of program-state machine. (y) : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 910 A generic controller design : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 1011 An example of a custom datapath. (z) : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 1112 Simple datapath with one accumulator : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 1213 Two di�erent datapaths for FIR �lter : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 1214 Design model : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 1315 CISC with microprogrammed control. (y) : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 1416 RISC with hardwired control. (y) : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 1517 An example of VLIW datapath. (y) : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 1519 Some typical con�gurations : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 1718 A heterogeneous multiprocessor : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 1820 Data-driven concurrency : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 1921 Pipelined concurrency : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 2022 Control-driven concurrency : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 2023 State transitions between arbitrarily complex behaviors. (y) : : : : : : : : : : : : : : : : : : : : : : 2124 Structural hierarchy. (y) : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 2125 Sequential behavioral decomposition : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 2226 Behavioral decomposition types : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 2227 Code segment for sorting. : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 2328 Behavioral completion : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 2329 Exception types : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 2430 Timing diagram : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 2531 Communication model. : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 2533 Integer channel. : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 2634 A simple synchronous bus protocol : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 2632 Examples of communication : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 2735 Protocol description of the synchronous bus protocol. : : : : : : : : : : : : : : : : : : : : : : : : : : 2736 Control synchronization : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 2837 Data-dependent synchronization in Statecharts : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 2838 A graphical SpecC+ speci�cation example. : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 2839 A textual SpecC+ speci�cation example. : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 2940 Component wrapper speci�cation. : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 3041 Source code of the component wrapper speci�cation. : : : : : : : : : : : : : : : : : : : : : : : : : : 3142 Common con�gurations before and after channel inlining : : : : : : : : : : : : : : : : : : : : : : : : 3243 Timing speci�cation of the SRAM read protocol. : : : : : : : : : : : : : : : : : : : : : : : : : : : : 3244 Timing implementation of the SRAM read protocol. : : : : : : : : : : : : : : : : : : : : : : : : : : 3246 Conceptual model of speci�cation : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 3345 Generic methodology. : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 3447 Conceptual model after partitioning : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 3548 Conceptual model after scheduling : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 3649 Conceptual model after communication synthesis : : : : : : : : : : : : : : : : : : : : : : : : : : : : 38

ii

Page 4: Essen - University of Torontojzhu/publications/kluwer97.pdf · gro wth that has b een paral-leled only b y the adv ances in IC fabrication. Since the design problems at lo w er lev

Essential Issues in Codesign

Daniel D. Gajski, Jianwen Zhu, Rainer D�omer

Department of Information and Computer Science

University of California, Irvine

Irvine, CA 92697-3425, USA

Abstract

In this report we discuss the main models of compu-tation, the basic types of architectures, and languagefeatures needed to specify systems. We also give anoverview of a generic methodology for designing sys-tems, that include software and hardware parts, fromexecutable speci�cations.

1 Models

In the last ten years, VLSI design technology, and theCAD industry in particular, have been very successful,enjoying an exceptional growth that has been paral-leled only by the advances in IC fabrication. Sincethe design problems at the lower levels of abstrac-tion became humanly intractable earlier than those athigher abstraction levels, researchers and the industryalike were forced to devote their attention �rst to lowerlevel problems such as circuit simulation, placement,routing and oorplanning. As these problems becamemore manageable, CAD tools for logic simulation andsynthesis were developed successfully and introducedinto the design process. As design complexities havegrown and time-to-market requirements have shrunkdrastically, both industry and academia have begun tofocus on system levels of design since they reduce thenumber of objects that a designer needs to considerby an order of magnitude and thus allow the designand manufacturing of complex application speci�c in-tegrated circuits (ASICs) in short periods of time.

The �rst step in designing a system is specifyingits functionality. To help us understand and organizethis functionality in a systematic manner, we can usea variety of conceptual models. In this chapter, wewill survey the key conceptual models that are mostcommonly used for hardware and for software systems,while in the next section we examine the various archi-tectures that are used in implementing those models,while in the third section we survey language features

needed for specifying systems. In the fourth sectionwe present a generic codesign methodology.

1.1 Model and architecture de�nition

System design is the process of implementing a de-sired functionality using a set of physical components.Clearly, then, the whole process of system design mustbegin with specifying the desired functionality. Thisis not, however, an easy task. For example, considerthe task of specifying an elevator controller. How dowe describe its functionality in su�cient detail that wecould predict with absolute precision what the eleva-tor's position would be after any sequence of pressedbuttons? The problem with natural-language speci�-cations is that they are often ambiguous and incom-plete, lacking the capacity for detail that is requiredby such a task. Therefore, we need a more preciseapproach to specify functionality.

The most common way to achieve the level of pre-cision we need is to think of the system as a collectionof simpler subsystems, or pieces, and the method orthe rules for composing these pieces to create systemfunctionality. We call such a method a model.

To be useful, a model should possess certain quali-ties. First, it should be formal so that it contains noambiguity. It should also be complete, so that it candescribe the entire system. In addition, it should becomprehensible to the designers who need to use it,as well as being easy to modify, since it is inevitablethat, at some point, they will wish to change the sys-tem's functionality. Finally, a model should be naturalenough to aid, rather than impede, the designer's un-derstanding of the system.

It is important to note that a model is a formal sys-tem consisting of objects and composition rules, andis used for describing a system's characteristics. Typ-ically, we would use a particular model to decomposea system into pieces, and then generate a speci�cationby describing these pieces in a particular language. A

1

Page 5: Essen - University of Torontojzhu/publications/kluwer97.pdf · gro wth that has b een paral-leled only b y the adv ances in IC fabrication. Since the design problems at lo w er lev

language can capture many di�erent models, and amodel can be captured in many di�erent languages.

The purpose of a conceptual model is to providean abstracted view of a system. Figure 1, for exam-ple, shows two di�erent models of an elevator con-troller, whose English description is in Figure 1(a).The di�erence between these two models is that Fig-ure 1(b) represents the controller as a set of program-ming statements, whereas Figure 1(c) represents thecontroller as a �nite state machine in which the statesindicate the direction of the elevator movement.

As you can see, each of these models represents aset of objects and the interactions among them. Thestate-machine model, for example, consists of a set ofstates and transitions between these states; the pro-gramming model, in contrast, consists of a set of state-ments that are executed under a control sequence thatuses branching and looping. The advantage to havingthese di�erent models at our disposal is that they al-low designers to represent di�erent views of a system,thereby exposing its di�erent characteristics. For ex-ample, the state-machine model is best suited to rep-resent a system's temporal behavior, as it allows adesigner to explicitly express the modes and mode-transitions caused by external or internal events. Thealgorithmic model, on the other hand, has no explicitstates. However, since it can specify a system's input-output relation in terms of a sequence of statements,it is well-suited to representing the procedural view ofthe system.

Designers choose di�erent models in di�erentphases of the design process, in order to emphasizethose aspects of the system that are of interest to themat that particular time. For example, in the speci�-cation phase, the designer knows nothing beyond thefunctionality of the system, so he will tend to use amodel that does not re ect any implementation infor-mation. In the implementation phase, however, wheninformation about the system's components is avail-able, the designer will switch to a model that can cap-ture the system's structure.

Di�erent models are also required for di�erent ap-plication domains. For example, designers wouldmodel real-time systems and database systems di�er-ently, since the former focus on temporal behavior,while the latter focus on data organization.

Once the designer has found an appropriate modelto specify the functionality of a system, he can de-scribe in detail exactly how that system will work. Atthat point, however, the design process is not com-plete, since such a model has still not described ex-actly how that system is to be manufactured. The

. . .

NextStateLogic

Output Logic

StateRegister

rfloor cfloor

d

cfloorrfloor

Processor Memory

Interfaced

rfloor

cfloor

(a)

(b)

Bus

Figure 2: Architectures used in: (a) a register-level im-plementation, (b) a system-level implementation. (z)

2

Page 6: Essen - University of Torontojzhu/publications/kluwer97.pdf · gro wth that has b een paral-leled only b y the adv ances in IC fabrication. Since the design problems at lo w er lev

(a)

then the elevator remains idle.

then lower the elevator to the requested floor.

"If the elevator is stationary and the floor requested is equal to the current floor,

If the elevator is stationary and the floor requested is less than the current floor,

If the elevator is stationary and the floor requested is greater than the current floor, then raise the elevator to the requested floor."

(b)

loop if (rfloor = cfloor) then d := idle; elsif (rfloor < cfloor) then d := down; elsif (rfloor > cfloor) then d := up; end if;end loop;

(c)

UpIdleDown

(rfloor < cfloor)/ d := down

(rfloor = cfloor)/ d := idle

(rfloor > cfloor)/ d := up

(rfloor < cfloor)/ d := down

(rfloor > cfloor)/ d := up

(rfloor = cfloor)/ d := idle

(rfloor = cfloor)/ d := idle

(rfloor < cfloor) / d := down

(rfloor < cfloor) / d := up

Figure 1: Conceptual views of an elevator controller: (a) desired functionality in English, (b) programming model,(c) state-machine model. (y)

next step, then, is to transform the model into anarchitecture, which serves to de�ne the model's im-plementation by specifying the number and types ofcomponents as well as the connections between them.In Figure 2, for example, we see two di�erent architec-tures, either of which could be used to implement thestate-machine model of the elevator controller in Fig-ure 1(c). The architecture in Figure 2(a) is a register-level implementation, which uses a state register tohold the current state and the combinational logic toimplement state transitions and values of output sig-nals. In Figure 2(b), we see a processor-level imple-mentation that maps the same state-machine modelinto software, using a variable in a program to repre-sent the current state and statements in the programto calculate state transitions and values of output sig-nals. In this architecture, the program is stored in thememory and executed by the processor.

Models and architectures are conceptual and imple-mentation views on the highest level of abstraction.Models describe how a system works, while architec-tures describe how it will be manufactured. The de-sign process or methodology is the set of designtasks that transform a model into an architecture.At the beginning of this process, only the system'sfunctionality is known. The designer's job, then, isto describe this functionality in some language whichis based on the most appropriate models. As the de-

sign process proceeds, an architecture will begin toemerge, with more detail being added at each step inthe process. Generally, designers will �nd that certainarchitectures are more e�cient in implementing cer-tain models. In addition, design and manufacturingtechnology will have a great in uence on the choice ofan architecture. Therefore, designers have to considermany di�erent implementation alternatives before thedesign process is complete.

1.2 Model taxonomy

System designers use many di�erent models in theirvarious hardware or software design methodologies.In general, though, these models fall into �ve dis-tinct categories: (1) state-oriented; (2) activity-orien-ted; (3) structure-oriented; (4) data-oriented; and (5)heterogeneous. A state-oriented model, such as a�nite-state machine, is one that represents the sys-tem as a set of states and a set of transitions betweenthem, which are triggered by external events. State-oriented models are most suitable for control systems,such as real-time reactive systems, where the system'stemporal behavior is the most important aspect ofthe design. An activity-oriented model, such as adata ow graph, is one that describes a system as a setof activities related by data or execution dependencies.This model is most applicable to transformational sys-

3

Page 7: Essen - University of Torontojzhu/publications/kluwer97.pdf · gro wth that has b een paral-leled only b y the adv ances in IC fabrication. Since the design problems at lo w er lev

tems, such as digital signal processing systems, wheredata passes through a set of transformations at a �xedrate. Using a structure-oriented model, such as ablock diagram, we would describe a system's physicalmodules and interconnections between them. Unlikestate-oriented and activity-oriented models which pri-marily re ect a system's functionalities, the structure-oriented models focus mainly on the system's physicalcomposition. Alternatively, we can use a data-orien-ted model, such as an entity-relationship diagram,when we need to represent the system as a collectionof data related by their attributes, class membershipand interactions. This model is most suitable for infor-mation systems, such as databases, where the functionof the system is less important than the data organi-zation of the system. Finally, a designer could use aheterogeneous model { one that integrates many ofthe characteristics of the previous four models { when-ever he needs to represent a variety of di�erent viewsin a complex system.

In the rest of this section we will describe somefrequently used models.

1.3 Finite-state machine

A �nite-state machine (FSM) is an example of astate-oriented model. It is the most popular modelfor describing control systems, since the temporal be-havior of such systems is most naturally representedin the form of states and transitions between states.

Basically, the FSMmodel consists of a set of states,a set of transitions between states, and a set of ac-tions associated with these states or transitions.

The �nite state machine can be de�ned abstractlyas the quintuple

< S; I;O; f; h >

where S; I; andO represent a set of states, set of inputsand a set of outputs, respectively, and f and h rep-resent the next-state and the output functions. Thenext state function f is de�ned abstractly as a map-ping S � I ! S. In other words, f assigns to everypair of state and input symbols another state sym-bol. The FSM model assumes that transitions fromone state to another occur only when input symbolschange. Therefore, the next-state function f de�neswhat the state of the FSM will be after the input sym-bols change.

The output function h determines the output val-ues in the present state. There are two di�erent typesof �nite state machine which correspond to two di�er-ent de�nitions of the output function h. One type is a

state-based or Moore-type, for which h is de�nedas a mapping S ! O. In other words, an output sym-bol is assigned to each state of the FSM and outputedduring the time the FSM is in that particular state.The other type is an input-based or Mealy-typeFSM, for which h is de�ned as the mapping S�I ! O.In this case, an output symbol in each state is de�nedby a pair of state and input symbols and it is outputedwhile the state and the corresponding input symbolspersist.

According to our de�nition, each set S; I; and Omay have any number of symbols. However, in real-ity we deal only with binary variables, operators andmemory elements. Therefore, S; I; and O must beimplemented as a cross-product of binary signals ormemory elements, whereas functions f and h are de-�ned by Boolean expressions that will be implementedwith logic gates.

S1S2

S3

startr2/u1

r1/d1

r3/u2r1/d2

r2/d

1r3

/u1

r2/n

r3/n

r1/n

Figure 3: FSM model for the elevator controller. (y)

In Figure 3, we see an input-based FSM that modelsthe elevator controller in a building with three oors,as described in Section 1.1. In this model, the set ofinputs I = fr1; r2; r3g represents the oor requested.For example, r2 means that oor 2 is requested. Theset of outputs O = fd2; d1; n; u1; u2g represents thedirection and number of oors the elevator should go.For example, d2 means that the elevator should godown 2 oors, u2 means that the elevator should goup 2 oors, and n means that the elevator should stayidle. The set of states represents the oors. In Fig-ure 3, we can see that if the current oor is 2 (i.e., thecurrent state is S2), and oor 1 is requested, then theoutput will be d1.

In Figure 4 we see the state-based model for thesame elevator controller, in which the value of the out-put is indicated in each state. Each state has beensplit into three states representing each of the outputsignals that the state machine in Figure 3 will outputwhen entering that particular state.

4

Page 8: Essen - University of Torontojzhu/publications/kluwer97.pdf · gro wth that has b een paral-leled only b y the adv ances in IC fabrication. Since the design problems at lo w er lev

S12

S

S11

13

S

S

21

S22

23

S

S

S

31

33

32

start/d2

/d1

/n

/d1

/n

/u1

/n

/u1

/u2

r1r1r1

r2

r1

r1

r1

r2

r2

r1

r1

r1r2

r2

r3

r3r2

r2

r3

r3

r3r2r3r2

r3r3r3

Figure 4: State-based FSM model for the elevator con-troller. (y)

In practical terms, the primary di�erence betweenthese two models is that the state-based FSM mayrequire quite a few more states than the input-basedmodel. This is because in a input-based model, theremay be multiple arcs pointing to a single state, eacharc having a di�erent output value; in the state-basedmodel, however, each di�erent output value would re-quire its own state, as is the case in Figure 4.

1.4 Finite-state machine with datap-

ath

In cases when a FSM must represent integer or oating-point numbers, we could encounter a state-explosion problem, since, if each possible value for anumber requires its own state, then the FSM couldrequire an enormous number of states. For exam-ple, a 16-bit integer can represent 216 or 65536 dif-ferent states. There is a fairly simple way to eliminatethe state-explosion problem, however, as it is possi-ble to extend a FSM with integer and oating-pointvariables, so that each variable replaces thousands ofstates. The introduction of a 16-bit variable, for ex-ample, would reduce the number of states in the FSMmodel by 65536.

In order to formally de�ne a FSMD[Gaj97], wemust extend the de�nition of a FSM introduced inthe previous section by introducing sets of datapathvariables, inputs and outputs that will complementthe sets of FSM states, inputs and outputs.

As we mentioned in the previous section an FSM isa quintuple

< S; I;O; f; h >

Each state, input and output symbols are de�ned bya cross-product of Boolean variables. More precisely,

I=A1 �A2 � : : : Ak

S=Q1 �Q2 � : : :Qm

O=Y1 � Y2 � : : : Yn

where Ai; 1 � i � k; is an input signal, Qi; 1 � i � mis the ip- op output and Yi; 1 � i � n is an outputsignal.

In order to include a datapath, we must extend theabove FSM de�nition by adding the set of datapathvariables, inputs and outputs. More formally, we de-�ne a variables set

V = V1 � V2 � : : : Vq

which de�nes the state of the datapath by de�ning thevalues of all variables in each state.

In the same fashion, we can separate the set ofFSMD inputs into a set of FSM inputs IC and a setof datapath inputs ID . Thus,

I = IC � ID

where IC = A1 � A2 � : : : Ak as before and ID =B1 �B2 � : : : Bp.

Similarly, the output set consists of FSM outputsOC and datapath outputs OD. In other words,

O = OC �OD

where OC = Y1 � Y2 : : : Yn as before and OD =Z1 � Z2 � : : : Zr. However, note that Ai; Qj andYk represent Boolean variables while Bi; Vi and Ziare Boolean vectors which in turn represent integers, oating-point numbers and characters. For example,in a 16-bit datapath, Bi; Vi and Zi would be 16 bitswide and if they were positive integers, they would beable to assume values from 0 to 216�1.

Except for very trivial cases, the size of the data-path variables, and ports makes speci�cation of func-tions f and h in a tabular form very di�cult. In or-der to be able to specify variable values in an e�cientand understandable way in the de�nition of an FSMD,we will specify variable values with arithmetic expres-sions.

We de�ne the set of all possible expressions, Expr,over the set of variables V , to be the set of all con-stants K of the same type as variables in V , the setof variables V itself and all the expressions obtainedby combining two expressions with arithmetic, logic,or rearrangement operators.

5

Page 9: Essen - University of Torontojzhu/publications/kluwer97.pdf · gro wth that has b een paral-leled only b y the adv ances in IC fabrication. Since the design problems at lo w er lev

More formally,

Expr(V )=K [ V [ f(ei2ej) j ei; ej

2 Expr;2 is an acceptable operatorg

Using Expr(V ) we can de�ne the values of thestatus signals as well as transformations in the dat-apath. Let STAT = fstatk = ei4ej j ei; ej ;2Expr(V );4 2 f�; <;=; 6=; >;�gg be the set of allstatus signals which are described as relations be-tween variables or expressions of variables. Examplesof status signals are Data 6= 0; (a � b) > (x + y) and(counter = 0)AND(x > 10). The relations de�ningstatus signals are either true, in which case the statussignal has value 1 or false in which case it has value 0.

With formal de�nition of expressions and relationsover a set of variables we can simplify function f :(S � V )� I ! S � V by separating it into two parts:fC and fD.. The function fC de�nes the next state ofthe control unit

fC : S � IC � STAT ! S

while the function fD de�nes the values of datapathvariables in the next state

fD : S � V � ID ! V

In other words, for each state si 2 S we computea new value for each variable Vj 2 V in the datap-ath by evaluating an expression ej 2 Expr(V ). Thus,the function fD is represented by a set of simpler func-tions, in which each function in the set de�nes variablevalues for the state si

fD :=ffDi : V � ID ! V :

fVj = ej jVj 2 V; ej 2 Expr(V � ID)gg

In other words, function fD is decomposed into a set offunctions fDi, where each fDi assigns one expressionek to each variable Vj in the datapath in state si.Therefore, new values for all variables in the datapathare computed by evaluating expressions ej , for all jsuch that 1 � j � q.

Similarly, we can decompose the output functionh : S � V � I ! O into two di�erent functions, hCand hD where hC de�nes the external control outputsOC as in the de�nition of an FSM and hD de�nesexternal datapath outputs.

Therefore,

hC : S � IC � STAT ! OC

andhD : S � V � ID ! OD

Note, again that variables in OC are Boolean variableand that variables in OD are Boolean vectors.

Using this kind of FSMD, we could model the el-evator controller example in Figure 3 with only onestate, as shown in Figure 5. This reduction in thenumber of states is possible because we have desig-nated a variable cfloor to store the state value of theFSM in Figure 3 and rfloor to store the values of r1,r2 and r3.

S1

/ output := 0

start

(cfloor != rloor)

(cfloor = rfloor)

/ cfloor:=rfloor; output := rfloor − cfloor

Figure 5: FSMD model for the elevator controller. (y)

In general, the FSM is suitable for modeling con-trol-dominated systems, while the FSMD can be suit-able for both control- and computation-dominatedsystems. However, it should be pointed out that nei-ther the FSM nor the FSMD model is suitable forcomplex systems, since neither one explicitly supportsconcurrency and hierarchy. Without explicit supportfor concurrency, a complex system will precipitate anexplosion in the number of states. Consider, for exam-ple, a system consisting of two concurrent subsystems,each with 100 possible states. If we try to representthis system as a single FSM or FSMD, we must rep-resent all possible states of the system, of which thereare 100 � 100 = 10; 000. At the same time, the lackof hierarchy would cause an increase in the number ofarcs. For example, if there are 100 states, each requir-ing its own arc to transition to a speci�c state for aparticular input value, we would need 100 arcs, as op-posed to the single arc required by a model that canhierarchically group those 100 states into one state.The problem with such models, of course, is that oncethey reach several hundred states or arcs, they becomeincomprehensible to humans.

1.5 Petri net

The Petri net model [Pet81, Rei92] is another typeof state-oriented model, speci�cally de�ned to modelsystems that comprise interacting concurrent tasks.The Petri net model consists of a set of places, a setof transitions, and a set of tokens. Tokens reside inplaces, and circulate through the Petri net by beingconsumed and produced whenever a transition �res.

6

Page 10: Essen - University of Torontojzhu/publications/kluwer97.pdf · gro wth that has b een paral-leled only b y the adv ances in IC fabrication. Since the design problems at lo w er lev

More formally, a Petri net is a quintuple

< P; T; I; O; u > (1)

where P = fp1; p2; : : : ; pmg is a set of places, T =ft1; t2; : : : ; tng is a set of transitions, and P and T aredisjoint. Further, the input function, I : T ! P+,de�nes all the places providing input to a transition,while the output function, O : T ! P+, de�nes all theoutput places for each transition. In other words, theinput and output functions specify the connectivity ofplaces and transitions. Finally, the marking functionu : P ! N de�nes the number of tokens in each place,where N is the set of non-negative integers.

Net = (P, T, I, O, u)P = {p1, p2, p3, p4, p5}T = {t1, t2, t3, t4}

I(t1) = {p1}I(t2) = {p2,p3,p5}I(t3) = {p3}I(t4) = {p4}

p1 p5

p2

p3

p4t4

t3

t2t1

I: O: u: u(p1) = 1u(p2) = 1u(p3) = 2u(p4) = 0u(p5) = 1

O(t1) = {p5}O(t2) = {p3,p5}O(t3) = {p4}O(t4) = {p2,p3}

Figure 6: A Petri net example. (y)

In Figure 6, we see a graphic and a textual repre-sentation of a Petri net. Note that there are �ve places(graphically represented as circles) and four transi-tions (graphically represented as solid bars) in thisPetri net. In this instance, the places p2, p3, and p5provide inputs to transition t2, and p3 and p5 are theoutput places of t2. The marking function u assignsone token to p1, p2 and p5 and two tokens to p3, asdenoted by u(p1; p2; p3; p4; p5) = (1; 1; 2; 0; 1).

As mentioned above, a Petri net executes by meansof �ring transitions. A transition can �re only if it isenabled { that is, if each of its input places has at leastone token. A transition is said to have �red when ithas removed all of its enabling tokens from its inputplaces, and then deposited one token into each outputplace. In Figure 6, for example, after transition t2�res, the marking u will change to (1; 0; 2; 0; 1).

Petri nets are useful because they can e�ectivelymodel a variety of system characteristics. Figure 7(a),for example, shows the modeling of sequencing, in

which transition t1 �res after transition t2. In Fig-ure 7(b), we see the modeling of non-deterministicbranching, in which two transitions are enabled butonly one of them can �re. In Figure 7(c), we seethe modeling of synchronization, in which a transi-tion can �re only after both input places have tokens.Figure 7(d) shows how one would model resource con-tention, in which two transitions compete for the sametoken which resides in the place in the center. In Fig-ure 7(e), we see how we could model concurrency, inwhich two transitions, t2 and t3, can �re simultane-ously. More precisely, Figure 7(e) models two concur-rent processes, a producer and a consumer; the tokenlocated in the place at the center is produced by t2and consumed by t3.

Petri net models can be used to check and validatecertain useful system properties such as safeness andliveness. Safeness, for example, is the property ofPetri nets that guarantees that the number of tokensin the net will not grow inde�nitely. In fact, we cannotconstruct a Petri net in which the number of tokensis unbounded. Liveness, on the other hand, is theproperty of Petri nets that guarantees a dead-lock freeoperation, by ensuring that there is always at least onetransition that can �re.

(a) (c)(b)

(e)

t2 t1 t1t2t1

(d)

t1 t2 t1 t2 t3 t4

Figure 7: Petri net representing: (a) sequencing, (b)branching, (c) synchronization, (d) contention, (e)concurrency. (y)

Although a Petri net does have many advantagesin modeling and analyzing concurrent systems, it alsohas limitations that are similar to those of an FSM:

7

Page 11: Essen - University of Torontojzhu/publications/kluwer97.pdf · gro wth that has b een paral-leled only b y the adv ances in IC fabrication. Since the design problems at lo w er lev

it can quickly become incomprehensible with any in-crease in system complexity.

1.6 Hierarchical concurrent

�nite-state machine

The hierarchical concurrent �nite-state ma-chine (HCFSM) is essentially an extension of the FSMmodel, which adds support for hierarchy and con-currency, thus eliminating the potential for state andarc explosion that occurred when describing hierarchi-cal and concurrent systems with FSM models.

Like the FSM, the HCFSM model consists of a setof states and a set of transitions. Unlike the FSM,however, in the HCFSM each state can be furtherdecomposed into a set of substates, thus modelinghierarchy. Furthermore, each state can also be de-composed into concurrent substates, which executein parallel and communicate through global variables.The transitions in this model can be either structuredor unstructured, with structured transitions allowedonly between two states on the same level of hierarchy,while unstructured transitions may occur between anytwo states regardless of their hierarchical relationship.

One language that is particularly well-adapted tothe HCFSM model is Statecharts [Har87], since it caneasily support the notions of hierarchy, concurrencyand communication between concurrent states. Stat-echarts uses unstructured transitions and a broadcastcommunication mechanism, in which events emittedby any given state can be detected by all other states.

The Statecharts language is a graphic language.Speci�cally, we use rounded rectangles to denotestates at any level, and encapsulation to express a hi-erarchical relation between these states. Dashed linesbetween states represent concurrency, and arrows de-note the transitions between states, each arrow beinglabeled with an event and, optionally, with a paren-thesized condition and/or action.

Figure 8 shows an example of a system representedby means of Statecharts. In this �gure, we can see thatstate Y is decomposed into two concurrent states, Aand D; the former consisting of two further substates,B and C, while the latter comprises substates E, F ,and G. The bold dots in the �gure indicate the start-ing points of states. According to the Statecharts lan-guage, when event b occurs while in state C, A willtransfer to state B. If, on the other hand, event aoccurs while in state B, A will transfer to state C,but only if condition P holds at the instant of occur-rence. During the transfer from B to C, the action cassociated with the transition will be performed.

Y

A

B

C

D

E

F

G

b

u

r

as

a(P)/c

Figure 8: Statecharts: hierarchical concurrent states.(y)

Because of its hierarchy and concurrency con-structs, the HCFSM model is well-suited to represent-ing complex control systems. The problem with thismodel, however, is that, like any other state-orientedmodel, it concentrates exclusively on modeling con-trol, which means that it can only associate very sim-ple actions, such as assignments, with its transitionsor states. As a result, the HCFSM is not suitable formodeling certain characteristics of complex systems,which may require complex data structures or mayperform in each state an arbitrarily complex activity.For such systems, this model alone would probablynot su�ce.

1.7 Programming languages

Programming languages provide a heterogeneousmodel that can support data, activity and controlmodeling. Unlike the structure chart, programminglanguages are presented in a textual, rather than agraphic, form.

There are two major types of programming lan-guages: imperative and declarative. The imperativeclass includes languages like C and Pascal, which usea control-driven model of execution, in which state-ments are executed in the order written in the pro-gram. LISP and PROLOG, by contrast, are exam-ples of declarative languages, since they model exe-cution through demand-driven or pattern-driven com-putation. The key di�erence here is that declarativelanguages specify no explicit order of execution, focus-ing instead on de�ning the target of the computationthrough a set of functions or logic rules.

In the aspect of data modeling, imperative pro-gramming languages provide a variety of data struc-tures. These data structures include, for example, ba-sic data types, such as integers and reals, as well as

8

Page 12: Essen - University of Torontojzhu/publications/kluwer97.pdf · gro wth that has b een paral-leled only b y the adv ances in IC fabrication. Since the design problems at lo w er lev

composite types, like arrays and records. A pro-gramming language would model small activities bymeans of statements, and large activities by meansof functions or procedures, which can also serve asa mechanism for supporting hierarchy within the sys-tem. These programming languages can also modelcontrol ow, by using control constructs that spec-ify the order in which activities are to be performed.These control constructs can include sequential com-position (often denoted by a semicolon), branching(if and case statements), looping (while, for, andrepeat), as well as subroutine calls.

The advantage to using an imperative programminglanguage is that this paradigm is well-suited to model-ing computation-dominated behavior, in which someproblem is solved by means of an algorithm, as, for ex-ample, in a case when we need to sort a set of numbersstored in an array.

The main problem with programming languages isthat, although they are well-suited for modeling thedata, activity, and control mechanism of a system,they do not explicitly model the system's states, whichis a disadvantage in modeling embedded systems.

1.8 Program-state machine

A program-state machine (PSM) [GVN94] is aninstance of a heterogeneous model that integratesan HCFSM with a programming language paradigm.This model basically consists of a hierarchy ofprogram-states, in which each program-state rep-resents a distinct mode of computation. At any giventime, only a subset of program-states will be active,i.e., actively carrying out their computations.

Within its hierarchy, the model would consist ofboth composite and leaf program-states. A compos-ite program-state is one that can be further decom-posed into either concurrent or sequential program-substates. If they are concurrent, all the program-substates will be active whenever the program-state isactive, whereas if they are sequential, the program-substates are only active one at a time when theprogram-state is active. A sequentially decomposedprogram-state will contain a set of transition arcs,which represent the sequencing between the program-substates. There are two types of transition arcs. The�rst, a transition-on-completion arc (TOC), willbe traversed only when the source program-substatehas completed its computation and the associated arccondition evaluates to true. The second, a transi-tion-immediately arc (TI), will be traversed im-mediately whenever the arc condition becomes true,regardless of whether the source program-substate has

completed its computation. Finally, at the bottomof the hierarchy, we have the leaf program-stateswhose computations are described through program-ming language statements.

When we are using the program-state machine asour model, the system as an entity can be graphicallyrepresented by a rectangular box, while the program-states within the entity will be represented by boxeswith curved corners. A concurrent relation betweenprogram-substates is denoted by the dotted line be-tween them. Transitions are represented with directedarrows. The starting state is indicated by a triangle,and the completion of individual program-states is in-dicated by a transition arc that points to the com-pletion point, represented as a small square within thestate. TOC arcs are those that originate from a squareinside the source substate, while TI arcs originate fromthe perimeter of the source substate.

e2

e3

Y

A

B

C

D

e1

variable A: array[1..20] of integer

variable i, max: integer ;

max = 0;for i = 1 to 20 do if ( A[i] > max ) then max = A[i] ; end if;end for

Figure 9: An example of program-state machine. (y)

Figure 9 shows an example of a program-state ma-chine, consisting of a root state Y , which itself com-prises two concurrent substates, A and D. State A,in turn, contains two sequential substates, B and C.Note that states B, C, and D are leaf states, thoughthe �gure shows the program only for state D. Ac-cording to the graphic symbols given above, we cansee that the arcs labeled e1 and e3 are TOC arcs,while the arc labeled e2 is a TI arc. The con�gura-tion of arcs would mean that when state B �nishesand condition e1 is true, control will transfer to stateC. If, however, condition e2 is true while in state C,control will transfer to state B regardless of whether

9

Page 13: Essen - University of Torontojzhu/publications/kluwer97.pdf · gro wth that has b een paral-leled only b y the adv ances in IC fabrication. Since the design problems at lo w er lev

C �nishes or not.Since PSMs can represent a system's states, data,

and activities in a single model, they are more suit-able than HCFSMs for modeling systems which havecomplex data and activities associated with each state.A PSM can also overcome the primary limitation ofprogramming languages, since it can model states ex-plicitly. It allows a modeler to specify a system us-ing hierarchical state-decomposition until he/she feelscomfortable using program constructs. The program-ming language model and HCFSM model are just twoextremes of the PSMmodel. A program can be viewedas a PSM with only one leaf state containing languageconstructs. A HCFSM can be viewed as a PSM withall its leaf states containing no language constructs.

In this section we presented the main models tocapture systems. Obviously, there are more modelsused in codesign, mostly targeted at speci�c applica-tions. For example, the codesign �nite state machine(CFSM) model [CGH+93], which is based on commu-nicating FSMs using event broadcasting, is targetedat small, reactive real-time systems and can be usedto formally de�ne and verify a system's properties.

2 Architectures

To this point, we have demonstrated how variousmodels can be used to describe a system's function-ality, data, control and structure. An architectureis intended to supplement these descriptive modelsby specifying how the system will actually be imple-mented. The goal of an architecture, then, is to de-scribe the number of components, the type of eachcomponent, and the type of each connection amongthese various components in a system.

Architectures can range from simple controllers toparallel heterogeneous processors. Despite this va-riety, however, architectures nonetheless fall into afew distinct classes, namely, (1) application-speci�carchitectures, such as DSP systems, (2) general-purpose processors, such as RISCs, and (3) par-allel processors, such as VLIW, SIMD and MIMDmachines.

2.1 Controller architecture

The simplest of the application-speci�c architecturesis the controller variety, which is a straight-forwardimplementation of the �nite-state machine model pre-sented in Section 1.3 and de�ned by the quintuple< S; I;O; f; h >. A controller consists of a registerand two combinational blocks, as shown in Figure 10.

The register, usually called the State register, is de-signed to store the states in S, while the two combi-national blocks, referred to as the Next-state logic andthe Output logic, implement functions f and h. In-puts and Outputs are representations of Boolean sig-nals that are de�ned by sets I and O.

1

Q1

FF1

Q

FF1

Q

FF

2

m

m

. . .

. . .

Y

Y2

Yn

1 2 kAAA

Clk

1

Q1

FF1

Q

FF1

Q

FF

2

m

m

. . .

. . .

Y

Y2

Yn

1 2 kAAA

. . .

State signals

Clk

(a)

(b)

NextStateLogic

Output Logic

Outputs

Outputs NextStateLogic

Output Logic

StateRegister

StateRegister

Inputs

Inputs

Figure 10: A generic controller design: (a) state-based, (b) input-based. (z)

As mentioned in Section 1.3, there are two dis-tinct types of controllers, those that are input-basedand those that are state-based. These types of con-trollers di�er in how they de�ne the output function,h. For input-based controllers, h is de�ned as a map-ping S � I ! O, which means that the Output logicis dependent on two parameters, namely, State reg-ister and Inputs. For state-based controllers, on theother hand, h is de�ned as the mapping S ! O, whichmeans the Output logic depends on only one parame-

10

Page 14: Essen - University of Torontojzhu/publications/kluwer97.pdf · gro wth that has b een paral-leled only b y the adv ances in IC fabrication. Since the design problems at lo w er lev

ter, the State register. Since the inputs and outputsare Boolean signals, in either case, this architectureis well-suited to implementing controllers that do notrequire complex data manipulation.

The controller synthesis consists of state minimiza-tion and encoding, Boolean minimization and technol-ogy mapping for the Next-state and Output logic.

2.2 Custom Datapath architecture

In a custom datapath we compute arbitrary expres-sions. In a datapath we use a di�erent number ofcounters, registers, register-�les and memories with avaried number of ports that are connected with severalbuses. Note that these same buses can be used to sup-ply operands to functional units as well as to supplyresults back to storage units. It is also possible for thefunctional units to obtain operands from several buses,though this would require the use of a selector in frontof each input. It is also possible for each unit to haveinput and output latches which are used to temporar-ily store the input operands or results. Such latchingcan signi�cantly shorten the amount of time that thebuses will be used for operand and result transfer, andthus can increase the tra�c over these buses.

On the other hand, input and output latching re-quires a more complicated control unit since each op-eration requires more than one clock cycle. Namely, atleast one clock cycle is required to fetch operands fromregisters, register �les or memories and store them intoinput latches, at least one clock cycle to perform theoperation and store a result into an output latch, andat least one clock cycle to store the result from anoutput latch back to a register or memory.

An example of such a custom datapath is shown inFigure 11. Note that it has a counter, a register, a3-port register-�le and a 2-port memory. It also hasfour buses and three functional units: two ALUs anda multiplier. As you can see, ALU1 does not have anylatches, while ALU2 has latches at both the inputsand the outputs and the single multiplier has only theinputs latched. With this arrangement, ALU1 canreceive its left operand from buses 2 and 4, while themultiplier can receive its right operand from buses 1and 4. Similarly, the storage units can also receivedata from several buses. Such custom datapaths arefrequently used in application speci�c design to obtainthe best performance-cost ratio.

Datapaths are also used in all standard processorimplementations to perform numerical computation ordata manipulations. A processor datapath consistsof some temporary storage, in addition to arithmetic,logic and shift units. Lets consider, for example, how

Bus 1

Bus 2

Bus 3

Bus 4

Register FileCounter Register

Memory

Selector

Latch Latch

Latch

ALU 2

Multiplier

LatchLatch

Selector

Selector Selector

ALU 1

Selector

Figure 11: An example of a custom datapath. (z)

we might perform the summation of a hundred num-bers by declaring the sum to be a temporary variable,initially set to zero, and executing the following loopstatement:

sum = 0loop:

for i = 1 to 100sum = sum+ xi

end loop

The above loop body could be executed on a datap-ath consisting of one register called an Accumulatorand an ALU. The variable sum would be stored inthe Accumulator, and in each clock cycle, the new xiwould be added to the sum in the ALU so that thenew value of sum could again be stored in the Accu-mulator.

Generally speaking, the majority of digital designswork in the same manner. The variable values andconstant are stored in registers or memories, they arefetched from storage components after the rising edgeof the clock signal, they are transformed in combina-torial components during the time between two risingedges of the clock and the results are stored back intothe storage components at the next rising edge of theclock signal.

In Figure 12, we have shown a simple datapath thatcould perform the above summation. This datapathcontains a selector, which selects either 0 or some out-side data as the left operand for the ALU. The right

11

Page 15: Essen - University of Torontojzhu/publications/kluwer97.pdf · gro wth that has b een paral-leled only b y the adv ances in IC fabrication. Since the design problems at lo w er lev

operand will always be the content of the Accumulator,which could also be output through a tri-state driver.The Accumulator is a shift register with a parallel load.This datapath's schematic is shown in Figure 12(a),and in Figure 12(b), we have shown the 9-bit controlword that speci�es the values of the control signalsfor the Selector, the ALU, the Accumulator and theoutput drivers.

SelectorS

ALU

A BMSS

0

0

1SS

ClkAccumulator

Input O

I RI L

Inputselect

Accumulator controls

ALUcontrols

Shiftvalues

Outenable

8

765

43

21

0

(a)

(b)

1 0

1

8 7 6 5 4 3 2 1 0

Figure 12: Simple datapath with one accumulator: (a)datapath schematic, (b) control word. (z)

On each clock cycle, a speci�c control word wouldde�ne the operation of the datapath. In order to com-pute the sum of 100 numbers, we would need 102 clockcycles. In this case, the control words would be thesame for all the clock cycles, except the �rst and thelast. In the �rst clock cycle, we would have to clearthe Accumulator; in the next 100 clock cycles we wouldadd the new data to the accumulated sum, �nally, inthe last clock cycle, we would output the accumulatedsum.

Datapaths are also used in many applications wherea �xed computation must be performed repeatedly ondi�erent sets of data, as is the case in the digital sig-nal processing (DSP) systems used for digital �ltering,

image processing, and multimedia. A datapath archi-tecture often consists of high-speed arithmetic units,connected in parallel, and heavily pipelined in orderto achieve a high throughput.

x(i) b(0) x(i−1) b(1) x(i−2) b(2) b(3)x(i−3)

y(i)

+ +

x(i) b(0) x(i−1) b(1) x(i−2) b(2) b(3)x(i−3)

y(i)

(a)

(b)

Pipeline stages

Pipeline stages

+

*

+

+ +

** **

* * *

Figure 13: Two di�erent datapaths for FIR �lter:(a) with three pipeline stages, (b) with four pipelinestages. (y)

In Figure 13, we can see two di�erent datapaths,both of which are designed to implement a �nite-impulse-response (FIR) �lter, which is de�ned by theexpression

y(i) =

N�1X

k=0

x(i� k)b(k)

where N is 4. Note that the datapath in Figure 13(a)performs all its multiplications concurrently, and addsthe products in parallel by means of a summation tree.The datapath in Figure 13(b) also performs its multi-plications concurrently, but it will then add the prod-ucts serially. Further, note that the datapath in Fig-ure 13(a) has three pipeline stages, each indicated bya dashed line, whereas the datapath in Figure 13(b)has four similarly indicated pipeline stages. Althoughboth datapaths use four multipliers and three adders,the datapath in Figure 13(b) is regular and easier toimplement in ASIC technologies.

In this kind of architecture, as long as each opera-

12

Page 16: Essen - University of Torontojzhu/publications/kluwer97.pdf · gro wth that has b een paral-leled only b y the adv ances in IC fabrication. Since the design problems at lo w er lev

tion in an algorithm is implemented by its own unit, asin Figure 13, we do not need a control for the system,since data simply ows from one unit to the next, andthe clock is used to load pipeline registers. Sometimes,however, it may be necessary to use fewer units to savesilicon area, in which case we would need a simplecontroller to steer the data among the units and reg-isters, and to select the appropriate arithmetic func-tion for those units that can perform di�erent func-tions at di�erent times. Another situation would beto implement more than one algorithm with the samedatapath, with each algorithm executing at a di�er-ent time. In this case, since each algorithm requires aunique ow of data through the datapath, we wouldneed a controller to regulate the ow. Such controllersare usually simple and without conditional branches.

2.3 FSMD architecture

A FSMD architecture implements the FSMD model bycombining a controller with a datapath. As shown inFigure 14(a), the datapath has two types of I/O ports.One type of I/O ports are data ports which are usedby the outside environment to send and receive data toand from the ASIC. The data could be of type integer, oating-point, or characters and it is usually packedinto one or more words. The data ports are usually 8,16, 32 or 64 bits wide. The other type of I/O portsare control ports which are used by the control unitto control the operations performed by the datapathand receive information about the status of selectedregisters in the datapath.

As shown in Figure 14(b), the datapath takes theoperands from storage units, performs the computa-tion in the combinatorial units and returns the resultsto storage units during each state, which is usuallyequal to one clock cycle.

As mentioned in the previous section the selec-tion of operands, operations and the destination forthe result is controlled by the control unit by settingproper values of datapath control signals. The datap-ath also indicates through status signals when a par-ticular value is stored in a particular storage unit orwhen a particular relation between two data valuesstored in the datapath is satis�ed.

Similar to the datapath, a control unit has a setof input and a set of output signals. Each signal isa Boolean variable that can take a value of 0 or 1.There are two types of input signals: external sig-nals and status signals. External signals represent theconditions in the external environment on which theFSMD architecture must respond. On the other hand,the status signals represent the state of the datapath.

Control unit

Next−statelogic

Statussignals

Controloutputs

Controlsignals

Controlinputs

Datapath

Datapathoutputs

Bus 1

Bus 2

Selector

Register

RegisterRF

Mem

ALUStateregister

D Q

D Q

D Q

. . .

Outputlogic

Datapath inputs

. . .

. . .

. . .Controloutputs

Datapath inputs

Control inputs

Datapath outputs

Control signals

Statussignals

Control unit Datapath

−.

.

* /

Bus 3

(a)

(b)

Figure 14: Design model: (a) high-level block dia-gram, (b) register-transfer-level block diagram. (z)

Their value is obtained by comparing values of selectedvariables stored in the datapath. There are also twotypes of output signals: external signals and datapathcontrol signals. External signals identify to the envi-ronment that a FSMD architecture has reached cer-tain state or �nished a particular computation. Thedatapath controls, as mentioned before, select the op-eration for each component in the datapath.

FSMD architectures are used for various ASIC de-signs. Each ASIC design consists of one or moreFSMD architectures, although two implementationsmay di�er in the number of control units and data-paths, the number of components and connections inthe datapath, the number of states in the control unitand the number of I/O ports. The FSM controller andDSP datapath mentioned above are two special casesof this kind of architecture. In addition, the FSMD isalso the basic architecture for general-purpose proces-sors, since each processor includes both a control unitand a datapath.

2.4 CISC architecture

The primary motivation for developing an architectureof complex-instruction-set computers (CISC)

13

Page 17: Essen - University of Torontojzhu/publications/kluwer97.pdf · gro wth that has b een paral-leled only b y the adv ances in IC fabrication. Since the design problems at lo w er lev

was to reduce the number of instructions in com-piled code, which would in turn minimize the num-ber of memory accesses required for fetching instruc-tions. The motivation was valid in the past, sincememories were expensive and much slower than pro-cessors. The secondary motivation for CISC develop-ment was to simplify compiler construction, by includ-ing in the processor instruction set complex instruc-tions that mimic programming language constructs.These complex instructions would reduce the seman-tic gap between programming and machine languagesand simplify compiler construction.

Status

Instruction reg.

+1

Microprogram memory

Addressselection logic

MicroPC

Control

Datapath

Memory

Controlunit

Figure 15: CISC with microprogrammed control. (y)

In order to support a complex instruction set, aCISC usually has a complex datapath, as well as a con-troller that is microprogrammed, shown in Figure 15,which consists of a Microprogram memory, a Micro-program counter (MicroPC), and the Address selec-tion logic. Each word in the microprogram memoryrepresents one control word, such as the one shownin Figure 12, that contains the values of all the dat-apath control signals for one clock cycle. This meansthat each bit in the control word represents the valueof one datapath control line, used for loading a regis-ter or selecting an operation in the ALU, for example.Furthermore, each processor instruction consists of asequence of control words. When such an instructionis fetched from the Memory, it is stored �rst in theInstruction register, and then used by the Address se-lection logic to determine the starting address of thecorresponding control-word sequence in the Micropro-gram memory. After this starting address has beenloaded into the MicroPC, the corresponding controlword will be fetched from the Microprogram memory,and used to transfer the data in the datapath from

one register to another. Since the MicroPC is concur-rently incremented to point to the next control word,this procedure will be repeated for each control wordin the sequence. Finally, when the last control word isbeing executed, a new instruction will be fetched fromthe Memory, and the entire process will be repeated.

From this description, we can see that the numberof control words, and thus the number of clock cyclescan vary for each instruction. As a result, instruc-tion pipelining can be di�cult to implement in CISCs.In addition, relatively slow microprogram memory re-quires a clock cycle to be longer than necessary. Sinceinstruction pipelines and short clock cycles are neces-sary for fast program execution, CISC architecturesmay not be well-suited for high-performance proces-sors.

Although a variety of complex instructions could beexecuted by a CISC architectures, program-executionstatistics have shown that the instructions used mostfrequently tend to be simple, with only a few address-ing modes and data types. Statistics have also shownthat the most complex instructions were seldom ornever used. This low usage of complex instructionscan be attributed to the slight semantic di�erences be-tween programming language constructs and availablecomplex instructions, as well as the di�culty in map-ping language constructs into such complex instruc-tions. Because of this di�culty, complex instructionsare seldom used in optimizing compilers for CISC pro-cessors, thus reducing the usefulness of CISC architec-tures.

The steadily declining prices of memories and theirincreasing speeds have made compactly-coded pro-grams and complex instruction sets unnecessary forhigh-performance computing. In addition, complexinstruction sets have made construction of optimizingcompilers for CISC architecture too costly. For thesetwo reasons, the CISC architecture was displaced infavor of the RISC architecture.

2.5 RISC architecture

In contrast to the CISC architecture, the architectureof a reduced-instruction-set computer (RISC) isoptimized to achieve short clock cycles, small num-bers of cycles per instruction, and e�cient pipeliningof instruction streams. As shown in Figure 16, thedatapath of an RISC processor generally consists ofa large register �le and an ALU. A large register �leis necessary since it contains all the operands and theresults for program computation. The data is broughtto the register �le by load instructions and returned tothe memory by store instructions. The larger the reg-

14

Page 18: Essen - University of Torontojzhu/publications/kluwer97.pdf · gro wth that has b een paral-leled only b y the adv ances in IC fabrication. Since the design problems at lo w er lev

ister �le is, the smaller the number of load and storeinstructions in the code. When the RISC executes aninstruction, the instruction pipe begins by fetching aninstruction into the Instruction register. In the sec-ond pipeline stage the instruction is then decoded andthe appropriate operands are fetched from the Regis-ter �le. In the third stage, one of two things occurs:the RISC either executes the required operation in theALU , or, alternatively, computes the address for theData cache. In the fourth stage the data is storedin either the Data cache or in the Register �le. Notethat the execution of each instruction takes only fourclock cycles, approximately, which means that the in-struction pipeline is short and e�cient, losing very fewcycles in the case of data or branch dependencies.

Status

Control unit

Instruction reg.

Registerfile

Datapath

Control

Data cache

Main memory

Decode logic

ALU

Instruction cache

Figure 16: RISC with hardwired control. (y)

We should also note that, since all the operands arecontained in the register �le, and only simple address-ing modes are used, we can simplify the design of thedatapath as well. In addition, since each operationcan be executed in one clock cycle and each instruc-tion in four, the control unit remains simple and can beimplemented with random logic, instead of micropro-grammed control. Overall, this simpli�cation of thecontrol and datapath in the RISC results in a shortclock cycle, and, ultimately, higher performance.

It should also be pointed out, however, that thegreater simplicity of RISC architectures require a moresophisticated compiler. For example, a RISC designdoes not stop the instruction pipeline whenever in-struction dependencies occur, which means that thecompiler is responsible for generating a dependency-free code, either by delaying the issue of instructionsor by reordering instructions. Furthermore, due to thefact that the number of instructions is reduced, the

RISC compiler will need to use a sequence of RISC in-structions in order to implement complex operations.At the same time, of course, although these featuresrequire more sophistication in the compiler, they alsogive the compiler a great deal of exibility in perform-ing aggressive optimization.

Finally, we should note that RISC programs tend torequire 20% to 30% more program memory, due to thelack of complex instructions. However, since simplerinstruction sets can make compiler design and runningtime much shorter, the e�ciency of the compiled codeis ultimately much higher. In addition, because ofthese simpler instruction sets, RISC processors tendto require less silicon area and a shorter design cyclethan their CISC counterparts.

2.6 VLIW architecture

A very-long-instruction-word computer (VLIW)exploits parallelism by using multiple functional unitsin its datapath, all of which execute in a lock stepmanner under one centralized control. A VLIW in-struction contains one �eld for each functional unit,and each �eld of a VLIW instruction speci�es the ad-dresses of the source and destination operands, as wellas the operation to be performed by the functionalunit. As a result, a VLIW instruction is usually verywide, since it must contain approximately one stan-dard instruction for each functional unit.

+

Memory

+ * *

Register file

Figure 17: An example of VLIW datapath. (y)

In Figure 17, we see an example of a VLIW data-path, consisting of four functional units: namely, twoALUs and two multipliers, a register �le and a mem-ory. In order to utilize all the four functional units, theregister �le in this example has 16 ports: eight outputports, which supply operands to the functional units,four input ports, which store the results obtainedfrom functional units, and four input/output ports,designed to allow communication with the memory.

15

Page 19: Essen - University of Torontojzhu/publications/kluwer97.pdf · gro wth that has b een paral-leled only b y the adv ances in IC fabrication. Since the design problems at lo w er lev

What is interesting to note here is that, ideally, theVLIW in Figure 17 would provide four times the per-formance we could get from a processor with a sin-gle functional unit, under the assumption that thecode executing on the VLIW had four-way parallelism,which enables the VLIW to execute four independentinstructions in each clock cycle. In reality, however,most code has a large amount of parallelism inter-leaved with code that is fundamentally serial. As aresult, a VLIW with a large number of functional unitsmight not be fully utilized. The ideal conditions wouldalso require us to assume that all the operands werein the register �le, with 8 operands being fetched andfour results stored back on every clock cycle, in ad-dition to four new operands being brought from thememory to be available for use in the next clock cy-cle. It must be noted, however, that this computationpro�le is not easy to achieve, since some results mustbe stored back to memory and some results may notbe needed in the next clock cycle. Under these con-ditions, the e�ciency of a VLIW datapath might beless than ideal.

Finally, we should point out that there are two tech-nological limitation that can a�ect the implementationof a VLIW architecture. First, while register �les with8{16 ports can be built, the e�ciency and performanceof such register �les tend to degrade quickly when wego beyond that number. Second, since VLIW pro-gram and data memories require a high communica-tion bandwidth, these systems tend to require expen-sive high-pin packaging technology as well. Overall,these are the reasons why VLIW architectures are notas popular as RISC architectures.

2.7 Parallel architecture

In the design of parallel processors, we can take ad-vantage of spatial parallelism by using multiple pro-cessing elements (PEs) that work concurrently. In thistype of architecture, each PE may contain its own dat-apath with registers and a local memory. Two typi-cal types of parallel processors are the SIMD (singleinstruction multiple data) and the MIMD (multipleinstruction multiple data) processors.

In SIMD processors, usually called array proces-sors, all of the PEs execute the same instruction in alock step manner. To broadcast the instructions to allthe PEs and to control their execution, we generallyuse a single global controller. Usually, an array pro-cessor is attached to a host processor, which meansthat it can be thought of as a kind of hardware accel-erator for tasks that are computationally intensive. Insuch cases, the host processor would load the data into

each PE, and then collect the results after the compu-tations are �nished. When it is necessary, PEs can alsocommunicate directly with their nearest neighbors.

The primary advantage of array processors is thatthey are very convenient for computations that can benaturally mapped on a rectangular grid, as in the caseof image processing, where an image is decomposedinto pixels on a rectangular grid, or in the case ofweather forecasting, where the surface of the globe isdecomposed into n-by-n-mile squares. Programmingone grid point in the rectangular array processor isquite easy, since all the PEs execute the same instruc-tion stream. However, programming any data routingthrough the array is very di�cult, since the program-mer would have to be aware of all the positions of eachdata for every clock cycle. For this reason, problems,like matrix triangulations or inversions, are di�cult toprogram on an array processor.

Array processors, then, are easy to build and easyto program, but only when the natural structure of theproblem matches the topology of the array processor.As a result, they can not be considered general pur-pose machines, because users have di�culty writingprograms for general classes of problems.

An MIMD processor, usually called a multipro-cessor system, di�ers from an SIMD in that eachPE executes its own instruction stream. In this kindof architecture, the program can be loaded by a hostprocessor, or each processor can load its own programfrom a shared memory. Each processor can commu-nicate with every other processor within the multi-processor system, using one of the two communica-tion mechanisms. In a shared-memory multipro-cessor, all the processors are connected to a sharedmemory through an interconnection network, whichmeans that each processor can access any data in theshared memory. In a message-passing multiproces-sor, on the other hand, each processor tends to havea large local memory, and sends data to other pro-cessors in the form of messages through an intercon-nection network. The interconnection network for ashared memory must be fast, since it is very frequentlyused to communicate small amounts of data, like asingle word. In contrast, the interconnection networkused for message passing tends to be much slower,since it is used less frequently and communicates longmessages, including many words of data. Finally, itshould be noted that multiprocessors are much eas-ier to program, since they are task-oriented insteadof instruction-oriented. Each task runs independentlyand can be synchronized after completion, if necessary.Thus, multiprocessors make program and data par-

16

Page 20: Essen - University of Torontojzhu/publications/kluwer97.pdf · gro wth that has b een paral-leled only b y the adv ances in IC fabrication. Since the design problems at lo w er lev

titioning, code parallelization and compilation muchsimpler than array processors.

Such a multiprocessor, in which the interconnec-tion network consists of several buses, is shown in Fig-ure 18. Each processing element (PE) consists of aprocessor or ASIC and a local memory connected bythe local bus. The shared or global memory may be ei-ther single port, dual port, or special purpose memorysuch as FIFO. The PEs and global memories are con-nected by one or more system buses via correspond-ing interfaces. The system bus is associated with awell-de�ned protocol to which the components on thebus have to respect. The protocol may be standard,such as VME, or custom. An interface bridges thegap between a local bus of a PE/memory and systembuses.

The heterogeneous architecture is a superset ofall previous architectures and it can be customizedfor a particular application to achieve the best cost-performance trade-o�. Figure 19 shows some typicalcon�gurations.

Figure 19(a) shows a simple embedded processorsystem with an IO device. The IO device directlycommunicate with the processor on the processor busvia an interface. Figure 19(b) shows a shared mem-ory system where two PEs are connected to a globalmemory via a system bus. The PEs can be eitherprocessor system or ASIC system, each of which maycontain its own local bus and memory subsystem. Fig-ure 19(c) and (d) show two types of message passingsystem where two PEs communicate via a channel.The former can perform asynchronous communicationgiven the dedicated devices such as a FIFO. The lattercan perform synchronous communication if the properhandshaking between the two PEs are performed viathe system bus.

3 Languages

3.1 Introduction

A system can be described at any one of several dis-tinct levels of abstraction, each of which serves a par-ticular purpose. By describing a system at the logiclevel, for example, designers can verify detailed timingas well as functionality. Alternatively, at the archi-tectural level, the complex interaction among systemcomponents such as processors, memories, and ASICscan be veri�ed. Finally, at the conceptual level, it ispossible to describe the system's functionality withoutany notion of its components. Descriptions at suchlevel can serve as the speci�cation of the system for

Proc1

PE1

LM1

PE2

Proc2 LM2

IF1 IF2Lbus1 Lbus2

FIFO

PE

Proc LM

Lbus

Device

IOIF

Proc1

PE1

LM1

PE2

Proc2 LM2

IF1 IF2Lbus1 Lbus2

ArbiterSBus

Proc1

PE1

LM1

PE2

Proc2 LM2

IF1 IF2Lbus1 Lbus2

ArbiterSBus

GM

IF3

(a)

(b)

(c)

(d)

Figure 19: Some typical con�gurations: (a) standardprocessor, (b) shared memory, (c) non-blocking mes-sage passing, (c) blocking message passing.

17

Page 21: Essen - University of Torontojzhu/publications/kluwer97.pdf · gro wth that has b een paral-leled only b y the adv ances in IC fabrication. Since the design problems at lo w er lev

GM1 GM2LM1Proc1 ASIC1 LM2 Proc2 LM3

PE1 PE2 PE3

Arbiter2

IF1 IF2 IF3 IF4 IF5

Arbiter1

Sbus2

Lbus2 Lbus3 Lbus4 Lbus5

Sbus1

Lbus1

Figure 18: A heterogeneous multiprocessor

designers to work on. Increasingly, designers need toconceptualize the system using an executable spec-i�cation language, which is capable of capturing thefunctionality of the system in a machine-readable andsimulatable form.

Such an approach has several advantages. First,simulating an executable speci�cation allows the de-signer to verify the correctness of the system's in-tended functionality. In the traditional approach,which started with a natural-language speci�cation,such veri�cation would not be possible until enoughof the design had been completed to obtain a simulat-able system description (usually gate-level schemat-ics). The second advantage of this approach is that thespeci�cation can serve as an input to codesign tools,which, in turn, can be used to obtain an implementa-tion of the system, ultimately reducing design timesby a signi�cant amount. Third, such a speci�cationcan serve as comprehensive documentation, providingan unambiguous description of the system's intendedfunctionality. Finally, it also serves as a good mediumfor the exchange of design information among varioususers and tools. As a result, some of the problemsassociated with system integration can be minimized,since this approach would emphasize well-de�ned sys-tem components that could be designed independentlyby di�erent designers.

The increasing design complexity associated withsystems-on-a-chip also makes an executable mod-eling language extremely desirable where an inter-mediate implementation can be represented and val-idated before proceeding to the next synthesis step.For the same reason, we need such a modeling lan-guage to be able to describe design artifacts from pre-vious designs and intellectual properties (IP) providedby other sources.

Since di�erent conceptual models possess di�erentcharacteristics, any given speci�cation language canbe well or poorly suited for that model, depending onwhether it supports all or just a few of the model'scharacteristics. To �nd the language that can capturea given conceptual model directly, we would need toestablish a one-to-one correlation between the charac-teristics of the model and the constructs in the lan-guage.

3.2 Characteristics of system models

In this section, we will present some of the character-istics most commonly found in modeling systems. Inpresenting these characteristics, part of our goal willbe to assess how useful each characteristic is in cap-turing one or more types of system behavior.

3.3 Concurrency

Any system can be decomposed into chunks of func-tionality called behaviors, each of which can be de-scribed in several ways, using the concepts of pro-cesses, procedures or state machines. In many cases,the functionality of a system is most easily conceptu-alized as a set of concurrent behaviors, simply becauserepresenting such systems using only sequential con-structs would result in complex descriptions that canbe di�cult to comprehend. If we can �nd a way tocapture concurrency, however, we can usually obtaina more natural representation of such systems. Forexample, consider a system with only two concurrentbehaviors that can be individually represented by the�nite-state machines F1 and F2. A standard represen-tation of the system would be a cross product of thetwo �nite-state machines, F1 � F2, potentially result-ing in a large number of states. A more elegant solu-

18

Page 22: Essen - University of Torontojzhu/publications/kluwer97.pdf · gro wth that has b een paral-leled only b y the adv ances in IC fabrication. Since the design problems at lo w er lev

tion, then, would be to use a conceptual model thathas two or more concurrent �nite-state machines, asdo the Statecharts [Har87] and many other concurrentlanguages.

Concurrency representations can be classi�ed intotwo groups, data-driven or control-driven, dependingon how explicitly the concurrency is indicated. Fur-thermore, a special class of data-driven concurrencycalled pipelined concurrency is of particular impor-tance to signal processing applications.

Data-driven concurrency: Some behaviors can beclearly described as sets of operations or statementswithout specifying any explicit ordering for their ex-ecution. In a case like this, the order of executionwould be determined only by data dependencies be-tween them. In other words, each operation will per-form a computation on input data, and then outputnew data, which will, in turn, be input to other op-erations. Operation executions in such data ow de-scriptions depend only upon the availability of data,rather than upon the physical location of the opera-tion or statement in the speci�cation. Data ow repre-sentations can be easily described from programminglanguages using the single assignment rule, whichmeans that each variable can appear exactly once onthe left hand side of an assignment statement.

(b)

a b c d x

ypq

+ −

*

+

1: q = a + b 2: y = p + x3: p = (c − d) * q

(a)

Figure 20: Data-driven concurrency: (a) data owstatements, (b) data ow graph generated from (a). (y)

Consider, for example, the single assignment state-ments in Figure 20(a). As in any other data-driven ex-ecution, it is of little consequence that the assignmentto p follows the statement that uses the value of p tocompute the value of y. Regardless of the sequence ofthe statements, the operations will be executed solelyas determined by availability of data, as shown in thedata ow graph of Figure 20(b). Following this princi-ple, we can see that, since a, b, c and d are primary

inputs, the add and subtract operations in statements1 and 3 will be carried out �rst. The results of thesetwo computations will provide the data required forthe multiplication in statement 3. Finally, the addi-tion in statement 2 will be performed to compute y.

Pipelined concurrency: Data ow description inthe previous section can be viewed as a set of op-erations which consume data from their inputs andproduce data on their outputs. Since the executionof each operation is determined by the availability ofits input data, the degree of concurrency that can beexploited is limited by data dependencies. However,when the same data ow operations are applied to astream of data samples, we can use pipelined con-currency to improve the throughput, that is, the rateat which the system is able to process the data stream.Such throughput improvement is achieved by dividingoperations into groups, called pipeline stages, whichoperate on di�erent data sets in the stream. By op-erating on di�erent data sets, pipeline stages can runconcurrently. Note that each stage will take the sameamount of time, called a cycle, to compute its results.

For example, Figure 21(a) shows a data ow graphoperating on the data set a(n); b(n); c(n); d(n) andx(n), while producing the data set q(n); p(n) and y(n),where the index n indicates the nth data in the stream,called data sample n. Figure 21(a) can be convertedinto a pipeline by partitioning the graph into threestages, as shown in Figure 21(b).

In order for the pipeline stages to execute con-currently, storage elements such as registers or FIFOqueues have to be inserted between the stages (indi-cated by thick lines in Figure 21(b)). In this way,while the second stage is processing the results pro-duced by the �rst stage at the previous cycle, the�rst stage can simultaneously process the next datasample in the stream. Figure 21(c) illustrates thepipelined execution of Figure 21(b), where each rowrepresents a stage, each column represents a cycle. Inthe third column, for example, while the �rst stageis adding a(n + 2) and b(n + 2), and subtractingc(n+2) and d(n+2), the second stage is multiplying(a(n + 1) + b(n + 1)) and c(n + 1) � d(n + 1), andthe third stage is �nishing the computation of the nthsample by adding ((a(n)+b(n))�(c(n)�d(n)) to x(n).

Control-driven concurrency: The key conceptin control-driven concurrency is the control thread,which can be de�ned as a set of operations in the sys-tem that must be executed sequentially. As mentionedabove, in data-driven concurrency, it is the dependen-

19

Page 23: Essen - University of Torontojzhu/publications/kluwer97.pdf · gro wth that has b een paral-leled only b y the adv ances in IC fabrication. Since the design problems at lo w er lev

(a) (b)

b(n) c(n) d(n) x(n)

q(n) p(n) y(n)

a(n)

+

+

*

b(n) c(n) d(n) x(n)a(n)

+

*

−+stage 1

stage 2

stage 3

(c)

+

*

−+

+

*

−+

+

*

−+

q(n) p(n) y(n)

stage 1

stage 2

stage 3

nth cycle

(n+1)th cycle

(n+2)th cycle

(n+3)th cycle

time

Figure 21: Pipelined concurrency: (a) original data ow, (b) pipelined data ow, (c) pipelined execution.

cies between operations that determine the executionorder. In control-driven concurrency, by contrast, it isthe control thread or threads that determine the orderof execution. In other words, control-driven concur-rency is characterized by the use of explicit constructsthat specify multiple threads of control, all of whichexecute in parallel.

sequential behavior X begin Q(); fork A(); B(); C(); join; R();end behavior X;

(a)

Q

R

A CB

(c)

concurrent behavior X begin process A(); process B(); process C();end behavior X;

(b)

A B C

(d)

Figure 22: Control-driven concurrency: (a) fork-joinstatement, (b) process statement, (c) control threadsfor fork-join statements, (d) control threads for pro-cess statement. (y)

Control-driven concurrency can be speci�ed at thetask level, where constructs such as fork-joins and pro-cesses can be used to specify concurrent execution ofoperations. Speci�cally, a fork statement creates aset of concurrent control threads, while a join state-

ment waits for the previously forked control threadsto terminate. The fork statement in Figure 22(a), forexample, spawns three control threads A, B and C,all of which execute concurrently. The correspond-ing join statement must wait until all three threadshave terminated, after which the statements in R canbe executed. In Figure 22(b), we can see how pro-cess statements are used to specify concurrency. Notethat, while a fork-join statement starts from a sin-gle control thread and splits it into several concurrentthreads as shown in Figure 22(c), a process statementrepresents the behavior as a set of concurrent threads,as shown in Figure 22(d). For example, the processstatements of Figure 22(b) create three processes A,B and C, each representing a di�erent control thread.Both fork-join and process statements may be nested,and both approaches are equivalent to each other inthe sense that a fork-join can be implemented usingnested processes and vice versa.

3.4 State transitions

Systems are often best conceptualized as having var-ious modes, or states, of behavior, as in the case ofcontrollers and telecommunication systems. For ex-ample, a tra�c-light controller [DH89] might incorpo-rate di�erent modes for day and night operation, formanual and automatic functioning, and for the statusof the tra�c light itself.

In systems with various modes, the transitions be-tween these modes sometimes occur in an unstruc-tured manner, as opposed to a linear sequencingthrough the modes. Such arbitrary transitions areakin to the use of goto statements in programminglanguages. For example, Figure 23 depicts a systemthat transitions between modes P, Q, R, S and T, the

20

Page 24: Essen - University of Torontojzhu/publications/kluwer97.pdf · gro wth that has b een paral-leled only b y the adv ances in IC fabrication. Since the design problems at lo w er lev

sequencing determined solely by certain conditions.Given a state machine with N states, there can beN �N possible transitions among them.

v

w

x

P

Q R

S

start

u

yfinish

Tz

Figure 23: State transitions between arbitrarily com-plex behaviors. (y)

In systems like this, transitions between modes canbe triggered by the detection of certain events or cer-tain conditions. For example, in Figure 23, the tran-sition from state P to state Q will occur wheneverevent u happens while in P. In some systems, actionscan be associated with each transition, and a partic-ular mode or state can have an arbitrarily complexbehavior or computation associated with it. In thecase of the tra�c-light controller, for example, in onestate it may simply be sequencing between the red,yellow and green lights, while in another state it maybe executing an algorithm to determine which lane oftra�c has a higher priority based on the time of theday and the tra�c density. In simple (Section 1.3) andhierarchical (Section 1.6) �nite-state machine models,simple assignment statements, such as x = y + 1, canbe associated with a state. In the PSM model (Sec-tion 1.8), any arbitrary program with iteration andbranching constructs can be associated with a state.

3.5 Hierarchy

One of the problems we encounter with large systemsis that they can be too complex to be considered intheir entirety. In such cases, we can see the advantageof hierarchical models. First, since hierarchical modelsallow a system to be conceptualized as a set of smallersubsystems, the system modeler is able to focus on onesubsystem at a time. This kind of modular decompo-sition of the system greatly simpli�es the developmentof a conceptual view of the system. Furthermore, oncewe arrive at an adequate conceptual view, the hier-archical model greatly facilitates our comprehensionof the system's functionality. Finally, a hierarchicalmodel provides a mechanism for scoping objects, such

as declaration types, variables and subprogram names.Since a lack of hierarchy would make all such objectsglobal, it would be di�cult to relate them to their par-ticular use in the model, and could hinder our e�ortsto reuse these names in di�erent portions of the samemodel.

There are two distinct types of hierarchy { struc-tural hierarchy and behavioral hierarchy { both ofwhich are commonly found in conceptual views of sys-tems.

Structural hierarchy: A structural hierarchy isone in which a system speci�cation is represented asa set of interconnected components. Each of thesecomponents, in turn, can have its own internal struc-ture, which is speci�ed with a set of lower-level inter-connected components, and so on. Each instance ofan interconnection between components represents aset of communication channels connecting the compo-nents. The advantage of a model that can represent astructural hierarchy is that it can help the designer toconceptualize new components from a set of existingcomponents.

Memory

Processor

Control Logic Datapathdata bus

control lines

System

Figure 24: Structural hierarchy. (y)

This kind of structural hierarchy in systems can bespeci�ed at several di�erent levels of abstraction. Forexample, a system can be decomposed into a set ofprocessors and ASICs communicating over buses in aparallel architecture. Each of these chips may consistof several blocks, each representing a FSMD archi-tecture. Finally, each RT component in the FSMDarchitecture can be further decomposed into a set ofgates while each gate can be decomposed into a setof transistors. In addition, we should note that di�er-ent portions of the system can be conceptualized atdi�erent levels of abstraction, as in Figure 24, wherethe processor has been structurally decomposed into adatapath represented as a set of RT components, and

21

Page 25: Essen - University of Torontojzhu/publications/kluwer97.pdf · gro wth that has b een paral-leled only b y the adv ances in IC fabrication. Since the design problems at lo w er lev

into its corresponding control logic represented as aset of gates.

Behavioral hierarchy: The speci�cation of a be-havioral hierarchy is de�ned as the process ofdecomposing a behavior into distinct subbehaviors,which can be either sequential or concurrent.

The sequential decomposition of a behaviormay be represented as either a set of procedures ora state machine. In the �rst case, a procedural se-quential decomposition of a behavior is de�ned asthe process of representing the behavior as a sequenceof procedure calls. Even in the case of a behavior thatconsists of a single set of sequential statements, we canstill think of that behavior as comprising a procedurewhich encapsulates those statements. A proceduralsequential decomposition of behavior P is shown inFigure 25(a), where behavior P consists of a sequen-tial execution of the subbehaviors represented by pro-cedures Q and R. Behavioral hierarchy would be rep-resented here by nested procedure calls. Recursion inprocedures allows us to specify a dynamic behavioralhierarchy, which means that the depth of the hierarchywill be determined only at run time.

e1

e3

PQ R

R1

R2

Q1

Q3

Q2

e2

e4

e6

e5

e7

e8

(a) (b)

behavior P variable x, y;begin Q(x) ; R(y) ;end P;

Figure 25: Sequential behavioral decomposition: (a)procedures, (b) state-machines. (y)

Figure 25(b) shows a state-machine sequentialdecomposition of behavior P. In this diagram, P isdecomposed into two sequential subbehaviors Q andR, each of which is represented as a state in a state-machine. This state-machine representation conveyshierarchy by allowing a subbehavior to be representedas another state-machine itself. Thus, Q and R arestate-machines, so they are decomposed further intosequential subbehaviors. The behaviors at the bottomlevel of the hierarchy, including Q1, . . .R2, are calledleaf behaviors.

In a sequentially decomposed behavior, the subbe-haviors can be related through several types of tran-sitions: simple transitions, group transitions and hier-

archical transitions. A simple transition is similarto that which connects states in an FSM model in thatit causes control to be transferred between two statesthat both occupy the same level of the behavioral hi-erarchy. In Figure 25(b), for example, the transitiontriggered by event e1 transfers control from behaviorQ1 to Q2. Group transitions are those which canbe speci�ed for a group of states, as is the case whenevent e5 causes a transition from any of the subbe-haviors of Q to the behavior R. Hierarchical tran-sitions are those (simple or group) transitions whichspan several levels of the behavioral hierarchy. For ex-ample, the transition labeled e6 transfers control frombehaviorQ3 to behavior R1, which means that it mustspan two hierarchical levels. Similarly, the transitionlabeled e7 transfers control from Q to state R2, whichis at a lower hierarchical level.

For a sequentially decomposed behavior, we mustexplicitly specify the initial subbehavior that will beactivated whenever the behavior is activated. In Fig-ure 25(b), for example, R is the �rst subbehavior thatis active whenever its parent behavior P is activated,since a solid triangle points to this �rst subbehavior.Similarly, Q1 and R1 would be the initial subbehaviorsof behaviors Q and R, respectively.

The concurrent decomposition of behaviors al-lows subbehaviors to run in parallel or in pipelinedfashion.

A

B

C

X

A

B

C

X

A

B

C

X

Sequential Concurrent Pipelined

(a) (b) (c)

Figure 26: Behavioral decomposition types: (a) se-quential, (b) parallel, (c) pipelined.

Figure 26 shows a behavior X consisting of threesubbehaviors A, B and C. In Figure 26(a) the sub-behaviors are running sequentially, one at a time, inthe order indicated by the arrows. In Figure 26(b),

22

Page 26: Essen - University of Torontojzhu/publications/kluwer97.pdf · gro wth that has b een paral-leled only b y the adv ances in IC fabrication. Since the design problems at lo w er lev

A;B and C run in parallel, which means that theywill start when X starts, and when all of them �n-ish, X will �nish, just like the fork-join construct dis-cussed in Section 3.3. In Figure 26(c), A;B and C runin pipelined mode, which means that they representpipeline stages which run concurrently where A sup-plies data to B and B to C as discussed in Section 3.3.

3.6 Programming constructs

Many behaviors can best be described as sequential al-gorithms. Consider, for example, the case of a systemintended to sort a set of numbers stored in an array,or one designed to generate a set of random numbers.In such cases, if the system designer manages to de-compose the behavior hierarchically into smaller andsmaller subbehaviors, he will eventually reach a stagewhere the functionality of a subbehavior can be mostdirectly speci�ed by means of an algorithm.

The advantage of using such programming con-structs to specify a behavior is that they allow the sys-tem modeler to specify an explicit sequencing for thecomputations in the system. Several notations existfor describing algorithms, but programming languageconstructs are most commonly used. These constructsinclude assignment statements, branching statements,iteration statements and procedures. In addition, datatypes such as records, arrays and linked lists are usu-ally helpful in modeling complex data structures.

1 int buf[10], i, j;2 3 for( i = 0; i < 10; i ++ )4 for( j = 0; j < i; j ++ )5 if( buf[i] > buf[j] )6 swap( &buf[i], &buf[j] );

Figure 27: Code segment for sorting.

Figure 27 shows how we would use programmingconstructs to specify a behavior that sorts a set of tenintegers into descending order. Note that the proce-dure swap exchanges the values of its two parameters.

3.7 Behavioral completion

Behavioral completion refers to a behavior's abilityto indicate that it has completed, as well as to theability of other behaviors to detect this completion.A behavior is said to have completed when all thecomputations in the behavior have been performed,and all the variables that have to be updated havehad their new values written into them.

In the �nite-state machine model, we usually desig-nate an explicitly de�ned set of states as �nal states.This means that, for a state machine, completion willhave occurred when control ows to one of these �nalstates, as shown in Figure 28(a).

In cases where we use programming language con-structs, a behavior will be considered complete whenthe last statement in the program has been executed.For example, whenever control ows to a return state-ment, or when the last statement in the procedure isexecuted, a procedure is said to be complete.

X Y

e1

e2

e3

e4

B

e5 Y1

Y2X3

X1

X2

q0

q1

q2

q3

startfinal state

ReadList

SortList

OutputList

X

e1

e2

X3

X1

X2

(a) (b)

(c) (d)

Figure 28: Behavioral completion: (a) �nite-state ma-chine, (b) program-state machine, (c) a single levelview of the program-state X, (d) decomposition intosequential subbehaviors. (y)

The PSM model denotes completion using a specialprede�ned completion point. When control ows tothis completion point, the program-state enclosing it issaid to have completed, at which point the transition-on-completion (TOC) arc, which can be traversed onlywhen the source program-state has completed, couldnow be traversed.

For example, consider the program-state machinein Figure 28(b). In this diagram, the behavior ofleaf program-states such as X1 have been describedwith programming constructs, which means that theircompletion will be de�ned in terms of their executionof the last statement. The completion point of theprogram-state machine for X has been represented asa bold square. When control ows to it from program-state X2 (i.e., when the arc labeled by event e2 istraversed), the program-state X will be said to havecompleted. Only then can event e5 cause a TOC tran-

23

Page 27: Essen - University of Torontojzhu/publications/kluwer97.pdf · gro wth that has b een paral-leled only b y the adv ances in IC fabrication. Since the design problems at lo w er lev

sition to program-state Y. Similarly, program-state Bwill be said to have completed whenever control owsalong the TOC arc labeled e4 from program-state Yto the completion point for B.

The speci�cation of behavioral completion has twoadvantages. First, in hierarchical speci�cations, com-pletion helps designers to conceptualize each hierar-chical level, and to view it as an independent mod-ule, free from interference from inter-level transitions.Figure 28(c), for example, shows how the program-state X in Figure 28(b) would look by itself in isola-tion from the larger system. Having decomposed thefunctionality of X into the program-substates X1, X2and X3, the system modeler does not have to be con-cerned with the e�ects of the completion transitionlabeled by event e5. From this perspective, the de-signer can develop the program-state machine for Xindependently, with its own completion point (transi-tion labeled e2 from X2). The second advantage ofspecifying behavioral completion is that the conceptallows the natural decomposition of a behavior intosubbehaviors which are then sequenced by the \com-pletion" transition arcs. For example, Figure 28(d)shows how we can split an application which sorts alist of numbers into three distinct, yet meaningful sub-behaviors: ReadList, SortList and OutputList. SinceTOC arcs sequence these behaviors, the system re-quires no additional events to trigger the transitionsbetween them.

3.8 Exception handling

Often, the occurrence of a certain event can requirethat a behavior or mode be interrupted immediately,thus prohibiting the behavior from updating valuesfurther. Since the computations associated with anybehavior can be complex, taking an inde�nite amountof time, it is crucial that the occurrence of the event,or exception, should terminate the current behaviorimmediately rather than having to wait for the com-putation to complete. When such exceptions arise, thenext behavior to which control will be transferred isindicated explicitly.

Depending on the direction of transferred controlthe exceptions can be further divided into two groups:(a) abortion, when the behavior is terminated, and(b) interrupt, where control is temporarily trans-ferred to other behaviors. An example of an abor-tion is shown in Figure 29(a) where behavior X isterminated after the occurence of events e1 or e2. Anexample of interrupt is shown in Figure 29(b) wherecontrol from behavior X is transferred to Y or Z afterthe occurrence of e1 or e2 and is returned after their

X

Y Z

e1 e2

(a) (b)

X

Y Z

e1 e2

Figure 29: Exception types: (a) abortion, (b) inter-rupt.

completion.

Examples of such exceptions include resets and in-terrupts in many computer systems.

3.9 Timing

On many occasions in system speci�cations, there maybe need to specify detailed timing relations, when acomponent receives or generates events in speci�c timeranges, which are measured in real time units such asnanoseconds.

In general, a timing relation can be described bya 4-tuple T = (e1; e2;min;max), where event e1 pre-ceeds e2 by at least min time units and at most maxtime units. When such a timing relation is used withreal components it is called timing delay, when it isused with component speci�cations it is called timingconstraint.

Such timing information is especially important fordescribing parts of the system which interact exten-sively with the environment according to a prede�nedprotocol. The protocol de�nes the set of timing rela-tions between signals, which both communicating par-ties have to respect.

A protocol is usually visualized by a timing dia-gram, such as the one shown in Figure 30 for the readcycle of a static RAM. Each row of the timing diagramshows a waveform of a signal, such as Address, Read,Write and Data in Figure 30. Each dashed verticalline designates an occurrence of an event, such as t1,t2 through t7. There may be timing delays or timingconstraints associated with pairs of events, indicatedby an arrow annotated by x=y, where x stands for themin time, y stands for the max time. For example,the arrow between t1 and t3 designates a timing de-lay, which says that Data will be valid at least 10, butno more than 20 nanoseconds after Address is valid.

The timing information is very important for thesubset of embedded systems known as real time sys-

24

Page 28: Essen - University of Torontojzhu/publications/kluwer97.pdf · gro wth that has b een paral-leled only b y the adv ances in IC fabrication. Since the design problems at lo w er lev

Address

Read

Write

Data

a

t1 t2 t4 t5 t6

d

t7

10/200/

10/20 10/20

5/100/0/

t3

Figure 30: Timing diagram

tems, whose performance is measured in terms ofhow well the implementation respects the timing con-straints. A favorite example of such systems would bean aircraft controller, where failure to respond to anabnormal event in a prede�ned timing limit will leadto disaster.

3.10 Communication

In general, systems consist of several interacting be-haviors which need to communicate with each other tobe cooperative. Thus a general communication modelis necessary for system speci�cation.

In traditional programming languages standardforms of communication between functions are sharedvariable access and parameter passing in procedurecalls. These mechanisms provide communication inan abstract form. The way the communication is per-formed is prede�ned and hidden to the programmer.For example, functions communicate through globalvariables, which share a common memory space, orvia parameter passing. In case of local procedurecalls, parameter passing is implemented by exchanginginformation on the stack or through processor regis-ters. In the case of remote procedure calls, parame-ters are passed via the complex protocol of marshal-ing/unmarshaling and sending/receiving data througha network.

While these mechanisms are su�cient for stan-dard programming languages, they poorly address theneeds for systems-on-a-chip descriptions, where theway the communication is performed is often customand impossible to prede�ne. For example, in telecom-munication applications the major task of modeling

the system is actually describing custom communica-tion procedures. Hence, it is very important for asystem description language to provide the ability torede�ne or extend the standard form of communica-tion.

As an analogy, the need for a general mechanism tospecify communication is the same as the need in com-putation to generalize operators like + and � into func-tions, which provide a general mechanism to de�necustom computation. In the absence of such a mech-anism designers tend to mix the behavior responsiblefor communication with the behavior for computation,which results in the loss of modularity and reusability.

It follows that we need

(a) a mechanism to separate the speci�cation of com-putation and communication;

(b) a mechanism to declare abstract communicationfunctions in order to describe what they are andhow they can be used;

(c) a mechanism to de�ne a custom communicationimplementation which describes how the commu-nication is actually performed.

In order to �nd a general communication modelthe structure of a system must be de�ned. A sys-tem's structure consists of a set of blocks which areinterconnected through a set of communication chan-nels. While the behavior in the blocks speci�es howthe computation is performed and when the commu-nication is started, the channels encapsulate the com-munication implementation. In this way blocks andchannels e�ectively separate the speci�cation of co-munication and computation.

Each block in a system contains a behavior and aset of ports through which the behavior can commu-nicate. Each channel contains a set of communicationfunctions and a set of interfaces. An interface de-clares a subset of the functions of the channel, whichcan be used by the connected behaviors. So while thedeclaration of the communication functions is given inthe interfaces, the implementation of these functionsis speci�ed in the channel.

I2I1B1 P1 P2 B2

C

Figure 31: Communication model.

25

Page 29: Essen - University of Torontojzhu/publications/kluwer97.pdf · gro wth that has b een paral-leled only b y the adv ances in IC fabrication. Since the design problems at lo w er lev

For example, the system shown in Figure 31 con-tains two blocks B1 and B2, and a channel C. BlockB1 communicates with the left interface I1 of channelC via its port P1. Similarly block B2 accesses theright interface I2 of channel C through its port P2.Note that blocks B1 and B2 can be easily replaced byother blocks as long as the port types stay the same.Similarly channel C can be exchanged with any otherchannel that provides compatible interfaces.

More speci�cally, a channel serves as an encapsula-tor of a set of communication media in the form ofvariables, and a set of methods in the form of func-tions that operate on these variables. The methodsspecify how data is transferred over the channel. Allaccesses to the channel are restricted to these meth-ods.

For example, Figure 32 shows three communicationexamples. Figure 32(a) shows two behaviors commu-nicating via a shared variable M . Figure 32(b) showsa similar situation using the channel model. In fact,communication through shared memory is just a spe-cial case of the general channel model. The channel Cfrom Figure 32(b) can be implemented as a sharedmemory channel as shown in Figure 33. Here themethods receive and send provide the restricted ac-cesses to the variables M and valid.

1 channel C {2 bool valid;3 int M;4 5 int receive( void ) {6 while( valid == 0 );7 return M;8 }9 void send( int a ) {10 M = a;11 valid = 1;12 }13 };

Figure 33: Integer channel.

A channel can also be hierachical, as shown in Fig-ure 32(c). In the example channel C1 implementsa high level communication protocol which breaks astream of data packets into a byte stream at the senderside, or assembles the byte stream into a packet streamat the receiver side. C1 in turn uses a lower level chan-nel C2, for example a synchronous bus which transfersthe byte stream produced by C1.

The adoption of mechanisms discussed aboveachieves information hiding, since the media and theway the communication is implemented are hidden.Also the modeling complexity is reduced, since theuser only needs to make function calls to the meth-

ods. This model also encourages the separation ofcomputation and communication, since the function-ality responsible for communication can be con�ned inthe channel speci�cation and will not be mixed withthe description used for computation.

(a) (b)

1 2 3 4 5

clk

start

rw

AD Addr Data

1 2 3 4 5

clk

start

rw

AD Addr Data

Figure 34: A simple synchronous bus protocol: (a)read cycle, (b) write cycle.

Note that the ability to describe timing is very im-portant for channel speci�cation. Consider, for exam-ple, the synchronous bus speci�cation shown in Fig-ure 34. A component using this bus can initiate a com-munication by asserting the start and rw signals in the�rst cycle, supplying the address in the second cycle,and then supplying data in the following cycles. Thecommunication will terminate when the start signal isdeasserted. The description of the protocol is shown inFigure 35. The description encapsulates the commu-nication media, in this case the signals clk, start, rwand AD, and a set of methods, in this case read cycleand write cycle, which implement the communicationprotocol for reading and writing the data as describedin the diagram. The call clk.wait() sychronizes thesignal assignments with the bus clock clk.

3.11 Process synchronization

In a system that is conceptualized as several concur-rent processes, the processes are rarely completely in-dependent of each other. Each process may gener-ate data and events that need to be recognized byother processes. In cases like these, when the pro-cesses exchange data or when certain actions must beperformed by di�erent processes at the same time, weneed to synchronize the processes in such a way thatone process is suspended until the other reaches a cer-tain point in its execution. Common synchronizationmethods fall into two classi�cations, namely control-dependent and data-dependent schemes.

Control-dependent synchronization: In con-trol-dependent synchronization techniques, it is the

26

Page 30: Essen - University of Torontojzhu/publications/kluwer97.pdf · gro wth that has b een paral-leled only b y the adv ances in IC fabrication. Since the design problems at lo w er lev

(a)

int M;

B1int x;...M = x;...

B2int y;...y = M;...

B2int y;...y=C.receive();...

B1int x;...C.send(x);...

(b)

Cvoid send(int d){ ... }int receive(void){ ... }

(c)

B1 B2C1

C2 P2P1

Figure 32: Examples of communication: (a) shared memory, (b) channel, (c) hierarchical channel.

1 channel bus() {2 clock clk;3 clocked bit start;4 clocked bit rw;5 clocked bit AD;67 word read_cycle( word addr ) {8 word d;9 start = 1, rw = 1, clk.wait();10 AD = addr, clk.wait();11 d = AD, clk.wait();12 start = 0, rw = 0, clk.wait();13 return d;14 }15 void write_cycle( word a, word d ) {16 start = 1, rw = 0, clk.wait();17 AD = addr, clk.wait();18 AD = d, clk.wait();19 start = 0, clk.wait();20 }21 }

Figure 35: Protocol description of the synchronousbus protocol.

control structure of the behavior that is responsible forsynchronizing two processes in the system. For exam-ple, the fork-join statement introduced in Section 3.5is an instance of such a control construct. Figure 36(a)shows a behavior X which forks into three concurrentsubprocesses, A, B and C. In Figure 36(b) we see howthese distinct execution streams for the behaviorX aresynchronized by a join statement, which ensures thatthe three processes spawned by the fork statement areall complete before R is executed. Another exampleof control-dependent synchronization is the techniqueof initialization, in which processes are synchronized

to their initial states either the �rst time the systemis initialized, as is the case with most HDLs, or dur-ing the execution of the processes. In the Statecharts[DH89] of Figure 36(c), we can see how the event e, as-sociated with a transition arc that reenters the bound-ary of ABC, is designed to synchronize all the orthog-onal states A, B and C into their default substates.Similarly, in Figure 36(d), event e causes B to initial-ize to its default substate B1 (since AB is exited andthen reentered), at the same time transitioning A fromA1 to A2.

Data-dependent synchronization: In addition tothese techniques of control-dependent synchroniza-tion, processes may also be synchronized by means ofone of the methods for interprocess communication:shared memory or message passing as mentioned inSection 3.10.Shared-memory based synchronization works

by making one of the processes suspend until the otherprocess has updated the shared memory with an ap-propriate value. In such cases, the variable in theshared memory might represent an event, a data valueor the status of another process in the system, as is il-lustrated in Figure 37 using the Statecharts language.Synchronization by common event requires

one process to wait for the occurrence of a speci�cevent, which can be generated externally or by an-other process. In Figure 37(a), we can see how event eis used for synchronizing states A and B into substatesA2 and B2, respectively. Another method is that ofsynchronization by common variable, which re-quires one of the processes to update the variable witha suitable value. In Figure 37(b), B is synchronized

27

Page 31: Essen - University of Torontojzhu/publications/kluwer97.pdf · gro wth that has b een paral-leled only b y the adv ances in IC fabrication. Since the design problems at lo w er lev

(b)(a)

behavior X begin Q(); fork A(); B(); C(); join; R();end behavior X;

A B C

ABC

e

A2

A1

A B

AB

B1

B2

e

synchronization point

Q

R

A CB

(c) (d)

Figure 36: Control synchronization: (a) behaviorX with a fork-join, (b) synchronization of executionstreams by join statement, (c) and (d) synchroniza-tion by initialization in Statecharts. (y)

into state B2 when we assign the value \1" to variablex in state A2.

Still another method is synchronization by sta-tus detection, in which a process checks the status ofother processes before resuming execution. In a caselike this, the transition from A1 to A2 precipitated byevent e, would cause B to transition from B1 to B2,as shown in Figure 37(c).

3.12 SpecC+ Language description

In this section, we will present an example of a speci�-cation language called SpecC+, which was speci�callydeveloped to capture directly a conceptual model pos-sessing all the above discussed characteristics.

The SpecC+ view of the world is a hierarchical net-work of actors. Each actor possesses

(a) a set of ports through which the actor communi-cates with the environment;

(b) a set of state variables;

(c) a set of communication channels;

(d) a behavior which de�nes how the actor willchange its state and perform communicationthrough its ports when it is invoked.

(c)

(b)

(a)

A2

entered A2

A1

A B

AB

e

B1

B2

A2 B2

B1

A B

e e

A1

AB

(x=1)

A

x:=0A1

x:=1A2

B1

B2

B

e

AB

Figure 37: Data-dependent synchronization in Stat-echarts: (a) synchronization by common event, (b)synchronization by common data, (c) synchronizationby status detection. (y)

Figure 39 shows the textual representation of theexample in Figure 38, where an actor is representedby a rectangular box with curved corners.

a...

...

m

s

q

p

c

B

X Y

X1

X2

i o

i o

e1

e2

int max, j;TData array;

array = c.read( );max = 0;for ( j = 0; j < 16; j++ ) if ( array[ j ] > max ) max = array[ j ];m = max;

c

ch

Figure 38: A graphical SpecC+ speci�cation example.

There is an actor construct which capture all theinformation for an actor. An actor construct lookslike a C++ class which exports an main method. Theports are declared in the parameter list. The statevariable, channels and child actor instances are de-clared as typed variables, and the behavior is speci�edby the methods, or functions start from main. Actorconstruct can be used as a type to instantiate actorinstances.

SpecC+ supports both behavioral hierarchy and

28

Page 32: Essen - University of Torontojzhu/publications/kluwer97.pdf · gro wth that has b een paral-leled only b y the adv ances in IC fabrication. Since the design problems at lo w er lev

1 typedef int TData[16];2 3 interface IData( void ) {4 TData read( void );5 void write( TData d );6 };78 channel CData( void ) implements IData {9 bool valid;10 event s;11 TData storage;1213 TData read( void ) {14 if( valid ) s.wait();15 return storage;16 }17 void write( TData d ) {18 storage=d; valid = 1; s.notify();19 }20 };2122 actor X1( in TData i, out TData o ) { ... };23 actor X2( in TData i, IData o ) {24 void main( void ) {25 ...26 o.write(...);27 }28 };29 30 actor X( in int a, IData c ) {31 TData s;32 X1 x1( a, s );33 X2 x2( s, c );34 35 psm main( void ) {36 x1 : ( TI, cond1, x2 );37 x2 : ( TOC, cond2, complete );38 }39 };40 41 actor Y ( IData c, out int m ) {42 void main( void ) {43 int max, j;44 TData array;45 46 array = c.read();47 max = 0;48 for( j = 0; j < 16; j ++ )49 if( array[j] > max )50 max = array[j];51 m = max;52 }53 };54 55 actor B( in TData p, out int q ) {56 CData ch;57 X x( p, ch );58 Y y( ch, q );59 60 csp main( void ) {61 par { x.main(); y.main(); }62 }63 };

Figure 39: A textual SpecC+ speci�cation example.

structural hierarchy in the sense that it captures asystem as a hierarchy of actors. Each actor is either acomposite actor or a leaf actor.

Composite actors are decomposed hierarchicallyinto a set of child actors. For structural hierarchy, thechild actors are interconnected via the communicationchannels by child actor instantiation statements, sim-ilar to component instantiation in VHDL. For exam-ple, actor X is instantiated in line 57 of Figure 39 bymapping its port a and c to the ports (p) and commu-nication channels (ch) de�ned in its parent actor B.For behavioral hierarchy, the child actors can eitherbe concurrent, in which case all child actors are activewhenever the parent actor is active, or can be sequen-tial, in which case the child actors are only active oneat a time. In Figure 38, actors B and X are compositeactors. Note that while B consists of concurrent childactors X and Y, X consists of sequential child actorsX1 and X2.

Leaf actors are those that exist at the bottomof the hierarchy whose functionality is speci�ed withimperative programming constructs. In Figure 38, forexample, Y is a leaf actor.

SpecC+ also supports state transitions, in thesense that we can represent the sequencing betweenchild actors by means of a set of transition arcs.In this language, an arc is represented as a 3-tuple< T; C; N >, where T represents the type of transi-tion, C represents the condition triggering the transi-tion, and N represents the next actor to which controlis transferred by the transition. If no condition is as-sociated with the transition, it is assumed to be \true"by default.

SpecC+ supports two types of transition arcs. Atransition-on-completion arc (TOC) is traversedwhenever the source actor has completed its compu-tation and the associated condition evaluates as true.A leaf actor is said to have completed when its laststatement has been executed. A sequentially decom-posed actor is said to be complete only when it makesa transition to a special prede�ned completion point,indicated by the name complete in the next-actor �eldof a transition arc. In Figure 38, for example, wecan see that actor X completes only when child actorX2 completes and control ows from X2 to the com-plete point when cond2 is true (as speci�ed by the arc< TOC; cond2; complete > in line 36 of Figure 39).Finally, a concurrently decomposed actor is said to becompleted when all of its child actors have completed.In Figure 38, for example, actor B completes when allthe concurrent child actors X and Y have completed.

Unlike the TOC arc, a transition-immediate-

29

Page 33: Essen - University of Torontojzhu/publications/kluwer97.pdf · gro wth that has b een paral-leled only b y the adv ances in IC fabrication. Since the design problems at lo w er lev

ly arc (TI) is traversed instantaneously wheneverthe associated condition becomes true, regardless ofwhether the source actor has or has not completedits computation. For example, in Figure 38, the arc< TI; cond1; x2 > terminates X1 whenever cond1 istrue and transfers control to actor X2. In other words,a TI arc e�ectively terminates all lower level child ac-tors of the source actor.

Transitions are represented in Figure 38 withdirected arrows. In the case of a sequentially-decomposed actor, an inverted bold triangle points tothe �rst child actor. An example of such an initialchild actor is X1 of actor X. The completion of se-quentially decomposed actors is indicated by a transi-tion arc pointing to the completion point, representedas a bold square within the actor. Such a completionpoint is found in actor X (transition from X2 labelede2). TOC arcs originate from a bold square inside thesource child actor, as does the arc labeled e2. TI arcs,in contrast, originate from the perimeter of the sourcechild actor, as does the arc labeled e1.

SpecC+ supports both data-dependent syn-chronization and control-dependent synchro-nization. In the �rst method, actors can synchronizeusing common event. For example, in Figure 38, ac-tor Y is the consumer of the data produced by actorX via channel c, which is of type CData Figure 39. Inthe implementation of CData at line 8 of Figure 39,an event s is used to make sure Y can get valid datafrom X: the wait function over s will suspend Y if thedata is not ready. In the second method, we could usea TI arc from actor B back to itself in order to syn-chronize all the concurrent child actors of B to theirinitial states. Furthermore, the fact that X and Y areconcurrent actors enclosed in B automatically imple-ments a barrier, since by semantics, B �nishes whenboth the execution of X and Y are �nished.

Communication in SpecC+ is achieved throughthe use of communication channels. Channels can beprimitive channels such as variables and signals (likevariable s of actorX in Figure 38), or complex channelssuch as object channels (like variable ch in Figure 38),which directly supports the hierarchical communica-tion model discussed in Section 3.10.

The speci�cation of an object channel is separatedin the interface declaration and the channel de�nition,each of which can be used as data types for channelvariables. The interface de�nes a set of function pro-totype declarations without the actual function body.For example, the interface IData in Figure 38 de�nesthe function prototypes read and write. The channelencapsulates the communication media and provides

a set of function implementations. For example, thechannel CData encapsulates media s and storage andan implementation of methods read and write. Theinterface and the channel are related by the imple-ments keyword. A channel related to an interface inthis way is said to implement this interface, meaningthe channel is obligated to implement the set of func-tions prescribed by the interface. For example, CDatahas to implement read and write since they appear inIData. It is possible that several channels can imple-ment the same interface, which implies that they canprovide di�erent implementations of the same set offunctions.

Interfaces are usually used as port data types inport declarations of an actor (as port c of actor Y atline 41 of Figure 39). A port of one interface type willbe bound to a particular channel which implementssuch an interface during actor instantiation. For ex-ample, port c of actor Y is mapped to channel c ofactor B, when actor Y is instantiated.

The fact that a port of interface type can be boundto a real channel until actor instantiation is called latebinding. Such a late binding mechanism helps toimprove the reusability of an actor description, sinceit is possible to plug in any channel as long as theyimplement the same interface.

ASystem

AAsic

word reg[8];

....read_word(0x1, &reg[0]);....write_word(0x2, reg[4]);....

CSramWrapper

ASramaddr

data

addr

data

CDramWrapper

addr

data

cs

we

addr

data

cs

we

ras

cas

ras

cas

ADram

rd rd

wr wr

Figure 40: Component wrapper speci�cation.

Consider, the example in Figure 40 as speci�ed inFigure 41.

The system described in this example contains anASIC (actor AAsic) talking to a memory. The in-terface IRam speci�es the possible transactions to ac-cess memories: read a word via read word and writea word via write word. The description of AAsic can

30

Page 34: Essen - University of Torontojzhu/publications/kluwer97.pdf · gro wth that has b een paral-leled only b y the adv ances in IC fabrication. Since the design problems at lo w er lev

1 interface IRam( void ) {2 void read_word( word a, word *d );3 void write_word( word a, word d );4 };5 6 actor AAsic( IRam ram ) {7 word reg[8];8 9 void main( void ) {10 ...11 ram.read_word( 0x0001, &reg[0] );12 ...13 ram.write_word( 0x0002, reg[4] );14 }15 };16 17 actor ASram( in signal<word> addr,18 inout signal<word> data,19 in signal<bit> rd, in signal<bit> wr ) {20 ...21 };22 23 actor ADram( in signal<word> addr,24 inout signal<word> data,25 in signal<bit> cs, in signal<bit> we,26 out signal<bit> ras, out signal<bit> cas ) {27 ...28 };2930 channel CSramWrapper( void ) implements IRAM {31 signal<word> addr, data; // address, data32 signal<bit> rd, wr; // read/write select33 ASram sram( addr, data, rd, wr );34 35 void read_word( word a, word *d ) { ... }36 void write_word( word a, word d ) { ... }37 ...38 };39 40 channel CDramWrapper( void ) implements IRam {41 signal<word> addr, data; // address, data42 signal<bit> cs, we; // chip select, write enable43 signal<bit> ras, cas; // row, col address strobe44 ADram sram( addr, data, cs, we, ras, cas );45 46 void read_word( word a, word *d ) { ... }47 void write_word( word a, word d ) { ... }48 ...49 };50 51 actor ASystem( void ) {52 CSramWrapper ram; // can be replaced by 53 // CDramWrapper ram; // this declaration54 AAsic asic( ram );55 56 void main( void ) { ... }57 };

Figure 41: Source code of the component wrapperspeci�cation.

use IRam as its port so that its behavior can makefunction calls to methods read word and write wordwithout knowing how these methods are exactly im-plemented. There are two types of memories avail-able in the library, represented by actors ASram andADram respectively, the descriptions of which providetheir behavioral models. Obviously, the static RAMASram and dynamic RAM ADram have di�erent pinsand timing protocols to access them, which can beencapsulated with the component actors themselvesin channels called wrappers, as CSramWrapper andCDramWrapper in Figure 40. When the actor AAsicis instantiated in actor ASystem (lines 52 and 53 inFigure 41), the port IRam will be resolved to eitherCSramWrapper or CDramWrapper.

The improvement of reusability of this style of spec-i�cation is two fold: �rst, the encapsulation of commu-nication protocols into the channel speci�cation makethese channels highly reusable since they can be storedin the library and instantiated at will. If these chan-nel descriptions are provided by component vendors,the error-prone e�ort spent on understanding the datasheets and interfacing the components can be greatlyrelieved. Secondly, actor descriptions such as AAsiccan be stored in the library and easily reused withoutany change subject to the change of other componentswith which it interfaces.

It should be noted that while methods in an actorrepresent the behavior of itself, the methods of a chan-nel represent the behavior of their callers. In otherwords, when the described system is implemented, themethods of the channels will be inlined into the con-nected actors. When a channel is inlined, the encapsu-lated media get exposed and its methods are moved tothe caller. In the case of a wrapper, the encapsulatedactors also get exposed.

Figure 42 shows some typical con�gurations. InFigure 42(a), two synthesizable components A and B(eg. actors to be implemented on an ASIC) are inter-connected via a channel C, for example, a standardbus. Figure 42(b) shows the situation after inlining.The methods of the channel C are inserted into theactors and the bus wires are exposed. In Figure 42(c)a synthesizable component A communicates with a�xed component B (eg. an o�-the-shelf component)through a wrapper W . When W is inlined, as shownin Figure 42(d), the �xed component B and the sig-nals get exposed. In Figure 42(e) again a synthesizablecomponent A communicates with a �xed componentB using a prede�ned protocol, that is encapsulatedin the channel C. However, B has its own built-inprotocol, which is encapsulated in the wrapper W . A

31

Page 35: Essen - University of Torontojzhu/publications/kluwer97.pdf · gro wth that has b een paral-leled only b y the adv ances in IC fabrication. Since the design problems at lo w er lev

(a)

(b)

(c)

(d)

(e)

(f)

wrapperchannel

A BC W

T

A B

B

B

A

A

A

A T

B

BWC

synthesizablecomponent

fixedcomponent

inlinedcomponent

protocoltransducer

Legend:

Figure 42: Common con�gurations before and afterchannel inlining: (a)/(b) two synthesizable actors con-nected by a channel, (c)/(d) synthesizable actor con-nected to a �xed component, (e)/(f) protocol trans-ducer.

protocol transducer T has to be inserted between thechannel C and the wrapperW in order to translate alltransactions between the two protocols. Figure 42(f)shows the �nal situation, when both channels C andW are inlined.

SpecC+ supports the speci�cation of timing ex-plicitly and distinguishes two types of timing speci�-cations, namely timing constraints and timing de-lays, as discussed in Section 3.9. At the speci�cationlevel timing constraints are used to specify time limitsthat have to be satis�ed. At the implementation levelcomputational delays have to be noted.

Consider, for example, the timing diagram of theread protocol for a SRAM, as shown earlier in Fig-ure 30. The protocol visualized by the timing dia-gram can be used to de�ne the read word method ofthe SRAM channel above (line 35 in Figure 41). Thecode segment in Figure 43 shows the speci�cation ofthe read access to the SRAM.

The do-timing statement e�ectively describes all in-formation contained in the timing diagram. The �rst

1 void read_word( word a, word *d ) {2 do {3 t1: { addr = a; }4 t2: { rd = 1; }5 t3: { }6 t4: { *d = data; }7 t5: { addr.disconnect(); }8 t6: { rd = 0; }9 t7: { break}; }10 }11 timing {12 range( t1; t2; 0; );13 range( t1; t3; 10; 20 );14 range( t2; t3; 10; 20 );15 range( t3; t4; 0; );16 range( t4; t5; 0; );17 range( t5; t7; 10; 20 );18 range( t6; t7; 5; 10 );19 }20 };

Figure 43: Timing speci�cation of the SRAM readprotocol.

part lists all the events of the diagram. Events arespeci�ed as a label and its associated piece of code,which describes the change on signal values. The sec-ond part is a list of range statements, which specify thetiming constraints or timing delays using the 4-tuplesas described in Section 3.9.

This style of timing description is used at the spec-i�cation level. In order to get an executable modelof the protocol, scheduling has to be performed foreach do-timing statement. Figure 44 shows the imple-mentation of the read word method which follows anASAP scheduling, where all timing constraints are re-placed by delays, which are speci�ed using the waitforfunction.

1 void read_word( word a, word *d ) {2 addr = a;3 rd = 1;4 waitfor( 10 );5 *d = data;6 addr.disconnect();7 rd = 0;8 waitfor( 10 );9 };

Figure 44: Timing implementation of the SRAM readprotocol.

In this section we presented the characteristics mostcommonly found in modeling systems and discussedtheir usefulness in capturing system behavior. Also,we presented SpecC+, an example of a speci�cationlanguage, which was speci�cally developed to cap-ture directly these characteristics. The next sectionpresents a generic codesign methodology based on the

32

Page 36: Essen - University of Torontojzhu/publications/kluwer97.pdf · gro wth that has b een paral-leled only b y the adv ances in IC fabrication. Since the design problems at lo w er lev

SpecC+ language.

4 Generic codesign methodol-

ogy

As shown in Figure 45, codesign usually starts froma formal speci�cation which speci�es the functionalityas well as the performance, power, cost, and other con-straints of the intended design. During the codesignprocess, the designer will go through a series of well-de�ned design steps which will eventually map thefunctionality of the speci�cation to the target architec-ture. These design steps include allocation, partition-ing, scheduling and communication synthesis, whichform the synthesis ow of the methodology.

The result of the synthesis ow will then be fed intothe backend tools, shown in the lower part of Fig-ure 45. Here, a compiler is used to implement thefunctionality mapped to processors, a high level syn-thesizer is used to map the functionality mapped toASICs, and a interface synthesizer is used to imple-ment the functionality of interfaces.

During each design step, the design model will bestatically analyzed to estimate certain quality met-rics and how they satisfy the constraints. This designmodel will also be used to generate a simulation model,which is used to validate the functional correctness ofthe design. In case the validation fails, a debuggercan be used to locate and �x the errors. Simulationis also used to collect pro�ling information which inturn will improve the accuracy of the quality metricsestimation. This set of tasks forms the analysis andvalidation ow of the methodology (see Figure 45).

The following sections describe the tasks of thegeneric methodology in more detail.

4.1 System speci�cation

We have described the characteristics needed for spec-ifying systems in Section 3.1. The system speci�cationshould describe the functionality of the system with-out premature engagement in the implementation. Itshould be made logically as close as possible to theconceptual model of the system so that it is easy tobe maintained and modi�ed. It should also be exe-cutable so that the speci�ed functionality is veri�able.

The behavior model in Section 3.12 makes it a goodcandidate since it is a simple model which meets theserequirements.

In the example shown in Figure 46, the system it-self is speci�ed as the top behavior B0, which contains

B0

B1

B2

B3

B4

B5

B6

B7

shared sync

sync

(a)

B6( ){ int local; ... shared = local + 1; signal( sync );}

B4(){ int local; wait( sync ); local = shared − 1; ...}

B1( ){ stmt; ...}

B3( ){ stmt; ...}

B7( ){ stmt; ...}

(b)

Figure 46: Conceptual model of speci�cation: (a)control- ow view, (b) atomic behaviors.

33

Page 37: Essen - University of Torontojzhu/publications/kluwer97.pdf · gro wth that has b een paral-leled only b y the adv ances in IC fabrication. Since the design problems at lo w er lev

Scheduling

Analysis &Validation

Analysis &Validation

Analysis &Validation

Compilation Interfacesynthesis

Synthesis Flow Analysis & Validation Flow

Backend

Spec

Allocation,Partitioning

Partitioning model

High Level Synthesis

Analysis &Validation

Simulation model

Simulation model

Analysis &Validation

Manufacturing

Communication model

Scheduling model

Simulation model

Simulation model

Simulation model

Implementation model

Communication Synthesis

Figure 45: Generic methodology.

34

Page 38: Essen - University of Torontojzhu/publications/kluwer97.pdf · gro wth that has b een paral-leled only b y the adv ances in IC fabrication. Since the design problems at lo w er lev

an integer variable shared and a boolean variable sync.There are three child behaviors, B1, B2, B3, with se-quential ordering, in behavior B0. While B1 and B3are atomic behaviors speci�ed by a sequence of im-perative statements, B2 is a composite behavior con-sisting of two concurrent behaviors B4 and B5. B5 inturn consists of B6 and B7 in sequential order. Whilemost of the actual behavior of an atomic behavior isomitted in the �gure for space reasons, we do show aproducer-consumer example relevant for later discus-sion: B6 computes a value for variable shared, and B4consumes this value by reading shared. Since B6 andB4 are executed in parallel, they synchronize with thevariable sync using signal/wait primitives to make surethat B4 accesses shared only after B6 has produced thevalue for it.

4.2 Allocation

Given a library of system components such as proces-sors, memories and custom IP modules, the task ofallocation is de�ned as the selection of the type andnumber of these components, as well as the determi-nation of their interconnection, in such a way that thefunctionality of the system can be implemented, theconstraints satis�ed, and the objective cost functionminimized. The result of the allocation task can be acustomization of the generic architecture discussed inSection 2.2. Allocation is usually carried out manuallyby designers and is the starting point of the designexploration process.

4.3 Partitioning and the model after

partitioning

The task of partitioning de�nes the mapping betweenthe set of behaviors in the speci�cation and the setof allocated components in the selected architecture.The quality of such a mapping is determined by howwell the result can meet the design constraints andminimize the design cost.

The system model after partitioning must re ectthe partitioning decision and must be complete in or-der for us to perform validation. More speci�cally,the partitioned model re�nes the speci�cation in thefollowing way:

(a) An additional level of hierarchy is inserted whichdescribes the selected architecture. Figure 47shows the partitioned model of the example inFigure 46. Here, the added level of hierarchy in-cludes two concurrent behaviors, PE0 and PE1.

B2 B3

B5

B6 B7

B0

B1

B4

PE0 PE1

B0

B2

B5B6

B7

B3

B4_ctrl

B1

B4

Topshared sync B1_start B1_done B4_start B4_done

B1_ctrl

B6( ){ int local; ... shared = local + 1; signal( sync );}

B1( ){ wait( B1_start ); ... signal( B1_done );}

B4(){ int local; wait( B4_start ); wait( sync ); local = shared − 1; ... signal( B4_done );}

B1_ctrl( ){ signal( B1_start ); wait( B1_done );}

B4_ctrl( ){ signal( B4_start ); wait( B4_done );}

B3( ){ stmt; ...}

B7( ) { stmt; ...}

sync

B1_start

B1_done

B4_start

B4_done

(a)

(b)

(c)

PE0PE1

Figure 47: Conceptual model after partitioning: (a)partitioning decision, (b) conceptual model, (c) atomicbehaviors.

35

Page 39: Essen - University of Torontojzhu/publications/kluwer97.pdf · gro wth that has b een paral-leled only b y the adv ances in IC fabrication. Since the design problems at lo w er lev

(b) In general, controlling behaviors are needed andmust be added for child behaviors assigned to dif-ferent PEs than their parents. For example, inFigure 47, behavior B1 ctrl and B4 ctrl are in-serted in order to control the execution of B1 andB4, respectively.

(c) In order to maintain the functional equivalencebetween the partitioned model and the originalspeci�cation, synchronization between PEs is in-serted. In Figure 47 synchronization variables ,B1 start, B1 done, B4 start, B4 done are addedso that the execution of B1 and B4, which are as-signed to PE1, can be controlled by their control-ling behaviors B1 ctrl and B4 ctrl through inter-PE synchronization.

However, the model after partitioning is still farfrom implementation for two reasons:

(a) There are concurrent behaviors in each PE thathave to be serialized;

(b) Di�erent PEs communicate through global vari-ables which have to be localized.

These issues will be addressed in the following twosections.

4.4 Scheduling and the scheduled

model

Given a set of behaviors and possibly a set of perfor-mance constraints, the scheduling task determines atotal order in invocation time of the behaviors runningon the same PE, while respecting the partial order im-posed by dependencies in the functionality as well asminimizing the synchronization overhead between thePEs and context switching overhead within the PEs.

Depending upon how much information on the par-tial order of the behaviors is available at compile time,there are di�erent strategies for scheduling.

In one extreme, where ordering information is un-known until runtime, the system implementation oftenrelies on the dynamic scheduler of an underlying run-time system. In this case, the model after schedulingis not much di�erent from the model after partition-ing, except that a runtime system is added to carryout the scheduling. This strategy su�ers from contextswitching overhead when a running task is blocked anda new task is scheduled.

On the other extreme, if the partial order is com-pletely known at compile time, a static schedulingstrategy can be taken, provided a good estimation on

B1

B3

B4

B6

B7

shared sync

PE0 PE1

Top B6_start B3_start

PE0: B6 B7 B3PE1: B1 B4

B1( ){ ... signal( B6_start );}

B6( ){ int local; wait( B6_start ); ... shared = local + 1; signal( sync );}

B4(){ int local; wait( sync ); local = shared − 1; ... signal( B3_start );}

B3( ){ wait( B3_start ); ...}

B7( ) { stmts; ...}

B6_start

sync

B3_start

(b)

(c)

(a)

Figure 48: Conceptual model after scheduling: (a)scheduling decision, (b) conceptual model, (c) atomicbehaviors.

36

Page 40: Essen - University of Torontojzhu/publications/kluwer97.pdf · gro wth that has b een paral-leled only b y the adv ances in IC fabrication. Since the design problems at lo w er lev

the execution time of each behavior can be obtained.This strategy eliminates the context switching over-head completely, but may su�er from inter-PE syn-chronization especially in the case of inaccurate per-formance estimation. On the other hand, the strategybased on dynamic scheduling does not have this prob-lem because whenever a behavior is blocked for inter-PE synchronization, the scheduler will select anotherto execute. Therefore the selection of the schedulingstrategy should be based on the trade-o� between con-text switching overhead and CPU utilization.

The model generated after static scheduling willremove the concurrency among behaviors inside thesame PE. As shown in Figure 48, all child behaviorsin PE0 are now sequentially ordered. In order to main-tain the partial order across the PEs, synchronizationbetween them must be inserted. For example, B6 issynchronized by B6 start, which will be asserted byB1 when it �nishes.

Note that B1 ctrl and B4 ctrl in the model afterpartitioning are eliminated by the optimization car-ried out by static scheduling. It should also be men-tioned that in this section we de�ne the tasks, ratherthan the algorithms of codesign. Good algorithms arefree to combine several tasks together. For example,an algorithm can perform the partitioning and staticscheduling at the same time, in which case intermedi-ate results, such as B1 ctrl and B4 ctrl, are not gen-erated at all.

4.5 Communication synthesis and the

communication model

Up to this stage, the communication and synchroniza-tion between concurrent behaviors are accomplishedthrough shared variable accesses. The task of thisstage is to resolve the shared variable accesses into anappropriate inter-PE communication scheme at imple-mentation level. Several communication schemes ex-ist:

(a) The designer can choose to assign a shared vari-able to a shared memory. In this case, the com-munication synthesizer will determine the loca-tion of the variables assigned to the shared mem-ory. Given the location of the shared variables,the synthesizer then has to change all accesses tothe shared variables in the model into statementsthat read or write to the corresponding addresses.The synthesizer also has to insert interfaces forthe PEs and shared memories to adapt to di�er-ent protocols on the buses.

(b) The designer may also choose to assign a sharedvariable to the local memory of one particularPE. In this case, accesses to this shared variablein models of other PEs have to be changed intofunction calls to message passing primitives suchas send and receive. Again, interfaces have to beinserted to make the message-passing possible.

(c) Another option is to maintain a copy of the sharedvariable in all the PEs that access it. In thiscase, all the statements that perform a write onthis variable have to be modi�ed to implement abroadcasting scheme so that all the copies of theshared variable remain consistent. Necessary in-terfaces also need to be inserted to implement thebroadcasting scheme.

The generated model after communication synthe-sis, as shown in Figure 49, is di�erent from previousmodels in the following way:

(a) New behaviors for interfaces, shared memoriesand arbiters are inserted at the highest level ofthe hierarchy. In Figure 49 the added behaviorsare IF0, IF1, IF2, Shared mem, Arbiter.

(b) The shared variables from the previous model areall resolved. They either exist in shared memoryor in local memory of one or more PEs. The com-munication channels of di�erent PEs now becomethe local buses and system buses. In Figure 49,we have chosen to put all the global variables inShared mem, and hence all the global declarationsin the top behavior are moved to the behaviorShared mem. New global variables in the top be-havior are the buses lbus0, lbus1, lbus2, sbus.

(c) If necessary, a communication layer is insertedinto the runtime system of each PE. The com-munication layer is composed of a set of inter-PEcommunication primitives in the form of driverroutines or interrupt service routines, each ofwhich contain a stream of I/O instructions, whichin turn talk to the corresponding interfaces. Theaccesses to the shared variables in the previousmodel are transformed into function calls to thesecommunication primitives. For the simple case ofFigure 49, the communication synthesizer will de-termine the addresses for all global variables, forexample, shared addr for variable shared, and allaccesses to the variables are appropriately trans-formed. The accesses to the variables are ex-changed with reading and writing to the corre-sponding addresses. For example, shared = local+ 1 becomes *shared addr = local+1.

37

Page 41: Essen - University of Torontojzhu/publications/kluwer97.pdf · gro wth that has b een paral-leled only b y the adv ances in IC fabrication. Since the design problems at lo w er lev

Shared_mem

shared

sync

B1_start

B1_done

B4_start

B4_done

LM of PE1LM of PE0

IF0 IF1 IF2

Shared_m

em

Toplbus0 lbus1 lbus2 sbus

PE1

B1

B4

PE0

B0

B2B5

B6

B7

B3

B4_ctrl

B1_ctrl

Arbiter

B1( ){ wait( *B1_start_addr ); ... signal( *B1_done_addr );}

Shared_mem( ){ int shared; bool sync; bool B1_start, B1_done; bool B4_start, B4_done; ...}

B3( ){ stmt; ...}

B7( ) { stmt; ...}

IF0( ) { stmt; ...}

IF1( ) { .stmt; ..}

IF2( ) { stmt; ...}

Arbiter( ) { stmt; ...}

B1_ctrl( ){ signal( * B1_start_addr ); wait( * B1_done_addr );}

B4(){ int local; wait( *B4_start_addr ); wait( *sync_addr ); local = (*shared_addr) − 1; ... signal( *B4_done_addr );}

B4_ctrl( ){ signal( *B4_start_addr ); wait( *B4_done_addr );}

B6( ){ int local; ... *shared_addr = local + 1; signal( *sync_addr );}

(a) (b)

(c)

Figure 49: Conceptual model after communication synthesis: (a) communication synthesis decision, (b) conceptualmodel, (c) atomic behaviors.

38

Page 42: Essen - University of Torontojzhu/publications/kluwer97.pdf · gro wth that has b een paral-leled only b y the adv ances in IC fabrication. Since the design problems at lo w er lev

4.6 Analysis and validation ow

Before each design step, which takes an input designmodel and generates a more detailed design model, theinput design model has to be functionally veri�ed. Italso needs to be analyzed, either statically, or dynam-ically with the help of the simulator or estimator, inorder to obtain an estimation of the quality metrics,which will be evaluated by the synthesizer to makegood design decisions. This motivates the set of toolsto be used in the analysis and validation ow of themethodology. An example of such a tool set consistsof

(a) a static analyzer,

(b) a simulator,

(c) a debugger,

(d) a pro�ler, and

(e) a visualizer.

The static analyzer associates each behavior withquality metrics such as program size and program per-formance in case it is to be implemented as software, ormetrics of hardware area and hardware performance ifit is to be implemented as an ASIC. To achieve a fastestimation with satisfactory accuracy, the analyzer re-lies on probabilistic techniques and the knowledge ofbackend tools such as compiler and high level synthe-sizer.

The simulator serves the dual purpose of func-tional validation and dynamic analysis. Simulationis achieved by generating an executable simulationmodel from the design model. The simulation modelruns on a simulation engine, which in the form of run-time library, provides an implementation for the simu-lation tasks such as simulation time advance and syn-chronization among concurrent behaviors.

Simulation can be performed at di�erent accuracylevels. Common accuracy models are functional, cyclebased, and discrete event simulation. A functionallyaccurate simulation compiles and executes the designmodel directly on a host machine without paying spe-cial attention to simulation time. A clock cycle accu-rate simulation executes the design model in a clockby clock fashion. A discrete event simulation incorpo-rates a even more sophisticated timing model of thecomponents, such as gate delay. Obviously there is atrade-o� between simulation accuracy and simulatorexecution time.

It should be noted that, while most design method-ologies adopt a �xed accuracy simulation at each de-sign stage, applying a mixed accuracy model is also

possible. For example, consider a behavior represent-ing a piece of software that performs some compu-tation and then sends the result to an ASIC. Whilethe part of the software which communicates with theASIC needs to be simulated at cycle level so that trickytiming problems become visible, it is not necessary tosimulate the computation part with the same accu-racy.

The debugger renders the simulation with breakpoint and single step ability. This makes it possibleto examine the state of a behavior dynamically. Avisualizer can graphically display the hierarchy treeof the design model as well as make dynamic datavisible in di�erent views and keep them synchronizedat all times. All these e�orts are invaluable in quicklylocating and �xing the design errors.

The pro�ler is a good complement of a staticanalyzer for obtaining dynamic information such asbranching probability. Traditionally, it is achieved byinstrumenting the design description, for example, byinserting a counter at every conditional branch to keeptrack of the number of branch executions.

4.7 Backend

At the stage of the backend, as shown in the lowerpart of Figure 45, the leaf behaviors of the designmodel will be fed into di�erent tools in order to obtaintheir implementations. If the behavior is assigned toa standard processor, it will be fed into a compiler forthis processor. If the behavior is to be mapped on anASIC, it will be synthesized by a high level synthesistool. If the behavior is an interface, it will be fed intoan interface synthesis tool.

A compiler translates the design description intomachine code for the target processor. A crucial com-ponent of a compiler is its code generator, which emitsmachine code from the intermediate representationgenerated by the parser part of the compiler. A re-targetable compiler is a compiler whose code gen-erator can emit code for a variety of target proces-sors. An optimizing compiler is a compiler whosecode generator fully exploits the architecture of thetarget processor, in addition to the standard optimiza-tion techniques such as constant propagation. ModernRISC processors, DSP processors, and VLIW proces-sors depend heavily on optimizing compilers to takeadvantage of their speci�c architectures.

The high level synthesizer translates the designmodel into a netlist of register transfer level (RTL)components, as de�ned in Section 2.3 as a FSMD ar-chitecture. The tasks involved in high level synthesisinclude allocation, scheduling and binding. Allocation

39

Page 43: Essen - University of Torontojzhu/publications/kluwer97.pdf · gro wth that has b een paral-leled only b y the adv ances in IC fabrication. Since the design problems at lo w er lev

selects the number and type of the RTL componentsfrom the library. Scheduling assigns time steps tothe operations in the behavioral description. Bindingmaps variables in the description to storage elements,operators to functional units, and data transfers tointerconnect units. All these tasks try to optimize ap-propriate quality metrics subject to design constraints.

We de�ne an interface as a special type of ASICwhich links the PE that it is associated (via its nativebus) with other components of the system (via thesystem bus). Such a interface implements the behav-ior of a communication task, which is generated by acommunication synthesis tool to implement the sharedvariable accesses. Note that a transducer, which trans-lates a transaction on one bus into one or a series oftransactions on another bus, is just a special case ofthe above interface de�nition. An example of such atransducer translates a read cycle on a processor businto a read cycle on the system bus. The communi-cation tasks between di�erent PEs are implementedjointly by the driver routines and interrupt serviceroutines implemented in software and the interfacecircuitry implemented in hardware. While the par-titioning of the communication task into software andhardware, and model generation for the two parts isthe job of communication synthesis, the task of gen-erating an RTL design from the interface model is thejob of interface synthesis. Thus interface synthesisis a special case of high level synthesis. The charac-teristics that distinguish an interface circuitry from anormal ASIC is that its ports have to conform to someprede�ned protocols. These protocols are often spec-i�ed in the form of timing diagrams in vendors' datasheets. This poses new challenges to the interface syn-thesizer for two reasons:

(a) the protocols impose a set of timing constraintson the minimum and maximum skews betweenevents that the interface produces and other pos-sibly external events, which the interface has tosatisfy;

(b) the protocols provide a set of timing delays on theminimum and maximum skews between externalevents and other events, of which the interfacemay take advantage.

5 Conclusion and Future Work

Codesign represents the methodology for speci�cationand design of systems that include hardware and soft-ware components. A codesign methodology consists

of design tasks for re�ning the design and the modelsrepresenting the re�nements.

In this chapter we presented essential issues in code-sign. System codesign starts by specifying the systemin one of the speci�cation languages based on someconceptual model. Conceptual models were de�ned inSection 1, implementation architectures in Section 2,while the features needed in executable speci�cationswere given in Section 3. After a speci�cation is ob-tained the designer must select an architecture, allo-cate components, and perform partitioning, schedul-ing and communication synthesis to generate the ar-chitectural behavioral description. After each of theabove tasks the designer may validate her decisions bygenerating appropriate simulation models and validat-ing the quality metrics as explained in Section 4.

Presently, very little research has been done in thecodesign �eld. The current CAD tools are mostly sim-ulator backplanes. Future work must include de�ni-tion of speci�cation languages, automatic re�nementof di�erent system descriptions and models, and de-velopment of tools for architectural exploration, algo-rithms for partitioning, scheduling, and synthesis, andbackend tools for custom software and hardware syn-thesis, including IP creation and reuse.

Acknowledgements

We would like to acknowledge the support providedby UCI grant #TC20881 from Toshiba Inc. and grant#95-D5-146 and #96-D5-146 from Semiconductor Re-search Corporation.

We would also like to acknowledge Prentice-HallInc., Upper Saddle River, NJ 07458, for the permissionto reprint �gures from [GVNG94] (annotated by y),�gures from [Gaj97] (annotated by z), and the partialuse of text appearing in Chapter 2 and Chapter 3 in[GVNG94] and Chapter 6 and Chapter 8 in [Gaj97].

We would also like to thank Jie Gong, SanjivNarayan and Frank Vahid for valuable insights andearly discussions about models and languages. Fur-thermore, we want to acknowledge Jon Kleinsmith,En-shou Chang, Tatsuya Umezaki for contributionsin language requirements and model development.

References

[Ag90] G. Agha. \The Structure and Se-mantics of Actor Languages". LectureNotes in Computer Science, Foundation

40

Page 44: Essen - University of Torontojzhu/publications/kluwer97.pdf · gro wth that has b een paral-leled only b y the adv ances in IC fabrication. Since the design problems at lo w er lev

of Object-Oriented Languages. Springer-Verlag, 1990.

[AG96] K. Arnold, J. Gosling. The Java Program-ming Language. Addison-Wesley, 1996.

[BCJ+97] F. Balarin, M. Chiodo, A. Jurecska,H. Hsieh, A. Lavagno, C. Passerone,A. Sangiovanni-Vincentelli, E. Sentovich,K. Suzuki, B. Tabbara Hardware-SoftwareCo-Design of Embedded Systems: A Po-lis Approach. Kluwer Academic Publish-ers, 1997.

[COB95] P. Chou, R. Ortega, G. Boriello. \Inter-face Co-synthesis Techniques for Embed-ded Systems". In Proceedings of the Inter-national Conference on Computer-AidedDesign, 1995.

[CGH+93] M. Chiodo, P. Giusto, H. Hsieh, A. Ju-recska, L. Lavagno, A. Sangiovanni-Vin-centelli. \A formal speci�cation model forhardware/software codesign". TechnicalReport UCB/ERL M93/48, U.C. Berke-ley, June 1993.

[DH89] D. Drusinsky, D. Harel. \Using State-charts for hardware description and syn-thesis". In IEEE Transactions on Com-puter Aided Design, 1989.

[EHB93] R. Ernst, J. Henkel,T. Benner. \Hardware-software cosynthe-sis for microcontrollers". In IEEE Designand Test, Vol. 12, 1993.

[FLLO95] R. French, M. Lam, J. Levitt, K. Oluko-tun. \A General Method for CompilingEvent-Driven Simulation". In Proceedingsof 32th Design Automation Conference, 6,1995.

[FH92] C. W. Fraser, D. R. Hanson, T. A. Proeb-sting. \Engineering a Simple, E�cientCode Generator Generator". In ACM Let-ters on Programming Languages and Sys-tems, 1, 3 (Sept. 1992).

[Gaj97] D. D. Gajski. Principles of Digital Design,Prentice Hall, 1997.

[GCM92] R. K. Gupta, C. N. Coelho Jr.,G. De Micheli. \Synthesis and simulationof digital systems containing interactinghardware and software components". In

Proceedings of the 29th ACM, IEEE De-sign Automation Conference, 1992.

[GDWL91] D. D. Gajski, N. D. Dutt, C. H. Wu,Y. L. Lin. High-Level Synthesis: In-troduction to Chip and System Design.Kluwer Academic Publishers, Boston,Massachusetts, 1991.

[GVN94] D. D. Gajski, F. Vahid, S. Narayan. \Asystem-design methodology: Executable-speci�cation re�nement". In Proceedingsof the European Conference on DesignAutomation, 1994.

[GVNG94] D. Gajski, F. Vahid, S. Narayan, J. Gong.Speci�cation and Design of Embedded Sys-tems. New Jersey, Prentice Hall, 1994.

[Har87] D. Harel. \Statecharts: A visual for-malism for complex systems". Science ofComputer Programming 8, 1987.

[HHE94] D. Henkel, J. Herrmann, R. Ernst. \Anapproach to the adaption of estimatedcost parameters in the cosyma system".Third International Workshop on Hard-ware/Software Codesign, Grenoble, 1994.

[Hoa85] C. A. R. Hoare. Communicating Sequen-tial Processes. Prentice-Hall International,Englewood Cli�s, New Jersey, 1985.

[HP96] J. L. Hennessy, D. A. Patterson. Com-puter Architecture { A Quantitative Ap-proach, 2nd edition, Morgan-Kaufmann,1996.

[KL95] A. Kalavade, E. A. Lee. \The extendedpartitioning problem: Hardware/softwaremapping and implementation-bin selec-tion". In Proceedings of the 6th Interna-tional Workshop on Rapid Systems Pro-totyping, 1995.

[Lie97] C. Liem. Retargetable Compilers for Em-bedded Core Processors: Methods andExperiences in Industrial Applications.Kluwer Academic Publishers, 1997.

[LM87] E. A. Lee, D. G. Messerschmidt. \StaticScheduling of Synchronous Data FlowGraphs for Digital Signal Processors". InIEEE Transactions on Computer-AidedDesign, 87, pp.24-35.

41

Page 45: Essen - University of Torontojzhu/publications/kluwer97.pdf · gro wth that has b een paral-leled only b y the adv ances in IC fabrication. Since the design problems at lo w er lev

[LMD94] B. Landwehr,P. Marwedel, R. D�omer. \OSCAR: Op-timum Simultaneous Scheduling, Alloca-tion and Resource Binding Based on Inte-ger Programming". In Proceedings of theEuropean Design Automation Conference,1994.

[LS96] E. A. Lee, A. Sangiovanni-Vincentelli.\Comparing Models of Computation". InProceedings of the International Confer-ence on Computer Design, San Jose, CA,Nov. 10-14, 1996.

[MG95] P. Marwedel, G. Goosens. Code Gener-ation for Embedded Processors. KluwerAcademic Publishers, 1995.

[NM97] R. Niemann, P. Marwedel. \An Algo-rithm for Hardware/Software Partition-ing Using Mixed Integer Linear Program-ming". In Design Automation for Embed-ded Systems, 2, Kluwer Academic Pub-lishers, 1997.

[Pet81] J. L. Peterson. Petri Net Theory and theModeling of Systems. Prentice-Hall, En-glewood Cli�s, New Jersey, 1981.

[PK93] Z. Peng, K. Kuchcinski. \An Algorithmfor partitioning of application speci�c sys-tems". In Proceedings of the EuropeanConference on Design Automation, 1993.

[Rei92] W. Reisig. A Primer in Petri Net Design.Springer-Verlag, New York, 1992.

[Stau94] J. Staunstrup. A Formal Approach toHardware Design. Kluwer Academic Pub-lishers, 1994.

[Str87] B. Strous-trup. The C++ Programming Language.Addison-Wesley, Reading, 1987.

[TM91] D. E. Thomas, P. R. Moorby. The VerilogHardware Description Language. KluwerAcademic Publishers, 1991.

[YW97] T. Y. Yen, W. Wolf. Hardware-soft-ware Co-synthesis of Distributed Embed-ded Systems. Kluwer Academic Publish-ers, 1997.

42

Page 46: Essen - University of Torontojzhu/publications/kluwer97.pdf · gro wth that has b een paral-leled only b y the adv ances in IC fabrication. Since the design problems at lo w er lev

Index

Accumulator, 11Action, 4Actor, 28

composite, 29leaf, 29

Application-Speci�c Architecture, 10Architecture, 3Array Processor, 16

Behavior, 18Leaf, 22

Behavioral Hierarchy, 22Block, 25

Channel, 25CISC, 13Communication, 30Communication Medium, 26Compiler, 39

optimizing, 39retargetable, 39

Completion Point, 23Complex-Instruction-Set Computer, 13Concurrency, 8

pipelined, 19Concurrent Decomposition, 22Control construct, 9

branching, 9looping, 9sequential composition, 9subroutine call, 9

Controller, 10Cycle, 19

Data Sample, 19Data Type

basic, 8composite, 9

Data ow, 19Debugger, 39Design Exploration, 35Design Process, 3

Exception, 24Executable Modeling, 18Executable Speci�cation, 18

Final State, 23Finite-State Machine, 4

hierarchical concurrent, 8Fire, 7

FSM, 4input-based, 4Mealy-type, 4Moore-type, 4state-based, 4

FSMD, 5Function, 9

General-Purpose Processor, 10

HCFSM, 8Hierarchy, 8

behavioral, 28structural, 29

High Level Synthesizer, 39

Inlining, 31Interface, 17, 25Interface Synthesis, 40

LanguageExecutable Modeling, 18Executable Speci�cation, 18

Late Binding, 30Liveness, 7

Method, 26Methodology, 3MIMD, 10, 16Mode, 20Model, 1

activity-oriented, 3data-oriented, 4heterogeneous, 4state-oriented, 3structure-oriented, 4

Multiprocessor, 16message-passing, 16shared-memory, 16

Multiprocessor System, 16

Parallel Processor, 10, 16PE, 17Petri net, 6Pipeline Stage, 19Place, 6Port, 25Procedure, 9Process, 20Processing Element, 17Pro�ler, 39

43

Page 47: Essen - University of Torontojzhu/publications/kluwer97.pdf · gro wth that has b een paral-leled only b y the adv ances in IC fabrication. Since the design problems at lo w er lev

Program-State, 9composite, 9concurrent, 9Leaf, 9sequential, 9

Program-State Machine, 9Programming Language, 8

declarative, 8imperative, 8

Protocol, 17, 24PSM, 9

Reduced-Instruction-Set Computer, 14RISC, 10, 14

Saveness, 7Sequential Decomposition, 22

procedural, 22state-machine, 22

SIMD, 10, 16Simulator, 39Single Assignment Rule, 19State, 4, 8State Transition, 29Statement, 9Static Analyzer, 39Structure, 25Subbehavior

initial, 22Substate, 8

concurrent, 8Synchronization

by common event, 27by common variable, 27by status detection, 28control-dependent, 30data-dependent, 30initialization, 27shared-memory based, 27

System Bus, 17

TI, 9, 30Timing, 32Timing Constraint, 24, 32Timing Delay, 24, 32Timing Diagram, 24TOC, 9, 29Token, 6Transition, 4, 6, 8

group, 22hierarchical, 22simple, 22

Transition Immediately, 9, 30

Transition on Completion, 9, 29

Very-Long-Instruction-Word Computer, 15Visualizer, 39VLIW, 10, 15

44