Presentation laddar. Vänta.

Presentation laddar. Vänta.

EDA Digital och Datorteknik

Liknande presentationer


En presentation över ämnet: "EDA Digital och Datorteknik"— Presentationens avskrift:

1 EDA 451 - Digital och Datorteknik
Dagens föreläsning: Dataväg och minne, Arbetsboken kapitel 15-18 Ur innehållet: Läs- och skrivbart minne Dataväg med manuell styrenhet Centralenhetens arbetssätt: FETCH/EXECUTE ”Vi börjar bygga en centralenhet” Dataväg och minne

2 Vi ansluter flaggregister och väljarfunktion Cin
Dataväg och minne

3 Väljarfunktion för Cin
f3 f2 f1 f0 U = f(D,E,F,Cin) Operation Resultat Bitvis nollställning D E Bitvis invertering D1k E1k Bitvis OR D OR E Bitvis AND D AND E Bitvis XOR D XOR E D Cin D + Cin D + FF16 + Cin D  1 + Cin D + E + Cin D + D + Cin 2D + Cin D +E1k + Cin D  E  1 + Cin Bitvis ettställning FF16 G=2 (1,0)=g1 G=g1 g0 Dataväg och minne

4 Flaggregister (Condition Codes register)
Vid g2=0 och LDCC=1 överförs ALU’ns flaggor till CC. CC kan också laddas från bussen (g2=1). Med OECC förs innehållet i CC till bussen Dataväg och minne

5 Vi ansluter minne till en centralenhet
Dataväg och minne

6 Princip Läs-/ Skriv- minne
Dataväg och minne

7 Dataväg utökad med minne
(Adress) 16 xxxxxxxx 00 Data 01 FF FE RTN: Att skriva till minne: data →M(MA) Att läsa från minne: M(MA) → data Dataväg och minne

8 Random Access Memory (RAM)
Alla minnets delar har samma åtkomsttid. central-enhet primär-minnes-system adressering styrsignaler dataöverföring Dataväg och minne

9 RAM - Minnestyper Volatile (”Flyktigt”) NON Volatile (”Icke flyktigt”)
innehållet försvinner vid spänningsbortfall, vid spänningstillslag är innehållet oftast slumpmässigt bestämt. Kallas ofta “RAM”. RWM (Read Write Memory) NON Volatile (”Icke flyktigt”) behåller sitt innehåll även efter spänningsbortfall ROM (Read Only Memory) programmeras vid tillverkningen, innehållet kan därefter inte ändras PROM (Programmable ROM) minnestypen kan programmeras (kräver speciell utrustning) en gång EPROM (Erasable PROM) minnestypen kan programmeras och raderas med speciell utrustning FLASH minnestypen kan programmeras/raderas utan speciell typ av utrustning Dataväg och minne

10 Snabb tillbakablick Skriv/läs-minnen, kallas ibland ”dataminne”
Williamstub Kärnminnen Halvledarminnen, SRAM/DRAM Läs-minnen, kallas ibland”Programminne” Halvledarminne, ROM Halvledarminne, EPROM Halvledarminne, FLASH Dataväg och minne

11 ”Williamstuben”, 1946-1950 Första elektrostatiska minnet Lagrad nolla
Bilden visar 32 st. 40-bitars ord och en 20-bitars sidadress (Ferranti Mark I) Första elektrostatiska minnet Elektronstrålens efterlysning (minnestid) c:a 0,2 sek. Metallplatta framför skapar ”kondensator” för varje minnesbit. Lagrad nolla Lagrad etta Dataväg och minne

12 Kärnminne c:a Skrivström, läsström – riktning anger lagrad nolla eller etta Dataväg och minne

