Technische universiteit eindhoven Department of Electrical Engineering Electronic Systems Optimizing the mMIPS Sander Stuijk.

Slides:



Advertisements
Similar presentations
Introduction to HT-IDE3000 Micro-C development System Department.
Advertisements

The University of Adelaide, School of Computer Science
ECE 232 L6.Assemb.1 Adapted from Patterson 97 ©UCBCopyright 1998 Morgan Kaufmann Publishers ECE 232 Hardware Organization and Design Lecture 6 MIPS Assembly.
1 Lecture 4: Procedure Calls Today’s topics:  Procedure calls  Large constants  The compilation process Reminder: Assignment 1 is due on Thursday.
Chapter 6 Modular Programming J. H. Wang ( 王正豪 ), Ph. D. Assistant Professor Dept. Computer Science and Information Engineering National Taipei University.
Programming Types of Testing.
- 1 -  P. Marwedel, Univ. Dortmund, Informatik 12, 05/06 Universität Dortmund Hardware/Software Codesign.
Aug. 24, 2007ELEC 5200/6200 Project1 Computer Design Project ELEC 5200/6200-Computer Architecture and Design Fall 2007 Vishwani D. Agrawal James J.Danaher.
CS 536 Spring Code generation I Lecture 20.
MIPS Assembler Programming
Number One Tom Bozic Ian Nuber Greg Ramsey Henry Romero Matt Unangst.
Reconfigurable Computing S. Reda, Brown University Reconfigurable Computing (EN2911X, Fall07) Lecture 08: RC Principles: Software (1/4) Prof. Sherief Reda.
RISC Concepts, MIPS ISA and the Mini–MIPS project
CS 61C L14Introduction to MIPS: Instruction Representation II (1) Garcia, Spring 2004 © UCB Roy Wang inst.eecs.berkeley.edu/~cs61c-tf inst.eecs.berkeley.edu/~cs61c.
Revisions If you received the grade: “R” If you received the grade: “R” You must do a revision to receive a grade for lab 2. You must do a revision to.
Network-on-FPGA Aleksander Ślusarczyk. Network-on-FPGA Network –topologies –routing Data processor –mMIPS –network interface uP Mem IF NI.
ECE Department: University of Massachusetts, Amherst Lab 1: Introduction to NIOS II Hardware Development.
Midterm Thursday Topics: First Midterm Instructions Set Architecture Machine Language Programming Assembly Language Programming Traps, Subroutines, & Interrupts.
Implementation of DSP Algorithm on SoC. Characterization presentation Student : Einat Tevel Supervisor : Isaschar Walter Accompany engineer : Emilia Burlak.
Universität Dortmund  P. Marwedel, Univ. Dortmund, Informatik 12, 2003 Hardware/software partitioning  Functionality to be implemented in software.
Department of Electrical Engineering Electronic Systems Department of Electrical Engineering Electronic Systems Optimization of the mMIPS Sander Stuijk.
CPSC 171 Introduction to Computer Science 3 Levels of Understanding Algorithms More Algorithm Discovery and Design.
CHAPTER 2 ISA Instructions (logical + procedure call)
1 A Simple but Realistic Assembly Language for a Course in Computer Organization Eric Larson Moon Ok Kim Seattle University October 25, 2008.
Computer Organization CS345 David Monismith Based upon notes by Dr. Bill Siever and notes from the Patterson and Hennessy Text.
Quiz 1 Review and Instructions. Review Create a new project file and enter a project date Enter properties about the project file Save the project file.
VHDL Project Specification Naser Mohammadzadeh. Schedule  due date: Tir 18 th 2.
1 Towards Optimal Custom Instruction Processors Wayne Luk Kubilay Atasu, Rob Dimond and Oskar Mencer Department of Computing Imperial College London HOT.
Department of Electrical Engineering Electronic Systems Department of Electrical Engineering Electronic Systems Optimization of the mMIPS Sander Stuijk.
Testing. 2 Overview Testing and debugging are important activities in software development. Techniques and tools are introduced. Material borrowed here.
C++ Programming Language Lecture 2 Problem Analysis and Solution Representation By Ghada Al-Mashaqbeh The Hashemite University Computer Engineering Department.
Static Program Analysis of Embedded Software Ramakrishnan Venkitaraman Graduate Student, Computer Science Advisor: Dr. Gopal Gupta.
Chapter 1 Introduction Chapter 1 Introduction 1 st Semester 2015 CSC 1101 Computer Programming-1.
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Memory: Relocation.
ECE 545 Project 2 Specification. Schedule of Projects (1) Project 1 RTL design for FPGAs (20 points) Due date: Tuesday, November 22, midnight (firm) Checkpoints:
1 ENGI 2420 Structured Programming (Lab Tutorial 7) Memorial University of Newfoundland.
Limits of Instruction-Level Parallelism Presentation by: Robert Duckles CSE 520 Paper being presented: Limits of Instruction-Level Parallelism David W.
Lab 2 Parallel processing using NIOS II processors
Program Design. The design process How do you go about writing a program? –It’s like many other things in life Understand the problem to be solved Develop.
1 CS503: Operating Systems Spring 2014 Part 0: Program Structure Dongyan Xu Department of Computer Science Purdue University.
MIPS Pipeline and Branch Prediction Implementation Shuai Chang.
STL CSSE 250 Susan Reeder. What is the STL? Standard Template Library Standard C++ Library is an extensible framework which contains components for Language.
The Hashemite University Computer Engineering Department
1 ENGI 2420 Structured Programming (Lab Tutorial 7) Memorial University of Newfoundland.
The Development Process Compilation. Compilation - Dr. Craig A. Struble 2 Programming Process Problem Solving Phase We will spend significant time on.
C Programming Chapters 11, . . .
Technische universiteit eindhoven Department of Electrical Engineering Electronic Systems Optimizing the mMIPS Sander Stuijk.
1 Project 5: Leap Years. 222 Leap Years Write a program that reads an integer value from the user representing a year and determines if the year is a.
February 25, 2009 ERCOT Follow up on questions from 2/18 meeting on proposed Expedited Switch rulemaking changes…
LECTURE 3 Translation. PROCESS MEMORY There are four general areas of memory in a process. The text area contains the instructions for the application.
Datapath and control Dr. ir. A.B.J. Kokkeler 1. What is programming ? “Programming is instructing a computer to do something for you with the help of.
Lecture 3 Translation.
MIPS Instruction Set Advantages
Chapter 6 Modular Programming Dr. J.-Y. Pan Dept. Comm. Eng.
Aleksander Ślusarczyk Matthijs Visser Henk Corporaal
Lab Find Live CMPUT 229.
RISC Concepts, MIPS ISA Logic Design Tutorial 8.
Digital Engineering Laboratory
Software Programming J. Holvikivi 2014.
COMP2121: Microprocessors and Interfacing
ECE232: Hardware Organization and Design
Logical and Decision Operations
Founded in Silicon Valley in 1984
ECE 554 Digital Engineering Laboratory Nam Sung Kim (Chunhua Yao –TA)
Digital Engineering Laboratory
Program Assembly.
Programming Assignment Tutorial
SPL – PS1 Introduction to C++.
Topic 2b ISA Support for High-Level Languages
Return-to-libc Attacks
Presentation transcript:

