From 365e0a063f644a1949215b9e21f0f1cf1488db90 Mon Sep 17 00:00:00 2001 From: Ronit Nallagatla Date: Mon, 19 Feb 2024 13:01:19 -0500 Subject: [PATCH 1/4] docs: Fix explanation line length. Add to contributors --- CONTRIBUTING.md | 1 + md/syntaxrules-explanation-unpacked_array.md | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9a51b28..3a2f899 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -147,3 +147,4 @@ under the Developer Certificate of Origin . - Taichi Ishitani (@taichi-ishitani) - Sosuke Hosokawa (@so298) - Jan Remes (@remes-codasip) +- Ronit Nallagatla (@ronitnallagatla) diff --git a/md/syntaxrules-explanation-unpacked_array.md b/md/syntaxrules-explanation-unpacked_array.md index 92f9b2d..061e033 100644 --- a/md/syntaxrules-explanation-unpacked_array.md +++ b/md/syntaxrules-explanation-unpacked_array.md @@ -1,8 +1,12 @@ This rule forbids unpacked array declarations. -Unpacked arrays are not guaranteed to be represented as contiguous memory, and can cause issues with synthesis tools, especially with how multidimensional arrays are synthesized. For example, a synthesis tool might synthesize out unused memory locations of an unpacked array which is not the intended behavior. +Unpacked arrays are not guaranteed to be represented as contiguous memory, and +can cause issues with synthesis tools, especially with how multidimensional +arrays are synthesized. For example, a synthesis tool might synthesize out +unused memory locations of an unpacked array which is not the intended behavior. -Additionally, packed arrays allow the user to intuitively index and slice the array and apply bitwise operations. +Additionally, packed arrays allow the user to intuitively index and slice the +array and apply bitwise operations. The most relevant clauses of IEEE1800-2017 are: - 7.4 Packed and unpacked arrays From 2dc72739db4b9e368dd7e5c2d94d9912112ce0c3 Mon Sep 17 00:00:00 2001 From: ronitnallagatla Date: Mon, 19 Feb 2024 18:03:16 +0000 Subject: [PATCH 2/4] Commit from GitHub Actions (Run mdgen) --- MANUAL.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/MANUAL.md b/MANUAL.md index df06c45..03833b7 100644 --- a/MANUAL.md +++ b/MANUAL.md @@ -5379,9 +5379,13 @@ endmodule; This rule forbids unpacked array declarations. -Unpacked arrays are not guaranteed to be represented as contiguous memory, and can cause issues with synthesis tools, especially with how multidimensional arrays are synthesized. For example, a synthesis tool might synthesize out unused memory locations of an unpacked array which is not the intended behavior. +Unpacked arrays are not guaranteed to be represented as contiguous memory, and +can cause issues with synthesis tools, especially with how multidimensional +arrays are synthesized. For example, a synthesis tool might synthesize out +unused memory locations of an unpacked array which is not the intended behavior. -Additionally, packed arrays allow the user to intuitively index and slice the array and apply bitwise operations. +Additionally, packed arrays allow the user to intuitively index and slice the +array and apply bitwise operations. The most relevant clauses of IEEE1800-2017 are: - 7.4 Packed and unpacked arrays From fd432a4a42e7f8e93e443cc0bad0eaabb44ff7ff Mon Sep 17 00:00:00 2001 From: Ronit Nallagatla Date: Mon, 19 Feb 2024 13:57:38 -0500 Subject: [PATCH 3/4] testcases: added more fail testcases for unpacked_array --- testcases/syntaxrules/fail/unpacked_array.sv | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/testcases/syntaxrules/fail/unpacked_array.sv b/testcases/syntaxrules/fail/unpacked_array.sv index 3deb146..876429e 100644 --- a/testcases/syntaxrules/fail/unpacked_array.sv +++ b/testcases/syntaxrules/fail/unpacked_array.sv @@ -9,3 +9,15 @@ module M; logic [31:0] b [0:7]; endmodule; +//////////////////////////////////////////////////////////////////////////////// +module M; + +localparam bit [7:0] ARRAY [0:3]; + +endmodule +//////////////////////////////////////////////////////////////////////////////// +module M ( + input logic [7:0] a_in [0:5] +); + +endmodule From b9836ccaf3c9943a9eb43d32d5187e90aaeec545 Mon Sep 17 00:00:00 2001 From: ronitnallagatla Date: Mon, 19 Feb 2024 19:04:26 +0000 Subject: [PATCH 4/4] Commit from GitHub Actions (Run mdgen) --- MANUAL.md | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/MANUAL.md b/MANUAL.md index 03833b7..a0eb889 100644 --- a/MANUAL.md +++ b/MANUAL.md @@ -5357,7 +5357,7 @@ logic [7:0][3:0] b; endmodule ``` -### Fail Example (1 of 2) +### Fail Example (1 of 4) ```systemverilog module M; @@ -5366,7 +5366,7 @@ logic a [7:0]; endmodule; ``` -### Fail Example (2 of 2) +### Fail Example (2 of 4) ```systemverilog module M; @@ -5375,6 +5375,24 @@ logic [31:0] b [0:7]; endmodule; ``` +### Fail Example (3 of 4) +```systemverilog +module M; + +localparam bit [7:0] ARRAY [0:3]; + +endmodule +``` + +### Fail Example (4 of 4) +```systemverilog +module M ( + input logic [7:0] a_in [0:5] +); + +endmodule +``` + ### Explanation This rule forbids unpacked array declarations.