EEE 432 Lecture 02

Download as pdf or txt
Download as pdf or txt
You are on page 1of 20

EEE 432

Embedded Systems
Lecture 02
1 Introdction
 A typical embedded system contains a single chip controller, which acts as the
master brain of the system.
 This controller falls into any one of the following categories:
 General Purpose Processor (GPP)
 Application Specific Instruction-Set Processor (ASIP)
 Application Specific Integrated Circuit (ASIC)
 Programmable Logic Device

EEE 432 - Embedded Systems (2024) 3


2 General Purpose Processors
 General Purpose Processors (GPPs) are used for general purpose applications that
are not specific to any applications.
 They process instructions based on the predefined general purpose instruction set.
 GPPs are produced in large volumes and targeting the general market.
 Due to the high volume production, the per unit cost for a chip is low compared to
other types of processors.
 GPPs include microprocessors, microcontrollers and digital signal processors.
 The processor inside a desktop computer or laptop is a typical example of a general
purpose processor

EEE 432 - Embedded Systems (2024) 4


2.1 Microprocessors
 A microprocessor is a chip that contains a powerful central processing unit (CPU)
that is designed with no particular computation in mind.
 To develop a basic system using a microprocessor, all components other than the
CPU are implemented externally.
 Other characteristics of microprocessor include an optimised architecture to move
code and data from external memory into the chip such as queues and caches, and
the inclusion of architectural elements to accelerate processing such as multiple
functional units, ability to issue multiple instructions at once, and other features
such as branch prediction units and numeric co-processors.
 The most common examples of systems designed around microprocessor are
personal computers and mainframes.
 Most small embedded systems, however, do not need the large computational and
processing power of microprocessors, and hence the orientation to microcontrollers
for these tasks.

EEE 432 - Embedded Systems (2024) 5


2.2 Microcontrollers
 A microcontroller is developed using a central processing unit (CPU), usually less
complex than that of an microprocessor.
 This basic CPU is then surrounded with memory of both types (program and data)
and several types of peripherals, all of them embedded into a single integrated
circuit, or chip.
 This blending of CPU, memory, and I/O within a single chip is what we call a
microcontroller.
 The assortment of components embedded into a microcontroller allows for
implementing complete applications requiring only a minimal number of external
components or in many cases solely using the microcontroller chip.
 Peripheral timers, input/output (I/O) ports, interrupt handlers, and data converters
are among those commonly found in most microcontrollers.

EEE 432 - Embedded Systems (2024) 6


2.2 Microcontrollers (Cont.)
 Microcontrollers share a number of characteristics with general purpose
microprocessors but the core architectural components in a typical microcontroller
are less complex and more application oriented than those in a general purpose
microprocessor.
 Microcontrollers are usually marketed as family members. Each family is
developed around a basic architecture which defines the common characteristics of
all members. These include, among others, the data and program path widths,
architectural style, register structure, base instruction set, and addressing modes.
 Features differentiating family members include the amount of on-chip data and
program memory and the assortment of on-chip peripherals.
 An example of a popular microcontroller is an ATmega328 made by Microchip.
 The Arduino Uno is built around an ATmega328p.

EEE 432 - Embedded Systems (2024) 7


2.3 Microprocessors Vs Microcontrollers
 Table 1 summarises the differences between microcontrollers and microprocessors.
Table 1: Microprocessors vs Microcontrollers
Microprocessors Microcontrollers
A silicon chip representing a central A microcontroller is a highly integrated
processing unit (CPU), which is capable chip that contains a CPU, memory,
of performing arithmetic as well as special and general purpose register
logical operations according to a arrays, on chip ROM/FLASH memory for
predefined set of instructions program storage, timer and interrupt
control units and dedicated I/O ports
It is a dependent unit. It requires the It is a self-contained unit and it doesn’t
combination of other chips like timers, require external interrupt controller, timer,
program and data memory chips, interrupt UART, etc. for its functioning
controllers, etc. for functioning

EEE 432 - Embedded Systems (2024) 8


2.3 Microprocessors Vs Microcontrollers (Cont)
Table 1 (Cont.)
Microprocessors Microcontrollers
Most of the time general purpose in Mostly application-oriented or domain-
design and operation specific
Doesn’t contain a built in I/O port. The Most of the processors contain multiple
I/O port functionality needs to be built-in I/O ports which can be operated
implemented with the help of external as a single 8, 16 or 32 bit port or as
programmable peripheral interface chips individual port pins
Targeted for high end market where Targeted for embedded market where
performance is important performance is not so critical
Limited power saving options compared Includes lot of power saving features
to microcontrollers

EEE 432 - Embedded Systems (2024) 9


2.4 Digital Signal Processors
 The CPU within a digital signal processor (DSP) is specially designed to perform
discrete-time signal processing calculations—like those required for audio and
video communications—very fast.
 Because DSPs can perform these types of calculations much faster than other
processors, they offer a powerful, low-cost microprocessor alternative for
designers of cell phones and other telecommunications and multimedia equipment.
 A DSP contains these key components:
 Program Memory: Stores the programs the DSP will use to process data
 Data Memory: Stores the information to be processed.
 Compute Engine: Performs the math processing, accessing the program from
the Program Memory and the data from the Data Memory.
 Input/Output Unit: Acts as the interface between the outside world and DSP.

EEE 432 - Embedded Systems (2024) 10


2.5 Processor Architecture
 In processors, whether program and data memory are integrated or separate is the
distinction between two basic types of architecture:
 Von Neumann Architecture
 Harvard Architecture
 Processors based on the Von-Neumann architecture share a single common bus
