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

This commit is contained in:
Ibrahim Burak Yorulmaz 2025-07-20 02:22:02 +02:00 committed by GitHub
parent 7d43a935bd
commit 9d146eae16
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 21 additions and 2 deletions

View File

@ -84,6 +84,7 @@ Huang Rui
Huanghuang Zhou
HungMingWu
HyungKi Jeong
Ibrahim Burak Yorulmaz
Igor Zaworski
Ilya Barkov
Iru Cai

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

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
{