Constructive Computer Architecture Tutorial 4: SMIPS on FPGA Andy Wright 6.S195 TA October 7, 2013http://csg.csail.mit.edu/6.s195T04-1.

Slides:



Advertisements
Similar presentations
Field Programmable Gate Array
Advertisements

Xilinx 6.3 Tutorial Integrated Software Environment (ISE) Set up basic environment Select Gates or Modules to Be simulated (Insert Program Code) Run Waveform.
Simulation executable (simv)
Final Presentation Part-A
Intro to Computer Org. Pipelining, Part 2 – Data hazards + Stalls.
Debugging What can debuggers do? Run programs Make the program stops on specified places or on specified conditions Give information about current variables’
University Of Vaasa Telecommunications Engineering Automation Seminar Signal Generator By Tibebu Sime 13 th December 2011.
© 2003 Xilinx, Inc. All Rights Reserved Debugging.
16/13/2015 3:30 AM6/13/2015 3:30 AM6/13/2015 3:30 AMIntroduction to Software Development What is a computer? A computer system contains: Central Processing.
ENGIN112 L38: Programmable Logic December 5, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 38 Programmable Logic.
Configurable System-on-Chip: Xilinx EDK
System-Level Verification –a Comparison of Approach Ray Turner Rapid Systems Prototyping, IEEE International Workshop on.
1-1 Embedded Software Development Tools and Processes Hardware & Software Hardware – Host development system Software – Compilers, simulators etc. Target.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
Constructive Computer Architecture Arvind Computer Science & Artificial Intelligence Lab Massachusetts Institute of Technology 6.S195: L01 – September.
Cisc Complex Instruction Set Computing By Christopher Wong 1.
© Copyright Alvarion Ltd. Hardware Acceleration February 2006.
Superscalar SMIPS Processor Andy Wright Leslie Maldonado.
Spring 2014 SILICON VALLEY UNIVERSITY CONFIDENTIAL 1 Introduction to Embedded Systems Dr. Jerry Shiao, Silicon Valley University.
P51UST: Unix and Software Tools Unix and Software Tools (P51UST) Compilers, Interpreters and Debuggers Ruibin Bai (Room AB326) Division of Computer Science.
Systems Software & Operating systems
Out-of-Order OpenRISC 2 semesters project Semester A: Implementation of OpenRISC on XUPV5 board Midterm Presentation By: Vova Menis-Lurie Sonia Gershkovich.
Content Project Goals. Term A Goals. Quick Overview of Term A Goals. Term B Goals. Gantt Chart. Requests.
Infrastructure design & implementation of MIPS processors for students lab based on Bluespec HDL Students: Danny Hofshi, Shai Shachrur Supervisor: Mony.
IT253: Computer Organization Lecture 4: Instruction Set Architecture Tonga Institute of Higher Education.
Computer Architecture. “The design of a computer system. It sets the standard for all devices that connect to it and all the software that runs on it.
Spring Introduction  Today’s tutorial focuses on introducing you to Xilinx ISE and Modelsim.  These tools are used for Verilog Coding Simulation.
© 2003 Xilinx, Inc. All Rights Reserved For Academic Use Only Xilinx Design Flow FPGA Design Flow Workshop.
Design Verification An Overview. Powerful HDL Verification Solutions for the Industry’s Highest Density Devices  What is driving the FPGA Verification.
집적회로 Spring 2007 Prof. Sang Sik AHN Signal Processing LAB.
J. Christiansen, CERN - EP/MIC
Galen SasakiEE 260 University of Hawaii1 Electronic Design Automation (EDA) EE 260 University of Hawaii.
ECE 449: Computer Design Lab Coordinator: Kris Gaj TAs: Tuesday session: Pawel Chodowiec Thursday session: Nghi Nguyen.
Constructive Computer Architecture Tutorial 3: Debugging SMIPS Andy Wright 6.S195 TA October 4, 2013http://csg.csail.mit.edu/6.s195T03-1.
This material exempt per Department of Commerce license exception TSU Xilinx Tool Flow.
A Tutorial on Introduction to gdb By Sasanka Madiraju Graduate Assistant Center for Computation and Technology.
EE3A1 Computer Hardware and Digital Design
1 Text Reference: Warford. 2 Computer Architecture: The design of those aspects of a computer which are visible to the programmer. Architecture Organization.
Constructive Computer Architecture Tutorial 3 Debugging BSV Andy Wright TA September12, 2014http://csg.csail.mit.edu/6.175T01-1.
Introduction to Experiment 6 Internal FPGA Memories, Pseudo Random Number Generator, Advanced Testbenches ECE 448 Spring 2009.
Infrastructure design & implementation of MIPS processors for students lab based on Bluespec HDL Students: Danny Hofshi, Shai Shachrur Supervisor: Mony.
Computer Engineering 1502 Advanced Digital Design Professor Donald Chiarulli Computer Science Dept Sennott Square
Constructive Computer Architecture Tutorial 4 Debugging Sizhuo Zhang TA Oct 23, 2015T04-1http://csg.csail.mit.edu/6.175.
CSCI-365 Computer Organization Lecture Note: Some slides and/or pictures in the following are adapted from: Computer Organization and Design, Patterson.
Proposal for an Open Source Flash Failure Analysis Platform (FLAP) By Michael Tomer, Cory Shirts, SzeHsiang Harper, Jake Johns
© 2000 Morgan Kaufman Overheads for Computers as Components Host/target design  Use a host system to prepare software for target system: target system.
Computer Organization Instruction Set Architecture (ISA) Instruction Set Architecture (ISA), or simply Architecture, of a computer is the.
Content Project Goals. Workflow Background. System configuration. Working environment. System simulation. System synthesis. Benchmark. Multicore.
Constructive Computer Architecture Tutorial 4: Running and Debugging SMIPS Andy Wright TA October 10, 2014http://csg.csail.mit.edu/6.175T04-1.
Recen progress R93088 李清新. Recent status – about hardware design Finishing the EPXA10 JPEG2000 project. Due to the DPRAM problem can’t be solved by me,
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.
Introduction to Computer Programming using Fortran 77.
6.375 Tutorial 4 RISC-V and Final Projects Ming Liu March 4, 2016http://csg.csail.mit.edu/6.375T04-1.
1 The user’s view  A user is a person employing the computer to do useful work  Examples of useful work include spreadsheets word processing developing.
Introduction to the FPGA and Labs
Winter 2009 Tutorial #6 Arrays Part 2, Structures, Debugger
14 Compilers, Interpreters and Debuggers
Constructive Computer Architecture Tutorial 6: Discussion for lab6
Translators & Facilities of Languages
Agenda Why simulation Simulation and model Instruction Set model
Constructive Computer Architecture: Lab Comments & RISCV
Lab 4 Overview: 6-stage SMIPS Pipeline
Lecture 1.3 Hardware Description Languages (HDLs)
Constructive Computer Architecture Tutorial 3 RISC-V Processor
Bus-Based Computer Systems
Programmable Logic- How do they do that?
THE ECE 554 XILINX DESIGN PROCESS
Chapter 15 Debugging.
THE ECE 554 XILINX DESIGN PROCESS
Chapter 15 Debugging.
Presentation transcript:

