An improved computer memory subsystem determines the most efficient memory command
to execute. The physical location and any address dependency of each incoming memory
command to a memory controller is ascertained and that information accompanies
the command for categorization into types of command. For each type of memory command,
there exists a command FIFO and associated logic in which a programmable number
of the memory commands are selected for comparison with each other, with the memory
command currently executing, and with the memory command previously chosen for
execution. The memory command having the least memory cycle performance penalty
is selected for execution unless that memory command has an address dependency.
If more than one memory command of that type has the least memory cycle performance
penalty, then the oldest is selected for execution. Memory commands of that type
are selected for execution each subsequent cycle until a valid memory command of
that type is no longer available, or until a predetermined number has been executed,
or until a memory command of another type has higher priority. If an address dependency
exists between memory commands of different types, then memory commands of the
same type of the oldest memory command is executed to avoid deadlock.