aboutsummaryrefslogtreecommitdiffstats
path: root/src/grt/grt-vpi.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2016-06-22 20:53:13 +0200
committerTristan Gingold <tgingold@free.fr>2016-06-22 21:07:30 +0200
commit1e5de3c73a5865cc0df2ee32d1d81c9718c5f44f (patch)
tree64a0655d941e335a3ff040ba81f5491173680530 /src/grt/grt-vpi.adb
parent7f9077d0c40b7fe381b3c6278e15ccb9245c909b (diff)
downloadghdl-1e5de3c73a5865cc0df2ee32d1d81c9718c5f44f.tar.gz
ghdl-1e5de3c73a5865cc0df2ee32d1d81c9718c5f44f.tar.bz2
ghdl-1e5de3c73a5865cc0df2ee32d1d81c9718c5f44f.zip
grt: add grt-strings, use case insensitive compare for vpi_handle_by_name
Fixes potentialventures/cocotb#460
Diffstat (limited to 'src/grt/grt-vpi.adb')
-rw-r--r--src/grt/grt-vpi.adb19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/grt/grt-vpi.adb b/src/grt/grt-vpi.adb
index 90c75ef93..1a2af50d7 100644
--- a/src/grt/grt-vpi.adb
+++ b/src/grt/grt-vpi.adb
@@ -45,6 +45,7 @@ with Grt.Stdio; use Grt.Stdio;
with Grt.C; use Grt.C;
with Grt.Signals; use Grt.Signals;
with Grt.Astdio; use Grt.Astdio;
+with Grt.Strings; use Grt.Strings;
with Grt.Hooks; use Grt.Hooks;
with Grt.Options;
with Grt.Vcd; use Grt.Vcd;
@@ -1323,7 +1324,7 @@ package body Grt.Vpi is
-- NUL not allowed in L.
return False;
end if;
- if L (I) /= R (I - L'First + 1) then
+ if To_Lower (L (I)) /= R (I - L'First + 1) then
return False;
end if;
end loop;
@@ -1353,7 +1354,7 @@ package body Grt.Vpi is
exit when Err /= AvhpiErrorOk;
El_Name := Avhpi_Get_Base_Name (Res);
- exit when Strcmp (Name , El_Name);
+ exit when Strcmp (Name, El_Name);
end loop;
end Find_By_Name;
@@ -1561,11 +1562,17 @@ package body Grt.Vpi is
return Err_Status;
end vpi_chk_error;
- function vpi_control (Op : Integer; Status : Integer) return Integer
- is
- pragma Unreferenced (Status);
+ function vpi_control (Op : Integer; Status : Integer) return Integer is
begin
- Vpi_Trace ("vpi_control");
+ if Flag_Trace then
+ Trace_Start ("vpi_control (");
+ Trace (Op);
+ Trace (", ");
+ Trace (Status);
+ Trace (")");
+ Trace_Newline;
+ end if;
+
case Op is
when vpiFinish
| vpiStop =>