GOALS
 The   course goals to provide students with:
    The skills and knowledge needed to better
     understand embedded computing systems and to
     initiate original research in this domain
    Gain experience in designing and evaluating
     embedded      processor  architectures and
     microarchitectures.
    An understanding of compiler      and   run-time
     software for embedded systems.
    An opportunity to research embedded computing
     systems through a class project and presentation.
➢ Introduction to Embedded Computing
       -Characteristics of Embedding Computing Applications
       -Concept of Real time Systems
       -Challenges in Embedded System Design
       -Design Process
       -Embedded System Architecture:
       - Instruction Set Architecture
                         CISC
                         RISC
       -Basic Embedded Processor/Microcontroller Architecture
                ATOM processor
                Introduction to Tiva family
➢ Designing Embedded Computing Platform
                                  -Bus Protocols
                                 - Bus Organization
                      -Memory Devices and their Characteristics
                               - Memory mapped I/O
                                    - I/O Devices
                                  - I/O mapped I/O
                                -Timers and Counters
                                 - Watchdog Timers
                                -Interrupt Controllers
                              - Interrupt programming
                                  - DMA Controllers
                                    -GPIO control
                              -A/D and D/A Converters
                      - Need of low power for embedded systems
                             - Mixed Signals Processing.
➢ Programming Embedded Systems
       -Basic Features of an Operating System
       - Kernel Features
       - Real-time Kernels
       - Processes and Threads
       - Context Switching
       -Scheduling
       - Shared Memory Communication
       - Message-Based Communication
       - Real-time Memory Management
       - Dynamic Allocation
       -Device Drivers
       - Real-time Transactions and Files
       -Realtime OS
                VxWorks, RT-Linux, Psos
➢ Network Based Embedded Applications
       -Embedded Networking Fundamentals
       - Layers and Protocols
       - Distributed Embedded Architectures
       - Internet-Enabled Systems
       - IoT overview and architecture
       -Interfacing Protocols
                (like UART, SPI, I2C, GPIB, FIREWIRE, USB,)
       - Various wireless protocols and its applications:
             (NFC, ZigBee, Bluetooth, Bluetooth Low Energy, Wi-Fi. CAN)
       -Overview of wireless sensor networks and design examples
➢ Case studies:
        -Embedded system design using ATOM processors
        -Galileo and Tiva based embedded system applications
                                                                %
S.No.    Mode of Assessment       Week/Date    Duration
                                                            Weightage
        Assessment I (CT I )         --       60 Minutes       20
 1
        Assessment II ( CT II )      --       60 Minutes       20
 2
        Assignment                   --       60 Minutes       10
 3
        End Assessment               --       180 Minutes      50
 4
 Course Textbook and Tools
1. Wayne Wolf, “Computers as Components- Principles of Embedded
   Computing System Design”, Morgan Kaufmann Publishers, Second
   edition, 2008.
2. C.M. Krishna, Kang G. Shin, “Real time systems”, Mc- Graw Hill,
   2010.
3. Tim Wilmshurst, “The design of Small –Scale Embedded Systems,
   Palgrave, 2003.
4. Marwedel Peter, “Embedded System Design, Kluwer Publications,
   2004.
5. Recent literature in Embedded Systems
                    What is an Embedded system?
• An embedded system is one that has computer hardware with software
  embedded in it as one of its components.
                              or
• We can define an embedded system as “A microprocessor based system
  that does not look like a computer”.
                              or
• we can say that it is “A combination of computer hardware and
  software, and perhaps additional mechanical or other parts, designed to
  perform a dedicated function. In some cases, embedded systems are
  part of a larger system or product, as is the case of an antilock braking
  system in a car ”.
                           or
• An embedded system is a special-purpose computer system designed to
  perform certain dedicated functions. It is usually embedded as part of a
  complete device including hardware and mechanical parts.
                       Embedded systems everywhere?
• Embedded systems span all aspects of modern life and there are many
  examples of their use.
• Biomedical Instrumentation – ECG Recorder, Blood cell recorder, patient
  monitoring system.
• Communication systems – pagers, cellular phones, cable TV terminals,
  fax, and transreceivers, video games and so on.
• Peripheral controllers of a computer – Keyboard controller, DRAM
  controller, DMA controller, Printer controller, LAN controller, disk drive
  controller.
• Industrial Instrumentation – Process controller, DC motor controller,
  robotic systems, CNC machine controller, close loop engine controller,
  industrial moisture recorder and controller.
• Scientific    – digital storage system, CRT display controller, spectrum
  analyzer.
                   Earlier days Embedded systems
• Embedded systems were not so popular because in those days most of
  the embedded systems were designed around a microprocessor unlike
  today’s systems which were built around a microcontroller.
• As we know a microprocessor by itself do not possess any memory, ports
  etc. So everything must be connected externally by using peripherals
  like 8255, 8257, 8259 etc. So the embedded system designed using
  microprocessor was not only complicated in design but also large in
  size. At the same time the speed of microprocessor is also a limitation
  for high end applications.
                     Why a microcontroller ?
A microcontroller is a single silicon chip with memory and all
Input/Output peripherals on it. Hence a microcontroller is also
popularly known as a single chip computer. Normally, a single
microcomputer has the following features :
• Arithmetic and logic unit
• Memory for storing program
• EEPROM for nonvolatile data storage
• RAM for storing variables and special function registers
• Input/output ports
• Timers and counters
• Analog to digital converter
• Circuits for reset, power up, serial programming, debugging
• Instruction decoder and a timing and control unit
• Serial communication port
So, its no wonder to say that the microcontroller is the most
sought after device for designing an efficient embedded
system
What is inside an embedded system ?
   Layered architecture of an Embedded System
• Every embedded system consists of custom-built hardware built around a
  Central Processing Unit (CPU). This hardware also contains memory
  chips onto which the software is loaded. The software residing on the
  memory chip is also called the ‘firmware’.
