introduc on to marie
play

Introduc>on to MARIE 2 Schedule Today and Monday - PowerPoint PPT Presentation

Computer Systems and Networks ECPE 170 Jeff Shafer University of the Pacific Introduc>on to MARIE 2 Schedule Today and Monday


  1. ì ¡ Computer ¡Systems ¡and ¡Networks ¡ ECPE ¡170 ¡– ¡Jeff ¡Shafer ¡– ¡University ¡of ¡the ¡Pacific ¡ Introduc>on ¡to ¡ MARIE ¡

  2. 2 ¡ Schedule ¡ ì Today ¡and ¡Monday ¡13 th ¡ ¡ ì Introduce ¡new ¡machine ¡architecture ¡ ì Web ¡15 th ¡and ¡Fri ¡17 th ¡ ¡ ì Assembly ¡programming ¡tutorial ¡ Computer ¡Systems ¡and ¡Networks ¡ Spring ¡2012 ¡

  3. 3 ¡ Review ¡Exercise ¡– ¡Memory ¡Organization ¡ ì Exercise: ¡ ¡Build ¡a ¡1M ¡x ¡16 ¡word-­‑addressable ¡main ¡ memory ¡using ¡128K ¡x ¡4 ¡RAM ¡chips. ¡ How ¡many ¡address ¡bits ¡are ¡needed ¡per ¡RAM ¡chip? ¡ 1. How ¡many ¡RAM ¡chips ¡are ¡there ¡per ¡word? ¡ 2. How ¡many ¡RAM ¡chips ¡are ¡necessary? ¡ 3. How ¡many ¡address ¡bits ¡are ¡needed ¡for ¡all ¡memory? ¡ 4. How ¡many ¡address ¡bits ¡would ¡be ¡needed ¡if ¡it ¡were ¡byte ¡ 5. addressable? ¡ How ¡many ¡banks ¡will ¡there ¡be? ¡ 6. What ¡bank ¡would ¡contain ¡address ¡47129 16 ¡with ¡(a) ¡high-­‑ 7. order ¡interleaving ¡or ¡(b) ¡low-­‑order ¡interleaving? ¡ Computer ¡Systems ¡and ¡Networks ¡ Spring ¡2012 ¡

  4. 4 ¡ Solution ¡to ¡Exercise ¡ Each ¡RAM ¡chip ¡has ¡128K ¡loca>ons: ¡ ¡ ¡2 7 ¡* ¡2 10 ¡= ¡ 17 ¡bits ¡ 1. Each ¡RAM ¡chip ¡loca>on ¡stores ¡4 ¡bits, ¡but ¡we ¡need ¡16: ¡ ¡ 2. ¡ 4 ¡chips ¡needed ¡per ¡word ¡ 1. Each ¡RAM ¡chip ¡has ¡128K ¡loca>ons, ¡but ¡we ¡need ¡1M ¡loca>ons: ¡ ¡ 3. ¡1M/128K ¡= ¡8 ¡(>mes ¡4 ¡chips ¡per ¡word) ¡= ¡ 32 ¡RAM ¡chips ¡(8 ¡rows, ¡4 ¡columns) ¡ 1. Memory ¡is ¡1M: ¡ ¡2^20 ¡= ¡ 20 ¡bits ¡for ¡all ¡of ¡memory ¡ 4. Byte ¡addressable ¡adds ¡1 ¡more ¡bit ¡here ¡(to ¡select ¡either ¡the ¡lower ¡8 ¡or ¡upper ¡8 ¡of ¡the ¡16 ¡bit ¡long ¡ 5. word): ¡ ¡ 21 ¡bits ¡ 8 ¡banks ¡of ¡memory, ¡where ¡each ¡bank ¡has ¡4 ¡chips ¡ 6. Address ¡is ¡20 ¡bits ¡long, ¡bank ¡is ¡upper ¡3 ¡bits ¡(2^3=8): ¡ 7. 47129(16) ¡= ¡0100 ¡0111 ¡0001 ¡0010 ¡1001 ¡(2) ¡ With ¡high-­‑order ¡interleaving, ¡bank ¡is ¡ #2 ¡ With ¡low-­‑order ¡interleaving, ¡bank ¡is ¡ #1 ¡ Computer ¡Systems ¡and ¡Networks ¡ Spring ¡2012 ¡

  5. 5 ¡ MARIE ¡ ì Simple ¡model ¡computer ¡used ¡in ¡this ¡class ¡ ì MARIE ¡ ì M achine ¡ A rchitecture ¡that ¡is ¡ ¡ R eally ¡ I ntui>ve ¡and ¡ E asy ¡ ì Designed ¡for ¡educa>on ¡only ¡ ì While ¡this ¡system ¡is ¡too ¡simple ¡to ¡do ¡anything ¡ useful ¡in ¡the ¡real ¡world, ¡a ¡deep ¡understanding ¡of ¡its ¡ func>ons ¡will ¡enable ¡you ¡to ¡comprehend ¡system ¡ architectures ¡that ¡are ¡much ¡more ¡complex ¡ Computer ¡Systems ¡and ¡Networks ¡ Spring ¡2012 ¡

  6. 6 ¡ MARIE ¡Spec ¡Sheet ¡ ì Key ¡characteris>cs ¡of ¡MARIE ¡architecture: ¡ ì Binary, ¡two’s ¡complement ¡data ¡representa>on ¡ ì Stored ¡program ¡ ì Fixed ¡word ¡length ¡data ¡and ¡instruc>ons ¡ ì 4K ¡words ¡of ¡word-­‑addressable ¡main ¡memory ¡ ì 16-­‑bit ¡data ¡words ¡ ì 16-­‑bit ¡instruc>ons ¡ ì 4 ¡for ¡the ¡opcode ¡and ¡12 ¡for ¡the ¡address ¡ ì A ¡16-­‑bit ¡arithme>c ¡logic ¡unit ¡(ALU) ¡ ì Seven ¡registers ¡for ¡control ¡and ¡data ¡movement ¡ Computer ¡Systems ¡and ¡Networks ¡ Spring ¡2012 ¡

  7. 7 ¡ MARIE ¡Registers ¡(1-­‑3) ¡ ì Accumulator ¡(AC) ¡ ì 16-­‑bit ¡register ¡that ¡holds ¡a ¡condi>onal ¡operator ¡ (e.g., ¡"less ¡than") ¡or ¡one ¡operand ¡of ¡a ¡two-­‑operand ¡ instruc>on. ¡ ì Memory ¡address ¡register ¡(MAR) ¡ ì 12-­‑bit ¡register ¡that ¡holds ¡the ¡memory ¡address ¡of ¡an ¡ instruc>on ¡or ¡the ¡operand ¡of ¡an ¡instruc>on. ¡ ¡ ¡ ì Memory ¡buffer ¡register ¡(MBR) ¡ ì 16-­‑bit ¡register ¡that ¡holds ¡the ¡data ¡acer ¡its ¡retrieval ¡ from, ¡or ¡before ¡its ¡placement ¡in ¡memory. ¡ Computer ¡Systems ¡and ¡Networks ¡ Spring ¡2012 ¡

  8. 8 ¡ MARIE ¡Registers ¡(4-­‑7) ¡ Program ¡counter ¡(PC) ¡ ì 12-­‑bit ¡register ¡that ¡holds ¡the ¡address ¡of ¡the ¡next ¡program ¡ ì instruc>on ¡to ¡be ¡executed ¡ InstrucWon ¡register ¡(IR) ¡ ì 16-­‑bit ¡register ¡that ¡holds ¡an ¡instruc>on ¡immediately ¡ ì preceding ¡its ¡execu>on ¡ Input ¡register ¡(InREG) ¡ ì 8-­‑bit ¡register ¡that ¡holds ¡data ¡read ¡from ¡an ¡input ¡device ¡ ì Output ¡register ¡(OutREG) ¡ ì 8-­‑bit ¡register ¡that ¡holds ¡data ¡that ¡is ¡ready ¡for ¡the ¡output ¡ ì device ¡ Computer ¡Systems ¡and ¡Networks ¡ Spring ¡2012 ¡

  9. 9 ¡ MARIE ¡Architecture ¡ Computer ¡Systems ¡and ¡Networks ¡ Spring ¡2012 ¡

  10. 10 ¡ MARIE ¡Data ¡Path ¡ ì Common ¡data ¡bus ¡ Links ¡main ¡memory ¡and ¡registers ¡ ì Each ¡device ¡iden>fied ¡by ¡unique ¡ ì number ¡ Bus ¡has ¡control ¡lines ¡that ¡iden>fy ¡ ì device ¡used ¡in ¡opera>on ¡ ì Dedicated ¡data ¡paths ¡ Permits ¡data ¡transfer ¡between ¡ ì accumulator ¡(AC), ¡ ¡ memory ¡buffer ¡register ¡(MBR), ¡and ¡ ALU ¡without ¡using ¡main ¡data ¡bus ¡ Computer ¡Systems ¡and ¡Networks ¡ Spring ¡2012 ¡

  11. 11 ¡ ì ¡ MARIE ¡Instruction ¡Set ¡Architecture ¡ Computer ¡Systems ¡and ¡Networks ¡ Spring ¡2012 ¡

  12. 12 ¡ MARIE ¡ISA ¡ ì InstrucWon ¡Set ¡Architecture ¡(ISA) ¡ is ¡the ¡interface ¡ between ¡hardware ¡and ¡socware ¡ Specifies ¡the ¡format ¡of ¡processor ¡instruc>ons ¡ ¡ ì Specifies ¡the ¡primi>ve ¡opera>ons ¡the ¡processor ¡can ¡ ì perform ¡ ì Real ¡ISAs? ¡ Hundreds ¡of ¡different ¡instruc>ons ¡for ¡processing ¡data ¡ ì and ¡controlling ¡program ¡execu>on ¡ ì MARIE ¡ISA? ¡ Only ¡thirteen ¡instrucWons ¡ ì Computer ¡Systems ¡and ¡Networks ¡ Spring ¡2012 ¡

  13. 13 ¡ MARIE ¡Instructions ¡(Basic) ¡ Instruc>on ¡# ¡ See ¡table ¡ 4.7 ¡in ¡ Binary ¡ Hex ¡ InstrucWon ¡ Meaning ¡ book! ¡ 1 ¡ Load ¡contents ¡of ¡address ¡X ¡into ¡AC ¡ 0001 LOAD X 2 ¡ Store ¡contents ¡of ¡AC ¡at ¡address ¡X ¡ 0010 STORE X 3 ¡ Add ¡contents ¡of ¡address ¡X ¡to ¡AC ¡ 0011 ADD X 4 ¡ Subtract ¡contents ¡of ¡address ¡X ¡from ¡AC ¡ 0100 SUBT X 5 ¡ Input ¡value ¡from ¡keyboard ¡into ¡AC ¡ 0101 INPUT 6 ¡ Output ¡value ¡in ¡AC ¡to ¡display ¡ 0110 OUTPUT 7 ¡ Terminate ¡program ¡ 0111 HALT 8 ¡ SKIPCOND Skip ¡next ¡instruc>on ¡on ¡condi>on ¡based ¡on ¡AC ¡value ¡ 1000 9 ¡ Load ¡value ¡of ¡X ¡into ¡PC ¡ 1001 JUMP X … ¡plus ¡a ¡few ¡more ¡instruc2ons ¡we’ll ¡add ¡later… ¡ Computer ¡Systems ¡and ¡Networks ¡ Spring ¡2012 ¡

  14. 14 ¡ MARIE ¡Instructions ¡ ì How ¡do ¡we ¡format ¡these ¡instruc>ons ¡in ¡computer ¡ memory? ¡ ¡ ì Two ¡fields ¡ ì Opcode ¡(4 ¡bits) ¡– ¡Opera>on ¡code ¡ ì Address ¡(12 ¡bits) ¡– ¡Address ¡to ¡operate ¡to/from ¡ Computer ¡Systems ¡and ¡Networks ¡ Spring ¡2012 ¡

  15. 15 ¡ MARIE ¡Instruction ¡Example ¡-­‑ ¡LOAD ¡ ì Bit ¡palern ¡for ¡a ¡ LOAD ¡instruc>on ¡ Could ¡be ¡saved ¡in ¡memory ¡or ¡IR ¡(if ¡execu>ng ¡right ¡now) ¡ ì ¡ ì Decode ¡this ¡instrucWon ¡ Opcode ¡is ¡1 ¡– ¡LOAD ¡instruc>on ¡ ì Address ¡is ¡3 ¡– ¡Data ¡will ¡be ¡loaded ¡from ¡here ¡ ì ì What ¡is ¡the ¡Hex ¡representaWon ¡of ¡this ¡instrucWon? ¡ Computer ¡Systems ¡and ¡Networks ¡ Spring ¡2012 ¡

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