GithubHelp home page GithubHelp logo

pikamonvvs / mips-single-cycle Goto Github PK

View Code? Open in Web Editor NEW

This project forked from andrei0105/mips-single-cycle

0.0 1.0 0.0 33 KB

MIPS single cycle Verilog implementation based on Computer Organization and Design by David A. Patterson and John L. Hennessy

Verilog 100.00%

mips-single-cycle's Introduction

MIPS-single-cycle

MIPS single cycle Verilog implementation based on Computer Organization and Design by David A. Patterson and John L. Hennessy.

##Overview The implementation supports 1 cycle per instruction add, sub, lw, sw, beq and slt. Based on the implementation scheme from chapter 5, The Processor: Datapath and Control of Computer Organization and Design by David A. Patterson and John L. Hennessy, 3rd edition. The memory is structured in 32-bit words.

The instruction memory file, meminstr.dat contains the codes for the following program:

add $t0, $zero, $zero
add $t6, $zero, $zero

lw $t1, 64($t0)
lw $t2, 68($t0)
lw $t3, 72($t0)
sw $zero, 76($t0) #the sum will be at this location [76]
loop:
lw $t4, 0($t0)
lw $t5, 76($t6)
add $t5, $t5, $t4
sw $t5, 76($t6)
sub $t1, $t1, $t2
add $t0, $t0, $t3
beq $t1, $zero, done
beq $t1, $t1, loop #actually jump (because $t1 = $t1)
done:
#end

The program computes the sum of the first 16 values from the data memory. The result will be 5 and will be located in the data memory.

#Tools Modelsim was used for simulation. There is a free student edition available. QtSpim was used to view the codes for each instruction.

mips-single-cycle's People

Contributors

andrei0105 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.