トリガー ステート マシンの言語文法 - 2022.1 日本語

Vivado Design Suite ユーザー ガイド: プログラムおよびデバッグ (UG908)

Document ID
UG908
Release Date
2022-04-26
Version
2022.1 日本語
注記:
  • 大文字/小文字が区別されます。
  • コメント文字は # で、# 文字の後に含まれるものは無視されます。
  • 'THING': THING は終端
  • {<thing>}: 0 以上の thing
  • [<thing>]: 0 または 1 つの thing
    <program> ::= <state_list>
    <state_list> ::= <state_list> <state> | <state>
    <state> ::= 'STATE' <state_label> ':' <if_condition> | <action_block>
<action_block> ::= <action_list> 'GOTO' <state_label> ';'
| <action_list> 'TRIGGER' ';'
| 'GOTO' <state_label> ';'
| 'TRIGGER' ';'
<action_list> ::= <action_statement> | <action_list> <action_statement>
<action_statement> ::= 'SET_FLAG' <flag_name> ';'
| 'CLEAR_FLAG' <flag_name> ';'
| 'INCREMENT_COUNTER' <counter_name> ';'
| 'RESET_COUNTER' <counter_name> ';'
<if_condition> ::= 'IF' '(' <condition> ')' 'THEN' <actionblock>
                   ['ELSEIF' '(' <condition> ')' 'THEN' <actionblock>] 
                   'ELSE' <actionblock>
                   'ENDIF'
<condition> ::= <probe_match_list>
| <counter_match>
| <probe_counter_match>
<probe_counter_match> ::= '(' <probe_counter_match> ')'
| <probe_match_list> <boolean_logic_op> <counter_match>
| <counter_match> <boolean_logic_op> <probe_match_list>
<probe_match_list> ::= '(' <probe_match> ')'
| <probe_match>
<probe_match> ::= <probe_match_list> <boolean_logic_op> <probe_match_list>
| <probe_name> <compare_op> <constant>
| <constant> <compare_op> <probe_name>
<counter_match> ::= '(' <counter_match> ')'
| <counter_name> <compare_op> <constant>
| <constant> <compare_op> <counter_name>
<constant> ::= <integer_constant>
| <hex_constant>
| <binary_constant>
<compare_op> ::= '==' | '!=' | '>' | '>=' | '<' | '<='
<boolean_logic_op> ::= '&&' | '||'
--- The following are in regular expression format to simplify expressions:
--- [A-Z0-9] means match any single character in AB...Z,0..9
--- [AB]+ means match [AB] one or more times like A, AB, ABAB, AAA, etc
--- [AB]* means match [AB] zero or more times
<probe_name>    ::= [A-Z_\[\]<>/][A-Z_0-9\[\]<>/]+
<state_label>   ::= [A-Z_][A-Z_0-9]+
<flag_name>    ::= \$FLAG[0-3]
<counter_name>   ::= \$COUNTER[0-3]
<hex_constant>   ::= <integer>*'h<hex_digit>+
<binary_constant> ::= <integer>*'b<binary_digit>+
<integer_constant> ::= <integer>*'u<integer_digit>+
<integer>     ::= <digit>+
<hex_digit>    ::= [0-9ABCDEFBN_]
<binary_digit>   ::= [01XRFBN_]
<digit>      ::= [0-9]