13 Halvledarminnen 1966 Statiskt RAM (SRAM) 6 transistorer/-bit
128-bit RAM (IBM System/360 Model 145 primärminne) jämförd med kärnminne. 256-bit TTL RAM (Fairchild) WL = 1, väljer denna cell. (M5 och M6 leder). Minneselementet har två stabila tillstånd: BL=1 och BL’ = 0 →”1” BL=0 och BL’ = 1 →”0” (Jämför med SR-latch) Semiconductor RAMs Developed for High-Speed Storage Sixteen-bit bipolar devices are the first ICs designed specifically for high speed read/write memory applications. Random Access Read-Write Memories (RAMs) store information that changes frequently and must be accessed quickly. Offering the lowest cost per storage bit, magnetic ferrite core arrays comprised the dominant RAM technology through the mid-1970s. Operations requiring faster access stored data temporarily in semiconductor flip-flop circuits called registers. IBM Components Division engineers Ben Agusta and Paul Castrucci developed the SP95 16-bit bipolar RAM for the System/360 Model 95 in late In 1966, a team led by Tom Longo at Transitron built the TMC bit TTL scratchpad memory for the Honeywell Model 4200 minicomputer. Fairchild (9033), Sylvania (SM-80), and TI (SN7481) alternated-sourced the design. IBM produced a 64-bit chip for a cache memory in Fairchild (9035 and 93403), Intel (3101), TI (SN7489) followed with high-speed 64-bit devices as standard products. In 1969 the IBM East Fishkill, NY facility produced a 128-bit device for the 1971 shipment of System/360 Model 145, the company's first commercial computer to employ semiconductor main memory. Using the 4100 (aka 93400) 256-bit TTL chip designed by H.T. Chua, Fairchild delivered semiconductor main memory systems for the Burroughs Illiac IV computer in April Using Douglas Peltzer’s Isoplanar oxide-isolated process that improved speed while consuming less silicon area, Fairchild's Bill Herndon designed a fast 256-bit TTL memory (93410) in The Cray 1 supercomputer introduced in 1976 used 65,000 Fairchild 1024-bit ECL RAM chips (10415) based on the Isoplanar process. Bipolar technology enabled faster computers but it took the MOS process to deliver low-cost solutions for widespread use in main memory and general-purpose applications. (1970 Milestone) SRAM operation An SRAM cell has three different states it can be in: standby where the circuit is idle, reading when the data has been requested and writing when updating the contents. The three different states work as follows: Standby If the word line is not asserted, the access transistors M5 and M6 disconnect the cell from the bit lines. The two cross coupled inverters formed by M1 – M4 will continue to reinforce each other as long as they are disconnected from the outside world. Reading Assume that the content of the memory is a 1, stored at Q. The read cycle is started by precharging both the bit lines to a logical 1, then asserting the word line WL, enabling both the access transistors. The second step occurs when the values stored in Q and Q are transferred to the bit lines by leaving BL at its precharged value and discharging BL through M1 and M5 to a logical 0. On the BL side, the transistors M4 and M6 pull the bit line toward VDD, a logical 1. If the content of the memory was a 0, the opposite would happen and BL would be pulled toward 1 and BL toward 0. Writing The start of a write cycle begins by applying the value to be written to the bit lines. If we wish to write a 0, we would apply a 0 to the bit lines, i.e. setting BL to 1 and BL to 0. This is similar to applying a reset pulse to a SR-latch, which causes the flip flop to change state. A 1 is written by inverting the values of the bit lines. WL is then asserted and the value that is to be stored is latched in. Note that the reason this works is that the bit line input-drivers are designed to be much stronger than the relatively weak transistors in the cell itself, so that they can easily override the previous state of the cross-coupled inverters. Careful sizing of the transistors in an SRAM cell is needed to ensure proper operation. Dataväg och minne

