Digital Logic Design - Lecture 30: Read Only Memory (ROM)

ROMs provide stable storage for data ROMs have address inputs and data outputs ROMs directly implement truth tables ROMs can be used effectively in Mealy and Moore machines to implement combinational logic In normal use ROMs are read-only They are only read, not written ROMs are often used by computers to store critical information Unlike SRAM, they maintain their storage after the power is turned off

ppt25 trang | Chia sẻ: dntpro1256 | Lượt xem: 586 | Lượt tải: 0download
Bạn đang xem trước 20 trang tài liệu Digital Logic Design - Lecture 30: Read Only Memory (ROM), để xem tài liệu hoàn chỉnh bạn click vào nút DOWNLOAD ở trên
Lecture 30 Read Only Memory (ROM) OverviewRead-only memory can normally only be readInternal organization similar to SRAMROMs are effective at implementing truth tablesAny logic function can be implemented using ROMsMultiple single-bit functions embedded in a single ROMAlso used in computer systems for initializationROM doesn’t lose storage value when power is removedVery useful for implementing FSMsRead-Only Memory (ROM)An array of semiconductor devicesdiodestransistors field effect transistors2N words by M bitsData can be read but not changed(normal operating conditions)Data is written to the ROM once, and read from the ROM many times.A read-only memory (ROM) consists of an array of semiconductor devices that are interconnected to store a set of binary data.Once binary data is stored in the ROM, it can be read out whenever desired, but the data that is stored cannot be changed under normal operating conditions.ROMROMs are actually combinational devices, not sequential ones!You can’t store arbitrary data into a ROM, so the same address will always contain the same data.You can think of a ROM as a combinational circuit that takes an address as input, and produces some data as the output.A ROM table is basically just a truth table.The table shows what data is stored at each ROM address.You can generate that data combinationally, using the address as the input.N input bits2N words by M bitsImplement M arbitrary functions of N variablesExample 8 words by 5 bits:Read-Only Memory (ROM)3 InputLinesABCF0 F1 F2 F3 F45 Output LinesROM8 wordsx 5 bits6ROM – Basic StructureaddressdataROM = "Read Only Memory"values of memory locations are fixed ahead of timeA ROM can be used to implement a truth tableif the address is m-bits, we can address 2m entries in the ROM.our outputs are the bits of data that the address points to. m is the "height", and n is the "width"ROM Implementationmn0 0 0 0 0 1 10 0 1 1 1 0 00 1 0 1 1 0 00 1 1 1 0 0 0 1 0 0 0 0 0 0 1 0 1 0 0 0 11 1 0 0 1 1 01 1 1 0 1 1 1Suppose there are 10 inputs 10 address lines (i.e., 210 = 1024 different addresses)Suppose there are 20 outputs ROM is 210 x 20 = 20K bits (and a rather unusual size) Rather wasteful, since lots of storage bitsFor functions, doesn’t take advantage of K-maps, other minimizationROM ImplementationEach minterm of each function can be specifiedRead-Only Memory (ROM)3 InputsLinesABCF0 F1 F2 F3 F45 Outputs LinesROM8 wordsx 5 bitsROM Internal Structure...n InputsLinesn bitdecoder...m Outputs Lines...Memory Array2n words x m bitsROM Memory Array3 to 8decoderABCm0=A’B’C’m1=A’B’Cm2=A’BC’m3=A’BCm4=AB’C’m5=AB’Cm6=ABC’m7=ABCF0 F1 F2 F3 F4Inside the ROMAlternate viewEach possible horizontal/vertical intersection indicates a possible connectionOr gates at bottom output the word selected by the decoder (32 x 8)ROM ExampleSpecify a truth table for a ROM which implements: F = AB + A’BC’ G = A’B’C + C’ H = AB’C’ + ABC’ + A’B’CROM ExampleSpecify a truth table for a ROM which implements: F = AB + A’BC’ G = A’B’C + C’ H = AB’C’ + ABC’ + A’B’CROM ExampleSpecify a truth table for a ROM which implements: F = AB + A’BC’ G = A’B’C + C’ H = AB’C’ + ABC’ + A’B’CFunction Implementation3 to 8decoderABCm0=A’B’C’m1=A’B’Cm2=A’BC’m3=A’BCm4=AB’C’m5=AB’Cm6=ABC’m7=ABCF G H Each column is a new functionNote: two outputs unused!DecodersWe can already convert truth tables to circuits easily, with decoders.For example, you can think of this old circuit as a memory that “stores” the sum and carry outputs from the truth table on the right.ROM setupROMs are based on this decoder implementation of functions.A blank ROM just provides a decoder and several OR gates.The connections between the decoder and the OR gates are “programmable,” so different functions can be implemented.To program a ROM, you just make the desired connections between the decoder outputs and the OR gate inputs.ROM exampleV2 = m(1,2,3,4) V1 = m(2,6,7) V0 = m(4,6,7)A2A1A0Here are three functions, V2V1V0, implemented with an 8 x 3 ROM.Blue crosses (X) indicate connections between decoder outputs and OR gates. Otherwise there is no connection.Same ExampleHere is an alternative presentation of the same 8 x 3 ROM, using “abbreviated” OR gates to make the diagram neater.This combinational circuit can be considered a read-only memory.It stores eight words of data, each consisting of three bits.The decoder inputs form an address, which refers to one of the eight available words.So every input combination corresponds to an address, which is “read” to produce a 3-bit data output.V2 = m(1,2,3,4)V1 = m(2,6,7)V0 = m(4,6,7)V2 V1 V0A2A1A0ROMs vs. RAMsThere are some important differences between ROM and RAM.ROMs are “non-volatile”—data is preserved even without power. On the other hand, RAM contents disappear once power is lost.ROMs require special (and slower) techniques for writing, so they’re considered to be “read-only” devices. Some newer types of ROMs do allow for easier writing, although the speeds still don’t compare with regular RAMs.MP3 players, digital cameras and other toys use CompactFlash, Secure Digital, or MemoryStick cards for non-volatile storage.Many devices allow you to upgrade programs stored in “flash ROM.”ROM Implementation of a Moore MachineROMs implement combinational logicNote that ROMs do not hold stateHow would you determine the maximum clock frequency of this circuit? Look at the FF to FF path (NS to PS)ROMROMPresent State Next State OutputsInputsROM Implementation of a Mealy MachineROMs implement combinational logicNote that ROMs do not hold stateHow would you determine the maximum clock frequency of this circuit? Look at the FF to FF path (NS to PS)ROMROMPresent State Next State OutputsInputsSummaryROMs provide stable storage for dataROMs have address inputs and data outputsROMs directly implement truth tablesROMs can be used effectively in Mealy and Moore machines to implement combinational logicIn normal use ROMs are read-onlyThey are only read, not writtenROMs are often used by computers to store critical informationUnlike SRAM, they maintain their storage after the power is turned off

Các file đính kèm theo tài liệu này:

  • pptdigital_logic_design_eee241_29_1371_2055521.ppt
Tài liệu liên quan