Chapter 6. sequential logic design. This is the beginning of the second part of this course, sequential logic.

Size: px
Start display at page:

Download "Chapter 6. sequential logic design. This is the beginning of the second part of this course, sequential logic."

Transcription

1 Chapter 6. sequential logic design This is the beginning of the second part of this course, sequential logic. 1

2 equential logic equential circuits simple circuits with feedback latches edge-triggered flip-flops Timing methodologies cascading flip-flops for proper operation clock skew Asynchronous inputs metastability and synchronization Basic registers shift registers simple counters Hardware description languages and sequential logic Again, sequential logic circuits are quite different from combinational logic. In general, sequential systems are more difficult to design. We will discuss some basic issues in the sequential logic systems in this chapter. 2

3 equential logic circuits (LCs) Circuits with feedback outputs = f(inputs, past inputs, past outputs) basis for building "memory" into logic circuits door combination lock is an example of a sequential circuit state is memory state is an "output" and an "input" to combinational logic combination storage elements are also memory value comparator C1 C2 C3 multiplexer mux control new equal comb. logic state reset clock equal open/closed In most sequential logic circuits (LCs), there are storage parts or memory elements. Recall that in the door lock system, three numbers should be stored and compared. What is the key element here? 3

4 Circuits with feedback How to control feedback? what stops values from cycling around endlessly X1 X2 Xn switching network Z1 Z2 Zn One popular feature of LCs is to have a feedback loop from the outputs. In this slide, this diagram shows one output goes back to the input. Then how can we control the feedback mechanism by which Zn becomes Xn? That is, with this feedback, timing is even more important. We will discuss this issue from now on. 4

5 implest circuits with feedback Two inverters form a static memory cell will hold value as long as it has power applied "1" "0" "stored value" How to get a new value into the memory cell? selectively break feedback path load new value into cell "remember" "data" "load" "stored value" Let s consider a simple memory element first. What if we place two inverters before a stored value and suppose the stored value is 1. Note that there is a feedback from the stored value to the first inverter. Another more sophisticated option is to have a selection function between a stored value and a new value. If load is enabled, the new data will be put into the stored value. 5

6 Memory with cross-coupled gates Cross-coupled NOR gates similar to inverter pair, with capability to force output to 0 (reset=1) or 1 (set=1) R ' R' Cross-coupled NAND gates similar to inverter pair, with capability to force output to 0 (R =0) or 1 ( =0) Let s consider this feedback in the cases of cross-connectivity between other gate types. With Nor or Nand gates, we can have more control inputs. R and denote reset and set inputs, respectively. is the output value of interest and its inverse is denoted by. For a NOR gate, think of a case when a single input can determine the output of the gate. VI - equential Logic Copyright 2004, Gaetano Borriello and Randy H. Katz 6 uppose R is 1, which makes 0. Basically, we assume R and are opposite for update. ' ' R ' R' ' '

7 Timing behavior R ' Reset Hold et Reset et 100 Race R \ If R=1 and =0, is 0 and is 1 (recall the meaning of reset R). If R=0 and =1, is 1. What if R==0, then and will remain with the previous values. The problem happens when R==1. Are and just 0s? The more significant problem arises when R==1 and then R==0, which will yield an oscillation as follows. and will be 1 together. But then and should be changed to 0 again. Then this cycle continues. 7

8 tate behavior or R- latch Truth table of R- latch behavior R ' ' 0 1 ' 1 0 R 0 0 hold unstable ' 0 0 This slide shows a state diagram. It describes how and will change as varying values of and R stimulate the system. That is, and R are inputs and and are outputs. A latch is a memory element that stores one bit. And this is called an R- latch. If is high, 1 will be stored into ; if R is high, 0 will be stored. Depending on the values of and, we can think of 4 states. 8 ' 1 1

9 R Theoretical R- latch behavior tate diagram ' states: possible values transitions: changes based on inputs R=00 R=01 ' 0 1 R=01 R=01 R=11 R=00 R=10 R=01 R=11 ' 0 0 R=10 R=00 R=11 R=11 ' 1 0 R=10 R=00 R=10 possible oscillation between states 00 and 11 ' 1 1 uppose the R- latch holds initially 01 ( ). As long as R is 01 or 00, the system will remain in the same state. If R=10, will be 1. When R is 11, the state will be 00 ( ). Then the problem happens when R becomes 00 from that state. 9

10 Observed R- latch behavior Very difficult to observe R- latch in the 1-1 state one of R or usually changes first Ambiguously returns to state 0-1 or 1-0 a so-called "race condition" or non-deterministic transition R=00 R=01 ' 0 1 R=01 R=10 R=01 R=10 ' 1 0 R R=00 R=10 ' R=00 R=11 R=11 ' 0 0 R=11 R=00 In real systems, when R changes from 11 to 00, normally both and R may not change at the exactly same time. Hence, R will be either 01 or 10 before changing from 11 into 00. o we cannot guess which will be changed first. In summary, we should not allow R to be

11 R- latch analysis Break feedback path R (t) ' R (t+) R (t) (t+) X X hold reset set not allowed X 1 X 1 characteristic equation (t+) = + R (t) To analyze the timing, let s assume the feedback loop is cut off. That is, consider (t) and (t+ ) separately. Here is the delay incurred by the latch. When you look at the truth table, you can notice something different. What is it? (t) R 11

12 Activity: R- latch using NAND gates * draw truth table and circuit, where R and should not be 1 together R ' (t) R R R (t) (t+) X X hold reset set not allowed (t) R X 1 X 1 characteristic equation (t+) = + R (t) 12

13 Gated R- latch Control when R and inputs matter otherwise, the slightest glitch on R or while enable is low could cause change in value stored R' enable' ' R ' et 100 Reset ' R' enable' ' The next version is a gated R- latch. In the gated (level-sensitive) R- latch, the R- values are handled cautiously. When enable is low, then R and are always zeroes (there is no glitch or fluctuation in R and ). o R and are meaningful only when enable is high. This waveform shows when enable is high and is set (or is low), will 13 become true.

14 Clocks Used to keep time wait long enough for inputs (R' and ') to settle then allow to have effect on value stored Clocks are regular periodic signals period (time between ticks) duty-cycle (time clock is high between ticks - expressed as % of period) duty cycle (in this case, 50%) period A clock is an important element in sequential circuits. The enable signal in the previous slide serves as kind of a clock. Once enable is asserted, it should remain high until the input stimulates the output fully. Normally, a clock is periodically alternating between high and low. The beginning of each period is called a clock tick. And the duty cycle is defined as the ratio of High voltage interval to the period. 14

15 Clocks (cont d) Controlling an R- latch with a clock can't let R and change while clock is 0 (allowing R and to pass) only have half of clock period for signal changes to propagate signals (R, ) must be stable for the other half of clock period R R clock R and stable changing stable changing stable clock Let s control the gated (or level-sensitive) R- latch with a clock. While clock is 0, R and should sustain their values which will update and during that interval. While clock is high, R and can be changed to a new value (for next operation); in the meantime, and will not change since R and are

16 Cascading latches Connect output of one latch to input of another How to stop changes from racing through chain? need to be able to control flow of data from one latch to the next move one latch per clock period have to worry about logic between latches (arrows) that is too fast R ' R R R clock What if we connect multiple latches in a series? In this case, the output of the first latch becomes the input for the second latch. For a single ON interval of the clock signal, we can assure that and if the first latch will be stabilized after update. But the concern is if signal propagation is too fast, even the second R- latch may be affected like a domino effect in the same ON interval. How can we make it sure that only the first latch is updated? 16

17 Master-slave structure Break flow by alternating clocks use positive clock to latch inputs into one R- latch use negative clock to change outputs with another R- latch View pair as one basic unit master-slave flip-flop twice as much logic output changes a few gate delays after the falling edge of clock but does not affect any cascaded flip-flops master stage slave stage R R P R P CLK The solution is to use different polarities of clock signals for a pair of R- latches. o it requires twice logic gates. Notice that there is an inverter between two clock signals. o when the clock is high, the master latch will be updated and when the clock is low, the VI - equential Logic Copyright 2004, Gaetano Borriello and Randy H. Katz 17 slave latch will be changed.