14 Dynamiskt RAM (DRAM) 1970 Endast en transistor krävs för att lagra en bit. Kräver ”refresh” eftersom kondensatorn laddas ur efter hand. (Jämför med Wiliamstuben) MOS Dynamic RAM Competes with Magnetic Core Memory on Price The Intel i1103 Dynamic RAM (DRAM) presents the first significant semiconductor challenge to magnetic cores as the primary form of computer memory. John Schmidt designed a 64-bit MOS p-channel Static RAM at Fairchild in Fairchild’s 1968 SAM (Semiconductor Active Memory) program for Burroughs assembled sixteen of these chips on ceramic substrates to form 1024-bit hybrid arrays. Monolithic solutions soon overtook this and similar multi-chip projects at Computer Microtechnology, Intel, Motorola, and TI (SMA 2001). Dynamic circuit design techniques significantly reduce memory cell sizes. Lee Boysel built a 256-bit dynamic RAM (DRAM) at Fairchild in 1968 and 1024 and 2048-bit devices at Four Phase Systems in Advanced Memory Systems (AMS6001) also offered 1K DRAMs. These designs employed 4 to 6 transistors per bit. Silicon gate technology (1968 Milestone) combined with a novel three-transistor per bit design by Joel Karp and Bill Regitz allowed Intel to produce the i1103 1K DRAM in half the die area of competing devices in Offering much faster speed and priced at 1 cent/bit, the 1103 quickly replaced magnetic core technology for computer main memory. Walter Krolikowski of Cogar described a 1024-bit n-channel DRAM in 1970 but it took IBM’s design on System 370/158 in 1972 to move this higher-speed technology into volume production. Mostek's Robert Proebsting used ion-implanted resistors to reduce power consumption and die size sufficiently to pack 4K bits (MK4096) into a conventional 16-pin package in At the 16K level (MK4116) in 1976 Mostek adopted the single transistor memory cell patented by IBM researcher Robert Dennard and design methods described by Karl-Ulrich Stein of Siemens. This approach led to 64K DRAMs from Japanese and US vendors before the end of the decade and large capacity semiconductor memory systems that were as reliable as and more economical than magnetic cores. Intel i bit Dynamiskt RAM Dataväg och minne

15 ROM (1965) A2 A1 A0 ord 0 ord 1 ord 2 ord 3 ord 4 ord 5 ord 6 ord 7 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 ”1” ”0” Read-Only-Memory is the First Dedicated IC Memory Configuration Factory-programmable read-only-memories (ROMs) generate the first integrated circuit random access memory applications. As data is permanently written into a Read Only Memory during the manufacturing process, ROM storage is used for information that will remain unchanged throughout the life of a system, such as microprogram code, look-up tables, character generation, etc. Semiconductor ROMs are built from discrete or integrated arrays of diodes placed between signal wires organized in rows and columns. During wafer fabrication of integrated ROMs the last masking step makes connection to diodes specified by the customer. As a diode represents the smallest possible memory cell structure, ROM devices offer the highest density form of semiconductor memory. In 1965 Sylvania produced a 256-bit bipolar TTL ROM for Honeywell that was programmed one bit at a time by a skilled technician at the factory who physically scratched metal link connections to selected diodes. Production orders were satisfied with custom-mask programmed devices. Also in 1965 General Microelectronics developed slower but four-times larger 1024-bit ROMs using MOS technology. By the early 1970s Fairchild, Intel, Motorola, Signetics, and TI offered 1024-bit TTL ROMs, while AMD, AMI, Electronic Arrays, General Instrument, National, Rockwell and others produced 4096-bit (4K) MOS devices. Desktop calculator consumption, the first high-volume application, was surpassed by video game cartridges that used hundreds of millions of 16K and larger devices from U. S. and Japanese vendors. Production of Nintendo’s first Super Mario Brothers NES game alone exceeded 40M units. As each ROM is manufactured to order, customers were often frustrated with long delivery times and vendors overwhelmed by production logistics. Relief came in the form of user-programmable ROMs (PROMs). (1971 Milestone) Dioder (ettor) placeras i diodmatrisens skärningar vid tillverkningsprocessen, “mask-programmerade” Intel 3301, 1024-bit ROM Dataväg och minne

