0% found this document useful (0 votes)
84 views

Real Time Processing

Design of a Microcomputer Platform with Real-Time Operating System for Laboratory Projects 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 MC6833

Uploaded by

scribting
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
84 views

Real Time Processing

Design of a Microcomputer Platform with Real-Time Operating System for Laboratory Projects 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 MC6833

Uploaded by

scribting
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Design of a Microcomputer Platform with Real-Time

Operating System for Laboratory Projects


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 The work presented here was carried out mostly by un-
Engineering a microcomputer incorporating a real-time dergraduate students in their final projects. The laboratory
operating system has been designed to be used in various staff were involved in the specification, design and supervi-
laboratory projects. The hardware is composed mainly of sion. The system is therefore a reflection of the capabilities
standard components like MC68332 processor and memory of our students.
modules. The memory controller and a multiport unit have
been designed using VHDL and are realised with EPLDs. Requirements and Methodology For the
The background debug mode facility of the processor en- Microcomputer Platform
abled the fast and successful development from scratch. The
real-time operating system was designed to be lean, yet An investigation of planned applications in conjunction with
including sufficient features to solve real world problems. It several industrial partners revealed the following require-
was developed incrementally using object oriented methods. ments for the microcomputer platform. A CPU of moderate
The requirements, development methodology and experience speed and 32 bit architecture should be used. The memory
gained during its development in several undergraduate demands of modern object-oriented software is steadily
research projects are described in detail including the increasing and more than 1 MByte is mandatory. For mem-
specification process, creation of user manuals, testing pro- ory sizes of this order, standard dynamic RAM (DRAM) is
cedures and benchmarks. recommended. The DRAM has to be interfaced with a
DRAM controller. To interface with the user and with the
Introduction technical process, several serial and parallel ports are
needed.
Embedded systems are of great importance for many prod- The development of the microcomputer platform is
ucts in industry. They are vital for automotive systems, greatly simplified if a microprocessor with a background
communication equipment and safety systems. [1], [2], [3]. debug mode (BDM) facility is used. The BDM offers facili-
Embedded systems are taught in the second and third ties similar to an emulator: run/halt/single step of the CPU,
year undergraduate courses. Lectures on ″Micro- register reading and setting, memory reading and setting.
Computing″, ″Software Engineering″ and ″Real-Time Sys- One advantage of the BDM interface over an emulator is its
tems″ form a good base for engineering education in this much lower price.
field. The lectures are supplemented by laboratory projects, Figure 1 shows the environment for the development of
which help the students to acquire an in-depth understanding the microcomputer platform. From various workstations and
of embedded systems [4]. Our experience with these dedi- PCs in the laboratory one can access the microcomputer
cated projects was similar to those reported in [5]. The stu- platform via the local area network and a BDM interface.
dents participated very enthusiastically and gained experi- Due to BDM facilities we could start with the microproces-
ence of areas like project management and software quality sor only. By adding one component after another we devel-
assurance in addition. oped the microcomputer system incrementally. Initially, no
Commercial microcomputers running embedded con- serial interface was available for the platform, and the
troller software applications are often not suitable for labo- download of the software and the debugging was performed
ratory projects. Projects focusing on the construction of via BDM.
embedded systems from components can seldom be realised The software has been designed mostly on a HP-
using standard platforms alone. Commercial systems require workstation with a C/C++ cross compiler. Some parts of the
intensive training and often contain many unknown technical software like the user interface, data structures and algo-
details. A highly flexible platform is required to support rithms were tested with a simulator on the workstation. For
different application areas. Therefore we decided to design a tests involving real-time aspects and those related to the
microcomputer platform tailored to our needs and flexible technical process the software is downloaded via the local
enough for future extensions. area network and the BDM to the platform.
Microcomputer totypes fulfilling the users needs which are ready for testing
Platform with and benchmarking.
Real-Time
Development Background Operating System development phase
Workstations Debug BMD- Interfaces
Interface Port Technical release
Process testing
1 2 3 4
cluster #n
1 user manuals
local area network 1 2 3 4 2 design
cluster #1
3 implementation & testing
Figure 1. Environment of the Microcomputer Platform require- 4 validation & generalisation
ments
As far as possible, hardware/software codesign methods
are used to enable parallel development of hardware and Figure 2. Extended cluster model
software. The application specific part of the hardware is
implemented by means of the programming language VHDL Object-oriented structured design (OOSD) is used for the
in Programmable Logic Devices (PLD). The use of VHDL design of cluster’s classes [7]. It helps to identify the element
fits in very well with the way students of Information Tech- functions and hidden data elements of the classes and to
nology are used in thinking. In a first step the hardware is specify the parameters graphically. It is used to describe the
constructed with wire wrapping, allowing easily modifica- inheritance and association between classes as well.
tions. Reaching a certain maturity level, the circuit is built up User manuals are developed in a structured manner fol-
as a printed circuit board, showing good and reliable per- lowing the UNIX documentation style. They are developed
formance also in the case of operation with maximum speed. at the beginning of the project, clusterwise, in close co-
operation with the customer. After the review of the manuals
Requirements and Methodology the design and implementation is performed straight away.
For the Software Development The learning curve of the described methods proved to be
very steep. After a short period of time the students as proj-
ect engineers use them very effectively to construct high
During the planning stage the following requirements re- quality software. At the same time project management is
garding the construction of the real-time operating system greatly improved and simplified.
were considered important:
− hardware-independence,
− minimal set of operating system functions to solve real Hardware of the Microcomputer Platform
world problems,
− design of the kernel and the operating functions by means Figure 3 shows the block diagram of the microcomputer
of object-oriented methods, platform. The hardware is mainly composed of standard
− incremental development and project management, components. The microprocessor MC68332 is used, which is
− provision of user manuals in standard form, dedicated for embedded applications. It consists of a CPU
− high reliability of the software. with moderate power (10 MIPS) and 32 bit architecture, a
The deployed methodology consists of several practical BDM interface, an on-chip SRAM of 2 kByte, a serial port,
techniques which complement each other. They are easy to several parallel IO-ports, a chip select logic and several
learn and provide useful provisional results during the devel- timers [8].
opmental stages. Only a small EPROM is needed for the start up software
The software cluster development model is used [6]. The as the real-time operating system and the application soft-
whole system has to be divided into coherent clusters, which ware are downloaded from a server into the DRAM module
are developed according to the traditional model for software of 8 MBytes. Additionally a SRAM is implemented. The
development consisting of the phases specification, design, user can control the system via a terminal attached to the
implementation & testing, validation & generalisation. Each serial port. The access to the technical process is through two
new cluster represents a part of the operating system, which parallel ports.
works with already completed clusters. We extended it by The DRAM controller, the reset logic and the parallel IO
two additional phases: requirements specification, release port have been designed in VHDL and are implemented with
testing and validation of the whole system. Figure 2 shows an erasable programmable logic device (EPLD) as depicted
the phases of the extended cluster model. The benefit of in figure 4. In VHDL concurrent actions can be described by
adopting this model is early availability of high quality pro- parallel processes. The reset process resets the processor and
sets the configuration parameters, e. g. bus width as soon as the data bus and the address bus are supplied with a connec-
the reset button is pressed or when the supply voltage is tor. The board can be used in a plug-in system together with
below a certain level. The parallel port unit can be config- additional modules such as an Ethernet card, an analog-
digital-converter card or an ISDN card.
Data Bus
Adress Bus
Design of the Real-Time Operating System
SRAM DRAM Parallel
Microprocessor
2*32kByte Controller Port IO
Hardware-independence of the real-time operating system
MC68332
can be achieved by the construction of a hardware wrapper.
It consists of classes whose member functions wrap the timer
BDM Interface
needed to realise the real-time clock and other hardware
DRAM
components [9]. All other software components of the real-
Serial Reset EPROM Parallel
Interface Logic 32KByte
Module
Interface
time operating system MEBS (Mini-Echtzeit-Betriebs-
8 MByte
System) developed at our School use this high level hard-
Serial
Port
2*Parallel ware abstraction through well defined and constructed inter-
Port
faces.
Figure 3. Block diagram of the microcomputer pla tform
Task
class
ured via the data bus and each pin can be programmed sepa- Task
declare
rately as input or output.
The DRAM controller has to interface the DRAM mod- activate
ule to the data bus and the address bus for normal read and
write operations and has to trigger the refresh at given time task control
intervals. The time interval is easily produced by a counter block
~Task
which works with the processor clock. The correct timing of

