Question: Your task it to compare the memory efficiency of four different styles of instruction sets. The architecture styles are the following: Accumulator: All operations use


Your task it to compare the memory efficiency of four different styles of instruction sets. The architecture styles are the following: Accumulator: All operations use the accumulator register. Operands come from the accumulator and/or memory and the result of most operations is stored in the accumulator Memory-memory: All three operands of each instruction are in memory Stack: All operations occur on top of the stack. Only push and pop access memory, and all other instructions remove their operands from the stack and replace them with the result. The implementation uses a stack for the top two entries: accesses that use other stack positions are memory references Load-store: All operations occur in registers, and register-to-reiter instructions have three operands per instruction. For this assignment, you may make the following assumptions. The opcode is always 1 byte . All memory addresses are 2 bytes All data operands are 2 bytes All instructions are an integral number of bytes in length For load store, there are 16 general purpose registers and register specifiers are 4 bits long Each architecture should be able to run this code: do f } while(a != 0) You should have designed the instruction sets and programs in your class. For this homework, you will analyze you in-class design 1.(20 points) Analyze the efficiency of each architecture for this piece of code. Count how many instructions are needed. Then, assuming the loop is executed once (e.g.each line of code is executed once), count how many bytes of instruction data must be transferred from memory to the processor in order to run the program. Also count how many bytes are needed to transfer any other data (e.g.for memory instructions like 1w and sw) Finally, compute the total transferred and analyze your results. Show your work. Your task it to compare the memory efficiency of four different styles of instruction sets. The architecture styles are the following: Accumulator: All operations use the accumulator register. Operands come from the accumulator and/or memory and the result of most operations is stored in the accumulator Memory-memory: All three operands of each instruction are in memory Stack: All operations occur on top of the stack. Only push and pop access memory, and all other instructions remove their operands from the stack and replace them with the result. The implementation uses a stack for the top two entries: accesses that use other stack positions are memory references Load-store: All operations occur in registers, and register-to-reiter instructions have three operands per instruction. For this assignment, you may make the following assumptions. The opcode is always 1 byte . All memory addresses are 2 bytes All data operands are 2 bytes All instructions are an integral number of bytes in length For load store, there are 16 general purpose registers and register specifiers are 4 bits long Each architecture should be able to run this code: do f } while(a != 0) You should have designed the instruction sets and programs in your class. For this homework, you will analyze you in-class design 1.(20 points) Analyze the efficiency of each architecture for this piece of code. Count how many instructions are needed. Then, assuming the loop is executed once (e.g.each line of code is executed once), count how many bytes of instruction data must be transferred from memory to the processor in order to run the program. Also count how many bytes are needed to transfer any other data (e.g.for memory instructions like 1w and sw) Finally, compute the total transferred and analyze your results. Show your work
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
