Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
18CS44
SEMESTER - IV
MODULE 1
Clock speed refers to the number of cycles that a processor executes per
second. A cycle is a unit of measurement during which a processor
executes instructions. If you see a processor that has a rating of 3.1 GHz,
it operates at 3.1 billion cycles per second.
MICROPROCESSOR VS MICROCONTROLLERS
Microcontroller
It’s like a small computer on a single IC. It contains a processor core, ROM,
RAM and I/O pins dedicated to perform various tasks. Microcontrollers
are generally used in projects and applications that require direct control
of user. As it has all the components needed in its single chip, it does not
need any external circuits to do its task so microcontrollers are heavily
used in embedded systems and major microcontroller manufacturing
companies are making them to be used in embedded market. A
microcontroller can be called the heart of embedded system. Some
examples of popular microcontrollers are 8051, AVR, PIC series of
microcontrollers.
Fig: architecture of 8051 micro controller. And you can see all the required
components for a small project is present in a single chip.
Microprocessor
Microprocessor has only a CPU inside them in one or few Integrated
Circuits. Like microcontrollers it does not have RAM, ROM and other
peripherals. They are dependent on external circuits of peripherals to
work. But microprocessors are not made for specific task but they are
required where tasks are complex and tricky like development of
software’s, games and other applications that require high memory and
where input and output are not defined. It may be called heart of a
computer system. Some examples of microprocessor are Pentium, I3, and
I5 etc
From this image of architecture of microprocessor, it can be easily seen
that it has registers and ALU as processing unit and it does not have RAM,
ROM in it.
Major Differences between Microprocessor and Microcontroller
RISC AND CISC
Imagine you are training a dog. You teach it to understand certain specific
instructions like ‘sit’ or ‘fetch’ and then associate those words with certain
tasks. So that later on, when you say ‘fetch’, and throw a ball, the dog will
fetch it.
A CPU (and I will use this term to mean both microcontrollers and
processors in general) works in a similar way. There are certain
instructions that the CPU knows and when we give them those
instructions, different transistors inside it switch ON and OFF to perform
those instructions.
The instructions that we input are in the form of 1’s and 0’s, or opcode.
Since it is hard for us to remember combinations of 1’s and 0’s, we tend to
use shorthand’s for those instructions, called assembly language, and a
compiler converts it into opcode.
The number of instructions that a particular CPU can have is limited and
the collection of all those instructions is called the Instruction Set.
Reduced Set Instruction Set Architecture (RISC) – The main idea behind
is to make hardware simpler by using an instruction set composed of a
few basic steps for loading, evaluating and storing operations just like a
load command will load data, store command will store the data.
RISC Vs CISC
There are a number of physical features that have driven the ARM
processor design.
The ARM instruction set differs from the pure RISC definition in several
ways that make the ARM instruction set suitable for embedded
applications:
These additional features have made the ARM processor one of the most
commonly used 32-bit embedded processor cores. Many of the top
semiconductor companies around the world produce products based
around the ARM processor.
Embedded devices use an on-chip bus that is internal to the chip and
allows different peripheral devices to be inter-connected with an ARM
core.
1. Bus Master
2. Bus Slave
Physical level: Which covers electrical characteristics a bus width (16, 32,
64 bits).
AMBA Bus was introduced in 1996 and has been widely adopted as the
On Chip bus architecture used for ARM processors.
Later ARM introduced another bus design called the ARM High
performance Bus (AHB).
Using AMBA
1. Multi-layer AHB
2. AHB-Lite
AHB and Multiple-layer AHB support the same protocol for master and
slave but have different interconnects. The new interconnects in Multi-
layer AHB are good for systems with multiple processors. They permit
operations to occur in parallel and allow for higher throughput rates.
Memory
Memory Width: Memory width is the number of bits the memory returns
on each access-typically 8, 16, 32, or 64 bits. The memory width has a
direct effect on the overall performance and cost ratio. Following table
covers fetching instructions from memory.
Memory types
ROM: Read-only memory (ROM) is the least flexible of all memory types
because it contains an image that is permanently set at production time
and cannot be reprogrammed. Devices use a ROM to hold boot code Its
main use is for holding the device firmware or storing long-term data that
needs to be preserved after power is off.
SRAM: Static random access memory (SRAM) is faster than the more
traditional DRAM, but requires more silicon area. SRAM is static-the
RAM does not require refreshing.
SDRAM: SDRAM stands for Synchronous Dynamic Random Access
Memory. It is one of the DRAM type. It runs at high clock speed compare
to conventional memory. It gets synchronize with processor bus as
SDRAM is clocked.
Memory Controllers
Interrupt Controllers
There are two types of interrupt controller available for the ARM
processor:
An embedded system needs software to drive it. Below figure shows four
typical software components required to control an embedded device.
The initialization code is the first code executed on the board and is
specific to a particular target or group of targets. It sets up the
minimum parts of the board before handing control over to the
operating system.
The device drivers are the third component shown in figure. They
provide a consistent software interface to the peripherals on the
hardware device.
Finally, an application performs one of the tasks required for a
device. For example, a mobile phone might have a diary application.
There may be multiple applications running on the same device,
controlled by the operating system.
INITIALIZATION CODE
Initialization code (or boot code) takes the processor from the reset
state to a state where the operating system can run. The initialization
code handles a number of administrative tasks prior to handing control
over to an operating system image.
We can group these different tasks into three phases: initial hardware
configuration, diagnostics, and booting.
OPERATING SYSTEM
APPLICATIONS
The mobile device segment is the largest application area for ARM
processors because of mobile phones. ARM processors are also found in
mass storage devices such as hard drives and imaging products such as
inkjet printers—applications that are cost sensitive and high volume.