Lecture10 Real-Time and Embedded v2
Lecture10 Real-Time and Embedded v2
Bekkeng, 11.5.2011
Embedded Computing
An embedded system is a computer system designed to perform one or a few dedicated functions, often with realtime computing constraints. Embedded processors can be microprocessors, microcontrollers or FPGAs. Embedded systems run with limited computer hardware resources: limited memory, small or non-existent keyboard and/or screen
Hard real-time
systems where it is absolutely imperative that responses occur within the required deadline (Example: Flight control systems)
Soft real-time
allows for some deadlines to be missed with only a slight degradation in performance but not a complete failure (example: DAQ-systems)
The application is developed under Windows on a regular PC, and then downloaded to run on the real-time target
NI paper
NI CompactRIO platform
CompactRIO (cRIO) combines a real-time processor, a FieldProgrammable Gate Array (FPGA), and I/O modules in a small, rugged form factor. Serial, USB, and Ethernet ports are built in to the controller. When using CompactRIO, your I/O modules (e.g. for digital I/O, bus communication, A/D conversion) are connected to the FPGA for fast processing in hardware, and then you exchange data between the FPGA and the real-time processor as desired. 4 and 8 slot versions available
Programmed using LabVIEW Real-Time Module
Performance comparison
double-click
Shared variable
With the NI LabVIEW C Code Generator, you can port your algorithm designed using the LabVIEW programming environment to any processor of your choice.
LabVIEW Embedded
LabVIEW Embedded
Interrupt-Driven Programming
In interrupt-driven systems software is designed such that when a registered event, such as a timer, is received, a response is fired to respond to this event. There are two components of any interrupt-driven system: the interrupt and the interrupt handler. An interrupt is a signal that is generated by hardware, which indicates an event has occurred that should halt the currently executing program. Interrupt handlers (also referred to as interrupt service routines - ISRs) are portions of code that are registered with the processor to execute once a particular interrupt has occurred. Once the processor is aware of an interrupt, it halts the currently executing process, performs a context switch to save the state of the system, and executes the interrupt handler. Once the interrupt handler code has executed, the processor returns control to the previously running program.
Interrupt-Driven Programming II
For Interrupt-Driven Programming hardware events are detected and responded to, compared to event driven programming (on a PC) where user interface events trigger some code to be executed