CPE 415 Lecture 2 updated PDF

Document Details

ElegantQuasar6239

Uploaded by ElegantQuasar6239

Nile University of Nigeria

Sadiq Abubakar Mohammed

Tags

Embedded Systems Microprocessors Microcontrollers Computer Engineering

Summary

This document is a lecture presentation on embedded systems covering topics such as, hardware, software, microprocessors, microcontrollers, and other related components. The lecture presentation also contains information about GPP, ASIP, and comparisons between the two.

Full Transcript

CPE 415 Embedded Systems Lecture 2 S ADIQ ABUBAKAR MOHAMMED S A D I Q. A B U B A K A R @ N I L E U N I V E R S I T Y. E D U. N G C O M P U T E R E N G I N E E R I N G D E PA RT M E N T Parts of an Embedded...

CPE 415 Embedded Systems Lecture 2 S ADIQ ABUBAKAR MOHAMMED S A D I Q. A B U B A K A R @ N I L E U N I V E R S I T Y. E D U. N G C O M P U T E R E N G I N E E R I N G D E PA RT M E N T Parts of an Embedded System Learning outcome: Know the parts of an embedded system. Differentiate between microprocessors and microcontrollers. Learn the criteria for microcontroller selection. Parts of an embedded system The parts of an embedded system can be divided into two main categories: hardware and software. Hardware: The hardware components of an embedded system are the physical components that make up the system. These components include:  Processor: The processor is the brain of the embedded system and is responsible for executing instructions.  Memory: Memory is used to store the system's code and data.  I/O devices: I/O devices allow the system to communicate with the outside world. Examples of I/O devices include sensors, actuators, and displays.  Power supply: The power supply provides power to the embedded system. Software: The software components of an embedded system are the programs that run on the system. These programs include:  Operating system: The operating system provides basic services to the embedded system, such as task scheduling and memory management.  Device drivers: Device drivers allow the operating system to communicate with the hardware components of the embedded system.  Application software: The application software is the code that performs the specific task or tasks of the embedded system. In addition to the above components, embedded systems may also include other components such as clocks, timers, and communication interfaces. Embedded System Core Embedded systems are domain and application specific and are built around a central core. The core of the embedded sytem falls into any one of the following categories: 1. General purpose and Domain Specific Processors a. Microprocessors b. Microcontrollers c. Digital Signal Processors 2. Application Specific Integrated Circuits (ASICs) 3. Programmable Logic Devices (PLDs) 4. Commercial off-the-shelf- Components General Purpose and Domain Specific Processors Almost 80% of the embedded systems are processor/controller based. The processor may be a microprocessor or a microcontroller or a digital signal processor, depending on the domain and application. Most of the embedded systems in the industrial control and monitoring applications make use of the commonly available microprocessors or microcontrollers whearas domains which require signal processing such as speech coding, speech recognition, etc. make use of special kind of digital signal processors supplied by manufacturers like, Analog Devices, Texas Intruments, etc. GPP vs ASIP A general Purpose Processor (GPP) is a processor designed for genera; computational tasks. The processor running inside your laptop or desktop is a typical example of GPP. They are produced in large volumes and target the general market. Application Specific Instruction Set Processors (ASIP) are processors with architecture and instruction set optimised to specific-domain/application requirements like network processing, automotive, telecom, media applications, digital signal processing, control applications etc., ASIPs fill the architectural spectrum between GPPs and Application Specific Integrated Circuits (ASICs). The need for an ASIP arises when the traditional GPPs are unable to meet the increasing application needs. Most of the embedded systems are built around ASIPs. Some µc (like Automotive AVR, megaAV from Atmel), system on chips, digital signal processors, etc. are examples of ASIPs. Microprocessors A microprocessor (µP) is a complete central processing unit (CPU) of a computer, embedded system, or other electronic devices. It is a digital integrated circuit that performs arithmetic and logic operations on binary data. A microprocessor is a dependent unit that requires the combination of other hardware like memory, timer and interrupt controller etc. for proper functioning. Microprocessors typically contain the following components: Arithmetic logic unit (ALU): The ALU performs arithmetic and logic operations on data. Control unit: The control unit controls the flow of data and instructions through the microprocessor. Registers: Registers are temporary storage locations for data and instructions. Bus interface: The bus interface allows the microprocessor to communicate with other components in the system. Microprocessors have become increasingly powerful and efficient over the years. This is due to advances in semiconductor technology, which have allowed more transistors to be packed onto a single chip. As a result, microprocessors are now used in a wide range of devices, from simple calculators to complex supercomputers. Here are some examples of microprocessors: Intel Core i9 AMD Ryzen 9 Qualcomm Snapdragon 8 Gen 1 MediaTek Dimensity 9000 Microprocessors are essential for the operation of modern devices. They are used to perform a wide range of tasks, from processing data and executing instructions to controlling other components in the system. Microprocessors are becoming increasingly powerful and efficient, and they are playing an increasingly important role in our lives. Microcontrollers A microcontroller (µC) is a small, self-contained computer system on a single integrated circuit (IC). It contains a central processing unit (CPU), memory, and input/output (I/O) peripherals. Microcontrollers are designed to perform specific tasks in embedded systems, such as controlling the operation of a washing machine or a car engine. They are highly integrated, compact devices that contain all the essential components for an embedded system, including CPU, RAM, flash memory, timers, and input/output interfaces, on a single chip. They include a variety of peripherals, such as analog-to-digital converters (ADC), digital-to-analog converters (DAC), timers, communication interfaces (e.g., UART, SPI, I2C), and GPIO pins for interfacing with sensors, displays, and other external components. Examples of microcontrollers: Intel 8051 ATmega 328 ARM Cortex VS Microprocessor Microcontroller A single chip representing the CPU. A single chip representing the CPU, RAM, ROM, timers, I/O ports, other peripherals. High processing power Lower processing power High power consumption Lower power consumption Higher performance Relatively lower performance Typically 32/64 bit Typically 8/16 bit Relatively slower Faster Higher cost of entire system Lower cost Based on von neumann architecture Based on havard architecture Mainly used in general computers Mainly used in smaller dedicated systems DSP Digital Signal Processors (DSPs) are powerful special purpose 8/16/32 bit up designed specifically to meet the computational demands and power constraints of today’s embedded audio, video and communications applications. DSPs are 2 to 3 times faster than the GPP in signal processing applications, this is because of the architectural difference between the two. DSPs implement algorithms in hardware which speeds up the execution whereas GPPs implement the algorithm in firmware and the speed of execution depends primarily on the clock for the processors. ASIC Application Specific Integrated Circuit (ASIC) is a microchip designed to perform a specific or unique application. It is used as replacement to conventional general purpose logic chips. It integrates several functions into a single chip and there by reduces the system development cost. Most ASICs are proprietary products. As a single chip, ASIC consumes a very small area in the total system and thereby helps in the design of smaller systems with high capabilities/functionalities. PLD Programmable Logic Device (PLD) provides specific functions; including device-to-device interfacing, data communication, signal processing, data display, timing and control operations and almost every other function a system must perform. Logic devices can be classified into 2 broad categories: fixed and programmable. Fixed logic devices perform one function or set of functions-once manufactured, they can not be changed. ADC / DAC SoC Suitable Applications for µP and µC Microcontrollers and microprocessors are suitable for different types of applications based on their inherent characteristics and capabilities. Applications where Microprocessors are More Suitable: Computing Devices: Microprocessors are the core components of personal computers, laptops, servers, and workstations, where high computational power and flexibility are essential for running a wide range of software applications. Smartphones and Tablets: These devices require fast processing, high-quality graphics, and the ability to run diverse applications. Microprocessors provide the performance required for multimedia and multitasking. Gaming Consoles: Gaming consoles demand powerful processors to handle complex graphics, physics, and AI algorithms, making microprocessors an ideal choice. General-Purpose Software Development: Microprocessors are preferred for general- purpose computing tasks where a wide variety of programming languages and software applications are used, including web servers, databases, and content creation software. Scientific and Engineering Applications: Microprocessors are used in scientific research, simulations, and engineering tasks that require high computational power and complex algorithms, such as finite element analysis or molecular modelling. Server Farms and Data Centers: Microprocessors power the servers in data centers and cloud computing environments, where scalability and high-performance computing are crucial. Applications where Microcontrollers are More Suitable: Embedded Systems: Microcontrollers are the heart of most embedded systems, including home appliances (e.g., microwave ovens, washing machines), automotive control systems (e.g., engine control units), and industrial automation (e.g., PLCs). Their low power consumption and integration of peripherals make them ideal for these applications. IoT Devices: Internet of Things (IoT) devices often require low power and are designed for specific tasks, such as sensor data collection, environmental monitoring, and smart home control systems. Microcontrollers with integrated wireless communication (e.g., Wi-Fi or Bluetooth) are commonly used in IoT applications. Consumer Electronics: Devices like remote controls, toys, and simple gadgets often use microcontrollers. They are cost-effective for such applications and provide the necessary processing power and I/O capabilities. Automotive Control Systems: Microcontrollers are used in various automotive systems, including engine control, airbag systems, and anti-lock braking systems, due to their real- time control capabilities and resistance to temperature and environmental extremes. Medical Devices: Microcontrollers are found in medical instruments, such as blood glucose meters, infusion pumps, and monitoring devices, where precision and low power are critical. In summary, microcontrollers are designed for specific, low-power, and embedded applications with integrated peripherals, while microprocessors are more versatile, high-performance computing devices that require external components for peripheral support. The choice between the two depends on the specific requirements of the application and the balance between cost, power consumption, and processing capabilities. Processor Architecture RISC (Reduced Instruction Set Computer) and CISC (Complex Instruction Set Computer) are two contrasting computer architectures that define the design of a central processing unit (CPU). RISC (Reduced Instruction Set Computer): RISC is a CPU design philosophy that emphasizes simplicity and efficiency. It uses a small, fixed set of simple instructions with a single clock cycle execution time. RISC processors typically have a shorter instruction pipeline than CISC processors, which means that they can execute instructions more quickly. Advantages of RISC:  Faster execution speed Less complex design More energy-efficient  Easier to pipeline Well-suited for embedded systems and applications with limited resources. Disadvantages of RISC: May require more instructions for complex operations. May require more memory accesses, which can impact performance. Examples Of RISC processors: ARM Atmel AVR PowerPC CISC (Complex Instruction Set Computer): CISC is a CPU design philosophy that incorporates a large set of complex instructions, some of which may take multiple clock cycles to execute. CISC processors can perform a wider range of tasks than RISC processors, but they are also slower and more complex. Advantages of CISC: More versatile Can perform a wider range of tasks with fewer instructions Easier to program Disadvantages of CISC: Slower execution speed More complex design More power-hungry More difficult to pipeline Examples of CISC processors: Intel x86 AMD64 Motorola 68000 Characteristic RISC CISC Instruction Set Small and simple instruction set. Large and complex instruction set. Instruction Execution Typically one clock cycle per instruction. Varies; some instructions may take multiple Time clock cycles. Instruction Formats Simple, regular instruction formats. Variable-length and irregular instruction formats. Memory Access Typically uses a load-store architecture, data Memory access in a single instruction. must be loaded into registers. Pipelining Pipeline-friendly architecture. Pipelining can be complex due to variable instruction execution times. Performance High performance for common operations. Performance can vary widely depending on the instruction mix. Design Complexity Easier to design and optimize. More complex design, harder to optimize. Application Well-suited for embedded systems and Historically used in mainframes and applications with resource constraints. minicomputers. Programmer-Friendly May require more instructions for complex Can perform complex tasks in a single operations. instruction. Modern Usage Common in modern CPUs, including ARM and Older CISC architectures like x86 have RISC-V architectures. evolved to include RISC-like features. The Von Neumann and Harvard architectures are two fundamental computer architectures that describe how a computer's memory and processing elements are organized. They differ in how they handle the storage and retrieval of data and program instructions. Von Neumann Architecture The Von Neumann architecture was first proposed by a computer scientist John von Neumann. In this architecture, one data path or bus exists for both instruction and data. As a result, the CPU does one operation at a time. It either fetches an instruction from memory, or performs read/write operation on data. So an instruction fetch and a data operation cannot occur simultaneously, sharing a common bus. Harvard Architecture The Harvard architecture offers separate storage and signal buses for instructions and data. This architecture has data storage entirely contained within the CPU, and there is no access to the instruction storage as data. Computers have separate memory areas for program instructions and data using internal data buses, allowing simultaneous access to both instructions and data. Characteristic Von Neumann Architecture Harvard Architecture Memory Single memory for data and Separate memories for data Organization instructions. and instructions. Data and instructions share the Data and instructions can be Memory Access same memory bus, allowing accessed simultaneously, one to be accessed at a time. improving parallelism. Enhanced parallelism, as Limited parallelism due to Parallelism instructions and data can be shared memory. fetched concurrently. Simpler in design and More complex to design, Design Complexity implementation. implement, and maintain. Allows dynamic modification of Typically does not allow Modification During the program during runtime dynamic modification of Runtime (self-modifying code). instructions during runtime. Most general-purpose Embedded systems, Typical Usage computers, including PCs and microcontrollers, DSPs, and servers. some specialized processors. Quiz list three (3) differences between microprocessors and microcontrollers.

Use Quizgecko on...
Browser
Browser