[MUSIC] Essential components of any digital system are memories and it is the subject of this lesson. We could say that memories are modules that store large numbers of data and are functionally equivalent to a set of registers that can be accessed individually, either to write new data or to read previously stored data. This is a generic memory structure. It is an array of small cells, each of them storing a bit. It is logically organized as a set of rows. Each row stores a word, and in this example there are four words: one, two, three, four words, each of them with six bits. The selection of a particular word, either to read or to write, is done by the address input. In this example, to select one word among four words, two bits, A1 and A0, are used, and they are assumed to be connected to some external address bus. An address decoder generates the row selection signals, the so-called word lines. For example, if A1 A0 is equal to 1 0 (number 2 in decimal) then word number 2, that correspond to this row, is selected. On the other hand, the bidirectional input/output data, D5 down to D0, are connected to the bit lines. To summary, if word number 2 is selected by the address input, then D5 is connected to bit 5 of row number 2, D4 is connected to bit 4 of row number 2, and so on, And the control input R/W, read/write, defines the operation, either to read a data, or to write a new data. Here is a list of the main memory types. They can be classified in volatile or non-volatile. Volatile means that they lost their contents when the power supplied is turned off. Within the volatile memories, we distinguish between Read Only and Read/Write memories. Read Only means that they are programmed either at the manufacturer level or by the user, but only one time. Other non-volatile memories can be programmed several times by the user. It is the case of EPROM, E square PROM, and flash memories. As regards volatile memories, they can be read and written, and there are two main families. Static RAM, static random access memories, and dynamic. This diagram shows different types of memories, according to their storage permanence and according to their ability to be programmed. This part of the diagram corresponds to non-volatile memories, and this part corresponds to memories that can be programmed by the user and without having to remove the chip from the system within which it is connected. An ideal memory should have a storage permanence equal to its lifetime and the ability to be loaded as many times we want to during the life time. The extreme real cases are mask-programmable Read Only memories, programmed at the silicon foundry level, with the largest storage permanence but with no reprogramming possibility. And the other extreme case, a real case, is Random Access memories that are volatile but with full programming ability. First: Random Access memories (RAMs). They are volatile but can be read and can be written, and there are two types: static and dynamic. A static RAM cell is constituted of a latch and some additional control logic. When the word line that comes from the address decoder is equal to 1, if the read write control input is equal to 1, then the bit line is connected to the Q output of these lines, so that the contents of this latch are transmitted to the bit line. If the Read/Write signal is equal to 0 then the Enable input of the latch is equal to 1, so that the value that enters (that is inputted) at the bit line will be connected to the D input of the latch and the latch state can be modified. Now, the dynamic RAM cell. The simple dynamic RAM cell is a very small capacitor and a transistor used as a simple switch. When the corresponding word line, that once again comes from the, the address decoder, is selected, then the capacitor is connected to the bit line through the transistor. Some characteristics of random access memories. First, static RAMs. Nowadays, static RAMs have a capacity of up to 64 megabits per chip. This is the capacity of a memory chip, not of a memory bank made up of several chips. Their read time is in the range between 10 and 100 nanosecond, and depends on the size of the memory. Their power consumption is generally smaller than the power consumption of dynamic memories. And the power consumption obviously depends on the frequency. What about dynamic RAM? The first point: dynamic memories must be refreshed because their contents are quickly lost ue to leakage currents. Furthermore, the read operation is destructive. When this very small capacitor is connected to the bit line, that is a much larger capacitor, the stored bit is lost. Some additional electronic circuitry is used to sense the very small voltage variation of the bit line, bit line that has been previously charged with an intermediate voltage value. It's the pre-charge operation. Actually, read operations consist of: first, to read the value stored in this very small capacitor, using for that a sense amplifier, to store this value in some register outside the memory, and after to rewrite the data that has been read within the same set of word cells. The nowadays capacity of Dynamic Random Access memories, is up to two gigabits per chip. So it's a much larger capacity than static RAMs. On the other hand, they are slower than static RAMs, and have a higher power consumption. Within Read Only memories, we can distinguish between mask programmable ROMs, whose contents are defined at manufacturing level, and One Time Programmable (OTP)) ROMs that can be programmed by the user, but only one time. The logic organization is also an array of cells. Each of them connects or doesn't connect, according to their programming, a word line to a bit line. For example here is word line number 1 that can be connected to bit line number 3. Programmable ROMs are memories that can be programmed by the user, and they are three main types. First type: EPROM (Erasable Programmable ROM), are erased by exposing the chip to UV radiation. For that, the chip must be removed from the board in which it is used, and the package must have a window. The programming is performed with an external programmer. Second type: EEPROM, or E square PROM (Electrically Erasable Programmable ROM) are erased with a specific, a special higher voltage, selectively, for example, one word at a time or one byte at a time, without removing the chip from the board. And furthermore, the programming circuitry is included within the chip. Finally, Flash memories are EEPROM-type memories but with better performance: instead of a one word at a time operations, block operations are possible. They are used in many applications, for example, pendrives, memory cards, solid state drives, and many others. Now a quiz. [BLANK_AUDIO] A quite natural question: how can we implement a memory with memory chips whose capacity is smaller than the desired capacity? Here is an example. Assume that our memory specification is that the memory must have 1k words (1024 words) with 8 bits per word, but our available components are Static RAM chips, able to store 256 words with 4 bits per word. So, we want to implement this memory using this type of chip. What we can do is the following: Whe decompose the addressing space in four blocks. The whole addressing space has 1,024 words, but our memory chip has only 256 words. So, we will divide the memory in four addressing spaces. For that we use two additional address bits. A7 down to A0 are the address bits that will be connected to our memory chips, and there are two additional address bits, A9 and A8. The result is this circuit. With A9 and A8, we select one of the four memory chips. For example, if A9 A8 is equal to 1 0, then this Output Enable signal is equal to 0, this is equal to 1, this Output Enable is equal to 0, and this also is equal to 0. That means that with this combination of values of A9 and A8, chips number 1, 3, and 4 are disconnected from the data bus, while chip 2 is connected to the data bus. In this way, we have already implemented a memory of 1,024 words with only 4 bits instead of 8 bits per word. Then, to complete the design, four additional memory chips are used, so that the total number of bits per word is 8, and we have completed the implementation of our 1,024 words with 8 bits per word (memory). Now, two quizzes. Summary. We have seen which are the main characteristics of memories: volatility, storage permanence, and maximum number of write cycles. The concepts of word and address have been introduced. Several types (the main types) of memories have been described, namely Static Random Access memories, dynamic RAMs, ROMs, EPROM, EEPROM, and flash memories, and finally an example of memory bank implementation has been shown. [BLANK_AUDIO]