18 The 1s catching problem In first R- stage of master-slave FF R CLK P P glitch on R or while clock is high is "caught" by master stage leads to constraints on logic to be hazard-free et Reset 1s catch CLK Master Outputs lave Outputs R master stage R P slave stage P R What would be the problem of the inverted clock signals for the pair of R- latches? While the clock is high, suppose there is a glitch is in the very first (0-1-0), P and P will change, which in turn will affect the slave latch when the clock becomes low. This is called the 1s catching problem. 18

19 D flip-flop Make and R complements of each other eliminates 1s catching problem can't just hold previous value (must have new value ready every clock period) value of D just before clock goes low is what is stored in flip-flop negative edge-triggered master stage R slave stage P R D P CLK 10 gates To eliminate the 1s catching problem, we have to make and R have opposite values; so we use the complementary values from the same input, which is called D flip-flop. D is an abbreviation for data. o R and can be either 01 and 10 only. Now we cannot use 00 to maintain the same value in the latch. How many gates here? Each R- latch has two NOR gates. 19

20 (Negative) Edge-triggered D flip-flops (FFs) More efficient solution: only 6 gates D sensitive to inputs only near edge of clock signal (not while high) D 0 holds D when clock goes low negative edge-triggered D flip-flop (D-FF) Clk=1 R 4-5 gate delays must respect setup and hold time constraints to successfully capture input 0 D D holds D when clock goes low characteristic equation (t+1) = D The other realization to solve the 1s catching problem is to use a clock edge to trigger the change of the flip-flop s value. While the clock is high, the second top NOR and the second bottom NOR gates will be 0, which keeps the old values of and 20

