Professional Documents
Culture Documents
OBJECT-ORIENTED
MODELING
Edited by
Jean-Michel Berge
CNET. France
OzLevia
Cadence Design Systems. U.S.A.
and
Jacques Rouillard
ESIM. France
..
KLUWER ACADEMIC PUBLISHERS
BOSTON / DORDRECHT / LONDON
A C.I.P. Catalogue record for this book is available from the Library of Congress.
PUBLISHED VOLUMES:
• Volume 1: Model Generation in Electronic Modeling
Contents: 1. A Flexible Generator of Component Models. 2. What Makes an ASIC
Library Sign-Off? 3. A Case History in Building Vital-Compliant Models. 4. Modeling
Multiple Driver Net Delay in Simulation. 5. DELPHI: the Development of Librairies of
Physical Models of Electronic Components for Integrated Design Environment.
6. VHDL Floating Point Operations. 7. Symbolic Model Checking with Past and Future
Temporal Modalities: Fundamentals and Algorithms. 8. KRYPTON: Portable, Non-
Reversible Encryption for VHDL. Index.
168 pp. ISBN 0-7923-9568-9
We hope you will enjoy reading this series. We welcome your suggestions and look
forward to having you as a contributor.
EDITORS
Series Editors
Advisory Board
Editorial Board
Przemyslaw Bakowski - IRESTE Serge Maginot - Leda SA.
Dave Barton - Intermetrics Inc. Wolfgang Mueller - CADLAB
Bill Billowich - VHDL Technology Group Adam Pawlak - ARTEMISlIMAG
Mark Brown - Compass Bora Prazic - Alcatel
Jean-Paul Calvez - IRESTE Paul Scheidt - Synopsys Inc.
Steve Carlson - Escalade Jean-Pierre Schoellkopf - SGS-Thomson
Simon Curry - Cadence Steve Schultz - Texas Instruments
Tedd Corman - EPS Ken Scott - Synopsys Inc.
Doug Dunlop - Cadence Venkat Venkataraman - IBM
Alain Fonkoua - ESIM Alex Zamfirescu - Intergraph Electronics
Andreas Hohl - Synopsys Inc. Roger Zinsner - Speed SA
Michael Hohenbichler - CEC
VOLUME PRESENTATION
IX
x Object-Oriented Modeling
The last three chapters focus on the different ways to introduce Object-Oriented
techniques into VHDL. The fifth and sixth chapters propose Object-Oriented
extensions to the languages while the seventh one presents an Object-Oriented approach
to the design.
In "Object Orientation and Structural Design", the fifth chapter, the structural VHDL
description capabilities are detailed and compared with Object-Oriented properties. In
order to allow incremental design by inheritance in VHDL, a language extension is
proposed for VHDL entities, architectures and component declarations.
The sixth chapter, "Abstract Hardware Modelling using an Object-Oriented Language
Extension to VHDL", addresses the problem of reusability of hardware. After discussing
the best gain domains of reuse, the OMT method is briefly presented and Object-
Oriented extensions to VHDL types are proposed to allow a good mapping between the
OMT concepts and this implementation language.
Finally, the seventh chapter entitled "Object-Oriented Generation of VHDL Models",
defines an object-oriented approach to generating a library of VHDL synthesizable
models. The object-oriented analysis and implementation of the VHDL model
generation system is described. An example of the VHDL code generated for a 4-bit
ripple carry adder is included.
VOLUME PRESENTATION IX
CONTENTS XI
CONTRIBUTORS xvn
1. OBJECT ORIENTATION: MODELING AND DESIGN PARADIGMS
FOR THE YEAR 2000? 1
by Wolfgang Ecker, Michael Mrva
1.1. Motivation 1
XI
XII Object-Oriented Modeling
2.1. Introduction 16
2.2. Data Types 17
2.3. Modeling Hardware Components as Classes 17
2.4. Deriving Specialized Components 20
2.5. Data Decomposition 21
2.5.1. Overview of the Technique 22
2.5.2. Identifying Reusable Components and Managing Change 23
3.1. Introduction 40
3.1.1. Issues Related to Real-Time System Engineering 40
3.1.2. OMT for Real-Time, Strengths and Weaknesses 40
3.1.3. Use of Formalisms Dedicated to Real-Time:
SDLandMSC 40
3.2. The OORT engineering process 41
3.2.1. Typical System Engineering Activities 41
3.2.2. Requirements Analysis 41
3.2.3. Architectural Design 42
3.2.4. Detailed Design 42
3.2.5. Test Design 42
3.2.6. Implementation 42
3.2.7. Testing 43
3.2.8. Iterative Process Model 43
Contents XIII
4.1. Introduction 58
4.2. Methodology Outline 59
4.2.1. The Basic Elements of the Methodology 59
4.2.2. The NotationslLanguages 60
4.3. Analysis using OMT 61
4.4. Creating a System Model with OMT* 63
4.5. Paths to Implementation: SDL and VHDL 65
4.5.1. SDL for Software 65
4.5.2. VHDL for Hardware 67
4.6. The INSYDE toolset 68
4.6.1. Tools for Editing 68
4.6.2. Tools for Translation 69
4.6.3. Cosimulation 69
4.7. Case Studies 69
4.7.1. An Image-Reconstruction Chip-Set 70
4.7.2. A Video-on-Demand System 71
4.8. Conclusion 72
XIV Object-Oriented Modeling
5.1. Introduction 78
5.2. Outline 78
5.3. VHDL Structural Descriptions 79
5.8. Genericity 96
5.8.1. Instance 96
5.8.2. Polymorphism 96
5.8.3. Inheritance 97
5.8.4. Generics 97
5.9. Conclusion and Outlook 98
INDEX 147
CONTRIBUTORS
ABSTRACT
Taking as its basis the comparison between the development of hardware and software
design technology, this chapter answers the question as to the next quantum leap in
hardware development programatically with "object orientation ".
1.1. MOTIVATION
For decades, the complexity of digital components has been increasing by about a factor
of four every three years. This increase, observed by Moore [1] and postulated as a
condition for the future, still applies today, and there is no reason for assuming it will
not apply in the years to come.
Thus, mass production of the 16-Mb memory has started, the 64-Mb memory chip will
shortly be ready for production, and we already have the first laboratory samples of
256-Mb chips. Today, microprocessors contain something like 1M gates (= 4M
transistors), and processors with 4M gates are expected soon.
From the point of view of design methodology, ASICs are of greater interest. The
number produced is well below that of memory units or processors, but the total
development time spent on the latter is below that spent on all the ASICs produced
throughout the world.
2 CHAPTER 1
ASICs currently being developed have a maximum complexity of about 250K gates and
are about three years behind the complexity of processors [2]. This means that ASICs
with a complexity of 1M gates can be expected in the year 2000.
The introduction of new methods, such as the Register Transfer Synthesis, has made it
possible to manage greater complexities. Nevertheless, it has not increased the
productivity of the individual ASIC developer to a sufficiently high degree. For this
reason, it has only been possible to carry out the necessary design work by increasing
the size of the team entrusted with the task of developing a component.
Nowadays, however, this is becoming increasingly difficult. The reason is not so much
the high cost of wages found in all the so-called industrialized nations, as the
communication overheads. These increase disproportionately with the number of team
members, and thereby limit the size of a team to a maximum of ten to fifteen
developers.
What, then, will be the demands placed on a developer in terms of productivity in the
year 2000?
Currently, the average productivity of a developer over the total development time is
taken to be 12.5 - 25 K gates. Assuming, then, an average ASIC size of 50 - 120 K
gates, it would take teams of 2 - 10 members to develop a component. With the same
productivity, it will require between forty and eighty developers to develop 1M ASICs
in the year 2000 I .
However, the maximum manageable number of developers in a team is taken to be from
ten to fifteen. This means that their productivity will have to rise to 70 - 100 K gates, in
other words by a factor of four.
The central question for design centers and manufacturers of CAD tools is simply this:
What methods and design technologies, and therefore what design tools, could be used
to achieve this end?
To answer this question, we shall first of all analyze the development of software
technology, which has to meet similarly dramatic requirements in terms of complexity
and productivity2. We shall then work out the milestones in hardware design.
By comparing both technologies, and in particular by comparing programming languages
with hardware description languages, we shall then be able to make a prediction about
the next quantum leap in hardware design.
I These figures are taken from [3]. They also agree, however, with the figures quoted by firms such as
Siemens and Philips.
2 Another reason why it is useful to align hardware design technology with software design technology is
that hardware design is nowadays based on hardware description languages that are closely related to
programming languages.
Object Orientation: Modeling and Design Paradigms for the Year 2000? 3
I It should not be forgotten here, however, that it is only the advent of increasingly powerful computers
that has made the use of modem software technologies possible.
4 CHAPTER 1
• A start was made with the optimization and automatic parallel partitioning of
programs [10]. This did not, however, lead to any great success, particularly in the
case of automatic partitioning. There are problems with NP integrity and dynamic
data structures.
• Languages such as OCCAM [11] and ADA [12] were introduced for the
programming of parallel actions, with the development of OCCAM going hand in
hand with the invention of the transputer [28]. Ada grew out of a research and
development project of the American Department of Defense (DoD), being intended
to provide uniform programming of parallel tasks within the framework of DoD
jobs. Parallel programming, however, is by no means as widely used as sequential
programming.
• A particularly strong point of functional languages [13] is that they make it possible
to hand over functions as parameters. However, the strictly functional view has not
been widely accepted.
• To reduce the error rate in programs, special programming languages based on the
language of mathematical formulae were developed, along with proof systems for
verifying the correctness of these programs [14]. These are not yet suitable,
however, for widespread use, since proof systems normally work interactively, can
only be used at present by specialists, and fail with larger programs. Up to now,
they have only been used in developments where safety is an important factor, such
as in traffic control technology.
• For many years, artificial intelligence was the spearhead of the new software
technology [15]. Although, up to now the hopes placed in artificial intelligence have
not come to fruition, it has given rise to numerous languages, of which the most well
known is PROLOG [16].
• LISP [17] is likewise treated as an artificial intelligence language. Its special feature,
however, is its ability to handle lists with ease. For this reason, it is often used for
processing texts.
• So-called script languages are also discussed in the context of the production of
prototypes. Examples are the already somewhat older AWK [24] and its successors
PEARL [25] and TCLlTK [26], used for generating command interpreters and
graphical user interfaces quickly. What these languages have in common is that they
are all processed interpretively and have a wide range of very powerful in-built
functionalities. However, script languages are of little importance in the production
of software: they are extremely difficult to debug, have relatively long execution
times, and do not guarantee a satisfactory copyright of the program text, since they
are supplied in source format.
• Object orientation has been a well-known paradigm of software technology for some
time. The important principles include:
- data packaging and data hiding
- activation of methods based on messages
Object Orientation: Modeling and Design Paradigms for the Year 2000? 5
- inheritance
- polymorphism
- generic types.
The first example, Smalltalk [18], was developed before 1980' if one disregards Simula,
the "proto-language" of object orientation. Initially, the poor performance of the first
Smalltalk version stood in the way of its widespread adoption. Object orientation was
given a new fillip with the development of C++ [19]. For the first time, it was possible
to produce object-oriented program constructs with an acceptable performance.
Following this, work was carried out on the object-oriented enhancement of a number of
existing languages, such as Lisp [20] and COBOL [21]. Promising new developments
are the languages ADA95 [22] and Eiffel [23].
Looking back over the last few years in the development of software technology, it can
be said that, of all these approaches, the last quantum leap was achieved with the
introduction of object orientation.
However, it did not stop at the development or enhancement of programming languages;
there were also important further developments in design methodology and software
process technology based on object-oriented languages. The most important examples
are:
• Object-oriented design and analysis methods (OOA, OOD) [29-33, 73], which
replaced the structured methods of analysis from the time of higher programming
languages.
• Design patterns [35, 72], which make it possible to aggregate the type concept of
Class in object orientation to still larger units. This means that the designer is better
able to communicate and discuss his designs, and thus, ultimately, to control their
consequences, in a group-dynamic planning process.
• The V model [37] and the X model [38], which take account of prototyping, reuse,
and domain analysis in the design process.
The first quantum leap in design technology was the transition to digital circuit
elements. On the one hand, it was possible to make use of a large number of previously
developed basic components made up of transistors; on the other, before circuits were
produced, they could be analyzed with so-called digital simulators, which handled all
values discretely I . Circuits were developed by hierarchically combining these basic
. more comp1ex ones 2.
components mto
The next quantum leap was the introduction of hardware description languages into the
design process. These made it possible to specify an intended functionality with
description resources well known in programming languages. Gajski represented the
development in his Y model by adding a behavioral aspect to the design process
consisting of physical and structural domains [39].
Examples of hardware description languages are CDL [40], CONLAN [41], DACAPO
III [42], DDL [43], ELLA [44], HILO [45], ISP [46], ISPS [47], KARL/ABL [48], M
[49] PHPL [50], PMS [51], ZEUS [52], and UDLII [53], to name but a few. So great
was the multiplicity of languages and their abstraction feasibility that there was already
talk in 1977 of a tower of Babel [54].
Not until VHDL [55] was a universally accepted standard achieved in this area. Only
VERILOG [56] is used to any extent worth mentioning, and that principally in the
USA.
The development of RTL synthesis tools made it possible to take models formulated
with hardware description languages and turn them automatically into hardware. As a
result, hardware description languages fmally came into their own at the beginning of the
nineties.
Just as in the area of software technology, a series of widely differing developments
were then started, and they are still going on today. For each activity in software design,
there is an analogous developmene in hardware design.
• New synthesis techniques were designed to make it possible to tum more abstract
descriptions directly into hardware [57, 58]. High-level synthesis uses a controller
datapath architecture and supports scheduling and allocation. Whereas high-level
synthesis concentrates on one process, system synthesis tackles the synthesis of
parallel processes.
• Special new specification languages such as Z [59] and ESTERELLE [60] were
developed and proposed for application in hardware design.
• Functional languages [61], familiar in the area of software technology, are intended
for use in the specification process.
I This was the first REUSE approach in hardware and software design methodology fully integrated in
the design process.
2 This composition aspect in the design of digital hardware components was the model for object-
oriented software design. Data hiding and packaging are also basic principles reflected in both design
methods.
Object Orientation: Modeling and Design Paradigms for the Year 2000? 7
• The use of formal methods [62-65] is intended, on the one hand, to prove the
correctness of descriptions, and, on the other, to produce languages formally, so that
their semantics are clearly specified.
• Domain-specific languages such as SILAGE [67] are defined for the data-flow-
oriented description of DSP applications.
• Programmable cores, such as ASIPs and DSP, make it possible to achieve higher
productivity in relation to gates, and, through programmability, to obtain a more
flexible application. However, they shift the problem to the software area.
• Exactly the same applies to the use of formal methods in hardware design as in
software design. The only difference is that there are normally no dynamic data
structures in the former, although there is a much greater degree of parallelism.
J The paraJlel is illustrated by the use of the same list numbers. Thus, the development of
optimizing/automatic partitioning compilers can be seen as analogous to activities in the area of high-
level or system synthesis.
I The word "real" is to be interpreted in the sense that nowadays the target architecture can still be easily
read from the description form. "Real" behavioral synthesis would have to produce a result largely
independent of the description form.
8 CHAPTER 1
• Expert systems and interactive systems were already the alternative to synthesis in
[39]. So far, however, there is no sign of a breakthrough.
• Because their area of use is always very small, domain-specific languages are unable
to produce any great increase in productivity.
• Object orientation will form the basis of the next quantum leap in hardware design.
This is not just because all other approaches have hitherto proved unpromising in
terms of increased productivity, but also because object orientation has made a
decisive contribution to increasing productivity over a wide area in software
development. In addition, the concepts of object orientation have their origin in the
long-established world of modeling and simulation2 and not in any abstruse
reductionist philosophy intended to describe the cosmos with the aid of its special
thought structure. Modelers and simulators themselves know how important it is to
be able to communicate their model. (Compare what is said at the end of Section 1.2
under the heading 'Design patterns'.)
What has to be done, then, to introduce object orientation into the hardware design
process?
1 Without jumping the gun too much, we should mention here that this, together with object
orientation, is what we shall later predict as being the future for hardware design.
Object Orientation: Modeling and Design Paradigms for the Year 2000? 9
• Reuse techniques already exist in modern hardware design [69, 70], but they are
concentrated on the synthesis process and, because of the lack of voice or tool
support, are still open to considerable improvement. Providing reuse for prototypes
(see below) and incorporating reuse into the complete object-oriented design process
still represent considerable tasks.
• In hardware design, design patterns have been completely disregarded, and they
represent another range of tasks for the future.
What can and will be the decisive forces in the next quantum leap under the name of
object orientation?
First of all, of course, the universities, which are in demand as the research
establishments where the theoretical basis and approaches for object orientation are
worked out. Further, it is clear that both simulators for object-oriented languages and (as
in the case of software design) software tools are required for object-oriented design,
with the tool manufacturers being the providers of the "enabling technology" I. The
drawing up of the design methods, however, can only be undertaken by the design
center and the R&D departments of the individual development firms, even though the
major CAD manufacturers are making greater and greater inroads into the support and
methodology markets. The reasons for this are:
• An important point in object orientation is the design domain, on which the product
range of individual firms undoubtedly has a great influence.
• Object orientation is strongly dominated by the design process and less so by design
tools. For this reason, the individual developer, his environment, and even a
"corporate identity" playa much greater role than hitherto.
• When a firm abandons its own design process, outsiders are able to obtain a much
better insight into its products. Confidentiality, features distinguishing it from
competitors, and the use of its own approaches within the design process are
therefore virtually impossible, in spite of non-disclosure agreements. Moreover
2 It should be said that this also includes hardware, but is generally applicable.
I It should again be pointed out that improved synthesis tools are not a basic prerequisite for object
orientation.
10 CHAPTER 1
REFERENCES
[1] Electronic Engineering Times, Issue 737,1993, Compexity ofIntel Processors
[2] Horbst, E.; Nett, M.; SchwartzeI, H.: VENUS - Entwurf von VLSI-
Schaltungen. Berlin Springer, 1986.
[3] F.Fink, C.Wieser MOTOROLA Deutschland, Festvortrag zum 60. Geburtstag
von Professor Antreich an der TU Miinchen, 1994.
[4] Aho, A.; Sethi, R.; Ullmann, 1.: Compilers - Principles, Techniques and Tools.
Reading Massachusetts: Addison-Wesley Publishing Company, 1986.
[5] Baumann, R.: ALGOL-Manual der ALCOR-Gruppe. Einftihrung in die
algorithmische Formelsprache ALGOL. Oldenbourg 1968.
[6] Kernighan, B.; Ritchie, D.: The C Programming Language, Englewood Cliffs,
New Jersey: Prentice Hall, 1989.
[7] McCracken, D.D.: Cobol. Anleitung zur strukturierten Programmierung.
Oldenbourg 1979.
[8] Loveman, D.: "High Performance Fortran", IEEE Parallel and Distributed
Technology, Vol. 1, 1993, pp 25-42.
[9] Jensen, K.; Wirth, N.: Pascal User Manual and Report, New York: Springer
Verlag, 1985.
[10] Symposium on Principles & Practices of Parallel Programming (PPOPP).
Tagungsband jiihrlich bei ACM Sigplan Notices, ACM Press
[11] May, D.: Occam2 -Language Definition, 1987
[12] Barnes, J.: Programming in Ada plus Language Reference Manual, Workham,
England: Addison-Wesley Publishing Company, 1991.
[13] Simon L. Peyton Jones: The Implementation of Functional Programming
Languages, Prentice-Hall, 1987
Object Orientation: Modeling and Design Paradigms for the Year 2000? 11
[73] Jacobson, 1.; Christerson, Mo; Jonsson, Po; Overgaard, Go: Object-Oriented
Software Engineering: A Use Case Driven Approach. Addison-Wesley,
Reading, Massachusetts, 19920
2
OBJECT-ORIENTED
MODELING OF HARDWARE
FOR EMBEDDED SYSTEMS
Sanjaya Kumar*, James H. Aylor**,
Barry W. Johnson**, Wm. A. Wulf***
* Honeywell Technology Center
** University of Virginia, Department ofElectrical Engineering
*** University of Virginia, Department ofComputer Science
ABSTRACT
In this chapter, the application of object-oriented techniques to the modeling and design
of hardware for embedded systems is presented. The use of these techniques is an
example of cross fertilization from the software domain to the hardware domain. This
work brings together several ideas common to both hardware and software, such as
state, information hiding, specialization, reuse, families of components, and virtual
machines. The potential advantages of object-oriented techniques when applied to
hardware design are discussed and illustrated on several examples using C++, which
supports user-defined data types and inheritance. It is shown that data decomposition, a
decomposition technique based on abstract data types, can be applied recursively to
hardware components, supporting complexity management and refinement. A
representation that captures this decomposition technique, referred to as the
decomposition graph, is also presented.
15
16 CHAPTER 2
2.1. INTRODUCTION
In this chapter, cross fertilization (also known as technology transfer [1]) refers to the
application of software engineering concepts and principles to hardware engineering, or
vice-versa. An example of cross-fertilization is the use of software engineering concepts
in high-level, hardware synthesis systems [2]. In the process of synthesis, compiler
optimizations and techniques are employed, such as dead code elimination, loop
unrolling, and register allocation using lifetime analysis. Efforts in cross-fertilization also
address the differences between the software and hardware design processes. A related
area is hardware/software codesign [3], which attempts to integrate these currently
separate domains.
The application of object-oriented techniques to hardware design is an example of cross
fertilization from software engineering to hardware engineering. There are several
motivations for exploring these techniques. With the advent of hardware description
languages and the increased use of simulation and modeling in hardware design, it makes
sense to look at programming techniques that can improve the modeling process. In
many circumstances, individuals that model hardware take on the role of software
programmers. Object-oriented techniques can also aid in the management of hardware
complexity. Hardware complexity management and change management issues are
becoming increasingly important [1].
Although object-oriented techniques may seem foreign to hardware designers, many of
the underlying concepts and principles are familiar. In particular, it is natural to think of
hardware resources as components which consist of state and a collection of associated
operations that can manipulate this state. In addition, the construction of systems using
reusable library components, a highly touted advantage of object-oriented techniques,
manifests itself in the hardware domain as design using off-the-shelf building blocks
[4][ 5]. The use of hardware building blocks allows systems to be constructed quickly,
lowers overall design cost, and increases reliability.
The potential advantages of object-oriented techniques when applied to hardware design
include:
• improved modifiability and maintainability of models;
• easy component instantiation with different parameters;
• tailoring of general purpose components to more specialized components;
• quick composition of new components;
• the ability to identify and reuse common components;
• and the possibility of employing existing software synthesis and verification
techniques.
Data abstractions, which form the basis for object-oriented techniques, also provide a
uniform way of representing both hardware and software [3]. A unified representation
for hardware and software allows techniques from one domain to be applied to the other
domain. For example, existing software techniques, such as those used to verify the
correctness of abstract data type implementations, can be utilized for hardware.
Object-Oriented Modeling ofHardware for Embedded Systems 17
The examples presented in this chapter are written in C++ [6], which supports user-
defined data types and inheritance. The reason for utilizing C++ is to demonstrate the
benefits of object-oriented techniques, not to provide arguments for or against the use of
the language for hardware modeling. Section 2.2 provides an overview of data types. In
Section 2.3, the class concept is used to model hardware, and in Section 2.4, inheritance
is utilized to derive specialized components. Section 2.5 describes a refinement
technique called data decomposition. Several examples are presented to illustrate this
decomposition technique in Section 2.6. Type genericity is the subject of Section 2.7. In
Section 2.8, some related work is presented. A summary of the chapter is provided in
Section 2.9.
elements do not possess state, the concept of a class can still be used to capture the
common properties of these devices. Thus, an arithmetic logic unit (ALU) class may
define the operations add, subtract, logical AND, and shift. At a higher level of
abstraction, a processor contains state, consisting of the values of the program counter
and other internal registers, which is manipulated by its supported instructions. These
three hardware classes are shown in Figure 1.
read~
write~
Register
a
Arithmetic Logic Unit
sub d d .
land
shift
mUI.
div
load
store
Processor
main ()
(
reg ccr(3); II create a 3-bit CCR
reg mar ( 16) ; II create a 16-bit MAR
reg mdr (16) ; II create a 16-bit MDR
delays, area, and power consumption. If necessary, this information could be extracted
using additional member functions, such as read_delayO, write_delayO, areaO, and
powerO. Note that a kind of software abstraction, namely data abstraction, has been
used to describe a hardware abstraction at the register-transfer level. It is also possible
to use data abstraction to describe hardware at other levels of detail, such as the logic
level.
Register Processor
add
read sub
write load
add.
store
sub
wnte
~rite load
incr
IOcr decr ~o::
Transformation
Function(s)
invocations
.. toADT
.. A
L
G
invocations o
~
toADT
... R
I Implementation
T
H
invocations M
.. toADT
... S
(Concrete
Representation)
pair (ni,nj), where ni "consists of' nj. In Figure 6, the high level ADT consists of the
three primitive ADTs shown. As in a DG representation of a functional decomposition,
the algorithm associated with a data decomposition is implicit within the representation.
DG = (N, E) (1)
A B
• Primitive ADT
not require change. Thus, this approach allows reusable components to be identified and
supports change.
changes. As the design of the ALU progresses, common components can be identified
as reusable entities.
add
sub
land
lor
Inot
Arithmetic Logic Unit Irs
lis
ars
ric
rrc
~
Arithmetic Logic Unit
D
classes~ Transformation
Classes \ Transformation
@:;r: ....
Function
OR gates
ANDgates@ . . . .
num_bits = size_alu;
alu_array = new onebit_alu[size_alu]; II array of l-bit ALUs
}
BitString ADD_OP(BitString left, BitString opl, BitString right,\
BitString op2, BitString cin, BitString alu_oper)
tmp_result += tmp;
carry_in = alu_array[i] .eval_alucout(xlinput, xinput, \
xrinput, yinput, carry_in, alu_oper);11 use l-bit ALU
xrinput = xinput;
}
II some code here (not shown)
return(result);
}
II other operations supported by ALU defined similarly
xl x y xr
result
result = atoBitString(UO");
carry_out = atoBitString(UOU);
The operational specification for one of the elements of the one-bit ALU, a one-bit full
adder, is shown in Figure 12. One formal method for specifying modules consists of
using pre- and post-conditions [17]. Pre-conditions are logical assertions on the input
state, and post-conditions are logical assertions on the output state. Thus, pre- and
post-conditions reflect what is assumed to be true upon entry and exit from a module,
respectively. Using pre- and post-conditions, the operations performed on the one-bit
adder, evalsumO and evalcoutO, can be specified as shown below.
I-Bit Adder
eValsum~
evalcout~
X -----r---4rl
y ---,--1---+-1 sum
cout
cin------------------~
class gate is used to derive the classes AND gate, OR gate, XOR gate, and inverter. In
the same way, a register class is used to derive a program counter class, a stack pointer
class, and an instruction register class.
Gate Register
/I~
AND OR XOR Inverter
/+~
Program
Stack Instruction
Counter Pointer Register
Memory Array
/~
MemoryRegister File
2.6.3. Discussion
Some points are worth mentioning about a model developed using data decomposition.
The resulting model resembles a data path/control decomposition. When a processor is
instantiated, the components constitute the elements of the data path, and the
transformation function represents the control, that is, the sequencing of the operations
to be performed. Each machine instruction is implemented as a collection of invocations
to the components required for execution. As an illustration, in order to fetch and
execute a subtract instruction, operations are performed on the memory address register,
the memory data register, the register file, the arithmetic logic unit, the condition code
register, and the program counter. Thus, the transformation function represents the
register transfers to be initiated by a microcoded or a hardwired control unit.
Data decomposition illustrates a fundamental idea within the context of virtual
machines. Specifically, a virtual machine at level N is implemented in terms of a program
running on a machine at level N-J [19]. For instance, the ISA level model of the
processor can be considered a virtual machine which is implemented as a microprogram
32 CHAPTER 2
main( )
{
stack<int> stkl(10); II stack of 10 integers
stack<float> stk2(15); II stack of 15 floats
Ledbetter and Cox [36] discuss the notion of software-ICs (integrated circuits). They
describe the need to incorporate ideas associated with hardware reusability into
software. Some of these ideas include developing appropriately "packaged"
components that provide well defined services and hide the internal operation of an IC.
The concept of IC foundries, which produce standard and custom ICs, is also
promoted.
This work is different from previous object-oriented hardware modeling efforts in
several respects. Through its emphasis on cross fertilization from the software
engineering domain to the hardware engineering domain, the work brings together several
common hardware and software ideas such as state, complexity management,
information hiding, specialization, reuse, families of components, and virtual machines.
The decomposition graph captures many of these common ideas. Also, the use of data
decomposition as a refinement and complexity management technique for hardware
design and its relationship to virtual machines are unique aspects of this work.
2.9. CONCLUSIONS
This chapter has presented and illustrated several potential advantages of employing
object-oriented techniques in hardware modeling and design. Some of these advantages
include complexity management, specialization, and model reuse. Data decomposition,
the decomposition of abstract data types into more primitive abstract data types,
supports the identification of common, reusable hardware components and change
management.
Several insights have been gained as a result of modeling hardware components through
data abstraction. By modeling hardware components as abstract data types and
employing data decomposition as a refinement technique, the conceptual model of
virtual machines is readily exposed. In such a model, abstract data types can be
considered virtual machines whose operations correspond to a virtual instruction set.
Therefore, in the same manner that a functional decomposition defines a virtual machine
with a virtual instruction set, a data decomposition does so as well. Also, type
genericity in hardware modeling and design supports Parnas's concept of program
families.
Some aspects of hardware design have not been discussed. For example, given a
specification of a hardware component described as an abstract data type, it may be
possible to use software synthesis techniques [37][38] as a means of generating an
implementation. Also, the aspect of concurrency, which is fundamental in hardware
modeling, is addressed elsewhere [30][33].
Further work is required in the areas of applying data abstraction to hardware modeling,
particularly at the system level. Specifically, as the complexity of systems increases, it
may be desirable to provide more abstract descriptions of processors. For example,
these processors may only provide the operations send and receive, for communication
with other processors, and execute, which would be utilized to perform either "virtual"
instructions or specific machine instructions. Given such descriptions, two problems
that need to be addressed are the refinement of the abstract description (system level) to
Object-Oriented Modeling ofHardware for Embedded Systems 35
a more detailed one (instruction set level) and the ability to mix these descriptions
within a single model (see [3]). Because data abstraction can be used as a basis for a
unified representation for both hardware and software, another area for further
investigation is hardware/software codesign.
Acknowledgments
This work was performed while the first author was at the University of Virginia. The
authors would like to acknowledge the partial support provided by the Semiconductor
Research Corporation under contract number 93-DJ-152 and the National Science
Foundation under grant number CDA-8922545.
We would like to thank Sanjay Srinivasan, Gnanasekaran Swaminathan, Richard
MacDonald, and Lori Kaufman for their comments and suggestions. Thanks also to
Ronald Williams, Ronald Waxman, Robert Klenke, and Joanne Dugan for their support
of this effort. Thanks is extended to John Knight for discussions regarding object-
oriented concepts. We would like to thank the reviewers as well for their critique of the
manuscript and helpful suggestions.
REFERENCES
[1] Smith, C. u., R. R. Gross, "Technology Transfer between VLSI Design and
Software Engineering: CAD Tools and Design Methodologies," Proceedings of
the IEEE, Vol. 74, No.6, June 1986, pp. 875-885.
[2] McFarland, M. C., A. C. Parker, R. Camposano, "The High-level Synthesis of
Digital Systems," Proceedings ofthe IEEE, Vol. 78, No.2, 1990, pp. 301-318.
[3] Kumar, S., J. H. Aylor, B. W. Johnson, W. A. Wulf, The Codesign of
Embedded Systems: A Unified Hardware/Software Representation, Kluwer
Academic Publishers, Dordrecht, The Netherlands, 1996.
[4] Tobias, J. R., "LSINLSI Building Blocks," IEEE Computer, August 1981, pp.
83-101.
[5] Peels, A. J. H. M., "Designing Digital Systems - SSI and MSI vs. LSI and
VLSI," IEEE Micro, April 1987, pp. 66-80.
[6] Stroustrup, B., The C++ Programming Language, 2nd Edition, Addison-
Wesley Publishing Company, Reading, Massachusetts, 1991.
[7] Wulf, W., M. Shaw, P. N. Hilfinger, L. Flon, Fundamental Structures of
Computer Science, Addison-Wesley Publishing Company, Reading,
Massachusetts, 1981.
[8] Liskov, B., 1. Guttag, Abstraction and Specification in Program Development,
MIT Press, Cambridge, Massachusetts, 1986.
[9] Kumar, S., J. H. Aylor, B. W. Johnson, W. A. Wulf, "Object-Oriented
Techniques in Hardware Design," IEEE Computer, Vol. 27, No.6, June 1994,
pp.64-70.
36 CHAPTER 2
[26] Langdon, Jr., G. G., Computer Design, Computeach Press Inc., San Jose, Ca.,
1982.
[27] Miiller, W., F. Rammig, "ODICE: Object-Oriented Hardware Description in
CAD Environment," Proceedings of the Ninth International Symposium on
Computer Hardware Description Languages and their Applications, J. A.
Darringer and F. J. Rammig, eds., Elsevier Science Publishers B. V. (North-
Holland), IFIP, 1990, pp. 19-34.
[28] Chung, M. J., S. Kim, "An Object-Oriented VHDL Design Environment,"
27th ACMlIEEE Design Automation Conference, 1990, pp. 431-436.
[29] Nelson, M. L., K. A. Fontes, A. Zaky, "An Object-Oriented Approach to
Computer Architecture Simulation," Proceedings of the 25th Annual Hawaii
International Conference on System Sciences (HICSS-25), Vol. 1: Architecture
and Emerging Technologies, January 7-10,1992, Kauai, Hawaii, pp. 476-485.
[30] Covnot, B. M., D. W. Hurst, S. Swamy, "OO-VHDL: An Object-Oriented
VHDL," Proceedings of the fall 1994 VHDL International User's Forum.
(VIUF'94), Tyson's Comer, Virginia, 1994.
[31] Newton, D. E., P. W. Vaughn, R. P. Johns, "PRISM: An Object-Oriented
System Modeling Environment with an Embedded Symbolic Spreadsheet,"
Proceedings of the 1991 (23rd) Summer Computer Simulation Conference,
July 22-24, 1991, Baltimore, Maryland, pp 81-86.
[32] Scientific Engineering Software, Inc., SES/Workbench User's Guide, Austin,
Texas, April 1989.
[33] Yokote, Y., M. Tokoro, "Concurreni Programming in Concurrent Smalltalk,"
in Object-Oriented Concurrent Programming, A. Yonezawa and M. Tokoro,
eds., MIT Press, Cambridge, Massachusetts, 1987.
[34] Wolf, W., "Object-Oriented Programming for CAD," IEEE Design and Test of
Computers, March 1991, pp. 35-42.
[35] Gupta, R., W. H. Cheng, R. Gupta, I. Hardonag, M. A. Breuer, "An Object-
Oriented VLSI CAD Framework," IEEE Computer, Volume 22, May 1989,
pp. 28-37.
[36] Ledbetter, L., B. Cox, "Software-ICs," BYTE, June 1985, pp. 307-316.
[37] Setliff, D., E. Kant, T.Cain, "Practical Software Synthesis," IEEE Software,
May 1993, pp. 6-10.
[38] Jalote, P., "Synthesizing Implementations of Abstract Data Types from
Axiomatic Specifications," Software-Practice and Experience, Vol. 17, No. 11,
November 1987, pp. 847-858.
3
OBJECT-ORIENTED AND
REAL-TIME TECHNIQUES:
COMBINED USE OF OMT,
SDL AND MSC
Philippe Leblanc
VERILOG, 150 rue N. Vauquelin, BP 1310 F-31J06 Toulouse Cedex, France
ABSTRACT
Starting from the assessment that general-purpose, object-oriented techniques 'Such as
OMT address specific real-time issues only partially, this chapter presents the OORT
(Object-Oriented Real-time Techniques) method which has been defined especially for
real-time system. engineering. This method combines OMT with two formal description
techniques, SDL and MSC, which are widespread in the telecom area. OMT is usedfor
capturing user requirements andfor designing data, whereas SDL is used to design the
system and formally define its behavior. MSCs playa central role in this approach: at
the analysis stage, they support the use case modeling, and at the development stage they
are used to produce the test sequences for testing and validating the system design and
the actual implementation.
OORT also proposes a complete engineering process which covers all the phases of a
development project, from system requirements to delivery. The OORT process is based
on the iterative process model in order to take advantage of all the expected benefits of
using object-oriented andformal description techniques such as rapid prototyping, early
verification and validation, immediate reuse, code generation and test generation
automation.
39
40 CHAPTER 3
3.1. INTRODUCTION
For example, a Unix process is a concurrent object, whereas a C++ class is a passive
object.
Test design can be a time-consuming activity, especially when dealing with safety-
critical or mission-critical systems. The efforts spent designing tests can be equivalent
to those related to the analysis and design phases. As a consequence, the notations
selected for OORT provide a significant help in the testing activities such as automating
test generation, for example.
3.2.6. 1m plementation
The implementation of real-time systems (e.g. embedded systems) greatly depends on
the physical architecture of the environment in which the system is immersed. In
particular, concurrent objects must be designed to operate flawlessly, with both the
distributed architecture of the target and the underlying real-time operating system.
Passive objects are less target-dependent, and the programming language chosen merely
affects the implementation phase.
Object-Oriented and Real-Time Techniques: Combined Use ofOMT, SDL and MSC 43
Using formal methods throughout the process greatly improves the implementation
activity, formal descriptions being automatically translated into fully executable code.
3.2.7. Testing
Testing consists in executing the developed software following test sequences defined in
the analysis and design phases, first on the development site, then on the target
equipment. People in charge of testing must verify that the application passes the unit
and integration checks and that it meets the requirements expressed by the user. For
these purposes, testing activity uses the results of the test design phase as inputs, as
well as the dynamic modeling produced at requirement analysis time.
This activity can be partly automated, depending on the notations selected during
analysis and design. For example, producing test suites in a language such as TTCN in
combination with a design notation automates testing and result analysis.
Person I
I
name: stnng
address: string
/\
I Coshler I
emplOyeeNO: SIring
I.
1+ employer
I Customer I
name: stnng
Bank
Clientele .I~(account : Accounl,amounl : inleger)
1 + withdraw(accooot: Account,amount : integer)
I
bankNo : string
createAccount(cuslomer : Customer) : Account
closeAccount{account : Account)
•
createCard(customer : Customer)
deleleCard(card: c.sheard) 1+
Account
I I
I
CashCard
accountNo : integer
1+ creditLimit: integer
balance: integer accessedAccount
bankNo : string
cardNo: string I
{balance> creditUmil}
I Customer I I ATM
I lConsortiumJ
cardlnserted(card) ....
r
!J enterPassword
passwordEntered(7628)
r authorizeCard(card,7628)
IYI/lonzeeardResult(card,762s: )
selectOperation r'
,
.I
7256
1
[ cardln.8Itod] [~wafJo~a1]
spitCardOul
CardReadef
ButhOrizeCBrd
authorizeWilhdrawal
ackWithdrawal [CBShT'ken]
getBalanC6
[dispenseCash]
1
LogBook. report X25Unk CashBox [u ••reard]
userlnput
Central
[uthor~.cardR.sun
authorizeWithdrawalResult
Manager
[diSPlay]
CashPoint
Customer
getBalanceResutt Screen
dumpLogBook
cleanLogBook
Ke"" rd
[userlnp:] ~enabIeK.yboard]
inhibit Keyboard
( TRUE ) ( FALSE
~
(
mour:
TRUE )(
}
Behavioral design
SDL process diagrams
identified during the architectural design phase are detailed by means of design class
diagrams. New classes are added to solve implementation issues.
The implementation and testing activities are greatly automated by exploiting the
models and descriptions produced in previous phases.
Figure 8 presents the general positioning of OMT, MSC and SDL within the generic
OORT engineering process.
3.4.3. Architectural Design with SDL and Test Design with MSC
3.4.3.1. Refinement of the System Architecture with SDL
The initial architecture built with the analysis concurrent classes is refined according to
rules such as: consideration of existing operational architectures, constraints due to
interfacing the system with external hardware or software elements, making modular,
making reusable, etc. The refinement is achieved when all the identified terminal
elements can be described by means of independent finite state machines. This implies
having a clear interface with its environment for each terminal element and no
dependency between terminal objects except through message exchange (e.g. there are no
common variables or states which are interrelated).
3.4.3.2. Description of the Communication with SDL
The communication is described by means of interconnection diagrams. At the first
levels, it comes from the analysis MSCs. Nevertheless, there is not necessarily a total
equivalence between MSC messages and SDL messages (called signals in the SDL
recommendation). Some messages seen in analysis MSCs can be implemented in the
SDL architecture in the form of ADTs, or even in the form of a more or less complex
protocol designed by a set of SDL blocks with its associated set of internal messages.
During the refinement process, new internal messages are introduced; they have no more
correspondence with the messages seen in analysis.
3.4.3.3. Description of Test Sequences with MSC
While building the system architecture, it is recommended to refine in parallel the
analysis MSCs. Design MSCs specify at each intermediate level the interactions
expected between the internal objects composing the system at this level. The upper-
level MSCs form the "contract" which must be respected by the lower level in the SDL
hierarchy. Thus, when the refinement process is achieved, the designer possesses a
complete set of test sequences describing the expected behavior at the terminal level.
3.4.3.4. Transition to Detailed Design
In the final architecture, all the concurrent objects are identified, as well as some passive
objects, those ones corresponding to data exchanged through messages.
,
r:tJ ~~ t3 00 ~
e
""(It)
C/C++ Application Application
~ Testing
The structure of the code generated is detailed in Figure 10. The generated application is
based on the SDL run-time library. Optional user-provided code can also be integrated
as tasks that are external to the generated application. It can use the SDL RTL, the
RTOS or the hardware directly, this code being dynamically integrated at run-time. In a
distributed configuration, inter-node communication can be based on the TCP/IP
protocol.
TCP/IP
Hardware
Testing is over when all the software pieces have been integrated and tested. The
resulting application must then pass the acceptance tests to be agreed by the system
customer. Generally speaking, acceptance tests do not take the system architecture into
account. They are focused on the functions provided by the actual application and on
the quality and performance of the system (i.e. robustness, efficiency, safety, security,
etc.). Acceptance tests rest mainly on the use case modeling elaborated in the
requirements analysis phase.
The role of OORT in testing activity is restricted to transforming into executable tests
(concrete tests) the tests defined in parallel to application design (abstract tests). OORT
can also be helpful for the analysis of test results. Basically, test results are analyzed to
appraise the actual quality of the implemented system. In OORT, such analyses can be
carried out at design level (i.e. assessments are applied to the SDL and OMT
descriptions). To sum up, OORT will assist in the testing process in two different
ways: first by helping to generate concrete tests from abstract tests, and second by
helping to analyze test results.
3.6. CONCLUSIONS
OORT is a method consistently combining notations most suited for real-time
development. Rather than inventing new notations, OORT is based on industry-proven
standards in order to provide the analyst and designer with a complete solution covering
the development process, from requirements to implementation. This method also
provides a strong traceability throughout the development process thanks to a set of
consistency rules governing the transitions from phase to phase. In addition to this, all
54 CHAPTER 3
the included notations make reuse easier as they integrate 00 concepts such as
encapsulation, inheritance and genericity.
The coding activity is also greatly automated thanks to the formal basis of SDL. The
generated code is portable thanks to the SDL run-time library. A last benefit is early
validation of software architecture which can be carried out through SDL simulation.
Acknowledgements
The results presented in this chapter are partially based on work carried out in the
RACE II Project, ref. 2017, Service Creation in an Object-oriented Reuse Environment
(SCORE), and in the ESPRIT III Project, ref. 8641, INtegrated methods for evolving
SYstem DEsign (INSYDE). I would also like to thank Vincent Encontre, who was the
leader of this initiative, as well as all the ObjectGEODE team members for their efforts
to offer an industrial support to this methodology and Christophe Joubel for his
valuable remarks.
REFERENCES
The reference books of the methods OMT, Booch, Jacobson, Shlaer-Mellor and
ROOM are respectively: [Rum91], [Boo93], [Jac92], [ShI88]-[ShI92] et [SeI94]. An
introduction to OMT is available in [Rum95a], [Rum95b] and [Rum95c]. Regarding the
MSC and SDL formalisms, [MSC92] and [SDL92a] form the reference documentation,
whereas [SDL92b] and [0Is94] describe the practical use ofSDL and MSC for software
engineering. [Leb93] and [MiI95] are first investigations about the combined use of
OMT, SDL and MSC, and [Leb95] presents a case study. We will find also in [Cho95]
real-time extensions proposed for OMT.
As far as co-design is concerned, [INS96] and [Ben95] present particularly interesting
results in relation to OMT and SDL.
[Ben95] Ben Ismail T., Jerraya A. A., Synthesis Steps and Design Models for
Codesign, IEEE Computers, Feb. 1995.
[Boo93] Booch G., Object-Oriented Analysis and Design with Applications, Addison-
Wesley, 1993.
[Cho95] Chonocles M., Gillian C., Real-time object-oriented system design using the
object modeling technique (OMT), JOOP, Vol. 8 No.3, Jun. 1995, pp.
16-24.
[INS96] INSYDE Project, Methodology, P86411HUB/INF/DS/P/D1.31b2, ESPRIT
III publication, Jan. 1996.
[Jac92] Jacobson 1., Christerson M., Jonsson P., Overgaard G., Object-Oriented
Software Engineering - A Use Case Driven Approach, ACM Press,
Addison-Wesley, 1992.
Object-Oriented and Real-Time Techniques: Combined Use ofOMT, SDL and MSC 55
ABSTRACT
The development of systems that integrate hardware and software components, using
Object Modelling and formal description languages is the aim of the INSYDE
methodology and toolsl. This chapter introduces INSYDE and shows how this
framework offers the designer an intuitive approach to system analysis and design as
well as a direct path to high-level validation and links to implementation. This is
achieved through the combination of the software-industry-standard OMT method with
the SDL language for software and VHDL for hardware, in conjunction with a system
co-simulation platform.
I This work has been partially supported by the INSYDE (ESPRIT 8461) project and a grand from
Intracom S.A. to University ofPatras.
57
58 CHAPTER 4
4.1. INTRODUCTION
As the complexity of electronic systems has been rapidly increasing, it has become
more and more difficult to efficiently treat the hardware and software parts of an
application as separate entities. Moreover, the demand for short time to market calls for
improved reusability of components [13] and for first-time correct methodologies. This
has resulted in the requirement for advanced and integrated design methodologies, which
can handle the development of large complex systems from specification to end
implementation and are widely known by the term "Hardware/Software Codesign"
[1,2,3,4,5,6 etc.].
In the domain of Software Engineering, the increase of complexity has been successfully
handled by the introduction of a new modelling paradigm that replaced/enhanced older
methods like functional decomposition and structured analysis [7]: the Object Paradigm.
Several researchers have proposed the application of Object Oriented principles to
hardware development [14, 15, 16] expecting to get significant benefits like better
control of complexity, increased reusability and improved design-data management.
Recently, the value of an object oriented system specification notation for driving
hardware/software codesign has been realised and efforts are made towards this
direction [17, 2].
The development of a framework for hardware/software Codesign, has been the target
of INSYDE [9, 18]. INSYDE was a project funded by the European ESPRIT
framework. It involved companies from the tools domain (VERILOG), users of the
produced Codesign technology (ALCATEL, INTRACOM) and universities (Humbold
University of Berlin, Free University of Brussels, Dublin City University) that
supported the methodology. The project terminated successfully in March 1996 with a
one-day workshop. The results of this project are presented in this chapter.
The main points proposed by INSYDE can be summarised in the following:
• Introduction ofOMT*, a variant of the well-known OMT method [11] for system
analysis, which aspires to become a successful Object Oriented system specification
notation for Codesign.
• Use of OMT* as input to SDL and VHDL translators, providing the INSYDE
framework with a viable path to implementation; a weak point in other high-level
system development frameworks.
• Cosimulation of hardware and software before and after translation to SDLNHDL.
The ability to simulate an OMT* model and verify the system after it is has been
partitioned gives the designer confidence and eliminates major redesign loops.
INSYDE has not proposed automatic partitioning in SW and HW. Instead, it leaves this
part open for the designer to use hislher experience, or for a future tool [12] to be
embedded in the framework.
Two systems that validated INSYDE's applicability during the development of the
framework are a Video on Demand server and a chip-set for image reconstruction. The
diversity of the domains shows the wide area covered by the methodology.
Integrated System Design with an Object-Oriented Methodology 59
The chapter is organised in eight sections. Section 4.2 outlines the INSYDE
methodology and is followed by three sections that describe the three steps of INSYDE
development: Analysis, design and code Generation. The tool-set that supports the
methodology with editing and simulation tools is presented in Section 4.6. Section 4.7
presents two applications that have been used as benchmarks for the framework, and
the chapter concludes with Section 4.8.
The rest of the INSYDE methodology is more-or-Iess automated. Software objects are
described in SDL while VHDL code is generated for hardware entities. The detail of the
produced code depends on the degree of refinement of the OMT* system model.
INSYDE allows for modifications and enhancement of SDLNHDL descriptions in a so-
called "detailed design" phase, but extra care has to be taken to prevent those changes
from creating inconsistency with the previous models; INSYDE tools do not
automatically trace design consistency at this point. INSYDE stops at the point where
SDL and VHDL are co-simulated. Further development of software is possible through
C or C++ generation from SDL. On the hardware path two options exist: either use
some behavioural synthesis tool or re-generate VHDL using a different set of translation
rules that produce synthesizable descriptions.
• Data-flow diagrams are not a part of OMT*. They are allowed as "NOTES" that
clarify the model. Data-flow connections are represented on the class diagram by
attribute naming (an attribute can be IN or OUT, writing or reading to another
attribute with the same name in another class).
• Data types, events etc. have to be declared on the class representation.
correct description (what the user will more probably say when the end system was
not exactly as he wanted it to be is: "you should have corrected me if I was wrong").
• Use Cases: This is a method for experimenting with the initial problem statement.
Use cases are generalised scenarios, which help us identity what the system should
be and how it should respond to external events. There are some notations for
expressing use cases in software engineering. INSYDE judged that it should not
select one of them but rather allow the designer to apply any technique (including
simple informal text).
• Identification of Objects and Classes: The analysis produces its first results as the
various objects that compose the system are identified. In [11] Rumbaugh proposes
some guidelines for finding classes in the problem statement, but it is more likely
that after hislher first few modelling efforts the designer will know better how to do
this.
• Modelling: Usually modelling refers to a formal procedure where the system is
described and simulated. But this is modelling of precise specification. When we
need to model abstract requirements, it is more important to present the results of
analysis in a manner that is as clear and as implementation-independent as possible.
The OMT notation is used by INSYDE to describe these models.
We have already talked about OMT in the previous section; a complete description of
the technique can be found in [11]. The following figure shows the basic elements of the
notation used in class diagrams.
S·
associatio
Atrtributes Atrtributes
l .4
Operations Operations
---'~" .. ~.'
/\ ii.....,-""·~Ii
(Multiplicity) :
I(inheritance) L_rc~~. _j . ( Instantiation)
2-4,8 (aggregation
Class Name
Instance
Atrtributes
( Class Name)
Operations Attribute Values
There are some requirements that are not possible to be captured in OMT since it was
originally intended to be used for software systems. Such requirements, like speed or
cost, and others like "reuse this component because we already have it" or "we need
this part to be difficult to copy for our competitors", have not been ignored by
INSYDE. A special notes scheme has been developed, that adds in every class and in
every action three optional notes fields: Speed, Cost and Misc. These notes are used in
the following design phase to guide partitioning and system architecture. They may
even be carried down to translation to instruct the generator tool to select a rule for
"high-speed" or "small size".
There are some features of the system that should not be included in the analysis model,
especially those that imply some specific implementation. For example, the designer
must be careful not to include:
• Controller classes. The controller is part of the solution, not the problem. If the user
thinks that a central controller is needed he could simply have missed (failed to
examine) the case of local control for each object. If a central control unit is really
required, this will become visible in the analysis model by a "strong" global dynamic
model.
• Decisions on whether a class will be instantiated in software or hardware.
• Communication protocols between objects. At the analysis phase, objects need only
to exchange data. The specific ways for this exchange are to be decided later.
System
connectedb
Class
Ports
Inheritance
State Diagram
In a complex system, some parts may be reused from previous designs to save design
and manufacturing cost. INSYDE supports reusability in both ways:
• From existing designs to a new one. In this case, existing models ofVHDL entities or
SDL blocks can be converted to OMT*. Although INSYDE has proposed ways to
achieve this reverse translation, no tool has yet been developed.
• Making objects in the design reusable. This is accomplished by the correct use of
inheritance. A class is reusable by itself since it encapsulates all the attributes and
operations that characterise it. However, abstraction allows us to re-use parts of a
design that are not exactly the same in the two models. A great improvement of
reusability will be achieved when multiple inheritance is added to OMT* (the
current definition supports only single inheritance mechanisms).
When the system model has reached the required level of refinement, it can be used to
generate the separate specifications for the software and the hardware parts. In the next
section, the generation of SDL and VHDL for the two parts is discussed.
I A combination of INSYOE with those approaches is a very interesting idea that should be further
explored: OMT and OMT* could be used for analysis and design, the complete system can be translated
to SOL (where behavioural simulation can take place even before partitioning) and the processes can be
internally described in VHOL (using a subset of the INSYOE translation rules) or C (using existing
translators) depending on their implementation target. Some incompatibility of semantics as well as
some tool integration problems have to be solved before experimenting with this alternative.
66 CHAPTER 4
block<id>;
substructrure
signal sdl-event-declaration(ev I ), ... ,sdl-event-declaration(evp);
block <gl> referenced;
block <id>-intem;
process <id>-process;
del <sdl-attribute(vl»;
<sdl-operation(0 I »
<sdl-state-diagram(sd,Attributes(c))>;
endprocess <id>-process;
endblock <id>-intem;
endsubstructure
end block <id>;
Software implementation after the SDL step, is supported by SDL to C and SDL to
C++ translators which are available as commercial tools. The SDL to C path is a mature
process, that can support features like interrupts (not readily supported by SDL), Real
Time Operating Systems (RTOS), code optimisation etc.
Integrated System Design with an Object-Oriented Methodology 67
The following example, is the translation rule that converts passive classes to VHDL
types.
Let c = (id, st, V, 0, sc, G, sd) be a passive class, such that:
1 Recently, discussions and research projects [25, 26, 27, 28, 29] on Object Oriented extensions to
VHDL have also proposed the addition of behaviour constructs, as well as means to describe the life-
cycle of a process or a component. Such an extended version of VHDL could include many of the
characteristics required by a system specification language for Hardware Software Codesign.
68 CHAPTER 4
END RECORD;
<vhdl-data-type-operation(0 1,c»;
Although SDL and VHDL are generated by automatic tools that follow specific sets of
rules, the produced OMT* specification cannot always be directly used for
implementation. For VHDL a common text editor can be used. SDL has a graphic
notation that can be alternatively used in place of (or together with) the textual
representation, therefore an SDL editor can significantly help, not only for modification
of the generated code but also for visualising the structure of the SDL model.
4.6.3. Cosimulation
The system can be validated in two phases.
• At the System Level
At system level, the C and C++ code generation capabilities of the OMT* editor are
used to create a model of the system. Specific G-templates must be written since the
produced code is not oriented towards implementation but towards simulation. The
user interface of the system level simulation is very simple; the development of a more
user-friendly validation is still required.
• After Translation
After the generation of the SDL and VHDL models, the two parts can be simulated
independently using the corresponding SDL and VHDL simulators. Co-simulation is
performed by linking the simulators through a special Coupling Module. The coupling
module is implemented on a "software bus" and can support various synchronisation
schemes [30]. The timing model of the cosimulation can be as simple as the "zero-time"
approach that assumes instant cause-effect relationships between hardware and
software, or as complicated as a clock-model approach for both parts where neither
hardware nor software is allowed to increment it's local clock until all events and data
that should be exchanged are received.
sides. The first system was a chip-set that will be used for a specific image processing
task; a system which is hardware-oriented characterized by functional complexity and
an underlying data-flow computational model. The second, is a server for Video-on-
demand applications; a software-intensive system with a behavioural (state-transition)
underlying model.
"""....
""" "'"
x.r:A.w...sr
Cftl.. l1~
Wrir,,~)
I.-Jy;.t}
4.8. CONCLUSION
The INSYDE framework is one of the first attempts to create a complete set of tools
and methodology for object oriented Hardware Software Codesign. It's major strengths
are:
• The OMT* notation, a high-level specification language for integrated systems that
is directly compatible with the industry-standard OMT technique.
• The system analysis phase, which is often overlooked by other codesign
approaches. An organised analysis step becomes crucial to the success of a project
as complexity of user requirements has increased.
• The usage of standard languages (VHDL and SDL) makes it easier to introduce
INSYDE in a development environment and minimises the risks of such an
integration.
• The INSYDE toolset is available now. Even if some tools are still prototypes, they
are completely functional and supported by a number of commercial tools.
Integrated System Design with an Object-Oriented Methodology 73
REFERENCES
[1] A. Sarkar, R. Waxman, 1. Cohoon, "Specification-Modelling Methodologiesfor
Reactive-System Design ", Current Issues in Electronic Modelling vol.3 (High-
Level System Modelling: Specification Languages), page 1-34, Kluwer
Academic Publishers 1995.
[2] J-P. Calvez, "A System Specification Model and Method", Current Issues in
Electronic Modelling vol.4 (High-Level System Modelling: Specification and
Design Methodologies), page 1-54, Kluwer Academic Publishers 1995.
[3] D. Gajski, F. Vahid, S. Narrayan, "A Design Methodology for System
Specification Refinement", Proc. EDAC 94, Paris, France, Febr. 1994
[4] T. Ismail, M. Abid, K. 0' Brien and A. Jerraya "An approach for Hardware-
Software Codesign ", IEEE Intern. Work. on Rapid System Prototyping,
Grenoble, France, pp.73-81, June 94.
[5] R. Ernst, J. Henkel and T. Benner, "Hardware-Software Cosynthesis for
Microcontrollers", IEEE Design and Test of Computers, pp.64-75, December
1993.
[6] R.Gupta , G.De Micheli, "Hardware-Software Cosynthesis for Digital
Systems", IEEE Design and Test of Computers, pp.29-41,
September 1993.
[7] E. Yourdon, "Modern Structured Analysis", Yourdon Press, 1989.
74 CHAPTER 4
ABSTRACT
This chapter presents an analogy between structural and object-oriented properties with
the intention of showing a migration path for the introduction of software methodology
object-orientation in the hardware design process.
77
78 CHAPTER 5
5.1. INTRODUCTION
The motivation for comparing structural VHDL description capabilities with object-
oriented properties is many-sided and influenced by a set of computer science domains.
Object-oriented analysis and design methods [Mey88, CoY090, ShMe90, Hod91,
RBPEL91, JCJ092] dominate current software design methodology. Their application
to hardware design is one possibility to improve the current hardware design and
specification process. Object-oriented description capabilities, however, are required for
all approaches. Additionally, new trends in software design as well as new reuse
approaches are using domain- specific architectures [Gab93] and patterns [GHJV94].
These are also based on object orientation. The study of architectures is an old-
fashioned but still very important hardware topic.
Modularity and composition of structural hardware design were often mentioned as a
model of object-oriented software design. Also, object orientation is primarily based on
communicating concurrent objects, which are closely related to interconnected
concurrent hardware units.
A dualism between objects and units which are required for the implementation of more
abstract objects is shown in [GKRM93]. Another object-oriented design strategy, a
very promising reuse approach as described in [PHSR95], is mainly based on structural
descriptions.
Several approaches for object-oriented extension of VHDL already have been made
[CoHS94,Dun94,Per92,ScNe95,ScNe95a,SWMC95,ZiMG92], and an object-oriented
extension study group is currently working towards object-oriented VHDL. Moreover,
object orientation as description paradigm of the year 2000 was postulated in
[EcMr96], based on the comparison of hardware and software design methodologies.
An approach for object-oriented hardware description using C++ like formulations was
described in [KAJW94]. A vice versa view, the analogy between structural and object-
oriented methods, would help also to introduce the software methodology object
orientation in the hardware design process.
5.2. OUTLINE
The chapter is organized as follows: first, structural capabilities of VHDL and object-
oriented description paradigms are enumerated. Afterwards a link between VHDL
structural statements and object-oriented programming paradigms is made. Due to the
fact that incremental design and implementation of inheritance need some overhead
when using structural descriptions only, an inheritance mechanism for entity,
architecture, and component declarations is shown next. A set of application examples
and an outlook on genericity conclude the final section.
Object Orientation and Structural Design 79
VHDL'93 also supports entity instantiation which relates to a chip directly connected
to a board. Moreover, VHDL allows for iterative as well as alternative structural
description styles by using generate statements.
The comparison with object orientation is restricted in this chapter to structural
description style where bit values or composite bit values are used mostly. The VHDL
concept of unconstrained arrays or the generic specification of vector bounds allows the
specification of vectors of bit in a very flexible way.
• Methods, which describe how elements of the object can be modified. They are
activated by so-called messages or invocation.
• Early or late binding, which describe the tasks associating operations to objects at
compile or execution time, respectively.
Alternative and iterative constructs are also part of most object-oriented languages.
They are not part of object-oriented features but they ease implementation of classes
by omitting overhead of object-orientation, which is not required in a lot of cases.
entity incN is
port ( x in bit_vector;
y : out bit_vector );
end incN;
The entity declarations shown above allow either direct access to the status of the
object by declaring the state in the interface (e.g.: q, y) or by allowing the activation of
methods via physical lines (elk, res, x).
Encapsulation is also ensured by the fact that no internal object and no implementation
detail is externally, i.e. outside the entity, visible.
A component is, from an object-oriented point of view, a declaration of a link or of a
container for a set of classes. The component concept of VHDL allows thus 'static'
polymorphism as the entity/architecture pair associated with a component need not be
known at analysis time.
Object Orientation and Structural Design 81
component storeN
port ( d in bit_vector;
q out bit_vector;
c in bit;
r in bit );
end component;
component processN
port ( i : in bit_vector;
o : out bit_vector );
end component;
The components storeN/processN may be associated with the entities (or classes
in our comparision) regN/incN. But either different architectures of these entities or
different entity-architecture pairs with the same or nearly the same interface (e.g.
latchN/shiftN, see subsequrent listing) may be plugged in instead.
entity latchN is
port ( d : in bit_vector;
q : out bit_vector;
c: in bit;
rs: in bit );
end latchN;
entity shiftN is
port ( x : in bit_vector;
y : out bit_vector );
end latchN;
A configuration is required in this case to associate shown design entities with the
component storageN/processN.
The instance of a component specifies in this sense a link to a set of classes and the
instance of an entity the derivation of methods.
Structural statements describe the behavior of a class. They derive state and methods of
instantiated (and bound) units and thus allow for modeling inheritance. Moreover,
instantiation of different components supports multiple inheritance.
entity pipeStage is
port ( pi: in bit_vector;
po : out bit_vector;
clock: in bit;
reset: in bit );
end pipeStage;
architecture structural of pipeStage is
signal int : bit_vector ( pi'range );
begin
P: processN port map ( pi, int );
S: storeN port map ( int, po, clock, reset);
end structural;
Here, the configuration Inerementer binds the unit regN to storeN and ineN to
proeessN. The behavior for storing and initialization (e.g. level, edge) of the unit
storeN is derived from regNo Similarly, the incremental behavior of proeessN is
derived from ineN.
Generic parameters facilitate among other things the specification of variant bit vector
widths. This can also be achieved by using unconstrained arrays. Both relate under the
assumption of weak typing to the object-oriented principle of genericity.
Bit chains with variant length may be processed by the element pipeStage and thus
allow for genericity. However, these bit chains may represent different behavior (e.g.
number, bit map, command, character, ... ) even if they are interpreted as number when
the incrementer is used.
Methods in structural design are activated or invoked by protocols. They consist of a
o physical part, which is related to a set of signals and a
o logical part, which consists of waveforms.
Considering regN,
o the physical part consists of the signals d,q,ekl, res and the
o logical part of
- a rising edge at elk to activate the method "store"
- a high value at res to activate the method "reset" and
- an event at q, which is a message to units connected to q, activating their
methods.
As analysis is compared with compilation and elaboration with execution hard binding
is specified by configuration specification or entity instantiation and soft binding by
configuration declaration.
The configuration Incrementer is thus an example of soft-binding. Hard-binding is
shown in the listing below:
architecture hardbinding of pipeStage is
signal int : bit_vector ( pi'range );
begin
P: entity incN port map( pi, int );
s: entity regN port map ( int, po, clock, reset );
end structural;
5.6.1. Motivation
Assume that the pipeline stage described above should be extended by a zero flag. The
behavior of the storage element and the processing element can be inherited again. Their
composition, however, must be rewritten completely.
entity pipeStageZero is
port ( pi: in bit_vector;
po : buffer bit_vector;
zero : out bit;
clock: in bit;
reset: in bit );
end pipeStageZero;
This need not to be done if the model is derived by extending the pipestage model by
inserting the line
zero: out bit;
Similarly, an architecture can be marked with the keyword "tagged". It also can be
derived from existing probably tagged architectures. This is shown below.
architecture behavior of lr_registerN is tagged
begin
pO:process( clk )
begin
if clk = '1' then
if reset = '1' then
q <= (others => '0');
end if;
if load = '1' then
q <= d;
end if;
end if;
end process;
end behavior;
Object Orientation and Structural Design 85
In the final architecture multiple inheritance is used. This is also possible for entities
and components. If identical identifiers are used in units, then the declaration occurring
in the later enumerated unit (here: check) remains visible for multiple inheritance. This
implies also that identical declarations occur only once.
It is important to note that architectures may be derived from architectures of the same
(probably tagged) entity, and also from architectures from derived entities, from which
the entity of the architecture is derived. It should be mentioned also that only tagged
architectures may be associated with tagged entities. However, both extended and
unextended architectures may be assigned with not tagged entities.
mP-lnterface
'~"'~","IIIIII''''II,,''IIII'''''''''IIII''''~
I
I
I
I
I
uP _synchro ~
I
cntrl
entity addr_decode is
generic(width : natural)
port (addr_decoder_cntrl in bit;
addr_from_up in bit_vector(width -1 downto 0);
register_select out bit_vector(2 ** width - 1 downto 0));
end addr_decode;
entity data_mux is
generic(width : natural)
port (data_mux_cntrl in bit;
data_from_to_up inout bit_vector(width -1 downto 0);
data_from_to_regs inout bit_vector(width -1 downto 0);
end data_mux;
entity reg is
generic(width : natural)
port (register_cntrl in bit;
regselect in bit;
data_from_to_up inout bit vector (width -1 downto 0) ;
cntrl from_asic in bit;
data from_to a s ic inout bit - ve ctor (width -1 downto 0) ;
end reg;
Object Orientation and Structural Design 87
The different functionalities of the blocks are designed within the architectures, e.g:
architecture sparc of up_sunchro is
begin
end sparc;
begin
end intel;
end mp_interface_for_asic_xyz;
architecture arch_mp_interface_for_asic_xyz
of mp_interface_for_asic_xyz is
begin
A:up_synchro
port map (cs,rd,wr,rdy,addr_decoder_cntrl,data_mux_cntrl,
register_cntrl);
B:addr_decode
generic_map (8) ,
port map(addr_decoder_cntrl,addr_from_up,register_select);
C:data_mux
generic_map (8) ,
port map(data_mux_cntrl,data_from_to_up,data_from_to_regs);
The problem of this solution is that the designer can rearrange and compose the whole
template. But the components up_syncro, addr_decoder, and data_mux work only for a
specific timing constellation. Any change in the constellation can lead to redesign cycles,
i.e. the productivity of reusing the design decreases.
88 CHAPTER 5
A very elegant way to overcome this problem is to describe the core of the interface
inside a tagged architecture. ASIC-dependent uP-interfaces with a set of ASIC-specific
registers can then be derived from that description. The example of the mP-interface is
also extended to contain an interrupt signal.
The tagged components for the mP-controller are:
entity up_synchro is tagged
port(cs in bit;
rd in bit;
wr in bit;
rdy out bit;
addr_decoder cntrl out bit;
data_mux cntrl out but;
register_cntrl out bit) ;
end up_synchro;
entity up_synchro_with_interrupt is new up_synchro
port(cntrl_interrupt : out bit)
end up_synchro_with_interrupt;
begin
A:up_synchro
port map (cs,rd,wr,rdy,addr_decoder_cntrl,data_mux_cntrl,
register_cntrl);
B:addr_decode
generic_map (addr_width) ,
port map(addr_decoder_cntrl,addr_from_up,register_select);
C:data_mux
generic_map (data_width) ,
port map(data_mux_cntrl,data_from_to_up,data_from_to_regs);
end arch_mp_interface_core;
Object Orientation and Structural Design 89
architecture arch_mp_interface_with_interrupt
of mp_interface_with_interrupt is
new arch_mp_interface_core
function calc int ( ..... )
begin
end calc_inti
begin
A:up_synchro_with_interrupt
port map (cs,rd,wr,rdy,addr_decoder_cntrl,data_mux_cntrl,registe
r_cntrl,
cntrl_interrupt);
int <= calc_int(interrupt_data,cntrl_interrupt);
end arch_mp_interface_withy_interrupt;
The designers' work to design a uP-interface for a specific ASIC would be:
entity mp_interface_for_asic_xyz is new mp_interface_core
port (data_from_to_regl inout bit_vector();
cntrl_from_regl : in bit;
end mp_interface_for_asic_xyz;
architecture arch_mp_interface_for_asic_xyz
of mp_interface_for_asic_xyz is new
begin
AI: reg
generic_map (8) ,
port map(register_cntrl,regselect(I),data_from_to_mp,
cntrl_from_regl,data_from_to_regl) ;
entity mp_interface_with_interrupt_for_asic_xyz is
new mp_interface_with_interrupt
port (data_from_to_regl inout bit_vector();
cntrl_from_regl in bit;
end mp_interface_with_interrupt_for_asic_xyz;
architecture arch_mp_interface_with_interrupt_for_asic_xyz
of mp_interface_with_interrupt_for_asic_xyz is new
arch_mp_interface_with_interrupt
begin
AI: reg
generic_map(8) ,
port map(register_cntrl,regselect(l) ,data_from_to_mp,
cntrl_from_regl,data_from_to_regl);
There are many scenarios, which can be designed efficiently with this method. One
example is system-specific uP-interfaces, i.e. all ASICs of a system contain a specific
core with the up-controller, addr_decoder, data_ mux, and a set of specific registers (e.g.
version register, interrupt register). This application-specific implementation can of
course be derived from the uP specific implementation.
90 CHAPTER 5
Moreover, user-specific ASIC derivates with an extended register set can be derived
from the system-specific implementation. Multiple inheritance can be employed
additionally to derive a uP-interface for ASICs supporting more than one standard
application.
Driver software, i.e. the interface to application software, can also be implemented
incrementally going hand in hand with this derivation scheme ofthe hardware interface.
Controller
In the second step, a dummy implementation of the datapath is added to the controller.
The datapath consists of two queue memories (QM), each indexed by a read and write
address from the corresponding QC, and an operation (OP), that passes the input data
to the output when it receives a start signal from its OS. In the testbench, the dummy
methods STIM (generate stimuli) and CHK (check result data) are added to the OSs. In
addition, the entity is incrementally extended by data ports. For data flow analysis,
serial data (e.g. integer data type) is generated at the input and checked for causality at
the output.
In the third step, the integer data type is replaced by an application-specific data type
(e.g. record), and the dummy operation is replaced by a fully functional one. In the
testbench, the methods stimulate (STIM) and check (CHK) are redefined to read real
source and result data for a fully functional verification. For analyzing the effects of
data-dependent processing time, the constant schedule of the operation is replaced by a
dynamic schedule, calculated by each execution of the operation.
92 CHAPTER 5
The following VHDL code example shows the extensions to the model made in the
second step and the locations for redefinitions in the third step. The architecture
declarative part and port maps in the statement part were omitted to keep the example
readable.
{ package my-pack is
subtype my_data_t is
end my-pack;
entity example is
Y
port ( elk, reset: in bit;
{ re~in, re~out: out bit;
stb_in, stb_out: in bit;
data_in: in my_data_t;
data_out: out my_data_t );
end example;
CD
~~c~~~~cture structural of example is redefine
~ gQ~:
datapath
QueueCtrl port map ( .. ); architecture
QO: QueueCtrl port map ( .. );
os: OpSched port map ( .. );
DP: DataPath port map ( .. );
end structural;
configuration dummy of example is
The behavior of the controllers can be inherited from the first step by instantiation, but
the composition for the second step must be rewritten completely. This includes the
extension of the port map by data ports, instantiation of the datapath and its
configuration. By using a package to define the data type for datapath operations, the
entity/architecture pair does not have to be modified in the third step. However, the
overhead of rewriting and configuring the model composed of controller and functional
description in step two remains (see Section 5.6.1).
The overhead could be omitted by using structural inheritance, as proposed in
Section 5.6.2. First, an entity control is declared, which abstracts from the
functionality by describing the controller part only. The controller consists of OS and
QC instances and the control signals for the handshake between them. All control
signals leading to the datapath are declared and connected to the controllers as well, but
left open to the datapath. For the OS, a constant value cons t_sched is assigned to
the dynamic schedule input dyn_sched.
entity control is tagged
port ( clk, reset: in bit;
re~in, re~out: out bit;
stb_in, stb_out: in bit );
end control;
Finally, another entity ffa_control is derived from the first one, which contains full
functionality. In most of the cases, the full functional model can not be derived from the
dummy functional one, because it needs an application specific data type
appl_data_t, rather than integer for the data ports. If both models, the dummy
and the fully functional one, use the same data type, the fully functional model
ffb_control can be derived from d_control. The relationship between the
models is shown in the following inheritance graph.
As in the second step, in step 3 the ports are incrementally extended, and a datapath is
instantiated. The datapath instance implements full functionality and in addition returns
a data- dependent schedule dd_sched, which is assigned to the dynamic schedule
dyn_sched, by overwriting the DS statement from the control architecture.
entity ffa_control is new control
port ( data_in: in appl_data_t;
data_out: out appl_data_t );
end ffa_control;
94 CHAPTER 5
If only the dummy datapath has to be redefined to implement full functionality, the
data type remains the same, and no dynamic schedule is required, the new model
ffb_control can be derived from d_control.
entity ffb_control is new d_control
end ffb_control;
The benefit of this approach is not only the reduced writing effort at each refinement
step, which is less error prone than rewriting the whole model, but the fact that
improvements to the base (control) architecture become improvements to all derived
architectures automatically.
As shown in the figure below, the state of the abstract object is declared inside its
architecture as well as a set of processes, each responsible for one method. The methods
can be externally activated by sending a possibly parametrized message to the process.
The execution of the process may then modify the state of the object, return
information to the caller, send informtion via other communication channels or modify
other port signals.
Object Orientation and Structural Design 95
The state of the object as well as the methods can easily be extended by using structural
inheritance as shown above. A brief example is shown below. Given an object with an
integer state and methods to set or get values, the interface can be taken directly from
the abstract object:
entity Object is
port ( messageActivation inout master slave communication );
end Object;
The architecture consists of one signal (state) and two processes implementing
functionality.
architecture PutGet of Object is
signal state: register integer;
constant GetMethod MethodType.- 1;
constant PutMethod : MethodType := 2;
begin
process
variable dummy : Integer;
begin
slave_inquire ( GetMethod , dummy);
slave_response ( GetMethod , state );
end process;
process
variable value Integer;
begin
state <= null;
slave_inquire ( PutMethod , value );
state <= value;
slave_response ( PutMethod , 0 );
end PutGet;
An extension of the object shown above by the method Increment requires the addition
of a new channel in the entity declaration for sending an overflow message in the entity
declaration and a process for implementing the method.
96 CHAPTER 5
5.S. GENERICITY
Several ways exist to achieve generic modeling: Instance, polymorphism, inheritance,
generics and generate statements. This shall be discussed for different modelling and
application cases via a register model.
5.8.1. Instance
Registers sensitive to different edges and reacting to different reset modes shall be used
for the component storageN in the pipe Stage example of Section 5.5. The behavior
could be derived from different entity/architecture pairs, but the architecture hard-
binding must be modified for each register type.
5.8.2. Polymorphism
A very elegant way to do so is by using the static polymorphism capabilities of a
configuration as described in Section 5.5.
configuration Incrementer_Rising_High of pipeStage is
for structural
for P: processN use WORK.incN( behavior); end for;
for S: storeN use WORK. regN ( rising_high ); end for;
end for;
end Incrementer_Rising_High;
The configurations shown above bind either the same entity with another architecture
implementing the required behavior or another entity/architecture pair.
5.8.3. Inheritance
The overhead using different instances (see 5.8.1) can be omitted by structural
inheritance. This approach, however, is not as elegant as using configuration based
polymorphism.
5.8.4. Generics
The most compact modelling style invokes the use of generics for the selection of
different register types.
type storeModeType is ( NoMemory, High, Low, Falling, Rising );
type resetModeType is ( NoReset, AsyncHigh, AsyncLow, SyncHigh,
SyncLow );
component regNgeneric is
generic storeMode: storeModeType;
resetMode : resetModeType );
port (d in bit_vector;
q out bit_vector;
clk: in bit;
res: in bit );
end RegNgeneric;
The generic parameters can be used in behavioral models directly or to control generate
statements for synthesis purposes. Generic capabilities of current VHDL, however,
cannot be used if values of different types must be handeled. An elegant way to
overcome this problem is to use inheritance as shown below.
entity regN is tagged
port ( elk: in bit;
res: in bit );
end RegN;
Here, the interface to clock and reset is part of the entity only. A register storing variant
length bit chains is instantiated in the architecture. For each type, the interface is
extended by d as well as q, and the internal registers are connected to type conversion
units.
Generic types as defined in ADA would allow for a very compact modelling in this
purpose.
REFERENCES
[Ada95] Information technology - Programming languages - Ada, Annotated Ada
Reference Manual. International Standard ISO/lEC 8652: 1995(E).
Intermetrics, 1995.
[BaEc93] Bauer, M.; Ecker, W.: Communication Mechanisms for VHDL
Specification and DeSign starting at System Level, Proceedings of the
Spring'93 Meeting of the VHDL-Forum for CAD in Europe, Innsbruck,
1993.
[Bar91] Barnes, J.: Programming in Ada plus Language Reference Manual,
Addison-Wesley Publishing Company, Workham, England, 1991.
[BFMR] Berge, J-M.; Fonkoua,A.; Maginot, S.; J. Rouillard, 1.: VHDL Designer's
Reference, Kluwer Academic Publishers
[CoHS94] Covnot, B. Hurst, W. Swammy, S.: OO-VHDL: An Object Oriented
VHDL. Proceedings of the VHDL International User's Forum, 1994.
[CoY090] Coad, P.; Yourdon, E.: Object Oriented Analysis. Prentice Hall, 1990.
[Dun94] Dunlop, D.D. Object-Oriented Extensions to VHDL. Proceedings of the
VHDL International User's Forum, 1994
[EcMr96] Ecker, W.; Mrva, M.: Object orientation: Modeling and Design Paradigms
for the Year 2000?, ClEM, Issue #7, Kluwer Academic Publishers, 1996.
[Gab93] Gabriel, R.: The quality without a name. Journal of Object-Oriented
Programming, September 1993, pp. 86-88.
Object Orientation and Structural Design 99
[GHJV94] Gamma, E.; Helm, R.; Johnson, R.; Vlissides, J.: Design Patterns -
Elements ofReusable Object-Oriented Software. Addision Wesley, 1994.
[GKRM93] Glunz,W., Kruse,T., Rossel, T., Monjau,D.: Integrating SDL and
VHDL for System-Level Hardware Design. Proceedings CHDL'93,
Ottawa, Canada, 1993.
[G1PV92] Glunz, W., Pyttel, A., Venzl, G. System-Level-Synthesis in Design,
Michel, P., Lauter, U., Duzy, P. (eds): The Synthesis Approach to digital
System. K1uwer Academic Publishers, 1992.
[GlUm91] Glunz, W.; Umbreit, G.:VHDL for High-Level Synthesis of Digital
Systems.Proceedings of the EuroVHDL'91, Marseille, September 5-7,
1991.
[Hod91] Hodgson, R.: The X-Model: A Process Modelfor Object-Oriented Software
Design, Fourth International Conference on Software Engineering and Its
Applications, Toulose, France, 1991
[JCJ092] Jacobsen, I.; Christerson, M.; Jonsson, P.; Overgaard, G.: Object-Oriented
Software Engineering: A Use Case Driven Approach. Addision-Wesley,
Reading, Massachusetts, 1992.
[Jor94] Jorgensen, 1.: A Comparison of the Object Oriented Features ofAda9X and
C++. "from the net". March, 1994.
[KAJW94] Kumar, S.; Aylor, J.; Johnson, B.; Wulf, W.: Object-Oriented techniques in
Hardware Design. IEEE Computer, June 1994.
[KoMG90] Korson, T.; McGregor, J.: Understanding Object-Oriented: A Unifying
Paradigm, Communications of the ACM, Vol. 33, No.9, September 1990
[Mey88] Meyer, B.: Object oriented Software Construction. Prentice Hall, 1988.
[Per92] Perry, D.: Applying Object-Oriented Techniques to VHDL. Proceedings of
the VHDL International User's Forum, 1992.
[PHSR95] Preis, V.; Henftling, R,; Schlitz, M.; Marz-Rossel, S.: A Reuse Scenario for
the VHDL-based Hardware Design Flow, Proceedings of the
EURODACNHDL' 95
[RBPEL91] Rumbaugh, J.; Blaha, M.; Premeriani, F.; Eddy, F.; Lorensen, W.: Object-
Oriented Modeling and Design, Prentice Hall, 1991.
[ScEc96] Schneider, C.; Ecker, W: Stepwise Refinement of Behavioral VHDL
Specifications by Seperation of Synchronization and Functionality.
EURODACNHDL'96. submitted.
[ScNe95] Schumacher, G.; Nebel, W.: Survey on Languages for Object Oriented
Hardware Design Methodologies. Berge,J-M.; Levia, 0., Rouillard, J.
(eds): High-Level System Modeling: Specification Languages. Kluwer
Academic Publishers, 1995
[ScNe95a] Schumacher, G.: Nebel, W.: Inheritance Concept for Signals in Object-
Oriented Extensions to VHDL, Proceedings EURODACNHDL '95
100 CHAPTER 5
[SeGW94] Selic, 8.; Gullekson, G.; Ward, P-T.: Real-Time Object-Oriented Modeling.
1994
[ShMe90] Shlaer, S.; Mellor, S.: Recursive Design. Computer Language 7, 3,1990
[Str91] Strounstrup, B.: The C++ Programming Language, Second Edition.
Addison Wesley PublishThe C++ Programming LAnguage,ing Company,
1991.
[SwMC95] Swamy, D.; Molin, A.; Burton, M.C.: OO-VHDL Externsions to VHDL,
IEEE Computer, October 1995.
[VhdI87] IEEE Standard VHDL Language Reference Manual, IEEE Std 1076-1987.
[VhdI93] IEEE Standard VHDL Language Reference Manual, IEEE Std 1076-1993.
[ZiMG92] Zippelius, R.; Muller-Glaser, K.: An Object-Oriented Extension ofVHDL.
VHDL-Forum for CAD in Europe, Spring'92 Meeting, Santander/Spain,
1992
6
ABSTRACT HARDWARE
MODELLING USING AN OBJECT-
ORIENTED LANGUAGE EXTENSION
TOVHDL
Guido Schumacher, Wolfgang Nebel
Department of Computer Science, Carl von Ossietzky University Oldenburg,
26111 Oldenburg, Germany
ABSTRACT
Reusability of hardware models becomes more and more important in the design of
complex systems. This is explained for different modelling problems. Methods for re-use,
which successfully use abstraction as a key to manage the design complexity in the
software domain, are analysed with respect to their applicability to hardware design.
Object-oriented modelling is stated as a technique which potentially increases design
productivity. Attempts to adapt such techniques for hardware specification and design
are presented The lack ofsupport for object-oriented modelling in the current version of
VHDL is explained. Possible subjects for object orientation are discussed We illustrate
how an object-oriented extension to the hardware description language VHDL could be
used to describe hardware systems at a high level ofabstraction. An explanation is given
that it is not sufficient to introduce object-oriented language constructs into a parallel
hardware description language, it is also necessary "to provide high-level
communication constructs for the data exchange between the parallel processes. Such
missing language concepts of VHDL for abstract modelling with special regard to the
object-oriented language extensions are discussed
101
102 CHAPTER 6
6.1. INTRODUCTION
The non-saturating integration density of integrated circuits (despite of earlier
assumptions) provides sufficient motivation to investigate further possibilities to
increase design productivity. The increase of complexity can be estimated at about ten
every seven years. It cannot be compensated by the increase of computing power,
which on the one hand does not achieve an increase in intellectual value addition without
a change in design methodology, while on the other is consumed mostly by complex
data management systems and user-friendly graphical interfaces.
As keys to manage the design complexity and the increase of design effort typically the
terms hierarchy and abstraction are mentioned. A hierarchical, structural decomposition
of the design problem reduces the complexity by isolating subproblems and hence
makes the global design problem accessible for a solution. This achievement has to be
paid for with a suboptimal total solution due to the local optimization of the
substructures.
Abstraction should be looked at from different points of view. First, it allows us to
encapsulate existing components which can be described by an abstract model
containing only that information which is required at the higher level of abstraction.
Examples of this kind of abstraction are cell libraries of ASIC vendors. Here abstraction
allows the re-use of hardware components. They do not need to be redesigned for each
application, i.e. the design cost (measured in terms of transistors) is reduced.
On the other hand, abstraction can be used for reducing design effort if design detail can
automatically be attributed to less detailed design specifications using synthesis tools.
Application examples are: logic synthesis, technology mapping, place and route. Here
the reduction in design effort is due to a re-use of automated design strategies and
architectures.
At the system level, abstraction is required to describe a first specification without
confusing and often unknown implementation details. It allows a first check of the
system description for inconsistencies and errors and therefore reduces the risk of re-
design steps in further design phases.
One can conclude that the necessary further increase in level of abstraction cannot be
achieved by aggregating physical representations of larger functional units and
abstracting them. A more promising approach is to reduce the effort of high-level
modelling and to build on automatic synthesis. The state of the art is behavioural
synthesis, which allows for an automatic netlist generation of single (VHDL) processes.
Because of the common association of a process with a hardware unit, the traditional
structural way of thinking in terms of functional units, which communicate via signals,
is maintained.
Moving the creative part of the design process to those levels which are covered by
hardware description languages of course also moves the largest potential of design
productivity increase to those levels. According to [20] already in 1993, almost 60% of
the US designer community used logic synthesis, and more than 50% used hardware
description languages. The large number of simulation and synthesis iterations [1]
emphasizes the need to improve the modelling productivity. The current effort in this
domain is due to necessary debug phases and the need to steer the synthesis process
into the intended direction. Different aspects of modelling cost and productivity will be
discussed in Section 6.2.
6.3.1. Introduction
The fundamental concept of object-oriented programming is a system of communicating
objects. This is antagonistic to the concept of hierarchically structured sequential
algorithms of non-object-oriented imperative programming. Each object is characterized
by attributes whose values define the state of the object. The attributes' values can be
modified by a repertoire of methods. The communication amongst the objects is done
by invoking respective methods of the target object. Object-oriented programming
techniques are usually characterized with buzz-words: class, inheritance, object,
polymorphism, method, encapsulation and message passing.
Objects are instances of a class. Inheritance allows us to create a class hierarchy in
which common features of several classes are specified in a parent class. This class
hierarchy and the inheritance concept allows us to specialize and generalize objects.
108 CHAPTER 6
can be associated in a binary association with one instance of the other class. This can
be denoted by a number as in the example in the association between the processor
system class and the operand class. A special form of an association is an aggregation.
As a class can be a member of different associations, the role is not assigned directly to
a class but to the corresponding end of an association. It describes a whole-part
relationship. It is marked by a diamond. In the example, an instantiation of the class
memory is part of the whole processor system. A third relationship is called
generalisation. This is the most important relationship concerning the re-use of the
system. It describes the relationship between superclasses and subclasses. A subclass
inherits all attributes, operations and associations of a superclass. The notation for this
relationship is a triangle. In the simple processor, for example, the class load is a
subclass of the superclass instruction. This means it inherits the operation
execute instruction from the class instruction as well as the aggregation
between processor system and instruction together with the role
instruction register. Ifa new class without additional relations is derived from
the class instruction to extend the system specification, then no changes appear in
the rest of the object model. For a more detailed description of the classes, their
attributes and associations, a data dictionary completes the diagrams of the object
model. It contains information about the entities of the object model as text. The
dictionary of the processor, for example, contains the entry: Accu: store for
the operands and results of instructions.
Processor system
execute instruction
<>
0
?
Memory
V
write(datum,address)
y
read(datum ,address)
I Datum
l
A
value 2 I I I instruction register
Address Operand Instruction
Another view is the dynamic model[13]. In this view, objects are considered as entities
having a state which is detennined by the value of its attributes. As a reaction to certain
events caused by other objects of the model, an object can change its state by changing
its attributes. In particular, the attributes that are affected by the change of the states
are described in the dynamic model. They are called state variables. The dynamic
behaviour of the objects is described by state diagrams in a notation adopted from
David Harel[7]. Such a state diagram can be seen in Figure 2.
idle
write (write_address: address; write_datum: datum);
\decode address
Asender of
read event.
write access
return datum
(datum)
Operation: increment
Responsibilities: increments the address value of an address
Inputs: address value
Returns: none
Modified objects: address values
Preconditions: address value is a valid address x E A , A is the address space
Iaddress value I
C2ncrement"
Iaddress value' I
,
main memory: Memory accu 1 : Operand
execute instruction
I
processor: Processor system
I
~ 1.3: Y.1. 1.4:
<> .1.1.2:
<> .1. 1.1:
<>
load ( I execute instruction read memory
(address value) :=
read address value
instruction) (instruction) := address value
instruction
The diagram characterizes the same situation as the OODFD in Figure 5, but from a
procedural point of view. It shows that the processor system sends a message to
the object of class address to get an address value. This value is used to send a
message to the memory to read the memory. The numbers define the sequence and the
hierarchy of the operation invocations. The non-permanent associations which are
established by sending a message are drawn as dotted lines. The latter technique
provides models which are closer to an implementation than the functional views. This
means that a first analysis model probably contains OODFD, which are supplemented
during the further refinement steps by OID. The specification of operations in a very
abstract functional view is transformed in further design steps to a procedural
implementation, which is a sort of algorithmic description and therefore close to an
implementation in an appropriate computer language. The following section gives an
overview of a proposal [17] to extend the hardware description language VHDL by
object-oriented concepts to provide an appropriate implementation language in the
sense mentioned above.
Listing 1
118 CHAPTER 6
Listing 2
Listing 3
already visible:
use work.memory-package.all;
use work.instruction-package.all;
use work.address-package.all;
use work.operand-package.all;
use work.datum-package.all;
package body processorsystem-package is
end processorsystem-package;
Listing 4
Abstract Hardware Modelling using an 00 Language Extension to VHDL 119
end memory-package;
Listing 5
An example is given in Listing 4. The sequence of declaring processor system and
load is determined by the implementation of the aggregation between them. (The
aggregation is described in Figure 1.) Instruction and derived classes like load have
to be declared before processor system to become part of it. To use processor
system as a parameter of the procedure execute instruction, its type can be
defined incompletely. As the encapsulation concept of VHDL is very strict, it is often
necessary to make the target of the events visible within the scope of the triggering
object by passing the objects as parameters. This is illustrated in the example. Although
the operation loa d is executed within the pro c e s so r s y stem and the
instruction register containing the load is part of the processor
system, it is necessary to pass the processor system as a parameter to the
operation execute instruction to make it visible within the procedure. This
parameter passing can become very cumbersome. To determine the required visibility of
objects within scopes, an event flow diagram can be quite useful. It shows the objects
and the events sent to each other. The example in Figure 3 shows that the object main
memory has to be visible in the operation of class load. This is realized by passing a
parameter of type processor system, which contains the object main memory
as record element, as shown above.
As in the object model, there are some constructs in the dynamic model which cannot be
easily implemented into E-VHDL. There exists no simple equivalent in the
implementation for the specification of a composite state containing several parallel
working state machines.
The implementation of the operations described in the functional model consists of
transforming the non-procedural high-level specification into a procedural description.
122 CHAPTER 6
Transformations from the non-procedural view, describing the state before and after an
operation, to the procedural view can already be applied in the functional model. The
implementation in E-VHDL is the continuation of this action. As an OODFD shows
the effect of an operation across many operations, it is useful among other things to
determine the visibility between the objects. The techniques to establish the required
visibility in the implementation is the same as described for event flow diagrams. If an
object interaction diagram exists, then the sequence of messages it describes can be
transformed into the corresponding sequence of procedure calls. Again, visibility
aspects have to be considered, including transient links between objects. The functional
model of the operation execute instruction shown in Figure 4 and 5 is
implemented in Listing 4. The messages 1.1 to 1.4 are implemented as procedure calls
and read/write operations on attributes in the procedure execute operation. The
effect on the objects instruction register, main memory, address
register, and accu for the instruction store as a result of message 1.4 is described
by messages 1.4.1 to 1.4.4. That means that the latter messages are sent in the operation
execute instruction of the class store.
It has been outlined and illustrated by an example how an OMT model can be
transformed with some limitations into an implementation. The major restrictions are
the lack of unconstrained multiplicity, the missing constructs for multiple inheritance,
and the difficult implementation of composite states with parallel working sub-state
machines. The model consists of objects implemented as tagged records and
polymorphic procedures. All messages are realized as sequential procedure calls. Some
effort has to be made to make objects visible to each other. This is achieved by passing
the concerned objects as parameters into the operations. Re-use of the OMT model by
deriving new objects from existing ones is supported by the implementation.
example, this kind of implementation for concurrency is limited to special cases. It only
makes sense if the effect of the messages has to be a parallel update of attributes of
objects. For specification concurrency at system level, the concept of parallel running
processes is appropriate in most cases.
In the specification of synchronous hardware systems, control messages are often based
on a clocking schema. The processing time of the hardware components executing the
operations invoked by the control messages has to be considered by the control units as
senders of the messages. The problem is that the information about the processing time
of complex operations is not known until implementation. It is possible to annotate
processing times as constraints in a specification, but there is not guarantee that they
are met by an implementation. As most operations are specified in a non-procedural
view at system level, it is not possible to guess realistic processing times. Even during
further refinement steps, it is difficult to predict processing times for operations which
are performed by sending messages to other objects, which themselves send messages.
If the sequence of control messages sent to other objects is based on a fixed clocking
schema, then the invocation of polymorphic operations is only possible if they fit into
the same schema. The constraints given by the schema are inherited by derived objects
even if the operations are re-defined. This is an obstacle for re-use.
For example, ifin Figure 1 the operation execute instruction of the processor
system is implemented based on a fixed clocking schema which expects the operation
execute instruction of the object instruction register to be performed
within ten clock cycles, then all derived instructions have to implement the operation
with a processing time of ten clock cycles.
A quantitative specification to define the time when a message has to be sent by
counting clock cycles is in most cases not appropriate for re-usable operations. The
synchronisation should be specified in a more abstract way by describing the timing
dependencies between the operations relative to each other. Parallel running objects can
be implemented by the declaration of objects as variables in different VHDL processes.
The processes may be declared in the same or different architecture of different entities.
The declaration of the classes as tagged record types in packages can be used in several
entities. As objects can be instantiated in different processes or entities aggregated
objects can be modelled by a connection between the processes or entities, instead of
tagged records containing other tagged records as record elements. Depending on the
specification, a mechanism has to be implemented for the synchronisation of the
objects. A similar concept can be applied in some cases to implement a specification
which allows parallel access to an object and its methods. It can be modelled as an
object consisting of an aggregation. The attributes are modelled as separate objects in
different processes. These objects contain operations to solve access conflicts.
The memory of the example can be used to illustrate the concepts for objects in parallel
running processes. If the memory and the rest of the processor system are both
modelled as an object running in parallel, then the implementation consists of two
processes. In the implementation, a link in the form of signals has to be defined between
the processes which enables the processor system to invoke the operations of the
memory and enables the memory to send back the results of the operation. This is
described in more detail in Section 6.9. Listing 6 shows an implementation of the
124 CHAPTER 6
operation execute instruct ion in the sequential model. In a parallel design, the
object memory can be modelled together with a new implementation of the operation
read memory in a process running in parallel to another process, which implements
the rest of the processor system. The procedure call read memory in the
operation execute instruction then has to be replaced by an invocation
mechanism for a new implementation of the operation read memory of the object
memory, which is now implemented in a different process. The procedure execute
operation, which invokes read memory, has to be blocked until the new
implementation of the operation, which consumes time, has finished and a result is
returned. But there is no advantage of such a mechanism based on blocking the caller of
an operation over the sequential implementation of all objects in one process. To
enhance the model, the increment operation has to be invoked after sending the
message to start the read operation. The read operation has to be divided into two
parts: one starting the read operation and one receiving the results. In the example, the
result has to be received before it is written to the accu. If several results are returned
by the operation at different times, then the operation has to be split up into even more
parts. The problem is that such split operations performing accesses to objects at
different points of time cannot be polymorphic. The number and the time of accesses of
a polymorphic operation may differ in the various actual operations. A pragmatic
solution would be to divide each operation into only two parts, one to send parameters
and one to receive all results at once. For the invocation of the first part, the earliest
possible time is chosen and for the second part, the latest. The presented problem is
independent of the chosen implementation language. As a consequence, the best thing is
to choose a sequential implementation for those objects which are not explicitly
specified to run in parallel and to perform the transformation into parallel components
automatically during resource allocation in a further design step.
use work.address-package.all;
use work.processorsystem-package.all;
use work.memory-package.all;
use work.datum-package.all;
package body load-package is
end load-package;
Listing 6
Abstract Hardware Modelling using an 00 Language Extension to VHDL 125
Until now, the mechanism for invoking operations across process scopes has not been
discussed because it is not trivial. Some additional considerations have to be made to
understand the problem. A declaration of a class in an entity would not allow us to use
it in another entity, because there is no concept in VHDL to make it visible outside the
entity. The same restrictive encapsulation concept hinders making objects visible across
entity boundaries or in case of object instantiations as variables across process
boundaries; in other words, the mapping of transient links between parallel running
processes in an OMT model to an implementation causes problems. Ideas on how to
solve the problems arising from the different scopes are given in the next section.
Channel
request
acknowledge
send(datum)
accept(datum)
object consists of two signals, which are visible in the scope of both processes.
Information has to be exchanged in two directions between the processes. To avoid
resolved signals in such a situation, two signals are necessary, one for each direction. A
language extension would be quite useful which allows us to encapsulate such two
signals in one record and to split up the drivers of the elements in different processes,
even when the record is passed as a parameter to procedures. The messages for the send
and accept operations consist of a simple procedure call of a send or an accept
procedure. Both procedures have to have the signals as parameters. This is the only
way to perform an assignment to the signals from inside the procedures, because the
procedures are declared for visibility and re-use purposes in packages, as explained in
Section 6.7. For the implementation of several different channels between the same
objects, only two signals of a class-wide type channel are necessary if all channels are
derived from the class-wide-type. In the example of the processor system, only two
signals are necessary to implement the read channel and the write channel. As explained
above, the objects implemented as tagged records in different processes are not visible
to each other even as the processes are not visible. They are only linked together by the
channels implemented as signals. As a consequence, the objects cannot assign
operations directly to objects but only to channels.
Like the target objects of a message in a sequential implementation, as explained in
Section 6.7, the channels have to be made visible within the operations by parameter
passing. This makes it difficult to extend an implementation by adding objects running
in parallel which are connected to the existing model by new channels or anything else
based on signals. For example, if in an implementation of the processor system
(Figure 1) a new type is derived from the type instruction to implement a new
instruction, and the operation execute instruction which performs this new
instruction consists of a message to a new object instantiated in a separate process, then
the signals representing the channel which connects these objects have to be passed as
parameters to the procedure execute instruction. This is not the only change in
the implementation. The procedures calling the operation execute instruction
have to be changed. Their parameter list has to be extended by the signals implementing
the channels. This change of the parameter list can have similar consequences in other
procedures and so on.
The previous paragraphs described the situation in which two objects running in parallel
send messages. In most concurrent specifications, there are more than two objects
running in parallel. In corresponding implementations, more than one channel has to be
passed as parameter to the procedures. This stops re-use. The number and names on
the passed channels depend on the procedures called by the operation. If in case of
polymorphic procedures another realisation is implemented, the channels might fit no
longer. One solution would be a language construct which allows implementation of
channels, making them accessible in a procedure declared in a package without passing
them as parameters to the procedure. Such a language construct could be something like
a global signal. The difference to existing global signals would be the possIbility to
assign values to such signals in a procedure without passing the signals as parameters to
the procedure.
128 CHAPTER 6
sender
channelobject: Channel1
I
1 channelobject : Channell
C send
•
channelobject : Channel'CLASS
J channel: Channell
route channel
~ I
-I---- + channel: Channell
determine priority
--.
channelobject: Channell
I
•
-- ----
channel: Channel2 channel: Channell
Ie accept channel
--.
~
Ie accept channel
..-
I I
r
openchannel : Channell I Iopenchannel : Channell II channelobject : Channell
I
I
/ openchannel : Channell
c accept
T I
T receiver ~
channelobject : Channel1 I Ichannelobject': Channel1
Figure 10: OODFD of Communication Mechanism between more than Two Processes
An object channelobj ect is sent and routed through the net. The routing is
determined by the actual class of the object. In the example an object of class
channell is sent. If several objects of channell are sent at the same time from
different objects in different processes, then a priority function has to select the
one which is to be sent. A receiver sends an object openchannel of the class
Abstract Hardware Modelling using an 00 Language Extension to VHDL 129
channell. In this case, the function accept channel of channell sends the
object channelobj ect to the recei ver. The function accept channel of
channe12 does not propagate the accept because of the different classes. It is not a
problem to introduce new channels into the existing mechanism because the new
channels inherit all procedures necessary to run in the mechanism. As the mechanism
for the routing is based on the class of the channel, it is necessary to derive a new
channel for each target of a message, which is in another process. Inside the process,
which invokes the send or accept operations of the channels, only one abstract channel
of a class-wide type has to be passed as parameter to the procedures. The actual type
of the parameter can then be the implementation of any channel. One channel per
process is sufficient in most cases as after a message send or accept, the calling
operation is blocked until the send or accept is performed. An implementation for such
a communication mechanism could be put into a library. Instead of being part of the
language, constructs for high-level communication between processes as part of a library
become modifiable and re-usable.
6.10. CONCLUSION
This chapter has analysed the suitability of object-oriented modelling techniques as a
mean for increasing productivity in the domain of hardware system design. The
modelling cost during different phases of design has been investigated. The largest
possible gain is expected in the initial specification and debugging phase of complex
systems as well as in the re-use of subsystems. As an important decision criterion for
the kind of language extensions, the subject of object-orientation has been elaborated.
One kind of object might be physically existing objects, which could be modelled in an
abstract, encapsulated and reusable way and hence support a bottom-up design
approach. On the other hand, object orientation could be applied to abstract concepts if
these are synthesizable down to the circuit level. In that case, concepts based on
abstract data types are subject to re-use, and a more efficient specification and high-
level design phase are expected. It has been illustrated how such a concept in form of an
object-oriented extension to VHDL can be used as an implementation language in an
object-oriented design methodology. Possibilities and limitations of translation
techniques from the specification into the implementation have been presented.
Different scopes of visibility of objects in the specification model and in the
implementation have been discussed. As an implementation problem in concurrent
systems, missing high-level communication constructs have been identified. An outline
of a solution has been given in which high-level communication constructs by
generalisation become re-usable for several interconnection situations. Although there
'are still several unsolved problems, object-oriented techniques promise to be successful
in the area of object-oriented hardware design, too, after being acknowledged in the
software domain.
130 CHAPTER 6
REFERENCES
[1] Bergamaschi, R. A.: Productivity Issues in High-Level Design: Are Tools
Solving the Real Problems? 32nd. Design Automation Conference, San
Francisco, 1995
[2] Booch, G.: Object-oriented design: with applications. Redwood City, Calif.,
Benjamin/Cummings, 1991
[3] CCIlT Revised Recommendation Z.1 00 CCITT Specification and Description
Language (SDL), 1992
[4] Coad, P.; Yourdon, E.: Object-oriented analysis. Yourdon Press, 1991
[5] Covnot, B. M.; Hurst, D. W.; Swamy, S.: OO-VHDL An Object Oriented
VHDL. Proceedings of the VHDL International User's Forum, 1994
[6] Girczyc E.; Carlson S.: Increasing Design Quality and Engineering
Productivity through Design Re-use. 30th. Design Automation Conference,
Dallas, 1993
[7] Harel, D.: Statecharts, A visual formalism for complex systems. Science of
Computer Programming 8, 1987
[8] Holz, E.; Witaszek, D.; Wasowski, M.; Lau, S.; Fischer, J.; Roques, P. ;
Cuypers, L.; Mariatos, V.; Kyrloglou, N.: INSYDE Integrated Methods for
Evolving System Design Technology Assessment. Report. Alcatel Bell
Telephone, Dublin City University, Humboldt Universitat zu Berlin, Intracom
S.A., Verilog S.A., Vrije Universiteit Brussel, 1994
[9] ISO/IEC 8652: 1995(E) Ada Reference Manual, Language and Standard
Libraries, Version 6.0, 1994
[10] Nebel, W.; Schumacher, G.: Konzepte objektorientierter Hardware-
Modellierung. invited talk: 2. GIIITG/GME-Workshop
"Hardwarebeschreibungssprachen und Modellierungsparadigmen", Darmstadt,
Feb. 15-16, 1996
[11] Rumbaugh, 1.; Blaha, M.; Premeriani, W.; Frederick, E.; Lorensen, W.: Object-
oriented modeling and design. Prentices-Hall International, 1991
[12] Rumbaugh, J.: OMT: The object model. in Journal of Object oriented
Programming, January, 1995
[13] Rumbaugh, J.: OMT: The dynamic model. in Journal of Object oriented
Programming, February, 1995
[14] Rumbaugh, J.: OMT: The functional model. in Journal of Object oriented
Programming, March-April, 1995
[15] Rumbaugh, J.: OMT: The development process. in Journal of Object oriented
Programming, May, 1995
Abstract Hardware Modelling using an 00 Language Extension to VHDL 131
[16] Schumacher, G.; Nebel, W.: Survey on Languages for Object Oriented
Hardware Design Methodologies. Current Issues in Electronic Modeling,
Issue 1, Kluwer Academic Press, 1995
[17] Schumacher, G.; Nebel, W.: Inheritance Concept for Signals in Object-Oriented
Extensions to VHDL. Proceedings of the EURO-DAC '95 with EURO-VHDL
'95. IEEE Computer Society Press, 1995
[18] Shlaer, S.; Mellor, J., S.: Object-Oriented System Analysis Modeling the World
in Data. Yourdon Press, 1988
[19] Swamy, S.; Molin, A.; Covnot, B. M.: OO-VHDL Extensions to VHDL. IEEE
Computer, Oct. 1995
[20] USEIDA (User Society for Electronic Design Automation). Results of the 1993
USEIDA Standards Survey. Feb., 1994
7
OBJECT-ORIENTED GENERATION
OF VHDL MODELS
George S. Powley Jr., Joanne E. DeGroat
Department ofElectrical Engineering, The Ohio State University, 205 Dreese Lab, 2015
Neil Avenue, Columbus, OH 43210-1272, USA
ABSTRACT
To allow the rapid prototyping of application specific signal processors, an extensive
VHDL library of architectural building blocks is needed. In this chapter, we present an
object-oriented approach to generating a library of VHDL synthesizable models. The
object-oriented analysis and implementation of the VHDL model generation system is
described. By using an object-oriented development method, the model generation
system has been designed to be easily extended, allowing new components to be added to
the component library without changing the system code. An example ofthe VHDL code
generatedfor a 4-bit ripple carry adder is included
7.1. INTRODUCTION
To allow the rapid prototyping of application specific signal processors, an extensive
VHDL library of digital architectural building blocks [5] is needed. The digital
component library should include behavioral models of off-the-shelf parts, as well as
VHDL synthesizable models. This library could be used by hardware designers to
develop behavioral models of signal processing systems, and also by high level
synthesis systems to verify behavioral synthesis results [3]. In this chapter, an object-
oriented approach to developing a synthesizable VHDL model generation system for
digital building blocks is described.
By using an object-oriented development method, a software system can be designed
that will be easier to maintain and extend, as opposed to using a conventional structured
133
134 CHAPTER 7
analysis approach. This notion has been emphasized in the development of the VHDL
model generation system. The key advantage of taking an object-oriented approach is
that the library of models supported by the tool can be extended without changing the
code for the model generation system.
In this chapter, the advantages of the object-oriented paradigm are highlighted. The
object-oriented analysis of the VHDL model generation system is described, including
the digital component class, which facilitates the extendible component library. Finally,
some of the implementation details are presented, and a short example is provided.
components has been developed with the idea of code reuse in mind. In Section 7.3.3,
the digital component class is described.
7.3.1. Requirements
The VHDL synthesis model generation system will be used to generate synthesis and
simulation models of digital components. The VHDL models produced by the
generation system must be portable across synthesis systems, therefore the use of
generics is prohibited. The synthesis system should be portable across computer
platforms, and the system should be designed so the component library can be extended
by the user. In addition, each model should provide a data book style of documentation
for the model.
to represent all digital components, the Attribute Interface Generator can be used for all
future component models.
The Model Generator object is used to bind the Attribute Values, specified by the user,
to the Generic VHDL description contained in the Digital Component class. The output
of the Model Generator will be as ynthesizable VHDL Model. Using the Model
Generator to bind the attribute values to a "generic" VHDL model is a key factor in
making the system extendable. Since the Model Generator performs the same task for
all digital components, the Model Generator code will remain unchanged as new models
are added to the component library. Implementation details of the model generator are
discussed in Section 7.4.2.
Aftrt)uM V.1un
VHDL Mod-'
Compon.m: lial
.......
The object model for the library maintenance system is shown in Figure 3. This figure,
along with the data dictionary, describes the object classes and relationships that exist in
the library maintenance system. The library maintenance system is used to update and
extend the database of digital component models. This system allows the model
designer to change existing models in the library, or to add new models to the library.
By using an object-oriented approach to implementing the database interface, the Model
Designer can be isolated from changes in the format of the database. A graphical user
interface to the Component Model Database also helps maintain the integrity of the
database. By using software to change the contents of the database, many problems can
be avoided that might occur if the designer made changes to the database by hand.
Implementation details of this system are described in Section 7.4.1.
EJ
EJEJEJ
Figure 3: ObjectModel for Library Maintenance
Figure 4 shows generalization diagrams for the classes used in the object model.
Generalization is used to indicate inheritance relationships. In this case, generalization is
used to allow classes to inherit common relationships. For the GUI class, all derived
classes will inherit the relationship of being manipulated a Person. The descendants of
the Database Client class will inherit the ability to send queries to the database and read
the results returned by the database, which are contained in the Database Result class.
Database Clients do not inherit the ability to change the database. This relation is only
provided to the Model Database Interface.
During the development of the object model, it is apparent that the Digital Component
class is a key member of the whole system. By generically specifying the representation
of all digital components, an object-oriented system can be built. In the next section, we
will describe the digital component class used by the VHDL model generation system.
Object-Oriented Generation ofVHDL Models 139
I I I
Attribute Interface
Model DB Interface User Interface Attribute Interface
Generator
Human DB ResuH
~ ~
I I I I
Component List
Model Designer User Component
Digital Component
A
Combinatorial Sequential TYPE
A A
Logic .Gates Counters Regi~ters CLASS
Control Inputs
...
...
Control Outputs
the Appendix, a list of commonly used digital components, and their representative
attributes is given. This taxonomy of digital components provides the basis to build the
VHDL model synthesis library.
The collection of digital models listed in the appendix is by no means exhaustive. The
focus of the VHDL model generation system is to make the library easily extendible. By
including models of commonly used components, the foundation is laid for model
designers to add new components to the library. These new models might include new
architectures for a previously defined class, such as a carry save adder, or models for a
newly defined class, such as an IIR filter. In the next section, the procedure for adding
new models to the VHDL model generation library is described.
Information based on the attribute values is passed to the model generator using define
scripts, written in Tcl. The define script may use information from entry boxes, check
boxes, and radio buttons. For each define script, a #define directive corresponding to the
specified define name is passed to the model generator. The value of the define is the
result of executing the Tcl script. The define script provides the model designer with a
very powerful method of passing information to the model generator, thereby reducing
the complexity of the VHDL models.
7.5. EXAMPLE
In this section, we will show the results of generating and synthesizing a 4-bit ripple
carry adder. The first step of the process is to select the attributes for the adder. The
contents of the files sent to the C preprocessor are shown in Figure 7. The VHDL code
produced by the model generator is shown in Figure 8. This is a behavioral VHDL
model of a 4-bit adder, which is targeted for logic synthesis.
ENTITYadder IS
PORT ( Input1 IN bit_vector(3 DOWNTO OJ;
Input2 IN bit_vector(3 DOWNTO OJ;
Cin : IN bit;
Cout : OUT bit;
Zero : OUT bit;
Output: OUT bit_vector(3 DOWNTO O} };
END adder;
ARCHITECTURE ripple_carry OF adder IS
SIGNAL sum: bit_vector(3 DOWNTO O};
SIGNAL carry: bit_vector(3+1 DOWNTO I};
BEGIN
all_bits : FOR i IN 0 TO 3 GENERATE
Isb : IF (i = O) GENERATE
carry(i+1} <= (Input1(i) AND Input2(i}} OR (Input1(i}AND Cin)
OR (Input2(i) AND Cin};
sum(i} <= Input1(i} XOR Input2(i} XOR Cin;
END GENERATE Isb;
rest : IF (i > O) GENERATE
carry(i+1} <= (Input1(i) AND Input2(i}}
OR (Input1(i}AND carry(i)}
OR (Input2(i) AND carry(i}};
sum(i} <= Input1(i} XOR Input2(i} XOR carry(i};
END GENERATE;
END GENERATE all_bits;
Output <= sum;
Cout <= carry(3+1};
Zero <= '1' WHEN sum "0000" ELSE '0';
END ripple_carry;
7.6. CONCLUSIONS
We have described an object-oriented approach to the development of a synthesizable
VHDL model generation system. By taking an object-oriented approach, the system has
been designed to be easily extended, therefore new models can easily be added to the
component library. The design and implementation of this system shows that
object-oriented development methods are useful, even if the final system is not
implemented within an object-oriented language.
Future work on this system will include defining an external tool interface to the model
generator. This will allow a high level synthesis tool to directly access the model
generator. Models obtained from the model generator could be used by the synthesis
system to perform a behavioral simulation, and then sent to a logic synthesizer to
obtain a gate level implementation. Also, new component models will continue to be
added to the model library, to improve the usefulness of the VHDL model generation
tool.
REFERENCES
[1] Booch, G., Object-Oriented Design with Applications, Benjamin
Cummings,1991.
[2] Coleman, D., Arnold, P., Bodoff, S., Dollin, c., Gilchrist, H.,and Jeremaes, P.,
Object-Oriented Development - The Fusion Method,Prentice Hall, 1994.
[3] Dutt, N.D., "GENUS: A Generic Component Library for High LevelDesign",
Technical Report #88-22, University of California at Irvine,Sept 1988.
[4] Graham, 1., Object-Oriented Methods, Addison-Wesley, 1991.
[5] Hayes, J. P., Computer Architecture and Organization,McGraw-Hill, 1988.
[6] Korsen, T. and McGregor, 1. D., "UnderstandingObject-Oriented: A Unifying
Paradigm", Comm of the ACM 33, 9 (Sept 1990), pp. 40-60.
[7] Kernighan, B. W. and Ritchie, D. M., The C ProgrammingLanguage, Prentice
Hall, 1988.
[8] Ousterhout, J. K., Tel and the Tk Toolkit, Addison-WesleY,1994.
[9] Pronk, C. and Tercero, C., "Methods and Techniques forObject-Oriented
Analysis and Design", Technical Report #94-107, DelftUniversity of
Technology, December 1994.
[10] Rumbaugh, J., Blaha, M., Premerlani, W., Eddy, F., andLorensen, W., Object-
Oriented Modeling and Design, Prentice Hall, 1991.
[11] Wirfs-Brock, R., Wilkerson, B., and Wiener, L., DesigningObject-Oriented
Software, Prentice Hall, 1990.
INDEX
A
Abstract Data Type 17; 22; 24; 32 Classes 79; 111
Abstract Model 17 CLU32
Abstraction 20; 102 Co-Design 53
Activated 82 Co-Simulation 53
Activation of Methods 4 Commands 3
Active 63 Communication Overheads 2
Active-Passive Duality 33 Compilation 80
ADA9584 Complexity 16; 32
Aggregate 5 Complexity Management 16
Aggregation 112 Computer-Independent 3
Alphard 32 Concrete Representation 22
Analysis 80 Concurrent Objects 42
Architectural Design 42; 48 Constructor 19; 21
Architectures 5; 9 Container 32; 80
Artificial Intelligence 4 Corporate Identity 9
Assemblers 3 Cross Fertilization 16
Association 111
Attributes 107; 111 D
Automatic Parallel Partitioning 4 Data Abstraction 7; 16; 17; 20
Data Decomposition 21; 24; 34
B Data Description 47
Behavioral Aspect 6 Data Dictionary 112
Data Hiding 4
c Data Packaging 4
C++ 17; 110 Data Structures 3
Change Management 23; 24; 33 Data-Flow Diagram 60
Channel 125 Decomposition Graph 22
Class 5; 17; 80; 107 Derivation of Methods 81
Class Diagram 60 Design Cube 9
Class for Digital Components 134 Design Domain 9
Class-Wide 117 Design Family 32
147
148 Index
o R
Object Interaction Diagram 114 Rapid Prototyping 33; 133
Object Model Ill; 135 Re-Use 102
Object Modeling 44 Reconstruction of Damaged Images 70
Object Modeling Technique III Register Transfer Synthesis 2
Object Orientation 4; 7; 8; 58 Relation III
Object-Oriented Analysis 134 Requirements analysis 41
Object-Oriented Data Flow Diagram 114 Reusability 58
Object-Oriented Design 5; 8; 16; 33; 133 Reuse 5; 9; 16; 19; 21; 23; 25; 32; 78
Object-Oriented Extension 78 Role 111
Object-Oriented Languages 8 Rolename III
Object-Oriented Paradigm 134
Object-Oriented Real Time Analysis 84 s
Object-Oriented Techniques 40 Script Languages 4
Objects 107 SDL, Specification and Description
Off-the-Shelf 16 Language 40
OlD 114 SDL-93110
OMT 40; 58; III Sequential Processing 3
OMT* 58 SES/Workbench 33
00A5 Simulation 16
OOD 5 Smalltalk 110
OODFD 114 Soft-Binding 82
OORT 41 Software Bus 69
Operational Specification 17; 22; 24 Software Design 45
Software Technology 3
p
Software-ICs 34
Parallel Processes 6 Specification 17; 19; 24
Parent Class 107 Specification Languages 6; 7
Passive 63 State 16; 17
Passive Objects 42 State Diagrams 113
Patterns 9; 64 State-Transition Diagrams 60
Polymorphism 5; 32; 80; 96; 108 Staticity 80
Pre- and Post-Conditions 29 Structural Description 79
Process 47 Subclasses 112
Program Family 32; 34 Super Character Formation 3
Programmable Cores 7; 8 Superclasses 112
Programming of Parallel Actions 4 Synthesizable Models 133
Proof Systems 4 System Architecture 46
System Development 135
System Synthesis 6
150 Index
T v
Tag 84; 116 V ModelS; 9
Tagged Record Types 116 Verification 30
Technology Transfer 16 VHDL 33; 65; 133
Template 32 VHDL Model Generation System 134
Test Design 42 Video-On-Demand Server 71
Testing 43 Virtual Instruction Set 34
Tower of Babel 6 Virtual Machine 17; 31; 34
Transformation Function 22; 24
Transistor LevelS w
Type Genericity 32; 34 Weak Typing 82
Whole-Part Relationship 112
u
uP-Interface 85 x
Use Cases 45; 62 X ModelS; 9