Table of Contents

MARIE - Extend the ISA

There is no fix provided in skeleton! Please do a local change as suggested on the forum!

Objectives

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:

Description and requirements

For this assignment, you will continue the implementation of the MARIE CPU instruction set architecture (ISA) by adding support for the following instructions:

You can refer to the implementation details in Chapter 4 of the textbook as well as in the simulator’s Databook. Some instructions constitute extensions of the original set of proposed instructions; their descriptions are provided exclusively in the Databook.

Implementation & Testing

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.

In the simulator, you may begin with a basic example. After assembling and executing the program in micro-step mode, you will be able to observe each instruction being carried out step-by-step. Your implementation may follow it!

 RTN instruction description using the simulator

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.

 Pass Messaage

 Fail Messaage

Notes

Additional details

This assignment is an individual assignment; using any code from external sources can be considered as plagiarism and can lead to voiding the accumulated points!

Grading

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.

Recourses

Appendix