diff --git a/nodist/invoke_vcs b/nodist/invoke_vcs index ec563103f..b3ee1d47c 100755 --- a/nodist/invoke_vcs +++ b/nodist/invoke_vcs @@ -8,7 +8,7 @@ use strict; #====================================================================== # main -eval `modulecmd perl add synopsys-vcs`; +eval `modulecmd perl add synopsys-vcs_mx`; exec('vcs',@ARGV); ####################################################################### diff --git a/src/V3Width.cpp b/src/V3Width.cpp index 4c10be815..9434c7486 100644 --- a/src/V3Width.cpp +++ b/src/V3Width.cpp @@ -2231,14 +2231,14 @@ private: } AstNodeBiop* iterate_shift_final(AstNodeBiop* nodep, AstNUser* vup) { // Nodep maybe edited - if (vup->c()->prelim()) { + if (vup->c()->final()) { // ShiftRS converts to ShiftR, but not vice-versa if (nodep->castShiftRS()) { if (AstNodeBiop* newp=replaceWithUOrSVersion(nodep, nodep->isSigned())) { nodep=NULL; nodep = newp; // Process new node instead } } - AstNodeDType* expDTypep = nodep->dtypep(); + AstNodeDType* expDTypep = vup->c()->dtypeOverridep(nodep->dtypep()); AstNodeDType* subDTypep = expDTypep; nodep->dtypeFrom(expDTypep); iterateCheck(nodep,"LHS",nodep->lhsp(),CONTEXT,FINAL,subDTypep,EXTEND_EXP); diff --git a/test_regress/t/t_math_signed4.v b/test_regress/t/t_math_signed4.v index 9f9bb3fd7..fc70fc6c9 100644 --- a/test_regress/t/t_math_signed4.v +++ b/test_regress/t/t_math_signed4.v @@ -91,6 +91,12 @@ module t (/*AUTOARG*/); w4_u = 5'b10000 / 5'b00100; `checkh(w4_u, 4'b0100); + // bug754 + w5_u = 4'sb0010 << -2'sd1; // << 3 + `checkh(w5_u, 5'b10000); // VCS E-2014.03 bug + w5_u = 4'sb1000 << 0; // Sign extends + `checkh(w5_u, 5'b11000); + // Reals do not propagate to children r = 1.0 + ( 1 + (1 / 2)); `checkf(r, 2.0);