• The operating system runs above the hardware, and the application
  software runs above the operating system. The same architecture is
  applicable to any computer including a desktop computer. However,
  there are significant differences. It is not compulsory to have an
  operating system in every embedded system.
• For small appliances such as remote control units, air-conditioners, toys
  etc., there is no need for an operating system and we can write only the
  software specific to that application. For applications involving complex
  processing, it is advisable to have an operating system.
• In such a case, you need to integrate the application software with the
  operating system and then transfer the entire software on to the
  memory chip. Once the software is transferred to the memory chip, the
  software will continue to run for a long time and you don’t need to
  reload new software .
  Various building blocks of the hardware of an embedded system
• Central Processing Unit (CPU)      • Input Devices
• Memory (Read only memory and       • Output Devices
  Random access memory)              • Communication interfaces
• Application specific circuitry
                  Characteristics of Embedded Systems
• The characteristics of embedded system are different from those of a
  general purpose computer and so are its Quality metrics.
• Unlike general purpose computing systems, embedded systems possess
  certain specific characteristics and these characteristics are unique to
  each embedded system.
•   Some of the important characteristics of an embedded system are:
                     - Application and domain specific
                     - Reactive and Real Time
                     - Operates in harsh environments
                     - Distributed
                     - Small size and weight
                     - Power concerns
          1. Application and Domain Specific
❑ An embedded system is designed for a specific purpose only.
❑ It will not do any other task.
        -Ex. Air conditioner’s embedded control unit, it cannot replace
microwave oven…
        -Ex. A washing machine can only wash, it cannot cook..
❑ Because the embedded control units of microwave oven and air
  conditioner are specifically designed to perform certain specific
  tasks.
❑ Certain embedded systems are specific to a domain
          ex. A hearing aid is an application that belongs to the domain
of signal processing and telecom with another control unit designed to
serve another domain like consumer electronics.
               2. Reactive and Real Time
❑Certain embedded systems are designed to react to the
 events that occur in the nearby environment. These events
 also occur real-time.
❑Ex. Flight control systems, Antilock Brake Systems (ABS),
 etc. are examples of Real Time systems
❑Ex. An air conditioner adjusts its mechanical parts as soon
 as it gets a signal from its sensors to increase or decrease
 the temperature when the user operates it using a remote
 control.
❑An embedded system uses Sensors to take inputs and has
 actuators to bringout the required functionality.
       3. Operation in Harsh Environment
❑     Certain embedded systems are designed to operate in
    harsh environments like a dusty one or a high temperature
    zone or an area subject to vibrations and shock or very high
    temperature of the deserts or very low temperature of the
    mountains or extreme rains.
❑ These embedded systems have to be capable of sustaining
  the environmental conditions it is designed to operate in.
❑8
                      4. Distributed
❑The term distributed means that embedded systems may be a
 part of a larger system.
❑These components are independent of each other but have to
 work together for the larger system to function properly.
❑Ex. An automatic vending machine is a typical example for
 this. The vending machine contains a card reader (for pre-
 paid vending systems), a vending unit, etc. Each of them are
 independent embedded units but they work together to
 perform the overall vending function.
❑Ex. Automatic Teller Machine (ATM) contains a card
 reader embedded unit, responsible for reading and validating
 the user’s ATM card, transaction unit for performing
 transactions, a currency counter for dispatching/vending
 currency to the authorized person and a printer unit for
 printing the transaction details.
❑This can visualize these as independent embedded systems.
 But they work together to achieve a common goal.
               5. Small Size and Weight
❑An embedded system that is compact in size and has light
 weight will be desirable or more popular than one that is
 bulky and heavy.
❑Ex. Currently available cell phones. The cell phones that
 have the maximum features are popular but also their size
 and weight is an important characteristic.
❑10
                  6. Power Concerns
❑It is desirable that the power utilization and heat dissipation
 of any embedded system be low.
❑ If more heat is dissipated then additional units like heat
  sinks or cooling fans need to be added to the circuit.
❑ Ex. The production of high amount of heat demands
  cooling requirements like cooling fans which in turn
  occupies additional space and make the system bulky.
  Nowadays ultra low power components are available in the
  market.
❑ Select the design according to the low power components
  like low dropout regulators, and controllers/processors
  with power saving modes.
❑ Also power management is a critical constraint in battery
  operated application.
❑ The more the power consumption the less is the battery
  life.
      Quality Attributes of Embedded Systems
❑ Quality attributes are the non-functional requirements that
  need to be documented properly in any system design.
❑ If the quality attributes are more concrete and measurable, it
  will give a positive impact on the system development process
  and the end product.
❑ The various quality attributes that needs to be addressed in any
embedded system development are broadly classified into two,
namely
            i. Operational Quality Attributes
            ii. Non-Operational Quality Attributes
            12
      1. Operational Quality Attributes
❑The operational quality attributes represent the relevant
 quality attributes related to the embedded system when it
 is in the operational mode or ‘online’ mode. The
 important quality attributes coming under this category
 are listed below:
              i. Response
              ii. Throughput
              iii. Reliability
              iv. Maintainability
              v. Security
              vi. Safety
13
                      i. Response
❑ Response is a measure of quickness of the system.
❑ It gives you an idea about how fast your system is tracking
 the input variables.
❑ Most of the embedded system demand fast response which
 should be real-time.
❑ Ex. An embedded system deployed in flight control
 application should respond in a Real Time manner.
❑ Any response delay in the system will create potential
 damages to the safety of the flight as well as the
 passengers.
❑ It is not necessary that all embedded systems should be Real
 Time in response.
❑ For example, the response time requirement for an
 electronic toy is not at all time-critical.
❑ 15
                    ii. Throughput
❑ Throughput deals with the efficiency of system.
❑ It can be defined as rate of production or process of a
  defined process over a stated period of time.
❑ The rates can be expressed in terms of units of products,
  batches produced, or any other meaningful
  measurements.
❑ In case of card reader like the ones used in buses,
  throughput means how much transactions the Reader can
  perform in a minute or hour or day.
