control_unit.v; use it for SkipCond
The primary objective of this assignment is to build up a stronger perspective around the MARIE architecture and to further develop your proficiency in Verilog. You will:
For this assignment, you will continue the implementation of the MARIE CPU instruction set architecture (ISA) by adding support for the following instructions:
The file to be modified is control_unit.v. Several distinct states must be introduced for each instruction to achieve the required functionality. The micro-operations outlined in the simulator should be used as a guide. Each micro-operation should be associated with its own separate state.
For validation purposes, multiple tests were developed to ensure the correctness of the implementation. Test 0 runs by default and is expected to pass. When implementing a specific instruction, switch to the corresponding define. Each test includes both previously implemented instructions and the instruction under test; therefore, the tasks are independent and have no dependencies on one another.
`define test_legacy 0 //legacy test for all the lab implemented instructions
`define test_subst 1 //simple test for Subst
`define test_jns 2 //simp test for JNS
`define test_loadI 3 //simp test for LoadI
`define test_loadImmi 4 //simp test for LoadImmi
`define test_skipCond 5 //simp test for SkipCond
parameter test_scenario = `test_legacy; //Change the desired test here
After the test completes, the first indication of your implementation’s correctness is in the log message (see the images below). If the test passes, great job
! If the test fails, debug it step by step by analyzing the waveform and comparing it with the assembly program. The .asm instructions are available in the ram.v file; load them into the MARIE simulator and run them for reference.
control_unit. Inline comments within the Verilog code are also encouraged.
Even if the test(s) are not passing, each instruction may account for up to 25% of it's associated points if you clearly explain he underlying approach in the README file. The submitted code must compile successfully.
The final score will be scaled in the Grade section according to the weighting defined at the beginning of the course.