寄存器和RAM

来源:互联网 发布:flyme清除数据照片音乐 编辑:程序博客网 时间:2024/06/07 14:13

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管栅极电容可以存储电荷的原理,需刷新(早期:三管基本单元;之后:单管基本单元)
●刷新(再生):为及时补充漏掉的电荷以避免存储的信息丢失,必须定时给栅极电容补充电荷的操作
●刷新时间:定期进行刷新操作的时间。该时间必须小于栅极电容自然保持信息的时间(小于2ms)。
●优点: 集成度远高于SRAM、功耗低,价格也低
●缺点:因需刷新而使外围电路复杂;刷新也使存取速度较SRAM慢,所以在计算机中,DRAM常用于作主存储器。
尽管如此,由于DRAM存储单元的结构简单,所用元件少,集成度高,功耗低,所以已成为大容量RAM的主流产品。

 

 

 

原创粉丝点击