Adding documentation for refactored rules.
This commit is contained in:
parent
b65ad81d27
commit
026d4fbcb0
|
|
@ -0,0 +1,23 @@
|
|||
Concurrent Rules
|
||||
----------------
|
||||
|
||||
concurrent_005
|
||||
##############
|
||||
|
||||
This rule checks for labels on concurrent assignments.
|
||||
Labels on concurrents are optional and do not provide additional information.
|
||||
|
||||
**Violation**
|
||||
|
||||
.. code-block:: vhdl
|
||||
|
||||
WR_EN_OUTPUT : WR_EN <= q_wr_en;
|
||||
RD_EN_OUTPUT : RD_EN <= q_rd_en;
|
||||
|
||||
**Fix**
|
||||
|
||||
.. code-block:: vhdl
|
||||
|
||||
WR_EN <= q_wr_en;
|
||||
RD_EN <= q_rd_en;
|
||||
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
If Rules
|
||||
--------
|
||||
|
||||
if_012
|
||||
######
|
||||
|
||||
This rule checks for code after the **then** keyword.
|
||||
Moving sequential statements to their own line makes the code easier to comprehend.
|
||||
|
||||
**Violation**
|
||||
|
||||
.. code-block:: vhdl
|
||||
|
||||
if (a = '1' and b = '0') then c <= (others => '0')
|
||||
|
||||
**Fix**
|
||||
|
||||
.. code-block:: vhdl
|
||||
|
||||
if (a = '1' and b = '0') then
|
||||
c <= (others => '0')
|
||||
|
|
@ -1,6 +1,30 @@
|
|||
Process Rules
|
||||
-------------
|
||||
|
||||
process_010
|
||||
###########
|
||||
|
||||
This rule checks the "begin" keyword is on it's own line.
|
||||
Moving the begin to it's own line helps define the transition between the process declarative region and the sequential statements.
|
||||
|
||||
**Violation**
|
||||
|
||||
.. code-block:: vhdl
|
||||
|
||||
PROC_A : process (rd_en, wr_en, data_in, data_out,
|
||||
rd_full, wr_full
|
||||
) is begin
|
||||
|
||||
**Fix**
|
||||
|
||||
.. code-block:: vhdl
|
||||
|
||||
PROC_A : process (rd_en, wr_en, data_in, data_out,
|
||||
rd_full, wr_full
|
||||
) is
|
||||
begin
|
||||
|
||||
|
||||
process_028
|
||||
###########
|
||||
|
||||
|
|
|
|||
|
|
@ -5,9 +5,11 @@ The rules are divided into catagories depending on the part of the VHDL code bei
|
|||
|
||||
.. include:: architecture_rules.rst
|
||||
.. include:: component_rules.rst
|
||||
.. include:: concurrent_rules.rst
|
||||
.. include:: constant_rules.rst
|
||||
.. include:: entity_rules.rst
|
||||
.. include:: generic_rules.rst
|
||||
.. include:: if_rules.rst
|
||||
.. include:: instantiation_rules.rst
|
||||
.. include:: process_rules.rst
|
||||
.. include:: subtype_rules.rst
|
||||
|
|
|
|||
|
|
@ -6,7 +6,9 @@ import re
|
|||
|
||||
|
||||
class rule_012(rule.rule):
|
||||
'''If rule 012 checks for code after the "then" keyword.'''
|
||||
'''
|
||||
If rule 012 checks for code after the "then" keyword.
|
||||
'''
|
||||
|
||||
def __init__(self):
|
||||
rule.rule.__init__(self)
|
||||
|
|
|
|||
Loading…
Reference in New Issue