Giter Site home page Giter Site logo

cs61c_proj3debug_helper's Introduction

CS61C_proj3debug_helper

Debug helper script for CS61C Proj3 su19 Please run cpu-onestage-sanity.sh or cpu-twostage-sanity.sh or cpu-twostage-user.sh first, and pick up the FAILED test which you want to use this script to visulize the result.

e.g.:

$ ./cpu-twostage-user.sh
Testing your tests (two-stage processor)...
        you FAILED test: CPU addi test
        you PASSED test: CPU alu60 test
        you PASSED test: CPU alu1 test
        Score for you: 2/3 (2/3 tests passed, 0 partially)

and then you can do the following :

 $ ./proj3debug.sh user addi

Debug helper script for CS61C Proj3 su19
Created by Jianning Wang

Usage: ./proj3debug.sh [one|two|user] <test_name>
e.g.: ./proj3debug.sh one addi

CORRECT:
ra:  00000000 sp:  00000000 t0:  00000000 t1:  00000000 t2:  00000000 s0:  00000000 s1:  00000000 a0:  00000000 fetchAddr:  00000000 inst:  00500293 Time_Step:  0000
ra:  00000000 sp:  00000000 t0:  00000005 t1:  00000000 t2:  00000000 s0:  00000000 s1:  00000000 a0:  00000000 fetchAddr:  00000004 inst:  00728313 Time_Step:  0001
ra:  00000000 sp:  00000000 t0:  00000005 t1:  0000000c t2:  00000000 s0:  00000000 s1:  00000000 a0:  00000000 fetchAddr:  00000008 inst:  00928413 Time_Step:  0002
ra:  00000000 sp:  00000000 t0:  00000005 t1:  0000000c t2:  00000000 s0:  0000000e s1:  00000000 a0:  00000000 fetchAddr:  0000000c inst:  00000000 Time_Step:  0003
MINE:
ra:  00000000 sp:  00000000 t0:  00000000 t1:  00000000 t2:  00000000 s0:  00000000 s1:  00000000 a0:  00000000 fetchAddr:  00000000 inst:  00500293 Time_Step:  0000
ra:  00000000 sp:  00000000 t0:  00000000 t1:  00000000 t2:  00000000 s0:  00000000 s1:  00000000 a0:  00000000 fetchAddr:  00000004 inst:  00728313 Time_Step:  0001
ra:  00000000 sp:  00000000 t0:  00000005 t1:  00000000 t2:  00000000 s0:  00000000 s1:  00000000 a0:  00000000 fetchAddr:  00000008 inst:  00928413 Time_Step:  0002
ra:  00000000 sp:  00000000 t0:  00000005 t1:  0000000c t2:  00000000 s0:  00000000 s1:  00000000 a0:  00000000 fetchAddr:  0000000c inst:  00000000 Time_Step:  0003
Source:
addi.s
     1  addi t0, x0, 5
     2  addi t1, t0, 7
     3  addi s0, t0, 9
Hex:
addi.hex
     1  0x00500293
     2  0x00728313
     3  0x00928413
Diff: (CORRECT vs MINE)
2,4c2,4
< ra:  00000000 sp:  00000000 t0:  00000005 t1:  00000000 t2:  00000000 s0:  00000000 s1:  00000000 a0:  00000000 fetchAddr:  00000004 inst:  00728313 Time_Step:  0001
< ra:  00000000 sp:  00000000 t0:  00000005 t1:  0000000c t2:  00000000 s0:  00000000 s1:  00000000 a0:  00000000 fetchAddr:  00000008 inst:  00928413 Time_Step:  0002
< ra:  00000000 sp:  00000000 t0:  00000005 t1:  0000000c t2:  00000000 s0:  0000000e s1:  00000000 a0:  00000000 fetchAddr:  0000000c inst:  00000000 Time_Step:  0003
---
> ra:  00000000 sp:  00000000 t0:  00000000 t1:  00000000 t2:  00000000 s0:  00000000 s1:  00000000 a0:  00000000 fetchAddr:  00000004 inst:  00728313 Time_Step:  0001
> ra:  00000000 sp:  00000000 t0:  00000005 t1:  00000000 t2:  00000000 s0:  00000000 s1:  00000000 a0:  00000000 fetchAddr:  00000008 inst:  00928413 Time_Step:  0002
> ra:  00000000 sp:  00000000 t0:  00000005 t1:  0000000c t2:  00000000 s0:  00000000 s1:  00000000 a0:  00000000 fetchAddr:  0000000c inst:  00000000 Time_Step:  0003

cs61c_proj3debug_helper's People

Contributors

jalinwang avatar

Stargazers

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