Digital Circuit Engineering

Size: px
Start display at page:

Download "Digital Circuit Engineering"

Transcription

1 Digital Circuit Engineering 2nd Distributive ( A)( B) = AB Circuits that work in a sequence of steps Absorption A = A A= THESE CICUITS NEED STOAGE TO EMEMBE WHEE THEY AE STOAGE D MU G M MU G S CLK D Flip Flop Carleton University 26 Seq2FSM_E.fmI p. evised; March, 28 Slide i Finite State Machines Definition of a State Sequencing of States State Graphs State Tables State Table to Karnaugh Map to Circuit Mealy and Moore Outputs Constructing The Output Circuits From The State Table Properties of Mealy and Moore Outputs Overview of Designing Finite State Machines Construction of State Graphs Examples Toggle Flip Flop Detecting an Input Sequence Carleton University Seq2FSM_E.fm p., evised; March, 28 Comment on Slide i

2 Sequential Circuits Sequential Circuits Perform a sequence of steps They calculate the next output from: ) The last output (step). 2) Present inputs, if any. Must remember the last step Hence they use storage They also do logical calculation Hence they need gates Example : A light flashing sequencer 267-LB 267-LB Example 2: A counter 267-LB Sequential Circuit Storage and Feedback a D C D C D C P Combinational Circuit No Storage, No Feedback a b c Y Seq2FSM_E.fm p. 2 evised; March, 28 Slide 2 Sequential Circuits Sequential Circuits Sequential Circuits These circuits contain storage They remember the result of previous calculation. The total information that they remember is called the state of the circuit. The state and any inputs are used to calculate what the next state will be. After a delay, here the time to the next active clock edge, this next state becomes the state. Since they go through a sequence of states, they are called sequential circuits. Since the amount of storage limits them to a finite number of states, they are called Finite-State Machines. What is storage In theory, any storage counts. This could be flip flops, latches and AM. ead-only storage, or storage that cannot be changed by the machine, cannot be part of an FSM. Software Finite-State Machines, usually consider AM the storage. Hardware Finite-State Machines use flip flops for storage, and change state just after an active clock edge. This is a matter of convenience. It is much much easier to design machines with clocked flip flops. However at the end of the course, we will consider a type of circuit called asynchronous finite-state machines (asynchronous circuits for short), which uses latches, and do not use a clock Carleton University Seq2FSM_E.fm p. 3, evised; March, 28 Comment on Slide 2

3 States; Finite-State Machines The State The state is the output of all storage elements. Collected in some prearranged order. Machines based on states are called State Machines. In digital they are Finite-State Machines (FSMs). We can t have an infinite number of digital states. In this course, and most designs, the storage is flip flops. CLK ST CLK ST D D D C Four D Possible States C two flip flops D 2 D D D C C Eight 2 D Possible States D 2 C three flip flops We often show the states inside circles Seq2FSM_E.fm p. 4 evised; March, 28 Slide 3 States; Finite-State Machines Finite-State Machines Finite-State Machines The state is the output of all storage elements collectives in some prearranged order. 2. Take a finite-state machine with 4 flip flops, and let the order in the state be alphabetical, that is A, B, C, D. If A, B, C, D contain,,, at this moment, then the state is,,,. The order is arbitrary; you could use say A, D, C, B, only once you define it for one state, you must use the same order for all states. POBLEM How many states are possible with 8 flip flops? POBLEM How many flip flops would be needed to make a digital counter that would count to 2 in binary? Carleton University Seq2FSM_E.fm p. 5, evised; March, 28 Comment on Slide 3

4 Finite-State Machines Basis Finite-State Machine States What is stored in all memory in the machine Inputs External signals entering the machine. Clock and reset are special and usually don t count as inputs Outputs Output signals like Y and Z Feedback Signals Here and 2 Order for going between states We have to specify an order based on: ) the present state. 2) inputs. Which define the next state. uestions INPUT(S) a. What are the inputs? b. What are the outputs? c. If all the memory is in the 3 flip-flops, what is in the colourful blobs? d. If the machine above has 2 =, what state is it in? e. How many different states is it possible for this machine to have? f. All the machine knows about its previous history is contained in? One order for going between states MEMOY D 2 D 2 C D D C D D C FEEDBACK SIGNALS CLK and ESET inputs assumed. See next slide. OUTPUTS Y Z Seq2FSM_E.fm p. 6 evised; March, 28 Slide 4 Finite-State Machines Sequencing of States Sequencing of States State All memory in the machine, means all in the part under consideration. A large machine will almost certainly be partitioned into smaller FSMs, in which case one considers only the memory in the partition. Inputs Most, but not all, machines have an external input. If you partition a big FSM into two smaller ones, the outputs of one FSM will normally provide inputs to the other. Feedback signals State and Next State The machine has its flip flops in some state, say. What is important is the next state. The way the machine sequences state --> next state is the main difference between two machines. All the machine knows about its previous history is contained in the state. The feedback signals send the state back into logic which calculates the next state. Feedback are output signals which are fed back as (internal) inputs POBLEM Design the state graph for a counter that counts down ->7->6->5->4->3->2->->->7... in binary. POBLEM Design the state graph for a counter that counts down ->7->6->5->4->3->2->->7... in binary Note that the zero states comes up on reset, but cannot be entered again. Carleton University Seq2FSM_E.fm p. 7, evised; March, 28 Comment on Slide 4

5 FSM: Sequencing; Counters, State Graph Counter This circuit counts in binary. It increments by one every rising clock edge. It will count from to 7 ( to ) and repeat. D 2 D C 2 D D Sequencing C Logic D D C CLK ST 2 Counter Finite-State Machine No inputs Clk is an input we don t count We often don t show the wires ST is an input we don t count We often don t show the wires Here wire is behind the flip flops Outputs are the state In this example Eight states Arranged to count eset 2 State State Graph The sequencing between time states is all important. The state graph shows sequencing between states. The state changes after each rising clock edge. CLK Use ST to make the count start at zero. Seq2FSM_E.fm p. 8 evised; March, 28 Slide 5 FSM: Sequencing; Counters, State Graph Counters Counters This counter is an FSM which has no inputs except the clock and a reset. With no other inputs, such a circuit cannot do anything except count in some sequence. The sequence here is binary, but another counter might count in binary-coded decimal, two s complement, or whatever one wants. The sequence is cyclic, so once the counter reaches 7 () it automatically goes back to () and starts counting again. We say such a counter counts modulo 8, or it is a mod 8 counter. S The reset (ST) signal is essential to a well behaved counter since, it can be used to start the count at zero. Without it, the flip flops would come in a random state when the power was applied to them, and one would not know where the counter would start. State Change The state changes immediately after the active clock edge. This is the only time the state can change. Connections to CLK and ST Just like one does not show the power and ground connections on theoretical diagrams, one often does not show the clock and reset signals. In the Slide above they are shown, although one has to infer that the ST wire goes underneath the flip flops. On Slide 4 only the terminals on the flip flop are shown, and the reader must know how they are connected. When counting inputs, we say the counter above has no external inputs, and don t count CLK and ST. Carleton University Seq2FSM_E.fm p. 9, evised; March, 28 Comment on Slide 5

6 FSM: Sequencing of States Sequencing of States The next state depends on: a. The present state b. The inputs State Graph Shows sequencing State is inside circle Input is beside arrow Example I (CLK and ST assumed) Counter, as on last slide. Input ignored One can say, or put nothing beside the arrow. Change state each clock cycle Example II Controlled Counter Count (go to next state) when x= Hold old count (stay in old state) when x= uestion When, in the clock cycle, is checked CLK to see if the state changes or not? Comb Logic To be found D D D 2 D C D C D C 2 2 x= x= Example I order 2 x= x= x= x= x= x= x= x= x= Example II x= x= x= x= x= Seq2FSM_E.fm p. evised; March, 28 Slide 6 FSM: Sequencing of States Counters Sequence of State Three Counters (two above, one on Slide 8). One has an input, but at might as well not have, because it doesn t use it 2. This has an input which stops the count when =. 3. The third (Slide 8) makes the count become 4 () whenever =. The difference between these three counters is easily seen on the state graph Carleton University Seq2FSM_E.fm p., evised; March, 28 Comment on Slide 6

7 FSM: Sequencing of States; State Tables State Tables With and Without Input The state graph and the state table. Both show sequencing between states. The graph is easier for initial design. The table is used for final design. No Input Present State 2 State Table State Graph Example I K-map order Example I Next State 2 Next State written as Next State comes after next clock edge Input 2 x= x= x= x= x= State Table x= x= x= Present State 2 x= x= State Graph Example II x= Example II x= K-map order x= x= x= x= Next State 2 x= Two next state columns x= Next State 2 Table is arranged like a K-map because later we transfer it to K-maps Seq2FSM_E.fm p. 2 evised; March, 28 Slide 7 FSM: Sequencing of States; State Tables State Tables State Tables These contain the same information as the state graph. Once you have the graph, you can easily construct the table. The states can be arranged in any order; just make sure the state and next state entries match. For counters, it is common to arrange them in the same sequence as going around the state graph. However it will turn out that the present state is best arranged in Karnaugh Map order. This makes it easy to convert the table into maps. If the present state is written as..., we commonly write the next state as... How Many Next State Columns When there is no input, or the input does nothing like in example I. then there is only one next state column. When there is an input, there are two next states. This means the state table needs two next state columns. If there were two inputs, there would be 4 next states, and there will be 4 next-state columns in the state tables. Carleton University Seq2FSM_E.fm p. 3, evised; March, 28 Comment on Slide 7

8 FSM: State Table & State Graph; Inputs Binary Counter With Go To 4 Input If x= counts in binary: If x=, go to count of 4 () and stays until x= K-map order (CLK and ST assumed) State Table Present State 2 Comb Logic To be found D D D 2 D C D C D C 2 2 Next State Next State x= x= 2 2 x= x= x= x= x= x= x= x= x= x= x= Any time x=, the next state is 4 (). The state graph and the state table both show sequencing between states. The sequencing is different between when x= and x= State Graph x= x= Seq2FSM_E.fm p. 4 evised; March, 28 Slide 8 FSM: State Table & State Graph; Inputs Another State Table Another State Table The state table for the counter that goes to state 4 () when input = Carleton University Seq2FSM_E.fm p. 5, evised; March, 28 Comment on Slide 8

