Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
4015087
Issue#1503: Added new rule for alignment of assignment operators in a…
JHertz5 Aug 28, 2025
3076bf8
Issue#1503: Added tests for new rule.
JHertz5 Aug 28, 2025
259dcb4
Issue#1503: Added docs for new rule.
JHertz5 Aug 28, 2025
54c3c7a
Issue#1503: Added rule to check that signal assignment operator is no…
JHertz5 Sep 3, 2025
883b31e
Issue#1503: Added tests for rule to check that signal assignment oper…
JHertz5 Sep 3, 2025
911d45f
Issue#1503: Added docs for rule to check that signal assignment opera…
JHertz5 Sep 3, 2025
1912c20
Issue#1503: Added new rules for array alignment within signal initial…
JHertz5 Sep 4, 2025
a442ebe
Issue#1503: Modified signal_400 to avoid overlapping with signal_402.
JHertz5 Sep 11, 2025
00f99e5
Issue#1503: Formatting of signal_400.
JHertz5 Sep 11, 2025
b982da5
Merge remote-tracking branch 'origin/master' into issue-1503
JHertz5 Sep 14, 2025
0a5e452
Issue#1503: Tidied signal_400.
JHertz5 Sep 14, 2025
f334bbf
Issue#1503: Realised that I can use the skip arrays setting of multil…
JHertz5 Sep 14, 2025
4234d92
Issue#1503: Updated tests for signal_400.
JHertz5 Sep 14, 2025
69fcaa8
Issue#1503: Tidying in signal_402 and signal_403.
JHertz5 Sep 14, 2025
b6bcd8c
Issue#1503: Added tests for signal_402.
JHertz5 Sep 14, 2025
0e00cb3
Issue#1503: Added tests for signal_403.
JHertz5 Sep 14, 2025
2a5f39c
Issue#1503: Updated docs for signal_402 and signal_403.
JHertz5 Sep 14, 2025
b7fc82c
Issue#1503: Formatting.
JHertz5 Sep 14, 2025
9f25f8f
Issue#1503: Removed unnecessary changes to signal_400.
JHertz5 Sep 14, 2025
ef7b4b4
Issue#1503: Correction to signal_400.
JHertz5 Sep 14, 2025
6b60143
Issue#1503: Doc typo corrections.
JHertz5 Sep 14, 2025
031bf74
Issue#1511: Added missing semicolon.
JHertz5 Sep 14, 2025
d635a87
Issue#1503: Removed unnecessary changes.
JHertz5 Sep 14, 2025
52ad5c7
Merge branch 'master' into issue-1503
JHertz5 Sep 14, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/configuring_array_multiline_structure_rules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -566,5 +566,6 @@ Rules Enforcing Array Multiline Structure Rules
* `concurrent_012 <concurrent_rules.html#concurrent-012>`_
* `constant_016 <constant_rules.html#constant-016>`_
* `sequential_009 <sequential_rules.html#sequential-009>`_
* `signal_403 <signal_rules.html#signal-403>`_
* `variable_403 <variable_rules.html#variable-403>`_
* `variable_assignment_008 <variable_assignment_rules.html#variable-assignment-008>`_
1 change: 1 addition & 0 deletions docs/configuring_keyword_alignment_rules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -989,6 +989,7 @@ Rules Enforcing Keyword Alignment
* `protected_type_body_401 <protected_type_body_rules.html#protected-type-body-401>`_
* `protected_type_body_402 <protected_type_body_rules.html#protected-type-body-402>`_
* `sequential_400 <sequential_rules.html#sequential-400>`_
* `signal_401 <signal_rules.html#signal-401>`_
* `subprogram_body_400 <subprogram_body_rules.html#subprogram-body-400>`_
* `subprogram_body_401 <subprogram_body_rules.html#subprogram-body-401>`_
* `type_400 <type_rules.html#type-400>`_
Expand Down
1 change: 1 addition & 0 deletions docs/configuring_multiline_indent_rules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ Rules Enforcing Multiline Indent Rules
* `sequential_004 <sequential_rules.html#sequential-004>`_
* `sequential_402 <sequential_rules.html#sequential-402>`_
* `signal_400 <signal_rules.html#signal-400>`_
* `signal_402 <signal_rules.html#signal-402>`_
* `variable_400 <signal_rules.html#variable-400>`_
* `variable_402 <variable_rules.html#variable-402>`_
* `variable_assignment_004 <variable_assignment_rules.html#variable-assignment-004>`_
Expand Down
2 changes: 2 additions & 0 deletions docs/rule_groups/alignment_rule_group.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ Rules Enforcing Alignment Rule Group
* `sequential_402 <../sequential_rules.html#sequential-402>`_
* `signal_012 <../signal_rules.html#signal-012>`_
* `signal_400 <../signal_rules.html#signal-400>`_
* `signal_401 <../signal_rules.html#signal-401>`_
* `signal_402 <../signal_rules.html#signal-402>`_
* `subprogram_body_400 <../subprogram_body_rules.html#subprogram-body-400>`_
* `subprogram_body_401 <../subprogram_body_rules.html#subprogram-body-401>`_
* `type_400 <../type_rules.html#type-400>`_
Expand Down
2 changes: 2 additions & 0 deletions docs/rule_groups/structure_rule_group.rst
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,8 @@ Rules Enforcing Structure Rule Group
* `signal_007 <../signal_rules.html#signal-007>`_
* `signal_015 <../signal_rules.html#signal-015>`_
* `signal_017 <../signal_rules.html#signal-017>`_
* `signal_018 <../signal_rules.html#signal-018>`_
* `signal_403 <../signal_rules.html#signal-403>`_
* `source_file_001 <../source_file_rules.html#source-file-001>`_
* `subprogram_instantiation_001 <../subprogram_instantiation_rules.html#subprogram-instantiation-001>`_
* `subprogram_instantiation_002 <../subprogram_instantiation_rules.html#subprogram-instantiation-002>`_
Expand Down
115 changes: 115 additions & 0 deletions docs/signal_rules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,31 @@ This rule checks the structure of signal constraints.
element2(3 downto 0)
);

