You are on page 1of 3

Figure 1: Main single cycle Circuit on logisim

Run the program according to following instruction

Instruction Op code Type Regdst Register Jump ALUOp


write
Sub 000000 R 1 1 0 000000
Adds 000001 R 1 1 0 000001
Exor 000101 R 1 1 0 000101
ORRs 000100 R 1 1 0 000100
Str 001001 R 1 1 0 001001
ANDs 000011 R 1 1 0 000011
Bne 001101 I 1 1 1 001101
B 001110 B 0 0 1 001110
Figure 2: Correct working of program

To check the program if it works correctly. I test the program against a test code. According to
table we generate the instruction memory and to give them as input to Logisim. Alongside these
instruction we gave data inputs to the circuit that we wanted theALU work according to it. First
when we run we got some errors the processor was not working rightly.

Then we realize that we got some mistakes in machine code and got a code which generate
different code than the original one. We fixed the errors and agin test the single cycle assembly
processor. The expected value in R3 is 6120 in decimal. The value in R3 is (17e8) in hexa
decimal which is 6120 in decimal. The other tests also give right values.
Program run method:

Upload “test_program_data” file in data memory

Upload “test_program_code” in instruction memory

Run program and check output at the end

You might also like