Skip to content

Commit

Permalink
Merge pull request #3952 from alainmarcel/alainmarcel-patch-1
Browse files Browse the repository at this point in the history
implicit decimal parameter
  • Loading branch information
alaindargelas authored Jan 11, 2024
2 parents fabafd1 + 8e1e973 commit f687293
Show file tree
Hide file tree
Showing 11 changed files with 42,576 additions and 18 deletions.
9 changes: 6 additions & 3 deletions src/DesignCompile/CompileHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3732,7 +3732,9 @@ bool CompileHelper::compileParameterDeclaration(
param->Typespec()->Actual_typespec(ts);
break;
}
case vpiDecConst:
case vpiDecConst: {
break;
}
case vpiIntConst: {
int_typespec* its = s.MakeInt_typespec();
its->VpiSigned(false);
Expand Down Expand Up @@ -3898,8 +3900,9 @@ UHDM::constant* CompileHelper::adjustSize(const UHDM::typespec* ts,
c->VpiLineNo(), sizeMode);

int32_t size = orig_size;
if (!invalidValue) size = sizetmp;

if (c->VpiConstType() != vpiDecConst) {
if (!invalidValue) size = sizetmp;
}
bool signedLhs = false;
if (ts->UhdmType() == uhdmint_typespec) {
int_typespec* its = (int_typespec*)ts;
Expand Down
41,683 changes: 41,683 additions & 0 deletions tests/DecimalSize/DecimalSize.log

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions tests/DecimalSize/DecimalSize.sl
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-parse -d uhdm -d coveruhdm -elabuhdm -d ast dut.sv -nobuiltin
Loading

0 comments on commit f687293

Please sign in to comment.