❑ Throughput is generally measured in terms of
  ‘Benchmark’. A ‘Benchmark’ is a reference point by which
  something can be measured.
❑ Benchmark can be a set of performance criteria that a
  product is expected to meet or a standard product that can
  be used for comparing other products of the same product
  line.
                   iii. Reliability
❑Reliability is a measure of how much percentage you rely
 upon the proper functioning of the system or what is the %
 susceptibility of the system to failure.
❑ Mean Time Between Failures (MTBF) and Mean Time
  To Repair (MTTR) are the terms used in defining system
  reliability.
❑ MTBF     gives the       frequency    of    failures   in
  hours/weeks/months.
❑ MTTR specifies how long the system is allowed to be out
  of order following a failure.
❑ For an embedded system with critical application need, it
  should be of the order of minutes.
17
                 iv. Maintainability
❑Maintainability deals with support and maintenance to the
 end user or client in case of technical issues and product
 failures or on the basis of a routine system checkup.
❑ Reliability and maintainability are considered as two
  complementary disciplines. A more reliable system means
  a system with less corrective maintainability requirements
  and vice versa.
❑ Maintainability can be classified into two types:
1. Scheduled or Periodic Maintenance (Preventive
   Maintenance)
2. Maintenance to Unexpected Failures (Corrective
   Maintenance)
1.Scheduled       or   Periodic     Maintenance        (Preventive
Maintenance)
An inkjet printer uses ink cartridges, which are consumable
components and as per the printer manufacturer the end use
should replace the cartridge after each ‘n’ number of printouts to
get quality prints.
2. Maintenance to Unexpected Failures (Corrective
Maintenance)
If the paper feeding part of the printer fails the printer fails to
print and it requires immediate repairs to rectify this problem.
Hence it is obvious that maintainability is simply an indication
of the availability of the product for use. In any embedded
system design, the ideal value for availability is expressed as
               𝑨𝒊 = 𝑴𝑻𝑩𝑭/(𝑴𝑻𝑩𝑭 + 𝑴𝑻𝑻𝑹)
                     Where Ai=Availability in the ideal condition,
                      MTBF=Mean Time Between Failures, and
                                 MTTR=Mean Time To Repair
                       v. Security
❑‘Confidentially’, ‘Integrity’, and ‘Availability’ are three
 major measures of information security.
❑ ‘Confidentially’ deals with the protection of data and
  application from unauthorized disclosure.
❑ ‘Integrity’ deals with the protection of data and application
  from unauthorized modification.
❑ ‘Availability’ deals with protection of data and application
  from unauthorized users.
❑ Certain embedded systems have to make sure they conform to
  the security measures.
❑ Ex. An electronic safety Deposit Locker can be used only with
  a pin number like a password.
                      vi. Safety
❑Safety deals with the possible damages that can happen to the
 operators, public and the environment due to the breakdown
 of an embedded system or due to the emission of radioactive
 or hazardous materials from the embedded products.
❑ The breakdown of an embedded system may occur due to a
  hardware failure or a firmware failure.
❑ Safety analysis is a must in product engineering to evaluate
  the anticipated damages and determine the best course of
  action to bring down the consequences of the damages to an
  acceptable level.
             2. Non Operational Attributes
The quality attributes that needs to be addressed for the product
‘not’ on the basic of operational aspects are grouped under this
category. The important quality attributes coming under this
category are listed below:
           i. Testability & Debug-ability
           ii. Evolvability
           iii. Portability
           iv. Time to prototype and market
           v. Per unit and total cost
21
      i.     Testability & Debug-ability
❑ Testability deals with how easily one can test his/her design,
  application and by which means he/she can test it.
❑ For an embedded product, testability is applicable to both the
  embedded hardware and firmware.
❑ Debug-ability is a means of debugging the product as such
  for figuring out the probable sources that create unexpected
  behavior in the total system.
❑ Debug-ability has two aspects in the embedded system
  development context, namely, hardware level debugging and
  firmware level debugging.
❑ Hardware debugging is used for figuring out the issues created
  by hardware problems whereas firmware debugging is
  employed to figure out the probable errors that appear as a
  result of flaws in the       firmware.
                   ii. Evolvability
❑Evolvability is a term which is closely related to Biology.
❑ Evolvability is referred as the non-heritable variation.
❑ For an embedded system, the quality attribute
   ‘Evolvability’ refers to the ease with which the embedded
   product (including firmware and hardware) can be
   modified to take advantage of new firmware or hardware
   technologies.
23
                     iii. Portability
▪   Portability is a measure of ‘system independence’.
▪ An embedded product can be called portable if it is
capable of functioning in various environments, target
processors/controllers and embedded operating systems.
▪ A standard embedded product should always be flexible
and portable.
24
      iv. Time-to-Prototype and Market
❑Time-to-market is the time elapsed between the
 conceptualization of a product and the time at which the
 product is ready for selling (for commercial product) or
 use (for non-commercial products).
❑ The commercial embedded product market is highly
  competitive and time to market the product is a critical
  factor in the success of a commercial embedded product.
❑ Product prototyping helps a lot in reducing time-to-
  market.
❑ 25
          v. Per Unit Cost and Revenue
❑Cost is a factor which is closely monitored by both end
 user (those who buy the product) and product
 manufacturer (those who build the product).
❑ Cost is a highly sensitive factor for commercial products.
❑ Proper market study and cost benefit analysis should be
  carried out before taking decision on the per unit cost of
  the embedded product.
❑ When the product is introduced in the market, for the
  initial period the sales and revenue will be low.
❑ There won’t be much competition when the product sales
  and revenue increase.
❑ During the maturing phase, the growth will be steady and
  revenue reaches highest point and at retirement time there
  will be      a drop in sales volume.
             Classification of Embedded Systems
❑ Based on Generation
❑ Based on Complexity & Performance Requirements
❑ Based on Triggering
❑ Based on deterministic behavior
          1. Embedded Systems - Classification based on
                          Generation
❑ First Generation: The early embedded systems built around 8-bit
  microprocessors like 8085 and Z80 and 4-bit microcontrollers
