Advanced Microprocessor Systems Design
Advanced Microprocessor Systems Design ECE 463
Popular in Course
Popular in ELECTRICAL AND COMPUTER ENGINEERING
verified elite notetaker
This 6 page Class Notes was uploaded by Miracle Jaskolski on Thursday October 15, 2015. The Class Notes belongs to ECE 463 at North Carolina State University taught by Eric Rotenberg in Fall. Since its upload, it has received 34 views. For similar materials see /class/223887/ece-463-north-carolina-state-university in ELECTRICAL AND COMPUTER ENGINEERING at North Carolina State University.
Reviews for Advanced Microprocessor Systems Design
Report this Material
What is Karma?
Karma is the currency of StudySoup.
Date Created: 10/15/15
Static Scheduling Techniques 0 Local scheduling within a basic block 0 Loop unro ling 0 Software pi ng modulo scheduling 0 Trace scheduling O Predication m my new N am Martaer Garnan n om Nana ammo Loop Unrolling 1 of 2 O Unroll the loop eg four times map on a mm m Sm n max 1111 in 5 wagligation More regsers nemedi o Ewan nemns M s eye slesion lesseynemrngronranaemeeemuuena Fever Drmcha elsgeroesenaek as reschmule Ovaalmns noreessuy my new N am Martaer Garnan n om Nana ammo Loop Unrolling 2 of2 0 Po vesnegatives o Larger block forscheduling r anon frequen des narn39o instruction count loop overhead 0 Expands c 39 o Haveko nandle rze excess iterations stripminingquot my new N am Martaer gamer Ml om Nana ammo Stripmining 0 Suppose that our loop requires 10 iterations nd we can unroll only 4 of the iterations 0 If we go through our unrolled loop 3 times how many iterations of the original loop would we be performing 0 If we go through our unrolled loop twice how many iterations of the original loop would nning 0 So we need to add some prelude code eg 17er r CID 1236567391 w 1 6 mm x xxx 17er my mm M am unbound ammo MI was quotcom waxy m 2H Static Scheduling Techniques 0 Local scheduling within a basic block 0 Loop unrolling 0 Software pipelining modulo scheduling 0 Trace schedu ing 0 Predication m mm M am unbound omen Dm o m moo mmw m m Software Pipelining 1 of 5 O Symbolic loop unrolling e nstructions in a loop are taken from different sin loop ration the origina iteration n iteration 1 lteranun 2 lteranun a lteranun A E e e 8 Iteration m uommmmm mmm umm mm mm xvnn mom whoquot mm my mm M am unbound ammo MI was quotcom waxy m m Software Pipelining 2 of 5 0 Treat dependent operations in a loop as a pipeline 0 LDi gtADDDi gtSDi 0 Hide iatencies by placing different stages in successive iterations ltgt LDi goes in rst iteration ltgt ADDDi goes in second iteration ltgt sum goes in third iteration ltgt Stated anotnerway LDi ADDDi 1 sun 2 go into the sam e iteration for ma mu m lt sxmxrwrm am e am k for 2 mu m lt laid in laid in add in add 2nd sum in mm men gt gt m mam Mt am unbound Gamma n was man waxy in n Software Pipelining a of 5 O Assemblycode version mu m an nix men m an mu m no em an an manna an H moan moan m n mam anon on weep n m we men m mam Mt am unbound Gamma n was man mmw in 2H Software pipelining 4 of 5 Instructions from 3 consecutive iterations form the loop body Loop so A ASLRJV m n n in may m1 R1 R En m 19013 O No data dependences within a loop iteration O The dependence distance is 2 iterations O WAR hazard elimination is needed 0 Requires startup and nish code nn Iimharmvamm mmnn uilimnuniwnit nanny mam mmputzr mummm mans m mam Mt am unbound Grimm MI was man waxy in no Software Pipelining 5 of 5 O Positivesnegatives o dependences in loop body 0 Same effect as loop unrolling need to replicate iterations code 0 Still have extra code for prologuelepilogue pipeline llldrain o Does not reduce branch frequency nide latencies but don39t size m mam M am unbound Gamma MI was men waxy in ma Static Scheduling Techniques 0 Local scheduling within a basic block 0 Loop unrolling 0 Software pipelining modulo scheduling 0 Trace schedu in O Predication m mam M am unbound Gamma MI was men mmo in mi Trace Scheduling 1 of a Creates a sequence of instructions that are likely to be executed a trace TWo steps 0 Trace selection Find a likely sequence of basic blocks trace across statically ed39 9 ift 0 Trace compactionSchedule the trace to be as ef cient as possible while preserving correctness in the case the prediction is wrong nn no mo n nltan m woman quoton W xtzmtmm alumn manic xtmhllalm nianoumvutrnmlllmmn mans m mam M am unbound Gamma MI was men waxy in m Trace Scheduling 2 of3 O The leftmost sequence is chosen as the most likely trace 0 The assignment to B is controldependent on the ifstatement 0 Trace compaction has to respect data dependencies O The rightmost less likely trace has to be augmented with fixup code ECE 55521 Pm Came Rutenberg and Gehrmger Dept efEcE NC xete Umvernty 1713 Trace Scheduling 3 of3 0 Select most common path a trace 9 Use pro ling to select a trace 9 Allows global scheduling ie scheduling across branches 9 This is speculation because schedule assumes certain path through region Q If trace is wrong other paths taken execute repair co e 9 Efficient static branch prediction key to success 9 Yields more instructionlevel parallelism Trace to be sched Repair code bl c A restore old bu x maybe recalculate c 1 goto E 0 then hm new eeleve Common case else x 1 e lfa1 1 0 goto A a c e ECE 55521 Pm Came Rutenberg and Gehrmger Dept efEcE NC xete Umvernty am 2715 Static Scheduling Techniques 0 Local scheduling within a basic block 0 Loop unrolling 0 Software pipelining modulo scheduling 0 Trace scheduling O Predication ECE 55521 Pm Came Rutenberg and Gehrmger Dept efEcE NC xete Umvernty am 2715 Predication 1 of a O Conditional or predicated instructions Executed only if a cond Ion is satisfied 0 Control converted into data dependences E xampl e Normal code Conditional ENEZ R1 L CMDVZ R2 R3 R1 MDV R2 R L 0 Useful for short ifthen statements 0 More complex might slow down cycle time m Iimharmvamm varthtmm omnmmntt minim mmquot mm anthem quotam my mm M am momma Gamma am quotcan ammo Predication 2 of a 0 ISA role ltgt Provide predicate register s ltgt Provide predicatesetting instructions eg compare ltgt Subset of opcodes can be guarded with predicates ltgt Repia e branch with predicate computation ltgt Guard alternate paths with predicateand ipredicate 0 Hardware role ltgt Execute all predicated code ie both paths after a branch ltgt Do not ommit either path until predicate is known ltgt Conditionally commit or quash depending on predicate ge prsd code my mm M am MUD le Gamma pt am quotcan unmo ta am Predication a of a O Positivesnegatives o m Largerscheduling scape withoutspeculatian o H ISA exlensinns apcadepressure exer reg39sterspecilier o H May degrade perlarmance ilnverecnmmillelchexecule u cos o H Cnnven cantral dependenceta data dependence 0 Dn th39s really xlhe hranch prahlem 0 Nut predi ng cantralllaw delays resalving register ependences an lengthen schedulew 0 Above discussion is simpli ed 0 Fred n iss much much more complex trace scheduling reTracescheduling predicatiansuperhlacks hyperhlacis treegians 0 Hardware Selective mulllepzlh executian cantral independence my mm M am MUD le cameo Mt am quotcan internal ta m