21 Negative Edge-triggered D flip-flops (cont d) tep-by-step analysis D D 1 D D 1 D 0 -> 0 D 0 R R Clk=0 Clk=0 D 0 -> 1 D 1 D 1 D when clock goes high-to-low data is latched 0 new D new D old D when clock is low data is held If clock goes from 1 to 0, initially and R are 0. Then, depending on D s value, or R will be changed, which in turn will set or reset. The numbers in blue shows the case when D is 1. After that, D s change makes no effect. E.g. new D is 0 now, D (second 21 0 D 0

22 How edge-triggered? D D D D R D 0 R D 1 Clk= Clk=0 D 0 D 1 D D new D D One of two gates is 1 Right after the clock goes from 1 to 0, the second top and second bottom NOR gates are open to the D input. As soon as the input is latched to the, either of these NOR gates will be 1, which blocks the new input from entering. 22

23 Edge-triggered D flip-flops (cont d) Positive edge-triggered inputs sampled on rising edge; outputs change after rising edge Negative edge-triggered flip-flops inputs sampled on falling edge; outputs change after falling edge 100 D CLK pos pos neg neg positive edge-triggered FF negative edge-triggered FF There are two kinds of flip-flops which are triggered by the two edges of the signals: rising edge and falling edge. The previous slide shows a negative edge-triggered FF. If we add an inverter to the clock, that FF is turned into a positive edge-triggered FF. Typically, latches are level triggered and simpler. FFs are mostly edge triggered and more complicated. 23

24 Timing methodologies Rules for interconnecting components and clocks guarantee proper operation of system when strictly followed Approach depends on building blocks used for memory elements we'll focus on systems with edge-triggered flip-flops found in programmable logic devices many custom integrated circuits focus on level-sensitive latches Basic rules for correct timing: (1) correct inputs, with respect to time, are provided to the flipflops (2) no flip-flop changes state more than once per clocking event As the same input can produce different outputs over time in sequential logic, timing is extremely important. Especially, memory elements like flip-flops should be handled with precise timing. o a clock determines when the circuit can change the current state to a new state. For each memory element, only one state transition is allowed in a single clock period. 24

25 Timing methodologies (cont d) Definition of terms clock: periodic event, causes state of memory element to change can be rising edge or falling edge or high level or low level input setup time: minimum time before the clocking event by which the input must be stable (Tsu) hold time: minimum time after the clocking event until which the input must remain stable (Th) T su T h data D D clock clock there is a timing "window" around the clocking event during which the input must remain stable and unchanged in order to be recognized data clock stable changing Let s go over terminologies first. We already know what is a clock. For each edge of a clock signal, there are some timing constraints. uppose the positive edge of a clock signal triggers a circuit. Then the data input should be stable for an interval which is Tsu+Th, which are dependent on transistor circuit delay. 25

26 Comparison of latches and flip-flops (FFs) D CLK positive edge-triggered flip-flop D CLK D C CLK edge latch transparent (level-sensitive) latch behavior is the same unless input changes while the clock is high Again, in FFs, the data value only at the rising edge (or falling edge) is critical (see blue dots). Meanwhile, most latches are sensitive to D value changes as long as the clock is high. Typically, the clock input of a FF is depicted by a triangle. 26

27 Comparison of latches and flip-flops (cont d) Type When inputs are sampled When output is valid unclocked always propagation delay from input change latch level-sensitive clock high propagation delay from input change latch (Tsu/Th around falling or clock edge (whichever is later) edge of clock) master-slave clock high propagation delay from falling edge flip-flop (Tsu/Th around falling of clock (P.17) edge of clock) negative clock hi-to-lo transition propagation delay from falling edge edge-triggered (Tsu/Th around falling of clock flip-flop edge of clock) In unclocked latches, a stored value will always be affected by data at any time. In levelsensitive latches, the D value affects the latch as long as the clock stays high. And the D value at the falling edge will be maintained while the clock is low. o around the falling edge, we should keep data stable for Tsu+Th. In a positive edge-triggered FF, the Tsu/Th for the rising clock edge should be guaranteed. 27

28 Typical timing specifications Positive edge-triggered D flip-flop setup and hold times minimum clock width (Tw) propagation delays (low to high, high to low, max and typical) D T su 1.8 ns T h 0.5 ns T su 1.8 ns T h 0.5 ns Clk T w 3.3 ns T w 3.3 ns T pd T 3.6 ns pd 1.1 ns 3.6 ns 1.1 ns all measurements are made from the clocking event (the rising edge of the clock) This slide illustrates the timing where the rising edge of the clock signal is the reference. Tpd is the propagation delay between the rising edge of the clock (event trigger) and the change in the output. Tw should be long enough to ensure that D will change 28

29 Cascading edge-triggered flip-flops hift register IN new value goes into first stage while previous value of first stage goes into second stage consider setup/hold/propagation delays (prop must be > hold) 0 1 D D OUT CLK IN 0 1 CLK 100 This slide shows the waveform of a two bit shift register made up of two cascaded positive edge triggered D FFs. A shift register refers to a circuit that moves a stored bit among storage elements. At the first positive edge, IN is 0, which will store 0 at 0. at the next clock tick, 0 will be propagated to 1 and 0 will be updated to the IN s value VI - equential Logic Copyright 2004, Gaetano Borriello and Randy H. Katz 29 at that moment. But we have to be careful about timing relationships among signals.

30 Cascading edge-triggered flip-flops (cont d) Why this works propagation delays (Tp or Tpd) exceed hold times (Th) clock width constraint exceeds setup time this guarantees following stage will latch current value before it changes to new value In 0 1 T su 1.8ns T p ns T su 1.8ns T p ns timing constraints guarantee proper operation of cascaded components CLK T period assumes infinitely fast distribution of the clock T h 0.5ns T h 0.5ns The first condition for the proper operation is Tp > Th. Otherwise, the changed 0 may also affect the second stage FF (i.e. changing 1 as well). Also, the interval between the successive clock rising edges, Tperiod > Tp+Tsu. Otherwise 0 is not ready to change VI - equential Logic Copyright 2004, Gaetano Borriello and Randy H. Katz 30 1.

31 Clock skew The problem correct behavior assumes next state of all storage elements determined by all storage elements at the same time this is difficult in high-performance systems because time for clock to arrive at flip-flop is comparable to delays through logic effect of skew on cascaded flip-flops: 100 In 0 1 CLK0 CLK1 CLK1 is a delayed version of CLK0 T skew original state: IN = 0, 0 = 1, 1 = 1 due to skew, next state becomes: 0 = 0, 1 = 0, and not 0 = 0, 1 = 1 The last headache in timing is about the distribution of the clock signal. o far, we assumed that clocks are arriving at the FFs simultaneously. But those clock signals travel along the wires just like the other data signals. o Tp > Tskew +Th (in case that Tskew > 0) and Tperiod + Tskew > Tp + Tsu (in case that Tskew < 0) 31

32 ummary of latches and flip-flops Development of D-FF level-sensitive used in custom integrated circuits can be made with 4 switches edge-triggered used in programmable logic devices good choice for data storage register Preset and clear inputs are highly desirable on flip-flops used at start-up or to reset system to a known state D-FFs can be either level-sensitive or edge-triggered. For maintenance purposes, preset and clear inputs are desirable for FFs, which will be discussed later. Preset inputs initialize the values in FFs. Clear inputs will reset the values of FFs to 0s. 32

33 Metastability and asynchronous inputs Clocked synchronous circuits inputs, state, and outputs sampled or changed in relation to a common reference signal (called the clock) e.g., master/slave, edge-triggered Asynchronous circuits inputs, state, and outputs sampled or changed independently of a common reference signal (glitches/hazards a major concern) e.g., R- latch Asynchronous inputs to synchronous circuits inputs can change at any time, will not meet setup/hold times dangerous, synchronous inputs are greatly preferred cannot be avoided (e.g., reset signal, memory wait, user input) If we use only synchronous circuits in the system, then we just need to consider clocks for stable system operations. However, some components are asynchronous in the sense that the values of these components are changing individually without any common reference signal (e.g. clock signal). One typical case happens when an asynch circuit meets a synch circuit. 33

34 ynchronization failure Occurs when FF input changes close to clock edge the FF may enter a metastable state neither a logic 0 nor 1 it may stay in this state an indefinite amount of time this is not likely in practice but has some probability logic 1 logic 0 logic 1 logic 0 small, but non-zero probability that the FF output will get stuck in an in-between state oscilloscope traces demonstrating synchronizer failure and eventual decay to steady state ometimes, Tsu or Th is not long enough for stable transitions. The output of a FF may enter a meta-stable state. Three cases take place depending on the energy for the duration (Tsu + Th) to make transitions. uppose was 0 and now D is 1 to store bit 1 into. VI - equential Logic Copyright 2004, Gaetano Borriello and Randy H. Katz 34

35 Dealing with synchronization failure Probability of failure can never be reduced to 0, but it can be reduced (1) slow down the system clock this gives the synchronizer more time to decay into a steady state; synchronizer failure becomes a big problem for very high speed systems (2) use fastest possible logic technology in the synchronizer this makes for a very sharp "peak" upon which to balance (3) cascade two synchronizers this effectively synchronizes twice (both would have to fail) asynchronous input D D synchronized input Clk synchronous system There are three ways to reduce the probability of synch. failure. The first option gives the logic circuit more time to go to either 0 or 1. The second approach is similar; it gives less room to stay at meta-stable state. In the third choice, by cascading two FFs, the probability VI - equential of Logic the synch failure Copyright is even 2004, more Gaetano Borriello reduced and Randy at the H. Katz cost of slow-down. 35

36 Handling asynchronous inputs Never allow asynchronous inputs to fan-out to more than one flip-flop synchronize as soon as possible and then treat as synchronous signal Async Input Clocked ynchronous ystem D 0 Async Input D ynchronizer D 0 Clock Clock D 1 D 1 Clock Clock When an asynch input makes rendezvous with a synch part, only one FF will be placed at the junction. On the left, depending on the wire length, an asynch input can arrive at different times at two D FFs, which may cause unexpected results. To solve this issue, place a single D FF as shown on the right; so the input will change only. 36

37 Handling asynchronous inputs (cont d) What can go wrong? In 0 1 CLK input changes too close to clock edge (violating setup time constraint) In is asynchronous and fans out to D0 and D1 one FF catches the signal, one does not inconsistent state may be reached! This slide shows waveforms of the dangerous circuit in the previous slide. As the asynch input arrives late at the lower D FF, the energy may not be high enough to make a transition at 1. In designing a system, we intended to make changes at both FFs from the input from the asynch circuit, but we fail to do so. 37

38 Registers Collections of flip-flops with similar controls and logic stored values somehow related (for example, form binary value) share clock, reset, and set lines similar logic at each stage Examples shift registers counters OUT1 OUT2 OUT3 OUT4 "0" R R R R D D D D CLK IN1 IN2 IN3 IN4 From now on, we will look at a collection of FFs. The first memory element to look at is a register. A register is normally defined as a group of FFs with coordinated controls or shared controls. Examples of controls are clock, reset, set and so on. In this case, we can read/write 4 bits in parallel. 38

39 hift register Holds samples of input store last 4 input values in sequence 4-bit shift register: OUT1 OUT2 OUT3 OUT4 IN D D D D CLK One of the relatively simple registers is a shift register. Here one bit is shifted (or moved to right) to the next FF at each clock tick (its positive edge). At each positive edge, the stored value will come out and move to the next element. 39

40 Universal shift register Holds 4 values left_in left_out clear s0 s1 serial or parallel inputs serial or parallel outputs permits shift left or right shift in new values from left or right output input right_out right_in clock clear sets the register contents and output to 0 s1 and s0 determine the shift function s0 s1 function 0 0 hold state 0 1 shift right 1 0 shift left 1 1 load new input The shift register in the previous slide goes only from left to right. Here we want to design a generic or multi-purpose shift register with the above functionalities. In addition, we also want to hold the current value without I/O. Overall, we need some control variables. 40

41 Design of universal shift register Consider one of the four flip-flops new value at next clock cycle: clear s0 s1 new value output output value of FF to left (shift right) output value of FF to right (shift left) input Nth cell to N-1th cell D to N+1th cell CLK CLK clear, s0, s1 [N-1] (left) Input[N] CLEAR s0 and s1 control mux [N+1] (right) Each memory module (that stores 1 bit) should be able to perform 5 functions. Note that there are multiple incoming lines and one of them should be selected. This should ring the bell. It will be convenient to use a MUX. Blue wires are about control while black VI - equential Logic Copyright 2004, Gaetano Borriello and Randy H. Katz 41 wires are data paths. Here, clear, 1 and 0 are depicted by a single wire for simplicity.

42 hift register application Parallel-to-serial conversion for serial transmission parallel outputs parallel inputs serial transmission One of the popular application of the shift register is serial transmission, where information is transmitted over the medium bit-by-bit. 42

43 Pattern recognizer Combinational function of input samples in this case, recognizing the pattern 1001 on the single input signal OUT OUT1 OUT2 OUT3 OUT4 IN D D D D CLK Another useful application of shift registers is bit string identification. In this case, bits are shifted from left to right. At any moment, if 4 bits are 1001, then OUT will be true. 43

44 Counters equences through a fixed set of patterns in this case, 1000, 0100, 0010, 0001 if one of the patterns is its initial state (by loading or set/reset) OUT1 OUT2 OUT3 OUT4 IN D D D D CLK If there are multiple patterns that are used for state representation, this register is typically referred to as a counter. Look at the shift register in the slide. uppose there is a initialization (or preset) logic that stores 1000 in the register, which is not shown here. Then, as the clock ticks, the bits are rotating this ring. That s why it is called a ring counter. 44

45 Activity How does this counter work? (initial value: 1000) OUT1 OUT2 OUT3 OUT4 IN D D D D CLK Counts through the sequence: 1000, 1100, 1110, 1111, 0111, 0011, 0001, 0000 Known as Mobius (or Johnson) counter 45

46 Binary counter Logic between registers (not just multiplexer) XOR decides when bit should be toggled always for low-order bit, only when first bit is true for second bit, and so on CLK OUT1 OUT2 OUT3 OUT4 D D D D "1" Here is a binary counter; the rule of thumb is that if all lower bits are true, than the upper bit should be toggled. OUT4 is the MB while OUT1 is the LB. 46

47 Four-bit binary synchronous up-counter tandard component with many applications positive edge-triggered FFs w/ synchronous load and clear inputs parallel load data from D, C, B, A enable inputs: must be asserted to enable counting ripple-carry out (RCO) is used for cascading counters high when counter is in its highest state 1111 Preset implemented using an AND gate logic (2) RCO goes high (3) High order 4-bits are incremented EN D C B A LOAD CLK CLR RCO D C B A (1) Low order 4-bits = 1111 If we use the binary counter in the previous slide as a basic component, we can build many complicated circuits, e.g. a wider binary counter. Here D is the MB. 47

48 Offset counters tarting offset counters use of synchronous load e.g., 0110, 0111, 1000, 1001, 1010, 1011, 1100, 1101, 1111, 0110,... Ending offset counter comparator for ending value e.g., 0000, 0001, 0010,..., 1100, 1101, 0000 Combinations of the above (start and stop value) "1" "0" "0" "0" "0" "1" "0" "1" "1" "0" "0" EN RCO D D C C B B A A LOAD CLK CLR EN RCO D D C C B B A A LOAD CLK CLR Other examples are here; using the load input, we can control the initial value. Or by using some product term from the stored values, we can configure the ending value of the counter. 48

49 HDLs and equential Logic Flip-flops representation of clocks - timing of state changes asynchronous vs. synchronous hift registers imple counters As a tidbit, we will see some Verilog programs (HDLs) for sequential logic circuits. Because of the characteristics of sequential logic systems, there are peculiar features. 49

50 Flip-flop in Verilog Use always block's sensitivity list to wait for clock edge module dff (clk, d, q); input clk, d; output q; reg q; clk) q = d; endmodule This is an HDL program for a positive-edge triggered D FF. Again, reg is the keyword to declare a variable whose value needs to be tracked or stored. On the other hand, wire indicates a value that is passing between gates. Here posedge means the positive edge or the rising edge of the clock signal. 50

51 More Flip-flops ynchronous/asynchronous reset/set single thread that waits for the clock three parallel threads only one of which waits for the clock ynchronous Asynchronous module dff (clk, s, r, d, q); input clk, s, r, d; output q; reg q; clk) if (r) q = 1'b0; else if (s) q = 1'b1; else q = d; endmodule module dff (clk, s, r, d, q); input clk, s, r, d; output q; reg q; r) q = 1'b0; s) q = 1'b1; clk) q = d; endmodule Here synchronous and asynchronous flip-flops are described. 1 b0 means that this signal is 1 bit wide and 0 will be stored. In synch case, the FF is triggered only by the positive edge of the clock. Meanwhile, the asynch FF has three triggering variables. 51

