Skip to content

Commit

Permalink
Fix unsupported expressions
Browse files Browse the repository at this point in the history
  • Loading branch information
alaindargelas committed Oct 4, 2023
1 parent b41ced0 commit 164b6ee
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 29 deletions.
26 changes: 22 additions & 4 deletions src/DesignCompile/CompileExpression.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 ||
Expand Down Expand Up @@ -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();
Expand Down
20 changes: 10 additions & 10 deletions third_party/tests/CoresSweRVMP/CoresSweRVMP.log
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 4 additions & 7 deletions third_party/tests/Google/Google.log
Original file line number Diff line number Diff line change
Expand Up @@ -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 "<n<> u<75> t<Cycle_delay_const_range_expression> 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
Expand Down Expand Up @@ -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 "<n<> u<75> t<Cycle_delay_const_range_expression> 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
Expand Down Expand Up @@ -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 "<n<> u<75> t<Cycle_delay_const_range_expression> 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
Expand Down Expand Up @@ -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
10 changes: 2 additions & 8 deletions third_party/tests/YosysTests/YosysTests.log
Original file line number Diff line number Diff line change
Expand Up @@ -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 "<n<> u<768> t<Consecutive_repetition> 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 "<n<> u<810> t<Consecutive_repetition> 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 "<n<> u<526> t<Consecutive_repetition> 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 "<n<> u<568> t<Consecutive_repetition> 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 "<n<> u<1010> t<Consecutive_repetition> 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 "<n<> u<1052> t<Consecutive_repetition> 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
Expand Down Expand Up @@ -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

0 comments on commit 164b6ee

Please sign in to comment.