assignment2 - (1) decoder in control unit recognizes SWAP...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
#1: A= B + C x D; a. LOAD r0, C MULT r0, D ADD r0, B STORE r0, A b. LOAD r0, C LOAD r1, D MULT r0, r1 ADD r0, B STORE r0, A c. LOAD r0, C LOAD r1, D LOAD r2, B MULT r0, r1 ADD r0, r2 STORE r0, A #2: a. Fetch phase (1) Address in PC -> MAR (2) MAR -> Address Bus (3) Read signal -> Control Bus (4) Wait for memory (5) Content of location in memory -> Date bus (6) Date bus -> MDR (7) MDR -> IR b. INCBY4 [R1] (1) decoder in control unit recognizes INCBY instruction (2) get memory operand (content of memory at address in R1) (3) R1 -> Datapath (4) Datapath ->MAR (5) read and wait for memory (6) when memory answers: MDR ->datapath (7) datapath -> ALU[B] (8) select constant4 (9) select INCBY (10) ALU[result] -> Z (11) Z-> Datapath (12) datapath -> R1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
c. SWAP R1, [R2]
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: (1) decoder in control unit recognizes SWAP instruction (2) get memory operand (content of memory at address in R1) (3) R1 -> datapath (4) datapath -> MAR (5) read and wait for memory (6) when memory answears: MDR -> datapath (7) datapath -> R temp (copy the content of R1 to temp) (8) R2 -> datapath (9) datapath -> MAR (10) read and wait for memory (11) when memory answears: MDR -> datapath (12) datapath -> R1 (copy the content of R2 to R1) (10) R temp -> datapath (11) datapath -> MAR (12) read and wait for memory (13) when memory answears: MDR -> datapath (14) datapath -> R2 (copy the content of Rtemp back to R2)...
View Full Document

This note was uploaded on 01/15/2012 for the course CSC 230 taught by Professor Jasond.corless during the Summer '11 term at University of Victoria.

Page1 / 2

assignment2 - (1) decoder in control unit recognizes SWAP...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online