52 Verilog, constant syntax Number in bits, apostrophe, radix (base number), and number Radix: b, o, d, h Let me talk about how Verilog expresses the constant number here. By default, we use decimal numbers. If we want to use binary or hexadecimal number, we have to specify the radix. The number before the apostrophe is the number of bits for the constant. 52

53 Incorrect Flip-flop in Verilog Use always block's sensitivity list to wait for clock to change module dff (clk, d, q); input clk, d; output q; reg q; q = d; Not correct! will change whenever the clock changes, not just on an edge. endmodule If we don t specify the posedge at the clock signal, then the D s value will be transferred to not only at the positive edge but also at the negative edge of the clock, which is not intended by the Verilog programmer. 53

54 Blocking and Non-Blocking Assignments Blocking assignments (X=A) completes the assignment before continuing on to next statement Non-blocking assignments (X<=A) completes in zero time and doesn t change the value of the target until a blocking point (delay/wait) is encountered Example: swap CLK) begin temp = B; B = A; A = temp; end CLK) begin A <= B; B <= A; end There are two kinds of assignments. In Verilog, the assignment statements within an always block are executed sequentially, which is on the left. If we use <= assignment, the value change is taking place at the end of the always block. 54

55 Register-transfer-level (RTL) Assignment Non-blocking assignment is also known as an RTL assignment if used in an always block triggered by a clock edge all flip-flops change together // B,C,D all get the value of A clk) begin B = A; C = B; D = C; end // implements a shift register too clk) begin B <= A; C <= B; D <= C; end An useful usage of the non-blocking assignment is shift registers, where all the bits (or values) are transferred in parallel. On the left, the behavior for the shift register has some problem. 55

56 Mobius Counter in Verilog initial begin A = 1 b0; B = 1 b0; C = 1 b0; D = 1 b0; end clk) begin A <= ~D; B <= A; C <= B; D <= C; end Here is an HDL specification of a Mobius counter 56

57 Binary Counter in Verilog module binary_counter (clk, c8, c4, c2, c1); input clk; output c8, c4, c2, c1; reg [3:0] count; initial begin count = 0; end clk) begin count = count + 4 b0001; end assign c8 = count[3]; assign c4 = count[2]; assign c2 = count[1]; assign c1 = count[0]; endmodule module binary_counter (clk, c8, c4, c2, c1, rco); input clk; output c8, c4, c2, c1, rco; reg [3:0] count; reg rco; initial begin... end clk) begin... end assign c8 = count[3]; assign c4 = count[2]; assign c2 = count[1]; assign c1 = count[0]; assign rco = (count == 4 b1111); endmodule On the left, there is a Verilog description for a binary counter without rco; on the right, rco is also described. 57

58 equential logic summary Fundamental building block of circuits with state latch and flip-flop R- latch, R- master/slave, D master/slave, edge-triggered D flip-flop Timing methodologies use of clocks cascaded FFs work because propagation delays exceed hold times beware of clock skew Asynchronous inputs and their dangers synchronizer failure: what it is and how to minimize its impact Basic registers shift registers counters Hardware description languages and sequential logic 58

Sequential logic. Circuits with feedback. How to control feedback? Sequential circuits. Timing methodologies. Basic registers

Sequential logic. Circuits with feedback. How to control feedback? Sequential circuits. Timing methodologies. Basic registers equential logic equential circuits simple circuits with feedback latches edge-triggered flip-flops Timing methodologies cascading flip-flops for proper operation clock skew Basic registers shift registers

More information

Chapter 6. sequential logic design. This is the beginning of the second part of this course, sequential logic.

Chapter 6. sequential logic design. This is the beginning of the second part of this course, sequential logic. Chapter 6. sequential logic design This is the beginning of the second part of this course, sequential logic. equential logic equential circuits simple circuits with feedback latches edge-triggered flip-flops

More information

Sequential Circuits. Sequential Logic. Circuits with Feedback. Simplest Circuits with Feedback. Memory with Cross-coupled Gates.

Sequential Circuits. Sequential Logic. Circuits with Feedback. Simplest Circuits with Feedback. Memory with Cross-coupled Gates. equential Logic equential Circuits equential Circuits imple circuits with feedback Latches Edge-triggered flip-flops Timing Methodologies Cascading flip-flops for proper operation Clock skew Basic egisters

More information

Sequential Logic. Sequential Circuits. ! Timing Methodologies " Cascading flip-flops for proper operation " Clock skew

Sequential Logic. Sequential Circuits. ! Timing Methodologies  Cascading flip-flops for proper operation  Clock skew equential Logic! equential Circuits " imple circuits with feedback " Latches " Edge-triggered flip-flops! Timing Methodologies " Cascading flip-flops for proper operation " Clock skew! Basic egisters "

More information

! Two inverters form a static memory cell " Will hold value as long as it has power applied

! Two inverters form a static memory cell  Will hold value as long as it has power applied equential Logic! equential Circuits " imple circuits with feedback " Latches " Edge-triggered flip-flops! Timing Methodologies " Cascading flip-flops for proper operation " Clock skew! Basic egisters "

More information

ALGORITHMS IN HW EECS150 ALGORITHMS IN HW. COMBINATIONAL vs. SEQUENTIAL. Sequential Circuits ALGORITHMS IN HW

ALGORITHMS IN HW EECS150 ALGORITHMS IN HW. COMBINATIONAL vs. SEQUENTIAL. Sequential Circuits ALGORITHMS IN HW LGOITHM HW EEC150 ection 2 Introduction to equential Logic Fall 2001 pproach #2: Combinational divide & conquer a[0] a[1] a[1022] a[1023] MX MX MX 512 + 256 + K+ 1 = 1023 blocks Each MX block has: 64 s;

More information

cascading flip-flops for proper operation clock skew Hardware description languages and sequential logic

cascading flip-flops for proper operation clock skew Hardware description languages and sequential logic equential logic equential circuits simple circuits with feedback latches edge-triggered flip-flops Timing methodologies cascading flip-flops for proper operation clock skew Basic registers shift registers

More information

Basis of sequential circuits: the R-S latch

Basis of sequential circuits: the R-S latch equential logic Asynchronous sequential logic state changes occur whenever state inputs change (elements may be simple wires or delay elements) ynchronous sequential logic state changes occur in lock step

