Embedded Systems & Microcontrollers

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson
Download our mobile app to listen on the go
Get App

Questions and Answers

What is the primary function of an embedded system?

  • To perform a wide range of general-purpose computing tasks.
  • To efficiently execute a specific task or set of tasks within a device. (correct)
  • To execute control software running on top of an RTOS.
  • To manage network communications for large-scale applications.

In the context of embedded systems, what does RTOS primarily supervise?

  • The user interface and input handling mechanisms.
  • The system's power consumption and thermal output.
  • The physical layout and connections of hardware components.
  • The execution of application software, providing necessary support. (correct)

Which of the following best describes a 'bare metal' system?

  • A computer system without a base operating system (OS) or installed applications. (correct)
  • A system without any protective casing or enclosure.
  • A computer system with only essential hardware components.
  • A system that is highly susceptible to physical damage.

What is a key characteristic of 'single-functioned' embedded systems?

<p>They perform a specialized operation repeatedly. (B)</p> Signup and view all the answers

What does the term 'design metrics' refer to in the context of embedded systems?

<p>A measure of an implementation's features like cost, size, and performance. (D)</p> Signup and view all the answers

In reactive and real-time embedded systems, what is the potential consequence of a delayed computation?

<p>A failure in the system's control or operation. (B)</p> Signup and view all the answers

Why do embedded systems commonly use Flash memory instead of HDD (Hard Disk Drive) for secondary storage?

<p>Flash memory is less prone to failure and consumes less power. (C)</p> Signup and view all the answers

What is a primary advantage of making embedded systems easily customizable?

<p>It allows them to adapt to different operational environments. (A)</p> Signup and view all the answers

What is a significant challenge related to high development effort in creating embedded systems?

<p>Balancing the need for high reliability with development time. (B)</p> Signup and view all the answers

Which of the following represents the correct order of phases in software program development?

<p>Edit, Preprocess, Compile, Link, Load, Execute (C)</p> Signup and view all the answers

During which phase of software program development are libraries linked with object files?

<p>Linking (A)</p> Signup and view all the answers

What is the primary task of the 'loader' in the software development process?

<p>To put the program into memory for execution. (C)</p> Signup and view all the answers

In the context of computer architecture, what does ISA define?

<p>The instruction set that a processor can execute. (B)</p> Signup and view all the answers

What is typically included within 'systems design' in computer architecture, aside from the CPU itself?

<p>Hardware components such as cache, memory, and peripherals. (A)</p> Signup and view all the answers

What is the role of 'microarchitecture' in computer architecture?

<p>To describe how the ISA is implemented in a particular processor. (D)</p> Signup and view all the answers

What does 'cache coherency' primarily address in multiprocessor systems?

<p>Ensuring consistent data across multiple caches. (C)</p> Signup and view all the answers

Which memory type is characterized by losing its stored contents when power is removed?

<p>Volatile memory (D)</p> Signup and view all the answers

Which memory technology is used in RAM?

<p>Semiconductor (D)</p> Signup and view all the answers

Why is ROM called Read Only Memory?

<p>Binary information is hard-wired inside the system during manufacturing of the device. (B)</p> Signup and view all the answers

What makes EEPROM more versatile than EPROM?

<p>Can be written when its circuit is in place. (A)</p> Signup and view all the answers

How does 'temporal locality' relate to data access patterns?

<p>Recently referenced items are likely to be referenced again soon. (D)</p> Signup and view all the answers

Which memory type is suitable for program code that must persist even when power is off?

<p>ROM (A)</p> Signup and view all the answers

In a memory hierarchy, how does the cost per byte typically change as you move from faster to slower memory?

<p>It decreases. (B)</p> Signup and view all the answers

What is one of the main reasons for using memory hierarchies in computing systems?

<p>To use the nearness of accesses. (A)</p> Signup and view all the answers

What property must be ensured when multiple copies of the same data exist at different levels of the memory hierarchy?

<p>Coherence (D)</p> Signup and view all the answers

Which type of memory is generally farther from the CPU and built as a separate unit?

<p>Non-semiconductor memory (D)</p> Signup and view all the answers

For which of the following tasks it is appropriate to use EEPROM?

<p>Updating only a byte or a set of bytes is possible. (C)</p> Signup and view all the answers

Which of the following statements is correct about the power-saving states and memory in laptop?

<p>Since the Sleep Mode retains the contents of the currently running programs, it can restart from the sleep mode quickly. (A)</p> Signup and view all the answers

What is the main purpose of the linking phase in software development?

<p>Combine object code with libraries to create an executable. (A)</p> Signup and view all the answers

Why is low power consumption an important feature in embedded systems?

<p>To extend battery life and reduce energy costs. (C)</p> Signup and view all the answers

