首页 > 编程知识 正文

冯诺依曼计算机系统组成(冯诺依曼计算机体系的基本内容)

时间:2023-05-04 13:32:39 阅读:100059 作者:1513

-1-存储程序和自动执行程序是虚幻丸子计算机工作的基本原理。

20世纪50年代,虚幻的丸子提出了五大组件和存储程序的概念。计算机由输入设备、存储器、控制器、运算单元和输出设备组成。指令和数据可以一起放在内存中,程序可以按顺序自动执行。

它由中央处理器运算单元、控制器和寄存器以及实现它们之间数据、控制和状态的总线组成。几乎所有CPU的工作原理都可以分为四个阶段:取、解码、执行和写回。中央处理器从内存或高速缓冲存储器中取出指令,将它们放入指令寄存器,解码并执行它们。所谓计算机可编程性,主要是指对CPU的编程。

指令是一串二进制数,它指定机器做什么。指令分为两部分:操作码和操作数。操作码指示要做什么,操作数指示要处理的数据存储在哪里。处理器中有100或80条指令,称为指令集。语言可以被视为一种协议形式,其中处理器和寄存器被用来控制内存。

1.1存储程序:通过输入设备将程序加载到内存中并暂存;

1.2获取指令:控制器从内存中程序放置的位置(地址)取出一条程序指令,放入指令寄存器;

1.3分析指令:控制器对获得的程序指令进行分析和解释,确定指令和具体任务的含义,然后生成与任务对应的控制信息并发送给相应的组件。比如任务是两个数相加,则发送控制信息,指令操作员从存储器中取出操作涉及的两个数相加;

1.4指令的执行:控制器根据指令的性质向计算机各部分发出相应的控制信号,有序地控制各部分完成规定的操作;例如,当操作员接收到加法控制命令和操作中涉及的两个数字时,它执行加法操作,并且由操作产生的结果数据被传送到存储器用于临时存储。

1.5每次取指令时,控制器中的指令计数器加1确定下一条指令的地址,控制器依次获取下一条程序指令,解析指令,然后各组件执行指令.这个循环一直持续到节目结束。

-2-控制器

控制器的主要任务是分析指令,并根据从存储器中取出的指令向相应的组件发送控制信号,从而控制计算机的所有组件协调工作,完成所需的任务。

控制器主要包括三个部分:

2.1指令寄存器IR(Instruction Register):其本质是一个存储组件,寄存器是一个临时存储介质。将计算机当前执行或将要执行的指令存储在寄存器中;

2.2程序计数器PC(Program Counter):用于存储下一条要执行的指令的位置,因此可以方便地从内部取出下一条要执行的指令,并通过该寄存器中存储的地址放入指令寄存器中;

2.3操作控制器OC(Operation controller):负责解码指令,产生相应的控制信号,控制其他组件有序运行。因为计算机只能理解“0”和“1”组成的语言,所以需要将指令转换成机器语言,而这个寄存器就可以实现这个功能。

控制器使用指令指针来跟踪应该被处理的指令序列。控制单元以指针为指导,从随机存取存储器中按顺序检索每条指令,并将其放入一个特殊的指令寄存器中。控制单元解释该指令以找出需要做什么。根据其解释,控制单元向数据总线发送信号以从随机存取存储器获取数据,并向算术逻辑单元发送信号以执行处理。

控制单元将数据输入算术逻辑单元,算术逻辑单元执行任何有助于执行指令的算术或逻辑运算。

-3-操作员

算术单元的基本运算包括加法、减法、乘法和除法,逻辑运算如与、或、非、或非、移位、比较和传输,还可以执行地址运算和转换,也称为算术逻辑单元(ALU)。逻辑单元可以执行定点或浮点算术运算、移位运算和逻辑运算。

3.1接收寄存器:接收并存储一个操作数。

3.2累加器寄存器:保存另一个操作数和运算结果。

3.3状态寄存器:用于记录算术、逻辑运算或测试运算的结果状态。程序设计

计中,这些状态通常用作条件转换指令的判断条件,所以又称为条件码寄存器。

3.4 通用寄存器:为了减少对存储器的访问,主要用来保存参加运算的操作数和运算的结果。

3.5 执行部件:包括一个加法器和各种类型的输入输出门电路。

3.6 控制电路:按照一定的时间顺序发出不同的控制信号,使数据经过相应的门电路进入寄存器或加法器,完成规定的操作。

-4- 寄存器

寄存器是CPU内部用来存放数据的一些小型存储区域,用来暂时存放参与运算的数据和运算结果。其实寄存器就是一种常用的时序逻辑电路,但这种时序逻辑电路只包含存储电路。寄存器的存储电路是由锁存器或触发器构成的,因为一个锁存器或触发器能存储1位二进制数,所以由N个锁存器或触发器可以构成N位寄存器。寄存器是中央处理器内的组成部份。寄存器是有限存贮容量的高速存贮部件,它们可用来暂存指令、数据和位址。在中央处理器的控制部件中,包含的寄存器有指令寄存器(IR)和程序计数器(PC)。在中央处理器的算术及逻辑部件中,包含的寄存器有累加器(ACC)。