More information

Lec 24 Sequential Logic Revisited Sequential Circuit Design and Timing

Lec 24 Sequential Logic Revisited Sequential Circuit Design and Timing Traversing igital esign EECS - Components and esign Techniques for igital Systems EECS wks 6 - Lec 24 Sequential Logic Revisited Sequential Circuit esign and Timing avid Culler Electrical Engineering and

More information

Traversing Digital Design. EECS Components and Design Techniques for Digital Systems. Lec 22 Sequential Logic - Advanced

Traversing Digital Design. EECS Components and Design Techniques for Digital Systems. Lec 22 Sequential Logic - Advanced Traversing igital esign EEC 5 - Components and esign Techniques for igital ystems EEC5 wks 6-5 Lec 22 equential Logic - Advanced avid Culler Electrical Engineering and Computer ciences University of California,

More information

NH 67, Karur Trichy Highways, Puliyur C.F, Karur District UNIT-III SEQUENTIAL CIRCUITS

NH 67, Karur Trichy Highways, Puliyur C.F, Karur District UNIT-III SEQUENTIAL CIRCUITS NH 67, Karur Trichy Highways, Puliyur C.F, 639 114 Karur District DEPARTMENT OF ELETRONICS AND COMMUNICATION ENGINEERING COURSE NOTES SUBJECT: DIGITAL ELECTRONICS CLASS: II YEAR ECE SUBJECT CODE: EC2203

More information

IT T35 Digital system desigm y - ii /s - iii

IT T35 Digital system desigm y - ii /s - iii UNIT - III Sequential Logic I Sequential circuits: latches flip flops analysis of clocked sequential circuits state reduction and assignments Registers and Counters: Registers shift registers ripple counters

More information

CSE140: Components and Design Techniques for Digital Systems. More D-Flip-Flops. Tajana Simunic Rosing. Sources: TSR, Katz, Boriello & Vahid

CSE140: Components and Design Techniques for Digital Systems. More D-Flip-Flops. Tajana Simunic Rosing. Sources: TSR, Katz, Boriello & Vahid CSE140: Components and esign Techniques for igital Systems More -Flip-Flops Tajana Simunic Rosing Where we are now. What we covered last time: SRAM cell, SR latch, latch, -FF What we ll do next: -FF review,

More information

Chapter 4. Logic Design

Chapter 4. Logic Design Chapter 4 Logic Design 4.1 Introduction. In previous Chapter we studied gates and combinational circuits, which made by gates (AND, OR, NOT etc.). That can be represented by circuit diagram, truth table

More information

Synchronous Sequential Logic

Synchronous Sequential Logic Synchronous Sequential Logic Ranga Rodrigo August 2, 2009 1 Behavioral Modeling Behavioral modeling represents digital circuits at a functional and algorithmic level. It is used mostly to describe sequential

More information

Experiment 8 Introduction to Latches and Flip-Flops and registers

Experiment 8 Introduction to Latches and Flip-Flops and registers Experiment 8 Introduction to Latches and Flip-Flops and registers Introduction: The logic circuits that have been used until now were combinational logic circuits since the output of the device depends

More information

Combinational vs Sequential

Combinational vs Sequential Combinational vs Sequential inputs X Combinational Circuits outputs Z A combinational circuit: At any time, outputs depends only on inputs Changing inputs changes outputs No regard for previous inputs

More information

More on Flip-Flops Digital Design and Computer Architecture: ARM Edition 2015 Chapter 3 <98> 98

More on Flip-Flops Digital Design and Computer Architecture: ARM Edition 2015 Chapter 3 <98> 98 More on Flip-Flops Digital Design and Computer Architecture: ARM Edition 2015 Chapter 3 98 Review: Bit Storage SR latch S (set) Q R (reset) Level-sensitive SR latch S S1 C R R1 Q D C S R D latch Q

More information

Logic Design. Flip Flops, Registers and Counters

Logic Design. Flip Flops, Registers and Counters Logic Design Flip Flops, Registers and Counters Introduction Combinational circuits: value of each output depends only on the values of inputs Sequential Circuits: values of outputs depend on inputs and

More information

ELCT201: DIGITAL LOGIC DESIGN

ELCT201: DIGITAL LOGIC DESIGN ELCT201: DIGITAL LOGIC DESIGN Dr. Eng. Haitham Omran, haitham.omran@guc.edu.eg Dr. Eng. Wassim Alexan, wassim.joseph@guc.edu.eg Lecture 6 Following the slides of Dr. Ahmed H. Madian ذو الحجة 1438 ه Winter

More information

Collections of flip-flops with similar controls and logic

Collections of flip-flops with similar controls and logic Ensembles of flip-flops Registers Shift registers Counters Autumn 2010 CSE370 - XV - Registers and Counters 1 Registers Collections of flip-flops with similar controls and logic stored values somehow related

More information

The outputs are formed by a combinational logic function of the inputs to the circuit or the values stored in the flip-flops (or both).

The outputs are formed by a combinational logic function of the inputs to the circuit or the values stored in the flip-flops (or both). 1 The outputs are formed by a combinational logic function of the inputs to the circuit or the values stored in the flip-flops (or both). The value that is stored in a flip-flop when the clock pulse occurs

More information

Glitches/hazards and how to avoid them. What to do when the state machine doesn t fit!

