6
Copyright 0 IFAC Real TimeProgramming, LakeConstance, Germany, 1994 A NOTE ON HARDWARE-SOFTWARE CODESIGN T. TEMPELMEIER Fachhochschuie, FE Informatik, Labor fiir Echtzeitsysteme, Marienberger StmJe 26, 88024 Rosenheim, Germany Abstract. An overview of some hardware-software codesign schemes will be given. In contrast to these approaches, a proposal will be made which builds on the similarity of Ada and VHDL and is strongly oriented towards immediate practical applicability. The proposal can be characterized as object-based, software-oriented, manual, hardware-software re-partitioning. The proposal is illustrated with an fictitious example from the on-board software of the EURECA spacecraft. Keywords. Hardware-Software Codesign. Software-Engineering, Ada, Object-Orientation, HOOD, VHDL. 1. INTRODUCTION Hardware-software codesign is the combined develop ment of hardware and software components to be in- tegrated into one system. As publications show, most investigations in this field are currently done by hard- ware developers. But obviously, hardware-software codesign should also be of concern to software devel- opers, especially when involved in the development of embedded systems. New hardware development practices have greatly en- hanced the feasibility of hardware-software codesign, recently. The development of integrated circuits (or other hardware) nowadays starts with a design in a hardware description language. Many of these hard- ware description languages are astonishingly similar to (software) programming languages. It may be sur- prising or even debatable that hardware engineers have decided to use the paradigm of imperative soft- ware programming languages also for hardware de- scriptions. However, this decision will be taken for granted here. In any case, from the point of view of a software engineer, this choice of paradigm is very convenient. Starting from such hardware descriptions, application specific integrated circuits (ASIC’s) can be manufac- tured easily and in a largely automatic way. This is due to the availability of field programmable devices and due to the progress in automatic logic synthe- sis (Bergamaschi, 1993; synopsis, 1993; Villar and Unchez, 1993). And it is for these reasons that a dramatic increase in demand for practically applica- ble hardware-software codesign schemes has to be ex- pected, Some of the hardware description languages in prac- tical use are propietary or in the public domain (e.g. Verilog). On the other hand, VHDL (VHSIC Hard- ware Description Language, VHSIC = Very High Speed Integrated Circuits), is a widely accepted IEEE standard in the field of hardware description langua- ges. VHDL is very similar to Ada and nowadays very common in practice. It is currently in the tran- sition from the original standard of 1987 to its re- standardized version VHDL’92 (BergC, Fonkoua, Ma- gnet, and Rouillard, 1993; Men&G, 1993; Navabi, 1992, 1993). Hardware description languages with little or no re- semblence to some real-time language are considered a poor choice for hardware-software codesign in this contribution. The reawn is that - to the opinion of the author - software development for embedded sy- stems should be done in some real-time programming language. It is true that almost any language can be used for real-time programming (even C), if on relies on some underlying real-time operating system. Hr+ wever, in such cases the language is not a real-time language per se. This renders hardware-software co- design for embedded systems less attractive in these cases. On the other hand, Ada is a real-time pre gramming language. This is true despite some mi- nor shortcomings and limitations of Ada 83 which are corrected by Ada 9X in any case. Due to the simi- larity of Ada and VHDL, this combination provides for a very easy and practical approach to hardware- software codesign. This is also the approach taken in this contribution. A proposal for this wiIl be given in the following after an overview of other hardwar+ software codesign schemes. 121

A note on hardware-software codesign

Embed Size (px)

Citation preview

Page 1: A note on hardware-software codesign

Copyright 0 IFAC Real Time Programming, Lake Constance, Germany, 1994

A NOTE ON HARDWARE-SOFTWARE CODESIGN

T. TEMPELMEIER

Fachhochschuie, FE Informatik, Labor fiir Echtzeitsysteme, Marienberger StmJe 26, 88024 Rosenheim, Germany

