From 39d357cdff5f78e3727db50b40b259d033670d7f Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Sun, 25 Feb 2018 08:28:01 +0100 Subject: vpi/force signals: ensure value propagation. Fix #531 --- src/grt/grt-vpi.adb | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'src/grt/grt-vpi.adb') diff --git a/src/grt/grt-vpi.adb b/src/grt/grt-vpi.adb index f5c183128..6b69d68c3 100644 --- a/src/grt/grt-vpi.adb +++ b/src/grt/grt-vpi.adb @@ -924,10 +924,9 @@ package body Grt.Vpi is Ghdl_B1 (Vec (J) = '1' or Vec (J) = 'H'); begin case Info.Val is - when Vcd_Effective => - Ghdl_Signal_Force_Effective_B1 - (To_Signal_Arr_Ptr (Info.Ptr)(J), V); - when Vcd_Driving => + when Vcd_Effective | Vcd_Driving => + -- Force_Driving sets both the driving and the + -- effective value. Ghdl_Signal_Force_Driving_B1 (To_Signal_Arr_Ptr (Info.Ptr)(J), V); when Vcd_Variable => @@ -942,10 +941,9 @@ package body Grt.Vpi is V : constant Ghdl_E8 := Std_Ulogic'Pos (Vec (J)); begin case Info.Val is - when Vcd_Effective => - Ghdl_Signal_Force_Effective_E8 - (To_Signal_Arr_Ptr (Info.Ptr)(J), V); - when Vcd_Driving => + when Vcd_Effective | Vcd_Driving => + -- Force_Driving sets both the driving and the + -- effective value. Ghdl_Signal_Force_Driving_E8 (To_Signal_Arr_Ptr (Info.Ptr)(J), V); when Vcd_Variable => -- cgit v1.2.3