Register to reply

Digital Logic State Diagram

by Physicist3
Tags: diagram, digital, logic, state
Share this thread:
Physicist3
#1
Mar16-14, 08:58 AM
P: 72
Hi, I am designing a system to run a certain sequence when the control input is off, and then run a different sequence when the control input is on. When drawing a state diagram, for the loop where the control input is on, can the system repeat the same state twice throughout its sequence and therefore miss one of the other states out??

E.g.

Control = 0: 0000, 0001, 0010, 0011, 0100, 0101 etc.

Control = 1: 0000, 0100, 0010, 0011, 0010, 0101 etc (I.e. State 0001 is not used but 0010 used twice)
Phys.Org News Partner Engineering news on Phys.org
Future phones to use blood and speech to monitor HIV, stress, nutrition
Neuron circuit may enable pitch perception applications
Quasi-distributed temperature sensors from draw-tower fabrication technology
analogdesign
#2
Mar16-14, 02:16 PM
P: 491
Since control=0 is just a counter it might be easier to mux two state machines and mux them with Control as the muxing variable.

Otherwise it's going to be a bit tricky and you will need some additional state variables (besides your state vector output).
meBigGuy
#3
Mar16-14, 07:26 PM
P: 1,081
You cannot use a state twice without something that makes the two occurences unique, essentially making another state.

If I'm in state 0010, I need to somehow know whether to go to 0011 or 0101.

The easiest way to do this is dependent of the nature of the output signals you are driving. Do they need to be glitch free (meaning no decoded control signals) or ?.

Sometimes a state machine is followed by (or contains additional) flops to produce glitch-free outputs, and sometimes that is all encoded into the state flops.

I generally write my state machines in verilog and do it the way that makes it most easily followed. I never encode outputs into state flops. I always have state numbers be just that --- state numbers ---- not control signals.


Register to reply

Related Discussions
Digital Logic - Tri State Buffers Engineering, Comp Sci, & Technology Homework 5
Tri-state logic: High impedance as an input to a logic gate Electrical Engineering 2
Sequential Logic Design-State Diagram for a divider Engineering, Comp Sci, & Technology Homework 0
Digital Logic help Engineering, Comp Sci, & Technology Homework 0
Digital Logic - State Machines Electrical Engineering 1