Which action is typically performed by the preprocessor in the C programming language?

<p>Including header files and expanding macros. (A)</p> Signup and view all the answers

In the memory hierarchy, what is included in the definition of access time?

<p>Time taken to access data from the memory. (C)</p> Signup and view all the answers

What does 'Spatial locality' refer to?

<p>Nearby memory locations are referenced close together. (A)</p> Signup and view all the answers

Which of the following statements accurately describes the purpose of flash memory in embedded and computer systems?

<p>It is used for storing firmware, boot code, and non-volatile data due to its ability to retain information without the need of power. (B)</p> Signup and view all the answers

Which of the following statements describes the main difference between SRAM and DRAM?

<p>SRAM is faster and more expensive compared to DRAM. (C)</p> Signup and view all the answers

In an embedded system featuring a memory hierarchy, where is data initially sought by the processor?

<p>Cache (B)</p> Signup and view all the answers

In the assembly instructions the test.asm (a text file with assembly instructions) performs, what do ADR, LDR, ADD and STR refer to (in that order)?

<p>Load the address, Load, Add, Store. (B)</p> Signup and view all the answers

Flashcards

What is a System?

An arrangement where units assemble to work together under a set of rules.

What is an Embedded System?

A system with hardware and software embedded to perform a specific task, often battery-operated.

What does RTOS do?

Supervises application software, provides support with mechanisms for processes scheduling to achieve latency requirements.

What is bare metal?

A computer system without a base operating system (OS) or installed applications.

Signup and view all the flashcards

Single-functioned

Embedded systems perform one specialized operation repeatedly.

Signup and view all the flashcards

What are Design Metrics?

A measure of implementation features like cost, size, power, latency and performance.

Signup and view all the flashcards

Reactive and Real time

Embedded systems react to environment changes in real time without delay.

Signup and view all the flashcards

Memory in embedded systems

Main memory uses DRAM or SRAM, typically without memory management; flash is for secondary storage.

Signup and view all the flashcards

Connected systems

Embedded systems are connected to peripherals for communication and input/output processing.

Signup and view all the flashcards

Embedded system easily customizable

Embedded Feature: Adapting to environment.

Signup and view all the flashcards

Embedded system low cost

Embedded Feature: Selling price needs to be cheaper.

Signup and view all the flashcards

SW Program Development

Process of source code changing into an executable.

Signup and view all the flashcards

Edit (.c and .h)

Source files (.c and .h) are created and edited.

Signup and view all the flashcards

Preprocess

Part of compilation that includes files.

Signup and view all the flashcards

Compile

the .obj file of each source file is grabbed.

Signup and view all the flashcards

Link

Source code files combined with libraries, and your own object files, can run on a computer.

Signup and view all the flashcards

Load

Executable put into memory (along with static data).

Signup and view all the flashcards

Execute

Run the program on the CPU

Signup and view all the flashcards

Computer architecture

Describes functionality, organization, and implementation of computer systems.

Signup and view all the flashcards

ISA

Defines the machine code that a processor reads and acts upon.

Signup and view all the flashcards

Microarchitecture

Describes how a processor implements the ISA.

Signup and view all the flashcards

Systems design

Includes hardware excluding the CPU.

Signup and view all the flashcards

Processor Architecture

Details the design of processors, their internal organization, and their interface with memory and peripherals.

Signup and view all the flashcards

CPU vs DRAM Performance

The performance gap between CPU and DRAM. CPU performance increases by 60% every year while DRAM performance increases by less than 10% every year.

Signup and view all the flashcards

Principle of Locality

programs tend to reuse data and instructions that are closer to those that have been used recently, or that were recently referenced themselves.

Signup and view all the flashcards

Temporal locality

Recently referenced items are likely to be referenced in the near future.

Signup and view all the flashcards

Spatial locality

Items with nearby addresses tend to be referenced more often with higher probability.

Signup and view all the flashcards

Memory vs Storage

Smaller memories are faster but more expensive, and larger memories are slower but cheaper.

Signup and view all the flashcards

Inclusion

Any data that is part of a lower level needs to be present at the higher level.

Signup and view all the flashcards

Coherence , consistency

Multiple copies of the same data are available at each level and all need to be identical or consistent.

Signup and view all the flashcards

Quiz : Relationship between Memory Levels

Access time increases further away from the CPU. Cost per byte decreases farther away from the CPU. Memory size increases farther away from the CPU.

Signup and view all the flashcards

Semiconductor Memory vs Non Semiconductor

Semiconductor is used for building and Closer to CPU, whereas SRAM is built within the Cpu chip itself, and the volatile by nature . The size is in terms of G bytes (109)

Signup and view all the flashcards

Volatile