Abstract. An overview of some hardware-software codesign schemes will be given. In contrast to these approaches, a proposal will be made which builds on the similarity of Ada and VHDL and is strongly oriented towards immediate practical applicability. The proposal can be characterized as object-based, software-oriented, manual, hardware-software re-partitioning. The proposal is illustrated with an fictitious example from the on-board software of the EURECA spacecraft.

Keywords. Hardware-Software Codesign. Software-Engineering, Ada, Object-Orientation, HOOD, VHDL.

1. INTRODUCTION

Hardware-software codesign is the combined develop ment of hardware and software components to be in- tegrated into one system. As publications show, most investigations in this field are currently done by hard- ware developers. But obviously, hardware-software codesign should also be of concern to software devel- opers, especially when involved in the development of embedded systems.

New hardware development practices have greatly en- hanced the feasibility of hardware-software codesign, recently. The development of integrated circuits (or other hardware) nowadays starts with a design in a hardware description language. Many of these hard- ware description languages are astonishingly similar to (software) programming languages. It may be sur- prising or even debatable that hardware engineers have decided to use the paradigm of imperative soft- ware programming languages also for hardware de- scriptions. However, this decision will be taken for granted here. In any case, from the point of view of a software engineer, this choice of paradigm is very convenient.

Starting from such hardware descriptions, application specific integrated circuits (ASIC’s) can be manufac- tured easily and in a largely automatic way. This is due to the availability of field programmable devices and due to the progress in automatic logic synthe- sis (Bergamaschi, 1993; synopsis, 1993; Villar and Unchez, 1993). And it is for these reasons that a dramatic increase in demand for practically applica- ble hardware-software codesign schemes has to be ex- pected,

Some of the hardware description languages in prac- tical use are propietary or in the public domain (e.g. Verilog). On the other hand, VHDL (VHSIC Hard- ware Description Language, VHSIC = Very High Speed Integrated Circuits), is a widely accepted IEEE standard in the field of hardware description langua- ges. VHDL is very similar to Ada and nowadays very common in practice. It is currently in the tran- sition from the original standard of 1987 to its re- standardized version VHDL’92 (BergC, Fonkoua, Ma- gnet, and Rouillard, 1993; Men&G, 1993; Navabi, 1992, 1993).

Hardware description languages with little or no re- semblence to some real-time language are considered a poor choice for hardware-software codesign in this contribution. The reawn is that - to the opinion of the author - software development for embedded sy- stems should be done in some real-time programming language. It is true that almost any language can be used for real-time programming (even C), if on relies on some underlying real-time operating system. Hr+ wever, in such cases the language is not a real-time language per se. This renders hardware-software co- design for embedded systems less attractive in these cases. On the other hand, Ada is a real-time pre gramming language. This is true despite some mi- nor shortcomings and limitations of Ada 83 which are corrected by Ada 9X in any case. Due to the simi- larity of Ada and VHDL, this combination provides for a very easy and practical approach to hardware- software codesign. This is also the approach taken in this contribution. A proposal for this wiIl be given in the following after an overview of other hardwar+ software codesign schemes.

121

Page 2: A note on hardware-software codesign

(Bemr. thkel. Ernst, 1993; Ernst Hef~kel, Banner. 1993)