寄存器部件,包括通用寄存器、专用寄存器和控制寄存器。

A register is a storage location inside the processor.Rigisters in the control unit are used to keep track of the overall status of the program that is running.Control unit registers store information such as the current instruction,the location of the next instruction to be executed,and the operands of the instruction.In the ALU,registers store data items that are added,substracted,multiplied,divided,and compared.Other registers store the results of arithmetic and logical operations.

-5- 总线:五大部件的连接

为了读出程序、处理数据等,必须要在CPU与内存之间进行数据的传送。数据是利用称为数据总线(data bus)的传输途径进行交换的。所谓总线(bus),就是计算机主板上的某种传输线路。总线的宽度(即传输线的条数),会因CPU而各异。比如,对于32位总线而言,每次可以交换32位的数据。但需要注意的是,总线位数并不是CPU的位数,而是指传输数据时的位数。例如,英特尔公司的奔腾系列为32位的CPU,其数据总线的宽度为64位。总线是与从CPU芯片里面引出来的,一根一根针(pin)脚相对应的。如果能对照CPU芯片或计算机主板的实物,找到称为总线的传输线路,对总线的概念,就会有感觉了。

此外,为了从内在读出数据,或者将数据写入内存,就必须要指定读出的位置和写入的位置。因此,内存中的每个字节(Byte)都被分配了相应的编号(当然不一定都要以字节为单位,也有采用别的单位进行编号的),这种编号就称为地址(address)。当要访问内存时,就需要从CPU传送出指定地址的电信号。这种信号也是通过总线进行传送的,但它与传送数据所用的总线(数据总线)不同,是由地址总线的位数所决定的。

比如,若地址总线只有16条(即16位总线),其所能存取访问的地址是,从0000 0000 0000 0000地址到1111 1111 1111 1111地址为止,只有65636个单元。现在市场上的奔腾系列CPU,其地址总线有32根。它可以直接访问的内在单元为232=4GB(约40亿个字节)。

主存与CPU的硬连接有三组连线:地址总线(AB)、数据总线(DB)和控制总线(CB)。把主存看作一个黑盒子,存储器地址寄存器(MAR)和存储器数据寄存器(MDR)是主存和CPU之间的接口。MAR可以接收由程序计数器(PC)的指令地址或来自运算器的操作数的地址,以确定要访问的单元。MDR是向主存写入数据或从主存读出数据的缓冲部件。MAR和MDR从功能上看属于主存,但通常放在CPU内。

Physically,a bus is a set of wires.The components of the computer are connected to the buses.To send information from one component to another,the source component outputs data onto the bus.The destination component then inputs this data from the bus.As the complexity of a computer system increases,it becomes more efficient(in terms of minimizing connections) at using buses rather than direct connections between every pair of devices.Buses use less space on a circuit board and require less power than a large number of direct connections.They also require few pins on the chip or chips that comprise the CPU.

When the cpu reads data or instruction from or writes data to memory,it must specify the address of the memory location it wishes to access.It outputs this address to the address bus;memory inputs this address from the address bus and use it to access the proper memory location.Each I/O devices,usch as a keyboard,monitor,or disk device,has a unique address as well,when accessing an I/O device,the cpu places address of the device on the address bus.Each bus can read the address off the bus and determine whether it is the device being access by the cpu.Unlike the other buses,the address bus always receives data form the cpu,the cpu never reads the address bus.

Data is transfered via the data bus.When the cpu fetches data from memory,it first outputs the memory address on its address bus.Then memory outputs the data onto the data bus,the cpu can then read the data from the data bus.When writing data to memory,the cpu first outputs the address onto the address bus,then outputs the data onto the data bus.The memory then reads and stores the data at proper location.The processes for reading data from and writing data to the I/O devices are similar.

The control bus is different from the other two buses.The address bus consists of a lines,which combine to transmit one -bit address value.Similarly,the lines of the data bus work together to transmit a single multi-bit value.In contrast,the control bus is a collection of individual control signals.These signals indicate whether data is to be read into or written out of the cpu,whether the cpu is accessing memory or an I/O devices or memory is ready to transfer data.The control bus is really a collection of (mostly) undirectional signals.Most of these signals are output from the memory and I/O subsystems,although a few are output by these subsystems to the cpu.

A system may have a hierarchy of buses.for example,it may use its address,data and control buses to access memory,and an I/O controller.The I/O controller,in turn,may access all I/O devices using a second bus,often called an I/O bus or a local bus.

-End-

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。