(Problem 226) Design a Moore type synchronous state machine with only two
states, two external inputs X1 and X2, and one output Z. When X1 X2 = 1 at the
next clock timing event, output Z goes to 1. Output Z then goes to 0 unless X2 = 1
causing the output to stay at 1. Use positive edge-triggered JK
flip-flops in your
design.
Homework Equations
The Attempt at a Solution
would like tips on how to even begin an attempt
currently reading wakerly chapter 7 to cover the basis of the problem
I posted the digital design problems and I actually have solved two out of the three of them.
My major question was with :
(Problem 226) Design a Moore type synchronous state machine with only two
states, two external inputs X1 and X2, and one output Z. When X1 X2 = 1 at the next clock timing event, output Z goes to 1. Output Z then goes to 0 unless X2 = 1 causing the output to stay at 1. Use positive edge-triggered JK flip-flops in your design.
In the lecture notes we're taught how to design an FSM with one input and depending on the output equation if it includes the external input - then we decide whether its a mealy or a moore machine.
However here we have two external inputs - I'm having trouble coming up with the truth table -
a 1 input truth table may look like this:
Code:
| x = 0 x = 1 | (OUTPUT)
states | Q1Q0 Q1Q0| Z1 Z2
A...A ...B...|1 1
B...B ...C...|1 0
C...C ...D...|1 1
D...D ...A...|0 0
where
A = 00
B = 01
C = 10
D = 11
my problem is i don't know how to structure the truth table nor the state diagram with two inputs.
All i know is that
1) its a moore model
i.e. the output equation is only a function of its present state and not the input
q = f(q,x) state equation
z = h(q) output equation
where
x = external input
q = present state
2) I know how to design the problem once i get the logic table or state diagram.
Have you learned how to draw the state transition diagram? Draw the states as circles, and the transitions from state to state depend on the two inputs (and which state you are in, obviously). The outputs depend only on the state you are in, as you said.
The diagram is a mix of Mealy and Moore styles. Remember, the output is determined only by the state in a Moore machine, so you don't label the transitions with an output:
sorry i still don't know how to implement this with two inputs - wouldn't that mean that our states would have arrows dependent on 8 combinations of arrows?
fraid not. The help section is riddled with "How do I draw a timing diagram" like questions. The professor didn't state anything else. I think it has to be :
__
X1 = 1
X2 = 1
then we have like a latching effect, as long as x2 is 1 the state doesn't change unless x2 changes.
WHEN X2 = 1 are all values asserted positive? if its a moore model than the values of x shouldn't matter when determining z.
what do we fill in for the next state since no sequence is given
I've done these problems when designing a a ckt from a sequence or a state diagram but not where there's two inputs such as x1,x2 - does that mean i need four columns for
fraid not. The help section is riddled with "How do I draw a timing diagram" like questions. The professor didn't state anything else. I think it has to be :
__
X1 = 1
X2 = 1
then we have like a latching effect, as long as x2 is 1 the state doesn't change unless x2 changes.
I think that your interpretation is probably correct here. You can draw the 2-state transition diagram based on this interpretation. And then the implementation is fairly easy I think. You just need to design the combinatorial logic that feeds X1 and X2 into a JK flip-flop, and results in the two outputs shown in your diagram.
is the example we have - as you can see we have two mini tables for one input x - so does that mean we need 4 mini tables for 2 inputs x. Also what goes in for our Q state? i know we calculate it using J/K equations but since we have only two states does that mean we have a 2 x 4 row table?
do we design a latch like circuit such that the circuit continues only when x2 = 1, or asserted? Then workout the J/k equations for our intial states q2q1q0 ?
ALso with the above table idea we don't know the combinations we need for the output. Only that
Code:
q Q | J K
0 0 0x
0 1 1x
1 0 x1
1 1 x0
yet we don;t have a pattern for the final inout - I'm lost.