9 FSM: Counter Design; Completing Details Completing the to 7 Counter Design Design so far: D 2 D 2 C Comb D D Logic C To be D D found C ST It counts It increments by one on every rising clock edge eset takes the count (state) to Circuit Design 3 flip-flops will give the 2 3 = 8 states, as needed The Count output is taken from the flip flops ST makes the count start at. 2 Count (CLK assumed) State Graph Only the next-state (combinational) logic is unknown. It has inputs 2,, and It has outputs D, D 2, and D These Ds must give the right next state after the clock edge. This logic must be designed Present State State Table Present State Next State 2 2 K-map 2 order Comb Logic To be found D 2 To give correct Next State D D Seq2FSM_E.fm p. 6 evised; March, 28 Slide 9 FSM: Counter Design; Completing Details From State Graph to Circuit From State Graph to Circuit Start with the State graph This was done before Construct the State Table This was done before Consider What to do Next We know the circuit has 3 flip flops. We know we have to have the correct D inputs to the flip flops to give the correct next state. We know this will be a combinational (gates only) circuit which has the state 2,, as its input and gives out D 2, D, D as the output. This circuit will be designed from Karnaugh maps on the next slide. Carleton University Seq2FSM_E.fm p. 7, evised; March, 28 Comment on Slide 9

10 FSMs: Design of a Binary Counter Counter Design 2 Comb Logic To be found Feedback. next state D 2 = 2 D C D = D C D = D C present state 2 The present state is the value of 2 the present outputs The next state is the value of 2 the present D inputs. Design the combinational (next state) logic so that inputs 2 gives outputs D 2 D D = 2 NOT K-map order Counter state table Count State Next State D inputs 2 2 D 2 D D Method: From the state table Make K-maps for the logic Make a map for D 2 with inputs 2 Make a map for D with inputs 2 Make a map for D with inputs 2 The order of the rows in the state table does not matter in theory. However We will change the rows to K-map order. It makes drawing maps easier. Seq2FSM_E.fm p. 8 evised; March, 28 Slide FSMs: Design of a Binary Counter Counter Design Counter Design Clock and eset The clock and reset lines to the flip flops are not shown in theoretical diagrams, but you cannot eliminate them in a real circuit! POBLEM Make the state table for a counter that counts down ->7->6->5->4->3->2->->7... in binary. Include columns for the state, the next state, and the D input that will give that next state. Arrange the rows so the states are in Karnaugh map order, i.e.,,3,2; 4,5,7,6. POBLEM Use the out of order state table in the slide above, to fill in the K-map on the right, for D as a function of the inputs 2, and. Then compare this with the labour to construct the map for D given on the next page. Then write a paragraph explaining why the relative ordering of the variables in the state table and the map, is important. 2 2 map of D Carleton University Seq2FSM_E.fm p. 9, evised; March, 28 Comment on Slide

11 FSMs: Design of a Binary Counter Counter Design Maps 2 Comb Logic To be found D 2 = D = D = 2 Design this logic Construct the D 2, D D maps from the state table The state table and the K-map have the same order for Using this order one can move data to the K-map in 4 bit columns. K-map order Counter state table Count State Next State D values 2 2 D 2 D D Arrange table in K-map order. Use , instead of map for D 2 Map coordinates On the state table: 2 changes slowly. put along top. change quickly. put along the side. 2 map for D 2 map for D Seq2FSM_E.fm p. 2 evised; March, 28 Slide FSMs: Design of a Binary Counter Counter Design Maps Counter Design Maps Order the table rows to match the map One wants to make the data easy to transfer from the state table to the map. To do this: Order the table rows so that and change in the table the same way they would along the y-axis of the map. Choose the map axis to match the table Put rapidly changing state variables, on the vertical map axis. Put slowly changing map variable(s) 2 on the horizontal map axis. Circling the maps We now have a three-output gate (combinational) logic problem. We want to circle the three maps to minimize the logic. Carleton University Seq2FSM_E.fm p. 2, evised; March, 28 Comment on Slide

12 FSMs: Counter Circuit; Obtaining Circuit Get Equations and Circuit K-Maps from last slide Circle them Write the equations from the circles Draw the circuit Original High-level View of Circuit D 2 D 2 C Comb D D Logic C To be D D found C 2 2 map for D 2 2 map for D 2 map for D D 2 = D = D = D 2 = 2 D = D = D C D C D C 2 Seq2FSM_E.fm p. 22 evised; March, 28 Slide 2 FSMs: Counter Circuit; Obtaining Circuit Counter Design Circuit Counter Design Circuit 7. Steps in Designing a Finite-State Machine. Understand the problem. This is the hardest part. 2. Draw a state graph 3. Construct a state table showing the next state. Here the states were named,, 2, 3, Fill in bits for the states. Here we translated 2->, 3-> Put the state table in K-map order 6. Draw the K-maps from the state table. 7. Circle the K-maps to get the best equations. 8. Draw the logic from the equations. POBLEM Do problems 4., 5.,. Then: a) write out the Karnaugh maps for the three flip-flop inputs b) circle the Karnaugh maps, c) obtain the next state logic equations, d) and draw the circuit including the flip flops, for a counter that counts down: A students know that this is a multiple-output circuit and circle accordingly. Carleton University Seq2FSM_E.fm p. 23, evised; March, 28 Comment on Slide 2

13 FSMs: State Graphs With Less Than 2 N States All possible states may not be used Example Counter Counts -to-5 States and not included in sequence Those states still exist. What happens too them? What to do with unused states Lock Up Counter Normally counter counts properly, but if one gets into state or, one cannot get out. Fail Safe Counter If one gets into state or Lock up, Counter one goes to state on next clock edge. uestion Which is the better design? -5 Counter What to do with unused states Fail Safe Counter Seq2FSM_E.fm p. 24 evised; March, 28 Slide 3 FSMs: State Graphs With Less Than 2 N States Counter Design Circuit Machines With Less Than 2 N states Why causes going into a bad state? Not resetting flip-flops properly on start-up. Fast power supply surges which flips a flip-flop that should not have been flipped. Large pulses on nearby wires which capacitively couple to a flip-flop input (Cross-talk). The chances of getting into a bad state are very small, but it does happen. Answer The lock-up circuit requires one to reset the circuit to get out of the lock-up states The fail-safe circuit lets the counter extract itself. Which is better depends on the application. Most people think the fail-safe circuit is better. However the lock-up circuit will let you know if the count went bad. The fail-safe circuit will continue with the wrong count. Comments on using the extra states If the sequencing for the extra states is not given at all, then these states can have don t care next states. These can be used to reduce the amount of logic in the blob. Carleton University Seq2FSM_E.fm p. 25, evised; March, 28 Comment on Slide 3

14 Symbolic State Names Often Convenient to Give the States Names Example: -6 Counter, Which Counts if = Suggestive names Starting state is often ST (reset) Counting states are S(st bottle), S2,... S5(5th bottle) State where the 6-pack is full is FP Make bad state BAD. State Table with Symbolic States State Next State 2 3 x= x= ST ST S S S S2 S3 S3 S4 S2 S2 S3 S4 S4 S5 S5 S5 FP BAD d d d d d d FP FP S Moosehead le Counter BAD x= Moosehead x= x= New x= ST S carton st bottle x= FP x= Full Pack S5 5th bottle x= x= x= x= x= S2 x= x= S4 4th bottle x= S3 Seq2FSM_E.fm p. 26 evised; March, 28 Slide 4 Symbolic State Names Symbolic State Names Symbolic State Names POBLEM Design a the state graph for a counter which counts to 6 bottles using four bits. The most significant bit is a even- parity bit. Thus the count is. If the counter enters a bad state, have it recover by going to the highest count which differs by bit from the bad count. This assumes the chances of more than a one-bit error are small, and that it is better to underfill a 6-pack than smash bottles. POBLEM Design the state graph of a counter which counts If some circuit noise places it in states,3,5 or 7, it will go to state 7 on the next clock cycle and stay there. This indicates that something is wrong. Carleton University Seq2FSM_E.fm p. 27, evised; March, 28 Comment on Slide 4

15 Give Bit Patterns to Symbolic Names Assigning Bit Patterns Called State Assignment Example: -6 Counter, Which Counts if = Assign ST=; S=; S2=; S3= S4=; S5=; FP= then must make BAD= Make a State Table from state graph infprmation The State Table Contains One present State column Two Next State columns, one for x=, one for x=. Will use both symbolic names; ST, S... and bit patterns Arrange table in Karnaugh map order Make unused state BAD have don t care next states This gives minimum logic. State Table, State Next State x= x= ST= ST= S= S= S= S2= S3= S3= S4= S2= S2= S3= S4= S4= S5= S5= S5= FP= BAD= d d d d d d FP= FP= ST= BAD x= x= ST S x= FP x= x= x= S5 x= x= uestions x= x= S4 x= S2 x= Does it matter what order we use for the present states in the table? What do we mean by Karnaugh map order? x= x= S3 Could one put a symbolic state table (last slide) in Karnaugh map order? Is taking the next states for BAD as ddd a good strategy?? Seq2FSM_E.fm p. 28 evised; March, 28 Slide 5 Give Bit Patterns to Symbolic Names Assigning Bit Patterns Assigning Bit Patterns Answers. Since one places the present state on the same line as the next state, a state table is still valid if these lines are placed in any order. If the circuit is a counter, one naturally wants to place these lines in order i.e.,, 2, Karnaugh map order is for the right-most two bits in the present state. Then if we use those two bits as the y- axis when we make a K-map from the state table, the K-map axis will be in correct order. The first bit will be used for the x-axis. If one is going to make Karnaugh maps from the table, it is very convenient to have the states arranged in the table in the order in which they will be placed on the map. 3. A symbolic state table has no bit patterns to place in K-map order. On this and the next page, the state tables are in K-map order so it is very easy to transfer data from the state table to the K-maps a column at a time. 4. Making unused states don t cares will minimize the logic. An alternatives is to make it fail safe. In a previous slide, this x= x= was taken as sending the count to zero and continuing. Another strategy would be to make an error state. Whenever one got into one would stay there. Error State x= x= x= x= x= x= x= x= x= x= x= x= Carleton University Seq2FSM_E.fm p. 29, evised; March, 28 Comment on Slide 5