EX. stepper motor control units, Digital Telephone Keypads etc.
❑ Second Generation: Embedded Systems built around 16-bit
  microprocessors and 8 or 16-bit microcontrollers, following the first
  generation embedded systems
EX.SCADA, Data Acquisition Systems etc.
❑ Third Generation: Embedded Systems built around high performance
  16/32 bit Microprocessors/controllers, Application Specific Instruction
  set processors like Digital Signal Processors (DSPs), and Application
  Specific Integrated Circuits (ASICs).The instruction set is complex and
  powerful.
        EX. Robotics, industrial process control, networking etc.
❑ Fourth Generation: Embedded Systems built around System on Chips
  (SoC’s), Reconfigurable processors and multicore processors. It brings
  high performance, tight integration and miniaturization into the
  embedded device market
EX Smart phone devices, MIDs etc.
           2. Embedded Systems - Classification based on
                   Complexity & Performance
❑ Small Scale: The embedded systems built around low performance and
  low cost 8 or 16 bit microprocessors/ microcontrollers. It is suitable for
  simple applications and where performance is not time critical. It may
  or may not contain OS.
❑ Medium Scale: Embedded Systems built around medium performance,
  low cost 16 or 32 bit microprocessors / microcontrollers or DSPs. These
  are slightly complex in hardware and firmware. It may contain
  GPOS/RTOS.
❑ Large Scale/Complex: Embedded Systems built around high
  performance 32 or 64 bit RISC processors/controllers, RSoC or multi-
  core processors and PLD. It requires complex hardware and software.
  These system may contain multiple processors/controllers and co-
  units/hardware accelerators for offloading the processing requirements
  from the main processor. It contains RTOS for scheduling, prioritization
  and management.
  3. Embedded Systems - Classification Based
                on Triggering
❑ These are classified into two types
❑ 1. Event Triggered : Activities within the system (e.g., task run-
  times) are dynamic and depend upon occurrence of different events
  .
❑ 2. Time triggered: Activities within the system follow a statically
  computed schedule (i.e., they are allocated time slots during which
  they can take place) and thus by nature are predictable.
     4. Embedded Systems - Classification Based on
               deterministic behavior
 It is applicable for Real Time systems. The application/task
execution behavior for an embedded system can be either
deterministic or non-deterministic
These are classified in to two types-
 1. Soft Real time Systems: Missing a deadline may not be critical
and can be tolerated to a certain degree
2. Hard Real time systems: Missing a program/task execution time
deadline can have catastrophic consequences (financial, human
loss of life, etc.)
REAL-TIME EMBEDDED SYSTEM
 Real-time embedded systems are defined
 as those systems in which the correctness
 of the system depends not only on the
 logical result of computation, but also on
 the time at which the results are
 produced.
 Hardreal-time systems (e.g., Avionic
 control).
 Firm   real-time systems (e.g., Banking).
 Soft
    real-time systems (e.g., Video on
 demand).
                                        46
 DEADLINE
•Hard deadline: penalty due to missing deadline is a
higher order of magnitude than the reward in
meeting the deadline
•Firm deadline: penalty and reward are in the same
order of magnitude
•Soft deadline: penalty often lesser magnitude than
reward
                                             47
A TYPICAL REAL-TIME EMBEDDED SYSTEM
                              48
CAR EXAMPLE
   Mission: Reaching the destination safely.
   Controlled System: Car.
   Operating environment: Road conditions.
   Controlling System
    - Human driver: Sensors - Eyes and Ears of the driver.
    - Computer: Sensors - Cameras, Infrared receiver, and
    Laser telemeter.
   Controls: Accelerator, Steering wheel, Break-pedal.
   Actuators: Wheels, Engines, and Brakes.
                                                  49
CAR EXAMPLE (CONTD)
   Critical tasks: Steering and breaking.
   Non-critical tasks: Turning on radio.
   Cost of fulfilling the mission → Efficient
    solution.
   Reliability of the driver → Fault-tolerance needs
    to be considered.
                                                 50
                EMBEDDED SYSTEM DESIGN PROCESS
• A design methodology is important for three reasons-
        •    First, it allows us to keep a scorecard on a design to ensure
            that we have done everything we need to do, such as
            optimizing performance or performing functional tests.
        •    Second, it allows us to develop computer-aided design tools.
            Developing a single program that takes in a concept for an
            embedded system and emits a completed design would be a
            daunting task, but by first breaking the process into
            manageable steps, we can work on automating (or at least
            semi automating) the steps one at a time.
        • Third, a design methodology makes it much easier for members
          of a design team to communicate. The below Figure
          summarizes the major steps in the embedded system design
          process. In this top–down view, we start with the system
          requirements.
Fig: Major levels of abstraction in the design process
                          Requirements
      Clearly, before we design a system, we must
know what we are designing.
• The initial stages of the design process capture this
  information for use in creating the architecture
  and components.
•   We generally proceed in two phases-
        • First, we gather an informal description
          from    the      customers    known   as
          requirements,     and   we refine    the
          requirements into a specification that
          contains enough information to begin
          designing the system architecture.
• Requirements may be functional or nonfunctional.
• We must of course capture the basic functions of the embedded
  system, but functional description is often not sufficient.
  Typical nonfunctional requirements include:
              •   Performance
              •   Cost
              •   Physical size and weight
              •   Power consumption
• We must of course capture the basic functions of the embedded
  system, but functional description is often not sufficient.
  Typical nonfunctional requirements include:
                •   Performance
                •   Cost
                •   Physical size and weight
                •   Power consumption
Performance:
• The speed of the system is often a major consideration both for the
  usability of the system and for its ultimate cost.
• As we have noted, performance may be a combination of soft
  performance metrics such as-
            • approximate time to perform a user-level function and
            • hard deadlines by which a particular operation must be
              completed.
• We must of course capture the basic functions of the embedded
  system, but functional description is often not sufficient. Typical
  nonfunctional requirements include:
                •   Performance
                •   Cost
                •   Physical size and weight
                •   Power consumption
