MTE 325 - EMBEDDED SYSTEMS allyson giannikouris*, p.eng. Revised Spring 2024 Version 1.1 1 embedded systems Embedded systems are everywhere. You probably interacted with several before you left the house this morning. Rarely do we stop to think about what exactly an embedded system is. There is also some ambiguity in definitions depending on the source you use. For the sake of this course, the definitions presented here will be used. Think About What is an embedded system? * Dept. of Mechanical and Mechatronics Eng., University of Waterloo 1 embedded 1.1 Introduction to Embedded Systems Embedded system: A special-purpose computer system designed to perform a task without the user’s knowledge of its existence. The user may provide input to the embedded system via controls and sensors but the user need not be aware of the presence of the embedded system. Figure 1 shows some examples of embedded systems. Most people would readily agree that the digital camera fits the definition, but what about the cell phone? Is it still an embedded system by the definition above? This is a tricky one and highlights that there aren’t always clear lines on what is and is not an embedded system. 15 years ago, the answer would have been a clear yes that a cell phone is an embedded system. These days its harder to argue that the average user doesn’t recognize their phone as a computer. Image credit: Uberprutser CC-BY-SA 3.0 Image Credit: Senado Federal CC-BY-2.0 Figure 1: Examples of embedded systems, a digital camera on the left and cell phones on the right Think About What embedded systems do you interact with on a daily basis? 2 embedded 1.2 Embedded System Design Embedded systems come in all shapes and sizes. Simple embedded systems can be constructed out of electronics without the need for a processor or software, however there will be state (memory) of some kind. Complex embedded systems incorporate one or more processors with sophisticated control software. There is no standard, widely accepted process for embedded system design. Rather, there are some general building blocks to be considered. The first step in the process is the identification of the problem and development of requirements and specifications. This is a whole design process in and of itself, which is beyond the scope of this course. Once the requirements and specifications are knows, the primary hardware components, such as the microcontroller to be used and/or a development board and required peripherals are selected. Now that the components are knows, hardware design can be completed. This includes selecting interfaces and wiring the hardware components together. For prototyping this is often done using development kits and breadboards, but for production may include designing custom printed circuit boards (PCBs). The software development may be done at any point after component selection. In an ideal world, hardware / software codesign would be used, allowing the hardware to be optimized on the fly. True codesign means simultaneously designing hardware and software components of a combined hardware/software system. As it stands today, field programmable gate array (FPGA)-based development is as close as we get. For microcontroller based designs, the processor may have some pin-compatible options in the same family, but major changes are difficult once software development has begun. In most cases, the major hardware components are selected before software development begins. While the process generally flows from left to right as shown in Figure 2, it is also cyclic. There will inevitably be issues that are found or changes to the requirements and specifications during the hardware and software development that require revisiting the earlier decisions and iterating the design. The complexity of embedded system design can be very deceptive. Things that seem simple at first rarely are. While the purpose of the system and intended behaviour are often conceptually simple, actually implementing them and understanding the finer points of how the entities are communicating tends to be far more complicated. To use an analogy, the idea that you push a button or turn a key and the car starts is simple enough, but the details of all the steps between your action and the car starting are far more complex. Getting an embedded system working is relatively easy, especially since the advent of ecosystems like Arduino boards that have significantly lowered the barriers to entry in programming them. That said, great embedded systems designs require engineering judgment and experience. There is a difference between be- 3 embedded Figure 2: A very high level representation of the embedded system development process. ing able to make something work and understanding why and how it works. The designer must often content with multiple factors, such as • multidisciplinary design problems, • complex device interactions, and • unpredictable external environment. The level of abstraction in embedded software also tends to be quite low. The code is often tied to a specific processor or processor family, and porting to another system will require some changes to be made. If the code was written with portability in mind, it could be as simple as changing some definitions in a file. If the code was written for optimal performance on a given system, it may require extensive changes before it will run on a different one. On top of these factors, security is becoming increasingly more critical as more and more of these systems handle private or sensitive data and communicate over networks. These systems are also more difficult to update than software apps, meaning reliability and robustness of the system are important factors to consider. 1.3 Computer Technology Concise definitions of computer hardware and computer software are needed for meaningful discussions of embedded systems. According to the Canadian Oxford Dictionary [1]: Hardware 3. the mechanical or electronic components of a computer, etc. 4 embedded Software 1. the programs or other operating information used by a computer. 2. storage media such as video cassettes, audio tapes, etc. requiring playback on electronic equipment The software definition encompasses both programs and media (data). While most apps are downloaded these days, it wasn’t that long ago that they were commonly distributed on compact disks (CDs), which by this definition would be software. Many years ago, Prof. Bill Bishop shared his definition with me, and it perhaps makes the distinction easier to remember: Hardware is the part you can kick, software is the part you wish you could kick. 1.3.1 Processor Types Computer hardware can be broadly categorized based on the relationship between the processor and the peripherals. Once again, there are some gray areas on where exactly some chips might fall and the definitions are not necessarily broadly standardized. For the purposes of this course, the definitions here will be used to facilitate discussions and provide a common reference point. A Microprocessor consists of a processor only. There is no main memory and no built-in support for input / output devices. The microprocessor term commonly refers to a general-purpose Central Processing Unit (CPU). Examples include the Intel Core i5 which is shown in Figure 3, AMD Ryzen and IBM z14. Despite the name, these are high performance processors. Today, they commonly have multiple cores and are usually found in laptops, desktops and servers. Because they are a standalone processor and require separate peripherals, they are typically used with a motherboard that provides the required interfaces and memory for the system to be functional. A system based on a microprocessor will, in general, NOT be an embedded system. Image Credit: Ashley Pomeroy - Own work, CC BY-SA 4.0, https://commons.wikimedia.org/w/index.php?curid=89232962 Figure 3: The Intel Core i5 is an example of a microprocessor 5 embedded A Microcontroller is a complete computer on a single chip consisting of a processor, memory and some input / output devices. These devices are usually specified in a fairly general manner to permit reuse of the same microcontroller component in many applications. Examples include the ST Microelectronics STM32 family, Texas Instruments TMS320 and Microchip ATtiny. The block diagram for the ATtiny 1617 microcontroller, which includes a CPU, memory, analog interfaces, digital interfaces, communication support and timers is shown in Figure 4. This term commonly refers to a chip with a CPU that has been specialized to control the operation of a mechanical or electronic system. These tend to be small and cost-effective, starting at a few dollars per chip. Each chip will have specialized built-in interface support for some or all of high-speed communication, parallel devices, serial devices, and analog devices. Image Credit: Microchip Technology, ATtiny1617/3217 Datasheet Figure 4: Block diagram of a Microchip microcontroller showing the CPU, memory and peripheral interfaces available inside a single chip 6 embedded A System-on-a-Chip (SoC) is a user-designed fully-functional system implemented on a single chip. This may include processing, memory, input / output devices and other digital logic. It can be used to implement an embedded system or a portion of an embedded system. The difference between a microcontroller and an SoC is that the SoC configuration is chosen by the user. Interfaces and memory are selected from a list of available blocks as illustrated in Figure 5, then the chip is fabricated for the user. These devices come with configuration and fabrication costs, so they are generally only viable for higher volume or very specialized applications where an off the shelf microcontroller doesn’t meet the design requirements. Typically, an SoC incorporates the following hardware components, with the exact configuration being dependent on the application: • Functionality similar to the microprocessor or a microcontroller defined previously. The implementation may be done in hardware or software. • Communication port(s) • Volatile storage (e.g., Random Access Memory ⇒ RAM ) • Non-volatile storage (e.g., Read-Only Memory ⇒ ROM ) • Other components could include: timers, parallel interfaces, analog to digital converters and pulse width modulators. Image Credit: Cypress Semiconductor Figure 5: An illustration of a SoC, showing the peripherals and memory being "plugged in" to the system configuration A System-on-a-Programmable-Chip (SoPC) is an SoC that is implemented using a high-density, reconfigurable programmable logic device (PLD) with a structure similar to that shown in Figure 6. Unlike the SoC, the user is able to reconfigure and program the chip logic themselves. These days, many SoPC chips have either a CPU block that can be loaded to them or contain a hardwired CPU surrounded by programmable logic. Field programmable gate arrays (FPGAs) are an example of an SoPC. 7 Glossary Image Credit: Mouser, http://ca.mouser.com/applications/programmable-logic/ Figure 6: A block diagram showing the typical structure of a SoPC device 1.4 Summary Embedded systems are special-purpose computer systems that perform a task without the users knowledge. They can be built using different types of hardware, although microcontrollers are the most common. The relationship between the hardware and software development of the system has been briefly considered and will be explored more deeply in coming chapters. The differences between the various hardware classifications were introduced to provide an understanding of the options that are available. This course will primarily focus on microcontrollers, although many of the same ideas and concepts are relevant to other implementation methods. glossary embedded system A special-purpose computer system designed to perform a task without the user’s knowledge of its existence. The user may provide input to the embedded system via controls and sensors but the user need not be aware of the presence of the embedded system. 2, 3 Hardware The mechanical or electronic components of a computer etc. 4 hardware / software codesign Hardware/software codesign is the term given to the task of simultaneously designing hardware and software components of a combined hardware/software system. 3 Microcontroller A complete computer on a single chip consisting of a processor memory and some input / output devices. 6 8 references 9 Microprocessor A microprocessor consists of a processor only (no main memory and no built-in support for input / output devices). It is also commonly referred to as a CPU. 5 Software The programs or other operating information used by a computer and storage media such as video cassettes audio tapes etc. requiring playback on electronic equipment. 5 System-on-a-Chip (SoC) A user-designed fully-functional system implemented on a single chip. This may include processing memory input / output devices and other digital logic. 7 System-on-a-Programmable-Chip (SoPC) A System-on-a-Programmable Chip is an SoC that is implemented using a high-density reconfigurable programmable logic device (PLD). 7 references [1] Katherine Barber. The Canadian Oxford Dictionary. Oxford University Press, 2005.
0
You can add this document to your study collection(s)
Sign in Available only to authorized usersYou can add this document to your saved list
Sign in Available only to authorized users(For complaints, use another form )