16 Logic for Counter With Unused State Obtain Logic From State Table Example: -6 Counter Which Counts if = Gate Logic has inputs 2,,, Gate Logic has outputs D 2,D,D The next state 2,, = D 2,D,D Get K-Maps for Gate Logic from state table (next slide) Get Gate Logic from K-Maps (next slide) State Table with D inputs added, State Next State 2 D inputs D 2 D D 2 x= x= x= x= ST= ST= S= S= S= S2= S3= S3= S4= S2= S2= S3= S4= S4= S5= S5= S5= FP= BAD= d d d d d d d d d d d d FP= FP= ST= 2 (GATE) COMB LOGIC Design the Gate Logic x= x= x= x= x= Since 2,, = D 2,D,D we won t show them as seperate columns for very long. D 2 = 2 D C D = D C D = D C x= x= x= x= x= 2 x= x= x= x= Seq2FSM_E.fm p. 3 evised; March, 28 Slide 6 Logic for Counter With Unused State Obtaining Logic From The State Table Obtaining Logic From The State Table Carleton University Seq2FSM_E.fm p. 3, evised; March, 28 Comment on Slide 6

17 K-Maps for Counter with Unused State Obtain Logic From State Table; Making K-Maps Example: -6 Counter Which Counts if = Design the Gate Logic Take state table in K-map order Make 2 and x the horizontal axis coordinates must arrange 2 and x in K-map order. Transfer Next State patterns to K-map in blocks Note order. COMB 2 (GATE) LOGIC D 2 D D D C D C D C 2 State Table, State D inputs D 2 D D 2 x= x= ST= S= S3= S2= S4= S5= BAD= d d d d d d FP= Note left column transfers Map of D 2,D,D = 2 d d d d d d 2 = over to right column Summary Split State Table Put Two Haves Side-By-Side Flip right Hand Pair Y-AIS NOW IN K-MAP ODE Seq2FSM_E.fm p. 32 evised; March, 28 Slide 7 K-Maps for Counter with Unused State Obtain K-Maps From State Table Obtain K-Maps From State Table Write the state table so the two most rapidly changing bits are in Karnaugh map order ( ). One needs a map relating the four inputs 2 to the three outputs D 2 D D. Making the map with as vertical coordinates and 2 as horizontal coordinates allows one to easily build such a map. The order is very close to the order in the state table so one can split the state the table in half, and put the bottom beside the top. However K-map order is not quite the same as the state table. To fix it so the = columns are together one has to flip the left and right column. This map has three outputs in each square instead of one which is not good for circling. This will be split into three maps on the next page. Carleton University Seq2FSM_E.fm p. 33, evised; March, 28 Comment on Slide 7

18 Changes Maps to Have -Bit-Per Square Change 3-Output/Square Map into Three -Output/Square Maps -6 Counter, Counts if = Can t circle 3-output map below Break into three maps by transfer Transfering columns one column at a time Map of D 2,D,D = 2 d d d d d d 2 = Circle the maps to get logic equations uestions Should we have made the unused states don t cares? What are the alternatives? another example of column transfer Map of D 2 d d Map of D Map of D d d 2 2 d 2 d d 2 d D 2 = 2 2 D = 2 d 2 D = 2 d d d 2 share Seq2FSM_E.fm p. 34 evised; March, 28 Slide 8 Changes Maps to Have -Bit-Per Square Change 3-Output/Square Map into Three Change 3-Output/Square Map into Three -Output/Square Maps Above, the first bit in each square is D 2, so to get the K-maps for D 2, blank out the 2nd and 3rd bit in each square. Above, the first bit in each square is D, so to get the K-maps for D, blank out the st and 3rd bit in each square. Above, the first bit in each square is D, so to get the K-maps for D, blank out the st and 2nd bit in each square. Map of D 2,D,D = 2 d d d d d d 2 = Map of D 2,D,D = 2 d d d d d 2 = Map of D 2,D,D = 2 d d d d d d 2 = Carleton University Seq2FSM_E.fm p. 35, evised; March, 28 Comment on Slide 8

19 Transfering Equations Into Next-State Logic -6 Counter, Counts if = Equations from last slide D 2 = 2 2 D = 2 D = 2 Where the logic equations fit in the state machine D 2 2 D D 2 = 2 2 C 2 D = U D D C D = U D D U = 2 C 2 Complete circuit 2 2 U 2 2 D 2 D C 2 U D D D C D C Seq2FSM_E.fm p. 36 evised; March, 28 Slide 9 Transfering Equations Into Next-State Logic Maps The Final Design Maps The Final Design Where the logic fits The logic transforms the state and the inputs into the D inputs that will give us the correct next state.. POBLEM Design a counter which counts when x= and when x=. Obtain the logic equations, but you do not need to draw the circuit. Carleton University Seq2FSM_E.fm p. 37, evised; March, 28 Comment on Slide 9

20 FSMs: Outputs; Moore and Mealy Outputs Direct Outputs Like previous circuits Outputs were directly from flip-flops Calculated Outputs There is logic between states and outputs. Moore Outputs Outputs calculated from state alone Input can affect outputs only after passing through flip-flops. Y, Z and V are Moore outputs Mealy Outputs Outputs can be directly influenced by inputs. W is a Mealy output. uestion What is in the colourful blobs? What is not in them? INPUTS MEMOY D D C D D C D 2 D 2 C Influence from D D C D D C D 2 D 2 C OUTPUTS Y Z Mealy W V Moore Moore Seq2FSM_E.fm p. 38 evised; March, 28 Slide 2 FSMs: Outputs; Moore and Mealy Outputs Outputs Answers There are logic gates in each one. They may be as simple as a single wire, or as complex as you want. There is no storage in the blobs. There are no latches or flip-flops. Mealy and Moore ou Carleton University Seq2FSM_E.fm p. 39, evised; March, 28 Comment on Slide 2

21 FSMs: Moor Outputs in State Graphs and Tables Outputs in State Graphs and Tables Example: -7 Up and Down Counter Moore Outputs y output counts up z output counts down State Graph Outputs written underneath state State y Output z Output The State Table Add columns for outputs State Table, State Next State Up Output Dn Output 2 2 y 2 y y z 2 z z S= S= S3= S2= S4= S5= S7= S6= S 6 = y= z= S 5 = y= z= Next State Logic Comb Logic To be found S 7 = y= z= S 4 = y= z= S = y= z= What are the inputs? Is y output Mealy or Moore? Is z output Mealy or Moore? S 3 = y= z= S = y= z= S 2 = y= z= MEM OUTPUTS State y 2 2 =D2 D 2 z2 C y =D D z C y =D D z C Seq2FSM_E.fm p. 4 evised; March, 28 Slide 2 FSMs: Moor Outputs in State Graphs and Tables Outputs in State Graphs and Tables Outputs in State Graphs and Tables Moore Outputs Moore outputs in state tables The outputs are placed in extra columns in the table Combinational logic to calculate outputs The outputs need more combinational logic. The inputs are the states. Normally one would need another Karnaugh map for each output bit. Fortunately here the outputs are so simple one can do the logic in ones head. POBLEM (COUNTE WITH TWO OUTPUTS) a) draw the state graph of a counter that counts in binary: It has three outputs bits YZ. These are outputs, not the state bits. When the x input =, the outputs are the same as the state, i.e. YZ= for state, for, for 2, etc. When x=, the outputs are the state less one, i.e. state 2 gives out, state gives out, state gives out 7, etc. b) Make a state table that includes a column for both outputs. c) Get the equations for the next-state logic. You can find them in the notes on p. (You tell me). d) Derive the equations for the output logic. (Check: F= A x Ax) Carleton University Seq2FSM_E.fm p. 4, evised; March, 28 Comment on Slide 2

22 Next State Logic Maps (Moore Outputs Circuit) Design this logic 2 Next-State LOGIC Ignore output logic for now Counter state table D 2 = 2 D = D = State Next State D values 2 2 D 2 D D S= S= 2 map for D 2 map for D 2 2 D = D = = - S3= S2= S4= S5= S7= S6= Distrb law Demorgan xzzx=x z 2 map for D 2 D 2 = = 2 ( ) ( ) 2 = 2 ( ) ( ) 2 = 2 ( ) 2 2 Final Design D 2 = 2 ( ) D = D= D 2 = 2 D = D = Seq2FSM_E.fm p. 42 evised; March, 28 Slide 22 Next State Logic Maps (Moore Outputs Circuit) Derivation of Counter Next-State Logic Derivation of Counter Next-State Logic Equations y output is the same as the state. We don t need any more logic. z output is the inverse of y. We don t need any more logic, just inverters. We only calculate the state logic, which are the same as the D outputs from the logic. Summary of logic equation derivation We calculate a 3-output 3-input block of combinational output logic. We make a Karnaugh map for each combinational output. We circle the maps to minimize the logic. Carleton University Seq2FSM_E.fm p. 43, evised; March, 28 Comment on Slide 22

23 FSMs: Mealy Outputs in State Graphs and Tables Example: -7 Up and Down Counter Mealy Output If b=, z output counts up If b=, z output counts down State Graph Outputs written underneath state With associated input The State Table Add columns for outputs A column for each input State Table, State Next State Output z 2 z z 2 2 b= b= S= S= S3= S2= S4= S5= S7= S6= if b;z= if b;z= if b;z= if b;z= if b;z= uestions if b;z=. What are inputs? if b;z= 2. Is the z output if b;z= Mealy or Moore? if b;z= 3. Where did these if b;z= equ. come from? if b;z= if b;z= if b;z= if b;z= if b;z= if b;z= Mealy b State Outputs D D 2 = 2 ( ) 2 b 2 z D 2 2 D = C D D z C D D = D z C Seq2FSM_E.fm p. 44 evised; March, 28 Slide 23 FSMs: Mealy Outputs in State Graphs and Tables Mealy Outputs Mealy Outputs epresenting Mealy outputs on state graphs Many, in fact most, books use Mealy outputs attached to the state transition arrows. You may use this notation if you find it easier. Answers. There is only one input b. The CLK and ESET are inputs but we do not need to do any special logic design for them so they are not shown. 2. The Z output is Mealy since it can be directly controlled by an input. b=/z= b=/z= b= b= b= /z= /z= b= /z= /z= b= /z= b= b= /z= b= /z= b= /z= /z= b= /z= b= /z= b= /z= b= /z= b= /z= 3. The state graph has the same states and state transitions (arrows) as for the circuit with Mealy outputs, only the outputs differ. Hence the next state equations are the same as for the circuit with Moore outputs. Up-Down Counters vs Up and Down counters This up and down counter change itscount from when one changes from counting up to down, i.e =7, =6, =5... Most applications reverse the present count so that that 7 6, 6 5,... 7 when b is changed from to. We will call these up-down counters. Their circuit is much more complex. Carleton University Seq2FSM_E.fm p. 45, evised; March, 28 Comment on Slide 23