Glitches/hazards and how to avoid them. What to do when the state machine doesn t fit! State Machine Signaling Timing Behavior Glitches/hazards and how to avoid them SM Partitioning What to do when the state machine doesn t fit! State Machine Signaling Introducing Idle States (synchronous

More information

SEQUENTIAL LOGIC. Satish Chandra Assistant Professor Department of Physics P P N College, Kanpur

SEQUENTIAL LOGIC. Satish Chandra Assistant Professor Department of Physics P P N College, Kanpur SEQUENTIAL LOGIC Satish Chandra Assistant Professor Department of Physics P P N College, Kanpur www.satish0402.weebly.com OSCILLATORS Oscillators is an amplifier which derives its input from output. Oscillators

More information

Logic and Computer Design Fundamentals. Chapter 7. Registers and Counters

Logic and Computer Design Fundamentals. Chapter 7. Registers and Counters Logic and Computer Design Fundamentals Chapter 7 Registers and Counters Registers Register a collection of binary storage elements In theory, a register is sequential logic which can be defined by a state

More information

MC9211 Computer Organization

MC9211 Computer Organization MC9211 Computer Organization Unit 2 : Combinational and Sequential Circuits Lesson2 : Sequential Circuits (KSB) (MCA) (2009-12/ODD) (2009-10/1 A&B) Coverage Lesson2 Outlines the formal procedures for the

More information

Lecture 8: Sequential Logic

Lecture 8: Sequential Logic Lecture 8: Sequential Logic Last lecture discussed how we can use digital electronics to do combinatorial logic we designed circuits that gave an immediate output when presented with a given set of inputs

More information

Chapter 6. Flip-Flops and Simple Flip-Flop Applications

Chapter 6. Flip-Flops and Simple Flip-Flop Applications Chapter 6 Flip-Flops and Simple Flip-Flop Applications Basic bistable element It is a circuit having two stable conditions (states). It can be used to store binary symbols. J. C. Huang, 2004 Digital Logic

More information

Introduction. NAND Gate Latch. Digital Logic Design 1 FLIP-FLOP. Digital Logic Design 1

Introduction. NAND Gate Latch.  Digital Logic Design 1 FLIP-FLOP. Digital Logic Design 1 2007 Introduction BK TP.HCM FLIP-FLOP So far we have seen Combinational Logic The output(s) depends only on the current values of the input variables Here we will look at Sequential Logic circuits The

More information

6. Sequential Logic Flip-Flops

6. Sequential Logic Flip-Flops ection 6. equential Logic Flip-Flops Page of 5 6. equential Logic Flip-Flops ombinatorial components: their output values are computed entirely from their present input values. equential components: their

More information

Software Engineering 2DA4. Slides 9: Asynchronous Sequential Circuits

Software Engineering 2DA4. Slides 9: Asynchronous Sequential Circuits Software Engineering 2DA4 Slides 9: Asynchronous Sequential Circuits Dr. Ryan Leduc Department of Computing and Software McMaster University Material based on S. Brown and Z. Vranesic, Fundamentals of

More information

Digital Logic Design Sequential Circuits. Dr. Basem ElHalawany

Digital Logic Design Sequential Circuits. Dr. Basem ElHalawany Digital Logic Design Sequential Circuits Dr. Basem ElHalawany Combinational vs Sequential inputs X Combinational Circuits outputs Z A combinational circuit: At any time, outputs depends only on inputs

More information

CHAPTER 4: Logic Circuits

CHAPTER 4: Logic Circuits CHAPTER 4: Logic Circuits II. Sequential Circuits Combinational circuits o The outputs depend only on the current input values o It uses only logic gates, decoders, multiplexers, ALUs Sequential circuits

More information

D Latch (Transparent Latch)

D Latch (Transparent Latch) D Latch (Transparent Latch) -One way to eliminate the undesirable condition of the indeterminate state in the SR latch is to ensure that inputs S and R are never equal to 1 at the same time. This is done

More information

Unit 11. Latches and Flip-Flops

Unit 11. Latches and Flip-Flops Unit 11 Latches and Flip-Flops 1 Combinational Circuits A combinational circuit consists of logic gates whose outputs, at any time, are determined by combining the values of the inputs. For n input variables,

More information

Chapter 5 Flip-Flops and Related Devices

Chapter 5 Flip-Flops and Related Devices Chapter 5 Flip-Flops and Related Devices Chapter 5 Objectives Selected areas covered in this chapter: Constructing/analyzing operation of latch flip-flops made from NAND or NOR gates. Differences of synchronous/asynchronous

More information

NH 67, Karur Trichy Highways, Puliyur C.F, Karur District DEPARTMENT OF INFORMATION TECHNOLOGY CS 2202 DIGITAL PRINCIPLES AND SYSTEM DESIGN

NH 67, Karur Trichy Highways, Puliyur C.F, Karur District DEPARTMENT OF INFORMATION TECHNOLOGY CS 2202 DIGITAL PRINCIPLES AND SYSTEM DESIGN NH 67, Karur Trichy Highways, Puliyur C.F, 639 114 Karur District DEPARTMENT OF INFORMATION TECHNOLOGY CS 2202 DIGITAL PRINCIPLES AND SYSTEM DESIGN UNIT 4 SYNCHRONOUS SEQUENTIAL LOGIC Sequential circuits

More information

CHAPTER 4: Logic Circuits

CHAPTER 4: Logic Circuits CHAPTER 4: Logic Circuits II. Sequential Circuits Combinational circuits o The outputs depend only on the current input values o It uses only logic gates, decoders, multiplexers, ALUs Sequential circuits

More information

Part 4: Introduction to Sequential Logic. Basic Sequential structure. Positive-edge-triggered D flip-flop. Flip-flops classified by inputs

Part 4: Introduction to Sequential Logic. Basic Sequential structure. Positive-edge-triggered D flip-flop. Flip-flops classified by inputs Part 4: Introduction to Sequential Logic Basic Sequential structure There are two kinds of components in a sequential circuit: () combinational blocks (2) storage elements Combinational blocks provide

More information

RS flip-flop using NOR gate

RS flip-flop using NOR gate RS flip-flop using NOR gate Triggering and triggering methods Triggering : Applying train of pulses, to set or reset the memory cell is known as Triggering. Triggering methods:- There are basically two

More information

Momentary Changes in Outputs. State Machine Signaling. Oscillatory Behavior. Hazards/Glitches. Types of Hazards. Static Hazards

Momentary Changes in Outputs. State Machine Signaling. Oscillatory Behavior. Hazards/Glitches. Types of Hazards. Static Hazards State Machine Signaling Momentary hanges in Outputs Timing ehavior Glitches/hazards and how to avoid them SM Partitioning What to do when the state machine doesn t fit! State Machine Signaling State Machine

More information

Name Of The Experiment: Sequential circuit design Latch, Flip-flop and Registers

Name Of The Experiment: Sequential circuit design Latch, Flip-flop and Registers EEE 304 Experiment No. 07 Name Of The Experiment: Sequential circuit design Latch, Flip-flop and Registers Important: Submit your Prelab at the beginning of the lab. Prelab 1: Construct a S-R Latch and

More information

L4: Sequential Building Blocks (Flip-flops, Latches and Registers)

L4: Sequential Building Blocks (Flip-flops, Latches and Registers) L4: Sequential Building Blocks (Flip-flops, Latches and Registers) Acknowledgements: Lecture material adapted from R. Katz, G. Borriello, Contemporary Logic esign (second edition), Prentice-Hall/Pearson

More information

Sequential Circuits. Output depends only and immediately on the inputs Have no memory (dependence on past values of the inputs)

Sequential Circuits. Output depends only and immediately on the inputs Have no memory (dependence on past values of the inputs) Sequential Circuits Combinational circuits Output depends only and immediately on the inputs Have no memory (dependence on past values of the inputs) Sequential circuits Combination circuits with memory

More information

3 Flip-Flops. The latch is a logic block that has 2 stable states (0) or (1). The RS latch can be forced to hold a 1 when the Set line is asserted.

3 Flip-Flops. The latch is a logic block that has 2 stable states (0) or (1). The RS latch can be forced to hold a 1 when the Set line is asserted. 3 Flip-Flops Flip-flops and latches are digital memory circuits that can remain in the state in which they were set even after the input signals have been removed. This means that the circuits have a memory

More information

https://daffy1108.wordpress.com/2014/06/08/synchronizers-for-asynchronous-signals/

https://daffy1108.wordpress.com/2014/06/08/synchronizers-for-asynchronous-signals/ https://daffy1108.wordpress.com/2014/06/08/synchronizers-for-asynchronous-signals/ Synchronizers for Asynchronous Signals Asynchronous signals causes the big issue with clock domains, namely metastability.

More information

UNIT 11 LATCHES AND FLIP-FLOPS

UNIT 11 LATCHES AND FLIP-FLOPS UNIT 11 LATCHE AN FLIP-FLOP pring 2011 Latches and Flip-Flops 2 Contents et-eset latch Gated latch Edge-triggered flip-flop - flip-flop J-K flip-flop T flip-flop Flip-flops with additional inputs eading

More information

CPS311 Lecture: Sequential Circuits

CPS311 Lecture: Sequential Circuits CPS311 Lecture: Sequential Circuits Last revised August 4, 2015 Objectives: 1. To introduce asynchronous and synchronous flip-flops (latches and pulsetriggered, plus asynchronous preset/clear) 2. To introduce

More information

Vignana Bharathi Institute of Technology UNIT 4 DLD

Vignana Bharathi Institute of Technology UNIT 4 DLD DLD UNIT IV Synchronous Sequential Circuits, Latches, Flip-flops, analysis of clocked sequential circuits, Registers, Shift registers, Ripple counters, Synchronous counters, other counters. Asynchronous

More information

CSE115: Digital Design Lecture 23: Latches & Flip-Flops

CSE115: Digital Design Lecture 23: Latches & Flip-Flops Faculty of Engineering CSE115: Digital Design Lecture 23: Latches & Flip-Flops Sections 7.1-7.2 Suggested Reading A Generic Digital Processor Building Blocks for Digital Architectures INPUT - OUTPUT Interconnect:

More information

UNIT IV. Sequential circuit

UNIT IV. Sequential circuit UNIT IV Sequential circuit Introduction In the previous session, we said that the output of a combinational circuit depends solely upon the input. The implication is that combinational circuits have no

More information

Sequential Circuits: Latches & Flip-Flops

Sequential Circuits: Latches & Flip-Flops Sequential Circuits: Latches & Flip-Flops Overview Storage Elements Latches SR, JK, D, and T Characteristic Tables, Characteristic Equations, Eecution Tables, and State Diagrams Standard Symbols Flip-Flops

More information

RS flip-flop using NOR gate

RS flip-flop using NOR gate RS flip-flop using NOR gate Triggering and triggering methods Triggering : Applying train of pulses, to set or reset the memory cell is known as Triggering. Triggering methods:- There are basically two

More information

EEE2135 Digital Logic Design Chapter 6. Latches/Flip-Flops and Registers/Counters 서강대학교 전자공학과

EEE2135 Digital Logic Design Chapter 6. Latches/Flip-Flops and Registers/Counters 서강대학교 전자공학과 EEE235 Digital Logic Design Chapter 6. Latches/Flip-Flops and Registers/Counters 서강대학교 전자공학과 . Delay and Latches ) Signal Storage a. as voltage level static memory b. as charges dynamic memory 2) Delays

