Real-Time Computing
For Human Computer Interfacing II.

October 23, 1997

Copyright* 1997, Perry R. Cook, Princeton University




Jump to Expanded Lecture Notes
or Text Only Version of Expanded Lecture Notes



From Last Lecture:

I. What's Real-Time? Some Definitions

II. Control Systems vs. Media Delivery

III. Control Systems

IV. Synchronous vs. Asynchronous Models
Polled vs. Interrupt Operation

V. Data and Processing Models

VI. Complexity!!! (Real-Time OS)





I-VI. Real-time is . . .

  • All Real-time Systems:

    • Respond to External Inputs

    • Act Upon Them in a "Timely" Manner

  • Some Real-time Systems:

    • Don't (appear to) Lose Data (media)

    • Operate with Feedback

    • Interface with Humans

Different Types and Priorities of Inputs and Outputs
=> Multiple Processes, and Maybe Multiple Processors





VII. Multiple Processes

One Common Software Model:
  • Main Loop
    • Polls Non-Critical Inputs
    • (Maybe) Services Queue
    • Waits Around a Lot
  • Interrupt Service Routines (ISRs)
    • Respond Instantaneously
    • Typically Very Short

Queue Servicing Can Also Be Done on a Clocked ISR





VIIb. Multiple Processors

Why?
  • Segments and Isolates the Problems
  • Improves Response Times
  • Saves Cost
Why Not?
  • Can Increase Complexity and Indeterminacy
  • Can Degrade Response Times

Symmetric Processors (all the same type) or Not
May Share Memory or Not
May Run Synchronously or Not




VIII. DSP and DSPs

What's a DSP?

    • Processor good for DSP algorithms

      • Filters
      • FFT's
      • Matrix and Vector Math

    • Fast (Single Cycle) Multiplies +

    • Optimized Data Paths (2+ operands)

    • Address Generation Hardware:

      • Pointer Arithmetic
      • Modulo incrementing/decrementing
      • Bit Reversing
      • Increment/Decrement by N

    • I/O Support (A/D and D/A, Host Communication)




VIIIb. What are DSPs used for?

Applications:

    • Data Compression/Decompression
    • Telephony (MODEMS)
    • Audio Processing
    • Audio Synthesis
    • Speech Synthesis/Recognition
    • 3D Audio
    • 3D Graphics
Why?
    • More suitable
    • Frees up less suitable processors
    • $$$$$
    • Interactivity (latency, time)
Why Not?
    • Hard to develop for
    • Communications with other processors
    • Data flow
    • Synchronization



VIIIc. DSP -> Media Processors -> Media Extensions

Media Processors:
    • Combine Video, Audio, and more
    • Share memory between these types
    • Split ALU and data paths into smaller sub-units

      Media Data Types:
      • Video: 8 bit data, lots of it
      • Audio: 16+ bits, less of it
      • Compressed media: Varies

This leads also to "Media Extensions" on Hosts

  • Single cycle multiplies
  • Fixed Pt. Extensions
      Use existing floating point regs,
      but do parallel fixed point ops.
  • Examples: MMX, VIS, HP Media Extensions



VIIId. DSP Trends

Trends for General DSPs:

  • DMA, Local Memory Interfaces
    • Supports I/O
    • Supports Host Communication
    • Supports Data Transfer
  • Speeds go up some, but not as much as hosts
  • Multi Processor support (SHARC, C40)

Trends for Media Processors:

  • Multi function
  • Don't know yet

Trends for Host Based DSP:

    Media Extensions
Overall Need: Operating Systems?




IX. Microcontrollers

  • Microcontrollers Historically:
    • Small Words and Integer Math
    • Low Level Language
    • Hardware Interrupt Capabilities
    • Peripheral Devices for Inputs
    • Low Cost

  • Modern Microcontrollers:
    • Small Words (relatively) Integer Math (or not)
    • Higher Level Language Support
    • Peripheral Inputs Integrated
    • Low Cost



IXb. Microcontrollers Continued

  • Old: H8 (Minuteman missles), 68xx, 65xx, Zx, 80x

      • 8 bit data, 8 bit instruction, 2+K address
      • Clock Rate: 1-2 MHz
      • Language and Interface: Assembler via TTY
      • System cost: $100.00

  • New:

    • PIC Chip ($4-10.00)

    • BASIC Stamp = PIC + More
      • 16 bit data, high level instructions, 2K memory
      • Clock Rate: 4-20 MHz
      • Language and Interface: BASIC via PC Serial Port
      • System cost: $10-35.00






X. Micro/DSP/Host Real-time Processing Examples

  • Basic Stamp Programming Env.

  • Micro -> Micro+DSP via MIDI

  • Micro -> Host via MIDI




Some Web References:

Educational Research Groups and Projects:

U. Michigan Real-Time Computing Lab
Carnegie Melon Real-Time Groups
A Good OS List from Leeds

Commercial:

Heurikon
Resource List Compiled by E. Douglas Jensen


Some Non-Web References Made from Dead Trees:

"Encyclopedia of Computer Science"
A. Ralston and E. Reilly, eds.
New York: Van Nostrand Reinhold, 1993

"Real-Time Programming : Neglected Topics"
Caxton C. Foster.
Reading, Mass. : Addison-Wesley Pub. Co., c1981.

"Real-Time Software for Control : Program Examples in C"
David M. Auslander, Cheng H. Tham.
Englewood Cliffs, N.J. : Prentice Hall, c1990.

"Real-time systems, Specification, Verification, and Analysis,"
Mathai Joseph, ed.
Englewood Cliffs, N.J. : Prentice Hall, 1996

"Introduction to Real-time Software Design,"
S.T. Allworth and R.N. Zobel
New York, Springer Verlag, 1989



* Permission to make digital or hard copies of part or all
of this work for personal or classroom use is granted with
or without fee provided that copies are not made or dis-
tributed for profit or commercial advantage and that copies
bear this notice and full citation on the first page. To copy
otherwise,to republish, to post on services, or to redistribute
to lists, requires specific permission and/or a fee.

Back to Princeton General Information Section

Return to Main Page at San Jose