Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

uestion 2 Consider the Assemble program below. It is used to copy 3 byte-size data from program memory to data memory .cseg .org 0 rjmp

image text in transcribed

image text in transcribed

uestion 2 Consider the Assemble program below. It is used to copy 3 byte-size data from program memory to data memory .cseg .org 0 rjmp start const:.db 0x12, 0x34, 0x56 start: I2 3 4 ldi ZL, low (const1) ldi ZH, high (const1) ldi YL, low (var) ldi YH, high (var) ldi r16, 0 loop: 1pm r17, Z+ st Y+, r17 inc r16 cpi r16, 3 brlo loop 6 9 done: rjmp done .dseg .org 0x200 var: .byte3 As we know, AVR architecture adopts a very simple pipleline mechanism with a "fetch-execution" cycle for each instruction. Each fetch operation takes 1 CPU cycle, but the number of CPU cycles for execution operations varies. In this program, LPM instruction take 3 CPU cycles to execute, ST takes 2, other in structions take 1 Answer the following questions by constructions the pipeline diagram for this program (only considering instructions lo to /o unless 111 is needed to be pre- fetched) (1) How many CPU cycles are needed to execute this program til jump into the dead loop, same to other questions)? [6 (2) Find out all structural hazards and control hazards during the execution of this program. [4 3) How many CPU cycles are needed to execute this program if a branch pre- (4) Calculate the improvement ratio (-(N-N')/N where N is the number of cycles without prediction and N" is the number of cycles with prediction) for the strategy in (4). [4]

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

Contemporary Issues In Database Design And Information Systems Development

Authors: Keng Siau

1st Edition

1599042894, 978-1599042893

More Books

Students also viewed these Databases questions

Question

Why is combining voice and data a major organizational challenge?

Answered: 1 week ago

Question

7. List behaviors to improve effective leadership in meetings

Answered: 1 week ago

Question

6. Explain the six-step group decision process

Answered: 1 week ago