More information

A clock is a free-running signal with a cycle time. A clock may be either high or low, and alternates between the two states.

A clock is a free-running signal with a cycle time. A clock may be either high or low, and alternates between the two states. Clocks A clock is a free-running signal with a cycle time. A clock may be either high or low, and alternates between the two states. 1 The length of time the clock is high before changing states is its

More information

Advanced Digital Logic Design EECS 303

Advanced Digital Logic Design EECS 303 Advanced Digital Logic Design EECS 303 http://ziyang.eecs.northwestern.edu/eecs303/ Teacher: Robert Dick Office: L477 Tech Email: dickrp@northwestern.edu Phone: 847 467 2298 Outline Introduction Reset/set

More information

Digital Fundamentals: A Systems Approach

Digital Fundamentals: A Systems Approach Digital Fundamentals: A Systems Approach Latches, Flip-Flops, and Timers Chapter 6 Traffic Signal Control Traffic Signal Control: State Diagram Traffic Signal Control: Block Diagram Traffic Signal Control:

More information

Clocks. Sequential Logic. A clock is a free-running signal with a cycle time.

Clocks. Sequential Logic. A clock is a free-running signal with a cycle time. Clocks A clock is a free-running signal with a cycle time. A clock may be either high or low, and alternates between the two states. The length of time the clock is high before changing states is its high

More information

Sequential Logic Basics

Sequential Logic Basics Sequential Logic Basics Unlike Combinational Logic circuits that change state depending upon the actual signals being applied to their inputs at that time, Sequential Logic circuits have some form of inherent

More information

Registers and Counters

Registers and Counters Registers and Counters A register is a group of flip-flops which share a common clock An n-bit register consists of a group of n flip-flops capable of storing n bits of binary information May have combinational

More information

Sri Vidya College of Engineering And Technology. Virudhunagar Department of Electrical and Electronics Engineering

Sri Vidya College of Engineering And Technology. Virudhunagar Department of Electrical and Electronics Engineering Sri Vidya College of Engineering And Technology Virudhunagar 626 005 Department of Electrical and Electronics Engineering Year/ Semester/ Class : II/ III/ EEE Academic Year: 2017-2018 Subject Code/ Name:

More information

EMT 125 Digital Electronic Principles I CHAPTER 6 : FLIP-FLOP

EMT 125 Digital Electronic Principles I CHAPTER 6 : FLIP-FLOP EMT 125 Digital Electronic Principles I CHAPTER 6 : FLIP-FLOP 1 Chapter Overview Latches Gated Latches Edge-triggered flip-flops Master-slave flip-flops Flip-flop operating characteristics Flip-flop applications

More information

(CSC-3501) Lecture 7 (07 Feb 2008) Seung-Jong Park (Jay) CSC S.J. Park. Announcement

(CSC-3501) Lecture 7 (07 Feb 2008) Seung-Jong Park (Jay)  CSC S.J. Park. Announcement Seung-Jong Park (Jay) http://www.csc.lsu.edu/~sjpark Computer Architecture (CSC-3501) Lecture 7 (07 Feb 2008) 1 Announcement 2 1 Combinational vs. Sequential Logic Combinational Logic Memoryless Outputs

More information

Flip-Flops and Related Devices. Wen-Hung Liao, Ph.D. 4/11/2001

Flip-Flops and Related Devices. Wen-Hung Liao, Ph.D. 4/11/2001 Flip-Flops and Related Devices Wen-Hung Liao, Ph.D. 4/11/2001 Objectives Recognize the various IEEE/ANSI flip-flop symbols. Use state transition diagrams to describe counter operation. Use flip-flops in

More information

ECE 263 Digital Systems, Fall 2015

ECE 263 Digital Systems, Fall 2015 ECE 263 Digital Systems, Fall 2015 REVIEW: FINALS MEMORY ROM, PROM, EPROM, EEPROM, FLASH RAM, DRAM, SRAM Design of a memory cell 1. Draw circuits and write 2 differences and 2 similarities between DRAM

More information

FLIP-FLOPS AND RELATED DEVICES

FLIP-FLOPS AND RELATED DEVICES C H A P T E R 5 FLIP-FLOPS AND RELATED DEVICES OUTLINE 5- NAND Gate Latch 5-2 NOR Gate Latch 5-3 Troubleshooting Case Study 5-4 Digital Pulses 5-5 Clock Signals and Clocked Flip-Flops 5-6 Clocked S-R Flip-Flop

More information

Flip-Flops and Sequential Circuit Design

Flip-Flops and Sequential Circuit Design Flip-Flops and Sequential Circuit Design ECE 52 Summer 29 Reading ssignment Brown and Vranesic 7 Flip-Flops, Registers, Counters and a Simple Processor 7.5 T Flip-Flop 7.5. Configurable Flip-Flops 7.6

More information

Introduction to Sequential Circuits

Introduction to Sequential Circuits Introduction to Sequential Circuits COE 202 Digital Logic Design Dr. Muhamed Mudawar King Fahd University of Petroleum and Minerals Presentation Outline Introduction to Sequential Circuits Synchronous

More information

Figure 1 shows a simple implementation of a clock switch, using an AND-OR type multiplexer logic.

Figure 1 shows a simple implementation of a clock switch, using an AND-OR type multiplexer logic. 1. CLOCK MUXING: With more and more multi-frequency clocks being used in today's chips, especially in the communications field, it is often necessary to switch the source of a clock line while the chip

More information

Registers and Counters

Registers and Counters Registers and Counters Clocked sequential circuit = F/Fs and combinational gates Register Group of flip-flops (share a common clock and capable of storing one bit of information) Consist of a group of

More information

Registers and Counters

Registers and Counters Registers and Counters Clocked sequential circuit = F/Fs and combinational gates Register Group of flip-flops (share a common clock and capable of storing one bit of information) Consist of a group of

More information

Sequential Logic. E&CE 223 Digital Circuits and Systems (A. Kennings) Page 1

Sequential Logic. E&CE 223 Digital Circuits and Systems (A. Kennings) Page 1 Sequential Logic E&CE 223 igital Circuits and Systems (A. Kennings) Page 1 Sequential Circuits Have considered only combinational circuits in which circuit outputs are determined entirely by current circuit

More information

INTRODUCTION TO SEQUENTIAL CIRCUITS

INTRODUCTION TO SEQUENTIAL CIRCUITS NOTE: Explanation Refer Class Notes Digital Circuits(15EECC203) INTRODUCTION TO SEQUENTIAL CIRCUITS by Nagaraj Vannal, Asst.Professor, School of Electronics Engineering, K.L.E. Technological University,

More information

Chapter 3 Unit Combinational

Chapter 3 Unit Combinational EE 200: Digital Logic Circuit Design Dr Radwan E Abdel-Aal, COE Logic and Computer Design Fundamentals Chapter 3 Unit Combinational 5 Registers Logic and Design Counters Part Implementation Technology

More information

Principles of Computer Architecture. Appendix A: Digital Logic

Principles of Computer Architecture. Appendix A: Digital Logic A-1 Appendix A - Digital Logic Principles of Computer Architecture Miles Murdocca and Vincent Heuring Appendix A: Digital Logic A-2 Appendix A - Digital Logic Chapter Contents A.1 Introduction A.2 Combinational

More information

DIGITAL CIRCUIT LOGIC UNIT 11: SEQUENTIAL CIRCUITS (LATCHES AND FLIP-FLOPS)

DIGITAL CIRCUIT LOGIC UNIT 11: SEQUENTIAL CIRCUITS (LATCHES AND FLIP-FLOPS) DIGITAL CIRCUIT LOGIC UNIT 11: SEQUENTIAL CIRCUITS (LATCHES AND FLIP-FLOPS) 1 iclicker Question 16 What should be the MUX inputs to implement the following function? (4 minutes) f A, B, C = m(0,2,5,6,7)

More information

Chapter 4: One-Shots, Counters, and Clocks

Chapter 4: One-Shots, Counters, and Clocks Chapter 4: One-Shots, Counters, and Clocks I. The Monostable Multivibrator (One-Shot) The timing pulse is one of the most common elements of laboratory electronics. Pulses can control logical sequences

