diff --git a/vsg/rules/__init__.py b/vsg/rules/__init__.py index 646bba42..3f0dffde 100644 --- a/vsg/rules/__init__.py +++ b/vsg/rules/__init__.py @@ -130,6 +130,7 @@ from vsg.rules import constant from vsg.rules import context from vsg.rules import context_ref from vsg.rules import declarative_part +from vsg.rules import delay_mechanism from vsg.rules import element_association from vsg.rules import entity from vsg.rules import entity_specification diff --git a/vsg/rules/delay_mechanism/__init__.py b/vsg/rules/delay_mechanism/__init__.py new file mode 100644 index 00000000..f3535725 --- /dev/null +++ b/vsg/rules/delay_mechanism/__init__.py @@ -0,0 +1,5 @@ +# -*- coding: utf-8 -*- + +from .rule_500 import rule_500 +from .rule_501 import rule_501 +from .rule_502 import rule_502 diff --git a/vsg/rules/delay_mechanism/rule_500.py b/vsg/rules/delay_mechanism/rule_500.py new file mode 100644 index 00000000..8ba1c9ab --- /dev/null +++ b/vsg/rules/delay_mechanism/rule_500.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- + +from vsg import token +from vsg.rules import token_case + +lTokens = [] +lTokens.append(token.delay_mechanism.transport_keyword) + + +class rule_500(token_case): + """ + This rule checks the *transport* keyword has proper case. + + |configuring_uppercase_and_lowercase_rules_link| + + **Violation** + + .. code-block:: vhdl + + a <= TRANSPORT 1 after 10 ns; + + **Fix** + + .. code-block:: vhdl + + a <= transport 1 after 10 ns; + """ + + def __init__(self): + super().__init__(lTokens) + self.groups.append("case::keyword") diff --git a/vsg/rules/delay_mechanism/rule_501.py b/vsg/rules/delay_mechanism/rule_501.py new file mode 100644 index 00000000..e1741e49 --- /dev/null +++ b/vsg/rules/delay_mechanism/rule_501.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- + +from vsg import token +from vsg.rules import token_case + +lTokens = [] +lTokens.append(token.delay_mechanism.inertial_keyword) + + +class rule_501(token_case): + """ + This rule checks the *inertial* keyword has proper case. + + |configuring_uppercase_and_lowercase_rules_link| + + **Violation** + + .. code-block:: vhdl + + a <= INERTIAL 1 after 10 ns; + + **Fix** + + .. code-block:: vhdl + + a <= inertial 1 after 10 ns; + """ + + def __init__(self): + super().__init__(lTokens) + self.groups.append("case::keyword") diff --git a/vsg/rules/delay_mechanism/rule_502.py b/vsg/rules/delay_mechanism/rule_502.py new file mode 100644 index 00000000..7f5ec16d --- /dev/null +++ b/vsg/rules/delay_mechanism/rule_502.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- + +from vsg import token +from vsg.rules import token_case + +lTokens = [] +lTokens.append(token.delay_mechanism.reject_keyword) + + +class rule_502(token_case): + """ + This rule checks the *reject* keyword has proper case. + + |configuring_uppercase_and_lowercase_rules_link| + + **Violation** + + .. code-block:: vhdl + + a <= REJECT 2ns inertial 1 after 10 ns; + + **Fix** + + .. code-block:: vhdl + + a <= reject 2ns inertial 1 after 10 ns; + """ + + def __init__(self): + super().__init__(lTokens) + self.groups.append("case::keyword")