< previous page page_139 next page >

Page 139
16. In Cragon [61], several architectures are compared, including:
3M three address memory to memory;
OPABC
2M two address memory to memory;OPAB
ACC single accumulator;OPA
R/M register set (16 registers);
(R plus R
B, base register, occupies one byte)
OPRRBA
S stackOPorOPA

d87111c01013bcda00bb8640fdff6754.gif
Assume one byte is allowed for opcode and from one to three bytes are allocated for an address.
d87111c01013bcda00bb8640fdff6754.gif
Plot the expected static code size for each architecture relative to S (stack) for address sizes of one, two, and three bytes. (Compute the size of a functional instruction, then add the size of the fraction of overhead instructions denned by the M-ratio.) Assume:
d87111c01013bcda00bb8640fdff6754.gif
No procedural instructions.
d87111c01013bcda00bb8640fdff6754.gif
M-ratio of zero for 3M.
d87111c01013bcda00bb8640fdff6754.gif
M-ratio of 0.1 for 2M.
d87111c01013bcda00bb8640fdff6754.gif
M-ratio of R/M is 2.0.
d87111c01013bcda00bb8640fdff6754.gif
M-ratio for stack is the same as ACC, 2.5.
17. Continue Cragon's analysis of problem 16. Plot the expected execution time for each architecture relative to stack for 2-, 3-, and 5-cycle memory access with a three-byte address only. Each memory access fetches a single instruction or data operand regardless of size. Assume a well-mapped host with one cycle for Decode (D), one cycle for Address Generate (AG), and one cycle for Execute (EX). Note that no EX cycles are required with M-type instructions.
18. For each machine model defined in problem 17, find the CFA measures (Section 2.6.2) of M and R. Be sure to include the effects of referencing IC, IIR, and SR registers (each 32 bits).
19. For a routine (procedure) to find the roots of the quadratic equation (assume a square root instruction), find the HLL measures of:
d87111c01013bcda00bb8640fdff6754.gif
(a) Instruction count.
d87111c01013bcda00bb8640fdff6754.gif
(b) Memory reads and writes.
d87111c01013bcda00bb8640fdff6754.gif
Assume the three arguments are in memory and the results must also be written to memory.

 
< previous page page_139 next page >