technische universiteit eindhoven Department of Electrical Engineering Electronic Systems Optimizing the mMIPS Sander Stuijk

Electronic Systems 2 Outline  Design flow  Understanding the assembler  Frequently asked questions  How do I recompile the compiler?  How can I abort a simulation?  How can I debug the mMIPS?  Where do I find the maximal frequency of my mMIPS?  Assignment

Electronic Systems 3 Toolflow LCC C Compiler Borland C++ Compiler LCC C Compiler Xilinx ISE Synopsys FPGA Compiler II Synopsys SystemC compiler Application (C source) mMIPS (C++ sources that use SystemC libraries) test implementation sw hw

Electronic Systems 4 Outline  Design flow  Understanding the assembler  Frequently asked questions  How do I recompile the compiler?  How can I abort a simulation?  How can I debug the mMIPS?  Where do I find the maximal frequency of my mMIPS?  Assignment

Electronic Systems 5 From C to assembler int main(void) { int a = 0; if (a == 0) return 0; else return 1; } 0: nop 4: 3c1c0001 lui gp,0x1 8: 279c0000 addiu gp,gp,0 c: 3c1d0002 lui sp,0x2 10: 27bd8000 addiu sp,sp, : 3c1e0002 lui s8,0x2 18: 27de8000 addiu s8,s8, c: 0c jal 0x80 20: nop 24: j 0x24 28: nop... 40: j 0x24 44: nop... 60: j 0x24 64: nop... 80: 27bdfff8 addiu sp,sp,-8 Bootloader End of program Actual program

