Search This Blog

Tuesday 22 February 2011

EMBEDDED SYSYSTEMS


 

 

EVENT:

Technical Paper Presentation

 

TOPIC:

EMBEDDED SYSYSTEMS







                                                      ABSTRACT

                                                    The world has become highly constrained by time. The ever changing scenario of the world demands replacement of human supervision by automated systems. Embedded system is the brain child of the intellectuals, which has proven to be such desired systems. This paper is an attempt to throw some light on this topic. This gives an overview about some concepts of embedded systems.


             The concept starts with the classification of three basic parts

·        Hardware concepts of embedded systems
·        Software concepts of embedded systems
·        Applications of embedded systems


        A study of hard ware concepts provides insight of physical architecture of embedded systems like micro controller, microprocessor etc. Software concepts considered as brain of the embedded systems and it controls the hardware. Finally we mention few of the ever growing applications of the embedded systems in the real world














 Introduction
                     A system is an arrangement in which all its units assemble and work together to do one or many tasks according to fixed plans, programs, or set of rules. Let us examine one example.
 Automatic clothes washing machine:
              The important hardware components include its status display panel, the switches and dials for user-defined programming, a motor to rotate, its power supply and control unit, an inner water level sensor, a solenoid valve for letting water in and other valve for letting water to drain out .The system program is to wash the dirty clothes placed in tank, which rotates or spins in pre-programmed steps and stages .It follows a set of rules sequentially:
EMBEDDED SYSTEM:
         A computer is a system that has the following components.
1.)  A microprocessor
2.)  A large memory comprising the following tasks:
·    Primary Memory (RAM, ROM AND cache memories)                          
·    Secondary Memory
3.)  Input like keyboard, mouse, scanner, digitizer etc.
4.)  Output like video monitor, printer, etc.
5.)  Networking units like Ethernet card, front-end processor based drivers, etc.            
6.)  I/O units like a modem, fax cum modem, etc.
             An embedded system is one that has computer -hardware with software embedded in it as one of its most important component.
            It is dedicated computer-based system for an application(s) or products. It may be either an independent system or a part of a large system. As its software usually embeds in ROM it does not need secondary memories as in a computer. It has three main components:
·    The hardware.
·    It has main application software which performs currently the series of Tasks or multiple tasks.
·    It has a real time operating system that supervises the application software and provides a mechanism to let the processor run a process as per scheduling and do the context switching between various tasks.


   An embedded system has software designed to keep in view three constraints:
                      1. Available system memory.
                      2. Available processor speed
                      3. The need to limit power dissipation when running the system continuously in
                           Cycles of wait for events, run, stop and wake-up.
Definition:     According to TIM WILMSHURST
a.   "An embedded system is a system whose principle function is not computational, but which is controlled by a computer embedded in it. The computer likely to be a microprocessor or micro controller. The word embedded implies that it lies inside the overall system, hidden from view, forming an internal part of greater whole."
b.   "An embedded system is a microcontroller-based, software-driven, reliable, real time control system, autonomous, or human-or network-interactive, operating on diverse physical variables and in diverse environments, and sold into a competitive and cost-conscious market.”

Classification of embedded system:We can classify embedded system into three types .
ØSmall scale embedded systems:
               These systems are with a single 8-or 16-bit micro controller, they have little hardware and software complexities and involve board-level design. Editor, assembler, specific to the microcontroller or processor used, are the main programming tools to develop embedded software. Usually ‘C’ is used for developing these systems and its compilation is done into assembly, and executable codes are then appropriately located in the system memory. The software has to fit with in the memory available and keep in view the need to limit power dissipation.
ØMedium scale embedded system:
               These systems are usually designed with a single or few 16- or 32-bit micro controllers or DSPs or Reduced Instruction Set Computers. These have both hardware and software complexities. For complex software design, we use  following  software tools: RTOS, Source code engineering tool, Simulator, Debugger and IDE. Software tools also provide the solutions to the hardware complexities. They may also employ the readily available ASSPs and IPs for the various functions .
ØSophisticated embedded systems
                Sophisticated embedded systems have enormous hardware and software complexities and may need scalable processors or configurable processors and PLAs. They are used for cutting edge applications that need hardware and software co-design and integration in the final system; however, they are constrained by the processing speeds available in their hardware units.Certain software functions such as encryption and deciphering algorithms, discrete cosine transformation and inverse transformation algorithms, TCP/IP protocol stacking an network driver functions are implemented in the hardware to obtain additional speeds by saving time. Some of the functions of the hardware resources in the system are also implemented by a software. Development tools for the systems may not be readily available at a reasonable cost or may not be available at all. In some cases a compiler or retargetable compiler might have to be developed for these
