mutiple cycle cpu (转)

言简意赅

A single instruction enters the CPU at the Fetch stage and the PC is
incremented in one clock cycle. In the next clock cycle, the instruction moves
to the Decode stage. In the third clock cycle, the instruction moves to the
Access stage and the operands are loaded. In the last two stages, the
instruction is executed and the result is stored.

here‘s  multi-cycle datapath:

the first things you should notice when looking at the datapath is that it
has fewer functional units than the single cycle cpu. we only have one memory
unit, and only one alu. on the other hand, we have lots of registers that we
didn‘t have before: ir ("instruction register"), mdr ("memory data register"),
a, b, and aluout.

so, the obvious first question is: why can we get away with fewer functional
units, and why do we need all these registers? we don‘t need as many functional
units because we can re-use the same functional unit for a different purpose on
a different clock cycle. for example, during the first cycle of execution, we
use the alu to compute pc+4. on the second cycle, we use the alu to precompute
the target address of a branch.

we need the extra registers because we will need data from earlier cycles in
later cycles. for example, we read the register file in the second cycle of
execution, but we will need the values that we read in the third cycle. the
extra registers allow us to remember values across clock cycles.

if i point to any component on the multi-cycle datapath, you should be able
to tell me what it is and why we need it.

时间: 2024-10-27 08:02:28

mutiple cycle cpu (转)的相关文章

软件技术人员需要对数字的敏感性

长假过完了,脑袋空转时间过长,严重不利于智商发育,所以写了这篇文章烧烧脑.本文通篇充斥了各种数字,图表,图画,坚持不住的允许半途而废,想脑洞开窍的还是要坚持,多培养对相关领域数字的敏感性. 为什么要看数字? 程序员每天要写代码,得益于摩尔定律,80%的场景是不需要关注自己写的程序的性能的,但现在互联网行业的IT开发人员越来越多,经常会有人遇到高并发情况下的性能问题,这些问题的根源有相当一部分是软件开发人员太“软”,把计算机系的基础课<计算机组成原理>知识还给老师了,对硬件知识掌握不够导致的.有

由于网络攻击导致路由器CPU 99% 网络时断时通

CPU Usage Stat. Cycle: 60 (Second) CPU Usage            : 99% Max: 99% CPU Usage Stat. Time : 2016-12-10  19:37:01 Dec 10 2016 19:34:38 BEJ-ANF-AGG-9312-17.64 %%01SECE/4/PORT_ATTACK(l)[0]:Port attack occurred.(Slot=MPU, SourceAttackInterface=XGigabit

关于CPU Cache:程序猿需要知道的那些

天下没有免费的午餐,本文转载于:http://cenalulu.github.io/linux/all-about-cpu-cache/ 先来看一张本文所有概念的一个思维导图: 为什么要有CPU Cache 随着工艺的提升最近几十年CPU的频率不断提升,而受制于制造工艺和成本限制,目前计算机的内存主要是DRAM并且在访问速度上没有质的突破.因 此,CPU的处理速度和内存的访问速度差距越来越大,甚至可以达到上万倍.这种情况下传统的CPU通过FSB直连内存的方式显然就会因为内存访问的等待, 导致计算

System and method for dynamically adjusting to CPU performance changes

FIELD OF THE INVENTION The present invention is related to computing systems, and more particularly to a system and method for adjusting to changes in processor performance. BACKGROUND INFORMATION Designers of mobile computing platforms are faced wit

simlescalar CPU模拟器源码分析

Sim-outorder.c Main函数 Fetch  -->  despetch-->                                issue-->              writeback        -->commit Code text-->fetch queue --> RUU/LSQ(->readyqueue)-->event queue-->删除envent-->RUU/LSQ 功能模拟快速跳过的指令,之后

Modern Operating System --- Power Management (CPU)

The CPU can also be managed to save energy. A notebook CPU can be put to sleep in software, reducing power usage to almost zero. The only thing it can do in this state is waking up when an interrupt occurs. Therefor, whenever the CPU goes idle, eithe

java cpu缓存

众所周知, CPU是计算机的大脑, 它负责执行程序的指令; 内存负责存数据, 包括程序自身数据. 同样大家都知道, 内存比CPU慢很多. 其实在30年前, CPU的频率和内存总线的频率在同一个级别, 访问内存只比访问CPU寄存器慢一点儿. 由于内存的发展都到技术及成本的限制, 现在获取内存中的一条数据大概需要200多个CPU周期(CPU cycles), 而CPU寄存器一般情况下1个CPU周期就够了. CPU缓存网页浏览器为了加快速度,会在本机存缓存以前浏览过的数据; 传统数据库或NoSQL数据

cpu 性能

我们平时使用的CPU利用率方法是极具误导性的,并且一年更甚一年.那么什么是CPU利用率?是你的CPU到底有多忙,是像"% CPU"这样到处在用的指标所显示的那样吗? 在top命令里,你看到90%的CPU利用率是这样: 然而它真正想表达的是这个意思: Stall(这里译作"怠速")是说这个处理器没有在跑指令,比如在等待内存I/O的时候.我上图所画的比例("忙"与"怠速"之间)是我在真实生产环境中遇到的,并且你的CPU也很可能是处

关于CPU Cache -- 程序猿需要知道的那些事

/ 本文将介绍一些作为程序猿或者IT从业者应该知道的CPU Cache相关的知识 文章欢迎转载,但转载时请保留本段文字,并置于文章的顶部 作者:卢钧轶(cenalulu) 本文原文地址:http://cenalulu.github.io/linux/all-about-cpu-cache/ 先来看一张本文所有概念的一个思维导图 为什么要有CPU Cache 随着工艺的提升最近几十年CPU的频率不断提升,而受制于制造工艺和成本限制,目前计算机的内存主要是DRAM并且在访问速度上没有质的突破.因此,