Danh mục

Bài giảng Computer Organization and Architecture: Chapter 10

Số trang: 39      Loại file: ppt      Dung lượng: 430.00 KB      Lượt xem: 11      Lượt tải: 0    
Thu Hiền

Phí tải xuống: 7,000 VND Tải xuống file đầy đủ (39 trang) 0
Xem trước 4 trang đầu tiên của tài liệu này:

Thông tin tài liệu:

Instruction Sets: Characteristics and Functions thuộc "Bài giảng Computer Organization and Architecture: Chapter 10" sẽ đi sâu giới thiệu tới các bạn một số thông tin cơ bản về What is an instruction set; Elements of an Instruction; Where have all the Operands gone;...
Nội dung trích xuất từ tài liệu:
Bài giảng Computer Organization and Architecture: Chapter 10William StallingsComputer Organizationand Architecture6th EditionChapter 10Instruction Sets:Characteristicsand FunctionsWhat is an instruction set?• Thecompletecollectionofinstructionsthatare understoodbyaCPU• MachineCode• Binary• UsuallyrepresentedbyassemblycodesElements of an Instruction• Operationcode(Opcode) —Dothis• SourceOperandreference —Tothis• ResultOperandreference —Puttheanswerhere• NextInstructionReference —Whenyouhavedonethat,dothis...Where have all the Operands gone?• Longtimepassing….• (Ifyoudon’tunderstand,you’retooyoung!)• Mainmemory(orvirtualmemoryorcache)• CPUregister• I/OdeviceInstruction Cycle State DiagramInstruction Representation• Inmachinecodeeachinstructionhasaunique bitpattern• Forhumanconsumption(well,programmers anyway)asymbolicrepresentationisused —e.g.ADD,SUB,LOAD• Operandscanalsoberepresentedinthisway —ADDA,BSimple Instruction FormatInstruction Types• Dataprocessing• Datastorage(mainmemory)• Datamovement(I/O)• ProgramflowcontrolNumber of Addresses (a)• 3addresses —Operand1,Operand2,Result —a=b+c; —Maybeaforthnextinstruction(usuallyimplicit) —Notcommon —NeedsverylongwordstoholdeverythingNumber of Addresses (b)• 2addresses —Oneaddressdoublesasoperandandresult —a=a+b —Reduceslengthofinstruction —Requiressomeextrawork – TemporarystoragetoholdsomeresultsNumber of Addresses (c)• 1address —Implicitsecondaddress —Usuallyaregister(accumulator) —CommononearlymachinesNumber of Addresses (d)• 0(zero)addresses —Alladdressesimplicit —Usesastack —e.g.pusha —pushb —add —popc —c=a+bHow Many Addresses• Moreaddresses —Morecomplex(powerful?)instructions —Moreregisters – Interregisteroperationsarequicker —Fewerinstructionsperprogram• Feweraddresses —Lesscomplex(powerful?)instructions —Moreinstructionsperprogram —Fasterfetch/executionofinstructionsDesign Decisions (1)• Operationrepertoire —Howmanyops? —Whatcantheydo? —Howcomplexarethey?• Datatypes• Instructionformats —Lengthofopcodefield —NumberofaddressesDesign Decisions (2)• Registers —NumberofCPUregistersavailable —Whichoperationscanbeperformedonwhich registers?• Addressingmodes(later…)• RISCvCISCTypes of Operand• Addresses• Numbers —Integer/floatingpoint• Characters —ASCIIetc.• LogicalData —Bitsorflags• (Aside:Isthereanydifferencebetweennumbersandcharacters? AskaCprogrammer!)Pentium Data Types• 8bitByte• 16bitword• 32bitdoubleword• 64bitquadword• Addressingisby8bitunit• A32bitdoublewordisreadataddresses divisibleby4Specific Data Types• Generalarbitrarybinarycontents• Integersinglebinaryvalue• Ordinalunsignedinteger• UnpackedBCDOnedigitperbyte• PackedBCD2BCDdigitsperbyte• NearPointer32bitoffsetwithinsegment• Bitfield• ByteString• FloatingPointPentium Floating Point Data TypesPowerPC Data Types• 8(byte),16(halfword),32(word)and64 (doubleword)lengthdatatypes• Someinstructionsneedoperandalignedon32 bitboundary• Canbebigorlittleendian• Fixedpointprocessorrecognises: —Unsignedbyte,unsignedhalfword,signedhalfword, unsignedword,signedword,unsigneddoubleword, bytestring(

Tài liệu được xem nhiều: