sharc处理器内核体系结构.pptx
SHARC?处理器内核体系结构:
Handson
UsingOn-chipmemory (30minutes)Declareamemorysectionusingshortwordmemoryspace.Say?seg_short{TYPE(DMRAM)START(0END(0x01800FF)WIDTH(16)}Declareanarrayx[4]={0xCDEF,0x89AB,0x4567,0x0123};underthissection.NowobservethewordinShortWord,TwoColumn,andLongwordmemorywindowataddressesx,x/2andx/4respectively.Trytorelatewhatyourobservationwiththewordplacementdescribedintheslides.Nowloadtheregisterr0withtheshortwordatmemorylocationx,r1with32bitwordatmemorylocationx/2,r2andr3withthelongwordatmemorylocationx/4.?Trytorelateyourobservationstothediscussionintheslides.2
ProcessingElement (30minutes)Intializefourarrays A_FIX[100]={0.01r,0.01r,0.01r,0.01r,0.01r…….}, B_FIX[100]={0.02r,0.02r,0.02r,0.02r,0.02r……..}forfractionaldataand A_FLOAT[100]={0.01,0.01,0.01,0.01,0.01……..}, B_FLOAT[100]={0.02,0.02,0.02,0.02,0.02……}forfloatingpointdata.Writeacodetoevaluatetheexpression withbothfloatingandfixedpointarithmetic.Storetheresultsintwoseparatememorylocations.(Theresultshouldbe=0.2).CalculatethenumberofcyclestakentoperformthisalgorithmusingEMUCLKregister.3
UsingSIMDarchitectureeffectively(30Minutes)Performthesamealgorithmasmentionedabove(onlyforfloatingpoint)usingmultifunctionalinstructionsi.e.usingparalleloperandfetch,multiplierandALUoperationsinSISDmode.Calculatethenumberofcyclestakennowtoperformthealgorithm.PerformthesamealgorithmusingSIMDmodeandmultifunctionalinstructionsboth.Calculatethenumberofcyclestakenforthistimetoo.Comparethethreereadingsforthenumberofcycles.YoucouldobservehowusinsSIMDandmultifunctionalinstructionsfeaturedecreasesthenumberofcycle