@pytest.mark.skipif((not flag), reason='need correct overlay to run')
def test_fsm_num_states2():
    'Test for the Finite State Machine Generator class.\n\n    This test will check 2 and MAX_NUM_STATES states. \n    These cases should be able to pass random tests. \n    For these tests, we use the minimum number of input and output pins.\n\n    '
    ol.download()
    input_pin = list(pin_dict.keys())[0]
    print('\nConnect {} to GND, and disconnect other pins.'.format(input_pin))
    input('Hit enter after done ...')
    for num_states in [2, FSM_MAX_NUM_STATES]:
        (fsm_spec, test_pattern) = build_fsm_spec_random(num_states)
        fsm_generator = FSMGenerator(mb_info)
        fsm_generator.trace(use_analyzer=True, num_analyzer_samples=MAX_NUM_TRACE_SAMPLES)
        fsm_generator.setup(fsm_spec, frequency_mhz=100)
        fsm_generator.run()
        test_string = ''
        for wavegroup in fsm_generator.waveform.waveform_dict['signal']:
            if (wavegroup and (wavegroup[0] == 'analysis')):
                for wavelane in wavegroup[1:]:
                    if (wavelane['name'] == 'test'):
                        test_string = wavelane['wave']
        test_array = np.array(bitstring_to_int(wave_to_bitstring(test_string)))
        period = num_states
        test_tile = np.array(test_pattern)
        golden_test_array = np.tile(test_tile, ceil((MAX_NUM_TRACE_SAMPLES / period)))
        assert np.array_equal(test_array, golden_test_array[:MAX_NUM_TRACE_SAMPLES]), 'Analysis not matching the generated pattern.'
        fsm_generator.stop()
        fsm_generator.reset()
        del fsm_generator
Test for the Finite State Machine Generator class.

This test will check 2 and MAX_NUM_STATES states. 
These cases should be able to pass random tests. 
For these tests, we use the minimum number of input and output pins.
@pytest.mark.skipif((not flag), reason='need correct overlay to run')
def test_fsm_num_states2():
    'Test for the Finite State Machine Generator class.\n\n    This test will check 2 and MAX_NUM_STATES states. \n    These cases should be able to pass random tests. \n    For these tests, we use the minimum number of input and output pins.\n\n    '
    ol.download()
    input_pin = list(pin_dict.keys())[0]
    print('\nConnect {} to GND, and disconnect other pins.'.format(input_pin))
    input('Hit enter after done ...')
    for num_states in [2, FSM_MAX_NUM_STATES]:
        (fsm_spec, test_pattern) = build_fsm_spec_random(num_states)
        fsm_generator = FSMGenerator(mb_info)
        fsm_generator.trace(use_analyzer=True, num_analyzer_samples=MAX_NUM_TRACE_SAMPLES)
        fsm_generator.setup(fsm_spec, frequency_mhz=100)
        fsm_generator.run()
        test_string = 
        for wavegroup in fsm_generator.waveform.waveform_dict['signal']:
            if (wavegroup and (wavegroup[0] == 'analysis')):
                for wavelane in wavegroup[1:]:
                    if (wavelane['name'] == 'test'):
                        test_string = wavelane['wave']
        test_array = np.array(bitstring_to_int(wave_to_bitstring(test_string)))
        period = num_states
        test_tile = np.array(test_pattern)
        golden_test_array = np.tile(test_tile, ceil((MAX_NUM_TRACE_SAMPLES / period)))
        assert np.array_equal(test_array, golden_test_array[:MAX_NUM_TRACE_SAMPLES]), 'Analysis not matching the generated pattern.'
        fsm_generator.stop()
        fsm_generator.reset()
        del fsm_generator