24 Mealy Outputs K-Maps and Circuits Example: -7 Up and Down Counter Obtain Output Maps State Table, State Next State Mealy Output z 2 z z 2 2 b= b= S= S= S3= S2= S4= S5= S7= S6= The next-state logic is the same as with Moore. Must calculate output logic. Convert state-table to K-map of z 2 z z. Be sure it is in K-map order Convert 3-bits/square K-map into three -bits/square K-maps. Circling the K-maps gives the output equations. (next slide) Split State Table Put two haves side-by-side Flip right hand pair Map of Z b b= 2 b = 2 Map of Z 2 b Map of Z b 2 4 Seq2FSM_E.fm p. 46 evised; March, 28 Slide 24 Mealy Outputs K-Maps and Circuits Mealy Outputs Mealy Outputs Constructing the 4-input map We have 3 state variables, and one input which, because it is Mealy, is an input variable for the output maps. Thus we must construct a 4-variable map from the output state table. The easy way to understand this is to: Move the four half-columns of numbers from the state table to a Karnaugh map containing all the outputs. Before the state table lines were arranged in K-map order; by flipping the two columns, the columns of the K- map will be placed in K-map order. After the map containing all three outputs is constructed, it should be split into three individual maps. A. POBLEM (HAD) Take a state graph in which there are 4-state bits and an input. Show, how the state table should be broken up and rearranged so that one can easily construct a 5-input K-map from the table. Carleton University Seq2FSM_E.fm p. 47, evised; March, 28 Comment on Slide 24

25 Circuit For Mealy Up-Down Counter Example: -7 Up and Down Counter Next State Map of Z 2 State Table, State Next State Mealy Output z 2 z z 2 2 b= b= S= S= S3= S2= S4= S5= S7= S6= The next-state logic is the same as with Moore. Must calculate output logic. Circling the K-maps gives the output equations. These fill in the output logic. b Map of Z b 2 2 Z 2 = b 2 b 2 = b 2 Z = b b = b - Map of Z b 2 b D 2 = 2 ( ) D = 2 D 2 D D D = State D 2 C D C D C Z = b b = b - b Outputs Z 2 = b 2 Z = b - Z = b - Seq2FSM_E.fm p. 48 evised; March, 28 Slide 25 Circuit For Mealy Up-Down Counter Mealy Output Circuit Mealy Output Circuit Student s often ask about using O gates in schematics. If the object is to get the smallest size CMOS circuit then O gates will not allow you to get a good measure of the circuit cost. If the object is to get a compact set of equations to show other people, then they are quite useful. The object here was to fit the circuit on one slide without too much clutter. If you are going to implement them on a complex-programmable-logic device (CPLD) as is done in the lab, it does not matter because the software that translates them into a program for the PLAs will take them out anyway. For some logic families, like MOS-current-mode-logic (MCML), which are used at very high speeds, an O gate can be implemented easily, and may be the best choice of gate. Carleton University Seq2FSM_E.fm p. 49, evised; March, 28 Comment on Slide 25

26 Systematic Design of a Finite-State Machine Design: Getting the State Graph, The Hard Part Basic Steps Specification Design a machine to count bottles placed in a 6-pack. ) It sends a signal to position the empty pack. 2-7) It sends a signal to place each bottle one at a time. - It counts the bottles. 8) It sends a signal to removes the full pack. Each step takes.5 sec. Step Decide on Inputs and Outputs User interface Draw a block diagram Draw typical output waveforms Step 2 Moore outputs or Mealy? Mealy: Fast response? Mealy: Fewer states => smaller Moore: Glitch free outputs? How many states? Construct the State Graph using suggestive symbols ST Cartn FP mvpk B6 ST Cartn Count mvpck CLK B B5 B2 B3 B4 Moosehead CLK ST Cartn Count An extra clock cycle delay is OK. Smaller size lowers cost. Glitches are complicated; say it s OK for now. With only clock as input it will be? Moosehead State graph construction is hard. This chapter and the next describe it! mvpck Seq2FSM_E.fm p. 5 evised; March, 28 Slide 26 Systematic Design of a Finite-State Machine Steps In Finite-State Machine Design Steps In Finite-State Machine Design Specification This may be a very complete and detailed document. However it is often, short, incomplete and may have contradictions. You may have to revise it several times, and go back to the customer to get them to approve a revised specification. Step Input and Outputs One needs their logical function, their duration, their timing with respect to the clock edge, their voltage levels. For the relatively simple circuits in this section, we will show the signals on a block diagram and on the waveforms of a timing diagram. For the moment we will require inputs to overlap at least one active clock edge so the flip flops can capture their values. This overlaps with Step 2, because to draw proper outputs on the timing diagram, one needs to know if the are Moore or Mealy. Step 2 Mealy or Moore More about this choice is given on Slide 37. The Mealy outputs are faster because a signal can cause an output to change immediately, rather than waiting for the clock. Also Mealy outputs tend to give a simpler machine. State Graph The flow between states is the part of the design which requires the most thinking, and is the main subject of this Section. The states will eventually have binary values, like,,... However it is usually easier at this stage to give them suggestive names, like B (st bottle), ST and FP(full pack). Later they will be converted to binary strings. The number of states becomes apparent as the state graph design proceeds. Carleton University Seq2FSM_E.fm p. 5, evised; March, 28 Comment on Slide 26

27 Systematic Design of an FSM: The Toggle Flip Flop Implementation: The Easy Part of Design Step 3 State Assignment ST=, B=... Step 4 Make State Table From State Graph Step 5 Put table in K-Map order Make Maps from Table: Next-State Logic Maps Output-Logic Maps Step 6 Get Equations Don t forget to Share Gates Draw Circuit 2 ST Cartn FP mvpk B6 B D 2 = 2 D = B5 B2 Next-State Logic B3 B4 D 2 D D D = D C D C D C 2 Cartn mvpk 2 2 Output Logic Z =( 2 ) Z = D THESE AE NOT FO THE ABOVE MACHINE Z Z Seq2FSM_E.fm p. 52 evised; March, 28 Slide 27 Systematic Design of an FSM: The Toggle Flip Flop Steps In Finite-State Machine Design Steps In Finite-State Machine Design (cont) The more mechanical steps These are very algorithmic. The designer must know what is happening, but the routine boring work can be done by a computer program. Step3, 5, 6 This steps are: a) making a state table from the state graph, b) arranging the state table in Karnaugh map order, c) extracting the maps from the table, c) obtaining the equations from circling the maps, and d) drawing the circuit from the equations. These were extensively described before. Note that there are one set of maps for the next-state equations and another set for the Mealy or Moore output equations. Step 4 Previously binary strings were used for states. If symbolic names are used like Clear, one must translate these into bit strings like. This is called state assignment, further a good state assignment can make the logic noticeably simpler. Carleton University Seq2FSM_E.fm p. 53, evised; March, 28 Comment on Slide 27

28 Systematic Design of an FSM: The Toggle Flip Flop The Toggle Flip-Flop Made from a D flip-flop. Specification Shall have two states S and S Input signal T On every active clock edge: If T= change output. If T= hold old output. Step Draw block diagram. Draw typical waveforms. Step 2 How many states? Mealy or Moore? Draw state graph Step3 Make state table. Moore T z T Toggle CLK Flip-Flop CLK ST z T= S z= S S S S S S T= T= S z= T= State Table (with symbolic states), State Next State D input output T= T= T= T= z S S S S S S S Seq2FSM_E.fm p. 54 evised; March, 28 Slide 28 Systematic Design of an FSM: The Toggle Flip Flop Design of a Toggle Flip-Flop Design of a Toggle Flip-Flop Step Drawing the block diagram establishes in your mind what the inputs and outputs are. Here an extra ST was added. This was because practically all flip-flops have them. However we will assume it was built into the underlying D flip-flop and does not have to be designed here. The waveforms help you to be sure you understand the specifications. Try to include all the scenarios such as two T= inputs when z starts at, two T- inputs when x starts at (not included here). Here the states were written at the bottom of the waveforms. Often, one can tell how many states one needs from the waveforms. Sometimes it is useful to put the states under the waveform as one draw the state graph Step 2 Choice of Mealy or Moore There is no designer choice here. The specification says change after the clock edge, based on the input present just before and during the clock edge. This is a Moore output. A Mealy output may change when an input changes without waiting for the clock. Step 3 The state table can be drawn from the state graph. However it can only be filled in as letters, S and S. The table cannot be completed until state assignment is done on the next page. Carleton University Seq2FSM_E.fm p. 55, evised; March, 28 Comment on Slide 28

29 FSM Design: Detect in a Sequence of Bits Example (Cont): The Toggle Flip-Flop Step 4 State assignment Trivial here. Later will be a big thing. Complete state table fill in assignment Step 5 Make K-maps from table Step 6 Get next state equations. Watch for multiple output simplification. (None here with only one map) Get output logic equations. Step7 Draw circuit T CLK ST T Toggle Flip-Flop Z State Table, State Next State D input output T= T= T= T= z S= S= S= S= S= S= T Map of D D = T T = T D=TT= T State Assignment S= S= D D C z = z = T D D z C Map of z z Seq2FSM_E.fm p. 56 evised; March, 28 Slide 29 FSM Design: Detect in a Sequence of Bits Design of a Toggle Flip-Flop (Cont) Design of a Toggle Flip-Flop (Cont) Step 4 State assignment is the process of assigning a sequence of ones and zeros to each state. Here one can only make S= or S=. Making S= makes the state match the output. This is convenient. Since S=, this forces S=. Step 5 and 6 The K-maps are difficult only for over-simple K-maps like D =. However these are multiple output maps. emember to look for shared gates. Step 7 Easy. 7. POBLEM Draw the timing diagram (waveform) showing T, clk and z for a toggle flip-flop which has input T =. These numbers are the value of the input just before the clock edge in each cycle. Assume the flip-flop was reset to = at the start and that the left most bit of the sequence above is at time =. Carleton University Seq2FSM_E.fm p. 57, evised; March, 28 Comment on Slide 29

