This action might not be possible to undo. Are you sure you want to continue?
Silvije Jovalekic, Martin Rieger, Ralph Runge School of Information Technology and Engineering Fachhochschule Albstadt-Sigmaringen, 72458 Albstadt, Germany Abstract - In the School of Information Technology and
Engineering a microcomputer incorporating a real-time operating system has been designed to be used in various laboratory projects. The hardware is composed mainly of standard components like MC68332 processor and memory modules. The memory controller and a multiport unit have been designed using VHDL and are realised with EPLDs. The background debug mode facility of the processor enabled the fast and successful development from scratch. The real-time operating system was designed to be lean, yet including sufficient features to solve real world problems. It was developed incrementally using object oriented methods. The requirements, development methodology and experience gained during its development in several undergraduate research projects are described in detail including the specification process, creation of user manuals, testing procedures and benchmarks. The work presented here was carried out mostly by undergraduate students in their final projects. The laboratory staff were involved in the specification, design and supervision. The system is therefore a reflection of the capabilities of our students.
Requirements and Methodology For the Microcomputer Platform
An investigation of planned applications in conjunction with several industrial partners revealed the following requirements for the microcomputer platform. A CPU of moderate speed and 32 bit architecture should be used. The memory demands of modern object-oriented software is steadily increasing and more than 1 MByte is mandatory. For memory sizes of this order, standard dynamic RAM (DRAM) is recommended. The DRAM has to be interfaced with a DRAM controller. To interface with the user and with the technical process, several serial and parallel ports are needed. The development of the microcomputer platform is greatly simplified if a microprocessor with a background debug mode (BDM) facility is used. The BDM offers facilities similar to an emulator: run/halt/single step of the CPU, register reading and setting, memory reading and setting. One advantage of the BDM interface over an emulator is its much lower price. Figure 1 shows the environment for the development of the microcomputer platform. From various workstations and PCs in the laboratory one can access the microcomputer platform via the local area network and a BDM interface. Due to BDM facilities we could start with the microprocessor only. By adding one component after another we developed the microcomputer system incrementally. Initially, no serial interface was available for the platform, and the download of the software and the debugging was performed via BDM. The software has been designed mostly on a HPworkstation with a C/C++ cross compiler. Some parts of the software like the user interface, data structures and algorithms were tested with a simulator on the workstation. For tests involving real-time aspects and those related to the technical process the software is downloaded via the local area network and the BDM to the platform.
Embedded systems are of great importance for many products in industry. They are vital for automotive systems, communication equipment and safety systems. , , . Embedded systems are taught in the second and third year undergraduate courses. Lectures on ″MicroComputing″, ″Software Engineering″ and ″Real-Time Systems″ form a good base for engineering education in this field. The lectures are supplemented by laboratory projects, which help the students to acquire an in-depth understanding of embedded systems . Our experience with these dedicated projects was similar to those reported in . The students participated very enthusiastically and gained experience of areas like project management and software quality assurance in addition. Commercial microcomputers running embedded controller software applications are often not suitable for laboratory projects. Projects focusing on the construction of embedded systems from components can seldom be realised using standard platforms alone. Commercial systems require intensive training and often contain many unknown technical details. A highly flexible platform is required to support different application areas. Therefore we decided to design a microcomputer platform tailored to our needs and flexible enough for future extensions.
The microprocessor MC68332 is used. validation & generalisation. − provision of user manuals in standard form. Only a small EPROM is needed for the start up software as the real-time operating system and the application software are downloaded from a server into the DRAM module of 8 MBytes. showing good and reliable performance also in the case of operation with maximum speed. The reset process resets the processor and . It is used to describe the inheritance and association between classes as well. − design of the kernel and the operating functions by means of object-oriented methods. The benefit of adopting this model is early availability of high quality pro- Hardware of the Microcomputer Platform Figure 3 shows the block diagram of the microcomputer platform. design. The deployed methodology consists of several practical techniques which complement each other. After a short period of time the students as project engineers use them very effectively to construct high quality software. which is dedicated for embedded applications. Each new cluster represents a part of the operating system. Figure 2 shows the phases of the extended cluster model.Interfaces Port Technical Process totypes fulfilling the users needs which are ready for testing and benchmarking. At the same time project management is greatly improved and simplified. which are developed according to the traditional model for software development consisting of the phases specification. It consists of a CPU with moderate power (10 MIPS) and 32 bit architecture. the reset logic and the parallel IO port have been designed in VHDL and are implemented with an erasable programmable logic device (EPLD) as depicted in figure 4. development phase release testing cluster #n 1 2 3 4 1 2 3 4 1 user manuals 2 design 3 implementation & testing 4 validation & generalisation local area network Figure 1. In a first step the hardware is constructed with wire wrapping. The DRAM controller.Development Workstations Background Debug Interface Microcomputer Platform with Real-Time Operating System BMD. release testing and validation of the whole system. The use of VHDL fits in very well with the way students of Information Technology are used in thinking. a BDM interface. hardware/software codesign methods are used to enable parallel development of hardware and software. a serial port. which works with already completed clusters. The whole system has to be divided into coherent clusters. Additionally a SRAM is implemented. After the review of the manuals the design and implementation is performed straight away. We extended it by two additional phases: requirements specification. Requirements and Methodology For the Software Development During the planning stage the following requirements regarding the construction of the real-time operating system were considered important: − hardware-independence. The learning curve of the described methods proved to be very steep. a chip select logic and several timers . − minimal set of operating system functions to solve real world problems. cluster #1 requirements Figure 2. Reaching a certain maturity level. User manuals are developed in a structured manner following the UNIX documentation style. the circuit is built up as a printed circuit board. an on-chip SRAM of 2 kByte. It helps to identify the element functions and hidden data elements of the classes and to specify the parameters graphically. The application specific part of the hardware is implemented by means of the programming language VHDL in Programmable Logic Devices (PLD). in close cooperation with the customer. several parallel IO-ports. clusterwise. − incremental development and project management. implementation & testing. − high reliability of the software. In VHDL concurrent actions can be described by parallel processes. The hardware is mainly composed of standard components. The user can control the system via a terminal attached to the serial port. The software cluster development model is used . They are developed at the beginning of the project. The access to the technical process is through two parallel ports. Environment of the Microcomputer Platform As far as possible. allowing easily modifications. Extended cluster model Object-oriented structured design (OOSD) is used for the design of cluster’s classes . They are easy to learn and provide useful provisional results during the developmental stages.
. dynamic priorities. The subsystems contain the following clusters: − time management. Design of the Real-Time Operating System Microprocessor MC68332 SRAM 2*32kByte DRAM Controller Parallel Port IO BDM Interface Serial Interface Serial Port Reset Logic EPROM 32KByte DRAM Module 8 MByte Parallel Interface 2*Parallel Port Hardware-independence of the real-time operating system can be achieved by the construction of a hardware wrapper. The board can be used in a plug-in system together with additional modules such as an Ethernet card. Architecture of the EPLD RAS/CAS and MUX is achieved in a clock driven state machine. − interrupt management. that a subsystem under development uses and relies on services of already developed subsystems. . Class Hierarchy: none Constructors: Task(uint prio=MINPRIO.. Specification of the class Task At the very beginning of the project the whole system was partitioned into 3 subsystems consisting of clusters and constructed according to the outlined development methodology. At each stage of the project an applicable operating system with reduced functionality was available for quality assurance and testing in real applications. .sets the configuration parameters. It consists of classes whose member functions wrap the timer needed to realise the real-time clock and other hardware components . Public methods: declare.. The DRAM controller has to interface the DRAM module to the data bus and the address bus for normal read and write operations and has to trigger the refresh at given time intervals. The parallel port unit can be configData Bus Adress Bus the data bus and the address bus are supplied with a connector. Description: . software timer. dispatcher. The subsystems were defined in the planning phase in such a way. The time interval is easily produced by a counter which works with the processor clock.. Destructor: ∼Task(). bus width as soon as the reset button is pressed or when the supply voltage is below a certain level.. an analogdigital-converter card or an ISDN card. task management.. Task declare activate Figure 3. Block diagram of the microcomputer pla tform ured via the data bus and each pin can be programmed separately as input or output. semaphores. The correct timing of Configuration of Processor Reset Processor Process Reset Port A Port B Process Parallel Port Adress Bus Data Bus class Task ~Task task control block Power Reset Low Button Process Refresh counter Clock Refresh Cycle Adress Bus Name: Task User Manual Outline Synopsis: . The control bus. g. delete. Protected methods: none Protected data: none Pure virtual methods: none Figure 5. uint stackSize=DEF_STACK). The platform is realised on a two layer printed circuit board of Euro format (100mm by 160mm). e. − queues. Process DRAM State Machine RAS/CAS MUX Process Adress Multiplexer Multiplexed Adress Figure 4. device management. All other software components of the realtime operating system MEBS (Mini-Echtzeit-BetriebsSystem) developed at our School use this high level hardware abstraction through well defined and constructed interfaces.
real-time operating system. Experiences and Recommendations During the last four years we have been involved in undergraduate research and development projects. at given intervals and at a specified interrupt. Subsequent versions concentrating on portability and design quality rather than functionality achieved very high levels of hardware-independence. Besides learning new technology they have to present the result of their work as tutors to other students and technical staff. discussions. Temperature Temperature Measurement. The heating system is controlled by a pulse width modulated (PWM) heating interface. WindowSensor WindowSensor Room 1 Room 2 Applications Figure 6 shows an application for the designed platform used in a laboratory project. AD Converter Heating Interface Sensor Interface Parallel Port Data Bus Adress Bus Control Bus WindowSensor WindowSensor Room 3 Room 4 Temperature Temperature Measurement. Several features of the hardware can be reconfigured by EPLD reprogramming: e. Project management was formally supported by the project book containing early plans. Our experience is that the listed methods are useful both for the development of the system software. e. Figure 6. Additionally each room has a window sensor to check if a window is open. In each room the temperature is measured and the heating is controlled according to the desired room temperature. designs. VRTX. As soon as a window is opened. The authors have used the MC68030/25MHz processor for the benchmarks. implementation details. Comparison of benchmark results Benchmark Interrupt Response Suspend/resume Task Semaphore Get/release Queue ping MEBS Comm. At the start of the project no object-oriented programming environment for embedded systems was available at the School. The analogue values of the temperature sensors are digitised by an AD converter from which the digital values can be read by the microcomputer. like pSOS+. Nevertheless the designs were done graphically by means of Object-Oriented Structured Design. We recommend it strongly for independent work in R&D projects. Measurement. Prototypes for the processors MC68000 and Intel 80486 are available . and for the embedded application software. port function. In order to achieve hardware-independence. The students get the opportunity to do their first research and development for half a . Table 1. Clear definitions of interfaces improved software quality and reliability. the alarm system. The technical process consists of a house model with four rooms. The objective of these projects is to develop the components for the construction of embedded systems.The kernel provides preemptive priority-driven scheduling of tasks. At the first try MEBS contained many processor and environment specific lines of code. Figure 5 shows the outline of the user manual and the OOSD class diagram for the class Task. Systems MC68000/12MHz MC 68030/25Mhz 522 µs 50-343 µs 619 µs 90-182 µs 210 µs 8-64 µs 796 µs 230-900 µs year under similar conditions as in the industry. Measurement. Benchmarks from independent sources for commercially available real-time operating systems are found in . Equal priority tasks are scheduled in fixed time slices set by the real-time clock. the assigned window sensor releases an alarm. special efforts and software engineering experience are required. g. the user interface and the visualisation in synchronised and communicating tasks. Object-oriented support for the implementation phase is also very valuable. while MEBS was benchmarked with the MC68000/12MHz processor which is 3 to 4 times slower. test plans and schedules.g. Table 1 compares MEBS with leading operating systems. For example the method activate is capable of scheduling the tasks in absolute time. mode of AD converter. Example for the Application for the Micr ocomputer Platform with Real-Time Operating System Incremental software development proved to be very important for the success of the projects. which is part of the task management cluster. In the laboratory project the students have to design software for temperature control.
Knittel. 1989. Prentice Hall. The hardware was developed by three students over a period of 18 month. 7) Wasserman. November 6-9. 11) Rieger. "Objektorientierte Softwarekonstruktion für Echtzeitsysteme". M.W. 9) Jovalekic. "Automotive electrical systems circa 2005". M.. The system has been used in project-oriented software engineering education for several years . Karlsruhe 20-22 Juni 1995.. ISBN 3924651-46-9. Our colleague Sati McKenzie from the University of Greenwich made constructive comments on this paper and helped with translation problems. Utah. The use of well understood in-house hardware results in a better understanding of the interaction of hardware and software in embedded systems. testing. 15-16. Peter Knittel provided several robust prototypes of the real time operating system. 10) Fritch. Acknowledgements Many persons contributed to this project over the past several years.. H. "Fieldbus brings Protocol to Process Control".. Hurton. 5) Ohlsson. Realization. versatile and easy to use for many applications. EnglewoodCliffs. 1996.G. August 1995. References 1) Kassakian. FH Ravensburg-Weingarten.... P. "Betriebssysteme auf dem Prüfstand". Roland Gröber and Andreas Singer from our staff gave steady and substantial support at all stages of the project. January 1991. benchmarking. S. Aug 1996. Several redesigns to achieve this objective are not feasible in our environment. pp 25-39.. "Design Issues for Interactive Television Systems". Another benefit results is increased support during release testing. S. writing manuals and porting it to other software development and hardware platforms. 34. These projects keep the laboratories alive. W. A. they help the School to maintain its profile at special national research meetings and exhibitions . J.. Spectrum IEEE.. Paul Heger and .295. 2) Santori. D. The integrated final year undergraduate student project is of great benefit to all parties involved: students. 33.. pp 13-21. P. that electronic design with VHDL and software development fit in very well with the study of Information Technology. "Project-Oriented Approach to Software Engineering Education in a Multidisciplinary Environment: Objectives. USA. Elektronik. Wolf. N.I. L. The Motorola MC68332 Microcontroller. 38..-Ch. The availability of portable class libraries like Standard Template Library (STL) would allow increased complexity. Object-oriented Software Construction.. "A Practice Driven Approach to Software Engineering Education".Minimality of operating functions as a specification objective influenced the software quality positively. vol.. Edwin Schiemann worked on the early version of the microcomputer platform. F. Prentice-Hall International. Moreover the students learn how to adapt the hardware according to changes in the requirements. K. Early provision of user manuals in standard form enables user input to the design process. Rodriguez.. T. R. Proceedings Echtzeit’95. Computer Language. vol.. vol. Besides. May 1995. Miller. pp 22-27. Kitson. 6) Meyer. 8) Harman. Cardoza. Johansson.. Peter Stumfol. 3) Furht. S. J. Six students were involved in the development of MEBS over the period of two years. A. very dynamic and interesting to other students and associated industry partners. pp 291. They are the basis of transfer of know-how between the university and companies.. März 1995. 28. Increased functionality of the operating system would have a detrimental effect on the quality of software. School and industry partners. resulting in a platform that is powerful...A.. due to the interactions between software components. designing. Zech. vol. IEEE Computer. B... pp 60-64. "Object-Oriented Structured Design and C++".J. March 1996. This was done incrementally in stages. Pircher. 1991. It turned out.. Spectrum IEEE. Jovalekic. C. Ch. Salt Lake City. Kalra. Frontiers in Education Conference. Juli 1992. Evaluation". Wall. "2. D.. Research Exhibition". implementing. B. IEEE Transactions on Education. 4) Jovalekic. Markus Bachmann. spending about 2500 hours specifying.