SilenceX12138 / MIPS-Microsystems

A computer system containing CPU, OS and Compiler under MIPS architecture.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MIPS Microsystems

Overview

This repository contains three projects at core components of MIPS Microsystems.

  • CPU: a five-stage pipeline microprocessor that can support 70 instructions and handle basic exceptions and interrupts according to MIPS principles
  • Operating System: an operating system based on MIPS architecture with Linux kernel to support virtual memory, process management and system call
  • Compiler: a multi-pass compiler for C0 programming language and MIPS assembly language

CPU

Please refer to the project README for detailed information.

This is a 32-bit microprocessor conforms to MIPS architecture.

  • This CPU is realized with Verilog to make sure that it can be burnt onto a real-world chip or FPGA.

  • For displaying the work flow of CPU, changes of memory and registers are printed to the screen, so that the correctness can be checked and evaluated easily.

    image-20210909094513682
  • Below is an example of simulation result from XILINX

    lockup.jpg

    Strongly suggest using ISE or Vivado to develop your own functions.

Operating System

Please refer to the project README for detailed information.

This is a basic operating system with Linux Kernel under MIPS architecture. When realizing it, all functions are divided into 5 parts below.

  • Lab1
    • Understand MIPS architecture from operating system
    • Learn the booting process of operating system
    • Capture the structure and function of ELF file
  • Lab2
    • Learn the memory layout of MIPS
    • Capture the memory management with link list
    • Realize memory allocation and releasing
  • Lab3
    • Create a process and run it
    • Realize clock interrupt
    • Realize process scheduling and combine it with clock interrupt
  • Lab4
    • Understand how processes communicate with each other
    • Realize fork function
    • Handle page fault interrupt
  • Lab5
    • Understand what file system is
    • Realize device driver
    • Learn the designing concept of microkernel

Note: Theoretically, this OS is able to be deployed on an ARM micro controller like Raspberry PI.

Compiler

Please refer to the project README for detailed information.

This is a multi-pass compiler for C0 programming language and MIPS assembly language.

  • This compiler is designed to have two separate parts, front end and back end.

  • Below is an example for its compiling process

    img
  • Strongly suggest using CMake to execute this project

Reference

  • BUAA Computer Organization Course, Autumn 2019.
  • BUAA Operating System Course, Spring 2020.
  • BUAA Compiler Technology Course, Autumn 2020.

About

A computer system containing CPU, OS and Compiler under MIPS architecture.

License:MIT License


Languages

Language:Verilog 48.9%Language:C 25.0%Language:Assembly 15.6%Language:C++ 9.1%Language:Python 0.9%Language:Makefile 0.5%Language:Batchfile 0.1%Language:PowerShell 0.0%