Search code examples
operating-systemhardwarecpu-architecturey86

Why is writing considered an input operation and reading considered an output operation?


I'm currently working my way through Computer Systems: A Programmer's Perspective 3, and in chapter 4 they consistently refer to read operations in the Y86 processor as being output from various CPU components and I don't understand why. Surely we would want to input data from memory into hardware component?

Here's a quote from the text alongside an accompanying diagram:

The Register file has four ports. It supports up to two simultaneous reads (on ports A and B) and two simultaneous writes (on ports E and M). Each port has both an address connection and a data connection, where the address connection is a register ID, and the data connection is a set of 64 wires serving as either an output word (for a read port) or an input word (for a write port) of the register file.

enter image description here

This correspondence has been consistent through the text


Solution

  • It's just a matter of perspective:

    A read port: a port from which you can read: i.e. data will flow from the register file to the reading entity, thus from the perspective of the register file implementation the data connection is an output wire.