🎧 New: AI-Generated Podcasts Turn your study notes into engaging audio conversations. Learn more

Unit -1 Introduction of Embedded System.pdf

Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...

Full Transcript

UNIT -1 INTRODUCTION TO EMBEDDED SYSTEM Basics of Developing and Functional building block of embedded system - Characteristics of embedded system applications - Structural units in Embedded processor -Challenges in embedded system design Definition of Embedded System (ES): “An embedded system is a...

UNIT -1 INTRODUCTION TO EMBEDDED SYSTEM Basics of Developing and Functional building block of embedded system - Characteristics of embedded system applications - Structural units in Embedded processor -Challenges in embedded system design Definition of Embedded System (ES): “An embedded system is a system that has software embedded into computer-hardware, which makes a system dedicated for an application (s) or specific part of an application or product or part of a larger system. Other words, “An embedded system is one that has dedicated purpose software embedded in computer hardware.” A system-on-a-chip (SoC) is a microchip with all the necessary electronic circuits and parts for a given system, such as a Smartphone or wearable computer, on a single integrated circuit (IC). Embedded System Characteristics: (1) Dedicated functions (2) Dedicated complex algorithms (3) Dedicated (GUIs) and other user interfaces for the application (4) Real time operations— Defines the ways in which the system works, reacts to the events and interrupts, schedules the system functioning in real time and executes by following a plan to control the latencies and to meet the deadlines. [Latency — Waiting interval between the instance at which a need to run the codes arises for task (or interrupt service routine) following an event and instance of start executing the codes] (5) Multi-rate operations — Different operations may take place at distinct rates. For example, the audio, video, network data or stream and events have the different rates and time constraints to finish associated processes. Constraints (Limitations) of an Embedded System Design: a) Available system-memory b) Available processor speed c) Limited power dissipation when running the system continuously in cycles of the System start, wait for event, wake-up and run, sleep and stop. d) Performance, e) power, f) size, g) Non-recurring design cost and manufacturing costs. Classification of Embedded System: Figure 1.1: Classification of Embedded System Embedded systems are classified into four categories based on their performance and functional requirements:  Stand alone embedded systems  Real time embedded systems  Networked embedded systems  Mobile embedded systems Stand Alone Embedded Systems: Stand alone embedded systems do not require a host system like a computer, it works by itself. It takes the input from the input ports either analog or digital and processes, calculates and converts the data and gives the resulting data through the connected device-Which either controls, drives or displays the connected devices. Example: MP3 players, Digital Cameras, video game consoles, microwave ovens and temperature measurement systems. Real Time Embedded Systems: A real time embedded system is defined as, a system which gives a required o/p in a particular time. These types of embedded systems follow the time deadlines for completion of a task. Example: Multimedia systems that provide text, graphic, audio, and video interfaces Building managers that control such entities as heat, lights, doors, and elevators Networked Embedded Systems: These types of embedded systems are related to a network to access the resources. The connected network can be LAN, WAN or the internet. The connection can be any wired or wireless. Example: Home security system wherein all sensors are connected and run on the protocol TCP/IP Mobile Embedded Systems: Mobile embedded systems are used in portable embedded devices like cell phones, mobiles, digital cameras, mp3 players and personal digital assistants, etc.The basic limitation of these devices is the other resources and limitation of memory. Embedded Systems are classified into three types based on the performance of the microcontroller such as  Small scale embedded systems  Medium scale embedded systems  Sophisticated embedded systems Small Scale Embedded Systems: Simple in application need Performance not time-critical. Built around low performance & low cost 8 or 16 bit μp/μc. Example: an electronic toy Medium Scale Embedded Systems: Slightly complex in hardware & firmware requirement. Built around medium performance & low cost 16 or 32 bit μp/μc. Usually contain operating system. Examples: Industrial machines. Sophisticated Embedded Systems: Highly complex hardware & firmware. Built around 32 or 64 bit RISC μp/μc or PLDs or Multicore Processors. Response is time-critical. Examples: Mission critical applications. Hardware units in the Embedded Systems/ Structural Units in Embedded Systems / Components of Embedded System Hardware Figure 1.2: Typical Embedded System Hardware units 1.3.1. Processor:  A Processor is the Heart of Embedded System.  For an Embedded system designer knowledge of microprocessor and microcontroller is a must. Essential Units Fucntion Program Flow and data path Fetching instructions from the Control Unit (CU) memory Execution Unit (EU) Executing the instructions which includes arithmetic and logical, jump , data transfer Embedded Processor Multicore Processor General Purpose Processor (GPP) Application Specific Single Purpose Processor (SPP) Application Specific System -Video Conference -8086 Microprocessor Instruction Processor (ASIP) -Coprocessor(Graphic proceesing) Processor (ASSP) System -8051 Microcontroller -ARM Processor -Speech Processor Set-Up Boxes, DVD, Digital -DSP Processor -Java Accelerator Television -Network Processor Figure 1.3: Classification of Embedded System Processor Selection of Processor in ES  Instruction Set  Processor ability to solve the complex algorithms used in meeting the deadlines for their processing.  Maximum bits in operand (8 or 16 or 32) in a single arithmetic or logical operation.  Internal and External bus-widths in the data-path  Clock frequency in MHz and Processing speed – Million Instructions Per Second (MIPS) or Million Floating Point Instructions Per Second (MFLOPS). 1.3.2. Power Source:  Most Systems have power supply of their own with separate supply rails for IOs, clock, basic processor, memory and analog units.  A Power supply source or charge pump (Charge pumps use some form of switching device to control the connection of a supply voltage across a load) is essential in every system.  Various units in an embedded system operate in one of the following four ranges: 5.0V±0.25V, 3.3V±0.3V, 2.0V±0.2V and 1.5V±0.2V 1.3.3. Clock Oscillator Circuit and Clocking Units:  Appropriate clock oscillator circuit.  Real Time Clock *( System Clock) and Timers driving hardware and software 1.3.4. Reset Circuit: When program executes the program counter increment or changes. A Program that is reset and runs on power-up can be one of the following:  A system program that executes from the beginning  A System boot-up program  A System initialization program The Watch Dog Timer (WDT) is required feature in control applications A watchdog timer (WDT) is an electronic timer that is used to detect and recover from computer malfunctions. During normal operation, the computer regularly resets the watchdog timer to prevent it from elapsing, If program error occurs due to a hardware fault, the computer fails to reset the watchdog, the timer will elapse and generate a timeout signal. Figure 1.4: Functional Block of Watch Dog Timer (WDT) 1.3.5. Memory: The memory used in embedded systems can be either internal or external. The internal memory of a processor is very limited. For small applications, if this memory is sufficient, there is need to used external memory. Figure 1.5: Various Forms of System Memory a. Functions Assigned to the ROM or EPROM or Flash 1. Storing 'Application' program from where the processor fetches the instruction codes 2. Storing codes for system booting, initializing, initial input data and Strings. b. Functions Assigned to the Internal, External and Buffer RAM 1. Storing the variables during program run, 2. Storing input or output buffers for example, for speech or image. 1.3.6. Interrupts Handler: Interrupt Handling element for the external port interrupts, IO interrupts, timer and RTC interrupts, software interrupts and exceptions 1.3.7. I/O Communication Unit: (a) Communication : Network Ethernet or serial driver to communicate with host Driver embedded system Expansion Facility (b) Serial Bus : UART (512 kbaud/s), 1-wire CAN (33 kbps), Industrial I2C (100kbps), SPI (100 kbps), USB 2.0 (Up to 480 Mbit/s, 25 meter) (c) Parallel Bus : PCI : 266 MB/s (32-bit at 66 MHz or 64-bit at 33 MHz), PCI-X: 4,266 MB/s(64-bit at 533-MHz) 1.3.8 Software tools for designing Embedded System: (a) Editor : write the code (C or C++ Programming Language) for embedded system (b) Compiler : Used to convert the source code in to object code. (c) Assembler : assembler is to convert a code written in assembly language into machine language (d) Debugger : goes through the whole code and tests it for errors and bugs (e) Linker : computer program that combines one or more object code files and library files together in to executable program (f) Libraries : It is a file written in C or C++ and can be used by different programs and users. (g) Simulator : Helps you to see how your code will work in real time. (h) Integrated : It is software that contains all the necessary tools required for Development embedded software development. Environment (IDE) Figure 1.6: Applications of Embedded System 1.4 Various steps in Embedded System Design Process/Embedded System Design Procedure: The Concepts used during design process are as follows: 1. Abstraction: Each Problem component is first abstracted. 2. Hardware and Software Architecture: Architecture should be well understood before a design. 3. Extra function Properties: Extra functionalities required in the system being developed should be well understood from the design 4. System Related Family Designs: Families of related systems developed earlier should be taken into consideration during designing. 5. Modular Design: System Designing is fast by decomposition of software into modules that are to be implemented. (a)Modules should be clearly understood and should maintain continuity. (b)Appropriate protection strategies are necessary for each module. A module is not permitted to change or modify module functionality. 6. Mapping:Mappiing into various representation is done from software requirements (Matching hardware equipments for the defined software architecture) 7. User Interface Design: It is designed as per the requirement of user. For Example Automatic Chocolate Vending Machine (ACVM) Designed with Touch Screen User Interface (GUI), Voice User Interface (VUI). 8. Refinements: Each component and module design needs to be refined iteratively till it becomes most appropriate for implementation by software team. Figure 1.7: Activities for software design during an embedded software development process 1.5 Various types of Memory used in Embedded System: The memory used in embedded systems can be either internal or external. The internal memory of a processor is very limited. For small applications, if this memory is sufficient, there is need to used external memory. Figure 1.8 Various Memory used in ES There are two types of memory, primary memory and secondary memory. 1. Primary memory: Primary memory is directly addressed by the processor. i) RAM: (Random Access Memory) Read or write memory. It stores temporary data and stack.  Static RAM- Data is stored in the form of voltage. It is made up of flip flops. It is realized using 6 transistors. 4 transistors are part of flip flop and two transistors are for control access.  Dynamic RAM- It stores data in the form of charge. It is made up of MOS transistors. The circuit has 1 MOSFET and a capacitor. ii) ROM: (Read Only Memory) It stores application programs from where processor fetches instruction code. It stores codes for system booting and RTOS. It retains content even after system is turned off. It is a non- volatile storage memory.  Masked ROM- It is a one-time programmable device. It uses hard wired technology for storing data. Low Cost and high volume production are its advantages.  PROM- The end user is responsible for programming device. It has Nichrome or polysilicon wires.  EPROM- It is Erasable Programmable Read Only Memory. The information is stored in the form of bits. Reprogramming is possible. Data is erased by exposing window to UV rays.  EEPROM- It is Electrically Erasable Programmable Read Only Memory. The information is altered using electrical signals.  Flash- It is the ROM technology used in embedded system. It combines re- programmability of EEPROM and high capacity of standard ROMs. 2. Secondary memory:  Secondary memory is not directly addressed by the processor. Programs and data are kept on a long term basis. It has enormous storage capacity as compared to primary memory. Example: Hard disks, floppy disks and CD-ROM's are secondary devices.  High-end operating systems and application software require very large programs and virtual memory. Such requirements are driving the industry to introduce secondary storage on some embedded devices, such as industry to introduce automation systems, mobile devices, etc.  The secondary storage devices have very large memories compared to memory chips, but they need moving parts in order for data to be written to them or read from them. Type Volatile? Writeable? Erase Max Erase Speed Size Cycles SRAM Yes Yes Byte Unlimited Fast DRAM Yes Yes Byte Unlimited Moderate Masked No No n/a n/a Fast ROM PROM No Once, with a n/a n/a Fast device programmer EPROM No Yes, with a device Entire Limited Fast programmer Chip EEPROM No Yes Byte Limited Fast to read, slow to erase/write Flash No Yes Sector Limited Fast to read, slow to erase/write NVRAM No Yes Byte Unlimited Fast Table 1. Characteristics of the various memory types Direct Memory Access (DMA) When I/O’s are needed to transfer large amount of data from peripheral device to the system, interrupt based mechanism is not practical. Since, each interrupt requires large time through the concept of context switching. The configuration of a bus with DMA controller shown in figure Bus Request DMA Device Controller Bus grant CPU Clock a R/W Address n Data Ready Data Memory The drawback can overcome by DMA driven I/O’s. It performs data transfer between external devices and systems by following modes: -Multi byte data set -Burst of Data -Block (or) bulk of data Block Diagram of DMA Hardware Architecture for Embedded systems  An embedded system is built around a processor. The central processing unit does the necessary computation based on the input it receives from various external devices.  The functionality of the CPU is an embedded system is same as the functionality of the CPU in a desktop, except that the CPU in an embedded system is less powerful.  The processor has limited internal memory, and if this internal memory is not sufficient for a given application external memory devices are used.  The hardware also includes any components that facilitates the user-application interaction, such as display units, keypads etc. Processor The processor used in embedded systems can be of three types:  Micro-Controllers  Microprocessors  Digital Signal Processor BUILDING BLOCKS of embedded system  Input Devices  Output Devices  Central Processing Unit  Communication Interfaces  Memory (ROM and RAM)  Application Specific Circuit Figure 1.9 Building Blocks of Embedded System  Embedded system, particularly the memory, has limited resources. It does not have secondary storage devices such as the floppy disk or CDROM.  These systems have to do effort against some deadlines. A specific work has to be done within a specific time. This is called Real Time System. Missing a deadline may become the cause of catastrophe- damage of property or loss of life.  It’s a specification of this system that it must be highly reliable that you cannot allow resetting your Embedded System.  Some Embedded Systems have to work in extreme environmental conditions such as in very high temperature and humidity.  In Embedded Systems-wide variety of operating systems and processors unlike desktop computers, where hardware platform is controlled by Intel and the operating system is controlled by Microsoft. Characteristics of embedded system applications  An embedded system can be an independent system or it can be a part of a large system.  An embedded system is a microcontroller or microprocessor based system which is designed to perform a specific task.  For example, a fire alarm is an embedded system; it will sense only smoke. It has hardware.  Unlike general computer systems, embedded systems work only for a particular function in a time-bound manner.  For instance, a washing machine can not multitask like a laptop. In this regard, here are some unique characteristics of an embedded system. Sophisticated Functionality The functionality of no two embedded system applications is bound to be the same. The functionality of a washing machine is different from that of a microwave. However, the functionality of a laptop and a desktop are almost the same. Real-Time Operation It doesn’t mean live operation. It means the software programs hardware to operate in a time- bound fashion. It could also have two modes: Hard and Soft. The former mode indicates the task has to be completed within the allotted time (ex: clock), but in the soft mode, the system could use additional time over the allotted time (ex: microwave). Low Manufacturing Cost As an embedded system design aims for any particular application, it involves less manufacturing cost as compared to a versatile general computing system. As a result, embedded systems also require less power to perform operations. Processor and Memory Depending on the type, processor and memory requirements may vary. For instance, small embedded systems would require less memory, but sophisticated systems demand more memory and run on multi-core processors. Tight Design Constraint There are many design constraints to consider around the cost, performance, size, and power of an embedded system to realize its absolute performance. These design factors are kept to a minimum to justify their simple function. General Purpose System Vs Embedded System In order to better realize the characteristics of an embedded system, let’s compare it with a general computing system. General purpose computer Embedded system Purpose Multipurpose Single function Low or no resource Constraint constraint Size, power, cost, memory, real-time Performance Faster and better Fixed runtime requirement Can have keyboard, Integrated into the real world with User display, mouse, touch buttons, sensors, Leads, LCDs, Interface screen Bluetooth system Characteristics of an Embedded System  Sophisticated Functionality.  Real-Time Operation.  Low Manufacturing Cost.  Processor and Memory.  Tight Design Constraint.  Based on Performance and Functional Requirements.  Based on the Performance of the Microcontroller. Challenges of Embedded Software Development  Embedded software is always a constituent of a larger system, for instance, a digital watch, a smartphone, a vehicle or automated industrial equipment.  Such embedded solutions must have real-time response under all circumstances within the time specified by design and operate under the condition of limited memory, processing power and energy supply.  Challenge #1: Stability  Challenge #2: Safety  Challenge #3: Security  Challenge #4: Launch Phase  Challenge #5: Design Limitations  Challenge #6: Compatibility and Integrity Challenges in Embedded System Design An embedded system is the combined hardware and software that work together to perform a specific function for a device controlled electronically. Embedded systems are found in a variety of products, in everything from large industrial machines to the mobile phone you hold in your hand; from the car you drive to the equipment in your local hospital. As technologies advance, systems become more complex, with the potential to use millions of lines of code and thousands of parts in their design. More intricate complexities create more potential challenges in embedded system design. No industry is exempt from challenges faced in designing an embedded system, and they are even more prevalent in regulated industries like the aerospace, automotive, and medical device industries where malfunctioning products can have serious consequences. Here are some of the common challenges in embedded system design: Collaboration: The more complex a system is, the higher the number of development teams and departments involved, and the greater their need for easy and effective collaboration. You know what they say about having too many cooks in the kitchen? Unlike the soup, the product will benefit from a multitude of collaborative minds, but it can also present several challenges in embedded system design. You must be able to identify where your colleagues are in their work to know how it impacts yours. Communication: Good communication is key to collaboration. A missed or mixed message can create major setbacks and challenges in embedded system design. Document and artifact tracking: Not being able to find required project artifacts in an easy and timely manner can cause costly delays to your company and customers and may even derail your ability to meet your deadlines. The capability to search and easily find a project artifact enhances your ability to collaborate effectively. If multiple teams are working with different versions of artifacts or documents, it is difficult to know if you can trust your data. Having a centralized location and management process for documentation is critical. Traceability: Traceability is not a nice-to-have; it is a must have! It is essential for manufacturers to trace artifacts across an entire project, especially for regulated industries involving high risk and severe repercussions for defective products. If problems are identified during embedded software testing, traceability empowers the design and development teams to find out what and where things went wrong. Maintaining traceability and managing evolving requirements and interdependencies is a formidable task and can create challenges in embedded system design and development if not done properly. Compatibility: With the complex nature of embedded systems, it is likely multiple teams with varied expertise and responsibilities across departments in a company, or perhaps even from different companies entirely, will work together to create the product. Each team may use different tools to perform and document their work, causing potential embedded software design issues or conflicts if the tools do not interface seamlessly with each other or if they utilize different languages and/or adhere to differing company standards.

Use Quizgecko on...
Browser
Browser