7
\$\begingroup\$

I need help in completing a task, I’m stuck on quite a few things. Since I’m very new to this topic on finite machines.

I’ve attempted the state diagram, state table, transition table, K-map values and the k-maps (Karnaugh - map) themselves. However, a lot of it is incomplete, because I don’t know how to continue.

Any hints or help is appreciated; I’m not asking for answers just guidance, I’ve tried for a whole week now but still failed to complete this.

You can read my task down below. And in my drawings are questions highlighted in yellow, showing where I’m stuck, or where I’m having the most trouble in figuring out a solution.

Task: Design a clocked synchronous state machine for a combinational lock with two inputs (X and Y) and one output (Z).

Input ‘X’ is used to initialise the sequence entry. Input ‘Y’ is used to enter the binary sequence to unlock. Output ‘Z’ will be turned on if and only if the binary sequence is entered in proper order after the initialisation and must remain on as long as X input remains high.

This combinational lock operates as follows. Input ‘X’ must have changed from low to high in the previous clock period and should remain high afterwards (Initialisation). Entry of first binary digit must be done before the next clock cycle starts and entry of the remaining digits is done on the subsequent clocks.

If a wrong sequence is entered, it will require re-initialising to start entering the correct sequence. enter image description here

My tables and drawings for this task:

State Diagram

State Table and Transition Table

K-Map Values

K-maps

UPDATE!

State diagram State table

State Table State diagram

\$\endgroup\$
  • 2
    \$\begingroup\$ Before you go too much further, note that the timing diagram shows the code being enetered LSB-first on the Y input. Your state diagram is processing it MSB-first. \$\endgroup\$ – Dave Tweed Aug 4 '16 at 11:51
  • 5
    \$\begingroup\$ +1 for a great question. This is a prime example of how homework questions should be asked. \$\endgroup\$ – Vladimir Cravero Aug 4 '16 at 11:53
  • 1
    \$\begingroup\$ The 'fun' part with writing the decision table is that you have a sparse transition table; most possible edges in the graph are don't-cares! I've happily thrown such synthesis at automated compilers for all of my recent state machine work. . . \$\endgroup\$ – user2943160 Aug 4 '16 at 12:01
  • \$\begingroup\$ @user2943160: Yes, but that misses the point of the question, which is to develop a detailed understanding of what the synthesis tool is actually doing for you. \$\endgroup\$ – Dave Tweed Aug 4 '16 at 12:18
  • \$\begingroup\$ I think that the initialize state is unwanted for and wrong. Once you sampled 'x' as high, the next states shall immediately sample the correct (or not) 'y' sequence. Because of the initialize state you are missing the first 'y' value. \$\endgroup\$ – Claudio Avi Chami Aug 4 '16 at 13:56
1
\$\begingroup\$

enter image description here Here is a partial version of the table you need to make. There is 64 rows in total. You determine the Q3*(Q3+) and the others by thinking what is the next state if I am in the current state and looking at X, Y.

Take for example line 2 : Current state 0000(RESET) and X=1, Y=0 this means the next state is 0001 (UNLOCK). Also Z is 0 when I am in state 0000.

You then get the output logic for Q0* by taking all the 1s in your column Q0*. For example for now I have (\ means "not")

Q0*= \Q3\Q2\Q1\Q0X\Y + \Q3\Q2\Q1\Q0XY + \Q3\Q2\Q1Q0\X\Y + etc...

You can then most probably simplify this expression. You won't really be able to do Karnaugh tables because there is 4 states bit and 2 entries = 6 dimension. I suggest you use the cannonic method for the logic as I explained just before.

You can check here for more info : https://en.wikipedia.org/wiki/Canonical_normal_form

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.