Introduction Software engineering for real-time systems Objectives To: Section 1 Introduction to real-time systems Outline the differences between general-purpose applications and real-time systems. Give an overview of practical real-time system structures. Describe some key environmental and performance requirements of embedded real-time s. Describe the structures of modern microprocessors and micros. SOFTWARE ENGINEERING for REAL-TIME SYSTEMS ( J.E.Cooling 2003) Introduction to real-time systems - slide 1 SOFTWARE ENGINEERING for REAL-TIME SYSTEMS ( J.E.Cooling 2003) Introduction to real-time systems - slide 2 A modern batch system Typical interactive on-line system Local multiplexer Site 1 Local site Remote site Remote site Central (mainframe) Fibre-optic data link Local multiplexer Site 2 Fibre-optic communication unit Fibre-optic communication unit Cray super SOFTWARE ENGINEERING for REAL-TIME SYSTEMS ( J.E.Cooling 2003) Introduction to real-time systems - slide 3 SOFTWARE ENGINEERING for REAL-TIME SYSTEMS ( J.E.Cooling 2003) Introduction to real-time systems - slide 4 A real-time system Categorizing real-time systems Control panel SLOW FAST SOFT Machinery condition monitoring Man-Machine Interfacing Control Power unit Vehicle sensors HARD Missile point defence system Airbag control system Two major categorization factors: criticality and speed. Criticality: Hard systems - deadlines (responsiveness) is critical. Failure to meet these have severe consequences (e.g. injury, damage or death). Soft systems - deadlines are less critical; in many cases significant tolerance can be permitted. Speed: Fast systems - responses in the microseconds to hundreds of milliseconds. Slow systems - responses in the range seconds to days. Arbitrary boundary: 1 second (chosen because the problems shift from individual computing issues to overall system behaviour and interaction at around this point). SOFTWARE ENGINEERING for REAL-TIME SYSTEMS ( J.E.Cooling 2003) Introduction to real-time systems - slide 5 SOFTWARE ENGINEERING for REAL-TIME SYSTEMS ( J.E.Cooling 2003) Introduction to real-time systems - slide 6 1
Attributes of real-time systems Telemetry control system Execution Deadlines Software Software time size complexity Hard - Fast Hard - Slow Soft - Fast Soft - Slow Remote plant 1 Microprocessor-based outstation Sensors Data collection Control functions Actuators Communication Remote plant 2 Wireless communication link (100 miles) Attribute rating Low high Major attributes of real-time systems. For hard systems emphasis is placed on the need to meet deadlines. Hard-fast systems tend to have low software complexity. For soft-fast systems emphasis is put on computation performance. In general soft systems tend to be the more complex ones (from a software perspective). Land line communication link (10 miles) Central control room Front-end communication Main control Hot standby control Local area network Management Operator display Data logging information and controls SOFTWARE ENGINEERING for REAL-TIME SYSTEMS ( J.E.Cooling 2003) Introduction to real-time systems - slide 7 SOFTWARE ENGINEERING for REAL-TIME SYSTEMS ( J.E.Cooling 2003) Introduction to real-time systems - slide 8 Sea Skua missile system Submarine control console SOFTWARE ENGINEERING for REAL-TIME SYSTEMS ( J.E.Cooling 2003) Introduction to real-time systems - slide 9 SOFTWARE ENGINEERING for REAL-TIME SYSTEMS ( J.E.Cooling 2003) Introduction to real-time systems - slide 10 Typical avionic platforms Microprocessor-based vending machine units SOFTWARE ENGINEERING for REAL-TIME SYSTEMS ( J.E.Cooling 2003) Introduction to real-time systems - slide 11 SOFTWARE ENGINEERING for REAL-TIME SYSTEMS ( J.E.Cooling 2003) Introduction to real-time systems - slide 12 2
Consumer communications Embedded systems platforms Embedded systems platforms Bespoke designs Commercial off the shelf (COTS) equipment Board-based designs PC-based designs Vendor specific VME PC/104 Embedded PC Desktop PC Ruggedized PC SOFTWARE ENGINEERING for REAL-TIME SYSTEMS ( J.E.Cooling 2003) Introduction to real-time systems - slide 13 SOFTWARE ENGINEERING for REAL-TIME SYSTEMS ( J.E.Cooling 2003) Introduction to real-time systems - slide 14 Embedded systems characteristics Typical temperature specifications for real-time systems Embedded systems characteristics Defined by Environment Performance Interfacing Degrees centigrade -55 0 +50 +85 +125 +200 Industrial range Extended industrial range Physical Electricial Operational Speed of response Failure modes Military range Oil exploration Space exploration SOFTWARE ENGINEERING for REAL-TIME SYSTEMS ( J.E.Cooling 2003) Introduction to real-time systems - slide 15 SOFTWARE ENGINEERING for REAL-TIME SYSTEMS ( J.E.Cooling 2003) Introduction to real-time systems - slide 16 Computer loading - single synchronous (periodic) task Computer loading - single asynchronous (aperiodic) task T e T e T e Execute event task (E) processor idle (I) Execute event task (E) (I) Execute event task (E) (I) Time Event signal Event signal Event signal SOFTWARE ENGINEERING for REAL-TIME SYSTEMS ( J.E.Cooling 2003) Introduction to real-time systems - slide 17 SOFTWARE ENGINEERING for REAL-TIME SYSTEMS ( J.E.Cooling 2003) Introduction to real-time systems - slide 18 3
Computer loading - multiple asynchronous (aperiodic) tasks The computing elements of real-time systems (E1) = Event task 1 execution (E2) = Event task 2 execution (S1) = Event signal, task1 (S2) = Event signal, task 2 (I) = Idle (spare) time (W) = waiting time for task to complete (W) (E 1 ) (I) (E 1 ) (I) (E 2 ) (I) (E 1 ) (I) (E 1 ) (E 2 ) Time Computing elements General purpose computing Microprocessors Micros Digital signal General purpose Highly integrated Single chip Single chip processors microprocessors microprocessors micros micros (DSPs) Specialized computing Bespoke Mixed signal system-on-chip processors designs S 1 S 1 S 1 S 1 S 2 S 2 SOFTWARE ENGINEERING for REAL-TIME SYSTEMS ( J.E.Cooling 2003) Introduction to real-time systems - slide 19 SOFTWARE ENGINEERING for REAL-TIME SYSTEMS ( J.E.Cooling 2003) Introduction to real-time systems - slide 20 Elements of a micro system Timing in hardware Real-time clock Programmable timer To interrupt Control Chip select line SOFTWARE ENGINEERING for REAL-TIME SYSTEMS ( J.E.Cooling 2003) Introduction to real-time systems - slide 21 SOFTWARE ENGINEERING for REAL-TIME SYSTEMS ( J.E.Cooling 2003) Introduction to real-time systems - slide 22 The watchdog timer operation Write control decoder I/P Retriggerable timer (monostable) O/P To non-maskable interrupt External alarm (optional) Timeout Processor hold/ack Micro ROM Peripheral (a) Normal mode of operation request/ack O/P I/P ROM Peripheral request/ack Time (B) Fig.1.21 mode operation of operation SOFTWARE ENGINEERING for REAL-TIME SYSTEMS ( J.E.Cooling 2003) Introduction to real-time systems - slide 23 SOFTWARE ENGINEERING for REAL-TIME SYSTEMS ( J.E.Cooling 2003) Introduction to real-time systems - slide 24 4
Intelligent I/O processing I/O peripheral Local memory Main processor and control and control Programmable command register I/O port 8 lines Disk store Primary I/O processor Secondary Data Data buffer I/O port I/O port 8 lines 8 lines SOFTWARE ENGINEERING for REAL-TIME SYSTEMS ( J.E.Cooling 2003) Introduction to real-time systems - slide 25 SOFTWARE ENGINEERING for REAL-TIME SYSTEMS ( J.E.Cooling 2003) Introduction to real-time systems - slide 26 Highly integrated processor -Motorola MPC8240 Single chip micro - Philips Semiconductor 8052 Intelligent message (I 2 O) PowerPC 603e microprocessor core (including floating point maths unit) Clock Processor Hardware timers (3) I 2 C Interrupts Serial comms (I 2 C) Interrupt and timers Central control unit PCI unit Data path Memory PCI arbiter Data Memory Security ROM Program store (8kByte ROM) Data store (256 Bytes ) Interrupt Serial communication I/O ports (4) PCI Bus Bus request grant (5) (5) External SOFTWARE ENGINEERING for REAL-TIME SYSTEMS ( J.E.Cooling 2003) Introduction to real-time systems - slide 27 SOFTWARE ENGINEERING for REAL-TIME SYSTEMS ( J.E.Cooling 2003) Introduction to real-time systems - slide 28 Single chip micro - Fujitsu MB91F361 Digital signal processor structure Processor unit CPU Watchdog Interrupt Data (16 kbyte) Cache memory (1 kbyte) Sound generator LED driver GP Serial I/O I 2 C serial Boot ROM (2 kbyte) ADC (16) DAC (2) Bus Interrupt (8) CAN (3) Stepper motor control Real-time clock Flash (512 kbyte) Hardware timers (6) Pulse generator External Digital I/0 SOFTWARE ENGINEERING for REAL-TIME SYSTEMS ( J.E.Cooling 2003) Introduction to real-time systems - slide 29 SOFTWARE ENGINEERING for REAL-TIME SYSTEMS ( J.E.Cooling 2003) Introduction to real-time systems - slide 30 5
Mixed signal processor structure - Texas MSP430 Example system-on-a-chip (SOC) design Clock CPU (256 bytes) Debug Analogue comparator Custom coprocessor Processor core Custom I/O Custom peripherals and debug External Flash (256 bytes) Ports with interrupt facility (2) Custom MMU Power-on reset Watchdog timer PWM Timer ROM On-chip data (OCB) Custom powermanagement unit SOFTWARE ENGINEERING for REAL-TIME SYSTEMS ( J.E.Cooling 2003) Introduction to real-time systems - slide 31 SOFTWARE ENGINEERING for REAL-TIME SYSTEMS ( J.E.Cooling 2003) Introduction to real-time systems - slide 32 Review of Introduction to real-time systems Review of section You should now: Clearly understand the important features of real-time systems. Know what sets them apart from batch and interactive application. See how real-time systems may be categorized in terms of speed and criticality. Have a general understanding of the range of real-time (and especially embedded) applications. Realize that environmental and performance factors are key drivers in real-time systems design. Know the basic component parts of real-time units. Appreciate the essential differences between microprocessors, micros and micros. Realize why there is a large market for specialized processors. END OF SECTION Introduction to real-time systems SOFTWARE ENGINEERING for REAL-TIME SYSTEMS ( J.E.Cooling 2003) Introduction to real-time systems - slide 33 6