冯·诺依曼vs哈佛建筑 [英] von neumann vs harvard architecture

查看:140
本文介绍了冯·诺依曼vs哈佛建筑的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在设计个人计算机时,为什么基于冯·诺依曼体系结构的计算机体系结构比哈佛体系结构更受青睐?而哈佛架构用于设计基于微机的计算机系统和基于DSP的计算机系统?

Why computer architecture based on von Neumann architecture is preferred over Harvard architecture, when designing personal computers; while Harvard architecture is used for designing microcomputer based computer systems and DSP based computer systems?

推荐答案

目前用于PC的CPU设计既具有哈佛元素又具有冯·诺伊曼(Von Neumann)元素(不过还有冯·诺伊曼).

Well current CPU designs for PC's have both Harvard and Von Neumann elements (more Von Neumann though).

如果查看L1高速缓存,您会发现在AMD,ARM和Intel系统中,您具有指令L1高速缓存和数据L1高速缓存,它们可以独立和并行访问.那是哈佛部分.但是,在L2,L3或DRAM中,数据和代码混合在一起.那是冯·诺伊曼部分.

If you look at the L1 caches you would see that in AMD, ARM and Intel systems you have Instruction L1 Cache and Data L1 Cache, that can be accessed independently and in parallel. That's the Harvard part. However, in L2, L3 or in DRAM, data and codes are mixed. That's the Von Neumann part.

那么为什么PC不采用纯哈佛结构呢?我的看法是,这没有道理.如果您对大多数应用程序进行了概要分析,您会发现 L1指令缓存未命中率非常小.这意味着通常代码大小不是问题.因此,为代码设计完全独立的路径没有任何意义.数据可能会变得非常大,但是代码却无法真正实现.

So why isn't a pure Harvard architecture adopted for PC's? My opinion is that it does not make sense. If you profile main majority of applications, you would see that the L1 Instruction Cache miss ratio is very small. This means that generally code size is not a problem. So it wouldn't make sense to design a fully separate path for code. Data can grow very large but code can't really.

在DSP中,使用单独的代码和数据路径是有意义的.那是因为DSP的工作主要是在流数据"上,这意味着对缓存的需求很小. DSP代码也可以包含预计算系数,这些系数会增加代码大小.因此,数据大小和代码大小之间是平衡的,这意味着使用哈佛体系结构是有意义的.

In DSP's it makes sense to use separate code and data paths. That's because DSP's work mainly on "streaming data" meaning that the need for caching is rather small. Also the DSP codes can contain pre-computed coefficients that increase the code size. So there is a balance between data size and code size, meaning that it makes sense using a Harvard architecture.

这篇关于冯·诺依曼vs哈佛建筑的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