Processor:
A processor is the heart of the embedded system .  A processor in a system  has two essential units: program flow control unit (CU) and execution unit (EU). The CU include a fetch unit for fetching instructions from the memory. The EU has circuits that implement the instructions pertaining to data transfer operations , data conversion  also to execute branch instructions and   execute instructions for a program control task(with ALU) say halt, interrupt, or jump to another set of instructions . A processor runs the cycles of fetch and execute . A processor is mostly in the form of an IC chip; alternatively, it could be in core form in an ASIC or at a SoC. Core means a part of the functional circuit on the VLSI chip.
An embedded system processor chip or core can be one of the following:
1.   General purpose processor (GPP):
a.   Microprocessor
b.   Microcontroller
c.   Embedded processor
d.   Digital signal processor (DSP)
e.   Media processor
2.   Applications specific system processor (ASSP) additional processor
3.   Multiprocessor system using general purpose processor (GPPS) and application specific instruction processors (ASIPS)
4.      GPP core (s) or ASIP core(s) integrated into either an applications specific integrated circuits (ASIC) or a VLSI or an FPGA core integrated processor units in a VLSI chip .
                    For a system designer the following are important considerations when selecting a processor.
a.   Instruction set
b.   Maximum bits in an operand in a single arithmetic or logical operations
c.   Clock frequencies in MHz and processing speeds million instructions per second
d.   Processor ability to solve the complex algorithms used in meeting the dead lines for processing
Micro-processor:
                    The CPU is a unit that centrally fetches and processes a set of general purpose instructions.  The CPU instruction set includes instructions for data transfer operations, ALU operations, stack operations, I/P &O/P operations and program control sequencing and supervising operations. Any CPU must process the following basic functionality units:
     1.A control unit to fetch and control the sequential processing of given commands or instruction and for communicating with the rest of the system.
     2.An ALU for the arithmetic and logic operations on the bytes or words. It may be capable of processing 8,16,32or 64-bit words at an instant.
    3.A microprocessor is a single VLSI chip that has a chip and may also have some other units that are additionally present and that result in faster processing of instructions.
 Micro-controller:
                  A microcontroller is a single chip VLSI unit (also called microcomputer) which though having limited computational capabilities posses an enhanced I/P, O/P capabilities and a number of on-chip functional units micro-controllers are particularly suited for use in embedded systems for real time applications with on-chip program memory and devices.
          The below figure shows the functional circuit present in an microprocessor.          





Embedded processor for a complex system:
                     For fast, precise and intensive calculations and for a complex real time applications, the Micro controllers and microprocessors do not suffice and electronics war fare system. For example an advanced  warning and control system (AWACS) which also associates  tracking data is an example of a complex real time system .Special microprocessors and microcontrollers  often called  embedded processors are required .when a microcontroller or micro processor is specially designed such that it has the following capabilities .then the term embedded processor is preferred  instead of microcontroller or microprocessor .
1.   Fast context switching and the low latencies of the task in complex real time applications
2.   Automatic ALU operations and thus no shared data problem. The latter occurs due to an incomplete ALU operation when an operand of large  bits is placed in two or four registers.
3.   RISC core for fast more precise and intensive calculations by the embedded software
Digital Signal Processor (DSP):
           Just as a microprocessor is the most essential unit of computing system, a digital signal processor is the most essential unit of an embedded system for a large number of applications needing processing of signals. Exemplary applications are in Image processing, Multimedia, audio, video, HDTV, DSP, modem and telecommunication processing systems. DSP provides fast, discrete-time, signal-processing instructions. It  has large instruction word processing capabilities. It processes Single instruction multiple data instructions fast; it processes discrete cosine transformations and inverse DCT functions fast.
Multi processor system using general purpose processor:
                  In embedded system, several processor may be needed to execute an algorithm fast and with in a strict deadline. For example, in real-time video processing, the number of MAC operations needed per second may be more than is possible from one DSP unit. An embedded system then may have to incorporate two or more processors running in synchronization.
                    In a cell-phone, a number of tasks like  Speech signal-processing and Coding, Dialing, Modulating and transmitting, Demodulating and receiving, Signal decoding and decompression, Keypad interface and display interfacing handling, Short message service (SMS) protocol-based messaging. SMS message display have to be performed.
                  For all these tasks, a single processor does not suffice. Suitably synchronized multi processors are required. Real time video processing and multimedia applications most often need a multi processor embedded system

Memories:
      In a system, there are various types of memories. Below figure shows a chart for the various forms of memories that are present in systems. These are follows:
·    Internal RAM of 256 or 512 bytes in a microcontroller for registers, temporary data and stack.
·    Internal ROM/PROM/EPROM for about 4KB to 16 KB of program.
·    External RAM for the temporary data and stack.
·    Internal caches
·    EEPROM or flash
·    External ROM or PROM for embedding










Input, output and IO ports, Io buses and IO interfaces :
       The system gets input from physical devices through the input ports. A controller circuit in a system gets the input from a communication system. Processor identifies each input port by its memory buffer address. The system gets the inputs by the read operations at the port address.
       The system has output ports through which it sends output bytes to the real world. Each output port is identified by its memory-buffer address. The system sends the output by a write operation to the port address. There are also general-purpose ports for both the input and output operations. There are two types of ports:
·    Parallel
·    Serial
      From the serial port, a system gets input and output by a serial stream of bits. A serial port may be a serial URAT port, a serial synchronous port or some other serial interfacing port. A system port uses DEMULTIPLEXER and  MULTIPLEXER for the faster data transfer to the required channel.
Interrupt handler:
        A system may possess a number of devices and the system processor has to control and handle the requirements of each device by running an appropriate interrupt service routine (ISR) for each. An interrupt handling mechanism must exist in each system to handle interrupts from various processes in the system.
DAC (using a PWM) and ADC:
       The ADC in the system microcontroller can be used in many applications such as Data Acquisition System (DAS), analog control system and voice digitizing system. Suppose a system needs to read an analog input from a sensor or transducer circuit. If converted to bits by the ADC unit in the system, then these bits, after processing, can also give an output. This provides a control for automation by a combined use of ADC and DAC features. An ADC unit the embedded system microcontroller may have multi channels. It can then take the inputs in succession from the various pins interconnected to different analog sources.
LCD and LED displays:
           A system requires an interfacing circuit and software to display the status or message for a line, for multi line displays, or flashing displays. An LCD screen may show up a multi-line display of characters or also show a small graph or icon (called pictogram).A recent innovation in the mobile phone system turns the screen blue to indicate an incoming call.
Keypad/keyboard:
 The Keypad or keyboard is an important device for getting user inputs. The system must provide the necessary interfacing and key debouncing circuit as well as the software for the system to receive input form a set of keys or from a keyboard or keypad.

Software embedded in a system:
The software is the most important aspect, the brain of the embedded system.
ØFinal machine implementable software for a product:
                 An embedded system processor and the system need software that is specific to given application of that system. The processor of the system processes the instruction codes and data .In the final stage, these are placed in the memory (ROM) for all the tasks that have to be executed .The final stage software is also called ROM image. An image is unique sequence and arrangement of pixels, embedded software is also a unique placement and arrangement of bytes for instruction and data.
ØCoding of software in machines codes:
                     During coding in this format, the  programmer defines the address and the corresponding bytes or bits at each address .In configuring some specific physical device or subsystem ,machine code-based coding is used .Ex: In a transceiver, placing certain machine code and bits can configure it to transmit at specific Mbps or Gbps, using a specific bus protocol and networking protocol. Coding in machine implement able codes is done only in specific situations, it is time consuming because the programmer must first understand the processor instructions set and then memorize the instructions and their machine codes .
