<filename>examples/fsm_error_signal.py<gh_stars>1-10
from nyanMigen import nyanify


@nyanify
def fsm_error_signal():
    s = Fsm(encoding = 'onehot', init = 'one')
    o = Signal()
    o = s.error
    with switch(s):
        with case('one'):
            s = 'two'
        with case('two'):
            s = 'one'

<filename>examples/fsm_error_signal.py<gh_stars>1-10
from nyanMigen import nyanify


@nyanify
def fsm_error_signal():
    s = Fsm(encoding = 'onehot', init = 'one')
    o = Signal()
    o = s.error
    with switch(s):
        with case('one'):
            s = 'two'
        with case('two'):
            s = 'one'