Constructive Computer Architecture Tutorial 4: SMIPS on FPGA Andy Wright 6.S195 TA October 7, 2013http://csg.csail.mit.edu/6.s195T04-1

Introduction Field programmable gate arrays (FPGAs) are chips filled with fine grained configurable hardware Can think of it as logic gates that you can connect together They are a prototyping tool in ASIC design flow They are the end-target for many designs Low volume custom hardware They are also very useful for simulation October 7, 2013http://csg.csail.mit.edu/6.s195T04-2 Later labs will use FPGA tools to compile Bluespec code for an FPGA

Bluespec Compiler Xilinx ISE Simulator Xilinx ISE Simulator Xilinx XST Synthesis Xilinx XST Synthesis Bluespec Simulator Cycle Accurate BSV source Verilog RTL VCD outputGates Power Analysis BSV Design Flow October 7, T04-3

mkTestBench Original Test Bench Setup October 7, 2013http://csg.csail.mit.edu/6.s195 mkProc hostToCpu cpuToHost Start Run - This setup isn’t suited to test a design on an FPGA. - None of the output from the test can be seen by the user since all $… commands are ignored during FPGA synthesis T04-4

SceMi Infrastructure October 7, 2013T04-5http://csg.csail.mit.edu/6.s195 mkBridge SceMi mkProc hostToCpu cpuToHost - The SceMi infrastructure sets up a way to access interface methods of a DUT through a common connection to the outside world SceMi Magic specialized SceMi interface to outside world