30 FSM Design: A Moore Sequence Detector Complete Design of a Finite-State Machine A Sequence Detector Specification x=serial bit coming in at clock rate z = after sequence is detected No overlap don t count, overlap ok ok x = Step Draw block diagram. Draw waveforms. x z x CLK ST Moore Output DETECT x= in a cycle, means x= just before the end of cycle clock edge z CLK z z z t Moore Output Output waits till the clock edge after is complete. Mealy Output Output rises with the 2nd in. Goes down next clock edge. Seq2FSM_E.fm p. 58 evised; March, 28 Slide 3 FSM Design: A Moore Sequence Detector Design of a Moore Machine Design of a Moore Machine No overlap In the specifications, no overlap means that one does not recognize sequences which overlap another sequence. Thus only has one nonoverlapping sequence, but it has two if one counts overlaps. Block diagrams If input sequences are shown on a block diagram, and shown on a timing diagram, there is confusion about which bit goes in first. In the timing diagram the left most bit goes in first (at t=). In the block diagram, this appears strange unless one bends the input lead Where does one change x The flip-flops sample the inputs just before the clock edge. It does not matter where x changes as long as the value is correct just before that edge. Note x cannot change while the clock is changing since one would not know which value the flip-flop would eventually capture. This bit goes in first x = The circles on the x waveform above, indicate the value of x that is captured. That must agree with the numeric values shown above it, or on the block diagram. Delay in Moore Outputs Notice the Mealy outputs end at the time the Moore outputs start. The Moore outputs are delayed into the next cycle from the Mealy outputs. If x changes late in the clock cycle, the Mealy output will be a short pulse (look at the 3rd Mealy pulse). The Moore output is always a full cycle. CLK ST x = CLK ST DETECT DETECT z z Carleton University Seq2FSM_E.fm p. 59, evised; March, 28 Comment on Slide 3

31 FSM Design: The Moore Sequence Detector Design of a Finite-State Machine A Moore Sequence Detector Step 2; State Graph Moore or Mealy? (Choose Moore here, do a Mealy one later) How many states? (Not clear till graph is drawn) Start graph; do sequence x= x= x= S G G z= Moore z= z= Wait for Output Got Got a Wait for Wait for a a The sequence is complete. But graph only half done. Must add other branches. S x= z= Wait for a x= x= x= G x= G z= z= x= Got Got Wait for Wait for F z= Found Output F z= x= x= Found Output Must show all branches from each state One input; 2 branches from each state. Two inputs; 4 branches from each state. Three inputs; branches from each state? Seq2FSM_E.fm p. 6 evised; March, 28 Slide 3 FSM Design: The Moore Sequence Detector Moore Sequence Detector Moore Sequence Detector Drawing the State Graph Starting the graph First set up a state sequence that will recognize the sequence. It is good to write a comment under each state, explaining what it means to be in that state. Finishing the graph Then go back and fill in the other branches on each state. In this case, with one input, you must show two branches from each state. If there were two inputs you would have to show 4 branches from every state. Much of the work in developing the state graph is deciding where these other outputs go. How many branches from each state? For one input x, one has 2 next state choices, one for x=, one for x=. One must always decide where both branches go. They may both go to the same state, but be careful to check. For two inputs, x and y, one has 4 next states choices, one for each of xy=, xy=, xy=, xy =, For three inputs, x y and z, one has 2 3 =8 next states choices. Often some choices lead to the same next state. If they don t, a 3-input state graph becomes very messy. Carleton University Seq2FSM_E.fm p. 6, evised; March, 28 Comment on Slide 3

32 FSM Design: The Moore Sequence Detector Design of a Finite-State Machine A Moore Sequence Detector (cont) Step 2 (Cont) S x= z= Wait for a Step 3 State Table Symbolic State Table State Next State output x= x= z S S G G G G G S F F S G Step 4 State Assignment Substitute bits for state names. For now choose arbitrary bits S=, G=, G=, F= x= x= x= G x= G z= z= Got Got Wait for Wait for x= a a x= F x= z= Found Output Two branches from each state State Table; After State Assignment State Next State D inputs D D output x= x= x= x= z S= S= G= G= G= G= G2= S= F= F= S= G= Seq2FSM_E.fm p. 62 evised; March, 28 Slide 32 FSM Design: The Moore Sequence Detector A Moore Machine (cont) A Moore Machine (cont) Completing the State Graph Consider state G When in G, one has had an initial of. Suppose one get a second. Then the first is discarded as not part of a sequence, but the second may be the start of another sequence, hence stay in G. Consider state G When in G, one knows one received. However suppose one then gets a 2nd, for a sequence so far of This is not part of anything so one must go back to S and wait for a. Building State Tables First build a table with symbolic names like S, G,...(step 3) Then do a state assignment (step 4). This state assignment may be done: - to minimize logic, - to minimize the number of flip-flops that change between states. This tends to save logic and especially power. - to minimize designer effort. This often means an arbitrary or random assignment. Carleton University Seq2FSM_E.fm p. 63, evised; March, 28 Comment on Slide 32

33 FSM Design: The Moore Sequence Detector Design of a Finite-State Machine A Moore Sequence Detector (cont 2 ) State Table in Karnaugh Map Order State Next State D inputs D D x= x= x= x= z output S= S= G= G= G= G= F= S= G= G= S= F= Step 5 Make K-Map from table Step 6 Get logic equations Step 7 Draw circuit map for D D map for z z = D = o D = map for D map for D D D D = o D C D C D = z z = Seq2FSM_E.fm p. 64 evised; March, 28 Slide 33 FSM Design: The Moore Sequence Detector A Moore Machine (cont) A Moore Machine (cont 2 ) Don t forget to arrange your state table in K-map order If you don t it is very difficult to transfer your results to a Karnaugh map. Also arrange your K-maps so the variables follow the state table. For example, Poor Map would be very hard to use, and even Poor Map 2 would be a little confusing since the data would be rotated 9. Step 7: Draw the circuit By this time you should be an expert at drawing circuits from logic equations. From now on, we will tend to draw circuits with blobs with equations inside unless, in certain case like the output above, which only has one gates. Then it is clearer to draw the gate. 8. POBLEM Draw the state graph, and make the state table for with a Moore output which is when the input sequence is or. Do not recognize overlap. This machine needs 5 states. Do not make design the circuit. 9. POBLEM Draw the state graph and make the state table for a two Moore output machine the first output is one for the sequence, and the second for. Do not recognize overlap. x x Poor Map Poor Map 2 Inputs and states mixed on vertical axis Carleton University Seq2FSM_E.fm p. 65, evised; March, 28 Comment on Slide 33

Digital Circuit Engineering

Digital Circuit Engineering Digital Circuit Engineering 2nd Distributive ( + A)( + B) = + AB Circuits that work in a sequence of steps Absorption + A = + A A+= THESE CICUITS NEED STOAGE TO EMEMBE WHEE THEY AE STOAGE D MU G M MU S

More information

or 0101 Machine

or 0101 Machine Synchronous State Graph or Synchronous State Graph or Detector Design a state graph for a machine with: One input X, one output Z. Z= after receiving the complete sequence or Overlapped sequences are detected.

More information

Ch 7. Finite State Machines. VII - Finite State Machines Contemporary Logic Design 1

Ch 7. Finite State Machines. VII - Finite State Machines Contemporary Logic Design 1 Ch 7. Finite State Machines VII - Finite State Machines Contemporary Logic esign 1 Finite State Machines Sequential circuits primitive sequential elements combinational logic Models for representing sequential

More information

Models for representing sequential circuits

Models for representing sequential circuits Sequential Circuits Models for representing sequential circuits Finite-state machines (Moore and Mealy) Representation of memory (states) Changes in state (transitions) Design procedure State diagrams

More information

Latches. October 13, 2003 Latches 1

Latches. October 13, 2003 Latches 1 Latches The second part of CS231 focuses on sequential circuits, where we add memory to the hardware that we ve already seen. Our schedule will be very similar to before: We first show how primitive memory

More information

14.1. Unit 14. State Machine Design

14.1. Unit 14. State Machine Design 4. Unit 4 State Machine Design 4.2 Outcomes I can create a state diagram to solve a sequential problem I can implement a working state machine given a state diagram STATE MACHINES OVERVIEW 4.3 4.4 Review

More information

ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN. Week 9 Dr. Srinivas Shakkottai Dept. of Electrical and Computer Engineering

ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN. Week 9 Dr. Srinivas Shakkottai Dept. of Electrical and Computer Engineering ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN Week 9 Dr. Srinivas Shakkottai Dept. of Electrical and Computer Engineering TIMING ANALYSIS Overview Circuits do not respond instantaneously to input changes

More information

Week-5. Sequential Circuit Design. Acknowledgement: Most of the following slides are adapted from Prof. Kale's slides at UIUC, USA.

Week-5. Sequential Circuit Design. Acknowledgement: Most of the following slides are adapted from Prof. Kale's slides at UIUC, USA. Week-5 Sequential Circuit Design Acknowledgement: Most of the following slides are adapted from Prof. Kale's slides at UIUC, USA. Storing a value: SR = 00 What if S = 0 and R = 0? The equations on the

More information

3. Complete the following table of equivalent values. Use binary numbers with a sign bit and 7 bits for the value

3. Complete the following table of equivalent values. Use binary numbers with a sign bit and 7 bits for the value EGC22 Digital Logic Fundamental Additional Practice Problems. Complete the following table of equivalent values. Binary. Octal 35.77 33.23.875 29.99 27 9 64 Hexadecimal B.3 D.FD B.4C 2. Calculate the following

More information

The Design Procedure. Output Equation Determination - Derive output equations from the state table

The Design Procedure. Output Equation Determination - Derive output equations from the state table The Design Procedure Specification Formulation - Obtain a state diagram or state table State Assignment - Assign binary codes to the states Flip-Flop Input Equation Determination - Select flipflop types

More information

11.1 As mentioned in Experiment 10, sequential logic circuits are a type of logic circuit where the output of

11.1 As mentioned in Experiment 10, sequential logic circuits are a type of logic circuit where the output of EE 2449 Experiment 11 Jack Levine and Nancy Warter-Perez CALIFORNIA STATE UNIVERSITY LOS ANGELES Department of Electrical and Computer Engineering EE-2449 Digital Logic Lab EXPERIMENT 11 SEQUENTIAL CIRCUITS

More information

King Fahd University of Petroleum and Minerals College of Computer Science and Engineering Computer Engineering Department

