6.375 Tutorial 5 RISC-V 6-Stage with Caches Ming Liu

Slides:



Advertisements
Similar presentations
Pipeline Computer Organization II 1 Hazards Situations that prevent starting the next instruction in the next cycle Structural hazards – A required resource.
Advertisements

Constructive Computer Architecture Tutorial 4: SMIPS on FPGA Andy Wright 6.S195 TA October 7, 2013http://csg.csail.mit.edu/6.s195T04-1.
Maria-Cristina Marinescu Martin Rinard Laboratory for Computer Science Massachusetts Institute of Technology A Synthesis Algorithm for Modular Design of.
Superscalar SMIPS Processor Andy Wright Leslie Maldonado.
Realistic Memories and Caches Li-Shiuan Peh Computer Science & Artificial Intelligence Lab. Massachusetts Institute of Technology March 21, 2012L13-1
Lecture 9. MIPS Processor Design – Instruction Fetch Prof. Taeweon Suh Computer Science Education Korea University 2010 R&E Computer System Education &
Implementing RISC Multi Core Processor Using HLS Language – BLUESPEC Final Presentation Liam Wigdor Advisor Mony Orbach Shirel Josef Semesterial Winter.
Infrastructure design & implementation of MIPS processors for students lab based on Bluespec HDL Students: Danny Hofshi, Shai Shachrur Supervisor: Mony.
Constructive Computer Architecture Tutorial 2 Advanced BSV Sizhuo Zhang TA Oct 9, 2015T02-1http://csg.csail.mit.edu/6.175.
Constructive Computer Architecture Tutorial 8 Final Project Part 2: Coherence Sizhuo Zhang TA Nov 25, 2015T08-1http://csg.csail.mit.edu/6.175.
Constructive Computer Architecture Tutorial 4 Debugging Sizhuo Zhang TA Oct 23, 2015T04-1http://csg.csail.mit.edu/6.175.
Elastic Pipelines: Concurrency Issues Arvind Computer Science & Artificial Intelligence Lab Massachusetts Institute of Technology February 28, 2011L08-1http://csg.csail.mit.edu/6.375.
Performed By: Yahel Ben-Avraham and Yaron Rimmer Instructor: Mony Orbach Semesterial (possibly bi-semesterial) Winter /12/2012.
Computer Architecture: A Constructive Approach Next Address Prediction – Six Stage Pipeline Joel Emer Computer Science & Artificial Intelligence Lab. Massachusetts.
Out-of-Order OpenRISC 2 semesters project Semester B: OR1200 ISA Extension Final B Presentation By: Vova Menis-Lurie Sonia Gershkovich Advisor: Mony Orbach.
Constructive Computer Architecture Tutorial 4: Running and Debugging SMIPS Andy Wright TA October 10, 2014http://csg.csail.mit.edu/6.175T04-1.
Constructive Computer Architecture: Control Hazards Arvind Computer Science & Artificial Intelligence Lab. Massachusetts Institute of Technology October.
1 Tutorial: Lab 4 Again Nirav Dave Computer Science & Artificial Intelligence Lab Massachusetts Institute of Technology.
Modular Refinement Arvind Computer Science & Artificial Intelligence Lab Massachusetts Institute of Technology March 8,
October 22, 2009http://csg.csail.mit.edu/korea Modular Refinement Arvind Computer Science & Artificial Intelligence Lab Massachusetts Institute of Technology.
Realistic Memories and Caches – Part III Li-Shiuan Peh Computer Science & Artificial Intelligence Lab. Massachusetts Institute of Technology April 4, 2012L15-1.
Constructive Computer Architecture Tutorial 6: Five Details of SMIPS Implementations Andy Wright 6.S195 TA October 7, 2013http://csg.csail.mit.edu/6.s195T05-1.
Computer Architecture: A Constructive Approach Multi-Cycle and 2 Stage Pipelined SMIPS Implementations Teacher: Yoav Etsion Taken (with permission) from.
6.375 Tutorial 4 RISC-V and Final Projects Ming Liu March 4, 2016http://csg.csail.mit.edu/6.375T04-1.
6.375 Tutorial 3 Scheduling, Sce-Mi & FPGA Tools Ming Liu
October 20, 2009L14-1http://csg.csail.mit.edu/korea Concurrency and Modularity Issues in Processor pipelines Arvind Computer Science & Artificial Intelligence.
IMPLEMENTING RISC MULTI CORE PROCESSOR USING HLS LANGUAGE - BLUESPEC LIAM WIGDOR INSTRUCTOR MONY ORBACH SHIREL JOSEF Winter 2013 One Semester Mid-term.
Elastic Pipelines: Concurrency Issues
Chapter Six.
Constructive Computer Architecture Tutorial 6 Cache & Exception
6.175: Constructive Computer Architecture Tutorial 5 Epochs, Debugging, and Caches Quan Nguyen (Troubled by the two biggest problems in computer science…
Design-Space Exploration
Control Hazards Constructive Computer Architecture: Arvind
Bluespec-6: Modeling Processors
Constructive Computer Architecture Tutorial 6: Discussion for lab6
Pipeline Implementation (4.6)
CDA 3101 Spring 2016 Introduction to Computer Organization
Multistage Pipelined Processors and modular refinement
in Pipelined Processors
Chapter 4 The Processor Part 3
Performance Specifications
Constructive Computer Architecture: Lab Comments & RISCV
Constructive Computer Architecture Tutorial 7 Final Project Overview
Modular Refinement Arvind
Modular Refinement Arvind
Constructive Computer Architecture Tutorial 5 Epoch & Branch Predictor
Lab 4 Overview: 6-stage SMIPS Pipeline
Non-Pipelined and Pipelined Processors
in Pipelined Processors
Constructive Computer Architecture Tutorial 3 RISC-V Processor
Branch Prediction Constructive Computer Architecture: Arvind
Bypassing Computer Architecture: A Constructive Approach Joel Emer
Multistage Pipelined Processors and modular refinement
Modular Refinement Arvind
Realistic Memories and Caches
Chapter Six.
Chapter Six.
Modular Refinement - 2 Arvind
Multistage Pipelined Processors and modular refinement
in Pipelined Processors
November 5 No exam results today. 9 Classes to go!
Control Hazards Constructive Computer Architecture: Arvind
Tutorial 4: RISCV modules Constructive Computer Architecture
Modeling Processors Arvind
Prof. Sirer CS 316 Cornell University
Modular Refinement Arvind
Modular Refinement Arvind
Tutorial 7: SMIPS Labs and Epochs Constructive Computer Architecture
Introduction to Verilog – Part-2 Procedural Statements
Presentation transcript:

6.375 Tutorial 5 RISC-V 6-Stage with Caches Ming Liu March 4, 2016 http://csg.csail.mit.edu/6.375

Overview Interface as parameters 6 Stage Pipeline Caches March 4, 2016 http://csg.csail.mit.edu/6.375

Notes In Lab 6, you should use the Fifo::*; library defined in includes/ Do NOT use the BSV library FIFO::*; Code shown in lecture is meant to be a guideline Make sure you understand it because the code you write in the lab may be similar but not identical March 4, 2016 http://csg.csail.mit.edu/6.375

Interfaces as Module Parameters Entire interfaces/subinterfaces (not just static types) can be passed as a parameter into a module module mkTb(); Integer init = 0; IMemory iMem <- mkIMemory; Proc#(2) p <- mkProc(iMem, init); endmodule Last parameter is always interface of module being defined module mkProc(IMemory mem, Integer init, Proc#(ncores) ifc); rule doFetch; mem.req(addr); .. endrule method ... //define Proc interface endmethod endmodule “ifc” is optional when no other parameters Not to be confused with interface parameters (polymorphic interfaces) e.g. ncores in this example module mkProc(Proc); endmodule March 4, 2016 http://csg.csail.mit.edu/6.375

Interfaces as Module Parameters Passing interfaces to a module breaks synthesis boundary (*synthesize*) Compiler currently cannot create a separate Verilog file for this module due to scheduling difficulties Beware that all the scheduling/rule legality checks are still in place. Even across modules module mkTb(); IMemory iMem <- mkIMemory; Proc p0 <- mkProc(iMem); Proc p1 <- mkProc(iMem); endmodule If both p0 and p1 contain rules that calls iMem.req, then they may conflict. March 4, 2016 http://csg.csail.mit.edu/6.375

Six Stage Pipeline Use the 2-stage pipeline as a starting point. Subdivide the rules and create Fifos (elastic pipeline) between stages. Not necessary to try and modularize the stages RegFile Epoch F D R E M W IMem DMem Scoreboard March 4, 2016 http://csg.csail.mit.edu/6.375

Six Stage Pipeline At Execute stage, we filter out instructions with mismatched epochs (caused by a prior branch insn) However we can’t just “kill” or toss out the instruction as we did in the 2 stage. Why? RegFetch stage has changed state of our processor  Scoreboard insert! Solution: Mark instruction as “poisoned” and pass it on (but do not process it). Remove from SB in Writeback stage Epoch RegFile F D R E M W IMem DMem Scoreboard March 4, 2016 http://csg.csail.mit.edu/6.375

Other Notes Play with the type/size of RegFile and Scoreboard to see its effect on performance Look at info_dut/mkProc.sched to see if the schedule is what you expect Pay attention to scheduling warnings related to your processor March 4, 2016 http://csg.csail.mit.edu/6.375

Part B: FPGA Infrastructure Start PC SW testbench mkProc Runs large benchmarks SW-mkProc Interface Start PC mtohost Init DRAM Avoid re-programming FPGA Reset FPGA after each test mtohost Init DRAM 1GB DRAM Nov 6, 2015 http://csg.csail.mit.edu/6.175

Simulation DRAM We also simulate DRAM initialization RegFile + pipelined delay of resp We also simulate DRAM initialization Longer simulation time Reg file ... Nov 6, 2015 http://csg.csail.mit.edu/6.175

Memory Interface To proc pipeline stages ICache DCache Splitter WideMemWrapper Scemi/Tb InitDDR3 DDR3 Mem Controller 1GB DRAM March 4, 2016 http://csg.csail.mit.edu/6.375

Implementing Cache MemUtil.bsv and CacheTypes.bsv has a lot of useful utilities functions and constants you should use Port code from DDR3Example.bsv to your 6-stage pipeline Only very minor changes to the pipeline itself is needed Guard all your rules in processor with (csrf.started) Proc should execute only when the host tells it to start March 4, 2016 http://csg.csail.mit.edu/6.375