Sample Scemi Interfaces TCP – for bsim simulations of scemi connection XUPV5 October 7, 2013T04-6http://csg.csail.mit.edu/6.s195 Image of XUPV5 from Xilinx Inc.

Host Computer Scemi using TCP October 7, 2013T04-7http://csg.csail.mit.edu/6.s195 Testbench written in C++ Bluespec DUT simulation in BSIM TCP

XUPV5Host Computer Scemi using XUPV5 October 7, 2013T04-8http://csg.csail.mit.edu/6.s195 Testbench written in C++ Bluespec DUT on FPGA PCIE Same testbench from the TCP example FPGA

TCP vs XUPV5 TCP + Can see output from $… commands + Don’t have to wait for FPGA compilation - Not testing hardware XUPV5 + Actually running Bluespec code on FPGA - More things can go wrong - Harder to Debug + Faster simulation! October 7, 2013T04-9http://csg.csail.mit.edu/6.s195 Filter: SMIPS: cycles CPU sim: ~10 seconds FPGA: ~25 ms

Debugging on FPGA You can’t see the effects of: $display  Used to give basic debug information from processor in simulation $fwrite  Used to give essential output from the simulation $finish  Used to stop the processor early on error All output seen by the user must pass through the SceMi Interface The current setup only allows for print statements from SMIPS programs and PASSED/FAILED output An improved interface could give more feedback October 7, 2013T04-10http://csg.csail.mit.edu/6.s195

Old Processor Interface interface Proc; method ActionValue#(...) cpuToHost; method Action hostToCpu(Addr startpc); endinterface October 7, 2013T04-11http://csg.csail.mit.edu/6.s195

Old C++ Test Bench Look at Run.cpp Look at function that prints to stderr from cpuToHost October 7, 2013T04-12http://csg.csail.mit.edu/6.s195

Interface Improvements GDB Inspired More program flow control:  start, step, stop  read PC, write PC Read processor state:  Read registers, read memory Read profiling stats  cycle count, instruction count October 7, 2013T04-13http://csg.csail.mit.edu/6.s195

Debug Processor Interface interface ProcDebug; method ActionValue#(...) cpuToHost; method Action start(Bool ignore); method Action step(Data steps); method Action stop(Bool ignore); method Addr read_pc; method Action write_pc(Addr d); method Action req_read_rfile(Bit#(5) r); method ActionValue#(Data) resp_read_rfile(); method ActionValue#(Data) read_mem32(Addr addr); method Addr read_cycle; method Addr read_inst; endinterface October 7, 2013T04-14http://csg.csail.mit.edu/6.s195

New 1cyc.bsv Look at 1cyc.bsv Also includes modified coprocessor October 7, 2013T04-15http://csg.csail.mit.edu/6.s195

New SceMiLayer.bsv Look at SceMiLayer.bsv October 7, 2013T04-16http://csg.csail.mit.edu/6.s195

New C++ Test Bench Look at Run-debug.cpp Look at the new functions included for debugging October 7, 2013T04-17http://csg.csail.mit.edu/6.s195

Output from C++ Test Bench Look at output.txt October 7, 2013T04-18http://csg.csail.mit.edu/6.s195

SMIPS Debugger Program Give user interactive control over processor on FPGA User can type start, step, stop, and other similar commands They can also choose to get the entire processor state when the processor is stopped This is still a work in progress October 7, 2013T04-19http://csg.csail.mit.edu/6.s195

Adding breakpoints to SMIPS The user needs to be able to specify a PC to stop at New interface method to write breakpoint to processor The processor needs to be able to store breakpoints The processor needs a breakpoint register The processor needs to stop when that PC has been reached Coprocessor needs to monitor PC and change processor state accordingly October 7, 2013T04-20http://csg.csail.mit.edu/6.s195

SceMi simulation bugs? Look at bugs.txt Cycle count and instruction count don’t match for print and filter when running 1cyc.bsv This is not a bug, the coprocessor fifo is getting filled because the C++ test bench is slower at dequeuing from the fifo than the BSV test bench. The filled coprocessor fifo is forcing the processor to stall. October 7, 2013T04-21http://csg.csail.mit.edu/6.s195

Conclusion FPGA simulation is harder, but SceMi’s interfaces make it easier. The TCP SceMi interface allows for testing software written for FPGA simulation without using the FPGA. More advanced debugging techniques can be used by adding to the processor interface. October 7, 2013T04-22http://csg.csail.mit.edu/6.s195