COMP3211/9211 04s2 Tutorial 2 (Weeks 04 & 05) --------------------------------------------- The selection of tutorial questions is chosen to provide coverage of topics relevant to this Session's presentation. There are many more questions listed than it is possible to cover during the tutorial hour. I will therefore label them as W = warmup exercise (simple exercises that you should be able to do without coaching or assistance - I would recommend you try these before the class); D = discuss (these questions are prime candidates for further discussion - you should prepare for these before the class); and F = followup (you should attempt these as soon as possible after the tutorial class to practice your skills, and get a different insight into tutorial questions covered in class). Exam questions are more likely to be similar in style to D and F type questions. Key: SRQ = Stallings, Review Question; SP = Stallings Problem; P = Patterson & Hennessy Exercise (Note you will in general need to source the P problems in a copy of the Second Edition); Y = Yalamanchili Hand-in Exercises ----------------- These exercises will be marked and contribute to your final assessment in the course. PLEASE BE REMINDED THAT PLAGIARISM IS CONSIDERED A SERIOUS OFFENCE. ALL STUDENTS ARE EXPECTED TO PREPARE THEIR OWN SOLUTION TO THESE EXERCISES - COPIED WORK WILL BE PENALIZED AS DESCRIBED IN THE COURSE OUTLINE. WHILE DISCUSSION AND EXCHANGE OF IDEAS IS PERMITTED, IN ORDER TO AVOID PENALTIES, DO NOT SHARE, DISTRIBUTE, OR COPY WRITTEN SOLUTIONS. PREPARE A PLAIN (ASCII) TEXT FILE AND HAND IN AT THE _START_ OF YOUR NEXT TUTE CLASS IN WEEKS 06/07: Q01. Your solution to question Q06 below. Q02. Your solution to Patterson & Hennessy, Problem 4.51. Warmup Exercises ---------------- Q03. [P4.10] Q04. [P4.14] Q05. [P4.15] Discussion Questions -------------------- Q06. Given two integers, m and n, an m x n integer array A, and an n x 1 vector b stored in memory, design a high-level program fragment to compute and store back to memory the m x 1 vector product r = A x b. Translate your program into an efficient MIPS assembly language implementation of it. Do not optimise the instruction schedule to eliminate any data dependencies or branch delays that may be present in your code (don't worry if you don't yet know what these are: your program will then be what is desired by default). Describe which registers you have allocated to storing the local variables and memory addresses used by your program. Sketch a memory map that indicates where your program and data will reside in memory assuming each will occupy contiguous addresses in a single unified memory block. Q07. Read P & H, pages 241 - 249 and answer [P4.46] Q08. [Y5.3] You are part of a software group developing algorithms for processing speech signals for a new digital signal processing chip. To test your software your options are to construct i) a detailed hierarchical model of the chip comprised of gate level models at the lowest level of the hierarchy or ii) a behavioural level model of the chip that can implement the algorithms that you wish to use. Your goal is to produce correct code for a number of algorithms prior to detailed testing on a hardware prototype. How would you evaluate these choices and what are the trade-offs in picking one approach over the other? Follow-up Questions ------------------- Q09. [P4.36] Q10. [P4.49] Q11. [P4.50]