Skip to content

Commit

Permalink
Merge pull request #3777 from alainmarcel/alainmarcel-patch-1
Browse files Browse the repository at this point in the history
all package reduce bug
  • Loading branch information
alaindargelas authored Jul 26, 2023
2 parents 36bb605 + 36a4ce0 commit 62baaaa
Show file tree
Hide file tree
Showing 46 changed files with 1,568 additions and 768 deletions.
6 changes: 3 additions & 3 deletions src/DesignCompile/CompilePackage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,15 +189,15 @@ bool CompilePackage::collectObjects_(CollectType collectType, Reduce reduce) {
case VObjectType::slTask_declaration: {
// Called twice, placeholder first, then definition
if (collectType == CollectType::OTHER) break;
m_helper.compileTask(m_package, fC, id, m_compileDesign, Reduce::Yes,
m_helper.compileTask(m_package, fC, id, m_compileDesign, reduce,
nullptr, false);
break;
}
case VObjectType::slFunction_declaration: {
// Called twice, placeholder first, then definition
if (collectType == CollectType::OTHER) break;
m_helper.compileFunction(m_package, fC, id, m_compileDesign,
Reduce::Yes, nullptr, false);
m_helper.compileFunction(m_package, fC, id, m_compileDesign, reduce,
nullptr, false);
break;
}
case VObjectType::slLet_declaration: {
Expand Down
1,085 changes: 871 additions & 214 deletions tests/AllPackageSignal/AllPackageSignal.log

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions tests/AllPackageSignal/dut.sv
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ package pkg_a;
// Comment line 6
parameter int ParameterIntInPkgA = 4;
//// The two following lines do not raise any error when uncommented:
`ASSERT_STATIC_IN_PACKAGE(ThisNameDoesNotMatter, 32 == $bits(pkg_b::ParameterIntEqual4))
`ASSERT_STATIC_IN_PACKAGE(ThisNameDoesNotMatter, $bits(ParameterIntInPkgA) == 32)
`ASSERT_STATIC_IN_PACKAGE(ThisNameDoesNotMatter1, 32 == $bits(pkg_b::ParameterIntEqual4))
`ASSERT_STATIC_IN_PACKAGE(ThisNameDoesNotMatter2, $bits(ParameterIntInPkgA) == 32)
//// This one does fail:
`ASSERT_STATIC_IN_PACKAGE(ThisNameDoesNotMatter, $bits(ParameterIntInPkgA) == $bits(pkg_b::ParameterIntEqual4))
`ASSERT_STATIC_IN_PACKAGE(ThisNameDoesNotMatter3, $bits(ParameterIntInPkgA) == $bits(pkg_b::ParameterIntEqual4))
endpackage : pkg_a

179 changes: 142 additions & 37 deletions tests/ArianeElab/ArianeElab.log
Original file line number Diff line number Diff line change
Expand Up @@ -20226,7 +20226,7 @@ bit_typespec 377
byte_typespec 8
case_item 126
case_stmt 30
constant 8962
constant 8942
cont_assign 30
design 1
enum_const 933
Expand All @@ -20253,13 +20253,13 @@ logic_net 14
logic_typespec 1582
logic_var 98
long_int_typespec 4
module_inst 52
module_inst 48
named_begin 5
operation 2040
package 6
packed_array_typespec 90
param_assign 1297
parameter 1516
param_assign 1293
parameter 1512
part_select 116
port 42
range 1818
Expand Down Expand Up @@ -20290,7 +20290,7 @@ bit_typespec 377
byte_typespec 8
case_item 497
case_stmt 120
constant 9081
constant 9061
cont_assign 122
design 1
enum_const 933
Expand All @@ -20317,13 +20317,13 @@ logic_net 14
logic_typespec 1582
logic_var 206
long_int_typespec 4
module_inst 56
module_inst 52
named_begin 5
operation 3352
operation 3360
package 6
packed_array_typespec 90
param_assign 1417
parameter 1516
param_assign 1413
parameter 1512
part_select 442
port 84
range 1818
Expand Down Expand Up @@ -46010,11 +46010,26 @@ design: (work@top)
\_operation: , line:1374:16, endln:1374:62
|vpiOpType:34
|vpiOperand:
\_constant: , line:1374:18, endln:1374:29
|vpiDecompile:32
|vpiSize:64
|INT:32
|vpiConstType:7
\_operation: , line:1374:18, endln:1374:32
|vpiParent:
\_operation: , line:1374:17, endln:1374:46
|vpiOpType:11
|vpiOperand:
\_constant: , line:1374:18, endln:1374:29
|vpiParent:
\_operation: , line:1374:18, endln:1374:32
|vpiDecompile:64
|vpiSize:64
|UINT:64
|vpiConstType:9
|vpiOperand:
\_constant: , line:1374:30, endln:1374:32
|vpiParent:
\_operation: , line:1374:18, endln:1374:32
|vpiDecompile:32
|vpiSize:64
|UINT:32
|vpiConstType:9
|vpiOperand:
\_operation: , line:1374:32, endln:1374:45
|vpiParent:
Expand Down Expand Up @@ -46154,11 +46169,39 @@ design: (work@top)
\_operation: , line:1381:16, endln:1381:128
|vpiOpType:34
|vpiOperand:
\_constant: , line:1381:19, endln:1381:33
|vpiDecompile:44
|vpiSize:64
|INT:44
|vpiConstType:7
\_operation: , line:1381:19, endln:1381:36
|vpiParent:
\_operation: , line:1381:18, endln:1381:57
|vpiOpType:11
|vpiOperand:
\_operation: , line:1381:19, endln:1381:33
|vpiParent:
\_operation: , line:1381:19, endln:1381:36
|vpiOpType:24
|vpiOperand:
\_constant: , line:1381:19, endln:1381:21
|vpiParent:
\_operation: , line:1381:19, endln:1381:33
|vpiDecompile:44
|vpiSize:64
|UINT:44
|vpiConstType:9
|vpiOperand:
\_constant: , line:1381:22, endln:1381:33
|vpiParent:
\_operation: , line:1381:19, endln:1381:33
|vpiDecompile:64
|vpiSize:64
|UINT:64
|vpiConstType:9
|vpiOperand:
\_constant: , line:1381:34, endln:1381:36
|vpiParent:
\_operation: , line:1381:19, endln:1381:36
|vpiDecompile:64
|vpiSize:64
|UINT:64
|vpiConstType:9
|vpiOperand:
\_operation: , line:1381:37, endln:1381:56
|vpiParent:
Expand Down Expand Up @@ -46342,11 +46385,39 @@ design: (work@top)
\_operation: , line:1385:16, endln:1385:81
|vpiOpType:34
|vpiOperand:
\_constant: , line:1385:19, endln:1385:33
|vpiDecompile:52
|vpiSize:64
|INT:52
|vpiConstType:7
\_operation: , line:1385:19, endln:1385:36
|vpiParent:
\_operation: , line:1385:18, endln:1385:57
|vpiOpType:11
|vpiOperand:
\_operation: , line:1385:19, endln:1385:33
|vpiParent:
\_operation: , line:1385:19, endln:1385:36
|vpiOpType:24
|vpiOperand:
\_constant: , line:1385:19, endln:1385:21
|vpiParent:
\_operation: , line:1385:19, endln:1385:33
|vpiDecompile:52
|vpiSize:64
|UINT:52
|vpiConstType:9
|vpiOperand:
\_constant: , line:1385:22, endln:1385:33
|vpiParent:
\_operation: , line:1385:19, endln:1385:33
|vpiDecompile:64
|vpiSize:64
|UINT:64
|vpiConstType:9
|vpiOperand:
\_constant: , line:1385:34, endln:1385:36
|vpiParent:
\_operation: , line:1385:19, endln:1385:36
|vpiDecompile:64
|vpiSize:64
|UINT:64
|vpiConstType:9
|vpiOperand:
\_operation: , line:1385:37, endln:1385:56
|vpiParent:
Expand Down Expand Up @@ -46486,11 +46557,39 @@ design: (work@top)
\_operation: , line:1389:16, endln:1389:145
|vpiOpType:34
|vpiOperand:
\_constant: , line:1389:19, endln:1389:33
|vpiDecompile:51
|vpiSize:64
|INT:51
|vpiConstType:7
\_operation: , line:1389:19, endln:1389:36
|vpiParent:
\_operation: , line:1389:18, endln:1389:57
|vpiOpType:11
|vpiOperand:
\_operation: , line:1389:19, endln:1389:33
|vpiParent:
\_operation: , line:1389:19, endln:1389:36
|vpiOpType:24
|vpiOperand:
\_constant: , line:1389:19, endln:1389:21
|vpiParent:
\_operation: , line:1389:19, endln:1389:33
|vpiDecompile:51
|vpiSize:64
|UINT:51
|vpiConstType:9
|vpiOperand:
\_constant: , line:1389:22, endln:1389:33
|vpiParent:
\_operation: , line:1389:19, endln:1389:33
|vpiDecompile:64
|vpiSize:64
|UINT:64
|vpiConstType:9
|vpiOperand:
\_constant: , line:1389:34, endln:1389:36
|vpiParent:
\_operation: , line:1389:19, endln:1389:36
|vpiDecompile:64
|vpiSize:64
|UINT:64
|vpiConstType:9
|vpiOperand:
\_operation: , line:1389:37, endln:1389:56
|vpiParent:
Expand Down Expand Up @@ -54455,8 +54554,6 @@ design: (work@top)
\_ref_obj: (fpnew_pkg::num_lanes::fmt), line:1851:35, endln:1851:38
|vpiParent:
\_func_call: (fp_width), line:1851:26, endln:1851:39
|vpiTypespec:
\_enum_typespec: (fpnew_pkg::fp_format_e), line:1927:51, endln:1927:62
|vpiName:fmt
|vpiFullName:fpnew_pkg::num_lanes::fmt
|vpiActual:
Expand Down Expand Up @@ -54595,8 +54692,6 @@ design: (work@top)
\_ref_obj: (fpnew_pkg::max_num_lanes::cfg), line:1856:39, endln:1856:42
|vpiParent:
\_func_call: (min_fp_width), line:1856:26, endln:1856:43
|vpiTypespec:
\_logic_typespec: (fmt_logic_t), line:1778:48, endln:1778:59
|vpiName:cfg
|vpiFullName:fpnew_pkg::max_num_lanes::cfg
|vpiActual:
Expand Down Expand Up @@ -57222,10 +57317,20 @@ design: (work@top)
|vpiParent:
\_begin: (fpnew_pkg::get_first_enabled_multi), line:1941:7, endln:1941:30
|vpiCondition:
\_constant: , line:1941:14, endln:1941:29
|vpiSize:64
|UINT:0
|vpiConstType:9
\_operation: , line:1941:14, endln:1941:29
|vpiParent:
\_return_stmt: , line:1941:7, endln:1941:13
|vpiTypespec:
\_enum_typespec: (fpnew_pkg::fp_format_e), line:1927:51, endln:1927:62
|vpiOpType:67
|vpiOperand:
\_constant: , line:1941:27, endln:1941:28
|vpiParent:
\_operation: , line:1941:14, endln:1941:29
|vpiDecompile:0
|vpiSize:64
|UINT:0
|vpiConstType:9
|vpiInstance:
\_package: fpnew_pkg (fpnew_pkg::), file:${SURELOG_DIR}/tests/ArianeElab/dut.sv, line:1485:1, endln:1955:11
|vpiTaskFunc:
Expand Down
Loading

0 comments on commit 62baaaa

Please sign in to comment.