(Buchenrieder. Sedlmeier, Veith. 1993

SDL /

(Glunz. l%%sd. Kmtie. 1993

(i-Logix. 19Wa. lVQ2bI

1 VHDL 1

Assembler sw ]

Ecker and EcJm, Mm, 1993

1 HardwareC I

(Gupta De Miii. 19% lQ93i @@a, codho. Da MicheH 1994)

1 OOFS 1

Fig; 2. Overview of same Hardware-Software Codesign Approaches

122

Page 3: A note on hardware-software codesign

Fig 1. Representation of Hardware-Software Codesign Schemes

2. CURRENT STATUS OF HARDWARE-SOFTWARE CODESIGN

In order to provide for a quick overview of hardware software codesign schemes, the system representation ianguage and the languages for the (automatically de- rived) software and hardware designs are displayed according to figure 1.

Figure 2 gives an overview of current hardware- software codesign approaches as reported in the Ii- terature. Ada, C, derivatives of C with appropriate extensions, SDL, Statecharts, Petri nets, VHDL, or other languages are used for system design. From these “specifications” hardware and software descrip- tions in assembler, Ada, C, derivatives of C, and VHDL are developed.

Some comments on the system design languages in use are given:

l The derivatives of C for hardware description are mostly popular in academia and do not have a wide industrial base - despite some ele- gant concepts.

l SDL and Statecharts are appropriate for cer- tain applications or for some aspects of the sy- stem under design.

l VHDL does not seem generally suitable for sy- stem or software design, given its limitations as compared to the state of the art in software engineering. (This will be discussed later on).

In another example a transition from Ada to VHDL has been used to transfer parts of the Ada runtime system into silicon (figure 3). The “Ada Tasking Co- processor” is manufactured by R-Tech (1993) and is a device with some similarity to the proposals of Tem- pelmeier (1979, 1980a, 198Ob, 1982, 1984).

3. OBJECT-BASED HARDWARESOFTWARE CODESIGN

3.1 Method Description

In contrast to the presented approaches to hardware- software codesign, it is proposed to build on the simi- larity of Ada and VHDL and to perform an object-

Fig 3. Transfer of Parts of the Ada Runtime System into Silicon (Ada Tasking Coprocessor,

R-Tech (1993), Roos (1991, 1994))

Fig 4. Proposed Hardware-Software Codesign Scheme

based, software-oriented, manual hardware-software repartitioning (figure 4). Preferred objects for re- assigning to hardware or software are those, which are terminal objects (see chap. 3.2) and which en- capsulate (or form) hardware interfaces. This avoids additional communication overhead.

Clarity of the software and hardware architectures, i.e. standard heuristics of software engineering, are used to decide whether to implement an object in software or in hardware. Additionally, criteria such as performance, reliability, and form factor, i.e. size, weight, or power constraints, as discussed by Kumar, Aylor, Johnson, and Wulf (1993), are to be used. In some cases a thorough qu~tjt~ive analysis is neces- sary for this; however - from a practical point of view - sometimes it is obvious, which objects should be moved from software to hardware or vice versa.

It is beyond the scope of this proposal to deaI with suitable system specification languages; instead, it is assnmed that a first hardware-software partitioning has been achieved somehow from some system speci- fication.

3.2 The Basis: Ada, VHDL, and HOOD

The similarity of Ada and VHDL is an important factor in the proposed hardware-software codesign scheme. In (Tempelmeier, 1994a) a comparison of these languages is given. Like Ada, VHDL does sup port strong typing, type-safe linkage, and powerful mod~~zation features. However, severe shortco- mings of VHDL as compared to Ada are for instance the lack of private, protected, and tagged types. If these features are used, they have to be implemen-

123

Page 4: A note on hardware-software codesign

(b)

Fig 5. Include-Relation (a) and equivalent Design Process ‘l%ee (b) in HOOD

ted “somehow” when making a transition from Ada to VHDL. A serious problem is posed by the intro- duction of shared variables in VHDL’92 without any proper synchronization mechanism. Semaphores (or some alternative) have to be implemented in VHDL (Scheuer and Ecker, 1992; Bauer and Ecker,l993).

Ada’s features for programming-in-the-large allow software designs to be object-oriented or object-based (i.e. without inheritance). A common software de- sign method for space applications is HOOD, Hierar- chical Object-Oriented Design (Delatte, Heitz, Mul- ler, 1993; Tempelmeier, 1994b, 1992). HOOD ob- jects are similar to Ada packages, possibly with in- cluded tasks. These. objects may be nested hierar- chically (“Include”-Relation, fig. 5a). As the de- sign process proceeds hierarchically, the correspon- ding “design process tree” (fig. 5b) is equivalent to the Include-Relation. Objects are called ierminat if they do not have other objects included in them, or, equivalently, if they are leaves in the design process tree.

3.3 An Example

tirn an involvement in the redesign of the software of ESA’s EURECA spacecraft some insight has been gained (Thiirey, 1993). This knowlegde wiIl now be used in a fictitious example to reason even further about redesign, involving also parts of the hardware.

The assumption from above that partitioning into hardware and software components has been a&&

Fig 6. Redesigned HOOD Architecture of the Object Time-Manager (adapted from Thiirey, 1993)

_I

Fig 7. VHDL Architecture of the Object Time-Manager

ved somehow, holds (like in many practical projects). Hardware/software codesign is now used to move pie- ces of software to hardware i.e. to move the hard- ware/software boundary of the embedded system. Transferring software to hardware could be done for performance reasons or for simplifying the software architecture. (Likewise, moving hardware functiona- lity to software could for instance be done to save the extra weight of an IC in a spacecraft). A ma- nual trausformation from HOOD/Ada to VHDL can be used, but an automatic translation seems equaliy possible.

From the EURECA onboard data handling software the Time-Manager object (fig. 6) has been chosen for this example to be transferred to silicon. This object consists of terminal (active) objects, which en- capsulate some hardware interfaces. Due to the simi- larity of Ada and VHDL, the corresponding VHDL architecture can easily be derived (fig. 7). A gra- phical representation following Armstrong( 1993) and Navabi(1993) is used, enhanced with standard repre- sentations from the Ada world (B&r, 1984; Cadre, 1996).

An important question is, how far will the software architecture be affected by this re-partitioning? One

124

Page 5: A note on hardware-software codesign

Fig 8. Effect on the Software Architecture

can see that the software architecture will only need minor local changes because of the hierarchicaI mo- dularization and because of the selection of terminal objects as candidates for re-partitioning.

Moving terminal objects to hardware is equivalent to cutting off leaves (or branches) of the HOOD de- sign tree, which represents the include-relation of ob- jects. In other words, by removing the terminal ob- jects which encapsulated the hardware interfaces and by increasing the hardware with this functionality, the objects which formerly comprised the terminal objects become terminal objects now for themselves. One could also say that some modules are “holIowed out” in this approach, leaving the rest of the software architecture unaffected (fig. 8).

4. CONCLUSION

Under favourable conditions, hardware-software CO-

design can be done manually today. Supporting tools for performance analysis, integrated simulation of hardware and software (e.g. as reported by TZOU, Lim, Menon, and Palmer, 1993) and for automatic translation between software and hardware desaip tion languages, etc., have to be brought practice.

5. REFERENCES

to industrial

Armstrong, J.R. (1993). Rapid Development and Testing of Behavioral Models. In: Mermet (1993) 331 - 356.

Bauer, M., and Ecker, W. (1993). Communication Mechanisms for VHDL Specification and De- sign starting at System Level. Proc. Spring’93

Meeting of the VHDL Forum for CAD Users in Europe.

Benner, T., Henkel, J., and Ernst, R. (1993). In- ternal Representation of Embedded Hardware- /Software-Systems. In: Sedlmeier and Buchen- rieder (1993).

Bergam&, R.A. (1993). High-Level Synthesis in a Production Environment: Methodology and Algorithms. In: Mermet (1993) 195 - 230.

Berg& J.-M., Fonkoua, A., Magnet, S., and Rouil- lard, J. (1993). VHDL ‘92. Kluwer Academic Publishers, Do&e&.

Buchenrieder, K., Sedlmeier, A., and Veith, C. (1993). HW/SW C*Design With PRAMS Using CODES. Pm. CHDL’SS - Computer Hardware Description Languages and their Ap- plication, Ottawa, Canada, April 1993.

Buhr, R.J.A. (1984). System Design with Ada. Prentice Hall, Englewood Cliffs.

Cadre (1990). Teamwor~/Ada User’s Guide. Iie-

lease 4.0. Cadre Technologies Inc., Providence, RI.

Delatte, B., Heitz, M., and Muher, J.F. (1993). HOOD reference manual 9.1. Masson, Paris, Prentice Hall , London.

Ecker, W. (1993). HWjSW Co-Specification Using VHDL. In: Sedlmeier and Buchenrieder (1993).

Ecker, W., and M&z, S. (1993). System-Level Spe- cification and Design Using VHDL - A Case Study. Proc. CIIDL’S.9 - Computer Hardruam Description Languages and their Application, Ottawa, Canada, April 1993.

Edwards, M., Evaus, G., and Forrest, J. (1993). A Development System for Hardware/Software Co-Synthesis using FPGAs. In: Sedlmeier and Buchenrieder (1993).

Ernst, R., HenkeI, J., and Benner, T. (1993). Hardware-Software Cosynthesis for Microcon- trollers. IEEE Design and Test of Computers 10(4), 64 - 75.

Ghmz, W., Riissel, T., and Kruse, T. (1993). Hard- w~/Softw~e Co-Design with SDL. In: Sedl- meier and Buchenrieder (1993).

Gupta, R.K., and De Micheli, G. (1992). System Synthesis via Hardware-Software Co-Design. Technical Report CSGTR-92-548. Computer Systems Laboratory, Dept. Electrical Enginee- ring and Computer Science. Stanford Univer- sity.

Gupta, R.K., and De Micheh, G. (1993). Hardware- Software Cosynthesis for Digital Systems. IEEE Design and Teat of Computers 10(S), 29 - 41.

Gupta, R.K., Coelho, C.N., and De Micbeh, G. (1994). Program Implementation Schemes for Hardware-Software Systems. IEEE Computer

27(l), 48 - 55.

i-Logix (1992a). Statemote. Product information. i-logix Inc., Burlington, Mass.

i-Logix (19928). EzpressV-HDL. Product informa- tion. i-logix Inc., Burlington, Mass.

Kumar, S., Aylor, J.H., Johnson, B.W., and Wulf, W.A. (1993). A Fiamework for Hard- ware/Software Codesign. IEEE Computer 26(12), 39 - 45.

Menchini, P.J. (1993). An Introduction to VHDL. In: Mermet (1993), 359 - 384.

Page 6: A note on hardware-software codesign

Mermet, J.P., ed. (1993). fundamentals and

Standardj in Hardwafe Description Languages. NATO AS1 Series E, Vol. 249. Proc. NATO Advanced Study Institute. ApriI 16 - 26, 1993, I1 Ciocco, Barga, Italy. KIuwer, Do&e&t.

Navabi, Z. (1992). A High-Level Language for De- sign and Mode&g of Hardware. The Journal of Systems and Software 18, S-18.

Navabi, Z. (1993). VHDL - Analysis and Modelling of Digital Systems. McGraw-Hi& New York.

R-TECH (1993). ATAC 2.0. Ada Tasking Coprw cessor. Draft Data Sheet. Issue 0.99. R-TECH AB, Stockholm, Sweden.

Roes, J. (1991). Designing a Real-Time Coproces- sor for Ada Tasking. IEEE Design and Test of Computers S(l), 67 - 79.

Roes, J. (1994). Information on the Ada Tasking Coprocessor. Private Communication.

RozenbIit, J.W. (1993). A Note on CODES and CASH(E). In: SedImeier and Buchenrieder (1993).

Subrahmanyam, P.A., De MicheIi, G., and Buchen- rieder, K. (1993). Hardware-Software Code- sign. IEEE Computer 26(l), 84 - 87.

Scheuer, A., and Ecker, W. (1992). Semaphores in HW-Design. Proc. Spring’92 Meeting of the VHDL Forum for CAD Users in Europe.

SedImeier, A., and Buchenrieder, K., eds. (1993). Codes/CASHE ‘9% Handout to the Se- cond IFIP International Workshop on Hard- ware/Software Codesign. Innsbruck, Austria, 24 - 27 May 1993. Siemens AG, Munich.

synopsys (1993). SynUtesis. Preliminary TechnicaI Data Sheet, Version 3.0, Synopsis Inc., Moun- tain View, CA.

Tempelmeier, T. (1979). A Supplement~y Prc+ cessor for Operating System Functions. Proc. IFAC/IFIP Workshop on Real- Time Progmm- ming, Smolenice, CSSR, June 18 - 20, pub& hed as (Tempelmeier, 1980).

Tempelmeier, T. (1980a). Piidavn$ procesor pro fur&e opertim%o systimu. (In Czech). ASR-

SESITY INORGA 66,41- 50.

Tempelmeier, T. (198Ob). Anwortzeituerhalten ei- nes Echt%eit-R~hensystems bei Auslagerung des Betriebssystemkerns auf einen eigenen Pro- zessor. (Response Times of a Real-Time Sy- stem when transferring the Operating System Kernel to an Extra Processor. In German). Doctoral Dissertation. Technische Universitit Miinchen, Institute fiir Mathemat~ und Infor- matik, Bericht TUM - 18015, Oktober 1980.

Tempelmeier, T. (1982). Anwortzeituerhalten ei- nes Echtxej~-Rechensystems bei Auslagerung des Betriebssystemkerns auf einen eigenen Pro-

zessor. Teil 2: Mefiergebnisse. (Response Times of a Real-Time System when transfer- ring the Operating System Kernel to an Ex- tra Processor. Part 2: Measurements. In Ger- man). Tech&&e Universit&t Maven, Insti- tute fiir Mathematik und Informatik, Bericht TUM - 18201, Januar 1982.

Tempelmeier, T. (1984). Operating system proces- sors in real-time systems - performance analy- sis and measurement. Computer Performance 5(2), 121 - 127.

Tempelmeier, T. (1992). Some Critical Comments on HOOD. Pm. Second Symposium ‘Ada in

Aerospace ‘, F. Hass (ed.), 11 - 15 November 1991, PaIazzo Barberini, Rome, 343 - 353. Eu- respace, Paris.

Tempelmeier, T. (1994a). VHDL and Ada. Proc.

Fourth Symposium ‘Ada in Aerospace’, 8 - 11 November 1993, SAS Royal Hotel, Brussels. Eurospace, Paris. To appear.

Tempelmeier, T. (1994b). An Overview of the HOOD Software Design Method. Proc. NATO Advanced Study Institute on Real-Time Sy- stems, HaIang, W.A. and Stoyenko, A.D. (eds.), Sint Maarten, Dutch Antilles, 5 - 17 October 1992. To appear at Springer Verlag.

Thtiey, V. (1993). Review and Redesign of the EU- RECA Software. (In German. Appendix of 100 pages in English). Diploma thesis, Fachhoch- schule Rosenheim. Parts of this diploma thesis are identical to the ‘FinaI Report on ESTEC Contract EP/SB/l4.7/2738’, May 1993, of the European Space Agency (ESA).

Tzou, S.-J., Lim, J.-J., Menon, J., and Palmer D. (1993). A Distributed Development Environ- ment for Embedded Software. Software - Pmc- tice and Experience 23(11), 1235 - 1248.

V&r, E., and S&X&Z, P. (1993). Synthesis App Iications of VHDL. In: Mermet (1993), 231 - 262.

Wenban, A.S., O’Leary, J.W., and Brown, G.M. (1993). Codesign of Communication Protocols. IEEE Computer 26(12), 46 - 52.

Woo, N.S., Dunlop, A.E., and Wolf, W. (1994). Cc+ design from Cospecification. IEEE Computer 27(l), 42 - 47.

Company or product names are trademarks or re- gistered trademarks of their respective companies. HOOD is a trademark of the HOOD User Group.

126