Electronic Systems 6 The boot loader... 0: nop 4: 3c1c0000 lui gp,0x0 8: 279c24e2 addiu gp,gp,9442 c: 3c1d0000 lui sp,0x0 10: 27bd2800 addiu sp,sp, : 3c1e0000 lui s8,0x0 18: 27de2800 addiu s8,s8, c: 0c jal 0x80 20: nop 24: j 0x : j 0x : j 0x24 The program is terminated by a repeated jump to address 0x24. We can stop the simulation by detecting this jump. Skip first instruction Global pointer Stack pointer Frame pointer Call main function Terminate program

Electronic Systems 7 Outline  Design flow  Understanding the assembler  Frequently asked questions  How do I recompile the compiler?  How can I abort a simulation?  How can I debug the mMIPS?  Where do I find the maximal frequency of my mMIPS?  Assignment

Electronic Systems 8 How do I recompile the LCC compiler? 1.export LCCDIR=/cygdrive/c/ImageProcessing/lcc/lccdir 2.cd $LCCDIR/.. 3.make clean 4.make

Electronic Systems 9 How can I abort a simulation?  Use + to abort a running simulation.  VCD trace stored till point at which simulation is stopped.

Electronic Systems 10 How can I debug the mMIPS?  Create a small test program to check the newly added functionality  Create a VCD trace via a simulation  Compare the VCD trace with the assembler  Start at the beginning of the program  Does it do what you expect?

Electronic Systems 11 Where do I find the maximal frequency of my mMIPS?  You can find the maximal frequency of your design in XilinX ISE  Estimate is given by FPGA II Compiler

Electronic Systems 12 Outline  Design flow  Understanding the assembler  Frequently asked questions  How do I recompile the compiler?  How can I abort a simulation?  How can I debug the mMIPS?  Where do I find the maximal frequency of my mMIPS?  Assignment

Electronic Systems 13 Assignment  Optimize the run-time of an image processing algorithm running on the mMIPS. Allowed  Add special instructions to the mMIPS;  Change design of the mMIPS (e.g. forwarding). Not-allowed  Modification of the image processing algorithm that are not needed to use special instructions (e.g. replace multiply with shifts).

Electronic Systems 14 Testing and implementing the design Test for functional correctness  Run the original mMIPS with the algorithm to produce a reference output.  Compare the results of your mMIPS to the reference output. Implement your design on the FPGA  You must complete the flow till the FPGA. The maximum clock frequency at which your mMIPS can be synthesized is part of the performance.

Electronic Systems 15 Submitting your results 1.Login to ftp://ftp.es.ele.tue.nl using your username/password 2.Put all.cpp and.h files in the directory ‘final’ 3.Put ‘mips_rom.bin’ and ‘mips_ram.bin’ in the directory ‘final’ Remarks  We need a working mMIPS to test your changes  Put all files directly in the directory ‘final’ do not use subdirectories  The input/output locations of your image must be the same as in our program  Your input image is automatically replaced with a new image by our tools

Electronic Systems 16 Important dates  Test program available on Sunday 5/3 at 12.00h   Submit results at Tuesday 7/3 before 12.00h  Make sure you submit before the deadline. It’s a hard deadline!  Presentations on Thursday 9/3 and Friday 10/3  You will be informed about the schedule

Electronic Systems 17 Support and Information  Dominic Gawlowski - FPGA  Valentin Gheorghita - LCC  Sander Stuijk - SystemC  Each Monday, Tuesday, Thursday and Friday between and 16.00h.  Look also at for information, tips, etc.

Electronic Systems 18 Questions?