addressingmodes-tms320c5x
-
Upload
kapilachander-thangavel -
Category
Documents
-
view
212 -
download
0
Transcript of addressingmodes-tms320c5x
8/18/2019 addressingmodes-tms320c5x
http://slidepdf.com/reader/full/addressingmodes-tms320c5x 1/16
Addressing modes• Determines how one access memory
• Addressing refers to means to specify location of
operands for instructions - types of addressing are called addressing modes
- operands may be input operands for the operation aswell as results of the operation
• Addressing modes supported by the TMS320C!"include
register-indirect# inde"ed register-indirect#
and modulo addressing $circular addressing%&
'mmediate data is also supported&
•
The TMS320C!" does not support modulo addressingfor (-bit data&
8/18/2019 addressingmodes-tms320c5x
http://slidepdf.com/reader/full/addressingmodes-tms320c5x 2/16
ADD .L1 -13,A1,A6
(implied) ADD .L1 A7,A6,A7
not supported
LDW .L1 *A5++[8,A1
• 'mmediate
– The operand is part ofthe instruction
• )egister
– The operand is speci*edin a register
• Direct
– The address of theoperand is part of theinstruction $added toimply memory page%
• 'ndirect
– The address of theoperand is stored in aregister
8/18/2019 addressingmodes-tms320c5x
http://slidepdf.com/reader/full/addressingmodes-tms320c5x 3/16
Register-Indirect Addressing
• +perand is located in memory address stored in a
register• Special group of registers can be used to store
addresses
$address registers%
• Most important addressing mode in DS,s• .cient from instruction set point of /iew
• ew bits are needed to indicate address of operand
• 32 registers$A0-A1#0-1% are used as pointers
• 'ndirect addressing uses 4*5 in con6unction with one of
the 32 registers
8/18/2019 addressingmodes-tms320c5x
http://slidepdf.com/reader/full/addressingmodes-tms320c5x 4/16
• 1& *) 7 register ) contains address of a memorylocation
• where a data /alue is stored• 2& *)88 $d% - register ) contains memory address
• - after the memory address is used# ) is
• postincremented such that new address is)81 if d91
• - double minus $- -% update the address by
d-1•
3. * 88 )$d% - address is preincremented or o:set by d• - current address is )8d or )-d•
4. * 8 )$d% - address is preincremented by d# such that
the current address is )8d• - howe/er ) pre increments withoutmodi*cation
• - unli;e pre/ious case# ) is not updated ormodi*ed
8/18/2019 addressingmodes-tms320c5x
http://slidepdf.com/reader/full/addressingmodes-tms320c5x 5/16
Delay <ine implemented with
shifting of sample
8/18/2019 addressingmodes-tms320c5x
http://slidepdf.com/reader/full/addressingmodes-tms320c5x 6/16
Delay <ine pointer manipulationusing Circular Addressing
8/18/2019 addressingmodes-tms320c5x
http://slidepdf.com/reader/full/addressingmodes-tms320c5x 7/16
Circular addressing• Circular addressing is used to create a circular bu:er
•
u:er is created in hardware and is /ery useful forapplications li;e digital *ltering
• This addressing mode in con6unction with circular bu:erupdates samples by shifting data without creatingo/erhead as in direct shifting
•
=hen pointer reaches bottom location# and whenincremented the pointer is automatically wrapped aroundto the top location&
• Two independent bu:ers are a/ailable using >0 and >1within the AM) register
• )egisters A(-A! and (-! in con6unction with &D unit canbe used as pointers
• M?C $mo/e constant% is the only instruction to access AM)and other control registers
Ci l :
8/18/2019 addressingmodes-tms320c5x
http://slidepdf.com/reader/full/addressingmodes-tms320c5x 8/16
Circular u:er
At the beginning of eachsample period#a new sample will be readinto the circular
bu:er#o/erwriting the oldestsample&
The newest sample "$n% willbe stored at the memory
location pointed at byau"iliary register A)$i%&
8/18/2019 addressingmodes-tms320c5x
http://slidepdf.com/reader/full/addressingmodes-tms320c5x 9/16
• The need of processing the digital signals in real time#e/ol/es the concept of Circular u:ering&
• Circular bu:ers are used to store the most recent
/alues of a continually updated signal&
• Circular bu:ering allows processors to access a bloc;of data se@uentially and then automatically wraparound to the beginning address e"actly the patternused to access coe.cients in ') *lter&
• Circular bu:ering also /ery helpful in implementing*rst-in# *rst-out bu:ers# commonly used for '+ and for
') delay lines&• Most DS, 'mplement Circular addressing in hardware
in order to conser/e memory and minimiBing softwareo/erhead&
8/18/2019 addressingmodes-tms320c5x
http://slidepdf.com/reader/full/addressingmodes-tms320c5x 10/16
(AMR)
•
or each of the eight registers $A(7A!# (7!% that canperform linear or circular addressing# the addressingmode register $AM)% speci*es the addressing mode&
•
A 2-bit *eld for each register selects the addressmodi*cation mode linear $the default% or circularmode&
•
=ith circular addressing# the *eld also speci*es which> $bloc; siBe% *eld to use for a circular bu:er&
• 'n addition# the bu:er must be aligned on a byteboundary e@ual to the bloc; siBe&
8/18/2019 addressingmodes-tms320c5x
http://slidepdf.com/reader/full/addressingmodes-tms320c5x 11/16
AMR mode and description
Mode description00 for linear addressing01 for circular addressing using >0• or circular addressing using >1• reser/ed