Cost:
• The target cost or purchase price for the system is almost always a
  consideration.
• Cost typically has two major components:
        • manufacturing cost includes the cost of components and
          assembly
        • nonrecurring engineering (NRE) costs include the personnel and
          other costs of designing the system.
• We must of course capture the basic functions of the embedded
  system, but functional description is often not sufficient. Typical
  nonfunctional requirements include:
                 •   Performance
                 •   Cost
                 •   Physical size and weight
                 •   Power consumption
Physical size and weight:
• The physical aspects of the final system can vary greatly depending upon
  the application.
• An industrial control system for an assembly line may be designed to fit
  into a standard-size rack with no strict limitations on weight.
•   A handheld device typically has tight requirements on both size and
    weight that can ripple through the entire system design.
• We must of course capture the basic functions of the embedded
  system, but functional description is often not sufficient.
  Typical nonfunctional requirements include:
                 •   Performance
                 •   Cost
                 •   Physical size and weight
                 •   Power consumption
Power consumption:
• Power, of course, is important in battery-powered systems and is often
  important in other applications as well.
• Power can be specified in the requirements stage in terms of battery
  life—the customer is unlikely to be able to describe the allowable
  wattage.
• A sample requirements form that can be filled out at the start
  of the project.
• We can use the form as a checklist in considering the basic
  characteristics of the system.
• Let’s consider the entries in the form:
        •   Name
        •   Purpose
        •   Inputs and Outputs
        •   Functions
        •   Performance
        •   Manufacturing Cost
        •   Power
        •   Physical Size and weight
                 A sample
           requirements form
          that can be filled out   We can use the form as a
            at the start of the     checklist in considering
                 project.          the basic characteristics
                                        of the system.
    Let’s consider the entries in the form:
•    Name                      •   Performance
•    Purpose                   •   Manufacturing Cost
•    Inputs and Outputs        •   Power
•    Functions                 •   Physical Size and weight
This is simple but helpful. Giving a name to the project not only
simplifies talking about it to other people but can also crystallize
the purpose of the machine.
                   A sample
             requirements form
            that can be filled out   We can use the form as a
              at the start of the     checklist in considering
                   project.          the basic characteristics
                                          of the system.
      Let’s consider the entries in the form:
  •    Name                      •   Performance
  •    Purpose                   •   Manufacturing Cost
  •    Inputs and Outputs        •   Power
  •    Functions                 •   Physical Size and weight
• This should be a brief one- or two-line description of what the
  system is supposed to do.
• If you can’t describe the essence of your system in one or two
  lines, chances are that you don’t understand it well enough.
                               A sample
                         requirements form
                        that can be filled out       We can use the form as a
                          at the start of the         checklist in considering
                               project.              the basic characteristics
                                                          of the system.
                 Let’s consider the entries in the form:
             •    Name                           •      Performance
             •    Purpose                        •      Manufacturing Cost
             •    Inputs and Outputs             •      Power
             •    Functions                      •      Physical Size and weight
• These two entries are more complex than they seem. The inputs and outputs to the system
  encompass a wealth of detail:
     • Types of data: Analog electronic signals? Digital data? Mechanical inputs?
     • Data characteristics: Periodically arriving data, such as digital audio samples?
       Occasional user inputs? How many bits per data element?
     • Types of I/O devices: Buttons? Analog/digital converters? Video displays?
                                A sample
                          requirements form
                         that can be filled out        We can use the form as a
                           at the start of the          checklist in considering
                                project.               the basic characteristics
                                                            of the system.
                 Let’s consider the entries in the form:
             •     Name                            •      Performance
             •     Purpose                         •      Manufacturing Cost
             •     Inputs and Outputs              •      Power
             •     Functions                       •      Physical Size and weight
• This is a more detailed description of what the system does. A good way to approach this is
  to work from the inputs to the outputs:
• When the system receives an input, what does it do?
• How do user interface inputs affect these functions? How do different functions interact?
                               A sample
                         requirements form
                        that can be filled out       We can use the form as a
                          at the start of the         checklist in considering
                               project.              the basic characteristics
                                                          of the system.
                 Let’s consider the entries in the form:
             •    Name                           •      Performance
             •    Purpose                        •      Manufacturing Cost
             •    Inputs and Outputs             •      Power
             •    Functions                      •      Physical Size and weight
• Many embedded computing systems spend at least some time in controlling physical
  devices or processing data coming from the physical world.
• In most of these cases, the computations must be performed within a certain time frame.
• It is essential that the performance requirements be identified early since they must be
  carefully measured during implementation to ensure that the system works properly.
                                A sample
                          requirements form
                         that can be filled out       We can use the form as a
                           at the start of the         checklist in considering
                                project.              the basic characteristics
                                                           of the system.
                 Let’s consider the entries in the form:
             •    Name                            •      Performance
             •    Purpose                         •      Manufacturing Cost
             •    Inputs and Outputs              •      Power
             •    Functions                       •      Physical Size and weight
• This includes primarily the cost of the hardware components.
• Even if you don’t know exactly how much you can afford to spend on system components,
  you should have some idea of the eventual cost range.
• Cost has a substantial influence on architecture: A machine that is meant to sell at $10
  most likely has a very different internal structure than a $100 system.
                                A sample
                          requirements form
                         that can be filled out       We can use the form as a
                           at the start of the         checklist in considering
                                project.              the basic characteristics
                                                           of the system.
                 Let’s consider the entries in the form:
             •   Name                             •      Performance
             •   Purpose                          •      Manufacturing Cost
             •   Inputs and Outputs               •      Power
             •   Functions                        •      Physical Size and weight
• Similarly, you may have only a rough idea of how much power the system can consume,
  but a little information can go a long way.
• Typically, the most important decision is whether the machine will be battery powered or
  plugged into the wall.
