MPMC - Unit 3
MPMC - Unit 3
Stack Opezation.
õtath 16a group b} memoay lpeation in read Luoriho mtmoray. is
LSed gor Emporzaivy Shoczge o binary injozmahion. duzing progueum
execurion he skatking memorzy location stach dehindd in dhe
man roguzm and dhe spac6 is eserved in Me memory map.
nhoils upi
L
Puge
SUBROUTIME -
it is a goup btinshruchons ariten seponately toon main Prsguan
DperzuLM AN pertakion, hat vccus nepe1kedly in dhe main
pItugrtam.
Forz e- otime qely is zequinzed tehiten 3suttessive
EvEnts3 delays can te sorciten in main Progzam. Buk to avtd
epekihanot Same delay instzucions, 6ubrzcukine Hthnisue15
auh oialically stoues dhe 16bil instunction -1u sauc hc, conlcnls
address o e inshuckions egison pain. tn he Shat
nex to ALL on dhe
skach
hc FET instwclic) Aranstens PoP insktenckion zaued t
h e Cookenk ot dop sto location chun the contenks ram shat
e statK do he specikied negishen paz
pusgzan couaktr to
0utoiCaly.
T-5tate
-stale is dctined_48 a sut-qivision tt dhe opcuakion perctund
in on6 clocy Period. Ead skalt is prtciscly equal to one
clock perzioo he mieroprores0t opercating Fueaucnc is 3MHz
and Tim Pezid oh orn6-slalk 10= 033 5eL..
fiming Diaguam
Ihe nccss.0y sheps which arc tavcicd out in a. machine cycle
Can be neprcesenked guaphically. Such a
Laphit.al reprzescnkahion
16 Called Timing Diagram
addcess.
pcadle
ALE
10/
PL
L
dabiming Diaguam hor Dpzode Fekch with 4 T-shates.
Opcodo fehah Maclint tycl
Ina Fekch cycle, HP 1tlthts he cpcade ot an insheichicns tee
men1oy he epcodt Felth maclins tyele may censisk ot cikhtra
AAst Tskaks 4epending n hype o instEuchions.
The Addcess and Dala Bus orL Seob as 2
tasalel ines t
Tepresen logical levelsiata gguup oh tines
5cme Bres aue high and others cMe Louo. The
CItOSSC utIZot H
ines nticak that aneu byle is placed onAe. bus and -lhc
dotcd
Lincs indicakes the high inipeelence shalc.m
A
euk dhe addrrss bt memoky
nTcloCn cycle. he yP sends Orzden mendrcy
available. he liialitnt
whete cpcde is
Hocakion As As and Loue Ozderc
on Adduess ines
addeess ir placed
addreens placea to addues: ines AD7- A Do
Samc im. Status Signal Io/M
mcmory
goes high at
The ALE signal shatus
-o ndicalc hat is a mamoy opatahion. Tht
g0 lou an cpcode Feleh
and So a t set high to indicaic
Signals S
Dperz
Ahis dock
In T2 lock tyde, RD signal goes high ak the end o
cyclesocina he bus Ao cnlct into high innpsdence shakc
T T2 T
CIK
ALE
10/M
RD
2 T9
CIK
AD7-ADoX158 Dato.)
ALE
10/M
RD
TO Read Machine Cycle
In T0 Rcad machinc cycle, daia jcom an input porzk is storzed in
accumilaror I/0 RcAd machinc cycle has 3-shates
I 0 / Linc Kcph high indicoing an I/0 0peuahion
The stabs tne S and 5o se 0 and 1 respeckivcly indicaing
a Reod operation
he AD Signal set Lou 4 indicokt a uead opecaiicn
T2 T3
CIK
Au5-Ag
AD7-AD»
ALE
10/
RD
CIK
Pus As
ADT-AD
ALE
10/M
RD
0
Inslrauction Cycle-
An Instuuc ion is a commmand given to he Compuvler to percjoren a
Specikied aperahion on a given daha To pedhoam a pachiculart hasn.
ha programmer wrókes a sequence oh inshwchions called a Prngunn.
PiDgruam ond. daba ate shoncd in hb mei0ty
he CPU hekches on insrauchion ttom he. memeey di a tine and
opLDde
Operaion code. Thefinshpardhbhian inshacion which
Opcode
Spccitieshetosns to be pechorCmed by Compurerae
to be
Operzand -he Second paict oh he inshrachon is th6 data
operated on n is Laed Dpeand io h ce
In Fctch cycle, a CPU Jekches opeode huom memorey he firs
byle o an inshuwchion is ils opcode An inshravchion may be morc
Miccocontrzolleas -
Types ot
avc divided inlo vaxious cakagocies ALOUding fo
Micoeonhrolleus
arthikochwre,wOTdlengh
and inshtuction set.
|ht mtmoy
Exhetnal MempryC
whcn an embcddsd Shtuchne is uilt oilh a sC, which does'nt
in a thip s
Compzise b all unctionlng bloeKs oxishing
Callcd an Eeunal mtmotay C
does'nt haut FizonaM mem)ry on tho
: 051 M
dhip
mbedded Memony L
ohan an crmbedded shaucwz is built wotth a. yt amprtdsing th a
PrLoccsson Architectune
PrOCcSsot Architecturte.
CISC Arnchitectute-
Prreuiubuy, thd machines wexe progKammed n Ass embly Lnguage
and the mtmoy Attess was sloo.
To calalalc tomplex astilbamelit opexakions, ConipileS had tt
CH&ako a long staucnce ot machint pets. Thr nude dt qesgnes
Ao build an aschllechue whdh acess he méoey 1ess fuue) lg
Ane eeuLe dhe WOKK Dcompllees
This in hUtn helptd Ho qesign a powrul but complax
ins hcchion 6er
C1SL Achittckuste dicclty ue. he menpizy
inshead ok
Regisr Fe.
us ing a
achltchuzt usel a. Binglt. mesnomy tu. toth tin n
is both indhautkons
Advantageb
thip i t s u t cragina
i is tasy do add new tommonds inh
7 h oLchih uss
struchuze ot inshrauchon sch as
h
hotdiorut o casy u onm.an.ds
gcnennl puzpose
he
main metnor sinLE
hearchikcchuce useg eljicient use inshiucitrs
Complexiy o inshucions allouo
0 use 1s n0
Ho achitv A guen Bash
Disadvankages
t slauLeL Cls
ovezall mcchine peripzmanic reduL becau
SpE
seriucance inchuira in
h t complexihy e, handuoane And tocip
C1SC Asign to peujcran many uachons
Advantages
Ven.oroman 1s 2-4 +imes increased dhan that ry C15
pEDCEB So8 becaube oh simpliied inshrncion se
Disadvantages
RISC ProL.essorS KEALuE veey ast memorty Suskem in vcdec
do give ins ruc Hons to dhe Proesseas
Example AVR
C15C RISC
nmorze imiporz hmte to
> gives moze impothanté to gives
hauzdnoate. Sothuat
Reduced Inshzuchions.
Compley Inskeuckions
Teauirzes egishrts
acLess memorcy dirzechy
Coding is Lomplicaed.
Coding is simplen in L1SC
8051 Interttuupls
event vohil inortzupls AnPEMaL operuhtA 1g
InkrrLpk sis omf.
s t 8igal
htper.clion process o An inkeroruph Sturce is
dhat indiakes an npercrupt ig rcUady to be perjemmedh
h addna otutusy 1o Vrag-
ohert
Inkerupk_vech 6
$951 SLC
wglesh Priothg inkeraCtupE upan restk
OReset
Lodt frem 0000 addeess
Sta exttuh
Tinee 0 al Tinbt
ntrnal nterrupt 2 1erau
2 Cek
0uer}lous i dtert Dv erjlo
Flag ATE
Wle Ti
veckoe adáes
TLe C Ju-s h em
Sercul. tounuun+eahe
P'on a tela
Sexsal nCntup
Senial tcrRupk Ftag- TI/RI Tt suul kicroRupr
s ma.ns1ted,
LLlay bit a bylc
receiay dats byio
FCa e d 1ast bit a
rcceivtd R Fcas se
extdeore netii t
C ftat
Exe&upt notijies
gcio odcep Cnablt Pogi CaablG/ dit abt,
Jnkcx
Iakcoxp- Paieuly aignsiuh
Ex inleexnp D 10TD
TPO
WTI
T Conp TF
T
PI0 40 Vc
011 2 Po.0 ADo 007
Ph2 3
P13
1
RST
sALE/TRA4
PSE
10TD 12
IT 13
1 As
To M A
T 2
9-1 17
7AL21
XTALI
21 P2-0