Deib_Logo
Menucool Tab Menu


---!!! Students are recommended to tune in the course original page updated by Prof. Cristina Silvano!!!---
--- The materials here are extra complementary for the course for instrested students ---
-------------------------------------------------------------------------------------------------------------------------------------------------

(1- EXTRA MATERIAL): MIPS_CrossCompiler, First Excercise Session

(2- Projects & Presenatations): List of Presentations

(3- Project Details): Manual for Experimental Set-up

(4- VEX tool): a VLIW Compiler and Simulator

-------------------------------------------------------------------------------------------------------------------------------------------------





  • 1- MIPS_CrossCompiler- a quick toturial on installing a MIPS cross-compiler on linux


  • If you are insterested in seeing how your high level language, e.g. c,c++, etc, is compilied and transformed to a MIPS assembly platform, you can install "OpenWrt" compiler for linux and compile your code using -S flag to be able to see the MIPS assembly. Just follow these steps:
    1. Install the necessary packages in linux (Ubuntu)

    2. Just open a terminal in ubuntu and paste the folowing line, you will be asked to insert your root password:
      sudo apt-get install libncurses5-dev gawk flex build-essential qemu-user
      
      Download the laest version of openwrt from the repository:
      git clone git://git.openwrt.org/openwrt.git
      
    3. Make and install the openWrt

    4. open the downloaded directory and make install the package (this will take a while depending on your system 2-10 min):
      cd openwrt
      make -j 2
      

      Check if you are having 3 directory inside the openwrt/staging_dir, as:
      • host - Required tools and libraries to be run on the host machine (x86/amd64)
      • toolchain-mips_34kc_gcc-4.x-linaro_uClibc-0.9.x - Toolchain that runs on the host machine and which produces binaries for the target architecture (mips32)
      • target-mips_34kc_uClibc-0.9.x - Libraries and files of the target architecture

      If these three are there, then you are good to go!
      Just copy-paste these two lines in order to export the path of the compiler file, so that next time you can use them as "mips-openwrt-linux-gcc" only (without the whole path)
      !!! Just check for your version to change the end of the file name bellow !!!
      export PATH="/YOUR/DIR/openwrt/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2":$PATH
      
      then
      export PATH="/YOUR/DIR/openwrt/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/bin":$PATH
      
    5. Compile your code

    6. Here is a simple c code that could be used to tes the compiler:
      #include "stdio.h"
      
      int main()
      {
      
      int BASEA[5];
      int BASEB[5];
      int BASEC[5];
      int INC1=1;
      int INC2=1;
      int N=4;
      int i=0;
      
      do {
      BASEC[i] = BASEA[i] + BASEB[i] + INC1 + INC2;  
       i++; } 
      while (i != N); 
      return 0;
      }
      

      Now compiler your file.c with the folowwing command:
      mips-openwrt-linux-gcc file.c  -S -o file.s
      
    7. See the MIPS assembly file

    8. You should have the file.s, congrats, you could see the MIPS assemply now by any text editor, e.g. vim, gedit, etc.
      Here is part of the file.s :
      main:
              .frame  $fp,96,$31              # vars= 80, regs= 1/0, args= 0, gp= 8
              .mask   0x40000000,-4
              .fmask  0x00000000,0
              .set    noreorder
              .set    nomacro
              addiu   $sp,$sp,-96
              sw      $fp,92($sp)
              move    $fp,$sp
              li      $2,1                    # 0x1
              sw      $2,12($fp)
              li      $2,1                    # 0x1
              sw      $2,16($fp)
              li      $2,4                    # 0x4
              sw      $2,20($fp)
              sw      $0,8($fp)
      $L2:
              lw      $2,8($fp)
              nop 
      
    ---------------------------------------------------------------------------

  • 2- Projects and Presentations- List of Projects and Presentations


  • List of the allocated projects and presentations can be downloaded from Project_Presentations2014
    Important notes quoting from the course website:
  • ASSIGNMENT OF ORAL PRESENTATIONS TO BE COMPLETED BY JUNE 22RD 2014 - HARD DEADLINE
  • THE ORAL PRESENTATION IS OPTIONAL AND THE ADDITIONAL SCORE ASSIGNED IS MAX 2 POINTS -- MAX TWO PERSONS FOR EACH PRESENTATION
  • PRESENTATION IN ENGLISH (SINGLE PERSON): MIN 10 MAX 12 SLIDES IN ENGLISH (FORMAT: .PPT OR .PDF)
  • PRESENTATION IN ENGLISH (TWO PERSONS): MIN 15 MAX 20 SLIDES IN ENGLISH (FORMAT: .PPT OR .PDF)
  • ---------------------------------------------------------------------------

  • 3- Project Instructions- Setting-up the Projects


  • for students with the Heterogenious, Multi-many core and Power modeling projects: Instructions
  • for students with Compiler Auto-tuning and Machine learning projects:
  • for students with GPU-CPU systems with CUDA-programing:
    • download the webinamr of CUDA-streams at: CUDA-streams
    • some samples : CUDA-streams samples
    • CUDA download center for downloading SDK (benchmarks and kernels are integrated inside): CUDA SDK
    • and you need a GPU profiler for NVIDIA to check the performance of your project (feel free to choose anything, i.e. NVIDIA visiual profiler: NVIDIA profiler)
    ---------------------------------------------------------------------------

  • 4- VEX- VLIW Compiler and Simulator


  • If you are insterested in simulating a VLIW architecture on Linux to see the assembly code of VLIW and how it does the transformation and the control flow graph of allocating the instructions on VLIW slots, VEX is the answer. VEX (VLIW (Very Long Instruction Word) EXample), a tool of HP-labs, is a VLIW compiler and simulator, allowing you to compile the C code and then simulate it on top of you linux machine easily. VEX architecture and its C compiler is depicted in these figures bellow:



    For downloading VEX, go to VEX download page. Just download the .zip package and extract it, no further installation is needed.
    The complete manual of using VEX is here at VEX Manual. The manual and the figures are part of the famous book : "A VLIW Approach to Architecture, Compilers and Tools" written by Joseph A. Fisher (founder of VLIW). Check this book here