版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、1,William Stallings Computer Organization and Architecture7th Edition,Chapter 10 Instruction Sets: Characteristics and Functions,2/40,Key terms (24),accumulator, address arithmetic shift, logical shift, rotate big endian, little endian, bi-endian branch, conditional branch, jump, skip instruction se
2、t, machine instruction operand, operation, stack, push, pop, packed decimal, procedure call, procedure return, reentrant procedure, reverse Polish notation,3/40,What is an Instruction Set?,The complete collection of instructions that are understood by a CPU Machine Code Binary Usually represented by
3、 assembly codes,4/40,Elements of an Instruction,Operation code (Op code) Do this Source Operand reference To this Result Operand reference Put the answer here Next Instruction Reference When you have done that, do this.,5/40,Where have all the Operands Gone?,Long time passing. (If you dont understan
4、d, youre too young!) Main memory (or virtual memory or cache) CPU register I/O device,6/40,Instruction Cycle State Diagram,7/40,Instruction Representation,In machine code each instruction has a unique bit pattern For human consumption (well, programmers anyway) a symbolic representation is used e.g.
5、 ADD, SUB, LOAD Operands can also be represented in this way ADD A,B,8/40,Simple Instruction Format,9/40,Instruction Types,Data processing Data storage (main memory) Data movement (I/O) Program flow control,10/40,Number of Addresses (a),3 addresses Operand 1, Operand 2, Result a = b + c; May be a fo
6、rth - next instruction (usually implicit) Not common Needs very long words to hold everything Implicit 英音:implisit 暗示的,含蓄的,11/40,Number of Addresses (b),2 addresses One address doubles as operand and result a = a + b Reduces length of instruction Requires some extra work Temporary storage to hold so
7、me results,12/40,Number of Addresses (c),1 address Implicit second address Usually a register (accumulator) Common on early machines,13/40,Number of Addresses (d),0 (zero) addresses All addresses implicit Uses a stack e.g. push a push b add pop c c = a + b,14/40,How Many Addresses,More addresses Mor
8、e complex (powerful?) instructions More registers Inter-register operations are quicker Fewer instructions per program Fewer addresses Less complex (powerful?) instructions More instructions per program Faster fetch/execution of instructions,15/40,Design Decisions (1),Operation repertoire How many o
9、ps? What can they do? How complex are they? Data types Instruction formats Length of op code field Number of addresses Repertoire 英音:reptw: 保留曲目,全部曲目,16/40,Design Decisions (2),Registers Number of CPU registers available Which operations can be performed on which registers? Addressing modes (later)
10、RISC v CISC,17/40,Types of Operand,Addresses Numbers Integer/floating point Characters ASCII etc. Logical Data Bits or flags (Aside: Is there any difference between numbers and characters? Ask a C programmer!),18/40,Pentium Data Types,8 bit Byte 16 bit word 32 bit double word 64 bit quad word quad 英
11、音:kwd 四倍 Addressing is by 8 bit unit A 32 bit double word is read at addresses divisible by 4,19/40,Specific Data Types,General - arbitrary binary contents Integer - single binary value Ordinal - unsigned integer Unpacked BCD - One digit per byte Packed BCD - 2 BCD digits per byte Near Pointer - 32
12、bit offset within segment Bit field Byte String Floating Point,20/40,Pentium Numeric Data Formats,21/40,PowerPC Data Types,8 (byte), 16 (halfword), 32 (word) and 64 (doubleword) length data types Some instructions need operand aligned on 32 bit boundary Can be big- or little-endian Fixed point proce
13、ssor recognises: Unsigned byte, unsigned halfword, signed halfword, unsigned word, signed word, unsigned doubleword, byte string (128 bytes) Floating point IEEE 754 Single or double precision,22/40,Types of Operation,Data Transfer Arithmetic Logical Conversion I/O System Control Transfer of Control,
14、23/40,Data Transfer,Specify Source Destination Amount of data May be different instructions for different movements e.g. IBM 370 Or one instruction and different addresses e.g. VAX,24/40,Arithmetic,Add, Subtract, Multiply, Divide Signed Integer Floating point ? May include Increment (a+) Decrement (
15、a-) Negate (-a) Negate 反面,对立面,25/40,Shift and Rotate Operations,26/40,Logical,Bitwise operations AND, OR, NOT Bitwise 按位,27/40,Conversion,E.g. Binary to Decimal,28/40,Input/Output,May be specific instructions May be done using data movement instructions (memory mapped) May be done by a separate cont
16、roller (DMA),29/40,Systems Control,Privileged instructions CPU needs to be in specific state Ring 0 on 80386+ Kernel mode For operating systems use Privileged 特许的,有特权的,30/40,Transfer of Control,Branch e.g. branch to x if result is zero Skip e.g. increment and skip if zero ISZ Register1 Branch xxxx A
17、DD A Subroutine call c.f. interrupt call c.f. 请比较,请对照/参看 (拉丁语),31/40,Branch Instruction,32/40,Nested Procedure Calls,33/40,Use of Stack,34/40,Stack Frame Growth Using Sample Procedures P and Q,35/40,Exercise For Reader,Find out about instruction set for Pentium and PowerPC Start with Stallings Visit
18、 web sites,36/40,Byte Order(A portion of chips?),What order do we read numbers that occupy more than one byte e.g. (numbers in hex to make it easy to read) 12345678 can be stored in 4x8bit locations as follows,37/40,Byte Order (example),AddressValue (1)Value(2) 1841278 1853456 1865634 1867812 i.e. r
19、ead top down or bottom up? i.e.= that is to say . 这就是说. 一般性的大辞典上都有解释,诸如英汉高阶,38/40,i.e. 是拉丁文 id est 的缩写,它的意思就是“那就是说,换句话说”,等同于“that is,in other words” ,目的是用来进一步解释前面所说的观点。 e.g. 是拉丁文 exempli gratia 的缩写,它的意思是“举个例子,比如”,等同与“for example”,目的就是用几个例子来说明前面的观点。 etc.是 etcetera 的缩写,意思是“等等”,相当于“and so on” e.g. 和 etc. 不能出现在同一句话中 c.f. 请比较,请对照/
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 朔州师范高等专科学校《护理教育学》2025-2026学年期末试卷
- 山西老区职业技术学院《金融法概论》2025-2026学年期末试卷
- 沈阳师范大学《新闻学概论》2025-2026学年期末试卷
- 上海工艺美术职业学院《投资分析决策》2025-2026学年期末试卷
- 上海行健职业学院《电磁场与电磁波》2025-2026学年期末试卷
- 上海现代化工职业学院《细胞工程学》2025-2026学年期末试卷
- 上海农林职业技术学院《刑法学》2025-2026学年期末试卷
- 太原理工大学《社会主义经济理论》2025-2026学年期末试卷
- 放射科头部CT评估方案
- 泌尿道结石治疗方案
- 老年康复护理床上运动
- 木材加工厂消防安全规范
- 脱硫脱硝控制系统自动化方案
- 小儿常见营养障碍性疾病
- 2026年内蒙古机电职业技术学院单招职业技能考试必刷测试卷附答案
- 湖北省专升本2025年软件工程专业数据结构重点题型练习试卷(含答案)
- T/CAPE 10108-2024设备设施报废管理指南
- 《语文教学技能训练》课件全套 第1-8章 课堂教学语言技能训练- 教学反思技能训练
- 医院消毒灭菌与监测课件
- 测绘公司安全培训课件
- 浮雕画彩塑艺术精讲
评论
0/150
提交评论