ØSoftware in processor specific assembly language:
                 When a programmer   understands the processor and its instructions set thoroughly, a program or a small specific part can be coded in the assembly language.
 Coding is extremely useful for configuring physical devices like ports, a line display interface, ADC and DAC and reading into or transmitting from the buffer. These codes can also be device driver codes. They are useful to run the processor or device specific features and provide an optimal coding solution. Lack of knowledge of writing device driver codes or the codes that utilize the processor -specific features invoking codes in an embedded system design team can cost a lot. Vendors may not only charge or the API but also charges intellectual property fees for each system shipped out of the company.
                 To do all the coding in assembly language may, however, be very time consuming. Full coding in assembly may be obey for a few simple, small scale systems, such as toys, automatic chocolate vending machines, robot or adopt acquisition system.
                 Fig shows the process of converting an assembly language program into the machine implantable software file and then finally obtaining a ROM image file
          1. An assembler translates the assembly software into the machine codes using step called assembling
         2. Second step is called linking a linker links these codes with the other required assembled codes. Linking is necessary because of the number of codes to be linked for the binary file.
                For example, there are the standard codes to program a delay task for which there is reference in the assembly language program .the codes for the delay must link with the assembled codes .the delay code is sequential from a certain beginning address .the assembly software code is also sequential from a certain beginning address. Both the codes have at the distinct addresses as well as available addresses in the system. Linker links these. The linked file in the binary for run-on a computer is commonly known as executable file or simply ‘.EXE file’. After linking, there has to be re-allocation of the sequences of placing the codes before actually placement of the codes
   3.In the next step, the loader program performs the tasks of reallocating the codes after finding the physical RAM address available at a given instant .The loader  is a part of the operating system and places codes into the memory after reading the .exe file. This step is necessary because the available memory address may not start from 0x0000,and binary codes have to be loaded at the different addressing during the run. The loader finds the appropriate start address. In a computer, the loader is used and it loads into a s section of RAM the program the program that is ready to run.
     4.The final step of the system design process is locating the codes as ROM image and permanently placing them at the actually available addresses in the ROM. In embedded systems there is no separate program to keep track of the available address at difficult times during the running, as in computer. The designer has to define the available addresses to load and create files for permanently locating the codes. A program called locator reallocates the linked file and creates a file for permanent location in a standard format.
      5.Lastly, either A laboratory system, called device programmer, take as input the ROM image file and finally burns into PROM or EPROM or
    (ii) Data foundry, a mask is created for the ROM of the Embedded system from the image file [the process of placing the codes in PROM or EPROM is also called burning]. The mask created from the image gives the ROM in IC chip form

Ø Software in high level language:
                                     To do all the coding in assembly language may be very time consuming in most cases. Software is therefore developed in a high level language, ’c’ or ‘c++’ or ‘java’. Most of the times, ’c’ is the preferred language .for the coding there is little need to understand assembly language instructions at all. The programmer needs to understands only the hardware organization.
          It is evident, that coding for square root will need many lines of code and can be done only by an expert assembly language programmer. To write the program in a high level is very simple compared to writing it in Assembly level program. ’c’ program features and coding  for the specific features and coding for the specific section
    Fig .the different program layers in the embedded software.

The layers are as follows:
1.   Preprocessor commands
2.   Main function
3.   Interrupt service routine
4.   Multiple tasks, say1 to n
5.   Kernel and schedule
6.   Standard library functions, protocol functions an stack allocation functions
The following fig shows the process of converting a C program into image file compiler generates the object codes, the compiler assembles the codes according to the processor instruction set and other specifications .the ‘C’ compiler for embedded systems must, as a final step of compilation, use a code-optimizer .it optimizes the codes before linking. After compilation, the linker includes the codes for the functions Printf and Sqrt codes. Codes for device management and driver codes. After linking, the other steps for creating a file for ROM image are the same as shown earlier

Ø Soft wares for the device drives and device management using an operating system:

                                In an embedded system, there are a number of physical devices like keyboard, display, disk, parallel port and network-card, virtual devices like a file and a pipe. Most often, an embedded system is designed to perform multiple functions and has to control multiple physical and virtual devices.
a device for the purpose of control, handling ,reading and writing actions can be taken consisting of three components.1.control register or word -it stores the bits that ,on setting or resetting by a device driver, control the devices 2.status register or word -it provides the flags to device status3.devic mechanism that controls the device actions
       A device driver is software for controlling, receiving and sending a byte or stream of bytes from or to a device. In case of physical devices, a driver uses the hard ware status flags and control registers bits that are in set and reset state.
      Driver controls three functions
1.   Initializing that is activated by placing appropriate bits at the control register or word
2.   Calling an ISR on interrupt or on setting a status flag in the status and run the ISR.
3.   Resetting the status flag after interrupt service.
      Using OS functions, a device driver coding can be made such that the underlying
