π Lecture 38 β EQUATION DEFINITION
π Overview: This lecture focuses on the equation definition and circuit implementation of a Traffic Light Controller using GAL16V8 devices. It then shifts to the analysis of Clocked Synchronous State Machines, covering how to derive the next-state and output functions from a given circuit to construct state tables and state diagrams.
ποΈ Topics Covered
The lecture begins by defining the equations for the Traffic Controller's state machine and timer, along with the circuit diagram showing connections to two GAL16V8 chips for state control and lamp switching. The ABEL input file with pin declarations and equations for turning on/off the six traffic lamps (NSRED, NSYEL, NSGRN, EWRED, EWYEL, EWGRN) is detailed, including the Manual mode for flashing yellow lamps. The second half covers the analysis procedure for Clocked Synchronous State Machines, focusing on deriving characteristic equations for flip-flops and providing two complete analysis examples: one using D flip-flops (yielding a 2-bit counter) and another using J-K flip-flops, both demonstrating the construction of transition tables, state tables, and state diagrams for Mealy and Moore machines.
π Lecture Summary
Equation Definition
The Traffic Controller uses equation definitions to define the TRSTATE variable, which is dependent upon the clock transition. The Timer is reset when the state is either NSY2 or EWY2.
π Definition β TRSTATE.CLK: The clock input for the traffic controller state register. π Definition β TMRST: The timer reset signal. It is set to logic high when the current state is NSY2 or EWY2.
π Formula: TMRST := (TRSTATE == NSY2) # (TRSTATE == EWY2);
β The timer is reset (TMRST = 1) when the traffic controller state equals NSY2 OR EWY2.
π Example: Table 38.1 shows this equation definition. When the state machine is in either the NSY2 or EWY2 state, the combinational logic asserts the TMRST signal, resetting the external timer to begin its countdown for the next traffic light phase.
The circuit diagram of the Timer connected to the GAL16V8 based Traffic Light Controller
The circuit diagram (Figure 38.1) shows a Traffic Light Controller built around two GAL16V8 programmable logic devices. The first GAL16V8 is connected to external inputs NSSR, EWSR, and the CLK signal. It also receives two timer signals: LTIME and STIME, which determine the Green cycle time during day and night respectively. The output of the first controller is TMRST, which resets the Timer when the Controller is in state NSY2 or EWY2. The state outputs Q0βΎ, Q1βΎ, and Q2βΎ (inverted state outputs) are connected to the input of the second GAL16V8. This second chip is programmed as a combinational circuit to turn on/off the traffic signal lights: NSRED, NSYEL, NSGRN, EWRED, EWYEL, and EWGRN. The chip is also connected to MANUAL and FLASHCLK inputs. When MANUAL is activated, it puts the traffic signal in Manual Mode, where the Yellow signal on both road sections repeatedly flashes, with the flash rate determined by the FLASHCLK signal.
Switching of Traffic Lights
The main definitions and declarations of the ABEL input file for turning on/off the traffic lights are given (Table 38.2). The Pin Declarations (Table 38.2a) assign inputs and outputs to specific pins on the GAL16V8:
- FLASHCLK, MANUAL β pins 1, 2
- !Q0, !Q1, !Q2 (inverted state variables) β pins 4, 5, 6
- NSRED, NSYEL, NSGRN β pins 19, 18, 17
- EWRED, EWYEL, EWGRN β pins 14, 13, 12
The Red, Yellow, and Green signals are turned on/off at different states, as shown in Table 38.2b. For example, in state NSG, the North-South Green is on, and the East-West Red is on. In state NSY, the North-South Yellow is on. In state EWG, the East-West Green is on.
π Formula (Equations for turning on/off traffic lamps - Table 38.2c):
NSRED = !MANUAL & (TRSTATE !=NSG) & (TRSTATE != NSY) & (TRSTATE != NSY2);NSYEL = !MANUAL & ((TRSTATE == NSY) # (TRSTATE == NSY2)) # MANUAL & FLASHCLK;NSGRN = !MANUAL & (TRSTATE == NSG);EWRED = !MANUAL & (TRSTATE !=EWG) & (TRSTATE != EWY) & (TRSTATE != EWY2);EWYEL = !MANUAL & ((TRSTATE == EWY) # (TRSTATE == EWY2)) # MANUAL & FLASHCLK;EWGRN = !MANUAL & (TRSTATE == EWG);
The equations show that when MANUAL is inactive (!MANUAL = 1), the lights are controlled by the current state (TRSTATE). When MANUAL is active, NSYEL and EWYEL flash based on the FLASHCLK signal. π‘ Why this matters: The !MANUAL term ensures the automatic controller is disabled in manual mode, while the # MANUAL & FLASHCLK term forces the yellow lamps to toggle with the flash clock.
Analysis of Clocked Synchronous State Machines
Analysis of a Clocked Synchronous State Machine is the opposite process of Design and Implementation. The goal is to take an implemented circuit and describe its behavior using a state table or state diagram. The analysis procedure has three basic steps:
- Determine the next-state and output functions F and G:
- Next State = F(Current State, Input)
- Output = G(Current State, Input)
- Use the functions F and G to construct a state/output table.
- Draw a State diagram that represents the information in graphical form.
The functional behavior of a flip-flop is described by a characteristic equation. This equation is a function of its current state and inputs and describes the functional response, not the timing. The characteristic equations can be derived from excitation tables using Karnaugh maps.
π Definition β Characteristic Equation: A boolean equation that defines the next state (Q(t+1)) of a flip-flop as a function of its current state (Qt) and its inputs (e.g., S, R, D, J, K).
π Formula (S-R Latch Characteristic Equation):
Q(t+1) = S + RβΎβΎ * Qt
β The next state is '1' if the Set input is 1, OR if we are not Resetting (R=0) and the current state is 1.
π Example (Deriving S-R Latch Characteristic Equation): The S-R Latch transition table (Table 38.3) shows that for an output transition from 0 to 1, the inputs must be S=1, R=0 or S=1, R=x. The information is mapped to a 3-variable K-map (Figure 38.2), which simplifies to the characteristic equation Q(t+1) = S + RβΎβΎ * Qt.
π Formula (Characteristic Equations for various flip-flops - Table 38.4):
| Device Type | Characteristic Equation |
|---|---|
| S-R Latch | Q(t+1) = S + RβΎβΎ * Qt |
| D Latch | Q(t+1) = D |
| Edge-triggered D flip-flop | Q(t+1) = D |
| J-K flip-flop | Q(t+1) = J * QtβΎ + KβΎβΎ * Qt |
State Machine Analysis Example 1
A State Machine with two positive-edge triggered D flip-flops is shown in Figure 38.3. The two flip-flops transfer their D input values to their outputs. The excitation inputs to the two D flip-flops are determined by the combinational circuit.
π Formula (Excitation Equations for D0 and D1 - Table 38.5):
D0 = Q0βΎβΎ * EN + Q0 * ENβΎD1 = Q1βΎβΎ * EN + Q0βΎ * Q1 * EN + Q0 * Q1βΎ * EN
Using the D flip-flop characteristic equation (Q(t+1) = D), the Transition Equations are:
π Formula (Transition Equations for Q0 and Q1 - Table 38.6):
Q0(t+1) = Q0βΎ * EN + Q0 * ENβΎQ1(t+1) = Q1βΎ * EN + Q0βΎ * Q1 * EN + Q0 * Q1βΎ * EN
From these transition equations, a Transition Table is prepared (Table 38.7). The output is defined by: MAX = Q0 * Q1 * EN. Because the output depends on the input (ENABLE), this is a Mealy Machine. The State Table (Table 38.8) assigns state names (A, B, C, D) to the Q1Q0 values (00, 01, 10, 11). The resulting machine is a 2-bit Counter that increments when ENABLE=1 and holds when ENABLE=0. The MAX output is 1 only when the state is D (11) and the input is 1.
π Example: If the current state is D (Q1Q0=11) and ENABLE=1, the next state is A (Q1Q0=00) and the output MAX=1. If the output were only dependent on the current state and not the input, it would be a Moore Machine (Table 38.9). The corresponding state diagrams are shown in Figures 38.4 (Mealy) and 38.5 (Moore). In the Mealy diagram, the output is written on the transition arrow (input/output), while in the Moore diagram, the output is written inside the state circle.
State Machine Analysis Example 2
A State Machine with two edge-triggered J-K flip-flops is shown in Figure 38.6. The two sets of excitation equations are:
π Formula (Excitation Equations for J0, K0, J1, K1 - Table 38.10):
J0 = X * YK0 = XβΎ * YβΎ + Q1 * YJ1 = X * Q0βΎ + YβΎK1 = Q0βΎ * Y + X * Y * Q0
Using the J-K flip-flop characteristic equation (Q(t+1) = J * QβΎ + KβΎ * Q), the Transition Equations are derived through boolean algebra.
π Formula (Simplified Transition Equations - Table 38.11):
Q0(t+1) = X * Y * Q0βΎ + XβΎ * Q1 * Q0 + XβΎ * Y * Q0 + Y * Q1 * Q0Q1(t+1) = X * Q0βΎ * Q1 + YβΎ * Q1 + X * Q0 * Q1 + YβΎ * Q0 * Q1 + XβΎ * Y * Q1 + Y * Q0 * Q1
A Transition Table is then prepared (Table 38.12) showing the next state for all four combinations of present state (Q1Q0) and inputs (X,Y). The output equation is: Z = X * Q0 * Q1βΎ + YβΎ * Q0βΎ * Q1. Since the output Z depends on the inputs (X, Y), this is a Mealy Machine. The State Table (Table 38.13) assigns state names to the Q1Q0 values. The corresponding State Diagram is shown in Figure 38.7.
π Example: If the present state is A (Q1Q0=00) and the inputs are XY=01, the next state is C (Q1Q0=10) and the output Z=1.
β Key Takeaways
- The Traffic Light Controller uses two GAL16V8 chips: one for the state machine and timer control (with equations defining TRSTATE and TMRST), and another for decoding states into specific lamp outputs (NSRED, NSYEL, etc.), including a Manual flash mode.
- The Analysis of a Clocked Synchronous State Machine is the reverse of design; it involves deriving next-state and output equations from a circuit, constructing a transition table, and then creating a state table and state diagram.
- Each flip-flop type has a distinct characteristic equation (e.g.,
Q(t+1) = Dfor D-FF,Q(t+1)=JQ' + K'Qfor JK-FF) which describes its next-state behavior and is essential for analysis. - The key difference between a Mealy and Moore machine is that a Mealy machine's output depends on both the current state and the inputs, while a Moore machine's output depends only on the current state. This is reflected in the state diagram and state table.
- A multi-variable transition table lists all possible next states for every combination of present state and inputs. Assigning state names (A, B, C, D) to the binary state vectors creates the more abstract state table.
π§ Quick Revision Questions
- What is the purpose of the TMRST signal in the Traffic Light Controller, and when is it activated?
- What are the three main steps in the procedure for analyzing a Clocked Synchronous State Machine?
- Write the characteristic equation for a J-K flip-flop. What does each term represent?
- In State Machine Analysis Example 1, what specific circuit function (e.g., counter, shift register) does the D flip-flop based machine implement?
- What is the fundamental difference in the state/output table between a Mealy machine and a Moore machine?
π Lecture 39 β MEMORY
π Overview: This lecture introduces the fundamental concepts of computer memory systems, covering memory organization, capacity, and the basic operations of reading and writing data. It explains the different types of memory, including RAM and ROM, and delves into the internal structure and operation of static RAM cells and arrays, which is essential for understanding how digital systems store and retrieve information.
ποΈ Topics Covered
The lecture begins with an introduction to memory elements in sequential circuits and computer systems, followed by memory organization in terms of cells, nibbles, bytes, and words. It then covers memory capacity and density, the signals and basic operations on memory including read and write operations, and concludes with a detailed explanation of memory typesβspecifically Random Access Memory (RAM) and Read-Only Memory (ROM)βwith a focus on Static RAM and its internal cell structure and array organization.
π Lecture Summary
Basic Memory Concepts
Sequential circuits require memory elements, which are relatively small for storing few binary bits. Large memories in computer systems store application programs as program instructions. Memories store data in units of bits (smallest unit), nibbles (4-bit unit), and bytes (8-bit unit, composed of two nibbles). A word is a complete unit of information consisting of one or more bytes.
Each storage element is called a cell, capable of storing a logic 0 or logic 1. Memories are arranged in an array where each cell can be identified by a row and column number. For example, in a 64-cell memory array (8 x 8), the first row stores eight bits of binary information (e.g., 11001010). Individual cells at row 5, column 3 store a binary 1, and at row 6, column 7 store a binary 0.
Memory Organization
A memory array can be organized based on the unit of data. A 64-cell array (8 x 8) is considered an 8-byte memory with eight locations, each storing a single byte. The same array organized as 4 x 16 stores 16 nibbles, and as 1 x 64 stores 64 single-bit values. A memory is identified by the number of units it can store times the unit size: an 8 x 8 memory is an 8-byte memory, a 16 x 4 memory is a 16-nibble memory, and a 64 x 1 memory is a 64-bit memory. Practical memory chips are organized as 16K x 8 (storing 16K bytes or 16 x 1024 = 16384 bytes) or 32K x 4 (storing 32K nibbles or 32 x 1024 = 32768 nibbles).
π Definition β Nibble: A 4-bit unit of data. π Definition β Byte: An 8-bit unit of data, composed of two nibbles.
Memory Capacity and Density
Memory capacity is the maximum amount of information a memory array can store in bits. For example, a 16K x 8 memory stores 16K bytes (131072 bits), and a 32K x 4 memory stores 32K nibbles (131072 bits). The total number of cells in both cases is 131072. Memory density specifies the number of bits stored per unit areaβthe more bits stored per unit area, the denser the memory. Capacity and density are determined by the total number of cells implemented per unit area.
Memory Signals and Basic Operations on Memory
Two basic operations are performed on memories: reading information from the memory and writing data to the memory. Memories provide several signals to support these operations, as shown in a block diagram of a read-write memory.
π Definition β Read/Write Signal: A signal that configures the memory for read or write operation. When set high, data is read from memory; when set low, data is written into memory. Some chips have separate Read and Write signals.
π Definition β Address Signals: Signals that specify the memory location from which information is accessed. A set of parallel address lines (the address bus) carries the address. The number of address bits depends on memory sizeβfor example, a memory with four locations requires a 2-bit address bus.
π Formula: ( 2^n ) β The number of uniquely addressable locations, where ( n ) is the number of address bits. Thus, ( 2^4 = 16 ) means 4 bits identify 16 locations.
π Definition β Data Signals: Lines used to retrieve information during read operations and to provide data for storage during write operations. The number of data lines equals the number of data bits stored at each addressable location. For example, a byte-organized memory requires an 8-bit data bus, while a nibble-organized memory requires a 4-bit data bus.
π Definition β Memory Select or Enable Signal: A chip enable or chip select signal that must be activated before a memory chip can be accessed in a computer system with multiple memory chips.
Memory Read Operation
The memory read operation proceeds as follows:
- The memory chip is selected by activating the Memory Select signal.
- The Read signal is asserted to configure the memory for reading.
- An address (e.g., 100) is applied on the Address Lines.
- The internal address decoder decodes the address and selects one unique row.
- The data at that location (e.g., 00110001) is read and placed on the data bus.
- The microprocessor latches this data into its data buffer.
π Example: A microprocessor places address 100 on the address bus. The internal address decoder activates row select line 4. Data at location 4 (00110001) is placed on the data bus and stored in the microprocessor's data buffer.
Memory Write Operation
The memory write operation proceeds as follows:
- The memory chip is selected by activating the Memory Select signal.
- The Write signal is asserted to configure the memory for writing.
- An address (e.g., 011) is placed on the Address Lines by the microprocessor.
- The internal address decoder decodes the address and selects one unique row (location 3).
- The data to be written (e.g., 10110010) is placed on the data bus by the microprocessor and stored at the selected location.
π Example: A microprocessor places address 011 on the address bus, activating row select line 3. The microprocessor also places data 10110010 on the data bus, which is stored at location 3.
π‘ Why this matters: The address decoder is critical because it ensures that only the correct memory location is accessed during read and write operations, preventing data corruption.
Memory Types
Two major categories are Random Access Memory (RAM) and Read-Only Memory (ROM).
- RAM allows read or write operations at any address, with all locations accessible in equal time. RAM is volatileβdata is lost when power is turned off.
- ROM retains data permanently even when power is offβit is non-volatile. ROM is programmed by the manufacturer and contains critical information for starting (booting) the computer. Users cannot write information to ROM chips.
Random Access Memory (RAM)
RAM is divided into two types:
- Static RAM (SRAM): Uses flip-flops as storage elements. Each cell retains information as long as power is supplied. SRAM is faster than DRAM.
- Dynamic RAM (DRAM): Uses capacitors to store binary information. A charged capacitor stores a binary 1, and an uncharged capacitor stores a binary 0. Capacitors lose charge over time, so a Refresh cycle is required periodically. DRAM has higher density and lower cost than SRAM but is slower.
Static RAM
Each cell of a Static RAM is implemented using a flip-flop made of several MOSFET transistors. As long as external power is applied, the static memory cell retains data. In the flip-flop based cell:
- When the SEL signal is activated, the output buffer is enabled, allowing data to be read.
- When both SEL and W(rite) signals are activated, the latch is in transparent mode, and data from the Data In line flows to the output.
- Data In and Data Out lines can be connected to form a bi-directional line, as read and write operations occur at different times.
An 8 x 4 Static RAM array combines flip-flop cells with additional logic:
- A 3 x 8 decoder decodes a 3-bit address to select one of eight locations, each comprising a group of 4 cells.
- For address 000, the first output line activates the SEL input of the four latches in the first row. Address 111 activates the eighth row.
- The memory has four Data In lines (Data In 3 = MSB, Data In 0 = LSB) and four Data Out lines.
- Read and write operations are controlled by W (Write), CS (Chip Select), and OE (Output Enable) signals. The CS and OE signals enable tri-state buffers on the Data Out lines for reading. The W and CS signals are used to write data.
π Example: To write data 1001 at the 6th memory location, address bits Aβ, Aβ, Aβ are set to 110, selecting the 6th row. Data 1001 is placed on the four Data In lines. The CS and W signals activate the four latches in the sixth row to transparent mode, making the data available at the Q outputs. When CS and W are deactivated, the latches store the data value.
A 16K x 8 memory stores byte values in 16 Γ 1024 locations. Fourteen address lines are required to address these locations, and eight bi-directional data lines are used for read/write operations. The CS, WE, and OE signals are active low.
β Key Takeaways
Memories store data in cells arranged in arrays, organized as bits, nibbles, or bytes, and are identified by their unit count and size. Two fundamental operationsβread and writeβrely on address, data, and control signals, with the address decoder selecting specific locations. RAM is volatile and allows both reading and writing, while ROM is non-volatile and read-only. Static RAM uses flip-flops for fast, reliable storage but has lower density than Dynamic RAM, which uses capacitors requiring periodic refresh. The internal structure of SRAM arrays, including decoders and tri-state buffers, is essential for understanding how data is accessed and stored in digital systems.
π§ Quick Revision Questions
- What is the difference between a nibble and a byte in terms of bit count, and how are they related?
- A memory chip has 12 address lines. Use the formula ( 2^n ) to determine how many unique locations it can address.
- Describe the sequence of steps required to perform a read operation on a memory chip.
- Why is Dynamic RAM (DRAM) considered volatile, and what mechanism is required to prevent data loss?
- In an 8 x 4 Static RAM, what is the role of the 3 x 8 decoder, and how does it interact with the Chip Select (CS) and Write (W) signals during a write operation?
π Lecture 40 β Decoding Large Memories
π Overview: This lecture covers the architecture and operation of large memory systems, focusing on row and column decoders for faster access. It explains memory read/write cycles, synchronous burst SRAM, dynamic RAM (DRAM) cells, and address multiplexing techniques used to reduce pin count in modern memory chips.
ποΈ Topics Covered
The lecture introduces memory array decoding using row and column decoders, input/output data buffer circuits, memory read and write timing cycles, synchronous burst SRAM architecture with its burst logic circuitry, DRAM cell operation including writing, reading, and refreshing, and address multiplexing using RAS and CAS signals in DRAM chips.
π Lecture Summary
Decoding Large Memories
Large memories like 16 KB use row and column decoders to split the input address into a row address and a column address, activating respective select lines. This two-dimensional arrangement speeds up decoding compared to linear address methods. As memories get larger, splitting addresses into row and column components requires smaller decoders with fewer gates, resulting in faster decoding times and faster memory access.
Input/Output Data Circuit
The Input/Output Buffer manages data flow. When the W (write) signal is active and the chip is selected (CS active), the top AND gate enables data writing to latches. When W is inactive but CS and OE (output enable) are active, the bottom AND gate enables tri-state buffers, allowing data from latches to appear on the bi-directional Data In/Out lines.
Memory Read Cycle
The Read Cycle begins by applying stable address signals for duration tRC (read cycle time). After activating CS and OE, valid data appears after delay tGQ (output enable access time). tAQ (address access time) is measured from valid address appearance to valid data on data lines. tEQ (chip enable access time) is the time for valid data after CS goes low.
Memory Write Cycle
The Write Cycle begins by applying stable addresses for duration tWC (write cycle time). The WE (write enable) signal activates after ts(A) (address setup time). The write pulse width is the duration WE stays active. Data must be applied after WE activates and remain valid for tWD minimum. Data must remain valid for th(D) (hold time) after WE deactivates.
Synchronous Burst SRAM
RAM chips are divided into Asynchronous SRAM (ASRAM) and Synchronous Burst RAM (SB SRAM). Asynchronous SRAM operation doesn't depend on clock signals. Synchronous SRAM uses a clock to synchronize read/write operations for faster performance. All inputs (address, WE, CS) are latched on the positive clock edge simultaneously. Two variations exist: Flow-through SRAM (no data output register, data available asynchronously) and Pipelined SRAM (has data output register that latches read data).
π Definition β Burst feature: Allows synchronous SRAM to read or write up to four locations using a single address. The lower two address bits connect to Burst logic circuitry which internally increments addresses at each clock transition, producing four addresses (00, 01, 10, 11).
π Example: If external base address 37A0H is stored in the Address Register, the Burst Logic circuitry produces addresses 37A0, 37A1, 37A2, and 37A3.
Dynamic RAM (DRAM)
Static RAM uses 4-6 transistors per latch to store one bit. Dynamic RAM (DRAM) uses a single transistor and capacitor to store a binary value, occupying less space and allowing higher density. The capacitor stores charge representing logic 1 or 0. The drawback is capacitor discharge over time; periodic refreshing is required or data is lost, complicating DRAM operation.
π Definition β DRAM cell write: The selected row activates the MOSFET, connecting the column line to the capacitor. R/W signal set low enables the Input Buffer. The logic value at DIN charges or discharges the capacitor via path AβBβD.
π Definition β DRAM cell read: The selected row activates the MOSFET. R/W signal set high enables the Output Buffer. The stored charge on the capacitor is available at DOUT via path DβBβA.
π Definition β Refresh cycle: The Refresh signal is set high enabling the Refresh Buffer. R/W is set high. Information from the capacitor passes through the Output Buffer/Sense Amplifier and is fed back to the capacitor through the Refresh Buffer via path CβBβD.
π‘ Why this matters: Without periodic refresh (every few milliseconds), capacitors discharge and all stored data is lost, making refresh circuitry essential for DRAM operation.
Address Multiplexing
DRAM chips use address multiplexing to reduce address lines by half. The address is split into row address and column address. First, the row address is applied and latched by the Row Address Latch using the RAS (Row Address Strobe) signal. Then, the column address is applied on the same lines and latched by the Column Address Latch using the CAS (Column Address Strobe) signal.
π Definition β Refresh cycle control: The Refresh Control and Timing circuit configures the Data Selector to select row addresses generated by the Refresh Counter. During refresh, all memory cells connected to the selected row are refreshed simultaneously.
π Example: A 1M bit DRAM arranged as 1024 rows Γ 1024 columns is refreshed by selecting all 1024 rows in sequence.
β Key Takeaways
Students must understand that large memories use row and column decoders for faster access, with timing parameters like tRC, tAQ, tGQ, tEQ for reads and tWC, ts(A), tWD, th(D) for writes critical for proper operation. Synchronous Burst SRAM synchronizes all operations to a clock and can access four locations from one address using burst logic. DRAM stores bits using a single transistor-capacitor pair for higher density but requires periodic refresh cycles to prevent data loss. Address multiplexing using RAS and CAS strobes reduces the number of address pins on DRAM chips by half.
π§ Quick Revision Questions
- Why do large memories use row and column decoders instead of a single linear decoder?
- What is the difference between tAQ (address access time) and tGQ (output enable access time) in a memory read cycle?
- How does the burst feature in Synchronous SRAM generate four addresses from a single base address?
- Explain the three operations (write, read, and refresh) in a DRAM cell showing the data paths involved.
- How does address multiplexing reduce the number of address lines in DRAM, and what are the roles of RAS and CAS signals?
π Lecture 41 β READ AND WRITE CYCLES
π Overview: This lecture covers the read and write cycles of DRAM memory, including FAST Page Mode access, and explores various refresh methods. It then transitions to Read-Only Memory (ROM), detailing different types such as Mask ROM, PROM, EPROM, and EEPROM. Finally, it introduces FLASH memory, explaining its unique operations that combine the benefits of RAM and ROM.
ποΈ Topics Covered
The lecture begins with the detailed timing diagrams for DRAM Read and Write cycles. It then explains the FAST Page Mode for faster access to consecutive memory locations. The next section covers Burst Refresh and Distributed Refresh modes, followed by RAS only and CAS before RAS refresh techniques. The lecture then categorizes different types of DRAMs, including FPM, EDO, and Synchronous DRAM. The focus shifts to ROM, starting with a general architecture and then detailing specific types: Mask ROM, PROM, UV EPROM, and EEPROM. The internal structure of a 256 x 4 ROM is examined along with its application as a binary-to-gray code converter. The lecture concludes with a detailed discussion on FLASH memory, its storage cell structure, and its three primary operations: Programming, Read, and Erase.
π Lecture Summary
READ AND WRITE CYCLES
In a DRAM read cycle, the RAS and CAS signals are activated sequentially to latch the multiplexed row and column addresses. The R/W signal is activated to read data, which is then made available on the D_OUT data line. The write cycle is similar; the row and column addresses are applied with the strobe signals. The write signal is activated, allowing data placed on the D_IN data line to be stored in the selected memory cell.
π Definition β Read Cycle: The process of activating RAS and CAS signals to latch the row and column addresses, and then activating the R/W signal to output data on the D_OUT line. π Definition β Write Cycle: The process of activating RAS and CAS to latch addresses, and then activating the R/W signal to store data from the D_IN line into the selected memory cell.
FAST Page Mode
In FAST Mode Page Access, all the columns in the same row are either read or written. A single row is considered a βPageβ of memory. The row address is latched by the RAS signal going low, and the RAS remains low throughout the page access. The CAS signal is toggled between high and low to select successive columns. Data is read or written to successive column locations. During the read cycle, when CAS goes high, the D_OUT line is disabled, so data must be latched by the external system before this occurs.
π‘ Why this matters: FAST Page Mode significantly speeds up access when reading consecutive data from the same row, as the row address only needs to be set once.
π Formula: Access Time (FAST Page) < Access Time (Random Access) for consecutive addresses on the same row.
Burst Refresh and Distributed Refresh
DRAM chips are refreshed using either Burst Refresh Mode or Distributed Refresh Mode. In Burst Refresh, all rows in the DRAM chip are refreshed consecutively. For a DRAM with an 8 msec refresh cycle, a burst refresh of all rows occurs once every 8 msec. During this cycle, normal read/write operations are suspended. In Distributed Mode, the refresh cycle is interspersed between normal read/write cycles. For a 1024 x 1024 DRAM with an 8 msec refresh cycle, each of the 1024 rows must be refreshed every 7.8 microseconds.
π Definition β Burst Refresh: A refresh mode where all rows are refreshed consecutively, preventing normal memory access during the cycle.
π Definition β Distributed Refresh: A refresh mode where refresh cycles are interspersed between normal read/write cycles.
π Formula: Refresh Interval = Total Refresh Time / Number of Rows β For 8 msec / 1024 rows = 7.8 Β΅s per row for distributed refresh.
RAS only Refresh and CAS before RAS Refresh
In RAS only refresh, the RAS signal goes low, latching the row address to be refreshed, while the CAS signal remains inactive high. An external counter provides the row addresses for the refresh operation. In CAS before RAS refresh, the CAS goes low before RAS goes low. This sequence activates an internal refresh counter that generates the row address to be refreshed, which is then switched by a data selector into the row decoder.
π Definition β RAS only Refresh: A refresh method where an external counter provides row addresses, and the refresh is triggered by RAS. π Definition β CAS before RAS Refresh: A refresh method where an internal counter is automatically activated by the CAS signal going low before RAS, providing the row address.
Types of DRAMs
Several different types of DRAMs are available. Fast Page Mode DRAM (FPM) is faster for successive reads on the same row, but data on the D_OUT line must be latched before CAS is de-asserted. Extended Data Output (EDO) DRAM is similar to FPM, but the CAS signal doesnβt disable the D_OUT line. This allows the next column address to be accessed before the external system accepts the current data. Synchronous DRAM (SDRAM) operations are tied to a clock signal that also times the microprocessor, allowing for close synchronization.
π Definition β Extended Data Output (EDO) DRAM: A DRAM type where the data output remains valid even after CAS goes high, allowing for faster access to the next column. π Definition β Synchronous DRAM (SDRAM): A DRAM type that uses a clock signal to synchronize its operations with the microprocessor. π‘ Why this matters: EDO DRAM improves read cycle speed by overlapping the fetching of the next address with the reading of current data, unlike FPM.
ROM Read-Only Memory
A ROM contains permanent data that cannot be changed. It does not allow a write operation. ROMs store data used repeatedly, such as tables, conversions, and programmed instructions for system initialization and operation. ROMs are non-volatile, meaning they retain data when power is turned off. Different types include Mask ROM (data stored during manufacturing), PROM (programmable once by user), EPROM (erasable and reprogrammable), UV EPROM (erased by UV light), and EEPROM (electrically erasable).
π Definition β Read-Only Memory (ROM): A non-volatile memory type that stores permanent data and does not allow write operations.
Mask ROM
The storage cell in a Mask ROM is implemented using a MOS transistor. The Gate is connected to the row line and the output (Drain) is connected to the column line. When a row is selected, all transistors with their Gate connected to the row are turned on, connecting a high output to the column line. Transistors with their Gate connection removed are not turned on, and the corresponding column lines have a logic low output. During manufacturing, cells storing a logic 1 have their Gate connections intact, while cells storing a logic 0 have their Gate connections removed.
π Definition β Mask ROM: A ROM where data is permanently stored by the presence or absence of a MOSFET gate connection during the manufacturing process.
ROM Architecture and Applications
A 16 x 8 ROM uses a 4-bit address decoded by a 4 x 16 decoder to select a row. MOSFETs connected to the selected row output a logic 1; those not connected output a logic 0. A terminating resistor on each column line ensures the output stays low when a MOSFET outputs a logic 0. A 256 x 4 ROM has an 8-bit address, split into a 5-bit row address (selecting one of 32 rows) and a 3-bit column address (selecting one of 8 column lines via four 8 x 1 Multiplexers). A common application is a look-up table, for example, converting a 4-bit binary value to a 4-bit Gray Code value, where the binary input is the address and the corresponding Gray Code is the stored data.
ROM Read Cycle & Access Time
The Access Time of a ROM is the time it takes for data to appear at the Data Output after an address is applied at the address input lines. It can also be measured from the activation of the chip enable (CS) signal to the appearance of valid data at the output lines.
π Definition β Access Time (ROM): The time delay between applying a valid address (or activating chip enable) and the appearance of valid data at the output.
π Formula: Access Time = t_ACC (time from address valid to data valid) or t_CE (time from chip enable active to data valid).
PROM (Programmable ROMs)
A PROM can be programmed once by the user. It uses a fusible link to connect the output of the MOS transistor to the column line. When the fuse is intact, a logic high is seen on the column line when the cell is selected. When the fuse is blown, the column line outputs a logic low.
π Definition β Programmable ROM (PROM): A ROM that can be programmed once by the user by selectively blowing fusible links within the memory array.
EPROM Erasable PROM
An EPROM is an Erasable PROM that uses an NMOSFET array with an isolated-gate structure. The isolated gate can store a charge indefinitely. The presence or absence of gate charge represents the data bit. UV EPROM is erased by exposing the chip to high-intensity UV light through a quartz window, neutralizing the charge after a few minutes. EEPROM (Electrically Erasable PROM) is erased electrically and can be programmed and erased in-circuit. For a 2 KB EPROM, 11 address lines (A0 to A10) and 8 data lines are needed. To read, the chip enable/program (CE/PGM) and output enable (OE) are set to active-low.
π Definition β Erasable PROM (EPROM): A ROM that can be erased and reprogrammed, using a charge stored on an isolated gate to represent a data bit.
Programming EPROM
To program an EPROM, a high DC voltage is applied at the V_PP pin and the OE signal is set to logic high. The data to be programmed is applied to the 8 data lines, and the address is applied to the address lines. A high-level pulse is applied at the CE/PGM signal to program the data at the selected address. The entire EPROM is programmed by repeating this process for each address.
π Definition β EPROM Programming: The process of applying a high voltage and specific control signals to store charge on the floating gate of selected memory cells.
EEPROM Electrically Erasable PROM
An Electrically Erasable PROM (EEPROM) is programmed and erased by applying electric pulses. It does not need to be exposed to UV light, allowing for rapid in-circuit programming and erasing.
π Definition β Electrically Erasable PROM (EEPROM): A ROM that can be programmed and erased electrically in-circuit.
FLASH Memory
FLASH Memory is an ideal memory that has high density, read/write capability, is non-volatile, has fast access time, and is cost-effective. It exhibits the key characteristics of both RAM and ROM. Its high-density cell is implemented using a single floating-gate MOS transistor. A data bit is stored as the presence of a charge (logic 0) or the absence of a charge (logic 1) on the floating gate. The amount of charge determines whether the transistor will turn on when a control voltage is applied.
π Definition β FLASH Memory: A non-volatile memory with read/write capability, high density, and fast access times.
FLASH Memory Operations
FLASH Memory operations are classified into Programming, Read, and Erase. Programming adds charge to the floating gate of cells that are to store a logic 0, while cells storing a logic 1 remain unchanged. A positive voltage at the Control Gate attracts electrons to the floating gate. During a Read Operation, a positive voltage is applied to the transistorβs control gate. If a negative charge (logic 0) is stored on the gate, the transistor does not turn on (no current = 0). If no charge (logic 1) is stored, the transistor turns on (current = 1). The Erase Operation removes charge from the memory cell by applying a large positive voltage at the source with respect to the control gate, attracting the electrons away from the floating gate. A FLASH memory is erased prior to programming.
π Definition β FLASH Programming: Adding charge to the floating gate of a cell to store a logic 0, while leaving a cell with no charge for a logic 1. π Definition β FLASH Read: Applying a voltage to the control gate; a cell with stored charge (0) will not conduct current, while a cell without charge (1) will conduct current. π Definition β FLASH Erase: Removing charge from the floating gate of all cells in a memory block by applying a reverse voltage.
β Key Takeaways
For the final exam, you must be able to distinguish between DRAM refresh methods (Burst vs. Distributed) and types (RAS-only vs. CAS-before-RAS). Understand how FAST Page Mode and EDO DRAM improve read speed compared to standard FPM. For ROM, memorize the programming and erasing capabilities of each type: Mask (permanent), PROM (one-time), EPROM (UV-erasable), and EEPROM (electrically erasable). Crucially, master the FLASH memory operations: programming (charging the floating gate for logic 0), reading (detecting current flow), and erasing (removing charge). Finally, recall that FLASH memory is non-volatile and combines the density and read/write capability of other memory types.
π§ Quick Revision Questions
- During a FAST Page Mode read cycle, what happens to the D_OUT data line when CAS goes high, and what must the external system do to avoid losing data?
- What is the key difference between a RAS-only refresh and a CAS-before-RAS refresh regarding the source of the row address?
- How does an EDO DRAM overcome the speed limitation of a Fast Page Mode DRAM during consecutive read operations?
- In the context of a ROM look-up table, what does the 4-bit address represent, and what does the stored 4-bit data value represent in a binary-to-gray code converter?
- During a FLASH read operation, why does a memory cell storing a logic 0 not produce a current, while a cell storing a logic 1 does?