Presentation on theme: "VLIW-DLX Simulator Milos Becvar and Stanislav Kahanek Faculty of Electrical Engineering Czech Technical University in Prague."— Presentation transcript:
VLIW-DLX Simulator Milos Becvar and Stanislav Kahanek Faculty of Electrical Engineering Czech Technical University in Prague
Presentation Outline Undergraduate Comp. Arch. Course Experience with WinDLX VLIW-DLX Simulation Model VLIW-DLX Simulator Features Example of Program Planned use in comp. arch. Course Future work
X36APS Course Content Undergraduate course intended for CS/CE students, follow- up to digital design and basic computer organization course. 90 minutes lecture + 90 minutes lab/seminar per week students per semester. Introduction, computer performance – 1 lecture ISA – 2 lectures Pipelining of RISC – 2 lectures Memory subsystem – 2 lectures Intro. to ILP - Superscalar, VLIWs – 2 lectures Data parallelism – vector computers – 1 lecture Multiprocessors, coherency on SMP – 2 lectures
X36APS Seminars and Labs Goal is to complement lectures with additional experience with presented topics: 1.Using visualization simulators (WinDLX, HDLDLX, SMPCache) 2.Running benchmarks and evaluating various trade-offs (SPEC benchmarks, Dinero) 3.“Table and chalk” seminars about topics where simulators are not available (cache design, vector computers) Visualization simulators prove to be the most efficient way for student interaction with the topics.
Good Experience with WinDLX
WinDLX in X36APS Course Used to demonstrate correspondence between C source code and assembly program in DLX ISA, importance of GCC optimization (1 week in class) Used to demonstrate loop unrolling to improve speed of execution on DLX (1 week in class) Matrix multiplication program (3 weeks homework)
Matrix Multiplication Program Write a program for the DLX processor that will compute a product of two square matrices of dimension N. Optimize this program for the given processor parameters so as to achieve as low execution time as possible. Result Rating (for N=10) Clock CyclesPoints > <68006 Competition to achieve best result limits cheating. For achieving full number of points, students have to employ unrolling of the right loop and schedule instructions to eliminate stalls. Register constrains are necessary to prohibit a brutal-force approach to a solution. (e.g. completely eliminating inner loop by unrolling it 10 times)
VLIW-DLX Goals A tool similar to WinDLX to illustrate basics of VLIWs. Show relationship between VLIWs and scalar pipelines Show relationship between software elimination of hazards by inserting NOPs into code and hardware solution by pipeline interlocks and stalls. Show that speedup achievable by extending pipeline width is limited and show sources of these limitations. Demonstrate software pipelining algorithm efficiency for VLIW and superscalar processors
Requirements for VLIW-DLX Simulator Similar ISA to DLX Similar GUI/features to WinDLX GUI Visualization of pipeline similar to WinDLX Must run in both Win/Linux environment (hence it is in Java)
VLIW-DLX Features Currently no forwarding, all data transfers through a unified register file (Int. and FP registers). RAW and WAW hazards possible. Multiple write conflicts possible (later operation wins) Single branch allowed per VLIW instruction in pipeline slot 1 VLIW instruction following branch in the delay slot is always executed (branch is executed in the ID stage) Number and type of pipeline slots can be easily modified in simulator code. Operations are all DLX instructions except double precision FP instructions and division, new operations can be added easily.
VLIW-DLX Instructions Simple HW oriented representation of VLIW instructions Position in instruction corresponds to pipeline slot, operation type allowed is checked by compiler Explicit nops must be included in unused instruction slots (bundle concept or instruction compression is not used) Exchange of values between two registers is possible in a single VLIW instruction without intermediate storage register. r2 r1 add r1,r2,r0 add r2,r1,r0 nop nop nop ;; nop nop nop nop nop;; Full 5-slot NOP
XPK on WinDLX Same latency as VLIW-DLX, no forwarding, 2 multicycle FP adders used to simulate a single pipelined FP adder Trivial 2x unrolled 4x unrolled Software Pipelined Instruction Count Cycles RAW stalls Control stalls Structural stalls IPC 0,550,690,88 CPI 1,831,441,131,14
VLIW-DLX in X36APS Course Students will be introduced to VLIW-DLX within a single seminar They will try to implement a simple loop (similar to XPK) to learn how to use the tool and software pipelining They will be assigned a slightly more complex homework (SAXPY loop, matrix mult. kernel)
Summary and Future Work VLIW-DLX is a simple tool for introduction of VLIWs to undergraduate students It can be easily integrated into course based on DLX and also MIPS processors Similar tool is planned to replace aging WinDLX simulator. It will support also vector instructions. Our goal is to introduce all these concepts to undergraduate students within a common ISA framework