def build_fsm_spec_max_in_out():
    'Build an FSM spec using a maximum number of inputs and outputs.\n\n    The returned FSM spec has a maximum number of inputs and \n    outputs. At the same time, the largest available number of \n    states will be implemented. For example, on PYNQ-Z1, if \n    FSM_MAX_INPUT_BITS = 8, and FSM_MAX_STATE_INPUT_BITS = 13, we will \n    implement 2**(13-8)-1 = 31 states. This is the largest number of states \n    available for this setup, since there is always 1 dummy state that has\n    to be reserved.\n\n    Returns\n    -------\n    dict\n        The FSM spec that can be consumed by the FSM generator.\n    list\n        The output patterns associated with this FSM spec.\n\n    '
    input_pins = list(pin_dict.keys())[:FSM_MAX_INPUT_BITS]
    output_pins = list(pin_dict.keys())[FSM_MAX_INPUT_BITS:interface_width]
    fsm_spec_inout = {'inputs': [], 'outputs': [], 'states': [], 'transitions': [[('1' * len(input_pins)), '*', 'S0', '']]}
    test_lanes = [[] for _ in range(len(output_pins))]
    num_states = ((2 ** (FSM_MAX_STATE_INPUT_BITS - FSM_MAX_INPUT_BITS)) - 1)
    for i in range(len(input_pins)):
        fsm_spec_inout['inputs'].append(('input{}'.format(i), input_pins[i]))
    for i in range(len(output_pins)):
        fsm_spec_inout['outputs'].append(('output{}'.format(i), output_pins[i]))
    for i in range(num_states):
        current_state = 'S{}'.format(i)
        next_state = 'S{}'.format(((i + 1) % num_states))
        fsm_spec_inout['states'].append(current_state)
        output_pattern = ''
        for test_lane in test_lanes:
            random_1bit = '{}'.format(randint(0, 1))
            output_pattern += random_1bit
            test_lane += random_1bit
        transition = [('0' * len(input_pins)), current_state, next_state, output_pattern]
        fsm_spec_inout['transitions'].append(transition)
    test_patterns = []
    for i in range(len(output_pins)):
        temp_string = ''.join(test_lanes[i])
        test_patterns.append(np.array(bitstring_to_int(wave_to_bitstring(temp_string))))
    return (fsm_spec_inout, test_patterns)
Build an FSM spec using a maximum number of inputs and outputs.

The returned FSM spec has a maximum number of inputs and 
outputs. At the same time, the largest available number of 
states will be implemented. For example, on PYNQ-Z1, if 
FSM_MAX_INPUT_BITS = 8, and FSM_MAX_STATE_INPUT_BITS = 13, we will 
implement 2**(13-8)-1 = 31 states. This is the largest number of states 
available for this setup, since there is always 1 dummy state that has
to be reserved.

Returns
-------
dict
    The FSM spec that can be consumed by the FSM generator.
list
    The output patterns associated with this FSM spec.
def build_fsm_spec_max_in_out():
    'Build an FSM spec using a maximum number of inputs and outputs.\n\n    The returned FSM spec has a maximum number of inputs and \n    outputs. At the same time, the largest available number of \n    states will be implemented. For example, on PYNQ-Z1, if \n    FSM_MAX_INPUT_BITS = 8, and FSM_MAX_STATE_INPUT_BITS = 13, we will \n    implement 2**(13-8)-1 = 31 states. This is the largest number of states \n    available for this setup, since there is always 1 dummy state that has\n    to be reserved.\n\n    Returns\n    -------\n    dict\n        The FSM spec that can be consumed by the FSM generator.\n    list\n        The output patterns associated with this FSM spec.\n\n    '
    input_pins = list(pin_dict.keys())[:FSM_MAX_INPUT_BITS]
    output_pins = list(pin_dict.keys())[FSM_MAX_INPUT_BITS:interface_width]
    fsm_spec_inout = {'inputs': [], 'outputs': [], 'states': [], 'transitions': [[('1' * len(input_pins)), '*', 'S0', ]]}
    test_lanes = [[] for _ in range(len(output_pins))]
    num_states = ((2 ** (FSM_MAX_STATE_INPUT_BITS - FSM_MAX_INPUT_BITS)) - 1)
    for i in range(len(input_pins)):
        fsm_spec_inout['inputs'].append(('input{}'.format(i), input_pins[i]))
    for i in range(len(output_pins)):
        fsm_spec_inout['outputs'].append(('output{}'.format(i), output_pins[i]))
    for i in range(num_states):
        current_state = 'S{}'.format(i)
        next_state = 'S{}'.format(((i + 1) % num_states))
        fsm_spec_inout['states'].append(current_state)
        output_pattern = 
        for test_lane in test_lanes:
            random_1bit = '{}'.format(randint(0, 1))
            output_pattern += random_1bit
            test_lane += random_1bit
        transition = [('0' * len(input_pins)), current_state, next_state, output_pattern]
        fsm_spec_inout['transitions'].append(transition)
    test_patterns = []
    for i in range(len(output_pins)):
        temp_string = .join(test_lanes[i])
        test_patterns.append(np.array(bitstring_to_int(wave_to_bitstring(temp_string))))
    return (fsm_spec_inout, test_patterns)