Giter VIP home page Giter VIP logo

mips-1's Introduction

MIPS

A very simple MIPS core designed in only 6 days from scratch.

  • 52 instructions in the MIPS-I instruction set are implemented.
  • Modified Harvard architecture.
  • No pipelining. All instructions are single-cycle.
  • Supports unaligned memory access.
  • Microcoded controller.

Modules

  • alu.v: The ALU (Arithmetic Logic Unit). Executes arithmetic operations and R-type instructions.
  • bu.v: Branch Unit. Comparing two numbers and set the jump signal according to bfunc.
  • controller.v: Setup signals to coordinate every unit to execute an instruction. Uses the microcode to decode instructions.
  • dataconv.v: Data Format Converter. Converts data from registers or the memory into different lengths and formats. Generates memory access addresses.
  • dcache.v: Data Cache. Partially implemented.
  • icache.v: Instruction Cache. Partially implemented.
  • mux.v: 32-bit 2-to-1 multiplexer. Used in many cases.
  • processor.v: Defines the top level connections between components.
  • regfile.v: The register file. Contains 31 general purpose 32-bit registers. Register 0 is tied to 0x00000000.

How to play with it

  1. Put instructions into inst.bin, and put initial data memory contents into data.hex. Please refer to demos for examples.
  2. Use testbench/processor_tb.v as the testbench, and run it with any Verilog simulators. Note that some features are not supported by some simulators, which may causes errors.
  3. The content of data memory will be dumped into dump.hex when simulation finishes.

About the demos

There are four demos. Every of them implements an image processing algorithm or a visual effect.

  • Thresholding: Does thresholding on gray-scale images.
  • Color_Thresholding: Does thesholding on every channel of a RGB image, generating a visual effect similar to the pseudo color. This demo is made for another version of this CPU which has an SIMD Architecture.
  • Pixelate: The pixelate filter, a stylish filter.
  • Luminance: Adjust luminance of an image. Made for the SIMD version supporting saturation arithmetic instructions.

There are several Python scripts in the Demos folder. They are for the conversion between images and memory dump files.

mips-1's People

Contributors

swift-fox avatar hongyuma avatar loblivious avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.