MC Module 1
MC Module 1
Page
quraker Jeutbelitq and fnte ligence Hathei thon Vaorfa ble Jormofe nstxochons Fj6 fonate hshoc rns,
hardwase Ogresskt mu lhple HeStoy
RISC desigo placas queako demonds On
the Set & mony rstcors det & Jew hstructos
rstuchens FPrecl hótxochons onl
Comgilex 5
Mony
many
mocle
cclduess ing mocle
Compler Guate Compi lot poloble mbeded yskm wequire baty pouc the ARt
buccessey has beeo be omall
Gle gouahin (ode goutofon seduce pou CensumpRen and e~knd baluy opuofon
hoch mobile phone
Gutaer Agh Coll crstly 5 onolhe majoy Mequitement nce
Coanplhity Puocos oy embedded baue lintled mertoy deue to Cost
8 physial de sestulcfons - cagalfor appltaions hot
CISC haue IPnike On- bostcl mmory
RISC
Embecldel dygem puce Gensthue
Compler hatrucHons laking Tn dnple rstvchon law
dlos t Cost mmey duie qet dubslankal áaving6.
mollple clock ARM has n(epomct harlwore
tking hgle lock Phin he þuocest 6o thot doooxe enginexs on Viea
2
Emphasis haxdewae mphask Sefhwate RISC anc helekune
not pu
fomple.ily h mropro Gmpkrily
ARM oe
Censhalnst
bcause the
omplex hstuchon Reckvcedl asteochns exeted
erecated
by hadware
ARM Cae dato Jlos model h a not dRoquon
2. Esplon h faodomunlal lalo Unis Corncteel ty date
bases. The he dlala low
Instuuc ton
Decodor Mepucsenls the buses Gnd the bloc k
Bepusnlshe Unt
Siouagehucugh
Th Dale entrs he puotcSSM Cote dato bus
The dafa Could
'be data
Ace
Tthe stuvchon dco du deocls the rstschon. dRM puocesso
Lod Loael - Sfone anchtlechore, load hstuochFon
Gpîes daafom memay the
(oHe Gshuochn (opfes
mmoy.
’hcuemnhey Data Pkrns placecl h
a
slovaqe bank
mocle op 32-bf
Beg'stu. 32- b o hold dgnd
Value , 8& G nombexs ConVeeted to
32 - bt Values extencl haxcaHe
Decocle
Nhen hy
ARM ostovchon have Soetce
desna ton Rel oere qpvabels on
read
8hg hknal bcses A &8
espec Ruely
MAC/ The ALU Aatthmec bgic Unf) MAC (MulHBle arumik
te Unst ) taes Souxce
oporgnds hom
thuough buses 4 8 B, Compots he
the
Load & Stoue
Helo lb duectyhshucon
htwennt/ ALU
fogenale
an aclelucgs
Mqso.
CISC RISC
1. Complex instructions, taking multiple clock Simple instructions, taking single clock
2. Emphasis on hardware, complexity is in the 2. Emphasis on software, complexity is in the
micro-program/processor complier
3. Complex instructions, instructions executed by 3. Reduced instructions, instructions executed by
micro-program/processor hardware
4. Variable format instructions, single register set Fixed format Instructions, multiple register sets
and many instructions and few Instructions
5. Many instructions and many addressing modes Fixed instructions and few addressing modes
6. Conditional jump is usually based on status6. Conditional jump can be based on a bit
register bit anywhere in memory
7. Memory reference Is embedded in many Memory reference Is embedded In
18CS44
MICROCONTROLLER AND EMBEDDED SYSTEMS
2. PipelinesThe processing of instructions is broken down into smaller units that can be executed
in parallel by pipelines. Ideally the pipeline advances by one step on each cycle for maximum
throughput. Instructions can be decoded in one pipeline stage.
o There Is no need for an nstruction to be executed by a minl-program called microcode as
on CISC processors.
3. RegistersRISC machines have a large general-purpose register set. Any register can contain
either data or an address. Registers act as the fast local memory store for all data processing
operations.
In contrast, CISC processors have dedicated registers for specific purposes.
4. Load-store architecture The processor operates on data held in registers. Separate load and
store Instructlons transfer data between the register bank and external memory. Memory accesses
are costly, so separating memory accesses from data processing provides an advantage because
you can use data items held in the register bank multiple times without needing multiple memory
accesses.
o In contrast, with a CISC design the data processing operations can act on memory
directly.
These design rules allow a RISC processor to be simpler, and thus the core can operate at higher
clock frequencies.
o In contrast, traditional CISC processors are more complex and operate at lower clock
frequencies.
ngfsbsohoon
asmoleThe
th
also the
bygkm fon 6psr
ncot
on Poslre
63t82 He the ugtsloe.
thuough puocesH
by puoces Con
O.
Gn
ro
CpSr
satisfied. This feature improves performance and code density by reducing branch instructions.
Enhanced instructions-The enhanced digital signal processor (DSP) instructions were added to
the standard ARM instruction set to support fast 16x16-bit multiplier operations. These
instructions allowa faster-performing ARMprocessor.
These additional features have made the ARM processor one of the most commonly used 32-bit
embedded processor cores.
|AHB-APB bridge
Ethernet Ethernet
Real-time clock
physical
Countertimers driver
Console Serial UARTS
2. Peripherals tend to be bus slaves -logical devices capable only of responding to a transfer
request from a bus master device.
A bus has two architecture levels:
A physical leve! -covers the electrical characteristics and bus width (16, 32, or 64 bits).
The protocol the logical rules that govern the communication between the processor and a peripheral.
Dr. MAHESH PRASANNA K., VCET, PUTTUR
O Register rl3 is traditionally used as the stack pointer (sp) and rl4h
stores the head of the stack in the current processor mode. rl5pc
o Register rl4 is called the link register (Ir) and is where the core |cpsr
puts the return address whenever it calls a subroutine.
o Register rl5 is the program counter (pc) and contains the
address of the next instruction to be fetched by the processor.
V In ARM state the registers rO to rl3 are orthogonalany instruction that you can apply to rð you
can equally well apply to any of the other registers.
In addition to the 16 data registers, there are two program status registers: cpsr (current program
status register) and spsr (saved program status register).
Function
Condition Interrupt Processor
flags Masks mode
Thumb
state
15
The processor mode determines which registers are active and the access rights to the cpsr
register itself. Each processor mode is either privileged or non-privileged:
o Aprivileged mode allows full read-write access to the cpsr.
o A non-privileged mode only allows read access to the control field in the cpsr, but still
allows read-write access to the condition flags.
There are seven processor modes in total:
o six privileged modes (abort, fast interrupt request, interrupt request, supervisor, system,
and undefined)
The processor enters abort mode when there is a failed attempt to access
memory.
" Fast interrupt request and interrupt request modes corespond to the two
interrupt levels available on the ARM processor.
Supervisor mode is the mode that the processor is in after reset and is generally
the mode that an operating system kernel operates in.
System mode is a special version of user mode that allows full read-write access
to the cpsr.
Fetch Decode)Execute)
Figure: ARM7 Three-stage Pipeline
The above Flgure shows a three-stage pipeline:
o Fetch loads an instruction from memory.
o Decode ldentifies the instruction to be executed.
o Execute processes the instruction and writes the result back to a register.
The following Figure illustrates pipeline using a simple example.
o In the second cycle, the core fetches the SUB instruction and decodes the ADD
Instruction.
o In the third cycle, both the SUB and ADD Instructions are moved along the pipeline. The
ADD instruction is executed, the SUB instruction is decoded, and the CMP Instruction is
fetched.
o The pipeline design for each ARM family differs. For example, The ARM9 core Increases the
plpeline length to five stages, as shown in Figure.
Dr. MAHESH PRASANNA K., VCET, PUTTUR