Lab 1 Performance of computer architectures¶
Literature: Chapter 1 Patterson and Hennessy.
Assignment 1.¶
Start the SIM-PL “Executer” program (the other program is called “Editor”). This program provides a simulator environment for different computer architectures. The architectures for this lab are stored in a black box (you’ll see the contents of one in the next lab). In the Lab1 folder are 3 different architectures we will examine: Singlecycle-arch.sim-pl, MultiCycle-arch.sim-pl and Pipelined-arch.sim-pl. Open the first architecture in the Executer. You will see on the right a frame with it’s own menubar. Open here the file forloop.wasm. Execute the file by first compiling it (button at the bottom) and pressing Restart (red arrow), and step through the program by clicking on the brown step arrow. Notice the changes in the window at the bottom. Determine the execution time of this forloop program and the other 2 program (adding.wasm and while.wasm) for this architecture. Do the same for the other 2 architectures.
Please note that the unit of the clock is missing. Take some clock period size and mention the period in your labreport and how you have determined the execution time. Create a table containing the 3 architectures and wasm files with the speeds.
Assignment 2¶
Create a table like above for the number of executed instructions.
Assignment 3¶
Create a table like above containing the CPI of the 3 architectures. Compare the numbers and explain differences.
Assignment 4¶
The assembly code contain the following instructions: NOP, ADDI and LI. Try to look up the meaning of these functions.
Assignment 5¶
The Program Counter points to the next instruction which is executed. What do you notice when you step through the program and look at the counter? Can you explain this behaviour? (For the last question you will have to leaf through the book).
Assignment 6¶
Copy the adding program to “subtract.wasm” and change this program in order to subtract the two numbers (don’t change the order). What do you notice when you observice the contents of the registers? Can you explain this?