Contents become non-reusable if power is lost

Signup and view all the flashcards

Non Semiconductor Memories

Memory classification are magnetic and the optical tech, built as seperate unit , more space = more memory

Signup and view all the flashcards

ROM basics

ROM is a Programmable Logic Device (PLD) where Binary information is hard-wired inside a ROM

Signup and view all the flashcards

ROM

data is wired into the chip during the HW fabrication process. you can read , but you can not update of write to it.

Signup and view all the flashcards

PROM

PROM the writing process is done electrically where the supplier can do it one time before you can not change it.

Signup and view all the flashcards

EPROM

Erasable by read-only memory . similar and used as normal memories on the circuit board. can be erased with UV

Signup and view all the flashcards

EEpROM

Attractive form of ROM is electrically erasable programmable read-only memory (EEPROM) can be written into at any time.

Signup and view all the flashcards

Random Access Memory

the time taken to read or write is is the same regardless of location.

Signup and view all the flashcards

Study Notes

Embedded Systems and Microcontrollers Overview

  • A system is an arrangement where all units work together under a set of rules
  • It can be a method of working, organizing, or performing tasks as planned
  • A digital watch is an example of a system that displays the time
  • An embedded system is a computer system with hardware and software embedded
  • It can be an independent system or part of a larger system
  • It uses a microcontroller or microprocessor, typically battery-operated, for a specific task
  • Examples include fire alarms, coffee dispensers, smart door locks, and flight controllers

Embedded Software Architecture

  • Operating Systems (OSs) running on embedded systems are called RTOS
  • RTOS have strict constraints on execution time, memory, latency, and performance
  • RTOS stands for Real Time Operating System

Components of an Embedded System

  • An embedded system includes hardware, embedded application software, and an RTOS
  • RTOS supervises the software and offers support, enabling processor run processes via scheduling algorithms to meet latency needs
  • RTOS defines how the system works and sets rules for program execution
  • Smaller embedded systems may not always need an RTOS
  • Bare metal refers to a computer system without a base OS, where software/firmware runs directly on the hardware

Characteristics of Embedded Systems

  • Embedded systems are single-functioned, performing a specific operation repeatedly
  • An example is a pager
  • Have design metrics to fit on a single chip or board
  • Must process data quickly and use minimal power for extended battery life
  • Design Metric is a metric for implementation such as cost, size, power, latencies & performance
  • Application Specific Integrated Circuit (ASIC)
  • Application Specific Instruction Processor (ASIP)
  • Application Specific Standard Product (ASSP)

Real-Time and Reactive Aspects

  • Embedded systems react to environment changes and compute results in real time
  • Car cruise controllers monitor speed and brake sensors, computing acceleration/deceleration, with delayed computation that can cause failure
  • They are microprocessor or microcontroller based, with control software on top of an RTOS

Memory and Connectivity

  • Embedded systems require memory, embedded via Flash/ROM
  • They use DRAM or SRAM as Main Memory
  • Have limited virtual memory support due to timing constraints
  • Flash memory is used instead of HDD for secondary storage
  • They interface with peripherals for connectivity and input/output processing
  • IoT devices link to networks, use software for high-end functions and offer hardware for performance, flexibility and security

Features and Challenges

  • Features include easy customization, low power consumption, and low cost
  • They offer enhanced performance and high operational reliability
  • Challenges include high development effort, larger time to market, and high volume requirements
  • The need for low power operations is also a challenge

Hierarchical Levels of Computer Systems

  • Abstraction levels in computer architecture include programming language, application programming interface, operating system, assembly language, computer architecture, and digital electronics

Architecture Levels of Abstraction

  • Levels of abstraction include logic level, functional block level, architecture level and system level

Core Definitions of Computer Architecture

  • Computer architecture describes computer systems' functionality, organization, and implementation
  • Instruction Set Architecture (ISA) defines the machine code
  • Microarchitecture (or computer organization) implements the ISA, example is x86
  • Systems design includes all other hardware components besides the CPU such as cache, memory, internal bus, peripherals etc

Processor Architecture Definition

  • Processor architecture designs processors as multi-cores
  • Details internal organization, interface with memory and peripherals
  • Microarchitecture addresses ISA implementation
  • Multi-core design faces cache coherency and Internal buses interfacing with memory/peripherals issues

Software Development

  • Steps include edit source files, preprocess, compile (.obj files), link libraries and object files, load executable with static data, and execute program

SW Program Development Environment

  • The SW Program Development involves different stages
  • The process begins with editing source code, then preprocessing to handle includes
  • It continues with compiling to create object code, linking to libraries, loading the program into memory, and executing it

Program to Executable

  • The processes include compiling the source code and linking library files

