The PEP8 processor IS(Instruction Set) has both Unary (one byte) and Trinary(thr
ID: 3730805 • Letter: T
Question
The PEP8 processor IS(Instruction Set) has both Unary (one byte) and Trinary(three byte) instructions. The Unary type does not require an operand whereas the Trinary does. Memory is accessed ONE byte at the time and it takes 10ns to transfer ONE byte Consider a program, that executes one hundred instructions, where 70% of the executed instructions are Trinary and the rest(30%) are Unary. For the Trinary instructions, the following two facts apply: a) Only 10% use the Indirect(r) Addressing Mode and the rest(90%) use the Direct or Indexed Modes. b) Only 10% use/need a one byte operand(LDBYTE/STBYTE) and the rest(90%) require a two byte operand. Consider the four stages in the Instruction Cycle that access memory: -FI: to retrieve an instruction; -CO: to retrieve the 'indirect' address; and FO/WO: to retrieve(FO) or store(WO), either a one or two byte operand value. What is the Total Memory Access Time (TMAT) in ns. (nanoseconds), that is spent in the execution of this program. SHOW and EXPLAIN EXACTLY HOW you calculate/arrive at each of the intermediate and final values.Explanation / Answer
Answer:
Number of Unary Instructions = 30
Number of Trinary Instructions = 70
Time needed in FI stage:
Memory Access Time(MAT) in FI stage for Unary instructions = 30x1x10 = 300ns
Memory Access Time(MAT) in FI stage for Trinary instructions = 70x3x10 = 2100ns
--------------------------------------------------------------------------------------------------------------------------
Total time needed in FI stage = 2,400ns
Time needed in CO stage:
There is no operand for Unary instructions.
So Memory Access Time(MAT) in CO stage for Unary instructions = 0ns
Number of trinary instructions that use Indirect addressing mode = 70 x 0.1 = 7
Question does not mention the size of an address. So let us assume the memory read of one byte to get the indirect address.
So Memory Access Time(MAT) in CO stage for Trinary instructions = 7x1x10 = 70ns
--------------------------------------------------------------------------------------------------------------------------
Total time needed in CO stage = 70ns
Time needed in FO/WO stage:
There is no operand for Unary instructions.
So Memory Access Time(MAT) in FO/WO stage for Unary instructions = 0ns
Number of trinary instructions that use/need one byte operand = 70 x 0.1 = 7
Number of trinary instructions that use/need two byte operand = 70 x 0.9 = 63
So Memory Access Time(MAT) in FO/WO stage for Trinary instructions = 7x1x10 + 63x2x10 = 1,330 ns
--------------------------------------------------------------------------------------------------------------------------------------------------
Total time needed in FO/WO stage = 1,330ns
So, Total Memory Access Time(TMAT) to execute that program = 2,400ns + 70ns + 1,330ns = 3,800ns
NB: Hope it helps. Let me know any concern
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.