@pytest.mark.skipif((not flag), reason='need correct overlay to run')
def test_fsm_free_run():
    "Test for the Finite State Machine Generator class.\n\n    This will examine a special scenario where no inputs are given.\n    In this case, the FSM is a free running state machine. Since the FSM \n    specification requires at least 1 input pin to be specified,  1 pin can \n    be used as `don't care` input, while all the other pins are used as \n    outputs. A maximum number of states are deployed.\n\n    "
    ol.download()
    print('\nDisconnect all the pins.')
    input('Hit enter after done ...')
    (fsm_spec_inout, test_patterns) = build_fsm_spec_free_run()
    period = FSM_MAX_NUM_STATES
    num_output_pins = (interface_width - 1)
    fsm_generator = FSMGenerator(mb_info)
    fsm_generator.trace(use_analyzer=True, num_analyzer_samples=period)
    fsm_generator.setup(fsm_spec_inout, frequency_mhz=100)
    fsm_generator.run()
    test_strings = ['' for _ in range(num_output_pins)]
    test_arrays = [[] for _ in range(num_output_pins)]
    for wavegroup in fsm_generator.waveform.waveform_dict['signal']:
        if (wavegroup and (wavegroup[0] == 'analysis')):
            for wavelane in wavegroup[1:]:
                for j in range(num_output_pins):
                    if (wavelane['name'] == 'output{}'.format(j)):
                        test_strings[j] = wavelane['wave']
                        test_arrays[j] = np.array(bitstring_to_int(wave_to_bitstring(test_strings[j])))
                        break
    golden_arrays = test_patterns
    for i in range(num_output_pins):
        assert np.array_equal(test_arrays[i], golden_arrays[i]), 'Output{} not matching the generated pattern.'.format(i)
    fsm_generator.stop()
    fsm_generator.reset()
    del fsm_generator
Test for the Finite State Machine Generator class.

This will examine a special scenario where no inputs are given.
In this case, the FSM is a free running state machine. Since the FSM 
specification requires at least 1 input pin to be specified,  1 pin can 
be used as `don't care` input, while all the other pins are used as 
outputs. A maximum number of states are deployed.
@pytest.mark.skipif((not flag), reason='need correct overlay to run')
def test_fsm_free_run():
    "Test for the Finite State Machine Generator class.\n\n    This will examine a special scenario where no inputs are given.\n    In this case, the FSM is a free running state machine. Since the FSM \n    specification requires at least 1 input pin to be specified,  1 pin can \n    be used as `don't care` input, while all the other pins are used as \n    outputs. A maximum number of states are deployed.\n\n    "
    ol.download()
    print('\nDisconnect all the pins.')
    input('Hit enter after done ...')
    (fsm_spec_inout, test_patterns) = build_fsm_spec_free_run()
    period = FSM_MAX_NUM_STATES
    num_output_pins = (interface_width - 1)
    fsm_generator = FSMGenerator(mb_info)
    fsm_generator.trace(use_analyzer=True, num_analyzer_samples=period)
    fsm_generator.setup(fsm_spec_inout, frequency_mhz=100)
    fsm_generator.run()
    test_strings = [ for _ in range(num_output_pins)]
    test_arrays = [[] for _ in range(num_output_pins)]
    for wavegroup in fsm_generator.waveform.waveform_dict['signal']:
        if (wavegroup and (wavegroup[0] == 'analysis')):
            for wavelane in wavegroup[1:]:
                for j in range(num_output_pins):
                    if (wavelane['name'] == 'output{}'.format(j)):
                        test_strings[j] = wavelane['wave']
                        test_arrays[j] = np.array(bitstring_to_int(wave_to_bitstring(test_strings[j])))
                        break
    golden_arrays = test_patterns
    for i in range(num_output_pins):
        assert np.array_equal(test_arrays[i], golden_arrays[i]), 'Output{} not matching the generated pattern.'.format(i)
    fsm_generator.stop()
    fsm_generator.reset()
    del fsm_generator