hardware is hidden as much as possible. A device driver accesses a parallel port or serial port, keyboard, mouse, disk, network, display, file and pipe. An OS may also provide device drivers codes and for the accesses mechanisms.
             Device management software modules provide codes for detecting the presence of devices, for initializing these and for the testing the devices that are present, the modules may also include software for allocating and registering port address for the various devices at different address, including codes for detecting any collision between these, if any. It ensures that any device may have address that can be relocated by a locator .An OS also provides and executes modules or managing devices that associate with embedded system .the underlying principle is that at an instant, only one physical device should get access to or from one task only. The OS also provides and manages the virtual devices like pipes and sockets.

Ø Software design for scheduling multiple tasks and device using an RTOS:
                                          An embedded system is designed to perform scheduling of multiple functions while controlling multiple devices. Embedded system program is therefore designed as a multitasking system program. In multitasking OS, each process has a distinct memory allocation of its own and a task has one or more functions or procedures for specific job. A task may share the memory with other tasks. A processor may process multiple tasks separately   or concurrently. The kernel schedules and dispatches a task to a different state than present, it controls inter process communication, synchronization, sharing of variables, queues and pipes.
Ø Software tools in designing of an embedded of an embedded system:
                                    Various software tools are used in the design of the embedded system for assembly language programming high level language programming, RTOS, debugging and system integration tools. They include editors, interpreters, compliers, assemblers, cross assemblers, simulators, source code, engineering software, RTOS, IDES, prototypes, locators.
 Models for software designing:
     In complex or multiprocessor systems, there are different models are employees. The following are the models.
1.   Finite state machine
2.   Pertinent model
3.   Control and data Flow Graph
4.      Activity diagrams based on UML model
A few examples of small scale embedded system applications are as follows:
·        Automatic chocolate vending machine
·        Stepper motor controllers for a robotics system
·        Washing or cooking system
·        The peripheral controllers of a computer ,for example ,a CRT display controller, a keyboard controller ,a DRAM  controller, DMA  controller, a printer controller, a laser print controller, a LAN controller  ,A disk drive controller port cards, Computer  Keyboard controller ,Serial mouse, CD drive or hard disk controller
·        Remote (controller)of TV
·        Electronic smart weight display system and an industrial moisture recorder cum controller
Some examples of medium scale embedded systems are as follows:
·        Computer networking  systems ,for example ,a router ,a front-end processor in a server, a switch, a ridge ,a hub and a gateway
·        Entertainment systems –such as a video game and a music system
·        Banking systems for example ,bank ATM, and credit card transactions
·        Image Filtering ,Image processing ,Pattern recognizer, speech processing and video processing
·        A personal information manager using buffers in hand held devices
·        Embedded firewall/router using ARM7/1386 multi-processor and 32 MB of flash ROM  the load balancing and two Ethernet  interfaces are its other important functions .these interfaces support PPP,TCP.IP and UDP protocols
Examples of sophisticated embedded systems are as follows:
  • Embedded systems for wireless LAN and for convergent technology devices
  • Embedded systems for real time video and speech or multimedia processing systems
  • Embedded systems and Networking systems using high speed (400 MHz plus),ultra high speed (10 Gbps)and large bandwidth ;routers ,LANS ,switches and gateways ,SANS(storage area networks ),WANS (wide area networks ),video, interactive video and broad band IPv6 (internet protocol version 6)internet and other products
  • Security products and high speed network security .Giga rate encryption
  • Embedded sophisticated system for space lifeboat (NASA `s X-38 project) under development .it is for a rescue lifeboat that will be used in the future with the ISS (international apace station).in an emergency, it will bring the astronauts and crewmembers back to the earth resisting all climatic /atmosphere conditions and meeting exact timing constraints .this will else be a fault tolerant system.



conclusion

                                   All the topics discussed in this paper that is software concepts, hardware concepts are the most important components of the embedded systems. Each of them has its own significance in its functionalities. Even though a good amount of effort is put down for the development of this field still we can do a lot in this field
       the applications started with multitasking toys , grown to CD drives ,digital dairies and grown up to bio-medical , high level applications can be exampled by computer networking systems , signal traffic systems and DNA pattern recognition.
Finally sophisticated applications included wireless LAN, security products. With the view of various applications of embedded systems, we can conclude that the era of embedded systems has been ushered changing lifestyles tremendously.


     



















  
   
  

  





             

.

1 comment:

Unknown said...

Such kind of systems are highly reliable and do demand for high level security tools. This article do explains most of the important things about these systems. Its very useful.
digital signatures