Fix VPI signal range order (#6189) (#6200)

This commit is contained in:
Ibrahim Burak Yorulmaz
2025-07-19 20:22:02 -04:00
committed by GitHub
parent 7d43a935bd
commit 9d146eae16
3 changed files with 21 additions and 2 deletions
+1
View File
@@ -84,6 +84,7 @@ Huang Rui
Huanghuang Zhou
HungMingWu
HyungKi Jeong
Ibrahim Burak Yorulmaz
Igor Zaworski
Ilya Barkov
Iru Cai
+2 -2
View File
@@ -964,9 +964,9 @@ void EmitCSyms::emitSymImp() {
} else {
if (basicp->isRanged()) {
bounds += " ,";
bounds += cvtToStr(basicp->hi());
bounds += cvtToStr(basicp->left());
bounds += ",";
bounds += cvtToStr(basicp->lo());
bounds += cvtToStr(basicp->right());
pdim++;
}
break; // AstBasicDType - nothing below, 1
+18
View File
@@ -360,6 +360,24 @@ int _mon_check_var() {
p = vpi_get_str(vpiType, vh10);
CHECK_RESULT_CSTR(p, "vpiConstant");
}
TestVpiHandle vh6 = vpi_handle_by_index(vh5, 2);
CHECK_RESULT_NZ(vh6);
{
TestVpiHandle vh10 = vpi_handle(vpiLeftRange, vh6);
CHECK_RESULT_NZ(vh10);
vpi_get_value(vh10, &tmpValue);
CHECK_RESULT(tmpValue.value.integer, 0);
p = vpi_get_str(vpiType, vh10);
CHECK_RESULT_CSTR(p, "vpiConstant");
}
{
TestVpiHandle vh10 = vpi_handle(vpiRightRange, vh6);
CHECK_RESULT_NZ(vh10);
vpi_get_value(vh10, &tmpValue);
CHECK_RESULT(tmpValue.value.integer, 61);
p = vpi_get_str(vpiType, vh10);
CHECK_RESULT_CSTR(p, "vpiConstant");
}
// C++ keyword collision
{