0
\$\begingroup\$

Register file ports are a means to get data in and out of registers in a CPU. The concept of having multiple ports is not too clear to me.

QUESTION

Assuming you have 2 read ports, does it mean different stages of a CPU pipeline can simultaneously read from the register file (same / different registers)?

\$\endgroup\$
2
  • \$\begingroup\$ Back way up. If you only have one port, you can only write or read one register at a time. Think about the sequence of events then needed to execute a typical instruction... \$\endgroup\$ Nov 29 '19 at 13:36
  • 2
    \$\begingroup\$ Just to add to the confusion, having two read ports doesn't only have one good reason. For example, a CPU without pipelining might read from two registers at the same time, perform any one of several classes of ALU operations, and perform a register write also in the same cycle. So here, there are two read ports and one write port to the register file. But there is no pipeline. In cases where there is a pipeline, there may be other reasons for wanting two read ports. And they would be different reasons. Not the same. So there isn't one answer to your question. \$\endgroup\$
    – jonk
    Nov 30 '19 at 4:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.