



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




The topics described in the midterm description—VLIW, EPIC, Out-of-Order Fetch, and Out-of-Order Commit will be presented in the following sections. Section 1 will cover VLIW and EPIC, section 2 will cover Out-of-Order Fetch, and section 3 will cover Out-of-Order Commit.
1 VLIW and EPIC
VLIW, EPIC, and Itanium architectures will be described in sections 1.1 and 1.2. This will be followed by a comparison of VLIW/EPIC vs. SuperScalar in section 1.3.
Very Long Instruction Word, VLIW is an architectural design, invented by Joseph Fisher, that encodes more than one operation in a single instruction format. The number of operations encoded in the instruction generally matches the number of functional units in the hardware. The purpose of this is to execute, in parallel, multiple independent operations and thereby achieve higher throughput than would otherwise be possible.
In his paper [1], Fisher points out that conventional parallel machines achieve at most a “2 to 3 speedup” from the available dynamic parallelism in a basic block. Previous attempts at parallel machines had limited success due to the difficulty of scheduling program instructions. Fisher has developed a solution to this with a technique he calls “trace scheduling”. The trace scheduler is in fact a compiler that unrolls loops, speculates on branches, schedules instructions, and performs other related tasks in order to generate a stream of VLIW code words for the hardware to execute. Insofar as the compiler schedules the execution units in a VLIW architecture, this reduces the amount of on-chip hardware and simplifies the design. The initial implementation of VLIW using trace scheduling was in the TRACE computer produced by Multiflow Computer founded by Fisher [1].
One of the often mentioned limitations about VLIW machines is that during sections of code which have little or no parallel potential many of the operation slots in the VLIW code word are NOPs, and as a result contribute to “code bloat”. Multiflow solved this by using a mask field in the code word which indicates how many instructions are in the code word. Another
limitation is that since the “microarchitecture is exposed to the compiler”, any change to the underlying hardware renders pre- existing software unusable without recompilation. The problem is that explicit cycle time latencies of execution units are used by the compiler to schedule instructions with respect to producer/consumer operands. This problem was addressed in a paper by Rau [3] in which he analyzes the program execution semantics of VLIW and proposes a design called “split-issue”. The author argues that an implied copy operation (Phase2) exists if VLIW program flow is viewed from a scalar pipeline perspective. This is where two independent instructions in a VLIW code word appear to write the same register when in fact they are writing an “anonymous” temporary register. In order to solve the problem of execution unit latencies and accommodate this “Phase2” copy, the author proposes creating a second instruction queue for the implied Phase2 operation. The instruction latency problem is then dealt with via Tomasulo type dynamic scheduling logic involving reservation stations and a special “copyback unit”. With these additions, the author believes that a VLIW architecture could change without invalidating precompiled code since the execution latencies are dealt with dynamically.
1.2 EPIC/Itanium
Explicitly Parallel Instruction Computing, EPIC, is an extension of VLIW with the Intel Itanium processor being the primary implementation of the architecture. The Itanium processor was developed as a joint venture between HP and Intel.
An Itanium code word is 128 bits wide and contains three 41-bit instructions plus a 5-bit template field. It therefore qualifies as a three-instruction-wide VLIW. The Itanium processor can also fetch two code words per cycle and from that issue up to six instructions per cycle; thus it qualifies as a superscalar. In this respect the Itanium is a hybrid of VLIW and superscalar architectures. The Itanium contains even more hybrid features, in particular control and data speculation, predication, a register stack, branch hints, cache hints, and register rotation for loops. These features work in conjunction with the compiler to provide performance that would otherwise not be possible.
Control Speculation – instructions that are control dependent, such as an if() statement, can be moved before the if() and
speculatively executed. When the test for the if() is then later evaluated, the instructions that were speculatively incorrectly executed are then cleaned up via “compensation code” inserted by the compiler. The advantage of this is to eliminate the latency of a load by executing the load earlier.
Data Speculation – executing a load that comes after a store, before the store is executed. As with control speculation, the purpose of this is to reduce or eliminate the latency of the load. If it is later found that the target of the load aliases with the store, then compensation code, inserted by the compiler, is invoked to clean things up.
Predication – converting a control dependency to a data dependency. When a conditional branch controls a block of code the condition is converted by the compiler into a bit value where a value of one is true and zero is false. A special register holds these bit values. The branch is then replaced by an internal instruction based on the value of the predicate bit.
Register Stack – in order to reduce the overhead of procedure calls the register space is “renamed” by allocating a “register frame” from the register pool. Upon returning from the procedure call the original register frame is restored. This is controlled by the compiler.
Branch Hints – branch predict instructions, provided by the compiler, allows the hardware to predict in advance, without any hardware based history, the outcome of a branch.
Cache Hints – load and store instructions have a 2-bit field, set by the compiler, to suggest to the hardware where to place data in a cache and subsequently where it may be found. This greatly minimizes cache misses.
Register Rotation – this is a type of “loop pipelining” where multiple iterations of a loop can be executed in parallel, each using their own set of registers. This is an alternative to loop unrolling, and can be used in more situations.
A paper by D. August et al. [10] describes the impact of predication, data speculation, and control speculation in the IMPACT EPIC Architecture, an early version of the architecture being designed for the Itanium. In their paper they show that these three techniques produce a “synergistic relationship” such that the overall improvement in performance is more than the additive performance of each individual technique. In addition they point out the problem of “spurious exceptions” which happen as a result of speculative execution. They propose delaying the handling of spurious exceptions until the state of speculation is verified to avoid the performance loss of servicing spurious recoveries.
1.3 VLIW/EPIC vs. SuperScalar Architecture
The main difference between SuperScalar and VLIW/EPIC architectures is that a VLIW/EPIC compiler has 1) visibility to the underlying hardware resources, and 2) uses this information to statically schedule the hardware at compile time. For early VLIW designs, this meant that less hardware was needed and the design could be simpler. Later EPIC designs (Itanium) incorporate many features from superscalar and new ones unique to the design to compensate for certain inherent deficiencies in the VLIW design, the primary deficiency being backward compatibility, i.e. changes to execution unit latency which would affect the static scheduling by the compiler. Ironically, in fixing the compatibility problem, the ordinary problems of branch mispredictions, data dependencies, and cache misses crept in which did not exist in the pure VLIW design. Solutions to these problems have been resolved via a combination of hardware and software.
Branch mispredictions are resolved using both hardware (speculation bits) and software (recovery code) in EPIC, whereas this is done entirely in hardware with superscalar. Since the predication technique in EPIC involves executing both paths of a branch in parallel until the value of the predicate is determined, it is unclear whether this is an advantage over superscalar.
RAW hazards are resolved in the compiler for EPIC architecture, whereas they are resolved in hardware for superscalar. Advantage EPIC.
Data dependencies dealing with load/store aliasing are solved via the data speculation technique described above for EPIC and via LSQ (load/store queues) in superscalar. Advantage EPIC.
For EPIC, since cache access is managed via the compiler using hints to the hardware, misses are necessarily minimized. Advantage EPIC.
With EPIC architecture, spurious exceptions due to speculation can be a significant problem. It is unclear where superscalar handles this any better.
From a purely technical point of view the advantage appears to lean towards EPIC, however there are non-technical issues that weigh against it. Many potential customers probably already have existing hardware/software. Encouraging them to switch to a radically different hardware platform where commercially available software is not as plentiful may be difficult. For those customers who are primarily concerned with performance (scientific users), an initial investment in software would be required, either in-house developed, contracted, or purchased. Since software development takes time, there is also a time-to- market component to consider. Advantage superscalar for less software expense.
Multiple paths do, however, compete for and place a larger burden on pipeline resources. The key to this design is the confidence predictor which decides when to fork or when to proceed normally in the pipeline. A similar design is called PolyPath [7].
2.4 Skipper
As opposed to the Multipath technique where both paths from a“difficult branches” are speculatively fetched and executed, Skipper [12] “avoids predicting difficult branches by skipping over the computation conditioned [by the] branch” and resumes execution at the “post-reconvergent” point in the program. This technique works primarily with if-then and if-then-else program structures. The authors explain that compilers typically translate an if-then-else structure into the following type of code sequence^1 PC1: branch PC2 // if code section A jump PC PC2: code section B // else … PC3: code section C … where PC1 is the if() block, PC2 is the else() block, and PC3 is the first instruction after the else() block. A direct jump is expected to appear immediately before the target (PC2) of the branch at PC1 whose target is the reconvergent point in the program. Skipper locates the PC3 instruction address by speculatively computing the target of PC1, assuming the instruction immediately before this target is itself a direct jump, and computing the target of this jump instruction to find the reconvergent instruction address.
Along with this is an elaborate renaming scheme which uses speculative source (inputreg set) and destination (outputreg set) tables. When the skipped instruction block is eventually resolved and fetched, additional renaming occurs for that block. Limits are placed on the length of skipped code, and Skipper does not accommodate nested skips. Similar to the multipath design, Skipper uses a confidence predictor to decide whether to skip a difficult branch path. My thoughts on this technique are 1) that it only works for a particular instruction pattern, if-then-else but requires dedicated hardware to do so, and 2) it depends on resolving the difficult branch before too much of the reconvergent path has been executed. This last point is significant because in order to preserve program correctness, the Skipper design reserves a “contiguous gap” in the instruction window for the skipped instructions to be filled in later when the branch direction is resolved. This gap ties up pipeline resources until the original branch is resolved. Also, I would expect due to data dependencies that some number of post-reconvergent instructions are stalled waiting on operands. In spite of all this,
(^1) Figure adapted from “Skipper: A microarchitecture For
Exploiting Control-flow Indepence”, Figure 1.
the results of simulations do show measurable, if not significant, speedups in performance.
2.5 Delayed Fetch
Another design by G.A. Muthler et al. [13] presents a software/hardware design where “non-critical” instructions are delayed from being fetched, thereby allowing “critical” instructions to be fetched and issued earlier than they would otherwise. The “deferred” instructions are then used to fill “fetch holes”, stalls that arise due to cache misses, branch mispredictions, etc. In order to make this work all instructions are rated in terms of “static slack”, which is the number of cycles an instruction can be delayed before having an impact on other instructions, for example with respect to producer/consumer register relationships. Although the authors suggest that a hardware-based system could be used to determine the static slack among the instructions, they use software profiling to do so and encode the static slack information in the annotation field of the machine code being profiled, which is then simulated via SimpleScalar 3.0. The main change to the processor to accommodate the deferred fetch design involves partitioning a trace cache into critical and non-critical sections. Priority is given to critical instructions. When a trace cache miss is incurred for a critical instruction, the fetch is redirected to the instruction cache. When an instruction cache miss is incurred, fetch is redirected to the non-critical partition of the trace cache to fill the hole while the cache miss is being serviced.
2.6 A Dynamic Multithreading Processor
A design described in a paper by Akkary and Driscoll [8] “splits [a] program, at loop and procedure boundaries, into pieces that are executed as different threads” in order to extract more dynamic instruction level parallelism from a program. Since an instruction cache miss by one thread does not prevent other threads from proceeding, fetch is out-of-order. Each thread executes independently, using data speculation to start executing earlier than it would otherwise. A recovery mechanism is implemented to deal with incorrect data speculation. The relationship between threads is maintained in an “ordered tree”, which guarantees the sequential execution semantics of the program. This design provides more ILP than conventional superscalars, since multiple threads have the potential to execute instructions much further beyond what a wide front-end would provide. This design is by far the most complex, and requires more time to fully analyze.
3 Out-of-Order Commit
Whereas the out-of-order fetch research was primarily concerned with minimizing latencies from cache misses or branch mispredictions, the out-of-order commit research that I was able to locate dealt with specific, unrelated problems. The first paper, presents a general purpose design. This is described in section
3.1. The main focus of the second paper is fault tolerance, however part of their solution to this involves out-of-order commit. The third paper uses out-of-order commit as part of a solution to long latency memory operations.
3.1 Deconstructing Commit
The paper by Bell and Lipasti [16] proposes a technique for out- of-order commit, but before doing so analyzes the requirements for committing instructions out-of-order:
In spite of these restrictions, the authors show that many opportunities exist for out-of-order commit that satisfy all of the above requirements. The main problem with out-of-order commit is the holes left in the ROB by retired instructions. Since the ROB ordinarily functions as a “circular FIFO”, the benefit of out-of-order commit is not fully realized unless the vacated ROB positions can be reclaimed and used to dispatch subsequent instructions. Three solutions are proposed—collapsing the ROB to reclaim vacated positions, implementing a free list to reclaim the vacated positions, and leaving the holes in the ROB but reclaiming other resources such as physical registers, LSQ slots, etc.
3.2 Fault Tolerance
The focus of a paper by Soundararajan, et al. [21] is on an aspect of fault tolerance described by the authors as “Architectural Vulnerability Factor”, AVF. Fault tolerant systems seek to minimize transient errors by allowing only a prescribed maximum number of critical bits to reside in the system at any one time. All bits in the system other than those in “unoccupied structural entries, mis-speculated instructions, dynamically dead instructions, etc” are considered critical to the architectural state. Systems that are designed for AVF fault tolerance include mechanisms to dynamically minimize the vulnerability to transient errors by two methods--redundant execution and/or limiting exposure of resident data in structures. This last mechanism is implemented via out-of-order commit. By committing instructions out-of-order, instructions spend less time in the ROB where they are vulnerable to transient errors.
3.3 Kilo-Instruction Processors
A paper by Cristal, et al. [17] suggests using an out-of-order design to improve memory latency. Their goal is to “have thousands of in-flight instructions” which they claim will “hide
[memory] access latency and achieve high performance”. They argue that providing thousands of in-flight instructions would require scaling up the ROB, which would be “impractical due to cycle time limitations”. Their design (which is a little hard to follow) replaces the ROB with a combination of a small pseudoROB and a large “slow lane instruction queue” (SLIQ), and to is added a checkpointing scheme for precise exceptions. Instructions which are determined to require a “very long time to get issued for execution” are moved to the SLIQ, and in so doing get out of the way of instructions that can execute quickly. This reordering of instructions results in out-of-order commit.
4 References
[1] Joseph A. Fisher, "Very Long Instruction Word Architectures nd the ELI-512," Proceedings of the lOth Symposium n Computer Architectures, pp. 140-150, IEEE, June, 1983. [2] Robert P. Colwell , Robert P. Nix , John J. O'Donnell , David B. Papworth , Paul K. Rodman, A VLIW architecture for a trace Scheduling Compiler , IEEE Transactions on Computers , v.37 n.8, p.967-979, August 1988 [3] B. Ramakrishna Rau, Dynamically Scheduled VLIW Processors, Proceedings of the 26th^ annual international symposium on Microarchitecture , Austin, Texas 1993 [4] E. Rotenberg, S. Bennett, and J. E. Smith. Trace Cache: A Low Latency Approach to High Bandwidth Instruction Fetching. In Proceedings of the 29th Annual International Symposium on Microarchitecture , pages 24–34, Paris, France, Dec. 2–4, 1996. [5] S. J. Patel, D. H. Friendly, and Y. N. Patt. Critical Issues Regarding the Trace Cache Fetch Mechanism. Technical Report CSE-TR-335-97, Department of Electrical Engineering and Computer Science, University of Michigan, May 1997. [6] J. Stark, P. Racunas, and Y. N. Patt. Reducing the performance impact of instruction cache misses by writing instructions into the reservation stations out-of-order. In Proceedings of the 30th Annual International Symposium on Microarchitecture , pages 34 – 43, 1997. [7] Artur Klauser , Abhijit Paithankar , Dirk Grunwald, Selective eager execution on the PolyPath architecture, Proceedings of the 25th annual international symposium on Computer architecture , p.250-259, 1998, Barcelona, Spain [8] H. Akkary and M. A. Driscoll. A dynamic multithreading processor. In Proceedings of the 31th Annual International Symposium on Microarchitecture , 1998. [9] Pritpal S. Ahuja, Kevin Skadron, Margaret Martonosi, and Douglas W. Clark. Multipath Execution: Opportunities and Limits. In 12th Intl. Conf. on Supercomputing. ACM, July
[10] David I. August , Daniel A. Connors , Scott A. Mahlke , John W. Sias , Kevin M. Crozier , Ben-Chung Cheng , Patrick R. Eaton , Qudus B. Olaniran , Wen-mei W. Hwu, Integrated predicated and speculative execution in the