User Tools

Site Tools


projects:pipelined_cpu_hazards_eliminated

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
projects:pipelined_cpu_hazards_eliminated [2013/12/18 23:36]
sstrohkorb
projects:pipelined_cpu_hazards_eliminated [2013/12/18 23:43] (current)
sstrohkorb [How can someone else build on it?]
Line 98: Line 98:
  
 We made slight modifications to our schedule as we came across many problems implementing the pipeline. We decided to implement a pipelined format then add instructions as we progressed instead of trying to complete the entire thing in one pass.  We made slight modifications to our schedule as we came across many problems implementing the pipeline. We decided to implement a pipelined format then add instructions as we progressed instead of trying to complete the entire thing in one pass. 
 +
 +**To Do:**
 +  * Check the JAL and JR functionality
 +  * Check the Forwarding logic to make sure it is implemented correctly, especially with the storing word instructions
 +  * Redesign and implement a system to handle jumping and branching
 +
 +**Schematic:​**
 +
 +{{ :​projects:​screen_shot_2013-12-18_at_11.40.26_pm.png?​nolink |}}
 +
 +{{ :​projects:​screen_shot_2013-12-18_at_11.40.34_pm.png?​nolink |}}
 +
 +**Build Instructions:​**
 +
 +How to compile Assembly program using Mars4_4 to machine code:
 +  - Compile/​assemble the Assembly program (F3)
 +  - Dump the file to memory (File -> Dump Memory or Control + D)
 +  - Change dump format to Binary Text
 +  - Save file
 +
 +How to run a program in machine code on our pipelined CPU using ModelSim:
 +  - Make sure that the line **$readmemb(FILENAME,​ Memory)** uses the correct filename, such as “example.dat” and that the path is reference correctly if the machine code file is not in the same directory as the verilog file.
 +  - Open ModelSim. If you don’t have a project for this CPU, then make one. Add the files “pipelinedCPU.v” and “pipelinedCPU.do” to the project, and make sure the .dat file is in the same directory.
 +  - Open the project. Type “do pipelinedCPU.do” into the command line and press enter.
 +  - This will run the program in the machine code file using the pipelined CPU. You may need to manually set the run time to a convenient time for the program. ​
 +
 +**Gotcha’s,​ watchouts:​**
 +  * Debugging will take longer than expected. Always.
 +  * Get comfortable with the ins and outs of Verilog
 +  * Addressing memory may be different in your implementation of the CPU as compared to MIPS Assembly if you use 32-bit words instead of 8-bit words
 +  * Design your hazard avoidance systems before you look at the code and try to implement it, draw it out first and discuss it before you go to implement in the code
 +
 +
 +Code, tests, and build instructions (please read the README): {{:​projects:​pipelinedcpu_project_files.zip|}}
 +
projects/pipelined_cpu_hazards_eliminated.1387427764.txt.gz · Last modified: 2013/12/18 23:36 by sstrohkorb