-- GHDL Run Time (GRT) - misc subprograms. -- Copyright (C) 2002 - 2014 Tristan Gingold -- -- GHDL is free software; you can redistribute it and/or modify it under -- the terms of the GNU General Public License as published by the Free -- Software Foundation; either version 2, or (at your option) any later -- version. -- -- GHDL is distributed in the hope that it will be useful, but WITHOUT ANY -- WARRANTY; without even the implied warranty of MERCHANTABILITY or -- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- for more details. -- -- You should have received a copy of the GNU General Public License -- along with GCC; see the file COPYING. If not, write to the Free -- Software Foundation, 59 Temple Place - Suite 330, Boston, MA -- 02111-1307, USA. -- -- As a special exception, if other files instantiate generics from this -- unit, or you link this unit with other files to produce an executable, -- this unit does not by itself cause the resulting executable to be -- covered by the GNU General Public License. This exception does not -- however invalidate any other reasons why the executable file might be -- covered by the GNU Public License. with Interfaces; with Grt.Errors; use Grt.Errors; with Grt.Options; with Grt.Fcvt; package body Grt.Lib is --procedure Memcpy (Dst : Address; Src : Address; Size : Size_T); --pragma Import (C, Memcpy); procedure Ghdl_Memcpy (Dest : Ghdl_Ptr; Src : Ghdl_Ptr; Size : Ghdl_Index_Type) is procedure Memmove (Dest : Ghdl_Ptr; Src : Ghdl_Ptr; Size : Ghdl_Index_Type); pragma Import (C, Memmove); begin Memmove (Dest, Src, Size); end Ghdl_Memcpy; procedure Do_Report (Msg : String; Str : Std_String_Ptr; Default_Str : String; Severity : Integer; Loc : Ghdl_Location_Ptr) is Level : constant Integer := Severity mod 256; Bt : Backtrace_Addrs; begin Report_H; Report_C (Loc.Filename); Report_C (":"); Report_C (Loc.Line); Report_C (":"); Report_C (Loc.Col); Report_C (":@"); Report_Now_C; Report_C (":("); Report_C (Msg); Report_C (" "); case Level is when Note_Severity => Report_C ("note"); when Warning_Severity => Report_C ("warning"); when Error_Severity => Report_C ("error"); when Failure_Severity => Report_C ("failure"); when others => Report_C ("???"); end case; Report_C ("): "); if Str /= null then Report_E (Str); else Report_E (Default_Str); end if; if Level >= Grt.Options.Severity_Level then Save_Backtrace (Bt, 2); Error_C (Msg); Error_C (" failed"); Error_E_Call_Stack (Bt); end if; end Do_Report; procedure Ghdl_Assert_Failed (Str : Std_String_Ptr; Severity : Integer; Loc : Ghdl_Location_Ptr) is begin Do_Report ("assertion", Str, "Assertion violation", Severity, Loc); end Ghdl_Assert_Failed; procedure Ghdl_Ieee_Assert_Failed (Str : Std_String_Ptr; Severity : Integer; Loc : Ghdl_Location_Ptr)
OBJS += techlibs/easic/synth_easic.o