Question: PLEASE RUN CODE AND SHOW OUTPUT. In E 1 5 assembly language, there is no single instruction to perform greater than ( or equal to

PLEASE RUN CODE AND SHOW OUTPUT.
In E15 assembly language, there is no single instruction to perform "greater than (or equal to)" and
"less than (or equal to)" operations. We have only the cmp and cmpi instructions to test for equality
of two values.
Write a program in E15 assembly language in a file named leq.v that tests whether the value in Rg0 is
less than or equal to the value in Rg1. Assume that the values in both registers are unsigned numbers.
If the test is true (i.e. if Rg0 is less than or equal to Rg1), then set Rg 2 to 1, otherwise to 0.
Let's initially assume that we want to compare the decimal values 7 and 2. Use ROM location 0 to
store 7 into Rg0 with the movi instruction; then use ROM location 1 to store the value 2 into Rg 1.
The remainder of the program, beginning at ROM location 2, should perform the comparison of the
value of Rg 0 by the value of Rg 1, and store the result into Rg2 before halting. Note that your program
should work with arbitrary inputs, but for testing and grading purposes, make sure that your submitted
code is for the specific values 7 and 2.
When your program has finished, use the usual {jmp, RXX, RXX,4'b0000} instruction to halt execu-
tion.
Test your solution with the E15 implementation. You'll need to modify the provided E15Process.v
file in order to make it load your assembly program. Look for the line 'include "program1.v" and
change the filename to match that of your program (leq.v). Do not change the file E15Process.v
in any other way. Test your code by compiling and running the E15Process_tb.v test bench and
examining its output: when you run the test bench, it will print out the final state of the registers.
Briefly describe how your solution works in a few sentences.
Submit your E15 assembly language file leq.v. Do not submit your modified E15Process.v or the
test bench.
PLEASE RUN CODE AND SHOW OUTPUT. In E 1 5

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!