Published on

  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • HDD – mechanical magnetic cols floating above spinning surface Optical – mechanical. Laser emitter/detector floating above optical surface IC: transistor which store electrical charge. LOGICALLY they are similar to D flip/flops
  • Joey Sherman (HS English teacher) – the ultimate criticism is if no-one cares about the result – so how important is old data anyway? Mac address book: A sister in the ward got a Mac and it came with an address book. She filled the address book with hundreds of names of family and friends. Several years later she got a new Mac and transferred all her data over (successfully). She couldn’t open her address book, neither could techie family members nor the local Mac store gurus. The address book was a “throw-away” app; it was no longer available and not supported. It did not have an “export” feature. How was she to know it should have? Last I heard she was slowly and painfully trying to recreate the address book, name by name. How much faith should she now have in IT? Expert access and ordinary people access: An IT researcher may be able to retrieve data from an obsolete file format but can your grandparents retrieve their journals or can a NGO retrieve data to save the planet? Show & Tell Bring old book (foreign language?) Anyone can read – language may be a problem.
  • Class discussion: Create Grid Teams/Prizes!! Prize for most, prize for every category Is there such a thing as Volatile Read-only Mem? (Flip-flops set up as random number generator)
  • Class discussion:
  • Discuss how memory chips with only a few address bits are addressed by wider address buses
  • 200-2008 DRAM random access speed 40-50 ns Page mode 3-4 ns DRAM 1 xistor + 1 capacitor. Sram 6-7 xsistors Static RAM (SRAM ~ 5 nsec (bigger ~10 price and not available in large sizes
  • Newton’s third law:
  • Who can pick up their own weight? Newton’s third law: For every action there is an equal and opposite reaction.
  • memory

    1. 1. Memory “ Preserve your memories, they’re all that’s left you” (Simon and Garfunkel – Bookends)
    2. 2. Admin <ul><li>In-class assignment. You have five minutes to duplicate this: </li></ul><ul><ul><li>Home-brew logic </li></ul></ul><ul><li>This week </li></ul><ul><ul><li>Memory </li></ul></ul><ul><ul><li>State machines (finish Monday) </li></ul></ul><ul><ul><li>Class will be taught by Josh on Friday </li></ul></ul>
    3. 3. Learning outcomes <ul><li>Understand role of memory devices as a fundamental digital device </li></ul><ul><li>Differentiate Memory types </li></ul><ul><ul><li>Volatile and non </li></ul></ul><ul><ul><li>RAM, ROM, EPROM (many variants) </li></ul></ul><ul><ul><li>Magnetic storage </li></ul></ul><ul><li>Explain addressing modes of memory </li></ul><ul><li>Explain need for High-Z outputs </li></ul>
    4. 4. Computer Memory Types <ul><li>Magnetic </li></ul><ul><ul><li>HDD, floppy etc. </li></ul></ul><ul><li>Optical </li></ul><ul><ul><li>CD, DVD etc. </li></ul></ul><ul><li>Integrated Circuits (IC) </li></ul><ul><ul><li>RAM, ROM, EPROM, Flash etc. </li></ul></ul><ul><li>We will discuss primarily ICs with some HDD concepts </li></ul>
    5. 5. Sidebar: How long does digital memory last? <ul><li>Demo: Old paper book. Readable? </li></ul><ul><li>Hardware: </li></ul><ul><ul><li>Life of a HDD, CD, flash etc. </li></ul></ul><ul><ul><li>Optical: </li></ul></ul><ul><ul><ul><li>Pressed: 10’s of years </li></ul></ul></ul><ul><ul><ul><li>Burned: CD’s 5-12 years, DVD’s 3-5 years </li></ul></ul></ul><ul><ul><ul><ul><li>What has happened to the stuff you burned in high school? </li></ul></ul></ul></ul><ul><ul><li>Hard Disk Drive </li></ul></ul><ul><ul><ul><li>Magnetic bits randomize ~ 30-50 years </li></ul></ul></ul><ul><ul><ul><ul><li>Redundancy, checksums etc. </li></ul></ul></ul></ul><ul><ul><ul><li>Mechanical systems wear out </li></ul></ul></ul><ul><ul><ul><ul><li>In use: friction, heat etc. ~ 5-7 years </li></ul></ul></ul></ul><ul><ul><ul><ul><li>In storage: sealed bearing dry up ~ 10-12 years (estimated) </li></ul></ul></ul></ul><ul><ul><li>Flash & similar technologies </li></ul></ul><ul><ul><ul><li>Data stored on the “floating gate” of the FET. </li></ul></ul></ul><ul><ul><ul><li>Effectively a capacitor </li></ul></ul></ul><ul><ul><ul><li>The parallel resistance will eventually drain the cap. </li></ul></ul></ul><ul><ul><ul><li>Life 10-12 years </li></ul></ul></ul>
    6. 6. Sidebar: How long does digital memory last? <ul><li>Software: </li></ul><ul><ul><li>Depends on “standards” created by companies </li></ul></ul><ul><ul><li>Companies are short-lived </li></ul></ul><ul><ul><ul><li>EG WordStar, Lotus, WordPerfect/Corel </li></ul></ul></ul><ul><ul><ul><li>AT&T (Bell labs?) – what if you need information from that period? </li></ul></ul></ul><ul><ul><ul><li>IBM (“you can’t be fired for buying IBM”) </li></ul></ul></ul><ul><ul><ul><li>Microsoft launched in the 1970s – how long will it survive? What will happen to old information as it changes? </li></ul></ul></ul><ul><ul><li>Open Document format </li></ul></ul>
    7. 7. Sidebar: How long does digital memory last? <ul><li>“ Who Cares?” </li></ul><ul><ul><ul><li>Joey Sherman – the ultimate criticism </li></ul></ul></ul><ul><ul><li>What happened to the stuff you wrote in High School? </li></ul></ul><ul><ul><li>The Mac address book </li></ul></ul><ul><ul><li>Expert access and ordinary people access Current IT strategies </li></ul></ul><ul><li>Alternatives? </li></ul><ul><ul><li>Paper </li></ul></ul><ul><ul><ul><li>Hundreds of years and still readable </li></ul></ul></ul><ul><ul><ul><li>Language changes – but not that quickly </li></ul></ul></ul><ul><ul><ul><li>Paper is linear, static – no links, no animation </li></ul></ul></ul><ul><li>Rolling storage </li></ul><ul><ul><ul><li>Does this help your grandparents? How about your grandchildren? </li></ul></ul></ul><ul><ul><ul><li>Put everything on public networks? (Privacy? Permanency of Google?) </li></ul></ul></ul><ul><li>Other strategies? Not really! </li></ul>
    8. 8. Volatility <ul><li>Volatile: Valid while power applied </li></ul><ul><li>Non-volatile: Valid with no power applied </li></ul><ul><li>Several intermediate options </li></ul><ul><ul><li>Non-Volatile but changeable </li></ul></ul><ul><ul><ul><li>UV-EPROM/EEPROM/Flash etc </li></ul></ul></ul><ul><ul><ul><li>CDROM-RW </li></ul></ul></ul><ul><ul><li>Volatile but long-lasting </li></ul></ul><ul><ul><ul><li>Battery-backed CMOS </li></ul></ul></ul><ul><ul><ul><li>Capacitor keeps settings while power restored </li></ul></ul></ul><ul><ul><ul><li>UPS </li></ul></ul></ul>
    9. 9. Read or write? <ul><li>Read/Write Memory </li></ul><ul><ul><li>Usually named Random Access Memory (RAM) </li></ul></ul><ul><ul><li>Can select any memory cell by setting up address bits </li></ul></ul><ul><ul><ul><li>Random as opposed to serial (e.g. tape drives, some flash) </li></ul></ul></ul><ul><ul><li>Volatile </li></ul></ul><ul><li>Read-Only Memory (ROM) </li></ul><ul><ul><li>Non-volatile </li></ul></ul><ul><ul><li>Cannot write </li></ul></ul><ul><ul><ul><li>Written once when manufactured or programmed </li></ul></ul></ul><ul><ul><li>Can also access any mem cell randomly! </li></ul></ul><ul><ul><ul><li>‘ random’ access but not called RAM – get used to it! </li></ul></ul></ul><ul><li>EPROM: Erasable Programmable Memory </li></ul><ul><ul><li>many types </li></ul></ul>
    10. 10. Quick Quiz <ul><li>Fill out each segment of the table with as many examples as possible. </li></ul>Volatile Non-volatile Read-Only Read/Write
    11. 11. Some examples <ul><li>Some suggestions </li></ul><ul><ul><ul><li>Items with ‘?’ means it is arguable </li></ul></ul></ul>Volatile Non-volatile Read-Only Are there any? Flip/flops wired as a random number generator? ROM, PROM, CDs, DVDs, bar-codes, RFID tags Read/Write RAM (many variants), CPU cache Magnetic disks (HDD, floppy etc), Magnetic Tape, Flash, (& other EEPROM) CD-R/W & DVD-R/W, battery-backed RAM.
    12. 12. Common memory characteristics <ul><li>Memory chip: Cells - each contain ‘1’ or ‘0’ </li></ul><ul><ul><li>Each cell logically similar to D flip-flop </li></ul></ul><ul><li>Many cells on a chip </li></ul><ul><ul><li>Selected by ADDRESS LINES </li></ul></ul><ul><li>Can be bit-wide or multi-bit </li></ul>
    13. 13. Example RAM chip <ul><li>74F189 chip (Tokheim fig 12-3, p281) </li></ul><ul><ul><li>4 bit-wide RAM chip </li></ul></ul><ul><ul><li>4 addr bits (2 4 =16) x 4 bits wide = 64 bit RAM </li></ul></ul><ul><li>Read/Write Sequence </li></ul><ul><ul><li>Set up Address lines & Data lines </li></ul></ul><ul><ul><ul><li>Address: binary from 0 to 2 N </li></ul></ul></ul><ul><ul><li>Write: Set (WE ’ =low) & (CS’=low) </li></ul></ul><ul><ul><ul><li>Data is moved from Data to mem cells </li></ul></ul></ul><ul><ul><li>Read: Set (WE ’ =high) & (CS’=low) </li></ul></ul><ul><ul><ul><li>Data is copied from mem cells to outputs </li></ul></ul></ul><ul><ul><ul><li>Outputs inverted for 74F189 </li></ul></ul></ul>
    14. 14. Mem as MUX <ul><li>One bit memory is also multiplexer variant </li></ul><ul><li>Set up address bits and content of cell appears on output </li></ul><ul><li>Multiplexer transmits input -> output; mem stores input and displays on output </li></ul>
    15. 15. Combining Memory ICs <ul><li>Multiple chips for larger memory sizes </li></ul><ul><li>Logic decodes many address lines to fewer lines plus CS </li></ul><ul><li>Outputs are high-impedance </li></ul>
    16. 16. RAM characteristics <ul><li>Size: measured in total bits </li></ul><ul><li>Organization: words x bits/word </li></ul><ul><li>DRAM = Dynamic RAM </li></ul><ul><ul><li>Needs to be constantly refreshed </li></ul></ul><ul><li>Access time (speed) in nanoseconds </li></ul><ul><ul><li>Typical modern RAM speeds? </li></ul></ul><ul><li>Bandwidth vs. Latency concept </li></ul><ul><ul><ul><li>Hose analogy </li></ul></ul></ul><ul><ul><ul><li>Bandwidth: diameter of the hose </li></ul></ul></ul><ul><ul><ul><li>Latency: delay before first water arrives </li></ul></ul></ul>
    17. 17. RAM Chips - Parity <ul><li>Memory (usu) organized in multiples of 8 bits (bytes) </li></ul><ul><li>Sometimes add a ninth bit = parity (p) </li></ul><ul><ul><li>Simple EG If there is even # 1’s in the byte p=0, else p=1 </li></ul></ul><ul><ul><ul><li>Can use XOR to check parity </li></ul></ul></ul><ul><ul><ul><ul><li>1011  1 (+) 0  1 (+) 1  0 (+) 1  1 therefore ODD </li></ul></ul></ul></ul><ul><ul><li>Check p when mem read. If parity wrong – generate error </li></ul></ul><ul><li>Many other parity schemes possible </li></ul><ul><ul><li>Checksums on columns of bits </li></ul></ul><ul><ul><li>More parity bits allow for data to be regenerated </li></ul></ul><ul><ul><ul><li>Hamming code and many others </li></ul></ul></ul><ul><ul><li>E.G. RAID XOR scheme for HDD (know which bit failed) </li></ul></ul><ul><ul><ul><li>1011 + 1p Lose the 0 then generate a new one </li></ul></ul></ul><ul><ul><ul><ul><li>1 1p 11  1 (+) 1p  0 (+) 1  1 (+) 1  0 = missing bit </li></ul></ul></ul></ul>
    18. 18. Read-only memory characteristics <ul><li>Non-volatile </li></ul><ul><ul><li>Keeps memory after power down </li></ul></ul><ul><li>Not writeable </li></ul><ul><ul><li>Written only once </li></ul></ul><ul><ul><li>Usually requires special equipment </li></ul></ul><ul><ul><li>EG: CDs and DVDs are stamped </li></ul></ul><ul><li>Many similar characteristics to RAM </li></ul><ul><ul><li>Addressable, speed, data cells etc. </li></ul></ul>
    19. 19. Programmable ROM <ul><li>Many types </li></ul><ul><ul><li>Mask-programmable (factory programmable) </li></ul></ul><ul><ul><li>One-time programmable (PROM) </li></ul></ul><ul><ul><li>UV-erasable (EPROM) </li></ul></ul><ul><ul><li>Electrically erasable (EEPROM) </li></ul></ul><ul><ul><ul><li>Change single memory cells </li></ul></ul></ul><ul><ul><li>“ Flash” programmable/erasable </li></ul></ul><ul><ul><ul><li>Currently very popular </li></ul></ul></ul><ul><ul><ul><ul><li>USB memory sticks, cell phones, cameras etc. </li></ul></ul></ul></ul><ul><ul><ul><li>Erase large sections of chip and re-write </li></ul></ul></ul><ul><ul><ul><li>Faster, denser </li></ul></ul></ul>
    20. 20. Sidebar: Moore’s law <ul><li>Gordon Moore, Intel Engineer, 1965 paper* </li></ul><ul><li>“ The complexity for minimum component costs has increased at a rate of roughly a factor of two per year” </li></ul><ul><li>Re-stated and modified to, “The number of components on an IC chip will double every 18 months” (2 years?) </li></ul><ul><li>Not the same as “Computers will double in power for the same price every two years” </li></ul><ul><ul><li>but not far off </li></ul></ul><ul><li>Man-made rule, not scientific law </li></ul><ul><li>* Moore, Gordon E. (1965). “Cramming more components onto integrated circuits” Electronics Magazine. </li></ul>
    21. 21. RAM speed <ul><li>RAM chips specifications. </li></ul><ul><ul><li>Bus speed: EG DDR3 @800 MHz </li></ul></ul><ul><ul><ul><li>PC3-8500 = DDR3-1066. </li></ul></ul></ul><ul><ul><ul><ul><li>1066 MHz x 64-bit bus width = 8500 MB/sec </li></ul></ul></ul></ul><ul><ul><li>Bandwidth = 8500 MB/sec </li></ul></ul><ul><ul><li>Latency: EG “7 CAS” (see Wikipedia ) </li></ul></ul><ul><ul><ul><li>Column address strobe (CAS) requires 7 cycles to access first bit. Thereafter at full bus speed. </li></ul></ul></ul><ul><li>Compare to CPU speed of 3+ GHz </li></ul><ul><ul><li>Called the “memory wall” </li></ul></ul>
    22. 22. Latency vs. Bandwidth <ul><li>The concepts of latency and bandwidth occur frequently in IT discussions. </li></ul><ul><ul><li>Latency: Time before first action </li></ul></ul><ul><ul><li>BW: Rate of action </li></ul></ul><ul><li>EG: Empty hosepipe </li></ul><ul><ul><li>Latency: time before water arrives </li></ul></ul><ul><ul><li>Bandwidth: amount of water (size of hose) </li></ul></ul>
    23. 23. Memory buses in PCs <ul><li>Northbridge </li></ul><ul><ul><li>Image from Wikipedia </li></ul></ul>
    24. 24. Simplified HDD <ul><li>Disk is magnetic material (like video-tape) </li></ul><ul><ul><li>Bits are magnetized zones North/South = 1/0 </li></ul></ul><ul><li>Organized in concentric circles </li></ul><ul><li>Divided into pie-slice shaped sectors </li></ul><ul><li>Each sector has same amount of data (eg 512 bytes) </li></ul><ul><li>Head moves radially, reads data as disk spins </li></ul><ul><ul><li>5400 RPM  11ms/rev ~ avg 5ms to find your data </li></ul></ul><ul><ul><li>Data rate 10’s Mb/sec to Gb/sec </li></ul></ul><ul><ul><li>Latency vs. bandwidth again </li></ul></ul>
    25. 25. Booting up your computer <ul><li>Power-up </li></ul><ul><li>CPU reads a fixed address </li></ul><ul><li>ROM (or Flash) at that address provides codes to start up = Basic Input Output System (BIOS) </li></ul><ul><li>BIOS runs routines to access HDD </li></ul><ul><li>First sector on HDD loads up full OS </li></ul>
    26. 26. Sidebar: Booting = Kicking? <ul><li>Booting = Bootstrapping = “Pull yourself up by your bootstraps” </li></ul><ul><li>Try it! Lean down, grab your shoe laces and lift yourself off the floor! </li></ul><ul><li>Historically sysop inputs initial codes (binary) with toggle switches to start the computer & make it read a paper tape with a “monitor” program (primitive OS) </li></ul>