software engineering for real-time systems (© j.e.cooling 2003) introduction to real-time systems -...
Post on 21-Dec-2015
237 views
TRANSCRIPT
SOFTWARE ENGINEERING for REAL-TIME SYSTEMS (© J.E.Cooling 2003) Introduction to real-time systems - slide 1
Software engineering for real-time systems
Section 1
Introduction to real-time systems
SOFTWARE ENGINEERING for REAL-TIME SYSTEMS (© J.E.Cooling 2003) Introduction to real-time systems - slide 2
Objectives
To:
• Outline the differences between general-purpose computer 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 computers.
• Describe the structures of modern microprocessors and microcomputers.
Introduction
SOFTWARE ENGINEERING for REAL-TIME SYSTEMS (© J.E.Cooling 2003) Introduction to real-time systems - slide 3
Craysupercom puter
Fibre-opticcom m unication unit
F ibre-opticcom m unication unit
F ibre-opticdata link
Rem ote siteLocal site
A modern batch system
SOFTWARE ENGINEERING for REAL-TIME SYSTEMS (© J.E.Cooling 2003) Introduction to real-time systems - slide 4
Localm ultiplexer
Site 1
Localm ultiplexer
Site 2
Central(m ainfram e)
com puter
Rem ote site
Typical interactive on-line computer system
SOFTWARE ENGINEERING for REAL-TIME SYSTEMS (© J.E.Cooling 2003) Introduction to real-time systems - slide 5
Control panel
Controlcom puter
Power unit
Vehiclesensors
A real-time computer system
SOFTWARE ENGINEERING for REAL-TIME SYSTEMS (© J.E.Cooling 2003) Introduction to real-time systems - slide 6
SLOW FAST
SOFT Machinery condition monitoring Man-Machine Interfacing
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).
Categorizing real-time systems
SOFTWARE ENGINEERING for REAL-TIME SYSTEMS (© J.E.Cooling 2003) Introduction to real-time systems - slide 7
• 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).
Execution
time
Deadlines Software
size
Software
complexity
Hard - Fast
Hard - Slow
Soft - Fast
Soft - Slow
Attribute rating Low high
Attributes of real-time systems
SOFTWARE ENGINEERING for REAL-TIME SYSTEMS (© J.E.Cooling 2003) Introduction to real-time systems - slide 8
R em ote p lant 1
Data collection
Control functions
Com m unication interface
Microprocessor-based outstation
Sensors
Actuators
Land linecom m unication link
(10 m iles)
W irelesscom m unication link
(100 m iles)
Front-endcom m unication
interface
Main controlcom puter
Hot standbycontrol com puter
Operator displayand controls
Data loggingcom puter
Managem entinform ationcom puter
Local area netw ork
C entra l contro lroom
R em oteplant 2
Telemetry control system
SOFTWARE ENGINEERING for REAL-TIME SYSTEMS (© J.E.Cooling 2003) Introduction to real-time systems - slide 9
Sea Skua missile system
SOFTWARE ENGINEERING for REAL-TIME SYSTEMS (© J.E.Cooling 2003) Introduction to real-time systems - slide 10
Submarine control console
SOFTWARE ENGINEERING for REAL-TIME SYSTEMS (© J.E.Cooling 2003) Introduction to real-time systems - slide 11
Typical avionic platforms
SOFTWARE ENGINEERING for REAL-TIME SYSTEMS (© J.E.Cooling 2003) Introduction to real-time systems - slide 12
Microprocessor-based vending machine units
SOFTWARE ENGINEERING for REAL-TIME SYSTEMS (© J.E.Cooling 2003) Introduction to real-time systems - slide 13
Consumer communications
SOFTWARE ENGINEERING for REAL-TIME SYSTEMS (© J.E.Cooling 2003) Introduction to real-time systems - slide 14
Em bedded system splatform s
Bespoke designsCom m ercial off the shelf
(COTS) equipm ent
Board-baseddesigns
PC-baseddesigns
VMEPC/104
Em bedded PCDesktop
PCRuggedized
PCVendorspecific
Embedded systems platforms
SOFTWARE ENGINEERING for REAL-TIME SYSTEMS (© J.E.Cooling 2003) Introduction to real-time systems - slide 15
Em bedded system scharacteristics
Defined by
Environm ent Perform ance Interfacing
Physical E lectricial Operational Speed ofresponse
Failurem odes
Embedded systems characteristics
SOFTWARE ENGINEERING for REAL-TIME SYSTEMS (© J.E.Cooling 2003) Introduction to real-time systems - slide 16
Degrees centigrade
-55 0 +50 +85 +125 +200
Military range
Industrialrange
O il exploration
Space exploration
Extended industrialrange
Typical temperature specifications for real-time systems
SOFTWARE ENGINEERING for REAL-TIME SYSTEMS (© J.E.Cooling 2003) Introduction to real-time systems - slide 17
Computer loading - single synchronous (periodic) task
Executecontrol task
Spare (idle)time
Tsam
t1t0 t2
Time
Te Ti Te Ti
Te = execution time
Ti = idle (spare) time
Tsam = sample time
SOFTWARE ENGINEERING for REAL-TIME SYSTEMS (© J.E.Cooling 2003) Introduction to real-time systems - slide 18
E xecu teeven t task
(E )p rocessor id le (I)
T e T e T e
(I)
E xecu teeven t task
(E )
E xecu teeven t task
(E )
Tim e
(I)
Eventsignal
Eventsignal
Eventsignal
Computer loading - single asynchronous (aperiodic) task
SOFTWARE ENGINEERING for REAL-TIME SYSTEMS (© J.E.Cooling 2003) Introduction to real-time systems - slide 19
Computer loading - multiple asynchronous (aperiodic) tasks
(I)(E1) (E2)(E1) (E1) (E1) (E2)(I) (I)
S1 S1S1S1
S2
(W)
S2
( W) = waiting time for task tocomplete
(I)
Time
(E1) = Event task 1 execution(E2) = Event task 2 execution(S1) = Event signal, task1(S2) = Event signal, task 2(I) = Idle (spare) time
SOFTWARE ENGINEERING for REAL-TIME SYSTEMS (© J.E.Cooling 2003) Introduction to real-time systems - slide 20
C om puting e lem ents
M icroprocessors M icrocom puters
S pecia lized com putingG enera l pu rpose com puting
G enera l pu rposem icrop rocessors
H igh ly in teg ra tedm icrop rocessors
S ing le ch ipm icrocom pute rs
S ing le ch ipm icrocon tro lle rs
D ig ita l s igna lp rocessors
(D S P s)
M ixed s igna lp rocessors
B espokesystem -on-ch ip
designs
The computing elements of real-time systems
SOFTWARE ENGINEERING for REAL-TIME SYSTEMS (© J.E.Cooling 2003) Introduction to real-time systems - slide 21
Elements of a microcomputer system
Microprocessor (CPU)
Program store (non-volatile)EPROM/Flash/FRAM
Data store (volatile)RAM
External bus interface
Address decoder
* Optional elements
Real-time clock
Hardware timers
Interrupt controllers
Watchdog timer
Serial communicationscontroller
DMA controller *
I/O peripheral *Core elements
Additional elements
SOFTWARE ENGINEERING for REAL-TIME SYSTEMS (© J.E.Cooling 2003) Introduction to real-time systems - slide 22
Timing in hardware
Real-time clock Programmable timer
Addressbus Chip
selectline
Controlbus
Tointerrupt
SOFTWARE ENGINEERING for REAL-TIME SYSTEMS (© J.E.Cooling 2003) Introduction to real-time systems - slide 23
A ddressdecoder
R e triggerab le tim er(m onostab le )
I/P
O/P
To non-m askab le in te rrup t
E xte rna l a la rm (op tiona l)
W ritecon tro l
A ddressbus
O/P
I/P
T im e
Timeout
The watchdog timer
SOFTWARE ENGINEERING for REAL-TIME SYSTEMS (© J.E.Cooling 2003) Introduction to real-time systems - slide 24
F ig .1 .21 D M A opera tion
R O M
R A M
D M Acon tro lle r
P eriphera lin te rface
D M Arequest/ack
(B) DMA modeof operation
M icro
R O M
R A M
D M Acon tro lle r
P eriphera lin te rface
P rocessor ho ld /ack
D M Arequest/ack
(a) Normal modeof operation
DMA operation
SOFTWARE ENGINEERING for REAL-TIME SYSTEMS (© J.E.Cooling 2003) Introduction to real-time systems - slide 25
Intelligent I/O processing
Mainprocessor
I/O processorDisk store
Localmemory
Primarybus
Secondarybus
SOFTWARE ENGINEERING for REAL-TIME SYSTEMS (© J.E.Cooling 2003) Introduction to real-time systems - slide 26
Programmablecommand
register
Data bus buffer
Address andcontrol interface
I/O port
I/O port
I/O port
8 lines
8 lines
8 lines
Addressand controlbus
Databus
I/O interface peripheral
SOFTWARE ENGINEERING for REAL-TIME SYSTEMS (© J.E.Cooling 2003) Introduction to real-time systems - slide 27
PowerPC 603em icroprocessor core
(including floating pointm aths unit)
Centralcontrol unit
Data pathcontroller
Mem orycontroller
PCI bus interfaceunit
Interruptcontroller and
tim ers
DMAcontroller
Serialcom m s
controller(I2C)
Intelligentm essagecontroller
(I2O)
PCI busarbiter
Busrequest
(5)
Busgrant
(5)
PCI bus
I2C bus
Databus
Mem orybus
Interrupts
Highly integrated processor -Motorola MPC8240
SOFTWARE ENGINEERING for REAL-TIME SYSTEMS (© J.E.Cooling 2003) Introduction to real-time systems - slide 28
Processor
Clock
Program store(8kByte ROM)
Data store(256 Bytes RAM)
Hardware tim ers(3)
Interruptcontroller
Serialcom m unication
controller
I/O ports (4)
Security ROM
External bus
Single chip microcomputer - Philips Semiconductor 8052
SOFTWARE ENGINEERING for REAL-TIME SYSTEMS (© J.E.Cooling 2003) Introduction to real-time systems - slide 29
LED driver
DAC (2)
S tepper m otorcontrol
I2C serialinterface
Sound generator
GP Serial I/O
ADC (16)
Interruptinterface (8)
Real-tim e clock
Hardware tim ers(6)
Pulse generator
D igital I/0
CPU W atchdog Interrupt controller Data RAM (16 kByte) DMA Cache m em ory (1
kByte)
P rocessor un it
Boot ROM (2 kByte)
Businterface
CANinterface
(3)
F lash(512
kByte)
Externalbus
Single chip microcontroller - Fujitsu MB91F361
SOFTWARE ENGINEERING for REAL-TIME SYSTEMS (© J.E.Cooling 2003) Introduction to real-time systems - slide 30
Digital signal processor structure
Addressgenerator
Program(instruction)
control
DMA
Program ROM
Data ROM
Data RAM
Cache
Register unit
Arithmetic-logic unit
(ALU)
Multiplier
Shifter
Serial interface
Bus interface
External bus
SOFTWARE ENGINEERING for REAL-TIME SYSTEMS (© J.E.Cooling 2003) Introduction to real-time systems - slide 31
Flash(256 bytes)
RAM(256 bytes)
CPU
W atchdogtim er
Debuginterface
Power-onreset
Ports withinterrupt
facility (2)
PW MTim er
Analoguecom parator
C lock
Mixed signal processor structure - Texas MSP430
SOFTWARE ENGINEERING for REAL-TIME SYSTEMS (© J.E.Cooling 2003) Introduction to real-time systems - slide 32
ROM
RAM
Processorcore
Custom I/Ointerface
Custom power-m anagem ent
unit
CustomMMU
Customperipheralsand debuginterface
Custom co-processor
On-chip databus (OCB)
Externalbus
Example system-on-a-chip (SOC) design
SOFTWARE ENGINEERING for REAL-TIME SYSTEMS (© J.E.Cooling 2003) Introduction to real-time systems - slide 33
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 computer units. Appreciate the essential differences between microprocessors, microcomputers and
microcontrollers. Realize why there is a large market for specialized processors.
END OF SECTION ‘Introduction to real-time systems’
Review of ‘Introduction to real-time systems’