Finite state machine connected to 2^3-by-2-bit memory

Thread Starter

Edman83

Joined Jan 21, 2025
34
1745325400581.png
1745325426679.png
1745325441407.png

Is my logic right?

Cycles
State
Data
Cycle 0​
000​
11​
Cycle 1​
100​
01​
Cycle 2​
000​
11​
Cycle 3​
110​
00​
Cycle 4​
001​
10​
Cycle 5​
110​
00​
Cycle 6​
100​
01​
Cycle 7​
100​
01​
Cycle 8​
100​
01​
Cycle 9​
011​
10​
Cycle 10​
011​
10​
Cycle 11​
111​
01​
Cycle 12​
010​
01​
Cycle 13​
110​
00​
Cycle 14​
010​
01​
Cycle 15​
101​
00​
Cycle 16​
001​
10​
Cycle 17​
100​
01​
Cycle 18​
010​
01​
Cycle 19​
000​
11​
Cycle 20​
010​
01​
Cycle 21​
100​
01​
Cycle 22​
100​
01​
Cycle 23​
011​
10​
Cycle 24​
011​
10​
Cycle 25​
100​
01​
Cycle 26​
010​
01​
Cycle 27​
110​
00​
Cycle 28​
110​
00​

I did it in this order:
3.60 FSM 2.png
First number in the D 11 column - 100. I watch to address A [2:0], here 100 corresponds to 01. Then watch to the first row of the D 01 column - number 010. Address A[2:0] again. 010 corresponds to 01. Check the second row of the D 01 column - number 000 and so on...
 

WBahn

Joined Mar 31, 2012
32,703
Look at your table. Does it make sense?

In Cycle 0, you are in State 000 and the Data is 11. From this, you determined that the machine transitions to State 100 making Data 01.

But, then in Cycle 1, you are in State 000 and the Data is 11. From this, you now claim that the machine transitions to State 110 making Data 00.

So, if the machine is in State 000 and the Data is 11, what state does it transition to?
 

Futurist

Joined Apr 8, 2025
721
View attachment 347628
View attachment 347629
View attachment 347630

Is my logic right?

Cycles
State
Data
Cycle 0​
000​
11​
Cycle 1​
100​
01​
Cycle 2​
000​
11​
Cycle 3​
110​
00​
Cycle 4​
001​
10​
Cycle 5​
110​
00​
Cycle 6​
100​
01​
Cycle 7​
100​
01​
Cycle 8​
100​
01​
Cycle 9​
011​
10​
Cycle 10​
011​
10​
Cycle 11​
111​
01​
Cycle 12​
010​
01​
Cycle 13​
110​
00​
Cycle 14​
010​
01​
Cycle 15​
101​
00​
Cycle 16​
001​
10​
Cycle 17​
100​
01​
Cycle 18​
010​
01​
Cycle 19​
000​
11​
Cycle 20​
010​
01​
Cycle 21​
100​
01​
Cycle 22​
100​
01​
Cycle 23​
011​
10​
Cycle 24​
011​
10​
Cycle 25​
100​
01​
Cycle 26​
010​
01​
Cycle 27​
110​
00​
Cycle 28​
110​
00​

I did it in this order:
View attachment 347631
First number in the D 11 column - 100. I watch to address A [2:0], here 100 corresponds to 01. Then watch to the first row of the D 01 column - number 010. Address A[2:0] again. 010 corresponds to 01. Check the second row of the D 01 column - number 000 and so on...
When you say "the end of cycle 100" is that decimal one hundred?
 

Thread Starter

Edman83

Joined Jan 21, 2025
34
И
Look at your table. Does it make sense?

In Cycle 0, you are in State 000 and the Data is 11. From this, you determined that the machine transitions to State 100 making Data 01.

But, then in Cycle 1, you are in State 000 and the Data is 11. From this, you now claim that the machine transitions to State 110 making Data 00.

So, if the machine is in State 000 and the Data is 11, what state does it transition to?
But why did we skip the state 100 with the data 01? Why we won't be in State 100 with data 01 in the Cycle 1?
 

WBahn

Joined Mar 31, 2012
32,703
И

But why did we skip the state 100 with the data 01? Why we won't be in State 100 with data 01 in the Cycle 1?
I didn't say anything about Cycle 1.

Let me try again.

The machine has been running for hours and has just completed Cycle 2837651234. It is now in State 000 with Data 11.

What State does it go to next?

How is this ANY different that what it would do in Cycle 0 or Cycle 2 or any other Cycle in which it is in State 000 with Data 11?

If it isn't any different, then why does your table have it do something different for Cycle 0 than it does for Cycle 2?
 

Thread Starter

Edman83

Joined Jan 21, 2025
34
What State does it go to next?
Like this?
Cycles
State
Data
Cycle 0​
000​
11​
Cycle 1​
100​
01​
Cycle 2​
011​
10​
Cycle 3​
100​
01​
Cycle 4​
011​
10​
Cycle 5​
100​
01​
Cycle 6​
011​
10​
Cycle 7​
100​
01​
Cycle 8​
011​
10​
Cycle 9​
100​
01​
Cycle 10​
011​
10​
 

Thread Starter

Edman83

Joined Jan 21, 2025
34
Now, do you see a simple pattern that allows you to determine the state for any cycle?
Yeah, I do. Cycle 0 state is 000. Look to the column "Current state S [2:0]" for the row "000" then to corresponding "D[1:0]" (11) column - next state is 100 in the Cycle 1. Look to the "Address A[2:0]" to see what data corresponds to state 100 - it is 01. Again look at the "Current state S [2:0]" for the row "100", then look to corresponding row in the Data 01 column - next state is 011 in the Cycle 2 and so on...
 
Top