r/ComputerEngineering • u/EngrToday Performance Architect • Jan 02 '20
[Hardware] Computer Architecture Highlights: Week 16
Hi all! I'm an architecture Ph.D. student, and I wanted to start posting a brief summary of an influential research paper (either old or new) every week! Here's a well-cited paper from the mid-'90s on trace caches
Title: Trace Cache: a Low Latency Approach to High Bandwidth Instruction Fetching
Conference: MICRO 1996
Paper Link: Link
Background: When you change one part of a processor's architecture, it may put pressure on another part. This was seen in the mid-'90s with the increase in superscalar issue width. If we increase the number of instructions we can issue each cycle, we need a higher instruction fetch bandwidth. Increasing branch prediction and instruction cache hit-rate were already well studied at the time of this paper. However, there were emerging factors to consider when trying to improve this fetch bandwidth.
If we can only predict one conditional branch per cycle, we are limited to growing our window of instructions by a single basic block each cycle. The layout of our program in memory also does not reflect the ordering of instructions executed at runtime. Branches and jumps lead to us executing a non-contiguous sequence of instructions. As a result, we must be able to access these instructions in parallel to support our issue width.
Solution: We can add another structure called a trace cache to support the normal instruction cache! The trace cache stores dynamic instruction sequences rather than just the static instruction ordering from the compiled program (as done by the normal instruction cache). This helps a number of ways. First, we can avoid having a multi-ported instruction cache because we are storing the dynamic trace of instructions on a single line, this also means we don't need to worry about aligning instructions after fetching like we would if they came from different cache lines. Furthermore, unlike previously proposed techniques, it does not need to generate pointers to these non-contiguous instructions before fetching them, because they are already stored in the trace cache!
Major Impact: Trace caches are a fairly clever idea for helping feed wide-issue superscalar processors. The authors did a good job of exploring the design space, showing the benefit of the trace cache over the different state of the art designs at the time, and showing an average 28% increase in performance over traditional sequential prefetching. Furthermore, trace caches have existed in a number of real processors over the years! If you look at the Wikipedia page, you can see that Intel has had forms of the trace cache in both Pentium 4 and Sandy Bridge CPUs (as a micro-operation cache).
That's all for this week! Check out the paper linked above for more details on the design space for trace caches, and the more subtle implementation details, and have a happy new year!
--Nick
Last Week's: Link
My YouTube: Link
My GitHub: Link
4
u/[deleted] Jan 03 '20
General question: Do you use a tool such as Zotero/Mendeley to organize your weekly reading? I was hoping to cultivate the habit of reading CompArch research on a regular basis.