retagged by
382 views
0 votes
0 votes
Consider the following assembly code:
Instruction Description
LD R1, 45(R2) Read data from memory and store in R1. Memory address is calculated by adding 45 to the content of R2
ADD R7, R1, R5 Add contents of R1 and R5 and store to R7
SUB R8, R1, R7 Subtract content of R7 from content of R1 and save to R8
XOR R7, R8, R8 Logical Ex-OR between contents of R8 & R8. Store result to R7
BEZ R7, Target Jump to Target if R7 is Zero
LD R5, 50(R2) Read data from memory and store in R5. Memory address is calculated by adding 50 to the content of R2
LD R8, 45(R2) Read data from memory and store in R8. Memory address is calculated by adding 45 to the content of R2
ADD R10, R8, R5 Add contents of R8 and R5 and store to R10
Target: AND R2, R3, R4 Logical AND between contents of R3 & R4. Store result to R2
ADD R10, R8, R2 Add contents of R2 and R8 and store to R10
END

 

 

*Use five-stage pipeline containing fetch, decode, memory read, execute, write-back units, show the execution of above instructions. Data
dependencies and control hazards, if detected must be resolved by stalling the pipeline as required. Assume that a multi-port RAM is used with
the CPU running at 1GHz. Calculate the execution time and compare time that would have required in a non-pipelined processor to run the
same program.
retagged by

Please log in or register to answer this question.

Related questions

329
views
0 answers
0 votes
lucifer069 asked Sep 15, 2021
329 views
A computer system contains a main memory of 32KB. It also has a 4KB cache divided into four-lines/set with 64B per line. Assume that thecache is initially ... Assume an LRUpolicy for block replacement. Show the state of cache at the end.
2.7k
views
2 answers
2 votes
mauro5991 asked Aug 2, 2018
2,729 views
Assume that the control memory is 24 bits wide. The control portion of the microinstruction format is divided into two fields.A micro-operation field of 11 bits ... the address field? c. What is the maximum size of the control memory?
723
views
1 answers
1 votes
iabhay.gupta asked Dec 11, 2022
723 views
Consider a hypothetical processor which supports expand opcode technique. A 32bit instruction is place in 256MW memory. If there exist 10, one address instructionthen how many zero-address instruction are possible.
328
views
0 answers
1 votes
kidussss asked Sep 1, 2022
328 views
1. In memory hierarchy the fattest memory type is cache memory next to register. So describe mapping process(transformation data from memory to cache memory)