• Battery-powered machines must be much more careful about how they spend energy.
                                A sample
                          requirements form
                         that can be filled out       We can use the form as a
                           at the start of the         checklist in considering
                                project.              the basic characteristics
                                                           of the system.
                 Let’s consider the entries in the form:
             •   Name                             •      Performance
             •   Purpose                          •      Manufacturing Cost
             •   Inputs and Outputs               •      Power
             •   Functions                        •      Physical Size and weight
• You should give some indication of the physical size of the system to help guide certain
  architectural decisions.
• A desktop machine has much more flexibility in the components used than, for example, a
  lapel mounted voice recorder.
                         Specification
• The specification is more precise—it serves as
  the contract between the customer and the
  architects.
• As such, the specification must be carefully
  written so that it accurately reflects the
  customer’s requirements and does so in a way
  that can be clearly followed during design.
• The specification should be understandable
  enough so that someone can verify that it
  meets system requirements and overall
  expectations of the customer.
                      Architecture Design
• The specification does not say how the system
  does things, only what the system does.
• Describing how the system implements those
  functions is the purpose of the architecture.
• The architecture is a plan for the overall
  structure of the system that will be used later to
  design the components that make up the
  architecture.
• The creation of the architecture is the first
  phase of what many designers think of as design.
•
• This block diagram is still quite abstract—
• we have not yet specified which operations will
  be performed by software running on a CPU,
  what will be done by special-purpose hardware,
  and so on.
                      Components
• The diagram does, however, go a long way
  toward describing how to implement the
  functions described in the specification.
• The architectural description tells us what
  components we need.
• The component design effort builds those
  components     in   conformance to   the
  architecture and specification.
• The components will in general include both
  hardware—FPGAs, boards, and so on—and
  software modules.
• Some of the components will be ready-made.
  The CPU, for example, will be a standard
  component in almost all cases, as will memory
  chips and many other components . We can
  also make use of standard software modules.
                       System Integration
• Only after the components are built do we
  have the satisfaction of putting them together
  and seeing a working system.
• Of course, this phase usually consists of a lot
  more than just plugging everything together
  and standing back.
• Bugs are typically found during system
  integration, and good planning can help us
  find the bugs quickly.
• By building up the system in phases and
  running properly chosen tests, we can often
  find bugs more easily.
• If we debug only a few modules at a time, we
  are more likely to uncover the simple bugs and
  able to easily recognize them.
• Only by fixing the simple bugs early will we be
  able to uncover the more complex or obscure
  bugs that can be identified only by giving the
  system a hard workout
    CHALLENGES IN EMBEDDED COMPUTING
             SYSTEM DESIGN
 The following external constraints are one important source of
 difficulty in embedded system Design.
• How much hardware do we need?
       -We have a great deal of control over the amount of computing
               power we apply to our problem.
       -We cannot only select the type of microprocessor used, but also
       select the amount of memory, the peripheral devices, and more.
       -If too little hardware and the system fails to meet its
       deadlines, too much hardware and it becomes too expensive.
     CHALLENGES IN EMBEDDED COMPUTING
              SYSTEM DESIGN
• How do we meet deadlines?
         It is entirely possible that increasing the CPU clock rate may not
make enough difference to execution time, since the program’s speed may
be limited by the memory system.
• How do we minimize power consumption?
In battery-powered applications,      power consumption      is   extremely
important.
Even in non- battery applications, excessive power consumption can
increase heat dissipation.
One way to make a digital system consume less power is to make it run
more slowly, but naively slowing down the system can obviously lead to
missed deadlines.
      CHALLENGES IN EMBEDDED COMPUTING
               SYSTEM DESIGN
• How do we design for upgradability?
The hardware platform may be used over several product generations or
for several different versions of a product in the same generation, with few
or no changes.
• Does it really work?
Reliability is always important when selling products—customers rightly
expect that products they buy will work.
The sources that make the design so difficult are:
■ Complex testing: Exercising an embedded system is generally more
difficult than typing in some data. The timing of data is often important,
meaning that we cannot separate the testing of an embedded computer
from the machine in which it is embedded.
      CHALLENGES IN EMBEDDED COMPUTING
               SYSTEM DESIGN
• Limited observability and controllability:
-Embedded computing systems usually do not come with keyboards and
screens.
-This makes it more difficult to see what is going on and to affect the
system’s operation.
-We may be forced to watch the values of electrical signals on the
microprocessor bus, for example, to know what is going on inside the
system.
-Moreover, in real-time applications we may not be able to easily stop the
system to see what is going on inside.
• Restricted development environments:
    -The development environments for embedded systems (the tools
    used to develop software and hardware) are often much more limited
    than those available for PCs and workstations.
Typical Architecture of an Embedded System
      Figure Basic architecture of an embedded system
-Figure shows a configuration diagram of a typical embedded system
consisting of two main parts:
         embedded hardware and
         embedded software
-The embedded hardware primarily includes
               The processor
               Memory,
               Bus
               Peripheral devices
               I/O ports and various controllers.
-The embedded software usually contains the embedded operating system
and various applications.
               Typical Hardware Architecture
The basic computer system components—microprocessor, memory, and
input and output modules—are interconnected by a system bus in order
for all the parts to communicate and execute a program
-In embedded systems, the microprocessor’s role and function are usually
the same as those of the CPU in a general-purpose computer:
         control computer operation
         execute instructions and process data
-In many cases, the microprocessor in an embedded system is also called
the CPU.
-Memory is used to store instructions and data.
-I/O modules are responsible for the data exchange between the
processor, memory, and external devices.
-External devices include secondary storage devices (such as flash and
hard disk), communications equipment, and terminal equipment.
-The system bus provides data and controls signal communication and
transmission for the processor, memory, and I/O modules.
-There are basically two types of architecture that apply to embedded
systems: Von Neumann architecture and Harvard architecture.
                    Von Neumann Architecture
-Von Neumann architecture also known as Princeton architecture was first
proposed by John von Neumann.
-The most important feature of this architecture is that the software and data
use the same memory: that is, “The program is data, and the data is the
program” as shown in Figure.
In the Von Neumann architecture, an instruction and data share the same
bus.
In this architecture, the transmission of information becomes the
bottleneck of computer performance and affects the speed of data
processing; so, it is often called the Von Neumann bottleneck.
 In reality, cache and branch-prediction technology can effectively solve
