From 9b432ba172317bca58c1752dcd6ef33f060f9b58 Mon Sep 17 00:00:00 2001 From: Stephen Williams Date: Mon, 18 Jan 2021 12:39:54 -0800 Subject: [PATCH] Implement vpiSize method for stack string values. This might come to pass for example when calling the function $ivl_string_method$len() where the expression is calculated, and not simply a variable name. --- vvp/vpi_vthr_vector.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vvp/vpi_vthr_vector.cc b/vvp/vpi_vthr_vector.cc index 232b24a2c..57ece0e5d 100644 --- a/vvp/vpi_vthr_vector.cc +++ b/vvp/vpi_vthr_vector.cc @@ -247,6 +247,8 @@ int __vpiVThrStrStack::vpi_get(int code) case _vpiFromThr: return _vpiString; #endif + case vpiSize: + return vthread_get_str_stack(vpip_current_vthread, depth_).size(); default: return 0; }