King Fahd University of Petroleum and Minerals College of Computer Science and Engineering Computer Engineering Department King Fahd University of Petroleum and Minerals College of Computer Science and Engineering Computer Engineering Department Page 1 of 13 COE 202: Digital Logic Design (3-0-3) Term 112 (Spring 2012) Final

More information

Synchronous Sequential Circuit Design. Digital Computer Design

Synchronous Sequential Circuit Design. Digital Computer Design Synchronous Sequential Circuit Design Digital Computer Design Races and Instability Combinational logic has no cyclic paths and no races If inputs are applied to combinational logic, the outputs will always

More information

EET 310 Flip-Flops 11/17/2011 1

EET 310 Flip-Flops 11/17/2011 1 EET 310 Flip-Flops 11/17/2011 1 FF s and some Definitions Clock Input: FF s are controlled by a trigger or Clock signal. All FF s have a clock input. If a device which attempts to do a FF s task does not

More information

Computers also need devices capable of Storing data and information Performing mathematical operations on such data

Computers also need devices capable of Storing data and information Performing mathematical operations on such data Sequential Machines Introduction Logic devices examined so far Combinational Output function of input only Output valid as long as input true Change input change output Computers also need devices capable

More information

ELEC Digital Logic Circuits Fall 2014 Sequential Circuits (Chapter 6) Finite State Machines (Ch. 7-10)

ELEC Digital Logic Circuits Fall 2014 Sequential Circuits (Chapter 6) Finite State Machines (Ch. 7-10) ELEC 2200-002 Digital Logic Circuits Fall 2014 Sequential Circuits (Chapter 6) Finite State Machines (Ch. 7-10) Vishwani D. Agrawal James J. Danaher Professor Department of Electrical and Computer Engineering

More information

Module - 19 Gated Latches

Module - 19 Gated Latches Digital Circuits and Systems Prof. Shankar Balachandran Department of Electrical Engineering Indian Institute of Technology, Bombay And Department of Computer Science and Engineering Indian Institute of

More information

Different encodings generate different circuits

Different encodings generate different circuits FSM State Encoding Different encodings generate different circuits no easy way to find best encoding with fewest logic gates or shortest propagation delay. Binary encoding: K states need log 2 K bits i.e.,

More information

CARLETON UNIVERSITY Final rev EXAMINATION Fri, April 22, 2005, 14:00

CARLETON UNIVERSITY Final rev EXAMINATION Fri, April 22, 2005, 14:00 LTON UNIVSITY Final rev MINTION Fri, pril 22, 25, 4: Name: Number: Signature: UTION: 3 HOUS No. of Students: 258 epartment Name & ourse Number: lectronics L 267, and ourse Instructor(s) T..ay and J. Knight

More information

Sequential Circuits Sequential circuits combinational circuits state gate delay

Sequential Circuits Sequential circuits combinational circuits state gate delay Sequential Circuits Sequential circuits are those with memory, also called feedback. In this, they differ from combinational circuits, which have no memory. The stable output of a combinational circuit

More information

UNIVERSITY OF BOLTON SCHOOL OF ENGINEERING BENG (HONS) ELECTRICAL & ELECTRONICS ENGINEERING EXAMINATION SEMESTER /2017

UNIVERSITY OF BOLTON SCHOOL OF ENGINEERING BENG (HONS) ELECTRICAL & ELECTRONICS ENGINEERING EXAMINATION SEMESTER /2017 UNIVERSITY OF BOLTON TW35 SCHOOL OF ENGINEERING BENG (HONS) ELECTRICAL & ELECTRONICS ENGINEERING EXAMINATION SEMESTER 2-2016/2017 INTERMEDIATE DIGITAL ELECTRONICS AND COMMUNICATIONS MODULE NO: EEE5002

More information

ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN. Week 7 Dr. Srinivas Shakkottai Dept. of Electrical and Computer Engineering

ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN. Week 7 Dr. Srinivas Shakkottai Dept. of Electrical and Computer Engineering ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN Week 7 Dr. Srinivas Shakkottai Dept. of Electrical and Computer Engineering SEQUENTIAL CIRCUITS: LATCHES Overview Circuits require memory to store intermediate

More information

EECS150 - Digital Design Lecture 23 - FSMs & Counters

EECS150 - Digital Design Lecture 23 - FSMs & Counters EECS150 - Digital Design Lecture 23 - FSMs & Counters April 8, 2010 John Wawrzynek Spring 2010 EECS150 - Lec22-counters Page 1 One-hot encoding of states. One FF per state. State Encoding Why one-hot encoding?

More information

Learning Objectives:

Learning Objectives: Learning Objectives: t the end of this topic you will be able to; draw a block diagram showing how -type flip-flops can be connected to form a synchronous counter to meet a given specification; explain

More information

Let s now begin to formalize our analysis of sequential machines Powerful methods for designing machines for System control Pattern recognition Etc.

Let s now begin to formalize our analysis of sequential machines Powerful methods for designing machines for System control Pattern recognition Etc. Finite State Machines Introduction Let s now begin to formalize our analysis of sequential machines Powerful methods for designing machines for System control Pattern recognition Etc. Such devices form

More information

Synchronous Sequential Circuit Design

Synchronous Sequential Circuit Design Synchronous Sequential Circuit Design 1 Sequential circuit design In sequential circuit design, we turn some description into a working circuit We first make a state table or diagram to express the computation

More information

Logic Design II (17.342) Spring Lecture Outline

Logic Design II (17.342) Spring Lecture Outline Logic Design II (17.342) Spring 2012 Lecture Outline Class # 10 April 12, 2012 Dohn Bowden 1 Today s Lecture First half of the class Circuits for Arithmetic Operations Chapter 18 Should finish at least

More information

Synchronous Sequential Logic

Synchronous Sequential Logic 1 IT 201 DIGITAL SYSTEMS DESIGN MODULE4 NOTES Synchronous Sequential Logic Sequential Circuits - A sequential circuit consists of a combinational circuit and a feedback through the storage elements in

More information

Chapter 6 Introduction to state machines

Chapter 6 Introduction to state machines 9..7 hapter 6 Introduction to state machines Dr.-Ing. Stefan Werner Table of content hapter : Switching Algebra hapter : Logical Levels, Timing & Delays hapter 3: Karnaugh-Veitch-Maps hapter 4: ombinational

More information

EECS Components and Design Techniques for Digital Systems. FSMs 9/11/2007

EECS Components and Design Techniques for Digital Systems. FSMs 9/11/2007 EECS 150 - Components and Design Techniques for Digital Systems FSMs 9/11/2007 Sarah Bird Electrical Engineering and Computer Sciences University of California, Berkeley Slides borrowed from David Culler

More information

Sequential Logic (3.1 and is a long difficult section you really should read!)

Sequential Logic (3.1 and is a long difficult section you really should read!) EECS 270, Fall 2014, Lecture 6 Page 1 of 8 Sequential Logic (3.1 and 3.2. 3.2 is a long difficult section you really should read!) One thing we have carefully avoided so far is feedback all of our signals

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 محرم 1439 ه Winter

More information

CSCI 2150 Intro to State Machines

CSCI 2150 Intro to State Machines CSCI 2150 Intro to State Machines Topic: Now that we've created flip-flops, let's make stuff with them Reading: igital Fundamentals sections 6.11 and 9.4 (ignore the JK flip-flop stuff) States Up until

More information

CARLETON UNIVERSITY. Deparment of Electronics ELEC 2607 Switching Circuits January 19, Overview;

CARLETON UNIVERSITY. Deparment of Electronics ELEC 2607 Switching Circuits January 19, Overview; CARLETON UNIVERSITY Deparment of Electronics ELEC 267 Switching Circuits January 9, 24 Laboratory. Overview; A 4-Bit Binary Comparator Take a 4-bit binary number X, for example. This number is made of

More information

CISC 4090: Theory of Computation Chapter 1 Regular Languages. Section 1.1: Finite Automata. What is a computer? Finite automata

CISC 4090: Theory of Computation Chapter 1 Regular Languages. Section 1.1: Finite Automata. What is a computer? Finite automata CISC 4090: Theory of Computation Chapter Regular Languages Xiaolan Zhang, adapted from slides by Prof. Werschulz Section.: Finite Automata Fordham University Department of Computer and Information Sciences

More information

Digital Logic and Design (Course Code: EE222) Lecture 19: Sequential Circuits Contd..

Digital Logic and Design (Course Code: EE222) Lecture 19: Sequential Circuits Contd.. Indian Institute of Technology Jodhpur, Year 2017-2018 Digital Logic and Design (Course Code: EE222) Lecture 19: Sequential Circuits Contd.. Course Instructor: Shree Prakash Tiwari Email: sptiwari@iitj.ac.in

More information

Sequential Circuit Design

Sequential Circuit Design Sequential Circuit esign esign Procedure. Specification 2. Formulation Obtain a state diagram or state table 3. State Assignment Assign binary codes to the states 4. Flip-Flop Input Equation etermination

More information

Boolean Algebra and Digital Logic 2009, University of Colombo School of Computing

Boolean Algebra and Digital Logic 2009, University of Colombo School of Computing IT 204 Section 3.0 Boolean Algebra and Digital Logic Boolean Algebra 2 Logic Equations to Truth Tables X = A. B + A. B + AB A B X 0 0 0 0 3 Sum of Products The OR operation performed on the products of

More information

Lecture 10: Synchronous Sequential Circuits Design

Lecture 10: Synchronous Sequential Circuits Design Lecture 0: Synchronous Sequential Circuits Design. General Form Input Combinational Flip-flops Combinational Output Circuit Circuit Clock.. Moore type has outputs dependent only on the state, e.g. ripple

More information

ENGG 1203 Tutorial _03 Laboratory 3 Build a ball counter. Lab 3. Lab 3 Gate Timing. Lab 3 Steps in designing a State Machine. Timing diagram of a DFF

ENGG 1203 Tutorial _03 Laboratory 3 Build a ball counter. Lab 3. Lab 3 Gate Timing. Lab 3 Steps in designing a State Machine. Timing diagram of a DFF ENGG 1203 Tutorial _03 Laboratory 3 Build a ball counter Timing diagram of a DFF Lab 3 Gate Timing difference timing for difference kind of gate, cost dependence (1) Setup Time = t2-t1 (2) Propagation

More information

Digital Electronics Sequential Logic

Digital Electronics Sequential Logic /5/27 igital Electronics Sequential Logic r. I. J. Wassell Sequential Logic The logic circuits discussed previously are known as combinational, in that the output depends only on the condition of the latest