this issue.
                 Harvard Architecture
• The Harvard architecture was first named after the Harvard Mark I
  computer.
• Compared with the Von Neumann architecture, a Harvard architecture
  processor has two outstanding features.
     • First, instructions and data are stored in two separate memory
       modules; instructions and data do not coexist in the same module.
     • Second, two independent buses are used as dedicated
       communication paths between the CPU and memory; there is no
       connection between the two buses.
• Because the Harvard architecture has separate program memory and
  data memory, it can provide greater data-memory bandwidth, making
  it the ideal choice for digital signal processing.
•   Most systems designed for digital signal processing (DSP) adopt the
    Harvard architecture.
• The Von Neumann architecture features simple hardware design and
  flexible program and data storage and is usually the one chosen for
  general-purpose and most embedded systems.
• To efficiently perform memory reads/writes, the processor is not
  directly connected to the main memory, but to the cache.
• Commonly, the only difference between the Harvard architecture and
  the Von Neumann architecture is single or dual L1 cache.
• In the Harvard architecture, the L1 cache is often divided into an
  instruction cache (I cache) and a data cache (D cache), but the Von
  Neumann architecture has a single cache.
Von-Neumann Architecture                             Harvard Architecture
Single memory to be shared by both code              Separate memories for code and data.
and data.
Processor needs to fetch code in a                   Single clock cycle is sufficient, as separate
separate clock cycle and data in another             buses are used to access code and data.
clock cycle. So it requires two clock cycles.
Higher speed, thus less time consuming.              Slower in speed, thus more time-consuming.
Simple in design.                                    Complex in design.
Low performance       Compared      to    Harvard    Easier to Pipeline, so high performance can be
Architecture                                         achieved.
Cheaper                                              Comparatively high cost
   •   Allows self modifying codes                      •   No memory alignment problems
   •   Since data memory and program memory             •   Since data memory and program memory are
       are stored physically in same chip, chances          stored physically in different locations, no
       for      accidental       corruption     of          chances for accidental corruption of program
       programmemory                                        memory
   •   Single shared bus for Instruction and Data       •   Separate buses for Instruction and Data
       fetching                                             fetching
             Microprocessor Architecture of Embedded
                             Systems
-The microprocessor is the core in embedded systems.
-By installing a microprocessor into a special circuit board and adding the
necessary peripheral circuits and expansion circuits, a practical embedded
system can be created.
-The microprocessor architecture determines the instructions, supporting
peripheral circuits, and expansion circuits.
-There are a wide range of microprocessors: 4-, 8-, 16-, 32-, and 64-bit,
with performance from MHz to GHz, and ranging from a few pins to
thousands of pins.
-In general,    there   are   two   types   of   embedded   microprocessor
architecture:
        Reduced instruction set computer (RISC) and
        Complex instruction set computer (CISC)
RISC
• The RISC processor uses a small, limited, simple instruction set.
• Each instruction uses a standard word length and has a short execution
  time, which facilitates the optimization of the instruction pipeline.
• To compensate for the command functions, the CPU is often equipped
  with a large number of general-purpose registers.
CISC
• The CISC processor features a powerful instruction set and different
  instruction lengths, which facilitates the pipelined execution of
  instructions.
Big endian systems are simply those systems whose memories are organized
with the most significant digits or bytes of a number or series of numbers in
the upper left corner of a memory page and the least significant in the
lower right, just as in a normal spreadsheet.
 Little endian systems are simply those system whose memories are
 organized with the least significant digits or bytes of a number or series of
 numbers in the upper left corner of a memory page and the most
 significant in the lower right.
Addresses
In the earlier functional diagram as well as in the block diagram for a
microprocessor, we learned that information is stored in memory. Each
location in memory has an associated address much like an index in the
array. If an array has 16 locations to hold information, it will have 16
indices. if a memory has 16 locations to store information ,it will have 16
addresses. Information is accessed in memory by giving its address.
            Instruction Set Architecture
• An instruction set, or instruction set architecture (ISA), is the part of
  the computer architecture related to programming, including the native
  data types, instructions, registers, addressing modes, memory
  architecture, interrupt and exception handling, and external I/O.
• An ISA includes a specification of the set of opcodes (machine
  language), and the native commands implemented by a particular
  processor.
• The entities that instructions operate on are denoted as Operand. The
  number of operands that an instruction operates on at any time is
  called the arity of the operation.
In this figure ,we see that within the 32 bit word, the bit are aggregated into groups or fields. Some of the fields
are interpreted as the operation to be performed, and others are seen as the operands involved in the operation.
                               Figure Expressing Instructions
          Embedded systems-An instruction set view
• A microprocessor instruction set specifies the basic operations
  supported by the machine.
• From the earlier functional model, we see that the objectives of such
  operations are-
    •   to transfer or store data
    •   to operate on data
    •   and to make decisions based on the data values or
    •   outcome of the operations
• Corresponding to such operations, we can classify instructions into the
  following groups
             • Data transfer
             • Flow control
             • Arithmetic and logic
                       Data transfer Instructions
• Data transfer instructions are responsible for moving data around inside
  the processor as well as for bringing data in from the outside world or
  sending data out.
• The source and destination can be any of the following:
                  • A register
                  • Memory
                  • An input or output
                          Addressing modes
  There are five addressing modes in 8085.
  1.   Direct Addressing Mode
  2.   Register Addressing Mode
  3.   Register Indirect Addressing Mode
  4.   Immediate Addressing Mode
  5.   Implicit Addressing Mode
         Direct Addressing Mode                           Immediate addressing mode:
  In this mode, the address of the operand is    In this mode, 8 or 16 bit data can be specified
  given in the instruction itself.               as part of the instruction.
  LDA is the operation.                          OP Code Immediate Operand
  2500 H is the address of source. Accumulator   MOV CL, 03 H
  is the destination.                            Moves the 8 bit data 03 H into CL
         Register addressing mode
                                                              Direct addressing mode
