Code Monkey home page Code Monkey logo

logism's Introduction

Jennifer Bramson
[email protected]

This logism file creates a single-cycle processor to implement a subset of MIPS instructions.

I tried to use the same general layout as the datapath we covered in class. So,
for example, all of the arithmetic and logical operations (and, nor, add, sub,
addi, addui, mult, div, along with the comparisons necessary for branches) all
occur within the ALU. The decoder computes a 3-bit value called ALUOp that
controls which of the operations' results is output. There are three outputs
total from the ALU: Branch (1 when the comparison done would lead to branching
and 0 when the the comparison was incorrect), result, and HI. HI is used
primarily for multiply and divide, but it holds the carryout or carryin for
the add and subtract calls. Result feeds to $LO for multiply and divide.

Moving on to the Register File, there are eight registers ($r0-$r7) and
ReadRegister1 input and ReadRegister2 input control which registers are read.
The values for those two inputs comes directly from the instruction. The
decoder's RegWrite controls whether a register should be written to or not.
The clock from the main circuit is used as the clock in this subcircuit by
passing it in as an input labeled 'clock'.

The data that is written to a register depends on the input that the WriteData
MUX choses, which also comes from the decoder. There are 6 possibilities here:
the result directly from the ALU, an immediate value, PC+1, data from memory
from lw instructions (this input uses a tunnel called MemData), $LO, and $HI.

The decoder is a subcircuit comprised of 6 subcircuits to keep everything
visually clear. The first controls writing to the registers and which
data should be chosen from the WriteData MUX to be written. The second controls
the ALU operation, the third halt and put. The fourth is for enabling the
$HI and $LO registers. The fifth is for enabling writing to the memory. Finally,
the sixth is for changing the PC to a branch (BR) or jump (JR) immediate when
necessary. This results in the decoder having nine control outputs.

There are no known bugs. All of the instructions that were listed in the
project assignment are implemented.

logism's People

Watchers

James Cloos avatar Jennifer Bramson 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.