Configuration Port A
of Processor Name: Task
Port B Synopsis: ... User Manual Outline
Reset
Processor
Description: ...
Class Hierarchy: none
Process Reset Process Constructors: Task(uint prio=MINPRIO,
Parallel Port uint stackSize=DEF_STACK);
Public methods: declare, delete, ...
Power Reset Adress Data Destructor: ∼Task();
Low Button Bus Bus Protected methods: none
Protected data: none
Pure virtual methods: none
Process Adress
Refresh counter Bus
Figure 5. Specification of the class Task
Clock Refresh
Cycle
At the very beginning of the project the whole system
was partitioned into 3 subsystems consisting of clusters and
Process Process
DRAM State Machine Adress Multiplexer constructed according to the outlined development method-
ology. The subsystems were defined in the planning phase in
RAS/CAS Multiplexed such a way, that a subsystem under development uses and
MUX Adress
relies on services of already developed subsystems. At each
stage of the project an applicable operating system with
reduced functionality was available for quality assurance and
Figure 4. Architecture of the EPLD
testing in real applications. The subsystems contain the fol-
RAS/CAS and MUX is achieved in a clock driven state ma- lowing clusters:
chine. − time management, task management, dispatcher;
The platform is realised on a two layer printed circuit − interrupt management, device management, semaphores;
board of Euro format (100mm by 160mm). The control bus, − queues, software timer, dynamic priorities.
The kernel provides preemptive priority-driven schedul- year under similar conditions as in the industry. Besides
ing of tasks. Equal priority tasks are scheduled in fixed time learning new technology they have to present the result of
slices set by the real-time clock. Figure 5 shows the outline their work as tutors to other students and technical staff.
of the user manual and the OOSD class diagram for the class
Task, which is part of the task management cluster. For
AD Converter
example the method activate is capable of scheduling Parallel
the tasks in absolute time, at given intervals and at a speci- Heating Interface Port
fied interrupt. Data Bus
Benchmarks from independent sources for commercially Adress Bus
Sensor Interface
available real-time operating systems are found in [10]. The Control Bus
authors have used the MC68030/25MHz processor for the
benchmarks, while MEBS was benchmarked with the
MC68000/12MHz processor which is 3 to 4 times slower.
Table 1 compares MEBS with leading operating systems,
like pSOS+, VRTX.
Window- Window-
Sensor Sensor
Table 1. Comparison of benchmark results
Room Room
Benchmark MEBS Comm. Systems 3 4
MC68000/12MHz MC 68030/25Mhz Temperature Temperature
Measurement. Measurement.
Interrupt Response 522 µs 50-343 µs
Suspend/resume Task 619 µs 90-182 µs Window- Window-
Semaphore Get/release 210 µs 8-64 µs Sensor Sensor
Room Room
Queue ping 796 µs 230-900 µs
1 2
Temperature Temperature
Applications Measurement. Measurement.

