hexsha
stringlengths
40
40
size
int64
3
1.05M
ext
stringclasses
163 values
lang
stringclasses
53 values
max_stars_repo_path
stringlengths
3
945
max_stars_repo_name
stringlengths
4
112
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
sequencelengths
1
10
max_stars_count
float64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
3
945
max_issues_repo_name
stringlengths
4
113
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
sequencelengths
1
10
max_issues_count
float64
1
116k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
3
945
max_forks_repo_name
stringlengths
4
113
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
sequencelengths
1
10
max_forks_count
float64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
3
1.05M
avg_line_length
float64
1
966k
max_line_length
int64
1
977k
alphanum_fraction
float64
0
1
39a5a3a2d3edcae97c9320cb62f9c0477db32d40
14,042
adb
Ada
src/natools-s_expressions-templates-dates.adb
faelys/natools
947c004e6f69ca144942c6af40e102d089223cf8
[ "0BSD" ]
null
null
null
src/natools-s_expressions-templates-dates.adb
faelys/natools
947c004e6f69ca144942c6af40e102d089223cf8
[ "0BSD" ]
null
null
null
src/natools-s_expressions-templates-dates.adb
faelys/natools
947c004e6f69ca144942c6af40e102d089223cf8
[ "0BSD" ]
null
null
null
------------------------------------------------------------------------------ -- Copyright (c) 2014-2015, Natacha Porté -- -- -- -- Permission to use, copy, modify, and distribute this software for any -- -- purpose with or without fee is hereby granted, provided that the above -- -- copyright notice and this permission notice appear in all copies. -- -- -- -- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -- -- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -- -- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -- -- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -- -- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -- -- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -- -- OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -- ------------------------------------------------------------------------------ with Natools.S_Expressions.Interpreter_Loop; with Natools.S_Expressions.Templates.Generic_Discrete_Render; with Natools.S_Expressions.Templates.Integers; with Natools.Static_Maps.S_Expressions.Templates.Dates; with Natools.Time_IO.RFC_3339; package body Natools.S_Expressions.Templates.Dates is package Commands renames Natools.Static_Maps.S_Expressions.Templates.Dates; procedure Render_Day_Of_Week is new Natools.S_Expressions.Templates.Generic_Discrete_Render (Ada.Calendar.Formatting.Day_Name, Ada.Calendar.Formatting.Day_Name'Image, Ada.Calendar.Formatting."="); procedure Append (Output : in out Ada.Streams.Root_Stream_Type'Class; Value : in Split_Time; Data : in Atom); procedure Execute (Output : in out Ada.Streams.Root_Stream_Type'Class; Value : in Split_Time; Name : in Atom; Arguments : in out Lockable.Descriptor'Class); function Two_Digit_Image (Value : Integer) return Atom is ((1 => Character'Pos ('0') + Octet (Value / 10), 2 => Character'Pos ('0') + Octet (Value mod 10))) with Pre => Value in 0 .. 99; function Four_Digit_Image (Value : Integer) return Atom is ((1 => Character'Pos ('0') + Octet (Value / 1000), 2 => Character'Pos ('0') + Octet ((Value / 100) mod 10), 3 => Character'Pos ('0') + Octet ((Value / 10) mod 10), 4 => Character'Pos ('0') + Octet (Value mod 10))) with Pre => Value in 0 .. 9999; function Parse_Time_Offset (Image : in String; Date : in Ada.Calendar.Time) return Ada.Calendar.Time_Zones.Time_Offset; procedure Render_Triplet (Output : in out Ada.Streams.Root_Stream_Type'Class; Part_1, Part_2, Part_3 : in Atom; Template : in out Lockable.Descriptor'Class); procedure Interpreter is new Interpreter_Loop (Ada.Streams.Root_Stream_Type'Class, Split_Time, Execute, Append); ------------------------------ -- Local Helper Subprograms -- ------------------------------ function Parse_Time_Offset (Image : in String; Date : in Ada.Calendar.Time) return Ada.Calendar.Time_Zones.Time_Offset is function Value (C : Character) return Ada.Calendar.Time_Zones.Time_Offset; function Value (C : Character) return Ada.Calendar.Time_Zones.Time_Offset is begin if C in '0' .. '9' then return Ada.Calendar.Time_Zones.Time_Offset (Character'Pos (C) - Character'Pos ('0')); else raise Constraint_Error with "Unknown time offset format"; end if; end Value; begin if Image = "system" then return Ada.Calendar.Time_Zones.UTC_Time_Offset (Date); end if; Abbreviation : begin return Ada.Calendar.Time_Zones.Time_Offset (Static_Maps.S_Expressions.Templates.Dates.To_Time_Offset (Image)); exception when Constraint_Error => null; end Abbreviation; Numeric : declare use type Ada.Calendar.Time_Zones.Time_Offset; First : Integer := Image'First; Length : Natural := Image'Length; V : Ada.Calendar.Time_Zones.Time_Offset; Negative : Boolean := False; begin if First in Image'Range and then Image (First) in '-' | '+' then Negative := Image (First) = '-'; First := First + 1; Length := Length - 1; end if; case Length is when 1 => V := Value (Image (First)) * 60; when 2 => V := Value (Image (First)) * 600 + Value (Image (First + 1)) * 60; when 4 => V := Value (Image (First)) * 600 + Value (Image (First + 1)) * 60 + Value (Image (First + 2)) * 10 + Value (Image (First + 3)); when 5 => if Image (First + 2) in '0' .. '9' then raise Constraint_Error with "Unknown time offset format"; end if; V := Value (Image (First)) * 600 + Value (Image (First + 1)) * 60 + Value (Image (First + 3)) * 10 + Value (Image (First + 4)); when others => raise Constraint_Error with "Unknown time offset format"; end case; if Negative then return -V; else return V; end if; end Numeric; end Parse_Time_Offset; procedure Render_Triplet (Output : in out Ada.Streams.Root_Stream_Type'Class; Part_1, Part_2, Part_3 : in Atom; Template : in out Lockable.Descriptor'Class) is begin Output.Write (Part_1); if Template.Current_Event = Events.Add_Atom then declare Separator : constant Atom := Template.Current_Atom; Event : Events.Event; begin Template.Next (Event); Output.Write (Separator); Output.Write (Part_2); if Event = Events.Add_Atom then Output.Write (Template.Current_Atom); else Output.Write (Separator); end if; end; else Output.Write (Part_2); end if; Output.Write (Part_3); end Render_Triplet; ---------------------------- -- Interpreter Components -- ---------------------------- procedure Append (Output : in out Ada.Streams.Root_Stream_Type'Class; Value : in Split_Time; Data : in Atom) is pragma Unreferenced (Value); begin Output.Write (Data); end Append; procedure Execute (Output : in out Ada.Streams.Root_Stream_Type'Class; Value : in Split_Time; Name : in Atom; Arguments : in out Lockable.Descriptor'Class) is Format : Integers.Format; begin case Commands.Main (To_String (Name)) is when Commands.Error => null; when Commands.Big_Endian_Date => Render_Triplet (Output, Four_Digit_Image (Value.Year), Two_Digit_Image (Value.Month), Two_Digit_Image (Value.Day), Arguments); when Commands.Big_Endian_Time => Render_Triplet (Output, Two_Digit_Image (Value.Hour), Two_Digit_Image (Value.Minute), Two_Digit_Image (Value.Second), Arguments); when Commands.Day => Format.Set_Image (0, Null_Atom); Integers.Render (Output, Format, Arguments, Value.Day); when Commands.Day_Of_Week => Render_Day_Of_Week (Output, Arguments, Value.Day_Of_Week); when Commands.Hour => Format.Set_Image (-1, Null_Atom); Integers.Render (Output, Format, Arguments, Value.Hour); when Commands.Little_Endian_Date => Render_Triplet (Output, Two_Digit_Image (Value.Day), Two_Digit_Image (Value.Month), Four_Digit_Image (Value.Year), Arguments); when Commands.Little_Endian_Time => Render_Triplet (Output, Two_Digit_Image (Value.Second), Two_Digit_Image (Value.Minute), Two_Digit_Image (Value.Hour), Arguments); when Commands.Minute => Format.Set_Image (-1, Null_Atom); Integers.Render (Output, Format, Arguments, Value.Minute); when Commands.Month => Format.Set_Image (0, Null_Atom); Integers.Render (Output, Format, Arguments, Value.Month); when Commands.Padded_Day => Format.Set_Image (0, Null_Atom); Format.Set_Minimum_Width (2); Format.Set_Left_Padding ((1 => Character'Pos ('0'))); Format.Set_Align (Integers.Right_Aligned); Integers.Render (Output, Format, Arguments, Value.Day); when Commands.Padded_Hour => Format.Set_Image (-1, Null_Atom); Format.Set_Minimum_Width (2); Format.Set_Left_Padding ((1 => Character'Pos ('0'))); Format.Set_Align (Integers.Right_Aligned); Integers.Render (Output, Format, Arguments, Value.Hour); when Commands.Padded_Minute => Format.Set_Image (-1, Null_Atom); Format.Set_Minimum_Width (2); Format.Set_Left_Padding ((1 => Character'Pos ('0'))); Format.Set_Align (Integers.Right_Aligned); Integers.Render (Output, Format, Arguments, Value.Minute); when Commands.Padded_Month => Format.Set_Image (0, Null_Atom); Format.Set_Minimum_Width (2); Format.Set_Left_Padding ((1 => Character'Pos ('0'))); Format.Set_Align (Integers.Right_Aligned); Integers.Render (Output, Format, Arguments, Value.Month); when Commands.Padded_Second => Format.Set_Image (-1, Null_Atom); Format.Set_Minimum_Width (2); Format.Set_Left_Padding ((1 => Character'Pos ('0'))); Format.Set_Align (Integers.Right_Aligned); Integers.Render (Output, Format, Arguments, Value.Second); when Commands.RFC_3339 => Output.Write (To_Atom (Time_IO.RFC_3339.Image (Value.Source, Value.Time_Zone))); when Commands.Second => Format.Set_Image (-1, Null_Atom); Integers.Render (Output, Format, Arguments, Value.Second); when Commands.With_Offset => if Arguments.Current_Event = Events.Add_Atom then declare use type Ada.Calendar.Time_Zones.Time_Offset; New_Offset : Ada.Calendar.Time_Zones.Time_Offset; begin begin New_Offset := Parse_Time_Offset (S_Expressions.To_String (Arguments.Current_Atom), Value.Source); exception when Constraint_Error => return; end; Arguments.Next; if New_Offset = Value.Time_Zone then Interpreter (Arguments, Output, Value); else Render (Output, Arguments, Value.Source, New_Offset); end if; end; end if; when Commands.Year => Integers.Render (Output, Arguments, Value.Year); end case; end Execute; ---------------------- -- Public Interface -- ---------------------- function Split (Value : Ada.Calendar.Time; Time_Zone : Ada.Calendar.Time_Zones.Time_Offset) return Split_Time is use type Ada.Calendar.Time_Zones.Time_Offset; Zone_Offset : constant Ada.Calendar.Time_Zones.Time_Offset := Time_Zone - Ada.Calendar.Time_Zones.UTC_Time_Offset (Value); Year : Ada.Calendar.Year_Number; Month : Ada.Calendar.Month_Number; Day : Ada.Calendar.Day_Number; Hour : Ada.Calendar.Formatting.Hour_Number; Minute : Ada.Calendar.Formatting.Minute_Number; Second : Ada.Calendar.Formatting.Second_Number; Sub_Second : Ada.Calendar.Formatting.Second_Duration; begin Ada.Calendar.Formatting.Split (Value, Year, Month, Day, Hour, Minute, Second, Sub_Second, Time_Zone); return Split_Time' (Source => Value, Time_Zone => Time_Zone, Year => Year, Month => Month, Day => Day, Day_Of_Week => Ada.Calendar.Formatting.Day_Of_Week (Ada.Calendar."+" (Value, 60 * Duration (Zone_Offset))), Hour => Hour, Minute => Minute, Second => Second, Sub_Second => Sub_Second); end Split; procedure Render (Output : in out Ada.Streams.Root_Stream_Type'Class; Template : in out Lockable.Descriptor'Class; Value : in Ada.Calendar.Time) is begin Render (Output, Template, Value, Ada.Calendar.Time_Zones.UTC_Time_Offset (Value)); end Render; procedure Render (Output : in out Ada.Streams.Root_Stream_Type'Class; Template : in out Lockable.Descriptor'Class; Value : in Ada.Calendar.Time; Time_Zone : Ada.Calendar.Time_Zones.Time_Offset) is begin Render (Output, Template, Split (Value, Time_Zone)); end Render; procedure Render (Output : in out Ada.Streams.Root_Stream_Type'Class; Template : in out Lockable.Descriptor'Class; Value : in Split_Time) is begin Interpreter (Template, Output, Value); end Render; end Natools.S_Expressions.Templates.Dates;
33.673861
78
0.567868
39ec85a362fb826e2126d14d045fcdcda76aaeee
555
ada
Ada
Task/Pascals-triangle/Ada/pascals-triangle-2.ada
mullikine/RosettaCodeData
4f0027c6ce83daa36118ee8b67915a13cd23ab67
[ "Info-ZIP" ]
1
2018-11-09T22:08:38.000Z
2018-11-09T22:08:38.000Z
Task/Pascals-triangle/Ada/pascals-triangle-2.ada
mullikine/RosettaCodeData
4f0027c6ce83daa36118ee8b67915a13cd23ab67
[ "Info-ZIP" ]
null
null
null
Task/Pascals-triangle/Ada/pascals-triangle-2.ada
mullikine/RosettaCodeData
4f0027c6ce83daa36118ee8b67915a13cd23ab67
[ "Info-ZIP" ]
1
2018-11-09T22:08:40.000Z
2018-11-09T22:08:40.000Z
package body Pascal is function First_Row(Max_Length: Positive) return Row is R: Row(0 .. Max_Length) := (0 | 1 => 1, others => 0); begin return R; end First_Row; function Next_Row(R: Row) return Row is S: Row(R'Range); begin S(0) := Length(R)+1; S(Length(S)) := 1; for J in reverse 2 .. Length(R) loop S(J) := R(J)+R(J-1); end loop; S(1) := 1; return S; end Next_Row; function Length(R: Row) return Positive is begin return R(0); end Length; end Pascal;
20.555556
59
0.547748
20e44d97c32c579f98013ba8ddffffa8be7b0b15
8,182
ads
Ada
source/amf/uml/amf-uml.ads
svn2github/matreshka
9d222b3ad9da508855fb1f5adbe5e8a4fad4c530
[ "BSD-3-Clause" ]
24
2016-11-29T06:59:41.000Z
2021-08-30T11:55:16.000Z
source/amf/uml/amf-uml.ads
svn2github/matreshka
9d222b3ad9da508855fb1f5adbe5e8a4fad4c530
[ "BSD-3-Clause" ]
2
2019-01-16T05:15:20.000Z
2019-02-03T10:03:32.000Z
source/amf/uml/amf-uml.ads
svn2github/matreshka
9d222b3ad9da508855fb1f5adbe5e8a4fad4c530
[ "BSD-3-Clause" ]
4
2017-07-18T07:11:05.000Z
2020-06-21T03:02:25.000Z
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Ada Modeling Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2011-2012, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ package AMF.UML is pragma Preelaborate; type UML_Aggregation_Kind is (None, Shared, Composite); type UML_Call_Concurrency_Kind is (Sequential, Guarded, Concurrent); type UML_Connector_Kind is (Assembly, Delegation); type UML_Expansion_Kind is (Parallel, Iterative, Stream); type UML_Interaction_Operator_Kind is (Alt_Operator, Opt_Operator, Break_Operator, Par_Operator, Loop_Operator, Critical_Operator, Neg_Operator, Assert_Operator, Strict_Operator, Seq_Operator, Ignore_Operator, Consider_Operator); type UML_Message_Kind is (Complete, Lost, Found, Unknown); type UML_Message_Sort is (Synch_Call, Asynch_Call, Asynch_Signal, Create_Message, Delete_Message, Reply); type UML_Object_Node_Ordering_Kind is (Unordered, Ordered, LIFO, FIFO); type UML_Parameter_Direction_Kind is (In_Parameter, In_Out_Parameter, Out_Parameter, Return_Parameter); type UML_Parameter_Effect_Kind is (Create, Read, Update, Delete); type UML_Pseudostate_Kind is (Initial_Pseudostate, Deep_History_Pseudostate, Shallow_History_Pseudostate, Join_Pseudostate, Fork_Pseudostate, Junction_Pseudostate, Choice_Pseudostate, Entry_Point_Pseudostate, Exit_Point_Pseudostate, Terminate_Pseudostate); type UML_Transition_Kind is (External, Internal, Local); type UML_Visibility_Kind is (Public_Visibility, Private_Visibility, Protected_Visibility, Package_Visibility); type Optional_UML_Aggregation_Kind (Is_Empty : Boolean := True) is record case Is_Empty is when True => null; when False => Value : UML_Aggregation_Kind; end case; end record; type Optional_UML_Call_Concurrency_Kind (Is_Empty : Boolean := True) is record case Is_Empty is when True => null; when False => Value : UML_Call_Concurrency_Kind; end case; end record; type Optional_UML_Connector_Kind (Is_Empty : Boolean := True) is record case Is_Empty is when True => null; when False => Value : UML_Connector_Kind; end case; end record; type Optional_UML_Expansion_Kind (Is_Empty : Boolean := True) is record case Is_Empty is when True => null; when False => Value : UML_Expansion_Kind; end case; end record; type Optional_UML_Interaction_Operator_Kind (Is_Empty : Boolean := True) is record case Is_Empty is when True => null; when False => Value : UML_Interaction_Operator_Kind; end case; end record; type Optional_UML_Message_Kind (Is_Empty : Boolean := True) is record case Is_Empty is when True => null; when False => Value : UML_Message_Kind; end case; end record; type Optional_UML_Message_Sort (Is_Empty : Boolean := True) is record case Is_Empty is when True => null; when False => Value : UML_Message_Sort; end case; end record; type Optional_UML_Object_Node_Ordering_Kind (Is_Empty : Boolean := True) is record case Is_Empty is when True => null; when False => Value : UML_Object_Node_Ordering_Kind; end case; end record; type Optional_UML_Parameter_Direction_Kind (Is_Empty : Boolean := True) is record case Is_Empty is when True => null; when False => Value : UML_Parameter_Direction_Kind; end case; end record; type Optional_UML_Parameter_Effect_Kind (Is_Empty : Boolean := True) is record case Is_Empty is when True => null; when False => Value : UML_Parameter_Effect_Kind; end case; end record; type Optional_UML_Pseudostate_Kind (Is_Empty : Boolean := True) is record case Is_Empty is when True => null; when False => Value : UML_Pseudostate_Kind; end case; end record; type Optional_UML_Transition_Kind (Is_Empty : Boolean := True) is record case Is_Empty is when True => null; when False => Value : UML_Transition_Kind; end case; end record; type Optional_UML_Visibility_Kind (Is_Empty : Boolean := True) is record case Is_Empty is when True => null; when False => Value : UML_Visibility_Kind; end case; end record; end AMF.UML;
30.529851
85
0.520655
107c5df0a0c75fcb1f4b5b847ce8260be244f2d3
332
adb
Ada
1-base/lace/source/events/interface/lace-subject.adb
charlie5/lace
e9b7dc751d500ff3f559617a6fc3089ace9dc134
[ "0BSD" ]
20
2015-11-04T09:23:59.000Z
2022-01-14T10:21:42.000Z
1-base/lace/source/events/interface/lace-subject.adb
charlie5/lace
e9b7dc751d500ff3f559617a6fc3089ace9dc134
[ "0BSD" ]
2
2015-11-04T17:05:56.000Z
2015-12-08T03:16:13.000Z
1-base/lace/source/events/interface/lace-subject.adb
charlie5/lace
e9b7dc751d500ff3f559617a6fc3089ace9dc134
[ "0BSD" ]
1
2015-12-07T12:53:52.000Z
2015-12-07T12:53:52.000Z
package body lace.Subject is the_Logger : access Event.Logger.item'Class; procedure Logger_is (Now : access Event.Logger.item'Class) is begin the_Logger := Now; end Logger_is; function Logger return access Event.Logger.item'Class is begin return the_Logger; end Logger; end lace.Subject;
16.6
61
0.695783
df4ced4ed54a33241194b4fe2d609badeb7c98b7
8,402
ads
Ada
src/util-properties.ads
Letractively/ada-util
e4c63b93635dc07c46e95f12ba02d18903b307b3
[ "Apache-2.0" ]
null
null
null
src/util-properties.ads
Letractively/ada-util
e4c63b93635dc07c46e95f12ba02d18903b307b3
[ "Apache-2.0" ]
null
null
null
src/util-properties.ads
Letractively/ada-util
e4c63b93635dc07c46e95f12ba02d18903b307b3
[ "Apache-2.0" ]
null
null
null
----------------------------------------------------------------------- -- properties -- Generic name/value property management -- Copyright (C) 2001, 2002, 2003, 2006, 2008, 2009, 2010, 2014 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Ada.Strings.Unbounded; with Ada.Finalization; with Ada.Text_IO; with Util.Concurrent.Counters; package Util.Properties is NO_PROPERTY : exception; use Ada.Strings.Unbounded; subtype Value is Ada.Strings.Unbounded.Unbounded_String; function "+" (S : String) return Value renames To_Unbounded_String; function "-" (S : Value) return String renames To_String; -- The manager holding the name/value pairs and providing the operations -- to get and set the properties. type Manager is new Ada.Finalization.Controlled with private; type Manager_Access is access all Manager'Class; -- Returns TRUE if the property exists. function Exists (Self : in Manager'Class; Name : in Value) return Boolean; -- Returns TRUE if the property exists. function Exists (Self : in Manager'Class; Name : in String) return Boolean; -- Returns the property value. Raises an exception if not found. function Get (Self : in Manager'Class; Name : in String) return String; -- Returns the property value. Raises an exception if not found. function Get (Self : in Manager'Class; Name : in String) return Value; -- Returns the property value. Raises an exception if not found. function Get (Self : in Manager'Class; Name : in Value) return Value; -- Returns the property value. Raises an exception if not found. function Get (Self : in Manager'Class; Name : in Value) return String; -- Returns the property value or Default if it does not exist. function Get (Self : in Manager'Class; Name : in String; Default : in String) return String; -- Insert the specified property in the list. procedure Insert (Self : in out Manager'Class; Name : in String; Item : in String); -- Set the value of the property. The property is created if it -- does not exists. procedure Set (Self : in out Manager'Class; Name : in String; Item : in String); -- Set the value of the property. The property is created if it -- does not exists. procedure Set (Self : in out Manager'Class; Name : in String; Item : in Value); -- Set the value of the property. The property is created if it -- does not exists. procedure Set (Self : in out Manager'Class; Name : in Unbounded_String; Item : in Value); -- Remove the property given its name. If the property does not -- exist, raises NO_PROPERTY exception. procedure Remove (Self : in out Manager'Class; Name : in String); -- Remove the property given its name. If the property does not -- exist, raises NO_PROPERTY exception. procedure Remove (Self : in out Manager'Class; Name : in Value); -- Iterate over the properties and execute the given procedure passing the -- property name and its value. procedure Iterate (Self : in Manager'Class; Process : access procedure (Name, Item : Value)); type Name_Array is array (Natural range <>) of Value; -- Return the name of the properties defined in the manager. -- When a prefix is specified, only the properties starting with -- the prefix are returned. function Get_Names (Self : in Manager; Prefix : in String := "") return Name_Array; -- Load the properties from the file input stream. The file must follow -- the definition of Java property files. When a prefix is specified, keep -- only the properties that starts with the prefix. When <b>Strip</b> is True, -- the prefix part is removed from the property name. procedure Load_Properties (Self : in out Manager'Class; File : in Ada.Text_IO.File_Type; Prefix : in String := ""; Strip : in Boolean := False); -- Load the properties from the file. The file must follow the -- definition of Java property files. When a prefix is specified, keep -- only the properties that starts with the prefix. When <b>Strip</b> is True, -- the prefix part is removed from the property name. -- Raises NAME_ERROR if the file does not exist. procedure Load_Properties (Self : in out Manager'Class; Path : in String; Prefix : in String := ""; Strip : in Boolean := False); -- Copy the properties from FROM which start with a given prefix. -- If the prefix is empty, all properties are copied. When <b>Strip</b> is True, -- the prefix part is removed from the property name. procedure Copy (Self : in out Manager'Class; From : in Manager'Class; Prefix : in String := ""; Strip : in Boolean := False); private -- Abstract interface for the implementation of Properties -- (this allows to decouples the implementation from the API) package Interface_P is type Manager is abstract tagged limited record Count : Util.Concurrent.Counters.Counter; end record; type Manager_Access is access all Manager'Class; type Manager_Factory is access function return Manager_Access; -- Returns TRUE if the property exists. function Exists (Self : in Manager; Name : in Value) return Boolean is abstract; -- Returns the property value. Raises an exception if not found. function Get (Self : in Manager; Name : in Value) return Value is abstract; procedure Insert (Self : in out Manager; Name : in Value; Item : in Value) is abstract; -- Set the value of the property. The property is created if it -- does not exists. procedure Set (Self : in out Manager; Name : in Value; Item : in Value) is abstract; -- Remove the property given its name. procedure Remove (Self : in out Manager; Name : in Value) is abstract; -- Iterate over the properties and execute the given procedure passing the -- property name and its value. procedure Iterate (Self : in Manager; Process : access procedure (Name, Item : Value)) is abstract; -- Deep copy of properties stored in 'From' to 'To'. function Create_Copy (Self : in Manager) return Manager_Access is abstract; procedure Delete (Self : in Manager; Obj : in out Manager_Access) is abstract; function Get_Names (Self : in Manager; Prefix : in String) return Name_Array is abstract; end Interface_P; procedure Set_Property_Implementation (Self : in out Manager; Impl : in Interface_P.Manager_Access); -- Create a property implementation if there is none yet. procedure Check_And_Create_Impl (Self : in out Manager); type Manager is new Ada.Finalization.Controlled with record Impl : Interface_P.Manager_Access := null; end record; overriding procedure Adjust (Object : in out Manager); overriding procedure Finalize (Object : in out Manager); end Util.Properties;
40.589372
86
0.6214
4afd115edfcd84fef806e96e7d27df4aaee84055
8,922
ads
Ada
3-mid/opengl/source/opengl.ads
charlie5/lace
e9b7dc751d500ff3f559617a6fc3089ace9dc134
[ "0BSD" ]
20
2015-11-04T09:23:59.000Z
2022-01-14T10:21:42.000Z
3-mid/opengl/source/opengl.ads
charlie5/lace
e9b7dc751d500ff3f559617a6fc3089ace9dc134
[ "0BSD" ]
2
2015-11-04T17:05:56.000Z
2015-12-08T03:16:13.000Z
3-mid/opengl/source/opengl.ads
charlie5/lace
e9b7dc751d500ff3f559617a6fc3089ace9dc134
[ "0BSD" ]
1
2015-12-07T12:53:52.000Z
2015-12-07T12:53:52.000Z
with GL, float_Math.Algebra.linear.d2, float_Math.Algebra.linear.d3, float_Math.Geometry.d2, float_Math.Geometry.d3, ada.Containers; package openGL -- -- Provides a namespace and set of core types. -- is pragma Pure; Error : exception; ------------ -- Profiles -- type profile_Kind is (Safe, Lean, Desk); function Profile return profile_Kind; ---------- -- Models -- Model_too_complex : exception; max_Models : constant := 2**32 - 1; type model_Id is range 0 .. max_Models; null_model_Id : constant model_Id; ----------- -- Indices -- type short_Index_t is range 0 .. 2**8 - 1; type Index_t is range 0 .. 2**16 - 1; type long_Index_t is range 0 .. 2**32 - 1; type short_Indices is array (long_Index_t range <>) of short_Index_t; type Indices is array (long_Index_t range <>) of Index_t; type long_Indices is array (long_Index_t range <>) of long_Index_t; -------- -- Math -- package Math renames float_Math; use Math; package linear_Algebra renames float_Math.Algebra.linear; package linear_Algebra_2d renames float_Math.Algebra.linear.d2; package linear_Algebra_3d renames float_Math.Algebra.linear.d3; package Geometry_2d renames float_Math.Geometry.d2; package Geometry_3d renames float_Math.Geometry.d3; -------- -- Real -- subtype Real is math.Real; package real_Functions renames math.Functions; ------------- -- Safe Real -- protected type safe_Real is procedure Value_is (Now : in Real); function Value return Real; private the_Value : Real; end safe_Real; ----------- -- Extents -- type Extent_2d is record Width : Natural; Height : Natural; end record; ----------- -- Vectors -- subtype Vector is math.Vector; subtype Vector_2 is math.Vector_2; subtype Vector_3 is math.Vector_3; subtype Vector_4 is math.Vector_4; type Vector_2_array is array (Positive range <>) of Vector_2; type Vector_3_array is array ( Index_t range <>) of aliased Vector_3; type Vector_3_large_array is array (long_Index_t range <>) of aliased Vector_3; function Scaled (Self : in Vector_3; By : in Vector_3) return Vector_3; function Scaled (Self : in Vector_3_array; By : in Vector_3) return Vector_3_array; function to_Vector_3_array (Self : in Vector_2_array) return Vector_3_array; ------------ -- Matrices -- subtype Matrix is math.Matrix; subtype Matrix_2x2 is math.Matrix_2x2; subtype Matrix_3x3 is math.Matrix_3x3; subtype Matrix_4x4 is math.Matrix_4x4; --------------- -- Height Maps -- type height_Map is array (Index_t range <>, Index_t range <>) of aliased Real; function Scaled (Self : in height_Map; By : in Real) return height_Map; procedure scale (Self : in out height_Map; By : in Real); function height_Extent (Self : in height_Map) return Vector_2; -- -- Returns the min and max height. type index_Pair is array (1 .. 2) of Index_t; function Region (Self : in height_Map; Rows, Cols : in index_Pair) return height_Map; -- -- Returns the submatrix indicated via Rows & Cols. ------------ -- Geometry -- subtype Site is Vector_3; -- A position in 3d space. subtype Sites is Vector_3_array; subtype many_Sites is Vector_3_large_array; subtype Normal is Vector_3; -- A normal in 3d space. subtype Normals is Vector_3_array; subtype many_Normals is Vector_3_large_array; type Bounds is record Ball : Real; -- Sphere radius. Box : Geometry_3d.bounding_Box; end record; null_Bounds : constant Bounds; function bounding_Box_of (Self : Sites) return Bounds; procedure set_Ball_from_Box (Self : in out Bounds); --------- -- Color -- subtype grey_Value is gl.GLubyte; subtype color_Value is gl.GLubyte; Opaque : constant color_Value; Lucid : constant color_Value; function to_color_Value (Self : in unit_Interval) return color_Value; function to_Real (Self : in color_Value) return unit_Interval; type Color is record Red : aliased color_Value; Green : color_Value; Blue : color_Value; end record; type Colors is array (Index_t range <>) of Color; type lucid_Color is record Primary : Color; Opacity : color_Value; end record; type lucid_Colors is array (Index_t range <>) of lucid_Color; subtype light_color_Value is Real range 0.0 .. 1.0; type light_Color is record Red : light_color_Value; Green : light_color_Value; Blue : light_color_Value; Opacity : light_color_Value; end record; subtype Shine is Real range 1.0 .. Real'Last; ---------- -- Images -- type grey_Image is array (Index_t range <>, Index_t range <>) of aliased grey_Value; type Image is array (Index_t range <>, Index_t range <>) of aliased Color; type lucid_Image is array (Index_t range <>, Index_t range <>) of aliased lucid_Color; function to_Image (From : in lucid_Image) return Image; ----------- -- Texture -- -- Coordinates -- type Coordinate_1D is record S : aliased Real; end record; type Coordinate_2D is record S, T : aliased Real; end record; type Coordinate_3D is record S, T, R : aliased Real; end record; type Coordinate_4D is record S, T, R, Q : aliased Real; end record; type Coordinates_1D is array (Index_t range <>) of aliased Coordinate_1D; type Coordinates_2D is array (Index_t range <>) of aliased Coordinate_2D; type Coordinates_3D is array (Index_t range <>) of aliased Coordinate_3D; type Coordinates_4D is array (Index_t range <>) of aliased Coordinate_4D; type many_Coordinates_1D is array (long_Index_t range <>) of aliased Coordinate_1D; type many_Coordinates_2D is array (long_Index_t range <>) of aliased Coordinate_2D; type many_Coordinates_3D is array (long_Index_t range <>) of aliased Coordinate_3D; type many_Coordinates_4D is array (long_Index_t range <>) of aliased Coordinate_4D; -- Transforms -- type texture_Transform is record Offset : Real; Scale : Real; end record; type texture_Transform_1D is record S : texture_Transform; end record; type texture_Transform_2D is record S : texture_Transform; T : texture_Transform; end record; type texture_Transform_3D is record S : texture_Transform; T : texture_Transform; R : texture_Transform; end record; type texture_Transform_4D is record S : texture_Transform; T : texture_Transform; R : texture_Transform; Q : texture_Transform; end record; ---------- -- Assets -- type asset_Name is new String (1 .. 128); -- -- Name of a file containing textures, images, fonts or other resources. null_Asset : constant asset_Name; function to_Asset (Self : in String) return asset_Name; function to_String (Self : in asset_Name) return String; function Hash (Self : in asset_Name) return ada.Containers.Hash_type; ----------------------------- -- Shader Program Parameters -- type Parameters is tagged limited private; --------------- -- Task Safety -- type safe_Boolean is new Boolean; pragma Atomic (safe_Boolean); private -- NB: Packing these arrays forces compiler to use the correct size for the element type, rather than the most efficient size. -- pragma Pack (short_Indices); pragma Pack ( Indices); pragma Pack ( long_Indices); pragma Assert (GL.GLfloat'Size = Real'Size); null_Asset : constant asset_Name := (others => ' '); null_model_Id : constant model_Id := 0; null_Bounds : constant Bounds := (ball => 0.0, box => (lower => (Real'Last, Real'Last, Real'Last), upper => (Real'First, Real'First, Real'First))); --------- -- Color -- Opaque : constant color_Value := color_Value'Last; Lucid : constant color_Value := color_Value'First; function to_Color (R, G, B : in unit_Interval) return Color; ---------------------------- -- Shader Program Parameters -- type Parameters is tagged limited null record; end openGL;
24.510989
129
0.613427
10bfb25965ac7998a89f7aa646e4e93d444c4627
13,425
adb
Ada
.emacs.d/elpa/ada-mode-7.0.1/wisi-ada-format_parameter_list.adb
caqg/linux-home
eed631aae6f5e59e4f46e14f1dff443abca5fa28
[ "Linux-OpenIB" ]
null
null
null
.emacs.d/elpa/ada-mode-7.0.1/wisi-ada-format_parameter_list.adb
caqg/linux-home
eed631aae6f5e59e4f46e14f1dff443abca5fa28
[ "Linux-OpenIB" ]
null
null
null
.emacs.d/elpa/ada-mode-7.0.1/wisi-ada-format_parameter_list.adb
caqg/linux-home
eed631aae6f5e59e4f46e14f1dff443abca5fa28
[ "Linux-OpenIB" ]
null
null
null
-- Abstract : -- -- -- -- Copyright (C) 2019 Free Software Foundation, Inc. -- -- This program is free software; you can redistribute it and/or -- modify it under terms of the GNU General Public License as -- published by the Free Software Foundation; either version 3, or (at -- your option) any later version. This program 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 -- distributed with this program; see file COPYING. If not, write to -- the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, -- MA 02110-1335, USA. pragma License (GPL); with WisiToken.Syntax_Trees.LR_Utils; use WisiToken.Syntax_Trees.LR_Utils; separate (Wisi.Ada) procedure Format_Parameter_List (Tree : in WisiToken.Syntax_Trees.Tree; Data : in out Parse_Data_Type; Edit_Begin : in WisiToken.Buffer_Pos) is use Standard.Ada.Containers; use Ada_Process_Actions; use Standard.Ada.Text_IO; use WisiToken.Syntax_Trees; -- First process the syntax tree and produce a list of parameters package Region_Lists is new Standard.Ada.Containers.Doubly_Linked_Lists (Buffer_Region); type Parameter is record Identifiers : Region_Lists.List; Aliased_P : Boolean := False; -- "_P" for "present" In_P : Boolean := False; Out_P : Boolean := False; Not_Null_P : Boolean := False; Access_P : Boolean := False; Constant_P : Boolean := False; Protected_P : Boolean := False; Type_Region : Buffer_Region := Null_Buffer_Region; Default_Exp : Buffer_Region := Null_Buffer_Region; end record; Formal_Part : constant Node_Index := Find_ID_At (Tree, Data.Terminals, +formal_part_ID, Edit_Begin); Param_Iter : Iterator; Edit_End : Buffer_Pos; Param_Count : Count_Type := 0; function Get_Text (Region : in WisiToken.Buffer_Region) return String is begin return Data.Lexer.Buffer_Text (Region); end Get_Text; begin if Formal_Part = Invalid_Node_Index then -- Most likely the edit point is wrong. raise SAL.Parameter_Error with "no parameter list found at byte_pos" & Edit_Begin'Image; end if; if WisiToken.Trace_Action > Detail then Put_Line (";; format parameter list node" & Formal_Part'Image); end if; Edit_End := Tree.Byte_Region (Formal_Part).Last; Param_Iter := Iterator (Iterate (Tree, Data.Base_Terminals, Data.Lexer, Data.Descriptor, Tree.Child (Formal_Part, 2), +parameter_specification_ID, +SEMICOLON_ID)); -- The last parameter might be empty, due to syntax errors. for Param_Cur in Param_Iter loop if not Tree.Is_Empty (Node (Param_Cur)) then Param_Count := Param_Count + 1; end if; end loop; declare Params : array (1 .. Param_Count) of Parameter; Param_Cur : Cursor := First (Param_Iter); First_Param_Node : constant Node_Index := Node (First (Param_Iter)); Last_Param_Node : Node_Index; begin for Param of Params loop Last_Param_Node := Node (Param_Cur); declare Children : constant Valid_Node_Index_Array := Tree.Children (Node (Param_Cur)); begin for Ident_Cur in Iterate (Tree, Data.Base_Terminals, Data.Lexer, Data.Descriptor, Children (1), +IDENTIFIER_ID, +COMMA_ID) loop Param.Identifiers.Append (Tree.Byte_Region (Node (Ident_Cur))); end loop; Param.Aliased_P := not Tree.Is_Empty (Children (3)); for I in 4 .. Children'Last loop case To_Token_Enum (Tree.ID (Children (I))) is when mode_opt_ID => if Tree.Is_Empty (Children (I)) then Param.In_P := False; Param.Out_P := False; else Param.In_P := Tree.ID (Tree.Child (Children (I), 1)) = +IN_ID; Param.Out_P := Tree.ID (Tree.Child (Children (I), 1)) = +OUT_ID or Tree.Children (Children (I))'Length > 1; -- 'in out' end if; when null_exclusion_opt_ID => Param.Not_Null_P := not Tree.Is_Empty (Children (I)); when name_ID => Param.Type_Region := Tree.Byte_Region (Children (I)); when access_definition_ID => -- First two children are always: -- null_exclusion_opt ACCESS declare Access_Children : constant Valid_Node_Index_Array := Tree.Children (Children (I)); begin Param.Not_Null_P := not Tree.Is_Empty (Access_Children (1)); Param.Access_P := True; if Tree.ID (Access_Children (3)) = +general_access_modifier_opt_ID then Param.Constant_P := not Tree.Is_Empty (Access_Children (3)); Param.Type_Region := Tree.Byte_Region (Access_Children (4)); else Param.Protected_P := not Tree.Is_Empty (Access_Children (3)); Param.Type_Region := (Tree.Byte_Region (Access_Children (4)).First, Tree.Byte_Region (Children (I)).Last); end if; end; when COLON_EQUAL_ID => null; when expression_opt_ID => if not Tree.Is_Empty (Children (I)) then Param.Default_Exp := Tree.Byte_Region (Children (I)); end if; when others => Raise_Programmer_Error ("format_parameter_list param id", Data.Descriptor.all, Data.Lexer, Tree, Data.Base_Terminals.all, Children (I)); end case; end loop; end; Param_Cur := Next (Param_Iter, Param_Cur); end loop; declare use Standard.Ada.Strings.Unbounded; Result : Unbounded_String := +"("; Line_End : Integer := 0; -- Index of last LF char in Result. Multi_Line : constant Boolean := Tree.Augmented (First_Param_Node).Line < Tree.Augmented (Last_Param_Node).Line; Ident_Len : Integer := 0; -- Maximum over all params, includes commas Type_Len : Integer := 0; Aliased_P : Boolean := False; -- "_P" for "present" In_P : Boolean := False; Out_P : Boolean := False; Not_Null_P : Boolean := False; Access_P : Boolean := False; Len : Integer; -- temporary Need_Comma : Boolean; Need_New_Line : Boolean := False; begin if Multi_Line then -- Find columns for Param of Params loop Len := 0; for Ident of Param.Identifiers loop Len := Len + Integer (Ident.Last - Ident.First) + 1; end loop; Len := Len + 2 * (Integer (Param.Identifiers.Length) - 1); Ident_Len := Integer'Max (Ident_Len, Len); -- We align the default expressions after the types in parameters -- that have defaults, not after all types. "constant", "protected" -- are treated as part of 'type' if Param.Default_Exp /= Null_Buffer_Region then Len := Integer (Param.Type_Region.Last - Param.Type_Region.First) + 1 + (if Param.Constant_P then 10 else 0) + -- "constant " (if Param.Protected_P then 10 else 0); -- "protected" Type_Len := Integer'Max (Type_Len, Len); end if; Aliased_P := Aliased_P or Param.Aliased_P; In_P := In_P or Param.In_P; Out_P := Out_P or Param.Out_P; Not_Null_P := Not_Null_P or Param.Not_Null_P; Access_P := Access_P or Param.Access_P; end loop; declare subtype Count is Standard.Ada.Text_IO.Count; Open_Paren_Col : constant Count := Tree.Augmented (Formal_Part).Column; Ident_Col : constant Count := Open_Paren_Col + 1; Colon_Col : constant Count := Ident_Col + Count (Ident_Len) + 1; In_Col : constant Count := Colon_Col + (if Aliased_P then 10 else 2); Out_Col : constant Count := In_Col + (if In_P then 3 else 0); Type_Col : constant Count := In_Col + -- 'not null' without access is part of the type (if Not_Null_P and Access_P then 16 elsif Access_P then 7 elsif In_P and Out_P then 7 elsif In_P then 3 elsif Out_P then 4 else 0); Default_Col : constant Count := Type_Col + Count (Type_Len) + 1; function Indent_To (Col : in Count) return String is use Standard.Ada.Strings.Fixed; begin return (Integer (Col - (if Need_New_Line then 0 else Open_Paren_Col)) - (Length (Result) - Line_End)) * ' '; end Indent_To; begin for Param of Params loop if Need_New_Line then Result := Result & ";" & ASCII.LF; Line_End := Length (Result); end if; Result := Result & Indent_To (Ident_Col); Need_Comma := False; for Ident of Param.Identifiers loop if Need_Comma then Result := Result & ", "; else Need_Comma := True; end if; Result := Result & Get_Text (Ident); end loop; Result := Result & Indent_To (Colon_Col) & ": "; if Param.Aliased_P then Result := Result & "aliased "; end if; Result := Result & Indent_To (In_Col); if Param.In_P then Result := Result & "in "; end if; if Param.Out_P then Result := Result & Indent_To (Out_Col) & "out "; end if; if Param.Access_P then if Param.Not_Null_P then Result := Result & "not null access"; else Result := Result & "access"; end if; end if; Result := Result & Indent_To (Type_Col); if Param.Not_Null_P and not Param.Access_P then Result := Result & "not null "; end if; if Param.Constant_P then Result := Result & "constant "; end if; if Param.Protected_P then Result := Result & "protected "; end if; Result := Result & Get_Text (Param.Type_Region); if Param.Default_Exp /= Null_Buffer_Region then Result := Result & Indent_To (Default_Col) & ":= " & Get_Text (Param.Default_Exp); end if; Need_New_Line := True; end loop; Result := Result & ")"; end; else -- not Multi_Line for Param of Params loop if Need_New_Line then Result := Result & "; "; end if; Need_Comma := False; for Ident of Param.Identifiers loop if Need_Comma then Result := Result & ", "; else Need_Comma := True; end if; Result := Result & Get_Text (Ident); end loop; Result := Result & " : "; if Param.Aliased_P then Result := Result & "aliased "; end if; if Param.In_P then Result := Result & "in "; end if; if Param.Out_P then Result := Result & "out "; end if; if Param.Not_Null_P then Result := Result & "not null "; end if; if Param.Access_P then Result := Result & "access "; end if; if Param.Constant_P then Result := Result & "constant "; end if; if Param.Protected_P then Result := Result & "protected "; end if; Result := Result & Get_Text (Param.Type_Region); if Param.Default_Exp /= Null_Buffer_Region then Result := Result & " := " & Get_Text (Param.Default_Exp); end if; Need_New_Line := True; end loop; Result := Result & ")"; end if; Put_Line ("[" & Edit_Action_Code & Edit_Begin'Image & Edit_End'Image & " """ & Elisp_Escape_Quotes (-Result) & """]"); end; end; end Format_Parameter_List;
42.484177
120
0.532291
cbbc71d4d0be3f916e02f07ea2a3eb12445eb22c
2,755
ads
Ada
Validation/pyFrame3DD-master/gcc-master/gcc/ada/sem_aggr.ads
djamal2727/Main-Bearing-Analytical-Model
2f00c2219c71be0175c6f4f8f1d4cca231d97096
[ "Apache-2.0" ]
null
null
null
Validation/pyFrame3DD-master/gcc-master/gcc/ada/sem_aggr.ads
djamal2727/Main-Bearing-Analytical-Model
2f00c2219c71be0175c6f4f8f1d4cca231d97096
[ "Apache-2.0" ]
null
null
null
Validation/pyFrame3DD-master/gcc-master/gcc/ada/sem_aggr.ads
djamal2727/Main-Bearing-Analytical-Model
2f00c2219c71be0175c6f4f8f1d4cca231d97096
[ "Apache-2.0" ]
null
null
null
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- S E M _ A G G R -- -- -- -- S p e c -- -- -- -- Copyright (C) 1992-2020, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT 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 distributed with GNAT; see file COPYING3. If not, go to -- -- http://www.gnu.org/licenses for a complete copy of the license. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- This package contains the resolution code for aggregates. It is logically -- part of Sem_Res, but is split off since the aggregate code is so complex. with Types; use Types; package Sem_Aggr is procedure Resolve_Delta_Aggregate (N : Node_Id; Typ : Entity_Id); procedure Resolve_Aggregate (N : Node_Id; Typ : Entity_Id); procedure Resolve_Extension_Aggregate (N : Node_Id; Typ : Entity_Id); procedure Resolve_Container_Aggregate (N : Node_Id; Typ : Entity_Id); function Is_Others_Aggregate (Aggr : Node_Id) return Boolean; -- Returns True is aggregate Aggr consists of a single OTHERS choice function Is_Single_Aggregate (Aggr : Node_Id) return Boolean; -- Returns True if aggregate Aggr consists of a single choice -- WARNING: There is a matching C declaration of this subprogram in fe.h end Sem_Aggr;
58.617021
78
0.482759
dfdfab5d6fa5fde027470ee8dee347e9e1207781
699
adb
Ada
examples/stm32f1/swo/main.adb
ekoeppen/STM32_Generic_Ada_Drivers
4ff29c3026c4b24280baf22a5b81ea9969375466
[ "MIT" ]
1
2021-04-06T07:57:56.000Z
2021-04-06T07:57:56.000Z
examples/stm32f1/swo/main.adb
ekoeppen/STM32_Generic_Ada_Drivers
4ff29c3026c4b24280baf22a5b81ea9969375466
[ "MIT" ]
null
null
null
examples/stm32f1/swo/main.adb
ekoeppen/STM32_Generic_Ada_Drivers
4ff29c3026c4b24280baf22a5b81ea9969375466
[ "MIT" ]
2
2018-05-29T13:59:31.000Z
2019-02-03T19:48:08.000Z
with Last_Chance_Handler; pragma Unreferenced (Last_Chance_Handler); with Ada.Real_Time; use Ada.Real_Time; with Ada.Text_IO; use Ada.Text_IO; with STM32GD.Board; use STM32GD.Board; with STM32GD.GPIO; use STM32GD.GPIO; with STM32GD.GPIO.Pin; with STM32GD.EXTI; with STM32_SVD.AFIO; with STM32_SVD.RCC; procedure Main is Next_Release : Time := Clock; Period : constant Time_Span := Milliseconds (500); -- arbitrary begin Init; -- STM32_SVD.AFIO.AFIO_Periph.MAPR.SWJ_CFG := 2#010#; LED2.Set; Put_Line ("Starting"); loop LED2.Toggle; Next_Release := Next_Release + Period; delay until Next_Release; Put_Line ("Ping"); end loop; end Main;
21.84375
73
0.701001
1077113ff9d01bf29b44bec5e92a693ea7c1dbf6
6,491
adb
Ada
src/loggers/adabase-logger-facility.adb
jrmarino/AdaBase
660f278613773dc4007c8b3fab21bcfddc1828b3
[ "0BSD" ]
30
2016-02-21T11:09:30.000Z
2021-12-08T14:12:32.000Z
src/loggers/adabase-logger-facility.adb
jrmarino/AdaBase
660f278613773dc4007c8b3fab21bcfddc1828b3
[ "0BSD" ]
3
2018-10-29T18:44:48.000Z
2022-03-12T23:14:20.000Z
src/loggers/adabase-logger-facility.adb
jrmarino/AdaBase
660f278613773dc4007c8b3fab21bcfddc1828b3
[ "0BSD" ]
3
2015-04-22T12:17:27.000Z
2017-01-19T14:29:59.000Z
-- This file is covered by the Internet Software Consortium (ISC) License -- Reference: ../../License.txt package body AdaBase.Logger.Facility is ------------------ -- error_mode -- ------------------ function error_mode (facility : LogFacility) return Error_Modes is begin return facility.prop_error_mode; end error_mode; ---------------------- -- set_error_mode -- ---------------------- procedure set_error_mode (facility : out LogFacility; mode : Error_Modes) is begin facility.prop_error_mode := mode; end set_error_mode; -------------------- -- set_log_file -- -------------------- procedure set_log_file (facility : LogFacility; filename : String) is begin facility.listener_file.all.set_filepath (filename); end set_log_file; --------------------- -- standard_logger -- --------------------- procedure standard_logger (facility : out LogFacility; logger : TLogger; action : TAction) is use type ALF.File_Logger_access; use type ALS.Screen_Logger_access; begin case logger is when screen => case action is when detach => if facility.listener_screen = null then raise ALREADY_DETACHED; else facility.listener_screen := null; end if; when attach => if facility.listener_screen = null then facility.listener_screen := logger_screen'Access; else raise ALREADY_ATTACHED; end if; end case; when file => case action is when detach => if facility.listener_file = null then raise ALREADY_DETACHED; else facility.listener_file := null; end if; when attach => if facility.listener_file = null then facility.listener_file := logger_file'Access; else raise ALREADY_ATTACHED; end if; end case; end case; end standard_logger; ---------------------------- -- detach_custom_logger -- ---------------------------- procedure detach_custom_logger (facility : out LogFacility) is use type AL.BaseClass_Logger_access; begin if facility.listener_custom = null then raise ALREADY_DETACHED; else facility.listener_custom := null; end if; end detach_custom_logger; ---------------------------- -- attach_custom_logger -- ---------------------------- procedure attach_custom_logger (facility : out LogFacility; logger_access : AL.BaseClass_Logger_access) is use type AL.BaseClass_Logger_access; begin if facility.listener_custom = null then facility.listener_custom := logger_access; else raise ALREADY_ATTACHED; end if; end attach_custom_logger; ------------------- -- log_nominal -- ------------------- procedure log_nominal (facility : LogFacility; driver : Driver_Type; category : Log_Category; message : CT.Text) is use type AL.Screen.Screen_Logger_access; use type AL.File.File_Logger_access; use type AL.BaseClass_Logger_access; begin if facility.listener_screen /= null then facility.listener_screen.all.set_information (driver => driver, category => category, message => message); facility.listener_screen.all.reaction; end if; if facility.listener_file /= null then facility.listener_file.all.set_information (driver => driver, category => category, message => message); facility.listener_file.all.reaction; end if; if facility.listener_custom /= null then facility.listener_custom.all.set_information (driver => driver, category => category, message => message); facility.listener_custom.all.reaction; end if; end log_nominal; ------------------- -- log_problem -- ------------------- procedure log_problem (facility : LogFacility; driver : Driver_Type; category : Log_Category; message : CT.Text; error_msg : CT.Text := CT.blank; error_code : Driver_Codes := 0; sqlstate : SQL_State := stateless; break : Boolean := False) is use type Error_Modes; use type AL.Screen.Screen_Logger_access; use type AL.File.File_Logger_access; use type AL.BaseClass_Logger_access; QND : constant String := CT.USS (message); begin if not break and then facility.prop_error_mode = silent then return; end if; if facility.listener_screen /= null then facility.listener_screen.all.set_information (driver => driver, category => category, message => message, error_msg => error_msg, error_code => error_code, sqlstate => sqlstate); facility.listener_screen.all.reaction; end if; if facility.listener_file /= null then facility.listener_file.all.set_information (driver => driver, category => category, message => message, error_msg => error_msg, error_code => error_code, sqlstate => sqlstate); facility.listener_file.all.reaction; end if; if facility.listener_custom /= null then facility.listener_custom.all.set_information (driver => driver, category => category, message => message, error_msg => error_msg, error_code => error_code, sqlstate => sqlstate); facility.listener_custom.all.reaction; end if; if break or else facility.prop_error_mode = raise_exception then raise ERRMODE_EXCEPTION with QND; end if; end log_problem; end AdaBase.Logger.Facility;
29.775229
78
0.53397
d0082ae6d3a6a7a61b551ddd9e30acd51dba4f97
5,624
ads
Ada
rts/gcc-9/adainclude/s-maccod.ads
letsbyteit/build-avr-ada-toolchain
7c5dddbc69e6e2df8c30971417dc50d2f2b29794
[ "MIT" ]
7
2019-09-17T20:54:13.000Z
2021-12-20T04:31:40.000Z
rts/gcc-9/adainclude/s-maccod.ads
letsbyteit/build-avr-ada-toolchain
7c5dddbc69e6e2df8c30971417dc50d2f2b29794
[ "MIT" ]
6
2019-05-08T14:20:48.000Z
2022-01-20T18:58:30.000Z
rts/gcc-9/adainclude/s-maccod.ads
letsbyteit/build-avr-ada-toolchain
7c5dddbc69e6e2df8c30971417dc50d2f2b29794
[ "MIT" ]
8
2019-07-09T09:18:51.000Z
2022-01-15T20:28:50.000Z
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- S Y S T E M . M A C H I N E _ C O D E -- -- -- -- S p e c -- -- -- -- Copyright (C) 1992-2006, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 2, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT 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 distributed with GNAT; see file COPYING. If not, write -- -- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, -- -- Boston, MA 02110-1301, 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. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- This package provides machine code support, both for intrinsic machine -- operations, and also for machine code statements. See GNAT documentation -- for full details. package System.Machine_Code is pragma Pure; type Asm_Input_Operand is private; type Asm_Output_Operand is private; -- These types are never used directly, they are declared only so that -- the calls to Asm are type correct according to Ada semantic rules. No_Input_Operands : constant Asm_Input_Operand; No_Output_Operands : constant Asm_Output_Operand; type Asm_Input_Operand_List is array (Integer range <>) of Asm_Input_Operand; type Asm_Output_Operand_List is array (Integer range <>) of Asm_Output_Operand; type Asm_Insn is private; -- This type is not used directly. It is declared only so that the -- aggregates used in code statements are type correct by Ada rules. procedure Asm ( Template : String; Outputs : Asm_Output_Operand_List; Inputs : Asm_Input_Operand_List; Clobber : String := ""; Volatile : Boolean := False); procedure Asm ( Template : String; Outputs : Asm_Output_Operand := No_Output_Operands; Inputs : Asm_Input_Operand_List; Clobber : String := ""; Volatile : Boolean := False); procedure Asm ( Template : String; Outputs : Asm_Output_Operand_List; Inputs : Asm_Input_Operand := No_Input_Operands; Clobber : String := ""; Volatile : Boolean := False); procedure Asm ( Template : String; Outputs : Asm_Output_Operand := No_Output_Operands; Inputs : Asm_Input_Operand := No_Input_Operands; Clobber : String := ""; Volatile : Boolean := False); function Asm ( Template : String; Outputs : Asm_Output_Operand_List; Inputs : Asm_Input_Operand_List; Clobber : String := ""; Volatile : Boolean := False) return Asm_Insn; function Asm ( Template : String; Outputs : Asm_Output_Operand := No_Output_Operands; Inputs : Asm_Input_Operand_List; Clobber : String := ""; Volatile : Boolean := False) return Asm_Insn; function Asm ( Template : String; Outputs : Asm_Output_Operand_List; Inputs : Asm_Input_Operand := No_Input_Operands; Clobber : String := ""; Volatile : Boolean := False) return Asm_Insn; function Asm ( Template : String; Outputs : Asm_Output_Operand := No_Output_Operands; Inputs : Asm_Input_Operand := No_Input_Operands; Clobber : String := ""; Volatile : Boolean := False) return Asm_Insn; pragma Import (Intrinsic, Asm); private type Asm_Input_Operand is new Integer; type Asm_Output_Operand is new Integer; type Asm_Insn is new Integer; -- All three of these types are dummy types, to meet the requirements of -- type consistency. No values of these types are ever referenced. No_Input_Operands : constant Asm_Input_Operand := 0; No_Output_Operands : constant Asm_Output_Operand := 0; end System.Machine_Code;
43.596899
78
0.559566
1030fde32a43d37bc4d5d3e25e8d41da55d26d11
25,499
adb
Ada
gcc-gcc-7_3_0-release/gcc/ada/gnatname.adb
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
7
2020-05-02T17:34:05.000Z
2021-10-17T10:15:18.000Z
gcc-gcc-7_3_0-release/gcc/ada/gnatname.adb
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
null
null
null
gcc-gcc-7_3_0-release/gcc/ada/gnatname.adb
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
2
2020-07-27T00:22:36.000Z
2021-04-01T09:41:02.000Z
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- G N A T N A M E -- -- -- -- B o d y -- -- -- -- Copyright (C) 2001-2015, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT 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 distributed with GNAT; see file COPYING3. If not, go to -- -- http://www.gnu.org/licenses for a complete copy of the license. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ with Ada.Command_Line; use Ada.Command_Line; with Ada.Text_IO; use Ada.Text_IO; with GNAT.Command_Line; use GNAT.Command_Line; with GNAT.Dynamic_Tables; with GNAT.OS_Lib; use GNAT.OS_Lib; with Opt; with Osint; use Osint; with Output; use Output; with Prj; use Prj; with Prj.Makr; with Switch; use Switch; with Table; with System.Regexp; use System.Regexp; procedure Gnatname is Subdirs_Switch : constant String := "--subdirs="; Usage_Output : Boolean := False; -- Set to True when usage is output, to avoid multiple output Usage_Needed : Boolean := False; -- Set to True by -h switch Version_Output : Boolean := False; -- Set to True when version is output, to avoid multiple output Very_Verbose : Boolean := False; -- Set to True with -v -v Create_Project : Boolean := False; -- Set to True with a -P switch File_Path : String_Access := new String'("gnat.adc"); -- Path name of the file specified by -c or -P switch File_Set : Boolean := False; -- Set to True by -c or -P switch. -- Used to detect multiple -c/-P switches. package Patterns is new GNAT.Dynamic_Tables (Table_Component_Type => String_Access, Table_Index_Type => Natural, Table_Low_Bound => 0, Table_Initial => 10, Table_Increment => 100); -- Table to accumulate the patterns type Argument_Data is record Directories : Patterns.Instance; Name_Patterns : Patterns.Instance; Excluded_Patterns : Patterns.Instance; Foreign_Patterns : Patterns.Instance; end record; package Arguments is new Table.Table (Table_Component_Type => Argument_Data, Table_Index_Type => Natural, Table_Low_Bound => 0, Table_Initial => 10, Table_Increment => 100, Table_Name => "Gnatname.Arguments"); -- Table to accumulate directories and patterns package Preprocessor_Switches is new Table.Table (Table_Component_Type => String_Access, Table_Index_Type => Natural, Table_Low_Bound => 0, Table_Initial => 10, Table_Increment => 100, Table_Name => "Gnatname.Preprocessor_Switches"); -- Table to store the preprocessor switches to be used in the call -- to the compiler. procedure Output_Version; -- Print name and version procedure Usage; -- Print usage procedure Scan_Args; -- Scan the command line arguments procedure Add_Source_Directory (S : String); -- Add S in the Source_Directories table procedure Get_Directories (From_File : String); -- Read a source directory text file -------------------------- -- Add_Source_Directory -- -------------------------- procedure Add_Source_Directory (S : String) is begin Patterns.Append (Arguments.Table (Arguments.Last).Directories, new String'(S)); end Add_Source_Directory; --------------------- -- Get_Directories -- --------------------- procedure Get_Directories (From_File : String) is File : Ada.Text_IO.File_Type; Line : String (1 .. 2_000); Last : Natural; begin Open (File, In_File, From_File); while not End_Of_File (File) loop Get_Line (File, Line, Last); if Last /= 0 then Add_Source_Directory (Line (1 .. Last)); end if; end loop; Close (File); exception when Name_Error => Fail ("cannot open source directory file """ & From_File & '"'); end Get_Directories; -------------------- -- Output_Version -- -------------------- procedure Output_Version is begin if not Version_Output then Version_Output := True; Output.Write_Eol; Display_Version ("GNATNAME", "2001"); end if; end Output_Version; --------------- -- Scan_Args -- --------------- procedure Scan_Args is procedure Check_Version_And_Help is new Check_Version_And_Help_G (Usage); Project_File_Name_Expected : Boolean; Pragmas_File_Expected : Boolean; Directory_Expected : Boolean; Dir_File_Name_Expected : Boolean; Foreign_Pattern_Expected : Boolean; Excluded_Pattern_Expected : Boolean; procedure Check_Regular_Expression (S : String); -- Compile string S into a Regexp, fail if any error ----------------------------- -- Check_Regular_Expression-- ----------------------------- procedure Check_Regular_Expression (S : String) is Dummy : Regexp; pragma Warnings (Off, Dummy); begin Dummy := Compile (S, Glob => True); exception when Error_In_Regexp => Fail ("invalid regular expression """ & S & """"); end Check_Regular_Expression; -- Start of processing for Scan_Args begin -- First check for --version or --help Check_Version_And_Help ("GNATNAME", "2001"); -- Now scan the other switches Project_File_Name_Expected := False; Pragmas_File_Expected := False; Directory_Expected := False; Dir_File_Name_Expected := False; Foreign_Pattern_Expected := False; Excluded_Pattern_Expected := False; for Next_Arg in 1 .. Argument_Count loop declare Next_Argv : constant String := Argument (Next_Arg); Arg : String (1 .. Next_Argv'Length) := Next_Argv; begin if Arg'Length > 0 then -- -P xxx if Project_File_Name_Expected then if Arg (1) = '-' then Fail ("project file name missing"); else File_Set := True; File_Path := new String'(Arg); Project_File_Name_Expected := False; end if; -- -c file elsif Pragmas_File_Expected then File_Set := True; File_Path := new String'(Arg); Create_Project := False; Pragmas_File_Expected := False; -- -d xxx elsif Directory_Expected then Add_Source_Directory (Arg); Directory_Expected := False; -- -D xxx elsif Dir_File_Name_Expected then Get_Directories (Arg); Dir_File_Name_Expected := False; -- -f xxx elsif Foreign_Pattern_Expected then Patterns.Append (Arguments.Table (Arguments.Last).Foreign_Patterns, new String'(Arg)); Check_Regular_Expression (Arg); Foreign_Pattern_Expected := False; -- -x xxx elsif Excluded_Pattern_Expected then Patterns.Append (Arguments.Table (Arguments.Last).Excluded_Patterns, new String'(Arg)); Check_Regular_Expression (Arg); Excluded_Pattern_Expected := False; -- There must be at least one Ada pattern or one foreign -- pattern for the previous section. -- --and elsif Arg = "--and" then if Patterns.Last (Arguments.Table (Arguments.Last).Name_Patterns) = 0 and then Patterns.Last (Arguments.Table (Arguments.Last).Foreign_Patterns) = 0 then Try_Help; return; end if; -- If no directory were specified for the previous section, -- then the directory is the project directory. if Patterns.Last (Arguments.Table (Arguments.Last).Directories) = 0 then Patterns.Append (Arguments.Table (Arguments.Last).Directories, new String'(".")); end if; -- Add and initialize another component to Arguments table declare New_Arguments : Argument_Data; pragma Warnings (Off, New_Arguments); -- Declaring this defaulted initialized object ensures -- that the new allocated component of table Arguments -- is correctly initialized. -- This is VERY ugly, Table should never be used with -- data requiring default initialization. We should -- find a way to avoid violating this rule ??? begin Arguments.Append (New_Arguments); end; Patterns.Init (Arguments.Table (Arguments.Last).Directories); Patterns.Set_Last (Arguments.Table (Arguments.Last).Directories, 0); Patterns.Init (Arguments.Table (Arguments.Last).Name_Patterns); Patterns.Set_Last (Arguments.Table (Arguments.Last).Name_Patterns, 0); Patterns.Init (Arguments.Table (Arguments.Last).Excluded_Patterns); Patterns.Set_Last (Arguments.Table (Arguments.Last).Excluded_Patterns, 0); Patterns.Init (Arguments.Table (Arguments.Last).Foreign_Patterns); Patterns.Set_Last (Arguments.Table (Arguments.Last).Foreign_Patterns, 0); -- Subdirectory switch elsif Arg'Length > Subdirs_Switch'Length and then Arg (1 .. Subdirs_Switch'Length) = Subdirs_Switch then Subdirs := new String'(Arg (Subdirs_Switch'Length + 1 .. Arg'Last)); -- --no-backup elsif Arg = "--no-backup" then Opt.No_Backup := True; -- -c elsif Arg'Length >= 2 and then Arg (1 .. 2) = "-c" then if File_Set then Fail ("only one -P or -c switch may be specified"); end if; if Arg'Length = 2 then Pragmas_File_Expected := True; if Next_Arg = Argument_Count then Fail ("configuration pragmas file name missing"); end if; else File_Set := True; File_Path := new String'(Arg (3 .. Arg'Last)); Create_Project := False; end if; -- -d elsif Arg'Length >= 2 and then Arg (1 .. 2) = "-d" then if Arg'Length = 2 then Directory_Expected := True; if Next_Arg = Argument_Count then Fail ("directory name missing"); end if; else Add_Source_Directory (Arg (3 .. Arg'Last)); end if; -- -D elsif Arg'Length >= 2 and then Arg (1 .. 2) = "-D" then if Arg'Length = 2 then Dir_File_Name_Expected := True; if Next_Arg = Argument_Count then Fail ("directory list file name missing"); end if; else Get_Directories (Arg (3 .. Arg'Last)); end if; -- -eL elsif Arg = "-eL" then Opt.Follow_Links_For_Files := True; Opt.Follow_Links_For_Dirs := True; -- -f elsif Arg'Length >= 2 and then Arg (1 .. 2) = "-f" then if Arg'Length = 2 then Foreign_Pattern_Expected := True; if Next_Arg = Argument_Count then Fail ("foreign pattern missing"); end if; else Patterns.Append (Arguments.Table (Arguments.Last).Foreign_Patterns, new String'(Arg (3 .. Arg'Last))); Check_Regular_Expression (Arg (3 .. Arg'Last)); end if; -- -gnatep or -gnateD elsif Arg'Length > 7 and then (Arg (1 .. 7) = "-gnatep" or else Arg (1 .. 7) = "-gnateD") then Preprocessor_Switches.Append (new String'(Arg)); -- -h elsif Arg = "-h" then Usage_Needed := True; -- -P elsif Arg'Length >= 2 and then Arg (1 .. 2) = "-P" then if File_Set then Fail ("only one -c or -P switch may be specified"); end if; if Arg'Length = 2 then if Next_Arg = Argument_Count then Fail ("project file name missing"); else Project_File_Name_Expected := True; end if; else File_Set := True; File_Path := new String'(Arg (3 .. Arg'Last)); end if; Create_Project := True; -- -v elsif Arg = "-v" then if Opt.Verbose_Mode then Very_Verbose := True; else Opt.Verbose_Mode := True; end if; -- -x elsif Arg'Length >= 2 and then Arg (1 .. 2) = "-x" then if Arg'Length = 2 then Excluded_Pattern_Expected := True; if Next_Arg = Argument_Count then Fail ("excluded pattern missing"); end if; else Patterns.Append (Arguments.Table (Arguments.Last).Excluded_Patterns, new String'(Arg (3 .. Arg'Last))); Check_Regular_Expression (Arg (3 .. Arg'Last)); end if; -- Junk switch starting with minus elsif Arg (1) = '-' then Fail ("wrong switch: " & Arg); -- Not a recognized switch, assume file name else Canonical_Case_File_Name (Arg); Patterns.Append (Arguments.Table (Arguments.Last).Name_Patterns, new String'(Arg)); Check_Regular_Expression (Arg); end if; end if; end; end loop; end Scan_Args; ----------- -- Usage -- ----------- procedure Usage is begin if not Usage_Output then Usage_Needed := False; Usage_Output := True; Write_Str ("Usage: "); Osint.Write_Program_Name; Write_Line (" [switches] naming-pattern [naming-patterns]"); Write_Line (" {--and [switches] naming-pattern [naming-patterns]}"); Write_Eol; Write_Line ("switches:"); Display_Usage_Version_And_Help; Write_Line (" --subdirs=dir real obj/lib/exec dirs are subdirs"); Write_Line (" --no-backup do not create backup of project file"); Write_Eol; Write_Line (" --and use different patterns"); Write_Eol; Write_Line (" -cfile create configuration pragmas file"); Write_Line (" -ddir use dir as one of the source " & "directories"); Write_Line (" -Dfile get source directories from file"); Write_Line (" -eL follow symbolic links when processing " & "project files"); Write_Line (" -fpat foreign pattern"); Write_Line (" -gnateDsym=v preprocess with symbol definition"); Write_Line (" -gnatep=data preprocess files with data file"); Write_Line (" -h output this help message"); Write_Line (" -Pproj update or create project file proj"); Write_Line (" -v verbose output"); Write_Line (" -v -v very verbose output"); Write_Line (" -xpat exclude pattern pat"); end if; end Usage; -- Start of processing for Gnatname begin -- Add the directory where gnatname is invoked in front of the -- path, if gnatname is invoked with directory information. declare Command : constant String := Command_Name; begin for Index in reverse Command'Range loop if Command (Index) = Directory_Separator then declare Absolute_Dir : constant String := Normalize_Pathname (Command (Command'First .. Index)); PATH : constant String := Absolute_Dir & Path_Separator & Getenv ("PATH").all; begin Setenv ("PATH", PATH); end; exit; end if; end loop; end; -- Initialize tables Arguments.Set_Last (0); declare New_Arguments : Argument_Data; pragma Warnings (Off, New_Arguments); -- Declaring this defaulted initialized object ensures that the new -- allocated component of table Arguments is correctly initialized. begin Arguments.Append (New_Arguments); end; Patterns.Init (Arguments.Table (1).Directories); Patterns.Set_Last (Arguments.Table (1).Directories, 0); Patterns.Init (Arguments.Table (1).Name_Patterns); Patterns.Set_Last (Arguments.Table (1).Name_Patterns, 0); Patterns.Init (Arguments.Table (1).Excluded_Patterns); Patterns.Set_Last (Arguments.Table (1).Excluded_Patterns, 0); Patterns.Init (Arguments.Table (1).Foreign_Patterns); Patterns.Set_Last (Arguments.Table (1).Foreign_Patterns, 0); Preprocessor_Switches.Set_Last (0); -- Get the arguments Scan_Args; if Opt.Verbose_Mode then Output_Version; end if; if Usage_Needed then Usage; end if; if Create_Project then declare Gnatname : constant String_Access := Program_Name ("gnatname", "gnatname"); Arg_Len : Positive := Argument_Count; Target : String_Access := null; begin -- Find the target, if any if Gnatname.all /= "gnatname" then Target := new String'(Gnatname (Gnatname'First .. Gnatname'Last - 9)); Arg_Len := Arg_Len + 1; end if; declare Args : Argument_List (1 .. Arg_Len); Gprname : String_Access := Locate_Exec_On_Path (Exec_Name => "gprname"); Success : Boolean; begin if Gprname /= null then for J in 1 .. Argument_Count loop Args (J) := new String'(Argument (J)); end loop; -- Add the target if there is one if Target /= null then Args (Args'Last) := new String'("--target=" & Target.all); end if; Spawn (Gprname.all, Args, Success); Free (Gprname); if Success then Exit_Program (E_Success); end if; end if; end; end; end if; -- This only happens if gprname is not found or if the invocation of -- gprname did not succeed. if Create_Project then Write_Line ("warning: gnatname -P is obsolete and will not be available in the" & " next release; use gprname instead"); end if; -- If no Ada or foreign pattern was specified, print the usage and return if Patterns.Last (Arguments.Table (Arguments.Last).Name_Patterns) = 0 and then Patterns.Last (Arguments.Table (Arguments.Last).Foreign_Patterns) = 0 then if Argument_Count = 0 then Usage; elsif not Usage_Output then Try_Help; end if; return; end if; -- If no source directory was specified, use the current directory as the -- unique directory. Note that if a file was specified with directory -- information, the current directory is the directory of the specified -- file. if Patterns.Last (Arguments.Table (Arguments.Last).Directories) = 0 then Patterns.Append (Arguments.Table (Arguments.Last).Directories, new String'(".")); end if; -- Initialize declare Prep_Switches : Argument_List (1 .. Integer (Preprocessor_Switches.Last)); begin for Index in Prep_Switches'Range loop Prep_Switches (Index) := Preprocessor_Switches.Table (Index); end loop; Prj.Makr.Initialize (File_Path => File_Path.all, Project_File => Create_Project, Preproc_Switches => Prep_Switches, Very_Verbose => Very_Verbose, Flags => Gnatmake_Flags); end; -- Process each section successively for J in 1 .. Arguments.Last loop declare Directories : Argument_List (1 .. Integer (Patterns.Last (Arguments.Table (J).Directories))); Name_Patterns : Prj.Makr.Regexp_List (1 .. Integer (Patterns.Last (Arguments.Table (J).Name_Patterns))); Excl_Patterns : Prj.Makr.Regexp_List (1 .. Integer (Patterns.Last (Arguments.Table (J).Excluded_Patterns))); Frgn_Patterns : Prj.Makr.Regexp_List (1 .. Integer (Patterns.Last (Arguments.Table (J).Foreign_Patterns))); begin -- Build the Directories and Patterns arguments for Index in Directories'Range loop Directories (Index) := Arguments.Table (J).Directories.Table (Index); end loop; for Index in Name_Patterns'Range loop Name_Patterns (Index) := Compile (Arguments.Table (J).Name_Patterns.Table (Index).all, Glob => True); end loop; for Index in Excl_Patterns'Range loop Excl_Patterns (Index) := Compile (Arguments.Table (J).Excluded_Patterns.Table (Index).all, Glob => True); end loop; for Index in Frgn_Patterns'Range loop Frgn_Patterns (Index) := Compile (Arguments.Table (J).Foreign_Patterns.Table (Index).all, Glob => True); end loop; -- Call Prj.Makr.Process where the real work is done Prj.Makr.Process (Directories => Directories, Name_Patterns => Name_Patterns, Excluded_Patterns => Excl_Patterns, Foreign_Patterns => Frgn_Patterns); end; end loop; -- Finalize Prj.Makr.Finalize; if Opt.Verbose_Mode then Write_Eol; end if; end Gnatname;
32.901935
79
0.508726
df3c143c36bac22ab05d08187c18777503df7240
3,954
adb
Ada
source/xml/sax/xml-sax-parse_exceptions-internals.adb
svn2github/matreshka
9d222b3ad9da508855fb1f5adbe5e8a4fad4c530
[ "BSD-3-Clause" ]
24
2016-11-29T06:59:41.000Z
2021-08-30T11:55:16.000Z
source/xml/sax/xml-sax-parse_exceptions-internals.adb
svn2github/matreshka
9d222b3ad9da508855fb1f5adbe5e8a4fad4c530
[ "BSD-3-Clause" ]
2
2019-01-16T05:15:20.000Z
2019-02-03T10:03:32.000Z
source/xml/sax/xml-sax-parse_exceptions-internals.adb
svn2github/matreshka
9d222b3ad9da508855fb1f5adbe5e8a4fad4c530
[ "BSD-3-Clause" ]
4
2017-07-18T07:11:05.000Z
2020-06-21T03:02:25.000Z
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- XML Processor -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2010, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ package body XML.SAX.Parse_Exceptions.Internals is ------------ -- Create -- ------------ function Create (Public_Id : League.Strings.Universal_String; System_Id : League.Strings.Universal_String; Line : Natural; Column : Natural; Message : League.Strings.Universal_String) return XML.SAX.Parse_Exceptions.SAX_Parse_Exception is begin return (Public_Id => Public_Id, System_Id => System_Id, Line => Line, Column => Column, Message => Message); end Create; end XML.SAX.Parse_Exceptions.Internals;
58.147059
78
0.419828
cb9ba1ea4aafaa81531e16478e6ab3cceef09e56
3,747
ads
Ada
source/amf/mof/amf-reflective_collections-internals.ads
svn2github/matreshka
9d222b3ad9da508855fb1f5adbe5e8a4fad4c530
[ "BSD-3-Clause" ]
24
2016-11-29T06:59:41.000Z
2021-08-30T11:55:16.000Z
source/amf/mof/amf-reflective_collections-internals.ads
svn2github/matreshka
9d222b3ad9da508855fb1f5adbe5e8a4fad4c530
[ "BSD-3-Clause" ]
2
2019-01-16T05:15:20.000Z
2019-02-03T10:03:32.000Z
source/amf/mof/amf-reflective_collections-internals.ads
svn2github/matreshka
9d222b3ad9da508855fb1f5adbe5e8a4fad4c530
[ "BSD-3-Clause" ]
4
2017-07-18T07:11:05.000Z
2020-06-21T03:02:25.000Z
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Ada Modeling Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2011, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with AMF.Internals.Collections; package AMF.Reflective_Collections.Internals is pragma Preelaborate; function Create (Item : not null AMF.Internals.Collections.Shared_Collection_Access) return Reflective_Collection; function Wrap (Item : not null AMF.Internals.Collections.Shared_Collection_Access) return Reflective_Collection; end AMF.Reflective_Collections.Internals;
63.508475
78
0.431278
1094cfe010e7d24349d2c99f0d117d70fe767e95
964
adb
Ada
contrib/gnu/gdb/dist/gdb/testsuite/gdb.ada/bp_range_type/foo.adb
TheSledgeHammer/2.11BSD
fe61f0b9aaa273783cd027c7b5ec77e95ead2153
[ "BSD-3-Clause" ]
3
2021-05-04T17:09:06.000Z
2021-10-04T07:19:26.000Z
contrib/gnu/gdb/dist/gdb/testsuite/gdb.ada/bp_range_type/foo.adb
TheSledgeHammer/2.11BSD
fe61f0b9aaa273783cd027c7b5ec77e95ead2153
[ "BSD-3-Clause" ]
null
null
null
contrib/gnu/gdb/dist/gdb/testsuite/gdb.ada/bp_range_type/foo.adb
TheSledgeHammer/2.11BSD
fe61f0b9aaa273783cd027c7b5ec77e95ead2153
[ "BSD-3-Clause" ]
null
null
null
-- Copyright 2012-2020 Free Software Foundation, Inc. -- -- This program 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 3 of the License, or -- (at your option) any later version. -- -- This program 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 this program. If not, see <http://www.gnu.org/licenses/>. with Pck; use Pck; procedure Foo is type Small is range 0 .. 1000; Small_Value : Small := 10; begin for J in 1 .. 10 loop Small_Value := Small_Value + Small (J); Do_Nothing (Small_Value'Address); -- STOP end loop; end Foo;
35.703704
73
0.710581
d033a1e50a94a07bd07773c01549fa1007092140
2,456
ads
Ada
libpok/ada/arinc653/apex-buffers.ads
sduverger/pok
fd45369eebe4b25242b49ff44030bea891237dbf
[ "BSD-2-Clause" ]
2
2021-01-08T16:46:27.000Z
2021-12-03T06:40:37.000Z
libpok/ada/arinc653/apex-buffers.ads
sduverger/pok
fd45369eebe4b25242b49ff44030bea891237dbf
[ "BSD-2-Clause" ]
null
null
null
libpok/ada/arinc653/apex-buffers.ads
sduverger/pok
fd45369eebe4b25242b49ff44030bea891237dbf
[ "BSD-2-Clause" ]
1
2019-11-29T06:05:19.000Z
2019-11-29T06:05:19.000Z
-- --------------------------------------------------------------------------- -- -- -- BUFFER constant and type definitions and management services -- -- -- -- --------------------------------------------------------------------------- with APEX.Processes; package APEX.Buffers is Max_Number_Of_Buffers : constant := System_Limit_Number_Of_Buffers; subtype Buffer_Name_Type is Name_Type; type Buffer_Id_Type is private; Null_Buffer_Id : constant Buffer_Id_Type; type Buffer_Status_Type is record Nb_Message : Message_Range_Type; Max_Nb_Message : Message_Range_Type; Max_Message_Size : Message_Size_Type; Waiting_Processes : APEX.Processes.Waiting_Range_Type; end record; procedure Create_Buffer (Buffer_Name : in Buffer_Name_Type; Max_Message_Size : in Message_Size_Type; Max_Nb_Message : in Message_Range_Type; Queuing_Discipline : in Queuing_Discipline_Type; Buffer_Id : out Buffer_Id_Type; Return_Code : out Return_Code_Type); procedure Send_Buffer (Buffer_Id : in Buffer_Id_Type; Message_Addr : in Message_Addr_Type; Length : in Message_Size_Type; Time_Out : in System_Time_Type; Return_Code : out Return_Code_Type); procedure Receive_Buffer (Buffer_Id : in Buffer_Id_Type; Time_Out : in System_Time_Type; Message_Addr : in Message_Addr_Type; -- The message address is passed IN, although the respective message is -- passed OUT Length : out Message_Size_Type; Return_Code : out Return_Code_Type); procedure Get_Buffer_Id (Buffer_Name : in Buffer_Name_Type; Buffer_Id : out Buffer_Id_Type; Return_Code : out Return_Code_Type); procedure Get_Buffer_Status (Buffer_Id : in Buffer_Id_Type; Buffer_Status : out Buffer_Status_Type; Return_Code : out Return_Code_Type); private type Buffer_Id_Type is new APEX_Integer; Null_Buffer_Id : constant Buffer_Id_Type := 0; pragma Convention (C, Buffer_Status_Type); -- POK BINDINGS pragma Import (C, Create_Buffer, "CREATE_BUFFER"); pragma Import (C, Send_Buffer, "SEND_BUFFER"); pragma Import (C, Receive_Buffer, "RECEIVE_BUFFER"); pragma Import (C, Get_Buffer_Id, "GET_BUFFER_ID"); pragma Import (C, Get_Buffer_Status, "GET_BUFFER_STATUS"); -- END OF POK BINDINGS end APEX.Buffers;
40.933333
78
0.654316
1c5492ddf3c090155ea0606d8c3dfa5c2972e2e9
5,850
adb
Ada
src/fmt-generic_ordinary_fixed_point_argument.adb
likai3g/afmt
fa7439a69bfde35e746c92ab57307d6a509dabc7
[ "MIT" ]
null
null
null
src/fmt-generic_ordinary_fixed_point_argument.adb
likai3g/afmt
fa7439a69bfde35e746c92ab57307d6a509dabc7
[ "MIT" ]
null
null
null
src/fmt-generic_ordinary_fixed_point_argument.adb
likai3g/afmt
fa7439a69bfde35e746c92ab57307d6a509dabc7
[ "MIT" ]
null
null
null
pragma Ada_2020; with Interfaces; use Interfaces; with Ada.Numerics; with Ada.Numerics.Generic_Elementary_Functions; package body Fmt.Generic_Ordinary_Fixed_Point_Argument is package Math is new Ada.Numerics.Generic_Elementary_Functions(Long_Float); Exp : constant Long_Long_Float := 10.0 ** Fixed_Point_Type'Aft; Scale : constant Long_Long_Float := Fixed_Point_Type'Small * Exp; Int_Scale : constant Long_Long_Integer := Long_Long_Integer(Scale); To_Char : constant array(Unsigned_64 range 0 .. 9) of Character := "0123456789"; type Display_Goal is record N : Unsigned_64; -- a number maybe very big M : Unsigned_64; -- a scale number, maybe very big P : Unsigned_64; -- a patch value, at most two digits end record; type Decimal is record K : Unsigned_64; -- coefficient R : Unsigned_64; -- remainder, one digit end record; -- Dec_Cache : array (Long_Long_Integer range 0 .. 1000) of Decimal := -- [for I in Long_Long_Integer range 0 .. 1000 => (I / 10, I mod 10)]; function To_Long_Long_Integer (X : Fixed_Point_Type) return Long_Long_Integer with Pre => Fixed_Point_Type'Base'Size in 8 | 16 | 32 | 64; function To_Long_Long_Integer (X : Fixed_Point_Type) return Long_Long_Integer is BX : Fixed_Point_Type'Base := X; begin case Fixed_Point_Type'Base'Size is when 8 => declare i : Integer_8 with Address => BX'Address; begin return Long_Long_Integer(i); end; when 16 => declare i : Integer_16 with Address => BX'Address; begin return Long_Long_Integer(i); end; when 32 => declare i : Integer_32 with Address => BX'Address; begin return Long_Long_Integer(i); end; when 64 => declare i : Integer_64 with Address => BX'Address; begin return Long_Long_Integer(i); end; when others => raise Storage_Error; end case; end To_Long_Long_Integer; function Compute_Multiply_Result_Length ( N, M : Long_Long_Integer) return Natural is L : Natural := 0; X : Unsigned_64 := Safe_Abs(N); begin loop L := L + 1; X := X / 10; exit when X = 0; end loop; X := Safe_Abs(M); loop L := L + 1; X := X / 10; exit when X = 0; end loop; if N < 0 then L := L + 1; end if; return L; end Compute_Multiply_Result_Length; function To_Argument (X : Fixed_Point_Type) return Argument_Type'Class is begin return Fixed_Point_Argument_Type'(Value => X, others => <>); end To_Argument; function "&" (Args : Arguments; X : Fixed_Point_Type) return Arguments is begin return Args & To_Argument(X); end "&"; overriding procedure Parse (Self : in out Fixed_Point_Argument_Type; Edit : String) is procedure Conf (K, V : String) is begin if K'Length /= 1 or else V'Length = 0 then return; end if; case K(K'First) is when 'a' => if Is_Decimal_Number(V) then Self.Aft := Natural'Value(V); end if; when 'w' => if Is_Decimal_Number(V) then Self.Width := Natural'Value(V); end if; when others => null; end case; end Conf; begin Parse_KV_Edit(Edit, Conf'Access); end Parse; overriding function Get_Length (Self : in out Fixed_Point_Argument_Type) return Natural is begin if Self.Width /= 0 then return Self.Width; else return Compute_Multiply_Result_Length( N => To_Long_Long_Integer(Self.Value), M => Int_Scale); end if; end Get_Length; function Split (X : Unsigned_64) return Decimal is pragma Inline(Split); begin return (K => X / 10, R => X mod 10); end Split; overriding procedure Put ( Self : in out Fixed_Point_Argument_Type; Edit : String; To : in out String) is Dot_Pos : constant Integer := To'Last - Fixed_Point_Type'Aft; H : constant Natural := To'First; L : Natural := To'Last; V : constant Long_Long_Integer := To_Long_Long_Integer(Self.Value); G : Display_Goal := (Safe_Abs(V), Safe_Abs(Int_Scale), 0); N, M, R, Y : Decimal; procedure Display (Digit : Unsigned_64) is pragma Inline(Display); begin if L = Dot_Pos then To(L) := '.'; L := L - 1; if L < H then return; end if; end if; To(L) := To_Char(Digit); -- To(L) := Character'Val(Digit + Character'Pos('0')); L := L - 1; end Display; begin loop N := Split(G.N); M := Split(G.M); R := Split(N.R * M.R + G.P); Y := Split(N.K * M.R + M.K * N.R + R.K); Display(R.R); exit when L < H; -- To'First; Display(Y.R); exit when L < H; -- To'First; -- adjust next goal G := (N.K, M.K, Y.K); exit when G = (0, 0, 0); end loop; while L + 1 < To'Last loop exit when To(L + 1) /= '0'; To(L + 1) := ' '; L := L + 1; end loop; if V < 0 then To(L) := '-'; L := L - 1; end if; if L >= To'First then To(To'First .. L) := (others => Self.Fill); end if; end Put; end Fmt.Generic_Ordinary_Fixed_Point_Argument;
28.26087
85
0.536068
dc28673e8c5479397afdcb3cdd4e22e4e5552162
1,561
ads
Ada
src/wavefiles_gtk-wavefile_manager.ads
silentTeee/ada_wavefiles_gtk_app
a0c6682131dc4f49a6442fb2a44d906a49d9a18c
[ "MIT" ]
null
null
null
src/wavefiles_gtk-wavefile_manager.ads
silentTeee/ada_wavefiles_gtk_app
a0c6682131dc4f49a6442fb2a44d906a49d9a18c
[ "MIT" ]
2
2021-09-10T16:10:10.000Z
2021-09-15T17:04:48.000Z
src/wavefiles_gtk-wavefile_manager.ads
silentTeee/ada_wavefiles_gtk_app
a0c6682131dc4f49a6442fb2a44d906a49d9a18c
[ "MIT" ]
1
2021-09-09T18:51:02.000Z
2021-09-09T18:51:02.000Z
------------------------------------------------------------------------------- -- -- WAVEFILES GTK APPLICATION -- -- Wavefile Manager -- -- The MIT License (MIT) -- -- Copyright (c) 2017 Gustavo A. Hoffmann -- -- Permission is hereby granted, free of charge, to any person obtaining a copy -- of this software and associated documentation files (the "Software"), to -- deal in the Software without restriction, including without limitation the -- rights to use, copy, modify, merge, publish, distribute, sublicense, and / -- or sell copies of the Software, and to permit persons to whom the Software -- is furnished to do so, subject to the following conditions: -- -- The above copyright notice and this permission notice shall be included in -- all copies or substantial portions of the Software. -- -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -- IN THE SOFTWARE. ------------------------------------------------------------------------------- private package WaveFiles_Gtk.Wavefile_Manager is function Get_Info (Wavefile : String) return String; end WaveFiles_Gtk.Wavefile_Manager;
44.6
79
0.659193
dffadbe1393e7c11439a4824a61bf884e90e3214
3,506
ads
Ada
source/flatten/web-ui-widgets_widgets_slots.ads
godunko/adawebui
ee524325fe701ef0a655cd0624e0ba701f0e8955
[ "BSD-3-Clause" ]
2
2020-01-31T07:00:09.000Z
2021-06-25T15:50:00.000Z
source/flatten/web-ui-widgets_widgets_slots.ads
godunko/adawebui
ee524325fe701ef0a655cd0624e0ba701f0e8955
[ "BSD-3-Clause" ]
null
null
null
source/flatten/web-ui-widgets_widgets_slots.ads
godunko/adawebui
ee524325fe701ef0a655cd0624e0ba701f0e8955
[ "BSD-3-Clause" ]
null
null
null
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Web Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2018-2020, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision: 5870 $ $Date: 2018-09-22 11:46:16 +0200 (Sat, 22 Sep 2018) $ ------------------------------------------------------------------------------ with Web.UI.Slots.Widgets.Widgets; package Web.UI.Widgets_Widgets_Slots renames Web.UI.Slots.Widgets.Widgets;
73.041667
78
0.404164
1c584074f31a4b44fd431b7e8d08270422dc3271
813
ads
Ada
gdb/testsuite/gdb.ada/O2_float_param/caller.ads
greyblue9/binutils-gdb
05377632b124fe7600eea7f4ee0e9a35d1b0cbdc
[ "BSD-3-Clause" ]
1
2020-10-14T03:24:35.000Z
2020-10-14T03:24:35.000Z
gdb/testsuite/gdb.ada/O2_float_param/caller.ads
greyblue9/binutils-gdb
05377632b124fe7600eea7f4ee0e9a35d1b0cbdc
[ "BSD-3-Clause" ]
null
null
null
gdb/testsuite/gdb.ada/O2_float_param/caller.ads
greyblue9/binutils-gdb
05377632b124fe7600eea7f4ee0e9a35d1b0cbdc
[ "BSD-3-Clause" ]
null
null
null
-- Copyright 2013-2021 Free Software Foundation, Inc. -- -- This program 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 3 of the License, or -- (at your option) any later version. -- -- This program 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 this program. If not, see <http://www.gnu.org/licenses/>. package Caller is procedure Verbose_Increment (Val : in out Float; Msg : String); end Caller;
40.65
73
0.738007
1c5beb9dd9934a1ee9182e1d6d769223b2c0af33
387
adb
Ada
eBindings/uuid/tests/gnatcoll-uuid-suite.adb
persan/zeromq-Ada
651ca44cce831c2d717338eab65a60fbfca7ec44
[ "MIT" ]
33
2015-01-16T13:42:55.000Z
2021-11-30T21:28:50.000Z
eBindings/uuid/tests/gnatcoll-uuid-suite.adb
persan/zeromq-Ada
651ca44cce831c2d717338eab65a60fbfca7ec44
[ "MIT" ]
6
2016-03-23T01:26:36.000Z
2021-05-13T04:24:53.000Z
eBindings/uuid/tests/gnatcoll-uuid-suite.adb
persan/zeromq-Ada
651ca44cce831c2d717338eab65a60fbfca7ec44
[ "MIT" ]
5
2016-03-09T20:20:09.000Z
2020-06-17T06:59:39.000Z
with GNATCOLL.uuid.Test; package body GNATCOLL.uuid.Suite is use AUnit.Test_Suites; Result : aliased Test_Suite; Test_1 : aliased GNATCOLL.uuid.Test.Test_Case; ----------- -- Suite -- ----------- function Suite return Access_Test_Suite is begin Add_Test (Result'Access, Test_1'Access); return Result'Access; end Suite; end GNATCOLL.uuid.Suite;
20.368421
49
0.661499
c54a76ea52c87af9bc3265d3120d628a9d995a02
727
ads
Ada
examples/SPARK2005/erfriemann/src/riemann.ads
michalkonecny/polypaver
7a1541a85523f5ecbef44b7f5e09680d9a5c1ca6
[ "BSD-3-Clause" ]
1
2015-07-01T14:50:00.000Z
2015-07-01T14:50:00.000Z
examples/SPARK2005/erfriemann/src/riemann.ads
michalkonecny/polypaver
7a1541a85523f5ecbef44b7f5e09680d9a5c1ca6
[ "BSD-3-Clause" ]
null
null
null
examples/SPARK2005/erfriemann/src/riemann.ads
michalkonecny/polypaver
7a1541a85523f5ecbef44b7f5e09680d9a5c1ca6
[ "BSD-3-Clause" ]
null
null
null
with PolyPaver.Floats; --# inherit PolyPaver.Exact, PolyPaver.Interval, PolyPaver.Integers, PolyPaver.Floats; package Riemann is function erfRiemann(x : Float; n : Integer) return Float; --# pre PolyPaver.Floats.Is_Range(x, 0.0, 4.0) --# and PolyPaver.Integers.Is_Range(n, 1, 100); --# return result => --# PolyPaver.Interval.Contained_In( --# result --# , --# PolyPaver.Exact.Integral(0.0,x,PolyPaver.Exact.Exp(-PolyPaver.Exact.Integration_Variable**2)) --# + --# PolyPaver.Interval.Hull( --# - 0.1*Float(n+1) --# , --# (1.0-PolyPaver.Exact.Exp(-x**2))*x/Float(n) --# + 0.1*Float(n+1) --# ) --# ); end Riemann;
33.045455
105
0.568088
390eadebc8c85b4adb83a18ae712988c722bdb74
1,082
adb
Ada
tests/simpleOO/src/dds-request_reply-tests-simple-server-main.adb
persan/dds-requestreply
226ce4fdeb4cdc65fdb90ea73baf9f012c31b42a
[ "MIT" ]
null
null
null
tests/simpleOO/src/dds-request_reply-tests-simple-server-main.adb
persan/dds-requestreply
226ce4fdeb4cdc65fdb90ea73baf9f012c31b42a
[ "MIT" ]
null
null
null
tests/simpleOO/src/dds-request_reply-tests-simple-server-main.adb
persan/dds-requestreply
226ce4fdeb4cdc65fdb90ea73baf9f012c31b42a
[ "MIT" ]
2
2020-04-06T19:34:15.000Z
2020-04-06T19:50:03.000Z
with DDS.Request_Reply.Tests.Simple.String_Replier; with DDS.Request_Reply.Tests.Simple.Octets_Replier; procedure DDS.Request_Reply.Tests.Simple.Server.Main is Listner : aliased Ref; Octets_Replier : Simple.Octets_Replier.Ref_Access := Simple.Octets_Replier.Create (Participant => Participant, Service_Name => Service_Name_Octets, Library_Name => Qos_Library, Profile_Name => Qos_Profile, A_Listner => Listner'Unchecked_Access, Mask => DDS.STATUS_MASK_ALL); String_Replier : Simple.String_Replier.Ref_Access := Simple.String_Replier.Create (Participant => Participant, Service_Name => Service_Name, Library_Name => Qos_Library, Profile_Name => Qos_Profile, A_Listner => Listner'Unchecked_Access, Mask => DDS.STATUS_MASK_ALL); Service_Time : constant Duration := 60 * 60.0; -- one hour begin delay Service_Time; Simple.String_Replier.Delete (String_Replier); Simple.Octets_Replier.Delete (Octets_Replier); end DDS.Request_Reply.Tests.Simple.Server.Main;
36.066667
84
0.71719
20d7ea34dd70d60923c1474a8a16a82b2b029c58
7,298
ads
Ada
source/nodes/program-nodes-object_renaming_declarations.ads
reznikmm/gela
20134f1d154fb763812e73860c6f4b04f353df79
[ "MIT" ]
null
null
null
source/nodes/program-nodes-object_renaming_declarations.ads
reznikmm/gela
20134f1d154fb763812e73860c6f4b04f353df79
[ "MIT" ]
null
null
null
source/nodes/program-nodes-object_renaming_declarations.ads
reznikmm/gela
20134f1d154fb763812e73860c6f4b04f353df79
[ "MIT" ]
1
2019-10-16T09:05:27.000Z
2019-10-16T09:05:27.000Z
-- SPDX-FileCopyrightText: 2019 Max Reznik <[email protected]> -- -- SPDX-License-Identifier: MIT ------------------------------------------------------------- with Program.Elements.Defining_Identifiers; with Program.Lexical_Elements; with Program.Elements.Expressions; with Program.Elements.Aspect_Specifications; with Program.Elements.Object_Renaming_Declarations; with Program.Element_Visitors; package Program.Nodes.Object_Renaming_Declarations is pragma Preelaborate; type Object_Renaming_Declaration is new Program.Nodes.Node and Program.Elements.Object_Renaming_Declarations .Object_Renaming_Declaration and Program.Elements.Object_Renaming_Declarations .Object_Renaming_Declaration_Text with private; function Create (Names : not null Program.Elements.Defining_Identifiers .Defining_Identifier_Vector_Access; Colon_Token : not null Program.Lexical_Elements .Lexical_Element_Access; Not_Token : Program.Lexical_Elements.Lexical_Element_Access; Null_Token : Program.Lexical_Elements.Lexical_Element_Access; Object_Subtype : not null Program.Elements.Element_Access; Renames_Token : not null Program.Lexical_Elements .Lexical_Element_Access; Renamed_Object : not null Program.Elements.Expressions.Expression_Access; With_Token : Program.Lexical_Elements.Lexical_Element_Access; Aspects : Program.Elements.Aspect_Specifications .Aspect_Specification_Vector_Access; Semicolon_Token : not null Program.Lexical_Elements .Lexical_Element_Access) return Object_Renaming_Declaration; type Implicit_Object_Renaming_Declaration is new Program.Nodes.Node and Program.Elements.Object_Renaming_Declarations .Object_Renaming_Declaration with private; function Create (Names : not null Program.Elements.Defining_Identifiers .Defining_Identifier_Vector_Access; Object_Subtype : not null Program.Elements.Element_Access; Renamed_Object : not null Program.Elements.Expressions .Expression_Access; Aspects : Program.Elements.Aspect_Specifications .Aspect_Specification_Vector_Access; Is_Part_Of_Implicit : Boolean := False; Is_Part_Of_Inherited : Boolean := False; Is_Part_Of_Instance : Boolean := False; Has_Not_Null : Boolean := False) return Implicit_Object_Renaming_Declaration with Pre => Is_Part_Of_Implicit or Is_Part_Of_Inherited or Is_Part_Of_Instance; private type Base_Object_Renaming_Declaration is abstract new Program.Nodes.Node and Program.Elements.Object_Renaming_Declarations .Object_Renaming_Declaration with record Names : not null Program.Elements.Defining_Identifiers .Defining_Identifier_Vector_Access; Object_Subtype : not null Program.Elements.Element_Access; Renamed_Object : not null Program.Elements.Expressions .Expression_Access; Aspects : Program.Elements.Aspect_Specifications .Aspect_Specification_Vector_Access; end record; procedure Initialize (Self : in out Base_Object_Renaming_Declaration'Class); overriding procedure Visit (Self : not null access Base_Object_Renaming_Declaration; Visitor : in out Program.Element_Visitors.Element_Visitor'Class); overriding function Names (Self : Base_Object_Renaming_Declaration) return not null Program.Elements.Defining_Identifiers .Defining_Identifier_Vector_Access; overriding function Object_Subtype (Self : Base_Object_Renaming_Declaration) return not null Program.Elements.Element_Access; overriding function Renamed_Object (Self : Base_Object_Renaming_Declaration) return not null Program.Elements.Expressions.Expression_Access; overriding function Aspects (Self : Base_Object_Renaming_Declaration) return Program.Elements.Aspect_Specifications .Aspect_Specification_Vector_Access; overriding function Is_Object_Renaming_Declaration (Self : Base_Object_Renaming_Declaration) return Boolean; overriding function Is_Declaration (Self : Base_Object_Renaming_Declaration) return Boolean; type Object_Renaming_Declaration is new Base_Object_Renaming_Declaration and Program.Elements.Object_Renaming_Declarations .Object_Renaming_Declaration_Text with record Colon_Token : not null Program.Lexical_Elements .Lexical_Element_Access; Not_Token : Program.Lexical_Elements.Lexical_Element_Access; Null_Token : Program.Lexical_Elements.Lexical_Element_Access; Renames_Token : not null Program.Lexical_Elements .Lexical_Element_Access; With_Token : Program.Lexical_Elements.Lexical_Element_Access; Semicolon_Token : not null Program.Lexical_Elements .Lexical_Element_Access; end record; overriding function To_Object_Renaming_Declaration_Text (Self : in out Object_Renaming_Declaration) return Program.Elements.Object_Renaming_Declarations .Object_Renaming_Declaration_Text_Access; overriding function Colon_Token (Self : Object_Renaming_Declaration) return not null Program.Lexical_Elements.Lexical_Element_Access; overriding function Not_Token (Self : Object_Renaming_Declaration) return Program.Lexical_Elements.Lexical_Element_Access; overriding function Null_Token (Self : Object_Renaming_Declaration) return Program.Lexical_Elements.Lexical_Element_Access; overriding function Renames_Token (Self : Object_Renaming_Declaration) return not null Program.Lexical_Elements.Lexical_Element_Access; overriding function With_Token (Self : Object_Renaming_Declaration) return Program.Lexical_Elements.Lexical_Element_Access; overriding function Semicolon_Token (Self : Object_Renaming_Declaration) return not null Program.Lexical_Elements.Lexical_Element_Access; overriding function Has_Not_Null (Self : Object_Renaming_Declaration) return Boolean; type Implicit_Object_Renaming_Declaration is new Base_Object_Renaming_Declaration with record Is_Part_Of_Implicit : Boolean; Is_Part_Of_Inherited : Boolean; Is_Part_Of_Instance : Boolean; Has_Not_Null : Boolean; end record; overriding function To_Object_Renaming_Declaration_Text (Self : in out Implicit_Object_Renaming_Declaration) return Program.Elements.Object_Renaming_Declarations .Object_Renaming_Declaration_Text_Access; overriding function Is_Part_Of_Implicit (Self : Implicit_Object_Renaming_Declaration) return Boolean; overriding function Is_Part_Of_Inherited (Self : Implicit_Object_Renaming_Declaration) return Boolean; overriding function Is_Part_Of_Instance (Self : Implicit_Object_Renaming_Declaration) return Boolean; overriding function Has_Not_Null (Self : Implicit_Object_Renaming_Declaration) return Boolean; end Program.Nodes.Object_Renaming_Declarations;
38.010417
79
0.748013
df1fd49038cbd207472ebc4e8dad24789340b4b6
4,231
adb
Ada
testsuite/league/case_conversion_test.adb
svn2github/matreshka
9d222b3ad9da508855fb1f5adbe5e8a4fad4c530
[ "BSD-3-Clause" ]
24
2016-11-29T06:59:41.000Z
2021-08-30T11:55:16.000Z
testsuite/league/case_conversion_test.adb
svn2github/matreshka
9d222b3ad9da508855fb1f5adbe5e8a4fad4c530
[ "BSD-3-Clause" ]
2
2019-01-16T05:15:20.000Z
2019-02-03T10:03:32.000Z
testsuite/league/case_conversion_test.adb
svn2github/matreshka
9d222b3ad9da508855fb1f5adbe5e8a4fad4c530
[ "BSD-3-Clause" ]
4
2017-07-18T07:11:05.000Z
2020-06-21T03:02:25.000Z
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Localization, Internationalization, Globalization for Ada -- -- -- -- Testsuite Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2009-2011, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with League.Application; with League.Strings; procedure Case_Conversion_Test is use League.Strings; -- This is a testcase for Final_Sigma context. \u03A3 translated to \u03C3 -- when there is no Final_Sigma context and to \u03C2 in Final_Sigma -- context. S1S : Universal_String := To_Universal_String ('A' & Wide_Wide_Character'Val (16#03A3#) & 'Z'); S1E : constant Wide_Wide_String := 'a' & Wide_Wide_Character'Val (16#03C3#) & 'z'; S2S : Universal_String := To_Universal_String ('A' & Wide_Wide_Character'Val (16#03A3#)); S2E : constant Wide_Wide_String := 'a' & Wide_Wide_Character'Val (16#03C2#); begin if S1S.To_Lowercase.To_Wide_Wide_String /= S1E then raise Program_Error; end if; if S2S.To_Lowercase.To_Wide_Wide_String /= S2E then raise Program_Error; end if; end Case_Conversion_Test;
56.413333
78
0.457811
186e8c28f409734e817bf92c4709e5a45caf9787
35,565
adb
Ada
llvm-gcc-4.2-2.9/gcc/ada/s-taprop-vxworks.adb
vidkidz/crossbridge
ba0bf94aee0ce6cf7eb5be882382e52bc57ba396
[ "MIT" ]
1
2016-04-09T02:58:13.000Z
2016-04-09T02:58:13.000Z
llvm-gcc-4.2-2.9/gcc/ada/s-taprop-vxworks.adb
vidkidz/crossbridge
ba0bf94aee0ce6cf7eb5be882382e52bc57ba396
[ "MIT" ]
null
null
null
llvm-gcc-4.2-2.9/gcc/ada/s-taprop-vxworks.adb
vidkidz/crossbridge
ba0bf94aee0ce6cf7eb5be882382e52bc57ba396
[ "MIT" ]
null
null
null
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS -- -- -- -- S Y S T E M . T A S K _ P R I M I T I V E S . O P E R A T I O N S -- -- -- -- B o d y -- -- -- -- Copyright (C) 1992-2006, Free Software Foundation, Inc. -- -- -- -- GNARL is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 2, or (at your option) any later ver- -- -- sion. GNARL is distributed in the hope that it will be useful, but WITH- -- -- OUT 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 distributed with GNARL; see file COPYING. If not, write -- -- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, -- -- Boston, MA 02110-1301, 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. -- -- -- -- GNARL was developed by the GNARL team at Florida State University. -- -- Extensive contributions were provided by Ada Core Technologies, Inc. -- -- -- ------------------------------------------------------------------------------ -- This is the VxWorks version of this package -- This package contains all the GNULL primitives that interface directly -- with the underlying OS. pragma Polling (Off); -- Turn off polling, we do not want ATC polling to take place during -- tasking operations. It causes infinite loops and other problems. with System.Tasking.Debug; -- used for Known_Tasks with System.Interrupt_Management; -- used for Keep_Unmasked -- Abort_Task_Signal -- Signal_ID -- Initialize_Interrupts with Interfaces.C; with System.Soft_Links; -- used for Abort_Defer/Undefer -- We use System.Soft_Links instead of System.Tasking.Initialization -- because the later is a higher level package that we shouldn't depend on. -- For example when using the restricted run time, it is replaced by -- System.Tasking.Restricted.Stages. with Unchecked_Conversion; with Unchecked_Deallocation; package body System.Task_Primitives.Operations is package SSL renames System.Soft_Links; use System.Tasking.Debug; use System.Tasking; use System.OS_Interface; use System.Parameters; use type Interfaces.C.int; subtype int is System.OS_Interface.int; Relative : constant := 0; ---------------- -- Local Data -- ---------------- -- The followings are logically constants, but need to be initialized at -- run time. Single_RTS_Lock : aliased RTS_Lock; -- This is a lock to allow only one thread of control in the RTS at a -- time; it is used to execute in mutual exclusion from all other tasks. -- Used mainly in Single_Lock mode, but also to protect All_Tasks_List Environment_Task_Id : Task_Id; -- A variable to hold Task_Id for the environment task Unblocked_Signal_Mask : aliased sigset_t; -- The set of signals that should unblocked in all tasks -- The followings are internal configuration constants needed Time_Slice_Val : Integer; pragma Import (C, Time_Slice_Val, "__gl_time_slice_val"); Locking_Policy : Character; pragma Import (C, Locking_Policy, "__gl_locking_policy"); Dispatching_Policy : Character; pragma Import (C, Dispatching_Policy, "__gl_task_dispatching_policy"); Mutex_Protocol : Priority_Type; Foreign_Task_Elaborated : aliased Boolean := True; -- Used to identified fake tasks (i.e., non-Ada Threads) -------------------- -- Local Packages -- -------------------- package Specific is procedure Initialize; pragma Inline (Initialize); -- Initialize task specific data function Is_Valid_Task return Boolean; pragma Inline (Is_Valid_Task); -- Does executing thread have a TCB? procedure Set (Self_Id : Task_Id); pragma Inline (Set); -- Set the self id for the current task procedure Delete; pragma Inline (Delete); -- Delete the task specific data associated with the current task function Self return Task_Id; pragma Inline (Self); -- Return a pointer to the Ada Task Control Block of the calling task end Specific; package body Specific is separate; -- The body of this package is target specific --------------------------------- -- Support for foreign threads -- --------------------------------- function Register_Foreign_Thread (Thread : Thread_Id) return Task_Id; -- Allocate and Initialize a new ATCB for the current Thread function Register_Foreign_Thread (Thread : Thread_Id) return Task_Id is separate; ----------------------- -- Local Subprograms -- ----------------------- procedure Abort_Handler (signo : Signal); -- Handler for the abort (SIGABRT) signal to handle asynchronous abort procedure Install_Signal_Handlers; -- Install the default signal handlers for the current task function To_Address is new Unchecked_Conversion (Task_Id, System.Address); ------------------- -- Abort_Handler -- ------------------- procedure Abort_Handler (signo : Signal) is pragma Unreferenced (signo); Self_ID : constant Task_Id := Self; Result : int; Old_Set : aliased sigset_t; begin -- It is not safe to raise an exception when using ZCX and the GCC -- exception handling mechanism. if ZCX_By_Default and then GCC_ZCX_Support then return; end if; if Self_ID.Deferral_Level = 0 and then Self_ID.Pending_ATC_Level < Self_ID.ATC_Nesting_Level and then not Self_ID.Aborting then Self_ID.Aborting := True; -- Make sure signals used for RTS internal purpose are unmasked Result := pthread_sigmask (SIG_UNBLOCK, Unblocked_Signal_Mask'Unchecked_Access, Old_Set'Unchecked_Access); pragma Assert (Result = 0); raise Standard'Abort_Signal; end if; end Abort_Handler; ----------------- -- Stack_Guard -- ----------------- procedure Stack_Guard (T : ST.Task_Id; On : Boolean) is pragma Unreferenced (T); pragma Unreferenced (On); begin -- Nothing needed (why not???) null; end Stack_Guard; ------------------- -- Get_Thread_Id -- ------------------- function Get_Thread_Id (T : ST.Task_Id) return OSI.Thread_Id is begin return T.Common.LL.Thread; end Get_Thread_Id; ---------- -- Self -- ---------- function Self return Task_Id renames Specific.Self; ----------------------------- -- Install_Signal_Handlers -- ----------------------------- procedure Install_Signal_Handlers is act : aliased struct_sigaction; old_act : aliased struct_sigaction; Tmp_Set : aliased sigset_t; Result : int; begin act.sa_flags := 0; act.sa_handler := Abort_Handler'Address; Result := sigemptyset (Tmp_Set'Access); pragma Assert (Result = 0); act.sa_mask := Tmp_Set; Result := sigaction (Signal (Interrupt_Management.Abort_Task_Signal), act'Unchecked_Access, old_act'Unchecked_Access); pragma Assert (Result = 0); Interrupt_Management.Initialize_Interrupts; end Install_Signal_Handlers; --------------------- -- Initialize_Lock -- --------------------- procedure Initialize_Lock (Prio : System.Any_Priority; L : access Lock) is begin L.Mutex := semMCreate (SEM_Q_PRIORITY + SEM_INVERSION_SAFE); L.Prio_Ceiling := int (Prio); L.Protocol := Mutex_Protocol; pragma Assert (L.Mutex /= 0); end Initialize_Lock; procedure Initialize_Lock (L : access RTS_Lock; Level : Lock_Level) is pragma Unreferenced (Level); begin L.Mutex := semMCreate (SEM_Q_PRIORITY + SEM_INVERSION_SAFE); L.Prio_Ceiling := int (System.Any_Priority'Last); L.Protocol := Mutex_Protocol; pragma Assert (L.Mutex /= 0); end Initialize_Lock; ------------------- -- Finalize_Lock -- ------------------- procedure Finalize_Lock (L : access Lock) is Result : int; begin Result := semDelete (L.Mutex); pragma Assert (Result = 0); end Finalize_Lock; procedure Finalize_Lock (L : access RTS_Lock) is Result : int; begin Result := semDelete (L.Mutex); pragma Assert (Result = 0); end Finalize_Lock; ---------------- -- Write_Lock -- ---------------- procedure Write_Lock (L : access Lock; Ceiling_Violation : out Boolean) is Result : int; begin if L.Protocol = Prio_Protect and then int (Self.Common.Current_Priority) > L.Prio_Ceiling then Ceiling_Violation := True; return; else Ceiling_Violation := False; end if; Result := semTake (L.Mutex, WAIT_FOREVER); pragma Assert (Result = 0); end Write_Lock; procedure Write_Lock (L : access RTS_Lock; Global_Lock : Boolean := False) is Result : int; begin if not Single_Lock or else Global_Lock then Result := semTake (L.Mutex, WAIT_FOREVER); pragma Assert (Result = 0); end if; end Write_Lock; procedure Write_Lock (T : Task_Id) is Result : int; begin if not Single_Lock then Result := semTake (T.Common.LL.L.Mutex, WAIT_FOREVER); pragma Assert (Result = 0); end if; end Write_Lock; --------------- -- Read_Lock -- --------------- procedure Read_Lock (L : access Lock; Ceiling_Violation : out Boolean) is begin Write_Lock (L, Ceiling_Violation); end Read_Lock; ------------ -- Unlock -- ------------ procedure Unlock (L : access Lock) is Result : int; begin Result := semGive (L.Mutex); pragma Assert (Result = 0); end Unlock; procedure Unlock (L : access RTS_Lock; Global_Lock : Boolean := False) is Result : int; begin if not Single_Lock or else Global_Lock then Result := semGive (L.Mutex); pragma Assert (Result = 0); end if; end Unlock; procedure Unlock (T : Task_Id) is Result : int; begin if not Single_Lock then Result := semGive (T.Common.LL.L.Mutex); pragma Assert (Result = 0); end if; end Unlock; ----------- -- Sleep -- ----------- procedure Sleep (Self_ID : Task_Id; Reason : System.Tasking.Task_States) is pragma Unreferenced (Reason); Result : int; begin pragma Assert (Self_ID = Self); -- Release the mutex before sleeping if Single_Lock then Result := semGive (Single_RTS_Lock.Mutex); else Result := semGive (Self_ID.Common.LL.L.Mutex); end if; pragma Assert (Result = 0); -- Perform a blocking operation to take the CV semaphore. Note that a -- blocking operation in VxWorks will reenable task scheduling. When we -- are no longer blocked and control is returned, task scheduling will -- again be disabled. Result := semTake (Self_ID.Common.LL.CV, WAIT_FOREVER); pragma Assert (Result = 0); -- Take the mutex back if Single_Lock then Result := semTake (Single_RTS_Lock.Mutex, WAIT_FOREVER); else Result := semTake (Self_ID.Common.LL.L.Mutex, WAIT_FOREVER); end if; pragma Assert (Result = 0); end Sleep; ----------------- -- Timed_Sleep -- ----------------- -- This is for use within the run-time system, so abort is assumed to be -- already deferred, and the caller should be holding its own ATCB lock. procedure Timed_Sleep (Self_ID : Task_Id; Time : Duration; Mode : ST.Delay_Modes; Reason : System.Tasking.Task_States; Timedout : out Boolean; Yielded : out Boolean) is pragma Unreferenced (Reason); Orig : constant Duration := Monotonic_Clock; Absolute : Duration; Ticks : int; Result : int; Wakeup : Boolean := False; begin Timedout := False; Yielded := True; if Mode = Relative then Absolute := Orig + Time; -- Systematically add one since the first tick will delay *at most* -- 1 / Rate_Duration seconds, so we need to add one to be on the -- safe side. Ticks := To_Clock_Ticks (Time); if Ticks > 0 and then Ticks < int'Last then Ticks := Ticks + 1; end if; else Absolute := Time; Ticks := To_Clock_Ticks (Time - Monotonic_Clock); end if; if Ticks > 0 then loop -- Release the mutex before sleeping if Single_Lock then Result := semGive (Single_RTS_Lock.Mutex); else Result := semGive (Self_ID.Common.LL.L.Mutex); end if; pragma Assert (Result = 0); -- Perform a blocking operation to take the CV semaphore. Note -- that a blocking operation in VxWorks will reenable task -- scheduling. When we are no longer blocked and control is -- returned, task scheduling will again be disabled. Result := semTake (Self_ID.Common.LL.CV, Ticks); if Result = 0 then -- Somebody may have called Wakeup for us Wakeup := True; else if errno /= S_objLib_OBJ_TIMEOUT then Wakeup := True; else -- If Ticks = int'last, it was most probably truncated so -- let's make another round after recomputing Ticks from -- the the absolute time. if Ticks /= int'Last then Timedout := True; else Ticks := To_Clock_Ticks (Absolute - Monotonic_Clock); if Ticks < 0 then Timedout := True; end if; end if; end if; end if; -- Take the mutex back if Single_Lock then Result := semTake (Single_RTS_Lock.Mutex, WAIT_FOREVER); else Result := semTake (Self_ID.Common.LL.L.Mutex, WAIT_FOREVER); end if; pragma Assert (Result = 0); exit when Timedout or Wakeup; end loop; else Timedout := True; -- Should never hold a lock while yielding if Single_Lock then Result := semGive (Single_RTS_Lock.Mutex); taskDelay (0); Result := semTake (Single_RTS_Lock.Mutex, WAIT_FOREVER); else Result := semGive (Self_ID.Common.LL.L.Mutex); taskDelay (0); Result := semTake (Self_ID.Common.LL.L.Mutex, WAIT_FOREVER); end if; end if; end Timed_Sleep; ----------------- -- Timed_Delay -- ----------------- -- This is for use in implementing delay statements, so we assume the -- caller is holding no locks. procedure Timed_Delay (Self_ID : Task_Id; Time : Duration; Mode : ST.Delay_Modes) is Orig : constant Duration := Monotonic_Clock; Absolute : Duration; Ticks : int; Timedout : Boolean; Result : int; Aborted : Boolean := False; begin if Mode = Relative then Absolute := Orig + Time; Ticks := To_Clock_Ticks (Time); if Ticks > 0 and then Ticks < int'Last then -- First tick will delay anytime between 0 and 1 / sysClkRateGet -- seconds, so we need to add one to be on the safe side. Ticks := Ticks + 1; end if; else Absolute := Time; Ticks := To_Clock_Ticks (Time - Orig); end if; if Ticks > 0 then -- Modifying State and Pending_Priority_Change, locking the TCB if Single_Lock then Result := semTake (Single_RTS_Lock.Mutex, WAIT_FOREVER); else Result := semTake (Self_ID.Common.LL.L.Mutex, WAIT_FOREVER); end if; pragma Assert (Result = 0); Self_ID.Common.State := Delay_Sleep; Timedout := False; loop if Self_ID.Pending_Priority_Change then Self_ID.Pending_Priority_Change := False; Self_ID.Common.Base_Priority := Self_ID.New_Base_Priority; Set_Priority (Self_ID, Self_ID.Common.Base_Priority); end if; Aborted := Self_ID.Pending_ATC_Level < Self_ID.ATC_Nesting_Level; -- Release the TCB before sleeping if Single_Lock then Result := semGive (Single_RTS_Lock.Mutex); else Result := semGive (Self_ID.Common.LL.L.Mutex); end if; pragma Assert (Result = 0); exit when Aborted; Result := semTake (Self_ID.Common.LL.CV, Ticks); if Result /= 0 then -- If Ticks = int'last, it was most probably truncated -- so let's make another round after recomputing Ticks -- from the the absolute time. if errno = S_objLib_OBJ_TIMEOUT and then Ticks /= int'Last then Timedout := True; else Ticks := To_Clock_Ticks (Absolute - Monotonic_Clock); if Ticks < 0 then Timedout := True; end if; end if; end if; -- Take back the lock after having slept, to protect further -- access to Self_ID. if Single_Lock then Result := semTake (Single_RTS_Lock.Mutex, WAIT_FOREVER); else Result := semTake (Self_ID.Common.LL.L.Mutex, WAIT_FOREVER); end if; pragma Assert (Result = 0); exit when Timedout; end loop; Self_ID.Common.State := Runnable; if Single_Lock then Result := semGive (Single_RTS_Lock.Mutex); else Result := semGive (Self_ID.Common.LL.L.Mutex); end if; else taskDelay (0); end if; end Timed_Delay; --------------------- -- Monotonic_Clock -- --------------------- function Monotonic_Clock return Duration is TS : aliased timespec; Result : int; begin Result := clock_gettime (CLOCK_REALTIME, TS'Unchecked_Access); pragma Assert (Result = 0); return To_Duration (TS); end Monotonic_Clock; ------------------- -- RT_Resolution -- ------------------- function RT_Resolution return Duration is begin return 1.0 / Duration (sysClkRateGet); end RT_Resolution; ------------ -- Wakeup -- ------------ procedure Wakeup (T : Task_Id; Reason : System.Tasking.Task_States) is pragma Unreferenced (Reason); Result : int; begin Result := semGive (T.Common.LL.CV); pragma Assert (Result = 0); end Wakeup; ----------- -- Yield -- ----------- procedure Yield (Do_Yield : Boolean := True) is pragma Unreferenced (Do_Yield); Result : int; pragma Unreferenced (Result); begin Result := taskDelay (0); end Yield; ------------------ -- Set_Priority -- ------------------ type Prio_Array_Type is array (System.Any_Priority) of Integer; pragma Atomic_Components (Prio_Array_Type); Prio_Array : Prio_Array_Type; -- Global array containing the id of the currently running task for -- each priority. Note that we assume that we are on a single processor -- with run-till-blocked scheduling. procedure Set_Priority (T : Task_Id; Prio : System.Any_Priority; Loss_Of_Inheritance : Boolean := False) is Array_Item : Integer; Result : int; begin Result := taskPrioritySet (T.Common.LL.Thread, To_VxWorks_Priority (int (Prio))); pragma Assert (Result = 0); if Dispatching_Policy = 'F' then -- Annex D requirement [RM D.2.2 par. 9]: -- If the task drops its priority due to the loss of inherited -- priority, it is added at the head of the ready queue for its -- new active priority. if Loss_Of_Inheritance and then Prio < T.Common.Current_Priority then Array_Item := Prio_Array (T.Common.Base_Priority) + 1; Prio_Array (T.Common.Base_Priority) := Array_Item; loop -- Give some processes a chance to arrive taskDelay (0); -- Then wait for our turn to proceed exit when Array_Item = Prio_Array (T.Common.Base_Priority) or else Prio_Array (T.Common.Base_Priority) = 1; end loop; Prio_Array (T.Common.Base_Priority) := Prio_Array (T.Common.Base_Priority) - 1; end if; end if; T.Common.Current_Priority := Prio; end Set_Priority; ------------------ -- Get_Priority -- ------------------ function Get_Priority (T : Task_Id) return System.Any_Priority is begin return T.Common.Current_Priority; end Get_Priority; ---------------- -- Enter_Task -- ---------------- procedure Enter_Task (Self_ID : Task_Id) is procedure Init_Float; pragma Import (C, Init_Float, "__gnat_init_float"); -- Properly initializes the FPU for PPC/MIPS systems begin Self_ID.Common.LL.Thread := taskIdSelf; Specific.Set (Self_ID); Init_Float; -- Install the signal handlers -- This is called for each task since there is no signal inheritance -- between VxWorks tasks. Install_Signal_Handlers; Lock_RTS; for J in Known_Tasks'Range loop if Known_Tasks (J) = null then Known_Tasks (J) := Self_ID; Self_ID.Known_Tasks_Index := J; exit; end if; end loop; Unlock_RTS; end Enter_Task; -------------- -- New_ATCB -- -------------- function New_ATCB (Entry_Num : Task_Entry_Index) return Task_Id is begin return new Ada_Task_Control_Block (Entry_Num); end New_ATCB; ------------------- -- Is_Valid_Task -- ------------------- function Is_Valid_Task return Boolean renames Specific.Is_Valid_Task; ----------------------------- -- Register_Foreign_Thread -- ----------------------------- function Register_Foreign_Thread return Task_Id is begin if Is_Valid_Task then return Self; else return Register_Foreign_Thread (taskIdSelf); end if; end Register_Foreign_Thread; -------------------- -- Initialize_TCB -- -------------------- procedure Initialize_TCB (Self_ID : Task_Id; Succeeded : out Boolean) is begin Self_ID.Common.LL.CV := semBCreate (SEM_Q_PRIORITY, SEM_EMPTY); Self_ID.Common.LL.Thread := 0; if Self_ID.Common.LL.CV = 0 then Succeeded := False; else Succeeded := True; if not Single_Lock then Initialize_Lock (Self_ID.Common.LL.L'Access, ATCB_Level); end if; end if; end Initialize_TCB; ----------------- -- Create_Task -- ----------------- procedure Create_Task (T : Task_Id; Wrapper : System.Address; Stack_Size : System.Parameters.Size_Type; Priority : System.Any_Priority; Succeeded : out Boolean) is Adjusted_Stack_Size : size_t; begin -- Ask for four extra bytes of stack space so that the ATCB pointer can -- be stored below the stack limit, plus extra space for the frame of -- Task_Wrapper. This is so the user gets the amount of stack requested -- exclusive of the needs. -- We also have to allocate n more bytes for the task name storage and -- enough space for the Wind Task Control Block which is around 0x778 -- bytes. VxWorks also seems to carve out additional space, so use 2048 -- as a nice round number. We might want to increment to the nearest -- page size in case we ever support VxVMI. -- ??? - we should come back and visit this so we can set the task name -- to something appropriate. Adjusted_Stack_Size := size_t (Stack_Size) + 2048; -- Since the initial signal mask of a thread is inherited from the -- creator, and the Environment task has all its signals masked, we do -- not need to manipulate caller's signal mask at this point. All tasks -- in RTS will have All_Tasks_Mask initially. if T.Common.Task_Image_Len = 0 then T.Common.LL.Thread := taskSpawn (System.Null_Address, To_VxWorks_Priority (int (Priority)), VX_FP_TASK, Adjusted_Stack_Size, Wrapper, To_Address (T)); else declare Name : aliased String (1 .. T.Common.Task_Image_Len + 1); begin Name (1 .. Name'Last - 1) := T.Common.Task_Image (1 .. T.Common.Task_Image_Len); Name (Name'Last) := ASCII.NUL; T.Common.LL.Thread := taskSpawn (Name'Address, To_VxWorks_Priority (int (Priority)), VX_FP_TASK, Adjusted_Stack_Size, Wrapper, To_Address (T)); end; end if; if T.Common.LL.Thread = -1 then Succeeded := False; else Succeeded := True; end if; Task_Creation_Hook (T.Common.LL.Thread); Set_Priority (T, Priority); end Create_Task; ------------------ -- Finalize_TCB -- ------------------ procedure Finalize_TCB (T : Task_Id) is Result : int; Tmp : Task_Id := T; Is_Self : constant Boolean := (T = Self); procedure Free is new Unchecked_Deallocation (Ada_Task_Control_Block, Task_Id); begin if not Single_Lock then Result := semDelete (T.Common.LL.L.Mutex); pragma Assert (Result = 0); end if; T.Common.LL.Thread := 0; Result := semDelete (T.Common.LL.CV); pragma Assert (Result = 0); if T.Known_Tasks_Index /= -1 then Known_Tasks (T.Known_Tasks_Index) := null; end if; Free (Tmp); if Is_Self then Specific.Delete; end if; end Finalize_TCB; --------------- -- Exit_Task -- --------------- procedure Exit_Task is begin Specific.Set (null); end Exit_Task; ---------------- -- Abort_Task -- ---------------- procedure Abort_Task (T : Task_Id) is Result : int; begin Result := kill (T.Common.LL.Thread, Signal (Interrupt_Management.Abort_Task_Signal)); pragma Assert (Result = 0); end Abort_Task; ---------------- -- Initialize -- ---------------- procedure Initialize (S : in out Suspension_Object) is begin -- Initialize internal state. It is always initialized to False (ARM -- D.10 par. 6). S.State := False; S.Waiting := False; -- Initialize internal mutex -- Use simpler binary semaphore instead of VxWorks -- mutual exclusion semaphore, because we don't need -- the fancier semantics and their overhead. S.L := semBCreate (SEM_Q_FIFO, SEM_FULL); -- Initialize internal condition variable S.CV := semBCreate (SEM_Q_FIFO, SEM_EMPTY); end Initialize; -------------- -- Finalize -- -------------- procedure Finalize (S : in out Suspension_Object) is Result : STATUS; begin -- Destroy internal mutex Result := semDelete (S.L); pragma Assert (Result = OK); -- Destroy internal condition variable Result := semDelete (S.CV); pragma Assert (Result = OK); end Finalize; ------------------- -- Current_State -- ------------------- function Current_State (S : Suspension_Object) return Boolean is begin -- We do not want to use lock on this read operation. State is marked -- as Atomic so that we ensure that the value retrieved is correct. return S.State; end Current_State; --------------- -- Set_False -- --------------- procedure Set_False (S : in out Suspension_Object) is Result : STATUS; begin SSL.Abort_Defer.all; Result := semTake (S.L, WAIT_FOREVER); pragma Assert (Result = OK); S.State := False; Result := semGive (S.L); pragma Assert (Result = OK); SSL.Abort_Undefer.all; end Set_False; -------------- -- Set_True -- -------------- procedure Set_True (S : in out Suspension_Object) is Result : STATUS; begin SSL.Abort_Defer.all; Result := semTake (S.L, WAIT_FOREVER); pragma Assert (Result = OK); -- If there is already a task waiting on this suspension object then -- we resume it, leaving the state of the suspension object to False, -- as it is specified in ARM D.10 par. 9. Otherwise, it just leaves -- the state to True. if S.Waiting then S.Waiting := False; S.State := False; Result := semGive (S.CV); pragma Assert (Result = OK); else S.State := True; end if; Result := semGive (S.L); pragma Assert (Result = OK); SSL.Abort_Undefer.all; end Set_True; ------------------------ -- Suspend_Until_True -- ------------------------ procedure Suspend_Until_True (S : in out Suspension_Object) is Result : STATUS; begin SSL.Abort_Defer.all; Result := semTake (S.L, WAIT_FOREVER); if S.Waiting then -- Program_Error must be raised upon calling Suspend_Until_True -- if another task is already waiting on that suspension object -- (ARM D.10 par. 10). Result := semGive (S.L); pragma Assert (Result = OK); SSL.Abort_Undefer.all; raise Program_Error; else -- Suspend the task if the state is False. Otherwise, the task -- continues its execution, and the state of the suspension object -- is set to False (ARM D.10 par. 9). if S.State then S.State := False; Result := semGive (S.L); pragma Assert (Result = 0); SSL.Abort_Undefer.all; else S.Waiting := True; -- Release the mutex before sleeping Result := semGive (S.L); pragma Assert (Result = OK); SSL.Abort_Undefer.all; Result := semTake (S.CV, WAIT_FOREVER); pragma Assert (Result = 0); end if; end if; end Suspend_Until_True; ---------------- -- Check_Exit -- ---------------- -- Dummy version function Check_Exit (Self_ID : ST.Task_Id) return Boolean is pragma Unreferenced (Self_ID); begin return True; end Check_Exit; -------------------- -- Check_No_Locks -- -------------------- function Check_No_Locks (Self_ID : ST.Task_Id) return Boolean is pragma Unreferenced (Self_ID); begin return True; end Check_No_Locks; ---------------------- -- Environment_Task -- ---------------------- function Environment_Task return Task_Id is begin return Environment_Task_Id; end Environment_Task; -------------- -- Lock_RTS -- -------------- procedure Lock_RTS is begin Write_Lock (Single_RTS_Lock'Access, Global_Lock => True); end Lock_RTS; ---------------- -- Unlock_RTS -- ---------------- procedure Unlock_RTS is begin Unlock (Single_RTS_Lock'Access, Global_Lock => True); end Unlock_RTS; ------------------ -- Suspend_Task -- ------------------ function Suspend_Task (T : ST.Task_Id; Thread_Self : Thread_Id) return Boolean is begin if T.Common.LL.Thread /= 0 and then T.Common.LL.Thread /= Thread_Self then return taskSuspend (T.Common.LL.Thread) = 0; else return True; end if; end Suspend_Task; ----------------- -- Resume_Task -- ----------------- function Resume_Task (T : ST.Task_Id; Thread_Self : Thread_Id) return Boolean is begin if T.Common.LL.Thread /= 0 and then T.Common.LL.Thread /= Thread_Self then return taskResume (T.Common.LL.Thread) = 0; else return True; end if; end Resume_Task; ---------------- -- Initialize -- ---------------- procedure Initialize (Environment_Task : Task_Id) is Result : int; begin Environment_Task_Id := Environment_Task; Interrupt_Management.Initialize; Specific.Initialize; if Locking_Policy = 'C' then Mutex_Protocol := Prio_Protect; elsif Locking_Policy = 'I' then Mutex_Protocol := Prio_Inherit; else Mutex_Protocol := Prio_None; end if; if Time_Slice_Val > 0 then Result := Set_Time_Slice (To_Clock_Ticks (Duration (Time_Slice_Val) / Duration (1_000_000.0))); end if; Result := sigemptyset (Unblocked_Signal_Mask'Access); pragma Assert (Result = 0); for J in Interrupt_Management.Signal_ID loop if System.Interrupt_Management.Keep_Unmasked (J) then Result := sigaddset (Unblocked_Signal_Mask'Access, Signal (J)); pragma Assert (Result = 0); end if; end loop; -- Initialize the lock used to synchronize chain of all ATCBs Initialize_Lock (Single_RTS_Lock'Access, RTS_Lock_Level); Enter_Task (Environment_Task); end Initialize; end System.Task_Primitives.Operations;
28.048107
78
0.560045
dc2dffa1add588edda5702d46901838463ff1659
1,073
ads
Ada
awa/plugins/awa-mail/src/awa-mail-components-factory.ads
My-Colaborations/ada-awa
cc2dee291a14e4df0dbc9c10285bf284a7f1caa8
[ "Apache-2.0" ]
81
2015-01-18T23:02:30.000Z
2022-03-19T17:34:57.000Z
awa/plugins/awa-mail/src/awa-mail-components-factory.ads
My-Colaborations/ada-awa
cc2dee291a14e4df0dbc9c10285bf284a7f1caa8
[ "Apache-2.0" ]
20
2015-12-09T19:26:19.000Z
2022-03-23T14:32:43.000Z
awa/plugins/awa-mail/src/awa-mail-components-factory.ads
My-Colaborations/ada-awa
cc2dee291a14e4df0dbc9c10285bf284a7f1caa8
[ "Apache-2.0" ]
16
2015-06-29T02:44:06.000Z
2021-09-23T18:47:50.000Z
----------------------------------------------------------------------- -- awa-mail-components-factory -- Mail UI Component Factory -- Copyright (C) 2012 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with ASF.Factory; package AWA.Mail.Components.Factory is -- Get the AWA Mail component factory. function Definition return ASF.Factory.Factory_Bindings_Access; end AWA.Mail.Components.Factory;
41.269231
76
0.647717
39575a1d7d36efba9c8c712b5383177b707f1bd9
367
adb
Ada
src/sparknacl-sanitize_gf32.adb
yannickmoy/SPARKNaCl
c27fa811bf38b3706c1dc242f30e82967ad8f1c6
[ "BSD-2-Clause" ]
76
2020-02-24T20:30:15.000Z
2022-02-16T15:10:56.000Z
src/sparknacl-sanitize_gf32.adb
yannickmoy/SPARKNaCl
c27fa811bf38b3706c1dc242f30e82967ad8f1c6
[ "BSD-2-Clause" ]
10
2020-04-15T10:02:49.000Z
2022-02-24T20:10:46.000Z
src/sparknacl-sanitize_gf32.adb
yannickmoy/SPARKNaCl
c27fa811bf38b3706c1dc242f30e82967ad8f1c6
[ "BSD-2-Clause" ]
4
2020-03-10T15:19:45.000Z
2022-02-17T09:46:20.000Z
separate (SPARKNaCl) procedure Sanitize_GF32 (R : out GF32) is begin R := GF32'(others => 0); pragma Inspection_Point (R); -- See RM H3.2 (9) -- Add target-dependent code here to -- 1. flush and invalidate data cache, -- 2. wait until writes have committed (e.g. a memory-fence instruction) -- 3. whatever else is required. end Sanitize_GF32;
30.583333
76
0.673025
394eeba23f015af128f6f29b31120a03c0549e65
8,769
adb
Ada
example_2.2/src/graphic_data.adb
rogermc2/GA_Ada
0b55eb5691ac1c543c79c9a06ffdbe2e47e8f1be
[ "ISC" ]
3
2019-04-12T01:09:55.000Z
2021-02-24T18:17:32.000Z
example_2.2/src/graphic_data.adb
rogermc2/GA_Ada
0b55eb5691ac1c543c79c9a06ffdbe2e47e8f1be
[ "ISC" ]
1
2020-08-12T10:10:25.000Z
2020-08-12T10:10:25.000Z
example_2.2/src/graphic_data.adb
rogermc2/GA_Ada
0b55eb5691ac1c543c79c9a06ffdbe2e47e8f1be
[ "ISC" ]
1
2019-04-12T01:14:15.000Z
2019-04-12T01:14:15.000Z
with Ada.Containers.Doubly_Linked_Lists; with Ada.Text_IO; use Ada.Text_IO; with GL.Attributes; with GL.Culling; with GL.Objects.Buffers; with GL.Objects.Programs; with GL.Objects.Vertex_Arrays; with GL.Rasterization; with GL.Toggles; with GL.Types.Colors; with GL.Uniforms; with GL_Enums_Feedback; with GL_Util; with Maths; with GA_Draw; with GLUT_API; with Multivectors; package body Graphic_Data is use GL.Types; type Feedback is record Token : GL_Enums_Feedback.Feed_Back_Token; Vertex_1X : Float; Vertex_1Y : Float; Vertex_1Z : Float; Vertex_2X : Float; Vertex_2Y : Float; Vertex_2Z : Float; Vertex_3X : Float; Vertex_3Y : Float; Vertex_3Z : Float; end record; -- Buffer for OpenGL feedback package Buffer_Package is new Ada.Containers.Doubly_Linked_Lists (Element_Type => Feedback); type Buffer_List is new Buffer_Package.List with null record; package Indices_Package is new Ada.Containers.Doubly_Linked_Lists (Element_Type => Integer); type Indices_List is new Indices_Package.List with null record; package Vertices_Package is new Ada.Containers.Doubly_Linked_Lists (Element_Type => Multivectors.Vector); type Vertices_List is new Vertices_Package.List with null record; procedure Get_GLUT_Model_2D (Render_Program : GL.Objects.Programs.Program; Model_Name : Ada.Strings.Unbounded.Unbounded_String; Model_Rotor : Multivectors.Rotor) is use GL_Enums_Feedback; use GL.Types.Singles; Screen_Width : constant Float := 1600.0; MV_Matrix_ID : GL.Uniforms.Uniform; Projection_Matrix_ID : GL.Uniforms.Uniform; Colour_Location : GL.Uniforms.Uniform; Model_View_Matrix : GL.Types.Singles.Matrix4 := GL.Types.Singles.Identity4; Translation_Matrix : Singles.Matrix4; Projection_Matrix : Singles.Matrix4; Feedback_Buffer : GL.Objects.Buffers.Buffer; Feedback_Array_Object : GL.Objects.Vertex_Arrays.Vertex_Array_Object; Indices : Indices_List; Colour : constant GL.Types.Colors.Color := (0.0, 0.0, 0.0, 0.0); Num_Vertices : Integer; G_Vertices_2D : Vertices_List; Index : Integer := 0; begin -- DONT cull faces (we will do this ourselves!) GL.Toggles.Disable (GL.Toggles.Cull_Face); -- fill all polygons (otherwise they get turned into LINES GL.Rasterization.Set_Polygon_Mode (GL.Rasterization.Fill); -- setup projection & transform for the model: -- glFrustum (-(float)g_viewportWidth / screenWidth, (float)g_viewportWidth / screenWidth, -- -(float)g_viewportHeight / screenWidth, (float)g_viewportHeight / screenWidth, -- 1.0, 100.0); GA_Draw.Init_Projection_Matrix (Projection_Matrix, 1.0, 100.0); Translation_Matrix := Maths.Translation_Matrix ((0.0, 0.0, -10.0)); GL_Util.Rotor_GL_Multiply (Model_Rotor, Model_View_Matrix); Model_View_Matrix := Translation_Matrix * Model_View_Matrix; GA_Draw.Graphic_Shader_Locations (Render_Program, MV_Matrix_ID, Projection_Matrix_ID, Colour_Location); GL.Uniforms.Set_Single (MV_Matrix_ID, Model_View_Matrix); GL.Uniforms.Set_Single (Projection_Matrix_ID, Projection_Matrix); -- buffer for OpenGL feedback, format will be: -- GL_POLYGON_TOKEN -- n (= 3) -- vertex 0 x, vertex 0 y -- vertex 1 x, vertex 1 y -- vertex 2 x, vertex 2 y -- GL_POLYGON_TOKEN etc etc -- std::vector<GLfloat> buffer(300000); // more than enough for the GLUT primitives -- switch into feedback mode: -- glFeedbackBuffer((GLsizei)buffer.size(), GL_2D, &(buffer[0])); -- glRenderMode(GL_FEEDBACK); Feedback_Buffer.Initialize_Id; Feedback_Array_Object.Bind; GL.Objects.Buffers.Transform_Feedback_Buffer.Bind (Feedback_Buffer); -- GL.Attributes.Enable_Vertex_Attrib_Array (0); GL.Objects.Programs.Begin_Transform_Feedback (Triangles); -- Render model if Model_Name = "teapot" then Solid_Teapot (1.0); elsif Model_Name = "cube" then Solid_Cube (1.0); elsif Model_Name = "sphere" then Solid_Sphere (1.0, 16, 8); elsif Model_Name = "cone" then Solid_Cone (1.0, 2.0, 16, 8); elsif Model_Name = "torus" then Solid_Torus (0.5, 1.0, 8, 16); elsif Model_Name = "dodecahedron" then Solid_Dodecahedron; elsif Model_Name = "octahedron" then Solid_Octahedron; elsif Model_Name = "tetrahedron" then Solid_Tetrahedron; elsif Model_Name = "icosahedron" then Solid_Icosahedron; end if; GL.Objects.Programs.End_Transform_Feedback; -- GL.Attributes.Disable_Vertex_Attrib_Array (0); -- int nbFeedback = glRenderMode(GL_RENDER); -- -- // parse the feedback buffer: -- g_polygons2D.clear(); -- g_vertices2D.clear(); while idx < nbFeedback loop -- check for polygon: if buffer (idx) /= Polygon_Token then raise GLUT_Read_Exception with "Graphic_Data.Get_GLUT_Model_2D Error parsing the feedback buffer!"; else idx := idx + 1; -- number of vertices (3) Num_Vertices := (int)buffer[idx]; idx := idx + 1; -- std::vector<int> vtxIdx(n); -- Get vertices: -- Maybe todo later: don't duplicate identical vertices . . . for index in 1 .. Num_Vertices loop -- vtxIdx[i] = (int)g_vertices2D.size(); Indices.Append (g_vertices2D.size) g_vertices2D.push_back(_vector(buffer[idx] * e1 + buffer[idx+1] * e2)); idx := idx + 2; end loop; g_polygons2D.push_back(vtxIdx); end if; end loop; -- if (g_prevStatisticsModelName != modelName) -- { -- printf("Model: %s, #polygons: %d, #vertices: %d\n", modelName.c_str(), g_polygons2D.size(), g_vertices2D.size()); -- g_prevStatisticsModelName = modelName; -- } exception when anError : others => Put_Line ("An exception occurred in Graphic_Data.Get_GLUT_Model_2D."); raise; end Get_GLUT_Model_2D; -- ------------------------------------------------------------------------- procedure Solid_Cube (Size : Float) is begin GLUT_API.GLUT_Solid_Cube (Double (Size)); end Solid_Cube; -- ------------------------------------------------------------------------- procedure Solid_Cone (Base, Height : Float; Slices, Stacks : Integer) is begin GLUT_API.GLUT_Solid_Cone (Double (Base), Double (Height), Int (Slices), Int (Stacks)); end Solid_Cone; -- ------------------------------------------------------------------------- procedure Solid_Dodecahedron is begin GLUT_API.GLUT_Solid_Dodecahedron; end Solid_Dodecahedron; -- ------------------------------------------------------------------------- procedure Solid_Icosahedron is begin GLUT_API.GLUT_Solid_Icosahedron; end Solid_Icosahedron; -- ------------------------------------------------------------------------- procedure Solid_Octahedron is begin GLUT_API.GLUT_Solid_Octahedron; end Solid_Octahedron; -- ------------------------------------------------------------------------- procedure Solid_Sphere (Radius : Float; Slices, Stacks : Integer) is begin GLUT_API.GLUT_Solid_Sphere (Double (Radius), Int (Slices), Int (Stacks)); end Solid_Sphere; -- ------------------------------------------------------------------------- procedure Solid_Teapot (Size : Float) is begin GLUT_API.GLUT_Solid_Teapot (Double (Size)); end Solid_Teapot; -- ------------------------------------------------------------------------- procedure Solid_Tetrahedron is begin GLUT_API.GLUT_Solid_Tetrahedron; end Solid_Tetrahedron; -- ------------------------------------------------------------------------- procedure Solid_Torus (Inner_Radius, Outer_Radius : Float; Sides, Rings : Integer) is begin GLUT_API.GLUT_Solid_Torus (Double (Inner_Radius), Double (Outer_Radius), Int (Sides), Int (Rings)); end Solid_Torus; -- ------------------------------------------------------------------------- end Graphic_Data;
35.502024
125
0.577489
10452f1e40f44ea19749717365ae41aaa61a0cc5
84,738
adb
Ada
snapgear_linux/user/ncurses/ncurses-5.6/Ada95/src/terminal_interface-curses.adb
impedimentToProgress/UCI-BlueChip
53e5d48b79079eaf60d42f7cb65bb795743d19fc
[ "MIT" ]
1
2019-04-02T20:28:58.000Z
2019-04-02T20:28:58.000Z
Ada95/src/terminal_interface-curses.adb
mitchelhaan/ncurses
0b8ae5088202164ecc1769aa255ed1aad283d2ae
[ "X11" ]
null
null
null
Ada95/src/terminal_interface-curses.adb
mitchelhaan/ncurses
0b8ae5088202164ecc1769aa255ed1aad283d2ae
[ "X11" ]
3
2016-06-13T13:20:56.000Z
2019-12-05T02:31:23.000Z
------------------------------------------------------------------------------ -- -- -- GNAT ncurses Binding -- -- -- -- Terminal_Interface.Curses -- -- -- -- B O D Y -- -- -- ------------------------------------------------------------------------------ -- Copyright (c) 1998-2004,2006 Free Software Foundation, Inc. -- -- -- -- Permission is hereby granted, free of charge, to any person obtaining a -- -- copy of this software and associated documentation files (the -- -- "Software"), to deal in the Software without restriction, including -- -- without limitation the rights to use, copy, modify, merge, publish, -- -- distribute, distribute with modifications, sublicense, and/or sell -- -- copies of the Software, and to permit persons to whom the Software is -- -- furnished to do so, subject to the following conditions: -- -- -- -- The above copyright notice and this permission notice shall be included -- -- in all copies or substantial portions of the Software. -- -- -- -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -- -- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -- -- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -- -- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -- -- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -- -- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR -- -- THE USE OR OTHER DEALINGS IN THE SOFTWARE. -- -- -- -- Except as contained in this notice, the name(s) of the above copyright -- -- holders shall not be used in advertising or otherwise to promote the -- -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 -- Version Control: -- $Revision: 1.34 $ -- $Date: 2006/06/25 14:30:22 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with System; with Terminal_Interface.Curses.Aux; with Interfaces.C; use Interfaces.C; with Interfaces.C.Strings; use Interfaces.C.Strings; with Interfaces.C.Pointers; with Ada.Characters.Handling; use Ada.Characters.Handling; with Ada.Strings.Fixed; with Ada.Unchecked_Conversion; package body Terminal_Interface.Curses is use Aux; use type System.Bit_Order; package ASF renames Ada.Strings.Fixed; type chtype_array is array (size_t range <>) of aliased Attributed_Character; pragma Convention (C, chtype_array); ------------------------------------------------------------------------------ generic type Element is (<>); function W_Get_Element (Win : in Window; Offset : in Natural) return Element; function W_Get_Element (Win : in Window; Offset : in Natural) return Element is type E_Array is array (Natural range <>) of aliased Element; package C_E_Array is new Interfaces.C.Pointers (Natural, Element, E_Array, Element'Val (0)); use C_E_Array; function To_Pointer is new Ada.Unchecked_Conversion (Window, Pointer); P : Pointer := To_Pointer (Win); begin if Win = Null_Window then raise Curses_Exception; else P := P + ptrdiff_t (Offset); return P.all; end if; end W_Get_Element; function W_Get_Int is new W_Get_Element (C_Int); function W_Get_Short is new W_Get_Element (C_Short); function W_Get_Byte is new W_Get_Element (Interfaces.C.unsigned_char); function Get_Flag (Win : Window; Offset : Natural) return Boolean; function Get_Flag (Win : Window; Offset : Natural) return Boolean is Res : C_Int; begin case Sizeof_bool is when 1 => Res := C_Int (W_Get_Byte (Win, Offset)); when 2 => Res := C_Int (W_Get_Short (Win, Offset)); when 4 => Res := C_Int (W_Get_Int (Win, Offset)); when others => raise Curses_Exception; end case; case Res is when 0 => return False; when others => return True; end case; end Get_Flag; ------------------------------------------------------------------------------ function Key_Name (Key : in Real_Key_Code) return String is function Keyname (K : C_Int) return chars_ptr; pragma Import (C, Keyname, "keyname"); Ch : Character; begin if Key <= Character'Pos (Character'Last) then Ch := Character'Val (Key); if Is_Control (Ch) then return Un_Control (Attributed_Character'(Ch => Ch, Color => Color_Pair'First, Attr => Normal_Video)); elsif Is_Graphic (Ch) then declare S : String (1 .. 1); begin S (1) := Ch; return S; end; else return ""; end if; else return Fill_String (Keyname (C_Int (Key))); end if; end Key_Name; procedure Key_Name (Key : in Real_Key_Code; Name : out String) is begin ASF.Move (Key_Name (Key), Name); end Key_Name; ------------------------------------------------------------------------------ procedure Init_Screen is function Initscr return Window; pragma Import (C, Initscr, "initscr"); W : Window; begin W := Initscr; if W = Null_Window then raise Curses_Exception; end if; end Init_Screen; procedure End_Windows is function Endwin return C_Int; pragma Import (C, Endwin, "endwin"); begin if Endwin = Curses_Err then raise Curses_Exception; end if; end End_Windows; function Is_End_Window return Boolean is function Isendwin return Curses_Bool; pragma Import (C, Isendwin, "isendwin"); begin if Isendwin = Curses_Bool_False then return False; else return True; end if; end Is_End_Window; ------------------------------------------------------------------------------ procedure Move_Cursor (Win : in Window := Standard_Window; Line : in Line_Position; Column : in Column_Position) is function Wmove (Win : Window; Line : C_Int; Column : C_Int ) return C_Int; pragma Import (C, Wmove, "wmove"); begin if Wmove (Win, C_Int (Line), C_Int (Column)) = Curses_Err then raise Curses_Exception; end if; end Move_Cursor; ------------------------------------------------------------------------------ procedure Add (Win : in Window := Standard_Window; Ch : in Attributed_Character) is function Waddch (W : Window; Ch : C_Chtype) return C_Int; pragma Import (C, Waddch, "waddch"); begin if Waddch (Win, AttrChar_To_Chtype (Ch)) = Curses_Err then raise Curses_Exception; end if; end Add; procedure Add (Win : in Window := Standard_Window; Ch : in Character) is begin Add (Win, Attributed_Character'(Ch => Ch, Color => Color_Pair'First, Attr => Normal_Video)); end Add; procedure Add (Win : in Window := Standard_Window; Line : in Line_Position; Column : in Column_Position; Ch : in Attributed_Character) is function mvwaddch (W : Window; Y : C_Int; X : C_Int; Ch : C_Chtype) return C_Int; pragma Import (C, mvwaddch, "mvwaddch"); begin if mvwaddch (Win, C_Int (Line), C_Int (Column), AttrChar_To_Chtype (Ch)) = Curses_Err then raise Curses_Exception; end if; end Add; procedure Add (Win : in Window := Standard_Window; Line : in Line_Position; Column : in Column_Position; Ch : in Character) is begin Add (Win, Line, Column, Attributed_Character'(Ch => Ch, Color => Color_Pair'First, Attr => Normal_Video)); end Add; procedure Add_With_Immediate_Echo (Win : in Window := Standard_Window; Ch : in Attributed_Character) is function Wechochar (W : Window; Ch : C_Chtype) return C_Int; pragma Import (C, Wechochar, "wechochar"); begin if Wechochar (Win, AttrChar_To_Chtype (Ch)) = Curses_Err then raise Curses_Exception; end if; end Add_With_Immediate_Echo; procedure Add_With_Immediate_Echo (Win : in Window := Standard_Window; Ch : in Character) is begin Add_With_Immediate_Echo (Win, Attributed_Character'(Ch => Ch, Color => Color_Pair'First, Attr => Normal_Video)); end Add_With_Immediate_Echo; ------------------------------------------------------------------------------ function Create (Number_Of_Lines : Line_Count; Number_Of_Columns : Column_Count; First_Line_Position : Line_Position; First_Column_Position : Column_Position) return Window is function Newwin (Number_Of_Lines : C_Int; Number_Of_Columns : C_Int; First_Line_Position : C_Int; First_Column_Position : C_Int) return Window; pragma Import (C, Newwin, "newwin"); W : Window; begin W := Newwin (C_Int (Number_Of_Lines), C_Int (Number_Of_Columns), C_Int (First_Line_Position), C_Int (First_Column_Position)); if W = Null_Window then raise Curses_Exception; end if; return W; end Create; procedure Delete (Win : in out Window) is function Wdelwin (W : Window) return C_Int; pragma Import (C, Wdelwin, "delwin"); begin if Wdelwin (Win) = Curses_Err then raise Curses_Exception; end if; Win := Null_Window; end Delete; function Sub_Window (Win : Window := Standard_Window; Number_Of_Lines : Line_Count; Number_Of_Columns : Column_Count; First_Line_Position : Line_Position; First_Column_Position : Column_Position) return Window is function Subwin (Win : Window; Number_Of_Lines : C_Int; Number_Of_Columns : C_Int; First_Line_Position : C_Int; First_Column_Position : C_Int) return Window; pragma Import (C, Subwin, "subwin"); W : Window; begin W := Subwin (Win, C_Int (Number_Of_Lines), C_Int (Number_Of_Columns), C_Int (First_Line_Position), C_Int (First_Column_Position)); if W = Null_Window then raise Curses_Exception; end if; return W; end Sub_Window; function Derived_Window (Win : Window := Standard_Window; Number_Of_Lines : Line_Count; Number_Of_Columns : Column_Count; First_Line_Position : Line_Position; First_Column_Position : Column_Position) return Window is function Derwin (Win : Window; Number_Of_Lines : C_Int; Number_Of_Columns : C_Int; First_Line_Position : C_Int; First_Column_Position : C_Int) return Window; pragma Import (C, Derwin, "derwin"); W : Window; begin W := Derwin (Win, C_Int (Number_Of_Lines), C_Int (Number_Of_Columns), C_Int (First_Line_Position), C_Int (First_Column_Position)); if W = Null_Window then raise Curses_Exception; end if; return W; end Derived_Window; function Duplicate (Win : Window) return Window is function Dupwin (Win : Window) return Window; pragma Import (C, Dupwin, "dupwin"); W : constant Window := Dupwin (Win); begin if W = Null_Window then raise Curses_Exception; end if; return W; end Duplicate; procedure Move_Window (Win : in Window; Line : in Line_Position; Column : in Column_Position) is function Mvwin (Win : Window; Line : C_Int; Column : C_Int) return C_Int; pragma Import (C, Mvwin, "mvwin"); begin if Mvwin (Win, C_Int (Line), C_Int (Column)) = Curses_Err then raise Curses_Exception; end if; end Move_Window; procedure Move_Derived_Window (Win : in Window; Line : in Line_Position; Column : in Column_Position) is function Mvderwin (Win : Window; Line : C_Int; Column : C_Int) return C_Int; pragma Import (C, Mvderwin, "mvderwin"); begin if Mvderwin (Win, C_Int (Line), C_Int (Column)) = Curses_Err then raise Curses_Exception; end if; end Move_Derived_Window; procedure Set_Synch_Mode (Win : in Window := Standard_Window; Mode : in Boolean := False) is function Syncok (Win : Window; Mode : Curses_Bool) return C_Int; pragma Import (C, Syncok, "syncok"); begin if Syncok (Win, Curses_Bool (Boolean'Pos (Mode))) = Curses_Err then raise Curses_Exception; end if; end Set_Synch_Mode; ------------------------------------------------------------------------------ procedure Add (Win : in Window := Standard_Window; Str : in String; Len : in Integer := -1) is function Waddnstr (Win : Window; Str : char_array; Len : C_Int := -1) return C_Int; pragma Import (C, Waddnstr, "waddnstr"); Txt : char_array (0 .. Str'Length); Length : size_t; begin To_C (Str, Txt, Length); if Waddnstr (Win, Txt, C_Int (Len)) = Curses_Err then raise Curses_Exception; end if; end Add; procedure Add (Win : in Window := Standard_Window; Line : in Line_Position; Column : in Column_Position; Str : in String; Len : in Integer := -1) is begin Move_Cursor (Win, Line, Column); Add (Win, Str, Len); end Add; ------------------------------------------------------------------------------ procedure Add (Win : in Window := Standard_Window; Str : in Attributed_String; Len : in Integer := -1) is function Waddchnstr (Win : Window; Str : chtype_array; Len : C_Int := -1) return C_Int; pragma Import (C, Waddchnstr, "waddchnstr"); Txt : chtype_array (0 .. Str'Length); begin for Length in 1 .. size_t (Str'Length) loop Txt (Length - 1) := Str (Natural (Length)); end loop; Txt (Str'Length) := Default_Character; if Waddchnstr (Win, Txt, C_Int (Len)) = Curses_Err then raise Curses_Exception; end if; end Add; procedure Add (Win : in Window := Standard_Window; Line : in Line_Position; Column : in Column_Position; Str : in Attributed_String; Len : in Integer := -1) is begin Move_Cursor (Win, Line, Column); Add (Win, Str, Len); end Add; ------------------------------------------------------------------------------ procedure Border (Win : in Window := Standard_Window; Left_Side_Symbol : in Attributed_Character := Default_Character; Right_Side_Symbol : in Attributed_Character := Default_Character; Top_Side_Symbol : in Attributed_Character := Default_Character; Bottom_Side_Symbol : in Attributed_Character := Default_Character; Upper_Left_Corner_Symbol : in Attributed_Character := Default_Character; Upper_Right_Corner_Symbol : in Attributed_Character := Default_Character; Lower_Left_Corner_Symbol : in Attributed_Character := Default_Character; Lower_Right_Corner_Symbol : in Attributed_Character := Default_Character) is function Wborder (W : Window; LS : C_Chtype; RS : C_Chtype; TS : C_Chtype; BS : C_Chtype; ULC : C_Chtype; URC : C_Chtype; LLC : C_Chtype; LRC : C_Chtype) return C_Int; pragma Import (C, Wborder, "wborder"); begin if Wborder (Win, AttrChar_To_Chtype (Left_Side_Symbol), AttrChar_To_Chtype (Right_Side_Symbol), AttrChar_To_Chtype (Top_Side_Symbol), AttrChar_To_Chtype (Bottom_Side_Symbol), AttrChar_To_Chtype (Upper_Left_Corner_Symbol), AttrChar_To_Chtype (Upper_Right_Corner_Symbol), AttrChar_To_Chtype (Lower_Left_Corner_Symbol), AttrChar_To_Chtype (Lower_Right_Corner_Symbol) ) = Curses_Err then raise Curses_Exception; end if; end Border; procedure Box (Win : in Window := Standard_Window; Vertical_Symbol : in Attributed_Character := Default_Character; Horizontal_Symbol : in Attributed_Character := Default_Character) is begin Border (Win, Vertical_Symbol, Vertical_Symbol, Horizontal_Symbol, Horizontal_Symbol); end Box; procedure Horizontal_Line (Win : in Window := Standard_Window; Line_Size : in Natural; Line_Symbol : in Attributed_Character := Default_Character) is function Whline (W : Window; Ch : C_Chtype; Len : C_Int) return C_Int; pragma Import (C, Whline, "whline"); begin if Whline (Win, AttrChar_To_Chtype (Line_Symbol), C_Int (Line_Size)) = Curses_Err then raise Curses_Exception; end if; end Horizontal_Line; procedure Vertical_Line (Win : in Window := Standard_Window; Line_Size : in Natural; Line_Symbol : in Attributed_Character := Default_Character) is function Wvline (W : Window; Ch : C_Chtype; Len : C_Int) return C_Int; pragma Import (C, Wvline, "wvline"); begin if Wvline (Win, AttrChar_To_Chtype (Line_Symbol), C_Int (Line_Size)) = Curses_Err then raise Curses_Exception; end if; end Vertical_Line; ------------------------------------------------------------------------------ function Get_Keystroke (Win : Window := Standard_Window) return Real_Key_Code is function Wgetch (W : Window) return C_Int; pragma Import (C, Wgetch, "wgetch"); C : constant C_Int := Wgetch (Win); begin if C = Curses_Err then return Key_None; else return Real_Key_Code (C); end if; end Get_Keystroke; procedure Undo_Keystroke (Key : in Real_Key_Code) is function Ungetch (Ch : C_Int) return C_Int; pragma Import (C, Ungetch, "ungetch"); begin if Ungetch (C_Int (Key)) = Curses_Err then raise Curses_Exception; end if; end Undo_Keystroke; function Has_Key (Key : Special_Key_Code) return Boolean is function Haskey (Key : C_Int) return C_Int; pragma Import (C, Haskey, "has_key"); begin if Haskey (C_Int (Key)) = Curses_False then return False; else return True; end if; end Has_Key; function Is_Function_Key (Key : Special_Key_Code) return Boolean is L : constant Special_Key_Code := Special_Key_Code (Natural (Key_F0) + Natural (Function_Key_Number'Last)); begin if (Key >= Key_F0) and then (Key <= L) then return True; else return False; end if; end Is_Function_Key; function Function_Key (Key : Real_Key_Code) return Function_Key_Number is begin if Is_Function_Key (Key) then return Function_Key_Number (Key - Key_F0); else raise Constraint_Error; end if; end Function_Key; function Function_Key_Code (Key : Function_Key_Number) return Real_Key_Code is begin return Real_Key_Code (Natural (Key_F0) + Natural (Key)); end Function_Key_Code; ------------------------------------------------------------------------------ procedure Standout (Win : Window := Standard_Window; On : Boolean := True) is function wstandout (Win : Window) return C_Int; pragma Import (C, wstandout, "wstandout"); function wstandend (Win : Window) return C_Int; pragma Import (C, wstandend, "wstandend"); Err : C_Int; begin if On then Err := wstandout (Win); else Err := wstandend (Win); end if; if Err = Curses_Err then raise Curses_Exception; end if; end Standout; procedure Switch_Character_Attribute (Win : in Window := Standard_Window; Attr : in Character_Attribute_Set := Normal_Video; On : in Boolean := True) is function Wattron (Win : Window; C_Attr : C_AttrType) return C_Int; pragma Import (C, Wattron, "wattr_on"); function Wattroff (Win : Window; C_Attr : C_AttrType) return C_Int; pragma Import (C, Wattroff, "wattr_off"); -- In Ada we use the On Boolean to control whether or not we want to -- switch on or off the attributes in the set. Err : C_Int; AC : constant Attributed_Character := (Ch => Character'First, Color => Color_Pair'First, Attr => Attr); begin if On then Err := Wattron (Win, AttrChar_To_AttrType (AC)); else Err := Wattroff (Win, AttrChar_To_AttrType (AC)); end if; if Err = Curses_Err then raise Curses_Exception; end if; end Switch_Character_Attribute; procedure Set_Character_Attributes (Win : in Window := Standard_Window; Attr : in Character_Attribute_Set := Normal_Video; Color : in Color_Pair := Color_Pair'First) is function Wattrset (Win : Window; C_Attr : C_AttrType) return C_Int; pragma Import (C, Wattrset, "wattrset"); -- ??? wattr_set begin if Wattrset (Win, AttrChar_To_AttrType (Attributed_Character' (Ch => Character'First, Color => Color, Attr => Attr))) = Curses_Err then raise Curses_Exception; end if; end Set_Character_Attributes; function Get_Character_Attribute (Win : Window := Standard_Window) return Character_Attribute_Set is function Wattrget (Win : Window; Atr : access C_AttrType; Col : access C_Short; Opt : System.Address) return C_Int; pragma Import (C, Wattrget, "wattr_get"); Attr : aliased C_AttrType; Col : aliased C_Short; Res : constant C_Int := Wattrget (Win, Attr'Access, Col'Access, System.Null_Address); Ch : Attributed_Character; begin if Res = Curses_Ok then Ch := AttrType_To_AttrChar (Attr); return Ch.Attr; else raise Curses_Exception; end if; end Get_Character_Attribute; function Get_Character_Attribute (Win : Window := Standard_Window) return Color_Pair is function Wattrget (Win : Window; Atr : access C_AttrType; Col : access C_Short; Opt : System.Address) return C_Int; pragma Import (C, Wattrget, "wattr_get"); Attr : aliased C_AttrType; Col : aliased C_Short; Res : constant C_Int := Wattrget (Win, Attr'Access, Col'Access, System.Null_Address); Ch : Attributed_Character; begin if Res = Curses_Ok then Ch := AttrType_To_AttrChar (Attr); return Ch.Color; else raise Curses_Exception; end if; end Get_Character_Attribute; procedure Set_Color (Win : in Window := Standard_Window; Pair : in Color_Pair) is function Wset_Color (Win : Window; Color : C_Short; Opts : C_Void_Ptr) return C_Int; pragma Import (C, Wset_Color, "wcolor_set"); begin if Wset_Color (Win, C_Short (Pair), C_Void_Ptr (System.Null_Address)) = Curses_Err then raise Curses_Exception; end if; end Set_Color; procedure Change_Attributes (Win : in Window := Standard_Window; Count : in Integer := -1; Attr : in Character_Attribute_Set := Normal_Video; Color : in Color_Pair := Color_Pair'First) is function Wchgat (Win : Window; Cnt : C_Int; Attr : C_AttrType; Color : C_Short; Opts : System.Address := System.Null_Address) return C_Int; pragma Import (C, Wchgat, "wchgat"); Ch : constant Attributed_Character := (Ch => Character'First, Color => Color_Pair'First, Attr => Attr); begin if Wchgat (Win, C_Int (Count), AttrChar_To_AttrType (Ch), C_Short (Color)) = Curses_Err then raise Curses_Exception; end if; end Change_Attributes; procedure Change_Attributes (Win : in Window := Standard_Window; Line : in Line_Position := Line_Position'First; Column : in Column_Position := Column_Position'First; Count : in Integer := -1; Attr : in Character_Attribute_Set := Normal_Video; Color : in Color_Pair := Color_Pair'First) is begin Move_Cursor (Win, Line, Column); Change_Attributes (Win, Count, Attr, Color); end Change_Attributes; ------------------------------------------------------------------------------ procedure Beep is function Beeper return C_Int; pragma Import (C, Beeper, "beep"); begin if Beeper = Curses_Err then raise Curses_Exception; end if; end Beep; procedure Flash_Screen is function Flash return C_Int; pragma Import (C, Flash, "flash"); begin if Flash = Curses_Err then raise Curses_Exception; end if; end Flash_Screen; ------------------------------------------------------------------------------ procedure Set_Cbreak_Mode (SwitchOn : in Boolean := True) is function Cbreak return C_Int; pragma Import (C, Cbreak, "cbreak"); function NoCbreak return C_Int; pragma Import (C, NoCbreak, "nocbreak"); Err : C_Int; begin if SwitchOn then Err := Cbreak; else Err := NoCbreak; end if; if Err = Curses_Err then raise Curses_Exception; end if; end Set_Cbreak_Mode; procedure Set_Raw_Mode (SwitchOn : in Boolean := True) is function Raw return C_Int; pragma Import (C, Raw, "raw"); function NoRaw return C_Int; pragma Import (C, NoRaw, "noraw"); Err : C_Int; begin if SwitchOn then Err := Raw; else Err := NoRaw; end if; if Err = Curses_Err then raise Curses_Exception; end if; end Set_Raw_Mode; procedure Set_Echo_Mode (SwitchOn : in Boolean := True) is function Echo return C_Int; pragma Import (C, Echo, "echo"); function NoEcho return C_Int; pragma Import (C, NoEcho, "noecho"); Err : C_Int; begin if SwitchOn then Err := Echo; else Err := NoEcho; end if; if Err = Curses_Err then raise Curses_Exception; end if; end Set_Echo_Mode; procedure Set_Meta_Mode (Win : in Window := Standard_Window; SwitchOn : in Boolean := True) is function Meta (W : Window; Mode : Curses_Bool) return C_Int; pragma Import (C, Meta, "meta"); begin if Meta (Win, Curses_Bool (Boolean'Pos (SwitchOn))) = Curses_Err then raise Curses_Exception; end if; end Set_Meta_Mode; procedure Set_KeyPad_Mode (Win : in Window := Standard_Window; SwitchOn : in Boolean := True) is function Keypad (W : Window; Mode : Curses_Bool) return C_Int; pragma Import (C, Keypad, "keypad"); begin if Keypad (Win, Curses_Bool (Boolean'Pos (SwitchOn))) = Curses_Err then raise Curses_Exception; end if; end Set_KeyPad_Mode; function Get_KeyPad_Mode (Win : in Window := Standard_Window) return Boolean is begin return Get_Flag (Win, Offset_use_keypad); end Get_KeyPad_Mode; procedure Half_Delay (Amount : in Half_Delay_Amount) is function Halfdelay (Amount : C_Int) return C_Int; pragma Import (C, Halfdelay, "halfdelay"); begin if Halfdelay (C_Int (Amount)) = Curses_Err then raise Curses_Exception; end if; end Half_Delay; procedure Set_Flush_On_Interrupt_Mode (Win : in Window := Standard_Window; Mode : in Boolean := True) is function Intrflush (Win : Window; Mode : Curses_Bool) return C_Int; pragma Import (C, Intrflush, "intrflush"); begin if Intrflush (Win, Curses_Bool (Boolean'Pos (Mode))) = Curses_Err then raise Curses_Exception; end if; end Set_Flush_On_Interrupt_Mode; procedure Set_Queue_Interrupt_Mode (Win : in Window := Standard_Window; Flush : in Boolean := True) is procedure Qiflush; pragma Import (C, Qiflush, "qiflush"); procedure No_Qiflush; pragma Import (C, No_Qiflush, "noqiflush"); begin if Win = Null_Window then raise Curses_Exception; end if; if Flush then Qiflush; else No_Qiflush; end if; end Set_Queue_Interrupt_Mode; procedure Set_NoDelay_Mode (Win : in Window := Standard_Window; Mode : in Boolean := False) is function Nodelay (Win : Window; Mode : Curses_Bool) return C_Int; pragma Import (C, Nodelay, "nodelay"); begin if Nodelay (Win, Curses_Bool (Boolean'Pos (Mode))) = Curses_Err then raise Curses_Exception; end if; end Set_NoDelay_Mode; procedure Set_Timeout_Mode (Win : in Window := Standard_Window; Mode : in Timeout_Mode; Amount : in Natural) is function Wtimeout (Win : Window; Amount : C_Int) return C_Int; pragma Import (C, Wtimeout, "wtimeout"); Time : C_Int; begin case Mode is when Blocking => Time := -1; when Non_Blocking => Time := 0; when Delayed => if Amount = 0 then raise Constraint_Error; end if; Time := C_Int (Amount); end case; if Wtimeout (Win, Time) = Curses_Err then raise Curses_Exception; end if; end Set_Timeout_Mode; procedure Set_Escape_Timer_Mode (Win : in Window := Standard_Window; Timer_Off : in Boolean := False) is function Notimeout (Win : Window; Mode : Curses_Bool) return C_Int; pragma Import (C, Notimeout, "notimeout"); begin if Notimeout (Win, Curses_Bool (Boolean'Pos (Timer_Off))) = Curses_Err then raise Curses_Exception; end if; end Set_Escape_Timer_Mode; ------------------------------------------------------------------------------ procedure Set_NL_Mode (SwitchOn : in Boolean := True) is function NL return C_Int; pragma Import (C, NL, "nl"); function NoNL return C_Int; pragma Import (C, NoNL, "nonl"); Err : C_Int; begin if SwitchOn then Err := NL; else Err := NoNL; end if; if Err = Curses_Err then raise Curses_Exception; end if; end Set_NL_Mode; procedure Clear_On_Next_Update (Win : in Window := Standard_Window; Do_Clear : in Boolean := True) is function Clear_Ok (W : Window; Flag : Curses_Bool) return C_Int; pragma Import (C, Clear_Ok, "clearok"); begin if Clear_Ok (Win, Curses_Bool (Boolean'Pos (Do_Clear))) = Curses_Err then raise Curses_Exception; end if; end Clear_On_Next_Update; procedure Use_Insert_Delete_Line (Win : in Window := Standard_Window; Do_Idl : in Boolean := True) is function IDL_Ok (W : Window; Flag : Curses_Bool) return C_Int; pragma Import (C, IDL_Ok, "idlok"); begin if IDL_Ok (Win, Curses_Bool (Boolean'Pos (Do_Idl))) = Curses_Err then raise Curses_Exception; end if; end Use_Insert_Delete_Line; procedure Use_Insert_Delete_Character (Win : in Window := Standard_Window; Do_Idc : in Boolean := True) is function IDC_Ok (W : Window; Flag : Curses_Bool) return C_Int; pragma Import (C, IDC_Ok, "idcok"); begin if IDC_Ok (Win, Curses_Bool (Boolean'Pos (Do_Idc))) = Curses_Err then raise Curses_Exception; end if; end Use_Insert_Delete_Character; procedure Leave_Cursor_After_Update (Win : in Window := Standard_Window; Do_Leave : in Boolean := True) is function Leave_Ok (W : Window; Flag : Curses_Bool) return C_Int; pragma Import (C, Leave_Ok, "leaveok"); begin if Leave_Ok (Win, Curses_Bool (Boolean'Pos (Do_Leave))) = Curses_Err then raise Curses_Exception; end if; end Leave_Cursor_After_Update; procedure Immediate_Update_Mode (Win : in Window := Standard_Window; Mode : in Boolean := False) is function Immedok (Win : Window; Mode : Curses_Bool) return C_Int; pragma Import (C, Immedok, "immedok"); begin if Immedok (Win, Curses_Bool (Boolean'Pos (Mode))) = Curses_Err then raise Curses_Exception; end if; end Immediate_Update_Mode; procedure Allow_Scrolling (Win : in Window := Standard_Window; Mode : in Boolean := False) is function Scrollok (Win : Window; Mode : Curses_Bool) return C_Int; pragma Import (C, Scrollok, "scrollok"); begin if Scrollok (Win, Curses_Bool (Boolean'Pos (Mode))) = Curses_Err then raise Curses_Exception; end if; end Allow_Scrolling; function Scrolling_Allowed (Win : Window := Standard_Window) return Boolean is begin return Get_Flag (Win, Offset_scroll); end Scrolling_Allowed; procedure Set_Scroll_Region (Win : in Window := Standard_Window; Top_Line : in Line_Position; Bottom_Line : in Line_Position) is function Wsetscrreg (Win : Window; Lin : C_Int; Col : C_Int) return C_Int; pragma Import (C, Wsetscrreg, "wsetscrreg"); begin if Wsetscrreg (Win, C_Int (Top_Line), C_Int (Bottom_Line)) = Curses_Err then raise Curses_Exception; end if; end Set_Scroll_Region; ------------------------------------------------------------------------------ procedure Update_Screen is function Do_Update return C_Int; pragma Import (C, Do_Update, "doupdate"); begin if Do_Update = Curses_Err then raise Curses_Exception; end if; end Update_Screen; procedure Refresh (Win : in Window := Standard_Window) is function Wrefresh (W : Window) return C_Int; pragma Import (C, Wrefresh, "wrefresh"); begin if Wrefresh (Win) = Curses_Err then raise Curses_Exception; end if; end Refresh; procedure Refresh_Without_Update (Win : in Window := Standard_Window) is function Wnoutrefresh (W : Window) return C_Int; pragma Import (C, Wnoutrefresh, "wnoutrefresh"); begin if Wnoutrefresh (Win) = Curses_Err then raise Curses_Exception; end if; end Refresh_Without_Update; procedure Redraw (Win : in Window := Standard_Window) is function Redrawwin (Win : Window) return C_Int; pragma Import (C, Redrawwin, "redrawwin"); begin if Redrawwin (Win) = Curses_Err then raise Curses_Exception; end if; end Redraw; procedure Redraw (Win : in Window := Standard_Window; Begin_Line : in Line_Position; Line_Count : in Positive) is function Wredrawln (Win : Window; First : C_Int; Cnt : C_Int) return C_Int; pragma Import (C, Wredrawln, "wredrawln"); begin if Wredrawln (Win, C_Int (Begin_Line), C_Int (Line_Count)) = Curses_Err then raise Curses_Exception; end if; end Redraw; ------------------------------------------------------------------------------ procedure Erase (Win : in Window := Standard_Window) is function Werase (W : Window) return C_Int; pragma Import (C, Werase, "werase"); begin if Werase (Win) = Curses_Err then raise Curses_Exception; end if; end Erase; procedure Clear (Win : in Window := Standard_Window) is function Wclear (W : Window) return C_Int; pragma Import (C, Wclear, "wclear"); begin if Wclear (Win) = Curses_Err then raise Curses_Exception; end if; end Clear; procedure Clear_To_End_Of_Screen (Win : in Window := Standard_Window) is function Wclearbot (W : Window) return C_Int; pragma Import (C, Wclearbot, "wclrtobot"); begin if Wclearbot (Win) = Curses_Err then raise Curses_Exception; end if; end Clear_To_End_Of_Screen; procedure Clear_To_End_Of_Line (Win : in Window := Standard_Window) is function Wcleareol (W : Window) return C_Int; pragma Import (C, Wcleareol, "wclrtoeol"); begin if Wcleareol (Win) = Curses_Err then raise Curses_Exception; end if; end Clear_To_End_Of_Line; ------------------------------------------------------------------------------ procedure Set_Background (Win : in Window := Standard_Window; Ch : in Attributed_Character) is procedure WBackground (W : in Window; Ch : in C_Chtype); pragma Import (C, WBackground, "wbkgdset"); begin WBackground (Win, AttrChar_To_Chtype (Ch)); end Set_Background; procedure Change_Background (Win : in Window := Standard_Window; Ch : in Attributed_Character) is function WChangeBkgd (W : Window; Ch : C_Chtype) return C_Int; pragma Import (C, WChangeBkgd, "wbkgd"); begin if WChangeBkgd (Win, AttrChar_To_Chtype (Ch)) = Curses_Err then raise Curses_Exception; end if; end Change_Background; function Get_Background (Win : Window := Standard_Window) return Attributed_Character is function Wgetbkgd (Win : Window) return C_Chtype; pragma Import (C, Wgetbkgd, "getbkgd"); begin return Chtype_To_AttrChar (Wgetbkgd (Win)); end Get_Background; ------------------------------------------------------------------------------ procedure Change_Lines_Status (Win : in Window := Standard_Window; Start : in Line_Position; Count : in Positive; State : in Boolean) is function Wtouchln (Win : Window; Sta : C_Int; Cnt : C_Int; Chg : C_Int) return C_Int; pragma Import (C, Wtouchln, "wtouchln"); begin if Wtouchln (Win, C_Int (Start), C_Int (Count), C_Int (Boolean'Pos (State))) = Curses_Err then raise Curses_Exception; end if; end Change_Lines_Status; procedure Touch (Win : in Window := Standard_Window) is Y : Line_Position; X : Column_Position; begin Get_Size (Win, Y, X); Change_Lines_Status (Win, 0, Positive (Y), True); end Touch; procedure Untouch (Win : in Window := Standard_Window) is Y : Line_Position; X : Column_Position; begin Get_Size (Win, Y, X); Change_Lines_Status (Win, 0, Positive (Y), False); end Untouch; procedure Touch (Win : in Window := Standard_Window; Start : in Line_Position; Count : in Positive) is begin Change_Lines_Status (Win, Start, Count, True); end Touch; function Is_Touched (Win : Window := Standard_Window; Line : Line_Position) return Boolean is function WLineTouched (W : Window; L : C_Int) return Curses_Bool; pragma Import (C, WLineTouched, "is_linetouched"); begin if WLineTouched (Win, C_Int (Line)) = Curses_Bool_False then return False; else return True; end if; end Is_Touched; function Is_Touched (Win : Window := Standard_Window) return Boolean is function WWinTouched (W : Window) return Curses_Bool; pragma Import (C, WWinTouched, "is_wintouched"); begin if WWinTouched (Win) = Curses_Bool_False then return False; else return True; end if; end Is_Touched; ------------------------------------------------------------------------------ procedure Copy (Source_Window : in Window; Destination_Window : in Window; Source_Top_Row : in Line_Position; Source_Left_Column : in Column_Position; Destination_Top_Row : in Line_Position; Destination_Left_Column : in Column_Position; Destination_Bottom_Row : in Line_Position; Destination_Right_Column : in Column_Position; Non_Destructive_Mode : in Boolean := True) is function Copywin (Src : Window; Dst : Window; Str : C_Int; Slc : C_Int; Dtr : C_Int; Dlc : C_Int; Dbr : C_Int; Drc : C_Int; Ndm : C_Int) return C_Int; pragma Import (C, Copywin, "copywin"); begin if Copywin (Source_Window, Destination_Window, C_Int (Source_Top_Row), C_Int (Source_Left_Column), C_Int (Destination_Top_Row), C_Int (Destination_Left_Column), C_Int (Destination_Bottom_Row), C_Int (Destination_Right_Column), Boolean'Pos (Non_Destructive_Mode) ) = Curses_Err then raise Curses_Exception; end if; end Copy; procedure Overwrite (Source_Window : in Window; Destination_Window : in Window) is function Overwrite (Src : Window; Dst : Window) return C_Int; pragma Import (C, Overwrite, "overwrite"); begin if Overwrite (Source_Window, Destination_Window) = Curses_Err then raise Curses_Exception; end if; end Overwrite; procedure Overlay (Source_Window : in Window; Destination_Window : in Window) is function Overlay (Src : Window; Dst : Window) return C_Int; pragma Import (C, Overlay, "overlay"); begin if Overlay (Source_Window, Destination_Window) = Curses_Err then raise Curses_Exception; end if; end Overlay; ------------------------------------------------------------------------------ procedure Insert_Delete_Lines (Win : in Window := Standard_Window; Lines : in Integer := 1) -- default is to insert one line above is function Winsdelln (W : Window; N : C_Int) return C_Int; pragma Import (C, Winsdelln, "winsdelln"); begin if Winsdelln (Win, C_Int (Lines)) = Curses_Err then raise Curses_Exception; end if; end Insert_Delete_Lines; procedure Delete_Line (Win : in Window := Standard_Window) is begin Insert_Delete_Lines (Win, -1); end Delete_Line; procedure Insert_Line (Win : in Window := Standard_Window) is begin Insert_Delete_Lines (Win, 1); end Insert_Line; ------------------------------------------------------------------------------ procedure Get_Size (Win : in Window := Standard_Window; Number_Of_Lines : out Line_Count; Number_Of_Columns : out Column_Count) is -- Please note: in ncurses they are one off. -- This might be different in other implementations of curses Y : constant C_Int := C_Int (W_Get_Short (Win, Offset_maxy)) + C_Int (Offset_XY); X : constant C_Int := C_Int (W_Get_Short (Win, Offset_maxx)) + C_Int (Offset_XY); begin Number_Of_Lines := Line_Count (Y); Number_Of_Columns := Column_Count (X); end Get_Size; procedure Get_Window_Position (Win : in Window := Standard_Window; Top_Left_Line : out Line_Position; Top_Left_Column : out Column_Position) is Y : constant C_Short := W_Get_Short (Win, Offset_begy); X : constant C_Short := W_Get_Short (Win, Offset_begx); begin Top_Left_Line := Line_Position (Y); Top_Left_Column := Column_Position (X); end Get_Window_Position; procedure Get_Cursor_Position (Win : in Window := Standard_Window; Line : out Line_Position; Column : out Column_Position) is Y : constant C_Short := W_Get_Short (Win, Offset_cury); X : constant C_Short := W_Get_Short (Win, Offset_curx); begin Line := Line_Position (Y); Column := Column_Position (X); end Get_Cursor_Position; procedure Get_Origin_Relative_To_Parent (Win : in Window; Top_Left_Line : out Line_Position; Top_Left_Column : out Column_Position; Is_Not_A_Subwindow : out Boolean) is Y : constant C_Int := W_Get_Int (Win, Offset_pary); X : constant C_Int := W_Get_Int (Win, Offset_parx); begin if Y = -1 then Top_Left_Line := Line_Position'Last; Top_Left_Column := Column_Position'Last; Is_Not_A_Subwindow := True; else Top_Left_Line := Line_Position (Y); Top_Left_Column := Column_Position (X); Is_Not_A_Subwindow := False; end if; end Get_Origin_Relative_To_Parent; ------------------------------------------------------------------------------ function New_Pad (Lines : Line_Count; Columns : Column_Count) return Window is function Newpad (Lines : C_Int; Columns : C_Int) return Window; pragma Import (C, Newpad, "newpad"); W : Window; begin W := Newpad (C_Int (Lines), C_Int (Columns)); if W = Null_Window then raise Curses_Exception; end if; return W; end New_Pad; function Sub_Pad (Pad : Window; Number_Of_Lines : Line_Count; Number_Of_Columns : Column_Count; First_Line_Position : Line_Position; First_Column_Position : Column_Position) return Window is function Subpad (Pad : Window; Number_Of_Lines : C_Int; Number_Of_Columns : C_Int; First_Line_Position : C_Int; First_Column_Position : C_Int) return Window; pragma Import (C, Subpad, "subpad"); W : Window; begin W := Subpad (Pad, C_Int (Number_Of_Lines), C_Int (Number_Of_Columns), C_Int (First_Line_Position), C_Int (First_Column_Position)); if W = Null_Window then raise Curses_Exception; end if; return W; end Sub_Pad; procedure Refresh (Pad : in Window; Source_Top_Row : in Line_Position; Source_Left_Column : in Column_Position; Destination_Top_Row : in Line_Position; Destination_Left_Column : in Column_Position; Destination_Bottom_Row : in Line_Position; Destination_Right_Column : in Column_Position) is function Prefresh (Pad : Window; Source_Top_Row : C_Int; Source_Left_Column : C_Int; Destination_Top_Row : C_Int; Destination_Left_Column : C_Int; Destination_Bottom_Row : C_Int; Destination_Right_Column : C_Int) return C_Int; pragma Import (C, Prefresh, "prefresh"); begin if Prefresh (Pad, C_Int (Source_Top_Row), C_Int (Source_Left_Column), C_Int (Destination_Top_Row), C_Int (Destination_Left_Column), C_Int (Destination_Bottom_Row), C_Int (Destination_Right_Column)) = Curses_Err then raise Curses_Exception; end if; end Refresh; procedure Refresh_Without_Update (Pad : in Window; Source_Top_Row : in Line_Position; Source_Left_Column : in Column_Position; Destination_Top_Row : in Line_Position; Destination_Left_Column : in Column_Position; Destination_Bottom_Row : in Line_Position; Destination_Right_Column : in Column_Position) is function Pnoutrefresh (Pad : Window; Source_Top_Row : C_Int; Source_Left_Column : C_Int; Destination_Top_Row : C_Int; Destination_Left_Column : C_Int; Destination_Bottom_Row : C_Int; Destination_Right_Column : C_Int) return C_Int; pragma Import (C, Pnoutrefresh, "pnoutrefresh"); begin if Pnoutrefresh (Pad, C_Int (Source_Top_Row), C_Int (Source_Left_Column), C_Int (Destination_Top_Row), C_Int (Destination_Left_Column), C_Int (Destination_Bottom_Row), C_Int (Destination_Right_Column)) = Curses_Err then raise Curses_Exception; end if; end Refresh_Without_Update; procedure Add_Character_To_Pad_And_Echo_It (Pad : in Window; Ch : in Attributed_Character) is function Pechochar (Pad : Window; Ch : C_Chtype) return C_Int; pragma Import (C, Pechochar, "pechochar"); begin if Pechochar (Pad, AttrChar_To_Chtype (Ch)) = Curses_Err then raise Curses_Exception; end if; end Add_Character_To_Pad_And_Echo_It; procedure Add_Character_To_Pad_And_Echo_It (Pad : in Window; Ch : in Character) is begin Add_Character_To_Pad_And_Echo_It (Pad, Attributed_Character'(Ch => Ch, Color => Color_Pair'First, Attr => Normal_Video)); end Add_Character_To_Pad_And_Echo_It; ------------------------------------------------------------------------------ procedure Scroll (Win : in Window := Standard_Window; Amount : in Integer := 1) is function Wscrl (Win : Window; N : C_Int) return C_Int; pragma Import (C, Wscrl, "wscrl"); begin if Wscrl (Win, C_Int (Amount)) = Curses_Err then raise Curses_Exception; end if; end Scroll; ------------------------------------------------------------------------------ procedure Delete_Character (Win : in Window := Standard_Window) is function Wdelch (Win : Window) return C_Int; pragma Import (C, Wdelch, "wdelch"); begin if Wdelch (Win) = Curses_Err then raise Curses_Exception; end if; end Delete_Character; procedure Delete_Character (Win : in Window := Standard_Window; Line : in Line_Position; Column : in Column_Position) is function Mvwdelch (Win : Window; Lin : C_Int; Col : C_Int) return C_Int; pragma Import (C, Mvwdelch, "mvwdelch"); begin if Mvwdelch (Win, C_Int (Line), C_Int (Column)) = Curses_Err then raise Curses_Exception; end if; end Delete_Character; ------------------------------------------------------------------------------ function Peek (Win : Window := Standard_Window) return Attributed_Character is function Winch (Win : Window) return C_Chtype; pragma Import (C, Winch, "winch"); begin return Chtype_To_AttrChar (Winch (Win)); end Peek; function Peek (Win : Window := Standard_Window; Line : Line_Position; Column : Column_Position) return Attributed_Character is function Mvwinch (Win : Window; Lin : C_Int; Col : C_Int) return C_Chtype; pragma Import (C, Mvwinch, "mvwinch"); begin return Chtype_To_AttrChar (Mvwinch (Win, C_Int (Line), C_Int (Column))); end Peek; ------------------------------------------------------------------------------ procedure Insert (Win : in Window := Standard_Window; Ch : in Attributed_Character) is function Winsch (Win : Window; Ch : C_Chtype) return C_Int; pragma Import (C, Winsch, "winsch"); begin if Winsch (Win, AttrChar_To_Chtype (Ch)) = Curses_Err then raise Curses_Exception; end if; end Insert; procedure Insert (Win : in Window := Standard_Window; Line : in Line_Position; Column : in Column_Position; Ch : in Attributed_Character) is function Mvwinsch (Win : Window; Lin : C_Int; Col : C_Int; Ch : C_Chtype) return C_Int; pragma Import (C, Mvwinsch, "mvwinsch"); begin if Mvwinsch (Win, C_Int (Line), C_Int (Column), AttrChar_To_Chtype (Ch)) = Curses_Err then raise Curses_Exception; end if; end Insert; ------------------------------------------------------------------------------ procedure Insert (Win : in Window := Standard_Window; Str : in String; Len : in Integer := -1) is function Winsnstr (Win : Window; Str : char_array; Len : Integer := -1) return C_Int; pragma Import (C, Winsnstr, "winsnstr"); Txt : char_array (0 .. Str'Length); Length : size_t; begin To_C (Str, Txt, Length); if Winsnstr (Win, Txt, Len) = Curses_Err then raise Curses_Exception; end if; end Insert; procedure Insert (Win : in Window := Standard_Window; Line : in Line_Position; Column : in Column_Position; Str : in String; Len : in Integer := -1) is function Mvwinsnstr (Win : Window; Line : C_Int; Column : C_Int; Str : char_array; Len : C_Int) return C_Int; pragma Import (C, Mvwinsnstr, "mvwinsnstr"); Txt : char_array (0 .. Str'Length); Length : size_t; begin To_C (Str, Txt, Length); if Mvwinsnstr (Win, C_Int (Line), C_Int (Column), Txt, C_Int (Len)) = Curses_Err then raise Curses_Exception; end if; end Insert; ------------------------------------------------------------------------------ procedure Peek (Win : in Window := Standard_Window; Str : out String; Len : in Integer := -1) is function Winnstr (Win : Window; Str : char_array; Len : C_Int) return C_Int; pragma Import (C, Winnstr, "winnstr"); N : Integer := Len; Txt : char_array (0 .. Str'Length); Cnt : Natural; begin if N < 0 then N := Str'Length; end if; if N > Str'Length then raise Constraint_Error; end if; Txt (0) := Interfaces.C.char'First; if Winnstr (Win, Txt, C_Int (N)) = Curses_Err then raise Curses_Exception; end if; To_Ada (Txt, Str, Cnt, True); if Cnt < Str'Length then Str ((Str'First + Cnt) .. Str'Last) := (others => ' '); end if; end Peek; procedure Peek (Win : in Window := Standard_Window; Line : in Line_Position; Column : in Column_Position; Str : out String; Len : in Integer := -1) is begin Move_Cursor (Win, Line, Column); Peek (Win, Str, Len); end Peek; ------------------------------------------------------------------------------ procedure Peek (Win : in Window := Standard_Window; Str : out Attributed_String; Len : in Integer := -1) is function Winchnstr (Win : Window; Str : chtype_array; -- out Len : C_Int) return C_Int; pragma Import (C, Winchnstr, "winchnstr"); N : Integer := Len; Txt : constant chtype_array (0 .. Str'Length) := (0 => Default_Character); Cnt : Natural := 0; begin if N < 0 then N := Str'Length; end if; if N > Str'Length then raise Constraint_Error; end if; if Winchnstr (Win, Txt, C_Int (N)) = Curses_Err then raise Curses_Exception; end if; for To in Str'Range loop exit when Txt (size_t (Cnt)) = Default_Character; Str (To) := Txt (size_t (Cnt)); Cnt := Cnt + 1; end loop; if Cnt < Str'Length then Str ((Str'First + Cnt) .. Str'Last) := (others => (Ch => ' ', Color => Color_Pair'First, Attr => Normal_Video)); end if; end Peek; procedure Peek (Win : in Window := Standard_Window; Line : in Line_Position; Column : in Column_Position; Str : out Attributed_String; Len : in Integer := -1) is begin Move_Cursor (Win, Line, Column); Peek (Win, Str, Len); end Peek; ------------------------------------------------------------------------------ procedure Get (Win : in Window := Standard_Window; Str : out String; Len : in Integer := -1) is function Wgetnstr (Win : Window; Str : char_array; Len : C_Int) return C_Int; pragma Import (C, Wgetnstr, "wgetnstr"); N : Integer := Len; Txt : char_array (0 .. Str'Length); Cnt : Natural; begin if N < 0 then N := Str'Length; end if; if N > Str'Length then raise Constraint_Error; end if; Txt (0) := Interfaces.C.char'First; if Wgetnstr (Win, Txt, C_Int (N)) = Curses_Err then raise Curses_Exception; end if; To_Ada (Txt, Str, Cnt, True); if Cnt < Str'Length then Str ((Str'First + Cnt) .. Str'Last) := (others => ' '); end if; end Get; procedure Get (Win : in Window := Standard_Window; Line : in Line_Position; Column : in Column_Position; Str : out String; Len : in Integer := -1) is begin Move_Cursor (Win, Line, Column); Get (Win, Str, Len); end Get; ------------------------------------------------------------------------------ procedure Init_Soft_Label_Keys (Format : in Soft_Label_Key_Format := Three_Two_Three) is function Slk_Init (Fmt : C_Int) return C_Int; pragma Import (C, Slk_Init, "slk_init"); begin if Slk_Init (Soft_Label_Key_Format'Pos (Format)) = Curses_Err then raise Curses_Exception; end if; end Init_Soft_Label_Keys; procedure Set_Soft_Label_Key (Label : in Label_Number; Text : in String; Fmt : in Label_Justification := Left) is function Slk_Set (Label : C_Int; Txt : char_array; Fmt : C_Int) return C_Int; pragma Import (C, Slk_Set, "slk_set"); Txt : char_array (0 .. Text'Length); Len : size_t; begin To_C (Text, Txt, Len); if Slk_Set (C_Int (Label), Txt, C_Int (Label_Justification'Pos (Fmt))) = Curses_Err then raise Curses_Exception; end if; end Set_Soft_Label_Key; procedure Refresh_Soft_Label_Keys is function Slk_Refresh return C_Int; pragma Import (C, Slk_Refresh, "slk_refresh"); begin if Slk_Refresh = Curses_Err then raise Curses_Exception; end if; end Refresh_Soft_Label_Keys; procedure Refresh_Soft_Label_Keys_Without_Update is function Slk_Noutrefresh return C_Int; pragma Import (C, Slk_Noutrefresh, "slk_noutrefresh"); begin if Slk_Noutrefresh = Curses_Err then raise Curses_Exception; end if; end Refresh_Soft_Label_Keys_Without_Update; procedure Get_Soft_Label_Key (Label : in Label_Number; Text : out String) is function Slk_Label (Label : C_Int) return chars_ptr; pragma Import (C, Slk_Label, "slk_label"); begin Fill_String (Slk_Label (C_Int (Label)), Text); end Get_Soft_Label_Key; function Get_Soft_Label_Key (Label : in Label_Number) return String is function Slk_Label (Label : C_Int) return chars_ptr; pragma Import (C, Slk_Label, "slk_label"); begin return Fill_String (Slk_Label (C_Int (Label))); end Get_Soft_Label_Key; procedure Clear_Soft_Label_Keys is function Slk_Clear return C_Int; pragma Import (C, Slk_Clear, "slk_clear"); begin if Slk_Clear = Curses_Err then raise Curses_Exception; end if; end Clear_Soft_Label_Keys; procedure Restore_Soft_Label_Keys is function Slk_Restore return C_Int; pragma Import (C, Slk_Restore, "slk_restore"); begin if Slk_Restore = Curses_Err then raise Curses_Exception; end if; end Restore_Soft_Label_Keys; procedure Touch_Soft_Label_Keys is function Slk_Touch return C_Int; pragma Import (C, Slk_Touch, "slk_touch"); begin if Slk_Touch = Curses_Err then raise Curses_Exception; end if; end Touch_Soft_Label_Keys; procedure Switch_Soft_Label_Key_Attributes (Attr : in Character_Attribute_Set; On : in Boolean := True) is function Slk_Attron (Ch : C_Chtype) return C_Int; pragma Import (C, Slk_Attron, "slk_attron"); function Slk_Attroff (Ch : C_Chtype) return C_Int; pragma Import (C, Slk_Attroff, "slk_attroff"); Err : C_Int; Ch : constant Attributed_Character := (Ch => Character'First, Attr => Attr, Color => Color_Pair'First); begin if On then Err := Slk_Attron (AttrChar_To_Chtype (Ch)); else Err := Slk_Attroff (AttrChar_To_Chtype (Ch)); end if; if Err = Curses_Err then raise Curses_Exception; end if; end Switch_Soft_Label_Key_Attributes; procedure Set_Soft_Label_Key_Attributes (Attr : in Character_Attribute_Set := Normal_Video; Color : in Color_Pair := Color_Pair'First) is function Slk_Attrset (Ch : C_Chtype) return C_Int; pragma Import (C, Slk_Attrset, "slk_attrset"); Ch : constant Attributed_Character := (Ch => Character'First, Attr => Attr, Color => Color); begin if Slk_Attrset (AttrChar_To_Chtype (Ch)) = Curses_Err then raise Curses_Exception; end if; end Set_Soft_Label_Key_Attributes; function Get_Soft_Label_Key_Attributes return Character_Attribute_Set is function Slk_Attr return C_Chtype; pragma Import (C, Slk_Attr, "slk_attr"); Attr : constant C_Chtype := Slk_Attr; begin return Chtype_To_AttrChar (Attr).Attr; end Get_Soft_Label_Key_Attributes; function Get_Soft_Label_Key_Attributes return Color_Pair is function Slk_Attr return C_Chtype; pragma Import (C, Slk_Attr, "slk_attr"); Attr : constant C_Chtype := Slk_Attr; begin return Chtype_To_AttrChar (Attr).Color; end Get_Soft_Label_Key_Attributes; procedure Set_Soft_Label_Key_Color (Pair : in Color_Pair) is function Slk_Color (Color : in C_Short) return C_Int; pragma Import (C, Slk_Color, "slk_color"); begin if Slk_Color (C_Short (Pair)) = Curses_Err then raise Curses_Exception; end if; end Set_Soft_Label_Key_Color; ------------------------------------------------------------------------------ procedure Enable_Key (Key : in Special_Key_Code; Enable : in Boolean := True) is function Keyok (Keycode : C_Int; On_Off : Curses_Bool) return C_Int; pragma Import (C, Keyok, "keyok"); begin if Keyok (C_Int (Key), Curses_Bool (Boolean'Pos (Enable))) = Curses_Err then raise Curses_Exception; end if; end Enable_Key; ------------------------------------------------------------------------------ procedure Define_Key (Definition : in String; Key : in Special_Key_Code) is function Defkey (Def : char_array; Key : C_Int) return C_Int; pragma Import (C, Defkey, "define_key"); Txt : char_array (0 .. Definition'Length); Length : size_t; begin To_C (Definition, Txt, Length); if Defkey (Txt, C_Int (Key)) = Curses_Err then raise Curses_Exception; end if; end Define_Key; ------------------------------------------------------------------------------ procedure Un_Control (Ch : in Attributed_Character; Str : out String) is function Unctrl (Ch : C_Chtype) return chars_ptr; pragma Import (C, Unctrl, "unctrl"); begin Fill_String (Unctrl (AttrChar_To_Chtype (Ch)), Str); end Un_Control; function Un_Control (Ch : in Attributed_Character) return String is function Unctrl (Ch : C_Chtype) return chars_ptr; pragma Import (C, Unctrl, "unctrl"); begin return Fill_String (Unctrl (AttrChar_To_Chtype (Ch))); end Un_Control; procedure Delay_Output (Msecs : in Natural) is function Delayoutput (Msecs : C_Int) return C_Int; pragma Import (C, Delayoutput, "delay_output"); begin if Delayoutput (C_Int (Msecs)) = Curses_Err then raise Curses_Exception; end if; end Delay_Output; procedure Flush_Input is function Flushinp return C_Int; pragma Import (C, Flushinp, "flushinp"); begin if Flushinp = Curses_Err then -- docu says that never happens, but... raise Curses_Exception; end if; end Flush_Input; ------------------------------------------------------------------------------ function Baudrate return Natural is function Baud return C_Int; pragma Import (C, Baud, "baudrate"); begin return Natural (Baud); end Baudrate; function Erase_Character return Character is function Erasechar return C_Int; pragma Import (C, Erasechar, "erasechar"); begin return Character'Val (Erasechar); end Erase_Character; function Kill_Character return Character is function Killchar return C_Int; pragma Import (C, Killchar, "killchar"); begin return Character'Val (Killchar); end Kill_Character; function Has_Insert_Character return Boolean is function Has_Ic return Curses_Bool; pragma Import (C, Has_Ic, "has_ic"); begin if Has_Ic = Curses_Bool_False then return False; else return True; end if; end Has_Insert_Character; function Has_Insert_Line return Boolean is function Has_Il return Curses_Bool; pragma Import (C, Has_Il, "has_il"); begin if Has_Il = Curses_Bool_False then return False; else return True; end if; end Has_Insert_Line; function Supported_Attributes return Character_Attribute_Set is function Termattrs return C_Chtype; pragma Import (C, Termattrs, "termattrs"); Ch : constant Attributed_Character := Chtype_To_AttrChar (Termattrs); begin return Ch.Attr; end Supported_Attributes; procedure Long_Name (Name : out String) is function Longname return chars_ptr; pragma Import (C, Longname, "longname"); begin Fill_String (Longname, Name); end Long_Name; function Long_Name return String is function Longname return chars_ptr; pragma Import (C, Longname, "longname"); begin return Fill_String (Longname); end Long_Name; procedure Terminal_Name (Name : out String) is function Termname return chars_ptr; pragma Import (C, Termname, "termname"); begin Fill_String (Termname, Name); end Terminal_Name; function Terminal_Name return String is function Termname return chars_ptr; pragma Import (C, Termname, "termname"); begin return Fill_String (Termname); end Terminal_Name; ------------------------------------------------------------------------------ procedure Init_Pair (Pair : in Redefinable_Color_Pair; Fore : in Color_Number; Back : in Color_Number) is function Initpair (Pair : C_Short; Fore : C_Short; Back : C_Short) return C_Int; pragma Import (C, Initpair, "init_pair"); begin if Integer (Pair) >= Number_Of_Color_Pairs then raise Constraint_Error; end if; if Integer (Fore) >= Number_Of_Colors or else Integer (Back) >= Number_Of_Colors then raise Constraint_Error; end if; if Initpair (C_Short (Pair), C_Short (Fore), C_Short (Back)) = Curses_Err then raise Curses_Exception; end if; end Init_Pair; procedure Pair_Content (Pair : in Color_Pair; Fore : out Color_Number; Back : out Color_Number) is type C_Short_Access is access all C_Short; function Paircontent (Pair : C_Short; Fp : C_Short_Access; Bp : C_Short_Access) return C_Int; pragma Import (C, Paircontent, "pair_content"); F, B : aliased C_Short; begin if Paircontent (C_Short (Pair), F'Access, B'Access) = Curses_Err then raise Curses_Exception; else Fore := Color_Number (F); Back := Color_Number (B); end if; end Pair_Content; function Has_Colors return Boolean is function Hascolors return Curses_Bool; pragma Import (C, Hascolors, "has_colors"); begin if Hascolors = Curses_Bool_False then return False; else return True; end if; end Has_Colors; procedure Init_Color (Color : in Color_Number; Red : in RGB_Value; Green : in RGB_Value; Blue : in RGB_Value) is function Initcolor (Col : C_Short; Red : C_Short; Green : C_Short; Blue : C_Short) return C_Int; pragma Import (C, Initcolor, "init_color"); begin if Initcolor (C_Short (Color), C_Short (Red), C_Short (Green), C_Short (Blue)) = Curses_Err then raise Curses_Exception; end if; end Init_Color; function Can_Change_Color return Boolean is function Canchangecolor return Curses_Bool; pragma Import (C, Canchangecolor, "can_change_color"); begin if Canchangecolor = Curses_Bool_False then return False; else return True; end if; end Can_Change_Color; procedure Color_Content (Color : in Color_Number; Red : out RGB_Value; Green : out RGB_Value; Blue : out RGB_Value) is type C_Short_Access is access all C_Short; function Colorcontent (Color : C_Short; R, G, B : C_Short_Access) return C_Int; pragma Import (C, Colorcontent, "color_content"); R, G, B : aliased C_Short; begin if Colorcontent (C_Short (Color), R'Access, G'Access, B'Access) = Curses_Err then raise Curses_Exception; else Red := RGB_Value (R); Green := RGB_Value (G); Blue := RGB_Value (B); end if; end Color_Content; ------------------------------------------------------------------------------ procedure Save_Curses_Mode (Mode : in Curses_Mode) is function Def_Prog_Mode return C_Int; pragma Import (C, Def_Prog_Mode, "def_prog_mode"); function Def_Shell_Mode return C_Int; pragma Import (C, Def_Shell_Mode, "def_shell_mode"); Err : C_Int; begin case Mode is when Curses => Err := Def_Prog_Mode; when Shell => Err := Def_Shell_Mode; end case; if Err = Curses_Err then raise Curses_Exception; end if; end Save_Curses_Mode; procedure Reset_Curses_Mode (Mode : in Curses_Mode) is function Reset_Prog_Mode return C_Int; pragma Import (C, Reset_Prog_Mode, "reset_prog_mode"); function Reset_Shell_Mode return C_Int; pragma Import (C, Reset_Shell_Mode, "reset_shell_mode"); Err : C_Int; begin case Mode is when Curses => Err := Reset_Prog_Mode; when Shell => Err := Reset_Shell_Mode; end case; if Err = Curses_Err then raise Curses_Exception; end if; end Reset_Curses_Mode; procedure Save_Terminal_State is function Savetty return C_Int; pragma Import (C, Savetty, "savetty"); begin if Savetty = Curses_Err then raise Curses_Exception; end if; end Save_Terminal_State; procedure Reset_Terminal_State is function Resetty return C_Int; pragma Import (C, Resetty, "resetty"); begin if Resetty = Curses_Err then raise Curses_Exception; end if; end Reset_Terminal_State; procedure Rip_Off_Lines (Lines : in Integer; Proc : in Stdscr_Init_Proc) is function Ripoffline (Lines : C_Int; Proc : Stdscr_Init_Proc) return C_Int; pragma Import (C, Ripoffline, "_nc_ripoffline"); begin if Ripoffline (C_Int (Lines), Proc) = Curses_Err then raise Curses_Exception; end if; end Rip_Off_Lines; procedure Set_Cursor_Visibility (Visibility : in out Cursor_Visibility) is function Curs_Set (Curs : C_Int) return C_Int; pragma Import (C, Curs_Set, "curs_set"); Res : C_Int; begin Res := Curs_Set (Cursor_Visibility'Pos (Visibility)); if Res /= Curses_Err then Visibility := Cursor_Visibility'Val (Res); end if; end Set_Cursor_Visibility; procedure Nap_Milli_Seconds (Ms : in Natural) is function Napms (Ms : C_Int) return C_Int; pragma Import (C, Napms, "napms"); begin if Napms (C_Int (Ms)) = Curses_Err then raise Curses_Exception; end if; end Nap_Milli_Seconds; ------------------------------------------------------------------------------ function Standard_Window return Window is Stdscr : Window; pragma Import (C, Stdscr, "stdscr"); begin return Stdscr; end Standard_Window; function Lines return Line_Count is C_Lines : C_Int; pragma Import (C, C_Lines, "LINES"); begin return Line_Count (C_Lines); end Lines; function Columns return Column_Count is C_Columns : C_Int; pragma Import (C, C_Columns, "COLS"); begin return Column_Count (C_Columns); end Columns; function Tab_Size return Natural is C_Tab_Size : C_Int; pragma Import (C, C_Tab_Size, "TABSIZE"); begin return Natural (C_Tab_Size); end Tab_Size; function Number_Of_Colors return Natural is C_Number_Of_Colors : C_Int; pragma Import (C, C_Number_Of_Colors, "COLORS"); begin return Natural (C_Number_Of_Colors); end Number_Of_Colors; function Number_Of_Color_Pairs return Natural is C_Number_Of_Color_Pairs : C_Int; pragma Import (C, C_Number_Of_Color_Pairs, "COLOR_PAIRS"); begin return Natural (C_Number_Of_Color_Pairs); end Number_Of_Color_Pairs; ------------------------------------------------------------------------------ procedure Transform_Coordinates (W : in Window := Standard_Window; Line : in out Line_Position; Column : in out Column_Position; Dir : in Transform_Direction := From_Screen) is type Int_Access is access all C_Int; function Transform (W : Window; Y, X : Int_Access; Dir : Curses_Bool) return C_Int; pragma Import (C, Transform, "wmouse_trafo"); X : aliased C_Int := C_Int (Column); Y : aliased C_Int := C_Int (Line); D : Curses_Bool := Curses_Bool_False; R : C_Int; begin if Dir = To_Screen then D := 1; end if; R := Transform (W, Y'Access, X'Access, D); if R = Curses_False then raise Curses_Exception; else Line := Line_Position (Y); Column := Column_Position (X); end if; end Transform_Coordinates; ------------------------------------------------------------------------------ procedure Use_Default_Colors is function C_Use_Default_Colors return C_Int; pragma Import (C, C_Use_Default_Colors, "use_default_colors"); Err : constant C_Int := C_Use_Default_Colors; begin if Err = Curses_Err then raise Curses_Exception; end if; end Use_Default_Colors; procedure Assume_Default_Colors (Fore : Color_Number := Default_Color; Back : Color_Number := Default_Color) is function C_Assume_Default_Colors (Fore : C_Int; Back : C_Int) return C_Int; pragma Import (C, C_Assume_Default_Colors, "assume_default_colors"); Err : constant C_Int := C_Assume_Default_Colors (C_Int (Fore), C_Int (Back)); begin if Err = Curses_Err then raise Curses_Exception; end if; end Assume_Default_Colors; ------------------------------------------------------------------------------ function Curses_Version return String is function curses_versionC return chars_ptr; pragma Import (C, curses_versionC, "curses_version"); Result : constant chars_ptr := curses_versionC; begin return Fill_String (Result); end Curses_Version; ------------------------------------------------------------------------------ function Use_Extended_Names (Enable : Boolean) return Boolean is function use_extended_namesC (e : Curses_Bool) return C_Int; pragma Import (C, use_extended_namesC, "use_extended_names"); Res : constant C_Int := use_extended_namesC (Curses_Bool (Boolean'Pos (Enable))); begin if Res = C_Int (Curses_Bool_False) then return False; else return True; end if; end Use_Extended_Names; ------------------------------------------------------------------------------ procedure Screen_Dump_To_File (Filename : in String) is function scr_dump (f : char_array) return C_Int; pragma Import (C, scr_dump, "scr_dump"); Txt : char_array (0 .. Filename'Length); Length : size_t; begin To_C (Filename, Txt, Length); if Curses_Err = scr_dump (Txt) then raise Curses_Exception; end if; end Screen_Dump_To_File; procedure Screen_Restore_From_File (Filename : in String) is function scr_restore (f : char_array) return C_Int; pragma Import (C, scr_restore, "scr_restore"); Txt : char_array (0 .. Filename'Length); Length : size_t; begin To_C (Filename, Txt, Length); if Curses_Err = scr_restore (Txt) then raise Curses_Exception; end if; end Screen_Restore_From_File; procedure Screen_Init_From_File (Filename : in String) is function scr_init (f : char_array) return C_Int; pragma Import (C, scr_init, "scr_init"); Txt : char_array (0 .. Filename'Length); Length : size_t; begin To_C (Filename, Txt, Length); if Curses_Err = scr_init (Txt) then raise Curses_Exception; end if; end Screen_Init_From_File; procedure Screen_Set_File (Filename : in String) is function scr_set (f : char_array) return C_Int; pragma Import (C, scr_set, "scr_set"); Txt : char_array (0 .. Filename'Length); Length : size_t; begin To_C (Filename, Txt, Length); if Curses_Err = scr_set (Txt) then raise Curses_Exception; end if; end Screen_Set_File; ------------------------------------------------------------------------------ procedure Resize (Win : Window := Standard_Window; Number_Of_Lines : Line_Count; Number_Of_Columns : Column_Count) is function wresize (win : Window; lines : C_Int; columns : C_Int) return C_Int; pragma Import (C, wresize); begin if wresize (Win, C_Int (Number_Of_Lines), C_Int (Number_Of_Columns)) = Curses_Err then raise Curses_Exception; end if; end Resize; ------------------------------------------------------------------------------ end Terminal_Interface.Curses;
33.023383
79
0.555961
cb44dfb66dc815a676f073283feba6c1000b61c7
8,300
ads
Ada
Validation/pyFrame3DD-master/gcc-master/gcc/ada/libgnarl/a-intnam__aix.ads
djamal2727/Main-Bearing-Analytical-Model
2f00c2219c71be0175c6f4f8f1d4cca231d97096
[ "Apache-2.0" ]
null
null
null
Validation/pyFrame3DD-master/gcc-master/gcc/ada/libgnarl/a-intnam__aix.ads
djamal2727/Main-Bearing-Analytical-Model
2f00c2219c71be0175c6f4f8f1d4cca231d97096
[ "Apache-2.0" ]
null
null
null
Validation/pyFrame3DD-master/gcc-master/gcc/ada/libgnarl/a-intnam__aix.ads
djamal2727/Main-Bearing-Analytical-Model
2f00c2219c71be0175c6f4f8f1d4cca231d97096
[ "Apache-2.0" ]
null
null
null
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS -- -- -- -- A D A . I N T E R R U P T S . N A M E S -- -- -- -- S p e c -- -- -- -- Copyright (C) 1991-2020, Free Software Foundation, Inc. -- -- -- -- GNARL is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNARL was developed by the GNARL team at Florida State University. -- -- Extensive contributions were provided by Ada Core Technologies, Inc. -- -- -- ------------------------------------------------------------------------------ -- This is a AIX version of this package -- The following signals are reserved by the run time (native threads): -- SIGFPE, SIGILL, SIGSEGV, SIGBUS, SIGABRT, SIGTRAP, SIGINT, SIGEMT -- SIGSTOP, SIGKILL -- The following signals are reserved by the run time (FSU threads): -- SIGFPE, SIGILL, SIGSEGV, SIGBUS, SIGABRT, SIGTRAP, SIGINT, SIGALRM, -- SIGWAITING, SIGSTOP, SIGKILL -- The pragma Unreserve_All_Interrupts affects the following signal(s): -- SIGINT: made available for Ada handler -- This target-dependent package spec contains names of interrupts -- supported by the local system. with System.OS_Interface; package Ada.Interrupts.Names is -- All identifiers in this unit are implementation defined pragma Implementation_Defined; -- Beware that the mapping of names to signals may be many-to-one. There -- may be aliases. Also, for all signal names that are not supported on -- the current system the value of the corresponding constant will be zero. SIGHUP : constant Interrupt_ID := System.OS_Interface.SIGHUP; -- hangup SIGINT : constant Interrupt_ID := System.OS_Interface.SIGINT; -- interrupt (rubout) SIGQUIT : constant Interrupt_ID := System.OS_Interface.SIGQUIT; -- quit (ASCD FS) SIGILL : constant Interrupt_ID := System.OS_Interface.SIGILL; -- illegal instruction (not reset) SIGTRAP : constant Interrupt_ID := System.OS_Interface.SIGTRAP; -- trace trap (not reset) SIGIOT : constant Interrupt_ID := System.OS_Interface.SIGIOT; -- IOT instruction SIGABRT : constant Interrupt_ID := -- used by abort, System.OS_Interface.SIGABRT; -- replace SIGIOT in the future SIGEMT : constant Interrupt_ID := System.OS_Interface.SIGEMT; -- EMT instruction SIGFPE : constant Interrupt_ID := System.OS_Interface.SIGFPE; -- floating point exception SIGKILL : constant Interrupt_ID := System.OS_Interface.SIGKILL; -- kill (cannot be caught or ignored) SIGBUS : constant Interrupt_ID := System.OS_Interface.SIGBUS; -- bus error SIGSEGV : constant Interrupt_ID := System.OS_Interface.SIGSEGV; -- segmentation violation SIGSYS : constant Interrupt_ID := System.OS_Interface.SIGSYS; -- bad argument to system call SIGPIPE : constant Interrupt_ID := -- write on a pipe with System.OS_Interface.SIGPIPE; -- no one to read it SIGALRM : constant Interrupt_ID := System.OS_Interface.SIGALRM; -- alarm clock SIGTERM : constant Interrupt_ID := System.OS_Interface.SIGTERM; -- software termination signal from kill SIGUSR1 : constant Interrupt_ID := System.OS_Interface.SIGUSR1; -- user defined signal 1 SIGUSR2 : constant Interrupt_ID := System.OS_Interface.SIGUSR2; -- user defined signal 2 SIGCLD : constant Interrupt_ID := System.OS_Interface.SIGCLD; -- child status change SIGCHLD : constant Interrupt_ID := System.OS_Interface.SIGCHLD; -- 4.3BSD's/POSIX name for SIGCLD SIGPWR : constant Interrupt_ID := System.OS_Interface.SIGPWR; -- power-fail restart SIGWINCH : constant Interrupt_ID := System.OS_Interface.SIGWINCH; -- window size change SIGURG : constant Interrupt_ID := System.OS_Interface.SIGURG; -- urgent condition on IO channel SIGPOLL : constant Interrupt_ID := System.OS_Interface.SIGPOLL; -- pollable event occurred SIGIO : constant Interrupt_ID := -- input/output possible, System.OS_Interface.SIGIO; -- SIGPOLL alias (Solaris) SIGSTOP : constant Interrupt_ID := System.OS_Interface.SIGSTOP; -- stop (cannot be caught or ignored) SIGTSTP : constant Interrupt_ID := System.OS_Interface.SIGTSTP; -- user stop requested from tty SIGCONT : constant Interrupt_ID := System.OS_Interface.SIGCONT; -- stopped process has been continued SIGTTIN : constant Interrupt_ID := System.OS_Interface.SIGTTIN; -- background tty read attempted SIGTTOU : constant Interrupt_ID := System.OS_Interface.SIGTTOU; -- background tty write attempted SIGVTALRM : constant Interrupt_ID := System.OS_Interface.SIGVTALRM; -- virtual timer expired SIGPROF : constant Interrupt_ID := System.OS_Interface.SIGPROF; -- profiling timer expired SIGXCPU : constant Interrupt_ID := System.OS_Interface.SIGXCPU; -- CPU time limit exceeded SIGXFSZ : constant Interrupt_ID := System.OS_Interface.SIGXFSZ; -- filesize limit exceeded SIGMSG : constant Interrupt_ID := System.OS_Interface.SIGMSG; -- input data is in the ring buffer SIGDANGER : constant Interrupt_ID := System.OS_Interface.SIGDANGER; -- system crash imminent; SIGMIGRATE : constant Interrupt_ID := System.OS_Interface.SIGMIGRATE; -- migrate process SIGPRE : constant Interrupt_ID := System.OS_Interface.SIGPRE; -- programming exception SIGVIRT : constant Interrupt_ID := System.OS_Interface.SIGVIRT; -- AIX virtual time alarm SIGALRM1 : constant Interrupt_ID := System.OS_Interface.SIGALRM1; -- m:n condition variables SIGWAITING : constant Interrupt_ID := System.OS_Interface.SIGWAITING; -- m:n scheduling SIGKAP : constant Interrupt_ID := System.OS_Interface.SIGKAP; -- keep alive poll from native keyboard SIGGRANT : constant Interrupt_ID := System.OS_Interface.SIGGRANT; -- monitor mode granted SIGRETRACT : constant Interrupt_ID := System.OS_Interface.SIGRETRACT; -- monitor mode should be relinquished SIGSOUND : constant Interrupt_ID := System.OS_Interface.SIGSOUND; -- sound control has completed SIGSAK : constant Interrupt_ID := System.OS_Interface.SIGSAK; -- secure attention key end Ada.Interrupts.Names;
41.089109
79
0.603133
4ad504305e07a83499402f5c1bf6f26a1469150b
6,004
ads
Ada
source/oasis/program-compilation_units.ads
optikos/oasis
9f64d46d26d964790d69f9db681c874cfb3bf96d
[ "MIT" ]
null
null
null
source/oasis/program-compilation_units.ads
optikos/oasis
9f64d46d26d964790d69f9db681c874cfb3bf96d
[ "MIT" ]
null
null
null
source/oasis/program-compilation_units.ads
optikos/oasis
9f64d46d26d964790d69f9db681c874cfb3bf96d
[ "MIT" ]
2
2019-09-14T23:18:50.000Z
2019-10-02T10:11:40.000Z
-- Copyright (c) 2019 Maxim Reznik <[email protected]> -- -- SPDX-License-Identifier: MIT -- License-Filename: LICENSE ------------------------------------------------------------- limited with Program.Compilations; limited with Program.Library_Items; limited with Program.Library_Unit_Bodies; limited with Program.Library_Unit_Declarations; limited with Program.Subunits; with Program.Element_Vectors; with Program.Elements; package Program.Compilation_Units is pragma Pure; -- A specific Compilation_Unit value is valid (usable) for as long as the -- Context variable, used to create it, remains open. Once an Context is -- closed, all associated Compilation_Unit values become invalid. It is -- erroneous to use an invalid Compilation_Unit value. type Compilation_Unit is limited interface; -- The Ada Compilation Unit abstraction: -- -- The text of a program is submitted to the compiler in one or more -- compilations. Each compilation is a succession of compilation units. -- -- Compilation units are composed of three distinct parts: -- -- a) A context clause. -- -- b) The declaration of a library_item or unit. -- -- c) Pragmas that apply to the compilation, of which the unit is a part. -- -- The context clause contains zero or more with clauses, use clauses, -- pragma elaborates, and possibly other pragmas. -- -- We treat Pragmas that appear immediately after the context clause and -- before the subsequent declaration part as belonging to the context -- clause part. -- -- The declaration associated with a compilation unit is one of: a package, -- a procedure, a function, a generic, or a subunit for normal units. -- -- The abstract type Compilation_Unit is a handle for compilation units as -- a whole. An object of the type Compilation_Unit deals with the external -- view of compilation units such as their relationships with other units -- or their compilation attributes. type Compilation_Unit_Access is access all Compilation_Unit'Class with Storage_Size => 0; function Assigned (Self : access Compilation_Unit'Class) return Boolean is (Self /= null); not overriding function Compilation (Self : access Compilation_Unit) return Program.Compilations.Compilation_Access is abstract; -- Return corresponding compilation not overriding function Full_Name (Self : access Compilation_Unit) return Text is abstract; -- Returns the string image of the fully expanded Ada name of the given -- compilation unit. This may be a simple name ("A") of a root library -- unit, or an expanded name ("A.B") of a subunit or non-root child unit. -- An expanded name shall contain the full parent_unit_name as its prefix. not overriding function Context_Clause_Elements (Self : access Compilation_Unit) return Program.Element_Vectors.Element_Vector_Access is abstract; -- with Post'Class => -- (Context_Clause_Elements'Result.Is_Empty -- or else (for all X in Context_Clause_Elements'Result.Each_Element -- => X.Element.Is_Pragma -- or X.Element.Is_With_Clause -- or X.Element.Is_Use_Clause)); -- Returns a list of with clauses, use clauses, and pragmas that explicitly -- appear in the context clause of the compilation unit, in their order of -- appearance. not overriding function Unit_Declaration (Self : access Compilation_Unit) return not null Program.Elements.Element_Access is abstract with Post'Class => (Unit_Declaration'Result.Is_Declaration); -- Returns the element representing the declaration of the compilation_unit not overriding function Is_Subunit_Unit (Self : Compilation_Unit) return Boolean is abstract; -- Return True if Self is a subunit. function Is_Subunit (Self : Compilation_Unit'Class) return Boolean is (Self.Is_Subunit_Unit); -- Return True if Self is a subunit. function To_Subunit (Self : access Compilation_Unit'Class) return Program.Subunits.Subunit_Access with Pre => Self.Is_Subunit; -- Convert to the subunit type. not overriding function Is_Library_Item_Unit (Self : Compilation_Unit) return Boolean is abstract; -- Return True if Self is a library_item. function Is_Library_Item (Self : Compilation_Unit'Class) return Boolean is (Self.Is_Library_Item_Unit); -- Return True if Self is a library_item. function To_Library_Item (Self : access Compilation_Unit'Class) return Program.Library_Items.Library_Item_Access with Pre => Self.Is_Library_Item; -- Convert to the library_item type. not overriding function Is_Library_Unit_Body_Unit (Self : Compilation_Unit) return Boolean is abstract; -- Return True if Self is a library_unit_body. function Is_Library_Unit_Body (Self : Compilation_Unit'Class) return Boolean is (Self.Is_Library_Unit_Body_Unit); -- Return True if Self is a library_unit_body. function To_Library_Unit_Body (Self : access Compilation_Unit'Class) return Program.Library_Unit_Bodies.Library_Unit_Body_Access with Pre => Self.Is_Library_Unit_Body; -- Convert to the library_unit_body type. not overriding function Is_Library_Unit_Declaration_Unit (Self : Compilation_Unit) return Boolean is abstract; -- Return True if Self is a library_unit_declaration. function Is_Library_Unit_Declaration (Self : Compilation_Unit'Class) return Boolean is (Self.Is_Library_Unit_Declaration_Unit); -- Return True if Self is a library_unit_declaration. function To_Library_Unit_Declaration (Self : access Compilation_Unit'Class) return Program.Library_Unit_Declarations.Library_Unit_Declaration_Access with Pre => Self.Is_Library_Unit_Declaration; -- Convert to the library_unit_declaration type. end Program.Compilation_Units;
41.406897
79
0.724684
18f476e9fd0645cdda17f4bc33fccbb5cb84b4dd
7,379
ads
Ada
.emacs.d/elpa/wisi-3.0.1/wisitoken-parse-lr-parser.ads
caqg/linux-home
eed631aae6f5e59e4f46e14f1dff443abca5fa28
[ "Linux-OpenIB" ]
null
null
null
.emacs.d/elpa/wisi-3.0.1/wisitoken-parse-lr-parser.ads
caqg/linux-home
eed631aae6f5e59e4f46e14f1dff443abca5fa28
[ "Linux-OpenIB" ]
null
null
null
.emacs.d/elpa/wisi-3.0.1/wisitoken-parse-lr-parser.ads
caqg/linux-home
eed631aae6f5e59e4f46e14f1dff443abca5fa28
[ "Linux-OpenIB" ]
null
null
null
-- Abstract : -- -- A generalized LR parser. -- -- In a child package of Parser.LR partly for historical reasons, -- partly to allow McKenzie_Recover to be in a sibling package. -- -- Copyright (C) 2002, 2003, 2009, 2010, 2013-2015, 2017 - 2019 Free Software Foundation, Inc. -- -- This file is part of the WisiToken package. -- -- The WisiToken package is free software; you can redistribute it -- and/or modify it under terms of the GNU General Public License as -- published by the Free Software Foundation; either version 3, or -- (at your option) any later version. This library is distributed in -- the hope that it will be useful, but WITHOUT ANY WARRANTY; without -- even the implied warranty of MERCHAN- TABILITY or FITNESS FOR A -- PARTICULAR PURPOSE. -- -- As a special exception under Section 7 of GPL version 3, you are granted -- additional permissions described in the GCC Runtime Library Exception, -- version 3.1, as published by the Free Software Foundation. pragma License (Modified_GPL); with WisiToken.Parse.LR.Parser_Lists; with WisiToken.Lexer; with WisiToken.Parse; with WisiToken.Syntax_Trees; package WisiToken.Parse.LR.Parser is Default_Max_Parallel : constant := 15; type Language_Fixes_Access is access procedure (Trace : in out WisiToken.Trace'Class; Lexer : access constant WisiToken.Lexer.Instance'Class; Parser_Label : in Natural; Parse_Table : in WisiToken.Parse.LR.Parse_Table; Terminals : in Base_Token_Arrays.Vector; Tree : in Syntax_Trees.Tree; Local_Config_Heap : in out Config_Heaps.Heap_Type; Config : in Configuration); -- Config encountered a parse table Error action, or failed a -- semantic check; attempt to provide a language-specific fix, -- enqueuing new configs on Local_Config_Heap. -- -- For a failed semantic check, Config.Stack is in the pre-reduce -- state, Config.Error_Token gives the nonterm token, -- Config.Check_Token_Count the token count for the reduce. May be -- called with Nonterm.Virtual = True or Tree.Valid_Indices (stack -- top token_count items) false. -- -- For an Error action, Config.Error_Token gives the terminal that -- caused the error. type Language_Matching_Begin_Tokens_Access is access procedure (Tokens : in Token_ID_Array_1_3; Config : in Configuration; Matching_Tokens : out Token_ID_Arrays.Vector; Forbid_Minimal_Complete : out Boolean); -- Tokens (1) caused a parse error; Tokens (2 .. 3) are the following -- tokens (Invalid_Token_ID if none). Set Matching_Tokens to a token -- sequence that starts a production matching Tokens. If -- Minimal_Complete would produce a bad solution at this error point, -- set Forbid_Minimal_Complete True. -- -- For example, if Tokens is a block end, return tokens that are the -- corresponding block begin. If the error point is inside a -- multi-token 'end' (ie 'end if;', or 'end <name>;'), set -- Forbid_Minimal_Complete True. type Language_String_ID_Set_Access is access function (Descriptor : in WisiToken.Descriptor; String_Literal_ID : in Token_ID) return Token_ID_Set; -- Return a Token_ID_Set containing String_Literal_ID and -- nonterminals that can contain String_Literal_ID as part of an -- expression. Used in placing a missing string quote. type Post_Recover_Access is access procedure; type Parser is new WisiToken.Parse.Base_Parser with record Table : Parse_Table_Ptr; Language_Fixes : Language_Fixes_Access; Language_Matching_Begin_Tokens : Language_Matching_Begin_Tokens_Access; Language_String_ID_Set : Language_String_ID_Set_Access; String_Quote_Checked : Line_Number_Type := Invalid_Line_Number; -- Max line checked for missing string quote. Post_Recover : Post_Recover_Access; -- Gather data for tests. Shared_Tree : aliased Syntax_Trees.Base_Tree; -- Each parser (normal and recover) has its own branched syntax tree, -- all branched from this tree. Terminals are added to the tree when -- they become the current token. -- -- It is never the case that terminals are added to this shared tree -- when there is more than one task active, so we don't need a -- protected tree. -- -- See WisiToken.LR.Parser_Lists Parser_State for more discussion of -- Shared_Tree. Parsers : aliased Parser_Lists.List; Max_Parallel : SAL.Base_Peek_Type; Terminate_Same_State : Boolean; Enable_McKenzie_Recover : Boolean; Recover_Log_File : Ada.Text_IO.File_Type; Partial_Parse_Active : Boolean := False; -- Partial_Parse_Active is only used in recover log messages. end record; overriding procedure Finalize (Object : in out LR.Parser.Parser); -- Deep free Object.Table. procedure New_Parser (Parser : out LR.Parser.Parser; Trace : not null access WisiToken.Trace'Class; Lexer : in WisiToken.Lexer.Handle; Table : in Parse_Table_Ptr; Language_Fixes : in Language_Fixes_Access; Language_Matching_Begin_Tokens : in Language_Matching_Begin_Tokens_Access; Language_String_ID_Set : in Language_String_ID_Set_Access; User_Data : in WisiToken.Syntax_Trees.User_Data_Access; Max_Parallel : in SAL.Base_Peek_Type := Default_Max_Parallel; Terminate_Same_State : in Boolean := True); overriding procedure Parse (Shared_Parser : aliased in out LR.Parser.Parser); -- Attempt a parse. Calls Parser.Lexer.Reset, runs lexer to end of -- input setting Shared_Parser.Terminals, then parses tokens. -- -- If an error is encountered, Parser.Lexer_Errors and -- Parsers(*).Errors contain information about the errors. If a -- recover strategy succeeds, no exception is raised. If recover does -- not succeed, raises Syntax_Error. -- -- For errors where no recovery is possible, raises Parse_Error with -- an appropriate error message. overriding function Tree (Shared_Parser : in Parser) return Syntax_Trees.Tree; -- If there is one parser in Parsers, return its tree. Otherwise, -- raise Parse_Error for an ambiguous parse. overriding procedure Execute_Actions (Parser : in out LR.Parser.Parser); -- Call User_Data.Delete_Token on any tokens deleted by error -- recovery, then User_Data.Reduce and the grammar semantic actions -- on all nonterms in the syntax tree. overriding function Any_Errors (Parser : in LR.Parser.Parser) return Boolean; -- Return True if any errors where encountered, recovered or not. overriding procedure Put_Errors (Parser : in LR.Parser.Parser); -- Put user-friendly error messages from the parse to -- Ada.Text_IO.Current_Error. end WisiToken.Parse.LR.Parser;
46.11875
98
0.672313
d0c907592307884c0cc760cff6676e677488bda9
10,058
ads
Ada
src/ewok-tasks.ads
vdh-anssi/ewok-kernel
9a88dcae16659c212c4123b7a9272c9dfa51f85a
[ "Apache-2.0" ]
null
null
null
src/ewok-tasks.ads
vdh-anssi/ewok-kernel
9a88dcae16659c212c4123b7a9272c9dfa51f85a
[ "Apache-2.0" ]
null
null
null
src/ewok-tasks.ads
vdh-anssi/ewok-kernel
9a88dcae16659c212c4123b7a9272c9dfa51f85a
[ "Apache-2.0" ]
null
null
null
-- -- Copyright 2018 The wookey project team <[email protected]> -- - Ryad Benadjila -- - Arnauld Michelizza -- - Mathieu Renard -- - Philippe Thierry -- - Philippe Trebuchet -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- -- with ewok.tasks_shared; use ewok.tasks_shared; with ewok.devices_shared; use ewok.devices_shared; with ewok.ipc; with ewok.exported.dma; with ewok.dma_shared; with soc; with soc.layout; package ewok.tasks with spark_mode => on is subtype t_task_name is string (1 .. 10); type t_task_state is ( -- No task in this slot TASK_STATE_EMPTY, -- Task can be elected by the scheduler with its standard priority -- or an ISR is ready for execution TASK_STATE_RUNNABLE, -- Force the scheduler to choose that task TASK_STATE_FORCED, -- Pending syscall. Task can't be scheduled. TASK_STATE_SVC_BLOCKED, -- An ISR is finished TASK_STATE_ISR_DONE, -- Task currently has nothing to do, not schedulable TASK_STATE_IDLE, -- Task is sleeping TASK_STATE_SLEEPING, -- Task is deeply sleeping TASK_STATE_SLEEPING_DEEP, -- Task has generated an exception (memory fault, etc.), not -- schedulable anymore TASK_STATE_FAULT, -- Task has return from its main() function. Yet its ISR handlers can -- still be executed if needed TASK_STATE_FINISHED, -- Task has emitted a blocking send() and is waiting for the -- receiver to emit a recv() TASK_STATE_IPC_SEND_BLOCKED, -- Task has emitted a blocking recv() and is waiting for a message TASK_STATE_IPC_RECV_BLOCKED, -- Task has emitted a blocking send() and is waiting an -- acknowledgement after the message has been received TASK_STATE_IPC_WAIT_ACK, -- Task has entered in a critical section. Related ISRs can't be executed TASK_STATE_LOCKED); type t_task_type is (-- Kernel task TASK_TYPE_KERNEL, -- User task, being executed in user mode, with restricted access TASK_TYPE_USER); type t_main_context is record frame_a : ewok.t_stack_frame_access := NULL; end record; type t_isr_context is record entry_point : system_address := 0; device_id : ewok.devices_shared.t_device_id := ID_DEV_UNUSED; sched_policy : ewok.tasks_shared.t_scheduling_post_isr := ISR_STANDARD; frame_a : ewok.t_stack_frame_access := NULL; end record; -- -- Tasks -- MAX_DEVS_PER_TASK : constant := 10; MAX_DMAS_PER_TASK : constant := 8; MAX_INTERRUPTS_PER_TASK : constant := 8; MAX_DMA_SHM_PER_TASK : constant := 4; type t_registered_dma_index_list is array (unsigned_32 range <>) of ewok.dma_shared.t_user_dma_index with default_component_value => ewok.dma_shared.ID_DMA_UNUSED; type t_dma_shm_info_list is array (unsigned_32 range <>) of ewok.exported.dma.t_dma_shm_info; type t_device is record device_id : ewok.devices_shared.t_device_id := ID_DEV_UNUSED; mounted : boolean := false; end record; type t_device_list is array (unsigned_8 range <>) of t_device; type t_ipc_endpoint_id_list is array (ewok.tasks_shared.t_task_id) of ewok.ipc.t_extended_endpoint_id with default_component_value => ewok.ipc.ID_ENDPOINT_UNUSED; type t_task is record name : t_task_name := " "; entry_point : system_address := 0; ttype : t_task_type := TASK_TYPE_USER; mode : t_task_mode := TASK_MODE_MAINTHREAD; id : ewok.tasks_shared.t_task_id := ID_UNUSED; prio : unsigned_8 := 0; #if CONFIG_KERNEL_DOMAIN domain : unsigned_8 := 0; #end if; #if CONFIG_KERNEL_SCHED_DEBUG count : unsigned_32 := 0; force_count : unsigned_32 := 0; isr_count : unsigned_32 := 0; #end if; num_dma_shms : unsigned_32 range 0 .. MAX_DMA_SHM_PER_TASK := 0; dma_shm : t_dma_shm_info_list (1 .. MAX_DMA_SHM_PER_TASK); num_dma_id : unsigned_32 range 0 .. MAX_DMAS_PER_TASK := 0; dma_id : t_registered_dma_index_list (1 .. MAX_DMAS_PER_TASK); num_devs : unsigned_8 range 0 .. MAX_DEVS_PER_TASK := 0; devices : t_device_list (1 .. MAX_DEVS_PER_TASK); init_done : boolean := false; data_slot_start : system_address := 0; data_slot_end : system_address := 0; txt_slot_start : system_address := 0; txt_slot_end : system_address := 0; stack_bottom : system_address := 0; stack_top : system_address := 0; stack_size : unsigned_16 := 0; state : t_task_state := TASK_STATE_EMPTY; isr_state : t_task_state := TASK_STATE_EMPTY; ipc_endpoint_id : t_ipc_endpoint_id_list; ctx : aliased t_main_context; isr_ctx : aliased t_isr_context; end record; type t_task_array is array (t_task_id range <>) of aliased t_task; ------------- -- Globals -- ------------- -- The list of the running tasks tasks_list : t_task_array (ID_APP1 .. ID_KERNEL); softirq_task_name : aliased t_task_name := "SOFTIRQ" & " "; idle_task_name : aliased t_task_name := "IDLE" & " "; --------------- -- Functions -- --------------- pragma assertion_policy (pre => IGNORE, post => IGNORE, assert => IGNORE); procedure idle_task with no_return; procedure finished_task with no_return; -- create various task's stack -- preconditions : -- Here we check that generated headers, defining stack address and -- program counter of various stack are valid for the currently -- supported SoC. This is a sanitizing function for generated files. procedure create_stack (sp : in system_address; pc : in system_address; params : in ewok.t_parameters; frame_a : out ewok.t_stack_frame_access) with -- precondition 1 : stack pointer must be in RAM pre => ( (sp >= soc.layout.USER_RAM_BASE and sp <= (soc.layout.USER_RAM_BASE + soc.layout.USER_RAM_SIZE)) or (sp >= soc.layout.KERNEL_RAM_BASE and sp <= (soc.layout.KERNEL_RAM_BASE + soc.layout.KERNEL_RAM_SIZE)) ) and ( -- precondition 2 : program counter must be in flash pc >= soc.layout.FLASH_BASE and pc <= soc.layout.FLASH_BASE + soc.layout.FLASH_SIZE ), global => ( in_out => tasks_list ); procedure set_default_values (tsk : out t_task); procedure init_softirq_task; procedure init_idle_task; procedure init_apps; function is_real_user (id : ewok.tasks_shared.t_task_id) return boolean with inline_always; #if CONFIG_KERNEL_DOMAIN function get_domain (id : in ewok.tasks_shared.t_task_id) return unsigned_8 with inline; #end if; function get_task_id (name : t_task_name) return ewok.tasks_shared.t_task_id; procedure set_state (id : ewok.tasks_shared.t_task_id; mode : t_task_mode; state : t_task_state) with inline; function get_state (id : ewok.tasks_shared.t_task_id; mode : t_task_mode) return t_task_state with inline; function get_mode (id : in ewok.tasks_shared.t_task_id) return t_task_mode with inline, global => null; procedure set_mode (id : in ewok.tasks_shared.t_task_id; mode : in ewok.tasks_shared.t_task_mode) with inline, global => ( in_out => tasks_list ); function is_ipc_waiting (id : in ewok.tasks_shared.t_task_id) return boolean; -- Set return value inside a syscall -- Note: mode must be defined as a task can do a syscall while in ISR mode -- or in THREAD mode procedure set_return_value (id : in ewok.tasks_shared.t_task_id; mode : in t_task_mode; val : in unsigned_32) with inline; procedure task_init with global => null; function is_init_done (id : ewok.tasks_shared.t_task_id) return boolean; procedure append_device (id : in ewok.tasks_shared.t_task_id; dev_id : in ewok.devices_shared.t_device_id; descriptor : out unsigned_8; success : out boolean) with post => (if success = false then descriptor = 0 else descriptor > 0 and descriptor < tasks_list(id).devices'last); procedure remove_device (id : in ewok.tasks_shared.t_task_id; dev_descriptor : in unsigned_8); function is_mounted (id : in ewok.tasks_shared.t_task_id; dev_descriptor : in unsigned_8) return boolean; procedure mount_device (id : in ewok.tasks_shared.t_task_id; dev_descriptor : in unsigned_8; success : out boolean); procedure unmount_device (id : in ewok.tasks_shared.t_task_id; dev_descriptor : in unsigned_8; success : out boolean); end ewok.tasks;
32.340836
80
0.623583
10c796508e18d43d0619c6b33e01f3cfa2e82152
128,274
adb
Ada
test/halide_data/pldi_camera_ready/big_apps_32_real/conv2d_b2b/collateral/conv2d_b2b/hls_target/.autopilot/db/call_Loop_LB2D_buf_p_1.adb
David-Durst/embeddedHaskellAetherling
34c5403e07433e572170699f3bd69c5b5c3eff2d
[ "BSD-3-Clause" ]
20
2019-03-12T20:12:31.000Z
2022-02-07T04:23:22.000Z
test/halide_data/pldi_camera_ready/big_apps_32_real/conv2d_b2b/collateral/conv2d_b2b/hls_target/.autopilot/db/call_Loop_LB2D_buf_p_1.adb
David-Durst/embeddedHaskellAetherling
34c5403e07433e572170699f3bd69c5b5c3eff2d
[ "BSD-3-Clause" ]
30
2019-07-22T19:25:42.000Z
2020-06-18T17:58:43.000Z
test/halide_data/pldi_camera_ready/big_apps_32_real/conv2d_b2b/collateral/conv2d_b2b/hls_target/.autopilot/db/call_Loop_LB2D_buf_p_1.adb
David-Durst/embeddedHaskellAetherling
34c5403e07433e572170699f3bd69c5b5c3eff2d
[ "BSD-3-Clause" ]
3
2019-10-14T18:07:26.000Z
2022-01-20T14:36:17.000Z
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <!DOCTYPE boost_serialization> <boost_serialization signature="serialization::archive" version="14"> <syndb class_id="0" tracking_level="0" version="0"> <userIPLatency>-1</userIPLatency> <userIPName/> <cdfg class_id="1" tracking_level="1" version="0" object_id="_0"> <name>call_Loop_LB2D_buf_p_1</name> <ret_bitwidth>0</ret_bitwidth> <ports class_id="2" tracking_level="0" version="0"> <count>2</count> <item_version>0</item_version> <item class_id="3" tracking_level="1" version="0" object_id="_1"> <Value class_id="4" tracking_level="0" version="0"> <Obj class_id="5" tracking_level="0" version="0"> <type>1</type> <id>1</id> <name>in_stream_V_value_V</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo class_id="6" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>stream&amp;lt;PackedStencil&amp;lt;int, 1, 1, 1, 1&amp;gt; &amp;gt;.V.value.V</originalName> <rtlName/> <coreName>FIFO_SRL</coreName> </Obj> <bitwidth>32</bitwidth> </Value> <direction>0</direction> <if_type>3</if_type> <array_size>0</array_size> <bit_vecs class_id="7" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> <item class_id_reference="3" object_id="_2"> <Value> <Obj> <type>1</type> <id>2</id> <name>slice_stream_V_value_V</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName/> <coreName>FIFO_SRL</coreName> </Obj> <bitwidth>64</bitwidth> </Value> <direction>1</direction> <if_type>3</if_type> <array_size>0</array_size> <bit_vecs> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> </ports> <nodes class_id="8" tracking_level="0" version="0"> <count>25</count> <item_version>0</item_version> <item class_id="9" tracking_level="1" version="0" object_id="_3"> <Value> <Obj> <type>0</type> <id>7</id> <name>buffer_0_value_V</name> <fileName>../../../lib_files/Linebuffer.h</fileName> <fileDirectory>..</fileDirectory> <lineNumber>168</lineNumber> <contextFuncName>call</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item class_id="10" tracking_level="0" version="0"> <first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d_b2b</first> <second class_id="11" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="12" tracking_level="0" version="0"> <first class_id="13" tracking_level="0" version="0"> <first>../../../lib_files/Linebuffer.h</first> <second>call</second> </first> <second>168</second> </item> </second> </item> </inlineStackInfo> <originalName>buffer[0].value.V</originalName> <rtlName>buffer_0_value_V_U</rtlName> <coreName>RAM</coreName> </Obj> <bitwidth>32</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>50</item> </oprand_edges> <opcode>alloca</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_4"> <Value> <Obj> <type>0</type> <id>8</id> <name/> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>51</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_5"> <Value> <Obj> <type>0</type> <id>10</id> <name>row</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>row</originalName> <rtlName/> <coreName/> </Obj> <bitwidth>11</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>53</item> <item>54</item> <item>55</item> <item>56</item> </oprand_edges> <opcode>phi</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_6"> <Value> <Obj> <type>0</type> <id>11</id> <name>tmp</name> <fileName>../../../lib_files/Linebuffer.h</fileName> <fileDirectory>..</fileDirectory> <lineNumber>177</lineNumber> <contextFuncName>call</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d_b2b</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>../../../lib_files/Linebuffer.h</first> <second>call</second> </first> <second>177</second> </item> </second> </item> </inlineStackInfo> <originalName/> <rtlName>tmp_fu_120_p2</rtlName> <coreName/> </Obj> <bitwidth>1</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>57</item> <item>59</item> </oprand_edges> <opcode>icmp</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_7"> <Value> <Obj> <type>0</type> <id>13</id> <name>row_1</name> <fileName>../../../lib_files/Linebuffer.h</fileName> <fileDirectory>..</fileDirectory> <lineNumber>177</lineNumber> <contextFuncName>call</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d_b2b</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>../../../lib_files/Linebuffer.h</first> <second>call</second> </first> <second>177</second> </item> </second> </item> </inlineStackInfo> <originalName>row</originalName> <rtlName>row_1_fu_126_p2</rtlName> <coreName/> </Obj> <bitwidth>11</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>60</item> <item>62</item> </oprand_edges> <opcode>add</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_8"> <Value> <Obj> <type>0</type> <id>14</id> <name/> <fileName>../../../lib_files/Linebuffer.h</fileName> <fileDirectory>..</fileDirectory> <lineNumber>177</lineNumber> <contextFuncName>call</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d_b2b</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>../../../lib_files/Linebuffer.h</first> <second>call</second> </first> <second>177</second> </item> </second> </item> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>63</item> <item>64</item> <item>65</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_9"> <Value> <Obj> <type>0</type> <id>18</id> <name>tmp_s</name> <fileName>../../../lib_files/Linebuffer.h</fileName> <fileDirectory>..</fileDirectory> <lineNumber>187</lineNumber> <contextFuncName>call</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d_b2b</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>../../../lib_files/Linebuffer.h</first> <second>call</second> </first> <second>187</second> </item> </second> </item> </inlineStackInfo> <originalName/> <rtlName>tmp_s_fu_132_p2</rtlName> <coreName/> </Obj> <bitwidth>1</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>79</item> <item>80</item> </oprand_edges> <opcode>icmp</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_10"> <Value> <Obj> <type>0</type> <id>19</id> <name/> <fileName>../../../lib_files/Linebuffer.h</fileName> <fileDirectory>..</fileDirectory> <lineNumber>179</lineNumber> <contextFuncName>call</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d_b2b</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>../../../lib_files/Linebuffer.h</first> <second>call</second> </first> <second>179</second> </item> </second> </item> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>81</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_11"> <Value> <Obj> <type>0</type> <id>21</id> <name>col</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>col</originalName> <rtlName/> <coreName/> </Obj> <bitwidth>11</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>67</item> <item>68</item> <item>69</item> <item>70</item> </oprand_edges> <opcode>phi</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_12"> <Value> <Obj> <type>0</type> <id>22</id> <name>tmp_1</name> <fileName>../../../lib_files/Linebuffer.h</fileName> <fileDirectory>..</fileDirectory> <lineNumber>179</lineNumber> <contextFuncName>call</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d_b2b</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>../../../lib_files/Linebuffer.h</first> <second>call</second> </first> <second>179</second> </item> </second> </item> </inlineStackInfo> <originalName/> <rtlName>tmp_1_fu_138_p2</rtlName> <coreName/> </Obj> <bitwidth>1</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>71</item> <item>73</item> </oprand_edges> <opcode>icmp</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_13"> <Value> <Obj> <type>0</type> <id>23</id> <name>col_1</name> <fileName>../../../lib_files/Linebuffer.h</fileName> <fileDirectory>..</fileDirectory> <lineNumber>179</lineNumber> <contextFuncName>call</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d_b2b</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>../../../lib_files/Linebuffer.h</first> <second>call</second> </first> <second>179</second> </item> </second> </item> </inlineStackInfo> <originalName>col</originalName> <rtlName>col_1_fu_144_p2</rtlName> <coreName/> </Obj> <bitwidth>11</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>74</item> <item>75</item> </oprand_edges> <opcode>add</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_14"> <Value> <Obj> <type>0</type> <id>24</id> <name/> <fileName>../../../lib_files/Linebuffer.h</fileName> <fileDirectory>..</fileDirectory> <lineNumber>179</lineNumber> <contextFuncName>call</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d_b2b</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>../../../lib_files/Linebuffer.h</first> <second>call</second> </first> <second>179</second> </item> </second> </item> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>76</item> <item>77</item> <item>78</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_15"> <Value> <Obj> <type>0</type> <id>26</id> <name>col_cast</name> <fileName>../../../lib_files/Linebuffer.h</fileName> <fileDirectory>..</fileDirectory> <lineNumber>179</lineNumber> <contextFuncName>call</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d_b2b</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>../../../lib_files/Linebuffer.h</first> <second>call</second> </first> <second>179</second> </item> </second> </item> </inlineStackInfo> <originalName/> <rtlName>col_cast_fu_150_p1</rtlName> <coreName/> </Obj> <bitwidth>64</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>89</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_16"> <Value> <Obj> <type>0</type> <id>30</id> <name>tmp_value_V_3</name> <fileName>../../../lib_files/Linebuffer.h</fileName> <fileDirectory>..</fileDirectory> <lineNumber>186</lineNumber> <contextFuncName>call</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d_b2b</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>../../../lib_files/Linebuffer.h</first> <second>call</second> </first> <second>186</second> </item> </second> </item> </inlineStackInfo> <originalName>tmp.value.V</originalName> <rtlName/> <coreName/> </Obj> <bitwidth>32</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>91</item> <item>92</item> </oprand_edges> <opcode>read</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_17"> <Value> <Obj> <type>0</type> <id>31</id> <name/> <fileName>../../../lib_files/Linebuffer.h</fileName> <fileDirectory>..</fileDirectory> <lineNumber>187</lineNumber> <contextFuncName>call</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d_b2b</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>../../../lib_files/Linebuffer.h</first> <second>call</second> </first> <second>187</second> </item> </second> </item> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>93</item> <item>94</item> <item>95</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_18"> <Value> <Obj> <type>0</type> <id>33</id> <name>buffer_0_value_V_ad_1</name> <fileName>../../../lib_files/Linebuffer.h</fileName> <fileDirectory>..</fileDirectory> <lineNumber>198</lineNumber> <contextFuncName>call</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d_b2b</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>../../../lib_files/Linebuffer.h</first> <second>call</second> </first> <second>198</second> </item> </second> </item> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>11</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>96</item> <item>97</item> <item>98</item> </oprand_edges> <opcode>getelementptr</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_19"> <Value> <Obj> <type>0</type> <id>34</id> <name>p_Val2_s</name> <fileName>../../../lib_files/Linebuffer.h</fileName> <fileDirectory>..</fileDirectory> <lineNumber>198</lineNumber> <contextFuncName>call</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d_b2b</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>../../../lib_files/Linebuffer.h</first> <second>call</second> </first> <second>198</second> </item> </second> </item> </inlineStackInfo> <originalName>__Val2__</originalName> <rtlName/> <coreName/> </Obj> <bitwidth>32</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>99</item> </oprand_edges> <opcode>load</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_20"> <Value> <Obj> <type>0</type> <id>35</id> <name>p_Result_s</name> <fileName>../../../lib_files/Linebuffer.h</fileName> <fileDirectory>..</fileDirectory> <lineNumber>206</lineNumber> <contextFuncName>call</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d_b2b</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>../../../lib_files/Linebuffer.h</first> <second>call</second> </first> <second>206</second> </item> </second> </item> </inlineStackInfo> <originalName>__Result__</originalName> <rtlName>slice_stream_V_value_V_din</rtlName> <coreName/> </Obj> <bitwidth>64</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>101</item> <item>102</item> <item>103</item> </oprand_edges> <opcode>bitconcatenate</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_21"> <Value> <Obj> <type>0</type> <id>36</id> <name/> <fileName>../../../lib_files/Linebuffer.h</fileName> <fileDirectory>..</fileDirectory> <lineNumber>207</lineNumber> <contextFuncName>call</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d_b2b</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>../../../lib_files/Linebuffer.h</first> <second>call</second> </first> <second>207</second> </item> </second> </item> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>105</item> <item>106</item> <item>107</item> </oprand_edges> <opcode>write</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_22"> <Value> <Obj> <type>0</type> <id>37</id> <name/> <fileName>../../../lib_files/Linebuffer.h</fileName> <fileDirectory>..</fileDirectory> <lineNumber>208</lineNumber> <contextFuncName>call</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d_b2b</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>../../../lib_files/Linebuffer.h</first> <second>call</second> </first> <second>208</second> </item> </second> </item> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>108</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_23"> <Value> <Obj> <type>0</type> <id>39</id> <name>buffer_0_value_V_ad</name> <fileName>../../../lib_files/Stencil.h</fileName> <fileDirectory>..</fileDirectory> <lineNumber>75</lineNumber> <contextFuncName>operator=</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d_b2b</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>../../../lib_files/Linebuffer.h</first> <second>call</second> </first> <second>209</second> </item> <item> <first> <first>../../../lib_files/Stencil.h</first> <second>operator=</second> </first> <second>75</second> </item> </second> </item> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>11</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>82</item> <item>84</item> <item>85</item> </oprand_edges> <opcode>getelementptr</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_24"> <Value> <Obj> <type>0</type> <id>40</id> <name/> <fileName>../../../lib_files/Stencil.h</fileName> <fileDirectory>..</fileDirectory> <lineNumber>75</lineNumber> <contextFuncName>operator=</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d_b2b</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>../../../lib_files/Linebuffer.h</first> <second>call</second> </first> <second>209</second> </item> <item> <first> <first>../../../lib_files/Stencil.h</first> <second>operator=</second> </first> <second>75</second> </item> </second> </item> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>86</item> <item>87</item> <item>221</item> </oprand_edges> <opcode>store</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_25"> <Value> <Obj> <type>0</type> <id>42</id> <name/> <fileName>../../../lib_files/Linebuffer.h</fileName> <fileDirectory>..</fileDirectory> <lineNumber>179</lineNumber> <contextFuncName>call</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d_b2b</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>../../../lib_files/Linebuffer.h</first> <second>call</second> </first> <second>179</second> </item> </second> </item> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>88</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_26"> <Value> <Obj> <type>0</type> <id>45</id> <name/> <fileName>../../../lib_files/Linebuffer.h</fileName> <fileDirectory>..</fileDirectory> <lineNumber>177</lineNumber> <contextFuncName>call</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d_b2b</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>../../../lib_files/Linebuffer.h</first> <second>call</second> </first> <second>177</second> </item> </second> </item> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>66</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_27"> <Value> <Obj> <type>0</type> <id>47</id> <name/> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>0</count> <item_version>0</item_version> </oprand_edges> <opcode>ret</opcode> <m_Display>0</m_Display> </item> </nodes> <consts class_id="15" tracking_level="0" version="0"> <count>6</count> <item_version>0</item_version> <item class_id="16" tracking_level="1" version="0" object_id="_28"> <Value> <Obj> <type>2</type> <id>49</id> <name>empty</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>64</bitwidth> </Value> <const_type>0</const_type> <content>1</content> </item> <item class_id_reference="16" object_id="_29"> <Value> <Obj> <type>2</type> <id>52</id> <name>empty</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>11</bitwidth> </Value> <const_type>0</const_type> <content>0</content> </item> <item class_id_reference="16" object_id="_30"> <Value> <Obj> <type>2</type> <id>58</id> <name>empty</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>11</bitwidth> </Value> <const_type>0</const_type> <content>1078</content> </item> <item class_id_reference="16" object_id="_31"> <Value> <Obj> <type>2</type> <id>61</id> <name>empty</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>11</bitwidth> </Value> <const_type>0</const_type> <content>1</content> </item> <item class_id_reference="16" object_id="_32"> <Value> <Obj> <type>2</type> <id>72</id> <name>empty</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>11</bitwidth> </Value> <const_type>0</const_type> <content>1918</content> </item> <item class_id_reference="16" object_id="_33"> <Value> <Obj> <type>2</type> <id>83</id> <name>empty</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>64</bitwidth> </Value> <const_type>0</const_type> <content>0</content> </item> </consts> <blocks class_id="17" tracking_level="0" version="0"> <count>9</count> <item_version>0</item_version> <item class_id="18" tracking_level="1" version="0" object_id="_34"> <Obj> <type>3</type> <id>9</id> <name>newFuncRoot</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <node_objs> <count>2</count> <item_version>0</item_version> <item>7</item> <item>8</item> </node_objs> </item> <item class_id_reference="18" object_id="_35"> <Obj> <type>3</type> <id>15</id> <name/> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <node_objs> <count>4</count> <item_version>0</item_version> <item>10</item> <item>11</item> <item>13</item> <item>14</item> </node_objs> </item> <item class_id_reference="18" object_id="_36"> <Obj> <type>3</type> <id>20</id> <name/> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <node_objs> <count>2</count> <item_version>0</item_version> <item>18</item> <item>19</item> </node_objs> </item> <item class_id_reference="18" object_id="_37"> <Obj> <type>3</type> <id>25</id> <name/> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <node_objs> <count>4</count> <item_version>0</item_version> <item>21</item> <item>22</item> <item>23</item> <item>24</item> </node_objs> </item> <item class_id_reference="18" object_id="_38"> <Obj> <type>3</type> <id>32</id> <name/> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <node_objs> <count>3</count> <item_version>0</item_version> <item>26</item> <item>30</item> <item>31</item> </node_objs> </item> <item class_id_reference="18" object_id="_39"> <Obj> <type>3</type> <id>38</id> <name>.preheader57</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <node_objs> <count>5</count> <item_version>0</item_version> <item>33</item> <item>34</item> <item>35</item> <item>36</item> <item>37</item> </node_objs> </item> <item class_id_reference="18" object_id="_40"> <Obj> <type>3</type> <id>43</id> <name>._crit_edge</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <node_objs> <count>3</count> <item_version>0</item_version> <item>39</item> <item>40</item> <item>42</item> </node_objs> </item> <item class_id_reference="18" object_id="_41"> <Obj> <type>3</type> <id>46</id> <name/> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <node_objs> <count>1</count> <item_version>0</item_version> <item>45</item> </node_objs> </item> <item class_id_reference="18" object_id="_42"> <Obj> <type>3</type> <id>48</id> <name>.preheader.exitStub</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <node_objs> <count>1</count> <item_version>0</item_version> <item>47</item> </node_objs> </item> </blocks> <edges class_id="19" tracking_level="0" version="0"> <count>60</count> <item_version>0</item_version> <item class_id="20" tracking_level="1" version="0" object_id="_43"> <id>50</id> <edge_type>1</edge_type> <source_obj>49</source_obj> <sink_obj>7</sink_obj> </item> <item class_id_reference="20" object_id="_44"> <id>51</id> <edge_type>2</edge_type> <source_obj>15</source_obj> <sink_obj>8</sink_obj> </item> <item class_id_reference="20" object_id="_45"> <id>53</id> <edge_type>1</edge_type> <source_obj>52</source_obj> <sink_obj>10</sink_obj> </item> <item class_id_reference="20" object_id="_46"> <id>54</id> <edge_type>2</edge_type> <source_obj>9</source_obj> <sink_obj>10</sink_obj> </item> <item class_id_reference="20" object_id="_47"> <id>55</id> <edge_type>1</edge_type> <source_obj>13</source_obj> <sink_obj>10</sink_obj> </item> <item class_id_reference="20" object_id="_48"> <id>56</id> <edge_type>2</edge_type> <source_obj>46</source_obj> <sink_obj>10</sink_obj> </item> <item class_id_reference="20" object_id="_49"> <id>57</id> <edge_type>1</edge_type> <source_obj>10</source_obj> <sink_obj>11</sink_obj> </item> <item class_id_reference="20" object_id="_50"> <id>59</id> <edge_type>1</edge_type> <source_obj>58</source_obj> <sink_obj>11</sink_obj> </item> <item class_id_reference="20" object_id="_51"> <id>60</id> <edge_type>1</edge_type> <source_obj>10</source_obj> <sink_obj>13</sink_obj> </item> <item class_id_reference="20" object_id="_52"> <id>62</id> <edge_type>1</edge_type> <source_obj>61</source_obj> <sink_obj>13</sink_obj> </item> <item class_id_reference="20" object_id="_53"> <id>63</id> <edge_type>1</edge_type> <source_obj>11</source_obj> <sink_obj>14</sink_obj> </item> <item class_id_reference="20" object_id="_54"> <id>64</id> <edge_type>2</edge_type> <source_obj>20</source_obj> <sink_obj>14</sink_obj> </item> <item class_id_reference="20" object_id="_55"> <id>65</id> <edge_type>2</edge_type> <source_obj>48</source_obj> <sink_obj>14</sink_obj> </item> <item class_id_reference="20" object_id="_56"> <id>66</id> <edge_type>2</edge_type> <source_obj>15</source_obj> <sink_obj>45</sink_obj> </item> <item class_id_reference="20" object_id="_57"> <id>67</id> <edge_type>1</edge_type> <source_obj>52</source_obj> <sink_obj>21</sink_obj> </item> <item class_id_reference="20" object_id="_58"> <id>68</id> <edge_type>2</edge_type> <source_obj>20</source_obj> <sink_obj>21</sink_obj> </item> <item class_id_reference="20" object_id="_59"> <id>69</id> <edge_type>1</edge_type> <source_obj>23</source_obj> <sink_obj>21</sink_obj> </item> <item class_id_reference="20" object_id="_60"> <id>70</id> <edge_type>2</edge_type> <source_obj>43</source_obj> <sink_obj>21</sink_obj> </item> <item class_id_reference="20" object_id="_61"> <id>71</id> <edge_type>1</edge_type> <source_obj>21</source_obj> <sink_obj>22</sink_obj> </item> <item class_id_reference="20" object_id="_62"> <id>73</id> <edge_type>1</edge_type> <source_obj>72</source_obj> <sink_obj>22</sink_obj> </item> <item class_id_reference="20" object_id="_63"> <id>74</id> <edge_type>1</edge_type> <source_obj>21</source_obj> <sink_obj>23</sink_obj> </item> <item class_id_reference="20" object_id="_64"> <id>75</id> <edge_type>1</edge_type> <source_obj>61</source_obj> <sink_obj>23</sink_obj> </item> <item class_id_reference="20" object_id="_65"> <id>76</id> <edge_type>1</edge_type> <source_obj>22</source_obj> <sink_obj>24</sink_obj> </item> <item class_id_reference="20" object_id="_66"> <id>77</id> <edge_type>2</edge_type> <source_obj>32</source_obj> <sink_obj>24</sink_obj> </item> <item class_id_reference="20" object_id="_67"> <id>78</id> <edge_type>2</edge_type> <source_obj>46</source_obj> <sink_obj>24</sink_obj> </item> <item class_id_reference="20" object_id="_68"> <id>79</id> <edge_type>1</edge_type> <source_obj>10</source_obj> <sink_obj>18</sink_obj> </item> <item class_id_reference="20" object_id="_69"> <id>80</id> <edge_type>1</edge_type> <source_obj>52</source_obj> <sink_obj>18</sink_obj> </item> <item class_id_reference="20" object_id="_70"> <id>81</id> <edge_type>2</edge_type> <source_obj>25</source_obj> <sink_obj>19</sink_obj> </item> <item class_id_reference="20" object_id="_71"> <id>82</id> <edge_type>1</edge_type> <source_obj>7</source_obj> <sink_obj>39</sink_obj> </item> <item class_id_reference="20" object_id="_72"> <id>84</id> <edge_type>1</edge_type> <source_obj>83</source_obj> <sink_obj>39</sink_obj> </item> <item class_id_reference="20" object_id="_73"> <id>85</id> <edge_type>1</edge_type> <source_obj>26</source_obj> <sink_obj>39</sink_obj> </item> <item class_id_reference="20" object_id="_74"> <id>86</id> <edge_type>1</edge_type> <source_obj>30</source_obj> <sink_obj>40</sink_obj> </item> <item class_id_reference="20" object_id="_75"> <id>87</id> <edge_type>1</edge_type> <source_obj>39</source_obj> <sink_obj>40</sink_obj> </item> <item class_id_reference="20" object_id="_76"> <id>88</id> <edge_type>2</edge_type> <source_obj>25</source_obj> <sink_obj>42</sink_obj> </item> <item class_id_reference="20" object_id="_77"> <id>89</id> <edge_type>1</edge_type> <source_obj>21</source_obj> <sink_obj>26</sink_obj> </item> <item class_id_reference="20" object_id="_78"> <id>92</id> <edge_type>1</edge_type> <source_obj>1</source_obj> <sink_obj>30</sink_obj> </item> <item class_id_reference="20" object_id="_79"> <id>93</id> <edge_type>1</edge_type> <source_obj>18</source_obj> <sink_obj>31</sink_obj> </item> <item class_id_reference="20" object_id="_80"> <id>94</id> <edge_type>2</edge_type> <source_obj>38</source_obj> <sink_obj>31</sink_obj> </item> <item class_id_reference="20" object_id="_81"> <id>95</id> <edge_type>2</edge_type> <source_obj>43</source_obj> <sink_obj>31</sink_obj> </item> <item class_id_reference="20" object_id="_82"> <id>96</id> <edge_type>1</edge_type> <source_obj>7</source_obj> <sink_obj>33</sink_obj> </item> <item class_id_reference="20" object_id="_83"> <id>97</id> <edge_type>1</edge_type> <source_obj>83</source_obj> <sink_obj>33</sink_obj> </item> <item class_id_reference="20" object_id="_84"> <id>98</id> <edge_type>1</edge_type> <source_obj>26</source_obj> <sink_obj>33</sink_obj> </item> <item class_id_reference="20" object_id="_85"> <id>99</id> <edge_type>1</edge_type> <source_obj>33</source_obj> <sink_obj>34</sink_obj> </item> <item class_id_reference="20" object_id="_86"> <id>102</id> <edge_type>1</edge_type> <source_obj>30</source_obj> <sink_obj>35</sink_obj> </item> <item class_id_reference="20" object_id="_87"> <id>103</id> <edge_type>1</edge_type> <source_obj>34</source_obj> <sink_obj>35</sink_obj> </item> <item class_id_reference="20" object_id="_88"> <id>106</id> <edge_type>1</edge_type> <source_obj>2</source_obj> <sink_obj>36</sink_obj> </item> <item class_id_reference="20" object_id="_89"> <id>107</id> <edge_type>1</edge_type> <source_obj>35</source_obj> <sink_obj>36</sink_obj> </item> <item class_id_reference="20" object_id="_90"> <id>108</id> <edge_type>2</edge_type> <source_obj>43</source_obj> <sink_obj>37</sink_obj> </item> <item class_id_reference="20" object_id="_91"> <id>210</id> <edge_type>2</edge_type> <source_obj>9</source_obj> <sink_obj>15</sink_obj> </item> <item class_id_reference="20" object_id="_92"> <id>211</id> <edge_type>2</edge_type> <source_obj>15</source_obj> <sink_obj>48</sink_obj> </item> <item class_id_reference="20" object_id="_93"> <id>212</id> <edge_type>2</edge_type> <source_obj>15</source_obj> <sink_obj>20</sink_obj> </item> <item class_id_reference="20" object_id="_94"> <id>213</id> <edge_type>2</edge_type> <source_obj>20</source_obj> <sink_obj>25</sink_obj> </item> <item class_id_reference="20" object_id="_95"> <id>214</id> <edge_type>2</edge_type> <source_obj>25</source_obj> <sink_obj>46</sink_obj> </item> <item class_id_reference="20" object_id="_96"> <id>215</id> <edge_type>2</edge_type> <source_obj>25</source_obj> <sink_obj>32</sink_obj> </item> <item class_id_reference="20" object_id="_97"> <id>216</id> <edge_type>2</edge_type> <source_obj>32</source_obj> <sink_obj>43</sink_obj> </item> <item class_id_reference="20" object_id="_98"> <id>217</id> <edge_type>2</edge_type> <source_obj>32</source_obj> <sink_obj>38</sink_obj> </item> <item class_id_reference="20" object_id="_99"> <id>218</id> <edge_type>2</edge_type> <source_obj>38</source_obj> <sink_obj>43</sink_obj> </item> <item class_id_reference="20" object_id="_100"> <id>219</id> <edge_type>2</edge_type> <source_obj>43</source_obj> <sink_obj>25</sink_obj> </item> <item class_id_reference="20" object_id="_101"> <id>220</id> <edge_type>2</edge_type> <source_obj>46</source_obj> <sink_obj>15</sink_obj> </item> <item class_id_reference="20" object_id="_102"> <id>221</id> <edge_type>4</edge_type> <source_obj>34</source_obj> <sink_obj>40</sink_obj> </item> </edges> </cdfg> <cdfg_regions class_id="21" tracking_level="0" version="0"> <count>7</count> <item_version>0</item_version> <item class_id="22" tracking_level="1" version="0" object_id="_103"> <mId>1</mId> <mTag>call_Loop_LB2D_buf_p.1</mTag> <mType>0</mType> <sub_regions> <count>3</count> <item_version>0</item_version> <item>2</item> <item>3</item> <item>7</item> </sub_regions> <basic_blocks> <count>0</count> <item_version>0</item_version> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>-1</mMinTripCount> <mMaxTripCount>-1</mMaxTripCount> <mMinLatency>2071917</mMinLatency> <mMaxLatency>-1</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"/> </item> <item class_id_reference="22" object_id="_104"> <mId>2</mId> <mTag>Entry</mTag> <mType>0</mType> <sub_regions> <count>0</count> <item_version>0</item_version> </sub_regions> <basic_blocks> <count>1</count> <item_version>0</item_version> <item>9</item> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>-1</mMinTripCount> <mMaxTripCount>-1</mMaxTripCount> <mMinLatency>0</mMinLatency> <mMaxLatency>-1</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"/> </item> <item class_id_reference="22" object_id="_105"> <mId>3</mId> <mTag>LB2D_buf</mTag> <mType>1</mType> <sub_regions> <count>3</count> <item_version>0</item_version> <item>4</item> <item>5</item> <item>6</item> </sub_regions> <basic_blocks> <count>0</count> <item_version>0</item_version> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>1078</mMinTripCount> <mMaxTripCount>1078</mMaxTripCount> <mMinLatency>2071916</mMinLatency> <mMaxLatency>-1</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"/> </item> <item class_id_reference="22" object_id="_106"> <mId>4</mId> <mTag>Region 1</mTag> <mType>0</mType> <sub_regions> <count>0</count> <item_version>0</item_version> </sub_regions> <basic_blocks> <count>2</count> <item_version>0</item_version> <item>15</item> <item>20</item> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>-1</mMinTripCount> <mMaxTripCount>-1</mMaxTripCount> <mMinLatency>0</mMinLatency> <mMaxLatency>-1</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"/> </item> <item class_id_reference="22" object_id="_107"> <mId>5</mId> <mTag>LB2D_buf.1</mTag> <mType>1</mType> <sub_regions> <count>0</count> <item_version>0</item_version> </sub_regions> <basic_blocks> <count>4</count> <item_version>0</item_version> <item>25</item> <item>32</item> <item>38</item> <item>43</item> </basic_blocks> <mII>1</mII> <mDepth>3</mDepth> <mMinTripCount>1918</mMinTripCount> <mMaxTripCount>1918</mMaxTripCount> <mMinLatency>1919</mMinLatency> <mMaxLatency>-1</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"/> </item> <item class_id_reference="22" object_id="_108"> <mId>6</mId> <mTag>Region 2</mTag> <mType>0</mType> <sub_regions> <count>0</count> <item_version>0</item_version> </sub_regions> <basic_blocks> <count>1</count> <item_version>0</item_version> <item>46</item> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>-1</mMinTripCount> <mMaxTripCount>-1</mMaxTripCount> <mMinLatency>0</mMinLatency> <mMaxLatency>-1</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"/> </item> <item class_id_reference="22" object_id="_109"> <mId>7</mId> <mTag>Return</mTag> <mType>0</mType> <sub_regions> <count>0</count> <item_version>0</item_version> </sub_regions> <basic_blocks> <count>1</count> <item_version>0</item_version> <item>48</item> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>-1</mMinTripCount> <mMaxTripCount>-1</mMaxTripCount> <mMinLatency>0</mMinLatency> <mMaxLatency>-1</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"/> </item> </cdfg_regions> <fsm class_id="24" tracking_level="1" version="0" object_id="_110"> <states class_id="25" tracking_level="0" version="0"> <count>6</count> <item_version>0</item_version> <item class_id="26" tracking_level="1" version="0" object_id="_111"> <id>1</id> <operations class_id="27" tracking_level="0" version="0"> <count>6</count> <item_version>0</item_version> <item class_id="28" tracking_level="1" version="0" object_id="_112"> <id>3</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_113"> <id>4</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_114"> <id>5</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_115"> <id>6</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_116"> <id>7</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_117"> <id>8</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_118"> <id>2</id> <operations> <count>10</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_119"> <id>10</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_120"> <id>11</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_121"> <id>12</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_122"> <id>13</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_123"> <id>14</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_124"> <id>16</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_125"> <id>17</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_126"> <id>18</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_127"> <id>19</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_128"> <id>47</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_129"> <id>3</id> <operations> <count>8</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_130"> <id>21</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_131"> <id>22</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_132"> <id>23</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_133"> <id>24</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_134"> <id>26</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_135"> <id>31</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_136"> <id>33</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_137"> <id>34</id> <stage>2</stage> <latency>2</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_138"> <id>4</id> <operations> <count>2</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_139"> <id>30</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_140"> <id>34</id> <stage>1</stage> <latency>2</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_141"> <id>5</id> <operations> <count>10</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_142"> <id>27</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_143"> <id>28</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_144"> <id>29</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_145"> <id>35</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_146"> <id>36</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_147"> <id>37</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_148"> <id>39</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_149"> <id>40</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_150"> <id>41</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_151"> <id>42</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_152"> <id>6</id> <operations> <count>2</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_153"> <id>44</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_154"> <id>45</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> </states> <transitions class_id="29" tracking_level="0" version="0"> <count>7</count> <item_version>0</item_version> <item class_id="30" tracking_level="1" version="0" object_id="_155"> <inState>1</inState> <outState>2</outState> <condition class_id="31" tracking_level="0" version="0"> <id>31</id> <sop class_id="32" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="33" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_156"> <inState>2</inState> <outState>3</outState> <condition> <id>33</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>1</count> <item_version>0</item_version> <item class_id="34" tracking_level="0" version="0"> <first class_id="35" tracking_level="0" version="0"> <first>11</first> <second>0</second> </first> <second>1</second> </item> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_157"> <inState>6</inState> <outState>2</outState> <condition> <id>44</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_158"> <inState>4</inState> <outState>5</outState> <condition> <id>46</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_159"> <inState>5</inState> <outState>3</outState> <condition> <id>47</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_160"> <inState>3</inState> <outState>6</outState> <condition> <id>45</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>1</count> <item_version>0</item_version> <item> <first> <first>22</first> <second>0</second> </first> <second>0</second> </item> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_161"> <inState>3</inState> <outState>4</outState> <condition> <id>48</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>1</count> <item_version>0</item_version> <item> <first> <first>22</first> <second>0</second> </first> <second>1</second> </item> </item> </sop> </condition> </item> </transitions> </fsm> <res class_id="36" tracking_level="1" version="0" object_id="_162"> <dp_component_resource class_id="37" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </dp_component_resource> <dp_expression_resource> <count>15</count> <item_version>0</item_version> <item class_id="38" tracking_level="0" version="0"> <first>ap_block_pp0_stage0_flag00001001 ( or ) </first> <second class_id="39" tracking_level="0" version="0"> <count>4</count> <item_version>0</item_version> <item class_id="40" tracking_level="0" version="0"> <first>(0P0)</first> <second>1</second> </item> <item> <first>(1P1)</first> <second>1</second> </item> <item> <first>FF</first> <second>0</second> </item> <item> <first>LUT</first> <second>2</second> </item> </second> </item> <item> <first>ap_block_state1 ( or ) </first> <second> <count>4</count> <item_version>0</item_version> <item> <first>(0P0)</first> <second>1</second> </item> <item> <first>(1P1)</first> <second>1</second> </item> <item> <first>FF</first> <second>0</second> </item> <item> <first>LUT</first> <second>2</second> </item> </second> </item> <item> <first>ap_block_state5_pp0_stage0_iter2 ( and ) </first> <second> <count>4</count> <item_version>0</item_version> <item> <first>(0P0)</first> <second>1</second> </item> <item> <first>(1P1)</first> <second>1</second> </item> <item> <first>FF</first> <second>0</second> </item> <item> <first>LUT</first> <second>2</second> </item> </second> </item> <item> <first>ap_enable_pp0 ( xor ) </first> <second> <count>4</count> <item_version>0</item_version> <item> <first>(0P0)</first> <second>1</second> </item> <item> <first>(1P1)</first> <second>2</second> </item> <item> <first>FF</first> <second>0</second> </item> <item> <first>LUT</first> <second>2</second> </item> </second> </item> <item> <first>ap_enable_reg_pp0_iter1 ( xor ) </first> <second> <count>4</count> <item_version>0</item_version> <item> <first>(0P0)</first> <second>1</second> </item> <item> <first>(1P1)</first> <second>2</second> </item> <item> <first>FF</first> <second>0</second> </item> <item> <first>LUT</first> <second>2</second> </item> </second> </item> <item> <first>ap_enable_state3_pp0_iter0_stage0 ( and ) </first> <second> <count>4</count> <item_version>0</item_version> <item> <first>(0P0)</first> <second>1</second> </item> <item> <first>(1P1)</first> <second>1</second> </item> <item> <first>FF</first> <second>0</second> </item> <item> <first>LUT</first> <second>2</second> </item> </second> </item> <item> <first>ap_enable_state4_pp0_iter1_stage0 ( and ) </first> <second> <count>4</count> <item_version>0</item_version> <item> <first>(0P0)</first> <second>1</second> </item> <item> <first>(1P1)</first> <second>1</second> </item> <item> <first>FF</first> <second>0</second> </item> <item> <first>LUT</first> <second>2</second> </item> </second> </item> <item> <first>ap_enable_state5_pp0_iter2_stage0 ( and ) </first> <second> <count>4</count> <item_version>0</item_version> <item> <first>(0P0)</first> <second>1</second> </item> <item> <first>(1P1)</first> <second>1</second> </item> <item> <first>FF</first> <second>0</second> </item> <item> <first>LUT</first> <second>2</second> </item> </second> </item> <item> <first>ap_predicate_op30_load_state3 ( and ) </first> <second> <count>4</count> <item_version>0</item_version> <item> <first>(0P0)</first> <second>1</second> </item> <item> <first>(1P1)</first> <second>1</second> </item> <item> <first>FF</first> <second>0</second> </item> <item> <first>LUT</first> <second>2</second> </item> </second> </item> <item> <first>col_1_fu_144_p2 ( + ) </first> <second> <count>4</count> <item_version>0</item_version> <item> <first>(0P0)</first> <second>11</second> </item> <item> <first>(1P1)</first> <second>1</second> </item> <item> <first>FF</first> <second>38</second> </item> <item> <first>LUT</first> <second>16</second> </item> </second> </item> <item> <first>row_1_fu_126_p2 ( + ) </first> <second> <count>4</count> <item_version>0</item_version> <item> <first>(0P0)</first> <second>11</second> </item> <item> <first>(1P1)</first> <second>1</second> </item> <item> <first>FF</first> <second>38</second> </item> <item> <first>LUT</first> <second>16</second> </item> </second> </item> <item> <first>start_write ( and ) </first> <second> <count>4</count> <item_version>0</item_version> <item> <first>(0P0)</first> <second>1</second> </item> <item> <first>(1P1)</first> <second>1</second> </item> <item> <first>FF</first> <second>0</second> </item> <item> <first>LUT</first> <second>2</second> </item> </second> </item> <item> <first>tmp_1_fu_138_p2 ( icmp ) </first> <second> <count>4</count> <item_version>0</item_version> <item> <first>(0P0)</first> <second>11</second> </item> <item> <first>(1P1)</first> <second>9</second> </item> <item> <first>FF</first> <second>0</second> </item> <item> <first>LUT</first> <second>6</second> </item> </second> </item> <item> <first>tmp_fu_120_p2 ( icmp ) </first> <second> <count>4</count> <item_version>0</item_version> <item> <first>(0P0)</first> <second>11</second> </item> <item> <first>(1P1)</first> <second>11</second> </item> <item> <first>FF</first> <second>0</second> </item> <item> <first>LUT</first> <second>6</second> </item> </second> </item> <item> <first>tmp_s_fu_132_p2 ( icmp ) </first> <second> <count>4</count> <item_version>0</item_version> <item> <first>(0P0)</first> <second>11</second> </item> <item> <first>(1P1)</first> <second>1</second> </item> <item> <first>FF</first> <second>0</second> </item> <item> <first>LUT</first> <second>6</second> </item> </second> </item> </dp_expression_resource> <dp_fifo_resource> <count>0</count> <item_version>0</item_version> </dp_fifo_resource> <dp_memory_resource> <count>1</count> <item_version>0</item_version> <item> <first>buffer_0_value_V_U</first> <second> <count>7</count> <item_version>0</item_version> <item> <first>(0Words)</first> <second>1918</second> </item> <item> <first>(1Bits)</first> <second>32</second> </item> <item> <first>(2Banks)</first> <second>1</second> </item> <item> <first>(3W*Bits*Banks)</first> <second>61376</second> </item> <item> <first>BRAM</first> <second>4</second> </item> <item> <first>FF</first> <second>0</second> </item> <item> <first>LUT</first> <second>0</second> </item> </second> </item> </dp_memory_resource> <dp_multiplexer_resource> <count>9</count> <item_version>0</item_version> <item> <first>ap_NS_fsm</first> <second> <count>4</count> <item_version>0</item_version> <item> <first>(0Size)</first> <second>5</second> </item> <item> <first>(1Bits)</first> <second>1</second> </item> <item> <first>(2Count)</first> <second>5</second> </item> <item> <first>LUT</first> <second>27</second> </item> </second> </item> <item> <first>ap_done</first> <second> <count>4</count> <item_version>0</item_version> <item> <first>(0Size)</first> <second>2</second> </item> <item> <first>(1Bits)</first> <second>1</second> </item> <item> <first>(2Count)</first> <second>2</second> </item> <item> <first>LUT</first> <second>9</second> </item> </second> </item> <item> <first>ap_enable_reg_pp0_iter1</first> <second> <count>4</count> <item_version>0</item_version> <item> <first>(0Size)</first> <second>2</second> </item> <item> <first>(1Bits)</first> <second>1</second> </item> <item> <first>(2Count)</first> <second>2</second> </item> <item> <first>LUT</first> <second>9</second> </item> </second> </item> <item> <first>ap_enable_reg_pp0_iter2</first> <second> <count>4</count> <item_version>0</item_version> <item> <first>(0Size)</first> <second>2</second> </item> <item> <first>(1Bits)</first> <second>1</second> </item> <item> <first>(2Count)</first> <second>2</second> </item> <item> <first>LUT</first> <second>9</second> </item> </second> </item> <item> <first>col_reg_109</first> <second> <count>4</count> <item_version>0</item_version> <item> <first>(0Size)</first> <second>2</second> </item> <item> <first>(1Bits)</first> <second>11</second> </item> <item> <first>(2Count)</first> <second>22</second> </item> <item> <first>LUT</first> <second>9</second> </item> </second> </item> <item> <first>in_stream_V_value_V_blk_n</first> <second> <count>4</count> <item_version>0</item_version> <item> <first>(0Size)</first> <second>2</second> </item> <item> <first>(1Bits)</first> <second>1</second> </item> <item> <first>(2Count)</first> <second>2</second> </item> <item> <first>LUT</first> <second>9</second> </item> </second> </item> <item> <first>real_start</first> <second> <count>4</count> <item_version>0</item_version> <item> <first>(0Size)</first> <second>2</second> </item> <item> <first>(1Bits)</first> <second>1</second> </item> <item> <first>(2Count)</first> <second>2</second> </item> <item> <first>LUT</first> <second>9</second> </item> </second> </item> <item> <first>row_reg_98</first> <second> <count>4</count> <item_version>0</item_version> <item> <first>(0Size)</first> <second>2</second> </item> <item> <first>(1Bits)</first> <second>11</second> </item> <item> <first>(2Count)</first> <second>22</second> </item> <item> <first>LUT</first> <second>9</second> </item> </second> </item> <item> <first>slice_stream_V_value_V_blk_n</first> <second> <count>4</count> <item_version>0</item_version> <item> <first>(0Size)</first> <second>2</second> </item> <item> <first>(1Bits)</first> <second>1</second> </item> <item> <first>(2Count)</first> <second>2</second> </item> <item> <first>LUT</first> <second>9</second> </item> </second> </item> </dp_multiplexer_resource> <dp_register_resource> <count>18</count> <item_version>0</item_version> <item> <first>ap_CS_fsm</first> <second> <count>3</count> <item_version>0</item_version> <item> <first>(Bits)</first> <second>4</second> </item> <item> <first>(Consts)</first> <second>0</second> </item> <item> <first>FF</first> <second>4</second> </item> </second> </item> <item> <first>ap_done_reg</first> <second> <count>3</count> <item_version>0</item_version> <item> <first>(Bits)</first> <second>1</second> </item> <item> <first>(Consts)</first> <second>0</second> </item> <item> <first>FF</first> <second>1</second> </item> </second> </item> <item> <first>ap_enable_reg_pp0_iter0</first> <second> <count>3</count> <item_version>0</item_version> <item> <first>(Bits)</first> <second>1</second> </item> <item> <first>(Consts)</first> <second>0</second> </item> <item> <first>FF</first> <second>1</second> </item> </second> </item> <item> <first>ap_enable_reg_pp0_iter1</first> <second> <count>3</count> <item_version>0</item_version> <item> <first>(Bits)</first> <second>1</second> </item> <item> <first>(Consts)</first> <second>0</second> </item> <item> <first>FF</first> <second>1</second> </item> </second> </item> <item> <first>ap_enable_reg_pp0_iter2</first> <second> <count>3</count> <item_version>0</item_version> <item> <first>(Bits)</first> <second>1</second> </item> <item> <first>(Consts)</first> <second>0</second> </item> <item> <first>FF</first> <second>1</second> </item> </second> </item> <item> <first>ap_reg_pp0_iter1_col_cast_reg_184</first> <second> <count>3</count> <item_version>0</item_version> <item> <first>(Bits)</first> <second>64</second> </item> <item> <first>(Consts)</first> <second>53</second> </item> <item> <first>FF</first> <second>11</second> </item> </second> </item> <item> <first>ap_reg_pp0_iter1_tmp_1_reg_175</first> <second> <count>3</count> <item_version>0</item_version> <item> <first>(Bits)</first> <second>1</second> </item> <item> <first>(Consts)</first> <second>0</second> </item> <item> <first>FF</first> <second>1</second> </item> </second> </item> <item> <first>col_cast_reg_184</first> <second> <count>3</count> <item_version>0</item_version> <item> <first>(Bits)</first> <second>64</second> </item> <item> <first>(Consts)</first> <second>53</second> </item> <item> <first>FF</first> <second>11</second> </item> </second> </item> <item> <first>col_reg_109</first> <second> <count>3</count> <item_version>0</item_version> <item> <first>(Bits)</first> <second>11</second> </item> <item> <first>(Consts)</first> <second>0</second> </item> <item> <first>FF</first> <second>11</second> </item> </second> </item> <item> <first>p_Val2_s_reg_200</first> <second> <count>3</count> <item_version>0</item_version> <item> <first>(Bits)</first> <second>32</second> </item> <item> <first>(Consts)</first> <second>0</second> </item> <item> <first>FF</first> <second>32</second> </item> </second> </item> <item> <first>real_start_status_reg</first> <second> <count>3</count> <item_version>0</item_version> <item> <first>(Bits)</first> <second>1</second> </item> <item> <first>(Consts)</first> <second>0</second> </item> <item> <first>FF</first> <second>1</second> </item> </second> </item> <item> <first>row_1_reg_166</first> <second> <count>3</count> <item_version>0</item_version> <item> <first>(Bits)</first> <second>11</second> </item> <item> <first>(Consts)</first> <second>0</second> </item> <item> <first>FF</first> <second>11</second> </item> </second> </item> <item> <first>row_reg_98</first> <second> <count>3</count> <item_version>0</item_version> <item> <first>(Bits)</first> <second>11</second> </item> <item> <first>(Consts)</first> <second>0</second> </item> <item> <first>FF</first> <second>11</second> </item> </second> </item> <item> <first>start_control_reg</first> <second> <count>3</count> <item_version>0</item_version> <item> <first>(Bits)</first> <second>1</second> </item> <item> <first>(Consts)</first> <second>0</second> </item> <item> <first>FF</first> <second>1</second> </item> </second> </item> <item> <first>start_once_reg</first> <second> <count>3</count> <item_version>0</item_version> <item> <first>(Bits)</first> <second>1</second> </item> <item> <first>(Consts)</first> <second>0</second> </item> <item> <first>FF</first> <second>1</second> </item> </second> </item> <item> <first>tmp_1_reg_175</first> <second> <count>3</count> <item_version>0</item_version> <item> <first>(Bits)</first> <second>1</second> </item> <item> <first>(Consts)</first> <second>0</second> </item> <item> <first>FF</first> <second>1</second> </item> </second> </item> <item> <first>tmp_s_reg_171</first> <second> <count>3</count> <item_version>0</item_version> <item> <first>(Bits)</first> <second>1</second> </item> <item> <first>(Consts)</first> <second>0</second> </item> <item> <first>FF</first> <second>1</second> </item> </second> </item> <item> <first>tmp_value_V_3_reg_194</first> <second> <count>3</count> <item_version>0</item_version> <item> <first>(Bits)</first> <second>32</second> </item> <item> <first>(Consts)</first> <second>0</second> </item> <item> <first>FF</first> <second>32</second> </item> </second> </item> </dp_register_resource> <dp_component_map class_id="41" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </dp_component_map> <dp_expression_map> <count>5</count> <item_version>0</item_version> <item class_id="42" tracking_level="0" version="0"> <first>col_1_fu_144_p2 ( + ) </first> <second> <count>1</count> <item_version>0</item_version> <item>23</item> </second> </item> <item> <first>row_1_fu_126_p2 ( + ) </first> <second> <count>1</count> <item_version>0</item_version> <item>13</item> </second> </item> <item> <first>tmp_1_fu_138_p2 ( icmp ) </first> <second> <count>1</count> <item_version>0</item_version> <item>22</item> </second> </item> <item> <first>tmp_fu_120_p2 ( icmp ) </first> <second> <count>1</count> <item_version>0</item_version> <item>11</item> </second> </item> <item> <first>tmp_s_fu_132_p2 ( icmp ) </first> <second> <count>1</count> <item_version>0</item_version> <item>18</item> </second> </item> </dp_expression_map> <dp_fifo_map> <count>0</count> <item_version>0</item_version> </dp_fifo_map> <dp_memory_map> <count>1</count> <item_version>0</item_version> <item> <first>buffer_0_value_V_U</first> <second> <count>1</count> <item_version>0</item_version> <item>141</item> </second> </item> </dp_memory_map> </res> <node_label_latency class_id="43" tracking_level="0" version="0"> <count>25</count> <item_version>0</item_version> <item class_id="44" tracking_level="0" version="0"> <first>7</first> <second class_id="45" tracking_level="0" version="0"> <first>0</first> <second>0</second> </second> </item> <item> <first>8</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>10</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>11</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>13</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>14</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>18</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>19</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>21</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>22</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>23</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>24</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>26</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>30</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>31</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>33</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>34</first> <second> <first>2</first> <second>1</second> </second> </item> <item> <first>35</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>36</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>37</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>39</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>40</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>42</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>45</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>47</first> <second> <first>1</first> <second>0</second> </second> </item> </node_label_latency> <bblk_ent_exit class_id="46" tracking_level="0" version="0"> <count>9</count> <item_version>0</item_version> <item class_id="47" tracking_level="0" version="0"> <first>9</first> <second class_id="48" tracking_level="0" version="0"> <first>0</first> <second>0</second> </second> </item> <item> <first>15</first> <second> <first>1</first> <second>1</second> </second> </item> <item> <first>20</first> <second> <first>1</first> <second>1</second> </second> </item> <item> <first>25</first> <second> <first>2</first> <second>2</second> </second> </item> <item> <first>32</first> <second> <first>2</first> <second>4</second> </second> </item> <item> <first>38</first> <second> <first>2</first> <second>4</second> </second> </item> <item> <first>43</first> <second> <first>4</first> <second>4</second> </second> </item> <item> <first>46</first> <second> <first>3</first> <second>3</second> </second> </item> <item> <first>48</first> <second> <first>1</first> <second>1</second> </second> </item> </bblk_ent_exit> <regions class_id="49" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="50" tracking_level="1" version="0" object_id="_163"> <region_name>LB2D_buf.1</region_name> <basic_blocks> <count>4</count> <item_version>0</item_version> <item>25</item> <item>32</item> <item>38</item> <item>43</item> </basic_blocks> <nodes> <count>0</count> <item_version>0</item_version> </nodes> <anchor_node>-1</anchor_node> <region_type>8</region_type> <interval>1</interval> <pipe_depth>3</pipe_depth> </item> </regions> <dp_fu_nodes class_id="51" tracking_level="0" version="0"> <count>15</count> <item_version>0</item_version> <item class_id="52" tracking_level="0" version="0"> <first>60</first> <second> <count>1</count> <item_version>0</item_version> <item>7</item> </second> </item> <item> <first>64</first> <second> <count>1</count> <item_version>0</item_version> <item>30</item> </second> </item> <item> <first>70</first> <second> <count>1</count> <item_version>0</item_version> <item>36</item> </second> </item> <item> <first>77</first> <second> <count>1</count> <item_version>0</item_version> <item>33</item> </second> </item> <item> <first>83</first> <second> <count>3</count> <item_version>0</item_version> <item>34</item> <item>34</item> <item>40</item> </second> </item> <item> <first>88</first> <second> <count>1</count> <item_version>0</item_version> <item>39</item> </second> </item> <item> <first>102</first> <second> <count>1</count> <item_version>0</item_version> <item>10</item> </second> </item> <item> <first>113</first> <second> <count>1</count> <item_version>0</item_version> <item>21</item> </second> </item> <item> <first>120</first> <second> <count>1</count> <item_version>0</item_version> <item>11</item> </second> </item> <item> <first>126</first> <second> <count>1</count> <item_version>0</item_version> <item>13</item> </second> </item> <item> <first>132</first> <second> <count>1</count> <item_version>0</item_version> <item>18</item> </second> </item> <item> <first>138</first> <second> <count>1</count> <item_version>0</item_version> <item>22</item> </second> </item> <item> <first>144</first> <second> <count>1</count> <item_version>0</item_version> <item>23</item> </second> </item> <item> <first>150</first> <second> <count>1</count> <item_version>0</item_version> <item>26</item> </second> </item> <item> <first>155</first> <second> <count>1</count> <item_version>0</item_version> <item>35</item> </second> </item> </dp_fu_nodes> <dp_fu_nodes_expression class_id="54" tracking_level="0" version="0"> <count>12</count> <item_version>0</item_version> <item class_id="55" tracking_level="0" version="0"> <first>buffer_0_value_V_ad_1_gep_fu_77</first> <second> <count>1</count> <item_version>0</item_version> <item>33</item> </second> </item> <item> <first>buffer_0_value_V_ad_gep_fu_88</first> <second> <count>1</count> <item_version>0</item_version> <item>39</item> </second> </item> <item> <first>buffer_0_value_V_alloca_fu_60</first> <second> <count>1</count> <item_version>0</item_version> <item>7</item> </second> </item> <item> <first>col_1_fu_144</first> <second> <count>1</count> <item_version>0</item_version> <item>23</item> </second> </item> <item> <first>col_cast_fu_150</first> <second> <count>1</count> <item_version>0</item_version> <item>26</item> </second> </item> <item> <first>col_phi_fu_113</first> <second> <count>1</count> <item_version>0</item_version> <item>21</item> </second> </item> <item> <first>p_Result_s_fu_155</first> <second> <count>1</count> <item_version>0</item_version> <item>35</item> </second> </item> <item> <first>row_1_fu_126</first> <second> <count>1</count> <item_version>0</item_version> <item>13</item> </second> </item> <item> <first>row_phi_fu_102</first> <second> <count>1</count> <item_version>0</item_version> <item>10</item> </second> </item> <item> <first>tmp_1_fu_138</first> <second> <count>1</count> <item_version>0</item_version> <item>22</item> </second> </item> <item> <first>tmp_fu_120</first> <second> <count>1</count> <item_version>0</item_version> <item>11</item> </second> </item> <item> <first>tmp_s_fu_132</first> <second> <count>1</count> <item_version>0</item_version> <item>18</item> </second> </item> </dp_fu_nodes_expression> <dp_fu_nodes_module> <count>0</count> <item_version>0</item_version> </dp_fu_nodes_module> <dp_fu_nodes_io> <count>2</count> <item_version>0</item_version> <item> <first>StgValue_37_write_fu_70</first> <second> <count>1</count> <item_version>0</item_version> <item>36</item> </second> </item> <item> <first>tmp_value_V_3_read_fu_64</first> <second> <count>1</count> <item_version>0</item_version> <item>30</item> </second> </item> </dp_fu_nodes_io> <return_ports> <count>0</count> <item_version>0</item_version> </return_ports> <dp_mem_port_nodes class_id="56" tracking_level="0" version="0"> <count>2</count> <item_version>0</item_version> <item class_id="57" tracking_level="0" version="0"> <first class_id="58" tracking_level="0" version="0"> <first>buffer_0_value_V</first> <second>0</second> </first> <second> <count>2</count> <item_version>0</item_version> <item>34</item> <item>34</item> </second> </item> <item> <first> <first>buffer_0_value_V</first> <second>1</second> </first> <second> <count>1</count> <item_version>0</item_version> <item>40</item> </second> </item> </dp_mem_port_nodes> <dp_reg_nodes> <count>11</count> <item_version>0</item_version> <item> <first>98</first> <second> <count>1</count> <item_version>0</item_version> <item>10</item> </second> </item> <item> <first>109</first> <second> <count>1</count> <item_version>0</item_version> <item>21</item> </second> </item> <item> <first>162</first> <second> <count>1</count> <item_version>0</item_version> <item>11</item> </second> </item> <item> <first>166</first> <second> <count>1</count> <item_version>0</item_version> <item>13</item> </second> </item> <item> <first>171</first> <second> <count>1</count> <item_version>0</item_version> <item>18</item> </second> </item> <item> <first>175</first> <second> <count>1</count> <item_version>0</item_version> <item>22</item> </second> </item> <item> <first>179</first> <second> <count>1</count> <item_version>0</item_version> <item>23</item> </second> </item> <item> <first>184</first> <second> <count>1</count> <item_version>0</item_version> <item>26</item> </second> </item> <item> <first>189</first> <second> <count>1</count> <item_version>0</item_version> <item>33</item> </second> </item> <item> <first>194</first> <second> <count>1</count> <item_version>0</item_version> <item>30</item> </second> </item> <item> <first>200</first> <second> <count>1</count> <item_version>0</item_version> <item>34</item> </second> </item> </dp_reg_nodes> <dp_regname_nodes> <count>11</count> <item_version>0</item_version> <item> <first>buffer_0_value_V_ad_1_reg_189</first> <second> <count>1</count> <item_version>0</item_version> <item>33</item> </second> </item> <item> <first>col_1_reg_179</first> <second> <count>1</count> <item_version>0</item_version> <item>23</item> </second> </item> <item> <first>col_cast_reg_184</first> <second> <count>1</count> <item_version>0</item_version> <item>26</item> </second> </item> <item> <first>col_reg_109</first> <second> <count>1</count> <item_version>0</item_version> <item>21</item> </second> </item> <item> <first>p_Val2_s_reg_200</first> <second> <count>1</count> <item_version>0</item_version> <item>34</item> </second> </item> <item> <first>row_1_reg_166</first> <second> <count>1</count> <item_version>0</item_version> <item>13</item> </second> </item> <item> <first>row_reg_98</first> <second> <count>1</count> <item_version>0</item_version> <item>10</item> </second> </item> <item> <first>tmp_1_reg_175</first> <second> <count>1</count> <item_version>0</item_version> <item>22</item> </second> </item> <item> <first>tmp_reg_162</first> <second> <count>1</count> <item_version>0</item_version> <item>11</item> </second> </item> <item> <first>tmp_s_reg_171</first> <second> <count>1</count> <item_version>0</item_version> <item>18</item> </second> </item> <item> <first>tmp_value_V_3_reg_194</first> <second> <count>1</count> <item_version>0</item_version> <item>30</item> </second> </item> </dp_regname_nodes> <dp_reg_phi> <count>2</count> <item_version>0</item_version> <item> <first>98</first> <second> <count>1</count> <item_version>0</item_version> <item>10</item> </second> </item> <item> <first>109</first> <second> <count>1</count> <item_version>0</item_version> <item>21</item> </second> </item> </dp_reg_phi> <dp_regname_phi> <count>2</count> <item_version>0</item_version> <item> <first>col_reg_109</first> <second> <count>1</count> <item_version>0</item_version> <item>21</item> </second> </item> <item> <first>row_reg_98</first> <second> <count>1</count> <item_version>0</item_version> <item>10</item> </second> </item> </dp_regname_phi> <dp_port_io_nodes class_id="59" tracking_level="0" version="0"> <count>2</count> <item_version>0</item_version> <item class_id="60" tracking_level="0" version="0"> <first>in_stream_V_value_V</first> <second> <count>1</count> <item_version>0</item_version> <item> <first>read</first> <second> <count>1</count> <item_version>0</item_version> <item>30</item> </second> </item> </second> </item> <item> <first>slice_stream_V_value_V</first> <second> <count>1</count> <item_version>0</item_version> <item> <first>write</first> <second> <count>1</count> <item_version>0</item_version> <item>36</item> </second> </item> </second> </item> </dp_port_io_nodes> <port2core class_id="61" tracking_level="0" version="0"> <count>2</count> <item_version>0</item_version> <item class_id="62" tracking_level="0" version="0"> <first>1</first> <second>FIFO_SRL</second> </item> <item> <first>2</first> <second>FIFO_SRL</second> </item> </port2core> <node2core> <count>1</count> <item_version>0</item_version> <item> <first>7</first> <second>RAM</second> </item> </node2core> </syndb> </boost_serialization>
30.353526
134
0.440463
392e2dd974857575335469220fb3d9ce7e2c4ae8
3,992
ads
Ada
src/arch/socs/stm32f439/Ada/soc-dma-interfaces.ads
wookey-project/ewok-legacy
c973752dac3a0ebe3f7cfca062f50744578f051b
[ "Apache-2.0" ]
null
null
null
src/arch/socs/stm32f439/Ada/soc-dma-interfaces.ads
wookey-project/ewok-legacy
c973752dac3a0ebe3f7cfca062f50744578f051b
[ "Apache-2.0" ]
null
null
null
src/arch/socs/stm32f439/Ada/soc-dma-interfaces.ads
wookey-project/ewok-legacy
c973752dac3a0ebe3f7cfca062f50744578f051b
[ "Apache-2.0" ]
null
null
null
-- -- Copyright 2018 The wookey project team <[email protected]> -- - Ryad Benadjila -- - Arnauld Michelizza -- - Mathieu Renard -- - Philippe Thierry -- - Philippe Trebuchet -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- -- package soc.dma.interfaces with spark_mode => off is type t_dma_interrupts is (FIFO_ERROR, DIRECT_MODE_ERROR, TRANSFER_ERROR, HALF_COMPLETE, TRANSFER_COMPLETE); type t_config_mask is record handlers : boolean; buffer_in : boolean; buffer_out : boolean; buffer_size : boolean; mode : boolean; priority : boolean; direction : boolean; end record; for t_config_mask use record handlers at 0 range 0 .. 0; buffer_in at 0 range 1 .. 1; buffer_out at 0 range 2 .. 2; buffer_size at 0 range 3 .. 3; mode at 0 range 4 .. 4; priority at 0 range 5 .. 5; direction at 0 range 6 .. 6; end record; type t_mode is (DIRECT_MODE, FIFO_MODE, CIRCULAR_MODE); type t_transfer_dir is (PERIPHERAL_TO_MEMORY, MEMORY_TO_PERIPHERAL, MEMORY_TO_MEMORY); type t_priority_level is (LOW, MEDIUM, HIGH, VERY_HIGH); type t_data_size is (TRANSFER_BYTE, TRANSFER_HALF_WORD, TRANSFER_WORD); type t_burst_size is (SINGLE_TRANSFER, INCR_4_BEATS, INCR_8_BEATS, INCR_16_BEATS); type t_flow_controller is (DMA_FLOW_CONTROLLER, PERIPH_FLOW_CONTROLLER); type t_dma_config is record dma_id : soc.dma.t_dma_periph_index; stream : soc.dma.t_stream_index; channel : soc.dma.t_channel_index; bytes : unsigned_16; in_addr : system_address; in_priority : t_priority_level; in_handler : system_address; -- ISR out_addr : system_address; out_priority : t_priority_level; out_handler : system_address; -- ISR flow_controller : t_flow_controller; transfer_dir : t_transfer_dir; mode : t_mode; data_size : t_data_size; memory_inc : boolean; periph_inc : boolean; mem_burst_size : t_burst_size; periph_burst_size : t_burst_size; end record; procedure enable_stream (dma_id : in soc.dma.t_dma_periph_index; stream : in soc.dma.t_stream_index); procedure disable_stream (dma_id : in soc.dma.t_dma_periph_index; stream : in soc.dma.t_stream_index); procedure clear_interrupt (dma_id : in soc.dma.t_dma_periph_index; stream : in soc.dma.t_stream_index; interrupt : in t_dma_interrupts); procedure clear_all_interrupts (dma_id : in soc.dma.t_dma_periph_index; stream : in soc.dma.t_stream_index); function get_interrupt_status (dma_id : in soc.dma.t_dma_periph_index; stream : in soc.dma.t_stream_index) return t_dma_stream_int_status; procedure configure_stream (dma_id : in soc.dma.t_dma_periph_index; stream : in soc.dma.t_stream_index; user_config : in t_dma_config); procedure reconfigure_stream (dma_id : in soc.dma.t_dma_periph_index; stream : in soc.dma.t_stream_index; user_config : in t_dma_config; to_configure: in t_config_mask); procedure reset_stream (dma_id : in soc.dma.t_dma_periph_index; stream : in soc.dma.t_stream_index); end soc.dma.interfaces;
31.936
79
0.659569
10c04ed902117693f94235cdda2934d1765fe091
17,649
ads
Ada
src/gnat/nlists.ads
Letractively/ada-gen
d06d03821057f9177f2350e32dd09e467df08612
[ "Apache-2.0" ]
null
null
null
src/gnat/nlists.ads
Letractively/ada-gen
d06d03821057f9177f2350e32dd09e467df08612
[ "Apache-2.0" ]
null
null
null
src/gnat/nlists.ads
Letractively/ada-gen
d06d03821057f9177f2350e32dd09e467df08612
[ "Apache-2.0" ]
null
null
null
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- N L I S T S -- -- -- -- S p e c -- -- -- -- Copyright (C) 1992-2010, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- This package provides facilities for manipulating lists of nodes (see -- package Atree for format and implementation of tree nodes). The Link field -- of the nodes is used as the forward pointer for these lists. See also -- package Elists which provides another form of lists that are not threaded -- through the nodes (and therefore allow nodes to be on multiple lists). with System; with Types; use Types; package Nlists is -- A node list is a list of nodes in a special format that means that -- nodes can be on at most one such list. For each node list, a list -- header is allocated in the lists table, and a List_Id value references -- this header, which may be used to access the nodes in the list using -- the set of routines that define this interface. -- Note: node lists can contain either nodes or entities (extended nodes) -- or a mixture of nodes and extended nodes. function In_Same_List (N1, N2 : Node_Or_Entity_Id) return Boolean; pragma Inline (In_Same_List); -- Equivalent to List_Containing (N1) = List_Containing (N2) function Last_List_Id return List_Id; pragma Inline (Last_List_Id); -- Returns Id of last allocated list header function Lists_Address return System.Address; pragma Inline (Lists_Address); -- Return address of Lists table (used in Back_End for Gigi call) function Num_Lists return Nat; pragma Inline (Num_Lists); -- Number of currently allocated lists function New_List return List_Id; -- Creates a new empty node list. Typically this is used to initialize -- a field in some other node which points to a node list where the list -- is then subsequently filled in using Append calls. function Empty_List return List_Id renames New_List; -- Used in contexts where an empty list (as opposed to an initially empty -- list to be filled in) is required. function New_List (Node : Node_Or_Entity_Id) return List_Id; -- Build a new list initially containing the given node function New_List (Node1 : Node_Or_Entity_Id; Node2 : Node_Or_Entity_Id) return List_Id; -- Build a new list initially containing the two given nodes function New_List (Node1 : Node_Or_Entity_Id; Node2 : Node_Or_Entity_Id; Node3 : Node_Or_Entity_Id) return List_Id; -- Build a new list initially containing the three given nodes function New_List (Node1 : Node_Or_Entity_Id; Node2 : Node_Or_Entity_Id; Node3 : Node_Or_Entity_Id; Node4 : Node_Or_Entity_Id) return List_Id; function New_List (Node1 : Node_Or_Entity_Id; Node2 : Node_Or_Entity_Id; Node3 : Node_Or_Entity_Id; Node4 : Node_Or_Entity_Id; Node5 : Node_Or_Entity_Id) return List_Id; -- Build a new list initially containing the five given nodes function New_List (Node1 : Node_Or_Entity_Id; Node2 : Node_Or_Entity_Id; Node3 : Node_Or_Entity_Id; Node4 : Node_Or_Entity_Id; Node5 : Node_Or_Entity_Id; Node6 : Node_Or_Entity_Id) return List_Id; -- Build a new list initially containing the six given nodes function New_Copy_List (List : List_Id) return List_Id; -- Creates a new list containing copies (made with Atree.New_Copy) of every -- node in the original list. If the argument is No_List, then the returned -- result is No_List. If the argument is an empty list, then the returned -- result is a new empty list. function New_Copy_List_Original (List : List_Id) return List_Id; -- Same as New_Copy_List but copies only nodes coming from source function First (List : List_Id) return Node_Or_Entity_Id; pragma Inline (First); -- Obtains the first element of the given node list or, if the node list -- has no items or is equal to No_List, then Empty is returned. function First_Non_Pragma (List : List_Id) return Node_Or_Entity_Id; -- Used when dealing with a list that can contain pragmas to skip past -- any initial pragmas and return the first element that is not a pragma. -- If the list is empty, or if it contains only pragmas, then Empty is -- returned. It is an error to call First_Non_Pragma with a Node_Id value -- or No_List (No_List is not considered to be the same as an empty list). -- This function also skips N_Null nodes which can result from rewriting -- unrecognized or incorrect pragmas. function Last (List : List_Id) return Node_Or_Entity_Id; pragma Inline (Last); -- Obtains the last element of the given node list or, if the node list -- has no items, then Empty is returned. It is an error to call Last with -- a Node_Id or No_List. (No_List is not considered to be the same as an -- empty node list). function Last_Non_Pragma (List : List_Id) return Node_Or_Entity_Id; -- Obtains the last element of a given node list that is not a pragma. -- If the list is empty, or if it contains only pragmas, then Empty is -- returned. It is an error to call Last_Non_Pragma with a Node_Id or -- No_List. (No_List is not considered to be the same as an empty list). function List_Length (List : List_Id) return Nat; pragma Inline (List_Length); -- Returns number of items in the given list. It is an error to call -- this function with No_List (No_List is not considered to be the same -- as an empty list). function Next (Node : Node_Or_Entity_Id) return Node_Or_Entity_Id; pragma Inline (Next); -- This function returns the next node on a node list, or Empty if Node is -- the last element of the node list. The argument must be a member of a -- node list. procedure Next (Node : in out Node_Or_Entity_Id); pragma Inline (Next); -- Equivalent to Node := Next (Node); function Next_Non_Pragma (Node : Node_Or_Entity_Id) return Node_Or_Entity_Id; -- This function returns the next node on a node list, skipping past any -- pragmas, or Empty if there is no non-pragma entry left. The argument -- must be a member of a node list. This function also skips N_Null nodes -- which can result from rewriting unrecognized or incorrect pragmas. procedure Next_Non_Pragma (Node : in out Node_Or_Entity_Id); pragma Inline (Next_Non_Pragma); -- Equivalent to Node := Next_Non_Pragma (Node); function Prev (Node : Node_Or_Entity_Id) return Node_Or_Entity_Id; pragma Inline (Prev); -- This function returns the previous node on a node list, or Empty -- if Node is the first element of the node list. The argument must be -- a member of a node list. Note: the implementation does maintain back -- pointers, so this function executes quickly in constant time. function Pick (List : List_Id; Index : Pos) return Node_Or_Entity_Id; -- Given a list, picks out the Index'th entry (1 = first entry). The -- caller must ensure that Index is in range. procedure Prev (Node : in out Node_Or_Entity_Id); pragma Inline (Prev); -- Equivalent to Node := Prev (Node); function Prev_Non_Pragma (Node : Node_Or_Entity_Id) return Node_Or_Entity_Id; pragma Inline (Prev_Non_Pragma); -- This function returns the previous node on a node list, skipping any -- pragmas. If Node is the first element of the list, or if the only -- elements preceding it are pragmas, then Empty is returned. The -- argument must be a member of a node list. Note: the implementation -- does maintain back pointers, so this function executes quickly in -- constant time. procedure Prev_Non_Pragma (Node : in out Node_Or_Entity_Id); pragma Inline (Prev_Non_Pragma); -- Equivalent to Node := Prev_Non_Pragma (Node); function Is_Empty_List (List : List_Id) return Boolean; pragma Inline (Is_Empty_List); -- This function determines if a given list id references a node list that -- contains no items. No_List as an argument returns True. function Is_Non_Empty_List (List : List_Id) return Boolean; pragma Inline (Is_Non_Empty_List); -- This function determines if a given list id references a node list that -- contains at least one item. No_List as an argument returns False. function Is_List_Member (Node : Node_Or_Entity_Id) return Boolean; pragma Inline (Is_List_Member); -- This function determines if a given node is a member of a node list. -- It is an error for Node to be Empty, or to be a node list. function List_Containing (Node : Node_Or_Entity_Id) return List_Id; pragma Inline (List_Containing); -- This function provides a pointer to the node list containing Node. -- Node must be a member of a node list. procedure Append (Node : Node_Or_Entity_Id; To : List_Id); -- Appends Node at the end of node list To. Node must be a non-empty node -- that is not already a member of a node list, and To must be a -- node list. An attempt to append an error node is ignored without -- complaint and the list is unchanged. procedure Append_To (To : List_Id; Node : Node_Or_Entity_Id); pragma Inline (Append_To); -- Like Append, but arguments are the other way round procedure Append_List (List : List_Id; To : List_Id); -- Appends node list List to the end of node list To. On return, -- List is reset to be empty. procedure Append_List_To (To : List_Id; List : List_Id); pragma Inline (Append_List_To); -- Like Append_List, but arguments are the other way round procedure Insert_After (After : Node_Or_Entity_Id; Node : Node_Or_Entity_Id); -- Insert Node, which must be a non-empty node that is not already a -- member of a node list, immediately past node After, which must be a -- node that is currently a member of a node list. An attempt to insert -- an error node is ignored without complaint (and the list is unchanged). procedure Insert_List_After (After : Node_Or_Entity_Id; List : List_Id); -- Inserts the entire contents of node list List immediately after node -- After, which must be a member of a node list. On return, the node list -- List is reset to be the empty node list. procedure Insert_Before (Before : Node_Or_Entity_Id; Node : Node_Or_Entity_Id); -- Insert Node, which must be a non-empty node that is not already a -- member of a node list, immediately before Before, which must be a node -- that is currently a member of a node list. An attempt to insert an -- error node is ignored without complaint (and the list is unchanged). procedure Insert_List_Before (Before : Node_Or_Entity_Id; List : List_Id); -- Inserts the entire contents of node list List immediately before node -- Before, which must be a member of a node list. On return, the node list -- List is reset to be the empty node list. procedure Prepend (Node : Node_Or_Entity_Id; To : List_Id); -- Prepends Node at the start of node list To. Node must be a non-empty -- node that is not already a member of a node list, and To must be a -- node list. An attempt to prepend an error node is ignored without -- complaint and the list is unchanged. procedure Prepend_To (To : List_Id; Node : Node_Or_Entity_Id); pragma Inline (Prepend_To); -- Like Prepend, but arguments are the other way round procedure Prepend_List (List : List_Id; To : List_Id); -- Prepends node list List to the start of node list To. On return, -- List is reset to be empty. procedure Prepend_List_To (To : List_Id; List : List_Id); pragma Inline (Prepend_List_To); -- Like Prepend_List, but arguments are the other way round procedure Remove (Node : Node_Or_Entity_Id); -- Removes Node, which must be a node that is a member of a node list, -- from this node list. The contents of Node are not otherwise affected. function Remove_Head (List : List_Id) return Node_Or_Entity_Id; -- Removes the head element of a node list, and returns the node (whose -- contents are not otherwise affected) as the result. If the node list -- is empty, then Empty is returned. function Remove_Next (Node : Node_Or_Entity_Id) return Node_Or_Entity_Id; -- Removes the item immediately following the given node, and returns it -- as the result. If Node is the last element of the list, then Empty is -- returned. Node must be a member of a list. Unlike Remove, Remove_Next -- is fast and does not involve any list traversal. procedure Initialize; -- Called at the start of compilation of each new main source file to -- initialize the allocation of the list table. Note that Initialize -- must not be called if Tree_Read is used. procedure Lock; -- Called to lock tables before back end is called procedure Unlock; -- Unlock tables, in cases where the back end needs to modify them procedure Tree_Read; -- Initializes internal tables from current tree file using the relevant -- Table.Tree_Read routines. Note that Initialize should not be called if -- Tree_Read is used. Tree_Read includes all necessary initialization. procedure Tree_Write; -- Writes out internal tables to current tree file using the relevant -- Table.Tree_Write routines. function Parent (List : List_Id) return Node_Or_Entity_Id; pragma Inline (Parent); -- Node lists may have a parent in the same way as a node. The function -- accesses the Parent value, which is either Empty when a list header -- is first created, or the value that has been set by Set_Parent. procedure Set_Parent (List : List_Id; Node : Node_Or_Entity_Id); pragma Inline (Set_Parent); -- Sets the parent field of the given list to reference the given node function No (List : List_Id) return Boolean; pragma Inline (No); -- Tests given Id for equality with No_List. This allows notations like -- "if No (Statements)" as opposed to "if Statements = No_List". function Present (List : List_Id) return Boolean; pragma Inline (Present); -- Tests given Id for inequality with No_List. This allows notations like -- "if Present (Statements)" as opposed to "if Statements /= No_List". procedure Allocate_List_Tables (N : Node_Or_Entity_Id); -- Called when nodes table is expanded to include node N. This call -- makes sure that list structures internal to Nlists are adjusted -- appropriately to reflect this increase in the size of the nodes table. function Next_Node_Address return System.Address; function Prev_Node_Address return System.Address; -- These functions return the addresses of the Next_Node and Prev_Node -- tables (used in Back_End for Gigi). function p (U : Union_Id) return Node_Or_Entity_Id; -- This function is intended for use from the debugger, it determines -- whether U is a Node_Id or List_Id, and calls the appropriate Parent -- function and returns the parent Node in either case. This is shorter -- to type, and avoids the overloading problem of using Parent. It -- should NEVER be used except from the debugger. If p is called with -- other than a node or list id value, it returns 99_999_999. end Nlists;
47.064
79
0.668366
1c62e29e6e1fa0504a328130a77681ea441fb8cf
2,892
ads
Ada
src/asf-converters.ads
jquorning/ada-asf
ddc697c5dfa4e22c57c6958f4cff27e14d02ce98
[ "Apache-2.0" ]
12
2015-01-18T23:02:20.000Z
2022-03-25T15:30:30.000Z
src/asf-converters.ads
jquorning/ada-asf
ddc697c5dfa4e22c57c6958f4cff27e14d02ce98
[ "Apache-2.0" ]
3
2021-01-06T09:44:02.000Z
2022-02-04T20:20:53.000Z
src/asf-converters.ads
jquorning/ada-asf
ddc697c5dfa4e22c57c6958f4cff27e14d02ce98
[ "Apache-2.0" ]
4
2016-04-12T05:29:00.000Z
2022-01-24T23:53:59.000Z
----------------------------------------------------------------------- -- asf-converters -- ASF Converters -- Copyright (C) 2010 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with EL.Objects; with ASF.Components.Base; with ASF.Contexts.Faces; -- The <b>ASF.Converters</b> defines an interface used by the conversion model -- to translate an object into a string when formatting the response and translate -- a string into an object during the apply request or validation phases (JSF postback). -- -- See JSR 314 - JavaServer Faces Specification 3.3.2 Converter -- (To_String is the JSF getAsString method and To_Object is the JSF getAsObject method) package ASF.Converters is Invalid_Conversion : exception; -- ------------------------------ -- Converter -- ------------------------------ -- The <b>Converter</b> must implement two functions to convert a string into -- an object and the opposite. The converter instance must be registered in -- the component factory (See <b>ASF.Factory.Component_Factory</b>). -- Unlike the Java implementation, the instance will be shared by multiple -- views and requests. type Converter is limited interface; type Converter_Access is access all Converter'Class; -- Convert the object value into a string. The object value is associated -- with the specified component. -- If the string cannot be converted, the Invalid_Conversion exception should be raised. function To_String (Convert : in Converter; Context : in ASF.Contexts.Faces.Faces_Context'Class; Component : in ASF.Components.Base.UIComponent'Class; Value : in EL.Objects.Object) return String is abstract; -- Convert the string into an object for the specified component. -- If the string cannot be converted, the Invalid_Conversion exception should be raised. function To_Object (Convert : in Converter; Context : in ASF.Contexts.Faces.Faces_Context'Class; Component : in ASF.Components.Base.UIComponent'Class; Value : in String) return EL.Objects.Object is abstract; end ASF.Converters;
49.016949
92
0.654219
1099d5ef7d510ee528c67bf74d606430274162eb
1,984
adb
Ada
private/tetris.adb
albinjal/ada_basic
2ee5963f18496870ee9efc2e6466917c87482ddc
[ "MIT" ]
3
2020-01-27T10:04:20.000Z
2022-02-11T23:17:00.000Z
private/tetris.adb
albinjal/ada_basic
2ee5963f18496870ee9efc2e6466917c87482ddc
[ "MIT" ]
null
null
null
private/tetris.adb
albinjal/ada_basic
2ee5963f18496870ee9efc2e6466917c87482ddc
[ "MIT" ]
null
null
null
with Ada.Text_IO; use Ada.Text_IO; with Ada.Integer_Text_IO; use Ada.Integer_Text_IO; with Ada.Float_Text_IO; use Ada.Float_Text_IO; with Ada.Real_Time; use Ada.Real_Time; with Ada.Calendar; use Ada.Calendar; procedure Tetris is Rows: Integer := 38; Cols: Integer := 22; FPS: Integer := 240; -- Höjd: Integer := 18; -- Bredd: Integer := 10; I: Integer := 0; Poll_Time : Time_Span := Milliseconds (1000/FPS); Blockcol: Integer := 6; Blockrow: Integer := 0; Answer : Character; Available: Boolean := False; Fastdrop: Boolean := False; -- Framestart: Time; -- Period : constant Time_Span := Milliseconds (1000/60); begin loop Get_Immediate(Answer, Available); if Available then case Answer is when 'd' => Blockcol := Blockcol + 2; when 'a' => Blockcol := Blockcol - 2; when ' ' => Fastdrop := True; when others => null; end case; Available := False; end if; -- Framestart := Clock; Put(I); New_Line(1); for Row in 1..Rows loop for Col in 1..Cols loop if Row = 1 or Row = Rows then Put("--"); else if Col = 1 or Col = Cols then Put("|"); else if Row = Blockrow or Row = Blockrow + 1 then if Col = Blockcol or Col = Blockcol +1 then Put("[]"); else Put(" "); end if; else Put(" "); end if; end if; end if; end loop; New_Line(1); end loop; if Fastdrop or I mod FPS = 0 then if Blockrow = Rows -2 then Fastdrop := False; delay until Clock + Milliseconds(500); Blockrow := 0; Blockcol := 6; else Blockrow := Blockrow + 2; end if; end if; I := I + 1; delay until Clock + Poll_Time; --New_Line(30); -- CLEAR TERMINAL Ada.TEXT_IO.Put(ASCII.ESC & "[2J"); end loop; end Tetris;
20.453608
64
0.536794
dc0adfc3a9598edd69211a95f46202f1dbb8338c
56,000
ads
Ada
tools/scitools/conf/understand/ada/ada12/g-spipat.ads
brucegua/moocos
575c161cfa35e220f10d042e2e5ca18773691695
[ "Apache-2.0" ]
1
2020-01-20T21:26:46.000Z
2020-01-20T21:26:46.000Z
tools/scitools/conf/understand/ada/ada12/g-spipat.ads
brucegua/moocos
575c161cfa35e220f10d042e2e5ca18773691695
[ "Apache-2.0" ]
null
null
null
tools/scitools/conf/understand/ada/ada12/g-spipat.ads
brucegua/moocos
575c161cfa35e220f10d042e2e5ca18773691695
[ "Apache-2.0" ]
null
null
null
------------------------------------------------------------------------------ -- -- -- GNAT LIBRARY COMPONENTS -- -- -- -- G N A T . S P I T B O L . P A T T E R N S -- -- -- -- S p e c -- -- -- -- Copyright (C) 1997-2010, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- -- -- -- -- -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- SPITBOL-like pattern construction and matching -- This child package of GNAT.SPITBOL provides a complete implementation -- of the SPITBOL-like pattern construction and matching operations. This -- package is based on Macro-SPITBOL created by Robert Dewar. ------------------------------------------------------------ -- Summary of Pattern Matching Packages in GNAT Hierarchy -- ------------------------------------------------------------ -- There are three related packages that perform pattern matching functions. -- the following is an outline of these packages, to help you determine -- which is best for your needs. -- GNAT.Regexp (files g-regexp.ads/g-regexp.adb) -- This is a simple package providing Unix-style regular expression -- matching with the restriction that it matches entire strings. It -- is particularly useful for file name matching, and in particular -- it provides "globbing patterns" that are useful in implementing -- unix or DOS style wild card matching for file names. -- GNAT.Regpat (files g-regpat.ads/g-regpat.adb) -- This is a more complete implementation of Unix-style regular -- expressions, copied from the original V7 style regular expression -- library written in C by Henry Spencer. It is functionally the -- same as this library, and uses the same internal data structures -- stored in a binary compatible manner. -- GNAT.Spitbol.Patterns (files g-spipat.ads/g-spipat.adb) -- This is a completely general patterm matching package based on the -- pattern language of SNOBOL4, as implemented in SPITBOL. The pattern -- language is modeled on context free grammars, with context sensitive -- extensions that provide full (type 0) computational capabilities. with Ada.Strings.Maps; use Ada.Strings.Maps; with Ada.Text_IO; use Ada.Text_IO; package GNAT.Spitbol.Patterns is pragma Elaborate_Body; ------------------------------- -- Pattern Matching Tutorial -- ------------------------------- -- A pattern matching operation (a call to one of the Match subprograms) -- takes a subject string and a pattern, and optionally a replacement -- string. The replacement string option is only allowed if the subject -- is a variable. -- The pattern is matched against the subject string, and either the -- match fails, or it succeeds matching a contiguous substring. If a -- replacement string is specified, then the subject string is modified -- by replacing the matched substring with the given replacement. -- Concatenation and Alternation -- ============================= -- A pattern consists of a series of pattern elements. The pattern is -- built up using either the concatenation operator: -- A & B -- which means match A followed immediately by matching B, or the -- alternation operator: -- A or B -- which means first attempt to match A, and then if that does not -- succeed, match B. -- There is full backtracking, which means that if a given pattern -- element fails to match, then previous alternatives are matched. -- For example if we have the pattern: -- (A or B) & (C or D) & (E or F) -- First we attempt to match A, if that succeeds, then we go on to try -- to match C, and if that succeeds, we go on to try to match E. If E -- fails, then we try F. If F fails, then we go back and try matching -- D instead of C. Let's make this explicit using a specific example, -- and introducing the simplest kind of pattern element, which is a -- literal string. The meaning of this pattern element is simply to -- match the characters that correspond to the string characters. Now -- let's rewrite the above pattern form with specific string literals -- as the pattern elements: -- ("ABC" or "AB") & ("DEF" or "CDE") & ("GH" or "IJ") -- The following strings will be attempted in sequence: -- ABC . DEF . GH -- ABC . DEF . IJ -- ABC . CDE . GH -- ABC . CDE . IJ -- AB . DEF . GH -- AB . DEF . IJ -- AB . CDE . GH -- AB . CDE . IJ -- Here we use the dot simply to separate the pieces of the string -- matched by the three separate elements. -- Moving the Start Point -- ====================== -- A pattern is not required to match starting at the first character -- of the string, and is not required to match to the end of the string. -- The first attempt does indeed attempt to match starting at the first -- character of the string, trying all the possible alternatives. But -- if all alternatives fail, then the starting point of the match is -- moved one character, and all possible alternatives are attempted at -- the new anchor point. -- The entire match fails only when every possible starting point has -- been attempted. As an example, suppose that we had the subject -- string -- "ABABCDEIJKL" -- matched using the pattern in the previous example: -- ("ABC" or "AB") & ("DEF" or "CDE") & ("GH" or "IJ") -- would succeed, after two anchor point moves: -- "ABABCDEIJKL" -- ^^^^^^^ -- matched -- section -- This mode of pattern matching is called the unanchored mode. It is -- also possible to put the pattern matcher into anchored mode by -- setting the global variable Anchored_Mode to True. This will cause -- all subsequent matches to be performed in anchored mode, where the -- match is required to start at the first character. -- We will also see later how the effect of an anchored match can be -- obtained for a single specified anchor point if this is desired. -- Other Pattern Elements -- ====================== -- In addition to strings (or single characters), there are many special -- pattern elements that correspond to special predefined alternations: -- Arb Matches any string. First it matches the null string, and -- then on a subsequent failure, matches one character, and -- then two characters, and so on. It only fails if the -- entire remaining string is matched. -- Bal Matches a non-empty string that is parentheses balanced -- with respect to ordinary () characters. Examples of -- balanced strings are "ABC", "A((B)C)", and "A(B)C(D)E". -- Bal matches the shortest possible balanced string on the -- first attempt, and if there is a subsequent failure, -- attempts to extend the string. -- Cancel Immediately aborts the entire pattern match, signalling -- failure. This is a specialized pattern element, which is -- useful in conjunction with some of the special pattern -- elements that have side effects. -- Fail The null alternation. Matches no possible strings, so it -- always signals failure. This is a specialized pattern -- element, which is useful in conjunction with some of the -- special pattern elements that have side effects. -- Fence Matches the null string at first, and then if a failure -- causes alternatives to be sought, aborts the match (like -- a Cancel). Note that using Fence at the start of a pattern -- has the same effect as matching in anchored mode. -- Rest Matches from the current point to the last character in -- the string. This is a specialized pattern element, which -- is useful in conjunction with some of the special pattern -- elements that have side effects. -- Succeed Repeatedly matches the null string (it is equivalent to -- the alternation ("" or "" or "" ....). This is a special -- pattern element, which is useful in conjunction with some -- of the special pattern elements that have side effects. -- Pattern Construction Functions -- ============================== -- The following functions construct additional pattern elements -- Any(S) Where S is a string, matches a single character that is -- any one of the characters in S. Fails if the current -- character is not one of the given set of characters. -- Arbno(P) Where P is any pattern, matches any number of instances -- of the pattern, starting with zero occurrences. It is -- thus equivalent to ("" or (P & ("" or (P & ("" ....)))). -- The pattern P may contain any number of pattern elements -- including the use of alternation and concatenation. -- Break(S) Where S is a string, matches a string of zero or more -- characters up to but not including a break character -- that is one of the characters given in the string S. -- Can match the null string, but cannot match the last -- character in the string, since a break character is -- required to be present. -- BreakX(S) Where S is a string, behaves exactly like Break(S) when -- it first matches, but if a string is successfully matched, -- then a subsequent failure causes an attempt to extend the -- matched string. -- Fence(P) Where P is a pattern, attempts to match the pattern P -- including trying all possible alternatives of P. If none -- of these alternatives succeeds, then the Fence pattern -- fails. If one alternative succeeds, then the pattern -- match proceeds, but on a subsequent failure, no attempt -- is made to search for alternative matches of P. The -- pattern P may contain any number of pattern elements -- including the use of alternation and concatenation. -- Len(N) Where N is a natural number, matches the given number of -- characters. For example, Len(10) matches any string that -- is exactly ten characters long. -- NotAny(S) Where S is a string, matches a single character that is -- not one of the characters of S. Fails if the current -- character is one of the given set of characters. -- NSpan(S) Where S is a string, matches a string of zero or more -- characters that is among the characters given in the -- string. Always matches the longest possible such string. -- Always succeeds, since it can match the null string. -- Pos(N) Where N is a natural number, matches the null string -- if exactly N characters have been matched so far, and -- otherwise fails. -- Rpos(N) Where N is a natural number, matches the null string -- if exactly N characters remain to be matched, and -- otherwise fails. -- Rtab(N) Where N is a natural number, matches characters from -- the current position until exactly N characters remain -- to be matched in the string. Fails if fewer than N -- unmatched characters remain in the string. -- Tab(N) Where N is a natural number, matches characters from -- the current position until exactly N characters have -- been matched in all. Fails if more than N characters -- have already been matched. -- Span(S) Where S is a string, matches a string of one or more -- characters that is among the characters given in the -- string. Always matches the longest possible such string. -- Fails if the current character is not one of the given -- set of characters. -- Recursive Pattern Matching -- ========================== -- The plus operator (+P) where P is a pattern variable, creates -- a recursive pattern that will, at pattern matching time, follow -- the pointer to obtain the referenced pattern, and then match this -- pattern. This may be used to construct recursive patterns. Consider -- for example: -- P := ("A" or ("B" & (+P))) -- On the first attempt, this pattern attempts to match the string "A". -- If this fails, then the alternative matches a "B", followed by an -- attempt to match P again. This second attempt first attempts to -- match "A", and so on. The result is a pattern that will match a -- string of B's followed by a single A. -- This particular example could simply be written as NSpan('B') & 'A', -- but the use of recursive patterns in the general case can construct -- complex patterns which could not otherwise be built. -- Pattern Assignment Operations -- ============================= -- In addition to the overall result of a pattern match, which indicates -- success or failure, it is often useful to be able to keep track of -- the pieces of the subject string that are matched by individual -- pattern elements, or subsections of the pattern. -- The pattern assignment operators allow this capability. The first -- form is the immediate assignment: -- P * S -- Here P is an arbitrary pattern, and S is a variable of type VString -- that will be set to the substring matched by P. This assignment -- happens during pattern matching, so if P matches more than once, -- then the assignment happens more than once. -- The deferred assignment operation: -- P ** S -- avoids these multiple assignments by deferring the assignment to the -- end of the match. If the entire match is successful, and if the -- pattern P was part of the successful match, then at the end of the -- matching operation the assignment to S of the string matching P is -- performed. -- The cursor assignment operation: -- Setcur(N'Access) -- assigns the current cursor position to the natural variable N. The -- cursor position is defined as the count of characters that have been -- matched so far (including any start point moves). -- Finally the operations * and ** may be used with values of type -- Text_IO.File_Access. The effect is to do a Put_Line operation of -- the matched substring. These are particularly useful in debugging -- pattern matches. -- Deferred Matching -- ================= -- The pattern construction functions (such as Len and Any) all permit -- the use of pointers to natural or string values, or functions that -- return natural or string values. These forms cause the actual value -- to be obtained at pattern matching time. This allows interesting -- possibilities for constructing dynamic patterns as illustrated in -- the examples section. -- In addition the (+S) operator may be used where S is a pointer to -- string or function returning string, with a similar deferred effect. -- A special use of deferred matching is the construction of predicate -- functions. The element (+P) where P is an access to a function that -- returns a Boolean value, causes the function to be called at the -- time the element is matched. If the function returns True, then the -- null string is matched, if the function returns False, then failure -- is signalled and previous alternatives are sought. -- Deferred Replacement -- ==================== -- The simple model given for pattern replacement (where the matched -- substring is replaced by the string given as the third argument to -- Match) works fine in simple cases, but this approach does not work -- in the case where the expression used as the replacement string is -- dependent on values set by the match. -- For example, suppose we want to find an instance of a parenthesized -- character, and replace the parentheses with square brackets. At first -- glance it would seem that: -- Match (Subject, '(' & Len (1) * Char & ')', '[' & Char & ']'); -- would do the trick, but that does not work, because the third -- argument to Match gets evaluated too early, before the call to -- Match, and before the pattern match has had a chance to set Char. -- To solve this problem we provide the deferred replacement capability. -- With this approach, which of course is only needed if the pattern -- involved has side effects, is to do the match in two stages. The -- call to Match sets a pattern result in a variable of the private -- type Match_Result, and then a subsequent Replace operation uses -- this Match_Result object to perform the required replacement. -- Using this approach, we can now write the above operation properly -- in a manner that will work: -- M : Match_Result; -- ... -- Match (Subject, '(' & Len (1) * Char & ')', M); -- Replace (M, '[' & Char & ']'); -- As with other Match cases, there is a function and procedure form -- of this match call. A call to Replace after a failed match has no -- effect. Note that Subject should not be modified between the calls. -- Examples of Pattern Matching -- ============================ -- First a simple example of the use of pattern replacement to remove -- a line number from the start of a string. We assume that the line -- number has the form of a string of decimal digits followed by a -- period, followed by one or more spaces. -- Digs : constant Pattern := Span("0123456789"); -- Lnum : constant Pattern := Pos(0) & Digs & '.' & Span(' '); -- Now to use this pattern we simply do a match with a replacement: -- Match (Line, Lnum, ""); -- which replaces the line number by the null string. Note that it is -- also possible to use an Ada.Strings.Maps.Character_Set value as an -- argument to Span and similar functions, and in particular all the -- useful constants 'in Ada.Strings.Maps.Constants are available. This -- means that we could define Digs as: -- Digs : constant Pattern := Span(Decimal_Digit_Set); -- The style we use here, of defining constant patterns and then using -- them is typical. It is possible to build up patterns dynamically, -- but it is usually more efficient to build them in pieces in advance -- using constant declarations. Note in particular that although it is -- possible to construct a pattern directly as an argument for the -- Match routine, it is much more efficient to preconstruct the pattern -- as we did in this example. -- Now let's look at the use of pattern assignment to break a -- string into sections. Suppose that the input string has two -- unsigned decimal integers, separated by spaces or a comma, -- with spaces allowed anywhere. Then we can isolate the two -- numbers with the following pattern: -- Num1, Num2 : aliased VString; -- B : constant Pattern := NSpan(' '); -- N : constant Pattern := Span("0123456789"); -- T : constant Pattern := -- NSpan(' ') & N * Num1 & Span(" ,") & N * Num2; -- The match operation Match (" 124, 257 ", T) would assign the -- string 124 to Num1 and the string 257 to Num2. -- Now let's see how more complex elements can be built from the -- set of primitive elements. The following pattern matches strings -- that have the syntax of Ada 95 based literals: -- Digs : constant Pattern := Span(Decimal_Digit_Set); -- UDigs : constant Pattern := Digs & Arbno('_' & Digs); -- Edig : constant Pattern := Span(Hexadecimal_Digit_Set); -- UEdig : constant Pattern := Edig & Arbno('_' & Edig); -- Bnum : constant Pattern := Udigs & '#' & UEdig & '#'; -- A match against Bnum will now match the desired strings, e.g. -- it will match 16#123_abc#, but not a#b#. However, this pattern -- is not quite complete, since it does not allow colons to replace -- the pound signs. The following is more complete: -- Bchar : constant Pattern := Any("#:"); -- Bnum : constant Pattern := Udigs & Bchar & UEdig & Bchar; -- but that is still not quite right, since it allows # and : to be -- mixed, and they are supposed to be used consistently. We solve -- this by using a deferred match. -- Temp : aliased VString; -- Bnum : constant Pattern := -- Udigs & Bchar * Temp & UEdig & (+Temp) -- Here the first instance of the base character is stored in Temp, and -- then later in the pattern we rematch the value that was assigned. -- For an example of a recursive pattern, let's define a pattern -- that is like the built in Bal, but the string matched is balanced -- with respect to square brackets or curly brackets. -- The language for such strings might be defined in extended BNF as -- ELEMENT ::= <any character other than [] or {}> -- | '[' BALANCED_STRING ']' -- | '{' BALANCED_STRING '}' -- BALANCED_STRING ::= ELEMENT {ELEMENT} -- Here we use {} to indicate zero or more occurrences of a term, as -- is common practice in extended BNF. Now we can translate the above -- BNF into recursive patterns as follows: -- Element, Balanced_String : aliased Pattern; -- . -- . -- . -- Element := NotAny ("[]{}") -- or -- ('[' & (+Balanced_String) & ']') -- or -- ('{' & (+Balanced_String) & '}'); -- Balanced_String := Element & Arbno (Element); -- Note the important use of + here to refer to a pattern not yet -- defined. Note also that we use assignments precisely because we -- cannot refer to as yet undeclared variables in initializations. -- Now that this pattern is constructed, we can use it as though it -- were a new primitive pattern element, and for example, the match: -- Match ("xy[ab{cd}]", Balanced_String * Current_Output & Fail); -- will generate the output: -- x -- xy -- xy[ab{cd}] -- y -- y[ab{cd}] -- [ab{cd}] -- a -- ab -- ab{cd} -- b -- b{cd} -- {cd} -- c -- cd -- d -- Note that the function of the fail here is simply to force the -- pattern Balanced_String to match all possible alternatives. Studying -- the operation of this pattern in detail is highly instructive. -- Finally we give a rather elaborate example of the use of deferred -- matching. The following declarations build up a pattern which will -- find the longest string of decimal digits in the subject string. -- Max, Cur : VString; -- Loc : Natural; -- function GtS return Boolean is -- begin -- return Length (Cur) > Length (Max); -- end GtS; -- Digit : constant Character_Set := Decimal_Digit_Set; -- Digs : constant Pattern := Span(Digit); -- Find : constant Pattern := -- "" * Max & Fence & -- initialize Max to null -- BreakX (Digit) & -- scan looking for digits -- ((Span(Digit) * Cur & -- assign next string to Cur -- (+GtS'Unrestricted_Access) & -- check size(Cur) > Size(Max) -- Setcur(Loc'Access)) -- if so, save location -- * Max) & -- and assign to Max -- Fail; -- seek all alternatives -- As we see from the comments here, complex patterns like this take -- on aspects of sequential programs. In fact they are sequential -- programs with general backtracking. In this pattern, we first use -- a pattern assignment that matches null and assigns it to Max, so -- that it is initialized for the new match. Now BreakX scans to the -- next digit. Arb would do here, but BreakX will be more efficient. -- Once we have found a digit, we scan out the longest string of -- digits with Span, and assign it to Cur. The deferred call to GtS -- tests if the string we assigned to Cur is the longest so far. If -- not, then failure is signalled, and we seek alternatives (this -- means that BreakX will extend and look for the next digit string). -- If the call to GtS succeeds then the matched string is assigned -- as the largest string so far into Max and its location is saved -- in Loc. Finally Fail forces the match to fail and seek alternatives, -- so that the entire string is searched. -- If the pattern Find is matched against a string, the variable Max -- at the end of the pattern will have the longest string of digits, -- and Loc will be the starting character location of the string. For -- example, Match("ab123cd4657ef23", Find) will assign "4657" to Max -- and 11 to Loc (indicating that the string ends with the eleventh -- character of the string). -- Note: the use of Unrestricted_Access to reference GtS will not -- be needed if GtS is defined at the outer level, but definitely -- will be necessary if GtS is a nested function (in which case of -- course the scope of the pattern Find will be restricted to this -- nested scope, and this cannot be checked, i.e. use of the pattern -- outside this scope is erroneous). Generally it is a good idea to -- define patterns and the functions they call at the outer level -- where possible, to avoid such problems. -- Correspondence with Pattern Matching in SPITBOL -- =============================================== -- Generally the Ada syntax and names correspond closely to SPITBOL -- syntax for pattern matching construction. -- The basic pattern construction operators are renamed as follows: -- Spitbol Ada -- (space) & -- | or -- $ * -- . ** -- The Ada operators were chosen so that the relative precedences of -- these operators corresponds to that of the Spitbol operators, but -- as always, the use of parentheses is advisable to clarify. -- The pattern construction operators all have similar names except for -- Spitbol Ada -- Abort Cancel -- Rem Rest -- where we have clashes with Ada reserved names -- Ada requires the use of 'Access to refer to functions used in the -- pattern match, and often the use of 'Unrestricted_Access may be -- necessary to get around the scope restrictions if the functions -- are not declared at the outer level. -- The actual pattern matching syntax is modified in Ada as follows: -- Spitbol Ada -- X Y Match (X, Y); -- X Y = Z Match (X, Y, Z); -- and pattern failure is indicated by returning a Boolean result from -- the Match function (True for success, False for failure). ----------------------- -- Type Declarations -- ----------------------- type Pattern is private; -- Type representing a pattern. This package provides a complete set of -- operations for constructing patterns that can be used in the pattern -- matching operations provided. type Boolean_Func is access function return Boolean; -- General Boolean function type. When this type is used as a formal -- parameter type in this package, it indicates a deferred predicate -- pattern. The function will be called when the pattern element is -- matched and failure signalled if False is returned. type Natural_Func is access function return Natural; -- General Natural function type. When this type is used as a formal -- parameter type in this package, it indicates a deferred pattern. -- The function will be called when the pattern element is matched -- to obtain the currently referenced Natural value. type VString_Func is access function return VString; -- General VString function type. When this type is used as a formal -- parameter type in this package, it indicates a deferred pattern. -- The function will be called when the pattern element is matched -- to obtain the currently referenced string value. subtype PString is String; -- This subtype is used in the remainder of the package to indicate a -- formal parameter that is converted to its corresponding pattern, -- i.e. a pattern that matches the characters of the string. subtype PChar is Character; -- Similarly, this subtype is used in the remainder of the package to -- indicate a formal parameter that is converted to its corresponding -- pattern, i.e. a pattern that matches this one character. subtype VString_Var is VString; subtype Pattern_Var is Pattern; -- These synonyms are used as formal parameter types to a function where, -- if the language allowed, we would use in out parameters, but we are -- not allowed to have in out parameters for functions. Instead we pass -- actuals which must be variables, and with a bit of trickery in the -- body, manage to interpret them properly as though they were indeed -- in out parameters. pragma Warnings (Off, VString_Var); pragma Warnings (Off, Pattern_Var); -- We turn off warnings for these two types so that when variables are used -- as arguments in this context, warnings about them not being assigned in -- the source program will be suppressed. -------------------------------- -- Basic Pattern Construction -- -------------------------------- function "&" (L : Pattern; R : Pattern) return Pattern; function "&" (L : PString; R : Pattern) return Pattern; function "&" (L : Pattern; R : PString) return Pattern; function "&" (L : PChar; R : Pattern) return Pattern; function "&" (L : Pattern; R : PChar) return Pattern; -- Pattern concatenation. Matches L followed by R function "or" (L : Pattern; R : Pattern) return Pattern; function "or" (L : PString; R : Pattern) return Pattern; function "or" (L : Pattern; R : PString) return Pattern; function "or" (L : PString; R : PString) return Pattern; function "or" (L : PChar; R : Pattern) return Pattern; function "or" (L : Pattern; R : PChar) return Pattern; function "or" (L : PChar; R : PChar) return Pattern; function "or" (L : PString; R : PChar) return Pattern; function "or" (L : PChar; R : PString) return Pattern; -- Pattern alternation. Creates a pattern that will first try to match -- L and then on a subsequent failure, attempts to match R instead. ---------------------------------- -- Pattern Assignment Functions -- ---------------------------------- function "*" (P : Pattern; Var : VString_Var) return Pattern; function "*" (P : PString; Var : VString_Var) return Pattern; function "*" (P : PChar; Var : VString_Var) return Pattern; -- Matches P, and if the match succeeds, assigns the matched substring -- to the given VString variable S. This assignment happens as soon as -- the substring is matched, and if the pattern P1 is matched more than -- once during the course of the match, then the assignment will occur -- more than once. function "**" (P : Pattern; Var : VString_Var) return Pattern; function "**" (P : PString; Var : VString_Var) return Pattern; function "**" (P : PChar; Var : VString_Var) return Pattern; -- Like "*" above, except that the assignment happens at most once -- after the entire match is completed successfully. If the match -- fails, then no assignment takes place. ---------------------------------- -- Deferred Matching Operations -- ---------------------------------- function "+" (Str : VString_Var) return Pattern; -- Here Str must be a VString variable. This function constructs a -- pattern which at pattern matching time will access the current -- value of this variable, and match against these characters. function "+" (Str : VString_Func) return Pattern; -- Constructs a pattern which at pattern matching time calls the given -- function, and then matches against the string or character value -- that is returned by the call. function "+" (P : Pattern_Var) return Pattern; -- Here P must be a Pattern variable. This function constructs a -- pattern which at pattern matching time will access the current -- value of this variable, and match against the pattern value. function "+" (P : Boolean_Func) return Pattern; -- Constructs a predicate pattern function that at pattern matching time -- calls the given function. If True is returned, then the pattern matches. -- If False is returned, then failure is signalled. -------------------------------- -- Pattern Building Functions -- -------------------------------- function Arb return Pattern; -- Constructs a pattern that will match any string. On the first attempt, -- the pattern matches a null string, then on each successive failure, it -- matches one more character, and only fails if matching the entire rest -- of the string. function Arbno (P : Pattern) return Pattern; function Arbno (P : PString) return Pattern; function Arbno (P : PChar) return Pattern; -- Pattern repetition. First matches null, then on a subsequent failure -- attempts to match an additional instance of the given pattern. -- Equivalent to (but more efficient than) P & ("" or (P & ("" or ... function Any (Str : String) return Pattern; function Any (Str : VString) return Pattern; function Any (Str : Character) return Pattern; function Any (Str : Character_Set) return Pattern; function Any (Str : not null access VString) return Pattern; function Any (Str : VString_Func) return Pattern; -- Constructs a pattern that matches a single character that is one of -- the characters in the given argument. The pattern fails if the current -- character is not in Str. function Bal return Pattern; -- Constructs a pattern that will match any non-empty string that is -- parentheses balanced with respect to the normal parentheses characters. -- Attempts to extend the string if a subsequent failure occurs. function Break (Str : String) return Pattern; function Break (Str : VString) return Pattern; function Break (Str : Character) return Pattern; function Break (Str : Character_Set) return Pattern; function Break (Str : not null access VString) return Pattern; function Break (Str : VString_Func) return Pattern; -- Constructs a pattern that matches a (possibly null) string which -- is immediately followed by a character in the given argument. This -- character is not part of the matched string. The pattern fails if -- the remaining characters to be matched do not include any of the -- characters in Str. function BreakX (Str : String) return Pattern; function BreakX (Str : VString) return Pattern; function BreakX (Str : Character) return Pattern; function BreakX (Str : Character_Set) return Pattern; function BreakX (Str : not null access VString) return Pattern; function BreakX (Str : VString_Func) return Pattern; -- Like Break, but the pattern attempts to extend on a failure to find -- the next occurrence of a character in Str, and only fails when the -- last such instance causes a failure. function Cancel return Pattern; -- Constructs a pattern that immediately aborts the entire match function Fail return Pattern; -- Constructs a pattern that always fails function Fence return Pattern; -- Constructs a pattern that matches null on the first attempt, and then -- causes the entire match to be aborted if a subsequent failure occurs. function Fence (P : Pattern) return Pattern; -- Constructs a pattern that first matches P. If P fails, then the -- constructed pattern fails. If P succeeds, then the match proceeds, -- but if subsequent failure occurs, alternatives in P are not sought. -- The idea of Fence is that each time the pattern is matched, just -- one attempt is made to match P, without trying alternatives. function Len (Count : Natural) return Pattern; function Len (Count : not null access Natural) return Pattern; function Len (Count : Natural_Func) return Pattern; -- Constructs a pattern that matches exactly the given number of -- characters. The pattern fails if fewer than this number of characters -- remain to be matched in the string. function NotAny (Str : String) return Pattern; function NotAny (Str : VString) return Pattern; function NotAny (Str : Character) return Pattern; function NotAny (Str : Character_Set) return Pattern; function NotAny (Str : not null access VString) return Pattern; function NotAny (Str : VString_Func) return Pattern; -- Constructs a pattern that matches a single character that is not -- one of the characters in the given argument. The pattern Fails if -- the current character is in Str. function NSpan (Str : String) return Pattern; function NSpan (Str : VString) return Pattern; function NSpan (Str : Character) return Pattern; function NSpan (Str : Character_Set) return Pattern; function NSpan (Str : not null access VString) return Pattern; function NSpan (Str : VString_Func) return Pattern; -- Constructs a pattern that matches the longest possible string -- consisting entirely of characters from the given argument. The -- string may be empty, so this pattern always succeeds. function Pos (Count : Natural) return Pattern; function Pos (Count : not null access Natural) return Pattern; function Pos (Count : Natural_Func) return Pattern; -- Constructs a pattern that matches the null string if exactly Count -- characters have already been matched, and otherwise fails. function Rest return Pattern; -- Constructs a pattern that always succeeds, matching the remaining -- unmatched characters in the pattern. function Rpos (Count : Natural) return Pattern; function Rpos (Count : not null access Natural) return Pattern; function Rpos (Count : Natural_Func) return Pattern; -- Constructs a pattern that matches the null string if exactly Count -- characters remain to be matched in the string, and otherwise fails. function Rtab (Count : Natural) return Pattern; function Rtab (Count : not null access Natural) return Pattern; function Rtab (Count : Natural_Func) return Pattern; -- Constructs a pattern that matches from the current location until -- exactly Count characters remain to be matched in the string. The -- pattern fails if fewer than Count characters remain to be matched. function Setcur (Var : not null access Natural) return Pattern; -- Constructs a pattern that matches the null string, and assigns the -- current cursor position in the string. This value is the number of -- characters matched so far. So it is zero at the start of the match. function Span (Str : String) return Pattern; function Span (Str : VString) return Pattern; function Span (Str : Character) return Pattern; function Span (Str : Character_Set) return Pattern; function Span (Str : not null access VString) return Pattern; function Span (Str : VString_Func) return Pattern; -- Constructs a pattern that matches the longest possible string -- consisting entirely of characters from the given argument. The -- string cannot be empty , so the pattern fails if the current -- character is not one of the characters in Str. function Succeed return Pattern; -- Constructs a pattern that succeeds matching null, both on the first -- attempt, and on any rematch attempt, i.e. it is equivalent to an -- infinite alternation of null strings. function Tab (Count : Natural) return Pattern; function Tab (Count : not null access Natural) return Pattern; function Tab (Count : Natural_Func) return Pattern; -- Constructs a pattern that from the current location until Count -- characters have been matched. The pattern fails if more than Count -- characters have already been matched. --------------------------------- -- Pattern Matching Operations -- --------------------------------- -- The Match function performs an actual pattern matching operation. -- The versions with three parameters perform a match without modifying -- the subject string and return a Boolean result indicating if the -- match is successful or not. The Anchor parameter is set to True to -- obtain an anchored match in which the pattern is required to match -- the first character of the string. In an unanchored match, which is -- the default, successive attempts are made to match the given pattern -- at each character of the subject string until a match succeeds, or -- until all possibilities have failed. -- Note that pattern assignment functions in the pattern may generate -- side effects, so these functions are not necessarily pure. Anchored_Mode : Boolean := False; -- This global variable can be set True to cause all subsequent pattern -- matches to operate in anchored mode. In anchored mode, no attempt is -- made to move the anchor point, so that if the match succeeds it must -- succeed starting at the first character. Note that the effect of -- anchored mode may be achieved in individual pattern matches by using -- Fence or Pos(0) at the start of the pattern. Pattern_Stack_Overflow : exception; -- Exception raised if internal pattern matching stack overflows. This -- is typically the result of runaway pattern recursion. If there is a -- genuine case of stack overflow, then either the match must be broken -- down into simpler steps, or the stack limit must be reset. Stack_Size : constant Positive := 2000; -- Size used for internal pattern matching stack. Increase this size if -- complex patterns cause Pattern_Stack_Overflow to be raised. -- Simple match functions. The subject is matched against the pattern. -- Any immediate or deferred assignments or writes are executed, and -- the returned value indicates whether or not the match succeeded. function Match (Subject : VString; Pat : Pattern) return Boolean; function Match (Subject : VString; Pat : PString) return Boolean; function Match (Subject : String; Pat : Pattern) return Boolean; function Match (Subject : String; Pat : PString) return Boolean; -- Replacement functions. The subject is matched against the pattern. -- Any immediate or deferred assignments or writes are executed, and -- the returned value indicates whether or not the match succeeded. -- If the match succeeds, then the matched part of the subject string -- is replaced by the given Replace string. function Match (Subject : VString_Var; Pat : Pattern; Replace : VString) return Boolean; function Match (Subject : VString_Var; Pat : PString; Replace : VString) return Boolean; function Match (Subject : VString_Var; Pat : Pattern; Replace : String) return Boolean; function Match (Subject : VString_Var; Pat : PString; Replace : String) return Boolean; -- Simple match procedures. The subject is matched against the pattern. -- Any immediate or deferred assignments or writes are executed. No -- indication of success or failure is returned. procedure Match (Subject : VString; Pat : Pattern); procedure Match (Subject : VString; Pat : PString); procedure Match (Subject : String; Pat : Pattern); procedure Match (Subject : String; Pat : PString); -- Replacement procedures. The subject is matched against the pattern. -- Any immediate or deferred assignments or writes are executed. No -- indication of success or failure is returned. If the match succeeds, -- then the matched part of the subject string is replaced by the given -- Replace string. procedure Match (Subject : in out VString; Pat : Pattern; Replace : VString); procedure Match (Subject : in out VString; Pat : PString; Replace : VString); procedure Match (Subject : in out VString; Pat : Pattern; Replace : String); procedure Match (Subject : in out VString; Pat : PString; Replace : String); -- Deferred Replacement type Match_Result is private; -- Type used to record result of pattern match subtype Match_Result_Var is Match_Result; -- This synonyms is used as a formal parameter type to a function where, -- if the language allowed, we would use an in out parameter, but we are -- not allowed to have in out parameters for functions. Instead we pass -- actuals which must be variables, and with a bit of trickery in the -- body, manage to interpret them properly as though they were indeed -- in out parameters. function Match (Subject : VString_Var; Pat : Pattern; Result : Match_Result_Var) return Boolean; procedure Match (Subject : in out VString; Pat : Pattern; Result : out Match_Result); procedure Replace (Result : in out Match_Result; Replace : VString); -- Given a previous call to Match which set Result, performs a pattern -- replacement if the match was successful. Has no effect if the match -- failed. This call should immediately follow the Match call. ------------------------ -- Debugging Routines -- ------------------------ -- Debugging pattern matching operations can often be quite complex, -- since there is no obvious way to trace the progress of the match. -- The declarations in this section provide some debugging assistance. Debug_Mode : Boolean := False; -- This global variable can be set True to generate debugging on all -- subsequent calls to Match. The debugging output is a full trace of -- the actions of the pattern matcher, written to Standard_Output. The -- level of this information is intended to be comprehensible at the -- abstract level of this package declaration. However, note that the -- use of this switch often generates large amounts of output. function "*" (P : Pattern; Fil : File_Access) return Pattern; function "*" (P : PString; Fil : File_Access) return Pattern; function "*" (P : PChar; Fil : File_Access) return Pattern; function "**" (P : Pattern; Fil : File_Access) return Pattern; function "**" (P : PString; Fil : File_Access) return Pattern; function "**" (P : PChar; Fil : File_Access) return Pattern; -- These are similar to the corresponding pattern assignment operations -- except that instead of setting the value of a variable, the matched -- substring is written to the appropriate file. This can be useful in -- following the progress of a match without generating the full amount -- of information obtained by setting Debug_Mode to True. Terminal : constant File_Access := Standard_Error; Output : constant File_Access := Standard_Output; -- Two handy synonyms for use with the above pattern write operations -- Finally we have some routines that are useful for determining what -- patterns are in use, particularly if they are constructed dynamically. function Image (P : Pattern) return String; function Image (P : Pattern) return VString; -- This procedures yield strings that corresponds to the syntax needed -- to create the given pattern using the functions in this package. The -- form of this string is such that it could actually be compiled and -- evaluated to yield the required pattern except for references to -- variables and functions, which are output using one of the following -- forms: -- -- access Natural NP(16#...#) -- access Pattern PP(16#...#) -- access VString VP(16#...#) -- -- Natural_Func NF(16#...#) -- VString_Func VF(16#...#) -- -- where 16#...# is the hex representation of the integer address that -- corresponds to the given access value procedure Dump (P : Pattern); -- This procedure writes information about the pattern to Standard_Out. -- The format of this information is keyed to the internal data structures -- used to implement patterns. The information provided by Dump is thus -- more precise than that yielded by Image, but is also a bit more obscure -- (i.e. it cannot be interpreted solely in terms of this spec, you have -- to know something about the data structures). ------------------ -- Private Part -- ------------------ private type PE; -- Pattern element, a pattern is a complex structure of PE's. This type -- is defined and described in the body of this package. type PE_Ptr is access all PE; -- Pattern reference. PE's use PE_Ptr values to reference other PE's type Pattern is new Controlled with record Stk : Natural := 0; -- Maximum number of stack entries required for matching this -- pattern. See description of pattern history stack in body. P : PE_Ptr := null; -- Pointer to initial pattern element for pattern end record; pragma Finalize_Storage_Only (Pattern); procedure Adjust (Object : in out Pattern); -- Adjust routine used to copy pattern objects procedure Finalize (Object : in out Pattern); -- Finalization routine used to release storage allocated for a pattern type VString_Ptr is access all VString; type Match_Result is record Var : VString_Ptr; -- Pointer to subject string. Set to null if match failed Start : Natural := 1; -- Starting index position (1's origin) of matched section of -- subject string. Only valid if Var is non-null. Stop : Natural := 0; -- Ending index position (1's origin) of matched section of -- subject string. Only valid if Var is non-null. end record; pragma Volatile (Match_Result); -- This ensures that the Result parameter is passed by reference, so -- that we can play our games with the bogus Match_Result_Var parameter -- in the function case to treat it as though it were an in out parameter. end GNAT.Spitbol.Patterns;
47.138047
79
0.61425
4abf59327e7a1001bfe5b7ba13b3e6bcf3497ce3
8,331
ads
Ada
source/league/matreshka-internals-code_point_sets.ads
svn2github/matreshka
9d222b3ad9da508855fb1f5adbe5e8a4fad4c530
[ "BSD-3-Clause" ]
24
2016-11-29T06:59:41.000Z
2021-08-30T11:55:16.000Z
source/league/matreshka-internals-code_point_sets.ads
svn2github/matreshka
9d222b3ad9da508855fb1f5adbe5e8a4fad4c530
[ "BSD-3-Clause" ]
2
2019-01-16T05:15:20.000Z
2019-02-03T10:03:32.000Z
source/league/matreshka-internals-code_point_sets.ads
svn2github/matreshka
9d222b3ad9da508855fb1f5adbe5e8a4fad4c530
[ "BSD-3-Clause" ]
4
2017-07-18T07:11:05.000Z
2020-06-21T03:02:25.000Z
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Localization, Internationalization, Globalization for Ada -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2011, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ -- Internal representation of code point sets. ------------------------------------------------------------------------------ with Matreshka.Atomics.Counters; with Matreshka.Internals.Regexps; with Matreshka.Internals.Unicode.Ucd; with Matreshka.Internals.Unicode.Ucd.Indexes; with League.Characters; package Matreshka.Internals.Code_Point_Sets is pragma Preelaborate; subtype First_Stage_Index is Matreshka.Internals.Unicode.UCD.First_Stage_Index; subtype Second_Stage_Index is Matreshka.Internals.Unicode.Ucd.Second_Stage_Index; type Boolean_Second_Stage is array (Second_Stage_Index) of Boolean; pragma Pack (Boolean_Second_Stage); All_Off : constant Boolean_Second_Stage := (others => False); All_On : constant Boolean_Second_Stage := (others => True); subtype Second_Stage_Array_Index is First_Stage_Index; type Second_Stage_Array is array (Second_Stage_Array_Index range <>) of Boolean_Second_Stage; type First_Stage_Map is array (First_Stage_Index) of Second_Stage_Array_Index; type Shared_Code_Point_Set (Last : Second_Stage_Array_Index) is limited record Counter : aliased Matreshka.Atomics.Counters.Counter; -- Atomic reference counter. First_Stage : First_Stage_Map; Second_Stages : Second_Stage_Array (0 .. Last); end record; function To_Set (Sequence : Wide_Wide_String) return Shared_Code_Point_Set; -- Return set containing all characters from Sequence function To_Set (Low : Matreshka.Internals.Unicode.Code_Point; High : Matreshka.Internals.Unicode.Code_Point) return Shared_Code_Point_Set; type Descriptor_Kinds is (General_Category, Binary); type Code_Point_Set_Descriptor (Kind : Descriptor_Kinds := Binary) is record case Kind is when General_Category => GC_Flags : Matreshka.Internals.Regexps.General_Category_Flags; when Binary => Property : Matreshka.Internals.Unicode.Ucd.Boolean_Properties; end case; end record; subtype Core_Shared_Code_Point_Set is Shared_Code_Point_Set (Last => Matreshka.Internals.Unicode.Ucd.Indexes.Base_Last); function To_Set (Descriptor : Code_Point_Set_Descriptor) return Core_Shared_Code_Point_Set; function Match (Descriptor : Code_Point_Set_Descriptor; Value : Matreshka.Internals.Unicode.Ucd.Core_Values) return Boolean; pragma Inline (Match); function "=" (Left, Right : Shared_Code_Point_Set) return Boolean; function "+" (Right : Shared_Code_Point_Set) return Shared_Code_Point_Set; -- Return the same set of character function "not" (Right : Shared_Code_Point_Set) return Shared_Code_Point_Set; -- Return complementing set of character function "and" (Left, Right : Shared_Code_Point_Set) return Shared_Code_Point_Set; -- Return intersection of Left and Right function "or" (Left, Right : Shared_Code_Point_Set) return Shared_Code_Point_Set; -- Return union of Left and Right function "xor" (Left, Right : Shared_Code_Point_Set) return Shared_Code_Point_Set; function "-" (Left, Right : Shared_Code_Point_Set) return Shared_Code_Point_Set; -- Return difference function Has (Set : Shared_Code_Point_Set; Element : League.Characters.Universal_Character) return Boolean; function Is_Subset (Elements : Shared_Code_Point_Set; Set : Shared_Code_Point_Set) return Boolean; function Is_Empty (Set : Shared_Code_Point_Set) return Boolean; type Shared_Code_Point_Set_Access is access all Shared_Code_Point_Set; Shared_Empty : aliased Shared_Code_Point_Set := (Last => 0, Counter => <>, First_Stage => (others => 0), Second_Stages => (0 => (others => False))); -- Globally defined empty shared code point set to be used as default value -- Reference and Dereference subprograms known about this object and -- never change its reference counter for speed optimization (atomic -- increment/decrement operations have significant perfomance penalty) -- and allows to be used in Preelaborateable_Initialization types. procedure Reference (Self : Shared_Code_Point_Set_Access); pragma Inline (Reference); -- Increment reference counter. Change of reference counter of Shared_Empty -- object is prevented to provide speedup and to allow to use it to -- initialize components of Preelaborateable_Initialization types. procedure Dereference (Self : in out Shared_Code_Point_Set_Access); -- Decrement reference counter and free resources if it reach zero value. -- Self is setted to null. Decrement of reference counter and deallocation -- of Shared_Empty object is prevented to provide minor speedup and to -- allow use it to initialize components of Preelaborateable_Initialization -- types. end Matreshka.Internals.Code_Point_Sets;
43.617801
79
0.592606
39d83236b8def5124eafc912592fc5f1e7334cce
1,180
ads
Ada
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/loop_optimization2.ads
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
7
2020-05-02T17:34:05.000Z
2021-10-17T10:15:18.000Z
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/loop_optimization2.ads
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
null
null
null
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/loop_optimization2.ads
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
2
2020-07-27T00:22:36.000Z
2021-04-01T09:41:02.000Z
with System; package Loop_Optimization2 is type Prim_Ptr is access procedure; type Address_Array is array (Positive range <>) of Prim_Ptr; subtype Dispatch_Table is Address_Array (1 .. 1); type Tag is access all Dispatch_Table; type Tag_Array is array (Positive range <>) of Tag; function Interface_Ancestor_Tags (T : Tag) return Tag_Array; type Interface_Data_Element is record Iface_Tag : Tag; end record; type Interfaces_Array is array (Natural range <>) of Interface_Data_Element; type Interface_Data (Nb_Ifaces : Positive) is record Ifaces_Table : Interfaces_Array (1 .. Nb_Ifaces); end record; type Interface_Data_Ptr is access all Interface_Data; type Type_Specific_Data (Idepth : Natural) is record Interfaces_Table : Interface_Data_Ptr; end record; type Type_Specific_Data_Ptr is access all Type_Specific_Data; pragma No_Strict_Aliasing (Type_Specific_Data_Ptr); subtype Predef_Prims_Table is Address_Array (1 .. 16); type Predef_Prims_Table_Ptr is access Predef_Prims_Table; type Addr_Ptr is access System.Address; pragma No_Strict_Aliasing (Addr_Ptr); end Loop_Optimization2;
28.095238
79
0.757627
0e4aed083468ccba5973235ea83f5eec6930f13a
2,464
adb
Ada
bb-runtimes/examples/pause/pause.adb
JCGobbi/Nucleo-STM32F334R8
2a0b1b4b2664c92773703ac5e95dcb71979d051c
[ "BSD-3-Clause" ]
null
null
null
bb-runtimes/examples/pause/pause.adb
JCGobbi/Nucleo-STM32F334R8
2a0b1b4b2664c92773703ac5e95dcb71979d051c
[ "BSD-3-Clause" ]
null
null
null
bb-runtimes/examples/pause/pause.adb
JCGobbi/Nucleo-STM32F334R8
2a0b1b4b2664c92773703ac5e95dcb71979d051c
[ "BSD-3-Clause" ]
null
null
null
------------------------------------------------------------------------------ -- -- -- GNAT EXAMPLE -- -- -- -- Copyright (C) 2010, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 2, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT 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 distributed with GNAT; see file COPYING. If not, write -- -- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, -- -- Boston, MA 02110-1301, 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. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ with Ada.Text_IO; use Ada.Text_IO; with Ada.Real_Time; use Ada.Real_Time; procedure Pause is begin Put_Line ("Start of test"); Put_Line ("Waiting for 1 sec"); delay until Clock + Milliseconds (1_000); Put_Line ("End of test"); end Pause;
61.6
78
0.470373
101217e669eb439dceb8492ee19d0349e106ec69
5,426
adb
Ada
src/gen-artifacts-mappings.adb
Letractively/ada-gen
d06d03821057f9177f2350e32dd09e467df08612
[ "Apache-2.0" ]
null
null
null
src/gen-artifacts-mappings.adb
Letractively/ada-gen
d06d03821057f9177f2350e32dd09e467df08612
[ "Apache-2.0" ]
null
null
null
src/gen-artifacts-mappings.adb
Letractively/ada-gen
d06d03821057f9177f2350e32dd09e467df08612
[ "Apache-2.0" ]
null
null
null
----------------------------------------------------------------------- -- gen-artifacts-mappings -- Type mapping artifact for Code Generator -- Copyright (C) 2011, 2012 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Ada.Strings.Unbounded; with Util.Log.Loggers; with Gen.Utils; with Gen.Model; with Gen.Model.Mappings; -- The <b>Gen.Artifacts.Mappings</b> package is an artifact to map XML-based types -- into Ada types. package body Gen.Artifacts.Mappings is use type DOM.Core.Node; use Util.Log; Log : constant Loggers.Logger := Loggers.Create ("Gen.Artifacts.Query"); -- ------------------------------ -- Mappings artifact -- ------------------------------ -- After the configuration file is read, processes the node whose root -- is passed in <b>Node</b> and initializes the <b>Model</b> with the information. overriding procedure Initialize (Handler : in out Artifact; Path : in String; Node : in DOM.Core.Node; Model : in out Gen.Model.Packages.Model_Definition'Class; Context : in out Generator'Class) is use Ada.Strings.Unbounded; procedure Register_Mapping (O : in out Gen.Model.Packages.Model_Definition; Node : in DOM.Core.Node); procedure Register_Mappings (Model : in out Gen.Model.Packages.Model_Definition; Node : in DOM.Core.Node); -- ------------------------------ -- Register a new type mapping. -- ------------------------------ procedure Register_Mapping (O : in out Gen.Model.Packages.Model_Definition; Node : in DOM.Core.Node) is procedure Register_Type (O : in out Gen.Model.Packages.Model_Definition; Node : in DOM.Core.Node); N : constant DOM.Core.Node := Gen.Utils.Get_Child (Node, "to"); To : constant String := Gen.Utils.Get_Data_Content (N); Kind : constant String := To_String (Gen.Utils.Get_Attribute (Node, "type")); Kind_Type : Gen.Model.Mappings.Basic_Type; procedure Register_Type (O : in out Gen.Model.Packages.Model_Definition; Node : in DOM.Core.Node) is pragma Unreferenced (O); From : constant String := Gen.Utils.Get_Data_Content (Node); begin Gen.Model.Mappings.Register_Type (Target => To, From => From, Kind => Kind_Type); end Register_Type; procedure Iterate is new Gen.Utils.Iterate_Nodes (T => Gen.Model.Packages.Model_Definition, Process => Register_Type); begin if Kind = "date" or To = "Ada.Calendar.Time" then Kind_Type := Gen.Model.Mappings.T_DATE; elsif Kind = "identifier" or To = "ADO.Identifier" then Kind_Type := Gen.Model.Mappings.T_IDENTIFIER; elsif Kind = "boolean" then Kind_Type := Gen.Model.Mappings.T_BOOLEAN; elsif Kind = "string" or To = "Ada.Strings.Unbounded.Unbounded_String" then Kind_Type := Gen.Model.Mappings.T_STRING; elsif Kind = "blob" or To = "ADO.Blob_Ref" then Kind_Type := Gen.Model.Mappings.T_BLOB; else Kind_Type := Gen.Model.Mappings.T_INTEGER; end if; Iterate (O, Node, "from"); end Register_Mapping; -- ------------------------------ -- Register a model mapping -- ------------------------------ procedure Register_Mappings (Model : in out Gen.Model.Packages.Model_Definition; Node : in DOM.Core.Node) is procedure Iterate is new Gen.Utils.Iterate_Nodes (T => Gen.Model.Packages.Model_Definition, Process => Register_Mapping); Name : constant String := Gen.Utils.Get_Attribute (Node, "name"); begin Gen.Model.Mappings.Set_Mapping_Name (Name); Iterate (Model, Node, "mapping"); end Register_Mappings; procedure Iterate is new Gen.Utils.Iterate_Nodes (T => Gen.Model.Packages.Model_Definition, Process => Register_Mappings); begin Log.Debug ("Initializing mapping artifact for the configuration"); Gen.Artifacts.Artifact (Handler).Initialize (Path, Node, Model, Context); Iterate (Gen.Model.Packages.Model_Definition (Model), Node, "mappings"); end Initialize; end Gen.Artifacts.Mappings;
40.796992
97
0.560818
20be91c24c9de2c1deb7d1103cbe7fac2d701321
24,533
adb
Ada
demo/src/stm32f4-dma.adb
e3l6/SSMDev
2929757aab3842aefd84debb2d7c3e8b28c2b340
[ "MIT" ]
null
null
null
demo/src/stm32f4-dma.adb
e3l6/SSMDev
2929757aab3842aefd84debb2d7c3e8b28c2b340
[ "MIT" ]
null
null
null
demo/src/stm32f4-dma.adb
e3l6/SSMDev
2929757aab3842aefd84debb2d7c3e8b28c2b340
[ "MIT" ]
null
null
null
------------------------------------------------------------------------------ -- -- -- GNAT EXAMPLE -- -- -- -- Copyright (C) 2014, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ with Ada.Unchecked_Conversion; with System.Storage_Elements; package body STM32F4.DMA is ------------ -- Enable -- ------------ procedure Enable (Unit : in out DMA_Controller; Stream : DMA_Stream_Selector) is Temp : Stream_Config_Register; -- this register requires 32-bit accesses, hence the temporary begin Temp := Unit.Streams (Stream).CR; Temp.Stream_Enabled := True; Unit.Streams (Stream).CR := Temp; end Enable; ------------- -- Enabled -- ------------- function Enabled (Unit : DMA_Controller; Stream : DMA_Stream_Selector) return Boolean is Temp : Stream_Config_Register; -- this register requires 32-bit accesses, hence the temporary begin Temp := Unit.Streams (Stream).CR; return Temp.Stream_Enabled; end Enabled; ------------- -- Disable -- ------------- procedure Disable (Unit : in out DMA_Controller; Stream : DMA_Stream_Selector) is Temp : Stream_Config_Register; -- this register requires 32-bit accesses, hence the temporary begin Temp := Unit.Streams (Stream).CR; Temp.Stream_Enabled := False; Unit.Streams (Stream).CR := Temp; -- the STMicro Reference Manual RM0090, Doc Id 018909 Rev 6, pg 319, step -- 1 says we must await the bit actually clearing, to confirm no ongoing -- operation remains active loop Temp := Unit.Streams (Stream).CR; exit when not Temp.Stream_Enabled; end loop; end Disable; --------------------------- -- Set_Interrupt_Enabler -- --------------------------- procedure Set_Interrupt_Enabler (This_Stream : in out DMA_Stream; Source : DMA_Interrupt; Value : Boolean) is begin if Source = FIFO_Error_Interrupt then -- use the FCR declare Temp : FIFO_Control_Register; begin Temp := This_Stream.FCR; Temp.FIFO_Interrupt_Enabled := Value; This_Stream.FCR := Temp; end; else -- use the CR declare Temp : Stream_Config_Register; begin Temp := This_Stream.CR; case Source is when Direct_Mode_Error_Interrupt => Temp.DMEI_Enabled := Value; when Transfer_Error_Interrupt => Temp.TEI_Enabled := Value; when Half_Transfer_Complete_Interrupt => Temp.HTI_Enabled := Value; when Transfer_Complete_Interrupt => Temp.TCI_Enabled := Value; when FIFO_Error_Interrupt => -- not possible since we've already checked for it above null; end case; This_Stream.CR := Temp; end; end if; end Set_Interrupt_Enabler; ---------------------- -- Enable_Interrupt -- ---------------------- procedure Enable_Interrupt (Unit : in out DMA_Controller; Stream : DMA_Stream_Selector; Source : DMA_Interrupt) is begin Set_Interrupt_Enabler (Unit.Streams (Stream), Source, True); end Enable_Interrupt; ----------------------- -- Disable_Interrupt -- ----------------------- procedure Disable_Interrupt (Unit : in out DMA_Controller; Stream : DMA_Stream_Selector; Source : DMA_Interrupt) is begin Set_Interrupt_Enabler (Unit.Streams (Stream), Source, False); end Disable_Interrupt; ----------------------- -- Interrupt_Enabled -- ----------------------- function Interrupt_Enabled (Unit : DMA_Controller; Stream : DMA_Stream_Selector; Source : DMA_Interrupt) return Boolean is Result : Boolean; This_Stream : DMA_Stream renames Unit.Streams (Stream); -- this is a bit heavy, considering it will be called from interrupt -- handlers. -- TODO: consider a much lower level implementation, based on bit-masks. begin if Source = FIFO_Error_Interrupt then -- use the FCR declare Temp : FIFO_Control_Register; begin Temp := This_Stream.FCR; Result := Temp.FIFO_Interrupt_Enabled; end; else -- use the CR declare Temp : Stream_Config_Register; begin Temp := This_Stream.CR; case Source is when Direct_Mode_Error_Interrupt => Result := Temp.DMEI_Enabled; when Transfer_Error_Interrupt => Result := Temp.TEI_Enabled; when Half_Transfer_Complete_Interrupt => Result := Temp.HTI_Enabled; when Transfer_Complete_Interrupt => Result := Temp.TCI_Enabled; when FIFO_Error_Interrupt => -- not possible since we've already checked for it above null; end case; end; end if; return Result; end Interrupt_Enabled; -------------------- -- Start_Transfer -- -------------------- procedure Start_Transfer (Unit : in out DMA_Controller; Stream : DMA_Stream_Selector; Source : Address; Destination : Address; Data_Count : Half_Word) is begin Disable (Unit, Stream); -- per the RM, eg section 10.5.6 for the NDTR Configure_Data_Flow (Unit, Stream, Source => Source, Destination => Destination, Data_Count => Data_Count); Enable (Unit, Stream); end Start_Transfer; ------------------------------------ -- Start_Transfer_with_Interrupts -- ------------------------------------ procedure Start_Transfer_With_Interrupts (Unit : in out DMA_Controller; Stream : DMA_Stream_Selector; Source : Address; Destination : Address; Data_Count : Half_Word; Enabled_Interrupts : Interrupt_Selections := (others => True)) is begin Disable (Unit, Stream); -- per the RM, eg section 10.5.6 for the NDTR Configure_Data_Flow (Unit, Stream, Source => Source, Destination => Destination, Data_Count => Data_Count); for Selected_Interrupt in Enabled_Interrupts'Range loop if Enabled_Interrupts (Selected_Interrupt) then Enable_Interrupt (Unit, Stream, Selected_Interrupt); end if; end loop; Enable (Unit, Stream); end Start_Transfer_with_Interrupts; ------------------------- -- Configure_Data_Flow -- ------------------------- procedure Configure_Data_Flow (Unit : in out DMA_Controller; Stream : DMA_Stream_Selector; Source : Address; Destination : Address; Data_Count : Half_Word) is This_Stream : DMA_Stream renames Unit.Streams (Stream); Temp : Stream_Config_Register; begin This_Stream.NDTR := Word (Data_Count); Temp := This_Stream.CR; if Temp.Direction = Memory_To_Peripheral then This_Stream.PAR := Destination; This_Stream.M0AR := Source; else This_Stream.PAR := Source; This_Stream.M0AR := Destination; end if; end Configure_Data_Flow; -------------------- -- Abort_Transfer -- -------------------- procedure Abort_Transfer (Unit : in out DMA_Controller; Stream : DMA_Stream_Selector; Result : out DMA_Error_Code) is Max_Abort_Time : constant Time_Span := Seconds (1); Timeout : Time; This_Stream : DMA_Stream renames Unit.Streams (Stream); Temp : Stream_Config_Register; begin Disable (Unit, Stream); Timeout := Clock + Max_Abort_Time; loop Temp := This_Stream.CR; -- we need 32-bit accesses exit when not Temp.Stream_Enabled; if Clock > Timeout then Result := DMA_Timeout_Error; return; end if; end loop; Result := DMA_No_Error; end Abort_Transfer; ------------------------- -- Poll_For_Completion -- ------------------------- procedure Poll_For_Completion (Unit : in out DMA_Controller; Stream : DMA_Stream_Selector; Expected_Level : DMA_Transfer_Level; Timeout : Time_Span; Result : out DMA_Error_Code) is Deadline : constant Time := Clock + Timeout; begin Result := DMA_No_Error; -- initially anyway Polling : loop if Expected_Level = Full_Transfer then exit when Status (Unit, Stream, Transfer_Complete_Indicated); else exit when Status (Unit, Stream, Half_Transfer_Complete_Indicated); end if; if Status (Unit, Stream, Transfer_Error_Indicated) or Status (Unit, Stream, FIFO_Error_Indicated) or Status (Unit, Stream, Direct_Mode_Error_Indicated) then Clear_Status (Unit, Stream, Transfer_Error_Indicated); Clear_Status (Unit, Stream, FIFO_Error_Indicated); Clear_Status (Unit, Stream, Direct_Mode_Error_Indicated); Result := DMA_Device_Error; return; end if; if Clock > Deadline then Result := DMA_Timeout_Error; return; end if; end loop Polling; Clear_Status (Unit, Stream, Half_Transfer_Complete_Indicated); if Expected_Level = Full_Transfer then Clear_Status (Unit, Stream, Transfer_Complete_Indicated); else Clear_Status (Unit, Stream, Half_Transfer_Complete_Indicated); end if; end Poll_For_Completion; ------------------ -- Clear_Status -- ------------------ procedure Clear_Status (Unit : in out DMA_Controller; Stream : DMA_Stream_Selector; Flag : DMA_Status_Flag) is Group : constant Stream_Group := DMA_Stream_Selector'Pos (Stream) mod 4; Bit : constant Bit_Numbers := Status_Flag_Bits (Flag) (Group); Mask : constant Word := Shift_Left (1, Integer (Bit)); Temp : Word; begin if Stream < Stream_4 then Temp := Unit.LIFCR; Temp := Temp or Mask; -- yes, 1, because this is the CLEAR register Unit.LIFCR := Temp; else Temp := Unit.HIFCR; Temp := Temp or Mask; -- yes, 1, because this is the CLEAR register Unit.HIFCR := Temp; end if; end Clear_Status; ---------------------- -- Clear_All_Status -- ---------------------- procedure Clear_All_Status (Unit : in out DMA_Controller; Stream : DMA_Stream_Selector) is Group : constant Stream_Group := DMA_Stream_Selector'Pos (Stream) mod 4; Temp : Word; begin if Stream < Stream_4 then Temp := Unit.LIFCR; else Temp := Unit.HIFCR; end if; for Flag in DMA_Status_Flag loop declare Bit : constant Bit_Numbers := Status_Flag_Bits (Flag) (Group); Mask : constant Word := Shift_Left (1, Integer (Bit)); begin Temp := Temp or Mask; end; end loop; if Stream < Stream_4 then Unit.LIFCR := Temp; else Unit.HIFCR := Temp; end if; end Clear_All_Status; ------------ -- Status -- ------------ function Status (Unit : DMA_Controller; Stream : DMA_Stream_Selector; Flag : DMA_Status_Flag) return Boolean is Group : constant Stream_Group := DMA_Stream_Selector'Pos (Stream) mod 4; Bit : constant Bit_Numbers := Status_Flag_Bits (Flag) (Group); Mask : constant Word := Shift_Left (1, Integer (Bit)); Temp : Word; begin if Stream < Stream_4 then Temp := Unit.LISR; else Temp := Unit.HISR; end if; return (Temp and Mask) = Mask; end Status; ----------------- -- Set_Counter -- ----------------- procedure Set_Counter (Unit : in out DMA_Controller; Stream : DMA_Stream_Selector; Data_Count : Half_Word) is This_Stream : DMA_Stream renames Unit.Streams (Stream); begin This_Stream.NDTR := Word (Data_Count); end Set_Counter; --------------------- -- Current_Counter -- --------------------- function Current_Counter (Unit : DMA_Controller; Stream : DMA_Stream_Selector) return Half_Word is This_Stream : DMA_Stream renames Unit.Streams (Stream); begin return Half_Word (This_Stream.NDTR); end Current_Counter; --------------------- -- Double_Buffered -- --------------------- function Double_Buffered (Unit : DMA_Controller; Stream : DMA_Stream_Selector) return Boolean is CR : constant Stream_Config_Register := Unit.Streams (Stream).CR; begin return CR.Double_Buffered; end Double_Buffered; ------------------- -- Circular_Mode -- ------------------- function Circular_Mode (Unit : DMA_Controller; Stream : DMA_Stream_Selector) return Boolean is CR : constant Stream_Config_Register := Unit.Streams (Stream).CR; begin return CR.Circular_Mode; end Circular_Mode; --------------- -- Configure -- --------------- procedure Configure (Unit : in out DMA_Controller; Stream : DMA_Stream_Selector; Config : DMA_Stream_Configuration) is -- see HAL_DMA_Init in STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_dma.h This_Stream : DMA_Stream renames Unit.Streams (Stream); begin -- the STMicro Reference Manual RM0090, Doc Id 018909 Rev 6, pg 319 says -- we must disable the stream before configuring it Disable (Unit, Stream); declare Temp : Stream_Config_Register := This_Stream.CR; begin Temp.Current_Target := Memory_Buffer_0; Temp.Channel := Config.Channel; Temp.Direction := Config.Direction; Temp.P_Inc_Mode := Config.Increment_Peripheral_Address; Temp.M_Inc_Mode := Config.Increment_Memory_Address; Temp.P_Data_Size := Config.Peripheral_Data_Format; Temp.M_Data_Size := Config.Memory_Data_Format; Temp.Priority := Config.Priority; case Config.Operation_Mode is when Normal_Mode => Temp.Circular_Mode := False; Temp.P_Flow_Controller := False; when Peripheral_Flow_Control_Mode => Temp.Circular_Mode := False; Temp.P_Flow_Controller := True; when Circular_Mode => Temp.Circular_Mode := True; Temp.P_Flow_Controller := False; end case; -- the memory burst and peripheral burst values are only used when -- the FIFO is enabled if Config.FIFO_Enabled then Temp.M_Burst := Config.Memory_Burst_Size; Temp.P_Burst := Config.Peripheral_Burst_Size; else Temp.M_Burst := Memory_Burst_Single; Temp.P_Burst := Peripheral_Burst_Single; end if; This_Stream.CR := Temp; end; declare Temp : FIFO_Control_Register := This_Stream.FCR; begin Temp.Direct_Mode_Enabled := not Config.FIFO_Enabled; if Config.FIFO_Enabled then Temp.FIFO_Threshold := Config.FIFO_Threshold; else Temp.FIFO_Threshold := FIFO_Threshold_1_Quart_Full_Configuration; -- 0, default end if; This_Stream.FCR := Temp; end; end Configure; ----------- -- Reset -- ----------- procedure Reset (Unit : in out DMA_Controller; Stream : DMA_Stream_Selector) is This_Stream : DMA_Stream renames Unit.Streams (Stream); function As_Stream_Config_Register is new Ada.Unchecked_Conversion (Source => Word, Target => Stream_Config_Register); function As_FIFO_Control_Register is new Ada.Unchecked_Conversion (Source => Word, Target => FIFO_Control_Register); begin Disable (Unit, Stream); This_Stream.CR := As_Stream_Config_Register (0); This_Stream.NDTR := 0; This_Stream.PAR := System.Null_Address; This_Stream.M0AR := System.Null_Address; This_Stream.M1AR := System.Null_Address; -- Clear the FIFO control register bits except sets bit 5 to show FIFO -- is empty and bit 0 to set threshold selection to 1/2 full (???) This_Stream.FCR := As_FIFO_Control_Register (2#100001#); Clear_All_Status (Unit, Stream); end Reset; --------------------------- -- Peripheral_Data_Width -- --------------------------- function Peripheral_Data_Width (Unit : DMA_Controller; Stream : DMA_Stream_Selector) return DMA_Data_Transfer_Widths is Current : constant Stream_Config_Register := Unit.Streams (Stream).CR; begin return Current.P_Data_Size; end Peripheral_Data_Width; ----------------------- -- Memory_Data_Width -- ----------------------- function Memory_Data_Width (Unit : DMA_Controller; Stream : DMA_Stream_Selector) return DMA_Data_Transfer_Widths is Current : constant Stream_Config_Register := Unit.Streams (Stream).CR; begin return Current.M_Data_Size; end Memory_Data_Width; ------------------------ -- Transfer_Direction -- ------------------------ function Transfer_Direction (Unit : DMA_Controller; Stream : DMA_Stream_Selector) return DMA_Data_Transfer_Direction is Current : constant Stream_Config_Register := Unit.Streams (Stream).CR; begin return Current.Direction; end Transfer_Direction; -------------------- -- Operating_Mode -- -------------------- function Operating_Mode (Unit : DMA_Controller; Stream : DMA_Stream_Selector) return DMA_Mode is Current : constant Stream_Config_Register := Unit.Streams (Stream).CR; begin if Current.P_Flow_Controller then return Peripheral_Flow_Control_Mode; elsif Current.Circular_Mode then return Circular_Mode; end if; return Normal_Mode; end Operating_Mode; -------------- -- Priority -- -------------- function Priority (Unit : DMA_Controller; Stream : DMA_Stream_Selector) return DMA_Priority_Level is Current : constant Stream_Config_Register := Unit.Streams (Stream).CR; begin return Current.Priority; end Priority; --------------------------- -- Current_Memory_Buffer -- --------------------------- function Current_Memory_Buffer (Unit : DMA_Controller; Stream : DMA_Stream_Selector) return Memory_Buffer_Target is CR : constant Stream_Config_Register := Unit.Streams (Stream).CR; begin return CR.Current_Target; end Current_Memory_Buffer; ----------------------- -- Set_Memory_Buffer -- ----------------------- procedure Set_Memory_Buffer (Unit : in out DMA_Controller; Stream : DMA_Stream_Selector; Buffer : Memory_Buffer_Target; To : System.Address) is This_Stream : DMA_Stream renames Unit.Streams (Stream); begin case Buffer is when Memory_Buffer_0 => This_Stream.M0AR := To; when Memory_Buffer_1 => This_Stream.M1AR := To; end case; end Set_Memory_Buffer; ---------------------------------- -- Select_Current_Memory_Buffer -- ---------------------------------- procedure Select_Current_Memory_Buffer (Unit : in out DMA_Controller; Stream : DMA_Stream_Selector; Buffer : Memory_Buffer_Target) is Temp_CR : Stream_Config_Register := Unit.Streams (Stream).CR; begin Temp_CR.Current_Target := Buffer; Unit.Streams (Stream).CR := Temp_CR; end Select_Current_Memory_Buffer; ------------------------------------ -- Configure_Double_Buffered_Mode -- ------------------------------------ procedure Configure_Double_Buffered_Mode (Unit : in out DMA_Controller; Stream : DMA_Stream_Selector; Buffer_0_Value : Address; Buffer_1_Value : Address; First_Buffer_Used : Memory_Buffer_Target) is This_Stream : DMA_Stream renames Unit.Streams (Stream); Temp_CR : Stream_Config_Register := This_Stream.CR; begin This_Stream.M0AR := Buffer_0_Value; This_Stream.M1AR := Buffer_1_Value; Temp_CR.Current_Target := First_Buffer_Used; Unit.Streams (Stream).CR := Temp_CR; end Configure_Double_Buffered_Mode; --------------------------------- -- Enable_Double_Buffered_Mode -- --------------------------------- procedure Enable_Double_Buffered_Mode (Unit : in out DMA_Controller; Stream : DMA_Stream_Selector) is Temp_CR : Stream_Config_Register := Unit.Streams (Stream).CR; begin Temp_CR.Double_Buffered := True; Unit.Streams (Stream).CR := Temp_CR; end Enable_Double_Buffered_Mode; ---------------------------------- -- Disable_Double_Buffered_Mode -- ---------------------------------- procedure Disable_Double_Buffered_Mode (Unit : in out DMA_Controller; Stream : DMA_Stream_Selector)is Temp_CR : Stream_Config_Register := Unit.Streams (Stream).CR; begin Temp_CR.Double_Buffered := False; Unit.Streams (Stream).CR := Temp_CR; end Disable_Double_Buffered_Mode; ---------------------- -- Selected_Channel -- ---------------------- function Selected_Channel (Unit : DMA_Controller; Stream : DMA_Stream_Selector) return DMA_Channel_Selector is Current : constant Stream_Config_Register := Unit.Streams (Stream).CR; begin return Current.Channel; end Selected_Channel; ------------- -- Aligned -- ------------- function Aligned (This : Address; Width : DMA_Data_Transfer_Widths) return Boolean is use System.Storage_Elements; begin case Width is when Words => return To_Integer (This) mod 4 = 0; when HalfWords => return To_Integer (This) mod 2 = 0; when Bytes => return True; end case; end Aligned; end STM32F4.DMA;
31.172808
91
0.563527
200b013814c105c035fea34dcd06e611f057821f
936
adb
Ada
opengl-vertex.adb
io7m/coreland-opengl-ada
31760853a42fcba1e37513e0521548592817c7f2
[ "0BSD" ]
1
2017-10-07T05:53:51.000Z
2017-10-07T05:53:51.000Z
opengl-vertex.adb
io7m/coreland-opengl-ada
31760853a42fcba1e37513e0521548592817c7f2
[ "0BSD" ]
null
null
null
opengl-vertex.adb
io7m/coreland-opengl-ada
31760853a42fcba1e37513e0521548592817c7f2
[ "0BSD" ]
null
null
null
package body OpenGL.Vertex is -- -- Immediate mode. -- function Primitive_Type_To_Constant (Mode : in Primitive_Type_t) return Thin.Enumeration_t is begin case Mode is when Points => return Thin.GL_POINTS; when Lines => return Thin.GL_LINES; when Line_Strip => return Thin.GL_LINE_STRIP; when Line_Loop => return Thin.GL_LINE_LOOP; when Triangles => return Thin.GL_TRIANGLES; when Triangle_Strip => return Thin.GL_TRIANGLE_STRIP; when Triangle_Fan => return Thin.GL_TRIANGLE_FAN; when Quads => return Thin.GL_QUADS; when Quad_Strip => return Thin.GL_QUAD_STRIP; when Polygon => return Thin.GL_POLYGON; end case; end Primitive_Type_To_Constant; procedure GL_Begin (Mode : in Primitive_Type_t) is begin Thin.GL_Begin (Primitive_Type_To_Constant (Mode)); end GL_Begin; end OpenGL.Vertex;
31.2
61
0.67094
3933175cdd634d39f954da4d5fba0811a5036456
1,117
ads
Ada
applet/aide/source/editors/aide-editor-of_fixed_type.ads
charlie5/aIDE
fab406dbcd9b72a4cb215ffebb05166c788d6365
[ "MIT" ]
3
2017-04-29T14:25:22.000Z
2017-09-29T10:15:28.000Z
applet/aide/source/editors/aide-editor-of_fixed_type.ads
charlie5/aIDE
fab406dbcd9b72a4cb215ffebb05166c788d6365
[ "MIT" ]
null
null
null
applet/aide/source/editors/aide-editor-of_fixed_type.ads
charlie5/aIDE
fab406dbcd9b72a4cb215ffebb05166c788d6365
[ "MIT" ]
null
null
null
with AdaM.a_Type.ordinary_fixed_point_type, gtk.Widget; private with gtk.gEntry, gtk.Box, gtk.Label, gtk.Spin_Button, gtk.Button; package aIDE.Editor.of_fixed_type is type Item is new Editor.item with private; type View is access all Item'Class; package Forge is function to_Editor (the_Target : in AdaM.a_Type.ordinary_fixed_point_type.view) return View; end Forge; overriding function top_Widget (Self : in Item) return gtk.Widget.Gtk_Widget; private use gtk.Button, gtk.gEntry, gtk.Spin_Button, gtk.Label, gtk.Box; type Item is new Editor.item with record Target : AdaM.a_Type.ordinary_fixed_point_type.view; top_Box : gtk_Box; name_Entry : Gtk_Entry; delta_Entry : Gtk_Entry; first_Entry : Gtk_Entry; last_Entry : Gtk_Entry; rid_Button : gtk_Button; end record; overriding procedure freshen (Self : in out Item); end aIDE.Editor.of_fixed_type;
19.596491
98
0.610564
1c14a1bd520fb4a3a865364cf503759472cc4b32
729
adb
Ada
problem/src/stack.adb
AdaCore/tictactoe
6ef01ac2121040a1b3ed46288472504afe7c51ca
[ "BSD-3-Clause" ]
3
2017-08-05T17:02:59.000Z
2021-09-02T02:24:58.000Z
solution/src/stack.adb
DevCKano/tictactoe
6ef01ac2121040a1b3ed46288472504afe7c51ca
[ "BSD-3-Clause" ]
null
null
null
solution/src/stack.adb
DevCKano/tictactoe
6ef01ac2121040a1b3ed46288472504afe7c51ca
[ "BSD-3-Clause" ]
4
2018-05-13T03:54:59.000Z
2020-12-14T15:42:56.000Z
package body Stack with SPARK_Mode => On is Tab : array (1 .. Max_Size) of Board := (others => (others => (others => Empty))); -- The stack. We push and pop pointers to Values. ----------- -- Clear -- ----------- procedure Clear is begin Last := Tab'First - 1; end Clear; ---------- -- Push -- ---------- procedure Push (V : Board) is begin Last := Last + 1; Tab (Last) := V; end Push; --------- -- Pop -- --------- procedure Pop (V : out Board) is begin V := Tab (Last); Last := Last - 1; end Pop; --------- -- Top -- --------- function Top return Board is begin return Tab (Last); end Top; end Stack;
15.510638
86
0.454047
cb3a50c76688ca6337450d766bb9605482e96434
7,191
adb
Ada
source/base/incr-nodes-joints.adb
reznikmm/increment
0edff267d468f005f28b5d2c0c0fe23f4ff3164c
[ "MIT" ]
5
2017-10-20T08:40:59.000Z
2021-05-15T16:55:39.000Z
source/base/incr-nodes-joints.adb
reznikmm/increment
0edff267d468f005f28b5d2c0c0fe23f4ff3164c
[ "MIT" ]
null
null
null
source/base/incr-nodes-joints.adb
reznikmm/increment
0edff267d468f005f28b5d2c0c0fe23f4ff3164c
[ "MIT" ]
null
null
null
-- Copyright (c) 2015-2017 Maxim Reznik <[email protected]> -- -- SPDX-License-Identifier: MIT -- License-Filename: LICENSE ------------------------------------------------------------- package body Incr.Nodes.Joints is ------------------ -- Constructors -- ------------------ package body Constructors is ---------------- -- Initialize -- ---------------- procedure Initialize (Self : aliased out Joint'Class; Kind : Node_Kind; Children : Node_Array) is Now : constant Version_Trees.Version := Self.Document.History.Changing; Diff : Integer := 0; begin Self.Kind := Kind; Nodes.Constructors.Initialize (Self); Versioned_Booleans.Initialize (Self.NC, False); Versioned_Booleans.Initialize (Self.NE, False); Versioned_Booleans.Set (Self.Exist, True, Now, Diff); for J in Children'Range loop Versioned_Nodes.Initialize (Self.Kids (J), null); Versioned_Nodes.Set (Self.Kids (J), Children (J), Now, Diff); if Children (J) /= null then Children (J).Set_Parent (Self'Unchecked_Access); end if; end loop; Self.Update_Local_Changes (Diff); end Initialize; ------------------------ -- Initialize_Ancient -- ------------------------ procedure Initialize_Ancient (Self : out Joint'Class; Parent : Node_Access) is begin Nodes.Constructors.Initialize_Ancient (Self, Parent); Versioned_Booleans.Initialize (Self.NC, False); Versioned_Booleans.Initialize (Self.NE, False); end Initialize_Ancient; end Constructors; ----------- -- Arity -- ----------- overriding function Arity (Self : Joint) return Natural is begin return Self.Arity; end Arity; ----------- -- Child -- ----------- overriding function Child (Self : Joint; Index : Positive; Time : Version_Trees.Version) return Node_Access is begin return Versioned_Nodes.Get (Self.Kids (Index), Time); end Child; ------------- -- Discard -- ------------- overriding procedure Discard (Self : in out Joint) is Now : constant Version_Trees.Version := Self.Document.History.Changing; Diff : Integer := 0; begin Versioned_Booleans.Discard (Self.Exist, Now, Diff); for J in Self.Kids'Range loop Versioned_Nodes.Discard (Self.Kids (J), Now, Diff); Self.Child (J, Now).Discard_Parent; end loop; Self.Update_Local_Changes (Diff); end Discard; -------------- -- Is_Token -- -------------- overriding function Is_Token (Self : Joint) return Boolean is pragma Unreferenced (Self); begin return False; end Is_Token; ---------- -- Kind -- ---------- overriding function Kind (Self : Joint) return Node_Kind is begin return Self.Kind; end Kind; -------------------- -- Nested_Changes -- -------------------- overriding function Nested_Changes (Self : Joint; From : Version_Trees.Version; To : Version_Trees.Version) return Boolean is use type Version_Trees.Version; Time : Version_Trees.Version := To; begin if Self.Document.History.Is_Changing (To) then if Self.Nested_Changes > 0 then return True; elsif Time = From then return False; end if; Time := Self.Document.History.Parent (Time); end if; while Time /= From loop if Versioned_Booleans.Get (Self.NC, Time) then return True; end if; Time := Self.Document.History.Parent (Time); end loop; return False; end Nested_Changes; ------------------- -- Nested_Errors -- ------------------- overriding function Nested_Errors (Self : Joint; Time : Version_Trees.Version) return Boolean is begin return Versioned_Booleans.Get (Self.NE, Time); end Nested_Errors; --------------- -- On_Commit -- --------------- overriding procedure On_Commit (Self : in out Joint; Parent : Node_Access) is Now : constant Version_Trees.Version := Self.Document.History.Changing; Prev : constant Version_Trees.Version := Self.Document.History.Parent (Now); Child : Nodes.Node_Access; Errors : Boolean := False; Ignore : Integer := 0; begin if Self.Local_Changes > 0 and then Self.Exists (Prev) then Mark_Deleted_Children (Self); end if; Versioned_Booleans.Set (Self => Self.NC, Value => Self.Nested_Changes > 0, Time => Self.Document.History.Changing, Changes => Ignore); Node_With_Parent (Self).On_Commit (Parent); for J in Self.Kids'Range loop Child := Self.Child (J, Now); if Child.Nested_Errors (Now) or else Child.Local_Errors (Now) then Errors := True; exit; end if; end loop; Versioned_Booleans.Set (Self.NE, Errors, Now, Ignore); end On_Commit; --------------- -- Set_Child -- --------------- overriding procedure Set_Child (Self : aliased in out Joint; Index : Positive; Value : Node_Access) is Diff : Integer := 0; Now : constant Version_Trees.Version := Self.Document.History.Changing; Old : constant Node_Access := Self.Child (Index, Now); begin if Old /= null then Old.Set_Parent (null); end if; Versioned_Nodes.Set (Self.Kids (Index), Value, Now, Diff); Self.Update_Local_Changes (Diff); if Value /= null then declare Parent : constant Node_Access := Value.Parent (Now); begin if Parent /= null then declare Index : constant Natural := Parent.Child_Index (Constant_Node_Access (Value), Now); begin Value.Set_Parent (null); Parent.Set_Child (Index, null); Value.Set_Parent (Self'Unchecked_Access); end; end if; end; end if; end Set_Child; ---------- -- Span -- ---------- overriding function Span (Self : aliased in out Joint; Kind : Span_Kinds; Time : Version_Trees.Version) return Natural is use type Version_Trees.Version; function Get_Span return Natural; -------------- -- Get_Span -- -------------- function Get_Span return Natural is Result : Natural := 0; begin for J in 1 .. Self.Arity loop Result := Result + Self.Child (J, Time).Span (Kind, Time); end loop; return Result; end Get_Span; Cached : Cached_Integer renames Self.Span_Cache (Kind); begin if Cached.Value = -1 or else Cached.Time /= Time then Cached.Value := Get_Span; Cached.Time := Time; end if; return Cached.Value; end Span; end Incr.Nodes.Joints;
25.590747
78
0.546099
1c60a9b0e91cd6ea550d8024159ce59bcb201b42
1,298
ada
Ada
Task/File-input-output/Ada/file-input-output-2.ada
mullikine/RosettaCodeData
4f0027c6ce83daa36118ee8b67915a13cd23ab67
[ "Info-ZIP" ]
1
2018-11-09T22:08:38.000Z
2018-11-09T22:08:38.000Z
Task/File-input-output/Ada/file-input-output-2.ada
mullikine/RosettaCodeData
4f0027c6ce83daa36118ee8b67915a13cd23ab67
[ "Info-ZIP" ]
null
null
null
Task/File-input-output/Ada/file-input-output-2.ada
mullikine/RosettaCodeData
4f0027c6ce83daa36118ee8b67915a13cd23ab67
[ "Info-ZIP" ]
1
2018-11-09T22:08:40.000Z
2018-11-09T22:08:40.000Z
with Ada.Command_Line, Ada.Text_IO; use Ada.Command_Line, Ada.Text_IO; procedure Read_And_Write_File_Line_By_Line is Read_From : constant String := "input.txt"; Write_To : constant String := "output.txt"; Input, Output : File_Type; begin begin Open (File => Input, Mode => In_File, Name => Read_From); exception when others => Put_Line (Standard_Error, "Can not open the file '" & Read_From & "'. Does it exist?"); Set_Exit_Status (Failure); return; end; begin Create (File => Output, Mode => Out_File, Name => Write_To); exception when others => Put_Line (Standard_Error, "Can not create a file named '" & Write_To & "'."); Set_Exit_Status (Failure); return; end; loop declare Line : String := Get_Line (Input); begin -- You can process the contents of Line here. Put_Line (Output, Line); end; end loop; Close (Input); Close (Output); exception when End_Error => if Is_Open(Input) then Close (Input); end if; if Is_Open(Output) then Close (Output); end if; end Read_And_Write_File_Line_By_Line;
24.961538
80
0.563945
dc756ee428cbfc8f7080aafa727f2b8fc8ce2497
10,855
ads
Ada
src/svd/sam_svd-aes.ads
Fabien-Chouteau/samd51-hal
54d4b29df100502d8b3e3b4680a198640faa5f4d
[ "BSD-3-Clause" ]
1
2020-02-24T23:19:03.000Z
2020-02-24T23:19:03.000Z
src/svd/sam_svd-aes.ads
Fabien-Chouteau/samd51-hal
54d4b29df100502d8b3e3b4680a198640faa5f4d
[ "BSD-3-Clause" ]
null
null
null
src/svd/sam_svd-aes.ads
Fabien-Chouteau/samd51-hal
54d4b29df100502d8b3e3b4680a198640faa5f4d
[ "BSD-3-Clause" ]
null
null
null
pragma Style_Checks (Off); -- This spec has been automatically generated from ATSAMD51G19A.svd pragma Restrictions (No_Elaboration_Code); with HAL; with System; package SAM_SVD.AES is pragma Preelaborate; --------------- -- Registers -- --------------- -- AES Modes of operation type CTRLA_AESMODESelect is (-- Electronic code book mode ECB, -- Cipher block chaining mode CBC, -- Output feedback mode OFB, -- Cipher feedback mode CFB, -- Counter mode COUNTER, -- CCM mode CCM, -- Galois counter mode GCM) with Size => 3; for CTRLA_AESMODESelect use (ECB => 0, CBC => 1, OFB => 2, CFB => 3, COUNTER => 4, CCM => 5, GCM => 6); -- Cipher Feedback Block Size type CTRLA_CFBSSelect is (-- 128-bit Input data block for Encryption/Decryption in Cipher Feedback mode Val_128BIT, -- 64-bit Input data block for Encryption/Decryption in Cipher Feedback mode Val_64BIT, -- 32-bit Input data block for Encryption/Decryption in Cipher Feedback mode Val_32BIT, -- 16-bit Input data block for Encryption/Decryption in Cipher Feedback mode Val_16BIT, -- 8-bit Input data block for Encryption/Decryption in Cipher Feedback mode Val_8BIT) with Size => 3; for CTRLA_CFBSSelect use (Val_128BIT => 0, Val_64BIT => 1, Val_32BIT => 2, Val_16BIT => 3, Val_8BIT => 4); -- Encryption Key Size type CTRLA_KEYSIZESelect is (-- 128-bit Key for Encryption / Decryption Val_128BIT, -- 192-bit Key for Encryption / Decryption Val_192BIT, -- 256-bit Key for Encryption / Decryption Val_256BIT) with Size => 2; for CTRLA_KEYSIZESelect use (Val_128BIT => 0, Val_192BIT => 1, Val_256BIT => 2); -- Cipher Mode type CTRLA_CIPHERSelect is (-- Decryption DEC, -- Encryption ENC) with Size => 1; for CTRLA_CIPHERSelect use (DEC => 0, ENC => 1); -- Start Mode Select type CTRLA_STARTMODESelect is (-- Start Encryption / Decryption in Manual mode MANUAL, -- Start Encryption / Decryption in Auto mode AUTO) with Size => 1; for CTRLA_STARTMODESelect use (MANUAL => 0, AUTO => 1); -- Last Output Data Mode type CTRLA_LODSelect is (-- No effect NONE, -- Start encryption in Last Output Data mode LAST) with Size => 1; for CTRLA_LODSelect use (NONE => 0, LAST => 1); -- Last Key Generation type CTRLA_KEYGENSelect is (-- No effect NONE, -- Start Computation of the last NK words of the expanded key LAST) with Size => 1; for CTRLA_KEYGENSelect use (NONE => 0, LAST => 1); -- XOR Key Operation type CTRLA_XORKEYSelect is (-- No effect NONE, -- The user keyword gets XORed with the previous keyword register content. XOR_k) with Size => 1; for CTRLA_XORKEYSelect use (NONE => 0, XOR_k => 1); subtype AES_CTRLA_CTYPE_Field is HAL.UInt4; -- Control A type AES_CTRLA_Register is record -- Software Reset SWRST : Boolean := False; -- Enable ENABLE : Boolean := False; -- AES Modes of operation AESMODE : CTRLA_AESMODESelect := SAM_SVD.AES.ECB; -- Cipher Feedback Block Size CFBS : CTRLA_CFBSSelect := SAM_SVD.AES.Val_128BIT; -- Encryption Key Size KEYSIZE : CTRLA_KEYSIZESelect := SAM_SVD.AES.Val_128BIT; -- Cipher Mode CIPHER : CTRLA_CIPHERSelect := SAM_SVD.AES.DEC; -- Start Mode Select STARTMODE : CTRLA_STARTMODESelect := SAM_SVD.AES.MANUAL; -- Last Output Data Mode LOD : CTRLA_LODSelect := SAM_SVD.AES.NONE; -- Last Key Generation KEYGEN : CTRLA_KEYGENSelect := SAM_SVD.AES.NONE; -- XOR Key Operation XORKEY : CTRLA_XORKEYSelect := SAM_SVD.AES.NONE; -- unspecified Reserved_15_15 : HAL.Bit := 16#0#; -- Counter Measure Type CTYPE : AES_CTRLA_CTYPE_Field := 16#0#; -- unspecified Reserved_20_31 : HAL.UInt12 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for AES_CTRLA_Register use record SWRST at 0 range 0 .. 0; ENABLE at 0 range 1 .. 1; AESMODE at 0 range 2 .. 4; CFBS at 0 range 5 .. 7; KEYSIZE at 0 range 8 .. 9; CIPHER at 0 range 10 .. 10; STARTMODE at 0 range 11 .. 11; LOD at 0 range 12 .. 12; KEYGEN at 0 range 13 .. 13; XORKEY at 0 range 14 .. 14; Reserved_15_15 at 0 range 15 .. 15; CTYPE at 0 range 16 .. 19; Reserved_20_31 at 0 range 20 .. 31; end record; -- Control B type AES_CTRLB_Register is record -- Start Encryption/Decryption START : Boolean := False; -- New message NEWMSG : Boolean := False; -- End of message EOM : Boolean := False; -- GF Multiplication GFMUL : Boolean := False; -- unspecified Reserved_4_7 : HAL.UInt4 := 16#0#; end record with Volatile_Full_Access, Object_Size => 8, Bit_Order => System.Low_Order_First; for AES_CTRLB_Register use record START at 0 range 0 .. 0; NEWMSG at 0 range 1 .. 1; EOM at 0 range 2 .. 2; GFMUL at 0 range 3 .. 3; Reserved_4_7 at 0 range 4 .. 7; end record; -- Interrupt Enable Clear type AES_INTENCLR_Register is record -- Encryption Complete Interrupt Enable ENCCMP : Boolean := False; -- GF Multiplication Complete Interrupt Enable GFMCMP : Boolean := False; -- unspecified Reserved_2_7 : HAL.UInt6 := 16#0#; end record with Volatile_Full_Access, Object_Size => 8, Bit_Order => System.Low_Order_First; for AES_INTENCLR_Register use record ENCCMP at 0 range 0 .. 0; GFMCMP at 0 range 1 .. 1; Reserved_2_7 at 0 range 2 .. 7; end record; -- Interrupt Enable Set type AES_INTENSET_Register is record -- Encryption Complete Interrupt Enable ENCCMP : Boolean := False; -- GF Multiplication Complete Interrupt Enable GFMCMP : Boolean := False; -- unspecified Reserved_2_7 : HAL.UInt6 := 16#0#; end record with Volatile_Full_Access, Object_Size => 8, Bit_Order => System.Low_Order_First; for AES_INTENSET_Register use record ENCCMP at 0 range 0 .. 0; GFMCMP at 0 range 1 .. 1; Reserved_2_7 at 0 range 2 .. 7; end record; -- Interrupt Flag Status type AES_INTFLAG_Register is record -- Encryption Complete ENCCMP : Boolean := False; -- GF Multiplication Complete GFMCMP : Boolean := False; -- unspecified Reserved_2_7 : HAL.UInt6 := 16#0#; end record with Volatile_Full_Access, Object_Size => 8, Bit_Order => System.Low_Order_First; for AES_INTFLAG_Register use record ENCCMP at 0 range 0 .. 0; GFMCMP at 0 range 1 .. 1; Reserved_2_7 at 0 range 2 .. 7; end record; subtype AES_DATABUFPTR_INDATAPTR_Field is HAL.UInt2; -- Data buffer pointer type AES_DATABUFPTR_Register is record -- Input Data Pointer INDATAPTR : AES_DATABUFPTR_INDATAPTR_Field := 16#0#; -- unspecified Reserved_2_7 : HAL.UInt6 := 16#0#; end record with Volatile_Full_Access, Object_Size => 8, Bit_Order => System.Low_Order_First; for AES_DATABUFPTR_Register use record INDATAPTR at 0 range 0 .. 1; Reserved_2_7 at 0 range 2 .. 7; end record; -- Debug control type AES_DBGCTRL_Register is record -- Debug Run DBGRUN : Boolean := False; -- unspecified Reserved_1_7 : HAL.UInt7 := 16#0#; end record with Volatile_Full_Access, Object_Size => 8, Bit_Order => System.Low_Order_First; for AES_DBGCTRL_Register use record DBGRUN at 0 range 0 .. 0; Reserved_1_7 at 0 range 1 .. 7; end record; -- Keyword n -- Keyword n type AES_KEYWORD_Registers is array (0 .. 7) of HAL.UInt32; -- Initialisation Vector n -- Initialisation Vector n type AES_INTVECTV_Registers is array (0 .. 3) of HAL.UInt32; -- Hash key n -- Hash key n type AES_HASHKEY_Registers is array (0 .. 3) of HAL.UInt32; -- Galois Hash n -- Galois Hash n type AES_GHASH_Registers is array (0 .. 3) of HAL.UInt32; ----------------- -- Peripherals -- ----------------- -- Advanced Encryption Standard type AES_Peripheral is record -- Control A CTRLA : aliased AES_CTRLA_Register; -- Control B CTRLB : aliased AES_CTRLB_Register; -- Interrupt Enable Clear INTENCLR : aliased AES_INTENCLR_Register; -- Interrupt Enable Set INTENSET : aliased AES_INTENSET_Register; -- Interrupt Flag Status INTFLAG : aliased AES_INTFLAG_Register; -- Data buffer pointer DATABUFPTR : aliased AES_DATABUFPTR_Register; -- Debug control DBGCTRL : aliased AES_DBGCTRL_Register; -- Keyword n KEYWORD : aliased AES_KEYWORD_Registers; -- Indata INDATA : aliased HAL.UInt32; -- Initialisation Vector n INTVECTV : aliased AES_INTVECTV_Registers; -- Hash key n HASHKEY : aliased AES_HASHKEY_Registers; -- Galois Hash n GHASH : aliased AES_GHASH_Registers; -- Cipher Length CIPLEN : aliased HAL.UInt32; -- Random Seed RANDSEED : aliased HAL.UInt32; end record with Volatile; for AES_Peripheral use record CTRLA at 16#0# range 0 .. 31; CTRLB at 16#4# range 0 .. 7; INTENCLR at 16#5# range 0 .. 7; INTENSET at 16#6# range 0 .. 7; INTFLAG at 16#7# range 0 .. 7; DATABUFPTR at 16#8# range 0 .. 7; DBGCTRL at 16#9# range 0 .. 7; KEYWORD at 16#C# range 0 .. 255; INDATA at 16#38# range 0 .. 31; INTVECTV at 16#3C# range 0 .. 127; HASHKEY at 16#5C# range 0 .. 127; GHASH at 16#6C# range 0 .. 127; CIPLEN at 16#80# range 0 .. 31; RANDSEED at 16#84# range 0 .. 31; end record; -- Advanced Encryption Standard AES_Periph : aliased AES_Peripheral with Import, Address => AES_Base; end SAM_SVD.AES;
29.25876
84
0.586918
39a19220bc621d07bcdafbbcdde245fdde1ad483
45,100
ads
Ada
ADL/devices/stm32-device.ads
JCGobbi/Nucleo-STM32G474RE
8dc1c4948ffeb11841eed10f1c3708f00fa1d832
[ "BSD-3-Clause" ]
null
null
null
ADL/devices/stm32-device.ads
JCGobbi/Nucleo-STM32G474RE
8dc1c4948ffeb11841eed10f1c3708f00fa1d832
[ "BSD-3-Clause" ]
null
null
null
ADL/devices/stm32-device.ads
JCGobbi/Nucleo-STM32G474RE
8dc1c4948ffeb11841eed10f1c3708f00fa1d832
[ "BSD-3-Clause" ]
null
null
null
------------------------------------------------------------------------------ -- -- -- Copyright (C) 2015-2018, AdaCore -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions are -- -- met: -- -- 1. Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- 2. Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in -- -- the documentation and/or other materials provided with the -- -- distribution. -- -- 3. Neither the name of STMicroelectronics nor the names of its -- -- contributors may be used to endorse or promote products derived -- -- from this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -- -- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -- -- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -- -- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -- -- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -- -- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- -- -- -- This file is based on: -- -- -- -- @file stm32g474xx.h -- -- @author Julio C. Gobbi -- -- @version V1.0.0 -- -- @date 24-August-2021 -- -- @brief CMSIS STM32F334xx Device Peripheral Access Layer Header File. -- -- -- -- COPYRIGHT(c) 2014 STMicroelectronics -- ------------------------------------------------------------------------------ -- This file provides declarations for devices on the STM32G474xx MCUs -- manufactured by ST Microelectronics. For example, an STM32G474RE. with System; use System; -- Enable for SPI, COMP and OPAMP with STM32_SVD; use STM32_SVD; with STM32_SVD.COMP; -- Enable for COMP with STM32_SVD.OPAMP; -- Enable for OPAMP with STM32_SVD.SAI; -- Enable for SAI with STM32.GPIO; use STM32.GPIO; with STM32.ADC; use STM32.ADC; with STM32.DAC; use STM32.DAC; with STM32.CRC; use STM32.CRC; with STM32.RNG; use STM32.RNG; with STM32.CORDIC; use STM32.CORDIC; with STM32.FMAC; use STM32.FMAC; with STM32.DMA; use STM32.DMA; with STM32.USARTs; use STM32.USARTs; with STM32.SPI; use STM32.SPI; with STM32.SPI.DMA; use STM32.SPI.DMA; with STM32.I2C; use STM32.I2C; with STM32.I2S; use STM32.I2S; with STM32.RTC; use STM32.RTC; with STM32.Timers; use STM32.Timers; with STM32.LPTimers; use STM32.LPTimers; with STM32.HRTimers; use STM32.HRTimers; with STM32.OPAMP; use STM32.OPAMP; with STM32.COMP; use STM32.COMP; with STM32.CAN; use STM32.CAN; package STM32.Device is pragma Elaborate_Body; Unknown_Device : exception; -- Raised by the routines below for a device passed as an actual parameter -- when that device is not present on the given hardware instance. ----------------------- -- CPU Clock Sources -- ----------------------- HSE_VALUE : constant := 24_000_000; -- High-Speed external oscillator in Hz LSE_VALUE : constant := 32_768; -- Low-Speed external oscillator in Hz HSI_VALUE : constant := 16_000_000; -- High-Speed internal oscillator in Hz -- HSI48_VALUE : constant := 48_000_000; -- High-Speed internal 48 MHz oscillator in Hz LSI_VALUE : constant := 32_000; -- Low-Speed internal oscillator in Hz I2SCLK : constant := 12_288_000; -- I2S_CKIN external frequency ---------- -- GPIO -- ---------- procedure Enable_Clock (This : aliased GPIO_Port); procedure Enable_Clock (Point : GPIO_Point); procedure Enable_Clock (Points : GPIO_Points); procedure Reset (This : aliased GPIO_Port) with Inline; procedure Reset (Point : GPIO_Point) with Inline; procedure Reset (Points : GPIO_Points) with Inline; function GPIO_Port_Representation (Port : GPIO_Port) return UInt4 with Inline; GPIO_A : aliased GPIO_Port with Import, Volatile, Address => GPIOA_Base; GPIO_B : aliased GPIO_Port with Import, Volatile, Address => GPIOB_Base; GPIO_C : aliased GPIO_Port with Import, Volatile, Address => GPIOC_Base; GPIO_D : aliased GPIO_Port with Import, Volatile, Address => GPIOD_Base; GPIO_E : aliased GPIO_Port with Import, Volatile, Address => GPIOE_Base; GPIO_F : aliased GPIO_Port with Import, Volatile, Address => GPIOF_Base; GPIO_G : aliased GPIO_Port with Import, Volatile, Address => GPIOG_Base; PA0 : aliased GPIO_Point := (GPIO_A'Access, Pin_0); PA1 : aliased GPIO_Point := (GPIO_A'Access, Pin_1); PA2 : aliased GPIO_Point := (GPIO_A'Access, Pin_2); PA3 : aliased GPIO_Point := (GPIO_A'Access, Pin_3); PA4 : aliased GPIO_Point := (GPIO_A'Access, Pin_4); PA5 : aliased GPIO_Point := (GPIO_A'Access, Pin_5); PA6 : aliased GPIO_Point := (GPIO_A'Access, Pin_6); PA7 : aliased GPIO_Point := (GPIO_A'Access, Pin_7); PA8 : aliased GPIO_Point := (GPIO_A'Access, Pin_8); PA9 : aliased GPIO_Point := (GPIO_A'Access, Pin_9); PA10 : aliased GPIO_Point := (GPIO_A'Access, Pin_10); PA11 : aliased GPIO_Point := (GPIO_A'Access, Pin_11); PA12 : aliased GPIO_Point := (GPIO_A'Access, Pin_12); PA13 : aliased GPIO_Point := (GPIO_A'Access, Pin_13); PA14 : aliased GPIO_Point := (GPIO_A'Access, Pin_14); PA15 : aliased GPIO_Point := (GPIO_A'Access, Pin_15); PB0 : aliased GPIO_Point := (GPIO_B'Access, Pin_0); PB1 : aliased GPIO_Point := (GPIO_B'Access, Pin_1); PB2 : aliased GPIO_Point := (GPIO_B'Access, Pin_2); PB3 : aliased GPIO_Point := (GPIO_B'Access, Pin_3); PB4 : aliased GPIO_Point := (GPIO_B'Access, Pin_4); PB5 : aliased GPIO_Point := (GPIO_B'Access, Pin_5); PB6 : aliased GPIO_Point := (GPIO_B'Access, Pin_6); PB7 : aliased GPIO_Point := (GPIO_B'Access, Pin_7); PB8 : aliased GPIO_Point := (GPIO_B'Access, Pin_8); PB9 : aliased GPIO_Point := (GPIO_B'Access, Pin_9); PB10 : aliased GPIO_Point := (GPIO_B'Access, Pin_10); PB11 : aliased GPIO_Point := (GPIO_B'Access, Pin_11); PB12 : aliased GPIO_Point := (GPIO_B'Access, Pin_12); PB13 : aliased GPIO_Point := (GPIO_B'Access, Pin_13); PB14 : aliased GPIO_Point := (GPIO_B'Access, Pin_14); PB15 : aliased GPIO_Point := (GPIO_B'Access, Pin_15); PC0 : aliased GPIO_Point := (GPIO_C'Access, Pin_0); PC1 : aliased GPIO_Point := (GPIO_C'Access, Pin_1); PC2 : aliased GPIO_Point := (GPIO_C'Access, Pin_2); PC3 : aliased GPIO_Point := (GPIO_C'Access, Pin_3); PC4 : aliased GPIO_Point := (GPIO_C'Access, Pin_4); PC5 : aliased GPIO_Point := (GPIO_C'Access, Pin_5); PC6 : aliased GPIO_Point := (GPIO_C'Access, Pin_6); PC7 : aliased GPIO_Point := (GPIO_C'Access, Pin_7); PC8 : aliased GPIO_Point := (GPIO_C'Access, Pin_8); PC9 : aliased GPIO_Point := (GPIO_C'Access, Pin_9); PC10 : aliased GPIO_Point := (GPIO_C'Access, Pin_10); PC11 : aliased GPIO_Point := (GPIO_C'Access, Pin_11); PC12 : aliased GPIO_Point := (GPIO_C'Access, Pin_12); PC13 : aliased GPIO_Point := (GPIO_C'Access, Pin_13); PC14 : aliased GPIO_Point := (GPIO_C'Access, Pin_14); PC15 : aliased GPIO_Point := (GPIO_C'Access, Pin_15); PD0 : aliased GPIO_Point := (GPIO_D'Access, Pin_0); PD1 : aliased GPIO_Point := (GPIO_D'Access, Pin_1); PD2 : aliased GPIO_Point := (GPIO_D'Access, Pin_2); PD3 : aliased GPIO_Point := (GPIO_D'Access, Pin_3); PD4 : aliased GPIO_Point := (GPIO_D'Access, Pin_4); PD5 : aliased GPIO_Point := (GPIO_D'Access, Pin_5); PD6 : aliased GPIO_Point := (GPIO_D'Access, Pin_6); PD7 : aliased GPIO_Point := (GPIO_D'Access, Pin_7); PD8 : aliased GPIO_Point := (GPIO_D'Access, Pin_8); PD9 : aliased GPIO_Point := (GPIO_D'Access, Pin_9); PD10 : aliased GPIO_Point := (GPIO_D'Access, Pin_10); PD11 : aliased GPIO_Point := (GPIO_D'Access, Pin_11); PD12 : aliased GPIO_Point := (GPIO_D'Access, Pin_12); PD13 : aliased GPIO_Point := (GPIO_D'Access, Pin_13); PD14 : aliased GPIO_Point := (GPIO_D'Access, Pin_14); PD15 : aliased GPIO_Point := (GPIO_D'Access, Pin_15); PE0 : aliased GPIO_Point := (GPIO_E'Access, Pin_0); PE1 : aliased GPIO_Point := (GPIO_E'Access, Pin_1); PE2 : aliased GPIO_Point := (GPIO_E'Access, Pin_2); PE3 : aliased GPIO_Point := (GPIO_E'Access, Pin_3); PE4 : aliased GPIO_Point := (GPIO_E'Access, Pin_4); PE5 : aliased GPIO_Point := (GPIO_E'Access, Pin_5); PE6 : aliased GPIO_Point := (GPIO_E'Access, Pin_6); PE7 : aliased GPIO_Point := (GPIO_E'Access, Pin_7); PE8 : aliased GPIO_Point := (GPIO_E'Access, Pin_8); PE9 : aliased GPIO_Point := (GPIO_E'Access, Pin_9); PE10 : aliased GPIO_Point := (GPIO_E'Access, Pin_10); PE11 : aliased GPIO_Point := (GPIO_E'Access, Pin_11); PE12 : aliased GPIO_Point := (GPIO_E'Access, Pin_12); PE13 : aliased GPIO_Point := (GPIO_E'Access, Pin_13); PE14 : aliased GPIO_Point := (GPIO_E'Access, Pin_14); PE15 : aliased GPIO_Point := (GPIO_E'Access, Pin_15); PF0 : aliased GPIO_Point := (GPIO_F'Access, Pin_0); PF1 : aliased GPIO_Point := (GPIO_F'Access, Pin_1); PF2 : aliased GPIO_Point := (GPIO_F'Access, Pin_2); PF3 : aliased GPIO_Point := (GPIO_F'Access, Pin_3); PF4 : aliased GPIO_Point := (GPIO_F'Access, Pin_4); PF5 : aliased GPIO_Point := (GPIO_F'Access, Pin_5); PF6 : aliased GPIO_Point := (GPIO_F'Access, Pin_6); PF7 : aliased GPIO_Point := (GPIO_F'Access, Pin_7); PF8 : aliased GPIO_Point := (GPIO_F'Access, Pin_8); PF9 : aliased GPIO_Point := (GPIO_F'Access, Pin_9); PF10 : aliased GPIO_Point := (GPIO_F'Access, Pin_10); PF11 : aliased GPIO_Point := (GPIO_F'Access, Pin_11); PF12 : aliased GPIO_Point := (GPIO_F'Access, Pin_12); PF13 : aliased GPIO_Point := (GPIO_F'Access, Pin_13); PF14 : aliased GPIO_Point := (GPIO_F'Access, Pin_14); PF15 : aliased GPIO_Point := (GPIO_F'Access, Pin_15); PG0 : aliased GPIO_Point := (GPIO_G'Access, Pin_0); PG1 : aliased GPIO_Point := (GPIO_G'Access, Pin_1); PG2 : aliased GPIO_Point := (GPIO_G'Access, Pin_2); PG3 : aliased GPIO_Point := (GPIO_G'Access, Pin_3); PG4 : aliased GPIO_Point := (GPIO_G'Access, Pin_4); PG5 : aliased GPIO_Point := (GPIO_G'Access, Pin_5); PG6 : aliased GPIO_Point := (GPIO_G'Access, Pin_6); PG7 : aliased GPIO_Point := (GPIO_G'Access, Pin_7); PG8 : aliased GPIO_Point := (GPIO_G'Access, Pin_8); PG9 : aliased GPIO_Point := (GPIO_G'Access, Pin_9); PG10 : aliased GPIO_Point := (GPIO_G'Access, Pin_10); PG11 : aliased GPIO_Point := (GPIO_G'Access, Pin_11); PG12 : aliased GPIO_Point := (GPIO_G'Access, Pin_12); PG13 : aliased GPIO_Point := (GPIO_G'Access, Pin_13); PG14 : aliased GPIO_Point := (GPIO_G'Access, Pin_14); PG15 : aliased GPIO_Point := (GPIO_G'Access, Pin_15); GPIO_AF_RTC_50Hz_0 : constant GPIO_Alternate_Function; GPIO_AF_MCO_0 : constant GPIO_Alternate_Function; GPIO_AF_TAMPER_0 : constant GPIO_Alternate_Function; GPIO_AF_SWJ_0 : constant GPIO_Alternate_Function; GPIO_AF_TRACE_0 : constant GPIO_Alternate_Function; GPIO_AF_TIM2_1 : constant GPIO_Alternate_Function; GPIO_AF_TIM5_1 : constant GPIO_Alternate_Function; GPIO_AF_TIM15_1 : constant GPIO_Alternate_Function; GPIO_AF_TIM16_1 : constant GPIO_Alternate_Function; GPIO_AF_TIM17_1 : constant GPIO_Alternate_Function; GPIO_AF_LPTIM1_1 : constant GPIO_Alternate_Function; GPIO_AF_I2C1_2 : constant GPIO_Alternate_Function; GPIO_AF_I2C3_2 : constant GPIO_Alternate_Function; GPIO_AF_TIM1_2 : constant GPIO_Alternate_Function; GPIO_AF_TIM2_2 : constant GPIO_Alternate_Function; GPIO_AF_TIM3_2 : constant GPIO_Alternate_Function; GPIO_AF_TIM4_2 : constant GPIO_Alternate_Function; GPIO_AF_TIM5_2 : constant GPIO_Alternate_Function; GPIO_AF_TIM8_2 : constant GPIO_Alternate_Function; GPIO_AF_TIM15_2 : constant GPIO_Alternate_Function; GPIO_AF_TIM20_2 : constant GPIO_Alternate_Function; GPIO_AF_COMP1_2 : constant GPIO_Alternate_Function; GPIO_AF_SPI1_3 : constant GPIO_Alternate_Function; GPIO_AF_I2C3_3 : constant GPIO_Alternate_Function; GPIO_AF_I2C4_3 : constant GPIO_Alternate_Function; GPIO_AF_SAI1_3 : constant GPIO_Alternate_Function; GPIO_AF_USB_3 : constant GPIO_Alternate_Function; GPIO_AF_HRTIM1_3 : constant GPIO_Alternate_Function; GPIO_AF_TIM8_3 : constant GPIO_Alternate_Function; GPIO_AF_TIM15_3 : constant GPIO_Alternate_Function; GPIO_AF_TIM20_3 : constant GPIO_Alternate_Function; GPIO_AF_COMP3_3 : constant GPIO_Alternate_Function; GPIO_AF_I2C1_4 : constant GPIO_Alternate_Function; GPIO_AF_I2C2_4 : constant GPIO_Alternate_Function; GPIO_AF_I2C3_4 : constant GPIO_Alternate_Function; GPIO_AF_I2C4_4 : constant GPIO_Alternate_Function; GPIO_AF_TIM1_4 : constant GPIO_Alternate_Function; GPIO_AF_TIM8_4 : constant GPIO_Alternate_Function; GPIO_AF_TIM16_4 : constant GPIO_Alternate_Function; GPIO_AF_TIM17_4 : constant GPIO_Alternate_Function; GPIO_AF_SPI1_5 : constant GPIO_Alternate_Function; GPIO_AF_SPI2_5 : constant GPIO_Alternate_Function; GPIO_AF_SPI3_5 : constant GPIO_Alternate_Function; GPIO_AF_SPI4_5 : constant GPIO_Alternate_Function; GPIO_AF_I2S2_5 : constant GPIO_Alternate_Function; GPIO_AF_I2S3_5 : constant GPIO_Alternate_Function; GPIO_AF_I2C4_5 : constant GPIO_Alternate_Function; GPIO_AF_UART4_5 : constant GPIO_Alternate_Function; GPIO_AF_UART5_5 : constant GPIO_Alternate_Function; GPIO_AF_TIM8_5 : constant GPIO_Alternate_Function; GPIO_AF_INFRARED_5 : constant GPIO_Alternate_Function; GPIO_AF_SPI2_6 : constant GPIO_Alternate_Function; GPIO_AF_SPI3_6 : constant GPIO_Alternate_Function; GPIO_AF_I2S2_6 : constant GPIO_Alternate_Function; GPIO_AF_I2S3_6 : constant GPIO_Alternate_Function; GPIO_AF_TIM1_6 : constant GPIO_Alternate_Function; GPIO_AF_TIM5_6 : constant GPIO_Alternate_Function; GPIO_AF_TIM8_6 : constant GPIO_Alternate_Function; GPIO_AF_TIM20_6 : constant GPIO_Alternate_Function; GPIO_AF_INFRARED_6 : constant GPIO_Alternate_Function; GPIO_AF_USART1_7 : constant GPIO_Alternate_Function; GPIO_AF_USART2_7 : constant GPIO_Alternate_Function; GPIO_AF_USART3_7 : constant GPIO_Alternate_Function; GPIO_AF_FDCAN_7 : constant GPIO_Alternate_Function; GPIO_AF_COMP5_7 : constant GPIO_Alternate_Function; GPIO_AF_COMP6_7 : constant GPIO_Alternate_Function; GPIO_AF_COMP7_7 : constant GPIO_Alternate_Function; GPIO_AF_I2C3_8 : constant GPIO_Alternate_Function; GPIO_AF_I2C4_8 : constant GPIO_Alternate_Function; GPIO_AF_UART4_8 : constant GPIO_Alternate_Function; GPIO_AF_UART5_8 : constant GPIO_Alternate_Function; GPIO_AF_LPUART1_8 : constant GPIO_Alternate_Function; GPIO_AF_COMP1_8 : constant GPIO_Alternate_Function; GPIO_AF_COMP2_8 : constant GPIO_Alternate_Function; GPIO_AF_COMP3_8 : constant GPIO_Alternate_Function; GPIO_AF_COMP4_8 : constant GPIO_Alternate_Function; GPIO_AF_COMP5_8 : constant GPIO_Alternate_Function; GPIO_AF_COMP6_8 : constant GPIO_Alternate_Function; GPIO_AF_COMP7_8 : constant GPIO_Alternate_Function; GPIO_AF_FDCAN1_9 : constant GPIO_Alternate_Function; GPIO_AF_FDCAN2_9 : constant GPIO_Alternate_Function; GPIO_AF_TIM1_9 : constant GPIO_Alternate_Function; GPIO_AF_TIM8_9 : constant GPIO_Alternate_Function; GPIO_AF_TIM15_9 : constant GPIO_Alternate_Function; GPIO_AF_SPI1_10 : constant GPIO_Alternate_Function; GPIO_AF_TIM1_10 : constant GPIO_Alternate_Function; GPIO_AF_TIM2_10 : constant GPIO_Alternate_Function; GPIO_AF_TIM3_10 : constant GPIO_Alternate_Function; GPIO_AF_TIM4_10 : constant GPIO_Alternate_Function; GPIO_AF_TIM7_10 : constant GPIO_Alternate_Function; GPIO_AF_TIM8_10 : constant GPIO_Alternate_Function; GPIO_AF_LPTIM1_11 : constant GPIO_Alternate_Function; GPIO_AF_TIM1_11 : constant GPIO_Alternate_Function; GPIO_AF_TIM8_11 : constant GPIO_Alternate_Function; GPIO_AF_FDCAN1_11 : constant GPIO_Alternate_Function; GPIO_AF_FDCAN3_11 : constant GPIO_Alternate_Function; GPIO_AF_FMC_12 : constant GPIO_Alternate_Function; GPIO_AF_LPUART1_12 : constant GPIO_Alternate_Function; GPIO_AF_SAI1_12 : constant GPIO_Alternate_Function; GPIO_AF_HRTIM1_12 : constant GPIO_Alternate_Function; GPIO_AF_TIM1_12 : constant GPIO_Alternate_Function; GPIO_AF_SAI1_13 : constant GPIO_Alternate_Function; GPIO_AF_HRTIM1_13 : constant GPIO_Alternate_Function; GPIO_AF_OPAMP2_13 : constant GPIO_Alternate_Function; GPIO_AF_UART4_14 : constant GPIO_Alternate_Function; GPIO_AF_UART5_14 : constant GPIO_Alternate_Function; GPIO_AF_SAI1_14 : constant GPIO_Alternate_Function; GPIO_AF_TIM2_14 : constant GPIO_Alternate_Function; GPIO_AF_TIM15_14 : constant GPIO_Alternate_Function; GPIO_AF_UCPD1_14 : constant GPIO_Alternate_Function; GPIO_AF_EVENTOUT_15 : constant GPIO_Alternate_Function; --------- -- ADC -- --------- ADC_1 : aliased Analog_To_Digital_Converter with Volatile, Import, Address => ADC1_Base; ADC_2 : aliased Analog_To_Digital_Converter with Volatile, Import, Address => ADC2_Base; ADC_3 : aliased Analog_To_Digital_Converter with Volatile, Import, Address => ADC3_Base; ADC_4 : aliased Analog_To_Digital_Converter with Volatile, Import, Address => ADC4_Base; ADC_5 : aliased Analog_To_Digital_Converter with Volatile, Import, Address => ADC5_Base; Temperature_Channel : constant Analog_Input_Channel := 16; Temperature_Sensor : constant ADC_Point := (ADC_1'Access, Channel => Temperature_Channel); -- The internal temperature sensor (VTS) is intenally connected to -- ADC1_INP16 and ADC5_INP4. See RM0440 rev 6 pg 621 chapter 21.4.11. -- The VSENSESEL bit in the ADCxCCR register is used to switch to the -- temperature sensor. -- see RM0440 rev 6 pg 683, section 21.4.31, also pg 606. VRef_Channel : constant Analog_Input_Channel := 18; VRef_Sensor : constant ADC_Point := (ADC_1'Access, Channel => VRef_Channel); -- The internal reference voltage (VREFINT) is internally connected -- to ADC1_INP18, ADC3_INP18, ADC4_INP18 and ADC5_INP18. -- The VREFEN bit in the ADCxCCR register is used to switch to VREFINT. -- see RM0440 rev 6 pg 686, section 21.4.33, also pg 606. VBat_Channel : constant Analog_Input_Channel := 17; VBat_Sensor : constant ADC_Point := (ADC_1'Access, Channel => VBat_Channel); -- The internal temperature sensor (VTS) is intenally connected to -- ADC1_INP17, ADC3_INP17 and ADC5_INP17. See RM0440 rev 6 pg 621 -- chapter 21.4.11. -- The VBATSEL bit in the ADCxCCR register is used to switch to the -- battery voltage. VBat : constant ADC_Point := (ADC_1'Access, Channel => VBat_Channel); VBat_Bridge_Divisor : constant := 3; -- The VBAT pin is internally connected to a bridge divider. The actual -- voltage is the raw conversion value * the divisor. See section 21.4.32, -- pg 685 of the RM0440 rev 6. procedure Enable_Clock (This : aliased Analog_To_Digital_Converter); procedure Reset_All_ADC_Units; type ADC_Clock_Source is (SYSCLK, PLLP); procedure Select_Clock_Source (This : Analog_To_Digital_Converter; Source : ADC_Clock_Source); -- Set ADC12 or ADC345 Clock Mux Source. function Read_Clock_Source (This : Analog_To_Digital_Converter) return ADC_Clock_Source; -- Return ADC12 or ADC345 Clock Mux Source. --------- -- DAC -- --------- DAC_1 : aliased Digital_To_Analog_Converter with Import, Volatile, Address => DAC1_Base; DAC_2 : aliased Digital_To_Analog_Converter with Import, Volatile, Address => DAC2_Base; DAC_3 : aliased Digital_To_Analog_Converter with Import, Volatile, Address => DAC3_Base; DAC_4 : aliased Digital_To_Analog_Converter with Import, Volatile, Address => DAC4_Base; DAC_1_OUT_1_IO : GPIO_Point renames PA4; DAC_1_OUT_2_IO : GPIO_Point renames PA5; DAC_2_OUT_1_IO : GPIO_Point renames PA6; procedure Enable_Clock (This : aliased Digital_To_Analog_Converter) with Inline; procedure Reset (This : aliased Digital_To_Analog_Converter) with Inline; ----------- -- Audio -- ----------- subtype SAI_Port is STM32_SVD.SAI.SAI_Peripheral; SAI_1 : SAI_Port renames STM32_SVD.SAI.SAI_Periph; procedure Enable_Clock (This : SAI_Port); procedure Reset (This : SAI_Port); type SAI_Clock_Source is (SYSCLK, PLLQ, I2S_CKIN, HSI16); procedure Select_Clock_Source (This : SAI_Port; Source : SAI_Clock_Source); -- Set SAI Clock Mux source. function Read_Clock_Source (This : SAI_Port) return SAI_Clock_Source; -- Return SAI Clock Mux source. function Get_Clock_Frequency (This : SAI_Port) return UInt32; --------- -- CRC -- --------- CRC_Unit : CRC_32 with Import, Volatile, Address => CRC_Base; procedure Enable_Clock (This : CRC_32) with Inline; procedure Disable_Clock (This : CRC_32) with Inline; procedure Reset (This : CRC_32); --------- -- RNG -- --------- RNG_Unit : RNG_Generator with Import, Volatile, Address => RNG_Base; procedure Enable_Clock (This : RNG_Generator) with Inline; procedure Disable_Clock (This : RNG_Generator) with Inline; procedure Reset (This : RNG_Generator); ------------ -- CORDIC -- ------------ CORDIC_Unit : CORDIC_Coprocessor with Import, Volatile, Address => CORDIC_Base; procedure Enable_Clock (This : CORDIC_Coprocessor) with Inline; procedure Disable_Clock (This : CORDIC_Coprocessor) with Inline; procedure Reset (This : CORDIC_Coprocessor); ---------- -- FMAC -- ---------- FMAC_Unit : FMAC_Accelerator with Import, Volatile, Address => FMAC_Base; procedure Enable_Clock (This : FMAC_Accelerator) with Inline; procedure Disable_Clock (This : FMAC_Accelerator) with Inline; procedure Reset (This : FMAC_Accelerator); --------- -- DMA -- --------- DMA_1 : aliased DMA_Controller with Import, Volatile, Address => DMA1_Base; DMA_2 : aliased DMA_Controller with Import, Volatile, Address => DMA2_Base; procedure Enable_Clock (This : aliased DMA_Controller); procedure Reset (This : aliased DMA_Controller); ----------- -- USART -- ----------- Internal_USART_1 : aliased Internal_USART with Import, Volatile, Address => USART1_Base; Internal_USART_2 : aliased Internal_USART with Import, Volatile, Address => USART2_Base; Internal_USART_3 : aliased Internal_USART with Import, Volatile, Address => USART3_Base; Internal_UART_4 : aliased Internal_USART with Import, Volatile, Address => UART4_Base; Internal_UART_5 : aliased Internal_USART with Import, Volatile, Address => UART5_Base; Internal_LPUART_1 : aliased Internal_USART with Import, Volatile, Address => LPUART1_Base; USART_1 : aliased USART (Internal_USART_1'Access); USART_2 : aliased USART (Internal_USART_2'Access); USART_3 : aliased USART (Internal_USART_3'Access); UART_4 : aliased USART (Internal_UART_4'Access); UART_5 : aliased USART (Internal_UART_5'Access); LPUART_1 : aliased USART (Internal_LPUART_1'Access); procedure Enable_Clock (This : aliased USART); procedure Reset (This : aliased USART); type USART_Clock_Source is (PCLK, SYSCLK, HSI16, LSE); -- Option USART1 USART2345 -- PCLK PCLK2 PCLK1 procedure Select_Clock_Source (This : aliased USART; Source : USART_Clock_Source); function Read_Clock_Source (This : aliased USART) return USART_Clock_Source; function Get_Clock_Frequency (This : USART) return UInt32 with Inline; -- Returns USART clock frequency, in Hertz. --------- -- CAN -- --------- CAN_1 : aliased CAN_Controller with Volatile, Import, Address => FDCAN1_Base; CAN_2 : aliased CAN_Controller with Volatile, Import, Address => FDCAN2_Base; CAN_3 : aliased CAN_Controller with Volatile, Import, Address => FDCAN3_Base; procedure Enable_Clock (This : aliased CAN_Controller); -- There is only one clock for the three CANs. procedure Reset (This : aliased CAN_Controller); -- There is only one reset for the three CANs. type CAN_Clock_Source is (HSE, PLLQ, PCLK); -- Option CAN123 -- PCLK PCLK1 procedure Select_Clock_Source (This : aliased CAN_Controller; Source : CAN_Clock_Source); function Read_Clock_Source (This : aliased CAN_Controller) return CAN_Clock_Source; --------- -- I2C -- --------- Internal_I2C_Port_1 : aliased Internal_I2C_Port with Import, Volatile, Address => I2C1_Base; Internal_I2C_Port_2 : aliased Internal_I2C_Port with Import, Volatile, Address => I2C2_Base; Internal_I2C_Port_3 : aliased Internal_I2C_Port with Import, Volatile, Address => I2C3_Base; Internal_I2C_Port_4 : aliased Internal_I2C_Port with Import, Volatile, Address => I2C4_Base; type I2C_Port_Id is (I2C_Id_1, I2C_Id_2, I2C_Id_3, I2C_Id_4); I2C_1 : aliased I2C_Port (Internal_I2C_Port_1'Access); I2C_2 : aliased I2C_Port (Internal_I2C_Port_2'Access); I2C_3 : aliased I2C_Port (Internal_I2C_Port_3'Access); I2C_4 : aliased I2C_Port (Internal_I2C_Port_4'Access); -- I2C_1_DMA : aliased I2C_Port_DMA (Internal_I2C_Port_1'Access); -- I2C_2_DMA : aliased I2C_Port_DMA (Internal_I2C_Port_2'Access); -- I2C_3_DMA : aliased I2C_Port_DMA (Internal_I2C_Port_3'Access); -- I2C_4_DMA : aliased I2C_Port_DMA (Internal_I2C_Port_4'Access); function As_Port_Id (Port : I2C_Port'Class) return I2C_Port_Id with Inline; procedure Enable_Clock (This : aliased I2C_Port'Class); procedure Enable_Clock (This : I2C_Port_Id); procedure Reset (This : I2C_Port'Class); procedure Reset (This : I2C_Port_Id); type I2C_Clock_Source is (PCLK, SYSCLK, HSI16); procedure Select_Clock_Source (This : I2C_Port'Class; Source : I2C_Clock_Source); procedure Select_Clock_Source (This : I2C_Port_Id; Source : I2C_Clock_Source); -- Set I2C Clock Mux source. function Read_Clock_Source (This : I2C_Port'Class) return I2C_Clock_Source; function Read_Clock_Source (This : I2C_Port_Id) return I2C_Clock_Source; -- Return I2C Clock Mux source. --------- -- SPI -- --------- Internal_SPI_1 : aliased Internal_SPI_Port with Import, Volatile, Address => SPI1_Base; Internal_SPI_2 : aliased Internal_SPI_Port with Import, Volatile, Address => SPI2_Base; Internal_SPI_3 : aliased Internal_SPI_Port with Import, Volatile, Address => SPI3_Base; Internal_SPI_4 : aliased Internal_SPI_Port with Import, Volatile, Address => SPI4_Base; SPI_1 : aliased SPI_Port (Internal_SPI_1'Access); SPI_2 : aliased SPI_Port (Internal_SPI_2'Access); SPI_3 : aliased SPI_Port (Internal_SPI_3'Access); SPI_4 : aliased SPI_Port (Internal_SPI_4'Access); SPI_1_DMA : aliased SPI_Port_DMA (Internal_SPI_1'Access); SPI_2_DMA : aliased SPI_Port_DMA (Internal_SPI_2'Access); SPI_3_DMA : aliased SPI_Port_DMA (Internal_SPI_3'Access); SPI_4_DMA : aliased SPI_Port_DMA (Internal_SPI_4'Access); procedure Enable_Clock (This : SPI_Port'Class); procedure Reset (This : SPI_Port'Class); type SPI_Clock_Source is (SYSCLK, PLLQ, I2S_CKIN, HSI16); procedure Select_Clock_Source (This : SPI_Port'Class; Source : SPI_Clock_Source) with Pre => This'Address = SPI2_Base or This'Address = SPI3_Base, Post => Read_Clock_Source (This) = Source; -- Set SPI Clock Mux source (the same source for SPI2 .. SPI3). function Read_Clock_Source (This : SPI_Port'Class) return SPI_Clock_Source with Pre => This'Address = SPI2_Base or This'Address = SPI3_Base; -- Return SPI Clock Mux source. --------- -- I2S -- --------- Internal_I2S_2 : aliased Internal_I2S_Port with Import, Volatile, Address => SPI2_Base; Internal_I2S_3 : aliased Internal_I2S_Port with Import, Volatile, Address => SPI3_Base; I2S_2 : aliased I2S_Port (Internal_I2S_2'Access, Extended => False); I2S_3 : aliased I2S_Port (Internal_I2S_3'Access, Extended => False); procedure Enable_Clock (This : I2S_Port); -- The I2S_2 and I2S_3 peripherals use the SPI interface hardware, that are -- mapped to SPI2 and SPI3. SPI1 and SPI4 don't have the I2S mode. procedure Reset (This : I2S_Port); -- The I2S_2 and I2S_3 peripherals use the SPI interface hardware, that are -- mapped to SPI2 and SPI3. SPI1 and SPI4 don't have the I2S mode. type I2S_Clock_Source is (SYSCLK, PLLQ, I2S_CKIN, HSI16); procedure Select_Clock_Source (This : I2S_Port'Class; Source : I2S_Clock_Source) with Post => Read_Clock_Source (This) = Source; -- Set I2S Clock Mux source (the same source for I2S2 .. I2S3). function Read_Clock_Source (This : I2S_Port'Class) return I2S_Clock_Source; -- Return I2S Clock Mux source. function Get_Clock_Frequency (This : I2S_Port) return UInt32; -- Return I2S frequency. --------- -- RTC -- --------- RTC : aliased RTC_Device; procedure Enable_Clock (This : RTC_Device); type RTC_Clock_Source is (No_Clock, LSE, LSI, HSE) with Size => 2; procedure Select_Clock_Source (This : RTC_Device; Source : RTC_Clock_Source) with Post => Read_Clock_Source (This) = Source; -- Set RTC Clock Mux source. Once the RTC clock source has been selected, -- it cannot be changed anymore unless the RTC domain is reset, or unless -- a failure is detected on LSE (LSECSSD is set). The BDRST bit can be used -- to reset them. -- The HSE clock is divided by 32 before entering the RTC to assure it is -- < 1 MHz. function Read_Clock_Source (This : RTC_Device) return RTC_Clock_Source; -- Return RTC Clock Mux source. ----------- -- Timer -- ----------- Timer_1 : aliased Timer with Import, Volatile, Address => TIM1_Base; Timer_2 : aliased Timer with Import, Volatile, Address => TIM2_Base; Timer_3 : aliased Timer with Import, Volatile, Address => TIM3_Base; Timer_4 : aliased Timer with Import, Volatile, Address => TIM4_Base; Timer_5 : aliased Timer with Import, Volatile, Address => TIM5_Base; Timer_6 : aliased Timer with Import, Volatile, Address => TIM6_Base; Timer_7 : aliased Timer with Import, Volatile, Address => TIM7_Base; Timer_8 : aliased Timer with Import, Volatile, Address => TIM8_Base; Timer_15 : aliased Timer with Import, Volatile, Address => TIM15_Base; Timer_16 : aliased Timer with Import, Volatile, Address => TIM16_Base; Timer_17 : aliased Timer with Import, Volatile, Address => TIM17_Base; Timer_20 : aliased Timer with Import, Volatile, Address => TIM20_Base; procedure Enable_Clock (This : Timer); procedure Reset (This : Timer); function Get_Clock_Frequency (This : Timer) return UInt32; -- Return the timer input frequency in Hz. ------------- -- LPTimer -- ------------- LPTimer_1 : aliased LPTimer with Import, Volatile, Address => LPTIMER1_Base; procedure Enable_Clock (This : LPTimer); procedure Reset (This : LPTimer); type LPTimer_Clock_Source_Enum is (PCLK1, LSI, HSI, LSE) with Size => 2; type LPTimer_Clock_Source is record External : Boolean := False; Clock : LPTimer_Clock_Source_Enum := LPTimer_Clock_Source_Enum'First; end record; for LPTimer_Clock_Source use record External at 0 range 2 .. 2; Clock at 0 range 0 .. 1; end record; procedure Select_Clock_Source (This : LPTimer; Source : LPTimer_Clock_Source); -- Set clock to any internal LPTIM Clock Mux source or external through -- Input1. function Read_Clock_Source (This : LPTimer) return LPTimer_Clock_Source; -- Return LPTIM1 Clock Mux source. function Get_Clock_Frequency (This : LPTimer) return UInt32; -- Return the timer input frequency in Hz. ------------- -- HRTimer -- ------------- HRTimer_M : aliased HRTimer_Master with Import, Volatile, Address => HRTIM_Master_Base; HRTimer_A : aliased HRTimer_Channel with Import, Volatile, Address => HRTIM_TIMA_Base; HRTimer_B : aliased HRTimer_Channel with Import, Volatile, Address => HRTIM_TIMB_Base; HRTimer_C : aliased HRTimer_Channel with Import, Volatile, Address => HRTIM_TIMC_Base; HRTimer_D : aliased HRTimer_Channel with Import, Volatile, Address => HRTIM_TIMD_Base; HRTimer_E : aliased HRTimer_Channel with Import, Volatile, Address => HRTIM_TIME_Base; HRTimer_F : aliased HRTimer_Channel with Import, Volatile, Address => HRTIM_TIMF_Base; procedure Enable_Clock (This : HRTimer_Master); procedure Enable_Clock (This : HRTimer_Channel); procedure Reset (This : HRTimer_Master); procedure Reset (This : HRTimer_Channel); function Get_Clock_Frequency (This : HRTimer_Master) return UInt32; -- Returns the timer input frequency in Hz. function Get_Clock_Frequency (This : HRTimer_Channel) return UInt32; -- Returns the timer input frequency in Hz. ---------------- -- Comparator -- ---------------- Comp_1 : aliased Comparator with Import, Volatile, Address => STM32_SVD.COMP.COMP_Periph.C1CSR'Address; Comp_2 : aliased Comparator with Import, Volatile, Address => STM32_SVD.COMP.COMP_Periph.C2CSR'Address; Comp_3 : aliased Comparator with Import, Volatile, Address => STM32_SVD.COMP.COMP_Periph.C3CSR'Address; Comp_4 : aliased Comparator with Import, Volatile, Address => STM32_SVD.COMP.COMP_Periph.C4CSR'Address; Comp_5 : aliased Comparator with Import, Volatile, Address => STM32_SVD.COMP.COMP_Periph.C5CSR'Address; Comp_6 : aliased Comparator with Import, Volatile, Address => STM32_SVD.COMP.COMP_Periph.C6CSR'Address; Comp_7 : aliased Comparator with Import, Volatile, Address => STM32_SVD.COMP.COMP_Periph.C7CSR'Address; ----------- -- OpAmp -- ----------- Opamp_1 : aliased Operational_Amplifier with Import, Volatile, Address => STM32_SVD.OPAMP.OPAMP_Periph.OPAMP1_CSR'Address; Opamp_2 : aliased Operational_Amplifier with Import, Volatile, Address => STM32_SVD.OPAMP.OPAMP_Periph.OPAMP2_CSR'Address; Opamp_3 : aliased Operational_Amplifier with Import, Volatile, Address => STM32_SVD.OPAMP.OPAMP_Periph.OPAMP3_CSR'Address; Opamp_4 : aliased Operational_Amplifier with Import, Volatile, Address => STM32_SVD.OPAMP.OPAMP_Periph.OPAMP4_CSR'Address; Opamp_5 : aliased Operational_Amplifier with Import, Volatile, Address => STM32_SVD.OPAMP.OPAMP_Periph.OPAMP5_CSR'Address; Opamp_6 : aliased Operational_Amplifier with Import, Volatile, Address => STM32_SVD.OPAMP.OPAMP_Periph.OPAMP6_CSR'Address; ----------------------------- -- Reset and Clock Control -- ----------------------------- -- See RM0440 rev. 6 pg. 276 chapter 7.2, and pg. 279 for clock tree type RCC_System_Clocks is record SYSCLK : UInt32; -- PLLR, PLLCLK HCLK : UInt32; PCLK1 : UInt32; PCLK2 : UInt32; TIMCLK1 : UInt32; -- For TIMs 2 .. 7 TIMCLK2 : UInt32; -- For TIMs 1, 8, 20, 15 .. 17, HRTIM1 TIMCLK3 : UInt32; -- For LPTIMs 1 .. 2 PLLP : UInt32; -- PLLP PLLQ : UInt32; -- PLLQ end record; function System_Clock_Frequencies return RCC_System_Clocks; -- Returns each RCC system clock frequency in Hz. private GPIO_AF_RTC_50Hz_0 : constant GPIO_Alternate_Function := 0; GPIO_AF_MCO_0 : constant GPIO_Alternate_Function := 0; GPIO_AF_TAMPER_0 : constant GPIO_Alternate_Function := 0; GPIO_AF_SWJ_0 : constant GPIO_Alternate_Function := 0; GPIO_AF_TRACE_0 : constant GPIO_Alternate_Function := 0; GPIO_AF_TIM2_1 : constant GPIO_Alternate_Function := 1; GPIO_AF_TIM5_1 : constant GPIO_Alternate_Function := 1; GPIO_AF_TIM15_1 : constant GPIO_Alternate_Function := 1; GPIO_AF_TIM16_1 : constant GPIO_Alternate_Function := 1; GPIO_AF_TIM17_1 : constant GPIO_Alternate_Function := 1; GPIO_AF_LPTIM1_1 : constant GPIO_Alternate_Function := 1; GPIO_AF_I2C1_2 : constant GPIO_Alternate_Function := 2; GPIO_AF_I2C3_2 : constant GPIO_Alternate_Function := 2; GPIO_AF_TIM1_2 : constant GPIO_Alternate_Function := 2; GPIO_AF_TIM2_2 : constant GPIO_Alternate_Function := 2; GPIO_AF_TIM3_2 : constant GPIO_Alternate_Function := 2; GPIO_AF_TIM4_2 : constant GPIO_Alternate_Function := 2; GPIO_AF_TIM5_2 : constant GPIO_Alternate_Function := 2; GPIO_AF_TIM8_2 : constant GPIO_Alternate_Function := 2; GPIO_AF_TIM15_2 : constant GPIO_Alternate_Function := 2; GPIO_AF_TIM20_2 : constant GPIO_Alternate_Function := 2; GPIO_AF_COMP1_2 : constant GPIO_Alternate_Function := 2; GPIO_AF_SPI1_3 : constant GPIO_Alternate_Function := 3; GPIO_AF_I2C3_3 : constant GPIO_Alternate_Function := 3; GPIO_AF_I2C4_3 : constant GPIO_Alternate_Function := 3; GPIO_AF_SAI1_3 : constant GPIO_Alternate_Function := 3; GPIO_AF_USB_3 : constant GPIO_Alternate_Function := 3; GPIO_AF_HRTIM1_3 : constant GPIO_Alternate_Function := 3; GPIO_AF_TIM8_3 : constant GPIO_Alternate_Function := 3; GPIO_AF_TIM15_3 : constant GPIO_Alternate_Function := 3; GPIO_AF_TIM20_3 : constant GPIO_Alternate_Function := 3; GPIO_AF_COMP3_3 : constant GPIO_Alternate_Function := 3; GPIO_AF_I2C1_4 : constant GPIO_Alternate_Function := 4; GPIO_AF_I2C2_4 : constant GPIO_Alternate_Function := 4; GPIO_AF_I2C3_4 : constant GPIO_Alternate_Function := 4; GPIO_AF_I2C4_4 : constant GPIO_Alternate_Function := 4; GPIO_AF_TIM1_4 : constant GPIO_Alternate_Function := 4; GPIO_AF_TIM8_4 : constant GPIO_Alternate_Function := 4; GPIO_AF_TIM16_4 : constant GPIO_Alternate_Function := 4; GPIO_AF_TIM17_4 : constant GPIO_Alternate_Function := 4; GPIO_AF_SPI1_5 : constant GPIO_Alternate_Function := 5; GPIO_AF_SPI2_5 : constant GPIO_Alternate_Function := 5; GPIO_AF_SPI3_5 : constant GPIO_Alternate_Function := 5; GPIO_AF_SPI4_5 : constant GPIO_Alternate_Function := 5; GPIO_AF_I2S2_5 : constant GPIO_Alternate_Function := 5; GPIO_AF_I2S3_5 : constant GPIO_Alternate_Function := 5; GPIO_AF_I2C4_5 : constant GPIO_Alternate_Function := 5; GPIO_AF_UART4_5 : constant GPIO_Alternate_Function := 5; GPIO_AF_UART5_5 : constant GPIO_Alternate_Function := 5; GPIO_AF_TIM8_5 : constant GPIO_Alternate_Function := 6; GPIO_AF_INFRARED_5 : constant GPIO_Alternate_Function := 6; GPIO_AF_SPI2_6 : constant GPIO_Alternate_Function := 6; GPIO_AF_SPI3_6 : constant GPIO_Alternate_Function := 6; GPIO_AF_I2S2_6 : constant GPIO_Alternate_Function := 6; GPIO_AF_I2S3_6 : constant GPIO_Alternate_Function := 6; GPIO_AF_TIM1_6 : constant GPIO_Alternate_Function := 6; GPIO_AF_TIM5_6 : constant GPIO_Alternate_Function := 6; GPIO_AF_TIM8_6 : constant GPIO_Alternate_Function := 6; GPIO_AF_TIM20_6 : constant GPIO_Alternate_Function := 6; GPIO_AF_INFRARED_6 : constant GPIO_Alternate_Function := 6; GPIO_AF_USART1_7 : constant GPIO_Alternate_Function := 7; GPIO_AF_USART2_7 : constant GPIO_Alternate_Function := 7; GPIO_AF_USART3_7 : constant GPIO_Alternate_Function := 7; GPIO_AF_FDCAN_7 : constant GPIO_Alternate_Function := 7; GPIO_AF_COMP5_7 : constant GPIO_Alternate_Function := 7; GPIO_AF_COMP6_7 : constant GPIO_Alternate_Function := 7; GPIO_AF_COMP7_7 : constant GPIO_Alternate_Function := 7; GPIO_AF_I2C3_8 : constant GPIO_Alternate_Function := 8; GPIO_AF_I2C4_8 : constant GPIO_Alternate_Function := 8; GPIO_AF_UART4_8 : constant GPIO_Alternate_Function := 8; GPIO_AF_UART5_8 : constant GPIO_Alternate_Function := 8; GPIO_AF_LPUART1_8 : constant GPIO_Alternate_Function := 8; GPIO_AF_COMP1_8 : constant GPIO_Alternate_Function := 8; GPIO_AF_COMP2_8 : constant GPIO_Alternate_Function := 8; GPIO_AF_COMP3_8 : constant GPIO_Alternate_Function := 8; GPIO_AF_COMP4_8 : constant GPIO_Alternate_Function := 8; GPIO_AF_COMP5_8 : constant GPIO_Alternate_Function := 8; GPIO_AF_COMP6_8 : constant GPIO_Alternate_Function := 8; GPIO_AF_COMP7_8 : constant GPIO_Alternate_Function := 8; GPIO_AF_FDCAN1_9 : constant GPIO_Alternate_Function := 9; GPIO_AF_FDCAN2_9 : constant GPIO_Alternate_Function := 9; GPIO_AF_TIM1_9 : constant GPIO_Alternate_Function := 9; GPIO_AF_TIM8_9 : constant GPIO_Alternate_Function := 9; GPIO_AF_TIM15_9 : constant GPIO_Alternate_Function := 9; GPIO_AF_SPI1_10 : constant GPIO_Alternate_Function := 10; GPIO_AF_TIM1_10 : constant GPIO_Alternate_Function := 10; GPIO_AF_TIM2_10 : constant GPIO_Alternate_Function := 10; GPIO_AF_TIM3_10 : constant GPIO_Alternate_Function := 10; GPIO_AF_TIM4_10 : constant GPIO_Alternate_Function := 10; GPIO_AF_TIM7_10 : constant GPIO_Alternate_Function := 10; GPIO_AF_TIM8_10 : constant GPIO_Alternate_Function := 10; GPIO_AF_LPTIM1_11 : constant GPIO_Alternate_Function := 11; GPIO_AF_TIM1_11 : constant GPIO_Alternate_Function := 11; GPIO_AF_TIM8_11 : constant GPIO_Alternate_Function := 11; GPIO_AF_FDCAN1_11 : constant GPIO_Alternate_Function := 11; GPIO_AF_FDCAN3_11 : constant GPIO_Alternate_Function := 11; GPIO_AF_FMC_12 : constant GPIO_Alternate_Function := 12; GPIO_AF_LPUART1_12 : constant GPIO_Alternate_Function := 12; GPIO_AF_SAI1_12 : constant GPIO_Alternate_Function := 12; GPIO_AF_HRTIM1_12 : constant GPIO_Alternate_Function := 12; GPIO_AF_TIM1_12 : constant GPIO_Alternate_Function := 12; GPIO_AF_SAI1_13 : constant GPIO_Alternate_Function := 13; GPIO_AF_HRTIM1_13 : constant GPIO_Alternate_Function := 13; GPIO_AF_OPAMP2_13 : constant GPIO_Alternate_Function := 13; GPIO_AF_UART4_14 : constant GPIO_Alternate_Function := 14; GPIO_AF_UART5_14 : constant GPIO_Alternate_Function := 14; GPIO_AF_SAI1_14 : constant GPIO_Alternate_Function := 14; GPIO_AF_TIM2_14 : constant GPIO_Alternate_Function := 14; GPIO_AF_TIM15_14 : constant GPIO_Alternate_Function := 14; GPIO_AF_UCPD1_14 : constant GPIO_Alternate_Function := 14; GPIO_AF_EVENTOUT_15 : constant GPIO_Alternate_Function := 15; end STM32.Device;
44.786495
80
0.686075
10d103a5d395c3c5af398d7368d9da7d47924fd8
15,682
ads
Ada
src/keystore.ads
thierr26/ada-keystore
25099a9df3ce9b48a401148eb1b84442011759a0
[ "Apache-2.0" ]
null
null
null
src/keystore.ads
thierr26/ada-keystore
25099a9df3ce9b48a401148eb1b84442011759a0
[ "Apache-2.0" ]
null
null
null
src/keystore.ads
thierr26/ada-keystore
25099a9df3ce9b48a401148eb1b84442011759a0
[ "Apache-2.0" ]
null
null
null
----------------------------------------------------------------------- -- keystore -- Ada keystore -- Copyright (C) 2019 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Encoders; with Util.Streams; with Ada.Streams; with Ada.Calendar; with Ada.Containers.Indefinite_Ordered_Maps; with Interfaces; with GNAT.Regpat; private with Ada.Exceptions; private with Ada.Finalization; private with Util.Executors; -- == Keystore == -- The `Keystore` package provides operations to store information in secure wallets and -- protect the stored information by encrypting the content. It is necessary to know one -- of the wallet password to access its content. Wallets are protected by a master key -- using AES-256 and the wallet master key is protected by a user password. The wallet -- defines up to 7 slots that identify a password key that is able to unlock the master key. -- To open a wallet, it is necessary to unlock one of the 7 slots by providing the correct -- password. Wallet key slots are protected by the user's password and the PBKDF2-HMAC-256 -- algorithm, a random salt, a random counter and they are encrypted using AES-256. -- -- === Creation === -- To create a keystore you will first declare a `Wallet_File` instance. You will also need -- a password that will be used to protect the wallet master key. -- -- with Keystore.Files; -- ... -- WS : Keystore.Files.Wallet_File; -- Pass : Keystore.Secret_Key := Keystore.Create ("There was no choice but to be pioneers"); -- -- You can then create the keystore file by using the `Create` operation: -- -- WS.Create ("secure.akt", Pass); -- -- === Storing === -- Values stored in the wallet are protected by their own encryption keys using AES-256. -- The encryption key is generated when the value is added to the wallet by using the `Add` -- operation. -- -- WS.Add ("Grace Hopper", "If it's a good idea, go ahead and do it."); -- -- The `Get` function allows to retrieve the value. The value is decrypted only when the `Get` -- operation is called. -- -- Citation : constant String := WS.Get ("Grace Hopper"); -- -- The `Delete` procedure can be used to remove the value. When the value is removed, -- the encryption key and the data are erased. -- -- WS.Delete ("Grace Hopper"); -- package Keystore is subtype Secret_Key is Util.Encoders.Secret_Key; subtype Key_Length is Util.Encoders.Key_Length; function Create (Password : in String) return Secret_Key renames Util.Encoders.Create; -- Exception raised when a keystore entry was not found. Not_Found : exception; -- Exception raised when a keystore entry already exist. Name_Exist : exception; -- Exception raised when the wallet cannot be opened with the given password. Bad_Password : exception; -- Exception raised by Set_Key when there is no available free slot to add a new key. No_Key_Slot : exception; -- Exception raised by Set_Header_Data when the slot index is out of range. No_Header_Slot : exception; -- Exception raised when trying to get/set an item which is a wallet. No_Content : exception; -- The key slot is used (it cannot be erased unless the operation is forced). Used_Key_Slot : exception; -- Exception raised when the wallet is corrupted. Corrupted : exception; -- Exception raised when opening the keystore and the header is invalid. Invalid_Keystore : exception; -- Exception raised when there is a configuration issue. Invalid_Config : exception; -- Invalid data block when reading the wallet. Invalid_Block : exception; -- Invalid HMAC signature when reading a block. Invalid_Signature : exception; -- Invalid storage identifier when loading a wallet data block. Invalid_Storage : exception; -- The wallet state. type State_Type is (S_INVALID, S_PROTECTED, S_OPEN, S_CLOSED); -- Identifies the type of data stored for a named entry in the wallet. type Entry_Type is (T_INVALID, T_STRING, T_FILE, T_DIRECTORY, T_BINARY, T_WALLET); type Filter_Type is array (Entry_Type) of Boolean; -- Defines the key operation mode. type Mode_Type is (KEY_ADD, KEY_REPLACE, KEY_REMOVE, KEY_REMOVE_LAST); -- Defines the key slot number. type Key_Slot is new Positive range 1 .. 7; -- Defines which key slot is used. type Key_Slot_Allocation is array (Key_Slot) of Boolean; type Header_Slot_Count_Type is new Natural range 0 .. 32; subtype Header_Slot_Index_Type is Header_Slot_Count_Type range 1 .. Header_Slot_Count_Type'Last; -- Header slot type is a 16-bit values that identifies the data type slot. type Header_Slot_Type is new Interfaces.Unsigned_16; SLOT_EMPTY : constant Header_Slot_Type := 0; SLOT_KEY_GPG1 : constant Header_Slot_Type := 1; -- Contains key encrypted using GPG1 SLOT_KEY_GPG2 : constant Header_Slot_Type := 2; -- Contains key encrypted using GPG2 type UUID_Type is private; function To_String (UUID : in UUID_Type) return String; type Wallet_Info is record UUID : UUID_Type; Header_Count : Header_Slot_Count_Type := 0; Storage_Count : Natural := 0; end record; -- Information about a keystore entry. type Entry_Info is record Size : Interfaces.Unsigned_64 := 0; Kind : Entry_Type := T_INVALID; Create_Date : Ada.Calendar.Time; Update_Date : Ada.Calendar.Time; Block_Count : Natural := 0; end record; package Entry_Maps is new Ada.Containers.Indefinite_Ordered_Maps (Key_Type => String, Element_Type => Entry_Info); subtype Entry_Map is Entry_Maps.Map; subtype Entry_Cursor is Entry_Maps.Cursor; -- Task manager to run encryption and decryption work. -- It can be assigned to the wallet through the `Set_Task_Manager` procedure. type Task_Manager (Count : Positive) is limited private; type Task_Manager_Access is access all Task_Manager; -- Start the tasks of the task manager. procedure Start (Manager : in Task_Manager_Access); -- Stop the tasks. procedure Stop (Manager : in Task_Manager_Access); -- Configuration to create or open a keystore. type Wallet_Config is record Randomize : Boolean := True; Overwrite : Boolean := False; Max_Counter : Positive := 300_000; Min_Counter : Positive := 100_000; Max_File_Size : Positive := Positive'Last; Storage_Count : Positive := 1; end record; -- Fast configuration but less secure. Unsecure_Config : constant Wallet_Config := (Randomize => False, Overwrite => False, Min_Counter => 10_000, Max_Counter => 100_000, Max_File_Size => Positive'Last, Storage_Count => 1); -- Slow configuration but more secure. Secure_Config : constant Wallet_Config := (Randomize => True, Overwrite => False, Min_Counter => 500_000, Max_Counter => 1_000_000, Max_File_Size => Positive'Last, Storage_Count => 1); type Wallet_Stats is record UUID : UUID_Type; Keys : Key_Slot_Allocation := (others => False); Entry_Count : Natural := 0; Total_Size : Natural := 0; Block_Count : Natural := 0; Free_Block_Count : Natural := 0; Storage_Count : Natural := 0; end record; -- The wallet base type. type Wallet is abstract tagged limited private; -- Return True if the container was configured. function Is_Configured (Container : in Wallet) return Boolean is abstract; -- Return True if the container can be accessed. function Is_Open (Container : in Wallet) return Boolean is abstract; -- Get the wallet state. function State (Container : in Wallet) return State_Type is abstract; -- Set the key to encrypt and decrypt the container meta data. procedure Set_Key (Container : in out Wallet; Secret : in Secret_Key; New_Secret : in Secret_Key; Config : in Wallet_Config := Secure_Config; Mode : in Mode_Type := KEY_REPLACE) is abstract with Pre'Class => Container.Is_Open; -- Return True if the container contains the given named entry. function Contains (Container : in Wallet; Name : in String) return Boolean is abstract with Pre'Class => Container.Is_Open; -- Add in the wallet the named entry and associate it the content. -- The content is encrypted in AES-CBC with a secret key and an IV vector -- that is created randomly for the new named entry. procedure Add (Container : in out Wallet; Name : in String; Content : in String) with Pre => Wallet'Class (Container).Is_Open, Post => Wallet'Class (Container).Contains (Name); -- Add in the wallet the named entry and associate it the content. -- The content is encrypted in AES-CBC with a secret key and an IV vector -- that is created randomly for the new named entry. procedure Add (Container : in out Wallet; Name : in String; Kind : in Entry_Type := T_BINARY; Content : in Ada.Streams.Stream_Element_Array) is abstract with Pre'Class => Container.Is_Open, Post'Class => Container.Contains (Name); procedure Add (Container : in out Wallet; Name : in String; Kind : in Entry_Type := T_BINARY; Input : in out Util.Streams.Input_Stream'Class) is abstract with Pre'Class => Container.Is_Open, Post'Class => Container.Contains (Name); -- Add or update in the wallet the named entry and associate it the content. -- The content is encrypted in AES-CBC with a secret key and an IV vector -- that is created randomly for the new or updated named entry. procedure Set (Container : in out Wallet; Name : in String; Kind : in Entry_Type := T_BINARY; Content : in Ada.Streams.Stream_Element_Array) is abstract with Pre'Class => Container.Is_Open, Post'Class => Container.Contains (Name); -- Add or update in the wallet the named entry and associate it the content. -- The content is encrypted in AES-CBC with a secret key and an IV vector -- that is created randomly for the new or updated named entry. procedure Set (Container : in out Wallet; Name : in String; Content : in String) with Pre => Wallet'Class (Container).Is_Open, Post => Wallet'Class (Container).Contains (Name); procedure Set (Container : in out Wallet; Name : in String; Kind : in Entry_Type := T_BINARY; Input : in out Util.Streams.Input_Stream'Class) is abstract with Pre'Class => Container.Is_Open, Post'Class => Container.Contains (Name); -- Update in the wallet the named entry and associate it the new content. -- The secret key and IV vectors are not changed. procedure Update (Container : in out Wallet; Name : in String; Content : in String) with Pre => Wallet'Class (Container).Is_Open, Post => Wallet'Class (Container).Contains (Name); -- Update in the wallet the named entry and associate it the new content. -- The secret key and IV vectors are not changed. procedure Update (Container : in out Wallet; Name : in String; Kind : in Entry_Type := T_BINARY; Content : in Ada.Streams.Stream_Element_Array) is abstract with Pre'Class => Container.Is_Open, Post'Class => Container.Contains (Name); -- Delete from the wallet the named entry. procedure Delete (Container : in out Wallet; Name : in String) is abstract with Pre'Class => Container.Is_Open, Post'Class => not Container.Contains (Name); -- Get from the wallet the named entry. function Get (Container : in out Wallet; Name : in String) return String with Pre => Wallet'Class (Container).Is_Open; procedure Get (Container : in out Wallet; Name : in String; Info : out Entry_Info; Content : out Ada.Streams.Stream_Element_Array) is abstract with Pre'Class => Wallet'Class (Container).Is_Open; -- Write in the output stream the named entry value from the wallet. procedure Get (Container : in out Wallet; Name : in String; Output : in out Util.Streams.Output_Stream'Class) is abstract with Pre'Class => Container.Is_Open; -- Get the list of entries contained in the wallet that correspond to the optional filter. procedure List (Container : in out Wallet; Filter : in Filter_Type := (others => True); Content : out Entry_Map) is abstract with Pre'Class => Container.Is_Open; -- Get the list of entries contained in the wallet that correspond to the optiona filter -- and whose name matches the pattern. procedure List (Container : in out Wallet; Pattern : in GNAT.Regpat.Pattern_Matcher; Filter : in Filter_Type := (others => True); Content : out Entry_Map) is abstract with Pre'Class => Container.Is_Open; function Find (Container : in out Wallet; Name : in String) return Entry_Info is abstract with Pre'Class => Container.Is_Open; DEFAULT_WALLET_KEY : constant String := "If you can't give me poetry, can't you give me poetical science?"; private type UUID_Type is array (1 .. 4) of Interfaces.Unsigned_32; type Wallet_Identifier is new Positive; type Wallet_Entry_Index is new Interfaces.Unsigned_32 range 1 .. Interfaces.Unsigned_32'Last; type Wallet is abstract limited new Ada.Finalization.Limited_Controlled with null record; type Work_Type is limited interface; type Work_Type_Access is access all Work_Type'Class; procedure Execute (Work : in out Work_Type) is abstract; procedure Execute (Work : in out Work_Type_Access); procedure Error (Work : in out Work_Type_Access; Ex : in Ada.Exceptions.Exception_Occurrence); package Executors is new Util.Executors (Work_Type => Work_Type_Access, Execute => Execute, Error => Error); type Task_Manager (Count : Positive) is limited new Executors.Executor_Manager (Count) with null record; procedure Execute (Manager : in out Task_Manager; Work : in Work_Type_Access); end Keystore;
40.732468
99
0.65285
df18bfaeb4b9f35b18e8c01cd80354fd437be852
5,200
ads
Ada
source/nodes/program-nodes-number_declarations.ads
optikos/oasis
9f64d46d26d964790d69f9db681c874cfb3bf96d
[ "MIT" ]
null
null
null
source/nodes/program-nodes-number_declarations.ads
optikos/oasis
9f64d46d26d964790d69f9db681c874cfb3bf96d
[ "MIT" ]
null
null
null
source/nodes/program-nodes-number_declarations.ads
optikos/oasis
9f64d46d26d964790d69f9db681c874cfb3bf96d
[ "MIT" ]
2
2019-09-14T23:18:50.000Z
2019-10-02T10:11:40.000Z
-- Copyright (c) 2019 Maxim Reznik <[email protected]> -- -- SPDX-License-Identifier: MIT -- License-Filename: LICENSE ------------------------------------------------------------- with Program.Elements.Defining_Identifiers; with Program.Lexical_Elements; with Program.Elements.Expressions; with Program.Elements.Number_Declarations; with Program.Element_Visitors; package Program.Nodes.Number_Declarations is pragma Preelaborate; type Number_Declaration is new Program.Nodes.Node and Program.Elements.Number_Declarations.Number_Declaration and Program.Elements.Number_Declarations.Number_Declaration_Text with private; function Create (Names : not null Program.Elements.Defining_Identifiers .Defining_Identifier_Vector_Access; Colon_Token : not null Program.Lexical_Elements .Lexical_Element_Access; Constant_Token : not null Program.Lexical_Elements .Lexical_Element_Access; Assignment_Token : not null Program.Lexical_Elements .Lexical_Element_Access; Expression : not null Program.Elements.Expressions .Expression_Access; Semicolon_Token : not null Program.Lexical_Elements .Lexical_Element_Access) return Number_Declaration; type Implicit_Number_Declaration is new Program.Nodes.Node and Program.Elements.Number_Declarations.Number_Declaration with private; function Create (Names : not null Program.Elements.Defining_Identifiers .Defining_Identifier_Vector_Access; Expression : not null Program.Elements.Expressions .Expression_Access; Is_Part_Of_Implicit : Boolean := False; Is_Part_Of_Inherited : Boolean := False; Is_Part_Of_Instance : Boolean := False) return Implicit_Number_Declaration with Pre => Is_Part_Of_Implicit or Is_Part_Of_Inherited or Is_Part_Of_Instance; private type Base_Number_Declaration is abstract new Program.Nodes.Node and Program.Elements.Number_Declarations.Number_Declaration with record Names : not null Program.Elements.Defining_Identifiers .Defining_Identifier_Vector_Access; Expression : not null Program.Elements.Expressions.Expression_Access; end record; procedure Initialize (Self : aliased in out Base_Number_Declaration'Class); overriding procedure Visit (Self : not null access Base_Number_Declaration; Visitor : in out Program.Element_Visitors.Element_Visitor'Class); overriding function Names (Self : Base_Number_Declaration) return not null Program.Elements.Defining_Identifiers .Defining_Identifier_Vector_Access; overriding function Expression (Self : Base_Number_Declaration) return not null Program.Elements.Expressions.Expression_Access; overriding function Is_Number_Declaration_Element (Self : Base_Number_Declaration) return Boolean; overriding function Is_Declaration_Element (Self : Base_Number_Declaration) return Boolean; type Number_Declaration is new Base_Number_Declaration and Program.Elements.Number_Declarations.Number_Declaration_Text with record Colon_Token : not null Program.Lexical_Elements .Lexical_Element_Access; Constant_Token : not null Program.Lexical_Elements .Lexical_Element_Access; Assignment_Token : not null Program.Lexical_Elements .Lexical_Element_Access; Semicolon_Token : not null Program.Lexical_Elements .Lexical_Element_Access; end record; overriding function To_Number_Declaration_Text (Self : aliased in out Number_Declaration) return Program.Elements.Number_Declarations .Number_Declaration_Text_Access; overriding function Colon_Token (Self : Number_Declaration) return not null Program.Lexical_Elements.Lexical_Element_Access; overriding function Constant_Token (Self : Number_Declaration) return not null Program.Lexical_Elements.Lexical_Element_Access; overriding function Assignment_Token (Self : Number_Declaration) return not null Program.Lexical_Elements.Lexical_Element_Access; overriding function Semicolon_Token (Self : Number_Declaration) return not null Program.Lexical_Elements.Lexical_Element_Access; type Implicit_Number_Declaration is new Base_Number_Declaration with record Is_Part_Of_Implicit : Boolean; Is_Part_Of_Inherited : Boolean; Is_Part_Of_Instance : Boolean; end record; overriding function To_Number_Declaration_Text (Self : aliased in out Implicit_Number_Declaration) return Program.Elements.Number_Declarations .Number_Declaration_Text_Access; overriding function Is_Part_Of_Implicit (Self : Implicit_Number_Declaration) return Boolean; overriding function Is_Part_Of_Inherited (Self : Implicit_Number_Declaration) return Boolean; overriding function Is_Part_Of_Instance (Self : Implicit_Number_Declaration) return Boolean; end Program.Nodes.Number_Declarations;
34.899329
78
0.737308
df97be257b09b5024d3c0811828446616bce2f3e
387
adb
Ada
Sources/Interfaces/screenshots.adb
ForYouEyesOnly/Space-Convoy
be4904f6a02695f7c4c5c3c965f4871cd3250003
[ "MIT" ]
1
2019-09-21T09:40:34.000Z
2019-09-21T09:40:34.000Z
Sources/Interfaces/screenshots.adb
ForYouEyesOnly/Space-Convoy
be4904f6a02695f7c4c5c3c965f4871cd3250003
[ "MIT" ]
null
null
null
Sources/Interfaces/screenshots.adb
ForYouEyesOnly/Space-Convoy
be4904f6a02695f7c4c5c3c965f4871cd3250003
[ "MIT" ]
1
2019-09-25T12:29:27.000Z
2019-09-25T12:29:27.000Z
-- -- Jan & Uwe R. Zimmer, Australia, July 2011 -- with GL.IO; use GL.IO; package body Screenshots is Screen_Shot_Count : Positive := 1; --------------- -- Take_Shot -- --------------- procedure Take_Shot is begin Screenshot (Integer'Image (Screen_Shot_Count) & ".bmp"); Screen_Shot_Count := Screen_Shot_Count + 1; end Take_Shot; end Screenshots;
16.826087
62
0.599483
dc554e0aa74aae7025b6118565a8e462f9f6918b
38,352
ads
Ada
src/hershey_fonts/giza-hershey_fonts-symbolic.ads
Fabien-Chouteau/Giza
9f6c167666dbba8f0e5f0ba3e33825c0b3f399bd
[ "BSD-3-Clause" ]
7
2017-10-18T02:40:24.000Z
2020-12-19T22:41:19.000Z
src/hershey_fonts/giza-hershey_fonts-symbolic.ads
Fabien-Chouteau/Giza
9f6c167666dbba8f0e5f0ba3e33825c0b3f399bd
[ "BSD-3-Clause" ]
null
null
null
src/hershey_fonts/giza-hershey_fonts-symbolic.ads
Fabien-Chouteau/Giza
9f6c167666dbba8f0e5f0ba3e33825c0b3f399bd
[ "BSD-3-Clause" ]
2
2019-05-06T08:30:26.000Z
2020-11-22T11:27:27.000Z
package Giza.Hershey_Fonts.Symbolic is Font : constant Giza.Font.Ref_Const; private Glyph_0 : aliased constant Glyph := (Number_Of_Vectors => 0, Width => 16, Height => 0, Y_Offset => 0, X_Offset => -8, Vects => (others => (Raise_Pen))); Glyph_1 : aliased constant Glyph := (Number_Of_Vectors => 3, Width => 28, Height => 0, Y_Offset => 0, X_Offset => -14, Vects => (Raise_Pen, (-14, 0), (14, 0))); Glyph_2 : aliased constant Glyph := (Number_Of_Vectors => 3, Width => 28, Height => 28, Y_Offset => -14, X_Offset => -14, Vects => (Raise_Pen, (-14, 14), (14, -14))); Glyph_3 : aliased constant Glyph := (Number_Of_Vectors => 3, Width => 0, Height => 40, Y_Offset => -20, X_Offset => 0, Vects => (Raise_Pen, (0, -20), (0, 20))); Glyph_4 : aliased constant Glyph := (Number_Of_Vectors => 3, Width => 28, Height => 28, Y_Offset => -14, X_Offset => -14, Vects => (Raise_Pen, (-14, -14), (14, 14))); Glyph_5 : aliased constant Glyph := (Number_Of_Vectors => 3, Width => 28, Height => 0, Y_Offset => 0, X_Offset => -14, Vects => (Raise_Pen, (-14, 0), (14, 0))); Glyph_6 : aliased constant Glyph := (Number_Of_Vectors => 3, Width => 24, Height => 14, Y_Offset => -7, X_Offset => -12, Vects => (Raise_Pen, (-12, 7), (12, -7))); Glyph_7 : aliased constant Glyph := (Number_Of_Vectors => 3, Width => 14, Height => 24, Y_Offset => -12, X_Offset => -7, Vects => (Raise_Pen, (-7, 12), (7, -12))); Glyph_8 : aliased constant Glyph := (Number_Of_Vectors => 3, Width => 0, Height => 28, Y_Offset => -14, X_Offset => 0, Vects => (Raise_Pen, (0, -14), (0, 14))); Glyph_9 : aliased constant Glyph := (Number_Of_Vectors => 3, Width => 14, Height => 24, Y_Offset => -12, X_Offset => -7, Vects => (Raise_Pen, (-7, -12), (7, 12))); Glyph_10 : aliased constant Glyph := (Number_Of_Vectors => 3, Width => 24, Height => 14, Y_Offset => -7, X_Offset => -12, Vects => (Raise_Pen, (-12, -7), (12, 7))); Glyph_11 : aliased constant Glyph := (Number_Of_Vectors => 3, Width => 14, Height => 0, Y_Offset => 0, X_Offset => -7, Vects => (Raise_Pen, (-7, 0), (7, 0))); Glyph_12 : aliased constant Glyph := (Number_Of_Vectors => 3, Width => 10, Height => 10, Y_Offset => -5, X_Offset => -5, Vects => (Raise_Pen, (-5, 5), (5, -5))); Glyph_13 : aliased constant Glyph := (Number_Of_Vectors => 3, Width => 0, Height => 14, Y_Offset => -7, X_Offset => 0, Vects => (Raise_Pen, (0, -7), (0, 7))); Glyph_14 : aliased constant Glyph := (Number_Of_Vectors => 3, Width => 10, Height => 10, Y_Offset => -5, X_Offset => -5, Vects => (Raise_Pen, (-5, -5), (5, 5))); Glyph_15 : aliased constant Glyph := (Number_Of_Vectors => 8, Width => 11, Height => 11, Y_Offset => -11, X_Offset => -11, Vects => (Raise_Pen, (0, -11), (-2, -11), (-5, -10), (-8, -8), (-10, -5), (-11, -2), (-11, 0))); Glyph_16 : aliased constant Glyph := (Number_Of_Vectors => 8, Width => 11, Height => 11, Y_Offset => 0, X_Offset => -11, Vects => (Raise_Pen, (-11, 0), (-11, 2), (-10, 5), (-8, 8), (-5, 10), (-2, 11), (0, 11))); Glyph_17 : aliased constant Glyph := (Number_Of_Vectors => 8, Width => 11, Height => 11, Y_Offset => 0, X_Offset => 0, Vects => (Raise_Pen, (0, 11), (2, 11), (5, 10), (8, 8), (10, 5), (11, 2), (11, 0))); Glyph_18 : aliased constant Glyph := (Number_Of_Vectors => 8, Width => 11, Height => 11, Y_Offset => -11, X_Offset => 0, Vects => (Raise_Pen, (11, 0), (11, -2), (10, -5), (8, -8), (5, -10), (2, -11), (0, -11))); Glyph_19 : aliased constant Glyph := (Number_Of_Vectors => 9, Width => 28, Height => 5, Y_Offset => -3, X_Offset => -14, Vects => (Raise_Pen, (-14, -3), (-11, -1), (-7, 1), (-2, 2), (2, 2), (7, 1), (11, -1), (14, -3))); Glyph_20 : aliased constant Glyph := (Number_Of_Vectors => 9, Width => 5, Height => 28, Y_Offset => -14, X_Offset => -2, Vects => (Raise_Pen, (3, -14), (1, -11), (-1, -7), (-2, -2), (-2, 2), (-1, 7), (1, 11), (3, 14))); Glyph_21 : aliased constant Glyph := (Number_Of_Vectors => 9, Width => 5, Height => 28, Y_Offset => -14, X_Offset => -3, Vects => (Raise_Pen, (-3, -14), (-1, -11), (1, -7), (2, -2), (2, 2), (1, 7), (-1, 11), (-3, 14))); Glyph_22 : aliased constant Glyph := (Number_Of_Vectors => 9, Width => 28, Height => 5, Y_Offset => -2, X_Offset => -14, Vects => (Raise_Pen, (-14, 3), (-11, 1), (-7, -1), (-2, -2), (2, -2), (7, -1), (11, 1), (14, 3))); Glyph_23 : aliased constant Glyph := (Number_Of_Vectors => 5, Width => 14, Height => 16, Y_Offset => -8, X_Offset => -7, Vects => (Raise_Pen, (0, -8), (7, -4), (-7, 4), (0, 8))); Glyph_24 : aliased constant Glyph := (Number_Of_Vectors => 5, Width => 16, Height => 14, Y_Offset => -7, X_Offset => -8, Vects => (Raise_Pen, (-8, 0), (-4, -7), (4, 7), (8, 0))); Glyph_25 : aliased constant Glyph := (Number_Of_Vectors => 5, Width => 14, Height => 8, Y_Offset => -4, X_Offset => -7, Vects => (Raise_Pen, (-7, 4), (-7, -4), (7, 4), (7, -4))); Glyph_26 : aliased constant Glyph := (Number_Of_Vectors => 5, Width => 16, Height => 12, Y_Offset => -6, X_Offset => -8, Vects => (Raise_Pen, (-6, 6), (-8, -2), (8, 2), (6, -6))); Glyph_27 : aliased constant Glyph := (Number_Of_Vectors => 23, Width => 16, Height => 20, Y_Offset => -9, X_Offset => -8, Vects => (Raise_Pen, (-8, 11), (-6, 11), (-3, 10), (-1, 9), (2, 6), (3, 4), (4, 1), (4, -3), (3, -6), (2, -8), (1, -9), (-1, -9), (-2, -8), (-3, -6), (-4, -3), (-4, 1), (-3, 4), (-2, 6), (1, 9), (3, 10), (6, 11), (8, 11))); Glyph_28 : aliased constant Glyph := (Number_Of_Vectors => 23, Width => 20, Height => 16, Y_Offset => -8, X_Offset => -9, Vects => (Raise_Pen, (11, 8), (11, 6), (10, 3), (9, 1), (6, -2), (4, -3), (1, -4), (-3, -4), (-6, -3), (-8, -2), (-9, -1), (-9, 1), (-8, 2), (-6, 3), (-3, 4), (1, 4), (4, 3), (6, 2), (9, -1), (10, -3), (11, -6), (11, -8))); Glyph_29 : aliased constant Glyph := (Number_Of_Vectors => 23, Width => 16, Height => 20, Y_Offset => -11, X_Offset => -8, Vects => (Raise_Pen, (8, -11), (6, -11), (3, -10), (1, -9), (-2, -6), (-3, -4), (-4, -1), (-4, 3), (-3, 6), (-2, 8), (-1, 9), (1, 9), (2, 8), (3, 6), (4, 3), (4, -1), (3, -4), (2, -6), (-1, -9), (-3, -10), (-6, -11), (-8, -11))); Glyph_30 : aliased constant Glyph := (Number_Of_Vectors => 23, Width => 20, Height => 16, Y_Offset => -8, X_Offset => -11, Vects => (Raise_Pen, (-11, -8), (-11, -6), (-10, -3), (-9, -1), (-6, 2), (-4, 3), (-1, 4), (3, 4), (6, 3), (8, 2), (9, 1), (9, -1), (8, -2), (6, -3), (3, -4), (-1, -4), (-4, -3), (-6, -2), (-9, 1), (-10, 3), (-11, 6), (-11, 8))); Glyph_31 : aliased constant Glyph := (Number_Of_Vectors => 21, Width => 22, Height => 18, Y_Offset => -6, X_Offset => -13, Vects => (Raise_Pen, (-13, -2), (-12, 0), (-10, 2), (-8, 3), (-5, 4), (-1, 4), (3, 3), (6, 1), (8, -2), (9, -4), (8, -6), (5, -6), (1, -5), (-1, -4), (-4, -2), (-6, 1), (-7, 4), (-7, 7), (-6, 10), (-5, 12))); Glyph_32 : aliased constant Glyph := (Number_Of_Vectors => 19, Width => 20, Height => 20, Y_Offset => -7, X_Offset => -13, Vects => (Raise_Pen, (-13, 2), (-10, 4), (-7, 5), (-2, 5), (1, 4), (4, 2), (6, -1), (7, -4), (7, -6), (6, -7), (4, -7), (1, -6), (-2, -4), (-4, -1), (-5, 2), (-5, 7), (-4, 10), (-2, 13))); Glyph_33 : aliased constant Glyph := (Number_Of_Vectors => 26, Width => 6, Height => 6, Y_Offset => -3, X_Offset => -3, Vects => (Raise_Pen, (-1, -3), (-3, -1), (-3, 1), (-1, 3), (1, 3), (3, 1), (3, -1), (1, -3), (-1, -3), Raise_Pen, (-1, -2), (-2, -1), (-2, 1), (-1, 2), (1, 2), (2, 1), (2, -1), (1, -2), (-1, -2), Raise_Pen, (0, -1), (-1, 0), (0, 1), (1, 0), (0, -1))); Glyph_34 : aliased constant Glyph := (Number_Of_Vectors => 11, Width => 5, Height => 10, Y_Offset => -5, X_Offset => 0, Vects => (Raise_Pen, (0, -5), (1, -5), (3, -4), (4, -3), (5, -1), (5, 1), (4, 3), (3, 4), (1, 5), (0, 5))); Glyph_35 : aliased constant Glyph := (Number_Of_Vectors => 9, Width => 28, Height => 0, Y_Offset => 0, X_Offset => -14, Vects => (Raise_Pen, (-14, 0), (-8, 0), Raise_Pen, (-3, 0), (3, 0), Raise_Pen, (8, 0), (14, 0))); Glyph_36 : aliased constant Glyph := (Number_Of_Vectors => 5, Width => 28, Height => 6, Y_Offset => -3, X_Offset => -14, Vects => (Raise_Pen, (-14, 3), (-14, -3), (14, -3), (14, 3))); Glyph_37 : aliased constant Glyph := (Number_Of_Vectors => 6, Width => 16, Height => 14, Y_Offset => -14, X_Offset => -8, Vects => (Raise_Pen, (0, -14), (-8, 0), Raise_Pen, (0, -14), (8, 0))); Glyph_38 : aliased constant Glyph := (Number_Of_Vectors => 9, Width => 28, Height => 14, Y_Offset => 0, X_Offset => -14, Vects => (Raise_Pen, (-14, 0), (14, 0), Raise_Pen, (-8, 7), (8, 7), Raise_Pen, (-2, 14), (2, 14))); Glyph_39 : aliased constant Glyph := (Number_Of_Vectors => 9, Width => 28, Height => 16, Y_Offset => 0, X_Offset => -14, Vects => (Raise_Pen, (-14, 0), (14, 0), Raise_Pen, (-14, 0), (0, 16), Raise_Pen, (14, 0), (0, 16))); Glyph_40 : aliased constant Glyph := (Number_Of_Vectors => 18, Width => 14, Height => 14, Y_Offset => -7, X_Offset => -7, Vects => (Raise_Pen, (-1, -7), (-4, -6), (-6, -4), (-7, -1), (-7, 1), (-6, 4), (-4, 6), (-1, 7), (1, 7), (4, 6), (6, 4), (7, 1), (7, -1), (6, -4), (4, -6), (1, -7), (-1, -7))); Glyph_41 : aliased constant Glyph := (Number_Of_Vectors => 6, Width => 12, Height => 12, Y_Offset => -6, X_Offset => -6, Vects => (Raise_Pen, (-6, -6), (-6, 6), (6, 6), (6, -6), (-6, -6))); Glyph_42 : aliased constant Glyph := (Number_Of_Vectors => 5, Width => 14, Height => 12, Y_Offset => -8, X_Offset => -7, Vects => (Raise_Pen, (0, -8), (-7, 4), (7, 4), (0, -8))); Glyph_43 : aliased constant Glyph := (Number_Of_Vectors => 6, Width => 12, Height => 20, Y_Offset => -10, X_Offset => -6, Vects => (Raise_Pen, (0, -10), (-6, 0), (0, 10), (6, 0), (0, -10))); Glyph_44 : aliased constant Glyph := (Number_Of_Vectors => 12, Width => 16, Height => 16, Y_Offset => -9, X_Offset => -8, Vects => (Raise_Pen, (0, -9), (-2, -3), (-8, -3), (-3, 1), (-5, 7), (0, 3), (5, 7), (3, 1), (8, -3), (2, -3), (0, -9))); Glyph_45 : aliased constant Glyph := (Number_Of_Vectors => 6, Width => 14, Height => 14, Y_Offset => -7, X_Offset => -7, Vects => (Raise_Pen, (0, -7), (0, 7), Raise_Pen, (-7, 0), (7, 0))); Glyph_46 : aliased constant Glyph := (Number_Of_Vectors => 6, Width => 10, Height => 10, Y_Offset => -5, X_Offset => -5, Vects => (Raise_Pen, (-5, -5), (5, 5), Raise_Pen, (5, -5), (-5, 5))); Glyph_47 : aliased constant Glyph := (Number_Of_Vectors => 9, Width => 10, Height => 12, Y_Offset => -6, X_Offset => -5, Vects => (Raise_Pen, (0, -6), (0, 6), Raise_Pen, (-5, -3), (5, 3), Raise_Pen, (5, -3), (-5, 3))); Glyph_48 : aliased constant Glyph := (Number_Of_Vectors => 35, Width => 8, Height => 8, Y_Offset => -4, X_Offset => -4, Vects => (Raise_Pen, (-1, -4), (-3, -3), (-4, -1), (-4, 1), (-3, 3), (-1, 4), (1, 4), (3, 3), (4, 1), (4, -1), (3, -3), (1, -4), (-1, -4), Raise_Pen, (-3, -1), (-3, 1), Raise_Pen, (-2, -2), (-2, 2), Raise_Pen, (-1, -3), (-1, 3), Raise_Pen, (0, -3), (0, 3), Raise_Pen, (1, -3), (1, 3), Raise_Pen, (2, -2), (2, 2), Raise_Pen, (3, -1), (3, 1))); Glyph_49 : aliased constant Glyph := (Number_Of_Vectors => 27, Width => 8, Height => 8, Y_Offset => -4, X_Offset => -4, Vects => (Raise_Pen, (-4, -4), (-4, 4), (4, 4), (4, -4), (-4, -4), Raise_Pen, (-3, -3), (-3, 3), Raise_Pen, (-2, -3), (-2, 3), Raise_Pen, (-1, -3), (-1, 3), Raise_Pen, (0, -3), (0, 3), Raise_Pen, (1, -3), (1, 3), Raise_Pen, (2, -3), (2, 3), Raise_Pen, (3, -3), (3, 3))); Glyph_50 : aliased constant Glyph := (Number_Of_Vectors => 17, Width => 10, Height => 9, Y_Offset => -6, X_Offset => -5, Vects => (Raise_Pen, (0, -6), (-5, 3), (5, 3), (0, -6), Raise_Pen, (0, -3), (-3, 2), Raise_Pen, (0, -3), (3, 2), Raise_Pen, (0, 0), (-1, 2), Raise_Pen, (0, 0), (1, 2))); Glyph_51 : aliased constant Glyph := (Number_Of_Vectors => 17, Width => 9, Height => 10, Y_Offset => -5, X_Offset => -6, Vects => (Raise_Pen, (-6, 0), (3, 5), (3, -5), (-6, 0), Raise_Pen, (-3, 0), (2, 3), Raise_Pen, (-3, 0), (2, -3), Raise_Pen, (0, 0), (2, 1), Raise_Pen, (0, 0), (2, -1))); Glyph_52 : aliased constant Glyph := (Number_Of_Vectors => 17, Width => 10, Height => 9, Y_Offset => -3, X_Offset => -5, Vects => (Raise_Pen, (0, 6), (5, -3), (-5, -3), (0, 6), Raise_Pen, (0, 3), (3, -2), Raise_Pen, (0, 3), (-3, -2), Raise_Pen, (0, 0), (1, -2), Raise_Pen, (0, 0), (-1, -2))); Glyph_53 : aliased constant Glyph := (Number_Of_Vectors => 17, Width => 9, Height => 10, Y_Offset => -5, X_Offset => -3, Vects => (Raise_Pen, (6, 0), (-3, -5), (-3, 5), (6, 0), Raise_Pen, (3, 0), (-2, -3), Raise_Pen, (3, 0), (-2, 3), Raise_Pen, (0, 0), (-2, -1), Raise_Pen, (0, 0), (-2, 1))); Glyph_54 : aliased constant Glyph := (Number_Of_Vectors => 11, Width => 7, Height => 14, Y_Offset => -7, X_Offset => 0, Vects => (Raise_Pen, (0, -7), (0, 7), Raise_Pen, (0, -7), (7, -4), (0, -1), Raise_Pen, (1, -5), (4, -4), (1, -3))); Glyph_55 : aliased constant Glyph := (Number_Of_Vectors => 21, Width => 18, Height => 21, Y_Offset => -11, X_Offset => -9, Vects => (Raise_Pen, (0, -11), (0, 4), Raise_Pen, (-5, -8), (5, -2), Raise_Pen, (5, -8), (-5, -2), Raise_Pen, (-9, 4), (-6, 10), Raise_Pen, (9, 4), (6, 10), Raise_Pen, (-9, 4), (9, 4), Raise_Pen, (-6, 10), (6, 10))); Glyph_56 : aliased constant Glyph := (Number_Of_Vectors => 13, Width => 10, Height => 12, Y_Offset => -6, X_Offset => -5, Vects => (Raise_Pen, (0, -6), (0, 6), Raise_Pen, (-3, -3), (3, -3), Raise_Pen, (-5, 3), (-3, 5), (-1, 6), (1, 6), (3, 5), (5, 3))); Glyph_57 : aliased constant Glyph := (Number_Of_Vectors => 11, Width => 12, Height => 12, Y_Offset => -6, X_Offset => -6, Vects => (Raise_Pen, (0, -6), (0, 6), Raise_Pen, (-6, -1), (-5, -3), (5, -3), (6, -1), Raise_Pen, (-2, 5), (2, 5))); Glyph_58 : aliased constant Glyph := (Number_Of_Vectors => 14, Width => 14, Height => 12, Y_Offset => -6, X_Offset => -7, Vects => (Raise_Pen, (-5, -4), (5, 6), Raise_Pen, (5, -4), (-5, 6), Raise_Pen, (-3, -6), (-6, -3), (-7, -1), Raise_Pen, (3, -6), (6, -3), (7, -1))); Glyph_59 : aliased constant Glyph := (Number_Of_Vectors => 18, Width => 18, Height => 18, Y_Offset => -9, X_Offset => -9, Vects => (Raise_Pen, (-4, -9), (-9, 9), Raise_Pen, (4, -9), (9, 9), Raise_Pen, (-5, -5), (9, 9), Raise_Pen, (5, -5), (-9, 9), Raise_Pen, (-4, -9), (4, -9), Raise_Pen, (-5, -5), (5, -5))); Glyph_60 : aliased constant Glyph := (Number_Of_Vectors => 3, Width => 14, Height => 24, Y_Offset => -12, X_Offset => -7, Vects => (Raise_Pen, (-7, -12), (7, 12))); Glyph_61 : aliased constant Glyph := (Number_Of_Vectors => 11, Width => 20, Height => 18, Y_Offset => -8, X_Offset => -11, Vects => (Raise_Pen, (-5, -8), (1, 4), Raise_Pen, (-7, -2), (1, -6), Raise_Pen, (-11, 10), (9, 10), (9, 0), (-11, 10))); Glyph_62 : aliased constant Glyph := (Number_Of_Vectors => 14, Width => 12, Height => 12, Y_Offset => -6, X_Offset => -6, Vects => (Raise_Pen, (-2, -6), (-2, -2), (-6, -2), (-6, 2), (-2, 2), (-2, 6), (2, 6), (2, 2), (6, 2), (6, -2), (2, -2), (2, -6), (-2, -6))); Glyph_63 : aliased constant Glyph := (Number_Of_Vectors => 32, Width => 14, Height => 14, Y_Offset => -7, X_Offset => -7, Vects => (Raise_Pen, (7, -2), (6, -4), (4, -6), (1, -7), (-1, -7), (-4, -6), (-6, -4), (-7, -1), (-7, 1), (-6, 4), (-4, 6), (-1, 7), (1, 7), (4, 6), (6, 4), (7, 2), Raise_Pen, (7, -2), (5, -4), (3, -5), (1, -5), (-1, -4), (-2, -3), (-3, -1), (-3, 1), (-2, 3), (-1, 4), (1, 5), (3, 5), (5, 4), (7, 2))); Glyph_64 : aliased constant Glyph := (Number_Of_Vectors => 10, Width => 14, Height => 16, Y_Offset => -8, X_Offset => -7, Vects => (Raise_Pen, (0, -8), (-7, 4), (7, 4), (0, -8), Raise_Pen, (0, 8), (7, -4), (-7, -4), (0, 8))); Glyph_65 : aliased constant Glyph := (Number_Of_Vectors => 34, Width => 22, Height => 22, Y_Offset => -12, X_Offset => -11, Vects => (Raise_Pen, (-2, -9), (-2, -11), (-1, -12), (1, -12), (2, -11), (2, -9), Raise_Pen, (-11, 8), (-10, 6), (-8, 4), (-7, 2), (-6, -2), (-6, -7), (-5, -8), (-3, -9), (3, -9), (5, -8), (6, -7), (6, -2), (7, 2), (8, 4), (10, 6), (11, 8), Raise_Pen, (-11, 8), (11, 8), Raise_Pen, (-1, 8), (-2, 9), (-1, 10), (1, 10), (2, 9), (1, 8))); Glyph_66 : aliased constant Glyph := (Number_Of_Vectors => 64, Width => 16, Height => 21, Y_Offset => -11, X_Offset => -8, Vects => (Raise_Pen, (0, -5), (0, 1), Raise_Pen, (0, 1), (-1, 10), Raise_Pen, (0, 1), (1, 10), Raise_Pen, (-1, 10), (1, 10), Raise_Pen, (0, -5), (-1, -8), (-2, -10), (-4, -11), Raise_Pen, (-1, -8), (-4, -11), Raise_Pen, (0, -5), (1, -8), (2, -10), (4, -11), Raise_Pen, (1, -8), (4, -11), Raise_Pen, (0, -5), (-4, -7), (-6, -7), (-8, -5), Raise_Pen, (-2, -6), (-6, -6), (-8, -5), Raise_Pen, (0, -5), (4, -7), (6, -7), (8, -5), Raise_Pen, (2, -6), (6, -6), (8, -5), Raise_Pen, (0, -5), (-2, -4), (-3, -3), (-3, 0), Raise_Pen, (0, -5), (-2, -3), (-3, 0), Raise_Pen, (0, -5), (2, -4), (3, -3), (3, 0), Raise_Pen, (0, -5), (2, -3), (3, 0))); Glyph_67 : aliased constant Glyph := (Number_Of_Vectors => 94, Width => 16, Height => 21, Y_Offset => -11, X_Offset => -8, Vects => (Raise_Pen, (0, -9), (0, -7), Raise_Pen, (0, -4), (0, -2), Raise_Pen, (0, 1), (0, 3), Raise_Pen, (0, 7), (-1, 10), Raise_Pen, (0, 7), (1, 10), Raise_Pen, (-1, 10), (1, 10), Raise_Pen, (0, -11), (-1, -9), (-2, -8), Raise_Pen, (0, -11), (1, -9), (2, -8), Raise_Pen, (-2, -8), (0, -9), (2, -8), Raise_Pen, (0, -7), (-2, -4), (-4, -3), (-5, -4), Raise_Pen, (0, -7), (2, -4), (4, -3), (5, -4), Raise_Pen, (-4, -3), (-2, -3), (0, -4), (2, -3), (4, -3), Raise_Pen, (0, -2), (-2, 1), (-4, 2), (-6, 2), (-7, 0), (-7, 1), (-6, 2), Raise_Pen, (0, -2), (2, 1), (4, 2), (6, 2), (7, 0), (7, 1), (6, 2), Raise_Pen, (-4, 2), (-2, 2), (0, 1), (2, 2), (4, 2), Raise_Pen, (0, 3), (-2, 6), (-3, 7), (-5, 8), (-6, 8), (-7, 7), (-8, 5), (-8, 7), (-6, 8), Raise_Pen, (0, 3), (2, 6), (3, 7), (5, 8), (6, 8), (7, 7), (8, 5), (8, 7), (6, 8), Raise_Pen, (-5, 8), (-3, 8), (0, 7), (3, 8), (5, 8))); Glyph_68 : aliased constant Glyph := (Number_Of_Vectors => 40, Width => 16, Height => 21, Y_Offset => -11, X_Offset => -8, Vects => (Raise_Pen, (0, 7), (-1, 10), Raise_Pen, (0, 7), (1, 10), Raise_Pen, (-1, 10), (1, 10), Raise_Pen, (0, 7), (3, 8), (6, 8), (8, 6), (8, 3), (7, 2), (5, 2), (7, 0), (8, -3), (7, -5), (5, -6), (3, -5), (4, -8), (3, -10), (1, -11), (-1, -11), (-3, -10), (-4, -8), (-3, -5), (-5, -6), (-7, -5), (-8, -3), (-7, 0), (-5, 2), (-7, 2), (-8, 3), (-8, 6), (-6, 8), (-3, 8), (0, 7))); Glyph_69 : aliased constant Glyph := (Number_Of_Vectors => 32, Width => 16, Height => 21, Y_Offset => -11, X_Offset => -8, Vects => (Raise_Pen, (0, 7), (-1, 10), Raise_Pen, (0, 7), (1, 10), Raise_Pen, (-1, 10), (1, 10), Raise_Pen, (0, 7), (4, 6), (4, 4), (6, 3), (6, 0), (8, -1), (8, -6), (7, -9), (6, -10), (4, -10), (2, -11), (-2, -11), (-4, -10), (-6, -10), (-7, -9), (-8, -6), (-8, -1), (-6, 0), (-6, 3), (-4, 4), (-4, 6), (0, 7))); Glyph_70 : aliased constant Glyph := (Number_Of_Vectors => 15, Width => 18, Height => 11, Y_Offset => -11, X_Offset => -9, Vects => (Raise_Pen, (-9, -2), (-7, 0), Raise_Pen, (-6, -7), (-4, -2), Raise_Pen, (0, -11), (0, -3), Raise_Pen, (6, -7), (4, -2), Raise_Pen, (9, -2), (7, 0))); Glyph_71 : aliased constant Glyph := (Number_Of_Vectors => 28, Width => 22, Height => 18, Y_Offset => -9, X_Offset => -11, Vects => (Raise_Pen, (-9, -9), (-8, -7), (-7, -3), (-7, 3), (-8, 7), (-9, 9), Raise_Pen, (9, -9), (8, -7), (7, -3), (7, 3), (8, 7), (9, 9), Raise_Pen, (-9, -9), (-7, -8), (-3, -7), (3, -7), (7, -8), (9, -9), Raise_Pen, (-9, 9), (-7, 8), (-3, 7), (3, 7), (7, 8), (9, 9))); Glyph_72 : aliased constant Glyph := (Number_Of_Vectors => 55, Width => 24, Height => 20, Y_Offset => -10, X_Offset => -12, Vects => (Raise_Pen, (0, 0), (0, 9), (-1, 10), Raise_Pen, (0, 4), (-1, 10), Raise_Pen, (0, -9), (-1, -10), (-3, -10), (-4, -9), (-4, -7), (-3, -4), (0, 0), Raise_Pen, (0, -9), (1, -10), (3, -10), (4, -9), (4, -7), (3, -4), (0, 0), Raise_Pen, (0, 0), (-4, -3), (-6, -4), (-8, -4), (-9, -3), (-9, -1), (-8, 0), Raise_Pen, (0, 0), (4, -3), (6, -4), (8, -4), (9, -3), (9, -1), (8, 0), Raise_Pen, (0, 0), (-4, 3), (-6, 4), (-8, 4), (-9, 3), (-9, 1), (-8, 0), Raise_Pen, (0, 0), (4, 3), (6, 4), (8, 4), (9, 3), (9, 1), (8, 0))); Glyph_73 : aliased constant Glyph := (Number_Of_Vectors => 46, Width => 16, Height => 28, Y_Offset => -12, X_Offset => -8, Vects => (Raise_Pen, (3, -9), (2, -8), (3, -7), (4, -8), (4, -9), (3, -11), (1, -12), (-1, -12), (-3, -11), (-4, -9), (-4, -7), (-3, -5), (-1, -3), (4, 0), Raise_Pen, (-3, -5), (2, -2), (4, 0), (5, 2), (5, 4), (4, 6), (2, 8), Raise_Pen, (-2, -4), (-4, -2), (-5, 0), (-5, 2), (-4, 4), (-2, 6), (3, 9), Raise_Pen, (-4, 4), (1, 7), (3, 9), (4, 11), (4, 13), (3, 15), (1, 16), (-1, 16), (-3, 15), (-4, 13), (-4, 12), (-3, 11), (-2, 12), (-3, 13))); Glyph_74 : aliased constant Glyph := (Number_Of_Vectors => 30, Width => 16, Height => 28, Y_Offset => -12, X_Offset => -8, Vects => (Raise_Pen, (0, -12), (-1, -10), (0, -8), (1, -10), (0, -12), Raise_Pen, (0, -12), (0, 16), Raise_Pen, (0, -1), (-1, 2), (0, 16), (1, 2), (0, -1), Raise_Pen, (-6, -5), (-4, -4), (-2, -5), (-4, -6), (-6, -5), Raise_Pen, (-6, -5), (6, -5), Raise_Pen, (2, -5), (4, -4), (6, -5), (4, -6), (2, -5))); Glyph_75 : aliased constant Glyph := (Number_Of_Vectors => 56, Width => 16, Height => 28, Y_Offset => -12, X_Offset => -8, Vects => (Raise_Pen, (0, -12), (-1, -10), (0, -8), (1, -10), (0, -12), Raise_Pen, (0, -12), (0, 2), Raise_Pen, (0, -2), (-1, 0), (1, 4), (0, 6), (-1, 4), (1, 0), (0, -2), Raise_Pen, (0, 2), (0, 16), Raise_Pen, (0, 12), (-1, 14), (0, 16), (1, 14), (0, 12), Raise_Pen, (-6, -5), (-4, -4), (-2, -5), (-4, -6), (-6, -5), Raise_Pen, (-6, -5), (6, -5), Raise_Pen, (2, -5), (4, -4), (6, -5), (4, -6), (2, -5), Raise_Pen, (-6, 9), (-4, 10), (-2, 9), (-4, 8), (-6, 9), Raise_Pen, (-6, 9), (6, 9), Raise_Pen, (2, 9), (4, 10), (6, 9), (4, 8), (2, 9))); Glyph_76 : aliased constant Glyph := (Number_Of_Vectors => 18, Width => 26, Height => 18, Y_Offset => -9, X_Offset => -13, Vects => (Raise_Pen, (0, -9), (-1, -8), (0, -7), (1, -8), (0, -9), Raise_Pen, (-9, 7), (-10, 8), (-9, 9), (-8, 8), (-9, 7), Raise_Pen, (9, 7), (8, 8), (9, 9), (10, 8), (9, 7))); Glyph_77 : aliased constant Glyph := (Number_Of_Vectors => 33, Width => 24, Height => 20, Y_Offset => -10, X_Offset => -12, Vects => (Raise_Pen, (0, -10), (-4, -6), (-7, -2), (-8, 1), (-8, 3), (-7, 5), (-5, 6), (-3, 6), (-1, 5), (0, 3), Raise_Pen, (0, -10), (4, -6), (7, -2), (8, 1), (8, 3), (7, 5), (5, 6), (3, 6), (1, 5), (0, 3), Raise_Pen, (0, 3), (-1, 7), (-2, 10), Raise_Pen, (0, 3), (1, 7), (2, 10), Raise_Pen, (-2, 10), (2, 10))); Glyph_78 : aliased constant Glyph := (Number_Of_Vectors => 26, Width => 24, Height => 20, Y_Offset => -10, X_Offset => -12, Vects => (Raise_Pen, (0, -4), (-1, -7), (-2, -9), (-4, -10), (-5, -10), (-7, -9), (-8, -7), (-8, -3), (-7, 0), (-6, 2), (-4, 5), (0, 10), Raise_Pen, (0, -4), (1, -7), (2, -9), (4, -10), (5, -10), (7, -9), (8, -7), (8, -3), (7, 0), (6, 2), (4, 5), (0, 10))); Glyph_79 : aliased constant Glyph := (Number_Of_Vectors => 20, Width => 24, Height => 22, Y_Offset => -11, X_Offset => -12, Vects => (Raise_Pen, (0, -11), (-2, -8), (-6, -3), (-9, 0), Raise_Pen, (0, -11), (2, -8), (6, -3), (9, 0), Raise_Pen, (-9, 0), (-6, 3), (-2, 8), (0, 11), Raise_Pen, (9, 0), (6, 3), (2, 8), (0, 11))); Glyph_80 : aliased constant Glyph := (Number_Of_Vectors => 48, Width => 24, Height => 20, Y_Offset => -10, X_Offset => -12, Vects => (Raise_Pen, (0, 2), (2, 5), (4, 6), (6, 6), (8, 5), (9, 3), (9, 1), (8, -1), (6, -2), (4, -2), (1, -1), Raise_Pen, (1, -1), (3, -3), (4, -5), (4, -7), (3, -9), (1, -10), (-1, -10), (-3, -9), (-4, -7), (-4, -5), (-3, -3), (-1, -1), Raise_Pen, (-1, -1), (-4, -2), (-6, -2), (-8, -1), (-9, 1), (-9, 3), (-8, 5), (-6, 6), (-4, 6), (-2, 5), (0, 2), Raise_Pen, (0, 2), (-1, 7), (-2, 10), Raise_Pen, (0, 2), (1, 7), (2, 10), Raise_Pen, (-2, 10), (2, 10))); Glyph_81 : aliased constant Glyph := (Number_Of_Vectors => 48, Width => 18, Height => 78, Y_Offset => -39, X_Offset => -9, Vects => (Raise_Pen, (4, -39), (1, -37), (-1, -35), (-2, -33), (-3, -30), (-3, -26), (-2, -22), (2, -14), (3, -11), (3, -8), (2, -5), (0, -2), Raise_Pen, (1, -37), (-1, -34), (-2, -30), (-2, -26), (-1, -23), (3, -15), (4, -11), (4, -8), (3, -5), (0, -2), (-4, 0), (0, 2), (3, 5), (4, 8), (4, 11), (3, 15), (-1, 23), (-2, 26), (-2, 30), (-1, 34), (1, 37), Raise_Pen, (0, 2), (2, 5), (3, 8), (3, 11), (2, 14), (-2, 22), (-3, 26), (-3, 30), (-2, 33), (-1, 35), (1, 37), (4, 39))); Glyph_82 : aliased constant Glyph := (Number_Of_Vectors => 48, Width => 18, Height => 78, Y_Offset => -39, X_Offset => -9, Vects => (Raise_Pen, (-4, -39), (-1, -37), (1, -35), (2, -33), (3, -30), (3, -26), (2, -22), (-2, -14), (-3, -11), (-3, -8), (-2, -5), (0, -2), Raise_Pen, (-1, -37), (1, -34), (2, -30), (2, -26), (1, -23), (-3, -15), (-4, -11), (-4, -8), (-3, -5), (0, -2), (4, 0), (0, 2), (-3, 5), (-4, 8), (-4, 11), (-3, 15), (1, 23), (2, 26), (2, 30), (1, 34), (-1, 37), Raise_Pen, (0, 2), (-2, 5), (-3, 8), (-3, 11), (-2, 14), (2, 22), (3, 26), (3, 30), (2, 33), (1, 35), (-1, 37), (-4, 39))); Glyph_83 : aliased constant Glyph := (Number_Of_Vectors => 32, Width => 18, Height => 72, Y_Offset => -36, X_Offset => -9, Vects => (Raise_Pen, (4, -36), (1, -33), (-1, -30), (-3, -26), (-4, -21), (-4, -15), (-3, -9), (-2, -5), (1, 6), (2, 10), (3, 16), (3, 21), (2, 26), (1, 29), (-1, 33), Raise_Pen, (1, -33), (-1, -29), (-2, -26), (-3, -21), (-3, -16), (-2, -10), (-1, -6), (2, 5), (3, 9), (4, 15), (4, 21), (3, 26), (1, 30), (-1, 33), (-4, 36))); Glyph_84 : aliased constant Glyph := (Number_Of_Vectors => 32, Width => 18, Height => 72, Y_Offset => -36, X_Offset => -9, Vects => (Raise_Pen, (-4, -36), (-1, -33), (1, -30), (3, -26), (4, -21), (4, -15), (3, -9), (2, -5), (-1, 6), (-2, 10), (-3, 16), (-3, 21), (-2, 26), (-1, 29), (1, 33), Raise_Pen, (-1, -33), (1, -29), (2, -26), (3, -21), (3, -16), (2, -10), (1, -6), (-2, 5), (-3, 9), (-4, 15), (-4, 21), (-3, 26), (-1, 30), (1, 33), (4, 36))); Glyph_85 : aliased constant Glyph := (Number_Of_Vectors => 14, Width => 35, Height => 80, Y_Offset => -48, X_Offset => -27, Vects => (Raise_Pen, (-24, 0), (-17, 0), (0, 29), Raise_Pen, (-18, 0), (-1, 29), Raise_Pen, (-19, 0), (0, 32), Raise_Pen, (8, -48), (4, -8), (0, 32))); Glyph_86 : aliased constant Glyph := (Number_Of_Vectors => 27, Width => 18, Height => 18, Y_Offset => -5, X_Offset => -9, Vects => (Raise_Pen, (2, -5), (4, -4), (6, -2), (6, -3), (5, -4), (2, -5), (-1, -5), (-4, -4), (-5, -3), (-6, -1), (-6, 1), (-5, 3), (-3, 5), (1, 8), Raise_Pen, (-1, -5), (-3, -4), (-4, -3), (-5, -1), (-5, 1), (-4, 3), (1, 8), (2, 10), (2, 12), (1, 13), (-1, 13))); Glyph_87 : aliased constant Glyph := (Number_Of_Vectors => 45, Width => 22, Height => 21, Y_Offset => -5, X_Offset => -11, Vects => (Raise_Pen, (-6, -5), (-7, -4), (-8, -2), (-8, 0), (-7, 3), (-3, 7), (-2, 9), Raise_Pen, (-8, 0), (-7, 2), (-3, 6), (-2, 9), (-2, 11), (-3, 14), (-5, 16), (-6, 16), (-7, 15), (-8, 13), (-8, 10), (-7, 6), (-5, 2), (-3, -1), (0, -4), (2, -5), (4, -5), (7, -4), (8, -2), (8, 2), (7, 6), (5, 8), (3, 9), (2, 9), (1, 8), (1, 6), (2, 5), (3, 6), (2, 7), Raise_Pen, (4, -5), (6, -4), (7, -2), (7, 2), (6, 6), (5, 8))); Glyph_88 : aliased constant Glyph := (Number_Of_Vectors => 69, Width => 26, Height => 28, Y_Offset => -12, X_Offset => -13, Vects => (Raise_Pen, (7, -11), (6, -10), (7, -9), (8, -10), (7, -11), (5, -12), (2, -12), (-1, -11), (-3, -9), (-4, -7), (-5, -4), (-6, 0), (-8, 9), (-9, 13), (-10, 15), Raise_Pen, (2, -12), (0, -11), (-2, -9), (-3, -7), (-4, -4), (-6, 5), (-7, 9), (-8, 12), (-9, 14), (-10, 15), (-12, 16), (-14, 16), (-15, 15), (-15, 14), (-14, 13), (-13, 14), (-14, 15), Raise_Pen, (13, -11), (12, -10), (13, -9), (14, -10), (14, -11), (13, -12), (11, -12), (9, -11), (8, -10), (7, -8), (6, -5), (3, 9), (2, 13), (1, 15), Raise_Pen, (11, -12), (9, -10), (8, -8), (7, -4), (5, 5), (4, 9), (3, 12), (2, 14), (1, 15), (-1, 16), (-3, 16), (-4, 15), (-4, 14), (-3, 13), (-2, 14), (-3, 15), Raise_Pen, (-9, -5), (12, -5))); Glyph_89 : aliased constant Glyph := (Number_Of_Vectors => 52, Width => 24, Height => 28, Y_Offset => -12, X_Offset => -12, Vects => (Raise_Pen, (9, -11), (8, -10), (9, -9), (10, -10), (9, -11), (6, -12), (3, -12), (0, -11), (-2, -9), (-3, -7), (-4, -4), (-5, 0), (-7, 9), (-8, 13), (-9, 15), Raise_Pen, (3, -12), (1, -11), (-1, -9), (-2, -7), (-3, -4), (-5, 5), (-6, 9), (-7, 12), (-8, 14), (-9, 15), (-11, 16), (-13, 16), (-14, 15), (-14, 14), (-13, 13), (-12, 14), (-13, 15), Raise_Pen, (7, -5), (5, 2), (4, 6), (4, 8), (5, 9), (8, 9), (10, 7), (11, 5), Raise_Pen, (8, -5), (6, 2), (5, 6), (5, 8), (6, 9), Raise_Pen, (-8, -5), (8, -5))); Glyph_90 : aliased constant Glyph := (Number_Of_Vectors => 54, Width => 24, Height => 28, Y_Offset => -12, X_Offset => -12, Vects => (Raise_Pen, (7, -11), (6, -10), (7, -9), (8, -10), (8, -11), (6, -12), Raise_Pen, (10, -12), (3, -12), (0, -11), (-2, -9), (-3, -7), (-4, -4), (-5, 0), (-7, 9), (-8, 13), (-9, 15), Raise_Pen, (3, -12), (1, -11), (-1, -9), (-2, -7), (-3, -4), (-5, 5), (-6, 9), (-7, 12), (-8, 14), (-9, 15), (-11, 16), (-13, 16), (-14, 15), (-14, 14), (-13, 13), (-12, 14), (-13, 15), Raise_Pen, (9, -12), (5, 2), (4, 6), (4, 8), (5, 9), (8, 9), (10, 7), (11, 5), Raise_Pen, (10, -12), (6, 2), (5, 6), (5, 8), (6, 9), Raise_Pen, (-8, -5), (7, -5))); Glyph_91 : aliased constant Glyph := (Number_Of_Vectors => 86, Width => 35, Height => 28, Y_Offset => -12, X_Offset => -18, Vects => (Raise_Pen, (2, -11), (1, -10), (2, -9), (3, -10), (2, -11), (0, -12), (-3, -12), (-6, -11), (-8, -9), (-9, -7), (-10, -4), (-11, 0), (-13, 9), (-14, 13), (-15, 15), Raise_Pen, (-3, -12), (-5, -11), (-7, -9), (-8, -7), (-9, -4), (-11, 5), (-12, 9), (-13, 12), (-14, 14), (-15, 15), (-17, 16), (-19, 16), (-20, 15), (-20, 14), (-19, 13), (-18, 14), (-19, 15), Raise_Pen, (14, -11), (13, -10), (14, -9), (15, -10), (14, -11), (11, -12), (8, -12), (5, -11), (3, -9), (2, -7), (1, -4), (0, 0), (-2, 9), (-3, 13), (-4, 15), Raise_Pen, (8, -12), (6, -11), (4, -9), (3, -7), (2, -4), (0, 5), (-1, 9), (-2, 12), (-3, 14), (-4, 15), (-6, 16), (-8, 16), (-9, 15), (-9, 14), (-8, 13), (-7, 14), (-8, 15), Raise_Pen, (12, -5), (10, 2), (9, 6), (9, 8), (10, 9), (13, 9), (15, 7), (16, 5), Raise_Pen, (13, -5), (11, 2), (10, 6), (10, 8), (11, 9), Raise_Pen, (-14, -5), (13, -5))); Glyph_92 : aliased constant Glyph := (Number_Of_Vectors => 88, Width => 35, Height => 28, Y_Offset => -12, X_Offset => -18, Vects => (Raise_Pen, (2, -11), (1, -10), (2, -9), (3, -10), (2, -11), (0, -12), (-3, -12), (-6, -11), (-8, -9), (-9, -7), (-10, -4), (-11, 0), (-13, 9), (-14, 13), (-15, 15), Raise_Pen, (-3, -12), (-5, -11), (-7, -9), (-8, -7), (-9, -4), (-11, 5), (-12, 9), (-13, 12), (-14, 14), (-15, 15), (-17, 16), (-19, 16), (-20, 15), (-20, 14), (-19, 13), (-18, 14), (-19, 15), Raise_Pen, (12, -11), (11, -10), (12, -9), (13, -10), (13, -11), (11, -12), Raise_Pen, (15, -12), (8, -12), (5, -11), (3, -9), (2, -7), (1, -4), (0, 0), (-2, 9), (-3, 13), (-4, 15), Raise_Pen, (8, -12), (6, -11), (4, -9), (3, -7), (2, -4), (0, 5), (-1, 9), (-2, 12), (-3, 14), (-4, 15), (-6, 16), (-8, 16), (-9, 15), (-9, 14), (-8, 13), (-7, 14), (-8, 15), Raise_Pen, (14, -12), (10, 2), (9, 6), (9, 8), (10, 9), (13, 9), (15, 7), (16, 5), Raise_Pen, (15, -12), (11, 2), (10, 6), (10, 8), (11, 9), Raise_Pen, (-14, -5), (12, -5))); Glyph_93 : aliased constant Glyph := (Number_Of_Vectors => 20, Width => 13, Height => 14, Y_Offset => -5, X_Offset => -6, Vects => (Raise_Pen, (-5, -1), (-4, -3), (-2, -5), (1, -5), (2, -4), (2, -1), (0, 5), (0, 8), (1, 9), Raise_Pen, (0, -5), (1, -4), (1, -1), (-1, 5), (-1, 8), (0, 9), (3, 9), (5, 7), (6, 5))); Glyph_94 : aliased constant Glyph := (Number_Of_Vectors => 22, Width => 12, Height => 11, Y_Offset => -6, X_Offset => -6, Vects => (Raise_Pen, (0, -6), (-4, 5), (6, -2), (-6, -2), (4, 5), (0, -6), Raise_Pen, (0, 0), (0, -6), Raise_Pen, (0, 0), (-6, -2), Raise_Pen, (0, 0), (-4, 5), Raise_Pen, (0, 0), (4, 5), Raise_Pen, (0, 0), (6, -2))); Glyph_95 : aliased constant Glyph := (Number_Of_Vectors => 24, Width => 24, Height => 6, Y_Offset => -3, X_Offset => -12, Vects => (Raise_Pen, (-9, 3), (-9, 1), (-8, -2), (-6, -3), (-4, -3), (-2, -2), (2, 1), (4, 2), (6, 2), (8, 1), (9, -1), Raise_Pen, (-9, 1), (-8, -1), (-6, -2), (-4, -2), (-2, -1), (2, 2), (4, 3), (6, 3), (8, 2), (9, -1), (9, -3))); Font_D : aliased constant Hershey_Font := (Number_Of_Glyphs => 96, Glyphs => ( Glyph_0'Access, Glyph_1'Access, Glyph_2'Access, Glyph_3'Access, Glyph_4'Access, Glyph_5'Access, Glyph_6'Access, Glyph_7'Access, Glyph_8'Access, Glyph_9'Access, Glyph_10'Access, Glyph_11'Access, Glyph_12'Access, Glyph_13'Access, Glyph_14'Access, Glyph_15'Access, Glyph_16'Access, Glyph_17'Access, Glyph_18'Access, Glyph_19'Access, Glyph_20'Access, Glyph_21'Access, Glyph_22'Access, Glyph_23'Access, Glyph_24'Access, Glyph_25'Access, Glyph_26'Access, Glyph_27'Access, Glyph_28'Access, Glyph_29'Access, Glyph_30'Access, Glyph_31'Access, Glyph_32'Access, Glyph_33'Access, Glyph_34'Access, Glyph_35'Access, Glyph_36'Access, Glyph_37'Access, Glyph_38'Access, Glyph_39'Access, Glyph_40'Access, Glyph_41'Access, Glyph_42'Access, Glyph_43'Access, Glyph_44'Access, Glyph_45'Access, Glyph_46'Access, Glyph_47'Access, Glyph_48'Access, Glyph_49'Access, Glyph_50'Access, Glyph_51'Access, Glyph_52'Access, Glyph_53'Access, Glyph_54'Access, Glyph_55'Access, Glyph_56'Access, Glyph_57'Access, Glyph_58'Access, Glyph_59'Access, Glyph_60'Access, Glyph_61'Access, Glyph_62'Access, Glyph_63'Access, Glyph_64'Access, Glyph_65'Access, Glyph_66'Access, Glyph_67'Access, Glyph_68'Access, Glyph_69'Access, Glyph_70'Access, Glyph_71'Access, Glyph_72'Access, Glyph_73'Access, Glyph_74'Access, Glyph_75'Access, Glyph_76'Access, Glyph_77'Access, Glyph_78'Access, Glyph_79'Access, Glyph_80'Access, Glyph_81'Access, Glyph_82'Access, Glyph_83'Access, Glyph_84'Access, Glyph_85'Access, Glyph_86'Access, Glyph_87'Access, Glyph_88'Access, Glyph_89'Access, Glyph_90'Access, Glyph_91'Access, Glyph_92'Access, Glyph_93'Access, Glyph_94'Access, Glyph_95'Access ), Y_Advance => 80); Font : constant Giza.Font.Ref_Const := Font_D'Access; end Giza.Hershey_Fonts.Symbolic;
14.321135
56
0.42827
df11d4e50ea6eef258a4d5bc3fd6124817b6020f
1,385
ads
Ada
tier-1/xcb/source/thin/xcb-xcb_circulate_request_event_t.ads
charlie5/cBound
741be08197a61ad9c72553e3302f3b669902216d
[ "0BSD" ]
2
2015-11-12T11:16:20.000Z
2021-08-24T22:32:04.000Z
tier-1/xcb/source/thin/xcb-xcb_circulate_request_event_t.ads
charlie5/cBound
741be08197a61ad9c72553e3302f3b669902216d
[ "0BSD" ]
1
2018-06-05T05:19:35.000Z
2021-11-20T01:13:23.000Z
tier-1/xcb/source/thin/xcb-xcb_circulate_request_event_t.ads
charlie5/cBound
741be08197a61ad9c72553e3302f3b669902216d
[ "0BSD" ]
null
null
null
-- This file is generated by SWIG. Please do not modify by hand. -- with xcb.xcb_circulate_notify_event_t; with Interfaces.C; with Interfaces.C.Pointers; package xcb.xcb_circulate_request_event_t is -- Item -- subtype Item is xcb.xcb_circulate_notify_event_t.Item; -- Item_Array -- type Item_Array is array (Interfaces.C .size_t range <>) of aliased xcb.xcb_circulate_request_event_t .Item; -- Pointer -- package C_Pointers is new Interfaces.C.Pointers (Index => Interfaces.C.size_t, Element => xcb.xcb_circulate_request_event_t.Item, Element_Array => xcb.xcb_circulate_request_event_t.Item_Array, Default_Terminator => (others => <>)); subtype Pointer is C_Pointers.Pointer; -- Pointer_Array -- type Pointer_Array is array (Interfaces.C .size_t range <>) of aliased xcb.xcb_circulate_request_event_t .Pointer; -- Pointer_Pointer -- package C_Pointer_Pointers is new Interfaces.C.Pointers (Index => Interfaces.C.size_t, Element => xcb.xcb_circulate_request_event_t.Pointer, Element_Array => xcb.xcb_circulate_request_event_t.Pointer_Array, Default_Terminator => null); subtype Pointer_Pointer is C_Pointer_Pointers.Pointer; end xcb.xcb_circulate_request_event_t;
27.7
76
0.6787
0eaefa1b0f32c8904379cb9ae5bd1bb8fee239da
171
ads
Ada
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/loop_optimization7_pkg.ads
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
7
2020-05-02T17:34:05.000Z
2021-10-17T10:15:18.000Z
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/loop_optimization7_pkg.ads
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
null
null
null
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/loop_optimization7_pkg.ads
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
2
2020-07-27T00:22:36.000Z
2021-04-01T09:41:02.000Z
package Loop_Optimization7_Pkg is pragma Pure; type Rec is record F : Float; end record; function Conv (Trig : Rec) return Rec; end Loop_Optimization7_Pkg;
15.545455
40
0.725146
39f19a6717aba2447b3e64585735bcba6e5598a8
2,935
ads
Ada
gcc-gcc-7_3_0-release/gcc/ada/g-wistsp.ads
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
7
2020-05-02T17:34:05.000Z
2021-10-17T10:15:18.000Z
gcc-gcc-7_3_0-release/gcc/ada/g-wistsp.ads
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
null
null
null
gcc-gcc-7_3_0-release/gcc/ada/g-wistsp.ads
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
2
2020-07-27T00:22:36.000Z
2021-04-01T09:41:02.000Z
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- G N A T . W I D E _ S T R I N G _ S P L I T -- -- -- -- S p e c -- -- -- -- Copyright (C) 2002-2014, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- Useful wide_string-manipulation routines: given a set of separators, split -- a wide_string wherever the separators appear, and provide direct access -- to the resulting slices. See GNAT.Array_Split for full documentation. with Ada.Strings.Wide_Maps; use Ada.Strings; with GNAT.Array_Split; package GNAT.Wide_String_Split is new GNAT.Array_Split (Element => Wide_Character, Element_Sequence => Wide_String, Element_Set => Wide_Maps.Wide_Character_Set, To_Set => Wide_Maps.To_Set, Is_In => Wide_Maps.Is_In);
65.222222
78
0.437479
39528381ae944f7ce31af43c859b73dd73f6359a
7,825
adb
Ada
source/amf/utp/amf-internals-utp_test_objectives.adb
svn2github/matreshka
9d222b3ad9da508855fb1f5adbe5e8a4fad4c530
[ "BSD-3-Clause" ]
24
2016-11-29T06:59:41.000Z
2021-08-30T11:55:16.000Z
source/amf/utp/amf-internals-utp_test_objectives.adb
svn2github/matreshka
9d222b3ad9da508855fb1f5adbe5e8a4fad4c530
[ "BSD-3-Clause" ]
2
2019-01-16T05:15:20.000Z
2019-02-03T10:03:32.000Z
source/amf/utp/amf-internals-utp_test_objectives.adb
svn2github/matreshka
9d222b3ad9da508855fb1f5adbe5e8a4fad4c530
[ "BSD-3-Clause" ]
4
2017-07-18T07:11:05.000Z
2020-06-21T03:02:25.000Z
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Ada Modeling Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2012, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ -- This file is generated, don't edit it. ------------------------------------------------------------------------------ with AMF.Elements; with AMF.Internals.Helpers; with AMF.Internals.Tables.Utp_Attributes; with AMF.UML.Dependencies; with AMF.Visitors.Utp_Iterators; with AMF.Visitors.Utp_Visitors; with League.Strings.Internals; with Matreshka.Internals.Strings; package body AMF.Internals.Utp_Test_Objectives is ------------------------- -- Get_Base_Dependency -- ------------------------- overriding function Get_Base_Dependency (Self : not null access constant Utp_Test_Objective_Proxy) return AMF.UML.Dependencies.UML_Dependency_Access is begin return AMF.UML.Dependencies.UML_Dependency_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.Utp_Attributes.Internal_Get_Base_Dependency (Self.Element))); end Get_Base_Dependency; ------------------------- -- Set_Base_Dependency -- ------------------------- overriding procedure Set_Base_Dependency (Self : not null access Utp_Test_Objective_Proxy; To : AMF.UML.Dependencies.UML_Dependency_Access) is begin AMF.Internals.Tables.Utp_Attributes.Internal_Set_Base_Dependency (Self.Element, AMF.Internals.Helpers.To_Element (AMF.Elements.Element_Access (To))); end Set_Base_Dependency; ------------------ -- Get_Priority -- ------------------ overriding function Get_Priority (Self : not null access constant Utp_Test_Objective_Proxy) return AMF.Optional_String is begin declare use type Matreshka.Internals.Strings.Shared_String_Access; Aux : constant Matreshka.Internals.Strings.Shared_String_Access := AMF.Internals.Tables.Utp_Attributes.Internal_Get_Priority (Self.Element); begin if Aux = null then return (Is_Empty => True); else return (False, League.Strings.Internals.Create (Aux)); end if; end; end Get_Priority; ------------------ -- Set_Priority -- ------------------ overriding procedure Set_Priority (Self : not null access Utp_Test_Objective_Proxy; To : AMF.Optional_String) is begin if To.Is_Empty then AMF.Internals.Tables.Utp_Attributes.Internal_Set_Priority (Self.Element, null); else AMF.Internals.Tables.Utp_Attributes.Internal_Set_Priority (Self.Element, League.Strings.Internals.Internal (To.Value)); end if; end Set_Priority; ------------------- -- Enter_Element -- ------------------- overriding procedure Enter_Element (Self : not null access constant Utp_Test_Objective_Proxy; Visitor : in out AMF.Visitors.Abstract_Visitor'Class; Control : in out AMF.Visitors.Traverse_Control) is begin if Visitor in AMF.Visitors.Utp_Visitors.Utp_Visitor'Class then AMF.Visitors.Utp_Visitors.Utp_Visitor'Class (Visitor).Enter_Test_Objective (AMF.Utp.Test_Objectives.Utp_Test_Objective_Access (Self), Control); end if; end Enter_Element; ------------------- -- Leave_Element -- ------------------- overriding procedure Leave_Element (Self : not null access constant Utp_Test_Objective_Proxy; Visitor : in out AMF.Visitors.Abstract_Visitor'Class; Control : in out AMF.Visitors.Traverse_Control) is begin if Visitor in AMF.Visitors.Utp_Visitors.Utp_Visitor'Class then AMF.Visitors.Utp_Visitors.Utp_Visitor'Class (Visitor).Leave_Test_Objective (AMF.Utp.Test_Objectives.Utp_Test_Objective_Access (Self), Control); end if; end Leave_Element; ------------------- -- Visit_Element -- ------------------- overriding procedure Visit_Element (Self : not null access constant Utp_Test_Objective_Proxy; Iterator : in out AMF.Visitors.Abstract_Iterator'Class; Visitor : in out AMF.Visitors.Abstract_Visitor'Class; Control : in out AMF.Visitors.Traverse_Control) is begin if Iterator in AMF.Visitors.Utp_Iterators.Utp_Iterator'Class then AMF.Visitors.Utp_Iterators.Utp_Iterator'Class (Iterator).Visit_Test_Objective (Visitor, AMF.Utp.Test_Objectives.Utp_Test_Objective_Access (Self), Control); end if; end Visit_Element; end AMF.Internals.Utp_Test_Objectives;
42.759563
87
0.531374
231550581cc353b4e54a7f0cd7badcbcc42238f2
11,831
adb
Ada
awa/src/awa-applications.adb
Letractively/ada-awa
3c82a4d29ed6c1209a2ac7d5fe123c142f3cffbe
[ "Apache-2.0" ]
null
null
null
awa/src/awa-applications.adb
Letractively/ada-awa
3c82a4d29ed6c1209a2ac7d5fe123c142f3cffbe
[ "Apache-2.0" ]
null
null
null
awa/src/awa-applications.adb
Letractively/ada-awa
3c82a4d29ed6c1209a2ac7d5fe123c142f3cffbe
[ "Apache-2.0" ]
null
null
null
----------------------------------------------------------------------- -- awa -- Ada Web Application -- Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Ada.IO_Exceptions; with ADO.Drivers; with EL.Contexts.Default; with Util.Files; with Util.Log.Loggers; with ASF.Server; with ASF.Servlets; with AWA.Services.Contexts; with AWA.Components.Factory; with AWA.Applications.Factory; with AWA.Applications.Configs; with AWA.Helpers.Selectors; with AWA.Permissions.Services; package body AWA.Applications is use Util.Log; Log : constant Loggers.Logger := Loggers.Create ("AWA.Applications"); -- ------------------------------ -- Initialize the application -- ------------------------------ overriding procedure Initialize (App : in out Application; Conf : in ASF.Applications.Config; Factory : in out ASF.Applications.Main.Application_Factory'Class) is Ctx : AWA.Services.Contexts.Service_Context; begin Log.Info ("Initializing application"); Ctx.Set_Context (App'Unchecked_Access, null); AWA.Applications.Factory.Set_Application (Factory, App'Unchecked_Access); ASF.Applications.Main.Application (App).Initialize (Conf, Factory); -- Load the application configuration before any module. Application'Class (App).Load_Configuration (App.Get_Config (P_Config_File.P)); -- Register the application modules and load their configuration. Application'Class (App).Initialize_Modules; -- Load the plugin application configuration after the module are configured. Application'Class (App).Load_Configuration (App.Get_Config (P_Plugin_Config_File.P)); end Initialize; -- ------------------------------ -- Initialize the application configuration properties. Properties defined in <b>Conf</b> -- are expanded by using the EL expression resolver. -- ------------------------------ overriding procedure Initialize_Config (App : in out Application; Conf : in out ASF.Applications.Config) is begin Log.Info ("Initializing configuration"); if Conf.Get ("app.modules.dir", "") = "" then Conf.Set ("app.modules.dir", "#{fn:composePath(app_search_dirs,'config')}"); end if; if Conf.Get ("bundle.dir", "") = "" then Conf.Set ("bundle.dir", "#{fn:composePath(app_search_dirs,'bundles')}"); end if; if Conf.Get ("ado.queries.paths", "") = "" then Conf.Set ("ado.queries.paths", "#{fn:composePath(app_search_dirs,'db')}"); end if; ASF.Applications.Main.Application (App).Initialize_Config (Conf); ADO.Drivers.Initialize (Conf); App.DB_Factory.Create (Conf.Get ("database")); App.Events.Initialize (App'Unchecked_Access); AWA.Modules.Initialize (App.Modules, Conf); App.Register_Class ("AWA.Helpers.Selectors.Select_List_Bean", AWA.Helpers.Selectors.Create_Select_List_Bean'Access); end Initialize_Config; -- ------------------------------ -- Initialize the servlets provided by the application. -- This procedure is called by <b>Initialize</b>. -- It should register the application servlets. -- ------------------------------ overriding procedure Initialize_Servlets (App : in out Application) is begin Log.Info ("Initializing application servlets"); ASF.Applications.Main.Application (App).Initialize_Servlets; end Initialize_Servlets; -- ------------------------------ -- Initialize the filters provided by the application. -- This procedure is called by <b>Initialize</b>. -- It should register the application filters. -- ------------------------------ overriding procedure Initialize_Filters (App : in out Application) is begin Log.Info ("Initializing application filters"); ASF.Applications.Main.Application (App).Initialize_Filters; end Initialize_Filters; -- ------------------------------ -- Initialize the ASF components provided by the application. -- This procedure is called by <b>Initialize</b>. -- It should register the component factories used by the application. -- ------------------------------ overriding procedure Initialize_Components (App : in out Application) is procedure Register_Functions is new ASF.Applications.Main.Register_Functions (AWA.Permissions.Services.Set_Functions); begin Log.Info ("Initializing application components"); ASF.Applications.Main.Application (App).Initialize_Components; App.Add_Components (AWA.Components.Factory.Definition); Register_Functions (App); end Initialize_Components; -- ------------------------------ -- Read the application configuration file <b>awa.xml</b>. This is called after the servlets -- and filters have been registered in the application but before the module registration. -- ------------------------------ procedure Load_Configuration (App : in out Application; Files : in String) is procedure Load_Config (File : in String; Done : out Boolean); Paths : constant String := App.Get_Config (P_Module_Dir.P); Ctx : aliased EL.Contexts.Default.Default_Context; procedure Load_Config (File : in String; Done : out Boolean) is Path : constant String := Util.Files.Find_File_Path (File, Paths); begin Done := False; AWA.Applications.Configs.Read_Configuration (App, Path, Ctx'Unchecked_Access); exception when Ada.IO_Exceptions.Name_Error => Log.Warn ("Application configuration file '{0}' does not exist", Path); end Load_Config; begin Util.Files.Iterate_Path (Files, Load_Config'Access); end Load_Configuration; -- ------------------------------ -- Initialize the AWA modules provided by the application. -- This procedure is called by <b>Initialize</b>. -- It should register the modules used by the application. -- ------------------------------ procedure Initialize_Modules (App : in out Application) is begin null; end Initialize_Modules; -- ------------------------------ -- Start the application. This is called by the server container when the server is started. -- ------------------------------ overriding procedure Start (App : in out Application) is begin -- Start the event service. App.Events.Start; -- Start the application. ASF.Applications.Main.Application (App).Start; end Start; -- ------------------------------ -- Register the module in the application -- ------------------------------ procedure Register (App : in Application_Access; Module : access AWA.Modules.Module'Class; Name : in String; URI : in String := "") is begin App.Register (Module.all'Unchecked_Access, Name, URI); end Register; -- ------------------------------ -- Get the database connection for reading -- ------------------------------ function Get_Session (App : Application) return ADO.Sessions.Session is begin return App.DB_Factory.Get_Session; end Get_Session; -- ------------------------------ -- Get the database connection for writing -- ------------------------------ function Get_Master_Session (App : Application) return ADO.Sessions.Master_Session is begin return App.DB_Factory.Get_Master_Session; end Get_Master_Session; -- ------------------------------ -- Find the module with the given name -- ------------------------------ function Find_Module (App : in Application; Name : in String) return AWA.Modules.Module_Access is begin return AWA.Modules.Find_By_Name (App.Modules, Name); end Find_Module; -- ------------------------------ -- Register the module in the application -- ------------------------------ procedure Register (App : in out Application; Module : in AWA.Modules.Module_Access; Name : in String; URI : in String := "") is begin AWA.Modules.Register (App.Modules'Unchecked_Access, App'Unchecked_Access, Module, Name, URI); end Register; -- ------------------------------ -- Send the event in the application event queues. -- ------------------------------ procedure Send_Event (App : in Application; Event : in AWA.Events.Module_Event'Class) is begin App.Events.Send (Event); end Send_Event; -- ------------------------------ -- Execute the <tt>Process</tt> procedure with the event manager used by the application. -- ------------------------------ procedure Do_Event_Manager (App : in out Application; Process : access procedure (Events : in out AWA.Events.Services.Event_Manager)) is begin Process (App.Events); end Do_Event_Manager; -- ------------------------------ -- Initialize the parser represented by <b>Parser</b> to recognize the configuration -- that are specific to the plugins that have been registered so far. -- ------------------------------ procedure Initialize_Parser (App : in out Application'Class; Parser : in out Util.Serialize.IO.Parser'Class) is procedure Process (Module : in out AWA.Modules.Module'Class); procedure Process (Module : in out AWA.Modules.Module'Class) is begin Module.Initialize_Parser (Parser); end Process; begin AWA.Modules.Iterate (App.Modules, Process'Access); end Initialize_Parser; -- ------------------------------ -- Get the current application from the servlet context or service context. -- ------------------------------ function Current return Application_Access is use type AWA.Services.Contexts.Service_Context_Access; Ctx : constant AWA.Services.Contexts.Service_Context_Access := AWA.Services.Contexts.Current; begin if Ctx /= null then return Ctx.Get_Application; end if; -- If there is no service context, look in the servlet current context. declare use type ASF.Servlets.Servlet_Registry_Access; Ctx : constant ASF.Servlets.Servlet_Registry_Access := ASF.Server.Current; begin if Ctx = null then Log.Warn ("There is no service context"); return null; end if; if not (Ctx.all in AWA.Applications.Application'Class) then Log.Warn ("The servlet context is not an application"); return null; end if; return AWA.Applications.Application'Class (Ctx.all)'Access; end; end Current; end AWA.Applications;
38.663399
99
0.587778
18d2880f2e2079d9cfb435474d21690075e5672c
2,129
adb
Ada
main.adb
ScottWLoyd/ada_dynamic_libs
88ad4d539d09297dc35309f94c6a292fade25b8a
[ "Unlicense" ]
1
2021-12-06T11:44:47.000Z
2021-12-06T11:44:47.000Z
main.adb
ScottWLoyd/ada_dynamic_libs
88ad4d539d09297dc35309f94c6a292fade25b8a
[ "Unlicense" ]
null
null
null
main.adb
ScottWLoyd/ada_dynamic_libs
88ad4d539d09297dc35309f94c6a292fade25b8a
[ "Unlicense" ]
null
null
null
with Ada.Text_IO; use Ada.Text_IO; with Interfaces.C; with Ada.Unchecked_Conversion; with Ada.Unchecked_Deallocation; with Ada.Directories; use Ada.Directories; with System; with Ada.Calendar; procedure Main is type LPCSTR is access constant Interfaces.C.char; -- winnt.h pragma Convention (C, LPCSTR); function LoadLibrary (lpLibFileName : LPCSTR) return System.Address; pragma Import (Stdcall, LoadLibrary, "LoadLibraryA"); -- winbase.h :3619 type PROC is access function return Interfaces.C.int; -- windef.h :175 pragma Convention (Stdcall, PROC); subtype FARPROC is PROC; -- windef.h :173 function GetProcAddress (hModule : System.Address; lpProcName : LPCSTR) return FARPROC; -- winbase.h :997 pragma Import (Stdcall, GetProcAddress, "GetProcAddress"); -- winbase.h :997 function As_LPCSTR is new Ada.Unchecked_Conversion (Source => System.Address, Target => LPCSTR); S : Search_Type; D : Directory_Entry_Type; Only_Files : constant Filter_Type := (Ordinary_File => True, others => False); Dll_Name : constant String := "libtest.dll"; C_Name : aliased constant String := Dll_Name & ASCII.nul; Proc_Name : aliased constant String := "do_stuff" & ASCII.nul; Waiting : Boolean := True; begin while Waiting loop Start_Search(S, ".", Dll_Name, Only_Files); if More_Entries(S) then Get_Next_Entry(S, D); declare use Ada.Calendar; use type System.Address; Lib_Handle : System.Address := System.Null_Address; Do_Stuff_Handle : FARPROC; Ignored : Interfaces.C.int; begin -- Plug-in file is older than 5 seconds, we do not want to try -- loading a plug-in not yet fully compiled. if Modification_Time (D) < Clock - 5.0 then Waiting := False; Lib_Handle := LoadLibrary(As_LPCSTR(C_Name'Address)); if Lib_Handle /= System.Null_Address then Do_Stuff_Handle := GetProcAddress(Lib_Handle, As_LPCSTR(Proc_Name'Address)); Ignored := Do_Stuff_Handle.all; end if; end if; end; end if; end loop; end Main;
28.386667
110
0.679192
105db56d58ff0cad65e354c6287f5ef6a0076b4f
7,107
ads
Ada
src/clic-subcommand.ads
alire-project/clic
e57e289e4825e1ce4be96b5cdd1979a02a08c8ba
[ "MIT" ]
9
2021-08-30T16:11:30.000Z
2021-11-06T22:41:17.000Z
src/clic-subcommand.ads
alire-project/clic
e57e289e4825e1ce4be96b5cdd1979a02a08c8ba
[ "MIT" ]
8
2021-09-05T09:20:31.000Z
2022-03-09T10:07:52.000Z
src/clic-subcommand.ads
alire-project/clic
e57e289e4825e1ce4be96b5cdd1979a02a08c8ba
[ "MIT" ]
2
2021-09-16T14:17:20.000Z
2021-09-21T09:11:23.000Z
with AAA.Strings; with GNAT.Strings; with CLIC.Command_Line; private with Ada.Strings.Unbounded; private with Ada.Containers.Vectors; package CLIC.Subcommand is -- This root package defines the interface types to be used in the -- Subcommand. See CLIC.Subcommand.Instance to create the parser/executor. type Switches_Configuration is limited private; -- This is a wrapper around GNAT.Command_Line.Command_Line_Configuration -- to provide extra features such as duplicate switch detection and custom -- usage format. The "Define_Switch" procedure below work exactly like the -- GNAT.Command_Line ones. procedure Define_Switch (Config : in out Switches_Configuration; Switch : String := ""; Long_Switch : String := ""; Help : String := ""; Section : String := ""; Argument : String := "ARG"); procedure Define_Switch (Config : in out Switches_Configuration; Output : access Boolean; Switch : String := ""; Long_Switch : String := ""; Help : String := ""; Section : String := ""; Value : Boolean := True); procedure Define_Switch (Config : in out Switches_Configuration; Output : access Integer; Switch : String := ""; Long_Switch : String := ""; Help : String := ""; Section : String := ""; Initial : Integer := 0; Default : Integer := 1; Argument : String := "ARG"); procedure Define_Switch (Config : in out Switches_Configuration; Output : access GNAT.Strings.String_Access; Switch : String := ""; Long_Switch : String := ""; Help : String := ""; Section : String := ""; Argument : String := "ARG"); procedure Define_Switch (Config : in out Switches_Configuration; Callback : not null CLIC.Command_Line.Value_Callback; Switch : String := ""; Long_Switch : String := ""; Help : String := ""; Section : String := ""; Argument : String := "ARG"); subtype Identifier is String with Predicate => (for all C of Identifier => C in 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '-' | '.' | '_'); ------------- -- Command -- ------------- type Command is limited interface; -- This type encapsulates configuration and execution of a specific -- command. It also has help-related subprograms. type Command_Access is access all Command'Class; function Name (Cmd : Command) return Identifier is abstract; -- Commands must override this procedure to provide the sub-command name. -- This name is used to identify the sub-command in usage and command line. -- E.g. "my_app <name>" will exectute the <name> command. type Switch_Parsing_Kind is (Parse_All, -- All the sub-command arguments are parsed for switches Before_Double_Dash, -- Only the arguments before a potential "--" are parsed for switches. -- The remaining switches and arguments are passed to the Args parameter -- of the Execute primitive. All_As_Args -- Sub-command arguments parsing is disabled, both the sub-command -- switches and arguments passed to the Args parameter of the Execute -- primitive. ); function Switch_Parsing (Cmd : Command) return Switch_Parsing_Kind is abstract; -- Return True to skip sub-command switches parsing and get both the -- sub-command switches and arguments passed to the Args parameter of -- the Execute primitive. procedure Execute (Cmd : in out Command; Args : AAA.Strings.Vector) is abstract; -- Commands must override this procedure to provide the command -- functionality. function Long_Description (Cmd : Command) return AAA.Strings.Vector is abstract; -- Return a detailed description of the command. Each string in the vector -- is a paragraph that will be reformatted into appropriate length lines. procedure Setup_Switches (Cmd : in out Command; Config : in out Switches_Configuration) is null; -- Gets called once the command has been identified, but before the call to -- Execute. Config must be set up with the switches used by the command. function Short_Description (Cmd : Command) return String is abstract; -- One-liner displayed in the list of commands that alr understands that -- gets shown when no command or unknown command is given. Also shown as -- SUMMARY in the help of a specific command. function Usage_Custom_Parameters (Cmd : Command) return String is abstract; -- The part after "<main> [global options] command [command options] " that -- gets shown in USAGE in the command help summary. That is, it is the -- specific command-line part that is not managed via Gnat.Command_Line ----------------- -- Help_Topic -- ----------------- type Help_Topic is limited interface; -- This type encapsulate the content of an "help topic", i.e. a piece of -- documentation that can displayed from the command line. type Help_Topic_Access is access all Help_Topic'Class; function Name (This : Help_Topic) return Identifier is abstract; -- This name is used to identify the topic in usage and command line. -- E.g. "my_app help <name>" will display the content of the <name> topic. function Title (This : Help_Topic) return String is abstract; -- Descriptive title for the topic content. Unlike the Name, the Title can -- containt whitespaces. function Content (This : Help_Topic) return AAA.Strings.Vector is abstract; -- Return the content of the help topic. Each string in the vector is a -- paragraph that will be reformatted into appropriate length lines. ----------- -- Utils -- ----------- function No_TTY (Str : String) return String is (Str); -- Use this function for the TTY_* generic parameters of -- CLIC.Subcommand.Instance if you don't want or need TTY formating. private type Switch_Info is record Switch : Ada.Strings.Unbounded.Unbounded_String; Long_Switch : Ada.Strings.Unbounded.Unbounded_String; Help : Ada.Strings.Unbounded.Unbounded_String; Argument : Ada.Strings.Unbounded.Unbounded_String; end record; -- Used internaly to store informations about the switches package Switch_Info_Vectors is new Ada.Containers.Vectors (Natural, Switch_Info); procedure Add (Vect : in out Switch_Info_Vectors.Vector; Switch, Long_Switch, Help, Argument : String); type Switches_Configuration is limited record GNAT_Cfg : CLIC.Command_Line.Command_Line_Configuration; -- Still use GNAT.Command_Line to do the actual parsing Info : Switch_Info_Vectors.Vector; end record; procedure Clear (This : in out Switches_Configuration); end CLIC.Subcommand;
36.260204
79
0.648516
dcf7ef7d3ea4f8c5dfa717cd9022aa3c2276127a
22,314
adb
Ada
src/gen-artifacts-yaml.adb
jquorning/dynamo
10d68571476c270b8e45a9c5ef585fa9139b0d05
[ "Apache-2.0" ]
15
2015-01-18T23:04:19.000Z
2022-03-01T20:27:08.000Z
src/gen-artifacts-yaml.adb
jquorning/dynamo
10d68571476c270b8e45a9c5ef585fa9139b0d05
[ "Apache-2.0" ]
16
2018-06-10T07:09:30.000Z
2022-03-26T18:28:40.000Z
src/gen-artifacts-yaml.adb
jquorning/dynamo
10d68571476c270b8e45a9c5ef585fa9139b0d05
[ "Apache-2.0" ]
3
2015-11-11T18:00:14.000Z
2022-01-30T23:08:45.000Z
----------------------------------------------------------------------- -- gen-artifacts-yaml -- Query artifact for Code Generator -- Copyright (C) 2018, 2019, 2021 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Ada.Exceptions; with Ada.Text_IO; with Util.Strings; with Util.Beans.Objects; with Text; with Yaml.Source.File; with Yaml.Parser; with Gen.Model.Enums; with Gen.Model.Tables; with Gen.Model.Mappings; with Util.Log.Loggers; with Util.Stacks; use Yaml; package body Gen.Artifacts.Yaml is use Ada.Strings.Unbounded; use Gen.Model; use Gen.Model.Tables; Log : constant Util.Log.Loggers.Logger := Util.Log.Loggers.Create ("Gen.Artifacts.Yaml"); type State_Type is (IN_ROOT, IN_TYPE, IN_TABLE, IN_COLUMNS, IN_ONE_TO_MANY, IN_ENUM, IN_ENUM_VALUES, IN_KEYS, IN_COLUMN, IN_ASSOCIATION, IN_KEY, IN_GENERATOR, IN_UNKOWN); type Node_Info is record State : State_Type := IN_UNKOWN; Name : Text.Reference; Tag : Text.Reference; Has_Name : Boolean := False; Enum : Gen.Model.Enums.Enum_Definition_Access; Table : Gen.Model.Tables.Table_Definition_Access; Col : Gen.Model.Tables.Column_Definition_Access; Assoc : Gen.Model.Tables.Association_Definition_Access; end record; type Node_Info_Access is access all Node_Info; package Node_Stack is new Util.Stacks (Element_Type => Node_Info, Element_Type_Access => Node_Info_Access); -- Read the UML/XMI model file. procedure Read_Model (Handler : in out Artifact; File : in String; Model : in out Gen.Model.Packages.Model_Definition; Context : in out Generator'Class) is pragma Unreferenced (Handler); procedure Process_Mapping (Model : in out Gen.Model.Packages.Model_Definition; Stack : in out Node_Stack.Stack; File : in String; Loc : in Mark); procedure Read_Scalar (Node : in Node_Info_Access; Name : in String; Value : in String; Loc : in Mark); procedure Read_Scalar (Node : in Node_Info_Access; Name : in String; Value : in String; Loc : in Mark) is use type Gen.Model.Enums.Enum_Definition_Access; function Location return String is (File & ":" & Util.Strings.Image (Loc.Line) & ":" & Util.Strings.Image (Loc.Column)); New_Value : Gen.Model.Enums.Value_Definition_Access; begin case Node.State is when IN_TYPE => if Name = "type" then if Value = "enum" then Node.Enum := Gen.Model.Enums.Create_Enum (Node.Tag); Node.Enum.Set_Location (Location); Node.State := IN_ENUM; Model.Register_Enum (Node.Enum); else Node.Table := Gen.Model.Tables.Create_Table (Node.Tag); Node.Table.Set_Location (Location); Node.State := IN_TABLE; Model.Register_Table (Node.Table); end if; end if; when IN_TABLE => if Node.Table = null then return; end if; Log.Debug ("Set table {0} attribute {1}={2}", Node.Table.Name, Name, Value); if Name = "table" then Node.Table.Table_Name := To_UString (Value); elsif Name = "description" or Name = "comment" then Node.Table.Set_Comment (Value); elsif Name = "hasList" then Node.Table.Has_List := Value = "true" or Value = "yes"; end if; when IN_COLUMN | IN_KEY | IN_ASSOCIATION => if Node.Col = null then return; end if; Log.Debug ("Set table column {0} attribute {1}={2}", Node.Col.Name, Name, Value); if Name = "type" then Node.Col.Set_Type (Value); elsif Name = "length" then Node.Col.Set_Sql_Length (Value, Context); elsif Name = "column" then Node.Col.Sql_Name := To_UString (Value); elsif Name = "unique" then Node.Col.Unique := Value = "true" or Value = "yes"; elsif Name = "nullable" or Name = "optional" then Node.Col.Not_Null := Value = "false" or Value = "no"; elsif Name = "not-null" or Name = "required" then Node.Col.Not_Null := Value = "true" or Value = "yes"; elsif Name = "description" or Name = "comment" then Node.Col.Set_Comment (Value); elsif Name = "version" then Node.Col.Is_Version := Value = "true" or Value = "yes"; elsif Name = "readonly" then Node.Col.Is_Updated := Value = "false" or Value = "no"; elsif Name = "auditable" then Node.Col.Is_Auditable := Value = "true" or Value = "yes"; elsif Name = "useForeignKey" and Node.Assoc /= null then Node.Assoc.Use_Foreign_Key_Type := Value = "true" or Value = "yes"; end if; when IN_GENERATOR => if Node.Col = null then return; end if; if Name = "strategy" then Node.Col.Generator := Util.Beans.Objects.To_Object (Value); end if; when IN_ENUM_VALUES => if Node.Enum = null then return; end if; Node.Enum.Add_Value (Name, New_Value); New_Value.Set_Location (Location); New_Value.Number := Natural'Value (Value); when others => Log.Error ("Scalar {0}: {1} not handled", Name, Value); end case; end Read_Scalar; procedure Process_Mapping (Model : in out Gen.Model.Packages.Model_Definition; Stack : in out Node_Stack.Stack; File : in String; Loc : in Mark) is pragma Unreferenced (Model); function Location return String is (File & ":" & Util.Strings.Image (Loc.Line) & ":" & Util.Strings.Image (Loc.Column)); Node : Node_Info_Access; New_Node : Node_Info_Access; begin Node := Node_Stack.Current (Stack); if Node.Has_Name then Node.Has_Name := False; case Node.State is when IN_ROOT => Node_Stack.Push (Stack); New_Node := Node_Stack.Current (Stack); New_Node.Tag := Node.Name; New_Node.State := IN_TYPE; when IN_TABLE => if Node.Name = "fields" or Node.Name = "properties" then Node_Stack.Push (Stack); New_Node := Node_Stack.Current (Stack); New_Node.Table := Node.Table; New_Node.State := IN_COLUMNS; elsif Node.Name = "id" then Node_Stack.Push (Stack); New_Node := Node_Stack.Current (Stack); New_Node.Table := Node.Table; New_Node.State := IN_KEYS; elsif Node.Name = "oneToMany" then Node_Stack.Push (Stack); New_Node := Node_Stack.Current (Stack); New_Node.Table := Node.Table; New_Node.State := IN_ONE_TO_MANY; else Node_Stack.Push (Stack); New_Node := Node_Stack.Current (Stack); New_Node.Table := Node.Table; New_Node.State := IN_TABLE; end if; when IN_COLUMNS => Node.Table.Add_Column (Node.Name, Node.Col); Node.Col.Set_Location (Location); Node_Stack.Push (Stack); New_Node := Node_Stack.Current (Stack); New_Node.Table := Node.Table; New_Node.State := IN_COLUMN; when IN_ONE_TO_MANY => Node_Stack.Push (Stack); New_Node := Node_Stack.Current (Stack); New_Node.Table := Node.Table; New_Node.State := IN_ASSOCIATION; Node.Table.Add_Association (Node.Name, New_Node.Assoc); New_Node.Assoc.Set_Location (Location); New_Node.Col := New_Node.Assoc.all'Access; when IN_KEYS => Node.Table.Add_Column (Node.Name, Node.Col); Node.Col.Set_Location (Location); Node.Col.Is_Key := True; Node_Stack.Push (Stack); New_Node := Node_Stack.Current (Stack); New_Node.Table := Node.Table; New_Node.State := IN_KEY; when IN_KEY => if Node.Name = "generator" then Node_Stack.Push (Stack); New_Node := Node_Stack.Current (Stack); New_Node.Table := Node.Table; New_Node.Col := Node.Col; New_Node.State := IN_GENERATOR; end if; when IN_ENUM => if Node.Name = "values" then Node_Stack.Push (Stack); New_Node := Node_Stack.Current (Stack); New_Node.Table := Node.Table; New_Node.State := IN_ENUM_VALUES; end if; when others => Node_Stack.Push (Stack); New_Node := Node_Stack.Current (Stack); New_Node.State := IN_UNKOWN; end case; else Node_Stack.Push (Stack); end if; end Process_Mapping; Input : Source.Pointer; P : Parser.Instance; Cur : Event; Stack : Node_Stack.Stack; Node : Node_Info_Access; Loc : Mark; begin Log.Info ("Reading YAML file {0}", File); Input := Source.File.As_Source (File); P.Set_Input (Input); loop Cur := P.Next; exit when Cur.Kind = Stream_End; case Cur.Kind is when Stream_Start | Document_Start => Node_Stack.Push (Stack); Node := Node_Stack.Current (Stack); Node.State := IN_ROOT; when Stream_End | Document_End => Node_Stack.Pop (Stack); when Alias => null; when Scalar => Node := Node_Stack.Current (Stack); if Node.Has_Name then Read_Scalar (Node, To_String (Node.Name), To_String (Cur.Content), P.Current_Lexer_Token_Start); Node.Has_Name := False; else Node.Name := Cur.Content; Node.Has_Name := True; end if; when Sequence_Start => Node_Stack.Push (Stack); when Sequence_End => Node_Stack.Pop (Stack); when Mapping_Start => Process_Mapping (Model, Stack, File, P.Current_Lexer_Token_Start); when Mapping_End => Node_Stack.Pop (Stack); when Annotation_Start => null; when Annotation_End => null; end case; end loop; exception when E : others => Loc := P.Current_Lexer_Token_Start; Context.Error ("{0}: {1}", Util.Strings.Image (Loc.Line) & ":" & Util.Strings.Image (Loc.Column) & ": ", Ada.Exceptions.Exception_Message (E)); end Read_Model; -- ------------------------------ -- Save the model in a YAML file. -- ------------------------------ procedure Save_Model (Handler : in Artifact; Path : in String; Model : in out Gen.Model.Packages.Model_Definition'Class; Context : in out Generator'Class) is pragma Unreferenced (Handler, Context); procedure Write_Description (Comment : in Util.Beans.Objects.Object; Indent : in Ada.Text_IO.Count); procedure Write_Field (Item : in Gen.Model.Definition'Class; Name : in String); procedure Write_Column (Col : in Gen.Model.Tables.Column_Definition'Class); procedure Write_Association (Col : in Gen.Model.Tables.Association_Definition'Class); procedure Process_Table (Table : in out Gen.Model.Tables.Table_Definition); procedure Process_Enum (Enum : in out Gen.Model.Enums.Enum_Definition); File : Ada.Text_IO.File_Type; -- Write a description field taking into account multi-lines. procedure Write_Description (Comment : in Util.Beans.Objects.Object; Indent : in Ada.Text_IO.Count) is use type Ada.Text_IO.Count; Content : constant String := Util.Beans.Objects.To_String (Comment); Pos, Start : Positive := Content'First; begin Ada.Text_IO.Set_Col (File, Indent); Ada.Text_IO.Put (File, "description: "); if Util.Strings.Index (Content, ASCII.LF) > 0 or Util.Strings.Index (Content, ASCII.CR) > 0 then Start := Content'First; Pos := Content'First; Ada.Text_IO.Put_Line (File, "|"); while Pos <= Content'Last loop if Content (Pos) = ASCII.CR or Content (Pos) = ASCII.LF then Ada.Text_IO.Set_Col (File, Indent + 2); Ada.Text_IO.Put_Line (File, Content (Start .. Pos - 1)); Start := Pos + 1; end if; Pos := Pos + 1; end loop; if Start < Pos then Ada.Text_IO.Set_Col (File, Indent + 2); Ada.Text_IO.Put_Line (File, Content (Start .. Pos - 1)); end if; else Ada.Text_IO.Put (File, Content); end if; Ada.Text_IO.New_Line (File); end Write_Description; procedure Write_Field (Item : in Gen.Model.Definition'Class; Name : in String) is Value : constant Util.Beans.Objects.Object := Item.Get_Value (Name); begin Ada.Text_IO.Put_Line (File, Util.Beans.Objects.To_String (Value)); end Write_Field; procedure Write_Column (Col : in Gen.Model.Tables.Column_Definition'Class) is use type Gen.Model.Mappings.Mapping_Definition_Access; Col_Type : Gen.Model.Mappings.Mapping_Definition_Access; begin Col_Type := Col.Get_Type_Mapping; Ada.Text_IO.Put (File, " "); Ada.Text_IO.Put (File, Col.Get_Name); Ada.Text_IO.Put_Line (File, ":"); Ada.Text_IO.Put (File, " type: "); if Col_Type /= null then Ada.Text_IO.Put (File, Col_Type.Get_Type_Name); end if; Ada.Text_IO.New_Line (File); if Col.Is_Variable_Length then Ada.Text_IO.Put (File, " length:"); Ada.Text_IO.Put_Line (File, Positive'Image (Col.Sql_Length)); end if; Ada.Text_IO.Put (File, " column: "); Write_Field (Col, "sqlName"); if Col_Type /= null and then Col_Type.Nullable then Ada.Text_IO.Put_Line (File, " nullable: true"); end if; Ada.Text_IO.Put (File, " not-null: "); Ada.Text_IO.Put_Line (File, (if Col.Not_Null then "true" else "false")); if Col.Is_Version then Ada.Text_IO.Put_Line (File, " version: true"); end if; if not Col.Is_Updated then Ada.Text_IO.Put_Line (File, " readonly: true"); end if; if Col.Is_Auditable then Ada.Text_IO.Put_Line (File, " auditable: true"); end if; Ada.Text_IO.Put (File, " unique: "); Ada.Text_IO.Put_Line (File, (if Col.Unique then "true" else "false")); Write_Description (Col.Get_Comment, 7); end Write_Column; procedure Write_Association (Col : in Gen.Model.Tables.Association_Definition'Class) is use type Gen.Model.Mappings.Mapping_Definition_Access; Col_Type : Gen.Model.Mappings.Mapping_Definition_Access; begin Col_Type := Col.Get_Type_Mapping; Ada.Text_IO.Put (File, " "); Ada.Text_IO.Put (File, Col.Get_Name); Ada.Text_IO.Put_Line (File, ":"); Ada.Text_IO.Put (File, " type: "); if Col_Type /= null then Ada.Text_IO.Put (File, Col_Type.Get_Type_Name); end if; Ada.Text_IO.New_Line (File); if Col.Is_Variable_Length then Ada.Text_IO.Put (File, " length:"); Ada.Text_IO.Put_Line (File, Positive'Image (Col.Sql_Length)); end if; Ada.Text_IO.Put (File, " column: "); Write_Field (Col, "sqlName"); if Col_Type /= null and then Col_Type.Nullable then Ada.Text_IO.Put_Line (File, " nullable: true"); end if; Ada.Text_IO.Put (File, " not-null: "); Ada.Text_IO.Put_Line (File, (if Col.Not_Null then "true" else "false")); if not Col.Is_Updated then Ada.Text_IO.Put_Line (File, " readonly: true"); end if; if Col.Is_Auditable then Ada.Text_IO.Put_Line (File, " auditable: true"); end if; if Col.Use_Foreign_Key_Type then Ada.Text_IO.Put_Line (File, " useForeignKey: true"); end if; Ada.Text_IO.Put (File, " unique: "); Ada.Text_IO.Put_Line (File, (if Col.Unique then "true" else "false")); Write_Description (Col.Get_Comment, 7); end Write_Association; procedure Process_Table (Table : in out Gen.Model.Tables.Table_Definition) is begin Ada.Text_IO.Put (File, Table.Get_Name); Ada.Text_IO.Put_Line (File, ":"); Ada.Text_IO.Put_Line (File, " type: entity"); Ada.Text_IO.Put (File, " table: "); Write_Field (Table, "sqlName"); Write_Description (Table.Get_Comment, 3); Ada.Text_IO.Put (File, " hasList: "); Ada.Text_IO.Put_Line (File, (if Table.Has_List then "true" else "false")); Ada.Text_IO.Put (File, " indexes: "); Ada.Text_IO.New_Line (File); Ada.Text_IO.Put (File, " id: "); Ada.Text_IO.New_Line (File); for Col of Table.Members loop if Col.Is_Key then Write_Column (Col.all); end if; end loop; Ada.Text_IO.Put (File, " fields: "); Ada.Text_IO.New_Line (File); for Col of Table.Members loop if not Col.Is_Key and then not (Col.all in Gen.Model.Tables.Association_Definition'Class) then Write_Column (Col.all); end if; end loop; if Table.Has_Associations then Ada.Text_IO.Put_Line (File, " oneToMany:"); for Col of Table.Members loop if Col.all in Gen.Model.Tables.Association_Definition'Class then Write_Association (Gen.Model.Tables.Association_Definition'Class (Col.all)); end if; end loop; end if; end Process_Table; procedure Process_Enum (Enum : in out Gen.Model.Enums.Enum_Definition) is begin Ada.Text_IO.Put (File, Enum.Get_Name); Ada.Text_IO.Put_Line (File, ":"); Ada.Text_IO.Put_Line (File, " type: enum"); Ada.Text_IO.Put (File, " values: "); Ada.Text_IO.New_Line (File); for Value of Enum.Values loop Ada.Text_IO.Put (File, " "); Ada.Text_IO.Put (File, Value.Get_Name); Ada.Text_IO.Put (File, ":"); Ada.Text_IO.Put_Line (File, Natural'Image (Value.Number)); end loop; end Process_Enum; begin Ada.Text_IO.Create (File, Ada.Text_IO.Out_File, Path); Model.Iterate_Enums (Process_Enum'Access); Model.Iterate_Tables (Process_Table'Access); Ada.Text_IO.Close (File); end Save_Model; -- ------------------------------ -- Prepare the generation of the package: -- o identify the column types which are used -- o build a list of package for the with clauses. -- ------------------------------ overriding procedure Prepare (Handler : in out Artifact; Model : in out Gen.Model.Packages.Model_Definition'Class; Project : in out Gen.Model.Projects.Project_Definition'Class; Context : in out Generator'Class) is pragma Unreferenced (Project); begin Log.Debug ("Saving the model in YAML"); Handler.Save_Model (Path => "model.yaml", Model => Model, Context => Context); end Prepare; end Gen.Artifacts.Yaml;
38.406196
94
0.529578
df03db5fa551eddb3b87d582434f32a6df21a22f
16,887
adb
Ada
tests/natools-s_expressions-cache_tests.adb
faelys/natools
947c004e6f69ca144942c6af40e102d089223cf8
[ "0BSD" ]
null
null
null
tests/natools-s_expressions-cache_tests.adb
faelys/natools
947c004e6f69ca144942c6af40e102d089223cf8
[ "0BSD" ]
null
null
null
tests/natools-s_expressions-cache_tests.adb
faelys/natools
947c004e6f69ca144942c6af40e102d089223cf8
[ "0BSD" ]
null
null
null
------------------------------------------------------------------------------ -- Copyright (c) 2014, Natacha Porté -- -- -- -- Permission to use, copy, modify, and distribute this software for any -- -- purpose with or without fee is hereby granted, provided that the above -- -- copyright notice and this permission notice appear in all copies. -- -- -- -- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -- -- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -- -- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -- -- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -- -- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -- -- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -- -- OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -- ------------------------------------------------------------------------------ with System.Storage_Pools; with GNAT.Debug_Pools; with Natools.S_Expressions.Atom_Buffers; with Natools.S_Expressions.Caches; with Natools.S_Expressions.Generic_Caches; with Natools.S_Expressions.Lockable.Tests; with Natools.S_Expressions.Parsers; with Natools.S_Expressions.Printers; with Natools.S_Expressions.Test_Tools; package body Natools.S_Expressions.Cache_Tests is Pool : GNAT.Debug_Pools.Debug_Pool; package Debug_Caches is new Generic_Caches (System.Storage_Pools.Root_Storage_Pool'Class (Pool), System.Storage_Pools.Root_Storage_Pool'Class (Pool), System.Storage_Pools.Root_Storage_Pool'Class (Pool)); procedure Inject_Test (Printer : in out Printers.Printer'Class); -- Inject test S-expression into Pr function Canonical_Test return Atom; -- Return canonical encoding of test S-expression above ------------------------ -- Helper Subprograms -- ------------------------ function Canonical_Test return Atom is begin return To_Atom ("5:begin(()(4:head4:tail))3:end"); end Canonical_Test; procedure Inject_Test (Printer : in out Printers.Printer'Class) is begin Printer.Append_Atom (To_Atom ("begin")); Printer.Open_List; Printer.Open_List; Printer.Close_List; Printer.Open_List; Printer.Append_Atom (To_Atom ("head")); Printer.Append_Atom (To_Atom ("tail")); Printer.Close_List; Printer.Close_List; Printer.Append_Atom (To_Atom ("end")); end Inject_Test; ------------------------- -- Complete Test Suite -- ------------------------- procedure All_Tests (Report : in out NT.Reporter'Class) is begin Default_Instantiation (Report); Debug_Instantiation (Report); Descriptor_Interface (Report); Lockable_Interface (Report); Replayable_Interface (Report); Duplication (Report); end All_Tests; ----------------------- -- Inidividual Tests -- ----------------------- procedure Debug_Instantiation (Report : in out NT.Reporter'Class) is Test : NT.Test := Report.Item ("Debug instantiation"); Buffer : Atom_Buffers.Atom_Buffer; procedure Put (S : in String); procedure Put_Line (S : in String); procedure Flush; procedure Info_Pool; procedure Put (S : in String) is begin Buffer.Append (To_Atom (S)); end Put; procedure Put_Line (S : in String) is begin Test.Info (To_String (Buffer.Data) & S); Buffer.Soft_Reset; end Put_Line; procedure Flush is begin if Buffer.Length > 0 then Test.Info (To_String (Buffer.Data)); end if; Buffer.Hard_Reset; end Flush; procedure Info_Pool is procedure Print_Info is new GNAT.Debug_Pools.Print_Info; begin Print_Info (Pool); Flush; end Info_Pool; begin declare Cache, Deep, Shallow : Debug_Caches.Reference; begin declare Empty_Cursor : Debug_Caches.Cursor := Deep.First; Event : Events.Event; begin Event := Empty_Cursor.Current_Event; if Event /= Events.End_Of_Input then Test.Fail ("Unexpected Empty_Cursor.Current_Event " & Events.Event'Image (Event) & " (expected End_Of_Input)"); end if; Test_Tools.Next_And_Check (Test, Empty_Cursor, Events.End_Of_Input, 0); end; Inject_Test (Cache); declare First : Debug_Caches.Cursor := Cache.First; Output : aliased Test_Tools.Memory_Stream; Pr : Printers.Canonical (Output'Access); begin Output.Set_Expected (Canonical_Test); Printers.Transfer (First, Pr); Output.Check_Stream (Test); end; Deep := Cache.Duplicate; Shallow := Deep; Deep.Append_Atom (To_Atom ("more")); declare Other : Debug_Caches.Cursor := Deep.First; Output : aliased Test_Tools.Memory_Stream; Pr : Printers.Canonical (Output'Access); begin Output.Set_Expected (Canonical_Test & To_Atom ("4:more")); Printers.Transfer (Other, Pr); Output.Check_Stream (Test); end; declare Second : Debug_Caches.Cursor := Cache.First; Output : aliased Test_Tools.Memory_Stream; Pr : Printers.Canonical (Output'Access); begin Output.Set_Expected (Canonical_Test); Printers.Transfer (Second, Pr); Output.Check_Stream (Test); end; declare Second_Other : Debug_Caches.Cursor := Shallow.First; Output : aliased Test_Tools.Memory_Stream; Pr : Printers.Canonical (Output'Access); begin Output.Set_Expected (Canonical_Test & To_Atom ("4:more")); Printers.Transfer (Second_Other, Pr); Output.Check_Stream (Test); end; end; Info_Pool; exception when Error : others => Test.Report_Exception (Error); end Debug_Instantiation; procedure Default_Instantiation (Report : in out NT.Reporter'Class) is Test : NT.Test := Report.Item ("Default instantiation"); begin declare Cache, Deep, Shallow : Caches.Reference; begin declare Empty_Cursor : Caches.Cursor := Deep.First; Event : Events.Event; begin Event := Empty_Cursor.Current_Event; if Event /= Events.End_Of_Input then Test.Fail ("Unexpected Empty_Cursor.Current_Event " & Events.Event'Image (Event) & " (expected End_Of_Input)"); end if; Test_Tools.Next_And_Check (Test, Empty_Cursor, Events.End_Of_Input, 0); end; Inject_Test (Cache); declare First : Caches.Cursor := Cache.First; Output : aliased Test_Tools.Memory_Stream; Pr : Printers.Canonical (Output'Access); begin Output.Set_Expected (Canonical_Test); Printers.Transfer (First, Pr); Output.Check_Stream (Test); end; Deep := Cache.Duplicate; Shallow := Deep; Deep.Append_Atom (To_Atom ("more")); declare Other : Caches.Cursor := Deep.First; Output : aliased Test_Tools.Memory_Stream; Pr : Printers.Canonical (Output'Access); begin Output.Set_Expected (Canonical_Test & To_Atom ("4:more")); Printers.Transfer (Other, Pr); Output.Check_Stream (Test); end; declare Second : Caches.Cursor := Cache.First; Output : aliased Test_Tools.Memory_Stream; Pr : Printers.Canonical (Output'Access); begin Output.Set_Expected (Canonical_Test); Printers.Transfer (Second, Pr); Output.Check_Stream (Test); end; declare Second_Other : Caches.Cursor := Shallow.First; Output : aliased Test_Tools.Memory_Stream; Pr : Printers.Canonical (Output'Access); begin Output.Set_Expected (Canonical_Test & To_Atom ("4:more")); Printers.Transfer (Second_Other, Pr); Output.Check_Stream (Test); end; end; exception when Error : others => Test.Report_Exception (Error); end Default_Instantiation; procedure Descriptor_Interface (Report : in out NT.Reporter'Class) is Test : NT.Test := Report.Item ("Descriptor insterface"); begin declare Cache : Caches.Reference; First, Second : Caches.Cursor; begin Cache.Append_Atom (To_Atom ("begin")); Cache.Open_List; Cache.Append_Atom (To_Atom ("command")); Cache.Open_List; Cache.Append_Atom (To_Atom ("first")); Cache.Append_Atom (To_Atom ("second")); Cache.Close_List; Cache.Close_List; Cache.Append_Atom (To_Atom ("end")); First := Cache.First; Second := First; Test_Tools.Test_Atom_Accessors (Test, First, To_Atom ("begin"), 0); Test_Tools.Test_Atom_Accessors (Test, Second, To_Atom ("begin"), 0); Test_Tools.Next_And_Check (Test, First, Events.Open_List, 1); Test_Tools.Test_Atom_Accessor_Exceptions (Test, First); Test_Tools.Next_And_Check (Test, First, To_Atom ("command"), 1); Test_Tools.Next_And_Check (Test, First, Events.Open_List, 2); Test_Tools.Next_And_Check (Test, Second, Events.Open_List, 1); Test_Tools.Next_And_Check (Test, First, To_Atom ("first"), 2); Test_Tools.Next_And_Check (Test, Second, To_Atom ("command"), 1); Test_Tools.Next_And_Check (Test, First, To_Atom ("second"), 2); Test_Tools.Next_And_Check (Test, First, Events.Close_List, 1); Test_Tools.Next_And_Check (Test, Second, Events.Open_List, 2); Test_Tools.Next_And_Check (Test, Second, To_Atom ("first"), 2); Test_Tools.Next_And_Check (Test, Second, To_Atom ("second"), 2); Test_Tools.Next_And_Check (Test, First, Events.Close_List, 0); Test_Tools.Next_And_Check (Test, Second, Events.Close_List, 1); Test_Tools.Test_Atom_Accessor_Exceptions (Test, Second); Test_Tools.Next_And_Check (Test, Second, Events.Close_List, 0); Test_Tools.Next_And_Check (Test, Second, To_Atom ("end"), 0); Test_Tools.Next_And_Check (Test, First, To_Atom ("end"), 0); Test_Tools.Next_And_Check (Test, First, Events.End_Of_Input, 0); Test_Tools.Next_And_Check (Test, Second, Events.End_Of_Input, 0); end; exception when Error : others => Test.Report_Exception (Error); end Descriptor_Interface; procedure Duplication (Report : in out NT.Reporter'Class) is Test : NT.Test := Report.Item ("Duplication of general descriptor"); begin Full_Duplication : declare Input : aliased Test_Tools.Memory_Stream; Parser : Parsers.Stream_Parser (Input'Access); begin Input.Set_Data (Lockable.Tests.Test_Expression); Test_Tools.Next_And_Check (Test, Parser, Events.Open_List, 1); declare Image : Caches.Cursor := Caches.Move (Parser); begin Lockable.Tests.Test_Interface (Test, Image); end; end Full_Duplication; Partial_Duplication : declare Input : aliased Test_Tools.Memory_Stream; Parser : Parsers.Stream_Parser (Input'Access); Copy : Caches.Cursor; begin Input.Set_Data (To_Atom ("(first_part (command-1) (command-2 arg-1 arg-2) end)" & "(second_part (command-3 arg-3) final)")); Test_Tools.Next_And_Check (Test, Parser, Events.Open_List, 1); Test_Tools.Next_And_Check (Test, Parser, To_Atom ("first_part"), 1); Copy := Caches.Move (Parser); Test_Tools.Test_Atom_Accessors (Test, Copy, To_Atom ("first_part"), 0); Test_Tools.Next_And_Check (Test, Copy, Events.Open_List, 1); Test_Tools.Next_And_Check (Test, Copy, To_Atom ("command-1"), 1); Test_Tools.Next_And_Check (Test, Copy, Events.Close_List, 0); Test_Tools.Next_And_Check (Test, Copy, Events.Open_List, 1); Test_Tools.Next_And_Check (Test, Copy, To_Atom ("command-2"), 1); Test_Tools.Next_And_Check (Test, Copy, To_Atom ("arg-1"), 1); Test_Tools.Next_And_Check (Test, Copy, To_Atom ("arg-2"), 1); Test_Tools.Next_And_Check (Test, Copy, Events.Close_List, 0); Test_Tools.Next_And_Check (Test, Copy, To_Atom ("end"), 0); Test_Tools.Next_And_Check (Test, Copy, Events.End_Of_Input, 0); Test_Tools.Next_And_Check (Test, Parser, Events.Open_List, 1); Test_Tools.Next_And_Check (Test, Parser, To_Atom ("second_part"), 1); Test_Tools.Next_And_Check (Test, Parser, Events.Open_List, 2); Test_Tools.Next_And_Check (Test, Parser, To_Atom ("command-3"), 2); Test_Tools.Next_And_Check (Test, Parser, To_Atom ("arg-3"), 2); Test_Tools.Next_And_Check (Test, Parser, Events.Close_List, 1); Test_Tools.Next_And_Check (Test, Parser, To_Atom ("final"), 1); Test_Tools.Next_And_Check (Test, Parser, Events.Close_List, 0); end Partial_Duplication; exception when Error : others => Test.Report_Exception (Error); end Duplication; procedure Lockable_Interface (Report : in out NT.Reporter'Class) is Test : NT.Test := Report.Item ("Lockable.Descriptor insterface"); begin declare Cache : Caches.Reference; begin declare Input : aliased Test_Tools.Memory_Stream; Parser : Parsers.Stream_Parser (Input'Access); begin Input.Set_Data (Lockable.Tests.Test_Expression); Test_Tools.Next_And_Check (Test, Parser, Events.Open_List, 1); Printers.Transfer (Parser, Cache); end; declare Cursor : Caches.Cursor := Cache.First; begin Lockable.Tests.Test_Interface (Test, Cursor); end; end; exception when Error : others => Test.Report_Exception (Error); end Lockable_Interface; procedure Replayable_Interface (Report : in out NT.Reporter'Class) is Test : NT.Test := Report.Item ("Replayable.Descriptor insterface"); begin declare Cache : Caches.Reference; First, Second : Caches.Cursor; begin Cache.Append_Atom (To_Atom ("begin")); Cache.Open_List; Cache.Append_Atom (To_Atom ("command")); Cache.Open_List; Cache.Append_Atom (To_Atom ("first")); Cache.Append_Atom (To_Atom ("second")); Cache.Close_List; Cache.Close_List; Cache.Append_Atom (To_Atom ("end")); First := Cache.First; Test_Tools.Test_Atom_Accessors (Test, First, To_Atom ("begin"), 0); Test_Tools.Next_And_Check (Test, First, Events.Open_List, 1); Test_Tools.Test_Atom_Accessor_Exceptions (Test, First); Test_Tools.Next_And_Check (Test, First, To_Atom ("command"), 1); Second := First.Duplicate; Test_Tools.Next_And_Check (Test, First, Events.Open_List, 2); Test_Tools.Next_And_Check (Test, First, To_Atom ("first"), 2); Test_Tools.Next_And_Check (Test, First, To_Atom ("second"), 2); Test_Tools.Next_And_Check (Test, First, Events.Close_List, 1); Test_Tools.Next_And_Check (Test, Second, Events.Open_List, 2); Test_Tools.Next_And_Check (Test, Second, To_Atom ("first"), 2); Test_Tools.Next_And_Check (Test, Second, To_Atom ("second"), 2); Test_Tools.Next_And_Check (Test, First, Events.Close_List, 0); Test_Tools.Next_And_Check (Test, Second, Events.Close_List, 1); Test_Tools.Test_Atom_Accessor_Exceptions (Test, Second); Test_Tools.Next_And_Check (Test, Second, Events.Close_List, 0); Test_Tools.Next_And_Check (Test, Second, To_Atom ("end"), 0); Test_Tools.Next_And_Check (Test, First, To_Atom ("end"), 0); Test_Tools.Next_And_Check (Test, First, Events.End_Of_Input, 0); Test_Tools.Next_And_Check (Test, Second, Events.End_Of_Input, 0); end; exception when Error : others => Test.Report_Exception (Error); end Replayable_Interface; end Natools.S_Expressions.Cache_Tests;
37.778523
78
0.610055
1c4fe9566933742072c8708f91d3fe9ab58a67cc
5,499
adb
Ada
examples/temp_voltage/main.adb
ekoeppen/MSP430_Generic_Ada_Drivers
12b8238ea22dbb0c0c6c63ca46bfa7e2cb80334a
[ "MIT" ]
null
null
null
examples/temp_voltage/main.adb
ekoeppen/MSP430_Generic_Ada_Drivers
12b8238ea22dbb0c0c6c63ca46bfa7e2cb80334a
[ "MIT" ]
null
null
null
examples/temp_voltage/main.adb
ekoeppen/MSP430_Generic_Ada_Drivers
12b8238ea22dbb0c0c6c63ca46bfa7e2cb80334a
[ "MIT" ]
null
null
null
with System; with Interfaces; use Interfaces; with MSPGD.Board; use MSPGD.Board; with Drivers.Text_IO; with MSP430_SVD; use MSP430_SVD; with MSP430_SVD.ADC10; use MSP430_SVD.ADC10; procedure Main is pragma Preelaborate; package Text_IO is new Drivers.Text_IO (USART => UART); Info_C : array (Unsigned_16 range 0 .. 31) of Unsigned_16 with Address => System'To_Address (16#10C0#); procedure Show_Info_C is begin for I of Info_C loop Text_IO.Put_Hex (Unsigned_32 (I)); Text_IO.Put (" "); end loop; Text_IO.New_Line; end Show_Info_C; type ADC_Calibration_Data_Type is record ADC_Gain_Factor : Unsigned_16; ADC_Offset : Unsigned_16; ADC_15VRef_Factor : Unsigned_16; ADC_15T30 : Unsigned_16; ADC_15T85 : Unsigned_16; ADC_25VRef_Factor : Unsigned_16; ADC_25T30 : Unsigned_16; ADC_25T85 : Unsigned_16; end record; procedure Get_ADC_Calibration (Data : out ADC_Calibration_Data_Type) is I : Unsigned_16 range Info_C'Range := Info_C'First + 1; Tag : Unsigned_16; Len : Unsigned_16; begin loop Tag := Info_C (I) and 16#FF#; Len := Info_C (I) / (2 ** 9); if I + Len >= Info_C'Last then exit; end if; if Tag = 16#10# then Data.ADC_Gain_Factor := Info_C (I + 1); Data.ADC_Offset := Info_C (I + 2); Data.ADC_15VRef_Factor := Info_C (I + 3); Data.ADC_15T30 := Info_C (I + 4); Data.ADC_15T85 := Info_C (I + 5); Data.ADC_25VRef_Factor := Info_C (I + 6); Data.ADC_25T30 := Info_C (I + 7); Data.ADC_25T85 := Info_C (I + 8); end if; I := I + Len + 1; end loop; end Get_ADC_Calibration; function Read_Temp_ADC return Unsigned_16 is begin ADC10_Periph.ADC10CTL0 := (SREF => Sref_0, ADC10SHT => Adc10Sht_0, others => 0); ADC10_Periph.ADC10CTL1.INCH := Inch_10; ADC10_Periph.ADC10CTL0 := (SREF => Sref_1, ADC10SHT => Adc10Sht_3, REFON => 1, ADC10ON => 1, ENC => 1, others => 0); ADC10_Periph.ADC10CTL0.ADC10SC := 1; while ADC10_Periph.ADC10CTL1.ADC10BUSY = 1 loop null; end loop; ADC10_Periph.ADC10CTL0 := (SREF => Sref_0, ADC10SHT => Adc10Sht_0, others => 0); return Unsigned_16 (ADC10_Periph.ADC10MEM); end Read_Temp_ADC; function Read_Voltage_ADC return Unsigned_16 is ADC : Unsigned_16; Voltage : Unsigned_32; begin ADC10_Periph.ADC10CTL0 := (SREF => Sref_0, ADC10SHT => Adc10Sht_0, others => 0); ADC10_Periph.ADC10CTL1.INCH := Inch_11; ADC10_Periph.ADC10CTL0 := (SREF => Sref_1, ADC10SHT => Adc10Sht_3, REFON => 1, ADC10ON => 1, ENC => 1, others => 0); ADC10_Periph.ADC10CTL0.ADC10SC := 1; while ADC10_Periph.ADC10CTL1.ADC10BUSY = 1 loop null; end loop; ADC := Unsigned_16 (ADC10_Periph.ADC10MEM); if ADC > 16#0380# then ADC10_Periph.ADC10CTL0 := (SREF => Sref_0, ADC10SHT => Adc10Sht_0, others => 0); ADC10_Periph.ADC10CTL0 := (SREF => Sref_1, ADC10SHT => Adc10Sht_3, REF2_5V => 1, REFON => 1, ENC => 1, ADC10ON => 1, others => 0); ADC10_Periph.ADC10CTL0.ADC10SC := 1; while ADC10_Periph.ADC10CTL1.ADC10BUSY = 1 loop null; end loop; ADC := Unsigned_16 (ADC10_Periph.ADC10MEM); Voltage := (Unsigned_32 (ADC) * 5 * 125) / 128; else Voltage := (Unsigned_32 (ADC) * 3 * 125) / 128; end if; ADC10_Periph.ADC10CTL0 := (SREF => Sref_0, ADC10SHT => Adc10Sht_0, others => 0); return Unsigned_16 (Voltage); end Read_Voltage_ADC; Calibration_Data : ADC_Calibration_Data_Type; Calib_Offset : Integer_32; Calib_Scale : Integer_32; Input: String (1 .. 16); Input_Len : Integer; procedure Print_Calibration_Data is begin Text_IO.Put_Hex (Unsigned_32 (Calibration_Data.ADC_15VRef_Factor)); Text_IO.New_Line; Text_IO.Put_Hex (Unsigned_32 (Calibration_Data.ADC_15T30)); Text_IO.New_Line; Text_IO.Put_Hex (Unsigned_32 (Calibration_Data.ADC_15T85)); Text_IO.New_Line; end Print_Calibration_Data; procedure Print_Temperature is ADC_Value : Unsigned_16; Temp : Integer_32; Calib_Temp : Unsigned_16; begin ADC_Value := Read_Temp_ADC; Temp := (Integer_32 (ADC_Value) * 27069 - 18169625) / 2 ** 16; -- Calib_Temp := (Integer_32 (ADC_Value) * Calib_Scale + Calib_Offset) / 2 ** 16; Calib_Temp := (ADC_Value - Calibration_Data.ADC_15T30) * (55 / (Calibration_Data.ADC_15T85 - Calibration_Data.ADC_15T30)) + 30; Text_IO.Put_Hex (Unsigned_32 (ADC_Value)); Text_IO.Put (" "); Text_IO.Put_Hex (Unsigned_32 (Temp)); Text_IO.Put (" "); Text_IO.Put_Hex (Unsigned_32 (Calib_Temp)); Text_IO.New_Line; end Print_Temperature; procedure Print_Voltage is Voltage : Unsigned_16; begin Voltage := Read_Voltage_ADC; Text_IO.Put_Hex (Unsigned_32 (Voltage)); Text_IO.New_Line; end Print_Voltage; begin Init; Text_IO.Put_Line ("Internal temperature/voltage sensor readings"); -- Show_Info_C; Get_ADC_Calibration (Calibration_Data); Calib_Scale := 3604480 / Integer_32 (Calibration_Data.ADC_15T85 - Calibration_Data.ADC_15T30); Calib_Offset := 1998848 - Integer_32 (Calibration_Data.ADC_15T30) * Calib_Scale; loop Text_IO.Put_Line ("Press <enter> to read data"); Text_IO.Get_Line (Input, Input_Len); Print_Temperature; Print_Voltage; end loop; end Main;
38.1875
139
0.654301
108422a3174faa6a9c725ba5e46bceefbc5ea7e2
20,638
ads
Ada
gcc-gcc-7_3_0-release/gcc/ada/g-debpoo.ads
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
7
2020-05-02T17:34:05.000Z
2021-10-17T10:15:18.000Z
gcc-gcc-7_3_0-release/gcc/ada/g-debpoo.ads
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
null
null
null
gcc-gcc-7_3_0-release/gcc/ada/g-debpoo.ads
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
2
2020-07-27T00:22:36.000Z
2021-04-01T09:41:02.000Z
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- G N A T . D E B U G _ P O O L S -- -- -- -- S p e c -- -- -- -- Copyright (C) 1992-2015, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- This packages provides a special implementation of the Ada 95 storage pools -- The goal of this debug pool is to detect incorrect uses of memory -- (multiple deallocations, access to invalid memory,...). Errors are reported -- in one of two ways: either by immediately raising an exception, or by -- printing a message on standard output or standard error. -- You need to instrument your code to use this package: for each access type -- you want to monitor, you need to add a clause similar to: -- type Integer_Access is access Integer; -- for Integer_Access'Storage_Pool use Pool; -- where Pool is a tagged object declared with -- -- Pool : GNAT.Debug_Pools.Debug_Pool; -- This package was designed to be as efficient as possible, but still has an -- impact on the performance of your code, which depends on the number of -- allocations, deallocations and, somewhat less, dereferences that your -- application performs. -- For each faulty memory use, this debug pool will print several lines -- of information, including things like the location where the memory -- was initially allocated, the location where it was freed etc. -- Physical allocations and deallocations are done through the usual system -- calls. However, in order to provide proper checks, the debug pool will not -- release the memory immediately. It keeps released memory around (the amount -- kept around is configurable) so that it can distinguish between memory that -- has not been allocated and memory that has been allocated but freed. This -- also means that this memory cannot be reallocated, preventing what would -- otherwise be a false indication that freed memory is now allocated. -- In addition, this package presents several subprograms that help analyze -- the behavior of your program, by reporting memory leaks, the total amount -- of memory that was allocated. The pool is also designed to work correctly -- in conjunction with gnatmem. -- Finally, a subprogram Print_Pool is provided for use from the debugger -- Limitations -- =========== -- Current limitation of this debug pool: if you use this debug pool for a -- general access type ("access all"), the pool might report invalid -- dereferences if the access object is pointing to another object on the -- stack which was not allocated through a call to "new". -- This debug pool will respect all alignments specified in your code, but -- it does that by aligning all objects using Standard'Maximum_Alignment. -- This allows faster checks, and limits the performance impact of using -- this pool. with System; use System; with System.Storage_Elements; use System.Storage_Elements; with System.Checked_Pools; package GNAT.Debug_Pools is type Debug_Pool is new System.Checked_Pools.Checked_Pool with private; -- The new debug pool subtype SSC is System.Storage_Elements.Storage_Count; Default_Max_Freed : constant SSC := 50_000_000; Default_Stack_Trace_Depth : constant Natural := 20; Default_Reset_Content : constant Boolean := False; Default_Raise_Exceptions : constant Boolean := True; Default_Advanced_Scanning : constant Boolean := False; Default_Min_Freed : constant SSC := 0; Default_Errors_To_Stdout : constant Boolean := True; Default_Low_Level_Traces : constant Boolean := False; -- The above values are constants used for the parameters to Configure -- if not overridden in the call. See description of Configure for full -- details on these parameters. If these defaults are not satisfactory, -- then you need to call Configure to change the default values. procedure Configure (Pool : in out Debug_Pool; Stack_Trace_Depth : Natural := Default_Stack_Trace_Depth; Maximum_Logically_Freed_Memory : SSC := Default_Max_Freed; Minimum_To_Free : SSC := Default_Min_Freed; Reset_Content_On_Free : Boolean := Default_Reset_Content; Raise_Exceptions : Boolean := Default_Raise_Exceptions; Advanced_Scanning : Boolean := Default_Advanced_Scanning; Errors_To_Stdout : Boolean := Default_Errors_To_Stdout; Low_Level_Traces : Boolean := Default_Low_Level_Traces); -- Subprogram used to configure the debug pool. -- -- Stack_Trace_Depth. This parameter controls the maximum depth of stack -- traces that are output to indicate locations of actions for error -- conditions such as bad allocations. If set to zero, the debug pool -- will not try to compute backtraces. This is more efficient but gives -- less information on problem locations -- -- Maximum_Logically_Freed_Memory: maximum amount of memory (bytes) -- that should be kept before starting to physically deallocate some. -- This value should be non-zero, since having memory that is logically -- but not physically freed helps to detect invalid memory accesses. -- -- Minimum_To_Free is the minimum amount of memory that should be freed -- every time the pool starts physically releasing memory. The algorithm -- to compute which block should be physically released needs some -- expensive initialization (see Advanced_Scanning below), and this -- parameter can be used to limit the performance impact by ensuring -- that a reasonable amount of memory is freed each time. Even in the -- advanced scanning mode, marked blocks may be released to match this -- Minimum_To_Free parameter. -- -- Reset_Content_On_Free: If true, then the contents of the freed memory -- is reset to the pattern 16#DEADBEEF#, following an old IBM convention. -- This helps in detecting invalid memory references from the debugger. -- -- Raise_Exceptions: If true, the exceptions below will be raised every -- time an error is detected. If you set this to False, then the action -- is to generate output on standard error or standard output, depending -- on Errors_To_Stdout, noting the errors, but to -- keep running if possible (of course if storage is badly damaged, this -- attempt may fail. This helps to detect more than one error in a run. -- -- Advanced_Scanning: If true, the pool will check the contents of all -- allocated blocks before physically releasing memory. Any possible -- reference to a logically free block will prevent its deallocation. -- Note that this algorithm is approximate, and it is recommended -- that you set Minimum_To_Free to a non-zero value to save time. -- -- Errors_To_Stdout: Errors messages will be displayed on stdout if -- this parameter is True, or to stderr otherwise. -- -- Low_Level_Traces: Traces all allocation and deallocations on the -- stream specified by Errors_To_Stdout. This can be used for -- post-processing by your own application, or to debug the -- debug_pool itself. The output indicates the size of the allocated -- block both as requested by the application and as physically -- allocated to fit the additional information needed by the debug -- pool. -- -- All instantiations of this pool use the same internal tables. However, -- they do not store the same amount of information for the tracebacks, -- and they have different counters for maximum logically freed memory. Accessing_Not_Allocated_Storage : exception; -- Exception raised if Raise_Exception is True, and an attempt is made -- to access storage that was never allocated. Accessing_Deallocated_Storage : exception; -- Exception raised if Raise_Exception is True, and an attempt is made -- to access storage that was allocated but has been deallocated. Freeing_Not_Allocated_Storage : exception; -- Exception raised if Raise_Exception is True, and an attempt is made -- to free storage that had not been previously allocated. Freeing_Deallocated_Storage : exception; -- Exception raised if Raise_Exception is True, and an attempt is made -- to free storage that had already been freed. -- Note on the above exceptions. The distinction between not allocated -- and deallocated storage is not guaranteed to be accurate in the case -- where storage is allocated, and then physically freed. Larger values -- of the parameter Maximum_Logically_Freed_Memory will help to guarantee -- that this distinction is made more accurately. generic with procedure Put_Line (S : String) is <>; with procedure Put (S : String) is <>; procedure Print_Info (Pool : Debug_Pool; Cumulate : Boolean := False; Display_Slots : Boolean := False; Display_Leaks : Boolean := False); -- Print out information about the High Water Mark, the current and -- total number of bytes allocated and the total number of bytes -- deallocated. -- -- If Display_Slots is true, this subprogram prints a list of all the -- locations in the application that have done at least one allocation or -- deallocation. The result might be used to detect places in the program -- where lots of allocations are taking place. This output is not in any -- defined order. -- -- If Cumulate if True, then each stack trace will display the number of -- allocations that were done either directly, or by the subprograms called -- at that location (e.g: if there were two physical allocations at a->b->c -- and a->b->d, then a->b would be reported as performing two allocations). -- -- If Display_Leaks is true, then each block that has not been deallocated -- (often called a "memory leak") will be listed, along with the traceback -- showing where it was allocated. Not that no grouping of the blocks is -- done, you should use the Dump_Gnatmem procedure below in conjunction -- with the gnatmem utility. procedure Print_Info_Stdout (Pool : Debug_Pool; Cumulate : Boolean := False; Display_Slots : Boolean := False; Display_Leaks : Boolean := False); -- Standard instantiation of Print_Info to print on standard_output. More -- convenient to use where this is the intended location, and in particular -- easier to use from the debugger. procedure Dump_Gnatmem (Pool : Debug_Pool; File_Name : String); -- Create an external file on the disk, which can be processed by gnatmem -- to display the location of memory leaks. -- -- This provides a nicer output that Print_Info above, and groups similar -- stack traces together. This also provides an easy way to save the memory -- status of your program for post-mortem analysis. -- -- To use this file, use the following command line: -- gnatmem 5 -i <File_Name> <Executable_Name> -- If you want all the stack traces to be displayed with 5 levels. procedure Print_Pool (A : System.Address); pragma Export (C, Print_Pool, "print_pool"); -- This subprogram is meant to be used from a debugger. Given an address in -- memory, it will print on standard output the known information about -- this address (provided, of course, the matching pointer is handled by -- the Debug_Pool). -- -- The information includes the stacktrace for the allocation or -- deallocation of that memory chunk, its current status (allocated or -- logically freed), etc. type Report_Type is (All_Reports, Memory_Usage, Allocations_Count, Sort_Total_Allocs, Marked_Blocks); for Report_Type use (All_Reports => 0, Memory_Usage => 1, Allocations_Count => 2, Sort_Total_Allocs => 3, Marked_Blocks => 4); generic with procedure Put_Line (S : String) is <>; with procedure Put (S : String) is <>; procedure Dump (Pool : Debug_Pool; Size : Positive; Report : Report_Type := All_Reports); -- Dump information about memory usage. -- Size is the number of the biggest memory users we want to show. Report -- indicates which sorting order is used in the report. procedure Dump_Stdout (Pool : Debug_Pool; Size : Positive; Report : Report_Type := All_Reports); -- Standard instantiation of Dump to print on standard_output. More -- convenient to use where this is the intended location, and in particular -- easier to use from the debugger. procedure Reset; -- Reset all internal data. This is in general not needed, unless you want -- to know what memory is used by specific parts of your application procedure Get_Size (Storage_Address : Address; Size_In_Storage_Elements : out Storage_Count; Valid : out Boolean); -- Set Valid if Storage_Address is the address of a chunk of memory -- currently allocated by any pool. -- If Valid is True, Size_In_Storage_Elements is set to the size of this -- chunk of memory. type Byte_Count is mod System.Max_Binary_Modulus; -- Type used for maintaining byte counts, needs to be large enough to -- to accommodate counts allowing for repeated use of the same memory. function High_Water_Mark (Pool : Debug_Pool) return Byte_Count; -- Return the highest size of the memory allocated by the pool. -- Memory used internally by the pool is not taken into account. function Current_Water_Mark (Pool : Debug_Pool) return Byte_Count; -- Return the size of the memory currently allocated by the pool. -- Memory used internally by the pool is not taken into account. procedure System_Memory_Debug_Pool (Has_Unhandled_Memory : Boolean := True); -- Let the package know the System.Memory is using it. -- If Has_Unhandled_Memory is true, some deallocation can be done for -- memory not allocated with Allocate. private -- The following are the standard primitive subprograms for a pool procedure Allocate (Pool : in out Debug_Pool; Storage_Address : out Address; Size_In_Storage_Elements : Storage_Count; Alignment : Storage_Count); -- Allocate a new chunk of memory, and set it up so that the debug pool -- can check accesses to its data, and report incorrect access later on. -- The parameters have the same semantics as defined in the ARM95. procedure Deallocate (Pool : in out Debug_Pool; Storage_Address : Address; Size_In_Storage_Elements : Storage_Count; Alignment : Storage_Count); -- Mark a block of memory as invalid. It might not be physically removed -- immediately, depending on the setup of the debug pool, so that checks -- are still possible. The parameters have the same semantics as defined -- in the RM. function Storage_Size (Pool : Debug_Pool) return SSC; -- Return the maximal size of data that can be allocated through Pool. -- Since Pool uses the malloc() system call, all the memory is accessible -- through the pool procedure Dereference (Pool : in out Debug_Pool; Storage_Address : System.Address; Size_In_Storage_Elements : Storage_Count; Alignment : Storage_Count); -- Check whether a dereference statement is valid, i.e. whether the pointer -- was allocated through Pool. As documented above, errors will be -- reported either by a special error message or an exception, depending -- on the setup of the storage pool. -- The parameters have the same semantics as defined in the ARM95. type Debug_Pool is new System.Checked_Pools.Checked_Pool with record Stack_Trace_Depth : Natural := Default_Stack_Trace_Depth; Maximum_Logically_Freed_Memory : SSC := Default_Max_Freed; Reset_Content_On_Free : Boolean := Default_Reset_Content; Raise_Exceptions : Boolean := Default_Raise_Exceptions; Minimum_To_Free : SSC := Default_Min_Freed; Advanced_Scanning : Boolean := Default_Advanced_Scanning; Errors_To_Stdout : Boolean := Default_Errors_To_Stdout; Low_Level_Traces : Boolean := Default_Low_Level_Traces; Alloc_Count : Byte_Count := 0; -- Total number of allocation Free_Count : Byte_Count := 0; -- Total number of deallocation Allocated : Byte_Count := 0; -- Total number of bytes allocated in this pool Logically_Deallocated : Byte_Count := 0; -- Total number of bytes logically deallocated in this pool. This is the -- memory that the application has released, but that the pool has not -- yet physically released through a call to free(), to detect later -- accessed to deallocated memory. Physically_Deallocated : Byte_Count := 0; -- Total number of bytes that were free()-ed Marked_Blocks_Deallocated : Boolean := False; -- Set to true if some mark blocks had to be deallocated in the advanced -- scanning scheme. Since this is potentially dangerous, this is -- reported to the user, who might want to rerun his program with a -- lower Minimum_To_Free value. High_Water : Byte_Count := 0; -- Maximum of Allocated - Logically_Deallocated - Physically_Deallocated First_Free_Block : System.Address := System.Null_Address; Last_Free_Block : System.Address := System.Null_Address; -- Pointers to the first and last logically freed blocks First_Used_Block : System.Address := System.Null_Address; -- Pointer to the list of currently allocated blocks. This list is -- used to list the memory leaks in the application on exit, as well as -- for the advanced freeing algorithms that needs to traverse all these -- blocks to find possible references to the block being physically -- freed. end record; end GNAT.Debug_Pools;
50.336585
79
0.660141
d072d8f20a00caf86fd4f80b57d87a0b5bf25126
5,237
adb
Ada
source/amf/mof/amf-internals-generic_element_table.adb
svn2github/matreshka
9d222b3ad9da508855fb1f5adbe5e8a4fad4c530
[ "BSD-3-Clause" ]
24
2016-11-29T06:59:41.000Z
2021-08-30T11:55:16.000Z
source/amf/mof/amf-internals-generic_element_table.adb
svn2github/matreshka
9d222b3ad9da508855fb1f5adbe5e8a4fad4c530
[ "BSD-3-Clause" ]
2
2019-01-16T05:15:20.000Z
2019-02-03T10:03:32.000Z
source/amf/mof/amf-internals-generic_element_table.adb
svn2github/matreshka
9d222b3ad9da508855fb1f5adbe5e8a4fad4c530
[ "BSD-3-Clause" ]
4
2017-07-18T07:11:05.000Z
2020-06-21T03:02:25.000Z
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Ada Modeling Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2012, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ package body AMF.Internals.Generic_Element_Table is function S (Item : AMF_Element) return Segment_Index; pragma Inline (S); function E (Item : AMF_Element) return Element_Index; pragma Inline (E); function M (Item : AMF_Element) return AMF_Metamodel; ------- -- S -- ------- function S (Item : AMF_Element) return Segment_Index is begin return Segment_Index ((Item / 2 ** 12) and 16#00000FFF#); end S; ------- -- E -- ------- function E (Item : AMF_Element) return Element_Index is begin return Element_Index (Item and 16#00000FFF#); end E; ------- -- M -- ------- function M (Item : AMF_Element) return AMF_Metamodel is begin return AMF_Metamodel (Item / 2 ** 24); end M; -------------- -- Allocate -- -------------- function Allocate return AMF_Element is begin Increment_Last; return Last; end Allocate; -------------------- -- Increment_Last -- -------------------- procedure Increment_Last is begin Last_Element := Last_Element + 1; if E (Last_Element) = 0 then Segments (S (Last_Element)) := new Segment_Array; end if; end Increment_Last; ---------------- -- Initialize -- ---------------- procedure Initialize (Metamodel : AMF_Metamodel) is begin Module_Component := AMF_Element (Metamodel) * 2 ** 24; Last_Element := 0; Segments (0) := new Segment_Array; end Initialize; ---------- -- Last -- ---------- function Last return AMF_Element is begin return AMF_Element (Last_Element or Module_Component); end Last; ----------- -- Table -- ----------- function Table (Element : AMF_Element) return Element_Access is begin return Segments (S (Element)) (E (Element))'Access; end Table; end AMF.Internals.Generic_Element_Table;
39.08209
78
0.454077
dff327221a5ad8e462ddd0ad5d9e82bffd0c8ed4
75,590
adb
Ada
Validation/pyFrame3DD-master/gcc-master/gcc/ada/repinfo.adb
djamal2727/Main-Bearing-Analytical-Model
2f00c2219c71be0175c6f4f8f1d4cca231d97096
[ "Apache-2.0" ]
null
null
null
Validation/pyFrame3DD-master/gcc-master/gcc/ada/repinfo.adb
djamal2727/Main-Bearing-Analytical-Model
2f00c2219c71be0175c6f4f8f1d4cca231d97096
[ "Apache-2.0" ]
null
null
null
Validation/pyFrame3DD-master/gcc-master/gcc/ada/repinfo.adb
djamal2727/Main-Bearing-Analytical-Model
2f00c2219c71be0175c6f4f8f1d4cca231d97096
[ "Apache-2.0" ]
null
null
null
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- R E P I N F O -- -- -- -- B o d y -- -- -- -- Copyright (C) 1999-2020, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT 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 distributed with GNAT; see file COPYING3. If not, go to -- -- http://www.gnu.org/licenses for a complete copy of the license. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ with Alloc; with Atree; use Atree; with Casing; use Casing; with Debug; use Debug; with Einfo; use Einfo; with Lib; use Lib; with Namet; use Namet; with Nlists; use Nlists; with Opt; use Opt; with Output; use Output; with Sem_Aux; use Sem_Aux; with Sem_Eval; use Sem_Eval; with Sinfo; use Sinfo; with Sinput; use Sinput; with Snames; use Snames; with Stringt; use Stringt; with Table; with Ttypes; with Uname; use Uname; with Urealp; use Urealp; with Ada.Unchecked_Conversion; with GNAT.HTable; package body Repinfo is SSU : Pos renames Ttypes.System_Storage_Unit; -- Value for Storage_Unit --------------------------------------- -- Representation of GCC Expressions -- --------------------------------------- -- A table internal to this unit is used to hold the values of back -- annotated expressions. -- Node values are stored as Uint values using the negative of the node -- index in this table. Constants appear as non-negative Uint values. type Exp_Node is record Expr : TCode; Op1 : Node_Ref_Or_Val; Op2 : Node_Ref_Or_Val; Op3 : Node_Ref_Or_Val; end record; -- The following representation clause ensures that the above record -- has no holes. We do this so that when instances of this record are -- written, we do not write uninitialized values to the file. for Exp_Node use record Expr at 0 range 0 .. 31; Op1 at 4 range 0 .. 31; Op2 at 8 range 0 .. 31; Op3 at 12 range 0 .. 31; end record; for Exp_Node'Size use 16 * 8; -- This ensures that we did not leave out any fields package Rep_Table is new Table.Table ( Table_Component_Type => Exp_Node, Table_Index_Type => Nat, Table_Low_Bound => 1, Table_Initial => Alloc.Rep_Table_Initial, Table_Increment => Alloc.Rep_Table_Increment, Table_Name => "BE_Rep_Table"); -------------------------------------------------------------- -- Representation of Front-End Dynamic Size/Offset Entities -- -------------------------------------------------------------- package Dynamic_SO_Entity_Table is new Table.Table ( Table_Component_Type => Entity_Id, Table_Index_Type => Nat, Table_Low_Bound => 1, Table_Initial => Alloc.Rep_Table_Initial, Table_Increment => Alloc.Rep_Table_Increment, Table_Name => "FE_Rep_Table"); Unit_Casing : Casing_Type; -- Identifier casing for current unit. This is set by List_Rep_Info for -- each unit, before calling subprograms which may read it. Need_Separator : Boolean; -- Set True if a separator is needed before outputting any information for -- the current entity. ------------------------------ -- Set of Relevant Entities -- ------------------------------ Relevant_Entities_Size : constant := 4093; -- Number of headers in hash table subtype Entity_Header_Num is Integer range 0 .. Relevant_Entities_Size - 1; -- Range of headers in hash table function Entity_Hash (Id : Entity_Id) return Entity_Header_Num; -- Simple hash function for Entity_Ids package Relevant_Entities is new GNAT.Htable.Simple_HTable (Header_Num => Entity_Header_Num, Element => Boolean, No_Element => False, Key => Entity_Id, Hash => Entity_Hash, Equal => "="); -- Hash table to record which compiler-generated entities are relevant ----------------------- -- Local Subprograms -- ----------------------- function Back_End_Layout return Boolean; -- Test for layout mode, True = back end, False = front end. This function -- is used rather than checking the configuration parameter because we do -- not want Repinfo to depend on Targparm. procedure List_Entities (Ent : Entity_Id; Bytes_Big_Endian : Boolean; In_Subprogram : Boolean := False); -- This procedure lists the entities associated with the entity E, starting -- with the First_Entity and using the Next_Entity link. If a nested -- package is found, entities within the package are recursively processed. -- When recursing within a subprogram body, Is_Subprogram suppresses -- duplicate information about signature. procedure List_Name (Ent : Entity_Id); -- List name of entity Ent in appropriate case. The name is listed with -- full qualification up to but not including the compilation unit name. procedure List_Array_Info (Ent : Entity_Id; Bytes_Big_Endian : Boolean); -- List representation info for array type Ent procedure List_Common_Type_Info (Ent : Entity_Id); -- List common type info (name, size, alignment) for type Ent procedure List_Linker_Section (Ent : Entity_Id); -- List linker section for Ent (caller has checked that Ent is an entity -- for which the Linker_Section_Pragma field is defined). procedure List_Location (Ent : Entity_Id); -- List location information for Ent procedure List_Object_Info (Ent : Entity_Id); -- List representation info for object Ent procedure List_Record_Info (Ent : Entity_Id; Bytes_Big_Endian : Boolean); -- List representation info for record type Ent procedure List_Scalar_Storage_Order (Ent : Entity_Id; Bytes_Big_Endian : Boolean); -- List scalar storage order information for record or array type Ent. -- Also includes bit order information for record types, if necessary. procedure List_Subprogram_Info (Ent : Entity_Id); -- List subprogram info for subprogram Ent procedure List_Type_Info (Ent : Entity_Id); -- List type info for type Ent function Rep_Not_Constant (Val : Node_Ref_Or_Val) return Boolean; -- Returns True if Val represents a variable value, and False if it -- represents a value that is fixed at compile time. procedure Spaces (N : Natural); -- Output given number of spaces procedure Write_Info_Line (S : String); -- Routine to write a line to Repinfo output file. This routine is passed -- as a special output procedure to Output.Set_Special_Output. Note that -- Write_Info_Line is called with an EOL character at the end of each line, -- as per the Output spec, but the internal call to the appropriate routine -- in Osint requires that the end of line sequence be stripped off. procedure Write_Mechanism (M : Mechanism_Type); -- Writes symbolic string for mechanism represented by M procedure Write_Separator; -- Called before outputting anything for an entity. Ensures that -- a separator precedes the output for a particular entity. procedure Write_Unknown_Val; -- Writes symbolic string for an unknown or non-representable value procedure Write_Val (Val : Node_Ref_Or_Val; Paren : Boolean := False); -- Given a representation value, write it out. No_Uint values or values -- dependent on discriminants are written as two question marks. If the -- flag Paren is set, then the output is surrounded in parentheses if it is -- other than a simple value. --------------------- -- Back_End_Layout -- --------------------- function Back_End_Layout return Boolean is begin -- We have back-end layout if the back end has made any entries in the -- table of GCC expressions, otherwise we have front-end layout. return Rep_Table.Last > 0; end Back_End_Layout; ------------------------ -- Create_Discrim_Ref -- ------------------------ function Create_Discrim_Ref (Discr : Entity_Id) return Node_Ref is begin return Create_Node (Expr => Discrim_Val, Op1 => Discriminant_Number (Discr)); end Create_Discrim_Ref; --------------------------- -- Create_Dynamic_SO_Ref -- --------------------------- function Create_Dynamic_SO_Ref (E : Entity_Id) return Dynamic_SO_Ref is begin Dynamic_SO_Entity_Table.Append (E); return UI_From_Int (-Dynamic_SO_Entity_Table.Last); end Create_Dynamic_SO_Ref; ----------------- -- Create_Node -- ----------------- function Create_Node (Expr : TCode; Op1 : Node_Ref_Or_Val; Op2 : Node_Ref_Or_Val := No_Uint; Op3 : Node_Ref_Or_Val := No_Uint) return Node_Ref is begin Rep_Table.Append ( (Expr => Expr, Op1 => Op1, Op2 => Op2, Op3 => Op3)); return UI_From_Int (-Rep_Table.Last); end Create_Node; ----------------- -- Entity_Hash -- ----------------- function Entity_Hash (Id : Entity_Id) return Entity_Header_Num is begin return Entity_Header_Num (Id mod Relevant_Entities_Size); end Entity_Hash; --------------------------- -- Get_Dynamic_SO_Entity -- --------------------------- function Get_Dynamic_SO_Entity (U : Dynamic_SO_Ref) return Entity_Id is begin return Dynamic_SO_Entity_Table.Table (-UI_To_Int (U)); end Get_Dynamic_SO_Entity; ----------------------- -- Is_Dynamic_SO_Ref -- ----------------------- function Is_Dynamic_SO_Ref (U : SO_Ref) return Boolean is begin return U < Uint_0; end Is_Dynamic_SO_Ref; ---------------------- -- Is_Static_SO_Ref -- ---------------------- function Is_Static_SO_Ref (U : SO_Ref) return Boolean is begin return U >= Uint_0; end Is_Static_SO_Ref; --------- -- lgx -- --------- procedure lgx (U : Node_Ref_Or_Val) is begin List_GCC_Expression (U); Write_Eol; end lgx; ---------------------- -- List_Array_Info -- ---------------------- procedure List_Array_Info (Ent : Entity_Id; Bytes_Big_Endian : Boolean) is begin Write_Separator; if List_Representation_Info_To_JSON then Write_Line ("{"); end if; List_Common_Type_Info (Ent); if List_Representation_Info_To_JSON then Write_Line (","); Write_Str (" ""Component_Size"": "); Write_Val (Component_Size (Ent)); else Write_Str ("for "); List_Name (Ent); Write_Str ("'Component_Size use "); Write_Val (Component_Size (Ent)); Write_Line (";"); end if; List_Scalar_Storage_Order (Ent, Bytes_Big_Endian); List_Linker_Section (Ent); if List_Representation_Info_To_JSON then Write_Eol; Write_Line ("}"); end if; -- The component type is relevant for an array if List_Representation_Info = 4 and then Is_Itype (Component_Type (Base_Type (Ent))) then Relevant_Entities.Set (Component_Type (Base_Type (Ent)), True); end if; end List_Array_Info; --------------------------- -- List_Common_Type_Info -- --------------------------- procedure List_Common_Type_Info (Ent : Entity_Id) is begin if List_Representation_Info_To_JSON then Write_Str (" ""name"": """); List_Name (Ent); Write_Line (""","); List_Location (Ent); end if; -- Do not list size info for unconstrained arrays, not meaningful if Is_Array_Type (Ent) and then not Is_Constrained (Ent) then null; else -- If Esize and RM_Size are the same, list as Size. This is a common -- case, which we may as well list in simple form. if Esize (Ent) = RM_Size (Ent) then if List_Representation_Info_To_JSON then Write_Str (" ""Size"": "); Write_Val (Esize (Ent)); Write_Line (","); else Write_Str ("for "); List_Name (Ent); Write_Str ("'Size use "); Write_Val (Esize (Ent)); Write_Line (";"); end if; -- Otherwise list size values separately else if List_Representation_Info_To_JSON then Write_Str (" ""Object_Size"": "); Write_Val (Esize (Ent)); Write_Line (","); Write_Str (" ""Value_Size"": "); Write_Val (RM_Size (Ent)); Write_Line (","); else Write_Str ("for "); List_Name (Ent); Write_Str ("'Object_Size use "); Write_Val (Esize (Ent)); Write_Line (";"); Write_Str ("for "); List_Name (Ent); Write_Str ("'Value_Size use "); Write_Val (RM_Size (Ent)); Write_Line (";"); end if; end if; end if; if List_Representation_Info_To_JSON then Write_Str (" ""Alignment"": "); Write_Val (Alignment (Ent)); else Write_Str ("for "); List_Name (Ent); Write_Str ("'Alignment use "); Write_Val (Alignment (Ent)); Write_Line (";"); end if; end List_Common_Type_Info; ------------------- -- List_Entities -- ------------------- procedure List_Entities (Ent : Entity_Id; Bytes_Big_Endian : Boolean; In_Subprogram : Boolean := False) is Body_E : Entity_Id; E : Entity_Id; function Find_Declaration (E : Entity_Id) return Node_Id; -- Utility to retrieve declaration node for entity in the -- case of package bodies and subprograms. ---------------------- -- Find_Declaration -- ---------------------- function Find_Declaration (E : Entity_Id) return Node_Id is Decl : Node_Id; begin Decl := Parent (E); while Present (Decl) and then Nkind (Decl) /= N_Package_Body and then Nkind (Decl) /= N_Subprogram_Declaration and then Nkind (Decl) /= N_Subprogram_Body loop Decl := Parent (Decl); end loop; return Decl; end Find_Declaration; -- Start of processing for List_Entities begin -- List entity if we have one, and it is not a renaming declaration. -- For renamings, we don't get proper information, and really it makes -- sense to restrict the output to the renamed entity. if Present (Ent) and then Nkind (Declaration_Node (Ent)) not in N_Renaming_Declaration and then not Is_Ignored_Ghost_Entity (Ent) then -- If entity is a subprogram and we are listing mechanisms, -- then we need to list mechanisms for this entity. We skip this -- if it is a nested subprogram, as the information has already -- been produced when listing the enclosing scope. if List_Representation_Info_Mechanisms and then (Is_Subprogram (Ent) or else Ekind (Ent) = E_Entry or else Ekind (Ent) = E_Entry_Family) and then not In_Subprogram then List_Subprogram_Info (Ent); end if; E := First_Entity (Ent); while Present (E) loop -- We list entities that come from source (excluding private or -- incomplete types or deferred constants, for which we will list -- the information for the full view). If requested, we also list -- relevant entities that have been generated when processing the -- original entities coming from source. But if debug flag A is -- set, then all entities are listed. if ((Comes_From_Source (E) or else (Ekind (E) = E_Block and then Nkind (Parent (E)) = N_Implicit_Label_Declaration and then Comes_From_Source (Label_Construct (Parent (E))))) and then not Is_Incomplete_Or_Private_Type (E) and then not (Ekind (E) = E_Constant and then Present (Full_View (E)))) or else (List_Representation_Info = 4 and then Relevant_Entities.Get (E)) or else Debug_Flag_AA then if Is_Subprogram (E) then if List_Representation_Info_Mechanisms then List_Subprogram_Info (E); end if; -- Recurse into entities local to subprogram List_Entities (E, Bytes_Big_Endian, True); elsif Ekind (E) in E_Entry | E_Entry_Family | E_Subprogram_Type then if List_Representation_Info_Mechanisms then List_Subprogram_Info (E); end if; elsif Is_Record_Type (E) then if List_Representation_Info >= 1 then List_Record_Info (E, Bytes_Big_Endian); end if; -- Recurse into entities local to a record type if List_Representation_Info = 4 then List_Entities (E, Bytes_Big_Endian, False); end if; elsif Is_Array_Type (E) then if List_Representation_Info >= 1 then List_Array_Info (E, Bytes_Big_Endian); end if; elsif Is_Type (E) then if List_Representation_Info >= 2 then List_Type_Info (E); end if; -- Note that formals are not annotated so we skip them here elsif Ekind (E) in E_Constant | E_Loop_Parameter | E_Variable then if List_Representation_Info >= 2 then List_Object_Info (E); end if; end if; -- Recurse into nested package, but not if they are package -- renamings (in particular renamings of the enclosing package, -- as for some Java bindings and for generic instances). if Ekind (E) = E_Package then if No (Renamed_Object (E)) then List_Entities (E, Bytes_Big_Endian); end if; -- Recurse into bodies elsif Ekind (E) in E_Package_Body | E_Protected_Body | E_Protected_Type | E_Subprogram_Body | E_Task_Body | E_Task_Type then List_Entities (E, Bytes_Big_Endian); -- Recurse into blocks elsif Ekind (E) = E_Block then List_Entities (E, Bytes_Big_Endian); end if; end if; Next_Entity (E); end loop; -- For a package body, the entities of the visible subprograms are -- declared in the corresponding spec. Iterate over its entities in -- order to handle properly the subprogram bodies. Skip bodies in -- subunits, which are listed independently. if Ekind (Ent) = E_Package_Body and then Present (Corresponding_Spec (Find_Declaration (Ent))) then E := First_Entity (Corresponding_Spec (Find_Declaration (Ent))); while Present (E) loop if Is_Subprogram (E) and then Nkind (Find_Declaration (E)) = N_Subprogram_Declaration then Body_E := Corresponding_Body (Find_Declaration (E)); if Present (Body_E) and then Nkind (Parent (Find_Declaration (Body_E))) /= N_Subunit then List_Entities (Body_E, Bytes_Big_Endian); end if; end if; Next_Entity (E); end loop; end if; end if; end List_Entities; ------------------------- -- List_GCC_Expression -- ------------------------- procedure List_GCC_Expression (U : Node_Ref_Or_Val) is procedure Print_Expr (Val : Node_Ref_Or_Val); -- Internal recursive procedure to print expression ---------------- -- Print_Expr -- ---------------- procedure Print_Expr (Val : Node_Ref_Or_Val) is begin if Val >= 0 then UI_Write (Val, Decimal); else declare Node : Exp_Node renames Rep_Table.Table (-UI_To_Int (Val)); procedure Unop (S : String); -- Output text for unary operator with S being operator name procedure Binop (S : String); -- Output text for binary operator with S being operator name ---------- -- Unop -- ---------- procedure Unop (S : String) is begin if List_Representation_Info_To_JSON then Write_Str ("{ ""code"": """); if S (S'Last) = ' ' then Write_Str (S (S'First .. S'Last - 1)); else Write_Str (S); end if; Write_Str (""", ""operands"": [ "); Print_Expr (Node.Op1); Write_Str (" ] }"); else Write_Str (S); Print_Expr (Node.Op1); end if; end Unop; ----------- -- Binop -- ----------- procedure Binop (S : String) is begin if List_Representation_Info_To_JSON then Write_Str ("{ ""code"": """); Write_Str (S (S'First + 1 .. S'Last - 1)); Write_Str (""", ""operands"": [ "); Print_Expr (Node.Op1); Write_Str (", "); Print_Expr (Node.Op2); Write_Str (" ] }"); else Write_Char ('('); Print_Expr (Node.Op1); Write_Str (S); Print_Expr (Node.Op2); Write_Char (')'); end if; end Binop; -- Start of processing for Print_Expr begin case Node.Expr is when Cond_Expr => if List_Representation_Info_To_JSON then Write_Str ("{ ""code"": ""?<>"""); Write_Str (", ""operands"": [ "); Print_Expr (Node.Op1); Write_Str (", "); Print_Expr (Node.Op2); Write_Str (", "); Print_Expr (Node.Op3); Write_Str (" ] }"); else Write_Str ("(if "); Print_Expr (Node.Op1); Write_Str (" then "); Print_Expr (Node.Op2); Write_Str (" else "); Print_Expr (Node.Op3); Write_Str (" end)"); end if; when Plus_Expr => Binop (" + "); when Minus_Expr => Binop (" - "); when Mult_Expr => Binop (" * "); when Trunc_Div_Expr => Binop (" /t "); when Ceil_Div_Expr => Binop (" /c "); when Floor_Div_Expr => Binop (" /f "); when Trunc_Mod_Expr => Binop (" modt "); when Ceil_Mod_Expr => Binop (" modc "); when Floor_Mod_Expr => Binop (" modf "); when Exact_Div_Expr => Binop (" /e "); when Negate_Expr => Unop ("-"); when Min_Expr => Binop (" min "); when Max_Expr => Binop (" max "); when Abs_Expr => Unop ("abs "); when Truth_And_Expr => Binop (" and "); when Truth_Or_Expr => Binop (" or "); when Truth_Xor_Expr => Binop (" xor "); when Truth_Not_Expr => Unop ("not "); when Lt_Expr => Binop (" < "); when Le_Expr => Binop (" <= "); when Gt_Expr => Binop (" > "); when Ge_Expr => Binop (" >= "); when Eq_Expr => Binop (" == "); when Ne_Expr => Binop (" != "); when Bit_And_Expr => Binop (" & "); when Discrim_Val => Unop ("#"); when Dynamic_Val => Unop ("var"); end case; end; end if; end Print_Expr; -- Start of processing for List_GCC_Expression begin if U = No_Uint then Write_Unknown_Val; else Print_Expr (U); end if; end List_GCC_Expression; ------------------------- -- List_Linker_Section -- ------------------------- procedure List_Linker_Section (Ent : Entity_Id) is Args : List_Id; Sect : Node_Id; begin if Present (Linker_Section_Pragma (Ent)) then Args := Pragma_Argument_Associations (Linker_Section_Pragma (Ent)); Sect := Expr_Value_S (Get_Pragma_Arg (Last (Args))); if List_Representation_Info_To_JSON then Write_Line (","); Write_Str (" ""Linker_Section"": """); else Write_Str ("pragma Linker_Section ("); List_Name (Ent); Write_Str (", """); end if; pragma Assert (Nkind (Sect) = N_String_Literal); String_To_Name_Buffer (Strval (Sect)); Write_Str (Name_Buffer (1 .. Name_Len)); Write_Str (""""); if not List_Representation_Info_To_JSON then Write_Line (");"); end if; end if; end List_Linker_Section; ------------------- -- List_Location -- ------------------- procedure List_Location (Ent : Entity_Id) is begin pragma Assert (List_Representation_Info_To_JSON); Write_Str (" ""location"": """); Write_Location (Sloc (Ent)); Write_Line (""","); end List_Location; --------------- -- List_Name -- --------------- procedure List_Name (Ent : Entity_Id) is C : Character; begin -- List the qualified name recursively, except -- at compilation unit level in default mode. if Is_Compilation_Unit (Ent) then null; elsif not Is_Compilation_Unit (Scope (Ent)) or else List_Representation_Info_To_JSON then List_Name (Scope (Ent)); Write_Char ('.'); end if; Get_Unqualified_Decoded_Name_String (Chars (Ent)); Set_Casing (Unit_Casing); -- The name of operators needs to be properly escaped for JSON for J in 1 .. Name_Len loop C := Name_Buffer (J); if C = '"' and then List_Representation_Info_To_JSON then Write_Char ('\'); end if; Write_Char (C); end loop; end List_Name; --------------------- -- List_Object_Info -- --------------------- procedure List_Object_Info (Ent : Entity_Id) is begin Write_Separator; if List_Representation_Info_To_JSON then Write_Line ("{"); Write_Str (" ""name"": """); List_Name (Ent); Write_Line (""","); List_Location (Ent); Write_Str (" ""Size"": "); Write_Val (Esize (Ent)); Write_Line (","); Write_Str (" ""Alignment"": "); Write_Val (Alignment (Ent)); List_Linker_Section (Ent); Write_Eol; Write_Line ("}"); else Write_Str ("for "); List_Name (Ent); Write_Str ("'Size use "); Write_Val (Esize (Ent)); Write_Line (";"); Write_Str ("for "); List_Name (Ent); Write_Str ("'Alignment use "); Write_Val (Alignment (Ent)); Write_Line (";"); List_Linker_Section (Ent); end if; -- The type is relevant for an object if List_Representation_Info = 4 and then Is_Itype (Etype (Ent)) then Relevant_Entities.Set (Etype (Ent), True); end if; end List_Object_Info; ---------------------- -- List_Record_Info -- ---------------------- procedure List_Record_Info (Ent : Entity_Id; Bytes_Big_Endian : Boolean) is procedure Compute_Max_Length (Ent : Entity_Id; Starting_Position : Uint := Uint_0; Starting_First_Bit : Uint := Uint_0; Prefix_Length : Natural := 0); -- Internal recursive procedure to compute the max length procedure List_Component_Layout (Ent : Entity_Id; Starting_Position : Uint := Uint_0; Starting_First_Bit : Uint := Uint_0; Prefix : String := ""; Indent : Natural := 0); -- Procedure to display the layout of a single component procedure List_Record_Layout (Ent : Entity_Id; Starting_Position : Uint := Uint_0; Starting_First_Bit : Uint := Uint_0; Prefix : String := ""); -- Internal recursive procedure to display the layout procedure List_Structural_Record_Layout (Ent : Entity_Id; Outer_Ent : Entity_Id; Variant : Node_Id := Empty; Indent : Natural := 0); -- Internal recursive procedure to display the structural layout Incomplete_Layout : exception; -- Exception raised if the layout is incomplete in -gnatc mode Not_In_Extended_Main : exception; -- Exception raised when an ancestor is not declared in the main unit Max_Name_Length : Natural := 0; Max_Spos_Length : Natural := 0; ------------------------ -- Compute_Max_Length -- ------------------------ procedure Compute_Max_Length (Ent : Entity_Id; Starting_Position : Uint := Uint_0; Starting_First_Bit : Uint := Uint_0; Prefix_Length : Natural := 0) is Comp : Entity_Id; begin Comp := First_Component_Or_Discriminant (Ent); while Present (Comp) loop -- Skip a completely hidden discriminant or a discriminant in an -- unchecked union (since it is not there). if Ekind (Comp) = E_Discriminant and then (Is_Completely_Hidden (Comp) or else Is_Unchecked_Union (Ent)) then goto Continue; end if; -- Skip _Parent component in extension (to avoid overlap) if Chars (Comp) = Name_uParent then goto Continue; end if; -- All other cases declare Ctyp : constant Entity_Id := Underlying_Type (Etype (Comp)); Bofs : constant Uint := Component_Bit_Offset (Comp); Npos : Uint; Fbit : Uint; Spos : Uint; Sbit : Uint; Name_Length : Natural; begin Get_Decoded_Name_String (Chars (Comp)); Name_Length := Prefix_Length + Name_Len; if Rep_Not_Constant (Bofs) then -- If the record is not packed, then we know that all fields -- whose position is not specified have starting normalized -- bit position of zero. if Unknown_Normalized_First_Bit (Comp) and then not Is_Packed (Ent) then Set_Normalized_First_Bit (Comp, Uint_0); end if; UI_Image_Length := 2; -- For "??" marker else Npos := Bofs / SSU; Fbit := Bofs mod SSU; -- Complete annotation in case not done if Unknown_Normalized_First_Bit (Comp) then Set_Normalized_Position (Comp, Npos); Set_Normalized_First_Bit (Comp, Fbit); end if; Spos := Starting_Position + Npos; Sbit := Starting_First_Bit + Fbit; if Sbit >= SSU then Spos := Spos + 1; Sbit := Sbit - SSU; end if; -- If extended information is requested, recurse fully into -- record components, i.e. skip the outer level. if List_Representation_Info_Extended and then Is_Record_Type (Ctyp) then Compute_Max_Length (Ctyp, Spos, Sbit, Name_Length + 1); goto Continue; end if; UI_Image (Spos); end if; Max_Name_Length := Natural'Max (Max_Name_Length, Name_Length); Max_Spos_Length := Natural'Max (Max_Spos_Length, UI_Image_Length); end; <<Continue>> Next_Component_Or_Discriminant (Comp); end loop; end Compute_Max_Length; --------------------------- -- List_Component_Layout -- --------------------------- procedure List_Component_Layout (Ent : Entity_Id; Starting_Position : Uint := Uint_0; Starting_First_Bit : Uint := Uint_0; Prefix : String := ""; Indent : Natural := 0) is Esiz : constant Uint := Esize (Ent); Npos : constant Uint := Normalized_Position (Ent); Fbit : constant Uint := Normalized_First_Bit (Ent); Spos : Uint; Sbit : Uint; Lbit : Uint; begin if List_Representation_Info_To_JSON then Spaces (Indent); Write_Line (" {"); Spaces (Indent); Write_Str (" ""name"": """); Write_Str (Prefix); Write_Str (Name_Buffer (1 .. Name_Len)); Write_Line (""","); if Ekind (Ent) = E_Discriminant then Spaces (Indent); Write_Str (" ""discriminant"": "); UI_Write (Discriminant_Number (Ent), Decimal); Write_Line (","); end if; Spaces (Indent); Write_Str (" ""Position"": "); else Write_Str (" "); Write_Str (Prefix); Write_Str (Name_Buffer (1 .. Name_Len)); Spaces (Max_Name_Length - Prefix'Length - Name_Len); Write_Str (" at "); end if; if Known_Static_Normalized_Position (Ent) then Spos := Starting_Position + Npos; Sbit := Starting_First_Bit + Fbit; if Sbit >= SSU then Spos := Spos + 1; end if; UI_Image (Spos); Spaces (Max_Spos_Length - UI_Image_Length); Write_Str (UI_Image_Buffer (1 .. UI_Image_Length)); elsif Known_Normalized_Position (Ent) and then List_Representation_Info >= 3 then Spaces (Max_Spos_Length - 2); if Starting_Position /= Uint_0 then UI_Write (Starting_Position, Decimal); Write_Str (" + "); end if; Write_Val (Npos); else Write_Unknown_Val; end if; if List_Representation_Info_To_JSON then Write_Line (","); Spaces (Indent); Write_Str (" ""First_Bit"": "); else Write_Str (" range "); end if; Sbit := Starting_First_Bit + Fbit; if Sbit >= SSU then Sbit := Sbit - SSU; end if; UI_Write (Sbit, Decimal); if List_Representation_Info_To_JSON then Write_Line (", "); Spaces (Indent); Write_Str (" ""Size"": "); else Write_Str (" .. "); end if; -- Allowing Uint_0 here is an annoying special case. Really this -- should be a fine Esize value but currently it means unknown, -- except that we know after gigi has back annotated that a size -- of zero is real, since otherwise gigi back annotates using -- No_Uint as the value to indicate unknown. if (Esize (Ent) = Uint_0 or else Known_Static_Esize (Ent)) and then Known_Static_Normalized_First_Bit (Ent) then Lbit := Sbit + Esiz - 1; if List_Representation_Info_To_JSON then UI_Write (Esiz, Decimal); else if Lbit >= 0 and then Lbit < 10 then Write_Char (' '); end if; UI_Write (Lbit, Decimal); end if; -- The test for Esize (Ent) not Uint_0 here is an annoying special -- case. Officially a value of zero for Esize means unknown, but -- here we use the fact that we know that gigi annotates Esize with -- No_Uint, not Uint_0. Really everyone should use No_Uint??? elsif List_Representation_Info < 3 or else (Esize (Ent) /= Uint_0 and then Unknown_Esize (Ent)) then Write_Unknown_Val; -- List_Representation >= 3 and Known_Esize (Ent) else Write_Val (Esiz, Paren => not List_Representation_Info_To_JSON); -- If in front-end layout mode, then dynamic size is stored in -- storage units, so renormalize for output. if not Back_End_Layout then Write_Str (" * "); Write_Int (SSU); end if; -- Add appropriate first bit offset if not List_Representation_Info_To_JSON then if Sbit = 0 then Write_Str (" - 1"); elsif Sbit = 1 then null; else Write_Str (" + "); Write_Int (UI_To_Int (Sbit) - 1); end if; end if; end if; if List_Representation_Info_To_JSON then Write_Eol; Spaces (Indent); Write_Str (" }"); else Write_Line (";"); end if; -- The type is relevant for a component if List_Representation_Info = 4 and then Is_Itype (Etype (Ent)) then Relevant_Entities.Set (Etype (Ent), True); end if; end List_Component_Layout; ------------------------ -- List_Record_Layout -- ------------------------ procedure List_Record_Layout (Ent : Entity_Id; Starting_Position : Uint := Uint_0; Starting_First_Bit : Uint := Uint_0; Prefix : String := "") is Comp : Entity_Id; First : Boolean := True; begin Comp := First_Component_Or_Discriminant (Ent); while Present (Comp) loop -- Skip a completely hidden discriminant or a discriminant in an -- unchecked union (since it is not there). if Ekind (Comp) = E_Discriminant and then (Is_Completely_Hidden (Comp) or else Is_Unchecked_Union (Ent)) then goto Continue; end if; -- Skip _Parent component in extension (to avoid overlap) if Chars (Comp) = Name_uParent then goto Continue; end if; -- All other cases declare Ctyp : constant Entity_Id := Underlying_Type (Etype (Comp)); Npos : constant Uint := Normalized_Position (Comp); Fbit : constant Uint := Normalized_First_Bit (Comp); Spos : Uint; Sbit : Uint; begin Get_Decoded_Name_String (Chars (Comp)); Set_Casing (Unit_Casing); -- If extended information is requested, recurse fully into -- record components, i.e. skip the outer level. if List_Representation_Info_Extended and then Is_Record_Type (Ctyp) and then Known_Static_Normalized_Position (Comp) and then Known_Static_Normalized_First_Bit (Comp) then Spos := Starting_Position + Npos; Sbit := Starting_First_Bit + Fbit; if Sbit >= SSU then Spos := Spos + 1; Sbit := Sbit - SSU; end if; List_Record_Layout (Ctyp, Spos, Sbit, Prefix & Name_Buffer (1 .. Name_Len) & "."); goto Continue; end if; if List_Representation_Info_To_JSON then if First then Write_Eol; First := False; else Write_Line (","); end if; end if; List_Component_Layout (Comp, Starting_Position, Starting_First_Bit, Prefix); end; <<Continue>> Next_Component_Or_Discriminant (Comp); end loop; end List_Record_Layout; ----------------------------------- -- List_Structural_Record_Layout -- ----------------------------------- procedure List_Structural_Record_Layout (Ent : Entity_Id; Outer_Ent : Entity_Id; Variant : Node_Id := Empty; Indent : Natural := 0) is function Derived_Discriminant (Disc : Entity_Id) return Entity_Id; -- This function assumes that Outer_Ent is an extension of Ent. -- Disc is a discriminant of Ent that does not itself constrain a -- discriminant of the parent type of Ent. Return the discriminant -- of Outer_Ent that ultimately constrains Disc, if any. ---------------------------- -- Derived_Discriminant -- ---------------------------- function Derived_Discriminant (Disc : Entity_Id) return Entity_Id is Corr_Disc : Entity_Id; Derived_Disc : Entity_Id; begin Derived_Disc := First_Discriminant (Outer_Ent); -- Loop over the discriminants of the extension while Present (Derived_Disc) loop -- Check if this discriminant constrains another discriminant. -- If so, find the ultimately constrained discriminant and -- compare with the original components in the base type. if Present (Corresponding_Discriminant (Derived_Disc)) then Corr_Disc := Corresponding_Discriminant (Derived_Disc); while Present (Corresponding_Discriminant (Corr_Disc)) loop Corr_Disc := Corresponding_Discriminant (Corr_Disc); end loop; if Original_Record_Component (Corr_Disc) = Original_Record_Component (Disc) then return Derived_Disc; end if; end if; Next_Discriminant (Derived_Disc); end loop; -- Disc is not constrained by a discriminant of Outer_Ent return Empty; end Derived_Discriminant; -- Local declarations Comp : Node_Id; Comp_List : Node_Id; First : Boolean := True; Var : Node_Id; -- Start of processing for List_Structural_Record_Layout begin -- If we are dealing with a variant, just process the components if Present (Variant) then Comp_List := Component_List (Variant); -- Otherwise, we are dealing with the full record and need to get -- to its definition in order to retrieve its structural layout. else declare Definition : Node_Id := Type_Definition (Declaration_Node (Ent)); Is_Extension : constant Boolean := Is_Tagged_Type (Ent) and then Nkind (Definition) = N_Derived_Type_Definition; Disc : Entity_Id; Listed_Disc : Entity_Id; Parent_Type : Entity_Id; begin -- If this is an extension, first list the layout of the parent -- and then proceed to the extension part, if any. if Is_Extension then Parent_Type := Parent_Subtype (Ent); if No (Parent_Type) then raise Incomplete_Layout; end if; if Is_Private_Type (Parent_Type) then Parent_Type := Full_View (Parent_Type); pragma Assert (Present (Parent_Type)); end if; Parent_Type := Base_Type (Parent_Type); if not In_Extended_Main_Source_Unit (Parent_Type) then raise Not_In_Extended_Main; end if; List_Structural_Record_Layout (Parent_Type, Outer_Ent); First := False; if Present (Record_Extension_Part (Definition)) then Definition := Record_Extension_Part (Definition); end if; end if; -- If the record has discriminants and is not an unchecked -- union, then display them now. Note that, even if this is -- a structural layout, we list the visible discriminants. if Has_Discriminants (Ent) and then not Is_Unchecked_Union (Ent) then Disc := First_Discriminant (Ent); while Present (Disc) loop -- If this is a record extension and the discriminant is -- the renaming of another discriminant, skip it. if Is_Extension and then Present (Corresponding_Discriminant (Disc)) then goto Continue_Disc; end if; -- If this is the parent type of an extension, retrieve -- the derived discriminant from the extension, if any. if Ent /= Outer_Ent then Listed_Disc := Derived_Discriminant (Disc); if No (Listed_Disc) then goto Continue_Disc; end if; else Listed_Disc := Disc; end if; Get_Decoded_Name_String (Chars (Listed_Disc)); Set_Casing (Unit_Casing); if First then Write_Eol; First := False; else Write_Line (","); end if; List_Component_Layout (Listed_Disc, Indent => Indent); <<Continue_Disc>> Next_Discriminant (Disc); end loop; end if; Comp_List := Component_List (Definition); end; end if; -- Bail out for the null record if No (Comp_List) then return; end if; -- Now deal with the regular components, if any if Present (Component_Items (Comp_List)) then Comp := First_Non_Pragma (Component_Items (Comp_List)); while Present (Comp) loop -- Skip _Parent component in extension (to avoid overlap) if Chars (Defining_Identifier (Comp)) = Name_uParent then goto Continue_Comp; end if; Get_Decoded_Name_String (Chars (Defining_Identifier (Comp))); Set_Casing (Unit_Casing); if First then Write_Eol; First := False; else Write_Line (","); end if; List_Component_Layout (Defining_Identifier (Comp), Indent => Indent); <<Continue_Comp>> Next_Non_Pragma (Comp); end loop; end if; -- We are done if there is no variant part if No (Variant_Part (Comp_List)) then return; end if; Write_Eol; Spaces (Indent); Write_Line (" ],"); Spaces (Indent); Write_Str (" ""variant"" : ["); -- Otherwise we recurse on each variant Var := First_Non_Pragma (Variants (Variant_Part (Comp_List))); First := True; while Present (Var) loop if First then Write_Eol; First := False; else Write_Line (","); end if; Spaces (Indent); Write_Line (" {"); Spaces (Indent); Write_Str (" ""present"": "); Write_Val (Present_Expr (Var)); Write_Line (","); Spaces (Indent); Write_Str (" ""record"": ["); List_Structural_Record_Layout (Ent, Outer_Ent, Var, Indent + 4); Write_Eol; Spaces (Indent); Write_Line (" ]"); Spaces (Indent); Write_Str (" }"); Next_Non_Pragma (Var); end loop; end List_Structural_Record_Layout; -- Start of processing for List_Record_Info begin Write_Separator; if List_Representation_Info_To_JSON then Write_Line ("{"); end if; List_Common_Type_Info (Ent); -- First find out max line length and max starting position -- length, for the purpose of lining things up nicely. Compute_Max_Length (Ent); -- Then do actual output based on those values if List_Representation_Info_To_JSON then Write_Line (","); Write_Str (" ""record"": ["); -- ??? We can output structural layout only for base types fully -- declared in the extended main source unit for the time being, -- because otherwise declarations might not be processed at all. if Is_Base_Type (Ent) then begin List_Structural_Record_Layout (Ent, Ent); exception when Incomplete_Layout | Not_In_Extended_Main => List_Record_Layout (Ent); when others => raise Program_Error; end; else List_Record_Layout (Ent); end if; Write_Eol; Write_Str (" ]"); else Write_Str ("for "); List_Name (Ent); Write_Line (" use record"); List_Record_Layout (Ent); Write_Line ("end record;"); end if; List_Scalar_Storage_Order (Ent, Bytes_Big_Endian); List_Linker_Section (Ent); if List_Representation_Info_To_JSON then Write_Eol; Write_Line ("}"); end if; -- The type is relevant for a record subtype if List_Representation_Info = 4 and then not Is_Base_Type (Ent) and then Is_Itype (Etype (Ent)) then Relevant_Entities.Set (Etype (Ent), True); end if; end List_Record_Info; ------------------- -- List_Rep_Info -- ------------------- procedure List_Rep_Info (Bytes_Big_Endian : Boolean) is Col : Nat; begin if List_Representation_Info /= 0 or else List_Representation_Info_Mechanisms then -- For the normal case, we output a single JSON stream if not List_Representation_Info_To_File and then List_Representation_Info_To_JSON then Write_Line ("["); Need_Separator := False; end if; for U in Main_Unit .. Last_Unit loop if In_Extended_Main_Source_Unit (Cunit_Entity (U)) then Unit_Casing := Identifier_Casing (Source_Index (U)); if List_Representation_Info = 4 then Relevant_Entities.Reset; end if; -- Normal case, list to standard output if not List_Representation_Info_To_File then if not List_Representation_Info_To_JSON then Write_Eol; Write_Str ("Representation information for unit "); Write_Unit_Name (Unit_Name (U)); Col := Column; Write_Eol; for J in 1 .. Col - 1 loop Write_Char ('-'); end loop; Write_Eol; Need_Separator := True; end if; List_Entities (Cunit_Entity (U), Bytes_Big_Endian); -- List representation information to file else Create_Repinfo_File_Access.all (Get_Name_String (File_Name (Source_Index (U)))); Set_Special_Output (Write_Info_Line'Access); if List_Representation_Info_To_JSON then Write_Line ("["); end if; Need_Separator := False; List_Entities (Cunit_Entity (U), Bytes_Big_Endian); if List_Representation_Info_To_JSON then Write_Line ("]"); end if; Cancel_Special_Output; Close_Repinfo_File_Access.all; end if; end if; end loop; if not List_Representation_Info_To_File and then List_Representation_Info_To_JSON then Write_Line ("]"); end if; end if; end List_Rep_Info; ------------------------------- -- List_Scalar_Storage_Order -- ------------------------------- procedure List_Scalar_Storage_Order (Ent : Entity_Id; Bytes_Big_Endian : Boolean) is procedure List_Attr (Attr_Name : String; Is_Reversed : Boolean); -- Show attribute definition clause for Attr_Name (an endianness -- attribute), depending on whether or not the endianness is reversed -- compared to native endianness. --------------- -- List_Attr -- --------------- procedure List_Attr (Attr_Name : String; Is_Reversed : Boolean) is begin if List_Representation_Info_To_JSON then Write_Line (","); Write_Str (" """); Write_Str (Attr_Name); Write_Str (""": ""System."); else Write_Str ("for "); List_Name (Ent); Write_Char ('''); Write_Str (Attr_Name); Write_Str (" use System."); end if; if Bytes_Big_Endian xor Is_Reversed then Write_Str ("High"); else Write_Str ("Low"); end if; Write_Str ("_Order_First"); if List_Representation_Info_To_JSON then Write_Str (""""); else Write_Line (";"); end if; end List_Attr; List_SSO : constant Boolean := Has_Rep_Item (Ent, Name_Scalar_Storage_Order) or else SSO_Set_Low_By_Default (Ent) or else SSO_Set_High_By_Default (Ent); -- Scalar_Storage_Order is displayed if specified explicitly or set by -- Default_Scalar_Storage_Order. -- Start of processing for List_Scalar_Storage_Order begin -- For record types, list Bit_Order if not default, or if SSO is shown -- Also, when -gnatR4 is in effect always list bit order and scalar -- storage order explicitly, so that you don't need to know the native -- endianness of the target for which the output was produced in order -- to interpret it. if Is_Record_Type (Ent) and then (List_SSO or else Reverse_Bit_Order (Ent) or else List_Representation_Info = 4) then List_Attr ("Bit_Order", Reverse_Bit_Order (Ent)); end if; -- List SSO if required. If not, then storage is supposed to be in -- native order. if List_SSO or else List_Representation_Info = 4 then List_Attr ("Scalar_Storage_Order", Reverse_Storage_Order (Ent)); else pragma Assert (not Reverse_Storage_Order (Ent)); null; end if; end List_Scalar_Storage_Order; -------------------------- -- List_Subprogram_Info -- -------------------------- procedure List_Subprogram_Info (Ent : Entity_Id) is First : Boolean := True; Plen : Natural; Form : Entity_Id; begin Write_Separator; if List_Representation_Info_To_JSON then Write_Line ("{"); Write_Str (" ""name"": """); List_Name (Ent); Write_Line (""","); List_Location (Ent); Write_Str (" ""Convention"": """); else case Ekind (Ent) is when E_Function => Write_Str ("function "); when E_Operator => Write_Str ("operator "); when E_Procedure => Write_Str ("procedure "); when E_Subprogram_Type => Write_Str ("type "); when E_Entry | E_Entry_Family => Write_Str ("entry "); when others => raise Program_Error; end case; List_Name (Ent); Write_Str (" declared at "); Write_Location (Sloc (Ent)); Write_Eol; Write_Str ("convention : "); end if; case Convention (Ent) is when Convention_Ada => Write_Str ("Ada"); when Convention_Ada_Pass_By_Copy => Write_Str ("Ada_Pass_By_Copy"); when Convention_Ada_Pass_By_Reference => Write_Str ("Ada_Pass_By_Reference"); when Convention_Intrinsic => Write_Str ("Intrinsic"); when Convention_Entry => Write_Str ("Entry"); when Convention_Protected => Write_Str ("Protected"); when Convention_Assembler => Write_Str ("Assembler"); when Convention_C => Write_Str ("C"); when Convention_C_Variadic => declare N : Nat := Convention_Id'Pos (Convention (Ent)) - Convention_Id'Pos (Convention_C_Variadic_0); begin Write_Str ("C_Variadic_"); if N >= 10 then Write_Char ('1'); N := N - 10; end if; pragma Assert (N < 10); Write_Char (Character'Val (Character'Pos ('0') + N)); end; when Convention_COBOL => Write_Str ("COBOL"); when Convention_CPP => Write_Str ("C++"); when Convention_Fortran => Write_Str ("Fortran"); when Convention_Stdcall => Write_Str ("Stdcall"); when Convention_Stubbed => Write_Str ("Stubbed"); end case; if List_Representation_Info_To_JSON then Write_Line (""","); Write_Str (" ""formal"": ["); else Write_Eol; end if; -- Find max length of formal name Plen := 0; Form := First_Formal (Ent); while Present (Form) loop Get_Unqualified_Decoded_Name_String (Chars (Form)); if Name_Len > Plen then Plen := Name_Len; end if; Next_Formal (Form); end loop; -- Output formals and mechanisms Form := First_Formal (Ent); while Present (Form) loop Get_Unqualified_Decoded_Name_String (Chars (Form)); Set_Casing (Unit_Casing); if List_Representation_Info_To_JSON then if First then Write_Eol; First := False; else Write_Line (","); end if; Write_Line (" {"); Write_Str (" ""name"": """); Write_Str (Name_Buffer (1 .. Name_Len)); Write_Line (""","); Write_Str (" ""mechanism"": """); Write_Mechanism (Mechanism (Form)); Write_Line (""""); Write_Str (" }"); else while Name_Len <= Plen loop Name_Len := Name_Len + 1; Name_Buffer (Name_Len) := ' '; end loop; Write_Str (" "); Write_Str (Name_Buffer (1 .. Plen + 1)); Write_Str (": passed by "); Write_Mechanism (Mechanism (Form)); Write_Eol; end if; Next_Formal (Form); end loop; if List_Representation_Info_To_JSON then Write_Eol; Write_Str (" ]"); end if; if Ekind (Ent) = E_Function then if List_Representation_Info_To_JSON then Write_Line (","); Write_Str (" ""mechanism"": """); Write_Mechanism (Mechanism (Ent)); Write_Str (""""); else Write_Str ("returns by "); Write_Mechanism (Mechanism (Ent)); Write_Eol; end if; end if; if not Is_Entry (Ent) then List_Linker_Section (Ent); end if; if List_Representation_Info_To_JSON then Write_Eol; Write_Line ("}"); end if; end List_Subprogram_Info; -------------------- -- List_Type_Info -- -------------------- procedure List_Type_Info (Ent : Entity_Id) is begin Write_Separator; if List_Representation_Info_To_JSON then Write_Line ("{"); end if; List_Common_Type_Info (Ent); -- Special stuff for fixed-point if Is_Fixed_Point_Type (Ent) then -- Write small (always a static constant) if List_Representation_Info_To_JSON then Write_Line (","); Write_Str (" ""Small"": "); UR_Write (Small_Value (Ent)); else Write_Str ("for "); List_Name (Ent); Write_Str ("'Small use "); UR_Write (Small_Value (Ent)); Write_Line (";"); end if; -- Write range if static declare R : constant Node_Id := Scalar_Range (Ent); begin if Nkind (Low_Bound (R)) = N_Real_Literal and then Nkind (High_Bound (R)) = N_Real_Literal then if List_Representation_Info_To_JSON then Write_Line (","); Write_Str (" ""Range"": [ "); UR_Write (Realval (Low_Bound (R))); Write_Str (", "); UR_Write (Realval (High_Bound (R))); Write_Str (" ]"); else Write_Str ("for "); List_Name (Ent); Write_Str ("'Range use "); UR_Write (Realval (Low_Bound (R))); Write_Str (" .. "); UR_Write (Realval (High_Bound (R))); Write_Line (";"); end if; end if; end; end if; List_Linker_Section (Ent); if List_Representation_Info_To_JSON then Write_Eol; Write_Line ("}"); end if; end List_Type_Info; ---------------------- -- Rep_Not_Constant -- ---------------------- function Rep_Not_Constant (Val : Node_Ref_Or_Val) return Boolean is begin if Val = No_Uint or else Val < 0 then return True; else return False; end if; end Rep_Not_Constant; --------------- -- Rep_Value -- --------------- function Rep_Value (Val : Node_Ref_Or_Val; D : Discrim_List) return Uint is function B (Val : Boolean) return Uint; -- Returns Uint_0 for False, Uint_1 for True function T (Val : Node_Ref_Or_Val) return Boolean; -- Returns True for 0, False for any non-zero (i.e. True) function V (Val : Node_Ref_Or_Val) return Uint; -- Internal recursive routine to evaluate tree function W (Val : Uint) return Word; -- Convert Val to Word, assuming Val is always in the Int range. This -- is a helper function for the evaluation of bitwise expressions like -- Bit_And_Expr, for which there is no direct support in uintp. Uint -- values out of the Int range are expected to be seen in such -- expressions only with overflowing byte sizes around, introducing -- inherent unreliabilities in computations anyway. ------- -- B -- ------- function B (Val : Boolean) return Uint is begin if Val then return Uint_1; else return Uint_0; end if; end B; ------- -- T -- ------- function T (Val : Node_Ref_Or_Val) return Boolean is begin if V (Val) = 0 then return False; else return True; end if; end T; ------- -- V -- ------- function V (Val : Node_Ref_Or_Val) return Uint is L, R, Q : Uint; begin if Val >= 0 then return Val; else declare Node : Exp_Node renames Rep_Table.Table (-UI_To_Int (Val)); begin case Node.Expr is when Cond_Expr => if T (Node.Op1) then return V (Node.Op2); else return V (Node.Op3); end if; when Plus_Expr => return V (Node.Op1) + V (Node.Op2); when Minus_Expr => return V (Node.Op1) - V (Node.Op2); when Mult_Expr => return V (Node.Op1) * V (Node.Op2); when Trunc_Div_Expr => return V (Node.Op1) / V (Node.Op2); when Ceil_Div_Expr => return UR_Ceiling (V (Node.Op1) / UR_From_Uint (V (Node.Op2))); when Floor_Div_Expr => return UR_Floor (V (Node.Op1) / UR_From_Uint (V (Node.Op2))); when Trunc_Mod_Expr => return V (Node.Op1) rem V (Node.Op2); when Floor_Mod_Expr => return V (Node.Op1) mod V (Node.Op2); when Ceil_Mod_Expr => L := V (Node.Op1); R := V (Node.Op2); Q := UR_Ceiling (L / UR_From_Uint (R)); return L - R * Q; when Exact_Div_Expr => return V (Node.Op1) / V (Node.Op2); when Negate_Expr => return -V (Node.Op1); when Min_Expr => return UI_Min (V (Node.Op1), V (Node.Op2)); when Max_Expr => return UI_Max (V (Node.Op1), V (Node.Op2)); when Abs_Expr => return UI_Abs (V (Node.Op1)); when Truth_And_Expr => return B (T (Node.Op1) and then T (Node.Op2)); when Truth_Or_Expr => return B (T (Node.Op1) or else T (Node.Op2)); when Truth_Xor_Expr => return B (T (Node.Op1) xor T (Node.Op2)); when Truth_Not_Expr => return B (not T (Node.Op1)); when Bit_And_Expr => L := V (Node.Op1); R := V (Node.Op2); return UI_From_Int (Int (W (L) and W (R))); when Lt_Expr => return B (V (Node.Op1) < V (Node.Op2)); when Le_Expr => return B (V (Node.Op1) <= V (Node.Op2)); when Gt_Expr => return B (V (Node.Op1) > V (Node.Op2)); when Ge_Expr => return B (V (Node.Op1) >= V (Node.Op2)); when Eq_Expr => return B (V (Node.Op1) = V (Node.Op2)); when Ne_Expr => return B (V (Node.Op1) /= V (Node.Op2)); when Discrim_Val => declare Sub : constant Int := UI_To_Int (Node.Op1); begin pragma Assert (Sub in D'Range); return D (Sub); end; when Dynamic_Val => return No_Uint; end case; end; end if; end V; ------- -- W -- ------- -- We use an unchecked conversion to map Int values to their Word -- bitwise equivalent, which we could not achieve with a normal type -- conversion for negative Ints. We want bitwise equivalents because W -- is used as a helper for bit operators like Bit_And_Expr, and can be -- called for negative Ints in the context of aligning expressions like -- X+Align & -Align. function W (Val : Uint) return Word is function To_Word is new Ada.Unchecked_Conversion (Int, Word); begin return To_Word (UI_To_Int (Val)); end W; -- Start of processing for Rep_Value begin if Val = No_Uint then return No_Uint; else return V (Val); end if; end Rep_Value; ------------ -- Spaces -- ------------ procedure Spaces (N : Natural) is begin for J in 1 .. N loop Write_Char (' '); end loop; end Spaces; --------------------- -- Write_Info_Line -- --------------------- procedure Write_Info_Line (S : String) is begin Write_Repinfo_Line_Access.all (S (S'First .. S'Last - 1)); end Write_Info_Line; --------------------- -- Write_Mechanism -- --------------------- procedure Write_Mechanism (M : Mechanism_Type) is begin case M is when 0 => Write_Str ("default"); when -1 => Write_Str ("copy"); when -2 => Write_Str ("reference"); when others => raise Program_Error; end case; end Write_Mechanism; --------------------- -- Write_Separator -- --------------------- procedure Write_Separator is begin if Need_Separator then if List_Representation_Info_To_JSON then Write_Line (","); else Write_Eol; end if; else Need_Separator := True; end if; end Write_Separator; ----------------------- -- Write_Unknown_Val -- ----------------------- procedure Write_Unknown_Val is begin if List_Representation_Info_To_JSON then Write_Str ("""??"""); else Write_Str ("??"); end if; end Write_Unknown_Val; --------------- -- Write_Val -- --------------- procedure Write_Val (Val : Node_Ref_Or_Val; Paren : Boolean := False) is begin if Rep_Not_Constant (Val) then if List_Representation_Info < 3 or else Val = No_Uint then Write_Unknown_Val; else if Paren then Write_Char ('('); end if; if Back_End_Layout then List_GCC_Expression (Val); else Write_Name_Decoded (Chars (Get_Dynamic_SO_Entity (Val))); end if; if Paren then Write_Char (')'); end if; end if; else UI_Write (Val, Decimal); end if; end Write_Val; end Repinfo;
31.274307
79
0.500675
1c00a24cb257fa068ab779fff0e320f81d17cc60
2,317
adb
Ada
testsuite/tests/logging/src/tc_log_prio_and_cat.adb
shakram02/Ada_Drivers_Library
a407ca7ddbc2d9756647016c2f8fd8ef24a239ff
[ "BSD-3-Clause" ]
192
2016-06-01T18:32:04.000Z
2022-03-26T22:52:31.000Z
testsuite/tests/logging/src/tc_log_prio_and_cat.adb
shakram02/Ada_Drivers_Library
a407ca7ddbc2d9756647016c2f8fd8ef24a239ff
[ "BSD-3-Clause" ]
239
2016-05-26T20:02:01.000Z
2022-03-31T09:46:56.000Z
testsuite/tests/logging/src/tc_log_prio_and_cat.adb
shakram02/Ada_Drivers_Library
a407ca7ddbc2d9756647016c2f8fd8ef24a239ff
[ "BSD-3-Clause" ]
142
2016-06-05T08:12:20.000Z
2022-03-24T17:37:17.000Z
with Ada.Text_IO; with Logging; procedure TC_Log_Prio_And_Cat is type Categories is (Debug, Warning, Error); Maximum_Message_Length : constant := 64; package Log is new Logging (Categories => Categories, Priorities => Natural, Default_Category => Debug, Default_Priority => 0, Categories_Enabled_By_Default => True, Prefix_Enabled_By_Default => True, Maximum_Message_Length => Maximum_Message_Length, Maximum_Number_Of_Messages => 6); procedure Pop_And_Print; ------------------- -- Pop_And_Print -- ------------------- procedure Pop_And_Print is Str : String (1 .. Maximum_Message_Length); Length : Natural; Prio : Natural; begin Log.Pop (Str, Length, Prio); if Length /= 0 then Ada.Text_IO.Put_Line ("Prio:" & Prio'Img & " -> " & Str (Str'First .. Str'First + Length - 1)); else Ada.Text_IO.Put_Line ("Pop : The queue is empty"); end if; end Pop_And_Print; begin Ada.Text_IO.Put_Line ("--- Log test begin ---"); -- The priority and category features are already tested separatly so this -- test is just a simple check to see if the two work together. Log.Log_Line (Debug, "Debug, prio 0"); Log.Disable (Debug); Log.Log_Line (Debug, "Debug, should not print"); Log.Enable (Debug); Log.Set_Priority (Debug, 1); Log.Log_Line (Debug, "Debug, prio 1"); Log.Log_Line (Warning, "Warning, prio 0"); Log.Disable (Warning); Log.Log_Line (Warning, "Warning, should not print"); Log.Enable (Warning); Log.Set_Priority (Warning, 2); Log.Log_Line (Warning, "Warning, prio 2"); Log.Log_Line (Error, "Error, prio 0"); Log.Disable (Error); Log.Log_Line (Error, "Error, should not print"); Log.Enable (Error); Log.Set_Priority (Error, 3); Log.Log_Line (Error, "Error, prio 3"); if not Log.Full then Ada.Text_IO.Put_Line ("The queue should be full"); end if; for Cnt in 1 .. 7 loop Pop_And_Print; end loop; if not Log.Empty then Ada.Text_IO.Put_Line ("The queue should be empty"); end if; Ada.Text_IO.Put_Line ("--- Log test end ---"); end TC_Log_Prio_And_Cat;
28.604938
78
0.60164
39d869b050a791fefcf32f193b3388979e8917f2
622
adb
Ada
src/002/person2.adb
xeenta/learning-ada
bd3edf0c9e8b8eff814ffd89b040f488b80a7d5b
[ "MIT" ]
null
null
null
src/002/person2.adb
xeenta/learning-ada
bd3edf0c9e8b8eff814ffd89b040f488b80a7d5b
[ "MIT" ]
null
null
null
src/002/person2.adb
xeenta/learning-ada
bd3edf0c9e8b8eff814ffd89b040f488b80a7d5b
[ "MIT" ]
null
null
null
package body Person2 is procedure Set_Name (A_Person : out Person; Name : in Unbounded_String) is begin A_Person.Name := Name; end Set_Name; procedure Set_Age (A_Person : out Person; Her_Age : in Age_Type) is begin A_Person.Age := Her_Age; end Set_Age; function Get_Name (A_Person : Person) return Unbounded_String is (A_Person.Name); function Get_Age (A_Person : Person) return Age_Type is (A_Person.Age); function Is_Adult (A_Person : Person) return Boolean is (A_Person.Age >= Adult_Age); end Person2;
24.88
64
0.630225
398eaa49ee4724c6c6d03be43afb9a2edf30a408
3,101
ads
Ada
bb-runtimes/src/s-bbbopa__8349e.ads
JCGobbi/Nucleo-STM32F334R8
2a0b1b4b2664c92773703ac5e95dcb71979d051c
[ "BSD-3-Clause" ]
null
null
null
bb-runtimes/src/s-bbbopa__8349e.ads
JCGobbi/Nucleo-STM32F334R8
2a0b1b4b2664c92773703ac5e95dcb71979d051c
[ "BSD-3-Clause" ]
null
null
null
bb-runtimes/src/s-bbbopa__8349e.ads
JCGobbi/Nucleo-STM32F334R8
2a0b1b4b2664c92773703ac5e95dcb71979d051c
[ "BSD-3-Clause" ]
null
null
null
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS -- -- -- -- S Y S T E M . B B . B O A R D _ P A R A M E T E R S -- -- -- -- S p e c -- -- -- -- Copyright (C) 2012, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- -- The port of GNARL to bare board targets was initially developed by the -- -- Real-Time Systems Group at the Technical University of Madrid. -- -- -- ------------------------------------------------------------------------------ -- This package defines board parameters for the powerpc 8349e. package System.BB.Board_Parameters is pragma Pure; IMMRBAR : constant := 16#ff40_0000#; CCSRBAR : constant := IMMRBAR; -- Address of the IMMRBAR. Unfortunately, this cannot be guessed -------------------- -- Hardware clock -- -------------------- Clock_Frequency : constant Positive := 264_000_000 / 4; -- Frequency of the system clock for the decrementer timer end System.BB.Board_Parameters;
59.634615
78
0.418575
20c43ec78d88b494de5d38dc5cad849c7270f996
19,565
adb
Ada
boards/ip_colordetect_test/colordetect/colordetect/.autopilot/db/colorthresholding_9_0_3_2160_3840_1_Block_colorthresholding_9_0_3_2160_3840_1_exit_proc.sched.adb
Kgfu/PYNQ_HelloWorld
a5197130e7d4a5e7f382c3963349c1c0bd213213
[ "BSD-3-Clause" ]
null
null
null
boards/ip_colordetect_test/colordetect/colordetect/.autopilot/db/colorthresholding_9_0_3_2160_3840_1_Block_colorthresholding_9_0_3_2160_3840_1_exit_proc.sched.adb
Kgfu/PYNQ_HelloWorld
a5197130e7d4a5e7f382c3963349c1c0bd213213
[ "BSD-3-Clause" ]
null
null
null
boards/ip_colordetect_test/colordetect/colordetect/.autopilot/db/colorthresholding_9_0_3_2160_3840_1_Block_colorthresholding_9_0_3_2160_3840_1_exit_proc.sched.adb
Kgfu/PYNQ_HelloWorld
a5197130e7d4a5e7f382c3963349c1c0bd213213
[ "BSD-3-Clause" ]
null
null
null
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <!DOCTYPE boost_serialization> <boost_serialization signature="serialization::archive" version="15"> <syndb class_id="0" tracking_level="0" version="0"> <userIPLatency>-1</userIPLatency> <userIPName></userIPName> <cdfg class_id="1" tracking_level="1" version="0" object_id="_0"> <name>colorthresholding_9_0_3_2160_3840_1_Block_colorthresholding_9_0_3_2160_3840_1_exit_proc</name> <ret_bitwidth>32</ret_bitwidth> <ports class_id="2" tracking_level="0" version="0"> <count>2</count> <item_version>0</item_version> <item class_id="3" tracking_level="1" version="0" object_id="_1"> <Value class_id="4" tracking_level="0" version="0"> <Obj class_id="5" tracking_level="0" version="0"> <type>1</type> <id>1</id> <name>p_src_mat_rows</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <contextNormFuncName></contextNormFuncName> <inlineStackInfo class_id="6" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <control></control> <opType></opType> <implIndex></implIndex> <coreName></coreName> <coreId>1768189039</coreId> </Obj> <bitwidth>16</bitwidth> </Value> <direction>0</direction> <if_type>3</if_type> <array_size>0</array_size> <bit_vecs class_id="7" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> <item class_id_reference="3" object_id="_2"> <Value> <Obj> <type>1</type> <id>2</id> <name>p_src_mat_cols</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <contextNormFuncName></contextNormFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <control></control> <opType></opType> <implIndex></implIndex> <coreName></coreName> <coreId>49</coreId> </Obj> <bitwidth>16</bitwidth> </Value> <direction>0</direction> <if_type>3</if_type> <array_size>0</array_size> <bit_vecs> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> </ports> <nodes class_id="8" tracking_level="0" version="0"> <count>5</count> <item_version>0</item_version> <item class_id="9" tracking_level="1" version="0" object_id="_3"> <Value> <Obj> <type>0</type> <id>5</id> <name>img_height</name> <fileName>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip/vitis_lib/vision/L1/include/imgproc/xf_colorthresholding.hpp</fileName> <fileDirectory>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip</fileDirectory> <lineNumber>152</lineNumber> <contextFuncName>colorthresholding&amp;lt;9, 0, 3, 2160, 3840, 1&amp;gt;</contextFuncName> <contextNormFuncName>colorthresholding_9_0_3_2160_3840_1_s</contextNormFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item class_id="10" tracking_level="0" version="0"> <first>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip</first> <second class_id="11" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="12" tracking_level="0" version="0"> <first class_id="13" tracking_level="0" version="0"> <first>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip/vitis_lib/vision/L1/include/imgproc/xf_colorthresholding.hpp</first> <second>colorthresholding&amp;lt;9, 0, 3, 2160, 3840, 1&amp;gt;</second> </first> <second>152</second> </item> </second> </item> </inlineStackInfo> <originalName>img_height</originalName> <rtlName></rtlName> <control></control> <opType></opType> <implIndex></implIndex> <coreName></coreName> <coreId>20</coreId> </Obj> <bitwidth>16</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>12</item> <item>13</item> </oprand_edges> <opcode>read</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>3.40</m_delay> <m_topoIndex>1</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_4"> <Value> <Obj> <type>0</type> <id>6</id> <name>img_width</name> <fileName>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip/vitis_lib/vision/L1/include/imgproc/xf_colorthresholding.hpp</fileName> <fileDirectory>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip</fileDirectory> <lineNumber>153</lineNumber> <contextFuncName>colorthresholding&amp;lt;9, 0, 3, 2160, 3840, 1&amp;gt;</contextFuncName> <contextNormFuncName>colorthresholding_9_0_3_2160_3840_1_s</contextNormFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip/vitis_lib/vision/L1/include/imgproc/xf_colorthresholding.hpp</first> <second>colorthresholding&amp;lt;9, 0, 3, 2160, 3840, 1&amp;gt;</second> </first> <second>153</second> </item> </second> </item> </inlineStackInfo> <originalName>img_width</originalName> <rtlName></rtlName> <control></control> <opType></opType> <implIndex></implIndex> <coreName></coreName> <coreId>0</coreId> </Obj> <bitwidth>16</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>14</item> <item>15</item> </oprand_edges> <opcode>read</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>3.40</m_delay> <m_topoIndex>2</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_5"> <Value> <Obj> <type>0</type> <id>7</id> <name>mrv</name> <fileName>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip/vitis_lib/vision/L1/include/imgproc/xf_colorthresholding.hpp</fileName> <fileDirectory>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip</fileDirectory> <lineNumber>152</lineNumber> <contextFuncName>colorthresholding&amp;lt;9, 0, 3, 2160, 3840, 1&amp;gt;</contextFuncName> <contextNormFuncName>colorthresholding_9_0_3_2160_3840_1_s</contextNormFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip/vitis_lib/vision/L1/include/imgproc/xf_colorthresholding.hpp</first> <second>colorthresholding&amp;lt;9, 0, 3, 2160, 3840, 1&amp;gt;</second> </first> <second>152</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <control></control> <opType></opType> <implIndex></implIndex> <coreName></coreName> <coreId>113</coreId> </Obj> <bitwidth>32</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>17</item> <item>18</item> </oprand_edges> <opcode>insertvalue</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>3</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_6"> <Value> <Obj> <type>0</type> <id>8</id> <name>mrv_1</name> <fileName>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip/vitis_lib/vision/L1/include/imgproc/xf_colorthresholding.hpp</fileName> <fileDirectory>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip</fileDirectory> <lineNumber>152</lineNumber> <contextFuncName>colorthresholding&amp;lt;9, 0, 3, 2160, 3840, 1&amp;gt;</contextFuncName> <contextNormFuncName>colorthresholding_9_0_3_2160_3840_1_s</contextNormFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip/vitis_lib/vision/L1/include/imgproc/xf_colorthresholding.hpp</first> <second>colorthresholding&amp;lt;9, 0, 3, 2160, 3840, 1&amp;gt;</second> </first> <second>152</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <control></control> <opType></opType> <implIndex></implIndex> <coreName></coreName> <coreId>892876845</coreId> </Obj> <bitwidth>32</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>19</item> <item>20</item> </oprand_edges> <opcode>insertvalue</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>4</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_7"> <Value> <Obj> <type>0</type> <id>9</id> <name>_ln152</name> <fileName>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip/vitis_lib/vision/L1/include/imgproc/xf_colorthresholding.hpp</fileName> <fileDirectory>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip</fileDirectory> <lineNumber>152</lineNumber> <contextFuncName>colorthresholding&amp;lt;9, 0, 3, 2160, 3840, 1&amp;gt;</contextFuncName> <contextNormFuncName>colorthresholding_9_0_3_2160_3840_1_s</contextNormFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip/vitis_lib/vision/L1/include/imgproc/xf_colorthresholding.hpp</first> <second>colorthresholding&amp;lt;9, 0, 3, 2160, 3840, 1&amp;gt;</second> </first> <second>152</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <control></control> <opType></opType> <implIndex></implIndex> <coreName></coreName> <coreId>113</coreId> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>21</item> </oprand_edges> <opcode>ret</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>5</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> </nodes> <consts class_id="15" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="16" tracking_level="1" version="0" object_id="_8"> <Value> <Obj> <type>2</type> <id>16</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <contextNormFuncName></contextNormFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <control></control> <opType></opType> <implIndex></implIndex> <coreName></coreName> <coreId>49</coreId> </Obj> <bitwidth>32</bitwidth> </Value> <const_type>5</const_type> <content>&lt;undef&gt;</content> </item> </consts> <blocks class_id="17" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="18" tracking_level="1" version="0" object_id="_9"> <Obj> <type>3</type> <id>10</id> <name>colorthresholding&lt;9, 0, 3, 2160, 3840, 1&gt;_Block_colorthresholding&lt;9, 0, 3, 2160, 3840, 1&gt;_.exit_proc</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <contextNormFuncName></contextNormFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <control></control> <opType></opType> <implIndex></implIndex> <coreName></coreName> <coreId>1768189039</coreId> </Obj> <node_objs> <count>5</count> <item_version>0</item_version> <item>5</item> <item>6</item> <item>7</item> <item>8</item> <item>9</item> </node_objs> </item> </blocks> <edges class_id="19" tracking_level="0" version="0"> <count>7</count> <item_version>0</item_version> <item class_id="20" tracking_level="1" version="0" object_id="_10"> <id>13</id> <edge_type>1</edge_type> <source_obj>1</source_obj> <sink_obj>5</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_11"> <id>15</id> <edge_type>1</edge_type> <source_obj>2</source_obj> <sink_obj>6</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_12"> <id>17</id> <edge_type>1</edge_type> <source_obj>16</source_obj> <sink_obj>7</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_13"> <id>18</id> <edge_type>1</edge_type> <source_obj>5</source_obj> <sink_obj>7</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_14"> <id>19</id> <edge_type>1</edge_type> <source_obj>7</source_obj> <sink_obj>8</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_15"> <id>20</id> <edge_type>1</edge_type> <source_obj>6</source_obj> <sink_obj>8</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_16"> <id>21</id> <edge_type>1</edge_type> <source_obj>8</source_obj> <sink_obj>9</sink_obj> <is_back_edge>0</is_back_edge> </item> </edges> </cdfg> <cdfg_regions class_id="21" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="22" tracking_level="1" version="0" object_id="_17"> <mId>1</mId> <mTag>colorthresholding&lt;9, 0, 3, 2160, 3840, 1&gt;_Block_colorthresholding&lt;9, 0, 3, 2160, 3840, 1&gt;_.exit_proc</mTag> <mNormTag>colorthresholding_9_0_3_2160_3840_1_Block_colorthresholding_9_0_3_2160_3840_1_exit_proc</mNormTag> <mType>0</mType> <sub_regions> <count>0</count> <item_version>0</item_version> </sub_regions> <basic_blocks> <count>1</count> <item_version>0</item_version> <item>10</item> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>-1</mMinTripCount> <mMaxTripCount>-1</mMaxTripCount> <mMinLatency>0</mMinLatency> <mMaxLatency>0</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> </cdfg_regions> <fsm class_id="-1"></fsm> <res class_id="-1"></res> <node_label_latency class_id="26" tracking_level="0" version="0"> <count>5</count> <item_version>0</item_version> <item class_id="27" tracking_level="0" version="0"> <first>5</first> <second class_id="28" tracking_level="0" version="0"> <first>0</first> <second>0</second> </second> </item> <item> <first>6</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>7</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>8</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>9</first> <second> <first>0</first> <second>0</second> </second> </item> </node_label_latency> <bblk_ent_exit class_id="29" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="30" tracking_level="0" version="0"> <first>10</first> <second class_id="31" tracking_level="0" version="0"> <first>0</first> <second>0</second> </second> </item> </bblk_ent_exit> <regions class_id="32" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </regions> <dp_fu_nodes class_id="33" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </dp_fu_nodes> <dp_fu_nodes_expression class_id="34" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </dp_fu_nodes_expression> <dp_fu_nodes_module> <count>0</count> <item_version>0</item_version> </dp_fu_nodes_module> <dp_fu_nodes_io> <count>0</count> <item_version>0</item_version> </dp_fu_nodes_io> <return_ports> <count>0</count> <item_version>0</item_version> </return_ports> <dp_mem_port_nodes class_id="35" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </dp_mem_port_nodes> <dp_reg_nodes> <count>0</count> <item_version>0</item_version> </dp_reg_nodes> <dp_regname_nodes> <count>0</count> <item_version>0</item_version> </dp_regname_nodes> <dp_reg_phi> <count>0</count> <item_version>0</item_version> </dp_reg_phi> <dp_regname_phi> <count>0</count> <item_version>0</item_version> </dp_regname_phi> <dp_port_io_nodes class_id="36" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </dp_port_io_nodes> <port2core> <count>0</count> <item_version>0</item_version> </port2core> <node2core> <count>0</count> <item_version>0</item_version> </node2core> </syndb> </boost_serialization>
31.916803
139
0.644109
10152343a61151dfe9a1ddafaa14384e78d469e8
20,481
ads
Ada
gcc-gcc-7_3_0-release/gcc/ada/s-osinte-vxworks.ads
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
7
2020-05-02T17:34:05.000Z
2021-10-17T10:15:18.000Z
gcc-gcc-7_3_0-release/gcc/ada/s-osinte-vxworks.ads
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
null
null
null
gcc-gcc-7_3_0-release/gcc/ada/s-osinte-vxworks.ads
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
2
2020-07-27T00:22:36.000Z
2021-04-01T09:41:02.000Z
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS -- -- -- -- S Y S T E M . O S _ I N T E R F A C E -- -- -- -- S p e c -- -- -- -- Copyright (C) 1991-1994, Florida State University -- -- Copyright (C) 1995-2016, Free Software Foundation, Inc. -- -- -- -- GNARL is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNARL is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNARL was developed by the GNARL team at Florida State University. -- -- Extensive contributions were provided by Ada Core Technologies, Inc. -- -- -- ------------------------------------------------------------------------------ -- This is the VxWorks version of this package -- This package encapsulates all direct interfaces to OS services that are -- needed by the tasking run-time (libgnarl). -- PLEASE DO NOT add any with-clauses to this package or remove the pragma -- Preelaborate. This package is designed to be a bottom-level (leaf) package. with Interfaces.C; with System.VxWorks; with System.VxWorks.Ext; with System.Multiprocessors; package System.OS_Interface is pragma Preelaborate; subtype int is Interfaces.C.int; subtype unsigned is Interfaces.C.unsigned; subtype short is Short_Integer; type unsigned_int is mod 2 ** int'Size; type long is new Long_Integer; type unsigned_long is mod 2 ** long'Size; type long_long is new Long_Long_Integer; type unsigned_long_long is mod 2 ** long_long'Size; type size_t is mod 2 ** Standard'Address_Size; ----------- -- Errno -- ----------- function errno return int; pragma Import (C, errno, "errnoGet"); EINTR : constant := 4; EAGAIN : constant := 35; ENOMEM : constant := 12; EINVAL : constant := 22; ETIMEDOUT : constant := 60; FUNC_ERR : constant := -1; ---------------------------- -- Signals and interrupts -- ---------------------------- NSIG : constant := 64; -- Number of signals on the target OS type Signal is new int range 0 .. Interfaces.C."-" (NSIG, 1); Max_HW_Interrupt : constant := System.VxWorks.Num_HW_Interrupts - 1; type HW_Interrupt is new int range 0 .. Max_HW_Interrupt; Max_Interrupt : constant := Max_HW_Interrupt; subtype Interrupt_Range is Natural range 0 .. Max_HW_Interrupt; -- For s-interr -- Signals common to Vxworks 5.x and 6.x SIGILL : constant := 4; -- illegal instruction (not reset when caught) SIGABRT : constant := 6; -- used by abort, replace SIGIOT in the future SIGFPE : constant := 8; -- floating point exception SIGBUS : constant := 10; -- bus error SIGSEGV : constant := 11; -- segmentation violation -- Signals specific to VxWorks 6.x SIGHUP : constant := 1; -- hangup SIGINT : constant := 2; -- interrupt SIGQUIT : constant := 3; -- quit SIGTRAP : constant := 5; -- trace trap (not reset when caught) SIGEMT : constant := 7; -- EMT instruction SIGKILL : constant := 9; -- kill SIGFMT : constant := 12; -- STACK FORMAT ERROR (not posix) SIGPIPE : constant := 13; -- write on a pipe with no one to read it SIGALRM : constant := 14; -- alarm clock SIGTERM : constant := 15; -- software termination signal from kill SIGCNCL : constant := 16; -- pthreads cancellation signal SIGSTOP : constant := 17; -- sendable stop signal not from tty SIGTSTP : constant := 18; -- stop signal from tty SIGCONT : constant := 19; -- continue a stopped process SIGCHLD : constant := 20; -- to parent on child stop or exit SIGTTIN : constant := 21; -- to readers pgrp upon background tty read SIGTTOU : constant := 22; -- like TTIN for output SIGRES1 : constant := 23; -- reserved signal number (Not POSIX) SIGRES2 : constant := 24; -- reserved signal number (Not POSIX) SIGRES3 : constant := 25; -- reserved signal number (Not POSIX) SIGRES4 : constant := 26; -- reserved signal number (Not POSIX) SIGRES5 : constant := 27; -- reserved signal number (Not POSIX) SIGRES6 : constant := 28; -- reserved signal number (Not POSIX) SIGRES7 : constant := 29; -- reserved signal number (Not POSIX) SIGUSR1 : constant := 30; -- user defined signal 1 SIGUSR2 : constant := 31; -- user defined signal 2 SIGPOLL : constant := 32; -- pollable event SIGPROF : constant := 33; -- profiling timer expired SIGSYS : constant := 34; -- bad system call SIGURG : constant := 35; -- high bandwidth data is available at socket SIGVTALRM : constant := 36; -- virtual timer expired SIGXCPU : constant := 37; -- CPU time limit exceeded SIGXFSZ : constant := 38; -- file size time limit exceeded SIGEVTS : constant := 39; -- signal event thread send SIGEVTD : constant := 40; -- signal event thread delete SIGRTMIN : constant := 48; -- Realtime signal min SIGRTMAX : constant := 63; -- Realtime signal max ----------------------------------- -- Signal processing definitions -- ----------------------------------- -- The how in sigprocmask() SIG_BLOCK : constant := 1; SIG_UNBLOCK : constant := 2; SIG_SETMASK : constant := 3; -- The sa_flags in struct sigaction SA_SIGINFO : constant := 16#0002#; SA_ONSTACK : constant := 16#0004#; SIG_DFL : constant := 0; SIG_IGN : constant := 1; type sigset_t is private; type struct_sigaction is record sa_handler : System.Address; sa_mask : sigset_t; sa_flags : int; end record; pragma Convention (C, struct_sigaction); type struct_sigaction_ptr is access all struct_sigaction; function sigaddset (set : access sigset_t; sig : Signal) return int; pragma Import (C, sigaddset, "sigaddset"); function sigdelset (set : access sigset_t; sig : Signal) return int; pragma Import (C, sigdelset, "sigdelset"); function sigfillset (set : access sigset_t) return int; pragma Import (C, sigfillset, "sigfillset"); function sigismember (set : access sigset_t; sig : Signal) return int; pragma Import (C, sigismember, "sigismember"); function sigemptyset (set : access sigset_t) return int; pragma Import (C, sigemptyset, "sigemptyset"); function sigaction (sig : Signal; act : struct_sigaction_ptr; oact : struct_sigaction_ptr) return int; pragma Import (C, sigaction, "sigaction"); type isr_address is access procedure (sig : int); pragma Convention (C, isr_address); function c_signal (sig : Signal; handler : isr_address) return isr_address; pragma Import (C, c_signal, "signal"); function pthread_sigmask (how : int; set : access sigset_t; oset : access sigset_t) return int; pragma Import (C, pthread_sigmask, "sigprocmask"); subtype t_id is System.VxWorks.Ext.t_id; subtype Thread_Id is t_id; -- Thread_Id and t_id are VxWorks identifiers for tasks. This value, -- although represented as a Long_Integer, is in fact an address. With -- some BSPs, this address can have a value sufficiently high that the -- Thread_Id becomes negative: this should not be considered as an error. function kill (pid : t_id; sig : Signal) return int; pragma Inline (kill); function getpid return t_id renames System.VxWorks.Ext.getpid; function Task_Stop (tid : t_id) return int renames System.VxWorks.Ext.Task_Stop; -- If we are in the kernel space, stop the task whose t_id is given in -- parameter in such a way that it can be examined by the debugger. This -- typically maps to taskSuspend on VxWorks 5 and to taskStop on VxWorks 6. function Task_Cont (tid : t_id) return int renames System.VxWorks.Ext.Task_Cont; -- If we are in the kernel space, continue the task whose t_id is given -- in parameter if it has been stopped previously to be examined by the -- debugger (e.g. by taskStop). It typically maps to taskResume on VxWorks -- 5 and to taskCont on VxWorks 6. function Int_Lock return int renames System.VxWorks.Ext.Int_Lock; -- If we are in the kernel space, lock interrupts. It typically maps to -- intLock. function Int_Unlock (Old : int) return int renames System.VxWorks.Ext.Int_Unlock; -- If we are in the kernel space, unlock interrupts. It typically maps to -- intUnlock. The parameter Old is only used on PowerPC where it contains -- the returned value from Int_Lock (the old MPSR). ---------- -- Time -- ---------- type time_t is new unsigned_long; type timespec is record ts_sec : time_t; ts_nsec : long; end record; pragma Convention (C, timespec); type clockid_t is new int; function To_Duration (TS : timespec) return Duration; pragma Inline (To_Duration); function To_Timespec (D : Duration) return timespec; pragma Inline (To_Timespec); -- Convert a Duration value to a timespec value. Note that in VxWorks, -- timespec is always non-negative (since time_t is defined above as -- unsigned long). This means that there is a potential problem if a -- negative argument is passed for D. However, in actual usage, the -- value of the input argument D is always non-negative, so no problem -- arises in practice. function To_Clock_Ticks (D : Duration) return int; -- Convert a duration value (in seconds) into clock ticks function clock_gettime (clock_id : clockid_t; tp : access timespec) return int; pragma Import (C, clock_gettime, "clock_gettime"); ---------------------- -- Utility Routines -- ---------------------- function To_VxWorks_Priority (Priority : int) return int; pragma Inline (To_VxWorks_Priority); -- Convenience routine to convert between VxWorks priority and Ada priority -------------------------- -- VxWorks specific API -- -------------------------- subtype STATUS is int; -- Equivalent of the C type STATUS OK : constant STATUS := 0; ERROR : constant STATUS := Interfaces.C.int (-1); function taskIdVerify (tid : t_id) return STATUS; pragma Import (C, taskIdVerify, "taskIdVerify"); function taskIdSelf return t_id; pragma Import (C, taskIdSelf, "taskIdSelf"); function taskOptionsGet (tid : t_id; pOptions : access int) return int; pragma Import (C, taskOptionsGet, "taskOptionsGet"); function taskSuspend (tid : t_id) return int; pragma Import (C, taskSuspend, "taskSuspend"); function taskResume (tid : t_id) return int; pragma Import (C, taskResume, "taskResume"); function taskIsSuspended (tid : t_id) return int; pragma Import (C, taskIsSuspended, "taskIsSuspended"); function taskDelay (ticks : int) return int; pragma Import (C, taskDelay, "taskDelay"); function sysClkRateGet return int; pragma Import (C, sysClkRateGet, "sysClkRateGet"); -- VxWorks 5.x specific functions -- Must not be called from run-time for versions that do not support -- taskVarLib: eg VxWorks 6 RTPs function taskVarAdd (tid : t_id; pVar : access System.Address) return int; pragma Import (C, taskVarAdd, "taskVarAdd"); function taskVarDelete (tid : t_id; pVar : access System.Address) return int; pragma Import (C, taskVarDelete, "taskVarDelete"); function taskVarSet (tid : t_id; pVar : access System.Address; value : System.Address) return int; pragma Import (C, taskVarSet, "taskVarSet"); function taskVarGet (tid : t_id; pVar : access System.Address) return int; pragma Import (C, taskVarGet, "taskVarGet"); -- VxWorks 6.x specific functions -- Can only be called from the VxWorks 6 run-time libary that supports -- tlsLib, and not by the VxWorks 6.6 SMP library function tlsKeyCreate return int; pragma Import (C, tlsKeyCreate, "tlsKeyCreate"); function tlsValueGet (key : int) return System.Address; pragma Import (C, tlsValueGet, "tlsValueGet"); function tlsValueSet (key : int; value : System.Address) return STATUS; pragma Import (C, tlsValueSet, "tlsValueSet"); -- Option flags for taskSpawn VX_UNBREAKABLE : constant := 16#0002#; VX_FP_PRIVATE_ENV : constant := 16#0080#; VX_NO_STACK_FILL : constant := 16#0100#; function taskSpawn (name : System.Address; -- Pointer to task name priority : int; options : int; stacksize : size_t; start_routine : System.Address; arg1 : System.Address; arg2 : int := 0; arg3 : int := 0; arg4 : int := 0; arg5 : int := 0; arg6 : int := 0; arg7 : int := 0; arg8 : int := 0; arg9 : int := 0; arg10 : int := 0) return t_id; pragma Import (C, taskSpawn, "taskSpawn"); procedure taskDelete (tid : t_id); pragma Import (C, taskDelete, "taskDelete"); function Set_Time_Slice (ticks : int) return int renames System.VxWorks.Ext.Set_Time_Slice; -- Calls kernelTimeSlice under VxWorks 5.x, VxWorks 653, or in VxWorks 6 -- kernel apps. Returns ERROR for RTPs, VxWorks 5 /CERT function taskPriorityGet (tid : t_id; pPriority : access int) return int; pragma Import (C, taskPriorityGet, "taskPriorityGet"); function taskPrioritySet (tid : t_id; newPriority : int) return int; pragma Import (C, taskPrioritySet, "taskPrioritySet"); -- Semaphore creation flags SEM_Q_FIFO : constant := 0; SEM_Q_PRIORITY : constant := 1; SEM_DELETE_SAFE : constant := 4; -- only valid for binary semaphore SEM_INVERSION_SAFE : constant := 8; -- only valid for binary semaphore -- Semaphore initial state flags SEM_EMPTY : constant := 0; SEM_FULL : constant := 1; -- Semaphore take (semTake) time constants WAIT_FOREVER : constant := -1; NO_WAIT : constant := 0; -- Error codes (errno). The lower level 16 bits are the error code, with -- the upper 16 bits representing the module number in which the error -- occurred. By convention, the module number is 0 for UNIX errors. VxWorks -- reserves module numbers 1-500, with the remaining module numbers being -- available for user applications. M_objLib : constant := 61 * 2**16; -- semTake() failure with ticks = NO_WAIT S_objLib_OBJ_UNAVAILABLE : constant := M_objLib + 2; -- semTake() timeout with ticks > NO_WAIT S_objLib_OBJ_TIMEOUT : constant := M_objLib + 4; subtype SEM_ID is System.VxWorks.Ext.SEM_ID; -- typedef struct semaphore *SEM_ID; -- We use two different kinds of VxWorks semaphores: mutex and binary -- semaphores. A null ID is returned when a semaphore cannot be created. function semBCreate (options : int; initial_state : int) return SEM_ID; pragma Import (C, semBCreate, "semBCreate"); -- Create a binary semaphore. Return ID, or 0 if memory could not -- be allocated. function semMCreate (options : int) return SEM_ID; pragma Import (C, semMCreate, "semMCreate"); function semDelete (Sem : SEM_ID) return int renames System.VxWorks.Ext.semDelete; -- Delete a semaphore function semGive (Sem : SEM_ID) return int; pragma Import (C, semGive, "semGive"); function semTake (Sem : SEM_ID; timeout : int) return int; pragma Import (C, semTake, "semTake"); -- Attempt to take binary semaphore. Error is returned if operation -- times out function semFlush (SemID : SEM_ID) return STATUS; pragma Import (C, semFlush, "semFlush"); -- Release all threads blocked on the semaphore ------------------------------------------------------------ -- Binary Semaphore Wrapper to Support interrupt Tasks -- ------------------------------------------------------------ type Binary_Semaphore_Id is new Long_Integer; function Binary_Semaphore_Create return Binary_Semaphore_Id; pragma Inline (Binary_Semaphore_Create); function Binary_Semaphore_Delete (ID : Binary_Semaphore_Id) return int; pragma Inline (Binary_Semaphore_Delete); function Binary_Semaphore_Obtain (ID : Binary_Semaphore_Id) return int; pragma Inline (Binary_Semaphore_Obtain); function Binary_Semaphore_Release (ID : Binary_Semaphore_Id) return int; pragma Inline (Binary_Semaphore_Release); function Binary_Semaphore_Flush (ID : Binary_Semaphore_Id) return int; pragma Inline (Binary_Semaphore_Flush); ------------------------------------------------------------ -- Hardware Interrupt Wrappers to Support Interrupt Tasks -- ------------------------------------------------------------ type Interrupt_Handler is access procedure (parameter : System.Address); pragma Convention (C, Interrupt_Handler); type Interrupt_Vector is new System.Address; function Interrupt_Connect (Vector : Interrupt_Vector; Handler : Interrupt_Handler; Parameter : System.Address := System.Null_Address) return int; pragma Inline (Interrupt_Connect); -- Use this to set up an user handler. The routine installs a user handler -- which is invoked after the OS has saved enough context for a high-level -- language routine to be safely invoked. function Interrupt_Context return int; pragma Inline (Interrupt_Context); -- Return 1 if executing in an interrupt context; return 0 if executing in -- a task context. function Interrupt_Number_To_Vector (intNum : int) return Interrupt_Vector; pragma Inline (Interrupt_Number_To_Vector); -- Convert a logical interrupt number to the hardware interrupt vector -- number used to connect the interrupt. -------------------------------- -- Processor Affinity for SMP -- -------------------------------- function taskCpuAffinitySet (tid : t_id; CPU : int) return int renames System.VxWorks.Ext.taskCpuAffinitySet; -- For SMP run-times the affinity to CPU. -- For uniprocessor systems return ERROR status. function taskMaskAffinitySet (tid : t_id; CPU_Set : unsigned) return int renames System.VxWorks.Ext.taskMaskAffinitySet; -- For SMP run-times the affinity to CPU_Set. -- For uniprocessor systems return ERROR status. --------------------- -- Multiprocessors -- --------------------- function Current_CPU return Multiprocessors.CPU; -- Return the id of the current CPU private type pid_t is new int; ERROR_PID : constant pid_t := -1; type sigset_t is new System.VxWorks.Ext.sigset_t; end System.OS_Interface;
39.085878
79
0.620087
1c76583f810baf2c99ba18687a03ea10329a20ff
1,053
ads
Ada
src/ewok-mpu-handler.ads
PThierry/ewok-kernel
e9c23cb3fd0afd8378bc27418778e1117d5e16cc
[ "Apache-2.0" ]
null
null
null
src/ewok-mpu-handler.ads
PThierry/ewok-kernel
e9c23cb3fd0afd8378bc27418778e1117d5e16cc
[ "Apache-2.0" ]
null
null
null
src/ewok-mpu-handler.ads
PThierry/ewok-kernel
e9c23cb3fd0afd8378bc27418778e1117d5e16cc
[ "Apache-2.0" ]
null
null
null
-- -- Copyright 2018 The wookey project team <[email protected]> -- - Ryad Benadjila -- - Arnauld Michelizza -- - Mathieu Renard -- - Philippe Thierry -- - Philippe Trebuchet -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- -- with ewok; use ewok; package ewok.mpu.handler with spark_mode => off -- all _access variabls are not SPARK compatible is procedure init; function memory_fault_handler (frame_a : t_stack_frame_access) return t_stack_frame_access; end ewok.mpu.handler;
28.459459
79
0.706553
239ede164538a0a520a3e26a213c0a410b697f19
3,480
ads
Ada
arch/ARM/STM32/driver_demos/demo_dma_mem_to_peripheral/src/peripherals.ads
shakram02/Ada_Drivers_Library
a407ca7ddbc2d9756647016c2f8fd8ef24a239ff
[ "BSD-3-Clause" ]
192
2016-06-01T18:32:04.000Z
2022-03-26T22:52:31.000Z
arch/ARM/STM32/driver_demos/demo_dma_mem_to_peripheral/src/peripherals.ads
morbos/Ada_Drivers_Library
a4ab26799be60997c38735f4056160c4af597ef7
[ "BSD-3-Clause" ]
239
2016-05-26T20:02:01.000Z
2022-03-31T09:46:56.000Z
arch/ARM/STM32/driver_demos/demo_dma_mem_to_peripheral/src/peripherals.ads
morbos/Ada_Drivers_Library
a4ab26799be60997c38735f4056160c4af597ef7
[ "BSD-3-Clause" ]
142
2016-06-05T08:12:20.000Z
2022-03-24T17:37:17.000Z
------------------------------------------------------------------------------ -- -- -- Copyright (C) 2015-2016, AdaCore -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions are -- -- met: -- -- 1. Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- 2. Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in -- -- the documentation and/or other materials provided with the -- -- distribution. -- -- 3. Neither the name of the copyright holder nor the names of its -- -- contributors may be used to endorse or promote products derived -- -- from this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -- -- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -- -- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -- -- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -- -- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -- -- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ with Ada.Interrupts.Names; use Ada.Interrupts.Names; with STM32.DMA; use STM32.DMA; with STM32.GPIO; use STM32.GPIO; with STM32.USARTs; use STM32.USARTs; with STM32.Device; use STM32.Device; package Peripherals is Transceiver : USART renames USART_2; Transceiver_AF : constant STM32.GPIO_Alternate_Function := GPIO_AF_USART2_7; TX_Pin : constant GPIO_Point := PA2; RX_Pin : constant GPIO_Point := PA3; Controller : DMA_Controller renames DMA_1; Tx_Channel : constant DMA_Channel_Selector := Channel_4; Tx_Stream : constant DMA_Stream_Selector := Stream_6; -- See RM0090, section 10.3.3, for the DMA channel request mapping tables -- that say which controllers, and which channels and streams on those -- controllers, can connect to which devices. For example, it is channel -- four and stream six that connect DMA1 to the transmitter of USART2, so -- we specify those values above. DMA_Tx_IRQ : constant Ada.Interrupts.Interrupt_ID := DMA1_Stream6_Interrupt; -- must match that of the selected controller and stream number!!!! end Peripherals;
53.538462
79
0.580747
d028515a774ce9261a79da31d5c007ed1659d1dd
5,763
ads
Ada
SVD2ada/svd/stm32_svd-mpu.ads
JCGobbi/Nucleo-STM32G474RE
8dc1c4948ffeb11841eed10f1c3708f00fa1d832
[ "BSD-3-Clause" ]
null
null
null
SVD2ada/svd/stm32_svd-mpu.ads
JCGobbi/Nucleo-STM32G474RE
8dc1c4948ffeb11841eed10f1c3708f00fa1d832
[ "BSD-3-Clause" ]
null
null
null
SVD2ada/svd/stm32_svd-mpu.ads
JCGobbi/Nucleo-STM32G474RE
8dc1c4948ffeb11841eed10f1c3708f00fa1d832
[ "BSD-3-Clause" ]
null
null
null
pragma Style_Checks (Off); -- This spec has been automatically generated from STM32G474xx.svd pragma Restrictions (No_Elaboration_Code); with HAL; with System; package STM32_SVD.MPU is pragma Preelaborate; --------------- -- Registers -- --------------- subtype TYPER_DREGION_Field is HAL.UInt8; subtype TYPER_IREGION_Field is HAL.UInt8; -- MPU type register type TYPER_Register is record -- Read-only. Separate flag SEPARATE_k : Boolean; -- unspecified Reserved_1_7 : HAL.UInt7; -- Read-only. Number of MPU data regions DREGION : TYPER_DREGION_Field; -- Read-only. Number of MPU instruction regions IREGION : TYPER_IREGION_Field; -- unspecified Reserved_24_31 : HAL.UInt8; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for TYPER_Register use record SEPARATE_k at 0 range 0 .. 0; Reserved_1_7 at 0 range 1 .. 7; DREGION at 0 range 8 .. 15; IREGION at 0 range 16 .. 23; Reserved_24_31 at 0 range 24 .. 31; end record; -- MPU control register type CTRL_Register is record -- Enables the MPU ENABLE : Boolean := False; -- Enables the operation of MPU during hard fault HFNMIENA : Boolean := False; -- Enable priviliged software access to default memory map PRIVDEFENA : Boolean := False; -- unspecified Reserved_3_31 : HAL.UInt29 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for CTRL_Register use record ENABLE at 0 range 0 .. 0; HFNMIENA at 0 range 1 .. 1; PRIVDEFENA at 0 range 2 .. 2; Reserved_3_31 at 0 range 3 .. 31; end record; subtype RNR_REGION_Field is HAL.UInt8; -- MPU region number register type RNR_Register is record -- MPU region REGION : RNR_REGION_Field := 16#0#; -- unspecified Reserved_8_31 : HAL.UInt24 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for RNR_Register use record REGION at 0 range 0 .. 7; Reserved_8_31 at 0 range 8 .. 31; end record; subtype RBAR_REGION_Field is HAL.UInt4; subtype RBAR_ADDR_Field is HAL.UInt27; -- MPU region base address register type RBAR_Register is record -- MPU region field REGION : RBAR_REGION_Field := 16#0#; -- MPU region number valid VALID : Boolean := False; -- Region base address field ADDR : RBAR_ADDR_Field := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for RBAR_Register use record REGION at 0 range 0 .. 3; VALID at 0 range 4 .. 4; ADDR at 0 range 5 .. 31; end record; subtype RASR_SIZE_Field is HAL.UInt5; subtype RASR_SRD_Field is HAL.UInt8; subtype RASR_TEX_Field is HAL.UInt3; subtype RASR_AP_Field is HAL.UInt3; -- MPU region attribute and size register type RASR_Register is record -- Region enable bit. ENABLE : Boolean := False; -- Size of the MPU protection region SIZE : RASR_SIZE_Field := 16#0#; -- unspecified Reserved_6_7 : HAL.UInt2 := 16#0#; -- Subregion disable bits SRD : RASR_SRD_Field := 16#0#; -- memory attribute B : Boolean := False; -- memory attribute C : Boolean := False; -- Shareable memory attribute S : Boolean := False; -- memory attribute TEX : RASR_TEX_Field := 16#0#; -- unspecified Reserved_22_23 : HAL.UInt2 := 16#0#; -- Access permission AP : RASR_AP_Field := 16#0#; -- unspecified Reserved_27_27 : HAL.Bit := 16#0#; -- Instruction access disable bit XN : Boolean := False; -- unspecified Reserved_29_31 : HAL.UInt3 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for RASR_Register use record ENABLE at 0 range 0 .. 0; SIZE at 0 range 1 .. 5; Reserved_6_7 at 0 range 6 .. 7; SRD at 0 range 8 .. 15; B at 0 range 16 .. 16; C at 0 range 17 .. 17; S at 0 range 18 .. 18; TEX at 0 range 19 .. 21; Reserved_22_23 at 0 range 22 .. 23; AP at 0 range 24 .. 26; Reserved_27_27 at 0 range 27 .. 27; XN at 0 range 28 .. 28; Reserved_29_31 at 0 range 29 .. 31; end record; ----------------- -- Peripherals -- ----------------- -- Memory protection unit type MPU_Peripheral is record -- MPU type register TYPER : aliased TYPER_Register; -- MPU control register CTRL : aliased CTRL_Register; -- MPU region number register RNR : aliased RNR_Register; -- MPU region base address register RBAR : aliased RBAR_Register; -- MPU region attribute and size register RASR : aliased RASR_Register; end record with Volatile; for MPU_Peripheral use record TYPER at 16#0# range 0 .. 31; CTRL at 16#4# range 0 .. 31; RNR at 16#8# range 0 .. 31; RBAR at 16#C# range 0 .. 31; RASR at 16#10# range 0 .. 31; end record; -- Memory protection unit MPU_Periph : aliased MPU_Peripheral with Import, Address => MPU_Base; end STM32_SVD.MPU;
30.654255
67
0.583203
c504707b665c84bff83911d65767de5061a4907b
4,058
ads
Ada
support/MinGW/lib/gcc/mingw32/9.2.0/adainclude/a-tideio.ads
orb-zhuchen/Orb
6da2404b949ac28bde786e08bf4debe4a27cd3a0
[ "CNRI-Python-GPL-Compatible", "MIT" ]
null
null
null
support/MinGW/lib/gcc/mingw32/9.2.0/adainclude/a-tideio.ads
orb-zhuchen/Orb
6da2404b949ac28bde786e08bf4debe4a27cd3a0
[ "CNRI-Python-GPL-Compatible", "MIT" ]
null
null
null
support/MinGW/lib/gcc/mingw32/9.2.0/adainclude/a-tideio.ads
orb-zhuchen/Orb
6da2404b949ac28bde786e08bf4debe4a27cd3a0
[ "CNRI-Python-GPL-Compatible", "MIT" ]
null
null
null
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- A D A . T E X T _ I O . D E C I M A L _ I O -- -- -- -- S p e c -- -- -- -- Copyright (C) 1992-2019, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- -- apply solely to the contents of the part following the private keyword. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- In Ada 95, the package Ada.Text_IO.Decimal_IO is a subpackage of Text_IO. -- This is for compatibility with Ada 83. In GNAT we make it a child package -- to avoid loading the necessary code if Decimal_IO is not instantiated. -- See routine Rtsfind.Check_Text_IO_Special_Unit for a description of how -- we patch up the difference in semantics so that it is invisible to the -- Ada programmer. private generic type Num is delta <> digits <>; package Ada.Text_IO.Decimal_IO is Default_Fore : Field := Num'Fore; Default_Aft : Field := Num'Aft; Default_Exp : Field := 0; procedure Get (File : File_Type; Item : out Num; Width : Field := 0); procedure Get (Item : out Num; Width : Field := 0); procedure Put (File : File_Type; Item : Num; Fore : Field := Default_Fore; Aft : Field := Default_Aft; Exp : Field := Default_Exp); procedure Put (Item : Num; Fore : Field := Default_Fore; Aft : Field := Default_Aft; Exp : Field := Default_Exp); procedure Get (From : String; Item : out Num; Last : out Positive); procedure Put (To : out String; Item : Num; Aft : Field := Default_Aft; Exp : Field := Default_Exp); private pragma Inline (Get); pragma Inline (Put); end Ada.Text_IO.Decimal_IO;
45.088889
78
0.470429
39a698a193311d3f1013fdeddad17e02680d9a80
27,196
adb
Ada
3-mid/physics/interface/source/private/box2d/box2d_physics-joint.adb
charlie5/lace-alire
9ace9682cf4daac7adb9f980c2868d6225b8111c
[ "0BSD" ]
1
2022-01-20T07:13:42.000Z
2022-01-20T07:13:42.000Z
3-mid/physics/interface/source/private/box2d/box2d_physics-joint.adb
charlie5/lace-alire
9ace9682cf4daac7adb9f980c2868d6225b8111c
[ "0BSD" ]
null
null
null
3-mid/physics/interface/source/private/box2d/box2d_physics-joint.adb
charlie5/lace-alire
9ace9682cf4daac7adb9f980c2868d6225b8111c
[ "0BSD" ]
null
null
null
with box2d_c.Binding, box2d_physics.Object, c_math_c.Vector_3, c_math_c.Matrix_4x4, c_math_c.Conversion, Swig, interfaces.C, ada.unchecked_Deallocation, ada.unchecked_Conversion; package body box2d_Physics.Joint is use c_math_c.Conversion, box2d_c.Binding, Interfaces; type Any_limited_view is access all lace.Any.limited_item'Class; function to_Any_view is new ada.unchecked_Conversion (Swig.void_ptr, Any_limited_view); function to_Object_view is new ada.unchecked_Conversion (swig.void_ptr, physics.Object.view); pragma Unreferenced (to_Object_view); -- procedure set_b2d_user_Data (Self : in View) -- is -- function to_void_ptr is new ada.Unchecked_Conversion (Any_limited_view, Swig.void_ptr); -- Self_as_any : constant Any_limited_view := Any_limited_view (Self); -- begin -- b2d_Joint_user_Data_is (Self.C, to_void_ptr (Self_as_any)); -- end set_b2d_user_Data; overriding function reaction_Force (Self : in Item) return Vector_3 is begin return +b2d_Joint_reaction_Force (Self.C); end reaction_Force; overriding function reaction_Torque (Self : in Item) return Real is begin return +b2d_Joint_reaction_Torque (Self.C); end reaction_Torque; overriding procedure user_Data_is (Self : in out Item; Now : access lace.Any.limited_item'Class) is begin Self.user_Data := Now; end user_Data_is; overriding function user_Data (Self : in Item) return access lace.Any.limited_item'Class is begin return Self.user_Data; end user_Data; -------- -- DoF6 -- function new_Dof6_Joint (Object_A, Object_B : in physics.Object.view; Frame_A, Frame_B : in Matrix_4x4) return physics.Joint.DoF6.view is Self : constant access DoF6 := new DoF6; pragma Unreferenced (Self); c_Object_A : box2d_C.Pointers.Object_Pointer := box2d_physics.Object.view (Object_A).C; c_Object_B : box2d_C.Pointers.Object_Pointer := box2d_physics.Object.view (Object_B).C; c_Frame_A : aliased c_math_c.Matrix_4x4.item := +Frame_A; c_Frame_B : aliased c_math_c.Matrix_4x4.item := +Frame_B; begin return null; end new_Dof6_Joint; overriding procedure destruct (Self : in out DoF6) is begin raise Program_Error with "TBD"; end destruct; overriding function Object_A (Self : in DoF6) return physics.Object.view is c_Object_A : constant box2d_c.Pointers.Object_Pointer := b2d_Joint_Object_A (Self.C); begin return physics.Object.view (to_Any_view (b2d_Object_user_Data (c_Object_A))); end Object_A; overriding function Object_B (Self : in DoF6) return physics.Object.view is c_Object_B : constant box2d_c.Pointers.Object_Pointer := b2d_Joint_Object_B (Self.C); begin return physics.Object.view (to_Any_view (b2d_Object_user_Data (c_Object_B))); end Object_B; overriding function Frame_A (Self : in DoF6) return Matrix_4x4 is begin return +b2d_Joint_Frame_A (Self.C); end Frame_A; overriding function Frame_B (Self : in DoF6) return Matrix_4x4 is begin return +b2d_Joint_Frame_B (Self.C); end Frame_B; overriding procedure Frame_A_is (Self : in out DoF6; Now : in Matrix_4x4) is c_Now : aliased c_math_c.Matrix_4x4.item := +Now; begin b2d_Joint_Frame_A_is (Self.C, c_Now'unchecked_Access); end Frame_A_is; overriding procedure Frame_B_is (Self : in out DoF6; Now : in Matrix_4x4) is c_Now : aliased c_math_c.Matrix_4x4.item := +Now; begin b2d_Joint_Frame_B_is (Self.C, c_Now'unchecked_Access); end Frame_B_is; overriding function is_Limited (Self : in DoF6; DoF : Degree_of_freedom) return Boolean is use type Swig.bool; begin return b2d_Joint_is_Limited (Self.C, Degree_of_freedom'Pos (DoF)) /= 0; end is_Limited; overriding procedure Velocity_is (Self : in out DoF6; Now : in Real; DoF : in Degree_of_freedom) is begin if DoF < 4 then raise Error with "Illegal degree of freedom:" & Degree_of_freedom'Image (DoF); end if; b2d_Joint_Velocity_is (Self.C, C.int (Now), c_math_c.Real (DoF)); end Velocity_is; overriding function Extent (Self : in DoF6; DoF : Degree_of_freedom) return Real is begin if DoF < 4 then raise Error with "Illegal degree of freedom:" & Degree_of_freedom'Image (DoF); end if; return Real (b2d_Joint_Extent (Self.C, C.int (DoF))); end Extent; overriding procedure desired_Extent_is (Self : in out DoF6; Now : in Real; DoF : in Degree_of_freedom) is begin raise Error with "TODO"; end desired_Extent_is; overriding function lower_Limit (Self : in DoF6; DoF : in Degree_of_freedom) return Real is begin raise Error with "TODO"; return 0.0; end lower_Limit; overriding function upper_Limit (Self : in DoF6; DoF : in Degree_of_freedom) return Real is begin raise Error with "TODO"; return 0.0; end upper_Limit; overriding procedure lower_Limit_is (Self : in out DoF6; Now : in Real; DoF : in Degree_of_freedom) is begin raise Error with "TODO"; end lower_Limit_is; overriding procedure upper_Limit_is (Self : in out DoF6; Now : in Real; DoF : in Degree_of_freedom) is begin raise Error with "TODO"; end upper_Limit_is; -------- -- Ball -- function new_Ball_Joint (Object_A, Object_B : in physics.Object.view; Pivot_in_A, Pivot_in_B : in Vector_3) return physics.Joint.ball.view is Self : constant access Ball := new Ball; c_Object_A : constant box2d_C.Pointers.Object_Pointer := box2d_physics.Object.view (Object_A).C; c_Object_B : constant box2d_C.Pointers.Object_Pointer := box2d_physics.Object.view (Object_B).C; c_Pivot_in_A : aliased c_math_c.Vector_3.item := +Pivot_in_A; c_Pivot_in_B : aliased c_math_c.Vector_3.item := +Pivot_in_B; begin Self.C := b2d_new_ball_Joint (c_Object_A, c_Object_B, c_Pivot_in_A'unchecked_Access, c_Pivot_in_B'unchecked_Access); return Self; end new_Ball_Joint; overriding procedure destruct (Self : in out Ball) is begin raise Error with "TODO"; end destruct; overriding function Object_A (Self : in Ball) return physics.Object.view is c_Object_A : constant box2d_c.Pointers.Object_Pointer := b2d_Joint_Object_A (Self.C); begin return physics.Object.view (to_Any_view (b2d_Object_user_Data (c_Object_A))); end Object_A; overriding function Object_B (Self : in Ball) return physics.Object.view is c_Object_B : constant box2d_c.Pointers.Object_Pointer := b2d_Joint_Object_B (Self.C); begin return physics.Object.view (to_Any_view (b2d_Object_user_Data (c_Object_B))); end Object_B; overriding function Frame_A (Self : in Ball) return Matrix_4x4 is begin return +b2d_Joint_Frame_A (Self.C); end Frame_A; overriding function Frame_B (Self : in Ball) return Matrix_4x4 is begin return +b2d_Joint_Frame_B (Self.C); end Frame_B; overriding procedure Frame_A_is (Self : in out Ball; Now : in Matrix_4x4) is c_Now : aliased c_math_c.Matrix_4x4.item := +Now; begin b2d_Joint_Frame_A_is (Self.C, c_Now'unchecked_Access); end Frame_A_is; overriding procedure Frame_B_is (Self : in out Ball; Now : in Matrix_4x4) is c_Now : aliased c_math_c.Matrix_4x4.item := +Now; begin b2d_Joint_Frame_B_is (Self.C, c_Now'unchecked_Access); end Frame_B_is; overriding function is_Limited (Self : in Ball; DoF : Degree_of_freedom) return Boolean is use type Swig.bool; begin return b2d_Joint_is_Limited (Self.C, Degree_of_freedom'Pos (DoF)) /= 0; end is_Limited; overriding procedure Velocity_is (Self : in out Ball; Now : in Real; DoF : in Degree_of_freedom) is begin if DoF < 4 then raise Error with "Illegal degree of freedom:" & Degree_of_freedom'Image (DoF); end if; b2d_Joint_Velocity_is (Self.C, C.int (Now), c_math_c.Real (DoF)); end Velocity_is; overriding function Extent (Self : in Ball; DoF : Degree_of_freedom) return Real is begin if DoF < 4 then raise Error with "Illegal degree of freedom:" & Degree_of_freedom'Image (DoF); end if; return Real (b2d_Joint_Extent (Self.C, C.int (DoF))); end Extent; overriding procedure desired_Extent_is (Self : in out Ball; Now : in Real; DoF : in Degree_of_freedom) is begin raise Error with "TODO"; end desired_Extent_is; overriding function lower_Limit (Self : in Ball; DoF : in Degree_of_freedom) return Real is begin raise Error with "TODO"; return 0.0; end lower_Limit; overriding function upper_Limit (Self : in Ball; DoF : in Degree_of_freedom) return Real is begin raise Error with "TODO"; return 0.0; end upper_Limit; overriding procedure lower_Limit_is (Self : in out Ball; Now : in Real; DoF : in Degree_of_freedom) is begin raise Error with "TODO"; end lower_Limit_is; overriding procedure upper_Limit_is (Self : in out Ball; Now : in Real; DoF : in Degree_of_freedom) is begin raise Error with "TODO"; end upper_Limit_is; ---------- -- Slider -- function new_Slider_Joint (Object_A, Object_B : in physics.Object.view; Frame_A, Frame_B : in Matrix_4x4) return physics.Joint.slider.view is Self : constant access Slider := new Slider; c_Object_A : constant box2d_C.Pointers.Object_Pointer := box2d_physics.Object.view (Object_A).C; c_Object_B : constant box2d_C.Pointers.Object_Pointer := box2d_physics.Object.view (Object_B).C; c_Frame_A : aliased c_math_c.Matrix_4x4.item := +Frame_A; c_Frame_B : aliased c_math_c.Matrix_4x4.item := +Frame_B; begin Self.C := b2d_new_slider_Joint (c_Object_A, c_Object_B, c_Frame_A'unchecked_Access, c_Frame_B'unchecked_Access); return Self; end new_Slider_Joint; overriding procedure destruct (Self : in out Slider) is begin raise Error with "TODO"; end destruct; overriding function Object_A (Self : in Slider) return physics.Object.view is c_Object_A : constant box2d_c.Pointers.Object_Pointer := b2d_Joint_Object_A (Self.C); begin return physics.Object.view (to_Any_view (b2d_Object_user_Data (c_Object_A))); end Object_A; overriding function Object_B (Self : in Slider) return physics.Object.view is c_Object_B : constant box2d_c.Pointers.Object_Pointer := b2d_Joint_Object_B (Self.C); begin return physics.Object.view (to_Any_view (b2d_Object_user_Data (c_Object_B))); end Object_B; overriding function Frame_A (Self : in Slider) return Matrix_4x4 is begin return +b2d_Joint_Frame_A (Self.C); end Frame_A; overriding function Frame_B (Self : in Slider) return Matrix_4x4 is begin return +b2d_Joint_Frame_B (Self.C); end Frame_B; overriding procedure Frame_A_is (Self : in out Slider; Now : in Matrix_4x4) is c_Now : aliased c_math_c.Matrix_4x4.item := +Now; begin b2d_Joint_Frame_A_is (Self.C, c_Now'unchecked_Access); end Frame_A_is; overriding procedure Frame_B_is (Self : in out Slider; Now : in Matrix_4x4) is c_Now : aliased c_math_c.Matrix_4x4.item := +Now; begin b2d_Joint_Frame_B_is (Self.C, c_Now'unchecked_Access); end Frame_B_is; overriding function is_Limited (Self : in Slider; DoF : Degree_of_freedom) return Boolean is use type Swig.bool; begin return b2d_Joint_is_Limited (Self.C, Degree_of_freedom'Pos (DoF)) /= 0; end is_Limited; overriding procedure Velocity_is (Self : in out Slider; Now : in Real; DoF : in Degree_of_freedom) is begin if DoF < 4 then raise Error with "Illegal degree of freedom:" & Degree_of_freedom'Image (DoF); end if; b2d_Joint_Velocity_is (Self.C, C.int (Now), c_math_c.Real (DoF)); end Velocity_is; overriding function Extent (Self : in Slider; DoF : Degree_of_freedom) return Real is begin if DoF < 4 then raise Error with "Illegal degree of freedom:" & Degree_of_freedom'Image (DoF); end if; return Real (b2d_Joint_Extent (Self.C, C.int (DoF))); end Extent; overriding procedure desired_Extent_is (Self : in out Slider; Now : in Real; DoF : in Degree_of_freedom) is begin raise Error with "TODO"; end desired_Extent_is; overriding function lower_Limit (Self : in Slider; DoF : in Degree_of_freedom) return Real is begin raise Error with "TODO"; return 0.0; end lower_Limit; overriding function upper_Limit (Self : in Slider; DoF : in Degree_of_freedom) return Real is begin raise Error with "TODO"; return 0.0; end upper_Limit; overriding procedure lower_Limit_is (Self : in out Slider; Now : in Real; DoF : in Degree_of_freedom) is begin raise Error with "TODO"; end lower_Limit_is; overriding procedure upper_Limit_is (Self : in out Slider; Now : in Real; DoF : in Degree_of_freedom) is begin raise Error with "TODO"; end upper_Limit_is; -------------- -- cone_Twist -- function new_cone_Twist_Joint (Object_A, Object_B : in physics.Object.view; Frame_A, Frame_B : in Matrix_4x4) return physics.Joint.cone_twist.view is Self : constant access cone_Twist := new cone_Twist; c_Object_A : constant box2d_C.Pointers.Object_Pointer := box2d_physics.Object.view (Object_A).C; c_Object_B : constant box2d_C.Pointers.Object_Pointer := box2d_physics.Object.view (Object_B).C; c_Frame_A : aliased c_math_c.Matrix_4x4.item := +Frame_A; c_Frame_B : aliased c_math_c.Matrix_4x4.item := +Frame_B; begin Self.C := b2d_new_DoF6_Joint (c_Object_A, c_Object_B, c_Frame_A'unchecked_Access, c_Frame_B'unchecked_Access); return Self; end new_cone_Twist_Joint; overriding procedure destruct (Self : in out cone_Twist) is begin raise Error with "TODO"; end destruct; overriding function Object_A (Self : in cone_Twist) return physics.Object.view is c_Object_A : constant box2d_c.Pointers.Object_Pointer := b2d_Joint_Object_A (Self.C); begin return physics.Object.view (to_Any_view (b2d_Object_user_Data (c_Object_A))); end Object_A; overriding function Object_B (Self : in cone_Twist) return physics.Object.view is c_Object_B : constant box2d_c.Pointers.Object_Pointer := b2d_Joint_Object_B (Self.C); begin return physics.Object.view (to_Any_view (b2d_Object_user_Data (c_Object_B))); end Object_B; overriding function Frame_A (Self : in cone_Twist) return Matrix_4x4 is begin return +b2d_Joint_Frame_A (Self.C); end Frame_A; overriding function Frame_B (Self : in cone_Twist) return Matrix_4x4 is begin return +b2d_Joint_Frame_B (Self.C); end Frame_B; overriding procedure Frame_A_is (Self : in out cone_Twist; Now : in Matrix_4x4) is c_Now : aliased c_math_c.Matrix_4x4.item := +Now; begin b2d_Joint_Frame_A_is (Self.C, c_Now'unchecked_Access); end Frame_A_is; overriding procedure Frame_B_is (Self : in out cone_Twist; Now : in Matrix_4x4) is c_Now : aliased c_math_c.Matrix_4x4.item := +Now; begin b2d_Joint_Frame_B_is (Self.C, c_Now'unchecked_Access); end Frame_B_is; overriding function is_Limited (Self : in cone_Twist; DoF : Degree_of_freedom) return Boolean is use type Swig.bool; begin return b2d_Joint_is_Limited (Self.C, Degree_of_freedom'Pos (DoF)) /= 0; end is_Limited; overriding procedure Velocity_is (Self : in out cone_Twist; Now : in Real; DoF : in Degree_of_freedom) is begin if DoF < 4 then raise Error with "Illegal degree of freedom:" & Degree_of_freedom'Image (DoF); end if; b2d_Joint_Velocity_is (Self.C, C.int (Now), c_math_c.Real (DoF)); end Velocity_is; overriding function Extent (Self : in cone_Twist; DoF : Degree_of_freedom) return Real is begin if DoF < 4 then raise Error with "Illegal degree of freedom:" & Degree_of_freedom'Image (DoF); end if; return Real (b2d_Joint_Extent (Self.C, C.int (DoF))); end Extent; overriding procedure desired_Extent_is (Self : in out cone_Twist; Now : in Real; DoF : in Degree_of_freedom) is begin raise Error with "TODO"; end desired_Extent_is; overriding function lower_Limit (Self : in cone_Twist; DoF : in Degree_of_freedom) return Real is begin raise Error with "TODO"; return 0.0; end lower_Limit; overriding function upper_Limit (Self : in cone_Twist; DoF : in Degree_of_freedom) return Real is begin raise Error with "TODO"; return 0.0; end upper_Limit; overriding procedure lower_Limit_is (Self : in out cone_Twist; Now : in Real; DoF : in Degree_of_freedom) is begin raise Error with "TODO"; end lower_Limit_is; overriding procedure upper_Limit_is (Self : in out cone_Twist; Now : in Real; DoF : in Degree_of_freedom) is begin raise Error with "TODO"; end upper_Limit_is; --------- -- Hinge -- function new_hinge_Joint (in_Space : in box2d_c.Pointers.Space_Pointer; Object_A, Object_B : in physics.Object.view; Anchor_in_A, Anchor_in_B : in Vector_3; low_Limit, high_Limit : in math.Real; collide_Conected : in Boolean) return physics.Joint.hinge.view is use type box2d_physics.Object.view, physics.Object.view; Self : constant access Hinge := new Hinge; c_Object_A : box2d_C.Pointers.Object_Pointer; c_Object_B : box2d_C.Pointers.Object_Pointer; c_Anchor_in_A : aliased c_math_c.Vector_3.item := +Anchor_in_A; c_Anchor_in_B : aliased c_math_c.Vector_3.item := +Anchor_in_B; begin if Object_A = null or Object_B = null then raise Error with "Null object detected."; end if; if box2d_physics.Object.view (Object_A) /= null then c_Object_A := box2d_physics.Object.view (Object_A).C; end if; if box2d_physics.Object.view (Object_B) /= null then c_Object_B := box2d_physics.Object.view (Object_B).C; end if; Self.C := b2d_new_hinge_Joint_with_local_anchors (in_Space, c_Object_A, c_Object_B, c_Anchor_in_A'unchecked_Access, c_Anchor_in_B'unchecked_Access, c_math_c.Real (low_Limit), c_math_c.Real (high_Limit), Boolean'Pos (collide_Conected)); return Self; end new_hinge_Joint; function new_hinge_Joint (Object_A : in physics.Object.view; Frame_A : in Matrix_4x4) return physics.Joint.hinge.view is use type box2d_physics.Object.view; Self : constant access Hinge := new Hinge; c_Object_A : constant box2d_C.Pointers.Object_Pointer := box2d_physics.Object.view (Object_A).C; c_Frame_A : aliased c_math_c.Matrix_4x4.item := +Frame_A; begin Self.C := b2d_new_space_hinge_Joint (c_Object_A, c_Frame_A'unchecked_Access); return Self; end new_hinge_Joint; function new_hinge_Joint (in_Space : in box2d_c.Pointers.Space_Pointer; Object_A, Object_B : in physics.Object.view; Frame_A, Frame_B : in Matrix_4x4; low_Limit, high_Limit : in math.Real; collide_Conected : in Boolean) return physics.Joint.hinge.view is use type box2d_physics.Object.view, physics.Object.view; Self : constant access Hinge := new Hinge; c_Object_A : box2d_C.Pointers.Object_Pointer; c_Object_B : box2d_C.Pointers.Object_Pointer; c_Frame_A : aliased c_math_c.Matrix_4x4.item := +Frame_A; c_Frame_B : aliased c_math_c.Matrix_4x4.item := +Frame_B; begin if Object_A = null or Object_B = null then raise Error with "Null object detected."; end if; if box2d_physics.Object.view (Object_A) /= null then c_Object_A := box2d_physics.Object.view (Object_A).C; end if; if box2d_physics.Object.view (Object_B) /= null then c_Object_B := box2d_physics.Object.view (Object_B).C; end if; Self.C := b2d_new_hinge_Joint (in_Space, c_Object_A, c_Object_B, c_Frame_A'unchecked_Access, c_Frame_B'unchecked_Access, c_math_c.Real (low_Limit), c_math_c.Real (high_Limit), Boolean'Pos (collide_Conected)); return Self; end new_hinge_Joint; overriding procedure destruct (Self : in out Hinge) is begin b2d_free_hinge_Joint (Self.C); Self.C := null; end destruct; overriding procedure Limits_are (Self : in out Hinge; Low, High : in Real; Softness : in Real := 0.9; biasFactor : in Real := 0.3; relaxationFactor : in Real := 1.0) is begin b2d_Joint_hinge_Limits_are (Self.C, c_math_c.Real (Low), c_math_c.Real (High)); end Limits_are; overriding function lower_Limit (Self : in Hinge) return Real is begin raise Error with "TODO"; return 0.0; end lower_Limit; overriding function upper_Limit (Self : in Hinge) return Real is begin raise Error with "TODO"; return 0.0; end upper_Limit; overriding function Angle (Self : in Hinge) return Real is begin raise Error with "TODO"; return 0.0; end Angle; overriding function Object_A (Self : in Hinge) return physics.Object.view is begin raise Error with "TODO"; return null; end Object_A; overriding function Object_B (Self : in Hinge) return physics.Object.view is begin raise Error with "TODO"; return null; end Object_B; overriding function Frame_A (Self : in Hinge) return Matrix_4x4 is c_Frame : aliased c_math_c.Matrix_4x4.item; begin raise Error with "TODO"; return +c_Frame; end Frame_A; overriding function Frame_B (Self : in Hinge) return Matrix_4x4 is c_Frame : aliased c_math_c.Matrix_4x4.item; begin raise Error with "TODO"; return +c_Frame; end Frame_B; overriding procedure Frame_A_is (Self : in out Hinge; Now : in Matrix_4x4) is c_Frame : aliased constant c_math_c.Matrix_4x4.item := +Now; pragma Unreferenced (c_Frame); begin raise Error with "TODO"; end Frame_A_is; overriding procedure Frame_B_is (Self : in out Hinge; Now : in Matrix_4x4) is c_Frame : aliased constant c_math_c.Matrix_4x4.item := +Now; pragma Unreferenced (c_Frame); begin raise Error with "TODO"; end Frame_B_is; overriding function is_Limited (Self : in Hinge; DoF : Degree_of_freedom) return Boolean is pragma unreferenced (Self); begin return DoF = 1; end is_Limited; overriding procedure Velocity_is (Self : in out Hinge; Now : in Real; DoF : in Degree_of_freedom) is begin raise Error with "TODO"; if DoF /= 1 then raise Error with "Illegal degree of freedom:" & Degree_of_freedom'Image (DoF); end if; end Velocity_is; overriding function Extent (Self : in Hinge; DoF : Degree_of_freedom) return Real is begin raise Error with "TODO"; if DoF /= 1 then raise Error with "Illegal degree of freedom:" & Degree_of_freedom'Image (DoF); end if; return 0.0; end Extent; overriding procedure desired_Extent_is (Self : in out Hinge; Now : in Real; DoF : in Degree_of_freedom) is begin raise Error with "TODO"; end desired_Extent_is; -------- --- Free -- procedure free (the_Joint : in out physics.Joint.view) is procedure deallocate is new ada.unchecked_Deallocation (physics.Joint.item'Class, physics.Joint.view); begin deallocate (the_Joint); end free; end box2d_Physics.Joint;
27.360161
106
0.606817
0e6280e046d490a51a964ca60a87a8dc33e77a5f
138,323
adb
Ada
matrixmultiplication.proj/baseline/.autopilot/db/matrixmul.bind.adb
schuang23/MSOC
cef110c1efe0ad8c1892d33505f7648de1fa2416
[ "Unlicense" ]
null
null
null
matrixmultiplication.proj/baseline/.autopilot/db/matrixmul.bind.adb
schuang23/MSOC
cef110c1efe0ad8c1892d33505f7648de1fa2416
[ "Unlicense" ]
null
null
null
matrixmultiplication.proj/baseline/.autopilot/db/matrixmul.bind.adb
schuang23/MSOC
cef110c1efe0ad8c1892d33505f7648de1fa2416
[ "Unlicense" ]
null
null
null
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <!DOCTYPE boost_serialization> <boost_serialization signature="serialization::archive" version="15"> <syndb class_id="0" tracking_level="0" version="0"> <userIPLatency>-1</userIPLatency> <userIPName></userIPName> <cdfg class_id="1" tracking_level="1" version="0" object_id="_0"> <name>matrixmul</name> <ret_bitwidth>0</ret_bitwidth> <ports class_id="2" tracking_level="0" version="0"> <count>3</count> <item_version>0</item_version> <item class_id="3" tracking_level="1" version="0" object_id="_1"> <Value class_id="4" tracking_level="0" version="0"> <Obj class_id="5" tracking_level="0" version="0"> <type>1</type> <id>1</id> <name>A</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo class_id="6" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>A</originalName> <rtlName></rtlName> <coreName>RAM_1P</coreName> </Obj> <bitwidth>32</bitwidth> </Value> <direction>0</direction> <if_type>1</if_type> <array_size>1024</array_size> <bit_vecs class_id="7" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> <item class_id_reference="3" object_id="_2"> <Value> <Obj> <type>1</type> <id>2</id> <name>B</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>B</originalName> <rtlName></rtlName> <coreName>RAM_1P</coreName> </Obj> <bitwidth>32</bitwidth> </Value> <direction>0</direction> <if_type>1</if_type> <array_size>1024</array_size> <bit_vecs> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> <item class_id_reference="3" object_id="_3"> <Value> <Obj> <type>1</type> <id>3</id> <name>AB</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>AB</originalName> <rtlName></rtlName> <coreName>RAM_1P</coreName> </Obj> <bitwidth>32</bitwidth> </Value> <direction>1</direction> <if_type>1</if_type> <array_size>1024</array_size> <bit_vecs> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> </ports> <nodes class_id="8" tracking_level="0" version="0"> <count>40</count> <item_version>0</item_version> <item class_id="9" tracking_level="1" version="0" object_id="_4"> <Value> <Obj> <type>0</type> <id>15</id> <name>_ln10</name> <fileName>matrixmultiplication.cpp</fileName> <fileDirectory>D:\msoc\pp4fpgas-master\examples</fileDirectory> <lineNumber>10</lineNumber> <contextFuncName>matrixmul</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item class_id="10" tracking_level="0" version="0"> <first>D:\msoc\pp4fpgas-master\examples</first> <second class_id="11" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="12" tracking_level="0" version="0"> <first class_id="13" tracking_level="0" version="0"> <first>matrixmultiplication.cpp</first> <second>matrixmul</second> </first> <second>10</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>75</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>1.76</m_delay> <m_topoIndex>1</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_5"> <Value> <Obj> <type>0</type> <id>17</id> <name>i_0</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>i</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>6</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>77</item> <item>78</item> <item>79</item> <item>80</item> </oprand_edges> <opcode>phi</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>2</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_6"> <Value> <Obj> <type>0</type> <id>18</id> <name>icmp_ln10</name> <fileName>matrixmultiplication.cpp</fileName> <fileDirectory>D:\msoc\pp4fpgas-master\examples</fileDirectory> <lineNumber>10</lineNumber> <contextFuncName>matrixmul</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>D:\msoc\pp4fpgas-master\examples</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>matrixmultiplication.cpp</first> <second>matrixmul</second> </first> <second>10</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>1</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>81</item> <item>83</item> </oprand_edges> <opcode>icmp</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>1.42</m_delay> <m_topoIndex>3</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_7"> <Value> <Obj> <type>0</type> <id>20</id> <name>i</name> <fileName>matrixmultiplication.cpp</fileName> <fileDirectory>D:\msoc\pp4fpgas-master\examples</fileDirectory> <lineNumber>10</lineNumber> <contextFuncName>matrixmul</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>D:\msoc\pp4fpgas-master\examples</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>matrixmultiplication.cpp</first> <second>matrixmul</second> </first> <second>10</second> </item> </second> </item> </inlineStackInfo> <originalName>i</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>6</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>84</item> <item>86</item> </oprand_edges> <opcode>add</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>1.82</m_delay> <m_topoIndex>4</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_8"> <Value> <Obj> <type>0</type> <id>21</id> <name>_ln10</name> <fileName>matrixmultiplication.cpp</fileName> <fileDirectory>D:\msoc\pp4fpgas-master\examples</fileDirectory> <lineNumber>10</lineNumber> <contextFuncName>matrixmul</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>D:\msoc\pp4fpgas-master\examples</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>matrixmultiplication.cpp</first> <second>matrixmul</second> </first> <second>10</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>87</item> <item>88</item> <item>89</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>5</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_9"> <Value> <Obj> <type>0</type> <id>25</id> <name>tmp_2</name> <fileName>matrixmultiplication.cpp</fileName> <fileDirectory>D:\msoc\pp4fpgas-master\examples</fileDirectory> <lineNumber>16</lineNumber> <contextFuncName>matrixmul</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>D:\msoc\pp4fpgas-master\examples</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>matrixmultiplication.cpp</first> <second>matrixmul</second> </first> <second>16</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>11</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>91</item> <item>92</item> <item>94</item> </oprand_edges> <opcode>bitconcatenate</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>6</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_10"> <Value> <Obj> <type>0</type> <id>26</id> <name>zext_ln11</name> <fileName>matrixmultiplication.cpp</fileName> <fileDirectory>D:\msoc\pp4fpgas-master\examples</fileDirectory> <lineNumber>11</lineNumber> <contextFuncName>matrixmul</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>D:\msoc\pp4fpgas-master\examples</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>matrixmultiplication.cpp</first> <second>matrixmul</second> </first> <second>11</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>12</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>95</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>7</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_11"> <Value> <Obj> <type>0</type> <id>27</id> <name>_ln11</name> <fileName>matrixmultiplication.cpp</fileName> <fileDirectory>D:\msoc\pp4fpgas-master\examples</fileDirectory> <lineNumber>11</lineNumber> <contextFuncName>matrixmul</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>D:\msoc\pp4fpgas-master\examples</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>matrixmultiplication.cpp</first> <second>matrixmul</second> </first> <second>11</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>96</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>1.76</m_delay> <m_topoIndex>8</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_12"> <Value> <Obj> <type>0</type> <id>29</id> <name>j_0</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>j</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>6</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>97</item> <item>98</item> <item>99</item> <item>100</item> </oprand_edges> <opcode>phi</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>10</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_13"> <Value> <Obj> <type>0</type> <id>30</id> <name>icmp_ln11</name> <fileName>matrixmultiplication.cpp</fileName> <fileDirectory>D:\msoc\pp4fpgas-master\examples</fileDirectory> <lineNumber>11</lineNumber> <contextFuncName>matrixmul</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>D:\msoc\pp4fpgas-master\examples</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>matrixmultiplication.cpp</first> <second>matrixmul</second> </first> <second>11</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>1</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>101</item> <item>102</item> </oprand_edges> <opcode>icmp</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>1.42</m_delay> <m_topoIndex>11</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_14"> <Value> <Obj> <type>0</type> <id>32</id> <name>j</name> <fileName>matrixmultiplication.cpp</fileName> <fileDirectory>D:\msoc\pp4fpgas-master\examples</fileDirectory> <lineNumber>11</lineNumber> <contextFuncName>matrixmul</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>D:\msoc\pp4fpgas-master\examples</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>matrixmultiplication.cpp</first> <second>matrixmul</second> </first> <second>11</second> </item> </second> </item> </inlineStackInfo> <originalName>j</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>6</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>103</item> <item>104</item> </oprand_edges> <opcode>add</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>1.82</m_delay> <m_topoIndex>12</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_15"> <Value> <Obj> <type>0</type> <id>33</id> <name>_ln11</name> <fileName>matrixmultiplication.cpp</fileName> <fileDirectory>D:\msoc\pp4fpgas-master\examples</fileDirectory> <lineNumber>11</lineNumber> <contextFuncName>matrixmul</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>D:\msoc\pp4fpgas-master\examples</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>matrixmultiplication.cpp</first> <second>matrixmul</second> </first> <second>11</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>105</item> <item>106</item> <item>107</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>13</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_16"> <Value> <Obj> <type>0</type> <id>37</id> <name>zext_ln18</name> <fileName>matrixmultiplication.cpp</fileName> <fileDirectory>D:\msoc\pp4fpgas-master\examples</fileDirectory> <lineNumber>18</lineNumber> <contextFuncName>matrixmul</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>D:\msoc\pp4fpgas-master\examples</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>matrixmultiplication.cpp</first> <second>matrixmul</second> </first> <second>18</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>12</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>108</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>14</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_17"> <Value> <Obj> <type>0</type> <id>38</id> <name>add_ln18</name> <fileName>matrixmultiplication.cpp</fileName> <fileDirectory>D:\msoc\pp4fpgas-master\examples</fileDirectory> <lineNumber>18</lineNumber> <contextFuncName>matrixmul</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>D:\msoc\pp4fpgas-master\examples</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>matrixmultiplication.cpp</first> <second>matrixmul</second> </first> <second>18</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>12</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>109</item> <item>110</item> </oprand_edges> <opcode>add</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>1.63</m_delay> <m_topoIndex>15</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_18"> <Value> <Obj> <type>0</type> <id>39</id> <name>zext_ln18_1</name> <fileName>matrixmultiplication.cpp</fileName> <fileDirectory>D:\msoc\pp4fpgas-master\examples</fileDirectory> <lineNumber>18</lineNumber> <contextFuncName>matrixmul</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>D:\msoc\pp4fpgas-master\examples</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>matrixmultiplication.cpp</first> <second>matrixmul</second> </first> <second>18</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>64</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>111</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>16</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_19"> <Value> <Obj> <type>0</type> <id>40</id> <name>AB_addr</name> <fileName>matrixmultiplication.cpp</fileName> <fileDirectory>D:\msoc\pp4fpgas-master\examples</fileDirectory> <lineNumber>18</lineNumber> <contextFuncName>matrixmul</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>D:\msoc\pp4fpgas-master\examples</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>matrixmultiplication.cpp</first> <second>matrixmul</second> </first> <second>18</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>10</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>112</item> <item>114</item> <item>115</item> </oprand_edges> <opcode>getelementptr</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>17</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_20"> <Value> <Obj> <type>0</type> <id>41</id> <name>_ln15</name> <fileName>matrixmultiplication.cpp</fileName> <fileDirectory>D:\msoc\pp4fpgas-master\examples</fileDirectory> <lineNumber>15</lineNumber> <contextFuncName>matrixmul</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>D:\msoc\pp4fpgas-master\examples</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>matrixmultiplication.cpp</first> <second>matrixmul</second> </first> <second>15</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>116</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>1.76</m_delay> <m_topoIndex>18</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_21"> <Value> <Obj> <type>0</type> <id>43</id> <name>ABij_0</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>ABij</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>118</item> <item>119</item> <item>120</item> <item>121</item> </oprand_edges> <opcode>phi</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>20</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_22"> <Value> <Obj> <type>0</type> <id>44</id> <name>k_0</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>k</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>6</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>122</item> <item>123</item> <item>124</item> <item>125</item> </oprand_edges> <opcode>phi</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>21</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_23"> <Value> <Obj> <type>0</type> <id>45</id> <name>icmp_ln15</name> <fileName>matrixmultiplication.cpp</fileName> <fileDirectory>D:\msoc\pp4fpgas-master\examples</fileDirectory> <lineNumber>15</lineNumber> <contextFuncName>matrixmul</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>D:\msoc\pp4fpgas-master\examples</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>matrixmultiplication.cpp</first> <second>matrixmul</second> </first> <second>15</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>1</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>126</item> <item>127</item> </oprand_edges> <opcode>icmp</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>1.42</m_delay> <m_topoIndex>22</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_24"> <Value> <Obj> <type>0</type> <id>47</id> <name>k</name> <fileName>matrixmultiplication.cpp</fileName> <fileDirectory>D:\msoc\pp4fpgas-master\examples</fileDirectory> <lineNumber>15</lineNumber> <contextFuncName>matrixmul</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>D:\msoc\pp4fpgas-master\examples</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>matrixmultiplication.cpp</first> <second>matrixmul</second> </first> <second>15</second> </item> </second> </item> </inlineStackInfo> <originalName>k</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>6</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>128</item> <item>129</item> </oprand_edges> <opcode>add</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>1.82</m_delay> <m_topoIndex>23</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_25"> <Value> <Obj> <type>0</type> <id>48</id> <name>_ln15</name> <fileName>matrixmultiplication.cpp</fileName> <fileDirectory>D:\msoc\pp4fpgas-master\examples</fileDirectory> <lineNumber>15</lineNumber> <contextFuncName>matrixmul</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>D:\msoc\pp4fpgas-master\examples</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>matrixmultiplication.cpp</first> <second>matrixmul</second> </first> <second>15</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>130</item> <item>131</item> <item>132</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>24</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_26"> <Value> <Obj> <type>0</type> <id>51</id> <name>zext_ln16</name> <fileName>matrixmultiplication.cpp</fileName> <fileDirectory>D:\msoc\pp4fpgas-master\examples</fileDirectory> <lineNumber>16</lineNumber> <contextFuncName>matrixmul</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>D:\msoc\pp4fpgas-master\examples</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>matrixmultiplication.cpp</first> <second>matrixmul</second> </first> <second>16</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>12</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>133</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>25</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_27"> <Value> <Obj> <type>0</type> <id>52</id> <name>add_ln16</name> <fileName>matrixmultiplication.cpp</fileName> <fileDirectory>D:\msoc\pp4fpgas-master\examples</fileDirectory> <lineNumber>16</lineNumber> <contextFuncName>matrixmul</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>D:\msoc\pp4fpgas-master\examples</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>matrixmultiplication.cpp</first> <second>matrixmul</second> </first> <second>16</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>12</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>134</item> <item>135</item> </oprand_edges> <opcode>add</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>1.63</m_delay> <m_topoIndex>26</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_28"> <Value> <Obj> <type>0</type> <id>53</id> <name>zext_ln16_1</name> <fileName>matrixmultiplication.cpp</fileName> <fileDirectory>D:\msoc\pp4fpgas-master\examples</fileDirectory> <lineNumber>16</lineNumber> <contextFuncName>matrixmul</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>D:\msoc\pp4fpgas-master\examples</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>matrixmultiplication.cpp</first> <second>matrixmul</second> </first> <second>16</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>64</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>136</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>27</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_29"> <Value> <Obj> <type>0</type> <id>54</id> <name>A_addr</name> <fileName>matrixmultiplication.cpp</fileName> <fileDirectory>D:\msoc\pp4fpgas-master\examples</fileDirectory> <lineNumber>16</lineNumber> <contextFuncName>matrixmul</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>D:\msoc\pp4fpgas-master\examples</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>matrixmultiplication.cpp</first> <second>matrixmul</second> </first> <second>16</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>10</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>137</item> <item>138</item> <item>139</item> </oprand_edges> <opcode>getelementptr</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>28</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_30"> <Value> <Obj> <type>0</type> <id>55</id> <name>tmp_3</name> <fileName>matrixmultiplication.cpp</fileName> <fileDirectory>D:\msoc\pp4fpgas-master\examples</fileDirectory> <lineNumber>16</lineNumber> <contextFuncName>matrixmul</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>D:\msoc\pp4fpgas-master\examples</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>matrixmultiplication.cpp</first> <second>matrixmul</second> </first> <second>16</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>11</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>140</item> <item>141</item> <item>142</item> </oprand_edges> <opcode>bitconcatenate</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>29</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_31"> <Value> <Obj> <type>0</type> <id>56</id> <name>zext_ln16_2</name> <fileName>matrixmultiplication.cpp</fileName> <fileDirectory>D:\msoc\pp4fpgas-master\examples</fileDirectory> <lineNumber>16</lineNumber> <contextFuncName>matrixmul</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>D:\msoc\pp4fpgas-master\examples</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>matrixmultiplication.cpp</first> <second>matrixmul</second> </first> <second>16</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>12</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>143</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>30</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_32"> <Value> <Obj> <type>0</type> <id>57</id> <name>add_ln16_1</name> <fileName>matrixmultiplication.cpp</fileName> <fileDirectory>D:\msoc\pp4fpgas-master\examples</fileDirectory> <lineNumber>16</lineNumber> <contextFuncName>matrixmul</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>D:\msoc\pp4fpgas-master\examples</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>matrixmultiplication.cpp</first> <second>matrixmul</second> </first> <second>16</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>12</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>144</item> <item>145</item> </oprand_edges> <opcode>add</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>1.63</m_delay> <m_topoIndex>31</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_33"> <Value> <Obj> <type>0</type> <id>58</id> <name>zext_ln16_3</name> <fileName>matrixmultiplication.cpp</fileName> <fileDirectory>D:\msoc\pp4fpgas-master\examples</fileDirectory> <lineNumber>16</lineNumber> <contextFuncName>matrixmul</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>D:\msoc\pp4fpgas-master\examples</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>matrixmultiplication.cpp</first> <second>matrixmul</second> </first> <second>16</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>64</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>146</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>32</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_34"> <Value> <Obj> <type>0</type> <id>59</id> <name>B_addr</name> <fileName>matrixmultiplication.cpp</fileName> <fileDirectory>D:\msoc\pp4fpgas-master\examples</fileDirectory> <lineNumber>16</lineNumber> <contextFuncName>matrixmul</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>D:\msoc\pp4fpgas-master\examples</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>matrixmultiplication.cpp</first> <second>matrixmul</second> </first> <second>16</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>10</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>147</item> <item>148</item> <item>149</item> </oprand_edges> <opcode>getelementptr</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>33</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_35"> <Value> <Obj> <type>0</type> <id>60</id> <name>A_load</name> <fileName>matrixmultiplication.cpp</fileName> <fileDirectory>D:\msoc\pp4fpgas-master\examples</fileDirectory> <lineNumber>16</lineNumber> <contextFuncName>matrixmul</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>D:\msoc\pp4fpgas-master\examples</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>matrixmultiplication.cpp</first> <second>matrixmul</second> </first> <second>16</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>150</item> </oprand_edges> <opcode>load</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>2.56</m_delay> <m_topoIndex>34</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_36"> <Value> <Obj> <type>0</type> <id>61</id> <name>B_load</name> <fileName>matrixmultiplication.cpp</fileName> <fileDirectory>D:\msoc\pp4fpgas-master\examples</fileDirectory> <lineNumber>16</lineNumber> <contextFuncName>matrixmul</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>D:\msoc\pp4fpgas-master\examples</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>matrixmultiplication.cpp</first> <second>matrixmul</second> </first> <second>16</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>151</item> </oprand_edges> <opcode>load</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>2.56</m_delay> <m_topoIndex>35</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_37"> <Value> <Obj> <type>0</type> <id>62</id> <name>mul_ln16</name> <fileName>matrixmultiplication.cpp</fileName> <fileDirectory>D:\msoc\pp4fpgas-master\examples</fileDirectory> <lineNumber>16</lineNumber> <contextFuncName>matrixmul</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>D:\msoc\pp4fpgas-master\examples</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>matrixmultiplication.cpp</first> <second>matrixmul</second> </first> <second>16</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>152</item> <item>153</item> </oprand_edges> <opcode>mul</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>3.95</m_delay> <m_topoIndex>38</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_38"> <Value> <Obj> <type>0</type> <id>63</id> <name>ABij</name> <fileName>matrixmultiplication.cpp</fileName> <fileDirectory>D:\msoc\pp4fpgas-master\examples</fileDirectory> <lineNumber>16</lineNumber> <contextFuncName>matrixmul</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>D:\msoc\pp4fpgas-master\examples</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>matrixmultiplication.cpp</first> <second>matrixmul</second> </first> <second>16</second> </item> </second> </item> </inlineStackInfo> <originalName>ABij</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>154</item> <item>155</item> </oprand_edges> <opcode>add</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>2.55</m_delay> <m_topoIndex>39</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_39"> <Value> <Obj> <type>0</type> <id>64</id> <name>_ln15</name> <fileName>matrixmultiplication.cpp</fileName> <fileDirectory>D:\msoc\pp4fpgas-master\examples</fileDirectory> <lineNumber>15</lineNumber> <contextFuncName>matrixmul</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>D:\msoc\pp4fpgas-master\examples</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>matrixmultiplication.cpp</first> <second>matrixmul</second> </first> <second>15</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>156</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>40</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_40"> <Value> <Obj> <type>0</type> <id>66</id> <name>AB_addr_write_ln18</name> <fileName>matrixmultiplication.cpp</fileName> <fileDirectory>D:\msoc\pp4fpgas-master\examples</fileDirectory> <lineNumber>18</lineNumber> <contextFuncName>matrixmul</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>D:\msoc\pp4fpgas-master\examples</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>matrixmultiplication.cpp</first> <second>matrixmul</second> </first> <second>18</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>157</item> <item>158</item> </oprand_edges> <opcode>store</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>2.56</m_delay> <m_topoIndex>36</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_41"> <Value> <Obj> <type>0</type> <id>68</id> <name>_ln11</name> <fileName>matrixmultiplication.cpp</fileName> <fileDirectory>D:\msoc\pp4fpgas-master\examples</fileDirectory> <lineNumber>11</lineNumber> <contextFuncName>matrixmul</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>D:\msoc\pp4fpgas-master\examples</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>matrixmultiplication.cpp</first> <second>matrixmul</second> </first> <second>11</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>159</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>37</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_42"> <Value> <Obj> <type>0</type> <id>71</id> <name>_ln10</name> <fileName>matrixmultiplication.cpp</fileName> <fileDirectory>D:\msoc\pp4fpgas-master\examples</fileDirectory> <lineNumber>10</lineNumber> <contextFuncName>matrixmul</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>D:\msoc\pp4fpgas-master\examples</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>matrixmultiplication.cpp</first> <second>matrixmul</second> </first> <second>10</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>160</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>19</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_43"> <Value> <Obj> <type>0</type> <id>73</id> <name>_ln21</name> <fileName>matrixmultiplication.cpp</fileName> <fileDirectory>D:\msoc\pp4fpgas-master\examples</fileDirectory> <lineNumber>21</lineNumber> <contextFuncName>matrixmul</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>D:\msoc\pp4fpgas-master\examples</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>matrixmultiplication.cpp</first> <second>matrixmul</second> </first> <second>21</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>0</count> <item_version>0</item_version> </oprand_edges> <opcode>ret</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>9</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> </nodes> <consts class_id="15" tracking_level="0" version="0"> <count>6</count> <item_version>0</item_version> <item class_id="16" tracking_level="1" version="0" object_id="_44"> <Value> <Obj> <type>2</type> <id>76</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>6</bitwidth> </Value> <const_type>0</const_type> <content>0</content> </item> <item class_id_reference="16" object_id="_45"> <Value> <Obj> <type>2</type> <id>82</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>6</bitwidth> </Value> <const_type>0</const_type> <content>32</content> </item> <item class_id_reference="16" object_id="_46"> <Value> <Obj> <type>2</type> <id>85</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>6</bitwidth> </Value> <const_type>0</const_type> <content>1</content> </item> <item class_id_reference="16" object_id="_47"> <Value> <Obj> <type>2</type> <id>93</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>5</bitwidth> </Value> <const_type>0</const_type> <content>0</content> </item> <item class_id_reference="16" object_id="_48"> <Value> <Obj> <type>2</type> <id>113</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>64</bitwidth> </Value> <const_type>0</const_type> <content>0</content> </item> <item class_id_reference="16" object_id="_49"> <Value> <Obj> <type>2</type> <id>117</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <const_type>0</const_type> <content>0</content> </item> </consts> <blocks class_id="17" tracking_level="0" version="0"> <count>10</count> <item_version>0</item_version> <item class_id="18" tracking_level="1" version="0" object_id="_50"> <Obj> <type>3</type> <id>16</id> <name></name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>1</count> <item_version>0</item_version> <item>15</item> </node_objs> </item> <item class_id_reference="18" object_id="_51"> <Obj> <type>3</type> <id>22</id> <name></name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>4</count> <item_version>0</item_version> <item>17</item> <item>18</item> <item>20</item> <item>21</item> </node_objs> </item> <item class_id_reference="18" object_id="_52"> <Obj> <type>3</type> <id>28</id> <name>row_begin</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>3</count> <item_version>0</item_version> <item>25</item> <item>26</item> <item>27</item> </node_objs> </item> <item class_id_reference="18" object_id="_53"> <Obj> <type>3</type> <id>34</id> <name></name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>4</count> <item_version>0</item_version> <item>29</item> <item>30</item> <item>32</item> <item>33</item> </node_objs> </item> <item class_id_reference="18" object_id="_54"> <Obj> <type>3</type> <id>42</id> <name>col_begin</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>5</count> <item_version>0</item_version> <item>37</item> <item>38</item> <item>39</item> <item>40</item> <item>41</item> </node_objs> </item> <item class_id_reference="18" object_id="_55"> <Obj> <type>3</type> <id>49</id> <name></name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>5</count> <item_version>0</item_version> <item>43</item> <item>44</item> <item>45</item> <item>47</item> <item>48</item> </node_objs> </item> <item class_id_reference="18" object_id="_56"> <Obj> <type>3</type> <id>65</id> <name></name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>14</count> <item_version>0</item_version> <item>51</item> <item>52</item> <item>53</item> <item>54</item> <item>55</item> <item>56</item> <item>57</item> <item>58</item> <item>59</item> <item>60</item> <item>61</item> <item>62</item> <item>63</item> <item>64</item> </node_objs> </item> <item class_id_reference="18" object_id="_57"> <Obj> <type>3</type> <id>69</id> <name>col_end</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>2</count> <item_version>0</item_version> <item>66</item> <item>68</item> </node_objs> </item> <item class_id_reference="18" object_id="_58"> <Obj> <type>3</type> <id>72</id> <name>row_end</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>1</count> <item_version>0</item_version> <item>71</item> </node_objs> </item> <item class_id_reference="18" object_id="_59"> <Obj> <type>3</type> <id>74</id> <name></name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>1</count> <item_version>0</item_version> <item>73</item> </node_objs> </item> </blocks> <edges class_id="19" tracking_level="0" version="0"> <count>89</count> <item_version>0</item_version> <item class_id="20" tracking_level="1" version="0" object_id="_60"> <id>75</id> <edge_type>2</edge_type> <source_obj>22</source_obj> <sink_obj>15</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_61"> <id>77</id> <edge_type>1</edge_type> <source_obj>76</source_obj> <sink_obj>17</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_62"> <id>78</id> <edge_type>2</edge_type> <source_obj>16</source_obj> <sink_obj>17</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_63"> <id>79</id> <edge_type>1</edge_type> <source_obj>20</source_obj> <sink_obj>17</sink_obj> <is_back_edge>1</is_back_edge> </item> <item class_id_reference="20" object_id="_64"> <id>80</id> <edge_type>2</edge_type> <source_obj>72</source_obj> <sink_obj>17</sink_obj> <is_back_edge>1</is_back_edge> </item> <item class_id_reference="20" object_id="_65"> <id>81</id> <edge_type>1</edge_type> <source_obj>17</source_obj> <sink_obj>18</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_66"> <id>83</id> <edge_type>1</edge_type> <source_obj>82</source_obj> <sink_obj>18</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_67"> <id>84</id> <edge_type>1</edge_type> <source_obj>17</source_obj> <sink_obj>20</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_68"> <id>86</id> <edge_type>1</edge_type> <source_obj>85</source_obj> <sink_obj>20</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_69"> <id>87</id> <edge_type>1</edge_type> <source_obj>18</source_obj> <sink_obj>21</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_70"> <id>88</id> <edge_type>2</edge_type> <source_obj>28</source_obj> <sink_obj>21</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_71"> <id>89</id> <edge_type>2</edge_type> <source_obj>74</source_obj> <sink_obj>21</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_72"> <id>92</id> <edge_type>1</edge_type> <source_obj>17</source_obj> <sink_obj>25</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_73"> <id>94</id> <edge_type>1</edge_type> <source_obj>93</source_obj> <sink_obj>25</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_74"> <id>95</id> <edge_type>1</edge_type> <source_obj>25</source_obj> <sink_obj>26</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_75"> <id>96</id> <edge_type>2</edge_type> <source_obj>34</source_obj> <sink_obj>27</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_76"> <id>97</id> <edge_type>1</edge_type> <source_obj>76</source_obj> <sink_obj>29</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_77"> <id>98</id> <edge_type>2</edge_type> <source_obj>28</source_obj> <sink_obj>29</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_78"> <id>99</id> <edge_type>1</edge_type> <source_obj>32</source_obj> <sink_obj>29</sink_obj> <is_back_edge>1</is_back_edge> </item> <item class_id_reference="20" object_id="_79"> <id>100</id> <edge_type>2</edge_type> <source_obj>69</source_obj> <sink_obj>29</sink_obj> <is_back_edge>1</is_back_edge> </item> <item class_id_reference="20" object_id="_80"> <id>101</id> <edge_type>1</edge_type> <source_obj>29</source_obj> <sink_obj>30</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_81"> <id>102</id> <edge_type>1</edge_type> <source_obj>82</source_obj> <sink_obj>30</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_82"> <id>103</id> <edge_type>1</edge_type> <source_obj>29</source_obj> <sink_obj>32</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_83"> <id>104</id> <edge_type>1</edge_type> <source_obj>85</source_obj> <sink_obj>32</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_84"> <id>105</id> <edge_type>1</edge_type> <source_obj>30</source_obj> <sink_obj>33</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_85"> <id>106</id> <edge_type>2</edge_type> <source_obj>42</source_obj> <sink_obj>33</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_86"> <id>107</id> <edge_type>2</edge_type> <source_obj>72</source_obj> <sink_obj>33</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_87"> <id>108</id> <edge_type>1</edge_type> <source_obj>29</source_obj> <sink_obj>37</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_88"> <id>109</id> <edge_type>1</edge_type> <source_obj>26</source_obj> <sink_obj>38</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_89"> <id>110</id> <edge_type>1</edge_type> <source_obj>37</source_obj> <sink_obj>38</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_90"> <id>111</id> <edge_type>1</edge_type> <source_obj>38</source_obj> <sink_obj>39</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_91"> <id>112</id> <edge_type>1</edge_type> <source_obj>3</source_obj> <sink_obj>40</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_92"> <id>114</id> <edge_type>1</edge_type> <source_obj>113</source_obj> <sink_obj>40</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_93"> <id>115</id> <edge_type>1</edge_type> <source_obj>39</source_obj> <sink_obj>40</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_94"> <id>116</id> <edge_type>2</edge_type> <source_obj>49</source_obj> <sink_obj>41</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_95"> <id>118</id> <edge_type>1</edge_type> <source_obj>117</source_obj> <sink_obj>43</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_96"> <id>119</id> <edge_type>2</edge_type> <source_obj>42</source_obj> <sink_obj>43</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_97"> <id>120</id> <edge_type>1</edge_type> <source_obj>63</source_obj> <sink_obj>43</sink_obj> <is_back_edge>1</is_back_edge> </item> <item class_id_reference="20" object_id="_98"> <id>121</id> <edge_type>2</edge_type> <source_obj>65</source_obj> <sink_obj>43</sink_obj> <is_back_edge>1</is_back_edge> </item> <item class_id_reference="20" object_id="_99"> <id>122</id> <edge_type>1</edge_type> <source_obj>76</source_obj> <sink_obj>44</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_100"> <id>123</id> <edge_type>2</edge_type> <source_obj>42</source_obj> <sink_obj>44</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_101"> <id>124</id> <edge_type>1</edge_type> <source_obj>47</source_obj> <sink_obj>44</sink_obj> <is_back_edge>1</is_back_edge> </item> <item class_id_reference="20" object_id="_102"> <id>125</id> <edge_type>2</edge_type> <source_obj>65</source_obj> <sink_obj>44</sink_obj> <is_back_edge>1</is_back_edge> </item> <item class_id_reference="20" object_id="_103"> <id>126</id> <edge_type>1</edge_type> <source_obj>44</source_obj> <sink_obj>45</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_104"> <id>127</id> <edge_type>1</edge_type> <source_obj>82</source_obj> <sink_obj>45</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_105"> <id>128</id> <edge_type>1</edge_type> <source_obj>44</source_obj> <sink_obj>47</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_106"> <id>129</id> <edge_type>1</edge_type> <source_obj>85</source_obj> <sink_obj>47</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_107"> <id>130</id> <edge_type>1</edge_type> <source_obj>45</source_obj> <sink_obj>48</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_108"> <id>131</id> <edge_type>2</edge_type> <source_obj>65</source_obj> <sink_obj>48</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_109"> <id>132</id> <edge_type>2</edge_type> <source_obj>69</source_obj> <sink_obj>48</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_110"> <id>133</id> <edge_type>1</edge_type> <source_obj>44</source_obj> <sink_obj>51</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_111"> <id>134</id> <edge_type>1</edge_type> <source_obj>51</source_obj> <sink_obj>52</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_112"> <id>135</id> <edge_type>1</edge_type> <source_obj>26</source_obj> <sink_obj>52</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_113"> <id>136</id> <edge_type>1</edge_type> <source_obj>52</source_obj> <sink_obj>53</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_114"> <id>137</id> <edge_type>1</edge_type> <source_obj>1</source_obj> <sink_obj>54</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_115"> <id>138</id> <edge_type>1</edge_type> <source_obj>113</source_obj> <sink_obj>54</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_116"> <id>139</id> <edge_type>1</edge_type> <source_obj>53</source_obj> <sink_obj>54</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_117"> <id>141</id> <edge_type>1</edge_type> <source_obj>44</source_obj> <sink_obj>55</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_118"> <id>142</id> <edge_type>1</edge_type> <source_obj>93</source_obj> <sink_obj>55</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_119"> <id>143</id> <edge_type>1</edge_type> <source_obj>55</source_obj> <sink_obj>56</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_120"> <id>144</id> <edge_type>1</edge_type> <source_obj>37</source_obj> <sink_obj>57</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_121"> <id>145</id> <edge_type>1</edge_type> <source_obj>56</source_obj> <sink_obj>57</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_122"> <id>146</id> <edge_type>1</edge_type> <source_obj>57</source_obj> <sink_obj>58</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_123"> <id>147</id> <edge_type>1</edge_type> <source_obj>2</source_obj> <sink_obj>59</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_124"> <id>148</id> <edge_type>1</edge_type> <source_obj>113</source_obj> <sink_obj>59</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_125"> <id>149</id> <edge_type>1</edge_type> <source_obj>58</source_obj> <sink_obj>59</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_126"> <id>150</id> <edge_type>1</edge_type> <source_obj>54</source_obj> <sink_obj>60</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_127"> <id>151</id> <edge_type>1</edge_type> <source_obj>59</source_obj> <sink_obj>61</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_128"> <id>152</id> <edge_type>1</edge_type> <source_obj>60</source_obj> <sink_obj>62</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_129"> <id>153</id> <edge_type>1</edge_type> <source_obj>61</source_obj> <sink_obj>62</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_130"> <id>154</id> <edge_type>1</edge_type> <source_obj>62</source_obj> <sink_obj>63</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_131"> <id>155</id> <edge_type>1</edge_type> <source_obj>43</source_obj> <sink_obj>63</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_132"> <id>156</id> <edge_type>2</edge_type> <source_obj>49</source_obj> <sink_obj>64</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_133"> <id>157</id> <edge_type>1</edge_type> <source_obj>43</source_obj> <sink_obj>66</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_134"> <id>158</id> <edge_type>1</edge_type> <source_obj>40</source_obj> <sink_obj>66</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_135"> <id>159</id> <edge_type>2</edge_type> <source_obj>34</source_obj> <sink_obj>68</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_136"> <id>160</id> <edge_type>2</edge_type> <source_obj>22</source_obj> <sink_obj>71</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_137"> <id>325</id> <edge_type>2</edge_type> <source_obj>16</source_obj> <sink_obj>22</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_138"> <id>326</id> <edge_type>2</edge_type> <source_obj>22</source_obj> <sink_obj>74</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_139"> <id>327</id> <edge_type>2</edge_type> <source_obj>22</source_obj> <sink_obj>28</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_140"> <id>328</id> <edge_type>2</edge_type> <source_obj>28</source_obj> <sink_obj>34</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_141"> <id>329</id> <edge_type>2</edge_type> <source_obj>34</source_obj> <sink_obj>72</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_142"> <id>330</id> <edge_type>2</edge_type> <source_obj>34</source_obj> <sink_obj>42</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_143"> <id>331</id> <edge_type>2</edge_type> <source_obj>42</source_obj> <sink_obj>49</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_144"> <id>332</id> <edge_type>2</edge_type> <source_obj>49</source_obj> <sink_obj>69</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_145"> <id>333</id> <edge_type>2</edge_type> <source_obj>49</source_obj> <sink_obj>65</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_146"> <id>334</id> <edge_type>2</edge_type> <source_obj>65</source_obj> <sink_obj>49</sink_obj> <is_back_edge>1</is_back_edge> </item> <item class_id_reference="20" object_id="_147"> <id>335</id> <edge_type>2</edge_type> <source_obj>69</source_obj> <sink_obj>34</sink_obj> <is_back_edge>1</is_back_edge> </item> <item class_id_reference="20" object_id="_148"> <id>336</id> <edge_type>2</edge_type> <source_obj>72</source_obj> <sink_obj>22</sink_obj> <is_back_edge>1</is_back_edge> </item> </edges> </cdfg> <cdfg_regions class_id="21" tracking_level="0" version="0"> <count>10</count> <item_version>0</item_version> <item class_id="22" tracking_level="1" version="0" object_id="_149"> <mId>1</mId> <mTag>matrixmul</mTag> <mType>0</mType> <sub_regions> <count>3</count> <item_version>0</item_version> <item>2</item> <item>3</item> <item>10</item> </sub_regions> <basic_blocks> <count>0</count> <item_version>0</item_version> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>-1</mMinTripCount> <mMaxTripCount>-1</mMaxTripCount> <mMinLatency>264257</mMinLatency> <mMaxLatency>264257</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> <item class_id_reference="22" object_id="_150"> <mId>2</mId> <mTag>Entry</mTag> <mType>0</mType> <sub_regions> <count>0</count> <item_version>0</item_version> </sub_regions> <basic_blocks> <count>1</count> <item_version>0</item_version> <item>16</item> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>-1</mMinTripCount> <mMaxTripCount>-1</mMaxTripCount> <mMinLatency>0</mMinLatency> <mMaxLatency>0</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> <item class_id_reference="22" object_id="_151"> <mId>3</mId> <mTag>row</mTag> <mType>1</mType> <sub_regions> <count>3</count> <item_version>0</item_version> <item>4</item> <item>5</item> <item>9</item> </sub_regions> <basic_blocks> <count>0</count> <item_version>0</item_version> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>32</mMinTripCount> <mMaxTripCount>32</mMaxTripCount> <mMinLatency>264256</mMinLatency> <mMaxLatency>264256</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> <item class_id_reference="22" object_id="_152"> <mId>4</mId> <mTag>Region 1</mTag> <mType>0</mType> <sub_regions> <count>0</count> <item_version>0</item_version> </sub_regions> <basic_blocks> <count>2</count> <item_version>0</item_version> <item>22</item> <item>28</item> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>-1</mMinTripCount> <mMaxTripCount>-1</mMaxTripCount> <mMinLatency>0</mMinLatency> <mMaxLatency>0</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> <item class_id_reference="22" object_id="_153"> <mId>5</mId> <mTag>col</mTag> <mType>1</mType> <sub_regions> <count>3</count> <item_version>0</item_version> <item>6</item> <item>7</item> <item>8</item> </sub_regions> <basic_blocks> <count>0</count> <item_version>0</item_version> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>32</mMinTripCount> <mMaxTripCount>32</mMaxTripCount> <mMinLatency>8256</mMinLatency> <mMaxLatency>8256</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> <item class_id_reference="22" object_id="_154"> <mId>6</mId> <mTag>Region 2</mTag> <mType>0</mType> <sub_regions> <count>0</count> <item_version>0</item_version> </sub_regions> <basic_blocks> <count>2</count> <item_version>0</item_version> <item>34</item> <item>42</item> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>-1</mMinTripCount> <mMaxTripCount>-1</mMaxTripCount> <mMinLatency>0</mMinLatency> <mMaxLatency>0</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> <item class_id_reference="22" object_id="_155"> <mId>7</mId> <mTag>product</mTag> <mType>1</mType> <sub_regions> <count>0</count> <item_version>0</item_version> </sub_regions> <basic_blocks> <count>2</count> <item_version>0</item_version> <item>49</item> <item>65</item> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>32</mMinTripCount> <mMaxTripCount>32</mMaxTripCount> <mMinLatency>256</mMinLatency> <mMaxLatency>256</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> <item class_id_reference="22" object_id="_156"> <mId>8</mId> <mTag>Region 3</mTag> <mType>0</mType> <sub_regions> <count>0</count> <item_version>0</item_version> </sub_regions> <basic_blocks> <count>1</count> <item_version>0</item_version> <item>69</item> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>-1</mMinTripCount> <mMaxTripCount>-1</mMaxTripCount> <mMinLatency>0</mMinLatency> <mMaxLatency>0</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> <item class_id_reference="22" object_id="_157"> <mId>9</mId> <mTag>Region 4</mTag> <mType>0</mType> <sub_regions> <count>0</count> <item_version>0</item_version> </sub_regions> <basic_blocks> <count>1</count> <item_version>0</item_version> <item>72</item> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>-1</mMinTripCount> <mMaxTripCount>-1</mMaxTripCount> <mMinLatency>0</mMinLatency> <mMaxLatency>0</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> <item class_id_reference="22" object_id="_158"> <mId>10</mId> <mTag>Return</mTag> <mType>0</mType> <sub_regions> <count>0</count> <item_version>0</item_version> </sub_regions> <basic_blocks> <count>1</count> <item_version>0</item_version> <item>74</item> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>-1</mMinTripCount> <mMaxTripCount>-1</mMaxTripCount> <mMinLatency>0</mMinLatency> <mMaxLatency>0</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> </cdfg_regions> <fsm class_id="24" tracking_level="1" version="0" object_id="_159"> <states class_id="25" tracking_level="0" version="0"> <count>11</count> <item_version>0</item_version> <item class_id="26" tracking_level="1" version="0" object_id="_160"> <id>1</id> <operations class_id="27" tracking_level="0" version="0"> <count>12</count> <item_version>0</item_version> <item class_id="28" tracking_level="1" version="0" object_id="_161"> <id>4</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_162"> <id>5</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_163"> <id>6</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_164"> <id>7</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_165"> <id>8</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_166"> <id>9</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_167"> <id>10</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_168"> <id>11</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_169"> <id>12</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_170"> <id>13</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_171"> <id>14</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_172"> <id>15</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_173"> <id>2</id> <operations> <count>11</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_174"> <id>17</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_175"> <id>18</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_176"> <id>19</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_177"> <id>20</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_178"> <id>21</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_179"> <id>23</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_180"> <id>24</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_181"> <id>25</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_182"> <id>26</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_183"> <id>27</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_184"> <id>73</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_185"> <id>3</id> <operations> <count>14</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_186"> <id>29</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_187"> <id>30</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_188"> <id>31</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_189"> <id>32</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_190"> <id>33</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_191"> <id>35</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_192"> <id>36</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_193"> <id>37</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_194"> <id>38</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_195"> <id>39</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_196"> <id>40</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_197"> <id>41</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_198"> <id>70</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_199"> <id>71</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_200"> <id>4</id> <operations> <count>20</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_201"> <id>43</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_202"> <id>44</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_203"> <id>45</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_204"> <id>46</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_205"> <id>47</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_206"> <id>48</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_207"> <id>51</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_208"> <id>52</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_209"> <id>53</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_210"> <id>54</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_211"> <id>55</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_212"> <id>56</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_213"> <id>57</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_214"> <id>58</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_215"> <id>59</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_216"> <id>60</id> <stage>2</stage> <latency>2</latency> </item> <item class_id_reference="28" object_id="_217"> <id>61</id> <stage>2</stage> <latency>2</latency> </item> <item class_id_reference="28" object_id="_218"> <id>66</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_219"> <id>67</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_220"> <id>68</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_221"> <id>5</id> <operations> <count>2</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_222"> <id>60</id> <stage>1</stage> <latency>2</latency> </item> <item class_id_reference="28" object_id="_223"> <id>61</id> <stage>1</stage> <latency>2</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_224"> <id>6</id> <operations> <count>1</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_225"> <id>62</id> <stage>5</stage> <latency>5</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_226"> <id>7</id> <operations> <count>1</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_227"> <id>62</id> <stage>4</stage> <latency>5</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_228"> <id>8</id> <operations> <count>1</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_229"> <id>62</id> <stage>3</stage> <latency>5</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_230"> <id>9</id> <operations> <count>1</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_231"> <id>62</id> <stage>2</stage> <latency>5</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_232"> <id>10</id> <operations> <count>1</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_233"> <id>62</id> <stage>1</stage> <latency>5</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_234"> <id>11</id> <operations> <count>3</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_235"> <id>50</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_236"> <id>63</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_237"> <id>64</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> </states> <transitions class_id="29" tracking_level="0" version="0"> <count>13</count> <item_version>0</item_version> <item class_id="30" tracking_level="1" version="0" object_id="_238"> <inState>1</inState> <outState>2</outState> <condition class_id="31" tracking_level="0" version="0"> <id>-1</id> <sop class_id="32" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="33" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_239"> <inState>2</inState> <outState>3</outState> <condition> <id>-1</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>1</count> <item_version>0</item_version> <item class_id="34" tracking_level="0" version="0"> <first class_id="35" tracking_level="0" version="0"> <first>18</first> <second>0</second> </first> <second>1</second> </item> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_240"> <inState>3</inState> <outState>4</outState> <condition> <id>-1</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>1</count> <item_version>0</item_version> <item> <first> <first>30</first> <second>0</second> </first> <second>1</second> </item> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_241"> <inState>4</inState> <outState>5</outState> <condition> <id>-1</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>1</count> <item_version>0</item_version> <item> <first> <first>45</first> <second>0</second> </first> <second>1</second> </item> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_242"> <inState>5</inState> <outState>6</outState> <condition> <id>-1</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_243"> <inState>6</inState> <outState>7</outState> <condition> <id>-1</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_244"> <inState>7</inState> <outState>8</outState> <condition> <id>-1</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_245"> <inState>8</inState> <outState>9</outState> <condition> <id>-1</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_246"> <inState>9</inState> <outState>10</outState> <condition> <id>-1</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_247"> <inState>10</inState> <outState>11</outState> <condition> <id>-1</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_248"> <inState>11</inState> <outState>4</outState> <condition> <id>-1</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_249"> <inState>4</inState> <outState>3</outState> <condition> <id>-1</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>1</count> <item_version>0</item_version> <item> <first> <first>45</first> <second>0</second> </first> <second>0</second> </item> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_250"> <inState>3</inState> <outState>2</outState> <condition> <id>-1</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>1</count> <item_version>0</item_version> <item> <first> <first>30</first> <second>0</second> </first> <second>0</second> </item> </item> </sop> </condition> </item> </transitions> </fsm> <res class_id="-1"></res> <node_label_latency class_id="37" tracking_level="0" version="0"> <count>40</count> <item_version>0</item_version> <item class_id="38" tracking_level="0" version="0"> <first>15</first> <second class_id="39" tracking_level="0" version="0"> <first>0</first> <second>0</second> </second> </item> <item> <first>17</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>18</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>20</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>21</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>25</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>26</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>27</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>29</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>30</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>32</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>33</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>37</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>38</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>39</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>40</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>41</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>43</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>44</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>45</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>47</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>48</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>51</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>52</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>53</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>54</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>55</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>56</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>57</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>58</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>59</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>60</first> <second> <first>3</first> <second>1</second> </second> </item> <item> <first>61</first> <second> <first>3</first> <second>1</second> </second> </item> <item> <first>62</first> <second> <first>5</first> <second>4</second> </second> </item> <item> <first>63</first> <second> <first>10</first> <second>0</second> </second> </item> <item> <first>64</first> <second> <first>10</first> <second>0</second> </second> </item> <item> <first>66</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>68</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>71</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>73</first> <second> <first>1</first> <second>0</second> </second> </item> </node_label_latency> <bblk_ent_exit class_id="40" tracking_level="0" version="0"> <count>10</count> <item_version>0</item_version> <item class_id="41" tracking_level="0" version="0"> <first>16</first> <second class_id="42" tracking_level="0" version="0"> <first>0</first> <second>0</second> </second> </item> <item> <first>22</first> <second> <first>1</first> <second>1</second> </second> </item> <item> <first>28</first> <second> <first>1</first> <second>1</second> </second> </item> <item> <first>34</first> <second> <first>2</first> <second>2</second> </second> </item> <item> <first>42</first> <second> <first>2</first> <second>2</second> </second> </item> <item> <first>49</first> <second> <first>3</first> <second>3</second> </second> </item> <item> <first>65</first> <second> <first>3</first> <second>10</second> </second> </item> <item> <first>69</first> <second> <first>3</first> <second>3</second> </second> </item> <item> <first>72</first> <second> <first>2</first> <second>2</second> </second> </item> <item> <first>74</first> <second> <first>1</first> <second>1</second> </second> </item> </bblk_ent_exit> <regions class_id="43" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </regions> <dp_fu_nodes class_id="44" tracking_level="0" version="0"> <count>30</count> <item_version>0</item_version> <item class_id="45" tracking_level="0" version="0"> <first>60</first> <second> <count>1</count> <item_version>0</item_version> <item>40</item> </second> </item> <item> <first>67</first> <second> <count>1</count> <item_version>0</item_version> <item>54</item> </second> </item> <item> <first>74</first> <second> <count>1</count> <item_version>0</item_version> <item>59</item> </second> </item> <item> <first>81</first> <second> <count>2</count> <item_version>0</item_version> <item>60</item> <item>60</item> </second> </item> <item> <first>87</first> <second> <count>2</count> <item_version>0</item_version> <item>61</item> <item>61</item> </second> </item> <item> <first>93</first> <second> <count>1</count> <item_version>0</item_version> <item>66</item> </second> </item> <item> <first>102</first> <second> <count>1</count> <item_version>0</item_version> <item>17</item> </second> </item> <item> <first>113</first> <second> <count>1</count> <item_version>0</item_version> <item>29</item> </second> </item> <item> <first>124</first> <second> <count>1</count> <item_version>0</item_version> <item>43</item> </second> </item> <item> <first>137</first> <second> <count>1</count> <item_version>0</item_version> <item>44</item> </second> </item> <item> <first>144</first> <second> <count>1</count> <item_version>0</item_version> <item>18</item> </second> </item> <item> <first>150</first> <second> <count>1</count> <item_version>0</item_version> <item>20</item> </second> </item> <item> <first>156</first> <second> <count>1</count> <item_version>0</item_version> <item>25</item> </second> </item> <item> <first>164</first> <second> <count>1</count> <item_version>0</item_version> <item>26</item> </second> </item> <item> <first>168</first> <second> <count>1</count> <item_version>0</item_version> <item>30</item> </second> </item> <item> <first>174</first> <second> <count>1</count> <item_version>0</item_version> <item>32</item> </second> </item> <item> <first>180</first> <second> <count>1</count> <item_version>0</item_version> <item>37</item> </second> </item> <item> <first>184</first> <second> <count>1</count> <item_version>0</item_version> <item>38</item> </second> </item> <item> <first>189</first> <second> <count>1</count> <item_version>0</item_version> <item>39</item> </second> </item> <item> <first>194</first> <second> <count>1</count> <item_version>0</item_version> <item>45</item> </second> </item> <item> <first>200</first> <second> <count>1</count> <item_version>0</item_version> <item>47</item> </second> </item> <item> <first>206</first> <second> <count>1</count> <item_version>0</item_version> <item>51</item> </second> </item> <item> <first>210</first> <second> <count>1</count> <item_version>0</item_version> <item>52</item> </second> </item> <item> <first>215</first> <second> <count>1</count> <item_version>0</item_version> <item>53</item> </second> </item> <item> <first>220</first> <second> <count>1</count> <item_version>0</item_version> <item>55</item> </second> </item> <item> <first>228</first> <second> <count>1</count> <item_version>0</item_version> <item>56</item> </second> </item> <item> <first>232</first> <second> <count>1</count> <item_version>0</item_version> <item>57</item> </second> </item> <item> <first>237</first> <second> <count>1</count> <item_version>0</item_version> <item>58</item> </second> </item> <item> <first>242</first> <second> <count>5</count> <item_version>0</item_version> <item>62</item> <item>62</item> <item>62</item> <item>62</item> <item>62</item> </second> </item> <item> <first>246</first> <second> <count>1</count> <item_version>0</item_version> <item>63</item> </second> </item> </dp_fu_nodes> <dp_fu_nodes_expression class_id="47" tracking_level="0" version="0"> <count>26</count> <item_version>0</item_version> <item class_id="48" tracking_level="0" version="0"> <first>AB_addr_gep_fu_60</first> <second> <count>1</count> <item_version>0</item_version> <item>40</item> </second> </item> <item> <first>ABij_0_phi_fu_124</first> <second> <count>1</count> <item_version>0</item_version> <item>43</item> </second> </item> <item> <first>ABij_fu_246</first> <second> <count>1</count> <item_version>0</item_version> <item>63</item> </second> </item> <item> <first>A_addr_gep_fu_67</first> <second> <count>1</count> <item_version>0</item_version> <item>54</item> </second> </item> <item> <first>B_addr_gep_fu_74</first> <second> <count>1</count> <item_version>0</item_version> <item>59</item> </second> </item> <item> <first>add_ln16_1_fu_232</first> <second> <count>1</count> <item_version>0</item_version> <item>57</item> </second> </item> <item> <first>add_ln16_fu_210</first> <second> <count>1</count> <item_version>0</item_version> <item>52</item> </second> </item> <item> <first>add_ln18_fu_184</first> <second> <count>1</count> <item_version>0</item_version> <item>38</item> </second> </item> <item> <first>i_0_phi_fu_102</first> <second> <count>1</count> <item_version>0</item_version> <item>17</item> </second> </item> <item> <first>i_fu_150</first> <second> <count>1</count> <item_version>0</item_version> <item>20</item> </second> </item> <item> <first>icmp_ln10_fu_144</first> <second> <count>1</count> <item_version>0</item_version> <item>18</item> </second> </item> <item> <first>icmp_ln11_fu_168</first> <second> <count>1</count> <item_version>0</item_version> <item>30</item> </second> </item> <item> <first>icmp_ln15_fu_194</first> <second> <count>1</count> <item_version>0</item_version> <item>45</item> </second> </item> <item> <first>j_0_phi_fu_113</first> <second> <count>1</count> <item_version>0</item_version> <item>29</item> </second> </item> <item> <first>j_fu_174</first> <second> <count>1</count> <item_version>0</item_version> <item>32</item> </second> </item> <item> <first>k_0_phi_fu_137</first> <second> <count>1</count> <item_version>0</item_version> <item>44</item> </second> </item> <item> <first>k_fu_200</first> <second> <count>1</count> <item_version>0</item_version> <item>47</item> </second> </item> <item> <first>tmp_2_fu_156</first> <second> <count>1</count> <item_version>0</item_version> <item>25</item> </second> </item> <item> <first>tmp_3_fu_220</first> <second> <count>1</count> <item_version>0</item_version> <item>55</item> </second> </item> <item> <first>zext_ln11_fu_164</first> <second> <count>1</count> <item_version>0</item_version> <item>26</item> </second> </item> <item> <first>zext_ln16_1_fu_215</first> <second> <count>1</count> <item_version>0</item_version> <item>53</item> </second> </item> <item> <first>zext_ln16_2_fu_228</first> <second> <count>1</count> <item_version>0</item_version> <item>56</item> </second> </item> <item> <first>zext_ln16_3_fu_237</first> <second> <count>1</count> <item_version>0</item_version> <item>58</item> </second> </item> <item> <first>zext_ln16_fu_206</first> <second> <count>1</count> <item_version>0</item_version> <item>51</item> </second> </item> <item> <first>zext_ln18_1_fu_189</first> <second> <count>1</count> <item_version>0</item_version> <item>39</item> </second> </item> <item> <first>zext_ln18_fu_180</first> <second> <count>1</count> <item_version>0</item_version> <item>37</item> </second> </item> </dp_fu_nodes_expression> <dp_fu_nodes_module> <count>1</count> <item_version>0</item_version> <item> <first>grp_fu_242</first> <second> <count>5</count> <item_version>0</item_version> <item>62</item> <item>62</item> <item>62</item> <item>62</item> <item>62</item> </second> </item> </dp_fu_nodes_module> <dp_fu_nodes_io> <count>0</count> <item_version>0</item_version> </dp_fu_nodes_io> <return_ports> <count>0</count> <item_version>0</item_version> </return_ports> <dp_mem_port_nodes class_id="49" tracking_level="0" version="0"> <count>3</count> <item_version>0</item_version> <item class_id="50" tracking_level="0" version="0"> <first class_id="51" tracking_level="0" version="0"> <first>A</first> <second>0</second> </first> <second> <count>2</count> <item_version>0</item_version> <item>60</item> <item>60</item> </second> </item> <item> <first> <first>AB</first> <second>0</second> </first> <second> <count>1</count> <item_version>0</item_version> <item>66</item> </second> </item> <item> <first> <first>B</first> <second>0</second> </first> <second> <count>2</count> <item_version>0</item_version> <item>61</item> <item>61</item> </second> </item> </dp_mem_port_nodes> <dp_reg_nodes> <count>16</count> <item_version>0</item_version> <item> <first>98</first> <second> <count>1</count> <item_version>0</item_version> <item>17</item> </second> </item> <item> <first>109</first> <second> <count>1</count> <item_version>0</item_version> <item>29</item> </second> </item> <item> <first>120</first> <second> <count>1</count> <item_version>0</item_version> <item>43</item> </second> </item> <item> <first>133</first> <second> <count>1</count> <item_version>0</item_version> <item>44</item> </second> </item> <item> <first>254</first> <second> <count>1</count> <item_version>0</item_version> <item>20</item> </second> </item> <item> <first>259</first> <second> <count>1</count> <item_version>0</item_version> <item>26</item> </second> </item> <item> <first>268</first> <second> <count>1</count> <item_version>0</item_version> <item>32</item> </second> </item> <item> <first>273</first> <second> <count>1</count> <item_version>0</item_version> <item>37</item> </second> </item> <item> <first>278</first> <second> <count>1</count> <item_version>0</item_version> <item>40</item> </second> </item> <item> <first>286</first> <second> <count>1</count> <item_version>0</item_version> <item>47</item> </second> </item> <item> <first>291</first> <second> <count>1</count> <item_version>0</item_version> <item>54</item> </second> </item> <item> <first>296</first> <second> <count>1</count> <item_version>0</item_version> <item>59</item> </second> </item> <item> <first>301</first> <second> <count>1</count> <item_version>0</item_version> <item>60</item> </second> </item> <item> <first>306</first> <second> <count>1</count> <item_version>0</item_version> <item>61</item> </second> </item> <item> <first>311</first> <second> <count>1</count> <item_version>0</item_version> <item>62</item> </second> </item> <item> <first>316</first> <second> <count>1</count> <item_version>0</item_version> <item>63</item> </second> </item> </dp_reg_nodes> <dp_regname_nodes> <count>16</count> <item_version>0</item_version> <item> <first>AB_addr_reg_278</first> <second> <count>1</count> <item_version>0</item_version> <item>40</item> </second> </item> <item> <first>ABij_0_reg_120</first> <second> <count>1</count> <item_version>0</item_version> <item>43</item> </second> </item> <item> <first>ABij_reg_316</first> <second> <count>1</count> <item_version>0</item_version> <item>63</item> </second> </item> <item> <first>A_addr_reg_291</first> <second> <count>1</count> <item_version>0</item_version> <item>54</item> </second> </item> <item> <first>A_load_reg_301</first> <second> <count>1</count> <item_version>0</item_version> <item>60</item> </second> </item> <item> <first>B_addr_reg_296</first> <second> <count>1</count> <item_version>0</item_version> <item>59</item> </second> </item> <item> <first>B_load_reg_306</first> <second> <count>1</count> <item_version>0</item_version> <item>61</item> </second> </item> <item> <first>i_0_reg_98</first> <second> <count>1</count> <item_version>0</item_version> <item>17</item> </second> </item> <item> <first>i_reg_254</first> <second> <count>1</count> <item_version>0</item_version> <item>20</item> </second> </item> <item> <first>j_0_reg_109</first> <second> <count>1</count> <item_version>0</item_version> <item>29</item> </second> </item> <item> <first>j_reg_268</first> <second> <count>1</count> <item_version>0</item_version> <item>32</item> </second> </item> <item> <first>k_0_reg_133</first> <second> <count>1</count> <item_version>0</item_version> <item>44</item> </second> </item> <item> <first>k_reg_286</first> <second> <count>1</count> <item_version>0</item_version> <item>47</item> </second> </item> <item> <first>mul_ln16_reg_311</first> <second> <count>1</count> <item_version>0</item_version> <item>62</item> </second> </item> <item> <first>zext_ln11_reg_259</first> <second> <count>1</count> <item_version>0</item_version> <item>26</item> </second> </item> <item> <first>zext_ln18_reg_273</first> <second> <count>1</count> <item_version>0</item_version> <item>37</item> </second> </item> </dp_regname_nodes> <dp_reg_phi> <count>4</count> <item_version>0</item_version> <item> <first>98</first> <second> <count>1</count> <item_version>0</item_version> <item>17</item> </second> </item> <item> <first>109</first> <second> <count>1</count> <item_version>0</item_version> <item>29</item> </second> </item> <item> <first>120</first> <second> <count>1</count> <item_version>0</item_version> <item>43</item> </second> </item> <item> <first>133</first> <second> <count>1</count> <item_version>0</item_version> <item>44</item> </second> </item> </dp_reg_phi> <dp_regname_phi> <count>4</count> <item_version>0</item_version> <item> <first>ABij_0_reg_120</first> <second> <count>1</count> <item_version>0</item_version> <item>43</item> </second> </item> <item> <first>i_0_reg_98</first> <second> <count>1</count> <item_version>0</item_version> <item>17</item> </second> </item> <item> <first>j_0_reg_109</first> <second> <count>1</count> <item_version>0</item_version> <item>29</item> </second> </item> <item> <first>k_0_reg_133</first> <second> <count>1</count> <item_version>0</item_version> <item>44</item> </second> </item> </dp_regname_phi> <dp_port_io_nodes class_id="52" tracking_level="0" version="0"> <count>3</count> <item_version>0</item_version> <item class_id="53" tracking_level="0" version="0"> <first>A(p0)</first> <second> <count>1</count> <item_version>0</item_version> <item> <first>load</first> <second> <count>2</count> <item_version>0</item_version> <item>60</item> <item>60</item> </second> </item> </second> </item> <item> <first>AB(p0)</first> <second> <count>1</count> <item_version>0</item_version> <item> <first>store</first> <second> <count>1</count> <item_version>0</item_version> <item>66</item> </second> </item> </second> </item> <item> <first>B(p0)</first> <second> <count>1</count> <item_version>0</item_version> <item> <first>load</first> <second> <count>2</count> <item_version>0</item_version> <item>61</item> <item>61</item> </second> </item> </second> </item> </dp_port_io_nodes> <port2core class_id="54" tracking_level="0" version="0"> <count>3</count> <item_version>0</item_version> <item class_id="55" tracking_level="0" version="0"> <first>1</first> <second>RAM_1P</second> </item> <item> <first>2</first> <second>RAM_1P</second> </item> <item> <first>3</first> <second>RAM_1P</second> </item> </port2core> <node2core> <count>0</count> <item_version>0</item_version> </node2core> </syndb> </boost_serialization>
26.48851
74
0.573115
39e9b9e9f704aadf52df8d4ce1263300a33af11c
1,271
ads
Ada
.emacs.d/elpa/wisi-3.1.3/sal-ada_containers-gen_doubly_linked_lists_image.ads
caqg/linux-home
eed631aae6f5e59e4f46e14f1dff443abca5fa28
[ "Linux-OpenIB" ]
null
null
null
.emacs.d/elpa/wisi-3.1.3/sal-ada_containers-gen_doubly_linked_lists_image.ads
caqg/linux-home
eed631aae6f5e59e4f46e14f1dff443abca5fa28
[ "Linux-OpenIB" ]
null
null
null
.emacs.d/elpa/wisi-3.1.3/sal-ada_containers-gen_doubly_linked_lists_image.ads
caqg/linux-home
eed631aae6f5e59e4f46e14f1dff443abca5fa28
[ "Linux-OpenIB" ]
null
null
null
-- Abstract : -- -- Image for normal Ada array types -- -- Copyright (C) 2019 Free Software Foundation, Inc. -- -- This library is free software; you can redistribute it and/or modify it -- under terms of the GNU General Public License as published by the Free -- Software Foundation; either version 3, or (at your option) any later -- version. This library is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- -- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. -- As a special exception under Section 7 of GPL version 3, you are granted -- additional permissions described in the GCC Runtime Library Exception, -- version 3.1, as published by the Free Software Foundation. pragma License (Modified_GPL); with Ada.Containers.Doubly_Linked_Lists; generic type Element_Type is private; with function "=" (Left, Right : Element_Type) return Boolean is <>; with package Lists is new Ada.Containers.Doubly_Linked_Lists (Element_Type, "="); with function Element_Image (Item : in Element_Type) return String; function SAL.Ada_Containers.Gen_Doubly_Linked_Lists_Image (Item : in Lists.List; Strict : in Boolean := False) return String;
43.827586
85
0.729347
1c823aee18d1ef6033722313c8a762c609c189e8
1,341
ads
Ada
source/runtime/pb_support-ieee_float_32_vectors.ads
mgrojo/protobuf
ffc50782c0c5bbb60e8f1504fcfc5a5fbafdb7dd
[ "MIT" ]
12
2020-05-04T09:30:21.000Z
2022-02-08T21:47:32.000Z
source/runtime/pb_support-ieee_float_32_vectors.ads
mgrojo/protobuf
ffc50782c0c5bbb60e8f1504fcfc5a5fbafdb7dd
[ "MIT" ]
6
2021-03-16T15:17:33.000Z
2022-03-31T21:32:47.000Z
source/runtime/pb_support-ieee_float_32_vectors.ads
mgrojo/protobuf
ffc50782c0c5bbb60e8f1504fcfc5a5fbafdb7dd
[ "MIT" ]
1
2021-03-16T15:09:27.000Z
2021-03-16T15:09:27.000Z
-- MIT License -- -- Copyright (c) 2020 Max Reznik -- -- Permission is hereby granted, free of charge, to any person obtaining a -- copy of this software and associated documentation files (the "Software"), -- to deal in the Software without restriction, including without limitation -- the rights to use, copy, modify, merge, publish, distribute, sublicense, -- and/or sell copies of the Software, and to permit persons to whom the -- Software is furnished to do so, subject to the following conditions: -- -- The above copyright notice and this permission notice shall be included in -- all copies or substantial portions of the Software. -- -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -- THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -- DEALINGS IN THE SOFTWARE. with Interfaces; with PB_Support.Vectors; package PB_Support.IEEE_Float_32_Vectors is new PB_Support.Vectors (Interfaces.IEEE_Float_32); pragma Preelaborate (PB_Support.IEEE_Float_32_Vectors);
44.7
78
0.765101
20b196f60bd9c314e290137bb099ff040ed5e6d6
9,923
adb
Ada
tests/src/test_scene_trees.adb
onox/orka
9edf99559a16ffa96dfdb208322f4d18efbcbac6
[ "Apache-2.0" ]
52
2016-07-30T23:00:28.000Z
2022-02-05T11:54:55.000Z
tests/src/test_scene_trees.adb
onox/orka
9edf99559a16ffa96dfdb208322f4d18efbcbac6
[ "Apache-2.0" ]
79
2016-08-01T18:36:48.000Z
2022-02-27T12:14:20.000Z
tests/src/test_scene_trees.adb
onox/orka
9edf99559a16ffa96dfdb208322f4d18efbcbac6
[ "Apache-2.0" ]
4
2018-04-28T22:36:26.000Z
2020-11-14T23:00:29.000Z
-- SPDX-License-Identifier: Apache-2.0 -- -- Copyright (c) 2016 onox <[email protected]> -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. with AUnit.Assertions; with AUnit.Test_Caller; with Orka.Scenes.Singles.Trees; with Orka.Transforms.Singles.Matrices; package body Test_Scene_Trees is use Orka.Scenes.Singles.Trees; use AUnit.Assertions; package Caller is new AUnit.Test_Caller (Test); Test_Suite : aliased AUnit.Test_Suites.Test_Suite; function Suite return AUnit.Test_Suites.Access_Test_Suite is Name : constant String := "(Scene trees) "; begin Test_Suite.Add_Test (Caller.Create (Name & "Test Create_Tree function", Test_Create_Tree'Access)); Test_Suite.Add_Test (Caller.Create (Name & "Test Add_Node procedure (leaf node)", Test_Add_Leaf_Node'Access)); Test_Suite.Add_Test (Caller.Create (Name & "Test Add_Node procedure (non-leaf node)", Test_Add_Non_Leaf_Node'Access)); Test_Suite.Add_Test (Caller.Create (Name & "Test To_Cursor function (root node)", Test_To_Cursor_Root_Node'Access)); Test_Suite.Add_Test (Caller.Create (Name & "Test To_Cursor function (leaf node)", Test_To_Cursor_Leaf_Node'Access)); Test_Suite.Add_Test (Caller.Create (Name & "Test To_Cursor function (non-leaf node)", Test_To_Cursor_Non_Leaf_Node'Access)); Test_Suite.Add_Test (Caller.Create (Name & "Raise Unknown_Node_Error in To_Cursor", Test_To_Cursor_Exception'Access)); Test_Suite.Add_Test (Caller.Create (Name & "Test Remove_Node procedure (leaf node)", Test_Remove_Leaf_Node'Access)); Test_Suite.Add_Test (Caller.Create (Name & "Test Remove_Node procedure (subtree)", Test_Remove_Subtree'Access)); Test_Suite.Add_Test (Caller.Create (Name & "Raise Root_Removal_Error in Remove_Node", Test_Remove_Root_Exception'Access)); Test_Suite.Add_Test (Caller.Create (Name & "Test Set_Local_Transform procedure", Test_Set_Local_Transform'Access)); Test_Suite.Add_Test (Caller.Create (Name & "Test Update_Tree procedure", Test_Update_Tree'Access)); Test_Suite.Add_Test (Caller.Create (Name & "Test World_Transform function", Test_World_Transform'Access)); Test_Suite.Add_Test (Caller.Create (Name & "Test Depth function", Test_Depth'Access)); Test_Suite.Add_Test (Caller.Create (Name & "Test Width function", Test_Width'Access)); Test_Suite.Add_Test (Caller.Create (Name & "Test Visibility function", Test_Visibility'Access)); return Test_Suite'Access; end Suite; procedure Test_Create_Tree (Object : in out Test) is T : constant Tree := Create_Tree ("root"); pragma Unreferenced (T); begin null; end Test_Create_Tree; procedure Test_Add_Leaf_Node (Object : in out Test) is T : Tree := Create_Tree ("root"); begin T.Add_Node ("N1", "root"); T.Add_Node ("N2", "N1"); end Test_Add_Leaf_Node; procedure Test_Add_Non_Leaf_Node (Object : in out Test) is T : Tree := Create_Tree ("root"); begin T.Add_Node ("N1", "root"); T.Add_Node ("N2", "N1"); -- Add nodes to non-leaf nodes T.Add_Node ("N3", "N1"); T.Add_Node ("N4", "root"); end Test_Add_Non_Leaf_Node; procedure Test_To_Cursor_Root_Node (Object : in out Test) is T : constant Tree := Create_Tree ("root"); C : constant Cursor := T.To_Cursor ("root"); pragma Unreferenced (C); begin null; end Test_To_Cursor_Root_Node; procedure Test_To_Cursor_Leaf_Node (Object : in out Test) is T : Tree := Create_Tree ("root"); begin T.Add_Node ("N1", "root"); declare C : constant Cursor := T.To_Cursor ("N1"); pragma Unreferenced (C); begin null; end; end Test_To_Cursor_Leaf_Node; procedure Test_To_Cursor_Non_Leaf_Node (Object : in out Test) is T : Tree := Create_Tree ("root"); begin T.Add_Node ("N1", "root"); T.Add_Node ("N2", "N1"); declare C : constant Cursor := T.To_Cursor ("N1"); pragma Unreferenced (C); begin null; end; end Test_To_Cursor_Non_Leaf_Node; procedure Test_To_Cursor_Exception (Object : in out Test) is T : constant Tree := Create_Tree ("root"); begin declare C : constant Cursor := T.To_Cursor ("N1"); pragma Unreferenced (C); begin Assert (False, "Expected Unknown_Node_Error exception"); end; exception when Unknown_Node_Error => null; end Test_To_Cursor_Exception; procedure Test_Remove_Leaf_Node (Object : in out Test) is T : Tree := Create_Tree ("root"); begin T.Add_Node ("N1", "root"); T.Remove_Node ("N1"); begin declare C : constant Cursor := T.To_Cursor ("N1"); pragma Unreferenced (C); begin Assert (False, "Expected Unknown_Node_Error exception"); end; exception when Unknown_Node_Error => null; end; end Test_Remove_Leaf_Node; procedure Test_Remove_Subtree (Object : in out Test) is T : Tree := Create_Tree ("root"); begin T.Add_Node ("N1", "root"); T.Add_Node ("N2", "N1"); T.Remove_Node ("N1"); -- Test N1 has been removed begin declare C : constant Cursor := T.To_Cursor ("N1"); pragma Unreferenced (C); begin Assert (False, "Expected Unknown_Node_Error exception"); end; exception when Unknown_Node_Error => null; end; -- Test N2 has been removed begin declare C : constant Cursor := T.To_Cursor ("N2"); pragma Unreferenced (C); begin Assert (False, "Expected Unknown_Node_Error exception"); end; exception when Unknown_Node_Error => null; end; end Test_Remove_Subtree; procedure Test_Remove_Root_Exception (Object : in out Test) is T : Tree := Create_Tree ("root"); begin T.Remove_Node ("root"); Assert (False, "Excepted Root_Removal_Error exception"); exception when Root_Removal_Error => null; end Test_Remove_Root_Exception; procedure Test_Set_Local_Transform (Object : in out Test) is T : Tree := Create_Tree ("root"); C : constant Cursor := T.To_Cursor ("root"); package Transforms renames Orka.Transforms.Singles.Matrices; Offset : constant Transforms.Vector4 := (1.0, 2.0, 3.0, 1.0); begin T.Set_Local_Transform (C, Transforms.T (Offset)); end Test_Set_Local_Transform; procedure Test_Update_Tree (Object : in out Test) is T : Tree := Create_Tree ("root"); begin -- Depth 1 T.Update_Tree; -- Depth 2 T.Add_Node ("N1", "root"); T.Update_Tree; -- Depth 3 T.Add_Node ("N2", "N1"); T.Update_Tree; end Test_Update_Tree; procedure Test_World_Transform (Object : in out Test) is T : Tree := Create_Tree ("root"); begin T.Add_Node ("N1", "root"); declare C1 : constant Cursor := T.To_Cursor ("root"); C2 : constant Cursor := T.To_Cursor ("N1"); use type Orka.Transforms.Singles.Matrices.Matrix4; use type Orka.Transforms.Singles.Matrices.Vector4; package Transforms renames Orka.Transforms.Singles.Matrices; Offset : constant Transforms.Vector4 := (1.0, 2.0, 3.0, 1.0); begin Assert (T.World_Transform (C2) = Transforms.Identity_Matrix, "Unexpected World_Transform"); -- Update local transform of root node T.Set_Local_Transform (C1, Transforms.T (Offset)); T.Update_Tree; -- Check world transform of node N1 Assert (T.World_Transform (C2) (Orka.W) = Offset, "Unexpected World_Transform"); end; end Test_World_Transform; procedure Test_Depth (Object : in out Test) is T : Tree := Create_Tree ("root"); begin Assert (T.Depth = 1, "Unexpected Depth"); T.Add_Node ("N1", "root"); Assert (T.Depth = 2, "Unexpected Depth"); T.Add_Node ("N2", "N1"); Assert (T.Depth = 3, "Unexpected Depth"); T.Remove_Node ("N1"); Assert (T.Depth = 1, "Unexpected Depth"); end Test_Depth; procedure Test_Width (Object : in out Test) is T : Tree := Create_Tree ("root"); begin T.Add_Node ("N1", "root"); T.Add_Node ("N2", "root"); T.Add_Node ("N3", "N1"); Assert (T.Width (1) = 1, "Unexpected Width"); Assert (T.Width (2) = 2, "Unexpected Width"); Assert (T.Width (3) = 1, "Unexpected Width"); end Test_Width; procedure Test_Visibility (Object : in out Test) is T : Tree := Create_Tree ("root"); begin T.Add_Node ("N1", "root"); declare C1 : constant Cursor := T.To_Cursor ("root"); C2 : constant Cursor := T.To_Cursor ("N1"); begin Assert (T.Visibility (C2), "Unexpected Visibility"); -- Update local visibility of root node T.Set_Visibility (C1, False); T.Update_Tree; -- Check visibility of node N1 Assert (not T.Visibility (C2), "Unexpected Visibility"); end; end Test_Visibility; end Test_Scene_Trees;
32.534426
97
0.628439
18af52b580f30a0daa5ca371a645f92709025297
19,041
adb
Ada
middleware/src/filesystem/file_io.adb
shakram02/Ada_Drivers_Library
a407ca7ddbc2d9756647016c2f8fd8ef24a239ff
[ "BSD-3-Clause" ]
192
2016-06-01T18:32:04.000Z
2022-03-26T22:52:31.000Z
middleware/src/filesystem/file_io.adb
shakram02/Ada_Drivers_Library
a407ca7ddbc2d9756647016c2f8fd8ef24a239ff
[ "BSD-3-Clause" ]
239
2016-05-26T20:02:01.000Z
2022-03-31T09:46:56.000Z
middleware/src/filesystem/file_io.adb
shakram02/Ada_Drivers_Library
a407ca7ddbc2d9756647016c2f8fd8ef24a239ff
[ "BSD-3-Clause" ]
142
2016-06-05T08:12:20.000Z
2022-03-24T17:37:17.000Z
------------------------------------------------------------------------------ -- -- -- Copyright (C) 2015-2019, AdaCore -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions are -- -- met: -- -- 1. Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- 2. Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in -- -- the documentation and/or other materials provided with the -- -- distribution. -- -- 3. Neither the name of the copyright holder nor the names of its -- -- contributors may be used to endorse or promote products derived -- -- from this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -- -- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -- -- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -- -- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -- -- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -- -- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ with Filesystem; use Filesystem; with Filesystem.MBR; use Filesystem.MBR; with Filesystem.FAT; use Filesystem.FAT; with HAL.Filesystem; use HAL.Filesystem; with Ada.Unchecked_Conversion; package body File_IO is package HALFS renames HAL.Filesystem; function Convert is new Ada.Unchecked_Conversion (HALFS.Status_Code, Status_Code); function Convert is new Ada.Unchecked_Conversion (File_Mode, HALFS.File_Mode); function Convert is new Ada.Unchecked_Conversion (File_Size, HALFS.File_Size); function Convert is new Ada.Unchecked_Conversion (HALFS.File_Size, File_Size); function Convert is new Ada.Unchecked_Conversion (Seek_Mode, HALFS.Seek_Mode); type Mount_Record is record Is_Free : Boolean := True; Name : String (1 .. Max_Mount_Name_Length); Name_Len : Positive; FS : Any_Filesystem_Driver; end record; subtype Mount_Index is Integer range 0 .. Max_Mount_Points; subtype Valid_Mount_Index is Mount_Index range 1 .. Max_Mount_Points; type Mount_Array is array (Valid_Mount_Index) of Mount_Record; type VFS_Directory_Handle is new Directory_Handle with record Is_Free : Boolean := True; Mount_Id : Mount_Index; end record; overriding function Get_FS (Dir : VFS_Directory_Handle) return Any_Filesystem_Driver; -- Return the filesystem the handle belongs to. overriding function Read (Dir : in out VFS_Directory_Handle; Handle : out Any_Node_Handle) return HALFS.Status_Code; -- Reads the next directory entry. If no such entry is there, an error -- code is returned in Status. overriding procedure Reset (Dir : in out VFS_Directory_Handle); -- Resets the handle to the first node overriding procedure Close (Dir : in out VFS_Directory_Handle); -- Closes the handle, and free the associated resources. function Open (Path : String; Handle : out Any_Directory_Handle) return Status_Code; function Open (Path : String; Mode : File_Mode; Handle : out Any_File_Handle) return Status_Code; Mount_Points : Mount_Array; Handles : array (1 .. 2) of aliased VFS_Directory_Handle; function Name (Point : Mount_Record) return Mount_Path; procedure Set_Name (Point : in out Mount_Record; Path : Mount_Path); procedure Split (Path : String; FS : out Any_Filesystem_Driver; Start_Index : out Natural); ---------- -- Open -- ---------- function Open (File : in out File_Descriptor; Name : String; Mode : File_Mode) return Status_Code is Ret : Status_Code; begin if Is_Open (File) then return Invalid_Parameter; end if; Ret := Open (Name, Mode, File.Handle); if Ret /= OK then File.Handle := null; end if; return Ret; end Open; ----------- -- Close -- ----------- procedure Close (File : in out File_Descriptor) is begin if File.Handle /= null then File.Handle.Close; File.Handle := null; end if; end Close; ------------- -- Is_Open -- ------------- function Is_Open (File : File_Descriptor) return Boolean is (File.Handle /= null); ----------- -- Flush -- ----------- function Flush (File : File_Descriptor) return Status_Code is begin if File.Handle /= null then return Convert (File.Handle.Flush); else return Invalid_Parameter; end if; end Flush; ---------- -- Size -- ---------- function Size (File : File_Descriptor) return File_Size is begin if File.Handle = null then return 0; else return Convert (File.Handle.Size); end if; end Size; ---------- -- Read -- ---------- function Read (File : File_Descriptor; Addr : System.Address; Length : File_Size) return File_Size is Ret : HALFS.File_Size; Status : Status_Code; begin if File.Handle = null then return 0; end if; Ret := Convert (Length); Status := Convert (File.Handle.Read (Addr, Ret)); if Status /= OK then return 0; else return Convert (Ret); end if; end Read; ----------- -- Write -- ----------- function Write (File : File_Descriptor; Addr : System.Address; Length : File_Size) return File_Size is Ret : HALFS.File_Size; Status : Status_Code; begin if File.Handle = null then return 0; end if; Ret := Convert (Length); Status := Convert (File.Handle.Write (Addr, Ret)); if Status /= OK then return 0; else return Convert (Ret); end if; end Write; ------------ -- Offset -- ------------ function Offset (File : File_Descriptor) return File_Size is begin if File.Handle /= null then return Convert (File.Handle.Offset); else return 0; end if; end Offset; ---------- -- Seek -- ---------- function Seek (File : in out File_Descriptor; Origin : Seek_Mode; Amount : in out File_Size) return Status_Code is Ret : Status_Code; HALFS_Amount : HALFS.File_Size; begin if File.Handle /= null then HALFS_Amount := Convert (Amount); Ret := Convert (File.Handle.Seek (Convert (Origin), HALFS_Amount)); Amount := Convert (HALFS_Amount); return Ret; else return Invalid_Parameter; end if; end Seek; ------------------- -- Generic_Write -- ------------------- function Generic_Write (File : File_Descriptor; Value : T) return Status_Code is begin if File.Handle /= null then return Convert (File.Handle.Write (Value'Address, T'Size / 8)); else return Invalid_Parameter; end if; end Generic_Write; ------------------ -- Generic_Read -- ------------------ function Generic_Read (File : File_Descriptor; Value : out T) return Status_Code is L : HALFS.File_Size := T'Size / 8; begin if File.Handle /= null then return Convert (File.Handle.Read (Value'Address, L)); else return Invalid_Parameter; end if; end Generic_Read; ---------- -- Open -- ---------- function Open (Dir : in out Directory_Descriptor; Name : String) return Status_Code is Ret : Status_Code; begin if Dir.Handle /= null then return Invalid_Parameter; end if; Ret := Open (Name, Dir.Handle); if Ret /= OK then Dir.Handle := null; end if; return Ret; end Open; ----------- -- Close -- ----------- procedure Close (Dir : in out Directory_Descriptor) is begin if Dir.Handle /= null then Dir.Handle.Close; end if; end Close; ---------- -- Read -- ---------- function Read (Dir : in out Directory_Descriptor) return Directory_Entry is Node : Any_Node_Handle; Status : Status_Code; begin if Dir.Handle = null then return Invalid_Dir_Entry; end if; Status := Convert (Dir.Handle.Read (Node)); if Status /= OK then return Invalid_Dir_Entry; end if; declare Name : constant String := Node.Basename; Ret : Directory_Entry (Name_Length => Name'Length); begin Ret.Name := Name; Ret.Subdirectory := Node.Is_Subdirectory; Ret.Read_Only := Node.Is_Read_Only; Ret.Hidden := Node.Is_Hidden; Ret.Symlink := Node.Is_Symlink; Ret.Size := Convert (Node.Size); Node.Close; return Ret; end; end Read; ----------- -- Reset -- ----------- procedure Reset (Dir : in out Directory_Descriptor) is begin if Dir.Handle /= null then Dir.Handle.Reset; end if; end Reset; ----------------- -- Create_File -- ----------------- function Create_File (Path : String) return Status_Code is Idx : Natural; FS : Any_Filesystem_Driver; begin Split (Path, FS, Idx); if FS = null then return No_Such_Path; end if; return Convert (FS.Create_File (Path (Idx .. Path'Last))); end Create_File; ------------ -- Unlink -- ------------ function Unlink (Path : String) return Status_Code is Idx : Natural; FS : Any_Filesystem_Driver; begin Split (Path, FS, Idx); if FS = null then return No_Such_Path; end if; return Convert (FS.Unlink (Path (Idx .. Path'Last))); end Unlink; ---------------------- -- Remove_Directory -- ---------------------- function Remove_Directory (Path : String) return Status_Code is Idx : Natural; FS : Any_Filesystem_Driver; begin Split (Path, FS, Idx); if FS = null then return No_Such_Path; end if; return Convert (FS.Remove_Directory (Path (Idx .. Path'Last))); end Remove_Directory; --------------- -- Copy_File -- --------------- function Copy_File (Source_Path, Destination_Path : String; Buffer_Size : Positive := 512) return Status_Code is Src, Dst : File_Descriptor; Status : Status_Code; Buffer : HAL.UInt8_Array (1 .. Buffer_Size); Src_Len, Dst_Len : File_Size; begin Status := Open (Src, Source_Path, Read_Only); if Status /= OK then return Status; end if; Status := Create_File (Destination_Path); if Status /= OK then Close (Src); return Status; end if; Status := Open (Dst, Destination_Path, Write_Only); if Status /= OK then Close (Src); return Status; end if; loop Src_Len := Read (Src, Buffer'Address, Buffer'Length); exit when Src_Len = 0; Dst_Len := Write (Dst, Buffer'Address, Src_Len); if Dst_Len /= Src_Len then Close (Src); Close (Dst); return Input_Output_Error; end if; exit when Src_Len /= Buffer'Length; end loop; Close (Src); Close (Dst); return OK; end Copy_File; ---------- -- Name -- ---------- function Name (Point : Mount_Record) return Mount_Path is (Point.Name (1 .. Point.Name_Len)); -------------- -- Set_Name -- -------------- procedure Set_Name (Point : in out Mount_Record; Path : Mount_Path) is begin Point.Name (1 .. Path'Length) := Path; Point.Name_Len := Path'Length; end Set_Name; ----------- -- Split -- ----------- procedure Split (Path : String; FS : out Any_Filesystem_Driver; Start_Index : out Natural) is begin if Path'Length >= 1 and then Path (Path'First) /= '/' then FS := null; Start_Index := 0; return; end if; Start_Index := Path'Last + 1; for J in Path'First + 1 .. Path'Last loop if Path (J) = '/' then Start_Index := J; exit; end if; end loop; for M of Mount_Points loop if not M.Is_Free and then Name (M) = Path (Path'First + 1 .. Start_Index - 1) then FS := M.FS; return; end if; end loop; FS := null; Start_Index := 0; end Split; ------------------ -- Mount_Volume -- ------------------ function Mount_Volume (Mount_Point : Mount_Path; FS : Any_Filesystem_Driver) return Status_Code is Idx : Natural := 0; begin for P in Mount_Points'Range loop if not Mount_Points (P).Is_Free and then Name (Mount_Points (P)) = Mount_Point then return Already_Exists; elsif Idx = 0 and then Mount_Points (P).Is_Free then Idx := P; end if; end loop; if Idx = 0 then return Too_Many_Open_Files; end if; Mount_Points (Idx).Is_Free := False; Mount_Points (Idx).FS := FS; Set_Name (Mount_Points (Idx), Mount_Point); return OK; end Mount_Volume; ----------------- -- Mount_Drive -- ----------------- function Mount_Drive (Mount_Point : Mount_Path; Device : HAL.Block_Drivers.Any_Block_Driver) return Status_Code is MBR : Master_Boot_Record; Status : Status_Code; FAT_FS : FAT_Filesystem_Access; begin Status := Read (Device, MBR); if Status /= OK then return Status; end if; for P in Partition_Number'Range loop if Valid (MBR, P) and then Get_Type (MBR, P) in 6 | 11 .. 12 then Status := OK; FAT_FS := new FAT_Filesystem; Status := Convert (Open (Controller => Device, LBA => LBA (MBR, P), FS => FAT_FS.all)); return Mount_Volume (Mount_Point, HALFS.Any_Filesystem_Driver (FAT_FS)); end if; end loop; return No_Filesystem; end Mount_Drive; ------------- -- Unmount -- ------------- function Unmount (Mount_Point : Mount_Path) return Status_Code is begin for P in Mount_Points'Range loop if Name (Mount_Points (P)) = Mount_Point then Mount_Points (P).FS.Close; Mount_Points (P).Is_Free := True; return OK; end if; end loop; return Not_Mounted; end Unmount; ------------ -- Get_FS -- ------------ overriding function Get_FS (Dir : VFS_Directory_Handle) return Any_Filesystem_Driver is pragma Unreferenced (Dir); begin return null; end Get_FS; ---------- -- Read -- ---------- overriding function Read (Dir : in out VFS_Directory_Handle; Handle : out Any_Node_Handle) return HALFS.Status_Code is begin loop if Dir.Mount_Id = Mount_Points'Last then Handle := null; return No_More_Entries; end if; Dir.Mount_Id := Dir.Mount_Id + 1; if not Mount_Points (Dir.Mount_Id).Is_Free then return Mount_Points (Dir.Mount_Id).FS.Root_Node (Name (Mount_Points (Dir.Mount_Id)), Handle); end if; end loop; end Read; ----------- -- Reset -- ----------- overriding procedure Reset (Dir : in out VFS_Directory_Handle) is begin Dir.Mount_Id := 0; end Reset; ----------- -- Close -- ----------- overriding procedure Close (Dir : in out VFS_Directory_Handle) is begin Dir.Is_Free := True; end Close; ---------- -- Open -- ---------- function Open (Path : String; Mode : File_Mode; Handle : out Any_File_Handle) return Status_Code is Idx : Natural; FS : Any_Filesystem_Driver; begin Split (Path, FS, Idx); if FS = null then Handle := null; return No_Such_Path; end if; return Convert (FS.Open (Path (Idx .. Path'Last), Convert (Mode), Handle)); end Open; ---------- -- Open -- ---------- function Open (Path : String; Handle : out Any_Directory_Handle) return Status_Code is Idx : Natural; FS : Any_Filesystem_Driver; begin if Path = "/" then for J in Handles'Range loop if Handles (J).Is_Free then Handles (J).Is_Free := False; Handles (J).Mount_Id := 0; Handle := Handles (J)'Access; return OK; end if; end loop; Handle := null; return Too_Many_Open_Files; end if; Split (Path, FS, Idx); if FS = null then Handle := null; return No_Such_Path; end if; if Idx > Path'Last then return Convert (FS.Open ("/", Handle)); else return Convert (FS.Open (Path (Idx .. Path'Last), Handle)); end if; end Open; end File_IO;
25.086957
85
0.532325
392cc8fa38d385e2f9b7fa649624e20c07c7e034
3,893
ads
Ada
src/shared/generic/lsc-internal-hmac_sha1.ads
Componolit/libsparkcrypto
8531a07b6e9f5eb33eae0fa32759b4cbd3509d95
[ "OpenSSL", "Unlicense" ]
30
2018-05-18T09:11:50.000Z
2021-05-18T16:29:14.000Z
src/shared/generic/lsc-internal-hmac_sha1.ads
Componolit/libsparkcrypto
8531a07b6e9f5eb33eae0fa32759b4cbd3509d95
[ "OpenSSL", "Unlicense" ]
15
2018-12-13T07:53:36.000Z
2019-09-24T19:43:35.000Z
src/shared/generic/lsc-internal-hmac_sha1.ads
Componolit/libsparkcrypto
8531a07b6e9f5eb33eae0fa32759b4cbd3509d95
[ "OpenSSL", "Unlicense" ]
3
2019-04-04T17:41:29.000Z
2021-05-07T22:28:46.000Z
------------------------------------------------------------------------------- -- This file is part of libsparkcrypto. -- -- Copyright (C) 2011, Adrian-Ken Rueegsegger -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions are met: -- -- * Redistributions of source code must retain the above copyright notice, -- this list of conditions and the following disclaimer. -- -- * Redistributions in binary form must reproduce the above copyright -- notice, this list of conditions and the following disclaimer in the -- documentation and/or other materials provided with the distribution. -- -- * Neither the name of the nor the names of its contributors may be used -- to endorse or promote products derived from this software without -- specific prior written permission. -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS -- BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -- POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------------------- with LSC.Internal.SHA1, LSC.Internal.Types; use type LSC.Internal.Types.Word32; use type LSC.Internal.Types.Word64; ------------------------------------------------------------------------------- -- The HMAC-SHA-1 message authentication -- -- <ul> -- <li> -- <a href="http://www.faqs.org/rfcs/rfc2202.html"> -- P. Cheng, Test Cases for HMAC-MD5 and HMAC-SHA-1, RFC 2202, -- September 1997. </a> -- </li> -- </ul> ------------------------------------------------------------------------------- package LSC.Internal.HMAC_SHA1 is pragma Pure; -- HMAC-SHA-1 context type Context_Type is private; -- Initialize HMAC-SHA-1 context using @Key@. function Context_Init (Key : SHA1.Block_Type) return Context_Type; -- Update HMAC-SHA-1 @Context@ with message block @Block@. procedure Context_Update (Context : in out Context_Type; Block : in SHA1.Block_Type) with Depends => (Context =>+ Block); pragma Inline (Context_Update); -- Finalize HMAC-SHA-1 @Context@ using @Length@ bits of final message -- block @Block@. procedure Context_Finalize (Context : in out Context_Type; Block : in SHA1.Block_Type; Length : in SHA1.Block_Length_Type) with Depends => (Context =>+ (Block, Length)); pragma Inline (Context_Finalize); -- Get authentication value from @Context@ function Get_Auth (Context : in Context_Type) return SHA1.Hash_Type; -- Perform authentication of @Length@ bits of @Message@ using @Key@ and -- return the authentication value. function Authenticate (Key : SHA1.Block_Type; Message : SHA1.Message_Type; Length : Types.Word64) return SHA1.Hash_Type with Pre => Message'First <= Message'Last and Length / SHA1.Block_Size + (if Length mod SHA1.Block_Size = 0 then 0 else 1) <= Message'Length; private type Context_Type is record SHA1_Context : SHA1.Context_Type; Key : SHA1.Block_Type; end record; end LSC.Internal.HMAC_SHA1;
39.323232
79
0.63627
dc55432c1a577c8aceee1852bae75440e58dbe1a
2,923
adb
Ada
arch/RISC-V/src/rv32/riscv-csr_generic-read_csr_64.adb
shakram02/Ada_Drivers_Library
a407ca7ddbc2d9756647016c2f8fd8ef24a239ff
[ "BSD-3-Clause" ]
192
2016-06-01T18:32:04.000Z
2022-03-26T22:52:31.000Z
arch/RISC-V/src/rv32/riscv-csr_generic-read_csr_64.adb
shakram02/Ada_Drivers_Library
a407ca7ddbc2d9756647016c2f8fd8ef24a239ff
[ "BSD-3-Clause" ]
239
2016-05-26T20:02:01.000Z
2022-03-31T09:46:56.000Z
arch/RISC-V/src/rv32/riscv-csr_generic-read_csr_64.adb
shakram02/Ada_Drivers_Library
a407ca7ddbc2d9756647016c2f8fd8ef24a239ff
[ "BSD-3-Clause" ]
142
2016-06-05T08:12:20.000Z
2022-03-24T17:37:17.000Z
------------------------------------------------------------------------------ -- -- -- Copyright (C) 2020, AdaCore -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions are -- -- met: -- -- 1. Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- 2. Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in -- -- the documentation and/or other materials provided with the -- -- distribution. -- -- 3. Neither the name of the copyright holder nor the names of its -- -- contributors may be used to endorse or promote products derived -- -- from this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -- -- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -- -- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -- -- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -- -- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -- -- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ with HAL; use HAL; separate (RISCV.CSR_Generic) function Read_CSR_64 return HAL.UInt64 is function R_Low is new Read_CSR (Reg_Name, UInt32); function R_High is new Read_CSR (Reg_Name & "h", UInt32); Low, High_1, High_2 : UInt32; begin -- Read the High register twice in case Low overflows while we read High_1 := R_High; Low := R_Low; High_2 := R_High; if High_2 /= High_1 then return Shift_Left (UInt64 (High_2), 32); else return Shift_Left (UInt64 (High_1), 32) + UInt64 (Low); end if; end Read_CSR_64;
55.150943
78
0.536093
10c8d13e6946b8f6796af4654c1083cf33508118
180,128
adb
Ada
submissions/M2/Design_Analysis/lab1/dct_prj/solution1/.autopilot/db/dct.bind.adb
maanjum95/SynthesisDigitalSystems_Lab
afc942decf7595eb1557ff78074693de2eea1780
[ "MIT" ]
null
null
null
submissions/M2/Design_Analysis/lab1/dct_prj/solution1/.autopilot/db/dct.bind.adb
maanjum95/SynthesisDigitalSystems_Lab
afc942decf7595eb1557ff78074693de2eea1780
[ "MIT" ]
null
null
null
submissions/M2/Design_Analysis/lab1/dct_prj/solution1/.autopilot/db/dct.bind.adb
maanjum95/SynthesisDigitalSystems_Lab
afc942decf7595eb1557ff78074693de2eea1780
[ "MIT" ]
null
null
null
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <!DOCTYPE boost_serialization> <boost_serialization signature="serialization::archive" version="15"> <syndb class_id="0" tracking_level="0" version="0"> <userIPLatency>-1</userIPLatency> <userIPName></userIPName> <cdfg class_id="1" tracking_level="1" version="0" object_id="_0"> <name>dct</name> <ret_bitwidth>0</ret_bitwidth> <ports class_id="2" tracking_level="0" version="0"> <count>2</count> <item_version>0</item_version> <item class_id="3" tracking_level="1" version="0" object_id="_1"> <Value class_id="4" tracking_level="0" version="0"> <Obj class_id="5" tracking_level="0" version="0"> <type>1</type> <id>1</id> <name>input_r</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo class_id="6" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>input</originalName> <rtlName></rtlName> <coreName>RAM</coreName> </Obj> <bitwidth>16</bitwidth> </Value> <direction>0</direction> <if_type>1</if_type> <array_size>64</array_size> <bit_vecs class_id="7" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> <item class_id_reference="3" object_id="_2"> <Value> <Obj> <type>1</type> <id>2</id> <name>output_r</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>output</originalName> <rtlName></rtlName> <coreName>RAM</coreName> </Obj> <bitwidth>16</bitwidth> </Value> <direction>1</direction> <if_type>1</if_type> <array_size>64</array_size> <bit_vecs> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> </ports> <nodes class_id="8" tracking_level="0" version="0"> <count>56</count> <item_version>0</item_version> <item class_id="9" tracking_level="1" version="0" object_id="_3"> <Value> <Obj> <type>0</type> <id>7</id> <name>buf_2d_in</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>122</lineNumber> <contextFuncName>dct</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item class_id="10" tracking_level="0" version="0"> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second class_id="11" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="12" tracking_level="0" version="0"> <first class_id="13" tracking_level="0" version="0"> <first>dct.cpp</first> <second>dct</second> </first> <second>122</second> </item> </second> </item> </inlineStackInfo> <originalName>buf_2d_in</originalName> <rtlName></rtlName> <coreName>RAM</coreName> </Obj> <bitwidth>16</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>89</item> </oprand_edges> <opcode>alloca</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>1</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_4"> <Value> <Obj> <type>0</type> <id>8</id> <name>buf_2d_out</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName>RAM</coreName> </Obj> <bitwidth>16</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>90</item> </oprand_edges> <opcode>alloca</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>2</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_5"> <Value> <Obj> <type>0</type> <id>9</id> <name>_ln101</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>101</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct</second> </first> <second>126</second> </item> <item> <first> <first>dct.cpp</first> <second>read_data</second> </first> <second>101</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>91</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.73</m_delay> <m_topoIndex>3</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_6"> <Value> <Obj> <type>0</type> <id>11</id> <name>r_0_i</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>r</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>4</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>93</item> <item>94</item> <item>95</item> <item>96</item> </oprand_edges> <opcode>phi</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>4</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_7"> <Value> <Obj> <type>0</type> <id>12</id> <name>icmp_ln101</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>101</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct</second> </first> <second>126</second> </item> <item> <first> <first>dct.cpp</first> <second>read_data</second> </first> <second>101</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>1</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>97</item> <item>99</item> </oprand_edges> <opcode>icmp</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.72</m_delay> <m_topoIndex>5</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_8"> <Value> <Obj> <type>0</type> <id>14</id> <name>r</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>101</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct</second> </first> <second>126</second> </item> <item> <first> <first>dct.cpp</first> <second>read_data</second> </first> <second>101</second> </item> </second> </item> </inlineStackInfo> <originalName>r</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>4</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>100</item> <item>102</item> </oprand_edges> <opcode>add</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.80</m_delay> <m_topoIndex>6</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_9"> <Value> <Obj> <type>0</type> <id>15</id> <name>_ln101</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>101</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct</second> </first> <second>126</second> </item> <item> <first> <first>dct.cpp</first> <second>read_data</second> </first> <second>101</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>103</item> <item>104</item> <item>105</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>7</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_10"> <Value> <Obj> <type>0</type> <id>19</id> <name>trunc_ln104</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>104</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct</second> </first> <second>126</second> </item> <item> <first> <first>dct.cpp</first> <second>read_data</second> </first> <second>104</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>3</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>106</item> </oprand_edges> <opcode>trunc</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>8</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_11"> <Value> <Obj> <type>0</type> <id>20</id> <name>shl_ln</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>104</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct</second> </first> <second>126</second> </item> <item> <first> <first>dct.cpp</first> <second>read_data</second> </first> <second>104</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>6</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>108</item> <item>109</item> <item>111</item> </oprand_edges> <opcode>bitconcatenate</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>9</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_12"> <Value> <Obj> <type>0</type> <id>21</id> <name>tmp_9</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>104</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct</second> </first> <second>126</second> </item> <item> <first> <first>dct.cpp</first> <second>read_data</second> </first> <second>104</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>7</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>113</item> <item>114</item> <item>115</item> </oprand_edges> <opcode>bitconcatenate</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>10</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_13"> <Value> <Obj> <type>0</type> <id>22</id> <name>zext_ln103_1</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>103</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct</second> </first> <second>126</second> </item> <item> <first> <first>dct.cpp</first> <second>read_data</second> </first> <second>103</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>8</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>116</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>11</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_14"> <Value> <Obj> <type>0</type> <id>23</id> <name>_ln103</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>103</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct</second> </first> <second>126</second> </item> <item> <first> <first>dct.cpp</first> <second>read_data</second> </first> <second>103</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>117</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.73</m_delay> <m_topoIndex>12</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_15"> <Value> <Obj> <type>0</type> <id>25</id> <name>c_0_i</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>c</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>4</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>118</item> <item>119</item> <item>120</item> <item>121</item> </oprand_edges> <opcode>phi</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>14</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_16"> <Value> <Obj> <type>0</type> <id>26</id> <name>zext_ln103</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>103</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct</second> </first> <second>126</second> </item> <item> <first> <first>dct.cpp</first> <second>read_data</second> </first> <second>103</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>6</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>122</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>15</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_17"> <Value> <Obj> <type>0</type> <id>27</id> <name>icmp_ln103</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>103</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct</second> </first> <second>126</second> </item> <item> <first> <first>dct.cpp</first> <second>read_data</second> </first> <second>103</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>1</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>123</item> <item>124</item> </oprand_edges> <opcode>icmp</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.72</m_delay> <m_topoIndex>16</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_18"> <Value> <Obj> <type>0</type> <id>29</id> <name>c</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>103</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct</second> </first> <second>126</second> </item> <item> <first> <first>dct.cpp</first> <second>read_data</second> </first> <second>103</second> </item> </second> </item> </inlineStackInfo> <originalName>c</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>4</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>125</item> <item>126</item> </oprand_edges> <opcode>add</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.80</m_delay> <m_topoIndex>17</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_19"> <Value> <Obj> <type>0</type> <id>30</id> <name>_ln103</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>103</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct</second> </first> <second>126</second> </item> <item> <first> <first>dct.cpp</first> <second>read_data</second> </first> <second>103</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>127</item> <item>128</item> <item>129</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>18</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_20"> <Value> <Obj> <type>0</type> <id>33</id> <name>add_ln104</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>104</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct</second> </first> <second>126</second> </item> <item> <first> <first>dct.cpp</first> <second>read_data</second> </first> <second>104</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>6</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>130</item> <item>131</item> </oprand_edges> <opcode>add</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.84</m_delay> <m_topoIndex>19</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_21"> <Value> <Obj> <type>0</type> <id>34</id> <name>zext_ln104</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>104</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct</second> </first> <second>126</second> </item> <item> <first> <first>dct.cpp</first> <second>read_data</second> </first> <second>104</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>64</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>132</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>20</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_22"> <Value> <Obj> <type>0</type> <id>35</id> <name>input_addr</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>104</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct</second> </first> <second>126</second> </item> <item> <first> <first>dct.cpp</first> <second>read_data</second> </first> <second>104</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>6</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>133</item> <item>135</item> <item>136</item> </oprand_edges> <opcode>getelementptr</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>21</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_23"> <Value> <Obj> <type>0</type> <id>36</id> <name>input_load</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>104</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct</second> </first> <second>126</second> </item> <item> <first> <first>dct.cpp</first> <second>read_data</second> </first> <second>104</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>16</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>137</item> </oprand_edges> <opcode>load</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>1.29</m_delay> <m_topoIndex>22</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_24"> <Value> <Obj> <type>0</type> <id>37</id> <name>zext_ln104_1</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>104</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct</second> </first> <second>126</second> </item> <item> <first> <first>dct.cpp</first> <second>read_data</second> </first> <second>104</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>8</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>138</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>23</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_25"> <Value> <Obj> <type>0</type> <id>38</id> <name>add_ln104_1</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>104</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct</second> </first> <second>126</second> </item> <item> <first> <first>dct.cpp</first> <second>read_data</second> </first> <second>104</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>8</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>139</item> <item>140</item> </oprand_edges> <opcode>add</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.85</m_delay> <m_topoIndex>24</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_26"> <Value> <Obj> <type>0</type> <id>39</id> <name>zext_ln104_2</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>104</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct</second> </first> <second>126</second> </item> <item> <first> <first>dct.cpp</first> <second>read_data</second> </first> <second>104</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>64</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>141</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>26</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_27"> <Value> <Obj> <type>0</type> <id>40</id> <name>buf_2d_in_addr</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>104</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct</second> </first> <second>126</second> </item> <item> <first> <first>dct.cpp</first> <second>read_data</second> </first> <second>104</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>6</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>142</item> <item>143</item> <item>144</item> </oprand_edges> <opcode>getelementptr</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>27</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_28"> <Value> <Obj> <type>0</type> <id>41</id> <name>buf_2d_in_addr_write_ln104</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>104</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct</second> </first> <second>126</second> </item> <item> <first> <first>dct.cpp</first> <second>read_data</second> </first> <second>104</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>145</item> <item>146</item> </oprand_edges> <opcode>store</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>1.29</m_delay> <m_topoIndex>28</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_29"> <Value> <Obj> <type>0</type> <id>42</id> <name>_ln103</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>103</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct</second> </first> <second>126</second> </item> <item> <first> <first>dct.cpp</first> <second>read_data</second> </first> <second>103</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>147</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>29</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_30"> <Value> <Obj> <type>0</type> <id>45</id> <name>_ln101</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>101</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct</second> </first> <second>126</second> </item> <item> <first> <first>dct.cpp</first> <second>read_data</second> </first> <second>101</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>148</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>25</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_31"> <Value> <Obj> <type>0</type> <id>47</id> <name>_ln128</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>128</lineNumber> <contextFuncName>dct</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct</second> </first> <second>128</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>150</item> <item>151</item> <item>152</item> <item>204</item> </oprand_edges> <opcode>call</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>13</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_32"> <Value> <Obj> <type>0</type> <id>48</id> <name>_ln113</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>113</lineNumber> <contextFuncName>write_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct</second> </first> <second>131</second> </item> <item> <first> <first>dct.cpp</first> <second>write_data</second> </first> <second>113</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>153</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.73</m_delay> <m_topoIndex>30</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_33"> <Value> <Obj> <type>0</type> <id>50</id> <name>r_0_i2</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>r</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>4</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>154</item> <item>155</item> <item>156</item> <item>157</item> </oprand_edges> <opcode>phi</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>31</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_34"> <Value> <Obj> <type>0</type> <id>51</id> <name>icmp_ln113</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>113</lineNumber> <contextFuncName>write_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct</second> </first> <second>131</second> </item> <item> <first> <first>dct.cpp</first> <second>write_data</second> </first> <second>113</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>1</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>158</item> <item>159</item> </oprand_edges> <opcode>icmp</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.72</m_delay> <m_topoIndex>32</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_35"> <Value> <Obj> <type>0</type> <id>53</id> <name>r_1</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>113</lineNumber> <contextFuncName>write_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct</second> </first> <second>131</second> </item> <item> <first> <first>dct.cpp</first> <second>write_data</second> </first> <second>113</second> </item> </second> </item> </inlineStackInfo> <originalName>r</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>4</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>160</item> <item>161</item> </oprand_edges> <opcode>add</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.80</m_delay> <m_topoIndex>33</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_36"> <Value> <Obj> <type>0</type> <id>54</id> <name>_ln113</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>113</lineNumber> <contextFuncName>write_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct</second> </first> <second>131</second> </item> <item> <first> <first>dct.cpp</first> <second>write_data</second> </first> <second>113</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>162</item> <item>163</item> <item>164</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>34</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_37"> <Value> <Obj> <type>0</type> <id>58</id> <name>tmp_s</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>116</lineNumber> <contextFuncName>write_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct</second> </first> <second>131</second> </item> <item> <first> <first>dct.cpp</first> <second>write_data</second> </first> <second>116</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>7</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>165</item> <item>166</item> <item>167</item> </oprand_edges> <opcode>bitconcatenate</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>35</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_38"> <Value> <Obj> <type>0</type> <id>59</id> <name>zext_ln116</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>116</lineNumber> <contextFuncName>write_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct</second> </first> <second>131</second> </item> <item> <first> <first>dct.cpp</first> <second>write_data</second> </first> <second>116</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>8</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>168</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>36</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_39"> <Value> <Obj> <type>0</type> <id>60</id> <name>trunc_ln116</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>116</lineNumber> <contextFuncName>write_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct</second> </first> <second>131</second> </item> <item> <first> <first>dct.cpp</first> <second>write_data</second> </first> <second>116</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>3</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>169</item> </oprand_edges> <opcode>trunc</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>37</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_40"> <Value> <Obj> <type>0</type> <id>61</id> <name>shl_ln1</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>116</lineNumber> <contextFuncName>write_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct</second> </first> <second>131</second> </item> <item> <first> <first>dct.cpp</first> <second>write_data</second> </first> <second>116</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>6</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>170</item> <item>171</item> <item>172</item> </oprand_edges> <opcode>bitconcatenate</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>38</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_41"> <Value> <Obj> <type>0</type> <id>62</id> <name>_ln115</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>115</lineNumber> <contextFuncName>write_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct</second> </first> <second>131</second> </item> <item> <first> <first>dct.cpp</first> <second>write_data</second> </first> <second>115</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>173</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.73</m_delay> <m_topoIndex>39</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_42"> <Value> <Obj> <type>0</type> <id>64</id> <name>c_0_i4</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>c</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>4</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>174</item> <item>175</item> <item>176</item> <item>177</item> </oprand_edges> <opcode>phi</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>41</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_43"> <Value> <Obj> <type>0</type> <id>65</id> <name>zext_ln115</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>115</lineNumber> <contextFuncName>write_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct</second> </first> <second>131</second> </item> <item> <first> <first>dct.cpp</first> <second>write_data</second> </first> <second>115</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>6</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>178</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>42</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_44"> <Value> <Obj> <type>0</type> <id>66</id> <name>icmp_ln115</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>115</lineNumber> <contextFuncName>write_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct</second> </first> <second>131</second> </item> <item> <first> <first>dct.cpp</first> <second>write_data</second> </first> <second>115</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>1</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>179</item> <item>180</item> </oprand_edges> <opcode>icmp</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.72</m_delay> <m_topoIndex>43</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_45"> <Value> <Obj> <type>0</type> <id>68</id> <name>c_1</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>115</lineNumber> <contextFuncName>write_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct</second> </first> <second>131</second> </item> <item> <first> <first>dct.cpp</first> <second>write_data</second> </first> <second>115</second> </item> </second> </item> </inlineStackInfo> <originalName>c</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>4</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>181</item> <item>182</item> </oprand_edges> <opcode>add</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.80</m_delay> <m_topoIndex>44</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_46"> <Value> <Obj> <type>0</type> <id>69</id> <name>_ln115</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>115</lineNumber> <contextFuncName>write_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct</second> </first> <second>131</second> </item> <item> <first> <first>dct.cpp</first> <second>write_data</second> </first> <second>115</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>183</item> <item>184</item> <item>185</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>45</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_47"> <Value> <Obj> <type>0</type> <id>72</id> <name>zext_ln116_1</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>116</lineNumber> <contextFuncName>write_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct</second> </first> <second>131</second> </item> <item> <first> <first>dct.cpp</first> <second>write_data</second> </first> <second>116</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>8</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>186</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>46</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_48"> <Value> <Obj> <type>0</type> <id>73</id> <name>add_ln116_1</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>116</lineNumber> <contextFuncName>write_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct</second> </first> <second>131</second> </item> <item> <first> <first>dct.cpp</first> <second>write_data</second> </first> <second>116</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>8</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>187</item> <item>188</item> </oprand_edges> <opcode>add</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.85</m_delay> <m_topoIndex>47</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_49"> <Value> <Obj> <type>0</type> <id>74</id> <name>zext_ln116_3</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>116</lineNumber> <contextFuncName>write_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct</second> </first> <second>131</second> </item> <item> <first> <first>dct.cpp</first> <second>write_data</second> </first> <second>116</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>64</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>189</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>48</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_50"> <Value> <Obj> <type>0</type> <id>75</id> <name>buf_2d_out_addr</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>116</lineNumber> <contextFuncName>write_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct</second> </first> <second>131</second> </item> <item> <first> <first>dct.cpp</first> <second>write_data</second> </first> <second>116</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>6</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>190</item> <item>191</item> <item>192</item> </oprand_edges> <opcode>getelementptr</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>49</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_51"> <Value> <Obj> <type>0</type> <id>76</id> <name>buf_2d_out_load</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>116</lineNumber> <contextFuncName>write_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct</second> </first> <second>131</second> </item> <item> <first> <first>dct.cpp</first> <second>write_data</second> </first> <second>116</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>16</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>193</item> </oprand_edges> <opcode>load</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>1.29</m_delay> <m_topoIndex>50</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_52"> <Value> <Obj> <type>0</type> <id>77</id> <name>add_ln116</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>116</lineNumber> <contextFuncName>write_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct</second> </first> <second>131</second> </item> <item> <first> <first>dct.cpp</first> <second>write_data</second> </first> <second>116</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>6</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>194</item> <item>195</item> </oprand_edges> <opcode>add</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.84</m_delay> <m_topoIndex>51</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_53"> <Value> <Obj> <type>0</type> <id>78</id> <name>zext_ln116_2</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>116</lineNumber> <contextFuncName>write_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct</second> </first> <second>131</second> </item> <item> <first> <first>dct.cpp</first> <second>write_data</second> </first> <second>116</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>64</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>196</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>53</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_54"> <Value> <Obj> <type>0</type> <id>79</id> <name>output_addr</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>116</lineNumber> <contextFuncName>write_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct</second> </first> <second>131</second> </item> <item> <first> <first>dct.cpp</first> <second>write_data</second> </first> <second>116</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>6</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>197</item> <item>198</item> <item>199</item> </oprand_edges> <opcode>getelementptr</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>54</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_55"> <Value> <Obj> <type>0</type> <id>80</id> <name>output_addr_write_ln116</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>116</lineNumber> <contextFuncName>write_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct</second> </first> <second>131</second> </item> <item> <first> <first>dct.cpp</first> <second>write_data</second> </first> <second>116</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>200</item> <item>201</item> </oprand_edges> <opcode>store</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>1.29</m_delay> <m_topoIndex>55</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_56"> <Value> <Obj> <type>0</type> <id>81</id> <name>_ln115</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>115</lineNumber> <contextFuncName>write_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct</second> </first> <second>131</second> </item> <item> <first> <first>dct.cpp</first> <second>write_data</second> </first> <second>115</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>202</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>56</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_57"> <Value> <Obj> <type>0</type> <id>84</id> <name>_ln113</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>113</lineNumber> <contextFuncName>write_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct</second> </first> <second>131</second> </item> <item> <first> <first>dct.cpp</first> <second>write_data</second> </first> <second>113</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>203</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>52</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_58"> <Value> <Obj> <type>0</type> <id>86</id> <name>_ln132</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>132</lineNumber> <contextFuncName>dct</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct</second> </first> <second>132</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>0</count> <item_version>0</item_version> </oprand_edges> <opcode>ret</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>40</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> </nodes> <consts class_id="15" tracking_level="0" version="0"> <count>7</count> <item_version>0</item_version> <item class_id="16" tracking_level="1" version="0" object_id="_59"> <Value> <Obj> <type>2</type> <id>88</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>64</bitwidth> </Value> <const_type>0</const_type> <content>1</content> </item> <item class_id_reference="16" object_id="_60"> <Value> <Obj> <type>2</type> <id>92</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>4</bitwidth> </Value> <const_type>0</const_type> <content>0</content> </item> <item class_id_reference="16" object_id="_61"> <Value> <Obj> <type>2</type> <id>98</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>4</bitwidth> </Value> <const_type>0</const_type> <content>8</content> </item> <item class_id_reference="16" object_id="_62"> <Value> <Obj> <type>2</type> <id>101</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>4</bitwidth> </Value> <const_type>0</const_type> <content>1</content> </item> <item class_id_reference="16" object_id="_63"> <Value> <Obj> <type>2</type> <id>110</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>3</bitwidth> </Value> <const_type>0</const_type> <content>0</content> </item> <item class_id_reference="16" object_id="_64"> <Value> <Obj> <type>2</type> <id>134</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>64</bitwidth> </Value> <const_type>0</const_type> <content>0</content> </item> <item class_id_reference="16" object_id="_65"> <Value> <Obj> <type>2</type> <id>149</id> <name>dct_2d</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <const_type>6</const_type> <content>&lt;constant:dct_2d&gt;</content> </item> </consts> <blocks class_id="17" tracking_level="0" version="0"> <count>13</count> <item_version>0</item_version> <item class_id="18" tracking_level="1" version="0" object_id="_66"> <Obj> <type>3</type> <id>10</id> <name></name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>3</count> <item_version>0</item_version> <item>7</item> <item>8</item> <item>9</item> </node_objs> </item> <item class_id_reference="18" object_id="_67"> <Obj> <type>3</type> <id>16</id> <name></name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>4</count> <item_version>0</item_version> <item>11</item> <item>12</item> <item>14</item> <item>15</item> </node_objs> </item> <item class_id_reference="18" object_id="_68"> <Obj> <type>3</type> <id>24</id> <name>RD_Loop_Row_begin</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>5</count> <item_version>0</item_version> <item>19</item> <item>20</item> <item>21</item> <item>22</item> <item>23</item> </node_objs> </item> <item class_id_reference="18" object_id="_69"> <Obj> <type>3</type> <id>31</id> <name></name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>5</count> <item_version>0</item_version> <item>25</item> <item>26</item> <item>27</item> <item>29</item> <item>30</item> </node_objs> </item> <item class_id_reference="18" object_id="_70"> <Obj> <type>3</type> <id>43</id> <name></name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>10</count> <item_version>0</item_version> <item>33</item> <item>34</item> <item>35</item> <item>36</item> <item>37</item> <item>38</item> <item>39</item> <item>40</item> <item>41</item> <item>42</item> </node_objs> </item> <item class_id_reference="18" object_id="_71"> <Obj> <type>3</type> <id>46</id> <name>RD_Loop_Row_end</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>1</count> <item_version>0</item_version> <item>45</item> </node_objs> </item> <item class_id_reference="18" object_id="_72"> <Obj> <type>3</type> <id>49</id> <name>read_data.exit</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>2</count> <item_version>0</item_version> <item>47</item> <item>48</item> </node_objs> </item> <item class_id_reference="18" object_id="_73"> <Obj> <type>3</type> <id>55</id> <name></name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>4</count> <item_version>0</item_version> <item>50</item> <item>51</item> <item>53</item> <item>54</item> </node_objs> </item> <item class_id_reference="18" object_id="_74"> <Obj> <type>3</type> <id>63</id> <name>WR_Loop_Row_begin</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>5</count> <item_version>0</item_version> <item>58</item> <item>59</item> <item>60</item> <item>61</item> <item>62</item> </node_objs> </item> <item class_id_reference="18" object_id="_75"> <Obj> <type>3</type> <id>70</id> <name></name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>5</count> <item_version>0</item_version> <item>64</item> <item>65</item> <item>66</item> <item>68</item> <item>69</item> </node_objs> </item> <item class_id_reference="18" object_id="_76"> <Obj> <type>3</type> <id>82</id> <name></name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>10</count> <item_version>0</item_version> <item>72</item> <item>73</item> <item>74</item> <item>75</item> <item>76</item> <item>77</item> <item>78</item> <item>79</item> <item>80</item> <item>81</item> </node_objs> </item> <item class_id_reference="18" object_id="_77"> <Obj> <type>3</type> <id>85</id> <name>WR_Loop_Row_end</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>1</count> <item_version>0</item_version> <item>84</item> </node_objs> </item> <item class_id_reference="18" object_id="_78"> <Obj> <type>3</type> <id>87</id> <name>write_data.exit</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>1</count> <item_version>0</item_version> <item>86</item> </node_objs> </item> </blocks> <edges class_id="19" tracking_level="0" version="0"> <count>120</count> <item_version>0</item_version> <item class_id="20" tracking_level="1" version="0" object_id="_79"> <id>89</id> <edge_type>1</edge_type> <source_obj>88</source_obj> <sink_obj>7</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_80"> <id>90</id> <edge_type>1</edge_type> <source_obj>88</source_obj> <sink_obj>8</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_81"> <id>91</id> <edge_type>2</edge_type> <source_obj>16</source_obj> <sink_obj>9</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_82"> <id>93</id> <edge_type>1</edge_type> <source_obj>92</source_obj> <sink_obj>11</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_83"> <id>94</id> <edge_type>2</edge_type> <source_obj>10</source_obj> <sink_obj>11</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_84"> <id>95</id> <edge_type>1</edge_type> <source_obj>14</source_obj> <sink_obj>11</sink_obj> <is_back_edge>1</is_back_edge> </item> <item class_id_reference="20" object_id="_85"> <id>96</id> <edge_type>2</edge_type> <source_obj>46</source_obj> <sink_obj>11</sink_obj> <is_back_edge>1</is_back_edge> </item> <item class_id_reference="20" object_id="_86"> <id>97</id> <edge_type>1</edge_type> <source_obj>11</source_obj> <sink_obj>12</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_87"> <id>99</id> <edge_type>1</edge_type> <source_obj>98</source_obj> <sink_obj>12</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_88"> <id>100</id> <edge_type>1</edge_type> <source_obj>11</source_obj> <sink_obj>14</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_89"> <id>102</id> <edge_type>1</edge_type> <source_obj>101</source_obj> <sink_obj>14</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_90"> <id>103</id> <edge_type>1</edge_type> <source_obj>12</source_obj> <sink_obj>15</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_91"> <id>104</id> <edge_type>2</edge_type> <source_obj>24</source_obj> <sink_obj>15</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_92"> <id>105</id> <edge_type>2</edge_type> <source_obj>49</source_obj> <sink_obj>15</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_93"> <id>106</id> <edge_type>1</edge_type> <source_obj>11</source_obj> <sink_obj>19</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_94"> <id>109</id> <edge_type>1</edge_type> <source_obj>19</source_obj> <sink_obj>20</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_95"> <id>111</id> <edge_type>1</edge_type> <source_obj>110</source_obj> <sink_obj>20</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_96"> <id>114</id> <edge_type>1</edge_type> <source_obj>11</source_obj> <sink_obj>21</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_97"> <id>115</id> <edge_type>1</edge_type> <source_obj>110</source_obj> <sink_obj>21</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_98"> <id>116</id> <edge_type>1</edge_type> <source_obj>21</source_obj> <sink_obj>22</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_99"> <id>117</id> <edge_type>2</edge_type> <source_obj>31</source_obj> <sink_obj>23</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_100"> <id>118</id> <edge_type>1</edge_type> <source_obj>92</source_obj> <sink_obj>25</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_101"> <id>119</id> <edge_type>2</edge_type> <source_obj>24</source_obj> <sink_obj>25</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_102"> <id>120</id> <edge_type>1</edge_type> <source_obj>29</source_obj> <sink_obj>25</sink_obj> <is_back_edge>1</is_back_edge> </item> <item class_id_reference="20" object_id="_103"> <id>121</id> <edge_type>2</edge_type> <source_obj>43</source_obj> <sink_obj>25</sink_obj> <is_back_edge>1</is_back_edge> </item> <item class_id_reference="20" object_id="_104"> <id>122</id> <edge_type>1</edge_type> <source_obj>25</source_obj> <sink_obj>26</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_105"> <id>123</id> <edge_type>1</edge_type> <source_obj>25</source_obj> <sink_obj>27</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_106"> <id>124</id> <edge_type>1</edge_type> <source_obj>98</source_obj> <sink_obj>27</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_107"> <id>125</id> <edge_type>1</edge_type> <source_obj>25</source_obj> <sink_obj>29</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_108"> <id>126</id> <edge_type>1</edge_type> <source_obj>101</source_obj> <sink_obj>29</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_109"> <id>127</id> <edge_type>1</edge_type> <source_obj>27</source_obj> <sink_obj>30</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_110"> <id>128</id> <edge_type>2</edge_type> <source_obj>43</source_obj> <sink_obj>30</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_111"> <id>129</id> <edge_type>2</edge_type> <source_obj>46</source_obj> <sink_obj>30</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_112"> <id>130</id> <edge_type>1</edge_type> <source_obj>26</source_obj> <sink_obj>33</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_113"> <id>131</id> <edge_type>1</edge_type> <source_obj>20</source_obj> <sink_obj>33</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_114"> <id>132</id> <edge_type>1</edge_type> <source_obj>33</source_obj> <sink_obj>34</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_115"> <id>133</id> <edge_type>1</edge_type> <source_obj>1</source_obj> <sink_obj>35</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_116"> <id>135</id> <edge_type>1</edge_type> <source_obj>134</source_obj> <sink_obj>35</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_117"> <id>136</id> <edge_type>1</edge_type> <source_obj>34</source_obj> <sink_obj>35</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_118"> <id>137</id> <edge_type>1</edge_type> <source_obj>35</source_obj> <sink_obj>36</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_119"> <id>138</id> <edge_type>1</edge_type> <source_obj>25</source_obj> <sink_obj>37</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_120"> <id>139</id> <edge_type>1</edge_type> <source_obj>22</source_obj> <sink_obj>38</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_121"> <id>140</id> <edge_type>1</edge_type> <source_obj>37</source_obj> <sink_obj>38</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_122"> <id>141</id> <edge_type>1</edge_type> <source_obj>38</source_obj> <sink_obj>39</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_123"> <id>142</id> <edge_type>1</edge_type> <source_obj>7</source_obj> <sink_obj>40</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_124"> <id>143</id> <edge_type>1</edge_type> <source_obj>134</source_obj> <sink_obj>40</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_125"> <id>144</id> <edge_type>1</edge_type> <source_obj>39</source_obj> <sink_obj>40</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_126"> <id>145</id> <edge_type>1</edge_type> <source_obj>36</source_obj> <sink_obj>41</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_127"> <id>146</id> <edge_type>1</edge_type> <source_obj>40</source_obj> <sink_obj>41</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_128"> <id>147</id> <edge_type>2</edge_type> <source_obj>31</source_obj> <sink_obj>42</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_129"> <id>148</id> <edge_type>2</edge_type> <source_obj>16</source_obj> <sink_obj>45</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_130"> <id>150</id> <edge_type>1</edge_type> <source_obj>149</source_obj> <sink_obj>47</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_131"> <id>151</id> <edge_type>1</edge_type> <source_obj>7</source_obj> <sink_obj>47</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_132"> <id>152</id> <edge_type>1</edge_type> <source_obj>8</source_obj> <sink_obj>47</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_133"> <id>153</id> <edge_type>2</edge_type> <source_obj>55</source_obj> <sink_obj>48</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_134"> <id>154</id> <edge_type>1</edge_type> <source_obj>92</source_obj> <sink_obj>50</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_135"> <id>155</id> <edge_type>2</edge_type> <source_obj>49</source_obj> <sink_obj>50</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_136"> <id>156</id> <edge_type>1</edge_type> <source_obj>53</source_obj> <sink_obj>50</sink_obj> <is_back_edge>1</is_back_edge> </item> <item class_id_reference="20" object_id="_137"> <id>157</id> <edge_type>2</edge_type> <source_obj>85</source_obj> <sink_obj>50</sink_obj> <is_back_edge>1</is_back_edge> </item> <item class_id_reference="20" object_id="_138"> <id>158</id> <edge_type>1</edge_type> <source_obj>50</source_obj> <sink_obj>51</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_139"> <id>159</id> <edge_type>1</edge_type> <source_obj>98</source_obj> <sink_obj>51</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_140"> <id>160</id> <edge_type>1</edge_type> <source_obj>50</source_obj> <sink_obj>53</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_141"> <id>161</id> <edge_type>1</edge_type> <source_obj>101</source_obj> <sink_obj>53</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_142"> <id>162</id> <edge_type>1</edge_type> <source_obj>51</source_obj> <sink_obj>54</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_143"> <id>163</id> <edge_type>2</edge_type> <source_obj>63</source_obj> <sink_obj>54</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_144"> <id>164</id> <edge_type>2</edge_type> <source_obj>87</source_obj> <sink_obj>54</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_145"> <id>166</id> <edge_type>1</edge_type> <source_obj>50</source_obj> <sink_obj>58</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_146"> <id>167</id> <edge_type>1</edge_type> <source_obj>110</source_obj> <sink_obj>58</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_147"> <id>168</id> <edge_type>1</edge_type> <source_obj>58</source_obj> <sink_obj>59</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_148"> <id>169</id> <edge_type>1</edge_type> <source_obj>50</source_obj> <sink_obj>60</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_149"> <id>171</id> <edge_type>1</edge_type> <source_obj>60</source_obj> <sink_obj>61</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_150"> <id>172</id> <edge_type>1</edge_type> <source_obj>110</source_obj> <sink_obj>61</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_151"> <id>173</id> <edge_type>2</edge_type> <source_obj>70</source_obj> <sink_obj>62</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_152"> <id>174</id> <edge_type>1</edge_type> <source_obj>92</source_obj> <sink_obj>64</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_153"> <id>175</id> <edge_type>2</edge_type> <source_obj>63</source_obj> <sink_obj>64</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_154"> <id>176</id> <edge_type>1</edge_type> <source_obj>68</source_obj> <sink_obj>64</sink_obj> <is_back_edge>1</is_back_edge> </item> <item class_id_reference="20" object_id="_155"> <id>177</id> <edge_type>2</edge_type> <source_obj>82</source_obj> <sink_obj>64</sink_obj> <is_back_edge>1</is_back_edge> </item> <item class_id_reference="20" object_id="_156"> <id>178</id> <edge_type>1</edge_type> <source_obj>64</source_obj> <sink_obj>65</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_157"> <id>179</id> <edge_type>1</edge_type> <source_obj>64</source_obj> <sink_obj>66</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_158"> <id>180</id> <edge_type>1</edge_type> <source_obj>98</source_obj> <sink_obj>66</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_159"> <id>181</id> <edge_type>1</edge_type> <source_obj>64</source_obj> <sink_obj>68</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_160"> <id>182</id> <edge_type>1</edge_type> <source_obj>101</source_obj> <sink_obj>68</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_161"> <id>183</id> <edge_type>1</edge_type> <source_obj>66</source_obj> <sink_obj>69</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_162"> <id>184</id> <edge_type>2</edge_type> <source_obj>82</source_obj> <sink_obj>69</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_163"> <id>185</id> <edge_type>2</edge_type> <source_obj>85</source_obj> <sink_obj>69</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_164"> <id>186</id> <edge_type>1</edge_type> <source_obj>64</source_obj> <sink_obj>72</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_165"> <id>187</id> <edge_type>1</edge_type> <source_obj>59</source_obj> <sink_obj>73</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_166"> <id>188</id> <edge_type>1</edge_type> <source_obj>72</source_obj> <sink_obj>73</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_167"> <id>189</id> <edge_type>1</edge_type> <source_obj>73</source_obj> <sink_obj>74</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_168"> <id>190</id> <edge_type>1</edge_type> <source_obj>8</source_obj> <sink_obj>75</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_169"> <id>191</id> <edge_type>1</edge_type> <source_obj>134</source_obj> <sink_obj>75</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_170"> <id>192</id> <edge_type>1</edge_type> <source_obj>74</source_obj> <sink_obj>75</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_171"> <id>193</id> <edge_type>1</edge_type> <source_obj>75</source_obj> <sink_obj>76</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_172"> <id>194</id> <edge_type>1</edge_type> <source_obj>65</source_obj> <sink_obj>77</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_173"> <id>195</id> <edge_type>1</edge_type> <source_obj>61</source_obj> <sink_obj>77</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_174"> <id>196</id> <edge_type>1</edge_type> <source_obj>77</source_obj> <sink_obj>78</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_175"> <id>197</id> <edge_type>1</edge_type> <source_obj>2</source_obj> <sink_obj>79</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_176"> <id>198</id> <edge_type>1</edge_type> <source_obj>134</source_obj> <sink_obj>79</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_177"> <id>199</id> <edge_type>1</edge_type> <source_obj>78</source_obj> <sink_obj>79</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_178"> <id>200</id> <edge_type>1</edge_type> <source_obj>76</source_obj> <sink_obj>80</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_179"> <id>201</id> <edge_type>1</edge_type> <source_obj>79</source_obj> <sink_obj>80</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_180"> <id>202</id> <edge_type>2</edge_type> <source_obj>70</source_obj> <sink_obj>81</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_181"> <id>203</id> <edge_type>2</edge_type> <source_obj>55</source_obj> <sink_obj>84</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_182"> <id>204</id> <edge_type>1</edge_type> <source_obj>3</source_obj> <sink_obj>47</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_183"> <id>257</id> <edge_type>2</edge_type> <source_obj>10</source_obj> <sink_obj>16</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_184"> <id>258</id> <edge_type>2</edge_type> <source_obj>16</source_obj> <sink_obj>49</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_185"> <id>259</id> <edge_type>2</edge_type> <source_obj>16</source_obj> <sink_obj>24</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_186"> <id>260</id> <edge_type>2</edge_type> <source_obj>24</source_obj> <sink_obj>31</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_187"> <id>261</id> <edge_type>2</edge_type> <source_obj>31</source_obj> <sink_obj>46</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_188"> <id>262</id> <edge_type>2</edge_type> <source_obj>31</source_obj> <sink_obj>43</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_189"> <id>263</id> <edge_type>2</edge_type> <source_obj>43</source_obj> <sink_obj>31</sink_obj> <is_back_edge>1</is_back_edge> </item> <item class_id_reference="20" object_id="_190"> <id>264</id> <edge_type>2</edge_type> <source_obj>46</source_obj> <sink_obj>16</sink_obj> <is_back_edge>1</is_back_edge> </item> <item class_id_reference="20" object_id="_191"> <id>265</id> <edge_type>2</edge_type> <source_obj>49</source_obj> <sink_obj>55</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_192"> <id>266</id> <edge_type>2</edge_type> <source_obj>55</source_obj> <sink_obj>87</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_193"> <id>267</id> <edge_type>2</edge_type> <source_obj>55</source_obj> <sink_obj>63</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_194"> <id>268</id> <edge_type>2</edge_type> <source_obj>63</source_obj> <sink_obj>70</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_195"> <id>269</id> <edge_type>2</edge_type> <source_obj>70</source_obj> <sink_obj>85</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_196"> <id>270</id> <edge_type>2</edge_type> <source_obj>70</source_obj> <sink_obj>82</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_197"> <id>271</id> <edge_type>2</edge_type> <source_obj>82</source_obj> <sink_obj>70</sink_obj> <is_back_edge>1</is_back_edge> </item> <item class_id_reference="20" object_id="_198"> <id>272</id> <edge_type>2</edge_type> <source_obj>85</source_obj> <sink_obj>55</sink_obj> <is_back_edge>1</is_back_edge> </item> </edges> </cdfg> <cdfg_regions class_id="21" tracking_level="0" version="0"> <count>12</count> <item_version>0</item_version> <item class_id="22" tracking_level="1" version="0" object_id="_199"> <mId>1</mId> <mTag>dct</mTag> <mType>0</mType> <sub_regions> <count>5</count> <item_version>0</item_version> <item>2</item> <item>3</item> <item>7</item> <item>8</item> <item>12</item> </sub_regions> <basic_blocks> <count>0</count> <item_version>0</item_version> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>-1</mMinTripCount> <mMaxTripCount>-1</mMaxTripCount> <mMinLatency>2935</mMinLatency> <mMaxLatency>2935</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> <item class_id_reference="22" object_id="_200"> <mId>2</mId> <mTag>Entry</mTag> <mType>0</mType> <sub_regions> <count>0</count> <item_version>0</item_version> </sub_regions> <basic_blocks> <count>1</count> <item_version>0</item_version> <item>10</item> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>-1</mMinTripCount> <mMaxTripCount>-1</mMaxTripCount> <mMinLatency>0</mMinLatency> <mMaxLatency>0</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> <item class_id_reference="22" object_id="_201"> <mId>3</mId> <mTag>RD_Loop_Row</mTag> <mType>1</mType> <sub_regions> <count>3</count> <item_version>0</item_version> <item>4</item> <item>5</item> <item>6</item> </sub_regions> <basic_blocks> <count>0</count> <item_version>0</item_version> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>8</mMinTripCount> <mMaxTripCount>8</mMaxTripCount> <mMinLatency>144</mMinLatency> <mMaxLatency>144</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> <item class_id_reference="22" object_id="_202"> <mId>4</mId> <mTag>Region 1</mTag> <mType>0</mType> <sub_regions> <count>0</count> <item_version>0</item_version> </sub_regions> <basic_blocks> <count>2</count> <item_version>0</item_version> <item>16</item> <item>24</item> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>-1</mMinTripCount> <mMaxTripCount>-1</mMaxTripCount> <mMinLatency>0</mMinLatency> <mMaxLatency>0</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> <item class_id_reference="22" object_id="_203"> <mId>5</mId> <mTag>RD_Loop_Col</mTag> <mType>1</mType> <sub_regions> <count>0</count> <item_version>0</item_version> </sub_regions> <basic_blocks> <count>2</count> <item_version>0</item_version> <item>31</item> <item>43</item> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>8</mMinTripCount> <mMaxTripCount>8</mMaxTripCount> <mMinLatency>16</mMinLatency> <mMaxLatency>16</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> <item class_id_reference="22" object_id="_204"> <mId>6</mId> <mTag>Region 2</mTag> <mType>0</mType> <sub_regions> <count>0</count> <item_version>0</item_version> </sub_regions> <basic_blocks> <count>1</count> <item_version>0</item_version> <item>46</item> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>-1</mMinTripCount> <mMaxTripCount>-1</mMaxTripCount> <mMinLatency>0</mMinLatency> <mMaxLatency>0</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> <item class_id_reference="22" object_id="_205"> <mId>7</mId> <mTag>Region 3</mTag> <mType>0</mType> <sub_regions> <count>0</count> <item_version>0</item_version> </sub_regions> <basic_blocks> <count>1</count> <item_version>0</item_version> <item>49</item> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>-1</mMinTripCount> <mMaxTripCount>-1</mMaxTripCount> <mMinLatency>2645</mMinLatency> <mMaxLatency>2645</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> <item class_id_reference="22" object_id="_206"> <mId>8</mId> <mTag>WR_Loop_Row</mTag> <mType>1</mType> <sub_regions> <count>3</count> <item_version>0</item_version> <item>9</item> <item>10</item> <item>11</item> </sub_regions> <basic_blocks> <count>0</count> <item_version>0</item_version> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>8</mMinTripCount> <mMaxTripCount>8</mMaxTripCount> <mMinLatency>144</mMinLatency> <mMaxLatency>144</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> <item class_id_reference="22" object_id="_207"> <mId>9</mId> <mTag>Region 4</mTag> <mType>0</mType> <sub_regions> <count>0</count> <item_version>0</item_version> </sub_regions> <basic_blocks> <count>2</count> <item_version>0</item_version> <item>55</item> <item>63</item> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>-1</mMinTripCount> <mMaxTripCount>-1</mMaxTripCount> <mMinLatency>0</mMinLatency> <mMaxLatency>0</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> <item class_id_reference="22" object_id="_208"> <mId>10</mId> <mTag>WR_Loop_Col</mTag> <mType>1</mType> <sub_regions> <count>0</count> <item_version>0</item_version> </sub_regions> <basic_blocks> <count>2</count> <item_version>0</item_version> <item>70</item> <item>82</item> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>8</mMinTripCount> <mMaxTripCount>8</mMaxTripCount> <mMinLatency>16</mMinLatency> <mMaxLatency>16</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> <item class_id_reference="22" object_id="_209"> <mId>11</mId> <mTag>Region 5</mTag> <mType>0</mType> <sub_regions> <count>0</count> <item_version>0</item_version> </sub_regions> <basic_blocks> <count>1</count> <item_version>0</item_version> <item>85</item> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>-1</mMinTripCount> <mMaxTripCount>-1</mMaxTripCount> <mMinLatency>0</mMinLatency> <mMaxLatency>0</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> <item class_id_reference="22" object_id="_210"> <mId>12</mId> <mTag>Return</mTag> <mType>0</mType> <sub_regions> <count>0</count> <item_version>0</item_version> </sub_regions> <basic_blocks> <count>1</count> <item_version>0</item_version> <item>87</item> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>-1</mMinTripCount> <mMaxTripCount>-1</mMaxTripCount> <mMinLatency>0</mMinLatency> <mMaxLatency>0</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> </cdfg_regions> <fsm class_id="24" tracking_level="1" version="0" object_id="_211"> <states class_id="25" tracking_level="0" version="0"> <count>8</count> <item_version>0</item_version> <item class_id="26" tracking_level="1" version="0" object_id="_212"> <id>1</id> <operations class_id="27" tracking_level="0" version="0"> <count>6</count> <item_version>0</item_version> <item class_id="28" tracking_level="1" version="0" object_id="_213"> <id>4</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_214"> <id>5</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_215"> <id>6</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_216"> <id>7</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_217"> <id>8</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_218"> <id>9</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_219"> <id>2</id> <operations> <count>13</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_220"> <id>11</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_221"> <id>12</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_222"> <id>13</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_223"> <id>14</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_224"> <id>15</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_225"> <id>17</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_226"> <id>18</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_227"> <id>19</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_228"> <id>20</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_229"> <id>21</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_230"> <id>22</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_231"> <id>23</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_232"> <id>47</id> <stage>2</stage> <latency>2</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_233"> <id>3</id> <operations> <count>14</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_234"> <id>25</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_235"> <id>26</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_236"> <id>27</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_237"> <id>28</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_238"> <id>29</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_239"> <id>30</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_240"> <id>33</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_241"> <id>34</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_242"> <id>35</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_243"> <id>36</id> <stage>2</stage> <latency>2</latency> </item> <item class_id_reference="28" object_id="_244"> <id>37</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_245"> <id>38</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_246"> <id>44</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_247"> <id>45</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_248"> <id>4</id> <operations> <count>6</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_249"> <id>32</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_250"> <id>36</id> <stage>1</stage> <latency>2</latency> </item> <item class_id_reference="28" object_id="_251"> <id>39</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_252"> <id>40</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_253"> <id>41</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_254"> <id>42</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_255"> <id>5</id> <operations> <count>2</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_256"> <id>47</id> <stage>1</stage> <latency>2</latency> </item> <item class_id_reference="28" object_id="_257"> <id>48</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_258"> <id>6</id> <operations> <count>13</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_259"> <id>50</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_260"> <id>51</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_261"> <id>52</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_262"> <id>53</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_263"> <id>54</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_264"> <id>56</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_265"> <id>57</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_266"> <id>58</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_267"> <id>59</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_268"> <id>60</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_269"> <id>61</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_270"> <id>62</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_271"> <id>86</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_272"> <id>7</id> <operations> <count>14</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_273"> <id>64</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_274"> <id>65</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_275"> <id>66</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_276"> <id>67</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_277"> <id>68</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_278"> <id>69</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_279"> <id>72</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_280"> <id>73</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_281"> <id>74</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_282"> <id>75</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_283"> <id>76</id> <stage>2</stage> <latency>2</latency> </item> <item class_id_reference="28" object_id="_284"> <id>77</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_285"> <id>83</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_286"> <id>84</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_287"> <id>8</id> <operations> <count>6</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_288"> <id>71</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_289"> <id>76</id> <stage>1</stage> <latency>2</latency> </item> <item class_id_reference="28" object_id="_290"> <id>78</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_291"> <id>79</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_292"> <id>80</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_293"> <id>81</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> </states> <transitions class_id="29" tracking_level="0" version="0"> <count>11</count> <item_version>0</item_version> <item class_id="30" tracking_level="1" version="0" object_id="_294"> <inState>1</inState> <outState>2</outState> <condition class_id="31" tracking_level="0" version="0"> <id>-1</id> <sop class_id="32" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="33" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_295"> <inState>2</inState> <outState>5</outState> <condition> <id>-1</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>1</count> <item_version>0</item_version> <item class_id="34" tracking_level="0" version="0"> <first class_id="35" tracking_level="0" version="0"> <first>12</first> <second>0</second> </first> <second>0</second> </item> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_296"> <inState>2</inState> <outState>3</outState> <condition> <id>-1</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>1</count> <item_version>0</item_version> <item> <first> <first>12</first> <second>0</second> </first> <second>1</second> </item> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_297"> <inState>3</inState> <outState>4</outState> <condition> <id>-1</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>1</count> <item_version>0</item_version> <item> <first> <first>27</first> <second>0</second> </first> <second>1</second> </item> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_298"> <inState>4</inState> <outState>3</outState> <condition> <id>-1</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_299"> <inState>3</inState> <outState>2</outState> <condition> <id>-1</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>1</count> <item_version>0</item_version> <item> <first> <first>27</first> <second>0</second> </first> <second>0</second> </item> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_300"> <inState>5</inState> <outState>6</outState> <condition> <id>-1</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_301"> <inState>6</inState> <outState>7</outState> <condition> <id>-1</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>1</count> <item_version>0</item_version> <item> <first> <first>51</first> <second>0</second> </first> <second>1</second> </item> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_302"> <inState>7</inState> <outState>8</outState> <condition> <id>-1</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>1</count> <item_version>0</item_version> <item> <first> <first>66</first> <second>0</second> </first> <second>1</second> </item> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_303"> <inState>8</inState> <outState>7</outState> <condition> <id>-1</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_304"> <inState>7</inState> <outState>6</outState> <condition> <id>-1</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>1</count> <item_version>0</item_version> <item> <first> <first>66</first> <second>0</second> </first> <second>0</second> </item> </item> </sop> </condition> </item> </transitions> </fsm> <res class_id="-1"></res> <node_label_latency class_id="37" tracking_level="0" version="0"> <count>56</count> <item_version>0</item_version> <item class_id="38" tracking_level="0" version="0"> <first>7</first> <second class_id="39" tracking_level="0" version="0"> <first>0</first> <second>0</second> </second> </item> <item> <first>8</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>9</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>11</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>12</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>14</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>15</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>19</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>20</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>21</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>22</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>23</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>25</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>26</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>27</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>29</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>30</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>33</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>34</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>35</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>36</first> <second> <first>2</first> <second>1</second> </second> </item> <item> <first>37</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>38</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>39</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>40</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>41</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>42</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>45</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>47</first> <second> <first>1</first> <second>1</second> </second> </item> <item> <first>48</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>50</first> <second> <first>5</first> <second>0</second> </second> </item> <item> <first>51</first> <second> <first>5</first> <second>0</second> </second> </item> <item> <first>53</first> <second> <first>5</first> <second>0</second> </second> </item> <item> <first>54</first> <second> <first>5</first> <second>0</second> </second> </item> <item> <first>58</first> <second> <first>5</first> <second>0</second> </second> </item> <item> <first>59</first> <second> <first>5</first> <second>0</second> </second> </item> <item> <first>60</first> <second> <first>5</first> <second>0</second> </second> </item> <item> <first>61</first> <second> <first>5</first> <second>0</second> </second> </item> <item> <first>62</first> <second> <first>5</first> <second>0</second> </second> </item> <item> <first>64</first> <second> <first>6</first> <second>0</second> </second> </item> <item> <first>65</first> <second> <first>6</first> <second>0</second> </second> </item> <item> <first>66</first> <second> <first>6</first> <second>0</second> </second> </item> <item> <first>68</first> <second> <first>6</first> <second>0</second> </second> </item> <item> <first>69</first> <second> <first>6</first> <second>0</second> </second> </item> <item> <first>72</first> <second> <first>6</first> <second>0</second> </second> </item> <item> <first>73</first> <second> <first>6</first> <second>0</second> </second> </item> <item> <first>74</first> <second> <first>6</first> <second>0</second> </second> </item> <item> <first>75</first> <second> <first>6</first> <second>0</second> </second> </item> <item> <first>76</first> <second> <first>6</first> <second>1</second> </second> </item> <item> <first>77</first> <second> <first>6</first> <second>0</second> </second> </item> <item> <first>78</first> <second> <first>7</first> <second>0</second> </second> </item> <item> <first>79</first> <second> <first>7</first> <second>0</second> </second> </item> <item> <first>80</first> <second> <first>7</first> <second>0</second> </second> </item> <item> <first>81</first> <second> <first>7</first> <second>0</second> </second> </item> <item> <first>84</first> <second> <first>6</first> <second>0</second> </second> </item> <item> <first>86</first> <second> <first>5</first> <second>0</second> </second> </item> </node_label_latency> <bblk_ent_exit class_id="40" tracking_level="0" version="0"> <count>13</count> <item_version>0</item_version> <item class_id="41" tracking_level="0" version="0"> <first>10</first> <second class_id="42" tracking_level="0" version="0"> <first>0</first> <second>0</second> </second> </item> <item> <first>16</first> <second> <first>1</first> <second>1</second> </second> </item> <item> <first>24</first> <second> <first>1</first> <second>1</second> </second> </item> <item> <first>31</first> <second> <first>2</first> <second>2</second> </second> </item> <item> <first>43</first> <second> <first>2</first> <second>3</second> </second> </item> <item> <first>46</first> <second> <first>2</first> <second>2</second> </second> </item> <item> <first>49</first> <second> <first>1</first> <second>2</second> </second> </item> <item> <first>55</first> <second> <first>3</first> <second>3</second> </second> </item> <item> <first>63</first> <second> <first>3</first> <second>3</second> </second> </item> <item> <first>70</first> <second> <first>4</first> <second>4</second> </second> </item> <item> <first>82</first> <second> <first>4</first> <second>5</second> </second> </item> <item> <first>85</first> <second> <first>4</first> <second>4</second> </second> </item> <item> <first>87</first> <second> <first>3</first> <second>3</second> </second> </item> </bblk_ent_exit> <regions class_id="43" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </regions> <dp_fu_nodes class_id="44" tracking_level="0" version="0"> <count>43</count> <item_version>0</item_version> <item class_id="45" tracking_level="0" version="0"> <first>48</first> <second> <count>1</count> <item_version>0</item_version> <item>7</item> </second> </item> <item> <first>52</first> <second> <count>1</count> <item_version>0</item_version> <item>8</item> </second> </item> <item> <first>56</first> <second> <count>1</count> <item_version>0</item_version> <item>35</item> </second> </item> <item> <first>63</first> <second> <count>2</count> <item_version>0</item_version> <item>36</item> <item>36</item> </second> </item> <item> <first>69</first> <second> <count>1</count> <item_version>0</item_version> <item>40</item> </second> </item> <item> <first>75</first> <second> <count>1</count> <item_version>0</item_version> <item>41</item> </second> </item> <item> <first>82</first> <second> <count>1</count> <item_version>0</item_version> <item>75</item> </second> </item> <item> <first>88</first> <second> <count>2</count> <item_version>0</item_version> <item>76</item> <item>76</item> </second> </item> <item> <first>94</first> <second> <count>1</count> <item_version>0</item_version> <item>79</item> </second> </item> <item> <first>101</first> <second> <count>1</count> <item_version>0</item_version> <item>80</item> </second> </item> <item> <first>112</first> <second> <count>1</count> <item_version>0</item_version> <item>11</item> </second> </item> <item> <first>123</first> <second> <count>1</count> <item_version>0</item_version> <item>25</item> </second> </item> <item> <first>134</first> <second> <count>1</count> <item_version>0</item_version> <item>50</item> </second> </item> <item> <first>145</first> <second> <count>1</count> <item_version>0</item_version> <item>64</item> </second> </item> <item> <first>152</first> <second> <count>2</count> <item_version>0</item_version> <item>47</item> <item>47</item> </second> </item> <item> <first>160</first> <second> <count>1</count> <item_version>0</item_version> <item>12</item> </second> </item> <item> <first>166</first> <second> <count>1</count> <item_version>0</item_version> <item>14</item> </second> </item> <item> <first>172</first> <second> <count>1</count> <item_version>0</item_version> <item>19</item> </second> </item> <item> <first>176</first> <second> <count>1</count> <item_version>0</item_version> <item>20</item> </second> </item> <item> <first>184</first> <second> <count>1</count> <item_version>0</item_version> <item>21</item> </second> </item> <item> <first>192</first> <second> <count>1</count> <item_version>0</item_version> <item>22</item> </second> </item> <item> <first>196</first> <second> <count>1</count> <item_version>0</item_version> <item>26</item> </second> </item> <item> <first>200</first> <second> <count>1</count> <item_version>0</item_version> <item>27</item> </second> </item> <item> <first>206</first> <second> <count>1</count> <item_version>0</item_version> <item>29</item> </second> </item> <item> <first>212</first> <second> <count>1</count> <item_version>0</item_version> <item>33</item> </second> </item> <item> <first>217</first> <second> <count>1</count> <item_version>0</item_version> <item>34</item> </second> </item> <item> <first>222</first> <second> <count>1</count> <item_version>0</item_version> <item>37</item> </second> </item> <item> <first>226</first> <second> <count>1</count> <item_version>0</item_version> <item>38</item> </second> </item> <item> <first>231</first> <second> <count>1</count> <item_version>0</item_version> <item>39</item> </second> </item> <item> <first>235</first> <second> <count>1</count> <item_version>0</item_version> <item>51</item> </second> </item> <item> <first>241</first> <second> <count>1</count> <item_version>0</item_version> <item>53</item> </second> </item> <item> <first>247</first> <second> <count>1</count> <item_version>0</item_version> <item>58</item> </second> </item> <item> <first>255</first> <second> <count>1</count> <item_version>0</item_version> <item>59</item> </second> </item> <item> <first>259</first> <second> <count>1</count> <item_version>0</item_version> <item>60</item> </second> </item> <item> <first>263</first> <second> <count>1</count> <item_version>0</item_version> <item>61</item> </second> </item> <item> <first>271</first> <second> <count>1</count> <item_version>0</item_version> <item>65</item> </second> </item> <item> <first>275</first> <second> <count>1</count> <item_version>0</item_version> <item>66</item> </second> </item> <item> <first>281</first> <second> <count>1</count> <item_version>0</item_version> <item>68</item> </second> </item> <item> <first>287</first> <second> <count>1</count> <item_version>0</item_version> <item>72</item> </second> </item> <item> <first>291</first> <second> <count>1</count> <item_version>0</item_version> <item>73</item> </second> </item> <item> <first>296</first> <second> <count>1</count> <item_version>0</item_version> <item>74</item> </second> </item> <item> <first>301</first> <second> <count>1</count> <item_version>0</item_version> <item>77</item> </second> </item> <item> <first>306</first> <second> <count>1</count> <item_version>0</item_version> <item>78</item> </second> </item> </dp_fu_nodes> <dp_fu_nodes_expression class_id="47" tracking_level="0" version="0"> <count>38</count> <item_version>0</item_version> <item class_id="48" tracking_level="0" version="0"> <first>add_ln104_1_fu_226</first> <second> <count>1</count> <item_version>0</item_version> <item>38</item> </second> </item> <item> <first>add_ln104_fu_212</first> <second> <count>1</count> <item_version>0</item_version> <item>33</item> </second> </item> <item> <first>add_ln116_1_fu_291</first> <second> <count>1</count> <item_version>0</item_version> <item>73</item> </second> </item> <item> <first>add_ln116_fu_301</first> <second> <count>1</count> <item_version>0</item_version> <item>77</item> </second> </item> <item> <first>buf_2d_in_addr_gep_fu_69</first> <second> <count>1</count> <item_version>0</item_version> <item>40</item> </second> </item> <item> <first>buf_2d_in_alloca_fu_48</first> <second> <count>1</count> <item_version>0</item_version> <item>7</item> </second> </item> <item> <first>buf_2d_out_addr_gep_fu_82</first> <second> <count>1</count> <item_version>0</item_version> <item>75</item> </second> </item> <item> <first>buf_2d_out_alloca_fu_52</first> <second> <count>1</count> <item_version>0</item_version> <item>8</item> </second> </item> <item> <first>c_0_i4_phi_fu_145</first> <second> <count>1</count> <item_version>0</item_version> <item>64</item> </second> </item> <item> <first>c_0_i_phi_fu_123</first> <second> <count>1</count> <item_version>0</item_version> <item>25</item> </second> </item> <item> <first>c_1_fu_281</first> <second> <count>1</count> <item_version>0</item_version> <item>68</item> </second> </item> <item> <first>c_fu_206</first> <second> <count>1</count> <item_version>0</item_version> <item>29</item> </second> </item> <item> <first>icmp_ln101_fu_160</first> <second> <count>1</count> <item_version>0</item_version> <item>12</item> </second> </item> <item> <first>icmp_ln103_fu_200</first> <second> <count>1</count> <item_version>0</item_version> <item>27</item> </second> </item> <item> <first>icmp_ln113_fu_235</first> <second> <count>1</count> <item_version>0</item_version> <item>51</item> </second> </item> <item> <first>icmp_ln115_fu_275</first> <second> <count>1</count> <item_version>0</item_version> <item>66</item> </second> </item> <item> <first>input_addr_gep_fu_56</first> <second> <count>1</count> <item_version>0</item_version> <item>35</item> </second> </item> <item> <first>output_addr_gep_fu_94</first> <second> <count>1</count> <item_version>0</item_version> <item>79</item> </second> </item> <item> <first>r_0_i2_phi_fu_134</first> <second> <count>1</count> <item_version>0</item_version> <item>50</item> </second> </item> <item> <first>r_0_i_phi_fu_112</first> <second> <count>1</count> <item_version>0</item_version> <item>11</item> </second> </item> <item> <first>r_1_fu_241</first> <second> <count>1</count> <item_version>0</item_version> <item>53</item> </second> </item> <item> <first>r_fu_166</first> <second> <count>1</count> <item_version>0</item_version> <item>14</item> </second> </item> <item> <first>shl_ln1_fu_263</first> <second> <count>1</count> <item_version>0</item_version> <item>61</item> </second> </item> <item> <first>shl_ln_fu_176</first> <second> <count>1</count> <item_version>0</item_version> <item>20</item> </second> </item> <item> <first>tmp_9_fu_184</first> <second> <count>1</count> <item_version>0</item_version> <item>21</item> </second> </item> <item> <first>tmp_s_fu_247</first> <second> <count>1</count> <item_version>0</item_version> <item>58</item> </second> </item> <item> <first>trunc_ln104_fu_172</first> <second> <count>1</count> <item_version>0</item_version> <item>19</item> </second> </item> <item> <first>trunc_ln116_fu_259</first> <second> <count>1</count> <item_version>0</item_version> <item>60</item> </second> </item> <item> <first>zext_ln103_1_fu_192</first> <second> <count>1</count> <item_version>0</item_version> <item>22</item> </second> </item> <item> <first>zext_ln103_fu_196</first> <second> <count>1</count> <item_version>0</item_version> <item>26</item> </second> </item> <item> <first>zext_ln104_1_fu_222</first> <second> <count>1</count> <item_version>0</item_version> <item>37</item> </second> </item> <item> <first>zext_ln104_2_fu_231</first> <second> <count>1</count> <item_version>0</item_version> <item>39</item> </second> </item> <item> <first>zext_ln104_fu_217</first> <second> <count>1</count> <item_version>0</item_version> <item>34</item> </second> </item> <item> <first>zext_ln115_fu_271</first> <second> <count>1</count> <item_version>0</item_version> <item>65</item> </second> </item> <item> <first>zext_ln116_1_fu_287</first> <second> <count>1</count> <item_version>0</item_version> <item>72</item> </second> </item> <item> <first>zext_ln116_2_fu_306</first> <second> <count>1</count> <item_version>0</item_version> <item>78</item> </second> </item> <item> <first>zext_ln116_3_fu_296</first> <second> <count>1</count> <item_version>0</item_version> <item>74</item> </second> </item> <item> <first>zext_ln116_fu_255</first> <second> <count>1</count> <item_version>0</item_version> <item>59</item> </second> </item> </dp_fu_nodes_expression> <dp_fu_nodes_module> <count>1</count> <item_version>0</item_version> <item> <first>grp_dct_2d_fu_152</first> <second> <count>2</count> <item_version>0</item_version> <item>47</item> <item>47</item> </second> </item> </dp_fu_nodes_module> <dp_fu_nodes_io> <count>0</count> <item_version>0</item_version> </dp_fu_nodes_io> <return_ports> <count>0</count> <item_version>0</item_version> </return_ports> <dp_mem_port_nodes class_id="49" tracking_level="0" version="0"> <count>7</count> <item_version>0</item_version> <item class_id="50" tracking_level="0" version="0"> <first class_id="51" tracking_level="0" version="0"> <first>buf_2d_in</first> <second>0</second> </first> <second> <count>1</count> <item_version>0</item_version> <item>41</item> </second> </item> <item> <first> <first>buf_2d_in</first> <second>100</second> </first> <second> <count>1</count> <item_version>0</item_version> <item>47</item> </second> </item> <item> <first> <first>buf_2d_out</first> <second>0</second> </first> <second> <count>2</count> <item_version>0</item_version> <item>76</item> <item>76</item> </second> </item> <item> <first> <first>buf_2d_out</first> <second>100</second> </first> <second> <count>1</count> <item_version>0</item_version> <item>47</item> </second> </item> <item> <first> <first>dct_coeff_table</first> <second>100</second> </first> <second> <count>1</count> <item_version>0</item_version> <item>47</item> </second> </item> <item> <first> <first>input_r</first> <second>0</second> </first> <second> <count>2</count> <item_version>0</item_version> <item>36</item> <item>36</item> </second> </item> <item> <first> <first>output_r</first> <second>0</second> </first> <second> <count>1</count> <item_version>0</item_version> <item>80</item> </second> </item> </dp_mem_port_nodes> <dp_reg_nodes> <count>16</count> <item_version>0</item_version> <item> <first>108</first> <second> <count>1</count> <item_version>0</item_version> <item>11</item> </second> </item> <item> <first>119</first> <second> <count>1</count> <item_version>0</item_version> <item>25</item> </second> </item> <item> <first>130</first> <second> <count>1</count> <item_version>0</item_version> <item>50</item> </second> </item> <item> <first>141</first> <second> <count>1</count> <item_version>0</item_version> <item>64</item> </second> </item> <item> <first>313</first> <second> <count>1</count> <item_version>0</item_version> <item>14</item> </second> </item> <item> <first>318</first> <second> <count>1</count> <item_version>0</item_version> <item>20</item> </second> </item> <item> <first>323</first> <second> <count>1</count> <item_version>0</item_version> <item>22</item> </second> </item> <item> <first>331</first> <second> <count>1</count> <item_version>0</item_version> <item>29</item> </second> </item> <item> <first>336</first> <second> <count>1</count> <item_version>0</item_version> <item>35</item> </second> </item> <item> <first>341</first> <second> <count>1</count> <item_version>0</item_version> <item>38</item> </second> </item> <item> <first>349</first> <second> <count>1</count> <item_version>0</item_version> <item>53</item> </second> </item> <item> <first>354</first> <second> <count>1</count> <item_version>0</item_version> <item>59</item> </second> </item> <item> <first>359</first> <second> <count>1</count> <item_version>0</item_version> <item>61</item> </second> </item> <item> <first>367</first> <second> <count>1</count> <item_version>0</item_version> <item>68</item> </second> </item> <item> <first>372</first> <second> <count>1</count> <item_version>0</item_version> <item>75</item> </second> </item> <item> <first>377</first> <second> <count>1</count> <item_version>0</item_version> <item>77</item> </second> </item> </dp_reg_nodes> <dp_regname_nodes> <count>16</count> <item_version>0</item_version> <item> <first>add_ln104_1_reg_341</first> <second> <count>1</count> <item_version>0</item_version> <item>38</item> </second> </item> <item> <first>add_ln116_reg_377</first> <second> <count>1</count> <item_version>0</item_version> <item>77</item> </second> </item> <item> <first>buf_2d_out_addr_reg_372</first> <second> <count>1</count> <item_version>0</item_version> <item>75</item> </second> </item> <item> <first>c_0_i4_reg_141</first> <second> <count>1</count> <item_version>0</item_version> <item>64</item> </second> </item> <item> <first>c_0_i_reg_119</first> <second> <count>1</count> <item_version>0</item_version> <item>25</item> </second> </item> <item> <first>c_1_reg_367</first> <second> <count>1</count> <item_version>0</item_version> <item>68</item> </second> </item> <item> <first>c_reg_331</first> <second> <count>1</count> <item_version>0</item_version> <item>29</item> </second> </item> <item> <first>input_addr_reg_336</first> <second> <count>1</count> <item_version>0</item_version> <item>35</item> </second> </item> <item> <first>r_0_i2_reg_130</first> <second> <count>1</count> <item_version>0</item_version> <item>50</item> </second> </item> <item> <first>r_0_i_reg_108</first> <second> <count>1</count> <item_version>0</item_version> <item>11</item> </second> </item> <item> <first>r_1_reg_349</first> <second> <count>1</count> <item_version>0</item_version> <item>53</item> </second> </item> <item> <first>r_reg_313</first> <second> <count>1</count> <item_version>0</item_version> <item>14</item> </second> </item> <item> <first>shl_ln1_reg_359</first> <second> <count>1</count> <item_version>0</item_version> <item>61</item> </second> </item> <item> <first>shl_ln_reg_318</first> <second> <count>1</count> <item_version>0</item_version> <item>20</item> </second> </item> <item> <first>zext_ln103_1_reg_323</first> <second> <count>1</count> <item_version>0</item_version> <item>22</item> </second> </item> <item> <first>zext_ln116_reg_354</first> <second> <count>1</count> <item_version>0</item_version> <item>59</item> </second> </item> </dp_regname_nodes> <dp_reg_phi> <count>4</count> <item_version>0</item_version> <item> <first>108</first> <second> <count>1</count> <item_version>0</item_version> <item>11</item> </second> </item> <item> <first>119</first> <second> <count>1</count> <item_version>0</item_version> <item>25</item> </second> </item> <item> <first>130</first> <second> <count>1</count> <item_version>0</item_version> <item>50</item> </second> </item> <item> <first>141</first> <second> <count>1</count> <item_version>0</item_version> <item>64</item> </second> </item> </dp_reg_phi> <dp_regname_phi> <count>4</count> <item_version>0</item_version> <item> <first>c_0_i4_reg_141</first> <second> <count>1</count> <item_version>0</item_version> <item>64</item> </second> </item> <item> <first>c_0_i_reg_119</first> <second> <count>1</count> <item_version>0</item_version> <item>25</item> </second> </item> <item> <first>r_0_i2_reg_130</first> <second> <count>1</count> <item_version>0</item_version> <item>50</item> </second> </item> <item> <first>r_0_i_reg_108</first> <second> <count>1</count> <item_version>0</item_version> <item>11</item> </second> </item> </dp_regname_phi> <dp_port_io_nodes class_id="52" tracking_level="0" version="0"> <count>2</count> <item_version>0</item_version> <item class_id="53" tracking_level="0" version="0"> <first>input_r(p0)</first> <second> <count>1</count> <item_version>0</item_version> <item> <first>load</first> <second> <count>2</count> <item_version>0</item_version> <item>36</item> <item>36</item> </second> </item> </second> </item> <item> <first>output_r(p0)</first> <second> <count>1</count> <item_version>0</item_version> <item> <first>store</first> <second> <count>1</count> <item_version>0</item_version> <item>80</item> </second> </item> </second> </item> </dp_port_io_nodes> <port2core class_id="54" tracking_level="0" version="0"> <count>2</count> <item_version>0</item_version> <item class_id="55" tracking_level="0" version="0"> <first>1</first> <second>RAM</second> </item> <item> <first>2</first> <second>RAM</second> </item> </port2core> <node2core> <count>2</count> <item_version>0</item_version> <item> <first>7</first> <second>RAM</second> </item> <item> <first>8</first> <second>RAM</second> </item> </node2core> </syndb> </boost_serialization>
25.648298
93
0.587615
3912067d9f5823d20ec6e01cb807c6e6143c84df
11,792
adb
Ada
wayland_ada_scanner/src/xml_parser_utils.adb
onox/wayland-ada
9317b87482af03a650e02543a3cb46f20bb747d0
[ "Apache-2.0" ]
5
2021-01-11T01:32:16.000Z
2022-02-03T00:08:11.000Z
wayland_ada_scanner/src/xml_parser_utils.adb
onox/wayland-ada
9317b87482af03a650e02543a3cb46f20bb747d0
[ "Apache-2.0" ]
11
2021-01-11T20:12:20.000Z
2022-02-04T09:47:13.000Z
wayland_ada_scanner/src/xml_parser_utils.adb
onox/wayland-ada
9317b87482af03a650e02543a3cb46f20bb747d0
[ "Apache-2.0" ]
null
null
null
-- SPDX-License-Identifier: Apache-2.0 -- -- Copyright (c) 2018 - 2019 Joakim Strandberg <[email protected]> -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. with Ada.Strings.Unbounded; with Ada.Characters.Handling; with Ada.Characters.Latin_1; package body Xml_Parser_Utils is use Ada.Characters.Handling; package L1 renames Ada.Characters.Latin_1; use all type Ada.Strings.Unbounded.Unbounded_String; use all type Wayland_XML.Arg_Tag; use all type Wayland_XML.Event_Tag; use all type Wayland_XML.Request_Tag; use all type Wayland_XML.Interface_Tag; use all type Wayland_XML.Protocol_Tag; use all type Wayland_XML.Arg_Type_Attribute; use all type Wayland_XML.Event_Child_Kind_Id; use all type Wayland_XML.Request_Child_Kind_Id; use all type Wayland_XML.Interface_Child_Kind_Id; use all type Wayland_XML.Protocol_Child_Kind_Id; use type Ada.Containers.Count_Type; -- This procedure strips away the first few characters if they -- are "wl_", "wp_", or "zwp_". procedure Remove_Prefix (Name : in out Ada.Strings.Unbounded.Unbounded_String) is begin if Name = "Wl_" or Name = "Wp_" or Name = "Zwp_" or Name = "Zxdg_" then Set_Unbounded_String (Name, ""); end if; end Remove_Prefix; function Adaify_Variable_Name (Old_Name : String) return String is Result : constant String := Adaify_Name (Old_Name); begin if Result = "Interface" then return Result & "_V"; else return Result; end if; end Adaify_Variable_Name; function Adaify_Name (Old_Name : String) return String is New_Name : Ada.Strings.Unbounded.Unbounded_String; P : Integer := Old_Name'First; CP : Character := L1.NUL; Is_Previous_Lowercase : Boolean := False; Is_Previous_A_Number : Boolean := False; Is_Previous_An_Undercase : Boolean := False; Is_Previous_V : Boolean := False; begin CP := Old_Name (P); P := P + 1; Append (New_Name, To_Upper (CP)); while P <= Old_Name'Last loop CP := Old_Name (P); P := P + 1; if CP = '_' then Append (New_Name, "_"); Remove_Prefix (New_Name); Is_Previous_An_Undercase := True; else if Is_Digit (CP) then if Is_Previous_A_Number then Append (New_Name, CP); elsif Is_Previous_An_Undercase then Append (New_Name, CP); elsif Is_Previous_V then Append (New_Name, CP); Is_Previous_V := False; else Append (New_Name, "_"); Remove_Prefix (New_Name); Append (New_Name, CP); end if; Is_Previous_A_Number := True; else if Is_Upper (CP) then if Is_Previous_An_Undercase then Append (New_Name, CP); Is_Previous_Lowercase := False; elsif Is_Previous_Lowercase then Append (New_Name, "_"); Remove_Prefix (New_Name); Append (New_Name, CP); Is_Previous_Lowercase := False; else Append (New_Name, To_Lower (CP)); end if; else if Is_Previous_An_Undercase then Append (New_Name, To_Upper (CP)); Is_Previous_V := CP = 'v'; else Append (New_Name, CP); end if; Is_Previous_Lowercase := True; end if; Is_Previous_A_Number := False; end if; Is_Previous_An_Undercase := False; end if; end loop; if To_String (New_Name) = "Class_" then Set_Unbounded_String (New_Name, "Class_V"); -- To handle the following case: -- <request name="set_class"> -- ... -- <arg name="class_" type="string" summary="surface class"/> -- </request> -- Identifiers in Ada cannot end with underscore "_". end if; if To_String (New_Name) = "Delay" then Set_Unbounded_String (New_Name, "Delay_V"); -- To handle: -- <arg name="delay" type="int" summary="delay in ..."/> -- "delay" is a reserved word in Ada. end if; return To_String (New_Name); end Adaify_Name; function Arg_Type_As_String (Arg_Tag : Wayland_XML.Arg_Tag) return String is N : Ada.Strings.Unbounded.Unbounded_String; begin case Type_Attribute (Arg_Tag) is when Type_Integer => Set_Unbounded_String (N, "Integer"); when Type_Unsigned_Integer => Set_Unbounded_String (N, "Unsigned_32"); when Type_String => Set_Unbounded_String (N, "chars_ptr"); when Type_FD => Set_Unbounded_String (N, "File_Descriptor"); when Type_New_Id | Type_Object => if Exists_Interface_Attribute (Arg_Tag) then Set_Unbounded_String (N, Adaify_Name (Interface_Attribute (Arg_Tag)) & "_Ptr"); else Set_Unbounded_String (N, "Void_Ptr"); end if; when Type_Fixed => Set_Unbounded_String (N, "Fixed"); when Type_Array => Set_Unbounded_String (N, "Wayland_Array"); end case; return To_String (N); end Arg_Type_As_String; function Number_Of_Args (Request_Tag : aliased Wayland_XML.Request_Tag) return Natural is N : Natural := 0; begin for Child of Children (Request_Tag) loop if Child.Kind_Id = Child_Arg then N := N + 1; end if; end loop; return N; end Number_Of_Args; function Is_New_Id_Argument_Present (Request_Tag : aliased Wayland_XML.Request_Tag) return Boolean is begin for Child of Children (Request_Tag) loop if Child.Kind_Id = Child_Arg and then Exists_Type_Attribute (Child.Arg_Tag.all) and then Type_Attribute (Child.Arg_Tag.all) = Type_New_Id then return True; end if; end loop; return False; end Is_New_Id_Argument_Present; function Is_Interface_Specified (Request_Tag : aliased Wayland_XML.Request_Tag) return Boolean is begin for Child of Children (Request_Tag) loop if Child.Kind_Id = Child_Arg and then Exists_Type_Attribute (Child.Arg_Tag.all) and then Type_Attribute (Child.Arg_Tag.all) = Type_New_Id and then Exists_Interface_Attribute (Child.Arg_Tag.all) then return True; end if; end loop; return False; end Is_Interface_Specified; function Find_Specified_Interface (Request_Tag : aliased Wayland_XML.Request_Tag) return String is begin for Child of Children (Request_Tag) loop if Child.Kind_Id = Child_Arg and then Exists_Type_Attribute (Child.Arg_Tag.all) and then Type_Attribute (Child.Arg_Tag.all) = Type_New_Id and then Exists_Interface_Attribute (Child.Arg_Tag.all) then return Interface_Attribute (Child.Arg_Tag.all); end if; end loop; raise Interface_Not_Found_Exception; end Find_Specified_Interface; function Is_Request_Destructor (Request_Tag : aliased Wayland_XML.Request_Tag) return Boolean is Result : Boolean := False; V : Wayland_XML.Request_Child_Vectors.Vector; begin for Child of Children (Request_Tag) loop if Child.Kind_Id = Child_Arg then V.Append (Child); end if; end loop; if Exists_Type_Attribute (Request_Tag) and then Type_Attribute (Request_Tag) = "destructor" then pragma Assert (V.Length = 0); Result := True; end if; return Result; end Is_Request_Destructor; function Get_Destructor (Interface_Tag : aliased Wayland_XML.Interface_Tag) return String is begin for Child of Children (Interface_Tag) loop case Child.Kind_Id is when Child_Dummy => null; when Child_Description => null; when Child_Request => if Is_Request_Destructor (Child.Request_Tag.all) then return Name (Child.Request_Tag.all); end if; when Child_Event => null; when Child_Enum => null; end case; end loop; return ""; end Get_Destructor; function Exists_Any_Event_Tag (Interface_Tag : aliased Wayland_XML.Interface_Tag) return Boolean is Result : Boolean := False; begin for Child of Children (Interface_Tag) loop case Child.Kind_Id is when Child_Dummy => null; when Child_Description => null; when Child_Request => null; when Child_Event => Result := True; exit; when Child_Enum => null; end case; end loop; return Result; end Exists_Any_Event_Tag; function Make (Text : String) return Interval_Identifier is Interval : Xml_Parser_Utils.Interval := (First => 1, Last => 0); P : Integer := Text'First; Prev_P : Integer := P; Prev_Prev_P : Integer; CP : Character; Is_Previous_New_Line : Boolean := False; begin return This : Interval_Identifier do while P in Text'Range loop Prev_Prev_P := Prev_P; Prev_P := P; CP := Text (P); P := P + 1; if CP = L1.LF then if Prev_P > Text'First then if not Is_Previous_New_Line then Interval.Last := Prev_Prev_P; This.My_Intervals.Append (Interval); else Interval := (First => 1, Last => 0); This.My_Intervals.Append (Interval); end if; end if; Is_Previous_New_Line := True; elsif CP = L1.CR then Is_Previous_New_Line := True; else if Is_Previous_New_Line then Interval.First := Prev_P; end if; Is_Previous_New_Line := False; end if; end loop; end return; end Make; function Remove_Tabs (Text : String) return String is S : Ada.Strings.Unbounded.Unbounded_String; P : Integer := Text'First; CP : Character; begin while P in Text'Range loop CP := Text (P); P := P + 1; if CP /= L1.HT then Ada.Strings.Unbounded.Append (S, CP); else Ada.Strings.Unbounded.Append (S, " "); end if; end loop; return To_String (S); end Remove_Tabs; end Xml_Parser_Utils;
31.278515
79
0.575475
1c8546df40478eda89a069a20c1d3d6d4123d7cd
7,319
ads
Ada
source/nodes/program-nodes-package_instantiations.ads
optikos/oasis
9f64d46d26d964790d69f9db681c874cfb3bf96d
[ "MIT" ]
null
null
null
source/nodes/program-nodes-package_instantiations.ads
optikos/oasis
9f64d46d26d964790d69f9db681c874cfb3bf96d
[ "MIT" ]
null
null
null
source/nodes/program-nodes-package_instantiations.ads
optikos/oasis
9f64d46d26d964790d69f9db681c874cfb3bf96d
[ "MIT" ]
2
2019-09-14T23:18:50.000Z
2019-10-02T10:11:40.000Z
-- Copyright (c) 2019 Maxim Reznik <[email protected]> -- -- SPDX-License-Identifier: MIT -- License-Filename: LICENSE ------------------------------------------------------------- with Program.Lexical_Elements; with Program.Elements.Defining_Names; with Program.Elements.Expressions; with Program.Elements.Parameter_Associations; with Program.Elements.Aspect_Specifications; with Program.Elements.Package_Instantiations; with Program.Element_Visitors; package Program.Nodes.Package_Instantiations is pragma Preelaborate; type Package_Instantiation is new Program.Nodes.Node and Program.Elements.Package_Instantiations.Package_Instantiation and Program.Elements.Package_Instantiations.Package_Instantiation_Text with private; function Create (Package_Token : not null Program.Lexical_Elements .Lexical_Element_Access; Name : not null Program.Elements.Defining_Names .Defining_Name_Access; Is_Token : not null Program.Lexical_Elements .Lexical_Element_Access; New_Token : not null Program.Lexical_Elements .Lexical_Element_Access; Generic_Package_Name : not null Program.Elements.Expressions .Expression_Access; Left_Bracket_Token : Program.Lexical_Elements.Lexical_Element_Access; Parameters : Program.Elements.Parameter_Associations .Parameter_Association_Vector_Access; Right_Bracket_Token : Program.Lexical_Elements.Lexical_Element_Access; With_Token : Program.Lexical_Elements.Lexical_Element_Access; Aspects : Program.Elements.Aspect_Specifications .Aspect_Specification_Vector_Access; Semicolon_Token : not null Program.Lexical_Elements .Lexical_Element_Access) return Package_Instantiation; type Implicit_Package_Instantiation is new Program.Nodes.Node and Program.Elements.Package_Instantiations.Package_Instantiation with private; function Create (Name : not null Program.Elements.Defining_Names .Defining_Name_Access; Generic_Package_Name : not null Program.Elements.Expressions .Expression_Access; Parameters : Program.Elements.Parameter_Associations .Parameter_Association_Vector_Access; Aspects : Program.Elements.Aspect_Specifications .Aspect_Specification_Vector_Access; Is_Part_Of_Implicit : Boolean := False; Is_Part_Of_Inherited : Boolean := False; Is_Part_Of_Instance : Boolean := False) return Implicit_Package_Instantiation with Pre => Is_Part_Of_Implicit or Is_Part_Of_Inherited or Is_Part_Of_Instance; private type Base_Package_Instantiation is abstract new Program.Nodes.Node and Program.Elements.Package_Instantiations.Package_Instantiation with record Name : not null Program.Elements.Defining_Names .Defining_Name_Access; Generic_Package_Name : not null Program.Elements.Expressions .Expression_Access; Parameters : Program.Elements.Parameter_Associations .Parameter_Association_Vector_Access; Aspects : Program.Elements.Aspect_Specifications .Aspect_Specification_Vector_Access; end record; procedure Initialize (Self : aliased in out Base_Package_Instantiation'Class); overriding procedure Visit (Self : not null access Base_Package_Instantiation; Visitor : in out Program.Element_Visitors.Element_Visitor'Class); overriding function Name (Self : Base_Package_Instantiation) return not null Program.Elements.Defining_Names.Defining_Name_Access; overriding function Generic_Package_Name (Self : Base_Package_Instantiation) return not null Program.Elements.Expressions.Expression_Access; overriding function Parameters (Self : Base_Package_Instantiation) return Program.Elements.Parameter_Associations .Parameter_Association_Vector_Access; overriding function Aspects (Self : Base_Package_Instantiation) return Program.Elements.Aspect_Specifications .Aspect_Specification_Vector_Access; overriding function Is_Package_Instantiation_Element (Self : Base_Package_Instantiation) return Boolean; overriding function Is_Declaration_Element (Self : Base_Package_Instantiation) return Boolean; type Package_Instantiation is new Base_Package_Instantiation and Program.Elements.Package_Instantiations.Package_Instantiation_Text with record Package_Token : not null Program.Lexical_Elements .Lexical_Element_Access; Is_Token : not null Program.Lexical_Elements .Lexical_Element_Access; New_Token : not null Program.Lexical_Elements .Lexical_Element_Access; Left_Bracket_Token : Program.Lexical_Elements.Lexical_Element_Access; Right_Bracket_Token : Program.Lexical_Elements.Lexical_Element_Access; With_Token : Program.Lexical_Elements.Lexical_Element_Access; Semicolon_Token : not null Program.Lexical_Elements .Lexical_Element_Access; end record; overriding function To_Package_Instantiation_Text (Self : aliased in out Package_Instantiation) return Program.Elements.Package_Instantiations .Package_Instantiation_Text_Access; overriding function Package_Token (Self : Package_Instantiation) return not null Program.Lexical_Elements.Lexical_Element_Access; overriding function Is_Token (Self : Package_Instantiation) return not null Program.Lexical_Elements.Lexical_Element_Access; overriding function New_Token (Self : Package_Instantiation) return not null Program.Lexical_Elements.Lexical_Element_Access; overriding function Left_Bracket_Token (Self : Package_Instantiation) return Program.Lexical_Elements.Lexical_Element_Access; overriding function Right_Bracket_Token (Self : Package_Instantiation) return Program.Lexical_Elements.Lexical_Element_Access; overriding function With_Token (Self : Package_Instantiation) return Program.Lexical_Elements.Lexical_Element_Access; overriding function Semicolon_Token (Self : Package_Instantiation) return not null Program.Lexical_Elements.Lexical_Element_Access; type Implicit_Package_Instantiation is new Base_Package_Instantiation with record Is_Part_Of_Implicit : Boolean; Is_Part_Of_Inherited : Boolean; Is_Part_Of_Instance : Boolean; end record; overriding function To_Package_Instantiation_Text (Self : aliased in out Implicit_Package_Instantiation) return Program.Elements.Package_Instantiations .Package_Instantiation_Text_Access; overriding function Is_Part_Of_Implicit (Self : Implicit_Package_Instantiation) return Boolean; overriding function Is_Part_Of_Inherited (Self : Implicit_Package_Instantiation) return Boolean; overriding function Is_Part_Of_Instance (Self : Implicit_Package_Instantiation) return Boolean; end Program.Nodes.Package_Instantiations;
38.119792
79
0.738489
18c5d5433ae1a685e05f2a25a05e4bf4eaef65a7
6,579
ads
Ada
src/helpertext.ads
kraileth/ravenadm
02bb13117bafc8887e0c90a4effc63ffcdc90642
[ "0BSD" ]
18
2017-02-28T08:43:17.000Z
2022-03-22T21:55:56.000Z
src/helpertext.ads
kraileth/ravenadm
02bb13117bafc8887e0c90a4effc63ffcdc90642
[ "0BSD" ]
49
2017-10-28T11:18:05.000Z
2022-01-16T16:23:32.000Z
src/helpertext.ads
kraileth/ravenadm
02bb13117bafc8887e0c90a4effc63ffcdc90642
[ "0BSD" ]
5
2017-09-06T14:47:57.000Z
2021-11-25T08:31:10.000Z
-- This file is covered by the Internet Software Consortium (ISC) License -- Reference: ../License.txt with Ada.Strings.Unbounded; with Ada.Containers; package HelperText is package SU renames Ada.Strings.Unbounded; package CON renames Ada.Containers; subtype Text is SU.Unbounded_String; type Line_Markers is private; blank : constant Text := SU.Null_Unbounded_String; -- unpadded numeric image function int2str (A : Integer) return String; function int2text (A : Integer) return Text; -- Trim both sides function trim (S : String) return String; -- converters : Text <==> String function USS (US : Text) return String; function SUS (S : String) return Text; -- True if strings are identical function equivalent (A, B : Text) return Boolean; function equivalent (A : Text; B : String) return Boolean; -- Used for mapped containers function hash (key : Text) return CON.Hash_Type; -- True if the string is zero length function IsBlank (US : Text) return Boolean; function IsBlank (S : String) return Boolean; -- shorthand for index function contains (S : String; fragment : String) return Boolean; function contains (US : Text; fragment : String) return Boolean; -- Return True if S terminates with fragment exactly function trails (S : String; fragment : String) return Boolean; function trails (US : Text; fragment : String) return Boolean; -- Return True if S leads with fragment exactly function leads (S : String; fragment : String) return Boolean; function leads (US : Text; fragment : String) return Boolean; -- Convert to uppercase function uppercase (US : Text) return Text; function uppercase (S : String) return String; -- Convert to lowercase function lowercase (US : Text) return Text; function lowercase (S : String) return String; -- Head (keep all but last delimiter and field) function head (US : Text; delimiter : Text) return Text; function head (S : String; delimiter : String) return String; -- Tail (keep only last field) function tail (US : Text; delimiter : Text) return Text; function tail (S : String; delimiter : String) return String; -- Return half of a string split by separator function part_1 (S : String; separator : String := "/") return String; function part_2 (S : String; separator : String := "/") return String; -- Numeric image with left-padded zeros function zeropad (N : Natural; places : Positive) return String; -- Returns index of first character of fragment (0 if not found) function start_index (S : String; fragment : String) return Natural; -- Replace substring with another string function replace_substring (US : Text; old_string : String; new_string : String) return Text; -- returns S(S'First + left_offset .. S'Last - right_offset) function substring (S : String; left_offset, right_offset : Natural) return String; -- Iterate though block of text, LF is delimiter procedure initialize_markers (block_text : in String; shuttle : out Line_Markers); function next_line_present (block_text : in String; shuttle : in out Line_Markers) return Boolean; function next_line_with_content_present (block_text : in String; start_with : in String; shuttle : in out Line_Markers) return Boolean; function extract_line (block_text : in String; shuttle : in Line_Markers) return String; function extract_file (block_text : in String; shuttle : in out Line_Markers; file_size : in Natural) return String; -- True when trailing white space detected function trailing_whitespace_present (line : String) return Boolean; -- True when tab preceded by space character is present function trapped_space_character_present (line : String) return Boolean; -- Returns number of instances of a given character in a given string function count_char (S : String; focus : Character) return Natural; -- Returns string that is 'First + offset to index(end_marker) - 1 function partial_search (fullstr : String; offset : Natural; end_marker : String) return String; -- returns first character through (not including) the first line feed (if it exists) function first_line (S : String) return String; -- convert boolean to lowercase string function bool2str (A : Boolean) return String; function bool2text (A : Boolean) return Text; -- Return contents of exact line given a block of lines (delimited by LF) and a line number function specific_line (S : String; line_number : Positive) return String; -- Given a single line (presumably no line feeds) with data separated by <delimited>, -- return the field given by field_number (starts counting at 1). function specific_field (S : String; field_number : Positive; delimiter : String := " ") return String; -- Replace a single character with another single character (first found) function replace (S : String; reject, shiny : Character) return String; -- Replace single character with another single character (all found) function replace_all (S : String; reject, shiny : Character) return String; -- Search entire string S for focus character and replace all instances with substring function replace_char (S : String; focus : Character; substring : String) return String; -- Filters out control characters from String S function strip_control (S : String) return String; -- Replaces 2 or more consecutive spaces with a single space function strip_excessive_spaces (S : String) return String; -- Escape certain characters per json specification function json_escape (S : String) return String; -- Return input surrounded by double quotation marks function DQ (txt : String) return String; -- Return input surrounded by single quotation marks function SQ (txt : String) return String; -- Returns literal surrounded by single quotes function shell_quoted (txt : String) return String; private single_LF : constant String (1 .. 1) := (1 => ASCII.LF); type Line_Markers is record back_marker : Natural := 0; front_marker : Natural := 0; zero_length : Boolean := False; utilized : Boolean := False; end record; end HelperText;
35.755435
95
0.685667
39258b03e8f06edd1f8caa6bff86f3f783b55132
46
ads
Ada
attic/asis/find_all/adam-assist-query-find_all-driver.ads
charlie5/aIDE
fab406dbcd9b72a4cb215ffebb05166c788d6365
[ "MIT" ]
3
2017-04-29T14:25:22.000Z
2017-09-29T10:15:28.000Z
attic/asis/find_all/adam-assist-query-find_all-driver.ads
charlie5/aIDE
fab406dbcd9b72a4cb215ffebb05166c788d6365
[ "MIT" ]
null
null
null
attic/asis/find_all/adam-assist-query-find_all-driver.ads
charlie5/aIDE
fab406dbcd9b72a4cb215ffebb05166c788d6365
[ "MIT" ]
null
null
null
procedure AdaM.Assist.Query.find_All.Driver;
15.333333
44
0.826087
397b8f877c1ee1a2e7a9edda9ed0e43a8c9a21af
494
ads
Ada
lch/last_chance_handler.ads
JeremyGrosser/synack_misc
08f791aa6200c95767cce80a6e0998f00e19acfd
[ "BSD-3-Clause" ]
null
null
null
lch/last_chance_handler.ads
JeremyGrosser/synack_misc
08f791aa6200c95767cce80a6e0998f00e19acfd
[ "BSD-3-Clause" ]
null
null
null
lch/last_chance_handler.ads
JeremyGrosser/synack_misc
08f791aa6200c95767cce80a6e0998f00e19acfd
[ "BSD-3-Clause" ]
null
null
null
-- -- Copyright 2021 (C) Jeremy Grosser <[email protected]> -- -- SPDX-License-Identifier: BSD-3-Clause -- with HAL.UART; with System; package Last_Chance_Handler is procedure Initialize (UART : not null HAL.UART.Any_UART_Port); procedure Last_Chance_Handler (Source_Location : System.Address; Line : Integer) with No_Return, Export, Convention => C, External_Name => "__gnat_last_chance_handler"; end Last_Chance_Handler;
21.478261
56
0.665992
1093e4285a8443b57103cb019e14b3c389e32fdd
5,067
ads
Ada
awa/plugins/awa-wikis/src/awa-wikis-previews.ads
My-Colaborations/ada-awa
cc2dee291a14e4df0dbc9c10285bf284a7f1caa8
[ "Apache-2.0" ]
81
2015-01-18T23:02:30.000Z
2022-03-19T17:34:57.000Z
awa/plugins/awa-wikis/src/awa-wikis-previews.ads
My-Colaborations/ada-awa
cc2dee291a14e4df0dbc9c10285bf284a7f1caa8
[ "Apache-2.0" ]
20
2015-12-09T19:26:19.000Z
2022-03-23T14:32:43.000Z
awa/plugins/awa-wikis/src/awa-wikis-previews.ads
My-Colaborations/ada-awa
cc2dee291a14e4df0dbc9c10285bf284a7f1caa8
[ "Apache-2.0" ]
16
2015-06-29T02:44:06.000Z
2021-09-23T18:47:50.000Z
----------------------------------------------------------------------- -- awa-wikis-previews -- Wiki preview management -- Copyright (C) 2015 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with EL.Expressions; with ASF.Applications; with AWA.Modules; with AWA.Jobs.Services; with AWA.Jobs.Modules; with AWA.Wikis.Modules; with AWA.Wikis.Models; -- == Wiki Preview Module == -- The <tt>AWA.Wikis.Previews</tt> package implements a preview image generation for a wiki page. -- This module is optional, it is possible to use the wikis without preview support. When the -- module is registered, it listens to wiki page lifecycle events. When a new wiki content is -- changed, it triggers a job to make the preview. The preview job uses the -- <tt>wkhtmotoimage</tt> external program to make the preview image. package AWA.Wikis.Previews is -- The name under which the module is registered. NAME : constant String := "wiki_previews"; -- The configuration parameter that defines how to build the wiki preview template path. PARAM_PREVIEW_TEMPLATE : constant String := "wiki_preview_template"; -- The configuration parameter to build the preview command to execute. PARAM_PREVIEW_COMMAND : constant String := "wiki_preview_command"; -- The configuration parameter that defines how to build the HTML preview path. PARAM_PREVIEW_HTML : constant String := "wiki_preview_html"; -- The configuration parameter that defines the path for the tmp directory. PARAM_PREVIEW_TMPDIR : constant String := "wiki_preview_tmp"; -- The worker procedure that performs the preview job. procedure Preview_Worker (Job : in out AWA.Jobs.Services.Abstract_Job_Type'Class); -- Preview job definition. package Preview_Job_Definition is new AWA.Jobs.Services.Work_Definition (Preview_Worker'Access); -- ------------------------------ -- Preview wiki module -- ------------------------------ type Preview_Module is new AWA.Modules.Module and AWA.Wikis.Modules.Wiki_Lifecycle.Listener with private; type Preview_Module_Access is access all Preview_Module'Class; -- Initialize the preview wiki module. overriding procedure Initialize (Plugin : in out Preview_Module; App : in AWA.Modules.Application_Access; Props : in ASF.Applications.Config); -- Configures the module after its initialization and after having read its XML configuration. overriding procedure Configure (Plugin : in out Preview_Module; Props : in ASF.Applications.Config); -- The `On_Create` procedure is called by `Notify_Create` to notify the creation of the page. overriding procedure On_Create (Instance : in Preview_Module; Item : in AWA.Wikis.Models.Wiki_Page_Ref'Class); -- The `On_Update` procedure is called by `Notify_Update` to notify the update of the page. overriding procedure On_Update (Instance : in Preview_Module; Item : in AWA.Wikis.Models.Wiki_Page_Ref'Class); -- The `On_Delete` procedure is called by `Notify_Delete` to notify the deletion of the page. overriding procedure On_Delete (Instance : in Preview_Module; Item : in AWA.Wikis.Models.Wiki_Page_Ref'Class); -- Create a preview job and schedule the job to generate a new thumbnail preview for the page. procedure Make_Preview_Job (Plugin : in Preview_Module; Page : in AWA.Wikis.Models.Wiki_Page_Ref'Class); -- Execute the preview job and make the thumbnail preview. The page is first rendered in -- an HTML text file and the preview is rendered by using an external command. procedure Do_Preview_Job (Plugin : in Preview_Module; Job : in out AWA.Jobs.Services.Abstract_Job_Type'Class); -- Get the preview module instance associated with the current application. function Get_Preview_Module return Preview_Module_Access; private type Preview_Module is new AWA.Modules.Module and AWA.Wikis.Modules.Wiki_Lifecycle.Listener with record Template : EL.Expressions.Expression; Command : EL.Expressions.Expression; Html : EL.Expressions.Expression; Job_Module : AWA.Jobs.Modules.Job_Module_Access; end record; end AWA.Wikis.Previews;
44.840708
99
0.685021
187ec1768ce0f6203177a7875be9400742447de9
6,245
adb
Ada
source/nodes/program-nodes-formal_constrained_array_types.adb
optikos/oasis
9f64d46d26d964790d69f9db681c874cfb3bf96d
[ "MIT" ]
null
null
null
source/nodes/program-nodes-formal_constrained_array_types.adb
optikos/oasis
9f64d46d26d964790d69f9db681c874cfb3bf96d
[ "MIT" ]
null
null
null
source/nodes/program-nodes-formal_constrained_array_types.adb
optikos/oasis
9f64d46d26d964790d69f9db681c874cfb3bf96d
[ "MIT" ]
2
2019-09-14T23:18:50.000Z
2019-10-02T10:11:40.000Z
-- Copyright (c) 2019 Maxim Reznik <[email protected]> -- -- SPDX-License-Identifier: MIT -- License-Filename: LICENSE ------------------------------------------------------------- package body Program.Nodes.Formal_Constrained_Array_Types is function Create (Array_Token : not null Program.Lexical_Elements .Lexical_Element_Access; Left_Bracket_Token : not null Program.Lexical_Elements .Lexical_Element_Access; Index_Subtypes : not null Program.Elements.Discrete_Ranges .Discrete_Range_Vector_Access; Right_Bracket_Token : not null Program.Lexical_Elements .Lexical_Element_Access; Of_Token : not null Program.Lexical_Elements .Lexical_Element_Access; Component_Definition : not null Program.Elements.Component_Definitions .Component_Definition_Access) return Formal_Constrained_Array_Type is begin return Result : Formal_Constrained_Array_Type := (Array_Token => Array_Token, Left_Bracket_Token => Left_Bracket_Token, Index_Subtypes => Index_Subtypes, Right_Bracket_Token => Right_Bracket_Token, Of_Token => Of_Token, Component_Definition => Component_Definition, Enclosing_Element => null) do Initialize (Result); end return; end Create; function Create (Index_Subtypes : not null Program.Elements.Discrete_Ranges .Discrete_Range_Vector_Access; Component_Definition : not null Program.Elements.Component_Definitions .Component_Definition_Access; Is_Part_Of_Implicit : Boolean := False; Is_Part_Of_Inherited : Boolean := False; Is_Part_Of_Instance : Boolean := False) return Implicit_Formal_Constrained_Array_Type is begin return Result : Implicit_Formal_Constrained_Array_Type := (Index_Subtypes => Index_Subtypes, Component_Definition => Component_Definition, Is_Part_Of_Implicit => Is_Part_Of_Implicit, Is_Part_Of_Inherited => Is_Part_Of_Inherited, Is_Part_Of_Instance => Is_Part_Of_Instance, Enclosing_Element => null) do Initialize (Result); end return; end Create; overriding function Index_Subtypes (Self : Base_Formal_Constrained_Array_Type) return not null Program.Elements.Discrete_Ranges .Discrete_Range_Vector_Access is begin return Self.Index_Subtypes; end Index_Subtypes; overriding function Component_Definition (Self : Base_Formal_Constrained_Array_Type) return not null Program.Elements.Component_Definitions .Component_Definition_Access is begin return Self.Component_Definition; end Component_Definition; overriding function Array_Token (Self : Formal_Constrained_Array_Type) return not null Program.Lexical_Elements.Lexical_Element_Access is begin return Self.Array_Token; end Array_Token; overriding function Left_Bracket_Token (Self : Formal_Constrained_Array_Type) return not null Program.Lexical_Elements.Lexical_Element_Access is begin return Self.Left_Bracket_Token; end Left_Bracket_Token; overriding function Right_Bracket_Token (Self : Formal_Constrained_Array_Type) return not null Program.Lexical_Elements.Lexical_Element_Access is begin return Self.Right_Bracket_Token; end Right_Bracket_Token; overriding function Of_Token (Self : Formal_Constrained_Array_Type) return not null Program.Lexical_Elements.Lexical_Element_Access is begin return Self.Of_Token; end Of_Token; overriding function Is_Part_Of_Implicit (Self : Implicit_Formal_Constrained_Array_Type) return Boolean is begin return Self.Is_Part_Of_Implicit; end Is_Part_Of_Implicit; overriding function Is_Part_Of_Inherited (Self : Implicit_Formal_Constrained_Array_Type) return Boolean is begin return Self.Is_Part_Of_Inherited; end Is_Part_Of_Inherited; overriding function Is_Part_Of_Instance (Self : Implicit_Formal_Constrained_Array_Type) return Boolean is begin return Self.Is_Part_Of_Instance; end Is_Part_Of_Instance; procedure Initialize (Self : aliased in out Base_Formal_Constrained_Array_Type'Class) is begin for Item in Self.Index_Subtypes.Each_Element loop Set_Enclosing_Element (Item.Element, Self'Unchecked_Access); end loop; Set_Enclosing_Element (Self.Component_Definition, Self'Unchecked_Access); null; end Initialize; overriding function Is_Formal_Constrained_Array_Type_Element (Self : Base_Formal_Constrained_Array_Type) return Boolean is pragma Unreferenced (Self); begin return True; end Is_Formal_Constrained_Array_Type_Element; overriding function Is_Formal_Type_Definition_Element (Self : Base_Formal_Constrained_Array_Type) return Boolean is pragma Unreferenced (Self); begin return True; end Is_Formal_Type_Definition_Element; overriding function Is_Definition_Element (Self : Base_Formal_Constrained_Array_Type) return Boolean is pragma Unreferenced (Self); begin return True; end Is_Definition_Element; overriding procedure Visit (Self : not null access Base_Formal_Constrained_Array_Type; Visitor : in out Program.Element_Visitors.Element_Visitor'Class) is begin Visitor.Formal_Constrained_Array_Type (Self); end Visit; overriding function To_Formal_Constrained_Array_Type_Text (Self : aliased in out Formal_Constrained_Array_Type) return Program.Elements.Formal_Constrained_Array_Types .Formal_Constrained_Array_Type_Text_Access is begin return Self'Unchecked_Access; end To_Formal_Constrained_Array_Type_Text; overriding function To_Formal_Constrained_Array_Type_Text (Self : aliased in out Implicit_Formal_Constrained_Array_Type) return Program.Elements.Formal_Constrained_Array_Types .Formal_Constrained_Array_Type_Text_Access is pragma Unreferenced (Self); begin return null; end To_Formal_Constrained_Array_Type_Text; end Program.Nodes.Formal_Constrained_Array_Types;
34.694444
79
0.740913
20ab72136e3fc9f06cb2b71241975718421a7948
15,568
adb
Ada
snapgear_linux/user/ncurses/ncurses-5.6/Ada95/samples/ncurses2-m.adb
impedimentToProgress/UCI-BlueChip
53e5d48b79079eaf60d42f7cb65bb795743d19fc
[ "MIT" ]
null
null
null
snapgear_linux/user/ncurses/ncurses-5.6/Ada95/samples/ncurses2-m.adb
impedimentToProgress/UCI-BlueChip
53e5d48b79079eaf60d42f7cb65bb795743d19fc
[ "MIT" ]
null
null
null
snapgear_linux/user/ncurses/ncurses-5.6/Ada95/samples/ncurses2-m.adb
impedimentToProgress/UCI-BlueChip
53e5d48b79079eaf60d42f7cb65bb795743d19fc
[ "MIT" ]
3
2016-06-13T13:20:56.000Z
2019-12-05T02:31:23.000Z
------------------------------------------------------------------------------ -- -- -- GNAT ncurses Binding Samples -- -- -- -- ncurses -- -- -- -- B O D Y -- -- -- ------------------------------------------------------------------------------ -- Copyright (c) 2000-2004,2006 Free Software Foundation, Inc. -- -- -- -- Permission is hereby granted, free of charge, to any person obtaining a -- -- copy of this software and associated documentation files (the -- -- "Software"), to deal in the Software without restriction, including -- -- without limitation the rights to use, copy, modify, merge, publish, -- -- distribute, distribute with modifications, sublicense, and/or sell -- -- copies of the Software, and to permit persons to whom the Software is -- -- furnished to do so, subject to the following conditions: -- -- -- -- The above copyright notice and this permission notice shall be included -- -- in all copies or substantial portions of the Software. -- -- -- -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -- -- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -- -- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -- -- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -- -- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -- -- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR -- -- THE USE OR OTHER DEALINGS IN THE SOFTWARE. -- -- -- -- Except as contained in this notice, the name(s) of the above copyright -- -- holders shall not be used in advertising or otherwise to promote the -- -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ -- Author: Eugene V. Melaragno <[email protected]> 2000 -- Version Control -- $Revision: 1.6 $ -- $Date: 2006/06/25 14:24:40 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ -- TODO use Default_Character where appropriate -- This is an Ada version of ncurses -- I translated this because it tests the most features. with Terminal_Interface.Curses; use Terminal_Interface.Curses; with Terminal_Interface.Curses.Trace; use Terminal_Interface.Curses.Trace; with Ada.Text_IO; use Ada.Text_IO; with Ada.Characters.Latin_1; -- with Ada.Characters.Handling; with Ada.Command_Line; use Ada.Command_Line; with Ada.Strings.Unbounded; with ncurses2.util; use ncurses2.util; with ncurses2.getch_test; with ncurses2.attr_test; with ncurses2.color_test; with ncurses2.demo_panels; with ncurses2.color_edit; with ncurses2.slk_test; with ncurses2.acs_display; with ncurses2.color_edit; with ncurses2.acs_and_scroll; with ncurses2.flushinp_test; with ncurses2.test_sgr_attributes; with ncurses2.menu_test; with ncurses2.demo_pad; with ncurses2.demo_forms; with ncurses2.overlap_test; with ncurses2.trace_set; with ncurses2.getopt; use ncurses2.getopt; package body ncurses2.m is use Int_IO; function To_trace (n : Integer) return Trace_Attribute_Set; procedure usage; procedure Set_Terminal_Modes; function Do_Single_Test (c : Character) return Boolean; function To_trace (n : Integer) return Trace_Attribute_Set is a : Trace_Attribute_Set := (others => False); m : Integer; rest : Integer; begin m := n mod 2; if 1 = m then a.Times := True; end if; rest := n / 2; m := rest mod 2; if 1 = m then a.Tputs := True; end if; rest := rest / 2; m := rest mod 2; if 1 = m then a.Update := True; end if; rest := rest / 2; m := rest mod 2; if 1 = m then a.Cursor_Move := True; end if; rest := rest / 2; m := rest mod 2; if 1 = m then a.Character_Output := True; end if; rest := rest / 2; m := rest mod 2; if 1 = m then a.Calls := True; end if; rest := rest / 2; m := rest mod 2; if 1 = m then a.Virtual_Puts := True; end if; rest := rest / 2; m := rest mod 2; if 1 = m then a.Input_Events := True; end if; rest := rest / 2; m := rest mod 2; if 1 = m then a.TTY_State := True; end if; rest := rest / 2; m := rest mod 2; if 1 = m then a.Internal_Calls := True; end if; rest := rest / 2; m := rest mod 2; if 1 = m then a.Character_Calls := True; end if; rest := rest / 2; m := rest mod 2; if 1 = m then a.Termcap_TermInfo := True; end if; return a; end To_trace; -- these are type Stdscr_Init_Proc; function rip_footer ( Win : Window; Columns : Column_Count) return Integer; pragma Convention (C, rip_footer); function rip_footer ( Win : Window; Columns : Column_Count) return Integer is begin Set_Background (Win, (Ch => ' ', Attr => (Reverse_Video => True, others => False), Color => 0)); Erase (Win); Move_Cursor (Win, 0, 0); Add (Win, "footer:" & Columns'Img & " columns"); Refresh_Without_Update (Win); return 0; -- Curses_OK; end rip_footer; function rip_header ( Win : Window; Columns : Column_Count) return Integer; pragma Convention (C, rip_header); function rip_header ( Win : Window; Columns : Column_Count) return Integer is begin Set_Background (Win, (Ch => ' ', Attr => (Reverse_Video => True, others => False), Color => 0)); Erase (Win); Move_Cursor (Win, 0, 0); Add (Win, "header:" & Columns'Img & " columns"); -- 'Img is a GNAT extention Refresh_Without_Update (Win); return 0; -- Curses_OK; end rip_header; procedure usage is -- type Stringa is access String; use Ada.Strings.Unbounded; -- tbl : constant array (Positive range <>) of Stringa := ( tbl : constant array (Positive range <>) of Unbounded_String := ( To_Unbounded_String ("Usage: ncurses [options]"), To_Unbounded_String (""), To_Unbounded_String ("Options:"), To_Unbounded_String (" -a f,b set default-colors " & "(assumed white-on-black)"), To_Unbounded_String (" -d use default-colors if terminal " & "supports them"), To_Unbounded_String (" -e fmt specify format for soft-keys " & "test (e)"), To_Unbounded_String (" -f rip-off footer line " & "(can repeat)"), To_Unbounded_String (" -h rip-off header line " & "(can repeat)"), To_Unbounded_String (" -s msec specify nominal time for " & "panel-demo (default: 1, to hold)"), To_Unbounded_String (" -t mask specify default trace-level " & "(may toggle with ^T)") ); begin for n in tbl'Range loop Put_Line (Standard_Error, To_String (tbl (n))); end loop; -- exit(EXIT_FAILURE); -- TODO should we use Set_Exit_Status and throw and exception? end usage; procedure Set_Terminal_Modes is begin Set_Raw_Mode (SwitchOn => False); Set_Cbreak_Mode (SwitchOn => True); Set_Echo_Mode (SwitchOn => False); Allow_Scrolling (Mode => True); Use_Insert_Delete_Line (Do_Idl => True); Set_KeyPad_Mode (SwitchOn => True); end Set_Terminal_Modes; nap_msec : Integer := 1; function Do_Single_Test (c : Character) return Boolean is begin case c is when 'a' => getch_test; when 'b' => attr_test; when 'c' => if not Has_Colors then Cannot ("does not support color."); else color_test; end if; when 'd' => if not Has_Colors then Cannot ("does not support color."); elsif not Can_Change_Color then Cannot ("has hardwired color values."); else color_edit; end if; when 'e' => slk_test; when 'f' => acs_display; when 'o' => demo_panels (nap_msec); when 'g' => acs_and_scroll; when 'i' => flushinp_test (Standard_Window); when 'k' => test_sgr_attributes; when 'm' => menu_test; when 'p' => demo_pad; when 'r' => demo_forms; when 's' => overlap_test; when 't' => trace_set; when '?' => null; when others => return False; end case; return True; end Do_Single_Test; command : Character; my_e_param : Soft_Label_Key_Format := Four_Four; assumed_colors : Boolean := False; default_colors : Boolean := False; default_fg : Color_Number := White; default_bg : Color_Number := Black; -- nap_msec was an unsigned long integer in the C version, -- yet napms only takes an int! c : Integer; c2 : Character; optind : Integer := 1; -- must be initialized to one. optarg : getopt.stringa; length : Integer; tmpi : Integer; package myio is new Ada.Text_IO.Integer_IO (Integer); use myio; save_trace : Integer := 0; save_trace_set : Trace_Attribute_Set; function main return Integer is begin loop Qgetopt (c, Argument_Count, Argument'Access, "a:de:fhs:t:", optind, optarg); exit when c = -1; c2 := Character'Val (c); case c2 is when 'a' => -- Ada doesn't have scanf, it doesn't even have a -- regular expression library. assumed_colors := True; myio.Get (optarg.all, Integer (default_fg), length); myio.Get (optarg.all (length + 2 .. optarg.all'Length), Integer (default_bg), length); when 'd' => default_colors := True; when 'e' => myio.Get (optarg.all, tmpi, length); if tmpi > 3 then usage; return 1; end if; my_e_param := Soft_Label_Key_Format'Val (tmpi); when 'f' => Rip_Off_Lines (-1, rip_footer'Access); when 'h' => Rip_Off_Lines (1, rip_header'Access); when 's' => myio.Get (optarg.all, nap_msec, length); when 't' => myio.Get (optarg.all, save_trace, length); when others => usage; return 1; end case; end loop; -- the C version had a bunch of macros here. -- if (!isatty(fileno(stdin))) -- isatty is not available in the standard Ada so skip it. save_trace_set := To_trace (save_trace); Trace_On (save_trace_set); Init_Soft_Label_Keys (my_e_param); Init_Screen; Set_Background (Ch => (Ch => Blank, Attr => Normal_Video, Color => Color_Pair'First)); if Has_Colors then Start_Color; if default_colors then Use_Default_Colors; elsif assumed_colors then Assume_Default_Colors (default_fg, default_bg); end if; end if; Set_Terminal_Modes; Save_Curses_Mode (Curses); End_Windows; -- TODO add macro #if blocks. Put_Line ("Welcome to " & Curses_Version & ". Press ? for help."); loop Put_Line ("This is the ncurses main menu"); Put_Line ("a = keyboard and mouse input test"); Put_Line ("b = character attribute test"); Put_Line ("c = color test pattern"); Put_Line ("d = edit RGB color values"); Put_Line ("e = exercise soft keys"); Put_Line ("f = display ACS characters"); Put_Line ("g = display windows and scrolling"); Put_Line ("i = test of flushinp()"); Put_Line ("k = display character attributes"); Put_Line ("m = menu code test"); Put_Line ("o = exercise panels library"); Put_Line ("p = exercise pad features"); Put_Line ("q = quit"); Put_Line ("r = exercise forms code"); Put_Line ("s = overlapping-refresh test"); Put_Line ("t = set trace level"); Put_Line ("? = repeat this command summary"); Put ("> "); Flush; command := Ada.Characters.Latin_1.NUL; -- get_input: -- loop declare Ch : Character; begin Get (Ch); -- TODO if read(ch) <= 0 -- TODO ada doesn't have an Is_Space function command := Ch; -- TODO if ch = '\n' or '\r' are these in Ada? end; -- end loop get_input; declare begin if Do_Single_Test (command) then Flush_Input; Set_Terminal_Modes; Reset_Curses_Mode (Curses); Clear; Refresh; End_Windows; if command = '?' then Put_Line ("This is the ncurses capability tester."); Put_Line ("You may select a test from the main menu by " & "typing the"); Put_Line ("key letter of the choice (the letter to left " & "of the =)"); Put_Line ("at the > prompt. The commands `x' or `q' will " & "exit."); end if; -- continue; --why continue in the C version? end if; exception when Curses_Exception => End_Windows; end; exit when command = 'q'; end loop; return 0; -- TODO ExitProgram(EXIT_SUCCESS); end main; end ncurses2.m;
34.672606
79
0.497623
180171312752dbab77f07e3b6d2cbed8c4d4ed05
2,302
adb
Ada
endterm_mysolution/grade3.adb
jamalakhaligova/ADA
f4ad841052620f998f7d4e7d23b0457aea0a7565
[ "Apache-2.0" ]
null
null
null
endterm_mysolution/grade3.adb
jamalakhaligova/ADA
f4ad841052620f998f7d4e7d23b0457aea0a7565
[ "Apache-2.0" ]
null
null
null
endterm_mysolution/grade3.adb
jamalakhaligova/ADA
f4ad841052620f998f7d4e7d23b0457aea0a7565
[ "Apache-2.0" ]
null
null
null
with Ada.Text_IO,Ada.Calendar, Ada.Numerics.Discrete_Random; use Ada.Text_IO; procedure Grade3 is type Barr is array (Natural range <>,Natural range <>) of Boolean; protected Organism is entry Move(X,Y : Natural; is_infected : out Boolean); function inArea(x,y:Natural) return Boolean; procedure Init; private X, Y : Natural; is_infected : Boolean; a : Barr(2..10,2..10); end Organism; task type Virus(varx,vary: Natural; dx,dy: Integer); task body Virus is act_x,act_y : Natural; dis_x,dis_y : Integer; got_virus : Boolean := False; procedure spread(varx,vary : Natural; dx,dy : Integer) is begin loop act_x := act_x + dis_x; act_y := act_y + dis_y; exit when Organism.inArea(act_x,act_y); end loop; end spread; begin act_x := varx; act_y := vary; dis_x := dx; dis_y := dy; while not got_virus loop Organism.Move(act_x,act_y,got_virus); spread(act_x,act_y,dis_x,dis_y); delay 2.0; end loop; end Virus; protected body Organism is entry Move(X,Y : Natural;is_infected : out Boolean) when True is begin if(a(X,Y)=True) then is_infected := True; Put_Line("virus is infected at "& X'Image &","& Y'Image); else Put_Line("virus is at "& X'Image &","& Y'Image); end if; end Move; procedure Init is cnt : Natural := 0; begin for i in 2..10 loop for j in 2..10 loop if (i=j)then a(i,j) := True; elsif (i mod j =0) then a(i,j) := True; else a(i,j) := False; end if; end loop; end loop; end Init; function inArea(x,y : Natural) return Boolean is begin if (x>=2 and then x<=10 and then y>=2 and then y<=10) then return True; else return False; end if; end inArea; end Organism; type Virusptr is access Virus; f,t,s : Virusptr; begin Organism.Init; f := new Virus(2,7,1,0); t := new Virus(2,3,1,1); s := new Virus(10,2,-1,1); end Grade3;
24.752688
77
0.52954
1cbe4e08754ce438211eac67023a8dc774390396
4,684
adb
Ada
strings_edit-streams.adb
jrcarter/Ada_GUI
65a829c55dec91fd48a0b72f88d76137768bf4fb
[ "BSD-3-Clause" ]
19
2018-03-18T18:07:14.000Z
2022-03-30T03:10:12.000Z
strings_edit-streams.adb
jrcarter/Ada_GUI
65a829c55dec91fd48a0b72f88d76137768bf4fb
[ "BSD-3-Clause" ]
4
2021-08-23T12:52:06.000Z
2022-03-31T10:48:43.000Z
strings_edit-streams.adb
jrcarter/Ada_GUI
65a829c55dec91fd48a0b72f88d76137768bf4fb
[ "BSD-3-Clause" ]
null
null
null
-- -- -- package Copyright (c) Dmitry A. Kazakov -- -- Strings_Edit.Streams Luebeck -- -- Implementation Spring, 2009 -- -- -- -- Last revision : 13:11 14 Sep 2019 -- -- -- -- This library 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 of -- -- the License, or (at your option) any later version. This library -- -- 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 -- -- this library; if not, write to the Free Software Foundation, -- -- Inc., 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 Ada.IO_Exceptions; use Ada.IO_Exceptions; package body Strings_Edit.Streams is procedure Increment ( Left : in out Integer; Right : Stream_Element_Offset ) is pragma Inline (Increment); begin Left := Left + Integer (Right) * Char_Count; end Increment; function Get (Stream : String_Stream) return String is begin return Stream.Data (1..Stream.Position - 1); end Get; function Get_Size (Stream : String_Stream) return Stream_Element_Count is begin return ( Stream_Element_Offset (Stream.Data'Last - Stream.Position + 1) / Char_Count ); end Get_Size; procedure Read ( Stream : in out String_Stream; Item : out Stream_Element_Array; Last : out Stream_Element_Offset ) is begin if Stream.Position > Stream.Length then raise End_Error; end if; declare subtype Space is Stream_Element_Array (1..Get_Size (Stream)); Data : Space; pragma Import (Ada, Data); for Data'Address use Stream.Data (Stream.Position)'Address; begin if Space'Length >= Item'Length then Last := Item'Last; Item := Data (1..Item'Length); Increment (Stream.Position, Item'Length); else Last := Item'First + Data'Length - 1; Item (Item'First..Last) := Data; Stream.Position := Stream.Data'Last + 1; end if; end; end Read; procedure Rewind (Stream : in out String_Stream) is begin Stream.Position := 1; end Rewind; procedure Set (Stream : in out String_Stream; Content : String) is begin if Content'Length > Stream.Length then raise Constraint_Error; end if; Stream.Position := Stream.Length - Content'Length + 1; Stream.Data (Stream.Position..Stream.Length) := Content; end Set; procedure Write ( Stream : in out String_Stream; Item : Stream_Element_Array ) is begin if Stream.Position > Stream.Length then raise End_Error; end if; declare subtype Space is Stream_Element_Array (1..Get_Size (Stream)); Data : Space; pragma Import (Ada, Data); for Data'Address use Stream.Data (Stream.Position)'Address; begin if Item'Length > Space'Length then raise End_Error; end if; Data (1..Item'Length) := Item; Increment (Stream.Position, Item'Length); end; end Write; end Strings_Edit.Streams;
39.361345
73
0.552092
20ec155912008a02c6c8e65c050d587868371e55
3,409
ads
Ada
firehog/ncurses/Ada95/ada_include/terminal_interface-curses-forms-field_types-alphanumeric.ads
KipodAfterFree/KAF-2019-FireHog
5f6ee3c3c3329459bc9daeabc1a16ff4619508d9
[ "MIT" ]
1
2019-04-02T20:28:58.000Z
2019-04-02T20:28:58.000Z
Ada95/ada_include/terminal_interface-curses-forms-field_types-alphanumeric.ads
mitchelhaan/ncurses
0b8ae5088202164ecc1769aa255ed1aad283d2ae
[ "X11" ]
null
null
null
Ada95/ada_include/terminal_interface-curses-forms-field_types-alphanumeric.ads
mitchelhaan/ncurses
0b8ae5088202164ecc1769aa255ed1aad283d2ae
[ "X11" ]
1
2019-12-26T10:18:16.000Z
2019-12-26T10:18:16.000Z
------------------------------------------------------------------------------ -- -- -- GNAT ncurses Binding -- -- -- -- Terminal_Interface.Curses.Forms.Field_Types.AlphaNumeric -- -- -- -- S P E C -- -- -- ------------------------------------------------------------------------------ -- Copyright (c) 1998 Free Software Foundation, Inc. -- -- -- -- Permission is hereby granted, free of charge, to any person obtaining a -- -- copy of this software and associated documentation files (the -- -- "Software"), to deal in the Software without restriction, including -- -- without limitation the rights to use, copy, modify, merge, publish, -- -- distribute, distribute with modifications, sublicense, and/or sell -- -- copies of the Software, and to permit persons to whom the Software is -- -- furnished to do so, subject to the following conditions: -- -- -- -- The above copyright notice and this permission notice shall be included -- -- in all copies or substantial portions of the Software. -- -- -- -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -- -- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -- -- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -- -- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -- -- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -- -- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR -- -- THE USE OR OTHER DEALINGS IN THE SOFTWARE. -- -- -- -- Except as contained in this notice, the name(s) of the above copyright -- -- holders shall not be used in advertising or otherwise to promote the -- -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer <[email protected]> 1996 -- Version Control: -- $Revision: 1.5 $ -- Binding Version 00.93 ------------------------------------------------------------------------------ package Terminal_Interface.Curses.Forms.Field_Types.AlphaNumeric is pragma Preelaborate (AlphaNumeric); type AlphaNumeric_Field is new Field_Type with record Minimum_Field_Width : Natural := 0; end record; procedure Set_Field_Type (Fld : in Field; Typ : in AlphaNumeric_Field); pragma Inline (Set_Field_Type); end Terminal_Interface.Curses.Forms.Field_Types.AlphaNumeric;
63.12963
78
0.452625
235108b6c6f2b437b6ab76e23965a06a27878d55
3,234
ads
Ada
Src/telnet.ads
SMerrony/dashera
74961f34a44cabae414e84537e8baae0ecb373c9
[ "MIT" ]
23
2021-12-12T15:20:22.000Z
2022-03-19T19:55:06.000Z
Src/telnet.ads
SMerrony/dashera
74961f34a44cabae414e84537e8baae0ecb373c9
[ "MIT" ]
1
2022-03-10T00:09:35.000Z
2022-03-15T08:16:00.000Z
Src/telnet.ads
SMerrony/dashera
74961f34a44cabae414e84537e8baae0ecb373c9
[ "MIT" ]
1
2022-03-11T19:42:02.000Z
2022-03-11T19:42:02.000Z
-- Copyright (C)2021,2022 Steve Merrony -- Permission is hereby granted, free of charge, to any person obtaining a copy -- of this software and associated documentation files (the "Software"), to deal -- in the Software without restriction, including without limitation the rights -- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -- copies of the Software, and to permit persons to whom the Software is -- furnished to do so, subject to the following conditions: -- The above copyright notice and this permission notice shall be included in -- all copies or substantial portions of the Software. -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -- THE SOFTWARE. with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; with GNAT.Sockets; use GNAT.Sockets; package Telnet is Cmd_SE : constant Character := Character'Val(240); Cmd_NOP : constant Character := Character'Val(241); Cmd_DM : constant Character := Character'Val(242); Cmd_BRK : constant Character := Character'Val(243); Cmd_IP : constant Character := Character'Val(244); Cmd_AO : constant Character := Character'Val(245); Cmd_AYT : constant Character := Character'Val(246); Cmd_EC : constant Character := Character'Val(247); Cmd_EL : constant Character := Character'Val(248); Cmd_GA : constant Character := Character'Val(249); Cmd_SB : constant Character := Character'Val(250); Cmd_WILL : constant Character := Character'Val(251); Cmd_WONT : constant Character := Character'Val(252); Cmd_DO : constant Character := Character'Val(253); Cmd_DONT : constant Character := Character'Val(254); Cmd_IAC : constant Character := Character'Val(255); type Message is new String; type Session_T is tagged record Conn : GNAT.Sockets.Socket_Type; Host_Str : Unbounded_String; -- The host as specified by our user Port_Num : Integer; -- The port as specified by our user end record; type Session_Acc_T is access all Session_T; function New_Connection (Host_Str : in String; Port_Num : in Integer) return Session_Acc_T; -- Attempt to initiate a new TCPIP/Telnet connection to the specified Host and Port. -- Data from the remote host will be directed to the supplied Terminal. -- To send data, call the Send procedure procedure Send (Sess : in Session_Acc_T; Str : in String); procedure Close_Connection (Sess : in out Session_T); task type Receiver is entry Start (Sess : in Session_Acc_T); end Receiver; type Receiver_Acc is access Receiver; Receiver_Task : Receiver_Acc; task type Keyboard_Sender is entry Start (S : in Session_Acc_T); entry Accept_Data (Str : in String); entry Stop; end Keyboard_Sender; type Sender_Acc is access Keyboard_Sender; Keyboard_Sender_Task : Sender_Acc; Disconnected : exception; end Telnet;
40.425
92
0.74428
398a12bd9b4ed35c1e6debabd6a50a0cadd65604
1,530
adb
Ada
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/sso/s7.adb
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
7
2020-05-02T17:34:05.000Z
2021-10-17T10:15:18.000Z
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/sso/s7.adb
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
null
null
null
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/sso/s7.adb
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
2
2020-07-27T00:22:36.000Z
2021-04-01T09:41:02.000Z
-- { dg-do run } with Init7; use Init7; with Text_IO; use Text_IO; with Dump; procedure S7 is A1 : R1 := My_R1; A2 : R2 := My_R2; N1 : Nested1; N2 : Nested2; C1 : Integer; C2 : Integer; C3 : Integer; begin Put ("A1 :"); Dump (A1'Address, R1'Max_Size_In_Storage_Elements); New_Line; -- { dg-output "A1 : 78 56 34 12 12 00 ab 00 34 00 cd 00 56 00 ef 00.*\n" } Put ("A2 :"); Dump (A2'Address, R1'Max_Size_In_Storage_Elements); New_Line; -- { dg-output "A2 : 12 34 56 78 00 ab 00 12 00 cd 00 34 00 ef 00 56.*\n" } N1 := A1.N; C1 := N1.C1; C2 := N1.C2; C3 := N1.C3; Put_Line("C1 :" & C1'Img); -- { dg-output "C1 : 11206674.*\n" } Put_Line("C2 :" & C2'Img); -- { dg-output "C2 : 13434932.*\n" } Put_Line("C3 :" & C3'Img); -- { dg-output "C3 : 15663190.*\n" } N1.C1 := C1; N1.C2 := C2; N1.C3 := C3; A1.N := N1; N2 := A2.N; C1 := N2.C1; C2 := N2.C2; C3 := N2.C3; Put_Line("C1 :" & C1'Img); -- { dg-output "C1 : 11206674.*\n" } Put_Line("C2 :" & C2'Img); -- { dg-output "C2 : 13434932.*\n" } Put_Line("C3 :" & C3'Img); -- { dg-output "C3 : 15663190.*\n" } N2.C1 := C1; N2.C2 := C2; N2.C3 := C3; A2.N := N2; Put ("A1 :"); Dump (A1'Address, R1'Max_Size_In_Storage_Elements); New_Line; -- { dg-output "A1 : 78 56 34 12 12 00 ab 00 34 00 cd 00 56 00 ef 00.*\n" } Put ("A2 :"); Dump (A2'Address, R1'Max_Size_In_Storage_Elements); New_Line; -- { dg-output "A2 : 12 34 56 78 00 ab 00 12 00 cd 00 34 00 ef 00 56.*\n" } end;
19.125
77
0.54183