signal_018
##########

|phase_1| |error| |structure|

This rule checks the **:=** is on the same line as the **signal** keyword.

**Violation**

.. code-block:: vhdl

signal size : integer
:= 1;
signal width : integer
:= 32;

**Fix**

.. code-block:: vhdl

signal size : integer :=
1;
signal width : integer :=
32;

signal_100
##########

Expand Down Expand Up @@ -456,6 +481,96 @@ This rule checks alignment of multiline constraints in signal declarations.
element2(3 downto 0)
);

signal_401
##########

|phase_5| |error| |alignment|

This rule checks the alignment of assignment keywords in signal declarations.

|configuring_keyword_alignment_rules_link|

**Violation**

.. code-block:: vhdl

signal c_default_values : t_address_en := (
c_address_control => false,
c_address_data => true,
others => false
);

**Fix**

.. code-block:: vhdl

signal c_default_values : t_address_en := (
c_address_control => false,
c_address_data => true,
others => false
);

signal_402
##########

|phase_5| |error| |alignment|

This rule checks the alignment of multiline signal initializations that contain arrays.

|configuring_multiline_indent_rules_link|

.. NOTE:: The structure of multiline array signal initializations is handled by the rule `signal_403 <signal_rules.html#signal-403>`_.

**Violation**

.. code-block:: vhdl

signal rom : romq_type :=
(
0,
65535,
32768
);

**Fix**

.. code-block:: vhdl

signal rom : romq_type :=
(
0,
65535,
32768
);

signal_403
##########

|phase_5| |error| |structure|

This rule checks the structure of multiline signal initializations that contain arrays.

|configuring_array_multiline_structure_rules_link|

.. NOTE:: The indenting of multiline array signal initializations is handled by the rule `signal_402 <signal_rules.html#signal-402>`_.

**Violation**

.. code-block:: vhdl

signal rom : romq_type := (0, 65535, 32768);

**Fix**

.. code-block:: vhdl

signal rom : romq_type :=
(
0,
65535,
32768
);

signal_600
##########

Expand Down
41 changes: 41 additions & 0 deletions tests/signal/rule_018_test_input.fixed.vhd
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@

architecture RTL of FIFO is

signal width : integer;

signal width : integer := 16;

signal depth : integer :=
512;

signal AVMM_MASTER_NULL : avmm_master_t := (
(others => '0'),
(others => '0'),
'0',
'0'
);

--! Test stimulus
SIGNAL stimulus : t_stimulus_array :=

(
(
name => "Hold in reset ",
clk_in => "0101010101010101",
rst_in => "1111111111111111",
cnt_en_in => "0000000000000000",
cnt_out => "0000000000000000"
),
(
name => "Not enabled ",
clk_in => "0101010101010101",
rst_in => "0000000000000000",
cnt_en_in => "0000000000000000",
cnt_out => "0000000000000000"
)
);


begin

end architecture RTL;
41 changes: 41 additions & 0 deletions tests/signal/rule_018_test_input.vhd
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@

architecture RTL of FIFO is

signal width : integer;

signal width : integer := 16;

signal depth : integer
:= 512;

signal AVMM_MASTER_NULL : avmm_master_t := (
(others => '0'),
(others => '0'),
'0',
'0'
);

--! Test stimulus
SIGNAL stimulus : t_stimulus_array
:=
(
(
name => "Hold in reset ",
clk_in => "0101010101010101",
rst_in => "1111111111111111",
cnt_en_in => "0000000000000000",
cnt_out => "0000000000000000"
),
(
name => "Not enabled ",
clk_in => "0101010101010101",
rst_in => "0000000000000000",
cnt_en_in => "0000000000000000",
cnt_out => "0000000000000000"
)
);


begin

end architecture RTL;
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ architecture rtl of fifo is
);

signal s : MY_TYPE := (
a => '0',
ddddd => (others => '0'),
ffff => (others => '0')
);
a => '0',
ddddd => (others => '0'),
ffff => (others => '0')
);

signal AxiMs : axi_ms_t (ar_id(IdRange_c), aw_id(IdRange_c),
ar_addr(AddrRange_c), aw_addr(AddrRange_c),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ architecture rtl of fifo is
);

signal s : MY_TYPE := (
a => '0',
ddddd => (others => '0'),
ffff => (others => '0')
);
a => '0',
ddddd => (others => '0'),
ffff => (others => '0')
);

signal AxiMs : axi_ms_t (ar_id(IdRange_c), aw_id(IdRange_c),
ar_addr(AddrRange_c), aw_addr(AddrRange_c),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ architecture rtl of fifo is
);

signal s : MY_TYPE := (
a => '0',
ddddd => (others => '0'),
ffff => (others => '0')
);
a => '0',
ddddd => (others => '0'),
ffff => (others => '0')
);

signal AxiMs : axi_ms_t (ar_id(IdRange_c), aw_id(IdRange_c),
ar_addr(AddrRange_c), aw_addr(AddrRange_c),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ architecture rtl of fifo is
);

signal s : MY_TYPE := (
a => '0',
ddddd => (others => '0'),
ffff => (others => '0')
);
a => '0',
ddddd => (others => '0'),
ffff => (others => '0')
);

signal AxiMs : axi_ms_t (ar_id(IdRange_c), aw_id(IdRange_c),
ar_addr(AddrRange_c), aw_addr(AddrRange_c),
Expand Down
Loading
Loading