16 EPROM (1971) Dov Frohman uppfann EPROM (Intel) Intel 1702, EPROM.
Reusable Programmable ROM Introduces Iterative Design Flexibility Dov Froman’s ultra-violet light erasable ROM design offers an important design tool for the rapid development of microprocessor-based systems, called an erasable, programmable read-only-memory or EPROM. A masked ROM (1965 Milestone) pattern is created in the factory and thus takes several weeks to produce each design iteration. User-programmable ROM (PROM) devices allow the designer to make changes in the lab. Radiation Inc. introduced a 512-bit bipolar TTL PROM (64x8) with metal fuse links connected to each bit in May A user “burned” the one-time-programmable fuses on programming units from Data I/O, Spectrum Dynamics, and others. Harris (successor to Radiation), Monolithic Memories, Motorola, and Signetics developed 1K through 16K-bit nickel-chromium fuse PROMs. AMD, Intel, and TI entered the market using alternative fuse materials and Schottky technology. (1969 Milestone) Researchers at Bell Labs and Sperry Rand independently described alterable memory cells that stored charge in the MOS gate dielectric in At Intel in 1971 Dov Frohman used a floating (unconnected) gate for storage in the 1702 Erasable PROM (EPROM). The 2048-bits of memory could be changed and reused multiple times. The pattern was erased by exposure to ultra-violet light through a quartz window in the package. While much slower performing than bipolar devices, re-usable EPROMs found numerous applications in prototyping ROM codes for microprocessors (1971 Milestone) and microcontrollers (1974 Milestone). Intel went on to produce generations of EPROMs up to multi-million bits in density. In 1978 George Perlegos designed the Intel 2816, an Electrically Erasable PROM that eliminated the lengthy UV exposure cycle. On founding Seeq with other Intel employees in 1981, Perlegos developed an improved version that could be programmed and erased in-situ, in the system. Flash, the most widely used non-volatile memory (NVM) chip technology today was developed in 1984 by Fujio Masuoka of Toshiba. Intel 1702, EPROM. UV-ljus användes för att radera minnet. Intel EPROM- programmerare (1971) Dataväg och minne

17 FLASH 1988 NAND-FLASH NOR-FLASH MINNE STYRKRETS ”BLOCK”-minnes åtkomst
History Flash memory (both NOR and NAND types) was invented by Dr. Fujio Masuoka while working for Toshiba circa 1980.[1][2] According to Toshiba, the name "flash" was suggested by Dr. Masuoka's colleague, Mr. Shoji Ariizumi, because the erasure process of the memory contents reminded him of a flash of a camera. Dr. Masuoka presented the invention at the IEEE 1984 International Electron Devices Meeting (IEDM) held in San Francisco, California. Intel saw the massive potential of the invention and introduced the first commercial NOR type flash chip in 1988.[3] NOR-based flash has long erase and write times, but provides full address and data buses, allowing random access to any memory location. This makes it a suitable replacement for older ROM chips, which are used to store program code that rarely needs to be updated, such as a computer's BIOS or the firmware of set-top boxes. Its endurance is 10,000 to 1,000,000 erase cycles.[4] NOR-based flash was the basis of early flash-based removable media; CompactFlash was originally based on it, though later cards moved to less expensive NAND flash. Toshiba announced NAND flash at the 1987 International Electron Devices Meeting. It has faster erase and write times, and requires a smaller chip area per cell, thus allowing greater storage densities and lower costs per bit than NOR flash; it also has up to ten times the endurance of NOR flash. However, the I/O interface of NAND flash does not provide a random-access external address bus. Rather, data must be read on a block-wise basis, with typical block sizes of hundreds to thousands of bits. This made NAND flash unsuitable as a drop-in replacement for program ROM since most microprocessors and microcontrollers required byte-level random access. In this regard NAND flash is similar to other secondary storage devices such as hard disks and optical media, and is thus very suitable for use in mass-storage devices such as memory cards. The first NAND-based removable media format was SmartMedia, and many others have followed, including MultiMediaCard, Secure Digital, Memory Stick and xD-Picture Card. A new generation of memory card formats, including RS-MMC, miniSD and microSD, and Intelligent Stick, feature extremely small form factors. For example, the microSD card has an area of just over 1.5 cm², with a thickness of less than 1 mm; microSD capacities range from 64 MB to 16 GB, as of October [5] ”BLOCK”-minnes åtkomst NOR-FLASH Dataväg och minne

18 Läs-cykel Exempel: Kopiera minnesinnehåll på adress (FF)16 till register A M(FF) FF FF Cykel Operation (RTN) Aktiva styrsignaler Beskrivning 1 (FF)16→R f3, f2, f1, f0, LDR F(15), dvs f3=1,f2=f1=f0=1. dvs. FF placeras i R 2 R→MAR OER, LDMAR FF kopplas till bussen. Vid klockpuls laddas MAR 3 M(MAR) →A MR LDA Lässignal till minnet Vid klockpuls laddas minnesinnehåll i A Dataväg och minne

