Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1. (4) Shown below in Listing 1 is a very simple loop in Nios II assembly code. For the two branches, indicate what the branch
1. (4) Shown below in Listing 1 is a very simple loop in Nios II assembly code. For the two branches, indicate what the branch predictor would yield (i.e., predict "taken" or predict "not taken") for the /e and the /s cores. Justify your answer.|| Listing 1: A Simple Nios Assembly Loop # Initialize various values/counters movui r16, 10 movia r15, dataArray mov r14, r0 # The Loop! SimpleLoop: 1dw r6, 0(115) bne ro, r6, NextIter addi r14, r14, 1 NextIter: addi r15, r15, 4 subi r16, 116, 1 bne r16, ro, SimpleLoop # The end 2. (6) If the relatively senseless code below is running on a Nios II /e core, approximately how long does it take (in cycles) to execute the code? Show your work. In any case where the instruction timing is vague (e.g., "Duration of Avalon-MM read transfer"), report the answer as precisely as possible, including multiples of vague delays. movia r7, a Value movia r8, another Value 1dw r9, 0(17) 1db r10, 0(18) add r10, r9, r10 slli r10, 110, 4 sth r10, 0(17) 1. (4) Shown below in Listing 1 is a very simple loop in Nios II assembly code. For the two branches, indicate what the branch predictor would yield (i.e., predict "taken" or predict "not taken") for the /e and the /s cores. Justify your answer.|| Listing 1: A Simple Nios Assembly Loop # Initialize various values/counters movui r16, 10 movia r15, dataArray mov r14, r0 # The Loop! SimpleLoop: 1dw r6, 0(115) bne ro, r6, NextIter addi r14, r14, 1 NextIter: addi r15, r15, 4 subi r16, 116, 1 bne r16, ro, SimpleLoop # The end 2. (6) If the relatively senseless code below is running on a Nios II /e core, approximately how long does it take (in cycles) to execute the code? Show your work. In any case where the instruction timing is vague (e.g., "Duration of Avalon-MM read transfer"), report the answer as precisely as possible, including multiples of vague delays. movia r7, a Value movia r8, another Value 1dw r9, 0(17) 1db r10, 0(18) add r10, r9, r10 slli r10, 110, 4 sth r10, 0(17)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started