Design a finite state machine to detect signals

Viewed 15

I want to realize an FSM described as follows:

For a signal x it is to be monitored that the difference 'delta' of the number of sent ones minus the number of sent zeros does not exceed the range from -3 to 3. If this is exceeded, an error signal y=1 is to be set.

The example signal is given as follows: enter image description here

My solution (sorry for the quality):
enter image description here

The idea:
It's said that y should be 1 after exceeding 3 or -3. I would expect that the example signal goes 1 after the seventh tick (or after the second -3) because the first -3 doesn't mean it exceeded. It's obvious that my graph and the example signal don't fit. Is there a flaw in my design and understanding or is there an error in the example signal?

0 Answers
Related