Standard Address Space Model

  • The address space has distinct regions allocated for stack, heap, static data, and code

Memory Layout of C Program

  • Memory includes Main Memory (MM) and DRAM
  • Higher addresses include command line arguments and stack
  • Lower addresses include initialized data and code/text (assembly opcodes)

Architectural View of a Computer System

  • DRAM facilitates communication between components such as a CPU, I/O modules, and data storage, enabling data processing and storage

CPU DRAM Performance Gap

  • Performance gap between CPU and DRAM shown, with CPU increasing by 60% per year
  • DRAM performance increased by less than 10% per year, as shown in the performance gap graph

Principle of Locality

  • Programs tend to reuse data and close instructions
  • Temporal locality is when recent items are often re referenced in the near future
  • Spatial locality is when close addresses often get used

Code

  • Array element access have both spatial and temporal locality.
  • Instruction loop has both spatial and temporal locality

Types of Memory/Storage Hierarchies

  • Smaller memories are faster but expensive
  • Larger memories are slower but cheaper
  • Exploit locality to get the best of both worlds and reuse nearness of accesses
  • Results in most accesses using the smaller and faster memories combined with large with cheaper memories

Properties of Memory Levels

  • If data exists at a lower level (closer to the processor), it must also exist at all higher levels
  • Multiple copies of the same data must be identical
  • Temporal locality is with data will be used in the near future
  • Spatial locality is with adjacent data are likely to be used often, and includes sequential instructions

Important quiz

  • Quiz: Memory Level Hierarchy & Access Time
  • Cost per Byte ↑ as Access Time ↓
  • Memory size ↑ as Access Time ↓
  • Transfer Bandwidth ↑ as Access Time ↓
  • Unit of transfer ↓ as Access Time ↓
  • Frequency of Access ↑ as Access Time ↓

Different Memory Types

  • Memories are classified as Semiconductor and Non-semiconductor
  • Semiconductor included RAM and ROM
  • RAM is divided in SRAM and DRAM
  • ROM is divided into EPROM, UVEPROM and EEPROM
  • Non-semiconductor include secondary and auxiliary memory
  • Auxiliary Memory divided into Floppy Drive, Hard Disk Drive and Compact Disk, Digital Versatile Disk

Volatile and Non-Volatile Memory

  • Volatile memory loses contents when power is off
  • Non volatile memories maintain contents even with power off
  • Advantage of RAM is direct access by CPU, faster than non-volatile memories.
  • Non-volatile examples are flash, hard disk and SSD

Semiconductor vs Non Semiconductor

  • Semiconductor uses special technologies and is random access, mostly volatile, close to the CPU and in GBytes
  • Non Semiconductor are magnetic and optical, sequential access, non volatile, further from CUP and sized in TBytes

Read Only Memory ROM

  • It defines what a ROM is, and then the different types of ROM´s
  • Describes the classifications as semiconductor and non semiconductor

Programmable Read Only Memory (PROM)

  • A PROM non-volatile, written to once, done electrically
  • Writing may be performed by the supplier or the user after fabrication
  • Programming requires special equipment
  • Often called One Time Programmable (OTP) with NVM
  • More expensive then ROM, which is better for high production runs

Erasable Programmable Read Only Memory(EPROM)

  • Used UV light to erase, and therefore you must erase the whole chip
  • Must erase the whole chip for 20min to erase all contents
  • This memory is covered with film to prevent accidental lighting

Electrically Erasable Programmable Read Only Memory (EEPROM)

  • Is more attractive form of ROM and electrical written
  • Updating only a byte or a set of bytes is possible
  • The process takes long time of several 100 µsecs
  • Has both advantage of being non- volatile and in circuit updates
  • EPROM is more expensive and less dense
  • EEPROM fewer bits per chip than EPROM

Random Access Memory

  • Data can be read and written in uniform time
  • Direct access includes Hard Disks DVDs and the time need to take varies depending on location

Types of Random Access Memory

  • The computer memories are primary built are Dynamic RAM (DRAM) and Static RAM (SRAM)
  • There each volatile, which means and data is lost when shut off

Usage for SRAM and DRAM

  • Processors find data in the small fast cache usually on the same ship
  • If the data is not in cache, then the looks in main memory.
  • If this not there, the fetches the data from the hard disk

Quiz- Hibernate and Sleep

  • What happens when latptos on hibernates adn sleep mode
  • Sleep- display and other peripherals is switchefd off, but the mani memory is pwoered. I retains the contenst so quickly restart
  • Harid disk- contents of hte mamni meory is saved inot hraid ski and RAM is woff. It takes more time o copy content bac from the ram starts running them

Studying That Suits You

Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

Quiz Team

Related Documents

More Like This

Use Quizgecko on...
Browser
Browser