You are on page 1of 10

How Embedded System Useful in Todays World??????

Our world and society are shaped and governed by embedded systems. It's difficult to imagine day-to-day life without such systems. There would be no energy ready to use, no running water, and no food supplies; business or transportation would immediately be disrupted; diseases would spread; and security would dramatically decrease. In short, our society would disintegrate rapidly. Examples of embedded systems include pacemakers, implanted biosensors, RFID tags, cell phones, home appliances, satellites, train control systems, and automotive components. Embedded systems are microcontroller-based systems built into technical equipment. They're designed for a dedicated purpose and usually don't allow different applications to be loaded and new peripherals to be connected. Communication with the outside world occurs via sensors and actuators; if applicable, embedded systems provide a human interface for dedicated actions. The software executed in those systems is called embedded software. It's an integral part of the system itself. Embedded software is defined as a special-purpose software system built into a larger system. The end user usually doesn't recognize embedded software as software in the traditional way; instead, he or she perceives it as a set of functions that the system provides. Embedded software is a key driver of most industries. 1. INTELLIGENT TRAFFIC LIGHT CONTROL USING EMBEDDED SYSTEMS: Growing number of road users and the limited resources provided by current infrastructures lead to ever increasing traveling times. Traffic in a city is very much affected by traffic light controllers. When waiting for a traffic light, the driver looses time and the car uses fuel. To make traffic light controllers more intelligent, we exploit the emergence of novel technologies such as communication networks and sensor networks, as well as the use of more sophisticated algorithms for setting traffic lights. The Intelligent Traffic Control System is formed as a network of embedded systems. Intelligent traffic light control does not only mean that traffic lights are set in order to minimize waiting times of road users, but also that road users receive information about how to drive through a city in order to minimize their waiting times. This means that we are coping with a complex multi-agent system, where communication and coordination play essential roles. The research has led to a novel system in which traffic light controllers and the behavior of car drivers are optimized using machine-learning methods.

CPU Architecture :

BLOCK DIAGRAM OF CPU The microcontroller consists of eight bit ALU. Associated Register Array means registers like register A, register B , PSW(program status word ) , SP (stack pointer), 16-bit PC (program coungter) and a 16-bit DPTR (data pointer register).

Internal parts of CPU :


The CPU has two main parts : The Control Unit AND The Arithmetic Logic Unit.

Control Unit : It is responsible for directing and coordinating most of the computer
system activities. It does not execute instructions by itself. It tells other parts of the computer system what to do. It determines the movement of electronic signals between the main memory and arithmetic logic unit as well as the control signals between the CPU and input/output devices.

Arithmetic logic Unit : The ALU performs all the arithmetic and logical functions i.e.
addition, subtraction, multiplication, division and certain comparisons. And the logic unit can perform logical operations. These comparisons include greater than, less than, equals to etc. The ALU controls the speed of calculations. An imp and unique feature of the microcontroller architecture is that the ALU can also manipulate 1 bit as well as 8-bit data types . Individual bits may be set, cleared, moved, complemented, tested & used in logic computation.

The parts of the CPU are usually connected by an electronic component referred to as a Bus, which acts as an electronic highway between them. The CPU has special purpose storage devices called registers, helps in storing data and instructions. Registers: It is a special temporary storage location within the CPU. Registers quickly, accept, store and transfer data and instructions that are being used immediately (main memory hold data that will be used shortly, secondary storage holds data that will be used later). To execute an instruction, the control unit of the CPU retrieves it from main memory and places it onto a register. The typical operations that take place in the processing of instruction are part of the instruction cycle or execution cycle. The instruction cycle refers to the retrieval of the instruction from main memory and its subsequence at decoding. The process of alerting the circuits in CPU to perform the specified operation. The time it takes to go through the instruction cycle is referred to as I-time. Bus : The term Bus refers to an electrical pathway through which bits are transmitted between the various computer components. Depending on the design of the system, several types of buses may be present. The most important one is the data bus, which carries the data through out the central processing unit. The wider the data bus, the more data it can carry at one time and thus the greater the processing speed of the computer. Ex: Intel 8088 processor uses a data bus of 8 bits wide. Some super computers contain buses that are 128 bits wide.

The first step, fetch , involves retrieving an instruction (which is represented by a number or sequence of numbers) from program memory. The location in program memory is determined by a program counter (PC), which stores a number that identifies the current position in the program.

In the decode step, the instruction is broken up into parts that have significance to other portions of the CPU. The way in which the numerical instruction value is interpreted is defined by the CPU's instruction set architecture (ISA).[4] Often, one group of numbers in the instruction, called the opcode, indicates which operation to perform. The remaining parts of the number usually provide information required for that instruction, such as operands for an addition operation. Such operands may be given as a constant value (called an immediate value), or as a place to locate a value: a register or a memory address, as determined by some addressing mode. During execution step, various portions of the CPU are connected so they can perform the desired operation. If, for instance, an addition operation was requested, an arithmetic logic unit (ALU) will be connected to a set of inputs and a set of outputs. The inputs provide the numbers to be added, and the outputs will contain the final sum. The ALU contains the circuitry to perform simple arithmetic and logical operations on the inputs (like addition and bitwise operations). The final step, writeback, simply "writes back" the results of the execute step to some form of memory. Very often the results are written to some internal CPU register for quick access by subsequent instructions. In other cases results may be written to slower, but cheaper and larger, main memory. Some types of instructions manipulate the program counter rather than directly produce result data.

Register Set Instruction (Operation) Types Instruction Formats Addressing Modes Data Types Reduced Instruction Set Computer (RISC) Architecture

