<jupyter_start><jupyter_text>FSM Demo Step 1. PreparationWith the overlay downloaded, users have to specify the boolean expression they want to implement.<jupyter_code>from pynq import Overlay

Overlay('interface.bit').download()
from pynq.intf import ARDUINO
from pynq.intf import BooleanGenerator

bg = BooleanGenerator(ARDUINO)
bg.bool_func('D7 = ~D0 & ~D1 & ~D2 & ~D3 & ~D4', led = 'LD0')<jupyter_output>Logic output mapped to LD0
Truth table:
D4 D3 D2 D1 D0
 0  0  0  0  0 : 1
 0  0  0  0  1 : 0
 0  0  0  1  0 : 0
 0  0  0  1  1 : 0
 0  0  1  0  0 : 0
 0  0  1  0  1 : 0
 0  0  1  1  0 : 0
 0  0  1  1  1 : 0
 0  1  0  0  0 : 0
 0  1  0  0  1 : 0
 0  1  0  1  0 : 0
 0  1  0  1  1 : 0
 0  1  1  0  0 : 0
 0  1  1  0  1 : 0
 0  1  1  1  0 : 0
 0  1  1  1  1 : 0
 1  0  0  0  0 : 0
 1  0  0  0  1 : 0
 1  0  0  1  0 : 0
 1  0  0  1  1 : 0
 1  0  1  0  0 : 0
 1  0  1  0  1 : 0
 1  0  1  1  0 : 0
 1  0  1  1  1 : 0
 1  1  0  0  0 : 0
 1  1  0  0  1 : 0
 1  1  0  1  0 : 0
 1  1  0  1  1 : 0
 1  1  1  0  0 : 0
 1  1  1  0  1 : 0
 1  1  1  1  0 : 0
 1  1  1  1  1 : 0
{'fraction_non_alphanumeric': 0.07102803738317758, 'fraction_numerical': 0.1925233644859813, 'mean_word_length': 1.3694690265486726, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '88420', 'license': 'MIT', 'n_tokens_mistral': 622, 'n_tokens_neox': 548, 'n_words': 244, 'path': 'debug/.ipynb_checkpoints/interface_boolean_generator-checkpoint.ipynb', 'repo_name': 'yunqu/PYNQ-Debug-Notebooks', 'size': '1070'}