The operand to be accessed is specified as          The 20 bit physical address of the
residing in an internal register of 8086.           operand in memory is normally
                                                    obtained as PA = DS : EA
Example below shows internal registers,
any one can be used as a source or                  But by using a segment override
destination operand, however only the               prefix (SOP) in the instruction, any
data registers can be accessed as either a          of the four segment registers can be
byte or word.                                       referenced,
Example 1 : MOV DX (Destination
Register) , CX (Source Register)
Which moves 16 bit content of CS into DX.
                   Execution flow
The execution
flow or control
flow captures
the order of
evaluation of
each instruction
comprising the
firmware in an
embedded
application, we
can identify
these as
                        Processor control
The control of the microprocessor data path comprises four fundamental
operations defined as the instruction cycle . The steps are identified in
figure
Fetch-The fetch operation retrieves an
instruction from memory. That instruction
is identified by its address, which is the
contents of the PC.
                       Processor control
The control of the microprocessor data path comprises four fundamental
operations defined as the instruction cycle . The steps are identified in
figure
Decode-The decode step is performed
when the opcode field in the instruction
is extracted from the instruction and
decoded     by     the    decoder. That
information is forwarded to the control
logic, which will initiate the execute
portion of the instruction cycle.
                        Processor control
 The control of the microprocessor data path comprises four fundamental
 operations defined as the instruction cycle . The steps are identified in
 figure
Execute-Based on the value contained in
the opcode field, the control logic
performs the sequence of steps necessary
to execute the instruction.
                         Processor control
 The control of the microprocessor data path comprises four fundamental
 operations defined as the instruction cycle . The steps are identified in
 figure
Next-The address of the next instruction
to be executed is dependent on the type
of instruction to be executed and
potentially, on the state of the condition
flags as modified by the recently
completed instruction.
Intel Atom Architecture Next Generation Computing
    Intel Atom Architecture Next Generation Computing
Overview
•   Intel's  smallest     and     lowest       power      processor        1.6
    GHz (TDP 2.5 W)
•   TDP Thermal Design Power
•   maximum amount of power              the    cooling    system     in    a
    computer is required to dissipate.
•   The      Intel   Atom      processor    enables         the    industry
    to     create     pocket-sized     and    low         power      Mobile
    Internet       Devices       (MIDs),     and           Internet-focused
    notebooks (netbooks) and desktops (nettops).
    Atom Intended Usage                                  Atom Architecture
    •     Portable internet capable                  •Superscalar 2 issue
          devices                                    •Multiple instruction
                                                     processed at the same
    •     Not computationally as                     time by the processor
          capable as a desktop                       •Different from instruction
                                                     pipelining
    •     Used in mobile phones and                  •Uses multiple redundant
          Netbooks also in desktops                  hardware components in
                                                     the processor at the same
                                                     time
Types of Intel Atom                                  ▪    D series are dual core
                                                          processors and are used in
•       Three series of Atom processors released
                                                          desktops and even servers
•       N series and Z series are both single core
                                                     ▪    The TDP can vary from as
•       Used in mobile phones and netbooks                low as 0.65 W to 13 W
                In-order and Out of order execution
                                              Out-Of-Order Instruction fetch.
In-order Instruction fetch                    •Instruction    dispatch     to    an
•If input operands are available (in          instruction queue (also called
registers for instance), the instruction is   instruction buffer)
dispatched to the appropriate functional      •The instruction waits in the
unit.                                         queue until its input operands are
•If one or more operand is unavailable        available.
during the current clock cycle (generally     •The instruction is then allowed to
because they are being fetched                leave the queue before earlier,
from memory), the processor stalls            older instructions.
until they are available.                     •The instruction is issued to the
•The instruction is executed by the           appropriate functional unit and
appropriate functional unit.                  executed by that unit.
•The functional unit writes the results       •The results are queued.
back to the register file.                    •Only after all older instructions
                                              have their results written back to
                                              the register file, then this result is
                                              written back to the register file.
     Advantages and Disadvantages of in-order processing
Advantages
• Eliminates Instruction Reordering Logic
• Reduces Power Consumption
• Reduces Die Space
Disadvantages
•   Lower Performance
•   Data dependencies are more critical
•   Memory Accesses and slow floating point
•   operations stall the pipeline for longer time
•   Inefficiency in CPU hardware usage
•   Safe Instruction Recognition
•   Start the execution of a low latency integer
•   operation when a floating point operation is
•   waiting for resources
                 • Intel x86 compatible instruction Set
  Instruction    • Just like any desktop computer
          Set
Architecture     • Instruction length are variable (CISC)
                 • Support for SIMD instructions
                   • Minimum number of functional units to
                     reduce
                     power
    Functional     • 2 Integer ALUs
         Units
                   • 2 Floating Point ALUs
 Simultaneous Multi-threading
 •Hyper-threading technology
 •2 threads can execute simultaneously
 •Leads to increase in power consumption by less than 20
 •Performance improves by about 40
Power Management Options
                                        Sleep Scheduling
 Frequency Scaling
 • 8 different operating                •6 sleep states C1 through C6
   frequency.                           •Sleep states mainly drains or
 • Can reduce the frequency to up       shuts down the cache
   to 13 of maximum (1.6 GHz).          •Also shuts down the core clock
 • Reducing frequency reduces           •However, there is time penalty to
   power consumption                    wake up from the sleep states
 • May increase execution time          •Computation can only take place
   and hence energy consumption         in C1 state
 • Will definitely control operating
   temperature
Software Control
• Configuration and Power Interface (ACPI)
• Linux based set of commands
• Sleep scheduling
• echo NUM gt /proc/acpi/sleep, NUM 1 6
• For waking up alarm can be set in the real time
  clock
• Frequency scaling
• echo NUMgt/proc/acpi/processor/CPU0/performance,
• NUM 07
       Assignment
Introduction to Tiva family