Design a Moore type synchronous state machine with only two

In summary: Q0Q1 = 0 00 1 1 01 1those are our four states. the transition states have to be0 0 0 00 1 1 01 0 0 11 1 1 1this is because we have both x1 and x2 and we are asserting that x'1 and x2 = 1. We can see that when we assert that x1 and x2 = 1. We can see that only state 1 = 1. All other states have an output of 0. If we don't assert the condition - then all
  • #1
trickae
83
0

Homework Statement


(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
 
Last edited:
Physics news on Phys.org
  • #2
What does a Moore machine look like. Show us your state transition diagram, and we can help if you still are confused.
 
  • #3
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.

3) the only time the output is z = 1
is when

X1' . X2 = 1

how would we describe that?

would that be like ...

Code:
         | X1 = 0  X1 = 1 |  X2 = 0   X2 = 1
states   |  Q1Q0      Q1Q0| Q1Q0     Q1Q0  
A...A ...B... |...ETC ETC..
B...B ...C...|
C...C ...D...|
D...D ...A...|
then how would we show both X1'X2 = 1 ?

we would have a feedback design with these extra inputs asserted.

or ...

Code:
        |X1X2 = 00  X1X2=01   X1X2=10    X1X2 = 11|
states|Q2.Q1.Q0  Q2.Q1.Q0   Q2.Q1.Q0   Q2.Q1.Q0| OUTPUTS  
................
.................
.................
.................
.................

then using the J/K flip flop excitation table - which is
Q = Jq' +K'q

q Q | J K
0 0 | 0x
0 1 | 1x
1 0 | x1
1 1 | x0

lol I'm very lost. Please help
 
Last edited:
  • #4
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.
 
  • #5
I've learned how to draw state diagrams but should we tackle this question from the timing diagram first?

Edit: I think i may have the state diagram
I'll draw the state diagram up on paint just one second
 
Last edited:
  • #6
Sorry ... i don't know what i was thinking with the above post

http://img255.imageshack.us/img255/3979/nowwaitasecgt7.jpg
 
Last edited by a moderator:
  • #7
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:

http://en.wikipedia.org/wiki/State_diagram
 
  • #8
so in this case - would it be safe to say that
states are
A = 0
B = 1

would it then look like this?
http://img103.imageshack.us/img103/1264/nowwaitasecuq3.jpg
 
Last edited by a moderator:
  • #9
That better. I'm still a bit confused by your statement of the problem, though:

trickae said:
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.

X1 X2 = 1 ? X1 X2 is a 2-bit binary number. Do you mean X1 X2 = 01 ?
 
  • #10
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?
 
  • #11
berkeman said:
That better. I'm still a bit confused by your statement of the problem, though:
X1 X2 = 1 ? X1 X2 is a 2-bit binary number. Do you mean X1 X2 = 01 ?

this is what the question says
When X1' X2 = 1 at the next timing event, output Z goes to 1. Output Z then goes to 0 unless X2 = 1 causing the output to stay at 1.

actually to be quite honest i don't know if the professor meant x1 and x2 or if both x1 and x2 = 1 ... i think they may be the same thing lol.

I think the professor might have and'ed both x1' x2 so that its only asserted high when x1 = 0 and x2 = 1.

Its a guess - let me check out the student help forum on our webct. Just a sec
 
  • #12
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.

thanks for your help thus far
 
  • #13
Once you have the state transition diagram, you can put it into tabular form something like this:

Present State (with output), Inputs, Next State. Kind of like in this tutorial:

http://www.mee.tcd.ie/~flooddk/2e6/Tutorial4Solutions.pdf

Can you take a cut at writing this table out?
 
Last edited by a moderator:
  • #14
Code:
initial state final state
         X2 = 1               z
q2 q1 q0      Q2  Q1   Q0
0   0   1     1   1    1       1
0   1   0     1   1    1       1
0   1   1     1   1    1       1
1   0   0       ETC
1   0   1
1   1   0
1   1   1

         X2 = 0                   z
q2 q1 q0       Q2   Q1 Q0
0   0   1      0    0   0        0
0   1   0      0    0   0        0
0   1   1         ETC
1   0   0
1   0   1
1   1   0
1   1   1
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

q2 q1 q0 | Q1 Q2 Q0

?
 
Last edited:
  • #15
trickae said:
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.
 
  • #16
http://img444.imageshack.us/img444/9992/l1as3.jpg
http://img248.imageshack.us/img248/8650/l2eq8.jpg

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?

or
Code:
   x1x2 = 00    x1x2 = 01  x1x2 = 01     x1x2 = 01
   q2q1q0       q2q1q0      q2q1q0        q2q1q0      
------------------------------------------------
A|
B|

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.
 

Attachments

  • lec04.pdf
    80.3 KB · Views: 310
  • lec05.pdf
    83.3 KB · Views: 306
Last edited by a moderator:
  • #17
berkman i think i got the truth table

Code:
for states 
A=0
B=1



[PLAIN]http://img248.imageshack.us/img248/6757/truthtablevk1.jpg[/PLAIN]
 
Last edited by a moderator:
  • #18
http://img403.imageshack.us/img403/2043/kmapqr5.jpg
 
Last edited by a moderator:
  • #19
http://img69.imageshack.us/img69/5765/jkeqnshe9.jpg

lol i can get the ckt diagram from this alone now.

Thanks a tonne for the push in the right direction. I guess I was sleep deprived last night and couldn't think straight. Thanks a lot for your help.
 
Last edited by a moderator:
  • #20
Good job! :biggrin:
 
  • #21
sorry to btoher you again berkman but I got a 3.75/5 for the question. Lol but here's the solution:

http://img510.imageshack.us/img510/4678/hw2q3solef5.jpg

i didn't quite understand how we ended up with those equations at the end. Any help?
 
Last edited by a moderator:

1. How do you define a Moore type synchronous state machine?

A Moore type synchronous state machine is a type of digital circuit that changes its state based on a clock signal and external inputs. It has a finite number of states and produces an output based on the current state, independent of the input.

2. What are the main components required to design a Moore type synchronous state machine?

The main components required to design a Moore type synchronous state machine are a clock signal, state registers, combinational logic, and an output logic block.

3. Can you explain the design process of a Moore type synchronous state machine?

The design process of a Moore type synchronous state machine involves identifying the number of states required, creating a state diagram, determining the input and output signals, designing the state registers and combinational logic, and finally, implementing the circuit using a hardware description language.

4. How do you handle asynchronous inputs in a Moore type synchronous state machine?

Asynchronous inputs in a Moore type synchronous state machine can be handled by incorporating them into the state diagram and using them as additional inputs to the combinational logic. Alternatively, they can be synchronized using flip-flops before being used in the combinational logic.

5. Can a Moore type synchronous state machine have more than two outputs?

Yes, a Moore type synchronous state machine can have multiple outputs, but it is limited by the number of states and the number of outputs defined in the circuit. Each state can have a unique output, and the output logic block can combine them to generate multiple outputs.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
31
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
2
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
17
Views
5K
Replies
1
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
5
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
4
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
18
Views
8K
  • Engineering and Comp Sci Homework Help
Replies
2
Views
5K
Replies
1
Views
946
Back
Top