Sponsored Links


Results 1 to 3 of 3

Thread: S501 Advance Computer Architecture Assignments No. 2 Solutions Fall 2014

  1. #1
    Administrator Vuhelper's Avatar
    Join Date
    Apr 2011
    Posts
    9,578

    S501 Advance Computer Architecture Assignments No. 2 Solutions Fall 2014

    Sponsored Links1




    CS501 Advance Computer Architecture Assignments No. 2 December Fall 2014

    Sponsored Links


    Question No. 1 10 Marks


    Given are the assembly language instructions for Falcon-A processor. Write behavioral RTL description for each of the given instructions.

    Jpl r5, [20]
    Mul r3, r2, r1
    Div r5, r2, 6
    Load r4, [r3 +9]
    Shr r6, r3, 2




    Question No. 2 10 Marks


    Write assembly language instructions for Falcon-E processor to implement the given arithmetic expression.

    C = ((5B + 4) ÷ 3) × 8A






  2. #2
    Administrator Vuhelper's Avatar
    Join Date
    Apr 2011
    Posts
    9,578
    Follow this example for Question No. 2
    z = 4(a +b) – 16(c+58) page 57 and 58 handouts
    Solution A:
    Notice that the
    SRC does not have a multiply instruction.
    multiplication with powers of 2 can be achieved by repeated shift left operations.
    ld R1, c ; c is a label used for a memory location
    addi R3, R1, 58 ; R3 contains (c+58)
    shl R7, R3, 4 ; R7 contains 16(c+58)
    ld R4, a
    ld R5, b
    add R6, R4, R5 ; R6 contains (a+b)
    shl R8, R6, 2 ; R8 contains 4(a+b)
    sub R9, R7, R8 ; the result is in R9
    st R9, z ; store the result in memory location z
    Assuming Multiply instruction
    ld R1, c ; c is a label used for a memory location
    addi R3, R1, 58 ; R3 contains (c+58)
    mul R7, R3, 4 : R7 contains 16(c+58)
    ld R4, a
    ld R5, b
    add R6, R4, R5 ; R6 contains (a+b)
    mul R8, R6, 2 ; R8 contains 4(a+b)
    sub R9, R7, R8 ; the result is in R9
    st R9, z ; store the result in memory location z

  3. #3
    Administrator Vuhelper's Avatar
    Join Date
    Apr 2011
    Posts
    9,578
    heck these handout examples and try to solve Question No.1
    jpl (op-code= 16) In this instruction, the value contained in the register specified page 94
    in the field ra is checked, and if it is positive, the jump is taken.
    jpl r3, [label] (R[3]≥0): PC ← PC+ (label-PC);

    mul r5, r7, r1 page-97
    The RTL notation for this instruction will be
    R[0] © R[5] ← R[7]*R[1]
    4. div (op-code= 5) page-97
    This instruction will divide the value of the register that is the second operand, by the
    number in the register specified by the third operand, and assign the result to the
    destination register.
    div r4, r7, r2 R[4]←R[0] ©R[7]/R[2],R[0]←R[0] ©R[7]%R[2]

    load (op-code= 29)
    This instruction is to load a register from the memory. For instance, the
    instruction
    load r1, [r4 +15]
    will add the constant 15 to the value stored in theregister r4, access the memory
    location that corresponds to the number thus resulting, and assign the memory
    contents of this location to the register r1; this is denoted in RTL by:
    R[1] ← M[R[4]+15]

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 1
    Last Post: 12-09-2014, 01:49 PM
  2. Replies: 0
    Last Post: 11-24-2014, 07:28 PM
  3. CS501 Advance Computer Architecture Close Date Fall 2014 18th November 2014
    By education-2014 in forum Assignments & Solutions
    Replies: 1
    Last Post: 11-18-2014, 11:01 PM
  4. CS501 Advance Computer Architecture Assignment No. 03 ( Non-Graded ) Fall 2014
    By vuassignments in forum Assignments & Solutions
    Replies: 0
    Last Post: 01-17-2014, 04:27 PM
  5. Replies: 0
    Last Post: 08-28-2010, 06:13 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
-: Vuhelp Disclaimer :-
None of the files shown here are hosted or transmitted by this server. The links are provided solely by this site's users. The administrator's or staff of Vuhelp.net cannot be held responsible for what its users post, or any other actions of its users. You may not use this site to distribute or download any material when you do not have the legal rights to do so. It is your own responsibility to adhere to these terms. If you have any doubts about legality of content or you have any suspicions, feel free to contact us.
Online Education | JhelumSoft