From 164b6eef1938be9d7305b3e34ac160ec458521a6 Mon Sep 17 00:00:00 2001 From: Alain Dargelas Date: Tue, 3 Oct 2023 21:58:56 -0700 Subject: [PATCH] Fix unsupported expressions --- src/DesignCompile/CompileExpression.cpp | 26 ++++++++++++++++--- .../tests/CoresSweRVMP/CoresSweRVMP.log | 20 +++++++------- third_party/tests/Google/Google.log | 11 +++----- third_party/tests/YosysTests/YosysTests.log | 10 ++----- 4 files changed, 38 insertions(+), 29 deletions(-) diff --git a/src/DesignCompile/CompileExpression.cpp b/src/DesignCompile/CompileExpression.cpp index 6ab39a0657..b777b4f431 100644 --- a/src/DesignCompile/CompileExpression.cpp +++ b/src/DesignCompile/CompileExpression.cpp @@ -1798,10 +1798,14 @@ UHDM::any *CompileHelper::compileExpression( NodeId repetition = fC->Child(dist); VObjectType repetType = fC->Type(repetition); op->VpiOpType(UhdmWriter::getVpiOpType(repetType)); - if (any *rep = compileExpression(component, fC, repetition, - compileDesign, reduce, op, - instance, muteErrors)) { - operands->push_back(rep); + if ((repetType == VObjectType::paConsecutive_repetition) && + (fC->Child(repetition) == InvalidNodeId)) { + } else { + if (any *rep = compileExpression(component, fC, repetition, + compileDesign, reduce, op, + instance, muteErrors)) { + operands->push_back(rep); + } } result = op; } else if (distType == VObjectType::paTHROUGHOUT || @@ -2983,6 +2987,20 @@ UHDM::any *CompileHelper::compileExpression( m_stackLevel--; } return nullptr; + case VObjectType::paCycle_delay_const_range_expression: { + UHDM::range *r = s.MakeRange(); + NodeId lhs = fC->Child(child); + NodeId rhs = fC->Sibling(lhs); + r->Left_expr((expr *)compileExpression(component, fC, lhs, + compileDesign, reduce, r, + instance, muteErrors)); + r->Right_expr((expr *)compileExpression(component, fC, rhs, + compileDesign, reduce, r, + instance, muteErrors)); + fC->populateCoreMembers(parent, parent, r); + result = r; + break; + } case VObjectType::paCycle_delay_range: { VObjectType type = fC->Type(child); operation *operation = s.MakeOperation(); diff --git a/third_party/tests/CoresSweRVMP/CoresSweRVMP.log b/third_party/tests/CoresSweRVMP/CoresSweRVMP.log index 9a26ff196e..d2e0eb3e1d 100644 --- a/third_party/tests/CoresSweRVMP/CoresSweRVMP.log +++ b/third_party/tests/CoresSweRVMP/CoresSweRVMP.log @@ -80,21 +80,21 @@ CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required): -- Configuring done (0.0s) -- Generating done (0.0s) -- Build files have been written to: ${SURELOG_DIR}/build/regression/CoresSweRVMP/slpp_all/mp_preprocess -[ 6%] Generating 10_lsu_bus_intf.sv -[ 12%] Generating 11_ifu_bp_ctl.sv -[ 18%] Generating 12_beh_lib.sv +[ 6%] Generating 15_exu.sv +[ 12%] Generating 16_dec_decode_ctl.sv +[ 18%] Generating 14_mem_lib.sv [ 25%] Generating 13_ifu_mem_ctl.sv -[ 31%] Generating 14_mem_lib.sv -[ 37%] Generating 15_exu.sv -[ 43%] Generating 16_dec_decode_ctl.sv +[ 31%] Generating 10_lsu_bus_intf.sv +[ 37%] Generating 11_ifu_bp_ctl.sv +[ 43%] Generating 12_beh_lib.sv [ 50%] Generating 1_lsu_stbuf.sv [ 56%] Generating 2_ahb_to_axi4.sv [ 62%] Generating 3_rvjtag_tap.sv [ 68%] Generating 4_dec_tlu_ctl.sv -[ 75%] Generating 5_lsu_bus_buffer.sv -[ 81%] Generating 6_dbg.sv -[ 87%] Generating 7_axi4_to_ahb.sv -[ 93%] Generating 8_ifu_aln_ctl.sv +[ 75%] Generating 6_dbg.sv +[ 81%] Generating 5_lsu_bus_buffer.sv +[ 87%] Generating 8_ifu_aln_ctl.sv +[ 93%] Generating 7_axi4_to_ahb.sv [100%] Generating 9_tb_top.sv [100%] Built target Parse Surelog parsing status: 0 diff --git a/third_party/tests/Google/Google.log b/third_party/tests/Google/Google.log index 8b1c8037f2..cafcee92fa 100644 --- a/third_party/tests/Google/Google.log +++ b/third_party/tests/Google/Google.log @@ -2511,10 +2511,9 @@ Processing: -cd chapter-16 -I../../../UVM/1800.2-2017-1.0/src/ ../../../UVM/1800 [WARNING] : 13 [ NOTE] : 0 Processing: -cd chapter-16 -I../../../UVM/1800.2-2017-1.0/src/ -parse -nonote -noinfo -nouhdm -timescale=1ns/1ns 16.9--sequence-cons-repetition.sv -l 16.9--sequence-cons-repetition.sv.log -[ERR:UH0700] ${SURELOG_DIR}/third_party/tests/Google/chapter-16/16.9--sequence-cons-repetition.sv:23:30: Unsupported expression " u<75> t p<76> c<70> l<23:30> el<23:34>> @(posedge clk) b ##1 a [*2:10] ##1 b;". [ FATAL] : 0 [ SYNTAX] : 0 -[ ERROR] : 1 +[ ERROR] : 0 [WARNING] : 0 [ NOTE] : 0 Processing: -cd chapter-16 -I../../../UVM/1800.2-2017-1.0/src/ ../../../UVM/1800.2-2017-1.0/src//uvm_pkg.sv -parse -nonote -noinfo -nouhdm -timescale=1ns/1ns 16.2--assert-uvm.sv -l 16.2--assert-uvm.sv.log @@ -2783,10 +2782,9 @@ Processing: -cd chapter-16 -I../../../UVM/1800.2-2017-1.0/src/ -parse -nonote - [WARNING] : 0 [ NOTE] : 0 Processing: -cd chapter-16 -I../../../UVM/1800.2-2017-1.0/src/ -parse -nonote -noinfo -nouhdm -timescale=1ns/1ns 16.9--sequence-noncons-repetition.sv -l 16.9--sequence-noncons-repetition.sv.log -[ERR:UH0700] ${SURELOG_DIR}/third_party/tests/Google/chapter-16/16.9--sequence-noncons-repetition.sv:23:30: Unsupported expression " u<75> t p<76> c<70> l<23:30> el<23:34>> @(posedge clk) b ##1 a [=2:10] ##1 b; //should be equal to: b ##1 a ##1 a ##1 a ##1 b". [ FATAL] : 0 [ SYNTAX] : 0 -[ ERROR] : 1 +[ ERROR] : 0 [WARNING] : 0 [ NOTE] : 0 Processing: -cd chapter-16 -I../../../UVM/1800.2-2017-1.0/src/ -parse -nonote -noinfo -nouhdm -timescale=1ns/1ns 16.2--assume0.sv -l 16.2--assume0.sv.log @@ -3175,10 +3173,9 @@ Processing: -cd chapter-16 -I../../../UVM/1800.2-2017-1.0/src/ -parse -nonote - [WARNING] : 0 [ NOTE] : 0 Processing: -cd chapter-16 -I../../../UVM/1800.2-2017-1.0/src/ -parse -nonote -noinfo -nouhdm -timescale=1ns/1ns 16.9--sequence-goto-repetition.sv -l 16.9--sequence-goto-repetition.sv.log -[ERR:UH0700] ${SURELOG_DIR}/third_party/tests/Google/chapter-16/16.9--sequence-goto-repetition.sv:23:31: Unsupported expression " u<75> t p<76> c<70> l<23:31> el<23:35>> @(posedge clk) b ##1 a [->2:10] ##1 b;". [ FATAL] : 0 [ SYNTAX] : 0 -[ ERROR] : 1 +[ ERROR] : 0 [WARNING] : 0 [ NOTE] : 0 Processing: -cd chapter-16 -I../../../UVM/1800.2-2017-1.0/src/ -parse -nonote -noinfo -nouhdm -timescale=1ns/1ns 16.2--assume.sv -l 16.2--assume.sv.log @@ -8846,6 +8843,6 @@ Processing: -cd chapter-25 -I../../../UVM/1800.2-2017-1.0/src/ -parse -nonote - Processed 1134 tests. [ FATAL] : 0 [ SYNTAX] : 39 -[ ERROR] : 150 +[ ERROR] : 147 [WARNING] : 1762 [ NOTE] : 0 diff --git a/third_party/tests/YosysTests/YosysTests.log b/third_party/tests/YosysTests/YosysTests.log index 4f5af0d903..3bcb9ef98f 100644 --- a/third_party/tests/YosysTests/YosysTests.log +++ b/third_party/tests/YosysTests/YosysTests.log @@ -10389,15 +10389,9 @@ Processing: -cd verific/sva nonconsrep.sv -writepp -parse -nocache -nobuiltin -n [WARNING] : 0 [ NOTE] : 0 Processing: -cd verific/sva triggered.sv -writepp -parse -nocache -nobuiltin -nonote -noinfo -timescale=1ns/1ns -l triggered.sv.log -[ERR:UH0700] ${SURELOG_DIR}/third_party/tests/YosysTests/verific/sva/triggered.sv:63:5: Unsupported expression " u<768> t p<769> l<63:5> el<63:8>> A [+] ##1 C;". -[ERR:UH0700] ${SURELOG_DIR}/third_party/tests/YosysTests/verific/sva/triggered.sv:68:11: Unsupported expression " u<810> t p<811> l<68:11> el<68:14>> C ##1 B [+];". -[ERR:UH0700] ${SURELOG_DIR}/third_party/tests/YosysTests/verific/sva/triggered.sv:34:5: Unsupported expression " u<526> t p<527> l<34:5> el<34:8>> A [+] ##1 C;". -[ERR:UH0700] ${SURELOG_DIR}/third_party/tests/YosysTests/verific/sva/triggered.sv:39:11: Unsupported expression " u<568> t p<569> l<39:11> el<39:14>> C ##1 B [+];". -[ERR:UH0700] ${SURELOG_DIR}/third_party/tests/YosysTests/verific/sva/triggered.sv:92:5: Unsupported expression " u<1010> t p<1011> l<92:5> el<92:8>> A [+] ##1 C;". -[ERR:UH0700] ${SURELOG_DIR}/third_party/tests/YosysTests/verific/sva/triggered.sv:97:11: Unsupported expression " u<1052> t p<1053> l<97:11> el<97:14>> C ##1 B [+];". [ FATAL] : 0 [ SYNTAX] : 0 -[ ERROR] : 6 +[ ERROR] : 0 [WARNING] : 0 [ NOTE] : 0 Processing: -cd verific/sva repzero.sv -writepp -parse -nocache -nobuiltin -nonote -noinfo -timescale=1ns/1ns -l repzero.sv.log @@ -10466,6 +10460,6 @@ Processing: -cd regression/issue_01329 synchronizer.sv -writepp -parse -nocache Processed 1309 tests. [ FATAL] : 0 [ SYNTAX] : 61 -[ ERROR] : 44 +[ ERROR] : 38 [WARNING] : 2368 [ NOTE] : 0