4. Create a 1-hot implementation of the traffic light state machine from problem #2 (a) Create the state table with state assignments, showing the next states as a function of the input and the outpu...
Let’s look at a simple state machine with the input signal, w, represents a toggle switch for a flashlight that has two modes: blink once or stay on. And the output, z, represents the light being on. To get the light to blink once (i.e, have z assert for one cycle), w needs to assert for just one cycle. To get the light to stay on (i.e., have z stay asserted), w needs to assert for two consecutive cycles. After...
2. To demonstrate a Mealy state machine, let's design a simple arbiter between two requesting entities. We're going to have two request inputs: reqA and reqB. And two outputs: grantA and grantB. Any combination of requests can be asserted at any time: one of them, both of them, or neither. But at most only one grant can be asserted in any given cycle; if neither request is asserted then neither grant should be asserted. We'll need a state machine to...
Design a finite state machine for a traffic light at the intersection of north-south traffic and east-west traffic. The light can be red, green or yellow. Assume a 30 second clock. Assume that the light will change only if a car is coming in the other direction. If cars are in both north-south and east-west, the light will change from one direction to the other. What are the machine states? What are the inputs? What are the outputs? Draw state...
2. To demonstrate a Mealy state machine, let's design a simple arbiter between two requesting entities. We're going to have two request inputs: reqA and reqB. And two outputs: grantA and grantB. Any combination of requests can be asserted at any time: one of them, both of them, or neither. But at most only one grant can be asserted in any given cycle; if neither request is asserted then neither grant should be asserted. We'll need a state machine to...
Design a finite state machine for a traffic light at the intersection of north-south traffic and east-west traffic. The light can be red, green or yellow. Assume a 30 second clock. Assume that the light will change only if a car is coming in the other direction. If cars are in both north-south and east-west, the light will change from one direction to the other. What are the machine states? What are the inputs? What are the outputs? Draw state...
Question 4 State Machines (25 marks) A state machine is required for a simple vending machine. The machine takes one dollar coins only. Each time a coin is added the input signal "coin" is set to 1 for one clock cycle When a total of $4 has been added the output signal "deliver" is set to 1 for one clock cycle and the state machine starts counting coins for the next delivery a) (5 marks) Draw a state diagram for...
Design a state machine that implements the following description: Let’s design a simple controller for an elevator. The elevator can be at one of two floors: first or second. There is a button that controls the elevator (one input), and it has two values: up or down. Also, there are two lights in the elevator that indicate the current floor: blue for first, and yellow for second. At each time step, the controller checks the current floor and current input...
(20 points) Using any state encodings you want, generate a state table for the following state diagram. Note that there is one input, X, and there are two outputs, Y and Z. You can come up with whatever names you want for your state variables. And then generate the logic equations for the next state signals (assume D flip-flops for maintaining state) and the output signals, Y and Z 7. A0 A/Y 070 x=1 x=1 x =1 x =0 x...
1. Let's implement the traffic light controller from the previous assignment in Verilog, working with the following state and module interface definition: diagram car 0 car: 1 D/MR 1SY- car 0 C/MR-1,SG module trafficController (car, clock, MG,MY,MR,SG,SY,SR) input car,clock; output MG,MY,MR,SG,SY,SR; (a) Write a parameter definition for the state encodings. But let's define them as 1-hot encoded states rather than using fully encoded state values. (b) Define two reg variables to keep track of your current state and next state,...
Q3. Consider the circuit shown below: Q1 Jo 0 Ko clock (a) Create the state table that shows the present-states, input x, JK flip-flops inputs, the next-states and the output y 30% (b) Create the state diagram, specify what type of state machine (Mealy or Moore) this circuit is and explain why 20%