Real-Time Systems Development

Book Description

Real-time Systems Development is a text for computing students who want to understand more about the development of software for real-time applications, involving concurrent programming, multi-tasking, data i/o and embedded processors.

The book has been written to cover single semester final year undergraduate options or MSc modules in the area of real-time systems design and implementation. Assuming a certain level of general systems design and programming experience, this text will extend students knowledge and skills into an area of computing which has increasing relevance in a modern world of telecommunications and ‘intelligent’ equipment using embedded microcontrollers.

* Concise treatment delivers material in manageable sections
* Includes handy glossary, references and practical exercises based on familiar scenarios
* Supporting website contains slides, solutions to problems and software examples

Table of Contents

  1. Cover
  2. Real-Time Systems Development
  3. Contents
  4. Preface
  5. Recommended lab sessions
  6. Acknowledgements and thanks
  7. 1 Introduction to real-time systems
    1. 1.1 Chapter overview
    2. 1.2 Real-time systems development
    3. 1.3 System complexity
    4. 1.4 Microprocessors and real-time applications
    5. 1.5 Definition of a real-time system (1/2)
    6. 1.5 Definition of a real-time system (2/2)
    7. 1.6 Programming structures
    8. 1.7 Response latency
    9. 1.8 Relative speeds
      1. 1.8.1 Polling an input too fast
      2. 1.8.2 Polling an input too slowly
      3. 1.8.3 Light sensing
    10. 1.9 Software timing
    11. 1.10 High speed timing
    12. 1.11 Output timing overload
    13. 1.12 Debugging real-time systems
    14. 1.13 Access to hardware
    15. 1.14 Machine I/O
    16. 1.15 Programmed I/O
    17. 1.16 Hardware/software cost tradeoff
    18. 1.17 Hard, soft and firm
    19. 1.18 Software Quality Assurance (SQA)
    20. 1.19 Experience and history
    21. 1.20 Futures?
    22. 1.21 Chapter summary
    23. 1.22 Problems and issues for discussion
    24. 1.23 Suggestions for reading
  8. 2 Implementing simple real-time systems
    1. 2.1 Chapter overview
    2. 2.2 Multi-tasking
    3. 2.3 Task loops
    4. 2.4 Code timing problems
    5. 2.5 Interrupt-driven tasks
    6. 2.6 Task swapping: How? When? Which?
    7. 2.7 Task re-entry
    8. 2.8 Causes of task swapping
    9. 2.9 Resource sharing
    10. 2.10 Using the printer port for digital I/O
    11. 2.11 Electric motors
    12. 2.12 Operational details of stepper motors
    13. 2.13 Lifecycle of a professional programmer
    14. 2.14 Chapter summary
    15. 2.15 Problems and issues for discussion
    16. 2.16 Suggestions for reading
  9. 3 Basic input and output
    1. 3.1 Chapter overview
    2. 3.2 Memory-mapped ports
    3. 3.3 I/O mapped ports
    4. 3.4 Port registers – the programmers’ view
    5. 3.5 Port polling
    6. 3.6 I/O access permissions
    7. 3.7 To block or not to block
    8. 3.8 Exception and interrupt processing – service on demand
    9. 3.9 Multiple interrupt sources
    10. 3.10 Powerfail detection
    11. 3.11 Interrupt structure on the PC
    12. 3.12 Deferred interrupt processing
    13. 3.13 Use of exceptions and interrupts
    14. 3.14 Interrupt unpredictability
    15. 3.15 Critical data protection – how to communicate with interrupts
    16. 3.16 Bu.ered I/O – interrupt device drivers
    17. 3.17 Chapter summary
    18. 3.18 Problems and issues for discussion
    19. 3.19 Suggestions for reading
  10. 4 Cyclic executives for bare hardware
    1. 4.1 Chapter overview
    2. 4.2 The basic system
    3. 4.3 System tick
    4. 4.4 Extended tasks
    5. 4.5 Implementation of a cyclic executive
    6. 4.6 Cyclic executive execution pattern
    7. 4.7 Demonstation cyclic executive code
    8. 4.8 Keypad application
    9. 4.9 Chapter summary
    10. 4.10 Problems and issues for discussion
    11. 4.11 Suggestions for reading
  11. 5 Finite state machines – design tool
    1. 5.1 Chapter overview
    2. 5.2 Defining the perimeter
    3. 5.3 Channel bandwidths
    4. 5.4 Finite State Diagrams (FSD)
    5. 5.5 Auxiliary variables
    6. 5.6 Vehicle detection
    7. 5.7 Simplification techniques
    8. 5.8 Input data and trigger events
    9. 5.9 Teas-made
    10. 5.10 Hierarchical state charts
    11. 5.11 Concurrent FSMs
    12. 5.12 OO design patterns and state machines
    13. 5.13 Chapter summary
    14. 5.14 Problems and issues for discussion
    15. 5.15 Suggestions for reading
  12. 6 Finite state machines – implementation options
    1. 6.1 Chapter overview
    2. 6.2 Implementing an FSD
    3. 6.3 Implementation by direct sequential coding
    4. 6.4 THE SWITCH-CASE IMPLEMENTATION MODEL
    5. 6.5 The GOTO/LABEL implementation model
    6. 6.6 FST implementation model (1/2)
    7. 6.6 FST implementation model (2/2)
    8. 6.7 An object-oriented approach to implementation (1/2)
    9. 6.7 An object-oriented approach to implementation (2/2)
    10. 6.8 FSM scheduling issues
    11. 6.9 More FST (1/2)
    12. 6.9 More FST (2/2)
    13. 6.10 Run-time environment
    14. 6.11 Chapter summary
    15. 6.12 Problems and issues for discussion
    16. 6.13 Suggestions for reading
  13. 7 Why multi-task?
    1. 7.1 Chapter overview
    2. 7.2 Recognizing a real-time application
    3. 7.3 Multi-tasking and multi-threading
    4. 7.4 Run-time support environment
    5. 7.5 Run-time scheduling
    6. 7.6 Justifying the use of multi-tasking
    7. 7.7 Responsiveness
    8. 7.8 Intellectual simplicity of design
    9. 7.9 Rigour of implementation
    10. 7.10 Unit testing
    11. 7.11 System integrity
    12. 7.12 System integration testing
    13. 7.13 Exploitation of multi-processor hardware
    14. 7.14 Processor support for task swapping
    15. 7.15 Starting new tasks in Linux
    16. 7.16 Chapter summary
    17. 7.17 Problems and issues for discussion
    18. 7.18 Suggestions for reading
  14. 8 Task communication and synchronization
    1. 8.1 Chapter overview
    2. 8.2 Data sharing
    3. 8.3 Event flags
    4. 8.4 Semaphores
    5. 8.5 Lock files
    6. 8.6 Intercept signals (1/2)
    7. 8.6 Intercept signals (2/2)
    8. 8.7 Shared data buffers
    9. 8.8 Pipes (1/2)
    10. 8.8 Pipes (2/2)
    11. 8.9 Control queues
    12. 8.10 Sockets
    13. 8.11 Remote Procedure Calls (RPC)
    14. 8.12 ADA rendezvous
    15. 8.13 Java synchronization
    16. 8.14 Chapter summary
    17. 8.15 Problems and issues for discussion
    18. 8.16 Suggestions for reading
  15. 9 Real-time executives
    1. 9.1 Chapter overview
    2. 9.2 Real-time systems implementations
    3. 9.4 Porting application code for RTEs
    4. 9.5 Hardware support for an RTE
    5. 9.6 RTE facilities
    6. 9.7 Linux
    7. 9.8 POSIX facilities (1/2)
    8. 9.8 POSIX facilities (2/2)
    9. 9.9 Scheduling
    10. 9.10 Unix Filesystem Hierarchy Standard (FHS)
    11. 9.11 Configuring and building the Linux kernel
    12. 9.12 Linux for embedded applications
    13. 9.13 Booting embedded Linux
    14. 9.14 Language support
    15. 9.15 Licensing issues
    16. 9.16 Chapter summary
    17. 9.17 Problems and issues for discussion
    18. 9.18 Suggestions for reading
  16. 10 Using input/output interfaces
    1. 10.1 Chapter overview
    2. 10.2 Input and output operations
    3. 10.3 Categories
    4. 10.4 Operating system support
    5. 10.5 Raw I/O
    6. 10.6 I/O with Linux
    7. 10.7 Direct device driver
    8. 10.8 Device drivers under interrupt
    9. 10.9 Queuing theory
    10. 10.10 Chapter summary
    11. 10.11 Problems and issues for discussion
    12. 10.12 Suggestions for reading
  17. 11 Structured design for real-time systems
    1. 11.1 Chapter overview
    2. 11.2 Design methods
    3. 11.3 Incremental functional decomposition
    4. 11.4 Use of diagrams in design
    5. 11.5 Data Flow Diagrams (DFD)
    6. 11.6 Implementing a DFD (1/2)
    7. 11.6 Implementing a DFD (2/2)
    8. 11.7 Reading structure charts
    9. 11.8 Yourdon structured analysis and design for real-time systems
    10. 11.9 Implementing an event-based DFD
    11. 11.10 Stored data modelling – EAR modelling
    12. 11.11 Transforming ERD to DFD
    13. 11.12 Normalizing stored data
    14. 11.13 Chapter summary
    15. 11.14 Problems and issues for discussion
    16. 11.15 Suggestions for reading
  18. 12 Designing for multi-tasking
    1. 12.1 Chapter overview
    2. 12.2 SA/SD for multi-tasking
    3. 12.3 Partitioning into tasks
    4. 12.4 Cohesion and coupling
    5. 12.5 Designing for intertask communication
    6. 12.6 Device interfacing
    7. 12.7 Task diagrams
    8. 12.8 The CODARTS method
    9. 12.9 Re-entrant code
    10. 12.10 Setting task priorities
    11. 12.11 Execution timing
    12. 12.12 Run-time support
    13. 12.13 Chapter summary
    14. 12.14 Problems and issues for discussion
    15. 12.15 Suggestions for reading
  19. 13 UML for real-time systems
    1. 13.1 Chapter overview
    2. 13.2 A Unified Modelling Language
    3. 13.3 Use-cases
    4. 13.4 Objects and classes
    5. 13.5 Object collaboration diagrams
    6. 13.6 Class diagrams
    7. 13.7 Interobject messaging
    8. 13.8 Interaction diagrams
    9. 13.9 Activity diagrams
    10. 13.10 Chapter summary
    11. 13.11 Problems and issues for discussion
    12. 13.12 Suggestions for reading
  20. 14 Object-oriented approach for real-time systems
    1. 14.1 Chapter overview
    2. 14.2 Real-time object-oriented design and development
    3. 14.3 Designing for real-time
    4. 14.4 Objects, objects
    5. 14.5 Finding the objects
    6. 14.6 Analysis class stereotypes
    7. 14.7 Tasking
    8. 14.8 Multi-threading with Java
    9. 14.9 Design patterns
    10. 14.10 Chapter summary
    11. 14.11 Problems and issues for discussion
    12. 14.12 Suggestions for reading
  21. 15 System integrity
    1. 15.1 Chapter overview
    2. 15.2 Software crisis
    3. 15.3 Fault tolerance
    4. 15.4 System requirements
    5. 15.5 Requirements analysis techniques
    6. 15.6 Verification and validation
    7. 15.7 Good design
    8. 15.8 Simulation studies
    9. 15.9 Petri nets
    10. 15.10 Design for security – source code checking: lint
    11. 15.11 Code reuse
    12. 15.12 Compile-time checking
    13. 15.13 Code testing
    14. 15.14 System integration testing
    15. 15.15 Run-time error trapping
    16. 15.16 Run-time checking: assert
    17. 15.17 Run-time checking: exceptions and hardware watchdog
    18. 15.18 Run-time checking: stack length checking
    19. 15.19 Visual assistance
    20. 15.20 A wet Monday morning
    21. 15.21 Concurrent version control system (CVS)
    22. 15.22 Setting up a CVS repository
    23. 15.23 Conducting design and code reviews
    24. 15.24 Extreme Programming
    25. 15.25 Software standards
    26. 15.26 MISRA
    27. 15.28 Chapter summary
    28. 15.29 Problems and issues for discussion
    29. 15.30 Suggestions for Reading
  22. 16 Languages for RTS development – C, Ada and Java
    1. 16.1 Chapter overview
    2. 16.2 The choice
    3. 16.3 General criteria for programming languages
    4. 16.4 Special criteria for real-time compilers
    5. 16.5 Compiler optimization
    6. 16.6 C for real-time
    7. 16.7 Ada
    8. 16.8 Java
    9. 16.9 Cross-compilers
    10. 16.10 Chapter summary
    11. 16.11 Problems and issues for discussion
    12. 16.12 Suggestions for reading
  23. 17 Cross-development techniques
    1. 17.1 Chapter overview
    2. 17.2 Host–target development
    3. 17.3 Cross-compilers and linkers
    4. 17.4 The gcc compilation process
    5. 17.5 Startup code
    6. 17.6 GNU linker, ld and linker script file
    7. 17.7 Entry point
    8. 17.8 Building a gcc cross-compiler
    9. 17.9 Tips!
    10. 17.10 Executable and Linking Format (ELF)
    11. 17.11 C++ global constructors and destructors in ELF
    12. 17.12 Debugging techniques
    13. 17.13 Program memory options
    14. 17.14 Flash memory
    15. 17.15 Installing target code
    16. 17.16 Chapter summary
    17. 17.17 Problems and issues for discussion
    18. 17.18 Suggestions for reading
  24. 18 Microcontroller embedded systems
    1. 18.1 Chapter overview
    2. 18.2 Microprocessors and microcontrollers
    3. 18.3 Intel 8051 8 bit family
    4. 18.4 Automatic vending technology
    5. 18.5 ARM 32 bit family
    6. 18.6 StrongARM processor
    7. 18.7 Puppeteer StrongARM microcomputer
    8. 18.8 Application
    9. 18.9 FPGA usage
    10. 18.10 Serial access memory
    11. 18.11 Chapter summary
    12. 18.12 Problems and issues for discussion
    13. 18.13 Suggestions for reading
  25. 19 Linux device drivers
    1. 19.1 Chapter overview
    2. 19.2 Embedded Linux
    3. 19.3 Porting Linux
    4. 19.4 The role of device drivers
    5. 19.5 Major and minor numbers
    6. 19.6 Index blocks, the Unix inode (1/2)
    7. 19.6 Index blocks, the Unix inode (2/2)
    8. 19.7 Types of Linux device drivers (1/2)
    9. 19.7 Types of Linux device drivers (2/2)
    10. 19.8 The new devfs
    11. 19.9 Chapter summary
    12. 19.10 Problems and issues for discussion
    13. 19.11 Suggestions for reading
  26. 20 Hardware/software co-design
    1. 20.1 Chapter overview
    2. 20.2 Systems-on-chip
    3. 20.3 Intellectual property
    4. 20.4 Reconfigurable hardware
    5. 20.5 Software support
    6. 20.6 Altera APEX/Excalibur device
    7. 20.7 Processor cores
    8. 20.8 Chapter summary
    9. 20.9 Problems and issues for discussion
    10. 20.10 Suggestions for reading
  27. Appendix A: Using an oscilloscope for software debugging
    1. A1.1 Overview
    2. A1.2 Using an oscilloscope
    3. A1.3 Turning on an analogue CRT scope
    4. A1.4 Introduction to the oscilloscope
    5. A1.5 Digital storage scopes
  28. Index
    1. A
    2. B
    3. C
    4. D
    5. E
    6. F
    7. G
    8. H
    9. I
    10. J
    11. K
    12. L
    13. M
    14. N
    15. O
    16. P
    17. Q
    18. R
    19. S
    20. T
    21. U
    22. V
    23. W
    24. X
    25. Y

Product Information

  • Title: Real-Time Systems Development
  • Author(s): Rob Williams
  • Release date: October 2005
  • Publisher(s): Butterworth-Heinemann
  • ISBN: 9780080456409