More information

Sequencing. Lan-Da Van ( 范倫達 ), Ph. D. Department of Computer Science National Chiao Tung University Taiwan, R.O.C. Fall,

Sequencing. Lan-Da Van ( 范倫達 ), Ph. D. Department of Computer Science National Chiao Tung University Taiwan, R.O.C. Fall, Sequencing ( 范倫達 ), Ph. D. Department of Computer Science National Chiao Tung University Taiwan, R.O.C. Fall, 2013 ldvan@cs.nctu.edu.tw http://www.cs.nctu.edu.tw/~ldvan/ Outlines Introduction Sequencing

More information

DIGITAL ELECTRONICS MCQs

DIGITAL ELECTRONICS MCQs DIGITAL ELECTRONICS MCQs 1. A 8-bit serial in / parallel out shift register contains the value 8, clock signal(s) will be required to shift the value completely out of the register. A. 1 B. 2 C. 4 D. 8

More information

Computer Architecture and Organization

Computer Architecture and Organization A-1 Appendix A - Digital Logic Computer Architecture and Organization Miles Murdocca and Vincent Heuring Appendix A Digital Logic A-2 Appendix A - Digital Logic Chapter Contents A.1 Introduction A.2 Combinational

More information

CS8803: Advanced Digital Design for Embedded Hardware

CS8803: Advanced Digital Design for Embedded Hardware CS883: Advanced Digital Design for Embedded Hardware Lecture 4: Latches, Flip-Flops, and Sequential Circuits Instructor: Sung Kyu Lim (limsk@ece.gatech.edu) Website: http://users.ece.gatech.edu/limsk/course/cs883

More information

Switching Theory And Logic Design UNIT-IV SEQUENTIAL LOGIC CIRCUITS

Switching Theory And Logic Design UNIT-IV SEQUENTIAL LOGIC CIRCUITS Switching Theory And Logic Design UNIT-IV SEQUENTIAL LOGIC CIRCUITS Sequential circuits Classification of sequential circuits: Sequential circuits may be classified as two types. 1. Synchronous sequential

More information

Sequential Circuit Design: Principle

Sequential Circuit Design: Principle Sequential Circuit Design: Principle modified by L.Aamodt 1 Outline 1. 2. 3. 4. 5. 6. 7. 8. Overview on sequential circuits Synchronous circuits Danger of synthesizing asynchronous circuit Inference of

More information

WINTER 15 EXAMINATION Model Answer

WINTER 15 EXAMINATION Model Answer Important Instructions to examiners: 1) The answers should be examined by key words and not as word-to-word as given in the model answer scheme. 2) The model answer and the answer written by candidate

More information

Digital Design, Kyung Hee Univ. Chapter 5. Synchronous Sequential Logic

Digital Design, Kyung Hee Univ. Chapter 5. Synchronous Sequential Logic Chapter 5. Synchronous Sequential Logic 1 5.1 Introduction Electronic products: ability to send, receive, store, retrieve, and process information in binary format Dependence on past values of inputs Sequential

More information

Unit-5 Sequential Circuits - 1

Unit-5 Sequential Circuits - 1 Unit-5 Sequential Circuits - 1 1. With the help of block diagram, explain the working of a JK Master-Slave flip flop. 2. Differentiate between combinational circuit and sequential circuit. 3. Explain Schmitt

More information

University of California at Berkeley College of Engineering Department of Electrical Engineering and Computer Science SOLUTIONS

University of California at Berkeley College of Engineering Department of Electrical Engineering and Computer Science SOLUTIONS University of California at Berkeley College of Engineering Department of Electrical Engineering and Computer Science EECS 5 Fall 25 R. H. Katz SOLUTIONS Problem Set #3: Combinational and Sequential Logic

More information

MODULE 3. Combinational & Sequential logic

MODULE 3. Combinational & Sequential logic MODULE 3 Combinational & Sequential logic Combinational Logic Introduction Logic circuit may be classified into two categories. Combinational logic circuits 2. Sequential logic circuits A combinational

More information

Chapter 7 Counters and Registers

Chapter 7 Counters and Registers Chapter 7 Counters and Registers Chapter 7 Objectives Selected areas covered in this chapter: Operation & characteristics of synchronous and asynchronous counters. Analyzing and evaluating various types

More information

Digital Logic Design ENEE x. Lecture 19

Digital Logic Design ENEE x. Lecture 19 Digital Logic Design ENEE 244-010x Lecture 19 Announcements Homework 8 due on Monday, 11/23. Agenda Last time: Timing Considerations (6.3) Master-Slave Flip-Flops (6.4) This time: Edge-Triggered Flip-Flops

More information

Digital Circuit And Logic Design I. Lecture 8

Digital Circuit And Logic Design I. Lecture 8 Digital Circuit And Logic Design I Lecture 8 Outline Sequential Logic Design Principles (1) 1. Introduction 2. Latch and Flip-flops 3. Clocked Synchronous State-Machine Analysis Panupong Sornkhom, 2005/2

More information

Digital Circuit And Logic Design I

Digital Circuit And Logic Design I Digital Circuit And Logic Design I Lecture 8 Outline Sequential Logic Design Principles (1) 1. Introduction 2. Latch and Flip-flops 3. Clocked Synchronous State-Machine Panupong Sornkhom, 2005/2 2 1 Sequential

More information

Chapter 8 Sequential Circuits

Chapter 8 Sequential Circuits Philadelphia University Faculty of Information Technology Department of Computer Science Computer Logic Design By 1 Chapter 8 Sequential Circuits 1 Classification of Combinational Logic 3 Sequential circuits

More information

UNIT-3: SEQUENTIAL LOGIC CIRCUITS

UNIT-3: SEQUENTIAL LOGIC CIRCUITS UNIT-3: SEQUENTIAL LOGIC CIRCUITS STRUCTURE 3. Objectives 3. Introduction 3.2 Sequential Logic Circuits 3.2. NAND Latch 3.2.2 RS Flip-Flop 3.2.3 D Flip-Flop 3.2.4 JK Flip-Flop 3.2.5 Edge Triggered RS Flip-Flop

More information

Engr354: Digital Logic Circuits

Engr354: Digital Logic Circuits Engr354: igital Circuits Chapter 7 Sequential Elements r. Curtis Nelson Sequential Elements In this chapter you will learn about: circuits that can store information; Basic cells, latches, and flip-flops;

More information

Rangkaian Sekuensial. Flip-flop

Rangkaian Sekuensial. Flip-flop Rangkaian Sekuensial Rangkaian Sekuensial Flip-flop Combinational versus Sequential Functions Logic functions are categorized as being either combinational (sometimes referred to as combinatorial) or sequential.

More information

ECEN454 Digital Integrated Circuit Design. Sequential Circuits. Sequencing. Output depends on current inputs

ECEN454 Digital Integrated Circuit Design. Sequential Circuits. Sequencing. Output depends on current inputs ECEN454 igital Integrated Circuit esign Sequential Circuits ECEN 454 Combinational logic Sequencing Output depends on current inputs Sequential logic Output depends on current and previous inputs Requires

More information

Chapter 5: Synchronous Sequential Logic

Chapter 5: Synchronous Sequential Logic Chapter 5: Synchronous Sequential Logic NCNU_2016_DD_5_1 Digital systems may contain memory for storing information. Combinational circuits contains no memory elements the outputs depends only on the inputs

More information

Clock Domain Crossing. Presented by Abramov B. 1

Clock Domain Crossing. Presented by Abramov B. 1 Clock Domain Crossing Presented by Abramov B. 1 Register Transfer Logic Logic R E G I S T E R Transfer Logic R E G I S T E R Presented by Abramov B. 2 RTL (cont) An RTL circuit is a digital circuit composed

More information

Solution to Digital Logic )What is the magnitude comparator? Design a logic circuit for 4 bit magnitude comparator and explain it,

Solution to Digital Logic )What is the magnitude comparator? Design a logic circuit for 4 bit magnitude comparator and explain it, Solution to Digital Logic -2067 Solution to digital logic 2067 1.)What is the magnitude comparator? Design a logic circuit for 4 bit magnitude comparator and explain it, A Magnitude comparator is a combinational

More information