CS 300 – Lecture 3 Intro to Computer Architecture / Assembly Language Sequential Circuits.
Published byModified over 4 years ago
Presentation on theme: "CS 300 – Lecture 3 Intro to Computer Architecture / Assembly Language Sequential Circuits."— Presentation transcript:
CS 300 – Lecture 3 Intro to Computer Architecture / Assembly Language Sequential Circuits
A Mystery Circuit Consider this circuit: 1 1 0 1
Sequential Circuits We've just seen a "flip flop" – a 1 bit memory. Circuits that use memory are called "sequential". Note that you don't know what the output is based on just the inputs! R' S'Q Q'
Adding A Clock RS Flipflop as before Clock disables input – 1 = follow D, 0 = memory Input Data
An Edge Triggered D Flip-Flop Master Slave Opposite Clocks Note: And gates should be NAND!
A 1 Bit Memory What you've just seen is a 1 bit memory. Inputs: * Data: Value to remember * Clock: at the rising (falling?) edge of the clock, whatever value is in the data wire is clocked in. This only changes output on the clock edge!
Clocks A clock is the “heartbeat” a computer. The signal on a wire carries a new value at each clock. The clock determines the flow rate of information along a wire. If you want information to flow faster you use more wires (bits) or a faster clock. A simple processor uses a single clock for everything in the processor – more complex ones have multiple clocks.
Finite State Machines Inputs: a set of wires: i 1, i 2, … i m Outputs: a set of wires: o 1, o 2, …, o n State: a set of D flip flops: s 1, s 2, … s 0 The state can also be part of the output. Use a truth table to define all outputs and the data input to each flip-flop. We can always represent the operation of this circuit as a state machine. Note that the clock is usually left implicit – all of the flip-flops share a common clock
Example: A 2-Bit Counter Input: "reset" Outputs: counter value (s0 and s1) Truth table: Let's draw this circuit rs0s1s0's1' 1dd00 00001 00110 01011 01100
Creating a State Machine * Determine inputs and outputs * Use enough flip-flops to encode all possible states * Assign states to flip-flop configurations The optimal encoding of states is the one that minimizes the switching logic. This is the sort of thing you need a computer for!
Sequential Circuits Why sequential circuits? They allow us to avoid the "unsynchronized" world of combinatory circuits where signal propagation is observable. We set the clock so that all outputs in the combinatory part of the circuit are stable before new data is clocked into the flip-flops.
Sequential Design Patterns A "register" is just a bunch of flip flops that shares a common clock (load signal). A "Ram" is just a multiplexed collection of registers. Let’s see what a RAM looks like. A "Shift register" is one in which there is a data path leading between the bits. Let's design a shift register.
Memory Structure * XY Decoding * Read / write signals * Use of tri-state logic to express "implicit" or gates