INSTRUCTION SET
For an instruction to execute, the following elements need to be defined: Operation code -ADD, I/O, specified by a binary code known as operation code or opcode Source operand reference operands that are inputs for the operation-could be held in main memory, processor register or i/o device Result operand reference operands that indicate the result of the operation

Next instruction reference tells the processor where to fetch the next instruction from, mostly in main memory. If it is the next one, it does not have to be specified

Instruction Representation
Each instruction is represented as a sequence of bits within a computer The instruction is represented as fields, for the elements of an instruction 4 bits 6 bits 6 bits

This format is used in the IR Symbolic representation of machine instructions is used-for the sake of the programmer and reader e.g. ADD, SUB, MPY, DIV, LOAD, STOR, ADD as in ADD R, Y

INSTRUCTION TYPES
Instruction types must be sufficient to express any of the instructions from a High level language-mostly instructions at machine level involve movement of data to/fro registers Data processing: Arithmetic and logic operations Data storage: memory instructions Data movement : I/O instructions Control: Test and branch instructions

INSTRUCTION SET DESIGN


It affects many aspects of a computer system It defines many of the functions of the processor, hence influences the implementation of the processor The programmer controls the processor through the instruction set

INSTRUCTION SET ARCHITECTURE


A powerful and flexible ISA is desirable. However: Hardware (internal architecture) complexity and cost establishes upper limits on power and flexibility of practical instruction set architectures. Application programmers across the board may not agree on what is a powerful and useful function or feature. An ISA is generally a result of compromise! The functions and facilities provided by an ISA include:

An instruction set defined by: operation types, instruction formats, addressing modes, data types

Facilities e.g. registers, memory model and I/O model

REGISTER GROUP
General purpose registers: are intended for use by the machine level program as a temporary memory for data values as well as address/pointer values.

How many should they be? as many as possible (cost implications) What sizes? driven by the kind of data to be processed e.g. for integers, 32 bit Question: Explain the classification of machines by register size. 16-bit architectures Intel 8086, 80186 and 80286 32-bit architectures x86-32 or i386 , 80386 64-bit architectures x86-64, AMD64, IA-64, Intel 64 Special purpose registers: each is provided for some dedicated use. Two common examples are the program counter (PC) register and the status register. Function of pc register, status register (flag register/condition code register)? Zero, sign, carry, negative, overflow, interrupt enabled, parity flags A group of special purpose registers in the IA-32(Intel Architecture, 32-bit) architecture known as segment registers are intended for use as segment base pointers and provides the programmer with a powerful realization of the segmented memory model. Additional system registers may be provided to support multitasking operating systems functions e.g. memory management, task management, protection, etc.

INSTRUCTION FORMAT REGISTER


An instruction specifies some action. For each action, there may be zero, one or more objects. In general the instruction format provides for a code that specifies the action, i.e. operation code or opcode, and the locations or values of the operands. An instruction will be represented in the machine as a bit pattern. The instruction format specifies the structure of the bit pattern and its semantics. General format Opcode operands

INSTRUCTION FORMATS
Information involved in any operation performed by the CPU needs to be addressed. Such info is called the operand. Any instruction issued by a processor must carry at least 2 types of info: Operation to be performed opcode field Address information of the operand on which the operation is to be performed address field

Instructions can be classified based on the number of operands as: Three-address Two-address One-and-half-address One-address Zero-address

Convention being used: operation, source, destination

THREE-ADDRESS INSTRUCTION
Takes the form: operation,add-1,add-2,add-3 add-1to3 refers to a register or memory location E.g. ADD R1,R2,R3 (registers): Operation: addition Source: Values to be added are stored in R1 and R2 Destination: Result stored in R3

Can the above operation be performed in any other way? mov R2,R3; add R1,R3

TWO-ADDRESS INSTRUCTION
Form: operation,add-1,add-2 add-1,add-2: register or memory location E.g. ADD A,B (memory locations) Operation: add Add contents of A and B

Store results in B

ONE-ADDRESS INSTRUCTION
E.g ADD R1 In this case the instruction implicitly refers to the accumulator register Contents of accumulator register added to contents of R1 and results stored back into the accumulator register Equivalent to: ADD R1,Racc,Racc ADD R1,Racc

ZERO-ADDRESS INSTRUCTIONS
Instructions that use stack operations source and destination are implicit! Stack data structure in which the last data item stored is the first retrieved (LIFO) Operations: push and pop A specific register, called the stack pointer (SP), is used to indicate the stack location that can be addressed

ADDRESSING MODES
Addressing in general refers to the specification of operands within an instruction. The different ways in which operands can be addressed are called addressing modes. Addressing modes differ in the way the address information of operands is specified. => Number of different ways to address memory locations

DIFFERENT ADDRESSING MODES


Immediate Addressing The operand is literally specified in the instruction i.e. is a constant. E.g. loading the decimal value 1000 into a register Ri LOAD #1000,Ri

Advantage, disadvantage? Direct (Absolute) Mode Address of the memory location that holds the operand is included in the instruction E.g. loading the value of the operand stored in memory location 1000 into register Ri LOAD 1000,Ri

Indirect Mode What is included in the instruction is not the address of the operand, but rather a name of a register or memory location that holds the (effective) address of the operand. Customary to include the name of the register or memory location in parentheses E.g LOAD (1000), Ri Load register Ri with the contents of the memory location whose address is stored at memory address 1000

Register indirect addressing or memory indirect addressing

Indexed Mode Address of the operand is obtained by adding a constant to the contents of a register, called the index register. E.g. LOAD X(Rind), Ri Load register Ri with the contents of the memory location whose address is the sum of the contents of register Rind and the value X

You might also like