Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please explain your answer. 10 points - Inputs and Outputs: This problem is going to explore the limits of calculations in real-time environments. Our MSP

Please explain your answer.

image text in transcribed

10 points - Inputs and Outputs: This problem is going to explore the limits of calculations in real-time environments. Our MSP board does not possess a multiplier. Let's consider integer multiplication. Suppose we need to determine k i, where 0-k,1-9. Our program hits a point where we need to compute 3 4. We have two possibilities: Suppose we write a C-program int_mult that determines the result by adding the 1st argument by the 2nd number of times. So, for our problem, we will add the number 3 exactly 4 times, yielding the result 1:2 Suppose we write a C-program lut mult that determines the result using a look-up table, where the two operands define the row and column of the matrix whose element is the answer. So, for our prob- lem, we will look on the 3Td row and the 4th column to look up the stored value 12, which of course is the result For purposes of this exam, assume that the CPU clock is 25Mhz, and the I/O clock is 44.1kHz. Assume that a RAM access via the bus takes 10 CPU clock cycles, that a 2-integer addition takes 2 CPU clock cycles, and that an increment/decrement takes 1 CPU cycle. A comparison is an addition plus 1 CPU cycle for positive or negative. (a) Approximately how many CPU clock cycles are needed to multiply: i. 3 x 4 and 4x 3 for both methods, int mult and lut mult? ii. 8 9 for both methods? (b) What could you do to int _mult to create a uniform computation time? What effect would this change have on the computation time? (c) What could you do to lut_mult to minimize the memory require- ments? What effect would this change have on the computation time Show your reasoning in all answers 10 points - Inputs and Outputs: This problem is going to explore the limits of calculations in real-time environments. Our MSP board does not possess a multiplier. Let's consider integer multiplication. Suppose we need to determine k i, where 0-k,1-9. Our program hits a point where we need to compute 3 4. We have two possibilities: Suppose we write a C-program int_mult that determines the result by adding the 1st argument by the 2nd number of times. So, for our problem, we will add the number 3 exactly 4 times, yielding the result 1:2 Suppose we write a C-program lut mult that determines the result using a look-up table, where the two operands define the row and column of the matrix whose element is the answer. So, for our prob- lem, we will look on the 3Td row and the 4th column to look up the stored value 12, which of course is the result For purposes of this exam, assume that the CPU clock is 25Mhz, and the I/O clock is 44.1kHz. Assume that a RAM access via the bus takes 10 CPU clock cycles, that a 2-integer addition takes 2 CPU clock cycles, and that an increment/decrement takes 1 CPU cycle. A comparison is an addition plus 1 CPU cycle for positive or negative. (a) Approximately how many CPU clock cycles are needed to multiply: i. 3 x 4 and 4x 3 for both methods, int mult and lut mult? ii. 8 9 for both methods? (b) What could you do to int _mult to create a uniform computation time? What effect would this change have on the computation time? (c) What could you do to lut_mult to minimize the memory require- ments? What effect would this change have on the computation time Show your reasoning in all answers

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Information And Database Systems Third International Conference Achids 2011 Daegu Korea April 2011 Proceedings Part 2 Lnai 6592

Authors: Ngoc Thanh Nguyen ,Chong-Gun Kim ,Adam Janiak

2011th Edition

3642200419, 978-3642200410

More Books

Students also viewed these Databases questions