19 Arkiv -> Datavägen ->Dataväg med RWM
Exempel: Addera minnesinnehållen på adress 0416 och 0516 och spara resultatet på adress 0616. Dataväg och minne

20 Vi börjar med att placera 2416 på adress 0416 och 1316 på adress 0516.
Lösning: Vi börjar med att placera 2416 på adress 0416 och 1316 på adress 0516. (För att kunna kontrollera styrsignalsekvensen) CP OE LD Mem ALU Funk Source RTN S1 A B R T W Cin 1 2 24 04 24→M(04) 13 05 13→M(05) Uppgift 76 i UG4. Fil: R034 Dataväg och minne

21 Nu till utförandet: Läs första operanden från minnet till register T.
Läs därefter andra operanden och utför ALU-operationen, spara resultatet i register R Skriv tillbaks resultatet till minnet från register R CP OE LD Mem ALU Funk Source RTN S1 A B R T W Cin 1 2 3 04 M(04)→T 4 1010 05 M(05)+T→R 5 06 R→M(06) Dataväg och minne

22 Program och minne John Louis Von Neumann (1903-1957)
”Det lagrade programmets princip”, dvs program och data i samma minne. Maskinprogram i minnet Tillhörande assemblerprogram Instruktion Adress Data Dataväg och minne

23 EXEMPEL: Maskininstruktioner Kan ha olika “INSTRUKTIONSFORMAT”
Dataväg och minne

24 Instruktionsformat Exempelvis: Assemblerprogram operand-information
OP-kod Adr ADDB Adr OP-kod data LDAB #data TFR B,A OP-kod Adress Maskinprogram Assemblerprogram Instruktion ”mnemonic” operand-information ”Byte-wide” 8 bitar data på varje adress Dataväg och minne

25 Exempel: Instruktionen ”Clear”
Följande instruktionsbeskrivning specificerar ”Clear”. Instruktionen nollställer operanden och finns i olika varianter: CLRA nollställ register A CLRB nollställ register B CLR <ADR> nollställ minnesinnehåll Instruktion Adressering Operation Flaggor Clear Variant metod OP # ~ N Z V C CLRA Inherent 47 1 4 0  A - CLRB 48 0  B CLR <ADR> Absolute 49 2 5 0  M(ADR) Antag att vi placerar instruktionssekvensen i minnet med start på adress 01, minnet skulle då få följande utseende: CLRA CLRB CLR (55)16 01 02 03 04 OP-kod, (47)16 OP-kod, (48)16 OP-kod, (49)16 operandinformation,(55)16 Dataväg och minne

26 Dataväg för program i minne
Dataväg och minne

27 Centralenhetens instruktionsbearbetning
I sin enklaste form kan bearbetningen av en instruktion delas in i två faser EXECUTE FETCH Hämta maskininstruktion från minne Utför maskininstruktion Dataväg och minne

28 Instruktionshämtning – ”FETCH”
Cykel Operation (RTN) Aktiva styrsignaler Beskrivning 1 PC→MA PC+1→PC OEPC,LDMA INCPC Innehållet i PC adresserar minnet Uppdateras för att peka på nästa minnesposition 2 M(MA) →I MR,LDI Läsning från minnet till instruktionsregistret. Vid instruktionshämtning placeras operationskoden som PC “pekar på” i instruktionsregistret. PC räknas upp och pekar därefter på antingen en operand eller en ny instruktion. Dataväg och minne

29 Nya register i datavägen:
Arkiv -> Datavägen ->Dataväg med manuell styrenhet Nya register i datavägen: S – Stackpekare, speciellt register med flera viktiga funktioner. X – Generellt register för adressinformation Dataväg och minne

30 FETCH - Hämtningsfas EXEMPEL: PC = (0C)16
State RTN Styr-signaler Kommentar PC→MA, PC+1→PC OEPC=1, LDMA=1, IncPC=1. Adressen till instruktionens operationskod kopieras från PC till minnesadressregistret MA. Adressen som finns i PC ökas med ett. 1 MI MR=1, LDI=1. Läs operationskoden från minnet. Placera den i instruktionsregistret I. Nästa state skall vara det första i EXECUTE-sekvensen. FETCH Det förutsätts alltså att det finns en operationskod på denna adress.. Dataväg och minne

