Tests: Pass force/release through UVM DPI tests

This commit is contained in:
Wilson Snyder 2026-01-10 04:32:23 -05:00
parent 6de8632c28
commit 8f0e4be643
5 changed files with 11 additions and 44 deletions

View File

@ -163,23 +163,19 @@ module t;
i = uvm_hdl_read("t.exposed", lval);
`checkh(i, 1);
`checkh(lval[31:0], exposed);
`ifdef VERILATOR
// UNSUPPORTED: force/release via VPI
// If support, validate or throw unsupported on force/release part-selects
$display("= uvm_hdl_force");
$display("===\nUVM Report expected on next line:");
i = uvm_hdl_force("t.exposed", 62);
`checkh(i, 0);
`checkh(i, 1);
$display("= uvm_hdl_release");
$display("===\nUVM Report expected on next line:");
i = uvm_hdl_release("t.exposed");
`checkh(i, 0);
`checkh(i, 1);
$display("= uvm_hdl_release_and_read");
$display("===\nUVM Report expected on next line:");
i = uvm_hdl_release_and_read("t.exposed", lval);
`checkh(i, 0);
`checkh(i, 1);
$display("= uvm_hdl_force to not exposed (bad)");
$display("===\nUVM Report expected on next line:");
@ -190,7 +186,6 @@ module t;
$display("===\nUVM Report expected on next line:");
i = uvm_hdl_force("t.exposed_not_forceable", 12);
`checkh(i, 0);
`endif
$write("*-* All Finished *-*\n");
$finish;

View File

@ -28,23 +28,16 @@ UVM Report expected on next line:
UVM Report ../../t/uvm/v2017_1_0/dpi/uvm_hdl_verilator.c:54: UVM/DPI/HDL_SET set: unable to locate hdl path (t.not_exposed)
Either the name is incorrect, or you may not have PLI/ACC visibility to that name
= uvm_hdl_force
===
UVM Report expected on next line:
UVM Report ../../t/uvm/v2017_1_0/dpi/uvm_hdl_verilator.c:54: UVM/DPI/VLOG_GET Unsupported: uvh_hdl_force/uvm_hdl_release on hdl path 't.exposed'
= uvm_hdl_release
===
UVM Report expected on next line:
UVM Report ../../t/uvm/v2017_1_0/dpi/uvm_hdl_verilator.c:54: UVM/DPI/VLOG_GET Unsupported: uvh_hdl_force/uvm_hdl_release on hdl path 't.exposed'
= uvm_hdl_release_and_read
===
UVM Report expected on next line:
UVM Report ../../t/uvm/v2017_1_0/dpi/uvm_hdl_verilator.c:54: UVM/DPI/VLOG_GET Unsupported: uvh_hdl_force/uvm_hdl_release on hdl path 't.exposed'
= uvm_hdl_force to not exposed (bad)
===
UVM Report expected on next line:
UVM Report ../../t/uvm/v2017_1_0/dpi/uvm_hdl_verilator.c:54: UVM/DPI/VLOG_GET Unsupported: uvh_hdl_force/uvm_hdl_release on hdl path 't.not_exposed'
UVM Report ../../t/uvm/v2017_1_0/dpi/uvm_hdl_verilator.c:54: UVM/DPI/HDL_SET set: unable to locate hdl path (t.not_exposed)
Either the name is incorrect, or you may not have PLI/ACC visibility to that name
= uvm_hdl_force to not forcable (bad)
===
UVM Report expected on next line:
UVM Report ../../t/uvm/v2017_1_0/dpi/uvm_hdl_verilator.c:54: UVM/DPI/VLOG_GET Unsupported: uvh_hdl_force/uvm_hdl_release on hdl path 't.exposed_not_forceable'
UVM Report ../../t/uvm/v2017_1_0/dpi/uvm_hdl_verilator.c:54: UVM/DPI/HDL_SET set: unable to locate hdl path (t.exposed_not_forceable)
Either the name is incorrect, or you may not have PLI/ACC visibility to that name
*-* All Finished *-*

View File

@ -28,23 +28,16 @@ UVM Report expected on next line:
UVM Report ../../t/uvm/v2020_3_1/dpi/uvm_hdl_verilator.c:54: UVM/DPI/HDL_SET set: unable to locate hdl path (t.not_exposed)
Either the name is incorrect, or you may not have PLI/ACC visibility to that name
= uvm_hdl_force
===
UVM Report expected on next line:
UVM Report ../../t/uvm/v2020_3_1/dpi/uvm_hdl_verilator.c:54: UVM/DPI/VLOG_GET Unsupported: uvh_hdl_force/uvm_hdl_release on hdl path 't.exposed'
= uvm_hdl_release
===
UVM Report expected on next line:
UVM Report ../../t/uvm/v2020_3_1/dpi/uvm_hdl_verilator.c:54: UVM/DPI/VLOG_GET Unsupported: uvh_hdl_force/uvm_hdl_release on hdl path 't.exposed'
= uvm_hdl_release_and_read
===
UVM Report expected on next line:
UVM Report ../../t/uvm/v2020_3_1/dpi/uvm_hdl_verilator.c:54: UVM/DPI/VLOG_GET Unsupported: uvh_hdl_force/uvm_hdl_release on hdl path 't.exposed'
= uvm_hdl_force to not exposed (bad)
===
UVM Report expected on next line:
UVM Report ../../t/uvm/v2020_3_1/dpi/uvm_hdl_verilator.c:54: UVM/DPI/VLOG_GET Unsupported: uvh_hdl_force/uvm_hdl_release on hdl path 't.not_exposed'
UVM Report ../../t/uvm/v2020_3_1/dpi/uvm_hdl_verilator.c:54: UVM/DPI/HDL_SET set: unable to locate hdl path (t.not_exposed)
Either the name is incorrect, or you may not have PLI/ACC visibility to that name
= uvm_hdl_force to not forcable (bad)
===
UVM Report expected on next line:
UVM Report ../../t/uvm/v2020_3_1/dpi/uvm_hdl_verilator.c:54: UVM/DPI/VLOG_GET Unsupported: uvh_hdl_force/uvm_hdl_release on hdl path 't.exposed_not_forceable'
UVM Report ../../t/uvm/v2020_3_1/dpi/uvm_hdl_verilator.c:54: UVM/DPI/HDL_SET set: unable to locate hdl path (t.exposed_not_forceable)
Either the name is incorrect, or you may not have PLI/ACC visibility to that name
*-* All Finished *-*

View File

@ -184,13 +184,6 @@ static int uvm_hdl_set_vlog(char *path, p_vpi_vecval value, PLI_INT32 flag) {
int size;
static int s_maxsize = -1;
if (flag == vpiForceFlag || flag == vpiReleaseFlag) {
// It appears other simulator interfaces likewise don't support this
m_uvm_error("UVM/DPI/VLOG_GET", "Unsupported: uvh_hdl_force/uvm_hdl_release on hdl path '%s'",
path);
return 0;
}
r = uvm_hdl_handle_by_name_partsel(path, &is_partsel, &hi, &lo);
if (r == 0) {
m_uvm_error("UVM/DPI/HDL_SET",

View File

@ -184,13 +184,6 @@ static int uvm_hdl_set_vlog(char *path, p_vpi_vecval value, PLI_INT32 flag) {
int size;
static int s_maxsize = -1;
if (flag == vpiForceFlag || flag == vpiReleaseFlag) {
// It appears other simulator interfaces likewise don't support this
m_uvm_error("UVM/DPI/VLOG_GET", "Unsupported: uvh_hdl_force/uvm_hdl_release on hdl path '%s'",
path);
return 0;
}
r = uvm_hdl_handle_by_name_partsel(path, &is_partsel, &hi, &lo);
if (r == 0) {
m_uvm_error("UVM/DPI/HDL_SET",