SOLUTION:
This solution having explanation ,proper diagram and step by step procedure for
clear and better understanding.
EXPLANATION:
before going to direct answer let's first understand the Addresssing modes for
nore visulization further.
Addressing mode (AM) : The different way by which you can get operand .
there are different Addressing modes depending upon situation ,one
AM is used for more than one addressing mode is used.
and below is the complete calcaulation of AC register on taking 4 types of
Addressing modes.
since each everyting is provided for better and clear understanding .
However further if any difficulty in understanding the above then feel
free to ask in comments section.
i will surely help you.
Consider the following assembly code writen toARI Load 100 Add 200 Now suppose that MARIE can...
MARIE Assembly Code Problem For the following problem, please create new MARIE instructions by providing the full MARIE RTN (register transfer notation) for the described operation. Your answer should include the fetch, decode, operand fetch (if necessary), execution and store result (if necessary) stages. When you see X in these instructions, this is a main memory address (the last 12 bits of the 16-bit instruction) – refer to this as IR[11..0] and not X. Problem: LoadZero X – this is...
Question 21 Suppose we have the instruction Load 800. Given register R1 has the value 300 and memory as follows: Memory 800 900 900 1000 1000 500 1100 600 1200 800 What would be loaded into the AC if the addressing mode for the operation is indexed relative to R1?
Consider the following assembly code. 1. 1, LOAD R, #1 2, LOADS, #1 3, LOAD T, #(k-3) 4. ADD AC, R, S 5. LOAD R, S 6. LOAD S, AC 8. BRP 4, T 9. STOR AC, M where R, S, T, AC are is addressing and BRP stands for "branch if positive". sters, M is a memory location, # indicates immediate (a) Explain what this code computes (assuming that k is a natural number greater than two). (6 marks)...
1. Please show only structural hazards. mov [100], [150] mov [200], [250] add [150], [250], r3 sub r3, #5, r4 add r3, #2, r5 div r4, r5, r6 Instruction encoding: instruction op1, op2, result; [xxxx] – memory address; #x – constant; rx – register. 2. Please show only data hazards. mov [100], [150] mov [200], [300] add [100], [150], [300] add [300], #100, [322] add [300], #200, [333] sub [250], [333], [326] 4. Write program (in pseudo assembler code) for...
a) Describe the main techniques used by superscalar processors to achieve a high degree of machine-level parallelism. Consider the following assembly code: I1: LOAD r3 (r1) TO 12: MOVE r4 #1 13: ADD r3 r3 r4 I4: LOAD r2 (r2) 15: MOVE r4 #2 I6: MUL r2 r2 r4 17: MUL r3 r3 r2 I8: LOAD r4 (r1) 19: MOVE r1 #3 I10: ADD r4 r4 r1 I11: MUL r3 r3 r4 Using register renaming reorganise the code from the...
Consider the following MIPS assembly language instructions: addi $1, $2, 100 swr $1, 0($2): addi $rt, $rs, immediate # add immediate swr $rt, immedi ate ($rs) # store word write register These instructions are I-format instructions similar to the load word and store word instructions. The addi and swr instructions store a computed value to the destina- tion register $rt. The instructions do not require any physical hardware changes to the datapath. The effect of each instruction is given below....
Consider the following operations: A B- C The corresponding assembly code instruction list generated by a compiler are 1 load [%r0 +4], %r1 2 load [%r0 + 8], %r2 3 sub %r1, %r2,%r3 4 load [ZrO + 12], %r4 5 add %r3, %r4 , %r5 6 store %r3, [%r0 + 16] 7 store %r5, [%r0 + 20] a) Identify the potential pipeline hazards. (10 points) b) State if the found hazards can be eliminated and if so propose a scheme...
Ch04.2. [3 points] Consider the following assembly language code: I0: ADD R4 R1RO I1: SUB R9R3 R4; I2: ADD R4 - R5+R6 I3: LDW R2MEMIR3100]; 14: LDW R2 = MEM [R2 + 0]; 15: STW MEM [R4 + 100] = R3 ; I6: AND R2R2 & R1; 17: BEQ R9R1, Target; I8: AND R9 R9&R1 Consider a pipeline with forwarding, hazard detection, and 1 delay slot for branches. The pipeline is the typical 5-stage IF, ID, EX, MEM, WB MIPS...
Implement the following statements using MS430 assembly instructions. You may use more than one, but you should minimize the number of instructions required. You can use both native and emulated instructions. Use hex notation for all numbers 1. (a) Move the word located in register R14 to R15 (b) Increment the word in R6 by 2. (c) Perform a bitwise ANDing of the word located at address 0x0240 with the datum in R15, placing the results in R15. (d) Rotate...
4.9 [10/20/20/15/15]<4.2> Consider the following code, which multiplies two vec- tors that contain single-precision complex values: for (i-0:i <300:i++) Assume that the processor runs at 700 MHz and has a maximum vector length of 64. The load/store unit has a start-up overhead of 15 cycles; the multiply unit, 8 cycles; and the add/subtract unit, 5 cycles. a. [101 <4.3> What is the arithmetic intensity of this kemel? Justify your answer. b. [20] <4.2> Convert this loop into RV64V assembly code...