31 EXECUTE - Utförandefas
Utförandefasen är unik för varje instruktion. Detaljerad beskrivning av instruktionen Exempel: INCA INCA Increment register A RTN: A + 1  A Flaggor: N: Ettställs om resultatets teckenbit (bit 7) får värdet 1. Z: Ettställs om samtliga åtta bitar i resultatet blir noll. V: Ettställs om 2-komplementoverflow uppstår. C: Ettställs om summan ej ryms i åtta bitar, dvs blir lika med 256. I detta fall ettställs även Z. OP-kod Instruktionsformat State RTN Styrsignaler Kommentar A+1→R, Flaggor→CC OEA=1, f3=1, g0=1, LDR=1, LDCC=1 ALU-funktionen (1000) utför “A+0+Cin”. g0=1 väljer Cin = 1. Resultatet överförs till R. ALU’ns flaggor (NZCV) överförs till flaggregister CC. 1 R→A OER=1, LDA=1 NF=1 Resultatet från operationen (i R) återförs till register A. Nästa klockcykel skall vara den första i ny FETCH-sekvens. EXECUTE NF Dataväg och minne

32 Exempel: LDAA #data Detaljerad beskrivning av instruktionen
LDAA #data Load A Immediate RTN: Data  A Flaggor: Påverkas ej. Beskrivning: Laddar dataord från instruktionen till register A. OP-kod data Instruktionsformat State RTN Styrsignaler Kommentar PC→MA, PC+1→PC OEPC=1, LDMA=1, IncPC=1. Instruktionens datadel finns i minnesordet efter OP-koden. När EXECUTE-sekvensen inleds pekar PC på instruktionens datadel. PC kopieras därför över till minnesadressregistret MA så att datadelen kan läsas från minnet under nästa klockcykel. Innehållet i PC ökas med ett, så att PC pekar på nästa adress i minnet där OP-koden för nästa instruktion skall finnas. 1 M→A MR=1, LDA=1, NF=1 Läs instruktionens datadel "Data" från minnet och placera den i A-registret. Nästa klockcykel skall vara den första i ny FETCH-sekvens. Dataväg och minne

33 Exempel: LDAA Adr Detaljerad beskrivning av instruktionen
LDAA Adr Load A from memory RTN: Data  A Flaggor: Påverkas ej. Beskrivning: Laddar dataord från minnet till register A. OP-kod Adr Instruktionsformat State RTN Styrsignaler Kommentar PC→MA, PC+1→PC OEPC=1, LDMA=1, IncPC=1. “Adressen till Adr”, dvs PC, vid execute-fasens början, adresserar minnet för att kunna läsa “Adr”. 1 M→MA MR=1, LDMA=1, “Adr” läses och placeras direkt i MA för att vi i nästa fas ska kunna adressera minnet. 2 M→A MR=1, LDA=1, NF=1 Data från “Adr” läses... ... och placeras i register A . Nästa klockcykel skall vara den första i ny FETCH-sekvens. Dataväg och minne

34 Centralenhetens arbetsätt
FETCH EXECUTE RESET EXECUTE FETCH RESET NF Dataväg och minne

35 RESET - Återställningsfas
RTN- beskr Styrsignaler Kommentar FF16→R ALU-fkn = F16, LDR=1. ALU-funktionen väljs så att talet FF16 finns på ALU:ns utgång. Laddingången på R-registret ettställs så att utvärdet från ALU’n (FF16) laddas i R-registret vid nästa klockpuls. 1 R→MA OER=1, LDMA=1. Talet FF16 i R-registret kopplas ut på bussen. Bussinnehållet laddas i minnesadressregistret vid nästa klockpuls. 2 M→PC MR=1, LDPC=1. Minnesinnehållet på adressen FF16 läses. Det dataord som läses placeras i PC vid nästa klockpuls. Nästa klockcykel skall vara den första i FETCH-sekvensen. (Start- tillstånd) RESET I exemplet placeras adressen 0C i PC. En instruktion förutsätts finnas på denna adress. Dataväg och minne


Ladda ner ppt "EDA Digital och Datorteknik"

Liknande presentationer


Google-annonser