0
\$\begingroup\$

I have seen CPUs conforming to Harvard architecture with dedicated ports for program memory and data memory. I have also seen that instruction and data caches (read-through caches) are connected to these ports.

Is it possible for a CPU to have only one port [like a Von-Neumann machine] and two dedicated caches [Instr-L1 and Data-L1] connected to the single port? If the caches were of look-aside type, I am thinking this could be possible. If there was a LLC, how would this then be connected to the Instr-L1 and Data-L1?

\$\endgroup\$
  • 1
    \$\begingroup\$ This is roughly what ARM architecture looks like: separate Icache and Dcache, but a single externally accessible memory bus. \$\endgroup\$ – pjc50 Sep 23 '15 at 10:11
0
\$\begingroup\$

Accessing separate instruction and data caches through a single physical interface is possible and might even have made sense back when caches were off-chip and used commodity SRAM chips. Given pad/pin count limits and use of commodity SRAMs, direct-mapped caches were common, adding one bit to the address to select instruction or data cache would allow a single wide interface (at twice the speed) to provide the improved hit rate of separate caches (under direct mapping).

This could be viewed as access-type-based perfect way prediction in a two-way set associative cache.

For caches on the same chip, using separate interfaces avoids the need for handling contention. (Besides doubling the interface speed and alternating between instruction and data accesses, contention could be reduced by using a wider interface fetching two or more sequential instructions per access. Since typically less than half of all instructions access data in memory and taken branches (which could be the first of two fetched instructions and jump to the second of two instructions) are less than a fifth of instructions, this need not degrade performance too much.)

Separate interfaces allows latency to be optimized by locating data storage closer to the ALUs and instruction storage closer to the instruction decoding logic. (You might find Dyer Rolán et al.'s "Virtually Split Cache: An Efficient Mechanism to Distribute Instructions and Data" (PDF) of interest.)

Typically an L2 cache uses a single interface. The arbitration overhead is less significant because L2 latency is already substantial and L1 misses are not the common case.

\$\endgroup\$

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.