1 / 6

מבנה המחשב – מבוא למחשבים ספרתיים

מבנה המחשב – מבוא למחשבים ספרתיים. The ISA of the Simplified DLX. Problem #1. if(i==j) goto L1; f=g+h; L1: f=f-i;. xor r1 r19 r20 beqz r1 1 add r16 r17 r18 sub r16 r16 r19. LEGEND: r16 = f r17 = g r18 = h r19 = i r20 = j r21 = k. Problem #2. if(i==j) skip to else f=g+h; else

marc
Download Presentation

מבנה המחשב – מבוא למחשבים ספרתיים

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. מבנה המחשב – מבוא למחשבים ספרתיים The ISA of the Simplified DLX

  2. Problem #1 if(i==j) goto L1; f=g+h; L1: f=f-i; xor r1 r19 r20 beqz r1 1 add r16 r17 r18 sub r16 r16 r19 LEGEND: r16 = f r17 = g r18 = h r19 = i r20 = j r21 = k

  3. Problem #2 if(i==j) skip to else f=g+h; else f=g-h; xor r1 r19 r20 bnez r1 2 add r16 r17 r18 beqz r1 1 sub r16 r17 r18

  4. Problem #3 LOOP: g=g + A[i] ; i=i+j; if((i!=h) goto LOOP; addi r4 r0 Astart add r1 r4 r19 lw r2 r1 0 add r17 r17 r2 add r19 r19 r20 xor r3 r19 r18 bnez r3 -6 Address of A[0] = Astart

  5. Problem #4 while ( save[i] == save[k-i] ) i=i+1; addi r4 r0 Sstart add r1 r4 r19 sub r2 r20 r19 add r3 r4 r2 lw r5 r1 0 lw r6 r3 0 xor r7 r5 r6 bnez r7 2 addi r19 r19 1 beqz r0 -9 Address of save[0] = Sstart

  6. Problem #5 addi r4 r21 0 bnez r4 2 add r16 r19 r20 beqz r0 11 addi r4 r4 -1 bnez r4 2 add r16 r17 r18 beqz r0 7 addi r4 r4 -1 bnez r4 2 sub r16 r17 r18 beqz r0 3 addi r4 r4 -1 bnez r4 1 sub r16 r19 r20 switch(k){ case 0: f=i+j; break; case 1: f=g+h; break; case 2: f=g-h; break; case 3: f=i-j; }

More Related