for program and data memory.
 Program instructions and data are stored in a common main memory. Von-
Neumann architecture based processors first fetch an instruction and then fetch
the data to support the instruction. The two separate fetches slows down the
controller’s operation.
 Von-Neumann architecture is also referred as Princeton architecture, since it was
developed by the Princeton University.

EEE 432 - Embedded Systems (2024) 11


2.5 Processor Architecture (Cont.)
 Figure 1 shows a block diagram representation of the Von Neumann architecture.
 Processors based on the Harvard architecture have physically separate address
spaces for programs and data, and therefore use separate buses for accessing each
type of memory.
 This allows the data transfer and program fetching to occur simultaneously on
both buses. With the Harvard architecture, the data memory can be read and
written while the program memory is being accessed. These separated data
memory and code memory buses allow one instruction to execute while the next
instruction is fetched. The prefetch theoretically allows much faster execution
than Von-Neumann architecture.
 Since some additional hardware logic is required for the generation of control
signals for this type of operation it adds silicon complexity to the system.
 Figure 2 shows a block diagram representation of the Harvard architecture.

EEE 432 - Embedded Systems (2024) 12


2.5 Processor Architecture (Cont.)

Figure 1: Von Neumann Architecture.

Figure 2: Harvard Architecture.

EEE 432 - Embedded Systems (2024) 13


3 Application Specific Integrated Circuits
 Application Specific Integrated Circuits (ASICs) are microchips designed to
perform a specific or unique application.
 They are used as replacement to conventional general purpose logic chips.
 ASICs integrate several functions into a single chip and there by reducing the
system development cost.
 Most of ASICs are proprietary products.
 As single chips, ASICs consume a very small area in the total system thereby
helping in the design of smaller systems with high capabilities/functionalities.

EEE 432 - Embedded Systems (2024) 14


4 Application Specific Instruction-Set Processors
 Application Specific Instruction-Set Processors (ASIPs) are processor designed for
a particular application or for a set of applications.
 ASIPs are ideally suited for embedded applications that have demanding
performance, size, and power requirements that cannot be satisfied by a general
purpose processor.
 An ASIP exploits special characteristics of application(s) to meet the desired
performance, cost and power requirements.
 An ASIP’s instruction set is specifically designed to accelerate computationally
heavy and most used functions. ASIP architecture is designed to implement the
assembly instruction set with minimum hardware cost.
 ASIPs are a balance between two extremes : ASICs and GPPs. Since an ASIC is
specially designed for one behaviour, it is difficult to make any changes at a later
stage. In such a situation, the ASIPs offer the required flexibility at lower cost than
GPPs.

EEE 432 - Embedded Systems (2024) 15


5 Programmable Logic Devices
 Programmable Logic Devices (PLDs) are ICs that contain large numbers of logic
elements that can be configured by the user to perform different functions.
 PLDs do not have a specific functions associated with them at the time of
manufacture.
 The two major types of PLDs are Field Programmable Gate Arrays ( FPGAs) and
Complex Programmable Logic Devices ( CPLDs).
 Of the two, FPGAs offer the highest amount of logic density, the most features,
and the highest performance.

EEE 432 - Embedded Systems (2024) 16


5.1 Field Programmable Gate Arrays
 Field programmable gate arrays (FPGAs) are reprogrammable integrated circuits
that contain an array of programmable logic blocks. FPGA chip adoption is driven
by their flexibility, hardware-timed speed and reliability, and parallelism.
 FPGAs are programmable in the field (outside the factory), hence the name “field
programmable”.
 Unlike processors, FPGAs are truly parallel in nature, so different processing
operations do not have to compete for the same resources. Each independent
processing task is assigned to a dedicated section of the chip and can function
autonomously without any influence from other logic blocks. As a result, the
performance of one part of the application is not affected when you add more
processing.
 Figure 3 shows the general structure of an FPGA.

EEE 432 - Embedded Systems (2024) 17


5.1 Field Programmable Gate Arrays (Cont.)

Figure 3: FPGA general structure

EEE 432 - Embedded Systems (2024) 18


5.1 Field Programmable Gate Arrays (Cont.)
 The Internal Architecture of FPGAs consists of three main parts:
 Configurable Logic Blocks — which implement logic functions.
 Programmable Interconnects — which implement routing.
 Programmable I/O Blocks — which connect with external components.
 There is also clock circuitry for driving the clock signals to each logic block.
 Additional logic resources such as ALUs, memory, and decoders may also be
available.

EEE 432 - Embedded Systems (2024) 19


5.1.1 Configurable Logic Blocks
 A configurable logic block (CLB) is the basic repeating logic resource on an
FPGA. When linked together by routing resources, the components in CLBs
execute complex logic functions, implement memory functions, and synchronize
code on the FPGA.
 CLBs contain smaller components, including flip-flops, look-up tables (LUTs), and
multiplexers.
 Flip-Flop—A circuit capable of two stable states that represents a single bit. A
flip-flop is the smallest storage resource on the FPGA. Each flip-flop in a CLB
is a binary register used to save logic states between clock cycles on an FPGA
circuit.
 Look-up Table (LUT)—A collection of gates hardwired on the FPGA. An
LUT stores a predefined list of outputs for every combination of inputs. LUTs
provide a fast way to retrieve the output of a logic operation because possible
results are stored and then referenced rather than calculated.
 Multiplexer—A circuit that selects between two or more inputs and then
returns the selected input.

EEE 432 - Embedded Systems (2024) 20

You might also like