寄存器和RAM

本文详细对比了从RAM读取数据与从寄存器读取数据的过程,介绍了静态存储单元(SRAM)和动态存储单元(DRAM)的工作原理及特点。SRAM基于触发器原理,具有速度快、使用简单等优点,但元件数多、集成度较低;DRAM则通过MOS管栅极电容存储电荷,虽然需要定期刷新,但集成度高、功耗低。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

There's also a lot more complexity involved just in figuring out what hardware to talk to with RAM because there's so much more of it. Reading from a register looks like:

  1. Extract the relevant bits from the instruction.
  2. Put those bits onto the register file's read lines.
  3. Read the result.

Reading from RAM looks like:

  1. Get the pointer to the data being loaded. (Said pointer is probably in a register. This already encompasses all of the work done above!)
  2. Send that pointer off to the MMU.
  3. The MMU translates the virtual address in the pointer to a physical address.
  4. Send the physical address to the memory controller.
  5. Memory controller figures out what bank of RAM the data is in and asks the RAM.
  6. The RAM figures out particular chunk the data is in, and asks that chunk.
  7. Step 6 may repeat a couple of more times before narrowing it down to a single array of cells.
  8. Load the data from the array.
  9. Send it back to the memory controller.
  10. Send it back to the CPU.
  11. Use it!

寄存器:触发器原理移植

RAM:

静态存储单元(SRAM)
●存储原理:由 触发器存储数据
●单元结构:六管NMOS或OS构成
●优点:速度快、使用简单、不需刷新、静态功耗极低;常用作Cache
●缺点: 元件数多、集成度低、运行功耗大
●常用的SRAM集成芯片:6116(2K×8位), 6264(8K×8位), 62256(32K×8位),2114(1K×4位)
动态存储单元(DRAM)
●存贮原理:利用MOS管栅极电容可以存储 电荷的原理,需刷新(早期:三管基本单元;之后:单管基本单元)
●刷新(再生):为及时补充漏掉的 电荷以避免存储的信息丢失,必须定时给栅极电容补充电荷的操作
●刷新时间:定期进行刷新操作的时间。该时间必须小于栅极电容自然保持信息的时间(小于2 ms)。
●优点: 集成度远高于SRAM、功耗低,价格也低
●缺点:因需刷新而使外围电路复杂;刷新也使存取速度较SRAM慢,所以在计算机中,DRAM常用于作 主存储器
尽管如此,由于DRAM 存储单元的结构简单,所用元件少,集成度高,功耗低,所以已成为大容量RAM的主流产品。

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值