More information

Lecture 14 Finite state machines

Lecture 14 Finite state machines Lecture 14 Finite state machines Finite state machines are the foundation of nearly all digital computation. The state diagram captures the desired system behavior A formulaic process turns this diagram

More information

CARLETON UNIVERSITY. X = Y 0 0 X > Y 1 0 X < Y 0 1 never 1 1 happens. Examples

CARLETON UNIVERSITY. X = Y 0 0 X > Y 1 0 X < Y 0 1 never 1 1 happens. Examples CARLETON UNIVERSITY Deparment of Electronics ELEC 2607 Switching Circuits January 17, 2005 Laboratory 1. Overview; A 4-Bit Binary Comparator X 3 X 2 X 1 X 0 COMPARATOR Y 3 Y 2 Y 1 Y 0 4 DATA BITS LEAST

More information

6. Finite State Machines

6. Finite State Machines 6. Finite State Machines 6.4x Computation Structures Part Digital Circuits Copyright 25 MIT EECS 6.4 Computation Structures L6: Finite State Machines, Slide # Our New Machine Clock State Registers k Current

More information

CprE 281: Digital Logic

CprE 281: Digital Logic CprE 281: Digital Logic Instructor: Alexander Stoytchev http://www.ece.iastate.edu/~alexs/classes/ Synchronous Sequential Circuits Basic Design Steps CprE 281: Digital Logic Iowa State University, Ames,

More information

CARLETON UNIVERSITY Final EXAMINATION April 16, 2003

CARLETON UNIVERSITY Final EXAMINATION April 16, 2003 LTN UNIVSIT Final MINTIN pril 6, 23 Name: Number: Signature: UTIN: HUS No. of Student: epartment Name & ourse Number: ourse Instructor(s) UTHI MMN 3 4 lectronic ngineering L267, and Profs. N. Tait and

More information

EE40 Lec 15. Logic Synthesis and Sequential Logic Circuits

EE40 Lec 15. Logic Synthesis and Sequential Logic Circuits EE40 Lec 15 Logic Synthesis and Sequential Logic Circuits Prof. Nathan Cheung 10/20/2009 Reading: Hambley Chapters 7.4-7.6 Karnaugh Maps: Read following before reading textbook http://www.facstaff.bucknell.edu/mastascu/elessonshtml/logic/logic3.html

More information

Chapter 4 Part 2 Sequential Circuits

Chapter 4 Part 2 Sequential Circuits University of Wisconsin - Madison ECE/Comp Sci 352 Digital Systems Fundamentals Kewal K. Saluja and Yu Hen Hu Spring 2002 Chapter 4 Part 2 Sequential Circuits Originals by: Charles R. Kime and Tom Kamisnski

More information

Topic 8: Sequential Circuits

Topic 8: Sequential Circuits Topic 8: Sequential Circuits Readings : Patterson & Hennesy, Appendix B.4 - B.6 Goals Basic Principles behind Memory Elements Clocks Applications of sequential circuits Introduction to the concept of the

More information

Introduction to Digital Logic

Introduction to Digital Logic Introduction to Digital Logic Lecture 17: Latches Flip-Flops Problem w/ Bistables Output should have been at end of sequence Problem: Glitch was remembered Need some way to ignore inputs until they are

More information

EECS 270 Midterm 2 Exam Answer Key Winter 2017

EECS 270 Midterm 2 Exam Answer Key Winter 2017 EES 270 Midterm 2 Exam nswer Key Winter 2017 Name: unique name: Sign the honor code: I have neither given nor received aid on this exam nor observed anyone else doing so. NOTES: 1. This part of the exam

More information

Department of Electrical & Electronics EE-333 DIGITAL SYSTEMS

Department of Electrical & Electronics EE-333 DIGITAL SYSTEMS Department of Electrical & Electronics EE-333 DIGITAL SYSTEMS 1) Given the two binary numbers X = 1010100 and Y = 1000011, perform the subtraction (a) X -Y and (b) Y - X using 2's complements. a) X = 1010100

More information

Mealy & Moore Machines

Mealy & Moore Machines Mealy & Moore Machines Moore Machine is a finite-state machine whose output values are determined solely by its current state and can be defined as six elements (S, S 0, Σ, Λ, T, G), consisting of the

More information

IE1204 Digital Design. L10: State Machines (Part 2) Masoumeh (Azin) Ebrahimi Elena Dubrova

IE1204 Digital Design. L10: State Machines (Part 2) Masoumeh (Azin) Ebrahimi Elena Dubrova IE1204 Digital Design L10: State Machines (Part 2) Masoumeh (Azin) Ebrahimi (masebr@kth.se) Elena Dubrova (dubrova@kth.se) KTH / ICT / ES This lecture BV pp. 528-532, 557-567 IE1204 Digital Design, Autumn2015

More information

CPE100: Digital Logic Design I

CPE100: Digital Logic Design I Professor Brendan Morris, SEB 3216, brendan.morris@unlv.edu CPE100: Digital Logic Design I Midterm02 Review http://www.ee.unlv.edu/~b1morris/cpe100/ 2 Logistics Thursday Nov. 16 th In normal lecture (13:00-14:15)

More information

Synchronous Sequential Circuit

Synchronous Sequential Circuit Synchronous Sequential Circuit The change of internal state occurs in response to the synchronized clock pulses. Data are read during the clock pulse (e.g. rising-edge triggered) It is supposed to wait

More information

Chapter 1 Review of Equations and Inequalities

Chapter 1 Review of Equations and Inequalities Chapter 1 Review of Equations and Inequalities Part I Review of Basic Equations Recall that an equation is an expression with an equal sign in the middle. Also recall that, if a question asks you to solve

More information

CE1911 LECTURE FSM DESIGN PRACTICE DAY 1

CE1911 LECTURE FSM DESIGN PRACTICE DAY 1 REVIEW MATERIAL 1. Combinational circuits do not have memory. They calculate instantaneous outputs based only on current inputs. They implement basic arithmetic and logic functions. 2. Sequential circuits

More information

Review for B33DV2-Digital Design. Digital Design

Review for B33DV2-Digital Design. Digital Design Review for B33DV2 The Elements of Modern Behaviours Design Representations Blocks Waveforms Gates Truth Tables Boolean Algebra Switches Rapid Prototyping Technologies Circuit Technologies TTL MOS Simulation

More information

Written reexam with solutions for IE1204/5 Digital Design Monday 14/

Written reexam with solutions for IE1204/5 Digital Design Monday 14/ Written reexam with solutions for IE204/5 Digital Design Monday 4/3 206 4.-8. General Information Examiner: Ingo Sander. Teacher: William Sandqvist phone 08-7904487 Exam text does not have to be returned

More information

Week-I. Combinational Logic & Circuits

Week-I. Combinational Logic & Circuits Week-I Combinational Logic & Circuits Overview Binary logic operations and gates Switching algebra Algebraic Minimization Standard forms Karnaugh Map Minimization Other logic operators IC families 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 Following the slides of Dr. Ahmed H. Madian Lecture 10 محرم 1439 ه Winter

More information

Synchronous Sequential Circuit Design. Dr. Ehab A. H. AL-Hialy Page 1

Synchronous Sequential Circuit Design. Dr. Ehab A. H. AL-Hialy Page 1 Synchronous Sequential Circuit Design Dr. Ehab A. H. AL-Hialy Page Motivation Analysis of a few simple circuits Generalizes to Synchronous Sequential Circuits (SSC) Outputs are Function of State (and Inputs)

More information

CSE370 HW6 Solutions (Winter 2010)

CSE370 HW6 Solutions (Winter 2010) SE370 HW6 Solutions (Winter 2010) 1. L2e, 6.10 For this problem we are given a blank waveform with clock and input and asked to draw out the how different flip-flops and latches would behave. LK a) b)

More information

Vidyalankar S.E. Sem. III [ETRX] Digital Circuits and Design Prelim Question Paper Solution

Vidyalankar S.E. Sem. III [ETRX] Digital Circuits and Design Prelim Question Paper Solution S.E. Sem. III [ETRX] Digital Circuits and Design Prelim uestion Paper Solution. (a) Static Hazard Static hazards have two cases: static and static. static- hazard exists when the output variable should

More information

Chapter 3. Digital Design and Computer Architecture, 2 nd Edition. David Money Harris and Sarah L. Harris. Chapter 3 <1>

Chapter 3. Digital Design and Computer Architecture, 2 nd Edition. David Money Harris and Sarah L. Harris. Chapter 3 <1> Chapter 3 Digital Design and Computer Architecture, 2 nd Edition David Money Harris and Sarah L. Harris Chapter 3 Chapter 3 :: Topics Introduction Latches and Flip-Flops Synchronous Logic Design Finite

More information

FSM model for sequential circuits

FSM model for sequential circuits 1 FSM model for sequential circuits The mathematical model of a sequential circuit is called finite-state machine. FSM is fully characterized by: S Finite set of states ( state ~ contents of FFs) I Finite

More information

ENGG 1203 Tutorial_9 - Review. Boolean Algebra. Simplifying Logic Circuits. Combinational Logic. 1. Combinational & Sequential Logic

ENGG 1203 Tutorial_9 - Review. Boolean Algebra. Simplifying Logic Circuits. Combinational Logic. 1. Combinational & Sequential Logic ENGG 1203 Tutorial_9 - Review Boolean Algebra 1. Combinational & Sequential Logic 2. Computer Systems 3. Electronic Circuits 4. Signals, Systems, and Control Remark : Multiple Choice Questions : ** Check

More information

ESE 570: Digital Integrated Circuits and VLSI Fundamentals

ESE 570: Digital Integrated Circuits and VLSI Fundamentals ESE 570: Digital Integrated Circuits and VLSI Fundamentals Lec 17: March 23, 2017 Energy and Power Optimization, Design Space Exploration, Synchronous MOS Logic Lecture Outline! Energy and Power Optimization

More information

Chapter 3. Chapter 3 :: Topics. Introduction. Sequential Circuits

Chapter 3. Chapter 3 :: Topics. Introduction. Sequential Circuits Chapter 3 Chapter 3 :: Topics igital esign and Computer Architecture, 2 nd Edition avid Money Harris and Sarah L. Harris Introduction Latches and Flip Flops Synchronous Logic esign Finite State Machines

More information

Digital electronics form a class of circuitry where the ability of the electronics to process data is the primary focus.

Digital electronics form a class of circuitry where the ability of the electronics to process data is the primary focus. Chapter 2 Digital Electronics Objectives 1. Understand the operation of basic digital electronic devices. 2. Understand how to describe circuits which can process digital data. 3. Understand how to design

More information

Chapter 1: Logic systems

Chapter 1: Logic systems Chapter 1: Logic systems 1: Logic gates Learning Objectives: At the end of this topic you should be able to: identify the symbols and truth tables for the following logic gates: NOT AND NAND OR NOR XOR

More information

State Graphs FSMs. Page 1

State Graphs FSMs. Page 1 State Graphs FSMs Page 1 Binary Counter State Graph 00 Q1 Q0 N1 N0 0 0 0 1 0 1 1 0 1 0 1 1 1 1 0 0 11 01 State graphs are graphical representations of TT s They contain the same information: no more, no

More information

Laboratory Exercise #8 Introduction to Sequential Logic

Laboratory Exercise #8 Introduction to Sequential Logic Laboratory Exercise #8 Introduction to Sequential Logic ECEN 248: Introduction to Digital Design Department of Electrical and Computer Engineering Texas A&M University 2 Laboratory Exercise #8 1 Introduction

More information

Chapter 5 Synchronous Sequential Logic

Chapter 5 Synchronous Sequential Logic Chapter 5 Synchronous Sequential Logic Sequential circuit: A circuit that includes memory elements. In this case the output depends not only on the current input but also on the past inputs. Memory A synchronous

More information

Boolean Algebra and Digital Logic

Boolean Algebra and Digital Logic All modern digital computers are dependent on circuits that implement Boolean functions. We shall discuss two classes of such circuits: Combinational and Sequential. The difference between the two types

More information

VLSI Physical Design Prof. Indranil Sengupta Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur

VLSI Physical Design Prof. Indranil Sengupta Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur VLSI Physical Design Prof. Indranil Sengupta Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Lecture - 54 Design for Testability So, in the last lecture we talked

More information

EECS150 - Digital Design Lecture 23 - FFs revisited, FIFOs, ECCs, LSFRs. Cross-coupled NOR gates

EECS150 - Digital Design Lecture 23 - FFs revisited, FIFOs, ECCs, LSFRs. Cross-coupled NOR gates EECS150 - Digital Design Lecture 23 - FFs revisited, FIFOs, ECCs, LSFRs April 16, 2009 John Wawrzynek Spring 2009 EECS150 - Lec24-blocks Page 1 Cross-coupled NOR gates remember, If both R=0 & S=0, then

More information

State and Finite State Machines

State and Finite State Machines State and Finite State Machines See P&H Appendix C.7. C.8, C.10, C.11 Hakim Weatherspoon CS 3410, Spring 2013 Computer Science Cornell University Big Picture: Building a Processor memory inst register

More information

Parity Checker Example. EECS150 - Digital Design Lecture 9 - Finite State Machines 1. Formal Design Process. Formal Design Process

Parity Checker Example. EECS150 - Digital Design Lecture 9 - Finite State Machines 1. Formal Design Process. Formal Design Process Parity Checker Example A string of bits has even parity if the number of 1 s in the string is even. Design a circuit that accepts a bit-serial stream of bits and outputs a 0 if the parity thus far is even

More information

Contents. Chapter 3 Combinational Circuits Page 1 of 36

Contents. Chapter 3 Combinational Circuits Page 1 of 36 Chapter 3 Combinational Circuits Page of 36 Contents Combinational Circuits...2 3. Analysis of Combinational Circuits...3 3.. Using a Truth Table...3 3..2 Using a Boolean Function...6 3.2 Synthesis of

More information

EECS 270 Midterm Exam 2 Fall 2009

EECS 270 Midterm Exam 2 Fall 2009 EECS 270 Midterm Exam 2 Fall 2009 Name: unique name: UMID: Sign the honor code: I have neither given nor received aid on this exam nor observed anyone else doing so. Scores: NOTES: Problem # Points 1&2

More information

Sequential Synchronous Circuit Analysis

Sequential Synchronous Circuit Analysis Sequential Synchronous Circuit Analysis General Model Current State at time (t) is stored in an array of flip-flops. Next State at time (t+1) is a Boolean function of State and Inputs. Outputs at time

More information

COE 202: Digital Logic Design Sequential Circuits Part 4. Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office:

COE 202: Digital Logic Design Sequential Circuits Part 4. Dr. Ahmad Almulhem   ahmadsm AT kfupm Phone: Office: COE 202: Digital Logic Design Sequential Circuits Part 4 Dr. Ahmad Almulhem Email: ahmadsm AT kfupm Phone: 860-7554 Office: 22-324 Objectives Registers Counters Registers 0 1 n-1 A register is a group

More information

Read this before starting!

Read this before starting! Points missed: Student's Name: Total score: / points East Tennessee State University epartment of omputer and Information Sciences SI 25 (Tarnoff) omputer Organization TEST 2 for Fall Semester, 28 Read

More information

Boolean circuits. Lecture Definitions

Boolean circuits. Lecture Definitions Lecture 20 Boolean circuits In this lecture we will discuss the Boolean circuit model of computation and its connection to the Turing machine model. Although the Boolean circuit model is fundamentally

More information

Total time is: 1 setup, 2 AND, 3 XOR, 1 delay = (1*1) + (2*2) + (3*3) + (1*1) = 15ns

Total time is: 1 setup, 2 AND, 3 XOR, 1 delay = (1*1) + (2*2) + (3*3) + (1*1) = 15ns Clock Period/ Delay Analysis: Find longest possible path (time-wise) between two flip-flops. If 2ns for AND and 3ns for XOR, with T delayff = 1ns and T setupff = 1 ns. So the total time is: 1 setupff +

More information

10/12/2016. An FSM with No Inputs Moves from State to State. ECE 120: Introduction to Computing. Eventually, the States Form a Loop

10/12/2016. An FSM with No Inputs Moves from State to State. ECE 120: Introduction to Computing. Eventually, the States Form a Loop University of Illinois at Urbana-Champaign Dept. of Electrical and Computer Engineering An FSM with No Inputs Moves from State to State What happens if an FSM has no inputs? ECE 120: Introduction to Computing

More information

Boolean Algebra. Digital Logic Appendix A. Postulates, Identities in Boolean Algebra How can I manipulate expressions?

Boolean Algebra. Digital Logic Appendix A. Postulates, Identities in Boolean Algebra How can I manipulate expressions? Digital Logic Appendix A Gates Combinatorial Circuits Sequential Circuits Other operations NAND A NAND B = NOT ( A ANDB) = AB NOR A NOR B = NOT ( A ORB) = A + B Truth tables What is the result of the operation

More information

Boolean Algebra. Digital Logic Appendix A. Boolean Algebra Other operations. Boolean Algebra. Postulates, Identities in Boolean Algebra

Boolean Algebra. Digital Logic Appendix A. Boolean Algebra Other operations. Boolean Algebra. Postulates, Identities in Boolean Algebra Digital Logic Appendix A Gates Combinatorial Circuits Sequential Circuits George Boole ideas 1854 Claude Shannon, apply to circuit design, 1938 (piirisuunnittelu) Describe digital circuitry function programming

More information

CSC9R6 Computer Design. Practical Digital Logic

CSC9R6 Computer Design. Practical Digital Logic CSC9R6 Computer Design Practical Digital Logic 1 References (for this part of CSC9R6) Hamacher et al: Computer Organization App A. In library Floyd: Digital Fundamentals Ch 1, 3-6, 8-10 web page: www.prenhall.com/floyd/

More information

State & Finite State Machines

State & Finite State Machines State & Finite State Machines Hakim Weatherspoon CS 3410, Spring 2012 Computer Science Cornell University See P&H Appendix C.7. C.8, C.10, C.11 Stateful Components Until now is combinatorial logic Output

More information

State & Finite State Machines

State & Finite State Machines State & Finite State Machines Hakim Weatherspoon CS 3410, Spring 2012 Computer Science Cornell University See P&H Appendix C.7. C.8, C.10, C.11 Big Picture: Building a Processor memory inst register file

More information

ELE2120 Digital Circuits and Systems. Tutorial Note 10

ELE2120 Digital Circuits and Systems. Tutorial Note 10 ELE2120 Digital Circuits and Systems Tutorial Note 10 Outline 1. 1. Sequential Circuit Design 2. 2. Design procedure: a complete example illustration Sequential circuit analysis & design In sequential

More information

CpE358/CS381. Switching Theory and Logical Design. Class 16

CpE358/CS381. Switching Theory and Logical Design. Class 16 CpE358/CS38 Switching Theory and Logical Design Class 6 CpE358/CS38 Summer- 24 Copyright 24-585 Today Fundamental concepts of digital systems (Mano Chapter ) inary codes, number systems, and arithmetic

More information

Digital Logic Appendix A

Digital Logic Appendix A Digital Logic Appendix A Boolean Algebra Gates Combinatorial Circuits Sequential Circuits 1 Boolean Algebra George Boole ideas 1854 Claude Shannon, apply to circuit design, 1938 Describe digital circuitry

More information

Quadratic Equations Part I

Quadratic Equations Part I Quadratic Equations Part I Before proceeding with this section we should note that the topic of solving quadratic equations will be covered in two sections. This is done for the benefit of those viewing

More information

Adders allow computers to add numbers 2-bit ripple-carry adder

Adders allow computers to add numbers 2-bit ripple-carry adder Lecture 12 Logistics HW was due yesterday HW5 was out yesterday (due next Wednesday) Feedback: thank you! Things to work on: ig picture, ook chapters, Exam comments Last lecture dders Today Clarification

More information

Sequential Logic. Handouts: Lecture Slides Spring /27/01. L06 Sequential Logic 1

Sequential Logic. Handouts: Lecture Slides Spring /27/01. L06 Sequential Logic 1 Sequential Logic Handouts: Lecture Slides 6.4 - Spring 2 2/27/ L6 Sequential Logic Roadmap so far Fets & voltages Logic gates Combinational logic circuits Sequential Logic Voltage-based encoding V OL,

More information

Fundamentals of Boolean Algebra

Fundamentals of Boolean Algebra UNIT-II 1 Fundamentals of Boolean Algebra Basic Postulates Postulate 1 (Definition): A Boolean algebra is a closed algebraic system containing a set K of two or more elements and the two operators and

More information