Figure 6 shows an application for the designed platform used


in a laboratory project. The technical process consists of a Figure 6. Example for the Application for the Micr o-
house model with four rooms. In each room the temperature computer Platform with Real-Time Operating System
is measured and the heating is controlled according to the
desired room temperature. Additionally each room has a Incremental software development proved to be very im-
window sensor to check if a window is open. The analogue portant for the success of the projects. Our experience is that
values of the temperature sensors are digitised by an AD the listed methods are useful both for the development of the
converter from which the digital values can be read by the system software, e.g. real-time operating system, and for the
microcomputer. The heating system is controlled by a pulse embedded application software. Project management was
width modulated (PWM) heating interface. As soon as a formally supported by the project book containing early
window is opened, the assigned window sensor releases an plans, designs, discussions, implementation details, test plans
alarm. and schedules. We recommend it strongly for independent
In the laboratory project the students have to design work in R&D projects.
software for temperature control, the alarm system, the user In order to achieve hardware-independence, special ef-
interface and the visualisation in synchronised and commu- forts and software engineering experience are required. At
nicating tasks. Several features of the hardware can be recon- the first try MEBS contained many processor and environ-
figured by EPLD reprogramming: e. g. mode of AD con- ment specific lines of code. Subsequent versions concen-
verter, port function. trating on portability and design quality rather than function-
ality achieved very high levels of hardware-independence.
Prototypes for the processors MC68000 and Intel 80486 are
Experiences and Recommendations available [9]. At the start of the project no object-oriented
programming environment for embedded systems was avail-
During the last four years we have been involved in under- able at the School. Nevertheless the designs were done
graduate research and development projects. The objective graphically by means of Object-Oriented Structured Design.
of these projects is to develop the components for the con- Clear definitions of interfaces improved software quality and
struction of embedded systems. The students get the oppor- reliability. Object-oriented support for the implementation
tunity to do their first research and development for half a phase is also very valuable.
Minimality of operating functions as a specification ob- Peter Knittel provided several robust prototypes of the real
jective influenced the software quality positively. Increased time operating system. Edwin Schiemann worked on the
functionality of the operating system would have a detri- early version of the microcomputer platform. Our colleague
mental effect on the quality of software, due to the interac- Sati McKenzie from the University of Greenwich made con-
tions between software components. Several redesigns to structive comments on this paper and helped with translation
achieve this objective are not feasible in our environment. problems.
The availability of portable class libraries like Standard
Template Library (STL) would allow increased complexity. References
Early provision of user manuals in standard form enables
user input to the design process. Another benefit results is
increased support during release testing. 1) Kassakian, J., Wolf, H.-Ch., Miller, J., Hurton, Ch.,
The use of well understood in-house hardware results in a "Automotive electrical systems circa 2005", Spectrum
better understanding of the interaction of hardware and soft- IEEE, vol. 34, pp 22-27, Aug 1996.
ware in embedded systems. Moreover the students learn how 2) Santori, M., Zech, K., "Fieldbus brings Protocol to
to adapt the hardware according to changes in the require- Process Control", Spectrum IEEE, vol. 33, pp 60-64,
ments. It turned out, that electronic design with VHDL and March 1996.
software development fit in very well with the study of In- 3) Furht, B., Kalra, D., Kitson, F., Rodriguez, A., Wall,
formation Technology. W., "Design Issues for Interactive Television Systems",
The integrated final year undergraduate student project is IEEE Computer, vol. 28, pp 25-39, May 1995.
of great benefit to all parties involved: students, School and 4) Jovalekic, S., "Project-Oriented Approach to Software
industry partners. These projects keep the laboratories alive, Engineering Education in a Multidisciplinary Environ-
very dynamic and interesting to other students and associated ment: Objectives, Realization, Evaluation", Frontiers in
industry partners. They are the basis of transfer of know-how Education Conference, Salt Lake City, Utah, USA, No-
between the university and companies. Besides, they help the vember 6-9, 1996.
School to maintain its profile at special national research 5) Ohlsson, L., Johansson, C., "A Practice Driven Ap-
meetings and exhibitions [11]. proach to Software Engineering Education", IEEE
The hardware was developed by three students over a pe- Transactions on Education, vol. 38, pp 291- 295,
riod of 18 month. This was done incrementally in stages, August 1995.
resulting in a platform that is powerful, versatile and easy to 6) Meyer, B., Object-oriented Software Construction,
use for many applications. Six students were involved in the Prentice-Hall International, 1989.
development of MEBS over the period of two years, spend- 7) Wasserman, A.I., Pircher, P.A., "Object-Oriented
ing about 2500 hours specifying, designing, implementing, Structured Design and C++", Computer Language,
testing, benchmarking, writing manuals and porting it to January 1991.
other software development and hardware platforms. The 8) Harman, T., The Motorola MC68332 Microcontroller,
system has been used in project-oriented software engineer- Prentice Hall, EnglewoodCliffs, N.J., 1991.
ing education for several years [4]. 9) Jovalekic, S., Knittel, P., "Objektorientierte Software-
konstruktion für Echtzeitsysteme", Proceedings
Echtzeit’95, Karlsruhe 20-22 Juni 1995, ISBN 3-
Acknowledgements 924651-46-9, pp 13-21.
10) Fritch, D.G., Cardoza, R.W., "Betriebssysteme auf dem
Many persons contributed to this project over the past Prüfstand", Elektronik, Juli 1992.
several years. Peter Stumfol, Roland Gröber and Andreas 11) Rieger, M., Jovalekic, S., "2. Research Exhibition", FH
Singer from our staff gave steady and substantial support at Ravensburg-Weingarten, 15-16. März 1995.
all stages of the project. Markus Bachmann, Paul Heger and

You might also like