IntroductionThis lab provides practice designing and (possibly) implementing a Finite State Machine (FSM) starting either from some initial specifications of the problem to be solved or from a given State Diagram.Pre-Lab Exercises1. Pre-Lab #1 : FSM #1You are part of a design team that has been asked to design a controller for a home heating system to be marketed across the cold Canadian prairies.1 Heat is provided from two sources, a natural gas fired furnace and a passive solar window system that includes insulated shutters. If the sun is shining2 and the outdoor temperature is more that -25o C the windows provide enough heat to warm the building. When there are clouds in the sky, when it is very cold (-25o C) and during the night the windows shed heat and the shutters must be closed.The specification of the controller is as follows:There are three external inputs (simulated using data switches): D, which is to be attached to a solar detector. However, in the laboratory testing environment, a simple data switch is used to simulate the input from this device. Hence D set to 1 indicates that the sun is shining and a 0 indicates that it is not. T, which is to be attached to a thermostat placed inside the house. It returns a 1 when the building needs more heat and a 0 when it does not. G, which is attached to an outdoor temperature sensor. It returns a 1 when the outdoor temperature is > -25o C, and a 0 otherwise.The controller can be in four different states: S0: In this state the furnace (F) is off and the shutters (S) are closed. Thus state S0 is labeled with two bit state variables, F = 0 and S = 0. S1: In this state the furnace is on and the shutters are open. Thus state S1 is labeled with two bit state variables, F = 1 and S = 1. S2: In this state the furnace is on and the shutters are closed. Thus state S2 is labeled with two bit state variables, F = 1 and S = 0. S3: In this state the furnace is off and the shutters are open. Thus state S3 is labeled with two bit state variables, F = 0 and S = 1.1 In this climate it is very cold for half the year and every home must be heated.2 Fortunately the sun shines frequently.Lab 7: Finite State Machine DesignCSC 355 Last update October 2016 Page 2 of 8The table below indicates the results of the analysis phase of this project.From stateInput sensors: DTG=Go to state:S0000, 001, 100 or 101S0110S1010 or 011S2111S3S1000, 001, 100 or 101S0110S1010, 011 or 111S2S2000, 001, 100 or 101S0110S1010 or 011S2111S3S3000, 001, 100 or 101S0110S1010 or 011S2111S3All other input combinations cause the system to go to state S3. The sequential machine for the controller has four states and uses two state variables for this purpose, F and S. F and S can be monitored using two output LEDsa) Draw the state diagram for a FSM to represent the given specifications above.b) Write an encoded state table (transition table) corresponding to the state diagram of the previous step.c) Fill in the Karnaugh maps for the next states F+, S+, and write minimal sum-of-products equations for F+, S+ (show your work).d) For the circuit, it has been decided to use D flip-flops, so the equations created in c) above can be used directly for the flip-flow inputs. (i.e., D=Q+). On a separate piece of paper that you bring with you to your lab, draw the complete circuit diagram (properly labeled), including pin numbers, for your design.Note: A maximum of one 7474, three 7400, one 7404 and one 7410 chips can be used!2. Pre-Lab #2: FSM #2Design a circuit with the specifications described below. External inputs: A, B, C and D, controlled from the data switches. Number of states: 4 (The state assignment to be used is defined below.) Outputs: Two LEDs to monitor the values of the state variables, called X and Y. State diagram: shown here:A+B_ _C D_ _A CA CB C_ _A BS0S3S2S1____B + C_ _B C + B CLab 7: Finite State Machine DesignCSC 355 Last update October 2016 Page 3 of 8a) Complete a state table corresponding to the state diagram. Use dont cares for input combinations, where appropriate, so that your table can be abbreviated. In the example on the pre-lab worksheet, the first four rows are shown as a guide. Make sure that the total number of rows (i.e., combinations for A, B, C and D) covers all the 16 possibilities for each of the states. (You may not need all of the rows shown in the table.)b) Complete the encoded state table (transition table) corresponding to the state table of the previous step. Use the following state assignment (it will be just the first and last columns that change the number of rows you use will be the same as in the previous part):StateXYS000S101S210S311c) Fill in the Karnaugh maps for the next states X+, Y+. Remember that X+ and Y+ are functions of X, Y, A, B, C and D. Please use this ordering of inputs.d) From these maps, fill in the maps for the inputs for J-K flip flops representing X and Y. You need 4 Karnaugh maps of 6 inputs each.e) Determine the minimal sum-of-products equations for each of JX, KX, JY and KY.f) On a separate piece of paper that you bring with you to your lab, draw the complete circuit diagram (properly labeled), including pin numbers, for your complete circuit design.Note: A maximum of three 7400 chips, one 7404 chip, one 7410 chip and one 7476 chip can be used for this experiment.Part 2: Procedures for the In-Lab Exercises1. Greet your lab instructor and obtain your graded Pre-Lab 7.2. Build circuit 1 and demo its functions to the lab instructor.3. Build circuit 2 and demo its functions to the lab instructor.Lab 7: Finite State Machine DesignCSC 355 Last update October 2016 Page 4 of 8Pre-Lab Worksheet #7 NAME: _________________ LAB Section: B0__1 a) Draw the state diagram for a FSM to represent the given specifications.1 b) Write an encoded state table (transition table) corresponding to the state diagram above.PresentStateNextStateF+ S+FSDTG = 000DTG = 001DTG = 010DTG = 011DTG = 100DTG = 101DTG = 110DTG = 111000110111 c) Fill in the Karnaugh maps and write minimal sum-of-products equationsFSTG00011110FSTG000111100000010111111010D=0D=1F + =FSTG00011110FSTG000111100000010111111010D=0D=1S + =Lab 7: Finite State Machine DesignCSC 355 Last update October 2016 Page 5 of 82 a) Complete a state table corresponding to the state diagram.present stateconditionnext stateABCDS000xxS0S01xxxS1S0x1xxS1S1xx00S22 b) Complete the encoded state table (transition table).present stateconditionnext stateXYABCDX+Y+0000xx0 0001xxx0 100x1xx0 101xx001 0Lab 7: Finite State Machine DesignCSC 355 Last update October 2016 Page 6 of 82 c) Fill in the Karnaugh maps for the next states X+, Y+.ABCD00011110ABCD000111100000010111111010XY=00XY=01Maps for X+ABCD00011110ABCD000111100000010111111010XY=10XY=11ABCD00011110ABCD000111100000010111111010XY=00XY=01Maps for Y+ABCD00011110ABCD000111100000010111111010XY=10XY=11Lab 7: Finite State Machine DesignCSC 355 Last update October 2016 Page 7 of 82 d) Fill in the maps for each of JX, KX, JY and KY.ABCD00011110ABCD000111100000010111111010XY=00XY=01Map for JXABCD00011110ABCD000111100000010111111010XY=10XY=11ABCD00011110ABCD000111100000010111111010XY=00XY=01Map for KXABCD00011110ABCD000111100000010111111010XY=10XY=11Lab 7: Finite State Machine DesignCSC 355 Last update October 2016 Page 8 of 8ABCD00011110ABCD000111100000010111111010XY=00XY=01Map for JYABCD00011110ABCD000111100000010111111010XY=10XY=11ABCD00011110ABCD000111100000010111111010XY=00XY=01Map for KYABCD00011110ABCD000111100000010111111010XY=10XY=112 e) Determine the minimal sum-of-products equations for each of JX, KX, JY and KY.JX= KX =JY = KY.=
Programming
[Solved] CSC 355 Lab 7: Finite State Machine Design
$25
File Name: CSC_355_Lab_7:_Finite_State_Machine_Design.zip
File Size: 395.64 KB
Only logged in customers who have purchased this product may leave a review.
Reviews
There are no reviews yet.