简体   繁体   English

如果我在冯诺依曼架构中有 MDR,那么 CIR 的目的是什么?

[英]What is the purpose of the CIR if I have the MDR in Von Neumann Architecture?

From the fetch decode execute cycle of the Von Neumann Architecture, at a basic level, here is what I understand:从 Von Neumann Architecture 的 fetch decode 执行周期来看,在基本层面上,这是我的理解:

  1. Memory address in PC is copied to MAR. PC 中的内存地址被复制到 MAR。
  2. PC +=1电脑 +=1
  3. The instruction / data in the address of the MAR is stored in the MDR after being fetched from main memory. MAR地址中的指令/数据从主存中取出后存储在MDR中。
  4. Instruction from MDR is copied to CIR来自 MDR 的指令被复制到 CIR
  5. Instruction / data in memory is decoded & executed by the CU .内存中的指令/数据由 CU 解码和执行。
  6. Result from the calculation stored in ACC. ACC 中存储的计算结果。
  7. Repeat重复

Now if the MDR value is copied to the CIR, why are they both necessary.现在,如果 MDR 值被复制到 CIR,为什么它们都是必要的。 I am quite new to systems architecture so I may have gotten the wrong end of the stick, but I've tried my best :)我对系统架构很陌生,所以我可能弄错了一端,但我已经尽力了:)

Think about what happens if the current instruction is a load or store: does anything need to happen after the MDR?想想如果当前指令是加载或存储会发生什么:在 MDR 之后是否需要发生任何事情? If so, how is the CPU going to remember what it's in the middle of doing if it doesn't keep track of that somehow.如果是这样,如果 CPU 不以某种方式跟踪它,它将如何记住它在做什么。

Whether that requires the original instruction bits the whole time or not depends on the design.这是否始终需要原始指令位取决于设计。

A CPU that needs to do a lot of decoding (eg a CISC with a compact variable-length instruction set, like original 8086) may not keep the actual instruction itself around, but instead just some decode results.需要进行大量解码的 CPU(例如,具有紧凑可变长度指令集的 CISC,如原始 8086)可能不会保留实际指令本身,而只会保留一些解码结果。 For example, actual 8086 decoded incrementally, scanning through prefixes one byte at a time until reaching the opcode.例如,实际的 8086 以增量方式解码,一次一个字节地扫描前缀,直到到达操作码。 And modern x86 decodes to uops which it sends down the pipeline;现代 x86 解码为 uops,然后通过管道发送; the original machine-code bytes aren't needed.不需要原始机器代码字节。

But CPUs like MIPS were specifically designed so parts of the instruction word could be used directly as internal control signals.但是像 MIPS 这样的 CPU 是专门设计的,因此指令字的部分可以直接用作内部控制信号。 Still, it's not always necessary to keep the whole instruction around in one piece.尽管如此,并不总是需要将整个指令集中在一块。

It might make more sense to look at CIR as being the input latches of the decoding process that produces the necessary internal control signals, or sequence of microcode depending on the design.将 CIR 视为产生必要的内部控制信号或取决于设计的微码序列的解码过程的输入锁存器可能更有意义。 Having a truly physical CIR separate from that is ok if you don't mind redoing decoding at any step you need to consult it to figure out what step to do next.如果您不介意在任何步骤重做解码,那么将真正的物理 CIR 与此分开是可以的,您需要咨询它以确定下一步要做什么。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM