scram instructions
play

SCRAM Instructions Philipp Koehn 16 September 2019 Philipp Koehn - PowerPoint PPT Presentation

SCRAM Instructions Philipp Koehn 16 September 2019 Philipp Koehn Computer Systems Fundamentals: SCRAM Instructions 16 September 2019 Reminder 1 Fully work through a computer circuit assembly code Simple but Complete Random


  1. SCRAM Instructions Philipp Koehn 16 September 2019 Philipp Koehn Computer Systems Fundamentals: SCRAM Instructions 16 September 2019

  2. Reminder 1 • Fully work through a computer – circuit – assembly code • Simple but Complete Random Access Machine (SCRAM) – every instruction is 8 bit – 4 bit for op-code: 9 different operations (of 16 possible) – 4 bit for address: 16 bytes of memory • Background reading on web page – The Random Access Machine – The SCRAM Philipp Koehn Computer Systems Fundamentals: SCRAM Instructions 16 September 2019

  3. Circuit (At This Point) 2 W W MAR A 16x8 RAM W PC DI DO INC W MBR W IR C D Decoder Q Control Logic Unit T NOT INC CLEAR Decoder T Philipp Koehn Computer Systems Fundamentals: SCRAM Instructions 16 September 2019

  4. Instruction Fetch 3 • Retrieve instruction from memory • Increase program counter Time Command MAR ← PC t 0 MBR ← M, PC ← PC + 1 t 1 IR ← MBR t 2 Philipp Koehn Computer Systems Fundamentals: SCRAM Instructions 16 September 2019

  5. 4 lda Philipp Koehn Computer Systems Fundamentals: SCRAM Instructions 16 September 2019

  6. Micro Program 5 • Load into accumulator Op Code Time Command MAR ← IR(D) q 1 t 3 MBR ← M q 1 t 4 AC ← MBR q 1 t 5 Philipp Koehn Computer Systems Fundamentals: SCRAM Instructions 16 September 2019

  7. Accumulator 6 W W A MAR 16x8 RAM W PC DO DI INC W MBR W IR C D Decoder Q W AC Control Logic Unit T NOT INC CLEAR Decoder T Philipp Koehn Computer Systems Fundamentals: SCRAM Instructions 16 September 2019

  8. AC ← MBR 7 W W A MAR 16x8 RAM W PC DO DI INC W MBR W IR C D Decoder Q W AC Control Logic Unit T NOT Accumulator receives value INC CLEAR from memory buffer (MBR) Decoder T Philipp Koehn Computer Systems Fundamentals: SCRAM Instructions 16 September 2019

  9. MAR ← IR(D) 8 W W MAR A 16x8 RAM W PC DI DO INC W MBR W IR C D Decoder Q W AC Control Logic Unit T NOT Memory address comes from INC CLEAR data field of instruction Decoder T Philipp Koehn Computer Systems Fundamentals: SCRAM Instructions 16 September 2019

  10. MAR ← IR(D) 9 W W MAR A 16x8 RAM W S PC Selector DI DO INC W MBR W IR C D Decoder Q W AC Control Logic Unit T NOT Selector INC CLEAR picks between inputs Decoder T Philipp Koehn Computer Systems Fundamentals: SCRAM Instructions 16 September 2019

  11. 10 let’s do this again but focus on flags Philipp Koehn Computer Systems Fundamentals: SCRAM Instructions 16 September 2019

  12. Micro Program 11 • Load into accumulator Op Code Time Command MAR ← IR(D) q 1 t 3 MBR ← M q 1 t 4 AC ← MBR q 1 t 5 Philipp Koehn Computer Systems Fundamentals: SCRAM Instructions 16 September 2019

  13. q 1 t 3 : MAR ← IR(D) 12 W W MAR A 16x8 RAM W S PC Selector DI DO INC W MBR W IR C D Decoder Q W AC Control Logic Unit T NOT INC CLEAR Decoder T Philipp Koehn Computer Systems Fundamentals: SCRAM Instructions 16 September 2019

  14. q 1 t 4 : MBR ← M 13 W W MAR A 16x8 RAM W S PC Selector DI DO INC W MBR W IR C D Decoder Q W AC Control Logic Unit T NOT INC CLEAR Decoder T Philipp Koehn Computer Systems Fundamentals: SCRAM Instructions 16 September 2019

  15. q 1 t 5 : AC ← MBR 14 W W MAR A 16x8 RAM W S PC Selector DI DO INC W MBR W IR C D Decoder Q W AC Control Logic Unit T NOT INC CLEAR Decoder T Philipp Koehn Computer Systems Fundamentals: SCRAM Instructions 16 September 2019

  16. 15 control logic unit Philipp Koehn Computer Systems Fundamentals: SCRAM Instructions 16 September 2019

  17. Objective 16 W IR C D • Given – Instruction op code Q Decoder – Time step in micro program T Q • Output Control Logic – signals to register transfer Unit – signals to selectors T NOT INC CLEAR Decoder T Philipp Koehn Computer Systems Fundamentals: SCRAM Instructions 16 September 2019

  18. Example 17 • Step in micro program: q 1 t 3 MAR ← IR(D) • Needs to signal – MAR write flag set – MAR’s selector to input IR(D) W W A MAR 16x8 RAM W S PC Selector DI DO INC W IR C D Philipp Koehn Computer Systems Fundamentals: SCRAM Instructions 16 September 2019

  19. Add Wires to the Circuit 18 W W A MAR 16x8 RAM W PC S Selector DI DO INC W MBR W IR C D Decoder Q W AC x1 Control x2 Logic Unit T NOT INC CLEAR Decoder T Philipp Koehn Computer Systems Fundamentals: SCRAM Instructions 16 September 2019

  20. Inside the Control Logic Unit 19 Decoder to selectior to MAR write q1 x1 x2 t5 Decoder Micro instruction: q 1 AND t 5 : MAR ← IR(D) Philipp Koehn Computer Systems Fundamentals: SCRAM Instructions 16 September 2019

  21. Inside the Control Logic Unit 20 Decoder to selectior to MAR write q1 x1 x2 AND t5 Decoder Micro instruction: q 1 AND t 5 : MAR ← IR(D) Philipp Koehn Computer Systems Fundamentals: SCRAM Instructions 16 September 2019

  22. Inside the Control Logic Unit 21 Decoder to selectior to MAR write q1 x1 x2 OR AND t5 Decoder Micro instruction: q 1 AND t 5 : MAR ← IR(D) Set signal to MAR write flag Philipp Koehn Computer Systems Fundamentals: SCRAM Instructions 16 September 2019

  23. Inside the Control Logic Unit 22 Decoder to selectior to MAR write q1 x1 OR x2 OR AND t5 Decoder Micro instruction: q 1 AND t 5 : MAR ← IR(D) Set appropriate value to MAR selector Philipp Koehn Computer Systems Fundamentals: SCRAM Instructions 16 September 2019

  24. Inside the Control Logic Unit 23 Decoder to selectior to MAR write q1 x1 OR x2 OR AND t5 OR Decoder Micro instruction: q 1 AND t 5 : MAR ← IR(D) Increase micro program time step Philipp Koehn Computer Systems Fundamentals: SCRAM Instructions 16 September 2019

  25. Inside the Control Logic Unit 24 Control logic is a large matrix t 0 t 1 t 2 t 3 t 4 t 5 t 6 t 7 t 8 * * * * * * * * * q 0 * * * * * * * * * q 1 * * * * * * * * * q 2 * * * * * * * * * q 3 * * * * * * * * * q 4 * * * * * * * * * q 5 * * * * * * * * * q 6 * * * * * * * * * q 7 * * * * * * * * * q 8 Philipp Koehn Computer Systems Fundamentals: SCRAM Instructions 16 September 2019

  26. Inside the Control Logic Unit 25 Control logic is a large matrix t 0 t 1 t 2 t 3 t 4 t 5 t 6 t 7 t 8 * * * * * * * * * q 0 * * * * * * * * * q 1 * * * * * * * * * q 2 * * * * * * * * * q 3 * * * * * * * * * q 4 * * * * * * * * * q 5 * * * * * * * * * q 6 * * * * * * * * * q 7 * * * * * * * * * q 8 Philipp Koehn Computer Systems Fundamentals: SCRAM Instructions 16 September 2019

  27. Inside the Control Logic Unit 26 Control logic is a large matrix t 0 t 1 t 2 t 3 t 4 t 5 t 6 t 7 t 8 * * * * * * * * * q 0 * * * * * * * * q 1 x 1 x 2 t * * * * * * * * * q 2 * * * * * * * * * q 3 * * * * * * * * * q 4 * * * * * * * * * q 5 * * * * * * * * * q 6 * * * * * * * * * q 7 * * * * * * * * * q 8 Philipp Koehn Computer Systems Fundamentals: SCRAM Instructions 16 September 2019

  28. 27 ldi Philipp Koehn Computer Systems Fundamentals: SCRAM Instructions 16 September 2019

  29. LDI: Load Indirectly 28 • Specified memory address contains address for value • Basically a pointer operation • Steps – load value of specified memory address – use that value as a memory address (second lookup) – store value from second lookup into accumulator Philipp Koehn Computer Systems Fundamentals: SCRAM Instructions 16 September 2019

  30. Micro Program for LDI 29 • Load indirectly into accumulator Op Code Time Command MAR ← IR(D) q 2 t 3 MBR ← M q 2 t 4 MAR ← MBR q 2 t 5 MBR ← M q 2 t 6 AC ← MBR q 2 t 7 Philipp Koehn Computer Systems Fundamentals: SCRAM Instructions 16 September 2019

  31. q 2 t 3 : MAR ← IR(D) 30 W W MAR A 16x8 RAM W S PC Selector DI DO INC W MBR W IR C D Decoder Q W AC Control Logic Unit T NOT INC CLEAR Decoder T Philipp Koehn Computer Systems Fundamentals: SCRAM Instructions 16 September 2019

  32. q 2 t 4 : MBR ← M 31 W W MAR A 16x8 RAM W S PC Selector DI DO INC W MBR W IR C D Decoder Q W AC Control Logic Unit T NOT INC CLEAR Decoder T Philipp Koehn Computer Systems Fundamentals: SCRAM Instructions 16 September 2019

  33. q 2 t 5 : MAR ← MBR 32 W W MAR A 16x8 RAM W S PC Selector DI DO INC W MBR W IR C D Decoder Q W AC Control Logic Unit T NOT INC CLEAR Decoder T Philipp Koehn Computer Systems Fundamentals: SCRAM Instructions 16 September 2019

  34. q 2 t 6 : MBR ← M 33 W W MAR A 16x8 RAM W S PC Selector DI DO INC W MBR W IR C D Decoder Q W AC Control Logic Unit T NOT INC CLEAR Decoder T Philipp Koehn Computer Systems Fundamentals: SCRAM Instructions 16 September 2019

  35. q 2 t 7 : AC ← MBR 34 W W MAR A 16x8 RAM W S PC Selector DI DO INC W MBR W IR C D Decoder Q W AC Control Logic Unit T NOT INC CLEAR Decoder T Philipp Koehn Computer Systems Fundamentals: SCRAM Instructions 16 September 2019

  36. 35 sta Philipp Koehn Computer Systems Fundamentals: SCRAM Instructions 16 September 2019

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend