Skip to main content
If you continue browsing this website, you agree to our policies:
  • Kasutustingimused
Continue
x
Veeb
ÕIS
Moodle
E-mail
Help
Moodle
  • Catalogue
  • Calendar
  • More
Külaliskasutaja
You are currently using guest access
Log in
Moodle
Catalogue Calendar
  1. IAS0430 Microprocessor Systems
  2. Lab Assignment 2 - ISA
Assignment

Lab Assignment 2 - ISA

Lab Assignment 2 - ISA

Completion requirements

Lab Assignment 2

 
In this assignment, you will be tracing the execution of a program as well as expanding on the ISA created for the Dummy CPU.

READ THE GUIDELINES BEFORE YOU START WITH YOUR ASSIGNMENT. READ EACH SECTION BEFORE YOU START WORKING ON IT. THIS IS AN INDIVIDUAL ASSIGNMENT. YOU ARE NOT NOT ALLOWED TO WORK WITH ANYONE.

Download the LabAssignment2_PART1_16BitDummyCPU_ISA.xlsx file attached to the Assignment.

The assignment is divided into 2 parts as follows:

Part 1 - This Part to be completed by both groups and is made of 2 SECTIONS.

In the  LabAssignment2_PART1_16BitDummyCPU_ISA.xlsx file, you will find a 16-bit ISA made for the Dummy CPU. Please read the operations of each opcode and their function codes carefully. You will need them to complete this part of the Lab Assignment.

SECTION 1:

Using the 16-bit Dummy CPU Instruction Set Architecture, trace the execution of the Program 1 in Section 1 ProgramTrace sheet, then answer the questions in the excel sheet.

Program 1

0

LDv R0 #60

1

LDv R1 #12

2

LDv R3 #0

3

LDv R2 #0

4

SUBr R0 R1

5

ADDv R3 #1

6

EQr R0 R2

7

JPv #4

8

STa R3 $40

9

JPv #19

19

LDv R3 #99

20

LDa R0 $40

21

LDv R2 #2

22

ADDr R0 R0

23

SUBv R2 #1

24

EQa R2 $66

25

JPv #22

26

JPr R3

40

0

 54  0100101
 55  0110101
 56  1010010

66

0

88

LDv R2 #6

 89

SUBr R0 R1

 90 STa R3 $66

99

HE


SECTION 2:

Using the 16-bit Dummy CPU Instruction Set Architecture, write a program that does the following:
1- The program loads three numbers A, B, and C into registers R0, R1, and R2 respectively. You can choose the numbers as you wish, but they must satisfy the following parameters:
- Number A is bigger than Number B.
- Number B is bigger than Number C.
- Number A must not be larger than 12.
- Number C must not be smaller than 5.
2- The program performs a loop. The number of iterations of the loop must be equal to the subtraction of number C from number A.
- The subtraction of Number C from Number A or (A minus C) must happen within the program.
- The subtraction result must be saved in R3.
3- Inside the loop, the program must perform multiplication between the result of the subtraction stored in R3 and Number B.
- The result of multiplication can be stored in either R1 or R3, it is your choice to choose which one.
4- Once the loop is over, the result of the multiplication is stored in a memory location between 60 (0111100) and 70 (1000110).
5- Once the multiplication result is stored, halt your program.
6- Once the program is done, trace it in the Section 2 ProgramTrace in the excel sheet.

In order for you to write this program, I recommend that you take each step at a time without thinking about the next step. Once you start with the next step, do any edits needed. This task will take some time for your solve, so take your time - you will have plenty of time to solve this.

Guidelines
1- When finishing Part 1 SECTION 1 and SECTION 2, save the .xlsx file and submit it.

If you have any questions, please post them on the Course participant's forum (ask questions from a teacher/other participants). Other students are encouraged to participate in asking and answering questions.

2- You can check your program with the help of a little ISA simulator (16BitVisualizerStudent.exe) created by your colleague Andriy Partyshev. It will report the number of instructions (and clock steps) plus the memory content and values in the registers. This will allow you to check whether your trace was correct or not - just compare the last values. The program requires an additional file (memload.csv) that contains the memory image. The file contains already Program 1 but you can create your own program in the same manner. The interface of the program is simple and should be easy to use.

  • 16BitVisualizerStudent.exe 16BitVisualizerStudent.exe
    19 November 2021, 12:59 PM
  • LabAssignment2_PART1_16BitDummyCPU_ISA.xlsx LabAssignment2_PART1_16BitDummyCPU_ISA.xlsx
    2 November 2021, 11:38 AM
  • memload.csv memload.csv
    15 November 2021, 3:45 PM
You are currently using guest access (Log in)
IAS0430
Data retention summary
Policies
Get the mobile app