软硬件系统编程PPT (18).pdf
Von Neumann Architecture Hardware composition and basic principle of microcomputer John Von Neumann Hungarian-American scientist The founder of computer architecture 2 Why John Von Neumann,a Hungarian mathematician,was the“father of electronic computer”,not John William Mauchly and J.Presper Eckert who were the designers of the first computer?3 Von Neumannthe father of electronic computer Von Neumann introduced modern computer architecture The features of Von Neumann computer 1.Binary system All information(instructions and data)in computer are represented in binary 2.Five parts in computer hardware Arithmetic unit Logic controller Memory Input and Output 3.Principle of storage 4 Architecture feature:take the arithmetic unit as the core,and all inputs and outputs are processed in ALU 5 Von Neumann Architecture 输入设备输入设备输出设备输出设备运算器运算器(ALU)控制器控制器内存储器内存储器指令/数据流控制流CPU结果结果程序程序/数据数据host system program/data input device controller output device results instructions/data stream control flow memory 6 The basic principle of Von Neumann computer basic principle The calculation process is described as a program composed of several instructions in a certain sequence,which is stored in the storage Instructions will be executed in sequence The access of whole program and data and the execution of program are controlled by controller stored-program concept 7 instruction 1 instruction 2 instruction CPU operand The basic principle of Von Neumann computer program counter(PC)address the program in memory analyzing obtaining the operand executing storing the results 8 Process:Process:To obtain the first instruction To decode the instruction and to determine the next operation To read operand(the object of execution)To execute the instruction To store the executing results Back to step 1 until the pause instruction occurs The basic principle of Von Neumann computer PC 1000FH 1000FH+1 B1H 1000FH Working process of reading an instruction by microcomputer:B1H Memory unit address Address register Address bus Internal memory Instruction decode Data bus“Reading storage”Program Counter(PC)PC is used to generate and store address that the next instruction to be read Before the execution,the memory address of the first instruction in the program should be sent to PC Every time the PC outputs an address which points to a unit of memory,and the CPU automatically takes out the instructions of the unit Then,the content in PC will add 1 automatically,and it is ready to read next instruction If every instruction is taken out,the PC adds 1,and the program will be executed in sequence PC is the“pointer”of program execution,and the CPU will take instructions wherever PC points PC is“instruction pointer”Sequential structured program The limitation of Von Neumann Architecture There will be a lot of data interaction between CPU and storage,resulting in bus limitation The sequence of instruction execution is determined by the program counter.Therefore,although data are prepared for execution,it must be executed in sequence The sequence of instruction execution is determined by the program,and it is difficult for executing large and complex instructions Take ALU as the core,data transmission between I/O device and memory must by ALU,which is inefficiency especially for non-numerical data 11 Harvard Architecture Feature:Instructions and data are stored in two independent storage units separately Two sets of independent buses are used to transfer instructions and data between CPU and storage CPU程序存储器数据存储器地址信号地址信号数据信号数据信号Address signal Address signal Data signal Data signal Program memory Data memory