CombinedText stringlengths 4 3.42M |
|---|
------------------------------------------------------------------------------
-- --
-- WAVEFILES --
-- --
-- Wavefile reporting routines --
-- --
-- The MIT License (MIT) --
-- --
-- Copyright (c) 2015 -- 2020 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. --
------------------------------------------------------------------------------
with Ada.Text_IO; use Ada.Text_IO;
with Audio.RIFF.Wav.Formats.Report;
package body Audio.Wavefiles.Report is
function To_String (Err : Wavefile_Error_Code) return String;
function To_String (Err : Wavefile_Warning_Code) return String;
------------------
-- Display_Info --
------------------
procedure Display_Info (WF : Wavefile) is
begin
Audio.RIFF.Wav.Formats.Report.Print (WF.Wave_Format);
end Display_Info;
------------------
-- Display_Info --
------------------
procedure Display_Info (RIFF_Info : RIFF_Information) is
begin
Put_Line ("---- RIFF Chunks Information ----");
Put_Line ("Id: " & RIFF_Identifier'Image (RIFF_Info.Id));
Put_Line ("Format: " & RIFF_Format'Image (RIFF_Info.Format));
Put_Line ("Chunk count: "
& Ada.Containers.Count_Type'Image (RIFF_Info.Chunks.Length));
New_Line;
for Chunk_Element of RIFF_Info.Chunks loop
Put_Line ("- ID: "
& Chunk_Element.ID);
Put_Line (" Internal tag: "
& Wav_Chunk_Tag'Image (Chunk_Element.Chunk_Tag));
Put_Line (" Size: "
& Long_Integer'Image (Chunk_Element.Size));
Put_Line (" Start index: "
& Ada.Streams.Stream_IO.Positive_Count'Image
(Chunk_Element.Start_Index));
Put_Line (" Consolidated: "
& Boolean'Image (Chunk_Element.Consolidated));
New_Line;
end loop;
Put_Line ("---------------------------------");
end Display_Info;
---------------
-- To_String --
---------------
function To_String (Err : Wavefile_Error_Code) return String is
begin
case Err is
when Wavefile_Error_File_Not_Open =>
return "File not open";
when Wavefile_Error_File_Already_Open =>
return "File already open";
when Wavefile_Error_File_Too_Short =>
return "File too short";
when Wavefile_Error_Format_Chuck_Not_Found =>
return "Format chunk not found";
when Wavefile_Error_Data_Chuck_Not_Found =>
return "Data chunk not found";
when Wavefile_Error_Unsupported_Wavefile_Format =>
return "Unsupported wavefile format";
when Wavefile_Error_Unsupported_Bit_Depth =>
return "Unsupported bit depth";
when Wavefile_Error_Unsupported_Format_Size =>
return "Unsupported format size";
end case;
end To_String;
---------------
-- To_String --
---------------
function To_String (Err : Wavefile_Warning_Code) return String is
begin
case Err is
when Wavefile_Warning_Inconsistent_Channel_Mask =>
return "Inconsistent channel mask";
end case;
end To_String;
--------------------
-- Display_Errors --
--------------------
procedure Display_Errors (WF : Wavefile) is
begin
Put_Line ("---------------- Wavefile errors ----------------");
New_Line;
for Error_Code in WF.Errors'Range loop
if WF.Errors (Error_Code) then
Put_Line ("- " & To_String (Error_Code));
end if;
end loop;
New_Line;
Put_Line ("-------------------------------------------------");
end Display_Errors;
----------------------
-- Display_Warnings --
----------------------
procedure Display_Warnings (WF : Wavefile) is
begin
Put_Line ("-------------- Wavefile warnings ----------------");
New_Line;
for Warning_Code in WF.Warnings'Range loop
if WF.Warnings (Warning_Code) then
Put_Line ("- " & To_String (Warning_Code));
end if;
end loop;
New_Line;
Put_Line ("-------------------------------------------------");
end Display_Warnings;
end Audio.Wavefiles.Report;
|
-- WORDS, a Latin dictionary, by Colonel William Whitaker (USAF, Retired)
--
-- Copyright William A. Whitaker (1936–2010)
--
-- This is a free program, which means it is proper to copy it and pass
-- it on to your friends. Consider it a developmental item for which
-- there is no charge. However, just for form, it is Copyrighted
-- (c). Permission is hereby freely given for any and all use of program
-- and data. You can sell it as your own, but at least tell me.
--
-- This version is distributed without obligation, but the developer
-- would appreciate comments and suggestions.
--
-- All parts of the WORDS system, source code and data files, are made freely
-- available to anyone who wishes to use them, for whatever purpose.
with Words_Main;
with Latin_Utils.Config; use Latin_Utils.Config;
procedure Meanings is
begin
-- The language shift in arguments must take place here
-- since later parsing of line ignores non-letter Characters
Words_Main (Only_Meanings);
end Meanings;
|
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2011-2012, Vadim Godunko <vgodunko@gmail.com> --
-- 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.Generic_Hash;
function AMF.UML.Join_Nodes.Hash is
new AMF.Elements.Generic_Hash (UML_Join_Node, UML_Join_Node_Access);
|
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2012, Vadim Godunko <vgodunko@gmail.com> --
-- 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.CMOF.Associations;
with AMF.CMOF.Classes;
with AMF.CMOF.Comments;
with AMF.CMOF.Constraints;
with AMF.CMOF.Data_Types;
with AMF.CMOF.Element_Imports;
with AMF.CMOF.Enumeration_Literals;
with AMF.CMOF.Enumerations;
with AMF.CMOF.Expressions;
with AMF.CMOF.Opaque_Expressions;
with AMF.CMOF.Operations;
with AMF.CMOF.Package_Imports;
with AMF.CMOF.Package_Merges;
with AMF.CMOF.Packages;
with AMF.CMOF.Parameters;
with AMF.CMOF.Primitive_Types;
with AMF.CMOF.Properties;
with AMF.CMOF.Tags;
package AMF.Factories.CMOF_Factories is
pragma Preelaborate;
type CMOF_Factory is limited interface
and AMF.Factories.Factory;
type CMOF_Factory_Access is access all CMOF_Factory'Class;
for CMOF_Factory_Access'Storage_Size use 0;
not overriding function Create_Association
(Self : not null access CMOF_Factory)
return AMF.CMOF.Associations.CMOF_Association_Access is abstract;
not overriding function Create_Class
(Self : not null access CMOF_Factory)
return AMF.CMOF.Classes.CMOF_Class_Access is abstract;
not overriding function Create_Comment
(Self : not null access CMOF_Factory)
return AMF.CMOF.Comments.CMOF_Comment_Access is abstract;
not overriding function Create_Constraint
(Self : not null access CMOF_Factory)
return AMF.CMOF.Constraints.CMOF_Constraint_Access is abstract;
not overriding function Create_Data_Type
(Self : not null access CMOF_Factory)
return AMF.CMOF.Data_Types.CMOF_Data_Type_Access is abstract;
not overriding function Create_Element_Import
(Self : not null access CMOF_Factory)
return AMF.CMOF.Element_Imports.CMOF_Element_Import_Access is abstract;
not overriding function Create_Enumeration
(Self : not null access CMOF_Factory)
return AMF.CMOF.Enumerations.CMOF_Enumeration_Access is abstract;
not overriding function Create_Enumeration_Literal
(Self : not null access CMOF_Factory)
return AMF.CMOF.Enumeration_Literals.CMOF_Enumeration_Literal_Access is abstract;
not overriding function Create_Expression
(Self : not null access CMOF_Factory)
return AMF.CMOF.Expressions.CMOF_Expression_Access is abstract;
not overriding function Create_Opaque_Expression
(Self : not null access CMOF_Factory)
return AMF.CMOF.Opaque_Expressions.CMOF_Opaque_Expression_Access is abstract;
not overriding function Create_Operation
(Self : not null access CMOF_Factory)
return AMF.CMOF.Operations.CMOF_Operation_Access is abstract;
not overriding function Create_Package
(Self : not null access CMOF_Factory)
return AMF.CMOF.Packages.CMOF_Package_Access is abstract;
not overriding function Create_Package_Import
(Self : not null access CMOF_Factory)
return AMF.CMOF.Package_Imports.CMOF_Package_Import_Access is abstract;
not overriding function Create_Package_Merge
(Self : not null access CMOF_Factory)
return AMF.CMOF.Package_Merges.CMOF_Package_Merge_Access is abstract;
not overriding function Create_Parameter
(Self : not null access CMOF_Factory)
return AMF.CMOF.Parameters.CMOF_Parameter_Access is abstract;
not overriding function Create_Primitive_Type
(Self : not null access CMOF_Factory)
return AMF.CMOF.Primitive_Types.CMOF_Primitive_Type_Access is abstract;
not overriding function Create_Property
(Self : not null access CMOF_Factory)
return AMF.CMOF.Properties.CMOF_Property_Access is abstract;
not overriding function Create_Tag
(Self : not null access CMOF_Factory)
return AMF.CMOF.Tags.CMOF_Tag_Access is abstract;
end AMF.Factories.CMOF_Factories;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
-- --
-- SYSTEM.TASKING.PROTECTED_OBJECTS.SINGLE_ENTRY --
-- --
-- S p e c --
-- --
-- Copyright (C) 1998-2013, 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/>. --
-- --
-- GNARL was developed by the GNARL team at Florida State University. --
-- Extensive contributions were provided by Ada Core Technologies, Inc. --
-- --
------------------------------------------------------------------------------
-- This package provides an optimized version of Protected_Objects.Operations
-- and Protected_Objects.Entries making the following assumptions:
-- PO have only one entry
-- There is only one caller at a time (No_Entry_Queue)
-- There is no dynamic priority support (No_Dynamic_Priorities)
-- No Abort Statements
-- (No_Abort_Statements, Max_Asynchronous_Select_Nesting => 0)
-- PO are at library level
-- None of the tasks will terminate (no need for finalization)
-- No timed or conditional entry calls
-- No exception handlers allowed
-- This interface is intended to be used in the Ravenscar profile, the
-- compiler is responsible for ensuring that the conditions mentioned above
-- are respected, except for the No_Entry_Queue restriction that is checked
-- dynamically in this package, since the check cannot be performed at compile
-- time, and is relatively cheap (see body).
-- This package is part of the high level tasking interface used by the
-- compiler to expand Ada 95 tasking constructs into simpler run time calls
-- (aka GNARLI, GNU Ada Run-time Library Interface)
-- Note: the compiler generates direct calls to this interface, via Rtsfind.
-- Any changes to this interface may require corresponding compiler changes
-- in exp_ch9.adb and possibly exp_ch7.adb
package System.Tasking.Protected_Objects.Single_Entry is
pragma Elaborate_Body;
---------------------------------
-- Compiler Interface (GNARLI) --
---------------------------------
-- The compiler will expand in the GNAT tree the following construct:
-- protected PO is
-- entry E;
-- procedure P;
-- private
-- Open : Boolean := False;
-- end PO;
-- protected body PO is
-- entry E when Open is
-- ...variable declarations...
-- begin
-- ...B...
-- end E;
-- procedure P is
-- ...variable declarations...
-- begin
-- ...C...
-- end P;
-- end PO;
-- as follows:
-- protected type poT is
-- entry e;
-- procedure p;
-- private
-- open : boolean := false;
-- end poT;
-- type poTV is limited record
-- open : boolean := false;
-- _object : aliased protection_entry;
-- end record;
-- procedure poPT__E1s (O : address; P : address; E :
-- protected_entry_index);
-- function poPT__B2s (O : address; E : protected_entry_index) return
-- boolean;
-- procedure poPT__pN (_object : in out poTV);
-- procedure poPT__pP (_object : in out poTV);
-- poTA : aliased entry_body := (
-- barrier => poPT__B2s'unrestricted_access,
-- action => poPT__E1s'unrestricted_access);
-- freeze poTV [
-- procedure poTVIP (_init : in out poTV) is
-- begin
-- _init.open := false;
-- object-init-proc (_init._object);
-- initialize_protection_entry (_init._object'unchecked_access,
-- unspecified_priority, _init'address, poTA'
-- unrestricted_access);
-- return;
-- end poTVIP;
-- ]
-- po : poT;
-- poTVIP (poTV!(po));
-- function poPT__B2s (O : address; E : protected_entry_index) return
-- boolean is
-- type poTVP is access poTV;
-- _object : poTVP := poTVP!(O);
-- poR : protection_entry renames _object._object;
-- openP : boolean renames _object.open;
-- begin
-- return open;
-- end poPT__B2s;
-- procedure poPT__E1s (O : address; P : address; E :
-- protected_entry_index) is
-- type poTVP is access poTV;
-- _object : poTVP := poTVP!(O);
-- begin
-- B1b : declare
-- poR : protection_entry renames _object._object;
-- openP : boolean renames _object.open;
-- ...variable declarations...
-- begin
-- ...B...
-- end B1b;
-- return;
-- end poPT__E1s;
-- procedure poPT__pN (_object : in out poTV) is
-- poR : protection_entry renames _object._object;
-- openP : boolean renames _object.open;
-- ...variable declarations...
-- begin
-- ...C...
-- return;
-- end poPT__pN;
-- procedure poPT__pP (_object : in out poTV) is
-- procedure _clean is
-- begin
-- service_entry (_object._object'unchecked_access);
-- return;
-- end _clean;
-- begin
-- lock_entry (_object._object'unchecked_access);
-- B5b : begin
-- poPT__pN (_object);
-- at end
-- _clean;
-- end B5b;
-- return;
-- end poPT__pP;
type Protection_Entry is limited private;
-- This type contains the GNARL state of a protected object. The
-- application-defined portion of the state (i.e. private objects)
-- is maintained by the compiler-generated code.
type Protection_Entry_Access is access all Protection_Entry;
procedure Initialize_Protection_Entry
(Object : Protection_Entry_Access;
Ceiling_Priority : Integer;
Compiler_Info : System.Address;
Entry_Body : Entry_Body_Access);
-- Initialize the Object parameter so that it can be used by the run time
-- to keep track of the runtime state of a protected object.
procedure Lock_Entry (Object : Protection_Entry_Access);
-- Lock a protected object for write access. Upon return, the caller
-- owns the lock to this object, and no other call to Lock with the same
-- argument will return until the corresponding call to Unlock has been
-- made by the caller.
procedure Unlock_Entry (Object : Protection_Entry_Access);
-- Relinquish ownership of the lock for the object represented by
-- the Object parameter. One of the tasks waiting on this lock (if any)
-- will be given the lock and allowed to return from the Lock call.
procedure Service_Entry (Object : Protection_Entry_Access);
-- Service the entry queue of the specified object, executing the
-- corresponding body of any queued entry call that is waiting on True
-- barrier. This is used when the state of a protected object may have
-- changed, in particular after the execution of the statement sequence
-- of a protected procedure. This procedure must be called with abort
-- deferred and with the corresponding object locked. Object is unlocked
-- on return.
procedure Protected_Single_Entry_Call
(Object : Protection_Entry_Access;
Uninterpreted_Data : System.Address);
-- Make a protected entry call to the specified object. Pends a protected
-- entry call on the protected object represented by Object. A pended call
-- is not queued; it may be executed immediately or queued, depending on
-- the state of the entry barrier.
--
-- Uninterpreted_Data
-- This will be returned by Next_Entry_Call when this call is serviced.
-- It can be used by the compiler to pass information between the
-- caller and the server, in particular entry parameters.
function Protected_Count_Entry (Object : Protection_Entry) return Natural;
-- Return the number of entry calls on Object (0 or 1)
function Protected_Single_Entry_Caller
(Object : Protection_Entry) return Task_Id;
-- Return value of E'Caller, where E is the protected entry currently being
-- handled. This will only work if called from within an entry body, as
-- required by the LRM (C.7.1(14)).
private
type Protection_Entry is record
Common : aliased Protection;
-- State of the protected object. This part is common to any protected
-- object, including those without entries.
Compiler_Info : System.Address;
-- Pointer to compiler-generated record representing protected object
Call_In_Progress : Entry_Call_Link;
-- Pointer to the entry call being executed (if any)
Entry_Body : Entry_Body_Access;
-- Pointer to the executable code for entry body of the protected type
Entry_Queue : Entry_Call_Link;
-- Place to store the waiting entry call (if any)
end record;
pragma Suppress_Initialization (Protection_Entry);
end System.Tasking.Protected_Objects.Single_Entry;
|
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Localization, Internationalization, Globalization for Ada --
-- --
-- Testsuite Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2011, Vadim Godunko <vgodunko@gmail.com> --
-- 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$
------------------------------------------------------------------------------
-- Test program to help to test access to arguments and environment.
------------------------------------------------------------------------------
with Ada.Wide_Wide_Text_IO;
with League.Application;
with League.Strings;
with League.String_Vectors;
procedure Arguments_Environment_Test is
use League.Strings;
Args : constant League.String_Vectors.Universal_String_Vector
:= League.Application.Arguments;
begin
if Args.Element (1) /= To_Universal_String ("проверка") then
raise Program_Error;
end if;
for J in 1 .. Args.Length loop
Ada.Wide_Wide_Text_IO.Put_Line (Args.Element (J).To_Wide_Wide_String);
end loop;
Ada.Wide_Wide_Text_IO.Put_Line
(League.Application.Environment.Value
(League.Strings.To_Universal_String ("PATH")).To_Wide_Wide_String);
end Arguments_Environment_Test;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- A D A . D I R E C T O R I E S . V A L I D I T Y --
-- --
-- S p e c --
-- --
-- Copyright (C) 2004-2019, 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 private child package is used in the body of Ada.Directories.
-- It has several bodies, for different platforms.
private package Ada.Directories.Validity is
function Is_Valid_Simple_Name (Name : String) return Boolean;
-- Returns True if Name is a valid file name
function Is_Valid_Path_Name (Name : String) return Boolean;
-- Returns True if Name is a valid path name
function Is_Path_Name_Case_Sensitive return Boolean;
-- Returns True if file and path names are case-sensitive
function Windows return Boolean;
-- Return True when OS is Windows
end Ada.Directories.Validity;
|
-- Demonstrates use of package: Disorderly.Random
with Disorderly.Random; use Disorderly.Random;
with Disorderly.Random.Clock_Entropy;
with Text_io; use text_io;
procedure Random_demo_1 is
X : Random_Int;
Stream_1 : State;
-- Must declare one of these for each desired independent stream of rands.
-- To get successive random nums X from stream_k,
-- you then call Get_Random(X, stream_k);
procedure Pause is
Continue : Character;
begin
new_line; put ("Enter a character to continue: ");
get_immediate (Continue);
new_line;
exception
when others => null;
end Pause;
begin
new_line;
put_line ("The generator needs an initial state before it can create streams");
put_line ("of random numbers. We usually call the state Stream_1. You can");
put_line ("create lots of independent Streams by calling Reset with different");
put_line ("values of the seeds, which are called Initiator1, Initiator2 ... Below");
put_line ("is a series of 12 states created by procedure Reset. The 12 states are");
put_line ("created by setting Initiator1 to 1, 2, 3 ... 12, while keeping ");
put_line ("the other 2 Initiators constant. In fact we only needed to change");
put_line ("Initiator1 by just 1 bit to get a complete change in all four of the");
put_line ("64-bit Integers comprising the state. Each line below shows the four 64 bit");
put_line ("integers of a state. Twelve independent states are printed on 12 lines.");
Pause;
for k in Seed_Random_Int range 1..12 loop
Reset (Stream_1, k, 4444, 55555, 666666);
new_line; put (Formatted_Image (Stream_1));
end loop;
new_line(2);
put_line ("Test functions Image and Value.");
put_line ("Function Image translates the State (an array of 4 Integers) into a String.");
put_line ("Function Value translates the string back to array of 4 Integers.");
put_line ("Do this back and forth, and print the results below. Each string");
put_line ("of 4 numbers (representing a State) should appear twice.");
Pause;
for k in Seed_Random_Int range 1..4 loop
Reset (Stream_1, k, 1, 1, 1);
new_line; put (Formatted_Image (Stream_1));
new_line; put (Formatted_Image (Value (Image (Stream_1))));
new_line;
end loop;
new_line(2);
put_line ("Test of procedure: Clock_Entropy.Reset (Stream_1)");
put_line ("Procedure Clock_Entropy.Reset calls Calendar in an attempt to create");
put_line ("a new and unique initial state each time Clock_Entropy.Reset is called.");
put_line ("Below we call Clock_Entropy.Reset 12 times, in order to get 12 unique");
put_line ("initial states. The 12 initial states (strings of 4 numbers) are printed");
put_line ("on the 12 lines below. If you get the same State twice in a row then the");
put_line ("procedure failed to find a new and unique initial state.");
Pause;
-- up top we wrote: use Disorderly.Random;
-- so we can just call Clock_Entropy.Reset instead of
-- Disorderly.Random.Clock_Entropy.Reset:
new_line;
for k in Seed_Random_Int range 1..12 loop
--Disorderly.Random.Clock_Entropy.Reset (Stream_1);
Clock_Entropy.Reset (Stream_1);
new_line; put (Formatted_Image (Stream_1));
end loop;
new_line(2);
put_line ("Print 8 random nums from Stream_1, the state just initialized.");
Pause;
new_line;
for k in 1..8 loop
Get_Random (X, Stream_1);
new_line; put (Random_Int'Image (X));
end loop;
new_line(2);
put_line ("Final Test");
put_line ("Translate state Integers to a string, and then back to Integer. Do this");
put_line ("back and forth for a long time. If error detected, then report failure.");
Pause;
Clock_Entropy.Reset (Stream_1);
for k in Seed_Random_Int range 1 .. 2**26 loop
Get_Random (X, Stream_1);
if not Are_Equal (Stream_1, Value (Image (Stream_1))) then
raise Program_Error with "FAILURE in Image/Value routines";
end if;
end loop;
new_line; put ("Finished part 1 of the final test.");
for k in Seed_Random_Int range 1 .. 2**22 loop
Reset (Stream_1, k, 1, 1, 1);
if not Are_Equal (Stream_1, Value (Image (Stream_1))) then
raise Program_Error with "FAILURE in Image/Value routines";
end if;
end loop;
new_line; put ("Finished part 2 of the final test.");
for k in Seed_Random_Int range 1 .. 2**20 loop
Clock_Entropy.Reset (Stream_1);
if not Are_Equal (Stream_1, Value (Image (Stream_1))) then
raise Program_Error with "FAILURE in Image/Value routines";
end if;
end loop;
new_line; put ("Finished part 3 of the final test.");
end Random_Demo_1;
|
-- C36172B.ADA
-- Grant of Unlimited Rights
--
-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
-- unlimited rights in the software and documentation contained herein.
-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
-- this public release, the Government intends to confer upon all
-- recipients unlimited rights equal to those held by the Government.
-- These rights include rights to use, duplicate, release or disclose the
-- released technical data and computer software in whole or in part, in
-- any manner and for any purpose whatsoever, and to have or permit others
-- to do so.
--
-- DISCLAIMER
--
-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
-- PARTICULAR PURPOSE OF SAID MATERIAL.
--*
-- CHECK THAT CONSTRAINT_ERROR IS RAISED FOR A MULTIDIMENSIONAL INDEX
-- CONSTRAINT IF ONE OF THE RANGES IS A NULL RANGE AND THE OTHER IS A
-- NON-NULL RANGE WITH A BOUND THAT LIES OUTSIDE THE INDEX SUBTYPE.
-- CHECK THAT NO EXCEPTION IS RAISED IF ALL DISCRETE RANGES ARE NULL.
-- JBG 6/5/85
-- EDS 7/16/98 AVOID OPTIMIZATION
WITH REPORT; USE REPORT;
PROCEDURE C36172B IS
SUBTYPE INT_10 IS INTEGER RANGE 1..10;
TYPE ARR2 IS ARRAY (INT_10 RANGE <>, INT_10 RANGE <>) OF INTEGER;
BEGIN
TEST ("C36172B", "CHECK THAT CONSTRAINT_ERROR IS RAISED FOR A " &
"NON-NULL DIMENSION OF A NULL MULTIDIMENSIONAL " &
"INDEX CONSTRAINT IF A BOUND LIES OUTSIDE THE " &
"INDEX SUBTYPE");
BEGIN
DECLARE
V : ARR2 (6..4, 9..11);
BEGIN
FAILED ("EXCEPTION NOT RAISED WHEN NON-NULL RANGE OF " &
"NULL INDEX CONSTRAINT HAS A BOUND OUTSIDE " &
"THE INDEX SUBTYPE (13) " & INTEGER'IMAGE(V'FIRST));
END;
EXCEPTION
WHEN CONSTRAINT_ERROR =>
NULL;
WHEN OTHERS =>
FAILED ("UNEXPECTED EXCEPTION RAISED - 13");
END;
BEGIN
DECLARE
V : ARR2 (0..3, 8..7);
BEGIN
FAILED ("EXCEPTION NOT RAISED WHEN NON-NULL RANGE OF " &
"NULL INDEX CONSTRAINT HAS A BOUND OUTSIDE " &
"THE INDEX SUBTYPE (14) " & INTEGER'IMAGE(V'FIRST));
END;
EXCEPTION
WHEN CONSTRAINT_ERROR =>
NULL;
WHEN OTHERS =>
FAILED ("UNEXPECTED EXCEPTION RAISED - 14");
END;
BEGIN
DECLARE
V : ARR2 (6..4, IDENT_INT(0)..2);
BEGIN
FAILED ("EXCEPTION NOT RAISED WHEN NON-NULL RANGE OF " &
"NULL INDEX CONSTRAINT HAS A BOUND OUTSIDE " &
"THE INDEX SUBTYPE (15) " & INTEGER'IMAGE(V'FIRST));
END;
EXCEPTION
WHEN CONSTRAINT_ERROR =>
NULL;
WHEN OTHERS =>
FAILED ("UNEXPECTED EXCEPTION RAISED - 15");
END;
BEGIN
DECLARE
V : ARR2 (9..IDENT_INT(11), 6..4);
BEGIN
FAILED ("EXCEPTION NOT RAISED WHEN NON-NULL RANGE OF " &
"NULL INDEX CONSTRAINT HAS A BOUND OUTSIDE " &
"THE INDEX SUBTYPE (16) " & INTEGER'IMAGE(V'FIRST));
END;
EXCEPTION
WHEN CONSTRAINT_ERROR =>
NULL;
WHEN OTHERS =>
FAILED ("UNEXPECTED EXCEPTION RAISED - 16");
END;
BEGIN
DECLARE
V : ARR2 (6..IDENT_INT(4), 9..IDENT_INT(11));
BEGIN
FAILED ("EXCEPTION NOT RAISED WHEN NON-NULL RANGE OF " &
"NULL INDEX CONSTRAINT HAS A BOUND OUTSIDE " &
"THE INDEX SUBTYPE (17) " & INTEGER'IMAGE(V'FIRST));
END;
EXCEPTION
WHEN CONSTRAINT_ERROR =>
NULL;
WHEN OTHERS =>
FAILED ("UNEXPECTED EXCEPTION RAISED - 17");
END;
BEGIN
DECLARE
V : ARR2 (IDENT_INT(-1)..2, IDENT_INT(6)..4);
BEGIN
FAILED ("EXCEPTION NOT RAISED WHEN NON-NULL RANGE OF " &
"NULL INDEX CONSTRAINT HAS A BOUND OUTSIDE " &
"THE INDEX SUBTYPE (18) " & INTEGER'IMAGE(V'FIRST));
END;
EXCEPTION
WHEN CONSTRAINT_ERROR =>
NULL;
WHEN OTHERS =>
FAILED ("UNEXPECTED EXCEPTION RAISED - 18");
END;
BEGIN
DECLARE
V : ARR2 (6..-1, 11..9);
BEGIN
IF NOT EQUAL (V'FIRST, V'FIRST) THEN
FAILED ("IMPOSSIBLE");
END IF;
END;
EXCEPTION
WHEN OTHERS =>
FAILED ("EXCEPTION RAISED FOR NULL CONSTRAINT - 19");
END;
BEGIN
DECLARE
V : ARR2 (IDENT_INT(11)..9, 6..IDENT_INT(0));
BEGIN
IF NOT EQUAL (V'FIRST, V'FIRST) THEN
FAILED ("IMPOSSIBLE");
END IF;
END;
EXCEPTION
WHEN OTHERS =>
FAILED ("EXCEPTION RAISED FOR NULL CONSTRAINT - 20");
END;
RESULT;
END C36172B;
|
------------------------------------------------------------------------------
-- A d a r u n - t i m e s p e c i f i c a t i o n --
-- ASIS implementation for Gela project, a portable Ada compiler --
-- http://gela.ada-ru.org --
-- - - - - - - - - - - - - - - - --
-- Read copyright and license at the end of ada.ads file --
------------------------------------------------------------------------------
-- $Revision: 209 $ $Date: 2013-11-30 21:03:24 +0200 (Сб., 30 нояб. 2013) $
with Ada.Streams;
package Ada.Wide_Wide_Text_IO.Text_Streams is
type Stream_Access is access all Streams.Root_Stream_Type'Class;
function Stream (File : in File_Type) return Stream_Access;
end Ada.Wide_Wide_Text_IO.Text_Streams;
|
-- part of AdaYaml, (c) 2017 Felix Krause
-- released under the terms of the MIT license, see the file "copying.txt"
private package Yaml.Presenter.Analysis is
-- this package analyzes scalars to check how they can be represented
type Necessary_Quoting is (None, Only_In_Flow, Single, Double);
type Scalar_Features is record
Max_Word_Length : Natural;
-- the longest word in the string. a word is anything between two
-- places where a folded scalar could be broken up.
Max_Line_Length : Natural;
-- the longest line in the string. a line is anything between two
-- line feeds.
Single_Line_Length : Natural;
-- length of this string if it was rendered in a single line,
-- excluding possibly necessary quoting signs.
Quoting_Needed : Necessary_Quoting;
-- minimum quoting level of this scalar if rendered as flow scalar.
Unquoted_Single_Line : Boolean;
-- true iff this string can be rendered unquoted as single-line scalar
Folding_Possible : Boolean;
-- true iff this string can be represented as folded (block) scalar
Contains_Non_Printable : Boolean;
-- true iff this string contains non-printable characters
Leading_Spaces : Natural;
-- number of leading spaces
Trailing_Linefeeds : Natural;
-- number of trailing spaces
end record;
function Features (S : String) return Scalar_Features;
end Yaml.Presenter.Analysis;
|
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- D E B U G _ A --
-- --
-- S p e c --
-- --
-- $Revision$
-- --
-- Copyright (C) 1992-1998 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, 59 Temple Place - Suite 330, Boston, --
-- MA 02111-1307, USA. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- This package contains data and subprograms to support the A debug switch
-- that is used to generate output showing what node is being analyzed,
-- resolved, evaluated, or expanded.
with Types; use Types;
package Debug_A is
-- Note: the following subprograms are used in a stack like manner, with
-- an exit call matching each entry call. This means that they can keep
-- track of the current node being worked on, with the entry call setting
-- a new value, by pushing the Node_Id value on a stack, and the exit call
-- popping this value off. Comperr.Current_Error_Node is set by both the
-- entry and exit routines to point to the current node so that an abort
-- message indicates the node involved as accurately as possible.
procedure Debug_A_Entry (S : String; N : Node_Id);
pragma Inline (Debug_A_Entry);
-- Generates a message prefixed by a sequence of bars showing the nesting
-- depth (depth increases by 1 for a Debug_A_Entry call and is decreased
-- by the corresponding Debug_A_Exit call). Then the string is output
-- (analyzing, expanding etc), followed by the node number and its kind.
-- This output is generated only if the debug A flag is set. If the debug
-- A flag is not set, then no output is generated. This call also sets the
-- Node_Id value in Comperr.Current_Error_Node in case a bomb occurs. This
-- is done unconditionally, whether or not the debug A flag is set.
procedure Debug_A_Exit (S : String; N : Node_Id; Comment : String);
pragma Inline (Debug_A_Exit);
-- Generates the corresponding termination message. The message is preceded
-- by a sequence of bars, followed by the string S, the node number, and
-- a trailing comment (e.g. " (already evaluated)"). This output is
-- generated only if the debug A flag is set. If the debug A flag is not
-- set, then no output is generated. This call also resets the value in
-- Comperr.Current_Error_Node to what it was before the corresponding call
-- to Debug_A_Entry.
end Debug_A;
|
with
AdaM.Factory;
package body AdaM.Declaration.of_renaming.a_subprogram
is
-- Storage Pool
--
record_Version : constant := 1;
pool_Size : constant := 5_000;
package Pool is new AdaM.Factory.Pools (".adam-store",
"Declarations.of_renaming.a_subprogram",
pool_Size,
record_Version,
Declaration.of_renaming.a_subprogram.item,
Declaration.of_renaming.a_subprogram.view);
-- Forge
--
procedure define (Self : in out Item)
is
begin
null;
end define;
overriding
procedure destruct (Self : in out Item)
is
begin
null;
end destruct;
function new_Declaration return View
is
new_View : constant Declaration.of_renaming.a_subprogram.view := Pool.new_Item;
begin
define (Declaration.of_renaming.a_subprogram.item (new_View.all));
return new_View;
end new_Declaration;
procedure free (Self : in out Declaration.of_renaming.a_subprogram.view)
is
begin
destruct (Declaration.of_renaming.a_subprogram.item (Self.all));
Pool.free (Self);
end free;
-- Attributes
--
overriding
function Id (Self : access Item) return AdaM.Id
is
begin
return Pool.to_Id (Self);
end Id;
-- Streams
--
procedure View_write (Stream : not null access Ada.Streams.Root_Stream_Type'Class;
Self : in View)
renames Pool.View_write;
procedure View_read (Stream : not null access Ada.Streams.Root_Stream_Type'Class;
Self : out View)
renames Pool.View_read;
end AdaM.Declaration.of_renaming.a_subprogram;
|
-- This spec has been automatically generated from STM32F46_79x.svd
pragma Restrictions (No_Elaboration_Code);
pragma Ada_2012;
pragma Style_Checks (Off);
with HAL;
with System;
package STM32_SVD.USART is
pragma Preelaborate;
---------------
-- Registers --
---------------
-- Status register
type SR_Register is record
-- Read-only. Parity error
PE : Boolean := False;
-- Read-only. Framing error
FE : Boolean := False;
-- Read-only. Noise detected flag
NF : Boolean := False;
-- Read-only. Overrun error
ORE : Boolean := False;
-- Read-only. IDLE line detected
IDLE : Boolean := False;
-- Read data register not empty
RXNE : Boolean := False;
-- Transmission complete
TC : Boolean := False;
-- Read-only. Transmit data register empty
TXE : Boolean := False;
-- LIN break detection flag
LBD : Boolean := False;
-- unspecified
Reserved_9_31 : HAL.UInt23 := 16#6000#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for SR_Register use record
PE at 0 range 0 .. 0;
FE at 0 range 1 .. 1;
NF at 0 range 2 .. 2;
ORE at 0 range 3 .. 3;
IDLE at 0 range 4 .. 4;
RXNE at 0 range 5 .. 5;
TC at 0 range 6 .. 6;
TXE at 0 range 7 .. 7;
LBD at 0 range 8 .. 8;
Reserved_9_31 at 0 range 9 .. 31;
end record;
subtype DR_DR_Field is HAL.UInt9;
-- Data register
type DR_Register is record
-- Data value
DR : DR_DR_Field := 16#0#;
-- unspecified
Reserved_9_31 : HAL.UInt23 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for DR_Register use record
DR at 0 range 0 .. 8;
Reserved_9_31 at 0 range 9 .. 31;
end record;
subtype BRR_DIV_Fraction_Field is HAL.UInt4;
subtype BRR_DIV_Mantissa_Field is HAL.UInt12;
-- Baud rate register
type BRR_Register is record
-- fraction of USARTDIV
DIV_Fraction : BRR_DIV_Fraction_Field := 16#0#;
-- mantissa of USARTDIV
DIV_Mantissa : BRR_DIV_Mantissa_Field := 16#0#;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for BRR_Register use record
DIV_Fraction at 0 range 0 .. 3;
DIV_Mantissa at 0 range 4 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
-- Control register 1
type CR1_Register is record
-- Send break
SBK : Boolean := False;
-- Receiver wakeup
RWU : Boolean := False;
-- Receiver enable
RE : Boolean := False;
-- Transmitter enable
TE : Boolean := False;
-- IDLE interrupt enable
IDLEIE : Boolean := False;
-- RXNE interrupt enable
RXNEIE : Boolean := False;
-- Transmission complete interrupt enable
TCIE : Boolean := False;
-- TXE interrupt enable
TXEIE : Boolean := False;
-- PE interrupt enable
PEIE : Boolean := False;
-- Parity selection
PS : Boolean := False;
-- Parity control enable
PCE : Boolean := False;
-- Wakeup method
WAKE : Boolean := False;
-- Word length
M : Boolean := False;
-- USART enable
UE : Boolean := False;
-- unspecified
Reserved_14_14 : HAL.Bit := 16#0#;
-- Oversampling mode
OVER8 : Boolean := False;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CR1_Register use record
SBK at 0 range 0 .. 0;
RWU at 0 range 1 .. 1;
RE at 0 range 2 .. 2;
TE at 0 range 3 .. 3;
IDLEIE at 0 range 4 .. 4;
RXNEIE at 0 range 5 .. 5;
TCIE at 0 range 6 .. 6;
TXEIE at 0 range 7 .. 7;
PEIE at 0 range 8 .. 8;
PS at 0 range 9 .. 9;
PCE at 0 range 10 .. 10;
WAKE at 0 range 11 .. 11;
M at 0 range 12 .. 12;
UE at 0 range 13 .. 13;
Reserved_14_14 at 0 range 14 .. 14;
OVER8 at 0 range 15 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype CR2_ADD_Field is HAL.UInt4;
subtype CR2_STOP_Field is HAL.UInt2;
-- Control register 2
type CR2_Register is record
-- Address of the USART node
ADD : CR2_ADD_Field := 16#0#;
-- unspecified
Reserved_4_4 : HAL.Bit := 16#0#;
-- lin break detection length
LBDL : Boolean := False;
-- LIN break detection interrupt enable
LBDIE : Boolean := False;
-- unspecified
Reserved_7_11 : HAL.UInt5 := 16#0#;
-- STOP bits
STOP : CR2_STOP_Field := 16#0#;
-- LIN mode enable
LINEN : Boolean := False;
-- unspecified
Reserved_15_31 : HAL.UInt17 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CR2_Register use record
ADD at 0 range 0 .. 3;
Reserved_4_4 at 0 range 4 .. 4;
LBDL at 0 range 5 .. 5;
LBDIE at 0 range 6 .. 6;
Reserved_7_11 at 0 range 7 .. 11;
STOP at 0 range 12 .. 13;
LINEN at 0 range 14 .. 14;
Reserved_15_31 at 0 range 15 .. 31;
end record;
-- Control register 3
type CR3_Register is record
-- Error interrupt enable
EIE : Boolean := False;
-- IrDA mode enable
IREN : Boolean := False;
-- IrDA low-power
IRLP : Boolean := False;
-- Half-duplex selection
HDSEL : Boolean := False;
-- unspecified
Reserved_4_5 : HAL.UInt2 := 16#0#;
-- DMA enable receiver
DMAR : Boolean := False;
-- DMA enable transmitter
DMAT : Boolean := False;
-- unspecified
Reserved_8_10 : HAL.UInt3 := 16#0#;
-- One sample bit method enable
ONEBIT : Boolean := False;
-- unspecified
Reserved_12_31 : HAL.UInt20 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CR3_Register use record
EIE at 0 range 0 .. 0;
IREN at 0 range 1 .. 1;
IRLP at 0 range 2 .. 2;
HDSEL at 0 range 3 .. 3;
Reserved_4_5 at 0 range 4 .. 5;
DMAR at 0 range 6 .. 6;
DMAT at 0 range 7 .. 7;
Reserved_8_10 at 0 range 8 .. 10;
ONEBIT at 0 range 11 .. 11;
Reserved_12_31 at 0 range 12 .. 31;
end record;
-- Status register
type SR_Register_1 is record
-- Read-only. Parity error
PE : Boolean := False;
-- Read-only. Framing error
FE : Boolean := False;
-- Read-only. Noise detected flag
NF : Boolean := False;
-- Read-only. Overrun error
ORE : Boolean := False;
-- Read-only. IDLE line detected
IDLE : Boolean := False;
-- Read data register not empty
RXNE : Boolean := False;
-- Transmission complete
TC : Boolean := False;
-- Read-only. Transmit data register empty
TXE : Boolean := False;
-- LIN break detection flag
LBD : Boolean := False;
-- CTS flag
CTS : Boolean := False;
-- unspecified
Reserved_10_31 : HAL.UInt22 := 16#3000#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for SR_Register_1 use record
PE at 0 range 0 .. 0;
FE at 0 range 1 .. 1;
NF at 0 range 2 .. 2;
ORE at 0 range 3 .. 3;
IDLE at 0 range 4 .. 4;
RXNE at 0 range 5 .. 5;
TC at 0 range 6 .. 6;
TXE at 0 range 7 .. 7;
LBD at 0 range 8 .. 8;
CTS at 0 range 9 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
-- Control register 2
type CR2_Register_1 is record
-- Address of the USART node
ADD : CR2_ADD_Field := 16#0#;
-- unspecified
Reserved_4_4 : HAL.Bit := 16#0#;
-- lin break detection length
LBDL : Boolean := False;
-- LIN break detection interrupt enable
LBDIE : Boolean := False;
-- unspecified
Reserved_7_7 : HAL.Bit := 16#0#;
-- Last bit clock pulse
LBCL : Boolean := False;
-- Clock phase
CPHA : Boolean := False;
-- Clock polarity
CPOL : Boolean := False;
-- Clock enable
CLKEN : Boolean := False;
-- STOP bits
STOP : CR2_STOP_Field := 16#0#;
-- LIN mode enable
LINEN : Boolean := False;
-- unspecified
Reserved_15_31 : HAL.UInt17 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CR2_Register_1 use record
ADD at 0 range 0 .. 3;
Reserved_4_4 at 0 range 4 .. 4;
LBDL at 0 range 5 .. 5;
LBDIE at 0 range 6 .. 6;
Reserved_7_7 at 0 range 7 .. 7;
LBCL at 0 range 8 .. 8;
CPHA at 0 range 9 .. 9;
CPOL at 0 range 10 .. 10;
CLKEN at 0 range 11 .. 11;
STOP at 0 range 12 .. 13;
LINEN at 0 range 14 .. 14;
Reserved_15_31 at 0 range 15 .. 31;
end record;
-- Control register 3
type CR3_Register_1 is record
-- Error interrupt enable
EIE : Boolean := False;
-- IrDA mode enable
IREN : Boolean := False;
-- IrDA low-power
IRLP : Boolean := False;
-- Half-duplex selection
HDSEL : Boolean := False;
-- Smartcard NACK enable
NACK : Boolean := False;
-- Smartcard mode enable
SCEN : Boolean := False;
-- DMA enable receiver
DMAR : Boolean := False;
-- DMA enable transmitter
DMAT : Boolean := False;
-- RTS enable
RTSE : Boolean := False;
-- CTS enable
CTSE : Boolean := False;
-- CTS interrupt enable
CTSIE : Boolean := False;
-- One sample bit method enable
ONEBIT : Boolean := False;
-- unspecified
Reserved_12_31 : HAL.UInt20 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CR3_Register_1 use record
EIE at 0 range 0 .. 0;
IREN at 0 range 1 .. 1;
IRLP at 0 range 2 .. 2;
HDSEL at 0 range 3 .. 3;
NACK at 0 range 4 .. 4;
SCEN at 0 range 5 .. 5;
DMAR at 0 range 6 .. 6;
DMAT at 0 range 7 .. 7;
RTSE at 0 range 8 .. 8;
CTSE at 0 range 9 .. 9;
CTSIE at 0 range 10 .. 10;
ONEBIT at 0 range 11 .. 11;
Reserved_12_31 at 0 range 12 .. 31;
end record;
subtype GTPR_PSC_Field is HAL.UInt8;
subtype GTPR_GT_Field is HAL.UInt8;
-- Guard time and prescaler register
type GTPR_Register is record
-- Prescaler value
PSC : GTPR_PSC_Field := 16#0#;
-- Guard time value
GT : GTPR_GT_Field := 16#0#;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for GTPR_Register use record
PSC at 0 range 0 .. 7;
GT at 0 range 8 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
-----------------
-- Peripherals --
-----------------
-- Universal synchronous asynchronous receiver transmitter
type UART4_Peripheral is record
-- Status register
SR : aliased SR_Register;
-- Data register
DR : aliased DR_Register;
-- Baud rate register
BRR : aliased BRR_Register;
-- Control register 1
CR1 : aliased CR1_Register;
-- Control register 2
CR2 : aliased CR2_Register;
-- Control register 3
CR3 : aliased CR3_Register;
end record
with Volatile;
for UART4_Peripheral use record
SR at 16#0# range 0 .. 31;
DR at 16#4# range 0 .. 31;
BRR at 16#8# range 0 .. 31;
CR1 at 16#C# range 0 .. 31;
CR2 at 16#10# range 0 .. 31;
CR3 at 16#14# range 0 .. 31;
end record;
-- Universal synchronous asynchronous receiver transmitter
UART4_Periph : aliased UART4_Peripheral
with Import, Address => System'To_Address (16#40004C00#);
-- Universal synchronous asynchronous receiver transmitter
UART5_Periph : aliased UART4_Peripheral
with Import, Address => System'To_Address (16#40005000#);
-- Universal synchronous asynchronous receiver transmitter
UART7_Periph : aliased UART4_Peripheral
with Import, Address => System'To_Address (16#40007800#);
-- Universal synchronous asynchronous receiver transmitter
UART8_Periph : aliased UART4_Peripheral
with Import, Address => System'To_Address (16#40007C00#);
-- Universal synchronous asynchronous receiver transmitter
type USART1_Peripheral is record
-- Status register
SR : aliased SR_Register_1;
-- Data register
DR : aliased DR_Register;
-- Baud rate register
BRR : aliased BRR_Register;
-- Control register 1
CR1 : aliased CR1_Register;
-- Control register 2
CR2 : aliased CR2_Register_1;
-- Control register 3
CR3 : aliased CR3_Register_1;
-- Guard time and prescaler register
GTPR : aliased GTPR_Register;
end record
with Volatile;
for USART1_Peripheral use record
SR at 16#0# range 0 .. 31;
DR at 16#4# range 0 .. 31;
BRR at 16#8# range 0 .. 31;
CR1 at 16#C# range 0 .. 31;
CR2 at 16#10# range 0 .. 31;
CR3 at 16#14# range 0 .. 31;
GTPR at 16#18# range 0 .. 31;
end record;
-- Universal synchronous asynchronous receiver transmitter
USART1_Periph : aliased USART1_Peripheral
with Import, Address => System'To_Address (16#40011000#);
-- Universal synchronous asynchronous receiver transmitter
USART2_Periph : aliased USART1_Peripheral
with Import, Address => System'To_Address (16#40004400#);
-- Universal synchronous asynchronous receiver transmitter
USART3_Periph : aliased USART1_Peripheral
with Import, Address => System'To_Address (16#40004800#);
-- Universal synchronous asynchronous receiver transmitter
USART6_Periph : aliased USART1_Peripheral
with Import, Address => System'To_Address (16#40011400#);
end STM32_SVD.USART;
|
with Ada.Containers.Vectors;
with Ada.Exceptions;
with Ada.Strings;
with Ada.Strings.Fixed;
with Ada.Text_IO;
with Rejuvenation.Factory;
with Rejuvenation.Finder;
with Rejuvenation.Navigation;
with Libadalang.Analysis;
with Libadalang.Common;
with Langkit_Support.Slocs;
with Langkit_Support.Text;
with Basic_Declaration;
with Basic_Subprogram_Calls;
with Generic_Subprogram_Calls;
with Task_Subprogram_Calls;
with Aspect_Subprogram_Calls;
with Tagged_Subprogram_Calls;
with Operator_Subprogram_Calls;
with Test_Call_Filtering;
with Test_Operator_Attribute;
with Package_Without_Body;
with Subprogram_Unit;
with Subprogram_Unit_2;
with Deferred_Constant;
with Forward_Declaration;
procedure Main is
package LAL renames Libadalang.Analysis;
package LALCO renames Libadalang.Common;
Context : Rejuvenation.Factory.Project_Context := Rejuvenation.Factory.Open_Project("syntax_examples.gpr");
Units : Rejuvenation.Factory.Analysis_Unit_Vectors.Vector := Rejuvenation.Factory.Open_Files_From_Project(Context, False);
function Get_Filename(Node : LAL.Ada_Node'Class) return String is
use Ada.Strings;
use Ada.Strings.Fixed;
Unit_Filename : constant String := Node.Unit.Get_Filename;
Filename_Start : constant Natural := Index(Unit_Filename, "\", Backward);
begin
return Delete(Unit_Filename, Unit_Filename'First, Filename_Start);
end Get_Filename;
function Get_Location(Node : LAL.Ada_Node'Class) return String is
Filename : constant String := Get_Filename(Node);
Sloc_Range : constant String := Langkit_Support.Slocs.Image(Node.Sloc_Range);
begin
return Filename & "[" & Sloc_Range & "]";
end Get_Location;
function Find_Node_Of_Kind(Node : LAL.Ada_Node'Class; Node_Kind : LALCO.Ada_Node_Kind_Type) return Boolean is
Filename : constant String := Get_Filename(Node);
Found : Boolean := False;
begin
for Node_Of_Kind of Rejuvenation.Finder.Find(Node, Node_Kind) loop
Found := True;
Ada.Text_IO.New_Line;
Node_Of_Kind.Print(Line_Prefix => Filename & ": ");
Ada.Text_IO.New_Line;
end loop;
return Found;
end Find_Node_Of_Kind;
procedure Find_Basic_Decls is
use type LALCO.Ada_Basic_Decl;
package Ada_Basic_Decl_Vectors is new Ada.Containers.Vectors(Positive, LALCO.Ada_Basic_Decl);
use Ada_Basic_Decl_Vectors;
Unit_Specification, Unit_Body : LAL.Analysis_Unit;
Missing_Basic_Decls : Vector;
begin
Unit_Specification := Rejuvenation.Factory.Open_File("src/basic_declaration.ads", Context);
Unit_Body := Rejuvenation.Factory.Open_File("src/basic_declaration.adb", Context);
for Node_Kind in LALCO.Ada_Basic_Decl loop
if Node_Kind not in LALCO.Synthetic_Nodes then
Ada.Text_IO.Put_Line("=== " & Node_Kind'Image & " ===");
if not Find_Node_Of_Kind(Unit_Specification.Root, Node_Kind)
and not Find_Node_Of_Kind(Unit_Body.Root, Node_Kind) then
Missing_Basic_Decls.Append(Node_Kind);
end if;
end if;
end loop;
if Missing_Basic_Decls /= Empty_Vector then
Ada.Text_IO.Put_Line("Missing basic declarations:");
for Node_Kind of Missing_Basic_Decls loop
Ada.Text_IO.Put_Line(" - " & Node_Kind'Image);
end loop;
end if;
end Find_Basic_Decls;
procedure Find_Calls is
Unit : LAL.Analysis_Unit;
function Visit(Node : LAL.Ada_Node'Class) return LALCO.Visit_Status is
use LAL;
use LALCO;
use Langkit_Support.Text;
begin
--if Node.Kind = Ada_Identifier
-- and then Node.Parent.Kind = Ada_Attribute_Ref
-- and then Node.Parent.As_Attribute_Ref.F_Attribute = Node
--then
-- Node.Parent.Parent.Print;
-- Ada.Text_IO.Put_Line(Node.As_Identifier.P_Is_Defining'Image);
-- Ada.Text_IO.Put_Line(Node.As_Identifier.P_Referenced_Decl.Is_Null'Image);
-- Ada.Text_IO.Put_Line(Node.As_Identifier.P_Is_Call'Image);
-- Ada.Text_IO.Put_Line(Node.Parent.As_Attribute_Ref.P_Referenced_Decl.Is_Null'Image);
--end if;
if Node.Kind = Ada_Identifier
and then not Node.As_Identifier.P_Is_Defining
and then Node.As_Identifier.P_Is_Call
then
declare
Identifier : LAL.Identifier := Node.As_Identifier;
Identifier_Parent : LAL.Basic_Decl := Identifier.P_Parent_Basic_Decl;
Identifier_Parent_Name : String :=
Encode(Identifier_Parent.P_Fully_Qualified_Name, Identifier_Parent.Unit.Get_Charset) & " at " & Get_Location(Identifier);
Basic_Decl : LAL.Basic_Decl := Identifier.P_Referenced_Decl;
Basic_Decl_Name : String :=
Encode(Basic_Decl.P_Fully_Qualified_Name, Basic_Decl.Unit.Get_Charset) & " at " & Get_Location(Basic_Decl);
begin
Ada.Text_IO.Put_Line("1) " & Identifier_Parent_Name & " calls " & Basic_Decl_Name);
Ada.Text_IO.Put_Line(" - full path of " & Identifier_Parent_Name & " is " & Identifier.Unit.Get_Filename);
Ada.Text_IO.Put_Line(" - full path of " & Basic_Decl_Name & " is " & Basic_Decl.Unit.Get_Filename);
-- below should be
-- - look at parent, and if dotted name look at type of prefix
-- - look at parent (or parent of parent), and if call expr look at types of parameters
--if Call_Expr /= No_Ada_Node
-- and then (for some E of Call_Expr.As_Call_Expr.F_Suffix.As_Assoc_List => E.As_Param_Assoc.F_R_Expr.P_Expression_Type.Kind = Ada_Classwide_Type_Decl)
--then
-- Ada.Text_IO.Put_Line(" - is dispatching");
--end if;
--if Identifier.P_Is_Dot_Call
-- and then not Dotted_Name.As_Dotted_Name.F_Prefix.P_Expression_Type.Is_Null
--then
-- if Dotted_Name.As_Dotted_Name.F_Prefix.P_Expression_Type.Kind = Ada_Classwide_Type_Decl then -- Crashes in print if this check is missing
-- Dotted_Name.As_Dotted_Name.F_Prefix.Print;
-- Dotted_Name.As_Dotted_Name.F_Prefix.P_Expression_Type.Print;
-- if Call_Expr /= No_Ada_Node
-- and then not Call_Expr.As_Call_Expr.P_Expression_Type.Is_Null
-- then
-- Call_Expr.As_Call_Expr.P_Expression_Type.Print;
-- end if;
-- end if;
--end if;
end;
elsif Node.Kind = Ada_Identifier
and then Node.Parent.Kind /= Ada_End_Name
and then not Node.As_Identifier.P_Is_Defining
and then not Node.As_Identifier.P_Referenced_Decl.Is_Null
and then Node.Parent.Kind not in Ada_Accept_Stmt_Range
and then (Node.As_Identifier.P_Referenced_Decl.Kind = Ada_Subp_Decl
or else Node.As_Identifier.P_Referenced_Decl.Kind = Ada_Null_Subp_Decl
or else Node.As_Identifier.P_Referenced_Decl.Kind = Ada_Expr_Function
or else Node.As_Identifier.P_Referenced_Decl.Kind = Ada_Entry_Decl
or else Node.As_Identifier.P_Referenced_Decl.Kind = Ada_Entry_Body
or else Node.As_Identifier.P_Referenced_Decl.Kind = Ada_Subp_Body
or else Node.As_Identifier.P_Referenced_Decl.Kind = Ada_Subp_Renaming_Decl
or else Node.As_Identifier.P_Referenced_Decl.Kind = Ada_Generic_Subp_Decl
or else Node.As_Identifier.P_Referenced_Decl.Kind = Ada_Generic_Subp_Renaming_Decl
or else Node.As_Identifier.P_Referenced_Decl.Kind = Ada_Generic_Subp_Instantiation
or else Node.As_Identifier.P_Referenced_Decl.Kind = Ada_Subp_Body_Stub
or else Node.As_Identifier.P_Referenced_Decl.Kind = Ada_Abstract_Subp_Decl
or else Node.As_Identifier.P_Referenced_Decl.Kind = Ada_Abstract_Formal_Subp_Decl
or else Node.As_Identifier.P_Referenced_Decl.Kind = Ada_Concrete_Formal_Subp_Decl
or else Node.As_Identifier.P_Referenced_Decl.Kind = Ada_Enum_Literal_Decl) -- Enum literals are parameterless functions
and then (Rejuvenation.Navigation.Get_Ancestor_Of_Type(Node, Ada_Generic_Package_Instantiation) = No_Ada_Node -- Skip designator in instantiation
or else Rejuvenation.Navigation.Get_Ancestor_Of_Type(Node, Ada_Param_Assoc) = No_Ada_Node
or else Rejuvenation.Navigation.Get_Ancestor_Of_Type(Node, Ada_Param_Assoc).As_Param_Assoc.F_Designator /= Node)
and then (Rejuvenation.Navigation.Get_Ancestor_Of_Type(Node, Ada_Generic_Subp_Instantiation) = No_Ada_Node -- Skip designator in instantiation
or else Rejuvenation.Navigation.Get_Ancestor_Of_Type(Node, Ada_Param_Assoc) = No_Ada_Node
or else Rejuvenation.Navigation.Get_Ancestor_Of_Type(Node, Ada_Param_Assoc).As_Param_Assoc.F_Designator /= Node)
then
declare
Identifier : LAL.Identifier := Node.As_Identifier;
Identifier_Parent : LAL.Basic_Decl:= Identifier.P_Parent_Basic_Decl;
Identifier_Parent_Name : String :=
Encode(Identifier_Parent.P_Fully_Qualified_Name, Identifier.Unit.Get_Charset) & " at " & Get_Location(Identifier);
Basic_Decl : LAL.Basic_Decl := Identifier.P_Referenced_Decl;
Basic_Decl_Name : String :=
Encode(Basic_Decl.P_Fully_Qualified_Name, Node.Unit.Get_Charset) & " at " & Get_Location(Basic_Decl);
begin
Ada.Text_IO.Put_Line("2) " & Identifier_Parent_Name & " references " & Basic_Decl_Name);
Ada.Text_IO.Put_Line(" - full path of " & Identifier_Parent_Name & " is " & Identifier.Unit.Get_Filename);
Ada.Text_IO.Put_Line(" - full path of " & Basic_Decl_Name & " is " & Basic_Decl.Unit.Get_Filename);
end;
elsif Node.Kind = Ada_Subp_Decl
then
declare
Subp_Decl : LAL.Subp_Decl := Node.As_Subp_Decl;
Subp_Decl_Name : String :=
Encode(Subp_Decl.P_Fully_Qualified_Name, Subp_Decl.Unit.Get_Charset) & " at " & Get_Location(Subp_Decl);
Subp_Body : LAL.Body_Node := Subp_Decl.P_Body_Part_For_Decl;
Subp_Body_Name : String :=
Encode(Subp_Body.P_Fully_Qualified_Name, Subp_Body.Unit.Get_Charset) & " at " & Get_Location(Subp_Body);
-- Foo : Basic_Decl_Array := Subp_Decl.P_Base_Subp_Declarations; -- Finds subprograms overriden (including the current one)
begin
Ada.Text_IO.Put_Line("3) " & Subp_Decl_Name & " is implemented by " & Subp_Body_Name);
Ada.Text_IO.Put_Line(" - full path of " & Subp_Decl_Name & " is " & Subp_Decl.Unit.Get_Filename);
Ada.Text_IO.Put_Line(" - full path of " & Subp_Body_Name & " is " & Subp_Body.Unit.Get_Filename);
-- for I in Foo'Range loop
-- Foo(I).Print;
--end loop;
end;
elsif Node.Kind = Ada_Generic_Subp_Decl
then
declare
Subp_Decl : LAL.Generic_Subp_Decl := Node.As_Generic_Subp_Decl;
Subp_Decl_Name : String :=
Encode(Subp_Decl.P_Fully_Qualified_Name, Subp_Decl.Unit.Get_Charset) & " at " & Get_Location(Subp_Decl);
Subp_Body : LAL.Body_Node := Subp_Decl.P_Body_Part_For_Decl;
Subp_Body_Name : String :=
Encode(Subp_Body.P_Fully_Qualified_Name, Subp_Body.Unit.Get_Charset) & " at " & Get_Location(Subp_Body);
begin
Ada.Text_IO.Put_Line("4) " & Subp_Decl_Name & " is implemented by " & Subp_Body_Name);
Ada.Text_IO.Put_Line(" - full path of " & Subp_Decl_Name & " is " & Subp_Decl.Unit.Get_Filename);
Ada.Text_IO.Put_Line(" - full path of " & Subp_Body_Name & " is " & Subp_Body.Unit.Get_Filename);
end;
elsif Node.Kind = Ada_Subp_Body_Stub then
declare
Subp_Body_Stub : LAL.Subp_Body_Stub := Node.As_Subp_Body_Stub;
Subp_Body_Stub_Name : String :=
Encode(Subp_Body_Stub.P_Fully_Qualified_Name, Subp_Body_Stub.Unit.Get_Charset) & " at " & Get_Location(Subp_Body_Stub);
Subp_Body : LAL.Body_Node := Subp_Body_Stub.P_Body_Part_For_Decl;
Subp_Body_Name : String :=
Encode(Subp_Body.P_Fully_Qualified_Name, Subp_Body.Unit.Get_Charset) & " at " & Get_Location(Subp_Body);
begin
Ada.Text_IO.Put_Line("5) " & Subp_Body_Stub_Name & " is implemented by " & Subp_Body_Name);
Ada.Text_IO.Put_Line(" - full path of " & Subp_Body_Stub_Name & " is " & Subp_Body_Stub.Unit.Get_Filename);
Ada.Text_IO.Put_Line(" - full path of " & Subp_Body_Name & " is " & Subp_Body.Unit.Get_Filename);
end;
elsif Node.Kind = Ada_Subp_Renaming_Decl
and then not Node.As_Subp_Renaming_Decl.F_Renames.F_Renamed_Object.P_Referenced_Decl.Is_Null
then
declare
Subp_Renaming_Decl : LAL.Subp_Renaming_Decl := Node.As_Subp_Renaming_Decl;
Subp_Renaming_Decl_Name : String :=
Encode(Subp_Renaming_Decl.P_Fully_Qualified_Name, Subp_Renaming_Decl.Unit.Get_Charset) & " at " & Get_Location(Subp_Renaming_Decl);
Basic_Decl : LAL.Basic_Decl := Subp_Renaming_Decl.F_Renames.F_Renamed_Object.P_Referenced_Decl;
Basic_Decl_Name : String :=
Encode(Basic_Decl.P_Fully_Qualified_Name, Node.Unit.Get_Charset) & " at " & Get_Location(Basic_Decl);
begin
Ada.Text_IO.Put_Line("6) " & Subp_Renaming_Decl_Name & " renames " & Basic_Decl_Name);
Ada.Text_IO.Put_Line(" - full path of " & Subp_Renaming_Decl_Name & " is " & Subp_Renaming_Decl.Unit.Get_Filename);
Ada.Text_IO.Put_Line(" - full path of " & Basic_Decl_Name & " is " & Basic_Decl.Unit.Get_Filename);
end;
elsif Node.Kind = Ada_Generic_Subp_Renaming_Decl then
declare
Subp_Renaming_Decl : LAL.Generic_Subp_Renaming_Decl := Node.As_Generic_Subp_Renaming_Decl;
Subp_Renaming_Decl_Name : String :=
Encode(Subp_Renaming_Decl.P_Fully_Qualified_Name, Subp_Renaming_Decl.Unit.Get_Charset) & " at " & Get_Location(Subp_Renaming_Decl);
Basic_Decl : LAL.Basic_Decl := Subp_Renaming_Decl.F_Renames.P_Referenced_Decl;
Basic_Decl_Name : String :=
Encode(Basic_Decl.P_Fully_Qualified_Name, Node.Unit.Get_Charset) & " at " & Get_Location(Basic_Decl);
begin
Ada.Text_IO.Put_Line("7) " & Subp_Renaming_Decl_Name & " renames " & Basic_Decl_Name);
Ada.Text_IO.Put_Line(" - full path of " & Subp_Renaming_Decl_Name & " is " & Subp_Renaming_Decl.Unit.Get_Filename);
Ada.Text_IO.Put_Line(" - full path of " & Basic_Decl_Name & " is " & Basic_Decl.Unit.Get_Filename);
end;
elsif Node.Kind = Ada_Generic_Subp_Instantiation then
declare
Subp_Instantiation : LAL.Generic_Subp_Instantiation := Node.As_Generic_Subp_Instantiation;
Subp_Instantiation_Name : String :=
Encode(Subp_Instantiation.P_Fully_Qualified_Name, Subp_Instantiation.Unit.Get_Charset) & " at " & Get_Location(Subp_Instantiation);
Basic_Decl : LAL.Basic_Decl := Subp_Instantiation.F_Generic_Subp_Name.P_Referenced_Decl;
Basic_Decl_Name : String :=
Encode(Basic_Decl.P_Fully_Qualified_Name, Node.Unit.Get_Charset) & " at " & Get_Location(Basic_Decl);
begin
Ada.Text_IO.Put_Line("8) " & Subp_Instantiation_Name & " instantiates " & Basic_Decl_Name);
Ada.Text_IO.Put_Line(" - full path of " & Subp_Instantiation_Name & " is " & Subp_Instantiation.Unit.Get_Filename);
Ada.Text_IO.Put_Line(" - full path of " & Basic_Decl_Name & " is " & Basic_Decl.Unit.Get_Filename);
end;
elsif Node.Kind = Ada_Entry_Body then -- We do not reason starting from the entry declaration, to be consistent with accept statements
declare
Entry_Body : LAL.Entry_Body := Node.As_Entry_Body;
Entry_Body_Name : String :=
Encode(Entry_Body.P_Fully_Qualified_Name, Entry_Body.Unit.Get_Charset) & " at " & Get_Location(Entry_Body);
Entry_Decl : LAL.Basic_Decl := Entry_Body.P_Decl_Part;
Entry_Decl_Name : String :=
Encode(Entry_Decl.P_Fully_Qualified_Name, Entry_Decl.Unit.Get_Charset) & " at " & Get_Location(Entry_Decl);
begin
Ada.Text_IO.Put_Line("9) " & Entry_Body_Name & " implements " & Entry_Decl_Name);
Ada.Text_IO.Put_Line(" - full path of " & Entry_Body_Name & " is " & Entry_Body.Unit.Get_Filename);
Ada.Text_IO.Put_Line(" - full path of " & Entry_Decl_Name & " is " & Entry_Decl.Unit.Get_Filename);
end;
elsif Node.Kind = Ada_Accept_Stmt then -- We do not reason starting from the entry declaration, because there can be multiple accepts for the same entry.
declare
Accept_Stmt : LAL.Accept_Stmt := Node.As_Accept_Stmt;
Accept_Stmt_Line : String := Accept_Stmt.Sloc_Range.Start_Line'Image;
Accept_Stmt_Parent : LAL.Basic_Decl := Accept_Stmt.P_Parent_Basic_Decl;
Accept_Stmt_Parent_Name : String :=
Encode(Accept_Stmt_Parent.P_Fully_Qualified_Name, Accept_Stmt.Unit.Get_Charset) & " at " & Get_Location(Accept_Stmt);
Entry_Decl : LAL.Entry_Decl := Accept_Stmt.F_Name.P_Referenced_Decl.As_Entry_Decl;
Entry_Decl_Name : String :=
Encode(Entry_Decl.P_Fully_Qualified_Name, Entry_Decl.Unit.Get_Charset) & " at " & Get_Location(Entry_Decl);
begin
Ada.Text_IO.Put_Line("10) " & Accept_Stmt_Parent_Name & " accepts " & Entry_Decl_Name);
Ada.Text_IO.Put_Line(" - full path of " & Accept_Stmt_Parent_Name & " is " & Accept_Stmt.Unit.Get_Filename);
Ada.Text_IO.Put_Line(" - full path of " & Entry_Decl_Name & " is " & Entry_Decl.Unit.Get_Filename);
end;
elsif Node.Kind = Ada_Accept_Stmt_With_Stmts then -- We do not reason starting from the entry declaration, because there can be multiple accepts for the same entry.
declare
Accept_Stmt : LAL.Accept_Stmt_With_Stmts := Node.As_Accept_Stmt_With_Stmts;
Accept_Stmt_Line : String := Accept_Stmt.Sloc_Range.Start_Line'Image;
Accept_Stmt_Parent : LAL.Basic_Decl := Accept_Stmt.P_Parent_Basic_Decl;
Accept_Stmt_Parent_Name : String :=
Encode(Accept_Stmt_Parent.P_Fully_Qualified_Name, Accept_Stmt.Unit.Get_Charset) & " at " & Get_Location(Accept_Stmt);
Entry_Decl : LAL.Entry_Decl := Accept_Stmt.F_Name.P_Referenced_Decl.As_Entry_Decl;
Entry_Decl_Name : String :=
Encode(Entry_Decl.P_Fully_Qualified_Name, Entry_Decl.Unit.Get_Charset) & " at " & Get_Location(Entry_Decl);
begin
Ada.Text_IO.Put_Line("11) " & Accept_Stmt_Parent_Name & " accepts " & Entry_Decl_Name);
Ada.Text_IO.Put_Line(" - full path of " & Accept_Stmt_Parent_Name & " is " & Accept_Stmt.Unit.Get_Filename);
Ada.Text_IO.Put_Line(" - full path of " & Entry_Decl_Name & " is " & Entry_Decl.Unit.Get_Filename);
end;
elsif Node.Kind in Ada_Op
and then not Node.As_Op.P_Referenced_Decl.Is_Null
then
declare
Op : LAL.Op := Node.As_Op;
Op_Line : String := Op.Sloc_Range.Start_Line'Image;
Op_Parent : LAL.Basic_Decl := Op.P_Parent_Basic_Decl;
Op_Parent_Name : String :=
Encode(Op_Parent.P_Fully_Qualified_Name, Op.Unit.Get_Charset) & " at " & Get_Location(Op);
Basic_Decl : LAL.Basic_Decl := Op.P_Referenced_Decl;
Basic_Decl_Name : String :=
Encode(Basic_Decl.P_Fully_Qualified_Name, Node.Unit.Get_Charset) & " at " & Get_Location(Basic_Decl);
begin
Ada.Text_IO.Put_Line("12) " & Op_Parent_Name & " calls " & Basic_Decl_Name);
Ada.Text_IO.Put_Line(" - full path of " & Op_Parent_Name & " is " & Op.Unit.Get_Filename);
Ada.Text_IO.Put_Line(" - full path of " & Basic_Decl_Name & " is " & Basic_Decl.Unit.Get_Filename);
end;
end if;
return Into;
exception when E : Property_Error =>
Ada.Text_IO.Put_Line("Encountered Libadalang problem: " & Ada.Exceptions.Exception_Message (E));
Node.Print;
return Into;
end Visit;
begin
for Unit of Units loop
Ada.Text_IO.Put_Line("== " & Unit.Get_Filename & " ==");
Unit.Root.Traverse(Visit'Access);
end loop;
end Find_Calls;
begin
-- Find_Basic_Decls;
Find_Calls;
end Main;
|
with Ada.Numerics.Generic_Arrays;
package body Ada.Numerics.Generic_Real_Arrays is
package Elementary_Functions is
subtype Float_Type is Real;
function Sqrt (X : Float_Type'Base) return Float_Type'Base;
end Elementary_Functions;
package body Elementary_Functions is
function Sqrt (X : Float_Type'Base) return Float_Type'Base is
begin
if not Standard'Fast_Math and then not (X >= 0.0) then
raise Argument_Error; -- RM A.5.1(22), CXA5A10
end if;
if Float_Type'Digits <= Float'Digits then
declare
function sqrtf (A1 : Float) return Float
with Import,
Convention => Intrinsic,
External_Name => "__builtin_sqrtf";
begin
return Float_Type'Base (sqrtf (Float (X)));
end;
elsif Float_Type'Digits <= Long_Float'Digits then
declare
function sqrt (A1 : Long_Float) return Long_Float
with Import,
Convention => Intrinsic,
External_Name => "__builtin_sqrt";
begin
return Float_Type'Base (sqrt (Long_Float (X)));
end;
else
declare
function sqrtl (x : Long_Long_Float) return Long_Long_Float
with Import,
Convention => Intrinsic,
External_Name => "__builtin_sqrtl";
begin
return Float_Type'Base (sqrtl (Long_Long_Float (X)));
end;
end if;
end Sqrt;
end Elementary_Functions;
function Minor is new Generic_Arrays.Minor (Real'Base, Real_Matrix);
-- for Inverse and Determinant
-- implementation
function "+" (Right : Real_Vector) return Real_Vector is
begin
return Right;
end "+";
function "-" (Right : Real_Vector) return Real_Vector is
function neg_Body is
new Generic_Arrays.Operator_Vector (
Real'Base,
Real_Vector,
Real'Base,
Real_Vector,
"-");
pragma Inline_Always (neg_Body);
begin
return neg_Body (Right);
end "-";
function "abs" (Right : Real_Vector) return Real_Vector is
function abs_Body is
new Generic_Arrays.Operator_Vector (
Real'Base,
Real_Vector,
Real'Base,
Real_Vector,
"abs");
pragma Inline_Always (abs_Body);
begin
return abs_Body (Right);
end "abs";
function "+" (Left, Right : Real_Vector) return Real_Vector is
function add_Body is
new Generic_Arrays.Operator_Vector_Vector (
Real'Base,
Real_Vector,
Real'Base,
Real_Vector,
Real'Base,
Real_Vector,
"+");
pragma Inline_Always (add_Body);
begin
return add_Body (Left, Right);
end "+";
function "-" (Left, Right : Real_Vector) return Real_Vector is
function sub_Body is
new Generic_Arrays.Operator_Vector_Vector (
Real'Base,
Real_Vector,
Real'Base,
Real_Vector,
Real'Base,
Real_Vector,
"-");
pragma Inline_Always (sub_Body);
begin
return sub_Body (Left, Right);
end "-";
function "*" (Left, Right : Real_Vector) return Real'Base is
function mul_Body is
new Generic_Arrays.Inner_Production (
Real'Base,
Real_Vector,
Real'Base,
Real_Vector,
Real'Base,
Zero => 0.0);
pragma Inline_Always (mul_Body);
begin
return mul_Body (Left, Right);
end "*";
function "abs" (Right : Real_Vector) return Real'Base is
function abs_Body is
new Generic_Arrays.Absolute (
Real'Base,
Real_Vector,
Real'Base,
Zero => 0.0,
Sqrt => Elementary_Functions.Sqrt);
pragma Inline_Always (abs_Body);
begin
return abs_Body (Right);
end "abs";
function "*" (Left : Real'Base; Right : Real_Vector) return Real_Vector is
begin
return Right * Left;
end "*";
function "*" (Left : Real_Vector; Right : Real'Base) return Real_Vector is
function mul_Body is
new Generic_Arrays.Operator_Vector_Param (
Real'Base,
Real_Vector,
Real'Base,
Real'Base,
Real_Vector,
"*");
pragma Inline_Always (mul_Body);
begin
return mul_Body (Left, Right);
end "*";
function "/" (Left : Real_Vector; Right : Real'Base) return Real_Vector is
begin
return Left * (1.0 / Right);
end "/";
function Unit_Vector (
Index : Integer;
Order : Positive;
First : Integer := 1)
return Real_Vector
is
function Unit_Vector_Body is
new Generic_Arrays.Unit_Vector (
Real'Base,
Real_Vector,
Zero => 0.0,
One => 1.0);
pragma Inline_Always (Unit_Vector_Body);
begin
return Unit_Vector_Body (Index, Order, First);
end Unit_Vector;
function "+" (Right : Real_Matrix) return Real_Matrix is
begin
return Right;
end "+";
function "-" (Right : Real_Matrix) return Real_Matrix is
function neg_Body is
new Generic_Arrays.Operator_Matrix (
Real'Base,
Real_Matrix,
Real'Base,
Real_Matrix,
"-");
pragma Inline_Always (neg_Body);
begin
return neg_Body (Right);
end "-";
function "abs" (Right : Real_Matrix) return Real_Matrix is
function abs_Body is
new Generic_Arrays.Operator_Matrix (
Real'Base,
Real_Matrix,
Real'Base,
Real_Matrix,
"abs");
pragma Inline_Always (abs_Body);
begin
return abs_Body (Right);
end "abs";
function Transpose (X : Real_Matrix) return Real_Matrix is
function Transpose_Body is
new Generic_Arrays.Transpose (Real'Base, Real_Matrix);
pragma Inline_Always (Transpose_Body);
begin
return Transpose_Body (X);
end Transpose;
function "+" (Left, Right : Real_Matrix) return Real_Matrix is
function add_Body is
new Generic_Arrays.Operator_Matrix_Matrix (
Real'Base,
Real_Matrix,
Real'Base,
Real_Matrix,
Real'Base,
Real_Matrix,
"+");
pragma Inline_Always (add_Body);
begin
return add_Body (Left, Right);
end "+";
function "-" (Left, Right : Real_Matrix) return Real_Matrix is
function sub_Body is
new Generic_Arrays.Operator_Matrix_Matrix (
Real'Base,
Real_Matrix,
Real'Base,
Real_Matrix,
Real'Base,
Real_Matrix,
"-");
pragma Inline_Always (sub_Body);
begin
return sub_Body (Left, Right);
end "-";
function "*" (Left, Right : Real_Matrix) return Real_Matrix is
function mul_Body is
new Generic_Arrays.Multiply_Matrix_Matrix (
Real'Base,
Real_Matrix,
Real'Base,
Real_Matrix,
Real'Base,
Real_Matrix,
Zero => 0.0);
pragma Inline_Always (mul_Body);
begin
return mul_Body (Left, Right);
end "*";
function "*" (Left, Right : Real_Vector) return Real_Matrix is
function mul_Body is
new Generic_Arrays.Multiply_Vector_Vector (
Real'Base,
Real_Vector,
Real'Base,
Real_Vector,
Real'Base,
Real_Matrix);
pragma Inline_Always (mul_Body);
begin
return mul_Body (Left, Right);
end "*";
function "*" (Left : Real_Vector; Right : Real_Matrix) return Real_Vector is
function mul_Body is
new Generic_Arrays.Multiply_Vector_Matrix (
Real'Base,
Real_Vector,
Real'Base,
Real_Matrix,
Real'Base,
Real_Vector,
Zero => 0.0);
pragma Inline_Always (mul_Body);
begin
return mul_Body (Left, Right);
end "*";
function "*" (Left : Real_Matrix; Right : Real_Vector) return Real_Vector is
function mul_Body is
new Generic_Arrays.Multiply_Matrix_Vector (
Real'Base,
Real_Matrix,
Real'Base,
Real_Vector,
Real'Base,
Real_Vector,
Zero => 0.0);
pragma Inline_Always (mul_Body);
begin
return mul_Body (Left, Right);
end "*";
function "*" (Left : Real'Base; Right : Real_Matrix) return Real_Matrix is
begin
return Right * Left;
end "*";
function "*" (Left : Real_Matrix; Right : Real'Base) return Real_Matrix is
function mul_Body is
new Generic_Arrays.Operator_Matrix_Param (
Real'Base,
Real_Matrix,
Real'Base,
Real'Base,
Real_Matrix,
"*");
pragma Inline_Always (mul_Body);
begin
return mul_Body (Left, Right);
end "*";
function "/" (Left : Real_Matrix; Right : Real'Base) return Real_Matrix is
begin
return Left * (1.0 / Right);
end "/";
function Solve (A : Real_Matrix; X : Real_Vector) return Real_Vector is
begin
return Inverse (A) * X;
end Solve;
function Solve (A, X : Real_Matrix) return Real_Matrix is
begin
return Inverse (A) * X;
end Solve;
function Inverse (A : Real_Matrix) return Real_Matrix is
function Inverse_Body is
new Generic_Arrays.Inverse (
Real'Base,
Real_Matrix,
One => 1.0);
pragma Inline_Always (Inverse_Body);
begin
return Inverse_Body (A);
end Inverse;
function Determinant (A : Real_Matrix) return Real'Base is
function Determinant_Body is
new Generic_Arrays.Determinant (
Real'Base,
Real_Matrix,
Zero => 0.0,
One => 1.0);
-- no inline, Determinant uses recursive calling
begin
return Determinant_Body (A);
end Determinant;
function Eigenvalues (A : Real_Matrix) return Real_Vector is
Vectors : Real_Matrix (A'Range (1), A'Range (2));
begin
return Result : Real_Vector (A'Range (2)) do
Eigensystem (A, Result, Vectors);
end return;
end Eigenvalues;
procedure Eigensystem (
A : Real_Matrix;
Values : out Real_Vector;
Vectors : out Real_Matrix)
is
function Is_Minus (X : Real'Base) return Boolean;
function Is_Minus (X : Real'Base) return Boolean is
begin
return X < 0.0;
end Is_Minus;
function Is_Small (X : Real'Base) return Boolean;
function Is_Small (X : Real'Base) return Boolean is
begin
return abs X < 1.0e-32;
end Is_Small;
procedure Eigensystem_Body is
new Generic_Arrays.Eigensystem (
Real'Base,
Real_Vector,
Real'Base,
Real_Matrix,
Zero => 0.0,
One => 1.0,
Two => 2.0,
Sqrt => Elementary_Functions.Sqrt,
Is_Minus => Is_Minus,
Is_Small => Is_Small,
To_Real => "+");
pragma Inline_Always (Eigensystem_Body);
begin
Eigensystem_Body (A, Values, Vectors);
end Eigensystem;
function Unit_Matrix (Order : Positive; First_1, First_2 : Integer := 1)
return Real_Matrix
is
function Unit_Matrix_Body is
new Generic_Arrays.Unit_Matrix (
Real'Base,
Real_Matrix,
Zero => 0.0,
One => 1.0);
pragma Inline_Always (Unit_Matrix_Body);
begin
return Unit_Matrix_Body (Order, First_1, First_2);
end Unit_Matrix;
end Ada.Numerics.Generic_Real_Arrays;
|
--
-- Copyright 2018 The wookey project team <wookey@ssi.gouv.fr>
-- - 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 soc.layout;
with soc.interrupts;
with system;
package soc.dma
with spark_mode => on
is
type t_dma_periph_index is (ID_DMA1, ID_DMA2);
for t_dma_periph_index use (ID_DMA1 => 1, ID_DMA2 => 2);
type t_stream_index is range 0 .. 7;
type t_channel_index is range 0 .. 7 with size => 3;
------------------------------------------
-- DMA interrupt status registers (ISR) --
------------------------------------------
type t_dma_stream_int_status is record
-- Stream FIFO error interrupt flag (FEIF)
FIFO_ERROR : boolean;
-- Stream direct mode error interrupt flag (DMEIF)
DIRECT_MODE_ERROR : boolean;
-- Stream transfer error interrupt flag (TEIF)
TRANSFER_ERROR : boolean;
-- Stream half transfer interrupt flag (HTIF)
HALF_COMPLETE : boolean;
-- Stream transfer complete interrupt flag (TCIF)
TRANSFER_COMPLETE : boolean;
end record
with size => 6;
for t_dma_stream_int_status use record
FIFO_ERROR at 0 range 0 .. 0;
DIRECT_MODE_ERROR at 0 range 2 .. 2;
TRANSFER_ERROR at 0 range 3 .. 3;
HALF_COMPLETE at 0 range 4 .. 4;
TRANSFER_COMPLETE at 0 range 5 .. 5;
end record;
--
-- DMA low interrupt status register (DMA_LISR)
--
type t_DMA_LISR is record
stream_0 : t_dma_stream_int_status;
stream_1 : t_dma_stream_int_status;
reserved_12_15 : bits_4;
stream_2 : t_dma_stream_int_status;
stream_3 : t_dma_stream_int_status;
reserved_28_31 : bits_4;
end record
with pack, size => 32, volatile_full_access;
--
-- DMA high interrupt status register (DMA_HISR)
--
type t_DMA_HISR is record
stream_4 : t_dma_stream_int_status;
stream_5 : t_dma_stream_int_status;
reserved_12_15 : bits_4;
stream_6 : t_dma_stream_int_status;
stream_7 : t_dma_stream_int_status;
reserved_28_31 : bits_4;
end record
with pack, size => 32, volatile_full_access;
----------------------------------------
-- DMA interrupt flag clear registers --
----------------------------------------
type t_dma_stream_clear_interrupts is record
-- Stream clear FIFO error interrupt flag (CFEIF)
CLEAR_FIFO_ERROR : boolean;
-- Stream clear direct mode error interrupt flag (CDMEIF)
CLEAR_DIRECT_MODE_ERROR : boolean;
-- Stream clear transfer error interrupt flag (CTEIF)
CLEAR_TRANSFER_ERROR : boolean;
-- Stream clear half transfer interrupt flag (CHTIF)
CLEAR_HALF_TRANSFER : boolean;
-- Stream clear transfer complete interrupt flag (CTCIF)
CLEAR_TRANSFER_COMPLETE : boolean;
end record
with size => 6;
for t_dma_stream_clear_interrupts use record
CLEAR_FIFO_ERROR at 0 range 0 .. 0;
CLEAR_DIRECT_MODE_ERROR at 0 range 2 .. 2;
CLEAR_TRANSFER_ERROR at 0 range 3 .. 3;
CLEAR_HALF_TRANSFER at 0 range 4 .. 4;
CLEAR_TRANSFER_COMPLETE at 0 range 5 .. 5;
end record;
--
-- DMA low interrupt flag clear register (DMA_LIFCR)
--
type t_DMA_LIFCR is record
stream_0 : t_dma_stream_clear_interrupts;
stream_1 : t_dma_stream_clear_interrupts;
reserved_12_15 : bits_4;
stream_2 : t_dma_stream_clear_interrupts;
stream_3 : t_dma_stream_clear_interrupts;
reserved_28_31 : bits_4;
end record
with pack, size => 32, volatile_full_access;
--
-- DMA high interrupt flag clear register (DMA_HIFCR)
--
type t_DMA_HIFCR is record
stream_4 : t_dma_stream_clear_interrupts;
stream_5 : t_dma_stream_clear_interrupts;
reserved_12_15 : bits_4;
stream_6 : t_dma_stream_clear_interrupts;
stream_7 : t_dma_stream_clear_interrupts;
reserved_28_31 : bits_4;
end record
with pack, size => 32, volatile_full_access;
----------------------------------------------------
-- DMA stream x configuration register (DMA_SxCR) --
----------------------------------------------------
type t_flow_controller is (DMA_FLOW_CONTROLLER, PERIPH_FLOW_CONTROLLER)
with size => 1;
for t_flow_controller use
(DMA_FLOW_CONTROLLER => 0,
PERIPH_FLOW_CONTROLLER => 1);
type t_transfer_dir is
(PERIPHERAL_TO_MEMORY, MEMORY_TO_PERIPHERAL, MEMORY_TO_MEMORY)
with size => 2;
for t_transfer_dir use
(PERIPHERAL_TO_MEMORY => 2#00#,
MEMORY_TO_PERIPHERAL => 2#01#,
MEMORY_TO_MEMORY => 2#10#);
type t_data_size is
(TRANSFER_BYTE, TRANSFER_HALF_WORD, TRANSFER_WORD)
with size => 2;
for t_data_size use
(TRANSFER_BYTE => 2#00#,
TRANSFER_HALF_WORD => 2#01#,
TRANSFER_WORD => 2#10#);
type t_increment_offset_size is (INCREMENT_PSIZE, INCREMENT_WORD)
with size => 1;
for t_increment_offset_size use
(INCREMENT_PSIZE => 0,
INCREMENT_WORD => 1);
type t_priority_level is (LOW, MEDIUM, HIGH, VERY_HIGH) with size => 2;
for t_priority_level use
(LOW => 2#00#,
MEDIUM => 2#01#,
HIGH => 2#10#,
VERY_HIGH => 2#11#);
type t_current_target is (MEMORY_0, MEMORY_1) with size => 1;
for t_current_target use
(MEMORY_0 => 0,
MEMORY_1 => 1);
type t_burst_size is
(SINGLE_TRANSFER, INCR_4_BEATS, INCR_8_BEATS, INCR_16_BEATS)
with size => 2;
for t_burst_size use
(SINGLE_TRANSFER => 2#00#,
INCR_4_BEATS => 2#01#,
INCR_8_BEATS => 2#10#,
INCR_16_BEATS => 2#11#);
type t_DMA_SxCR is record
EN : boolean := false; -- Stream enable
DIRECT_MODE_ERROR : boolean := false; -- DMEIE
TRANSFER_ERROR : boolean := false; -- TEIE
HALF_COMPLETE : boolean := false; -- HTIE
TRANSFER_COMPLETE : boolean := false; -- TCIE
PFCTRL : t_flow_controller := DMA_FLOW_CONTROLLER;
DIR : t_transfer_dir := PERIPHERAL_TO_MEMORY;
CIRC : boolean := false; -- Circular mode enable
PINC : boolean := false; -- Peripheral incr. mode enable
MINC : boolean := false; -- Memory incr. mode enable
PSIZE : t_data_size := TRANSFER_BYTE; -- Peripheral data size
MSIZE : t_data_size := TRANSFER_BYTE; -- Memory data size
PINCOS : t_increment_offset_size := INCREMENT_PSIZE;
PL : t_priority_level := LOW;
DBM : boolean := false; -- Double buffer mode
CT : t_current_target := MEMORY_0;
reserved_20 : bit := 0;
PBURST : t_burst_size := SINGLE_TRANSFER; -- Periph. burst transfer
MBURST : t_burst_size := SINGLE_TRANSFER; -- Memory burst transfer
CHSEL : t_channel_index := 0; -- Channel selection (0..7)
reserved_28_31 : bits_4 := 0;
end record
with size => 32, volatile_full_access;
for t_DMA_SxCR use record
EN at 0 range 0 .. 0;
DIRECT_MODE_ERROR at 0 range 1 .. 1;
TRANSFER_ERROR at 0 range 2 .. 2;
HALF_COMPLETE at 0 range 3 .. 3;
TRANSFER_COMPLETE at 0 range 4 .. 4;
PFCTRL at 0 range 5 .. 5;
DIR at 0 range 6 .. 7;
CIRC at 0 range 8 .. 8;
PINC at 0 range 9 .. 9;
MINC at 0 range 10 .. 10;
PSIZE at 0 range 11 .. 12;
MSIZE at 0 range 13 .. 14;
PINCOS at 0 range 15 .. 15;
PL at 0 range 16 .. 17;
DBM at 0 range 18 .. 18;
CT at 0 range 19 .. 19;
reserved_20 at 0 range 20 .. 20;
PBURST at 0 range 21 .. 22;
MBURST at 0 range 23 .. 24;
CHSEL at 0 range 25 .. 27;
reserved_28_31 at 0 range 28 .. 31;
end record;
-------------------------------------------------------
-- DMA stream x number of data register (DMA_SxNDTR) --
-------------------------------------------------------
type t_DMA_SxNDTR is record
NDT : short;
-- Number of data items to be transferred (0 up to 65535)
reserved_16_31 : short;
end record
with pack, size => 32, volatile_full_access;
----------------------------------------------------------
-- DMA stream x peripheral address register (DMA_SxPAR) --
----------------------------------------------------------
subtype t_DMA_SxPAR is system_address;
---------------------------------------------------------
-- DMA stream x memory 0 address register (DMA_SxM0AR) --
---------------------------------------------------------
subtype t_DMA_SxM0AR is system_address;
---------------------------------------------------------
-- DMA stream x memory 1 address register (DMA_SxM1AR) --
---------------------------------------------------------
subtype t_DMA_SxM1AR is system_address;
----------------------------------------------------
-- DMA stream x FIFO control register (DMA_SxFCR) --
----------------------------------------------------
type t_FIFO_threshold is
(FIFO_1DIV4_FULL, FIFO_1DIV2_FULL, FIFO_3DIV4_FULL, FIFO_FULL)
with size => 2;
for t_FIFO_threshold use
(FIFO_1DIV4_FULL => 2#00#,
FIFO_1DIV2_FULL => 2#01#,
FIFO_3DIV4_FULL => 2#10#,
FIFO_FULL => 2#11#);
type t_FIFO_status is
(FIFO_LESS_1DIV4,
FIFO_LESS_1DIV2,
FIFO_LESS_3DIV4,
FIFO_LESS_FULL,
FIFO_IS_EMPTY,
FIFO_IS_FULL)
with size => 3;
for t_FIFO_status use
(FIFO_LESS_1DIV4 => 2#000#,
FIFO_LESS_1DIV2 => 2#001#,
FIFO_LESS_3DIV4 => 2#010#,
FIFO_LESS_FULL => 2#011#,
FIFO_IS_EMPTY => 2#100#,
FIFO_IS_FULL => 2#101#);
type t_DMA_SxFCR is record
FTH : t_FIFO_threshold := FIFO_1DIV2_FULL; -- FIFO threshold
DMDIS : boolean := false; -- Direct mode disable
FS : t_FIFO_status := FIFO_IS_EMPTY; -- FIFO status
reserved_6 : bit := 0;
FIFO_ERROR : boolean := false; -- FIFO error intr. enable (FEIE)
reserved_8_15 : byte := 0;
reserved_16_31 : short := 0;
end record
with pack, size => 32, volatile_full_access;
--------------------
-- DMA peripheral --
--------------------
type t_stream_registers is record
CR : t_DMA_SxCR; -- Control register
NDTR : t_DMA_SxNDTR; -- Number of data register
PAR : t_DMA_SxPAR; -- Peripheral address register
M0AR : t_DMA_SxM0AR; -- memory 0 address register
M1AR : t_DMA_SxM1AR; -- memory 1 address register
FCR : t_DMA_SxFCR; -- FIFO control register
end record
with volatile;
for t_stream_registers use record
CR at 16#00# range 0 .. 31;
NDTR at 16#04# range 0 .. 31;
PAR at 16#08# range 0 .. 31;
M0AR at 16#0C# range 0 .. 31;
M1AR at 16#10# range 0 .. 31;
FCR at 16#14# range 0 .. 31;
end record;
type t_streams_registers is array (t_stream_index) of t_stream_registers
with pack;
type t_dma_periph is record
LISR : t_DMA_LISR; -- Interrupt status register (0 .. 3)
HISR : t_DMA_HISR; -- Interrupt status register (4 .. 7)
LIFCR : t_DMA_LIFCR; -- Interrupt clear register (0 .. 3)
HIFCR : t_DMA_HIFCR; -- Interrupt clear register (4 .. 7)
streams : t_streams_registers;
end record
with volatile;
for t_dma_periph use record
LISR at 16#00# range 0 .. 31;
HISR at 16#04# range 0 .. 31;
LIFCR at 16#08# range 0 .. 31;
HIFCR at 16#0C# range 0 .. 31;
streams at 16#10# range 0 .. (32 * 6 * 8) - 1;
end record;
DMA1 : aliased t_dma_periph
with import, volatile, address => system'to_address (soc.layout.DMA1_BASE);
DMA2 : aliased t_dma_periph
with import, volatile, address => system'to_address (soc.layout.DMA2_BASE);
---------------
-- Utilities --
---------------
procedure enable_clocks;
procedure enable
(controller : in out t_dma_periph;
stream : in t_stream_index)
with inline_always;
procedure disable
(controller : in out t_dma_periph;
stream : in t_stream_index);
procedure get_dma_stream_from_interrupt
(intr : in soc.interrupts.t_interrupt;
dma_id : out t_dma_periph_index;
stream : out t_stream_index;
success : out boolean);
function soc_is_dma_irq
(intr : soc.interrupts.t_interrupt)
return boolean;
function get_interrupt_status
(controller : t_dma_periph;
stream : t_stream_index) return t_dma_stream_int_status
with volatile_function;
procedure set_IFCR
(controller : in out t_dma_periph;
stream : in t_stream_index;
IFCR : in t_dma_stream_clear_interrupts);
procedure clear_all_interrupts
(controller : in out t_dma_periph;
stream : in t_stream_index);
procedure reset_stream
(controller : in out t_dma_periph;
stream : in t_stream_index);
procedure reset_streams;
end soc.dma;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUNTIME COMPONENTS --
-- --
-- A D A . L O N G _ F L O A T _ T E X T _ I O --
-- --
-- S p e c --
-- --
-- $Revision$
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --
-- --
------------------------------------------------------------------------------
with Ada.Text_IO;
package Ada.Long_Float_Text_IO is
new Ada.Text_IO.Float_IO (Long_Float);
|
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2011-2012, Vadim Godunko <vgodunko@gmail.com> --
-- 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.Generic_Collections;
package AMF.Standard_Profile_L2.Executables.Collections is
pragma Preelaborate;
package Standard_Profile_L2_Executable_Collections is
new AMF.Generic_Collections
(Standard_Profile_L2_Executable,
Standard_Profile_L2_Executable_Access);
type Set_Of_Standard_Profile_L2_Executable is
new Standard_Profile_L2_Executable_Collections.Set with null record;
Empty_Set_Of_Standard_Profile_L2_Executable : constant Set_Of_Standard_Profile_L2_Executable;
type Ordered_Set_Of_Standard_Profile_L2_Executable is
new Standard_Profile_L2_Executable_Collections.Ordered_Set with null record;
Empty_Ordered_Set_Of_Standard_Profile_L2_Executable : constant Ordered_Set_Of_Standard_Profile_L2_Executable;
type Bag_Of_Standard_Profile_L2_Executable is
new Standard_Profile_L2_Executable_Collections.Bag with null record;
Empty_Bag_Of_Standard_Profile_L2_Executable : constant Bag_Of_Standard_Profile_L2_Executable;
type Sequence_Of_Standard_Profile_L2_Executable is
new Standard_Profile_L2_Executable_Collections.Sequence with null record;
Empty_Sequence_Of_Standard_Profile_L2_Executable : constant Sequence_Of_Standard_Profile_L2_Executable;
private
Empty_Set_Of_Standard_Profile_L2_Executable : constant Set_Of_Standard_Profile_L2_Executable
:= (Standard_Profile_L2_Executable_Collections.Set with null record);
Empty_Ordered_Set_Of_Standard_Profile_L2_Executable : constant Ordered_Set_Of_Standard_Profile_L2_Executable
:= (Standard_Profile_L2_Executable_Collections.Ordered_Set with null record);
Empty_Bag_Of_Standard_Profile_L2_Executable : constant Bag_Of_Standard_Profile_L2_Executable
:= (Standard_Profile_L2_Executable_Collections.Bag with null record);
Empty_Sequence_Of_Standard_Profile_L2_Executable : constant Sequence_Of_Standard_Profile_L2_Executable
:= (Standard_Profile_L2_Executable_Collections.Sequence with null record);
end AMF.Standard_Profile_L2.Executables.Collections;
|
package Game.Test_Data.Tests.Positive_Container is
end Game.Test_Data.Tests.Positive_Container;
|
-- ////////////////////////////////////////////////////////////
-- //
-- // SFML - Simple and Fast Multimedia Library
-- // Copyright (C) 2007-2009 Laurent Gomila (laurent.gom@gmail.com)
-- //
-- // This software is provided 'as-is', without any express or implied warranty.
-- // In no event will the authors be held liable for any damages arising from the use of this software.
-- //
-- // Permission is granted to anyone to use this software for any purpose,
-- // including commercial applications, and to alter it and redistribute it freely,
-- // subject to the following restrictions:
-- //
-- // 1. The origin of this software must not be misrepresented;
-- // you must not claim that you wrote the original software.
-- // If you use this software in a product, an acknowledgment
-- // in the product documentation would be appreciated but is not required.
-- //
-- // 2. Altered source versions must be plainly marked as such,
-- // and must not be misrepresented as being the original software.
-- //
-- // 3. This notice may not be removed or altered from any source distribution.
-- //
-- ////////////////////////////////////////////////////////////
-- ////////////////////////////////////////////////////////////
-- // Headers
-- ////////////////////////////////////////////////////////////
with Sf.Config;
with Sf.Window.Types;
package Sf.Window.Context is
use Sf.Config;
use Sf.Window.Types;
-- ////////////////////////////////////////////////////////////
-- /// Construct a new context
-- ///
-- /// \return New context
-- ///
-- ////////////////////////////////////////////////////////////
function sfContext_Create return sfContext_Ptr;
-- ////////////////////////////////////////////////////////////
-- /// Destroy an existing context
-- ///
-- /// \param Context : Context to destroy
-- ///
-- ////////////////////////////////////////////////////////////
procedure sfContext_Destroy (Context : sfContext_Ptr);
-- ////////////////////////////////////////////////////////////
-- /// Activate or deactivate a context
-- ///
-- /// \param Context : Context to activate or deactivate
-- /// \param Active : sfTrue to activate, sfFalse to deactivate
-- ///
-- ////////////////////////////////////////////////////////////
procedure sfContext_SetActive (Context : sfContext_Ptr; Active : sfBool);
private
pragma Import (C, sfContext_Create, "sfContext_Create");
pragma Import (C, sfContext_Destroy, "sfContext_Destroy");
pragma Import (C, sfContext_SetActive, "sfContext_SetActive");
end Sf.Window.Context;
|
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- S Y S T E M . S T O R A G E _ E L E M E N T S --
-- --
-- S p e c --
-- --
-- Copyright (C) 2002-2013, 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 implementation dependent sections of this file. --
-- --
-- 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. --
-- --
------------------------------------------------------------------------------
-- Warning: declarations in this package are ambiguous with respect to the
-- extra declarations that can be introduced into System using Extend_System.
-- It is a good idea to avoid use clauses for this package.
pragma Compiler_Unit_Warning;
package System.Storage_Elements is
pragma Pure;
-- Note that we take advantage of the implementation permission to make
-- this unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada 2005,
-- this is Pure in any case (AI-362).
-- We also add the pragma Pure_Function to the operations in this package,
-- because otherwise functions with parameters derived from Address are
-- treated as non-pure by the back-end (see exp_ch6.adb). This is because
-- in many cases such a parameter is used to hide read/out access to
-- objects, and it would be unsafe to treat such functions as pure.
type Storage_Offset is range
-(2 ** (Integer'(Standard'Address_Size) - 1)) ..
+(2 ** (Integer'(Standard'Address_Size) - 1)) - Long_Long_Integer'(1);
-- Note: the reason for the Long_Long_Integer qualification here is to
-- avoid a bogus ambiguity when this unit is analyzed in an rtsfind
-- context. It may be possible to remove this in the future, but it is
-- certainly harmless in any case ???
subtype Storage_Count is Storage_Offset range 0 .. Storage_Offset'Last;
type Storage_Element is mod 2 ** Storage_Unit;
for Storage_Element'Size use Storage_Unit;
pragma Universal_Aliasing (Storage_Element);
-- This type is used by the expander to implement aggregate copy
type Storage_Array is
array (Storage_Offset range <>) of aliased Storage_Element;
for Storage_Array'Component_Size use Storage_Unit;
-- Address arithmetic
function "+" (Left : Address; Right : Storage_Offset) return Address;
pragma Convention (Intrinsic, "+");
pragma Inline_Always ("+");
pragma Pure_Function ("+");
function "+" (Left : Storage_Offset; Right : Address) return Address;
pragma Convention (Intrinsic, "+");
pragma Inline_Always ("+");
pragma Pure_Function ("+");
function "-" (Left : Address; Right : Storage_Offset) return Address;
pragma Convention (Intrinsic, "-");
pragma Inline_Always ("-");
pragma Pure_Function ("-");
function "-" (Left, Right : Address) return Storage_Offset;
pragma Convention (Intrinsic, "-");
pragma Inline_Always ("-");
pragma Pure_Function ("-");
function "mod"
(Left : Address;
Right : Storage_Offset) return Storage_Offset;
pragma Convention (Intrinsic, "mod");
pragma Inline_Always ("mod");
pragma Pure_Function ("mod");
-- Conversion to/from integers
type Integer_Address is mod Memory_Size;
function To_Address (Value : Integer_Address) return Address;
pragma Convention (Intrinsic, To_Address);
pragma Inline_Always (To_Address);
pragma Pure_Function (To_Address);
function To_Integer (Value : Address) return Integer_Address;
pragma Convention (Intrinsic, To_Integer);
pragma Inline_Always (To_Integer);
pragma Pure_Function (To_Integer);
end System.Storage_Elements;
|
with PixelArray;
with ImageRegions;
with ImageMoments;
with ImageThresholds;
with Morphology;
with Histogram;
with HistogramDescriptor;
with Ada.Containers.Vectors;
with Ada.Directories;
package ShapeDatabase is
pragma Elaborate_Body;
pragma Assertion_Policy (Pre => Check,
Post => Check,
Type_Invariant => Check);
type Descriptor is tagged record
moments: ImageMoments.HuMoments;
orientation: Float;
histogram: HistogramDescriptor.Data;
end record;
type CharacterDescriptor is record
c: Character;
d: Descriptor;
end record;
package ShapeVector is new Ada.Containers.Vectors(Index_Type => Natural,
Element_Type => CharacterDescriptor);
use ShapeVector;
type DB is tagged record
shapes: ShapeVector.Vector;
end record;
type MatchScore is record
cc: Character;
score: Float;
end record;
function preprocess(image: PixelArray.ImagePlane) return PixelArray.ImagePlane
with Post => ImageThresholds.isBinary(preprocess'Result);
function Preprocess_And_Detect_Regions(image: in PixelArray.ImagePlane; res: out ImageRegions.RegionVector.Vector) return PixelArray.ImagePlane;
function getDB return DB;
function match(database: DB; image: PixelArray.ImagePlane; region: ImageRegions.Region) return MatchScore;
function loadShapes(imagePath: String) return ShapeVector.Vector
with Pre => Ada.Directories.Exists(Name => imagePath),
Post => not loadShapes'Result.Is_Empty;
private
staticDB: DB;
end ShapeDatabase;
|
<?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/>
<cdfg class_id="1" tracking_level="1" version="0" object_id="_0">
<name>relu_2</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>data_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>data.V</originalName>
<rtlName/>
<coreName>RAM</coreName>
</Obj>
<bitwidth>14</bitwidth>
</Value>
<direction>0</direction>
<if_type>1</if_type>
<array_size>84</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>res_V</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>res.V</originalName>
<rtlName/>
<coreName>RAM</coreName>
</Obj>
<bitwidth>13</bitwidth>
</Value>
<direction>1</direction>
<if_type>1</if_type>
<array_size>84</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>15</count>
<item_version>0</item_version>
<item class_id="9" tracking_level="1" version="0" object_id="_3">
<Value>
<Obj>
<type>0</type>
<id>3</id>
<name/>
<fileName>firmware/nnet_utils/nnet_activation.h</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>76</lineNumber>
<contextFuncName>relu&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, ap_fixed&lt;14, 2, 0, 0, 0&gt;, relu_config16&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item class_id="10" tracking_level="0" version="0">
<first>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</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>firmware/nnet_utils/nnet_activation.h</first>
<second>relu&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, ap_fixed&lt;14, 2, 0, 0, 0&gt;, relu_config16&gt;</second>
</first>
<second>76</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>23</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="_4">
<Value>
<Obj>
<type>0</type>
<id>5</id>
<name>ii</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>ii</originalName>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>7</bitwidth>
</Value>
<oprand_edges>
<count>4</count>
<item_version>0</item_version>
<item>25</item>
<item>26</item>
<item>27</item>
<item>28</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="_5">
<Value>
<Obj>
<type>0</type>
<id>6</id>
<name>tmp</name>
<fileName>firmware/nnet_utils/nnet_activation.h</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>76</lineNumber>
<contextFuncName>relu&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, ap_fixed&lt;14, 2, 0, 0, 0&gt;, relu_config16&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_activation.h</first>
<second>relu&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, ap_fixed&lt;14, 2, 0, 0, 0&gt;, relu_config16&gt;</second>
</first>
<second>76</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>tmp_fu_57_p2</rtlName>
<coreName/>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>29</item>
<item>31</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.48</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>ii_2</name>
<fileName>firmware/nnet_utils/nnet_activation.h</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>76</lineNumber>
<contextFuncName>relu&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, ap_fixed&lt;14, 2, 0, 0, 0&gt;, relu_config16&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_activation.h</first>
<second>relu&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, ap_fixed&lt;14, 2, 0, 0, 0&gt;, relu_config16&gt;</second>
</first>
<second>76</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>ii</originalName>
<rtlName>ii_2_fu_63_p2</rtlName>
<coreName/>
</Obj>
<bitwidth>7</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>32</item>
<item>34</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.87</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/>
<fileName>firmware/nnet_utils/nnet_activation.h</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>76</lineNumber>
<contextFuncName>relu&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, ap_fixed&lt;14, 2, 0, 0, 0&gt;, relu_config16&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_activation.h</first>
<second>relu&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, ap_fixed&lt;14, 2, 0, 0, 0&gt;, relu_config16&gt;</second>
</first>
<second>76</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>35</item>
<item>36</item>
<item>37</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="_8">
<Value>
<Obj>
<type>0</type>
<id>11</id>
<name>tmp_s</name>
<fileName>firmware/nnet_utils/nnet_activation.h</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>80</lineNumber>
<contextFuncName>relu&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, ap_fixed&lt;14, 2, 0, 0, 0&gt;, relu_config16&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_activation.h</first>
<second>relu&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, ap_fixed&lt;14, 2, 0, 0, 0&gt;, relu_config16&gt;</second>
</first>
<second>80</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>tmp_s_fu_69_p1</rtlName>
<coreName/>
</Obj>
<bitwidth>64</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>38</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>6</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_9">
<Value>
<Obj>
<type>0</type>
<id>12</id>
<name>data_V_addr</name>
<fileName>firmware/nnet_utils/nnet_activation.h</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>80</lineNumber>
<contextFuncName>relu&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, ap_fixed&lt;14, 2, 0, 0, 0&gt;, relu_config16&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_activation.h</first>
<second>relu&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, ap_fixed&lt;14, 2, 0, 0, 0&gt;, relu_config16&gt;</second>
</first>
<second>80</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>7</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>39</item>
<item>41</item>
<item>42</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>7</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_10">
<Value>
<Obj>
<type>0</type>
<id>13</id>
<name>datareg_V</name>
<fileName>firmware/nnet_utils/nnet_activation.h</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>80</lineNumber>
<contextFuncName>relu&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, ap_fixed&lt;14, 2, 0, 0, 0&gt;, relu_config16&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_activation.h</first>
<second>relu&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, ap_fixed&lt;14, 2, 0, 0, 0&gt;, relu_config16&gt;</second>
</first>
<second>80</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>datareg.V</originalName>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>14</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>43</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>3.25</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>14</id>
<name>tmp_15</name>
<fileName>firmware/nnet_utils/nnet_activation.h</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>80</lineNumber>
<contextFuncName>relu&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, ap_fixed&lt;14, 2, 0, 0, 0&gt;, relu_config16&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_activation.h</first>
<second>relu&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, ap_fixed&lt;14, 2, 0, 0, 0&gt;, relu_config16&gt;</second>
</first>
<second>80</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>tmp_15_fu_74_p1</rtlName>
<coreName/>
</Obj>
<bitwidth>13</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>44</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>10</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_12">
<Value>
<Obj>
<type>0</type>
<id>15</id>
<name>tmp_3</name>
<fileName>firmware/nnet_utils/nnet_activation.h</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>81</lineNumber>
<contextFuncName>relu&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, ap_fixed&lt;14, 2, 0, 0, 0&gt;, relu_config16&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_activation.h</first>
<second>relu&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, ap_fixed&lt;14, 2, 0, 0, 0&gt;, relu_config16&gt;</second>
</first>
<second>81</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>tmp_3_fu_78_p2</rtlName>
<coreName/>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>45</item>
<item>47</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>2.20</m_delay>
<m_topoIndex>11</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_13">
<Value>
<Obj>
<type>0</type>
<id>16</id>
<name>res_V_addr</name>
<fileName>firmware/nnet_utils/nnet_activation.h</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>81</lineNumber>
<contextFuncName>relu&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, ap_fixed&lt;14, 2, 0, 0, 0&gt;, relu_config16&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_activation.h</first>
<second>relu&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, ap_fixed&lt;14, 2, 0, 0, 0&gt;, relu_config16&gt;</second>
</first>
<second>81</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>7</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>48</item>
<item>49</item>
<item>50</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>13</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_14">
<Value>
<Obj>
<type>0</type>
<id>17</id>
<name>datareg_V_2</name>
<fileName>firmware/nnet_utils/nnet_activation.h</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>81</lineNumber>
<contextFuncName>relu&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, ap_fixed&lt;14, 2, 0, 0, 0&gt;, relu_config16&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_activation.h</first>
<second>relu&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, ap_fixed&lt;14, 2, 0, 0, 0&gt;, relu_config16&gt;</second>
</first>
<second>81</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>datareg.V</originalName>
<rtlName>datareg_V_2_fu_83_p3</rtlName>
<coreName/>
</Obj>
<bitwidth>13</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>51</item>
<item>52</item>
<item>54</item>
</oprand_edges>
<opcode>select</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.69</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>18</id>
<name/>
<fileName>firmware/nnet_utils/nnet_activation.h</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>81</lineNumber>
<contextFuncName>relu&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, ap_fixed&lt;14, 2, 0, 0, 0&gt;, relu_config16&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_activation.h</first>
<second>relu&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, ap_fixed&lt;14, 2, 0, 0, 0&gt;, relu_config16&gt;</second>
</first>
<second>81</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>55</item>
<item>56</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>3.25</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>19</id>
<name/>
<fileName>firmware/nnet_utils/nnet_activation.h</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>76</lineNumber>
<contextFuncName>relu&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, ap_fixed&lt;14, 2, 0, 0, 0&gt;, relu_config16&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_activation.h</first>
<second>relu&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, ap_fixed&lt;14, 2, 0, 0, 0&gt;, relu_config16&gt;</second>
</first>
<second>76</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>57</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>15</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_17">
<Value>
<Obj>
<type>0</type>
<id>21</id>
<name/>
<fileName>firmware/nnet_utils/nnet_activation.h</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>84</lineNumber>
<contextFuncName>relu&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, ap_fixed&lt;14, 2, 0, 0, 0&gt;, relu_config16&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_activation.h</first>
<second>relu&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, ap_fixed&lt;14, 2, 0, 0, 0&gt;, relu_config16&gt;</second>
</first>
<second>84</second>
</item>
</second>
</item>
</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>
<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="_18">
<Value>
<Obj>
<type>2</type>
<id>24</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>7</bitwidth>
</Value>
<const_type>0</const_type>
<content>0</content>
</item>
<item class_id_reference="16" object_id="_19">
<Value>
<Obj>
<type>2</type>
<id>30</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>7</bitwidth>
</Value>
<const_type>0</const_type>
<content>84</content>
</item>
<item class_id_reference="16" object_id="_20">
<Value>
<Obj>
<type>2</type>
<id>33</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>7</bitwidth>
</Value>
<const_type>0</const_type>
<content>1</content>
</item>
<item class_id_reference="16" object_id="_21">
<Value>
<Obj>
<type>2</type>
<id>40</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>
<item class_id_reference="16" object_id="_22">
<Value>
<Obj>
<type>2</type>
<id>46</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>14</bitwidth>
</Value>
<const_type>0</const_type>
<content>0</content>
</item>
<item class_id_reference="16" object_id="_23">
<Value>
<Obj>
<type>2</type>
<id>53</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>13</bitwidth>
</Value>
<const_type>0</const_type>
<content>0</content>
</item>
</consts>
<blocks class_id="17" tracking_level="0" version="0">
<count>4</count>
<item_version>0</item_version>
<item class_id="18" tracking_level="1" version="0" object_id="_24">
<Obj>
<type>3</type>
<id>4</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>3</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_25">
<Obj>
<type>3</type>
<id>10</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>5</item>
<item>6</item>
<item>8</item>
<item>9</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_26">
<Obj>
<type>3</type>
<id>20</id>
<name>_ZgtILi14ELi2ELb1EL9ap_q_mode0EL9ap_o_mode0ELi0EEbRK13ap_fixed_baseIXT_EXT0_EXT1_EXT2_EXT3_EXT4_EEi.exit</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<node_objs>
<count>9</count>
<item_version>0</item_version>
<item>11</item>
<item>12</item>
<item>13</item>
<item>14</item>
<item>15</item>
<item>16</item>
<item>17</item>
<item>18</item>
<item>19</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_27">
<Obj>
<type>3</type>
<id>22</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>21</item>
</node_objs>
</item>
</blocks>
<edges class_id="19" tracking_level="0" version="0">
<count>33</count>
<item_version>0</item_version>
<item class_id="20" tracking_level="1" version="0" object_id="_28">
<id>23</id>
<edge_type>2</edge_type>
<source_obj>10</source_obj>
<sink_obj>3</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_29">
<id>25</id>
<edge_type>1</edge_type>
<source_obj>24</source_obj>
<sink_obj>5</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_30">
<id>26</id>
<edge_type>2</edge_type>
<source_obj>4</source_obj>
<sink_obj>5</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_31">
<id>27</id>
<edge_type>1</edge_type>
<source_obj>8</source_obj>
<sink_obj>5</sink_obj>
<is_back_edge>1</is_back_edge>
</item>
<item class_id_reference="20" object_id="_32">
<id>28</id>
<edge_type>2</edge_type>
<source_obj>20</source_obj>
<sink_obj>5</sink_obj>
<is_back_edge>1</is_back_edge>
</item>
<item class_id_reference="20" object_id="_33">
<id>29</id>
<edge_type>1</edge_type>
<source_obj>5</source_obj>
<sink_obj>6</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_34">
<id>31</id>
<edge_type>1</edge_type>
<source_obj>30</source_obj>
<sink_obj>6</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_35">
<id>32</id>
<edge_type>1</edge_type>
<source_obj>5</source_obj>
<sink_obj>8</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_36">
<id>34</id>
<edge_type>1</edge_type>
<source_obj>33</source_obj>
<sink_obj>8</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_37">
<id>35</id>
<edge_type>1</edge_type>
<source_obj>6</source_obj>
<sink_obj>9</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_38">
<id>36</id>
<edge_type>2</edge_type>
<source_obj>20</source_obj>
<sink_obj>9</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_39">
<id>37</id>
<edge_type>2</edge_type>
<source_obj>22</source_obj>
<sink_obj>9</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_40">
<id>38</id>
<edge_type>1</edge_type>
<source_obj>5</source_obj>
<sink_obj>11</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_41">
<id>39</id>
<edge_type>1</edge_type>
<source_obj>1</source_obj>
<sink_obj>12</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_42">
<id>41</id>
<edge_type>1</edge_type>
<source_obj>40</source_obj>
<sink_obj>12</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_43">
<id>42</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="_44">
<id>43</id>
<edge_type>1</edge_type>
<source_obj>12</source_obj>
<sink_obj>13</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_45">
<id>44</id>
<edge_type>1</edge_type>
<source_obj>13</source_obj>
<sink_obj>14</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_46">
<id>45</id>
<edge_type>1</edge_type>
<source_obj>13</source_obj>
<sink_obj>15</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_47">
<id>47</id>
<edge_type>1</edge_type>
<source_obj>46</source_obj>
<sink_obj>15</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_48">
<id>48</id>
<edge_type>1</edge_type>
<source_obj>2</source_obj>
<sink_obj>16</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_49">
<id>49</id>
<edge_type>1</edge_type>
<source_obj>40</source_obj>
<sink_obj>16</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_50">
<id>50</id>
<edge_type>1</edge_type>
<source_obj>11</source_obj>
<sink_obj>16</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_51">
<id>51</id>
<edge_type>1</edge_type>
<source_obj>15</source_obj>
<sink_obj>17</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_52">
<id>52</id>
<edge_type>1</edge_type>
<source_obj>14</source_obj>
<sink_obj>17</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_53">
<id>54</id>
<edge_type>1</edge_type>
<source_obj>53</source_obj>
<sink_obj>17</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_54">
<id>55</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="_55">
<id>56</id>
<edge_type>1</edge_type>
<source_obj>16</source_obj>
<sink_obj>18</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_56">
<id>57</id>
<edge_type>2</edge_type>
<source_obj>10</source_obj>
<sink_obj>19</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_57">
<id>64</id>
<edge_type>2</edge_type>
<source_obj>4</source_obj>
<sink_obj>10</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_58">
<id>65</id>
<edge_type>2</edge_type>
<source_obj>10</source_obj>
<sink_obj>22</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_59">
<id>66</id>
<edge_type>2</edge_type>
<source_obj>10</source_obj>
<sink_obj>20</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_60">
<id>67</id>
<edge_type>2</edge_type>
<source_obj>20</source_obj>
<sink_obj>10</sink_obj>
<is_back_edge>1</is_back_edge>
</item>
</edges>
</cdfg>
<cdfg_regions class_id="21" tracking_level="0" version="0">
<count>4</count>
<item_version>0</item_version>
<item class_id="22" tracking_level="1" version="0" object_id="_61">
<mId>1</mId>
<mTag>relu.2</mTag>
<mType>0</mType>
<sub_regions>
<count>3</count>
<item_version>0</item_version>
<item>2</item>
<item>3</item>
<item>4</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>337</mMinLatency>
<mMaxLatency>337</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"/>
</item>
<item class_id_reference="22" object_id="_62">
<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>4</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"/>
</item>
<item class_id_reference="22" object_id="_63">
<mId>3</mId>
<mTag>Loop 1</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>10</item>
<item>20</item>
</basic_blocks>
<mII>-1</mII>
<mDepth>-1</mDepth>
<mMinTripCount>84</mMinTripCount>
<mMaxTripCount>84</mMaxTripCount>
<mMinLatency>336</mMinLatency>
<mMaxLatency>336</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"/>
</item>
<item class_id_reference="22" object_id="_64">
<mId>4</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>22</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"/>
</item>
</cdfg_regions>
<fsm class_id="24" tracking_level="1" version="0" object_id="_65">
<states class_id="25" tracking_level="0" version="0">
<count>5</count>
<item_version>0</item_version>
<item class_id="26" tracking_level="1" version="0" object_id="_66">
<id>1</id>
<operations class_id="27" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="28" tracking_level="1" version="0" object_id="_67">
<id>3</id>
<stage>1</stage>
<latency>1</latency>
</item>
</operations>
</item>
<item class_id_reference="26" object_id="_68">
<id>2</id>
<operations>
<count>9</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_69">
<id>5</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_70">
<id>6</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_71">
<id>7</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_72">
<id>8</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_73">
<id>9</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_74">
<id>11</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_75">
<id>12</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_76">
<id>13</id>
<stage>2</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_77">
<id>21</id>
<stage>1</stage>
<latency>1</latency>
</item>
</operations>
</item>
<item class_id_reference="26" object_id="_78">
<id>3</id>
<operations>
<count>2</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_79">
<id>13</id>
<stage>1</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_80">
<id>14</id>
<stage>1</stage>
<latency>1</latency>
</item>
</operations>
</item>
<item class_id_reference="26" object_id="_81">
<id>4</id>
<operations>
<count>2</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_82">
<id>15</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_83">
<id>17</id>
<stage>1</stage>
<latency>1</latency>
</item>
</operations>
</item>
<item class_id_reference="26" object_id="_84">
<id>5</id>
<operations>
<count>3</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_85">
<id>16</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_86">
<id>18</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_87">
<id>19</id>
<stage>1</stage>
<latency>1</latency>
</item>
</operations>
</item>
</states>
<transitions class_id="29" tracking_level="0" version="0">
<count>5</count>
<item_version>0</item_version>
<item class_id="30" tracking_level="1" version="0" object_id="_88">
<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="_89">
<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>6</first>
<second>0</second>
</first>
<second>1</second>
</item>
</item>
</sop>
</condition>
</item>
<item class_id_reference="30" object_id="_90">
<inState>3</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="_91">
<inState>4</inState>
<outState>5</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="_92">
<inState>5</inState>
<outState>2</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>
</transitions>
</fsm>
<res class_id="36" tracking_level="1" version="0" object_id="_93">
<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>5</count>
<item_version>0</item_version>
<item class_id="38" tracking_level="0" version="0">
<first>ap_block_state1 ( 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>datareg_V_2_fu_83_p3 ( select ) </first>
<second>
<count>5</count>
<item_version>0</item_version>
<item>
<first>(0P0)</first>
<second>1</second>
</item>
<item>
<first>(1P1)</first>
<second>13</second>
</item>
<item>
<first>(2P2)</first>
<second>1</second>
</item>
<item>
<first>FF</first>
<second>0</second>
</item>
<item>
<first>LUT</first>
<second>13</second>
</item>
</second>
</item>
<item>
<first>ii_2_fu_63_p2 ( + ) </first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0P0)</first>
<second>7</second>
</item>
<item>
<first>(1P1)</first>
<second>1</second>
</item>
<item>
<first>FF</first>
<second>0</second>
</item>
<item>
<first>LUT</first>
<second>15</second>
</item>
</second>
</item>
<item>
<first>tmp_3_fu_78_p2 ( icmp ) </first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0P0)</first>
<second>14</second>
</item>
<item>
<first>(1P1)</first>
<second>1</second>
</item>
<item>
<first>FF</first>
<second>0</second>
</item>
<item>
<first>LUT</first>
<second>13</second>
</item>
</second>
</item>
<item>
<first>tmp_fu_57_p2 ( icmp ) </first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0P0)</first>
<second>7</second>
</item>
<item>
<first>(1P1)</first>
<second>7</second>
</item>
<item>
<first>FF</first>
<second>0</second>
</item>
<item>
<first>LUT</first>
<second>11</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>0</count>
<item_version>0</item_version>
</dp_memory_resource>
<dp_multiplexer_resource>
<count>3</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>6</second>
</item>
<item>
<first>(1Bits)</first>
<second>1</second>
</item>
<item>
<first>(2Count)</first>
<second>6</second>
</item>
<item>
<first>LUT</first>
<second>33</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>ii_reg_46</first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0Size)</first>
<second>2</second>
</item>
<item>
<first>(1Bits)</first>
<second>7</second>
</item>
<item>
<first>(2Count)</first>
<second>14</second>
</item>
<item>
<first>LUT</first>
<second>9</second>
</item>
</second>
</item>
</dp_multiplexer_resource>
<dp_register_resource>
<count>8</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>5</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>5</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>datareg_V_2_reg_118</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>13</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>13</second>
</item>
</second>
</item>
<item>
<first>datareg_V_reg_108</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>14</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>14</second>
</item>
</second>
</item>
<item>
<first>ii_2_reg_93</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>7</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>7</second>
</item>
</second>
</item>
<item>
<first>ii_reg_46</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>7</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>7</second>
</item>
</second>
</item>
<item>
<first>tmp_15_reg_113</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>13</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>13</second>
</item>
</second>
</item>
<item>
<first>tmp_s_reg_98</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>64</second>
</item>
<item>
<first>(Consts)</first>
<second>57</second>
</item>
<item>
<first>FF</first>
<second>7</second>
</item>
</second>
</item>
</dp_register_resource>
<dp_dsp_resource>
<count>0</count>
<item_version>0</item_version>
</dp_dsp_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>4</count>
<item_version>0</item_version>
<item class_id="42" tracking_level="0" version="0">
<first>datareg_V_2_fu_83_p3 ( select ) </first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>17</item>
</second>
</item>
<item>
<first>ii_2_fu_63_p2 ( + ) </first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>8</item>
</second>
</item>
<item>
<first>tmp_3_fu_78_p2 ( icmp ) </first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>15</item>
</second>
</item>
<item>
<first>tmp_fu_57_p2 ( icmp ) </first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>6</item>
</second>
</item>
</dp_expression_map>
<dp_fifo_map>
<count>0</count>
<item_version>0</item_version>
</dp_fifo_map>
<dp_memory_map>
<count>0</count>
<item_version>0</item_version>
</dp_memory_map>
</res>
<node_label_latency class_id="43" tracking_level="0" version="0">
<count>15</count>
<item_version>0</item_version>
<item class_id="44" tracking_level="0" version="0">
<first>3</first>
<second class_id="45" tracking_level="0" version="0">
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>5</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>6</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>8</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>9</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>12</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>13</first>
<second>
<first>1</first>
<second>1</second>
</second>
</item>
<item>
<first>14</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>15</first>
<second>
<first>3</first>
<second>0</second>
</second>
</item>
<item>
<first>16</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>17</first>
<second>
<first>3</first>
<second>0</second>
</second>
</item>
<item>
<first>18</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>19</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>21</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>4</count>
<item_version>0</item_version>
<item class_id="47" tracking_level="0" version="0">
<first>4</first>
<second class_id="48" tracking_level="0" version="0">
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>10</first>
<second>
<first>1</first>
<second>1</second>
</second>
</item>
<item>
<first>20</first>
<second>
<first>1</first>
<second>4</second>
</second>
</item>
<item>
<first>22</first>
<second>
<first>1</first>
<second>1</second>
</second>
</item>
</bblk_ent_exit>
<regions class_id="49" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</regions>
<dp_fu_nodes class_id="50" tracking_level="0" version="0">
<count>11</count>
<item_version>0</item_version>
<item class_id="51" tracking_level="0" version="0">
<first>20</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>12</item>
</second>
</item>
<item>
<first>27</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>13</item>
<item>13</item>
</second>
</item>
<item>
<first>33</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>16</item>
</second>
</item>
<item>
<first>40</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>18</item>
</second>
</item>
<item>
<first>50</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>5</item>
</second>
</item>
<item>
<first>57</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>6</item>
</second>
</item>
<item>
<first>63</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>8</item>
</second>
</item>
<item>
<first>69</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>11</item>
</second>
</item>
<item>
<first>74</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>14</item>
</second>
</item>
<item>
<first>78</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>15</item>
</second>
</item>
<item>
<first>83</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>17</item>
</second>
</item>
</dp_fu_nodes>
<dp_fu_nodes_expression class_id="53" tracking_level="0" version="0">
<count>9</count>
<item_version>0</item_version>
<item class_id="54" tracking_level="0" version="0">
<first>data_V_addr_gep_fu_20</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>12</item>
</second>
</item>
<item>
<first>datareg_V_2_fu_83</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>17</item>
</second>
</item>
<item>
<first>ii_2_fu_63</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>8</item>
</second>
</item>
<item>
<first>ii_phi_fu_50</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>5</item>
</second>
</item>
<item>
<first>res_V_addr_gep_fu_33</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>16</item>
</second>
</item>
<item>
<first>tmp_15_fu_74</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>14</item>
</second>
</item>
<item>
<first>tmp_3_fu_78</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>15</item>
</second>
</item>
<item>
<first>tmp_fu_57</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>6</item>
</second>
</item>
<item>
<first>tmp_s_fu_69</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>11</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>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="55" tracking_level="0" version="0">
<count>2</count>
<item_version>0</item_version>
<item class_id="56" tracking_level="0" version="0">
<first class_id="57" tracking_level="0" version="0">
<first>data_V</first>
<second>0</second>
</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>13</item>
<item>13</item>
</second>
</item>
<item>
<first>
<first>res_V</first>
<second>0</second>
</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>18</item>
</second>
</item>
</dp_mem_port_nodes>
<dp_reg_nodes>
<count>7</count>
<item_version>0</item_version>
<item>
<first>46</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>5</item>
</second>
</item>
<item>
<first>93</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>8</item>
</second>
</item>
<item>
<first>98</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>11</item>
</second>
</item>
<item>
<first>103</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>12</item>
</second>
</item>
<item>
<first>108</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>13</item>
</second>
</item>
<item>
<first>113</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>14</item>
</second>
</item>
<item>
<first>118</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>17</item>
</second>
</item>
</dp_reg_nodes>
<dp_regname_nodes>
<count>7</count>
<item_version>0</item_version>
<item>
<first>data_V_addr_reg_103</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>12</item>
</second>
</item>
<item>
<first>datareg_V_2_reg_118</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>17</item>
</second>
</item>
<item>
<first>datareg_V_reg_108</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>13</item>
</second>
</item>
<item>
<first>ii_2_reg_93</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>8</item>
</second>
</item>
<item>
<first>ii_reg_46</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>5</item>
</second>
</item>
<item>
<first>tmp_15_reg_113</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>14</item>
</second>
</item>
<item>
<first>tmp_s_reg_98</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>11</item>
</second>
</item>
</dp_regname_nodes>
<dp_reg_phi>
<count>1</count>
<item_version>0</item_version>
<item>
<first>46</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>5</item>
</second>
</item>
</dp_reg_phi>
<dp_regname_phi>
<count>1</count>
<item_version>0</item_version>
<item>
<first>ii_reg_46</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>5</item>
</second>
</item>
</dp_regname_phi>
<dp_port_io_nodes class_id="58" tracking_level="0" version="0">
<count>2</count>
<item_version>0</item_version>
<item class_id="59" tracking_level="0" version="0">
<first>data_V(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>13</item>
<item>13</item>
</second>
</item>
</second>
</item>
<item>
<first>res_V(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>18</item>
</second>
</item>
</second>
</item>
</dp_port_io_nodes>
<port2core class_id="60" tracking_level="0" version="0">
<count>2</count>
<item_version>0</item_version>
<item class_id="61" tracking_level="0" version="0">
<first>1</first>
<second>RAM</second>
</item>
<item>
<first>2</first>
<second>RAM</second>
</item>
</port2core>
<node2core>
<count>0</count>
<item_version>0</item_version>
</node2core>
</syndb>
</boost_serialization>
|
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2011-2012, Vadim Godunko <vgodunko@gmail.com> --
-- 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.Generic_Collections;
package AMF.UMLDI.UML_Package_Diagrams.Collections is
pragma Preelaborate;
package UMLDI_UML_Package_Diagram_Collections is
new AMF.Generic_Collections
(UMLDI_UML_Package_Diagram,
UMLDI_UML_Package_Diagram_Access);
type Set_Of_UMLDI_UML_Package_Diagram is
new UMLDI_UML_Package_Diagram_Collections.Set with null record;
Empty_Set_Of_UMLDI_UML_Package_Diagram : constant Set_Of_UMLDI_UML_Package_Diagram;
type Ordered_Set_Of_UMLDI_UML_Package_Diagram is
new UMLDI_UML_Package_Diagram_Collections.Ordered_Set with null record;
Empty_Ordered_Set_Of_UMLDI_UML_Package_Diagram : constant Ordered_Set_Of_UMLDI_UML_Package_Diagram;
type Bag_Of_UMLDI_UML_Package_Diagram is
new UMLDI_UML_Package_Diagram_Collections.Bag with null record;
Empty_Bag_Of_UMLDI_UML_Package_Diagram : constant Bag_Of_UMLDI_UML_Package_Diagram;
type Sequence_Of_UMLDI_UML_Package_Diagram is
new UMLDI_UML_Package_Diagram_Collections.Sequence with null record;
Empty_Sequence_Of_UMLDI_UML_Package_Diagram : constant Sequence_Of_UMLDI_UML_Package_Diagram;
private
Empty_Set_Of_UMLDI_UML_Package_Diagram : constant Set_Of_UMLDI_UML_Package_Diagram
:= (UMLDI_UML_Package_Diagram_Collections.Set with null record);
Empty_Ordered_Set_Of_UMLDI_UML_Package_Diagram : constant Ordered_Set_Of_UMLDI_UML_Package_Diagram
:= (UMLDI_UML_Package_Diagram_Collections.Ordered_Set with null record);
Empty_Bag_Of_UMLDI_UML_Package_Diagram : constant Bag_Of_UMLDI_UML_Package_Diagram
:= (UMLDI_UML_Package_Diagram_Collections.Bag with null record);
Empty_Sequence_Of_UMLDI_UML_Package_Diagram : constant Sequence_Of_UMLDI_UML_Package_Diagram
:= (UMLDI_UML_Package_Diagram_Collections.Sequence with null record);
end AMF.UMLDI.UML_Package_Diagrams.Collections;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- A D A . W I D E _ C H A R A C T E R S . U N I C O D E --
-- --
-- S p e c --
-- --
-- Copyright (C) 2005-2012, 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. --
-- --
------------------------------------------------------------------------------
-- Unicode categorization routines for Wide_Character. Note that this
-- package is strictly speaking Ada 2005 (since it is a child of an
-- Ada 2005 unit), but we make it available in Ada 95 mode, since it
-- only deals with wide characters.
with System.UTF_32;
package Ada.Wide_Characters.Unicode is
pragma Pure;
-- The following type defines the categories from the unicode definitions.
-- The one addition we make is Fe, which represents the characters FFFE
-- and FFFF in any of the planes.
type Category is new System.UTF_32.Category;
-- Cc Other, Control
-- Cf Other, Format
-- Cn Other, Not Assigned
-- Co Other, Private Use
-- Cs Other, Surrogate
-- Ll Letter, Lowercase
-- Lm Letter, Modifier
-- Lo Letter, Other
-- Lt Letter, Titlecase
-- Lu Letter, Uppercase
-- Mc Mark, Spacing Combining
-- Me Mark, Enclosing
-- Mn Mark, Nonspacing
-- Nd Number, Decimal Digit
-- Nl Number, Letter
-- No Number, Other
-- Pc Punctuation, Connector
-- Pd Punctuation, Dash
-- Pe Punctuation, Close
-- Pf Punctuation, Final quote
-- Pi Punctuation, Initial quote
-- Po Punctuation, Other
-- Ps Punctuation, Open
-- Sc Symbol, Currency
-- Sk Symbol, Modifier
-- Sm Symbol, Math
-- So Symbol, Other
-- Zl Separator, Line
-- Zp Separator, Paragraph
-- Zs Separator, Space
-- Fe relative position FFFE/FFFF in plane
function Get_Category (U : Wide_Character) return Category;
pragma Inline (Get_Category);
-- Given a Wide_Character, returns corresponding Category, or Cn if the
-- code does not have an assigned unicode category.
-- The following functions perform category tests corresponding to lexical
-- classes defined in the Ada standard. There are two interfaces for each
-- function. The second takes a Category (e.g. returned by Get_Category).
-- The first takes a Wide_Character. The form taking the Wide_Character is
-- typically more efficient than calling Get_Category, but if several
-- different tests are to be performed on the same code, it is more
-- efficient to use Get_Category to get the category, then test the
-- resulting category.
function Is_Letter (U : Wide_Character) return Boolean;
function Is_Letter (C : Category) return Boolean;
pragma Inline (Is_Letter);
-- Returns true iff U is a letter that can be used to start an identifier,
-- or if C is one of the corresponding categories, which are the following:
-- Letter, Uppercase (Lu)
-- Letter, Lowercase (Ll)
-- Letter, Titlecase (Lt)
-- Letter, Modifier (Lm)
-- Letter, Other (Lo)
-- Number, Letter (Nl)
function Is_Digit (U : Wide_Character) return Boolean;
function Is_Digit (C : Category) return Boolean;
pragma Inline (Is_Digit);
-- Returns true iff U is a digit that can be used to extend an identifer,
-- or if C is one of the corresponding categories, which are the following:
-- Number, Decimal_Digit (Nd)
function Is_Line_Terminator (U : Wide_Character) return Boolean;
pragma Inline (Is_Line_Terminator);
-- Returns true iff U is an allowed line terminator for source programs,
-- if U is in the category Zp (Separator, Paragaph), or Zs (Separator,
-- Line), or if U is a conventional line terminator (CR, LF, VT, FF).
-- There is no category version for this function, since the set of
-- characters does not correspond to a set of Unicode categories.
function Is_Mark (U : Wide_Character) return Boolean;
function Is_Mark (C : Category) return Boolean;
pragma Inline (Is_Mark);
-- Returns true iff U is a mark character which can be used to extend an
-- identifier, or if C is one of the corresponding categories, which are
-- the following:
-- Mark, Non-Spacing (Mn)
-- Mark, Spacing Combining (Mc)
function Is_Other (U : Wide_Character) return Boolean;
function Is_Other (C : Category) return Boolean;
pragma Inline (Is_Other);
-- Returns true iff U is an other format character, which means that it
-- can be used to extend an identifier, but is ignored for the purposes of
-- matching of identiers, or if C is one of the corresponding categories,
-- which are the following:
-- Other, Format (Cf)
function Is_Punctuation (U : Wide_Character) return Boolean;
function Is_Punctuation (C : Category) return Boolean;
pragma Inline (Is_Punctuation);
-- Returns true iff U is a punctuation character that can be used to
-- separate pices of an identifier, or if C is one of the corresponding
-- categories, which are the following:
-- Punctuation, Connector (Pc)
function Is_Space (U : Wide_Character) return Boolean;
function Is_Space (C : Category) return Boolean;
pragma Inline (Is_Space);
-- Returns true iff U is considered a space to be ignored, or if C is one
-- of the corresponding categories, which are the following:
-- Separator, Space (Zs)
function Is_Non_Graphic (U : Wide_Character) return Boolean;
function Is_Non_Graphic (C : Category) return Boolean;
pragma Inline (Is_Non_Graphic);
-- Returns true iff U is considered to be a non-graphic character, or if C
-- is one of the corresponding categories, which are the following:
-- Other, Control (Cc)
-- Other, Private Use (Co)
-- Other, Surrogate (Cs)
-- Separator, Line (Zl)
-- Separator, Paragraph (Zp)
-- FFFE or FFFF positions in any plane (Fe)
--
-- Note that the Ada category format effector is subsumed by the above
-- list of Unicode categories.
--
-- Note that Other, Unassiged (Cn) is quite deliberately not included
-- in the list of categories above. This means that should any of these
-- code positions be defined in future with graphic characters they will
-- be allowed without a need to change implementations or the standard.
--
-- Note that Other, Format (Cf) is also quite deliberately not included
-- in the list of categories above. This means that these characters can
-- be included in character and string literals.
-- The following function is used to fold to upper case, as required by
-- the Ada 2005 standard rules for identifier case folding. Two
-- identifiers are equivalent if they are identical after folding all
-- letters to upper case using this routine. A corresponding function to
-- fold to lower case is also provided.
function To_Lower_Case (U : Wide_Character) return Wide_Character;
pragma Inline (To_Lower_Case);
-- If U represents an upper case letter, returns the corresponding lower
-- case letter, otherwise U is returned unchanged. The folding is locale
-- independent as defined by documents referenced in the note in section
-- 1 of ISO/IEC 10646:2003
function To_Upper_Case (U : Wide_Character) return Wide_Character;
pragma Inline (To_Upper_Case);
-- If U represents a lower case letter, returns the corresponding upper
-- case letter, otherwise U is returned unchanged. The folding is locale
-- independent as defined by documents referenced in the note in section
-- 1 of ISO/IEC 10646:2003
end Ada.Wide_Characters.Unicode;
|
-- part of OpenGLAda, (c) 2017 Felix Krause
-- released under the terms of the MIT license, see the file "COPYING"
with Glfw.Display;
package body Glfw_Test is
procedure Key_To_Title (Subject : Glfw.Events.Keys.Key;
Action : Glfw.Events.Button_State) is
use type Glfw.Events.Button_State;
begin
if Action = Glfw.Events.Press then
Glfw.Display.Set_Title ("Key " & Glfw.Events.Keys.Name (Subject)
& " has been pressed.");
else
Glfw.Display.Set_Title ("Key " & Glfw.Events.Keys.Name (Subject)
& " has been released.");
end if;
end Key_To_Title;
end Glfw_Test;
|
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- A D A B K E N D --
-- --
-- S p e c --
-- --
-- Copyright (C) 1992-2019, 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. --
-- --
------------------------------------------------------------------------------
-- Generic package implementing the common parts of back_end.adb for back ends
-- written in Ada, thereby reducing code duplication.
with Types;
generic
Product_Name : String;
Copyright_Years : String;
with procedure Driver (Root : Types.Node_Id);
-- Main driver procedure for back end
with function Is_Back_End_Switch (Switch : String) return Boolean;
-- Back-end specific function to determine validity of switches
package Adabkend is
procedure Call_Back_End;
-- Call back end, i.e. make call to the Driver passing the root
-- node for this compilation unit.
procedure Scan_Compiler_Arguments;
-- Acquires command-line parameters passed to the compiler and processes
-- them. Calls Scan_Front_End_Switches for any front-end switches
-- encountered. See spec of Back_End for more details.
end Adabkend; |
-----------------------------------------------------------------------
-- asf-lifecycles-restore -- Restore view phase
-- Copyright (C) 2010 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- 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.
-----------------------------------------------------------------------
-- The <b>ASF.Lifecycles.Restore</b> package defines the behavior
-- of the restore phase.
with ASF.Applications.Views;
package ASF.Lifecycles.Restore is
-- ------------------------------
-- Restore view controller
-- ------------------------------
type Restore_Controller is new Phase_Controller with private;
-- Initialize the phase controller.
overriding
procedure Initialize (Controller : in out Restore_Controller;
App : access ASF.Applications.Main.Application'Class);
-- Execute the restore view phase.
overriding
procedure Execute (Controller : in Restore_Controller;
Context : in out ASF.Contexts.Faces.Faces_Context'Class);
private
type Restore_Controller is new Phase_Controller with record
View_Handler : access ASF.Applications.Views.View_Handler'Class;
end record;
end ASF.Lifecycles.Restore;
|
-- This file is generated by SWIG. Please do *not* modify by hand.
--
with c_math_c.Pointers;
with Interfaces.C;
package c_math_c.Matrix_4x4 is
-- Item
--
type Item is record
m00 : aliased c_math_c.Real;
m01 : aliased c_math_c.Real;
m02 : aliased c_math_c.Real;
m03 : aliased c_math_c.Real;
m10 : aliased c_math_c.Real;
m11 : aliased c_math_c.Real;
m12 : aliased c_math_c.Real;
m13 : aliased c_math_c.Real;
m20 : aliased c_math_c.Real;
m21 : aliased c_math_c.Real;
m22 : aliased c_math_c.Real;
m23 : aliased c_math_c.Real;
m30 : aliased c_math_c.Real;
m31 : aliased c_math_c.Real;
m32 : aliased c_math_c.Real;
m33 : aliased c_math_c.Real;
end record;
-- Items
--
type Items is
array (Interfaces.C.size_t range <>) of aliased c_math_c.Matrix_4x4.Item;
-- Pointer
--
type Pointer is access all c_math_c.Matrix_4x4.Item;
-- Pointers
--
type Pointers is
array
(Interfaces.C.size_t range <>) of aliased c_math_c.Matrix_4x4.Pointer;
-- Pointer_Pointer
--
type Pointer_Pointer is access all c_math_c.Matrix_4x4.Pointer;
function construct return c_math_c.Matrix_4x4.Item;
function construct
(First : in c_math_c.Pointers.Real_Pointer)
return c_math_c.Matrix_4x4.Item;
private
function construct_v1 return c_math_c.Matrix_4x4.Item;
function construct return c_math_c.Matrix_4x4.Item renames construct_v1;
pragma Import (C, construct_v1, "Ada_new_Matrix_4x4__SWIG_0");
function construct_v2
(First : in c_math_c.Pointers.Real_Pointer)
return c_math_c.Matrix_4x4.Item;
function construct
(First : in c_math_c.Pointers.Real_Pointer)
return c_math_c.Matrix_4x4.Item renames
construct_v2;
pragma Import (C, construct_v2, "Ada_new_Matrix_4x4__SWIG_1");
end c_math_c.Matrix_4x4;
|
-------------------------------------------------------------------------------
-- Copyright (c) 2016 Daniel King
--
-- 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.Real_Time; use Ada.Real_Time;
with Interfaces; use Interfaces;
with STM32.AFIO;
with STM32.EXTI;
with STM32.GPIO;
with STM32.NVIC;
with STM32.RCC;
with STM32.SPI;
-- BSP implementation for the EVB1000 eval board.
--
-- This BSP is designed for a Ravenscar runtime, and makes use of a protected
-- object to satisfy the Synchronous requirement of the abstract Device_State.
-- The use of a protected object protects against races between tasks
-- and the DW1000 IRQ, which both may attempt to access the SPI bus.
--
-- To adapt this runtime for a ZFP profile (where protected objects are
-- prohibited) another mechanim must be used. For example, interrupts may
-- be disabled during SPI transactions.
package body DW1000.BSP
with SPARK_Mode => Off
is
procedure Select_Device
is
begin
STM32.GPIO.GPIOA_Periph.BSRR.BR :=
STM32.GPIO.BSRR_BR_Field'(As_Array => True,
Arr => (4 => 1, others => 0));
end Select_Device;
procedure Deselect_Device
is
begin
STM32.GPIO.GPIOA_Periph.BSRR.BS :=
STM32.GPIO.BSRR_BS_Field'(As_Array => True,
Arr => (4 => 1, others => 0));
end Deselect_Device;
procedure Reset_DW1000
is
begin
-- Configure RSTn GPIO as output
STM32.GPIO.GPIOA_Periph.CRL.MODE0 := 2#11#; -- Output 50 MHz
STM32.GPIO.GPIOA_Periph.CRL.CNF0 := 2#00#; -- Output push-pull
-- Drive the RSTn line low
STM32.GPIO.GPIOA_Periph.BSRR.BR :=
STM32.GPIO.BSRR_BR_Field'(As_Array => True,
Arr => (1 => 1, others => 0));
-- Put the RSTn line to hi-Z
STM32.GPIO.GPIOA_Periph.CRL.MODE0 := 2#00#; -- Input
STM32.GPIO.GPIOA_Periph.CRL.CNF0 := 2#01#; -- Floating input
end Reset_DW1000;
procedure Get_Reset_State (State : out DW1000.Types.Bits_1)
is
begin
State := DW1000.Types.Bits_1 (STM32.GPIO.GPIOA_Periph.IDR.IDR.Arr(0));
end Get_Reset_State;
procedure Acknowledge_DW1000_IRQ
is
begin
STM32.EXTI.EXTI_Periph.PR.PR.Arr (5) := 1;
end Acknowledge_DW1000_IRQ;
procedure Disable_DW1000_IRQ
is
begin
-- Disable IRQ #25 (EXTI9_5_Interrupt)
STM32.NVIC.NVIC_Periph.ICER0 := 16#0200_0000#;
end Disable_DW1000_IRQ;
procedure Enable_DW1000_IRQ
is
begin
-- Enable IRQ #25 (EXTI9_5_Interrupt)
STM32.NVIC.NVIC_Periph.ISER0 := 16#0200_0000#;
end Enable_DW1000_IRQ;
procedure Use_Slow_SPI_Clock
is
begin
-- Use /32 prescaler (72 MHz / 32 = 2.25 MHz clock)
STM32.SPI.SPI1_Periph.CR1.BR := 2#100#;
end Use_Slow_SPI_Clock;
procedure Use_Fast_SPI_Clock
is
begin
-- Use /4 prescaler (72 MHz / 4 = 18 MHz clock)
STM32.SPI.SPI1_Periph.CR1.BR := 2#001#;
end Use_Fast_SPI_Clock;
procedure Assert_WAKEUP
is
begin
STM32.GPIO.GPIOB_Periph.BSRR.BS :=
STM32.GPIO.BSRR_BS_Field'(As_Array => True,
Arr => (0 => 1, others => 0));
end Assert_WAKEUP;
procedure Deassert_WAKEUP
is
begin
STM32.GPIO.GPIOB_Periph.BSRR.BR :=
STM32.GPIO.BSRR_BR_Field'(As_Array => True,
Arr => (0 => 1, others => 0));
end Deassert_WAKEUP;
procedure Write_Transaction(Header : in DW1000.Types.Byte_Array;
Data : in DW1000.Types.Byte_Array)
is
use type STM32.Bit;
begin
Disable_DW1000_IRQ;
Select_Device;
-- Send header
for I in Header'Range loop
STM32.SPI.SPI1_Periph.DR.DR := Unsigned_16 (Header (I) );
loop
exit when STM32.SPI.SPI1_Periph.SR.TXE = 1;
end loop;
end loop;
-- Send data
for I in Data'Range loop
loop
exit when STM32.SPI.SPI1_Periph.SR.TXE = 1;
end loop;
STM32.SPI.SPI1_Periph.DR.DR := Unsigned_16 (Data (I) );
end loop;
-- Wait for the last byte to finish transmitting.
loop
exit when STM32.SPI.SPI1_Periph.SR.BSY = 0;
end loop;
Deselect_Device;
Enable_DW1000_IRQ;
end Write_Transaction;
procedure Read_Transaction(Header : in DW1000.Types.Byte_Array;
Data : out DW1000.Types.Byte_Array)
is
use type STM32.Bit;
begin
Disable_DW1000_IRQ;
Select_Device;
-- Send header
for I in Header'Range loop
STM32.SPI.SPI1_Periph.DR.DR := Unsigned_16 (Header (I));
loop
exit when STM32.SPI.SPI1_Periph.SR.TXE = 1;
end loop;
end loop;
loop
exit when STM32.SPI.SPI1_Periph.SR.BSY = 0;
end loop;
-- Read data
for I in Data'Range loop
-- Send a dummy byte to begin the transfer
STM32.SPI.SPI1_Periph.DR.DR := 16#0000#;
loop
exit when STM32.SPI.SPI1_Periph.SR.BSY = 0;
end loop;
Data (I) := Unsigned_8 (STM32.SPI.SPI1_Periph.DR.DR and 16#FF#);
end loop;
Deselect_Device;
Enable_DW1000_IRQ;
end Read_Transaction;
begin
-- Enable peripheral clocks
STM32.RCC.RCC_Periph.APB2ENR.SPI1EN := 1;
STM32.RCC.RCC_Periph.APB2ENR.AFIOEN := 1;
STM32.RCC.RCC_Periph.APB2ENR.IOPAEN := 1;
STM32.RCC.RCC_Periph.APB2ENR.IOPBEN := 1;
-- Configure GPIO
STM32.GPIO.GPIOA_Periph.CRL.MODE4 := 2#11#;
STM32.GPIO.GPIOA_Periph.CRL.MODE5 := 2#11#;
STM32.GPIO.GPIOA_Periph.CRL.MODE6 := 2#00#;
STM32.GPIO.GPIOA_Periph.CRL.MODE7 := 2#11#;
STM32.GPIO.GPIOA_Periph.CRL.CNF4 := 2#00#;
STM32.GPIO.GPIOA_Periph.CRL.CNF5 := 2#10#;
STM32.GPIO.GPIOA_Periph.CRL.CNF6 := 2#10#;
STM32.GPIO.GPIOA_Periph.CRL.CNF7 := 2#10#;
STM32.GPIO.GPIOB_Periph.CRL.MODE0 := 2#11#;
STM32.GPIO.GPIOB_Periph.CRL.CNF0 := 2#00#;
Deselect_Device;
Deassert_WAKEUP;
-- Configure SPI
STM32.SPI.SPI1_Periph.CR1 :=
STM32.SPI.CR1_Register'(CPHA => 0,
CPOL => 0,
MSTR => 1,
BR => 2#100#, -- /32 prescaler
SPE => 0,
LSBFIRST => 0, -- MSB first
SSI => 1,
SSM => 1,
RXONLY => 0, -- Full duplex
DFF => 0, -- 8-bit data
CRCNEXT => 0,
CRCEN => 0, -- No CRC
BIDIOE => 0,
BIDIMODE => 0, -- Bidirectional
Reserved_16_31 => 0);
STM32.SPI.SPI1_Periph.CRCPR.CRCPOLY := 7;
STM32.SPI.SPI1_Periph.CR1.SPE := 1;
-- Configure IRQ
STM32.GPIO.GPIOB_Periph.CRL.CNF5 := 2#10#; -- Input with pull-up/down
STM32.GPIO.GPIOB_Periph.CRL.MODE5 := 2#00#; -- Input mode
STM32.GPIO.GPIOB_Periph.BRR.BR.Arr (5) := 1; -- Pull-down
STM32.AFIO.AFIO_Periph.EXTICR2.EXTI.Arr (5) := 2#0001#; -- GPIOB
STM32.EXTI.EXTI_Periph.IMR.MR.Arr (5) := 1; -- Enable interrupt
STM32.EXTI.EXTI_Periph.EMR.MR.Arr (5) := 0;
STM32.EXTI.EXTI_Periph.RTSR.TR.Arr (5) := 1; -- Rising edge enabled
STM32.EXTI.EXTI_Periph.FTSR.TR.Arr (5) := 0; -- Falling edge disabled
-- Device might be sleeping, so assert the WAKEUP pin to wake it.
-- WAKEUP pin must be asserted for at least 500 microseconds.
Assert_WAKEUP;
declare
use type DW1000.Types.Bits_1;
Now : Ada.Real_Time.Time;
WAKEUP_End : Ada.Real_Time.Time;
RSTn_State : DW1000.Types.Bits_1;
begin
Now := Ada.Real_Time.Clock;
WAKEUP_End := Now + Microseconds (500);
delay until WAKEUP_End;
Deassert_WAKEUP;
-- Reset the device. This only has an effect if the device wasn't asleep.
-- Since if the device was asleep then it is now in the WAKEUP state for
-- approx. 4 ms, and during this state it keeps the RSTn line low anyway.
Reset_DW1000;
-- Delay for 4 ms to allow the DW1000 to transition into the INIT state.
-- Otherwise, user code may not be able to communicate with the DW1000
-- if elaboration finishes within 4 ms and the user immediately tries to
-- use the DW1000, since it will still be in the WAKEUP state.
Now := Ada.Real_Time.Clock;
WAKEUP_End := Now + Milliseconds (4);
loop
-- The DW1000 de-asserts the RSTn line when it exits the WAKEUP state
-- which lets us exit early.
Get_Reset_State (RSTn_State);
exit when RSTn_State = 1;
-- Otherwise, exit anyway after 4 ms.
Now := Ada.Real_Time.Clock;
exit when Now >= WAKEUP_End;
end loop;
end;
end DW1000.BSP;
|
-- SPDX-FileCopyrightText: 2021 Max Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-------------------------------------------------------------
with Ada.Streams;
with Ada.Unchecked_Conversion;
with Interfaces;
with System;
package body LoRa is
pragma Discard_Names;
-- procedure puts
-- (data : String)
-- with Import, Convention => C, External_Name => "puts";
package Address is
type Register is mod 2 **7;
RegFifo : constant Register := 16#00#;
RegOpMode : constant Register := 16#01#;
RegFrfMsb : constant Register := 16#06#;
RegFrfMid : constant Register := 16#07#;
RegFrfLsb : constant Register := 16#08#;
RegPaConfig : constant Register := 16#09#;
RegLna : constant Register := 16#0C#;
RegFifoAddrPtr : constant Register := 16#0D#;
RegFifoTxBaseAddr : constant Register := 16#0E#;
RegFifoRxBaseAddr : constant Register := 16#0F#;
RegFifoRxCurrentAddr : constant Register := 16#10#;
RegIrqFlagsMask : constant Register := 16#11#;
RegIrqFlags : constant Register := 16#12#;
RegRxNbBytes : constant Register := 16#13#;
RegPktSnrValue : constant Register := 16#19#;
RegPktRssiValue : constant Register := 16#1A#;
RegModemConfig1 : constant Register := 16#1D#;
RegModemConfig2 : constant Register := 16#1E#;
RegSymbTimeoutLsb : constant Register := 16#1F#;
RegPreambleMsb : constant Register := 16#20#;
RegPreambleLsb : constant Register := 16#21#;
RegModemConfig3 : constant Register := 16#26#;
RegDetectOptimize : constant Register := 16#31#;
RegDetectionThreshold : constant Register := 16#37#;
RegSyncWord : constant Register := 16#39#;
Version : constant Register := 16#42#;
RegPaDac : constant Register := 16#4D#;
end Address;
procedure Read (Addr : Address.Register; Value : out Interfaces.Unsigned_8);
procedure Write (Addr : Address.Register; Value : Interfaces.Unsigned_8);
type Modulation_Scheme is (FSK, OOK);
type FSK_OOK_Mode is
(Sleep,
Standby,
FS_TX,
Transmitter,
FS_RX,
Receiver);
for FSK_OOK_Mode use (0, 1, 2, 3, 4, 5);
type LoRa_Mode is
(Sleep,
Standby,
FS_TX,
Transmit,
FS_RX,
Receive_Continuous,
Receive_Single,
Channel_Activity_Detection);
for LoRa_Mode use (0, 1, 2, 3, 4, 5, 6, 7);
type RegOpMode (LongRangeMode : Boolean := False) is record
-- This bit can be modified only in Sleep mode. A write operation on
-- other device modes is ignored.
LowFrequencyModeOn : Boolean;
-- Access Low Frequency Mode registers
case LongRangeMode is
when False =>
ModulationType : Modulation_Scheme;
FSK_OOK_Mode : LoRa.FSK_OOK_Mode;
when True =>
AccessSharedReg : Boolean;
-- Access FSK registers page in LoRa Mode (0x0D .. 0x3F)
LoRa_Mode : LoRa.LoRa_Mode;
end case;
end record
with Size => 8;
for RegOpMode use record
LongRangeMode at 0 range 7 .. 7;
ModulationType at 0 range 5 .. 6;
LowFrequencyModeOn at 0 range 3 .. 3;
FSK_OOK_Mode at 0 range 0 .. 2;
AccessSharedReg at 0 range 6 .. 6;
LoRa_Mode at 0 range 0 .. 2;
end record;
function To_Byte is new Ada.Unchecked_Conversion
(RegOpMode, Interfaces.Unsigned_8);
type RegPaConfig is record
PaSelect : Boolean;
MaxPower : Natural range 0 .. 7;
-- Select max output power: Pmax=10.8+0.6*MaxPower [dBm]
OutputPower : Natural range 0 .. 15;
-- Pout=Pmax-(15-OutputPower) if PaSelect = 0 (RFO pins)
-- Pout=17-(15-OutputPower) if PaSelect = 1 (PA_BOOST pin)
end record
with Size => 8;
for RegPaConfig use record
PaSelect at 0 range 7 .. 7;
MaxPower at 0 range 4 .. 6;
OutputPower at 0 range 0 .. 3;
end record;
function To_Byte is new Ada.Unchecked_Conversion
(RegPaConfig, Interfaces.Unsigned_8);
type RegLNA is record
LnaGain : Natural range 1 .. 6; -- LNA gain setting
-- 1 = maximum gain, 6 = minimum gain
LnaBoostLf : Natural range 0 .. 3 := 0;
-- Low Frequency (RFI_LF) LNA current adjustment
LnaBoostHf : Natural range 0 .. 3 := 0;
-- High Frequency (RFI_HF) LNA current adjustment
end record
with Size => 8;
for RegLNA use record
LnaGain at 0 range 5 .. 7;
LnaBoostLf at 0 range 3 .. 4;
LnaBoostHf at 0 range 0 .. 1;
end record;
function To_Byte is new Ada.Unchecked_Conversion
(RegLNA, Interfaces.Unsigned_8);
type RegRxConfig is record
RestartRxOnCollision : Boolean;
RestartRxWithoutPllLock : Boolean;
RestartRxWithPllLock : Boolean;
AfcAutoOn : Boolean;
AgcAutoOn : Boolean;
RxTrigger : Natural range 0 .. 7;
end record
with Size => 8;
for RegRxConfig use record
RestartRxOnCollision at 0 range 7 .. 7;
RestartRxWithoutPllLock at 0 range 6 .. 6;
RestartRxWithPllLock at 0 range 5 .. 5;
AfcAutoOn at 0 range 4 .. 4;
AgcAutoOn at 0 range 3 .. 3;
RxTrigger at 0 range 0 .. 2;
end record;
function To_Byte is new Ada.Unchecked_Conversion
(RegRxConfig, Interfaces.Unsigned_8);
type RegIrqFlags is record
RxTimeout : Boolean;
RxDone : Boolean;
PayloadCrcError : Boolean;
ValidHeader : Boolean;
TxDone : Boolean;
CadDone : Boolean;
FhssChangeChannel : Boolean;
CadDetected : Boolean;
end record
with Size => 8;
for RegIrqFlags use record
RxTimeout at 0 range 7 .. 7;
RxDone at 0 range 6 .. 6;
PayloadCrcError at 0 range 5 .. 5;
ValidHeader at 0 range 4 .. 4;
TxDone at 0 range 3 .. 3;
CadDone at 0 range 2 .. 2;
FhssChangeChannel at 0 range 1 .. 1;
CadDetected at 0 range 0 .. 0;
end record;
function To_Byte is new Ada.Unchecked_Conversion
(RegIrqFlags, Interfaces.Unsigned_8);
function From_Byte is new Ada.Unchecked_Conversion
(Interfaces.Unsigned_8, RegIrqFlags);
type RegModemConfig1 is record
Bw : Natural range 0 .. 15;
CodingRate : Natural range 0 .. 7;
ImplicitHeaderModeOn : Boolean;
end record
with Size => 8;
for RegModemConfig1 use record
Bw at 0 range 4 .. 7;
CodingRate at 0 range 1 .. 3;
ImplicitHeaderModeOn at 0 range 0 .. 0;
end record;
function To_Byte is new Ada.Unchecked_Conversion
(RegModemConfig1, Interfaces.Unsigned_8);
type RegModemConfig2 is record
SpreadingFactor : Natural range 0 .. 15;
-- SF rate (expressed as a base-2 logarithm)
TxContinuousMode : Boolean;
RxPayloadCrcOn : Boolean;
SymbTimeout : Natural range 0 .. 3;
end record
with Size => 8;
for RegModemConfig2 use record
SpreadingFactor at 0 range 4 .. 7;
TxContinuousMode at 0 range 3 .. 3;
RxPayloadCrcOn at 0 range 2 .. 2;
SymbTimeout at 0 range 0 .. 1;
end record;
function To_Byte is new Ada.Unchecked_Conversion
(RegModemConfig2, Interfaces.Unsigned_8);
type RegModemConfig3 is record
LowDataRateOptimize : Boolean; -- the symbol length exceeds 16ms
AgcAutoOn : Boolean; -- LNA gain set by the internal AGC loop
end record
with Size => 8;
for RegModemConfig3 use record
LowDataRateOptimize at 0 range 3 .. 3;
AgcAutoOn at 0 range 2 .. 2;
end record;
function To_Byte is new Ada.Unchecked_Conversion
(RegModemConfig3, Interfaces.Unsigned_8);
type RegPaDac is record
PaDac : Natural range 0 .. 7;
end record
with Size => 8;
for RegPaDac use record
PaDac at 0 range 0 .. 2;
-- Enables the +20dBm option on PA_BOOST pin:
-- 0x04 -> Default value
-- 0x07 -> +20dBm on PA_BOOST when OutputPower=1111
end record;
function To_Byte is new Ada.Unchecked_Conversion
(RegPaDac, Interfaces.Unsigned_8);
----------
-- Idle --
----------
procedure Idle is
Mode : constant RegOpMode :=
(LongRangeMode => True,
AccessSharedReg => False,
LowFrequencyModeOn => False,
LoRa_Mode => Standby);
begin
Write (Address.RegOpMode, To_Byte (Mode));
end Idle;
----------------
-- Initialize --
----------------
procedure Initialize (Frequency : Positive) is
use type Interfaces.Unsigned_8;
use type Interfaces.Unsigned_64;
FXOSC : constant := 32_000_000;
-- Crystal oscillator frequency
FSTEP_Divider : constant := 2 ** 19;
-- Frequency synthesizer step = FSOSC/FSTEP_Divider
Frf : constant Interfaces.Unsigned_64 :=
Interfaces.Unsigned_64 (Frequency) * FSTEP_Divider / FXOSC;
Value : Interfaces.Unsigned_8;
begin
Read (Address.Version, Value);
if Value /= 16#12# then
raise Program_Error;
end if;
Sleep;
-- Set frequency
Write (Address.RegFrfMsb, Interfaces.Unsigned_8'Mod (Frf / 16#1_0000#));
Write (Address.RegFrfMid, Interfaces.Unsigned_8'Mod (Frf / 16#1_00#));
Write (Address.RegFrfLsb, Interfaces.Unsigned_8'Mod (Frf));
-- set base addresses
Write (Address.RegFifoTxBaseAddr, 0);
Write (Address.RegFifoRxBaseAddr, 0);
-- set LNA boost
declare
LNA : constant RegLNA :=
(LnaGain => 1,
LnaBoostLf => 0,
LnaBoostHf => 3); -- Boost on, 150% LNA current
begin
Write (Address.RegLna, To_Byte (LNA));
end;
-- set auto AGC
declare
ModemConfig3 : constant RegModemConfig3 :=
(LowDataRateOptimize => False,
AgcAutoOn => True);
begin
Write (Address.RegModemConfig3, To_Byte (ModemConfig3));
end;
-- set output power to 14 dBm
declare
PaConfig : constant RegPaConfig :=
(PaSelect => True,
MaxPower => 7,
OutputPower => 14 - 2);
-- Pout=17-(15-OutputPower) if PaSelect = 1 (PA_BOOST pin)
PaDac : constant RegPaDac := (PaDac => 4);
begin
Write (Address.RegPaConfig, To_Byte (PaConfig));
Write (Address.RegPaDac, To_Byte (PaDac));
end;
--
declare
ModemConfig2 : constant RegModemConfig2 :=
(SpreadingFactor => 8,
TxContinuousMode => False,
RxPayloadCrcOn => True, -- enable crc
SymbTimeout => 0);
begin
Write (Address.RegDetectOptimize, 16#C3#);
Write (Address.RegDetectionThreshold, 16#0A#);
Write (Address.RegModemConfig2, To_Byte (ModemConfig2));
end;
-- setSignalBandwidth 125_000 => 7
declare
ModemConfig1 : constant RegModemConfig1 :=
(Bw => 7,
CodingRate => 1,
ImplicitHeaderModeOn => False);
begin
Write (Address.RegModemConfig1, To_Byte (ModemConfig1));
end;
Write (Address.RegSyncWord, 16#12#);
-- Value 0x34 is reserved for LoRaWAN networks
-- setPreambleLength 8
Write (Address.RegPreambleMsb, 0);
Write (Address.RegPreambleLsb, 8);
-- Write (Address.RegSymbTimeoutLsb, 255);
Write (16#40#, 0);
Idle;
end Initialize;
--------------------
-- On_DIO_0_Raise --
--------------------
procedure On_DIO_0_Raise
(Data : out Ada.Streams.Stream_Element_Array;
Last : out Ada.Streams.Stream_Element_Offset)
is
use type Ada.Streams.Stream_Element_Offset;
Length : Interfaces.Unsigned_8;
Value : Interfaces.Unsigned_8;
IRQ_Flags : aliased Interfaces.Unsigned_8;
Flags : RegIrqFlags
with Import, Address => IRQ_Flags'Address;
begin
Last := Data'First - 1;
Read (Address.RegIrqFlags, IRQ_Flags);
-- Clear IRQ flags
Write (Address.RegIrqFlags, IRQ_Flags);
if not Flags.PayloadCrcError then
Read (Address.RegRxNbBytes, Length);
Read (Address.RegFifoRxCurrentAddr, Value);
Write (Address.RegFifoAddrPtr, Value);
for J in 1 .. Length loop
Read (Address.RegFifo, Value);
Last := Last + 1;
Data (Last) := Ada.Streams.Stream_Element (Value);
end loop;
-- Write (Address.RegFifoAddrPtr, 0); why ???
end if;
end On_DIO_0_Raise;
----------
-- Read --
----------
procedure Read
(Addr : Address.Register;
Value : out Interfaces.Unsigned_8) is
begin
Raw_Read (Interfaces.Unsigned_8 (Addr), Value);
end Read;
-------------
-- Receive --
-------------
procedure Receive is
use type Interfaces.Unsigned_8;
Mode : constant RegOpMode :=
(LongRangeMode => True,
AccessSharedReg => False,
LowFrequencyModeOn => False,
LoRa_Mode => Receive_Continuous); -- Receive_Single);
begin
Write (Address.RegFifoAddrPtr, 0);
Write (Address.RegOpMode, To_Byte (Mode));
end Receive;
-----------
-- Sleep --
-----------
procedure Sleep is
Mode : constant RegOpMode :=
(LongRangeMode => True,
AccessSharedReg => False,
LowFrequencyModeOn => False,
LoRa_Mode => Sleep);
begin
Write (Address.RegOpMode, To_Byte (Mode));
end Sleep;
-----------
-- Write --
-----------
procedure Write (Addr : Address.Register; Value : Interfaces.Unsigned_8) is
use type Interfaces.Unsigned_8;
begin
Raw_Write (16#80# or Interfaces.Unsigned_8 (Addr), Value);
end Write;
end LoRa;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- A D A . S T R I N G S . S E A R C H --
-- --
-- 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 contains the search functions from Ada.Strings.Fixed. They
-- are separated out because they are shared by Ada.Strings.Bounded and
-- Ada.Strings.Unbounded, and we don't want to drag other irrelevant stuff
-- from Ada.Strings.Fixed when using the other two packages. We make this
-- a private package, since user programs should access these subprograms
-- via one of the standard string packages.
with Ada.Strings.Maps;
private package Ada.Strings.Search is
pragma Preelaborate;
function Index
(Source : String;
Pattern : String;
Going : Direction := Forward;
Mapping : Maps.Character_Mapping := Maps.Identity) return Natural;
function Index
(Source : String;
Pattern : String;
Going : Direction := Forward;
Mapping : Maps.Character_Mapping_Function) return Natural;
function Index
(Source : String;
Set : Maps.Character_Set;
Test : Membership := Inside;
Going : Direction := Forward) return Natural;
function Index
(Source : String;
Pattern : String;
From : Positive;
Going : Direction := Forward;
Mapping : Maps.Character_Mapping := Maps.Identity) return Natural;
function Index
(Source : String;
Pattern : String;
From : Positive;
Going : Direction := Forward;
Mapping : Maps.Character_Mapping_Function) return Natural;
function Index
(Source : String;
Set : Maps.Character_Set;
From : Positive;
Test : Membership := Inside;
Going : Direction := Forward) return Natural;
function Index_Non_Blank
(Source : String;
Going : Direction := Forward) return Natural;
function Index_Non_Blank
(Source : String;
From : Positive;
Going : Direction := Forward) return Natural;
function Count
(Source : String;
Pattern : String;
Mapping : Maps.Character_Mapping := Maps.Identity) return Natural;
function Count
(Source : String;
Pattern : String;
Mapping : Maps.Character_Mapping_Function) return Natural;
function Count
(Source : String;
Set : Maps.Character_Set) return Natural;
procedure Find_Token
(Source : String;
Set : Maps.Character_Set;
From : Positive;
Test : Membership;
First : out Positive;
Last : out Natural);
procedure Find_Token
(Source : String;
Set : Maps.Character_Set;
Test : Membership;
First : out Positive;
Last : out Natural);
end Ada.Strings.Search;
|
-- C41303Q.ADA
-- Grant of Unlimited Rights
--
-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
-- unlimited rights in the software and documentation contained herein.
-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
-- this public release, the Government intends to confer upon all
-- recipients unlimited rights equal to those held by the Government.
-- These rights include rights to use, duplicate, release or disclose the
-- released technical data and computer software in whole or in part, in
-- any manner and for any purpose whatsoever, and to have or permit others
-- to do so.
--
-- DISCLAIMER
--
-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
-- PARTICULAR PURPOSE OF SAID MATERIAL.
--*
-- CHECK THAT THE NOTATION L.ALL IS ALLOWED IF L IS THE NAME OF AN
-- ACCESS OBJECT DESIGNATING A RECORD, AN ARRAY, A SCALAR, OR
-- ANOTHER ACCESS OBJECT.
-- CHECK THAT IF A IS AN IDENTIFIER DENOTING AN ACCESS OBJECT WHICH
-- IN TURN DESIGNATES AN ACCESS OBJECT, THE FORM A.ALL.ALL IS
-- ACCEPTED.
-- THIS OBJECTIVE IS COVERED IN SEVERAL TESTS. IN THE FOLLOWING DIAGRAM,
-- THE PORTION COVERED BY THE CURRENT TEST IS MARKED BY 'X' .
-- || ASSIGNMT | PROC. PARAMETERS
-- || ():= :=() | IN OUT IN OUT
-- ========================||=============|====================
-- ACC REC || |
-- --------------||-------------|--------------------
-- 1 '.ALL' ACC ARR || |
-- --------------||-------------|--------------------
-- ACC SCLR || |
-- ========================||=============|====================
-- ACC ACC REC || | XXXXXXXXX
-- --------------||-------------|--------------------
-- 1 '.ALL' ACC ACC ARR || |
-- --------------||-------------|--------------------
-- ACC ACC SCLR || |
-- ========================||=============|====================
-- ACC ACC REC || |
-- --------------||-------------|--------------------
-- 2 '.ALL' ACC ACC ARR || |
-- --------------||-------------|--------------------
-- ACC ACC SCLR || |
-- ============================================================
-- RM 1/28/82
-- SPS 12/2/82
WITH REPORT;
USE REPORT;
PROCEDURE C41303Q IS
BEGIN
TEST ( "C41303Q" , "CHECK THAT THE NOTATION L.ALL IS ALLOWED IF"
& " L IS THE NAME OF AN ACCESS OBJECT"
& " DESIGNATING ANOTHER ACCESS OBJECT" );
-------------------------------------------------------------------
--------------- ACCESS TO ACCESS TO RECORD ----------------------
DECLARE
TYPE REC IS
RECORD
A , B , C : INTEGER ;
END RECORD ;
TYPE ACCREC IS ACCESS REC ;
ACCREC_CONST : ACCREC := NEW REC'( 7 , 8 , 9 );
ACCREC_VAR : ACCREC := ACCREC_CONST ;
ACCREC_VAR0 : ACCREC := ACCREC_CONST ;
ACCREC_CONST2 : ACCREC := NEW REC'( 17 , 18 , 19 );
TYPE ACC_ACCREC IS ACCESS ACCREC ;
ACC_ACCREC_VAR : ACC_ACCREC := NEW ACCREC'(ACCREC_CONST2);
ACC_ACCREC_VAR0 : ACC_ACCREC := NEW ACCREC'(ACCREC_CONST2);
PROCEDURE R_ASSIGN( R_IN : IN ACCREC ;
R_INOUT : IN OUT ACCREC ) IS
BEGIN
ACCREC_VAR := R_IN ;
ACCREC_VAR0 := R_INOUT ;
END ;
PROCEDURE L_ASSIGN( L_OUT : OUT ACCREC ;
L_INOUT : IN OUT ACCREC ) IS
BEGIN
L_OUT := ACCREC_CONST ;
L_INOUT := ACCREC_CONST ;
END ;
BEGIN
R_ASSIGN( ACC_ACCREC_VAR.ALL , ACC_ACCREC_VAR0.ALL );
IF ACCREC_VAR /= ACCREC_CONST2
THEN
FAILED( "ACC. RECORD, RIGHT SIDE (1), WRONG VAL.");
END IF;
IF ACCREC_VAR0 /= ACCREC_CONST2
THEN
FAILED( "ACC. RECORD, RIGHT SIDE (2), WRONG VAL.");
END IF;
L_ASSIGN( ACC_ACCREC_VAR.ALL , ACC_ACCREC_VAR0.ALL );
IF ACCREC_CONST /= ACC_ACCREC_VAR.ALL
THEN
FAILED( "ACC. RECORD, LEFT SIDE (1), WRONG VAL." );
END IF;
IF ACCREC_CONST /= ACC_ACCREC_VAR0.ALL
THEN
FAILED( "ACC. RECORD, LEFT SIDE (2), WRONG VAL." );
END IF;
END ;
-------------------------------------------------------------------
RESULT;
END C41303Q;
|
pragma Ada_2005;
pragma Style_Checks (Off);
with Interfaces.C; use Interfaces.C;
with SDL_SDL_stdinc_h;
package SDL_SDL_endian_h is
SDL_LIL_ENDIAN : constant := 1234; -- ../include/SDL/SDL_endian.h:37
SDL_BIG_ENDIAN : constant := 4321; -- ../include/SDL/SDL_endian.h:38
-- unsupported macro: SDL_BYTEORDER SDL_LIL_ENDIAN
-- arg-macro: function SDL_SwapLE16 (X)
-- return X;
-- arg-macro: function SDL_SwapLE32 (X)
-- return X;
-- arg-macro: function SDL_SwapLE64 (X)
-- return X;
-- arg-macro: procedure SDL_SwapBE16 (X)
-- SDL_Swap16(X)
-- arg-macro: procedure SDL_SwapBE32 (X)
-- SDL_Swap32(X)
-- arg-macro: procedure SDL_SwapBE64 (X)
-- SDL_Swap64(X)
function SDL_Swap16 (x : SDL_SDL_stdinc_h.Uint16) return SDL_SDL_stdinc_h.Uint16; -- ../include/SDL/SDL_endian.h:75
pragma Import (C, SDL_Swap16, "SDL_Swap16");
function SDL_Swap32 (x : SDL_SDL_stdinc_h.Uint32) return SDL_SDL_stdinc_h.Uint32; -- ../include/SDL/SDL_endian.h:108
pragma Import (C, SDL_Swap32, "SDL_Swap32");
function SDL_Swap64 (x : SDL_SDL_stdinc_h.Uint64) return SDL_SDL_stdinc_h.Uint64; -- ../include/SDL/SDL_endian.h:144
pragma Import (C, SDL_Swap64, "SDL_Swap64");
end SDL_SDL_endian_h;
|
------------------------------------------------------------------------------
-- A d a r u n - t i m e s p e c i f i c a t i o n --
-- ASIS implementation for Gela project, a portable Ada compiler --
-- http://gela.ada-ru.org --
-- - - - - - - - - - - - - - - - --
-- Read copyright and license at the end of ada.ads file --
------------------------------------------------------------------------------
-- $Revision: 209 $ $Date: 2013-11-30 21:03:24 +0200 (Сб., 30 нояб. 2013) $
with Ada.Strings.Maps;
package Ada.Strings.Bounded is
pragma Preelaborate (Bounded);
generic
Max : Positive; -- Maximum length of a Bounded_String
package Generic_Bounded_Length is
Max_Length : constant Positive := Max;
type Bounded_String is private;
Null_Bounded_String : constant Bounded_String;
subtype Length_Range is Natural range 0 .. Max_Length;
function Length (Source : in Bounded_String) return Length_Range;
-- Conversion, Concatenation, and Selection functions
function To_Bounded_String (Source : in String;
Drop : in Truncation := Error)
return Bounded_String;
function To_String (Source : in Bounded_String) return String;
procedure Set_Bounded_String
(Target : out Bounded_String;
Source : in String;
Drop : in Truncation := Error);
function Append (Left, Right : in Bounded_String;
Drop : in Truncation := Error)
return Bounded_String;
function Append (Left : in Bounded_String;
Right : in String;
Drop : in Truncation := Error)
return Bounded_String;
function Append (Left : in String;
Right : in Bounded_String;
Drop : in Truncation := Error)
return Bounded_String;
function Append (Left : in Bounded_String;
Right : in Character;
Drop : in Truncation := Error)
return Bounded_String;
function Append (Left : in Character;
Right : in Bounded_String;
Drop : in Truncation := Error)
return Bounded_String;
procedure Append (Source : in out Bounded_String;
New_Item : in Bounded_String;
Drop : in Truncation := Error);
procedure Append (Source : in out Bounded_String;
New_Item : in String;
Drop : in Truncation := Error);
procedure Append (Source : in out Bounded_String;
New_Item : in Character;
Drop : in Truncation := Error);
function "&" (Left, Right : in Bounded_String)
return Bounded_String;
function "&" (Left : in Bounded_String; Right : in String)
return Bounded_String;
function "&" (Left : in String; Right : in Bounded_String)
return Bounded_String;
function "&" (Left : in Bounded_String; Right : in Character)
return Bounded_String;
function "&" (Left : in Character; Right : in Bounded_String)
return Bounded_String;
function Element (Source : in Bounded_String;
Index : in Positive)
return Character;
procedure Replace_Element (Source : in out Bounded_String;
Index : in Positive;
By : in Character);
function Slice (Source : in Bounded_String;
Low : in Positive;
High : in Natural)
return String;
function Bounded_Slice
(Source : in Bounded_String;
Low : in Positive;
High : in Natural)
return Bounded_String;
procedure Bounded_Slice
(Source : in Bounded_String;
Target : out Bounded_String;
Low : in Positive;
High : in Natural);
function "=" (Left, Right : in Bounded_String) return Boolean;
function "=" (Left : in Bounded_String; Right : in String)
return Boolean;
function "=" (Left : in String; Right : in Bounded_String)
return Boolean;
function "<" (Left, Right : in Bounded_String) return Boolean;
function "<" (Left : in Bounded_String; Right : in String)
return Boolean;
function "<" (Left : in String; Right : in Bounded_String)
return Boolean;
function "<=" (Left, Right : in Bounded_String) return Boolean;
function "<=" (Left : in Bounded_String; Right : in String)
return Boolean;
function "<=" (Left : in String; Right : in Bounded_String)
return Boolean;
function ">" (Left, Right : in Bounded_String) return Boolean;
function ">" (Left : in Bounded_String; Right : in String)
return Boolean;
function ">" (Left : in String; Right : in Bounded_String)
return Boolean;
function ">=" (Left, Right : in Bounded_String) return Boolean;
function ">=" (Left : in Bounded_String; Right : in String)
return Boolean;
function ">=" (Left : in String; Right : in Bounded_String)
return Boolean;
-- Search subprograms
function Index (Source : in Bounded_String;
Pattern : in String;
From : in Positive;
Going : in Direction := Forward;
Mapping : in Maps.Character_Mapping := Maps.Identity)
return Natural;
function Index (Source : in Bounded_String;
Pattern : in String;
From : in Positive;
Going : in Direction := Forward;
Mapping : in Maps.Character_Mapping_Function)
return Natural;
function Index (Source : in Bounded_String;
Pattern : in String;
Going : in Direction := Forward;
Mapping : in Maps.Character_Mapping
:= Maps.Identity)
return Natural;
function Index (Source : in Bounded_String;
Pattern : in String;
Going : in Direction := Forward;
Mapping : in Maps.Character_Mapping_Function)
return Natural;
function Index (Source : in Bounded_String;
Set : in Maps.Character_Set;
From : in Positive;
Test : in Membership := Inside;
Going : in Direction := Forward)
return Natural;
function Index (Source : in Bounded_String;
Set : in Maps.Character_Set;
Test : in Membership := Inside;
Going : in Direction := Forward)
return Natural;
function Index_Non_Blank (Source : in Bounded_String;
From : in Positive;
Going : in Direction := Forward)
return Natural;
function Index_Non_Blank (Source : in Bounded_String;
Going : in Direction := Forward)
return Natural;
function Count (Source : in Bounded_String;
Pattern : in String;
Mapping : in Maps.Character_Mapping
:= Maps.Identity)
return Natural;
function Count (Source : in Bounded_String;
Pattern : in String;
Mapping : in Maps.Character_Mapping_Function)
return Natural;
function Count (Source : in Bounded_String;
Set : in Maps.Character_Set)
return Natural;
procedure Find_Token (Source : in Bounded_String;
Set : in Maps.Character_Set;
Test : in Membership;
First : out Positive;
Last : out Natural);
-- String translation subprograms
function Translate (Source : in Bounded_String;
Mapping : in Maps.Character_Mapping)
return Bounded_String;
procedure Translate (Source : in out Bounded_String;
Mapping : in Maps.Character_Mapping);
function Translate (Source : in Bounded_String;
Mapping : in Maps.Character_Mapping_Function)
return Bounded_String;
procedure Translate (Source : in out Bounded_String;
Mapping : in Maps.Character_Mapping_Function);
-- String transformation subprograms
function Replace_Slice (Source : in Bounded_String;
Low : in Positive;
High : in Natural;
By : in String;
Drop : in Truncation := Error)
return Bounded_String;
procedure Replace_Slice (Source : in out Bounded_String;
Low : in Positive;
High : in Natural;
By : in String;
Drop : in Truncation := Error);
function Insert (Source : in Bounded_String;
Before : in Positive;
New_Item : in String;
Drop : in Truncation := Error)
return Bounded_String;
procedure Insert (Source : in out Bounded_String;
Before : in Positive;
New_Item : in String;
Drop : in Truncation := Error);
function Overwrite (Source : in Bounded_String;
Position : in Positive;
New_Item : in String;
Drop : in Truncation := Error)
return Bounded_String;
procedure Overwrite (Source : in out Bounded_String;
Position : in Positive;
New_Item : in String;
Drop : in Truncation := Error);
function Delete (Source : in Bounded_String;
From : in Positive;
Through : in Natural)
return Bounded_String;
procedure Delete (Source : in out Bounded_String;
From : in Positive;
Through : in Natural);
--String selector subprograms
function Trim (Source : in Bounded_String;
Side : in Trim_End)
return Bounded_String;
procedure Trim (Source : in out Bounded_String;
Side : in Trim_End);
function Trim (Source : in Bounded_String;
Left : in Maps.Character_Set;
Right : in Maps.Character_Set)
return Bounded_String;
procedure Trim (Source : in out Bounded_String;
Left : in Maps.Character_Set;
Right : in Maps.Character_Set);
function Head (Source : in Bounded_String;
Count : in Natural;
Pad : in Character := Space;
Drop : in Truncation := Error)
return Bounded_String;
procedure Head (Source : in out Bounded_String;
Count : in Natural;
Pad : in Character := Space;
Drop : in Truncation := Error);
function Tail (Source : in Bounded_String;
Count : in Natural;
Pad : in Character := Space;
Drop : in Truncation := Error)
return Bounded_String;
procedure Tail (Source : in out Bounded_String;
Count : in Natural;
Pad : in Character := Space;
Drop : in Truncation := Error);
--String constructor subprograms
function "*" (Left : in Natural;
Right : in Character)
return Bounded_String;
function "*" (Left : in Natural;
Right : in String)
return Bounded_String;
function "*" (Left : in Natural;
Right : in Bounded_String)
return Bounded_String;
function Replicate (Count : in Natural;
Item : in Character;
Drop : in Truncation := Error)
return Bounded_String;
function Replicate (Count : in Natural;
Item : in String;
Drop : in Truncation := Error)
return Bounded_String;
function Replicate (Count : in Natural;
Item : in Bounded_String;
Drop : in Truncation := Error)
return Bounded_String;
private
type Bounded_String is null record;
Null_Bounded_String : constant Bounded_String := (null record);
end Generic_Bounded_Length;
end Ada.Strings.Bounded;
|
package body lace.Observer.deferred
is
package body Forge
is
function to_Observer (Name : in Event.observer_Name) return Item
is
begin
return Self : constant Item := (Deferred.item
with name => to_unbounded_String (Name))
do
null;
end return;
end to_Observer;
function new_Observer (Name : in Event.observer_Name) return View
is
Self : constant View := new Item' (to_Observer (Name));
begin
return Self;
end new_Observer;
end Forge;
overriding
function Name (Self : in Item) return Event.observer_Name
is
begin
return to_String (Self.Name);
end Name;
end lace.Observer.deferred;
|
with Interfaces; use Interfaces;
package body Natools.Static_Maps.Web.Tag_Pages.Components is
P : constant array (0 .. 5) of Natural :=
(1, 5, 9, 14, 18, 24);
T1 : constant array (0 .. 5) of Unsigned_8 :=
(41, 18, 12, 22, 20, 39);
T2 : constant array (0 .. 5) of Unsigned_8 :=
(21, 12, 19, 39, 35, 24);
G : constant array (0 .. 46) of Unsigned_8 :=
(0, 6, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 15, 0, 20, 0, 0, 17, 0, 0, 19,
12, 0, 4, 2, 0, 0, 0, 9, 0, 3, 9, 0, 5, 0, 1, 0, 1, 13, 21, 6, 11, 0,
12, 0, 3);
function Hash (S : String) return Natural is
F : constant Natural := S'First - 1;
L : constant Natural := S'Length;
F1, F2 : Natural := 0;
J : Natural;
begin
for K in P'Range loop
exit when L < P (K);
J := Character'Pos (S (P (K) + F));
F1 := (F1 + Natural (T1 (K)) * J) mod 47;
F2 := (F2 + Natural (T2 (K)) * J) mod 47;
end loop;
return (Natural (G (F1)) + Natural (G (F2))) mod 23;
end Hash;
end Natools.Static_Maps.Web.Tag_Pages.Components;
|
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- T E M P D I R --
-- --
-- S p e c --
-- --
-- Copyright (C) 2003-2013, 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 is used by gnatmake and by the Project Manager to create
-- temporary files. If environment variable TMPDIR is defined and
-- designates an absolute path, temporary files are create in this directory.
-- Otherwise, temporary files are created in the current working directory.
with Namet; use Namet;
with GNAT.OS_Lib; use GNAT.OS_Lib;
package Tempdir is
procedure Create_Temp_File
(FD : out File_Descriptor;
Name : out Path_Name_Type);
-- Create a temporary text file and return its file descriptor and
-- its path name as a Name_Id. If environment variable TMPDIR is defined
-- and its value is an absolute path, the temp file is created in the
-- directory designated by TMPDIR, otherwise, it is created in the current
-- directory. If temporary file cannot be created, FD gets the value
-- Invalid_FD and Name gets the value No_Name.
procedure Use_Temp_Dir (Status : Boolean);
-- Specify if the temp file should be created in the system temporary
-- directory as specified by the corresponding environment variables. If
-- Status is False, the temp files will be created into the current working
-- directory.
end Tempdir;
|
generic
Sample_Size: Positive;
type Item_Type is private;
package S_Of_N_Creator is
subtype Index_Type is Positive range 1 .. Sample_Size;
type Item_Array is array (Index_Type) of Item_Type;
procedure Update(New_Item: Item_Type);
function Result return Item_Array;
end S_Of_N_Creator;
|
-- Copyright 2019 Michael Casadevall <michael@casadevall.pro>
--
-- 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.
package DNSCatcher.Network.UDP is
end DNSCatcher.Network.UDP;
|
-----------------------------------------------------------------------
-- awa-commands -- AWA commands for server or admin tool
-- Copyright (C) 2019, 2020 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- 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 Ada.Command_Line;
with Ada.Unchecked_Deallocation;
with Ada.Strings.Unbounded;
with Util.Log.Loggers;
with Util.Properties;
with Util.Strings.Tokenizers;
with Util.Strings.Vectors;
with AWA.Applications.Configs;
with Keystore.Passwords.Input;
with Keystore.Passwords.Files;
with Keystore.Passwords.Unsafe;
with Keystore.Passwords.Cmds;
package body AWA.Commands is
use Ada.Strings.Unbounded;
use type Keystore.Passwords.Provider_Access;
use type Keystore.Header_Slot_Count_Type;
use type Keystore.Passwords.Keys.Key_Provider_Access;
Log : constant Util.Log.Loggers.Logger := Util.Log.Loggers.Create ("AWA.Commands");
procedure Load_Configuration (Context : in out Context_Type;
Path : in String) is
begin
Log.Info ("Loading server configuration {0}", Path);
begin
Context.Global_Config.Load_Properties (Path);
Util.Log.Loggers.Initialize (Util.Properties.Manager (Context.Global_Config));
exception
when Ada.IO_Exceptions.Name_Error =>
Log.Error ("Cannot read server configuration file '{0}'",
Path);
end;
if Context.Exists (GPG_CRYPT_CONFIG) then
Context.GPG.Set_Encrypt_Command (Context.Get_Config (GPG_CRYPT_CONFIG));
end if;
if Context.Exists (GPG_DECRYPT_CONFIG) then
Context.GPG.Set_Decrypt_Command (Context.Get_Config (GPG_DECRYPT_CONFIG));
end if;
if Context.Exists (GPG_LIST_CONFIG) then
Context.GPG.Set_List_Key_Command (Context.Get_Config (GPG_LIST_CONFIG));
end if;
Context.Config.Randomize := not Context.Zero;
end Load_Configuration;
-- ------------------------------
-- Returns True if a keystore is used by the configuration and must be unlocked.
-- ------------------------------
function Use_Keystore (Context : in Context_Type) return Boolean is
begin
if Context.Wallet_File'Length > 0 then
return True;
else
return Context.Exists (KEYSTORE_PATH);
end if;
end Use_Keystore;
-- ------------------------------
-- Open the keystore file using the password password.
-- ------------------------------
procedure Open_Keystore (Context : in out Context_Type) is
begin
Setup_Password_Provider (Context);
Setup_Key_Provider (Context);
Context.Wallet.Open (Path => Context.Get_Keystore_Path,
Data_Path => "",
Config => Context.Config,
Info => Context.Info);
if not Context.No_Password_Opt or else Context.Info.Header_Count = 0 then
if Context.Key_Provider /= null then
Context.Wallet.Set_Master_Key (Context.Key_Provider.all);
end if;
if Context.Provider = null then
Context.Provider := Keystore.Passwords.Input.Create (-("Enter password: "), False);
end if;
Context.Wallet.Unlock (Context.Provider.all, Context.Slot);
else
Context.GPG.Load_Secrets (Context.Wallet);
Context.Wallet.Set_Master_Key (Context.GPG);
Context.Wallet.Unlock (Context.GPG, Context.Slot);
end if;
Context.Keystore_Opened := True;
Keystore.Properties.Initialize (Context.Secure_Config,
Context.Wallet'Unchecked_Access);
end Open_Keystore;
function Get_Application_Config (Context : in Context_Type;
Name : in String) return String is
begin
if Context.Exists (Name & ".config") then
return Context.Get_Config (Name & ".config");
else
return AWA.Applications.Configs.Get_Config_Path (Name);
end if;
end Get_Application_Config;
-- ------------------------------
-- Configure the application by loading its configuration file and merging it with
-- the keystore file if there is one.
-- ------------------------------
procedure Configure (Application : in out ASF.Applications.Main.Application'Class;
Name : in String;
Context : in out Context_Type) is
Path : constant String := Context.Get_Application_Config (Name);
File_Config : ASF.Applications.Config;
begin
Log.Info ("Configuring {0} with {1}", Name, Path);
begin
File_Config.Load_Properties (Path);
exception
when Ada.IO_Exceptions.Name_Error =>
Log.Error ("Configuration file {0} not found", Path);
end;
if Context.Use_Keystore then
if not Context.Keystore_Opened then
Open_Keystore (Context);
end if;
AWA.Applications.Configs.Merge (Context.App_Config,
File_Config,
Context.Secure_Config,
Name & ".");
else
Context.App_Config := File_Config;
end if;
Application.Initialize (Context.App_Config, Context.Factory);
end Configure;
-- ------------------------------
-- Initialize the commands.
-- ------------------------------
overriding
procedure Initialize (Context : in out Context_Type) is
begin
GC.Set_Usage (Config => Context.Command_Config,
Usage => "[switchs] command [arguments]",
Help => -("akt - tool to store and protect your sensitive data"));
GC.Define_Switch (Config => Context.Command_Config,
Output => Context.Version'Access,
Switch => "-V",
Long_Switch => "--version",
Help => -("Print the version"));
GC.Define_Switch (Config => Context.Command_Config,
Output => Context.Verbose'Access,
Switch => "-v",
Long_Switch => "--verbose",
Help => -("Verbose execution mode"));
GC.Define_Switch (Config => Context.Command_Config,
Output => Context.Debug'Access,
Switch => "-vv",
Long_Switch => "--debug",
Help => -("Enable debug execution"));
GC.Define_Switch (Config => Context.Command_Config,
Output => Context.Dump'Access,
Switch => "-vvv",
Long_Switch => "--debug-dump",
Help => -("Enable debug dump execution"));
GC.Define_Switch (Config => Context.Command_Config,
Output => Context.Zero'Access,
Switch => "-z",
Long_Switch => "--zero",
Help => -("Erase and fill with zeros instead of random values"));
GC.Define_Switch (Config => Context.Command_Config,
Output => Context.Config_File'Access,
Switch => "-c:",
Long_Switch => "--config=",
Argument => "PATH",
Help => -("Defines the path for configuration file"));
GC.Initialize_Option_Scan (Stop_At_First_Non_Switch => True);
-- Driver.Set_Description (-("akt - tool to store and protect your sensitive data"));
-- Driver.Set_Usage (-("[-V] [-v] [-vv] [-vvv] [-c path] [-t count] [-z] " &
-- "<command> [<args>]" & ASCII.LF &
-- "where:" & ASCII.LF &
-- " -V Print the tool version" & ASCII.LF &
-- " -v Verbose execution mode" & ASCII.LF &
-- " -vv Debug execution mode" & ASCII.LF &
-- " -vvv Dump execution mode" & ASCII.LF &
-- " -c path Defines the path for akt " &
-- "global configuration" & ASCII.LF &
-- " -t count Number of threads for the " &
-- "encryption/decryption process" & ASCII.LF &
-- " -z Erase and fill with zeros instead of random values"));
-- Driver.Add_Command ("help",
-- -("print some help"),
-- Help_Command'Access);
end Initialize;
-- ------------------------------
-- Setup the command before parsing the arguments and executing it.
-- ------------------------------
procedure Setup_Command (Config : in out GC.Command_Line_Configuration;
Context : in out Context_Type) is
begin
GC.Define_Switch (Config => Config,
Output => Context.Wallet_File'Access,
Switch => "-k:",
Long_Switch => "--keystore=",
Argument => "PATH",
Help => -("Defines the path for the keystore file"));
GC.Define_Switch (Config => Config,
Output => Context.Password_File'Access,
Long_Switch => "--passfile=",
Argument => "PATH",
Help => -("Read the file that contains the password"));
GC.Define_Switch (Config => Config,
Output => Context.Unsafe_Password'Access,
Long_Switch => "--passfd=",
Argument => "NUM",
Help => -("Read the password from the pipe with"
& " the given file descriptor"));
GC.Define_Switch (Config => Config,
Output => Context.Unsafe_Password'Access,
Long_Switch => "--passsocket=",
Help => -("The password is passed within the socket connection"));
GC.Define_Switch (Config => Config,
Output => Context.Password_Env'Access,
Long_Switch => "--passenv=",
Argument => "NAME",
Help => -("Read the environment variable that contains"
& " the password (not safe)"));
GC.Define_Switch (Config => Config,
Output => Context.Unsafe_Password'Access,
Switch => "-p:",
Long_Switch => "--password=",
Help => -("The password is passed within the command line (not safe)"));
GC.Define_Switch (Config => Config,
Output => Context.Password_Askpass'Access,
Long_Switch => "--passask",
Help => -("Run the ssh-askpass command to get the password"));
GC.Define_Switch (Config => Config,
Output => Context.Password_Command'Access,
Long_Switch => "--passcmd=",
Argument => "COMMAND",
Help => -("Run the command to get the password"));
GC.Define_Switch (Config => Config,
Output => Context.Wallet_Key_File'Access,
Long_Switch => "--wallet-key-file=",
Argument => "PATH",
Help => -("Read the file that contains the wallet keys"));
end Setup_Command;
procedure Setup_Password_Provider (Context : in out Context_Type) is
begin
if Context.Password_Askpass then
Context.Provider := Keystore.Passwords.Cmds.Create ("ssh-askpass");
elsif Context.Password_Command'Length > 0 then
Context.Provider := Keystore.Passwords.Cmds.Create (Context.Password_Command.all);
elsif Context.Password_File'Length > 0 then
Context.Provider := Keystore.Passwords.Files.Create (Context.Password_File.all);
elsif Context.Password_Command'Length > 0 then
Context.Provider := Keystore.Passwords.Cmds.Create (Context.Password_Command.all);
elsif Context.Unsafe_Password'Length > 0 then
Context.Provider := Keystore.Passwords.Unsafe.Create (Context.Unsafe_Password.all);
elsif Context.Exists (PASSWORD_FILE_PATH) then
Context.Provider := Keystore.Passwords.Files.Create
(Context.Get_Config (PASSWORD_FILE_PATH));
else
Context.No_Password_Opt := True;
end if;
end Setup_Password_Provider;
procedure Setup_Key_Provider (Context : in out Context_Type) is
begin
if Context.Wallet_Key_File'Length > 0 then
Context.Key_Provider := Keystore.Passwords.Files.Create
(Context.Wallet_Key_File.all);
elsif Context.Exists (WALLET_KEY_PATH) then
Context.Key_Provider := Keystore.Passwords.Files.Create
(Context.Get_Config (WALLET_KEY_PATH));
else
Context.Key_Provider := Keystore.Passwords.Keys.Create
(Keystore.DEFAULT_WALLET_KEY);
end if;
end Setup_Key_Provider;
-- ------------------------------
-- Get the keystore file path.
-- ------------------------------
function Get_Keystore_Path (Context : in out Context_Type) return String is
begin
if Context.Wallet_File'Length > 0 then
Context.First_Arg := 1;
return Context.Wallet_File.all;
elsif Context.Exists (KEYSTORE_PATH) then
return Context.Get_Config (KEYSTORE_PATH);
else
raise Error with "No keystore path";
end if;
end Get_Keystore_Path;
procedure Print (Context : in out Context_Type;
Ex : in Ada.Exceptions.Exception_Occurrence) is
pragma Unreferenced (Context);
begin
Ada.Exceptions.Reraise_Occurrence (Ex);
exception
when GNAT.Command_Line.Exit_From_Command_Line | GNAT.Command_Line.Invalid_Switch =>
Ada.Command_Line.Set_Exit_Status (Ada.Command_Line.Failure);
when Keystore.Bad_Password =>
Log.Error (-("Invalid password to unlock the keystore file"));
Ada.Command_Line.Set_Exit_Status (Ada.Command_Line.Failure);
when Keystore.No_Key_Slot =>
Log.Error (-("There is no available key slot to add the password"));
Ada.Command_Line.Set_Exit_Status (Ada.Command_Line.Failure);
when Keystore.No_Content =>
Log.Error (-("No content for an item of type wallet"));
Ada.Command_Line.Set_Exit_Status (Ada.Command_Line.Failure);
when Keystore.Corrupted =>
Log.Error (-("The keystore file is corrupted: invalid meta data content"));
Ada.Command_Line.Set_Exit_Status (Ada.Command_Line.Failure);
when Keystore.Invalid_Block =>
Log.Error (-("The keystore file is corrupted: invalid data block headers or signature"));
Ada.Command_Line.Set_Exit_Status (Ada.Command_Line.Failure);
when Keystore.Invalid_Signature =>
Log.Error (-("The keystore file is corrupted: invalid signature"));
Ada.Command_Line.Set_Exit_Status (Ada.Command_Line.Failure);
when Keystore.Invalid_Storage =>
Log.Error (-("The keystore file is corrupted: invalid or missing storage file"));
Ada.Command_Line.Set_Exit_Status (Ada.Command_Line.Failure);
when Keystore.Invalid_Keystore =>
Log.Error (-("The file is not a keystore"));
Ada.Command_Line.Set_Exit_Status (Ada.Command_Line.Failure);
when AWA.Commands.Error | Util.Commands.Not_Found =>
Ada.Command_Line.Set_Exit_Status (Ada.Command_Line.Failure);
when E : Ada.IO_Exceptions.Name_Error =>
Log.Error (-("Cannot access file: {0}"), Ada.Exceptions.Exception_Message (E));
Ada.Command_Line.Set_Exit_Status (Ada.Command_Line.Failure);
when E : others =>
Log.Error (-("Some internal error occurred"), E);
Ada.Command_Line.Set_Exit_Status (Ada.Command_Line.Failure);
end Print;
-- ------------------------------
-- Configure the logs.
-- ------------------------------
procedure Configure_Logs (Root : in String;
Debug : in Boolean;
Dump : in Boolean;
Verbose : in Boolean) is
procedure Split (Item : in String;
Done : out Boolean);
function Make_Root (Level : in String;
Appender1 : in String;
Appender2 : in String) return String;
Start : constant Natural := Util.Strings.Index (Root, ',');
List : Util.Strings.Vectors.Vector;
procedure Split (Item : in String;
Done : out Boolean) is
begin
Done := False;
List.Append (Item);
end Split;
function Make_Root (Level : in String;
Appender1 : in String;
Appender2 : in String) return String is
Result : Unbounded_String;
begin
Append (Result, Level);
Append (Result, ",");
if not List.Contains (Appender1) then
Append (Result, Appender1);
end if;
if Appender2'Length > 0 and then not List.Contains (Appender2) then
Append (Result, ",");
Append (Result, Appender2);
end if;
for Item of List loop
Append (Result, ",");
Append (Result, Item);
end loop;
return To_String (Result);
end Make_Root;
Log_Config : Util.Properties.Manager;
begin
if Start > 0 then
Util.Strings.Tokenizers.Iterate_Tokens (Root (Start + 1 .. Root'Last),
",", Split'Access);
end if;
Log_Config.Set ("log4j.rootCategory", Make_Root ("DEBUG", "console", ""));
Log_Config.Set ("log4j.appender.console", "Console");
Log_Config.Set ("log4j.appender.console.level", "ERROR");
Log_Config.Set ("log4j.appender.console.layout", "message");
Log_Config.Set ("log4j.appender.console.stderr", "true");
Log_Config.Set ("log4j.logger.Util", "FATAL");
Log_Config.Set ("log4j.logger.log", "ERROR");
if Verbose or Debug or Dump then
Log_Config.Set ("log4j.logger.log", "INFO");
Log_Config.Set ("log4j.logger.Util", "WARN");
Log_Config.Set ("log4j.logger.Keystore.IO", "WARN");
Log_Config.Set ("log4j.logger.ADO.Sessions", "WARN");
Log_Config.Set ("log4j.rootCategory", Make_Root ("DEBUG", "console", "verbose"));
Log_Config.Set ("log4j.appender.verbose", "Console");
Log_Config.Set ("log4j.appender.verbose.level", "INFO");
Log_Config.Set ("log4j.appender.verbose.layout", "level-message");
end if;
if Debug or Dump then
Log_Config.Set ("log4j.logger.log", "INFO");
Log_Config.Set ("log4j.logger.Util.Processes", "INFO");
Log_Config.Set ("log4j.logger.Keystore.IO", "INFO");
Log_Config.Set ("log4j.logger.ADO", "INFO");
Log_Config.Set ("log4j.rootCategory", Make_Root ("DEBUG", "console", "debug"));
Log_Config.Set ("log4j.appender.debug", "Console");
Log_Config.Set ("log4j.appender.debug.level", "DEBUG");
Log_Config.Set ("log4j.appender.debug.layout", "full");
end if;
if Dump then
Log_Config.Set ("log4j.logger.Keystore.IO", "DEBUG");
Log_Config.Set ("log4j.logger.AWA", "DEBUG");
Log_Config.Set ("log4j.logger.ADO", "DEBUG");
Log_Config.Set ("log4j.logger.ADO.Sessions", "WARN");
end if;
Util.Log.Loggers.Initialize (Log_Config);
end Configure_Logs;
overriding
procedure Finalize (Context : in out Context_Type) is
procedure Free is
new Ada.Unchecked_Deallocation (Object => Keystore.Passwords.Provider'Class,
Name => Keystore.Passwords.Provider_Access);
begin
GC.Free (Context.Command_Config);
Free (Context.Provider);
end Finalize;
end AWA.Commands;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- A D A . N U M E R I C S . A U X --
-- --
-- S p e c --
-- (Machine Version for x86) --
-- --
-- Copyright (C) 1992-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. --
-- --
------------------------------------------------------------------------------
-- Version for the x86, using 64-bit IEEE format with inline asm statements
package Ada.Numerics.Aux is
pragma Pure;
type Double is new Long_Long_Float;
function Sin (X : Double) return Double;
function Cos (X : Double) return Double;
function Tan (X : Double) return Double;
function Exp (X : Double) return Double;
function Sqrt (X : Double) return Double;
function Log (X : Double) return Double;
function Atan (X : Double) return Double;
function Acos (X : Double) return Double;
function Asin (X : Double) return Double;
function Sinh (X : Double) return Double;
function Cosh (X : Double) return Double;
function Tanh (X : Double) return Double;
function Pow (X, Y : Double) return Double;
private
pragma Inline (Atan);
pragma Inline (Cos);
pragma Inline (Tan);
pragma Inline (Exp);
pragma Inline (Log);
pragma Inline (Sin);
pragma Inline (Sqrt);
end Ada.Numerics.Aux;
|
-- Copyright (c) 2013, Nordic Semiconductor ASA
-- 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 Nordic Semiconductor ASA 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 spec has been automatically generated from nrf51.svd
pragma Restrictions (No_Elaboration_Code);
pragma Ada_2012;
pragma Style_Checks (Off);
with HAL;
with System;
package NRF_SVD.CLOCK is
pragma Preelaborate;
---------------
-- Registers --
---------------
-- Enable interrupt on HFCLKSTARTED event.
type INTENSET_HFCLKSTARTED_Field is
(-- Interrupt disabled.
Disabled,
-- Interrupt enabled.
Enabled)
with Size => 1;
for INTENSET_HFCLKSTARTED_Field use
(Disabled => 0,
Enabled => 1);
-- Enable interrupt on HFCLKSTARTED event.
type INTENSET_HFCLKSTARTED_Field_1 is
(-- Reset value for the field
Intenset_Hfclkstarted_Field_Reset,
-- Enable interrupt on write.
Set)
with Size => 1;
for INTENSET_HFCLKSTARTED_Field_1 use
(Intenset_Hfclkstarted_Field_Reset => 0,
Set => 1);
-- Enable interrupt on LFCLKSTARTED event.
type INTENSET_LFCLKSTARTED_Field is
(-- Interrupt disabled.
Disabled,
-- Interrupt enabled.
Enabled)
with Size => 1;
for INTENSET_LFCLKSTARTED_Field use
(Disabled => 0,
Enabled => 1);
-- Enable interrupt on LFCLKSTARTED event.
type INTENSET_LFCLKSTARTED_Field_1 is
(-- Reset value for the field
Intenset_Lfclkstarted_Field_Reset,
-- Enable interrupt on write.
Set)
with Size => 1;
for INTENSET_LFCLKSTARTED_Field_1 use
(Intenset_Lfclkstarted_Field_Reset => 0,
Set => 1);
-- Enable interrupt on DONE event.
type INTENSET_DONE_Field is
(-- Interrupt disabled.
Disabled,
-- Interrupt enabled.
Enabled)
with Size => 1;
for INTENSET_DONE_Field use
(Disabled => 0,
Enabled => 1);
-- Enable interrupt on DONE event.
type INTENSET_DONE_Field_1 is
(-- Reset value for the field
Intenset_Done_Field_Reset,
-- Enable interrupt on write.
Set)
with Size => 1;
for INTENSET_DONE_Field_1 use
(Intenset_Done_Field_Reset => 0,
Set => 1);
-- Enable interrupt on CTTO event.
type INTENSET_CTTO_Field is
(-- Interrupt disabled.
Disabled,
-- Interrupt enabled.
Enabled)
with Size => 1;
for INTENSET_CTTO_Field use
(Disabled => 0,
Enabled => 1);
-- Enable interrupt on CTTO event.
type INTENSET_CTTO_Field_1 is
(-- Reset value for the field
Intenset_Ctto_Field_Reset,
-- Enable interrupt on write.
Set)
with Size => 1;
for INTENSET_CTTO_Field_1 use
(Intenset_Ctto_Field_Reset => 0,
Set => 1);
-- Interrupt enable set register.
type INTENSET_Register is record
-- Enable interrupt on HFCLKSTARTED event.
HFCLKSTARTED : INTENSET_HFCLKSTARTED_Field_1 :=
Intenset_Hfclkstarted_Field_Reset;
-- Enable interrupt on LFCLKSTARTED event.
LFCLKSTARTED : INTENSET_LFCLKSTARTED_Field_1 :=
Intenset_Lfclkstarted_Field_Reset;
-- unspecified
Reserved_2_2 : HAL.Bit := 16#0#;
-- Enable interrupt on DONE event.
DONE : INTENSET_DONE_Field_1 := Intenset_Done_Field_Reset;
-- Enable interrupt on CTTO event.
CTTO : INTENSET_CTTO_Field_1 := Intenset_Ctto_Field_Reset;
-- unspecified
Reserved_5_31 : HAL.UInt27 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for INTENSET_Register use record
HFCLKSTARTED at 0 range 0 .. 0;
LFCLKSTARTED at 0 range 1 .. 1;
Reserved_2_2 at 0 range 2 .. 2;
DONE at 0 range 3 .. 3;
CTTO at 0 range 4 .. 4;
Reserved_5_31 at 0 range 5 .. 31;
end record;
-- Disable interrupt on HFCLKSTARTED event.
type INTENCLR_HFCLKSTARTED_Field is
(-- Interrupt disabled.
Disabled,
-- Interrupt enabled.
Enabled)
with Size => 1;
for INTENCLR_HFCLKSTARTED_Field use
(Disabled => 0,
Enabled => 1);
-- Disable interrupt on HFCLKSTARTED event.
type INTENCLR_HFCLKSTARTED_Field_1 is
(-- Reset value for the field
Intenclr_Hfclkstarted_Field_Reset,
-- Disable interrupt on write.
Clear)
with Size => 1;
for INTENCLR_HFCLKSTARTED_Field_1 use
(Intenclr_Hfclkstarted_Field_Reset => 0,
Clear => 1);
-- Disable interrupt on LFCLKSTARTED event.
type INTENCLR_LFCLKSTARTED_Field is
(-- Interrupt disabled.
Disabled,
-- Interrupt enabled.
Enabled)
with Size => 1;
for INTENCLR_LFCLKSTARTED_Field use
(Disabled => 0,
Enabled => 1);
-- Disable interrupt on LFCLKSTARTED event.
type INTENCLR_LFCLKSTARTED_Field_1 is
(-- Reset value for the field
Intenclr_Lfclkstarted_Field_Reset,
-- Disable interrupt on write.
Clear)
with Size => 1;
for INTENCLR_LFCLKSTARTED_Field_1 use
(Intenclr_Lfclkstarted_Field_Reset => 0,
Clear => 1);
-- Disable interrupt on DONE event.
type INTENCLR_DONE_Field is
(-- Interrupt disabled.
Disabled,
-- Interrupt enabled.
Enabled)
with Size => 1;
for INTENCLR_DONE_Field use
(Disabled => 0,
Enabled => 1);
-- Disable interrupt on DONE event.
type INTENCLR_DONE_Field_1 is
(-- Reset value for the field
Intenclr_Done_Field_Reset,
-- Disable interrupt on write.
Clear)
with Size => 1;
for INTENCLR_DONE_Field_1 use
(Intenclr_Done_Field_Reset => 0,
Clear => 1);
-- Disable interrupt on CTTO event.
type INTENCLR_CTTO_Field is
(-- Interrupt disabled.
Disabled,
-- Interrupt enabled.
Enabled)
with Size => 1;
for INTENCLR_CTTO_Field use
(Disabled => 0,
Enabled => 1);
-- Disable interrupt on CTTO event.
type INTENCLR_CTTO_Field_1 is
(-- Reset value for the field
Intenclr_Ctto_Field_Reset,
-- Disable interrupt on write.
Clear)
with Size => 1;
for INTENCLR_CTTO_Field_1 use
(Intenclr_Ctto_Field_Reset => 0,
Clear => 1);
-- Interrupt enable clear register.
type INTENCLR_Register is record
-- Disable interrupt on HFCLKSTARTED event.
HFCLKSTARTED : INTENCLR_HFCLKSTARTED_Field_1 :=
Intenclr_Hfclkstarted_Field_Reset;
-- Disable interrupt on LFCLKSTARTED event.
LFCLKSTARTED : INTENCLR_LFCLKSTARTED_Field_1 :=
Intenclr_Lfclkstarted_Field_Reset;
-- unspecified
Reserved_2_2 : HAL.Bit := 16#0#;
-- Disable interrupt on DONE event.
DONE : INTENCLR_DONE_Field_1 := Intenclr_Done_Field_Reset;
-- Disable interrupt on CTTO event.
CTTO : INTENCLR_CTTO_Field_1 := Intenclr_Ctto_Field_Reset;
-- unspecified
Reserved_5_31 : HAL.UInt27 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for INTENCLR_Register use record
HFCLKSTARTED at 0 range 0 .. 0;
LFCLKSTARTED at 0 range 1 .. 1;
Reserved_2_2 at 0 range 2 .. 2;
DONE at 0 range 3 .. 3;
CTTO at 0 range 4 .. 4;
Reserved_5_31 at 0 range 5 .. 31;
end record;
-- Task HFCLKSTART trigger status.
type HFCLKRUN_STATUS_Field is
(-- Task HFCLKSTART has not been triggered.
Nottriggered,
-- Task HFCLKSTART has been triggered.
Triggered)
with Size => 1;
for HFCLKRUN_STATUS_Field use
(Nottriggered => 0,
Triggered => 1);
-- Task HFCLKSTART trigger status.
type HFCLKRUN_Register is record
-- Read-only. Task HFCLKSTART trigger status.
STATUS : HFCLKRUN_STATUS_Field;
-- unspecified
Reserved_1_31 : HAL.UInt31;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for HFCLKRUN_Register use record
STATUS at 0 range 0 .. 0;
Reserved_1_31 at 0 range 1 .. 31;
end record;
-- Active clock source for the HF clock.
type HFCLKSTAT_SRC_Field is
(-- Internal 16MHz RC oscillator running and generating the HFCLK clock.
Rc,
-- External 16MHz/32MHz crystal oscillator running and generating the HFCLK
-- clock.
Xtal)
with Size => 1;
for HFCLKSTAT_SRC_Field use
(Rc => 0,
Xtal => 1);
-- State for the HFCLK.
type HFCLKSTAT_STATE_Field is
(-- HFCLK clock not running.
Notrunning,
-- HFCLK clock running.
Running)
with Size => 1;
for HFCLKSTAT_STATE_Field use
(Notrunning => 0,
Running => 1);
-- High frequency clock status.
type HFCLKSTAT_Register is record
-- Read-only. Active clock source for the HF clock.
SRC : HFCLKSTAT_SRC_Field;
-- unspecified
Reserved_1_15 : HAL.UInt15;
-- Read-only. State for the HFCLK.
STATE : HFCLKSTAT_STATE_Field;
-- unspecified
Reserved_17_31 : HAL.UInt15;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for HFCLKSTAT_Register use record
SRC at 0 range 0 .. 0;
Reserved_1_15 at 0 range 1 .. 15;
STATE at 0 range 16 .. 16;
Reserved_17_31 at 0 range 17 .. 31;
end record;
-- Task LFCLKSTART triggered status.
type LFCLKRUN_STATUS_Field is
(-- Task LFCLKSTART has not been triggered.
Nottriggered,
-- Task LFCLKSTART has been triggered.
Triggered)
with Size => 1;
for LFCLKRUN_STATUS_Field use
(Nottriggered => 0,
Triggered => 1);
-- Task LFCLKSTART triggered status.
type LFCLKRUN_Register is record
-- Read-only. Task LFCLKSTART triggered status.
STATUS : LFCLKRUN_STATUS_Field;
-- unspecified
Reserved_1_31 : HAL.UInt31;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for LFCLKRUN_Register use record
STATUS at 0 range 0 .. 0;
Reserved_1_31 at 0 range 1 .. 31;
end record;
-- Active clock source for the LF clock.
type LFCLKSTAT_SRC_Field is
(-- Internal 32KiHz RC oscillator running and generating the LFCLK clock.
Rc,
-- External 32KiHz crystal oscillator running and generating the LFCLK clock.
Xtal,
-- Internal 32KiHz synthesizer from the HFCLK running and generating the LFCLK
-- clock.
Synth)
with Size => 2;
for LFCLKSTAT_SRC_Field use
(Rc => 0,
Xtal => 1,
Synth => 2);
-- State for the LF clock.
type LFCLKSTAT_STATE_Field is
(-- LFCLK clock not running.
Notrunning,
-- LFCLK clock running.
Running)
with Size => 1;
for LFCLKSTAT_STATE_Field use
(Notrunning => 0,
Running => 1);
-- Low frequency clock status.
type LFCLKSTAT_Register is record
-- Read-only. Active clock source for the LF clock.
SRC : LFCLKSTAT_SRC_Field;
-- unspecified
Reserved_2_15 : HAL.UInt14;
-- Read-only. State for the LF clock.
STATE : LFCLKSTAT_STATE_Field;
-- unspecified
Reserved_17_31 : HAL.UInt15;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for LFCLKSTAT_Register use record
SRC at 0 range 0 .. 1;
Reserved_2_15 at 0 range 2 .. 15;
STATE at 0 range 16 .. 16;
Reserved_17_31 at 0 range 17 .. 31;
end record;
-- Clock source for the LFCLK clock, set when task LKCLKSTART is triggered.
type LFCLKSRCCOPY_SRC_Field is
(-- Internal 32KiHz RC oscillator.
Rc,
-- External 32KiHz crystal.
Xtal,
-- Internal 32KiHz synthesizer from HFCLK system clock.
Synth)
with Size => 2;
for LFCLKSRCCOPY_SRC_Field use
(Rc => 0,
Xtal => 1,
Synth => 2);
-- Clock source for the LFCLK clock, set when task LKCLKSTART is triggered.
type LFCLKSRCCOPY_Register is record
-- Read-only. Clock source for the LFCLK clock, set when task LKCLKSTART
-- is triggered.
SRC : LFCLKSRCCOPY_SRC_Field;
-- unspecified
Reserved_2_31 : HAL.UInt30;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for LFCLKSRCCOPY_Register use record
SRC at 0 range 0 .. 1;
Reserved_2_31 at 0 range 2 .. 31;
end record;
-- Clock source.
type LFCLKSRC_SRC_Field is
(-- Internal 32KiHz RC oscillator.
Rc,
-- External 32KiHz crystal.
Xtal,
-- Internal 32KiHz synthesizer from HFCLK system clock.
Synth)
with Size => 2;
for LFCLKSRC_SRC_Field use
(Rc => 0,
Xtal => 1,
Synth => 2);
-- Clock source for the LFCLK clock.
type LFCLKSRC_Register is record
-- Clock source.
SRC : LFCLKSRC_SRC_Field := NRF_SVD.CLOCK.Rc;
-- unspecified
Reserved_2_31 : HAL.UInt30 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for LFCLKSRC_Register use record
SRC at 0 range 0 .. 1;
Reserved_2_31 at 0 range 2 .. 31;
end record;
subtype CTIV_CTIV_Field is HAL.UInt7;
-- Calibration timer interval.
type CTIV_Register is record
-- Calibration timer interval in 0.25s resolution.
CTIV : CTIV_CTIV_Field := 16#0#;
-- unspecified
Reserved_7_31 : HAL.UInt25 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CTIV_Register use record
CTIV at 0 range 0 .. 6;
Reserved_7_31 at 0 range 7 .. 31;
end record;
-- External Xtal frequency selection.
type XTALFREQ_XTALFREQ_Field is
(-- 32MHz xtal is used as source for the HFCLK oscillator.
Val_32Mhz,
-- 16MHz xtal is used as source for the HFCLK oscillator.
Val_16Mhz)
with Size => 8;
for XTALFREQ_XTALFREQ_Field use
(Val_32Mhz => 0,
Val_16Mhz => 255);
-- Crystal frequency.
type XTALFREQ_Register is record
-- External Xtal frequency selection.
XTALFREQ : XTALFREQ_XTALFREQ_Field := NRF_SVD.CLOCK.Val_16Mhz;
-- unspecified
Reserved_8_31 : HAL.UInt24 := 16#FFFFFF#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for XTALFREQ_Register use record
XTALFREQ at 0 range 0 .. 7;
Reserved_8_31 at 0 range 8 .. 31;
end record;
-----------------
-- Peripherals --
-----------------
-- Clock control.
type CLOCK_Peripheral is record
-- Start HFCLK clock source.
TASKS_HFCLKSTART : aliased HAL.UInt32;
-- Stop HFCLK clock source.
TASKS_HFCLKSTOP : aliased HAL.UInt32;
-- Start LFCLK clock source.
TASKS_LFCLKSTART : aliased HAL.UInt32;
-- Stop LFCLK clock source.
TASKS_LFCLKSTOP : aliased HAL.UInt32;
-- Start calibration of LFCLK RC oscillator.
TASKS_CAL : aliased HAL.UInt32;
-- Start calibration timer.
TASKS_CTSTART : aliased HAL.UInt32;
-- Stop calibration timer.
TASKS_CTSTOP : aliased HAL.UInt32;
-- HFCLK oscillator started.
EVENTS_HFCLKSTARTED : aliased HAL.UInt32;
-- LFCLK oscillator started.
EVENTS_LFCLKSTARTED : aliased HAL.UInt32;
-- Calibration of LFCLK RC oscillator completed.
EVENTS_DONE : aliased HAL.UInt32;
-- Calibration timer timeout.
EVENTS_CTTO : aliased HAL.UInt32;
-- Interrupt enable set register.
INTENSET : aliased INTENSET_Register;
-- Interrupt enable clear register.
INTENCLR : aliased INTENCLR_Register;
-- Task HFCLKSTART trigger status.
HFCLKRUN : aliased HFCLKRUN_Register;
-- High frequency clock status.
HFCLKSTAT : aliased HFCLKSTAT_Register;
-- Task LFCLKSTART triggered status.
LFCLKRUN : aliased LFCLKRUN_Register;
-- Low frequency clock status.
LFCLKSTAT : aliased LFCLKSTAT_Register;
-- Clock source for the LFCLK clock, set when task LKCLKSTART is
-- triggered.
LFCLKSRCCOPY : aliased LFCLKSRCCOPY_Register;
-- Clock source for the LFCLK clock.
LFCLKSRC : aliased LFCLKSRC_Register;
-- Calibration timer interval.
CTIV : aliased CTIV_Register;
-- Crystal frequency.
XTALFREQ : aliased XTALFREQ_Register;
end record
with Volatile;
for CLOCK_Peripheral use record
TASKS_HFCLKSTART at 16#0# range 0 .. 31;
TASKS_HFCLKSTOP at 16#4# range 0 .. 31;
TASKS_LFCLKSTART at 16#8# range 0 .. 31;
TASKS_LFCLKSTOP at 16#C# range 0 .. 31;
TASKS_CAL at 16#10# range 0 .. 31;
TASKS_CTSTART at 16#14# range 0 .. 31;
TASKS_CTSTOP at 16#18# range 0 .. 31;
EVENTS_HFCLKSTARTED at 16#100# range 0 .. 31;
EVENTS_LFCLKSTARTED at 16#104# range 0 .. 31;
EVENTS_DONE at 16#10C# range 0 .. 31;
EVENTS_CTTO at 16#110# range 0 .. 31;
INTENSET at 16#304# range 0 .. 31;
INTENCLR at 16#308# range 0 .. 31;
HFCLKRUN at 16#408# range 0 .. 31;
HFCLKSTAT at 16#40C# range 0 .. 31;
LFCLKRUN at 16#414# range 0 .. 31;
LFCLKSTAT at 16#418# range 0 .. 31;
LFCLKSRCCOPY at 16#41C# range 0 .. 31;
LFCLKSRC at 16#518# range 0 .. 31;
CTIV at 16#538# range 0 .. 31;
XTALFREQ at 16#550# range 0 .. 31;
end record;
-- Clock control.
CLOCK_Periph : aliased CLOCK_Peripheral
with Import, Address => CLOCK_Base;
end NRF_SVD.CLOCK;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUNTIME COMPONENTS --
-- --
-- A D A . F L O A T _ T E X T _ I O --
-- --
-- S p e c --
-- --
-- $Revision: 2 $ --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --
-- --
------------------------------------------------------------------------------
with Ada.Text_IO;
package Ada.Float_Text_IO is
new Ada.Text_IO.Float_IO (Float);
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
-- --
-- S Y S T E M . T A S K I N G . R E S T R I C T E D . S T A G E S --
-- --
-- S p e c --
-- --
-- Copyright (C) 1992-2005, 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. --
-- --
--
--
--
--
--
--
--
-- GNARL was developed by the GNARL team at Florida State University. --
-- Extensive contributions were provided by Ada Core Technologies, Inc. --
-- --
------------------------------------------------------------------------------
-- This is a simplified version of the System.Tasking.Stages package,
-- intended to be used in a restricted run time.
-- This package represents the high level tasking interface used by the
-- compiler to expand Ada 95 tasking constructs into simpler run time calls
-- (aka GNARLI, GNU Ada Run-time Library Interface)
-- Note: the compiler generates direct calls to this interface, via Rtsfind.
-- Any changes to this interface may require corresponding compiler changes
-- in exp_ch9.adb and possibly exp_ch7.adb
-- The restricted GNARLI is also composed of System.Protected_Objects and
-- System.Protected_Objects.Single_Entry
with System.Task_Info;
-- used for Task_Info_Type
with System.Parameters;
-- used for Size_Type
package System.Tasking.Restricted.Stages is
pragma Elaborate_Body;
---------------------------------
-- Compiler Interface (GNARLI) --
---------------------------------
-- The compiler will expand in the GNAT tree the following construct:
-- task type T (Discr : Integer);
-- task body T is
-- ...declarations, possibly some controlled...
-- begin
-- ...B...;
-- end T;
-- T1 : T (1);
-- as follows:
-- task type t (discr : integer);
-- tE : aliased boolean := false;
-- tZ : size_type := unspecified_size;
-- type tV (discr : integer) is limited record
-- _task_id : task_id;
-- _atcb : aliased system__tasking__ada_task_control_block (0);
-- end record;
-- procedure tB (_task : access tV);
-- freeze tV [
-- procedure tVIP (_init : in out tV; _master : master_id;
-- _chain : in out activation_chain; _task_name : in string;
-- discr : integer) is
-- begin
-- _init.discr := discr;
-- _init._task_id := null;
-- system__tasking__ada_task_control_blockIP (_init._atcb, 0);
-- _init._task_id := _init._atcb'unchecked_access;
-- create_restricted_task (unspecified_priority, tZ,
-- unspecified_task_info, task_procedure_access!(tB'address),
-- _init'address, tE'unchecked_access, _chain, _task_name, _init.
-- _task_id);
-- return;
-- end tVIP;
-- _chain : aliased activation_chain;
-- activation_chainIP (_chain);
-- procedure tB (_task : access tV) is
-- discr : integer renames _task.discr;
-- procedure _clean is
-- begin
-- complete_restricted_task;
-- finalize_list (F14b);
-- return;
-- end _clean;
-- begin
-- ...declarations...
-- complete_restricted_activation;
-- ...B...;
-- return;
-- at end
-- _clean;
-- end tB;
-- tE := true;
-- t1 : t (1);
-- t1S : constant String := "t1";
-- tIP (t1, 3, _chain, t1S, 1);
-- activate_restricted_tasks (_chain'unchecked_access);
procedure Create_Restricted_Task
(Priority : Integer;
Stack_Address : System.Address;
Size : System.Parameters.Size_Type;
Task_Info : System.Task_Info.Task_Info_Type;
State : Task_Procedure_Access;
Discriminants : System.Address;
Elaborated : Access_Boolean;
Chain : in out Activation_Chain;
Task_Image : String;
Created_Task : Task_Id);
-- Compiler interface only. Do not call from within the RTS.
-- This must be called to create a new task.
--
-- Priority is the task's priority (assumed to be in the
-- System.Any_Priority'Range)
--
-- Stack_Address is the start address of the stack associated to the
-- task, in case it has been preallocated by the compiler; it is equal
-- to Null_Address when the stack needs to be allocated by the
-- underlying operating system.
--
-- Size is the stack size of the task to create
--
-- Task_Info is the task info associated with the created task, or
-- Unspecified_Task_Info if none.
--
-- State is the compiler generated task's procedure body
--
-- Discriminants is a pointer to a limited record whose discriminants
-- are those of the task to create. This parameter should be passed as
-- the single argument to State.
--
-- Elaborated is a pointer to a Boolean that must be set to true on exit
-- if the task could be sucessfully elaborated.
--
-- Chain is a linked list of task that needs to be created. On exit,
-- Created_Task.Activation_Link will be Chain.T_ID, and Chain.T_ID
-- will be Created_Task (e.g the created task will be linked at the front
-- of Chain).
--
-- Task_Image is a string created by the compiler that the
-- run time can store to ease the debugging and the
-- Ada.Task_Identification facility.
--
-- Created_Task is the resulting task.
--
-- This procedure can raise Storage_Error if the task creation fails
procedure Activate_Restricted_Tasks
(Chain_Access : Activation_Chain_Access);
-- Compiler interface only. Do not call from within the RTS.
-- This must be called by the creator of a chain of one or more new tasks,
-- to activate them. The chain is a linked list that up to this point is
-- only known to the task that created them, though the individual tasks
-- are already in the All_Tasks_List.
--
-- The compiler builds the chain in LIFO order (as a stack). Another
-- version of this procedure had code to reverse the chain, so as to
-- activate the tasks in the order of declaration. This might be nice, but
-- it is not needed if priority-based scheduling is supported, since all
-- the activated tasks synchronize on the activators lock before they
-- start activating and so they should start activating in priority order.
procedure Complete_Restricted_Activation;
-- Compiler interface only. Do not call from within the RTS.
-- This should be called from the task body at the end of
-- the elaboration code for its declarative part.
-- Decrement the count of tasks to be activated by the activator and
-- wake it up so it can check to see if all tasks have been activated.
-- Except for the environment task, which should never call this procedure,
-- T.Activator should only be null iff T has completed activation.
procedure Complete_Restricted_Task;
-- Compiler interface only. Do not call from within the RTS.
-- This should be called from an implicit at-end handler
-- associated with the task body, when it completes.
-- From this point, the current task will become not callable.
-- If the current task have not completed activation, this should be done
-- now in order to wake up the activator (the environment task).
function Restricted_Terminated (T : Task_Id) return Boolean;
-- Compiler interface only. Do not call from within the RTS.
-- This is called by the compiler to implement the 'Terminated attribute.
--
-- source code:
-- T1'Terminated
--
-- code expansion:
-- restricted_terminated (t1._task_id)
procedure Finalize_Global_Tasks;
-- This is needed to support the compiler interface; it will only be called
-- by the Environment task in the binder generated file (by adafinal).
-- Instead, it will cause the Environment to block forever, since none of
-- the dependent tasks are expected to terminate
end System.Tasking.Restricted.Stages;
|
--------------------------------------------------------------------------------
-- Copyright (c) 2013, Felix Krause <contact@flyx.org>
--
-- Permission to use, copy, modify, and/or 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 CL.API;
with CL.Enumerations;
with CL.Helpers;
package body CL.Memory is
-----------------------------------------------------------------------------
-- Helpers
-----------------------------------------------------------------------------
function UInt_Info is
new Helpers.Get_Parameter (Return_T => UInt,
Parameter_T => Enumerations.Memory_Info,
C_Getter => API.Get_Mem_Object_Info);
function Size_Info is
new Helpers.Get_Parameter (Return_T => CL.Size,
Parameter_T => Enumerations.Memory_Info,
C_Getter => API.Get_Mem_Object_Info);
--function Type_Info is
-- new Helpers.Get_Parameter (Return_T => Enumerations.Memory_Object_Type,
-- Parameter_T => Enumerations.Memory_Info,
-- C_Getter => API.Get_Mem_Object_Info);
--procedure Destructor_Callback_Dispatcher (Object : System.Address;
-- Callback : Destructor_Callback);
--pragma Convention (C, Destructor_Callback_Dispatcher);
--procedure Destructor_Callback_Dispatcher (Object : System.Address;
-- Callback : Destructor_Callback) is
--begin
-- -- create proper object derivated from CL.Memory_Object for memory type
-- case Get_Info_Type (Object, Mem_Type) is
-- when T_Buffer => Callback (Buffer'(Location => Object));
-- when T_Image2D => Callback (Image2D'(Location => Object));
-- when T_Image3D => Callback (Image3D'(Location => Object));
-- end case;
--end Destructor_Callback_Dispatcher;
-----------------------------------------------------------------------------
-- Implementations
-----------------------------------------------------------------------------
overriding procedure Adjust (Object : in out Memory_Object) is
use type System.Address;
begin
if Object.Location /= System.Null_Address then
Helpers.Error_Handler (API.Retain_Mem_Object (Object.Location));
end if;
end Adjust;
overriding procedure Finalize (Object : in out Memory_Object) is
use type System.Address;
begin
if Object.Location /= System.Null_Address then
Helpers.Error_Handler (API.Release_Mem_Object (Object.Location));
end if;
end Finalize;
function Flags (Source : Memory_Object) return Memory_Flags is
function Getter is
new Helpers.Get_Parameter (Return_T => Memory_Flags,
Parameter_T => Enumerations.Memory_Info,
C_Getter => API.Get_Mem_Object_Info);
begin
return Getter (Source, Enumerations.Flags);
end Flags;
function Mode (Source : Memory_Object) return Access_Kind is
Flags : constant Memory_Flags := Source.Flags;
begin
if Flags.Write_Only then
return Write_Only;
end if;
if Flags.Read_Only then
return Read_Only;
end if;
return Read_Write;
end Mode;
function In_Host_Memory (Source : Memory_Object) return Boolean is
Flags : constant Memory_Flags := Source.Flags;
begin
return (Flags.Use_Host_Ptr or Flags.Alloc_Host_Ptr);
end In_Host_Memory;
function Size (Source : Memory_Object) return CL.Size is
begin
return Size_Info (Source, Enumerations.Size);
end Size;
function Map_Count (Source : Memory_Object) return UInt is
begin
return UInt_Info (Source, Enumerations.Map_Count);
end Map_Count;
function Reference_Count (Source : Memory_Object) return UInt is
begin
return UInt_Info (Source, Enumerations.Reference_Count);
end Reference_Count;
function Context (Source : Memory_Object) return Contexts.Context is
function Getter is
new Helpers.Get_Parameter (Return_T => System.Address,
Parameter_T => Enumerations.Memory_Info,
C_Getter => API.Get_Mem_Object_Info);
function New_Context_Reference is
new Helpers.New_Reference (Object_T => Contexts.Context);
begin
return New_Context_Reference (Getter (Source, Enumerations.Context));
end Context;
-- available since OpenCL 1.1
--procedure Set_Destructor_Callback (Target : Memory_Object'Class;
-- Callback : Destructor_Callback) is
-- Error : Error_Code := CL_Set_Mem_Object_Destructor_Callback
-- (Target.Location,
-- Destructor_Callback_Dispatcher'Access,
-- Callback);
--begin
-- Error_Handler (Error);
--end Set_Destructor_Callback;
function Create_Flags (Mode : Access_Kind;
Use_Host_Ptr, Copy_Host_Ptr, Alloc_Host_Ptr : Boolean := False)
return Memory_Flags is
Flags : Memory_Flags;
begin
case Mode is
when Read_Only => Flags.Read_Only := True;
when Write_Only => Flags.Write_Only := True;
when Read_Write => Flags.Read_Write := True;
end case;
Flags.Use_Host_Ptr := Use_Host_Ptr;
Flags.Copy_Host_Ptr := Copy_Host_Ptr;
Flags.Alloc_Host_Ptr := Alloc_Host_Ptr;
return Flags;
end Create_Flags;
end CL.Memory;
|
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- P R J . P P --
-- --
-- B o d y --
-- --
-- Copyright (C) 2001-2005, 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. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with Ada.Characters.Handling; use Ada.Characters.Handling;
with Hostparm;
with Namet; use Namet;
with Output; use Output;
with Snames;
package body Prj.PP is
use Prj.Tree;
Not_Tested : array (Project_Node_Kind) of Boolean := (others => True);
Max_Line_Length : constant := Hostparm.Max_Line_Length - 5;
-- Maximum length of a line
Column : Natural := 0;
-- Column number of the last character in the line. Used to avoid
-- outputing lines longer than Max_Line_Length.
First_With_In_List : Boolean := True;
-- Indicate that the next with clause is first in a list such as
-- with "A", "B";
-- First_With_In_List will be True for "A", but not for "B".
procedure Indicate_Tested (Kind : Project_Node_Kind);
-- Set the corresponding component of array Not_Tested to False.
-- Only called by pragmas Debug.
---------------------
-- Indicate_Tested --
---------------------
procedure Indicate_Tested (Kind : Project_Node_Kind) is
begin
Not_Tested (Kind) := False;
end Indicate_Tested;
------------------
-- Pretty_Print --
------------------
procedure Pretty_Print
(Project : Prj.Tree.Project_Node_Id;
In_Tree : Prj.Tree.Project_Node_Tree_Ref;
Increment : Positive := 3;
Eliminate_Empty_Case_Constructions : Boolean := False;
Minimize_Empty_Lines : Boolean := False;
W_Char : Write_Char_Ap := null;
W_Eol : Write_Eol_Ap := null;
W_Str : Write_Str_Ap := null;
Backward_Compatibility : Boolean)
is
procedure Print (Node : Project_Node_Id; Indent : Natural);
-- A recursive procedure that traverses a project file tree and outputs
-- its source. Current_Prj is the project that we are printing. This
-- is used when printing attributes, since in nested packages they
-- need to use a fully qualified name.
procedure Output_Attribute_Name (Name : Name_Id);
-- Outputs an attribute name, taking into account the value of
-- Backward_Compatibility.
procedure Output_Name (Name : Name_Id; Capitalize : Boolean := True);
-- Outputs a name
procedure Start_Line (Indent : Natural);
-- Outputs the indentation at the beginning of the line
procedure Output_String (S : Name_Id);
-- Outputs a string using the default output procedures
procedure Write_Empty_Line (Always : Boolean := False);
-- Outputs an empty line, only if the previous line was not empty
-- already and either Always is True or Minimize_Empty_Lines is False.
procedure Write_Line (S : String);
-- Outputs S followed by a new line
procedure Write_String (S : String; Truncated : Boolean := False);
-- Outputs S using Write_Str, starting a new line if line would
-- become too long, when Truncated = False.
-- When Truncated = True, only the part of the string that can fit on
-- the line is output.
procedure Write_End_Of_Line_Comment (Node : Project_Node_Id);
Write_Char : Write_Char_Ap := Output.Write_Char'Access;
Write_Eol : Write_Eol_Ap := Output.Write_Eol'Access;
Write_Str : Write_Str_Ap := Output.Write_Str'Access;
-- These three access to procedure values are used for the output
Last_Line_Is_Empty : Boolean := False;
-- Used to avoid two consecutive empty lines
---------------------------
-- Output_Attribute_Name --
---------------------------
procedure Output_Attribute_Name (Name : Name_Id) is
begin
if Backward_Compatibility then
case Name is
when Snames.Name_Spec =>
Output_Name (Snames.Name_Specification);
when Snames.Name_Spec_Suffix =>
Output_Name (Snames.Name_Specification_Suffix);
when Snames.Name_Body =>
Output_Name (Snames.Name_Implementation);
when Snames.Name_Body_Suffix =>
Output_Name (Snames.Name_Implementation_Suffix);
when others =>
Output_Name (Name);
end case;
else
Output_Name (Name);
end if;
end Output_Attribute_Name;
-----------------
-- Output_Name --
-----------------
procedure Output_Name (Name : Name_Id; Capitalize : Boolean := True) is
Capital : Boolean := Capitalize;
begin
Get_Name_String (Name);
-- If line would become too long, create new line
if Column + Name_Len > Max_Line_Length then
Write_Eol.all;
Column := 0;
end if;
for J in 1 .. Name_Len loop
if Capital then
Write_Char (To_Upper (Name_Buffer (J)));
else
Write_Char (Name_Buffer (J));
end if;
if Capitalize then
Capital :=
Name_Buffer (J) = '_'
or else Is_Digit (Name_Buffer (J));
end if;
end loop;
Column := Column + Name_Len;
end Output_Name;
-------------------
-- Output_String --
-------------------
procedure Output_String (S : Name_Id) is
begin
Get_Name_String (S);
-- If line could become too long, create new line.
-- Note that the number of characters on the line could be
-- twice the number of character in the string (if every
-- character is a '"') plus two (the initial and final '"').
if Column + Name_Len + Name_Len + 2 > Max_Line_Length then
Write_Eol.all;
Column := 0;
end if;
Write_Char ('"');
Column := Column + 1;
Get_Name_String (S);
for J in 1 .. Name_Len loop
if Name_Buffer (J) = '"' then
Write_Char ('"');
Write_Char ('"');
Column := Column + 2;
else
Write_Char (Name_Buffer (J));
Column := Column + 1;
end if;
-- If the string does not fit on one line, cut it in parts
-- and concatenate.
if J < Name_Len and then Column >= Max_Line_Length then
Write_Str (""" &");
Write_Eol.all;
Write_Char ('"');
Column := 1;
end if;
end loop;
Write_Char ('"');
Column := Column + 1;
end Output_String;
----------------
-- Start_Line --
----------------
procedure Start_Line (Indent : Natural) is
begin
if not Minimize_Empty_Lines then
Write_Str ((1 .. Indent => ' '));
Column := Column + Indent;
end if;
end Start_Line;
----------------------
-- Write_Empty_Line --
----------------------
procedure Write_Empty_Line (Always : Boolean := False) is
begin
if (Always or else not Minimize_Empty_Lines)
and then not Last_Line_Is_Empty then
Write_Eol.all;
Column := 0;
Last_Line_Is_Empty := True;
end if;
end Write_Empty_Line;
-------------------------------
-- Write_End_Of_Line_Comment --
-------------------------------
procedure Write_End_Of_Line_Comment (Node : Project_Node_Id) is
Value : constant Name_Id := End_Of_Line_Comment (Node, In_Tree);
begin
if Value /= No_Name then
Write_String (" --");
Write_String (Get_Name_String (Value), Truncated => True);
end if;
Write_Line ("");
end Write_End_Of_Line_Comment;
----------------
-- Write_Line --
----------------
procedure Write_Line (S : String) is
begin
Write_String (S);
Last_Line_Is_Empty := False;
Write_Eol.all;
Column := 0;
end Write_Line;
------------------
-- Write_String --
------------------
procedure Write_String (S : String; Truncated : Boolean := False) is
Length : Natural := S'Length;
begin
-- If the string would not fit on the line,
-- start a new line.
if Column + Length > Max_Line_Length then
if Truncated then
Length := Max_Line_Length - Column;
else
Write_Eol.all;
Column := 0;
end if;
end if;
Write_Str (S (S'First .. S'First + Length - 1));
Column := Column + Length;
end Write_String;
-----------
-- Print --
-----------
procedure Print (Node : Project_Node_Id; Indent : Natural) is
begin
if Node /= Empty_Node then
case Kind_Of (Node, In_Tree) is
when N_Project =>
pragma Debug (Indicate_Tested (N_Project));
if First_With_Clause_Of (Node, In_Tree) /= Empty_Node then
-- with clause(s)
First_With_In_List := True;
Print (First_With_Clause_Of (Node, In_Tree), Indent);
Write_Empty_Line (Always => True);
end if;
Print (First_Comment_Before (Node, In_Tree), Indent);
Start_Line (Indent);
Write_String ("project ");
Output_Name (Name_Of (Node, In_Tree));
-- Check if this project extends another project
if Extended_Project_Path_Of (Node, In_Tree) /= No_Name then
Write_String (" extends ");
if Is_Extending_All (Node, In_Tree) then
Write_String ("all ");
end if;
Output_String (Extended_Project_Path_Of (Node, In_Tree));
end if;
Write_String (" is");
Write_End_Of_Line_Comment (Node);
Print
(First_Comment_After (Node, In_Tree), Indent + Increment);
Write_Empty_Line (Always => True);
-- Output all of the declarations in the project
Print (Project_Declaration_Of (Node, In_Tree), Indent);
Print
(First_Comment_Before_End (Node, In_Tree),
Indent + Increment);
Start_Line (Indent);
Write_String ("end ");
Output_Name (Name_Of (Node, In_Tree));
Write_Line (";");
Print (First_Comment_After_End (Node, In_Tree), Indent);
when N_With_Clause =>
pragma Debug (Indicate_Tested (N_With_Clause));
-- The with clause will sometimes contain an invalid name
-- when we are importing a virtual project from an
-- extending all project. Do not output anything in this
-- case
if Name_Of (Node, In_Tree) /= No_Name
and then String_Value_Of (Node, In_Tree) /= No_Name
then
if First_With_In_List then
Print (First_Comment_Before (Node, In_Tree), Indent);
Start_Line (Indent);
if Non_Limited_Project_Node_Of (Node, In_Tree) =
Empty_Node
then
Write_String ("limited ");
end if;
Write_String ("with ");
end if;
Output_String (String_Value_Of (Node, In_Tree));
if Is_Not_Last_In_List (Node, In_Tree) then
Write_String (", ");
First_With_In_List := False;
else
Write_String (";");
Write_End_Of_Line_Comment (Node);
Print (First_Comment_After (Node, In_Tree), Indent);
First_With_In_List := True;
end if;
end if;
Print (Next_With_Clause_Of (Node, In_Tree), Indent);
when N_Project_Declaration =>
pragma Debug (Indicate_Tested (N_Project_Declaration));
if
First_Declarative_Item_Of (Node, In_Tree) /= Empty_Node
then
Print
(First_Declarative_Item_Of (Node, In_Tree),
Indent + Increment);
Write_Empty_Line (Always => True);
end if;
when N_Declarative_Item =>
pragma Debug (Indicate_Tested (N_Declarative_Item));
Print (Current_Item_Node (Node, In_Tree), Indent);
Print (Next_Declarative_Item (Node, In_Tree), Indent);
when N_Package_Declaration =>
pragma Debug (Indicate_Tested (N_Package_Declaration));
Write_Empty_Line (Always => True);
Print (First_Comment_Before (Node, In_Tree), Indent);
Start_Line (Indent);
Write_String ("package ");
Output_Name (Name_Of (Node, In_Tree));
if Project_Of_Renamed_Package_Of (Node, In_Tree) /=
Empty_Node
then
Write_String (" renames ");
Output_Name
(Name_Of
(Project_Of_Renamed_Package_Of (Node, In_Tree),
In_Tree));
Write_String (".");
Output_Name (Name_Of (Node, In_Tree));
Write_String (";");
Write_End_Of_Line_Comment (Node);
Print (First_Comment_After_End (Node, In_Tree), Indent);
else
Write_String (" is");
Write_End_Of_Line_Comment (Node);
Print (First_Comment_After (Node, In_Tree),
Indent + Increment);
if First_Declarative_Item_Of (Node, In_Tree) /=
Empty_Node
then
Print
(First_Declarative_Item_Of (Node, In_Tree),
Indent + Increment);
end if;
Print (First_Comment_Before_End (Node, In_Tree),
Indent + Increment);
Start_Line (Indent);
Write_String ("end ");
Output_Name (Name_Of (Node, In_Tree));
Write_Line (";");
Print (First_Comment_After_End (Node, In_Tree), Indent);
Write_Empty_Line;
end if;
when N_String_Type_Declaration =>
pragma Debug (Indicate_Tested (N_String_Type_Declaration));
Print (First_Comment_Before (Node, In_Tree), Indent);
Start_Line (Indent);
Write_String ("type ");
Output_Name (Name_Of (Node, In_Tree));
Write_Line (" is");
Start_Line (Indent + Increment);
Write_String ("(");
declare
String_Node : Project_Node_Id :=
First_Literal_String (Node, In_Tree);
begin
while String_Node /= Empty_Node loop
Output_String (String_Value_Of (String_Node, In_Tree));
String_Node :=
Next_Literal_String (String_Node, In_Tree);
if String_Node /= Empty_Node then
Write_String (", ");
end if;
end loop;
end;
Write_String (");");
Write_End_Of_Line_Comment (Node);
Print (First_Comment_After (Node, In_Tree), Indent);
when N_Literal_String =>
pragma Debug (Indicate_Tested (N_Literal_String));
Output_String (String_Value_Of (Node, In_Tree));
if Source_Index_Of (Node, In_Tree) /= 0 then
Write_String (" at ");
Write_String (Source_Index_Of (Node, In_Tree)'Img);
end if;
when N_Attribute_Declaration =>
pragma Debug (Indicate_Tested (N_Attribute_Declaration));
Print (First_Comment_Before (Node, In_Tree), Indent);
Start_Line (Indent);
Write_String ("for ");
Output_Attribute_Name (Name_Of (Node, In_Tree));
if Associative_Array_Index_Of (Node, In_Tree) /= No_Name then
Write_String (" (");
Output_String
(Associative_Array_Index_Of (Node, In_Tree));
if Source_Index_Of (Node, In_Tree) /= 0 then
Write_String (" at ");
Write_String (Source_Index_Of (Node, In_Tree)'Img);
end if;
Write_String (")");
end if;
Write_String (" use ");
Print (Expression_Of (Node, In_Tree), Indent);
Write_String (";");
Write_End_Of_Line_Comment (Node);
Print (First_Comment_After (Node, In_Tree), Indent);
when N_Typed_Variable_Declaration =>
pragma Debug
(Indicate_Tested (N_Typed_Variable_Declaration));
Print (First_Comment_Before (Node, In_Tree), Indent);
Start_Line (Indent);
Output_Name (Name_Of (Node, In_Tree));
Write_String (" : ");
Output_Name
(Name_Of (String_Type_Of (Node, In_Tree), In_Tree));
Write_String (" := ");
Print (Expression_Of (Node, In_Tree), Indent);
Write_String (";");
Write_End_Of_Line_Comment (Node);
Print (First_Comment_After (Node, In_Tree), Indent);
when N_Variable_Declaration =>
pragma Debug (Indicate_Tested (N_Variable_Declaration));
Print (First_Comment_Before (Node, In_Tree), Indent);
Start_Line (Indent);
Output_Name (Name_Of (Node, In_Tree));
Write_String (" := ");
Print (Expression_Of (Node, In_Tree), Indent);
Write_String (";");
Write_End_Of_Line_Comment (Node);
Print (First_Comment_After (Node, In_Tree), Indent);
when N_Expression =>
pragma Debug (Indicate_Tested (N_Expression));
declare
Term : Project_Node_Id := First_Term (Node, In_Tree);
begin
while Term /= Empty_Node loop
Print (Term, Indent);
Term := Next_Term (Term, In_Tree);
if Term /= Empty_Node then
Write_String (" & ");
end if;
end loop;
end;
when N_Term =>
pragma Debug (Indicate_Tested (N_Term));
Print (Current_Term (Node, In_Tree), Indent);
when N_Literal_String_List =>
pragma Debug (Indicate_Tested (N_Literal_String_List));
Write_String ("(");
declare
Expression : Project_Node_Id :=
First_Expression_In_List (Node, In_Tree);
begin
while Expression /= Empty_Node loop
Print (Expression, Indent);
Expression :=
Next_Expression_In_List (Expression, In_Tree);
if Expression /= Empty_Node then
Write_String (", ");
end if;
end loop;
end;
Write_String (")");
when N_Variable_Reference =>
pragma Debug (Indicate_Tested (N_Variable_Reference));
if Project_Node_Of (Node, In_Tree) /= Empty_Node then
Output_Name
(Name_Of (Project_Node_Of (Node, In_Tree), In_Tree));
Write_String (".");
end if;
if Package_Node_Of (Node, In_Tree) /= Empty_Node then
Output_Name
(Name_Of (Package_Node_Of (Node, In_Tree), In_Tree));
Write_String (".");
end if;
Output_Name (Name_Of (Node, In_Tree));
when N_External_Value =>
pragma Debug (Indicate_Tested (N_External_Value));
Write_String ("external (");
Print (External_Reference_Of (Node, In_Tree), Indent);
if External_Default_Of (Node, In_Tree) /= Empty_Node then
Write_String (", ");
Print (External_Default_Of (Node, In_Tree), Indent);
end if;
Write_String (")");
when N_Attribute_Reference =>
pragma Debug (Indicate_Tested (N_Attribute_Reference));
if Project_Node_Of (Node, In_Tree) /= Empty_Node
and then Project_Node_Of (Node, In_Tree) /= Project
then
Output_Name
(Name_Of (Project_Node_Of (Node, In_Tree), In_Tree));
if Package_Node_Of (Node, In_Tree) /= Empty_Node then
Write_String (".");
Output_Name
(Name_Of (Package_Node_Of (Node, In_Tree), In_Tree));
end if;
elsif Package_Node_Of (Node, In_Tree) /= Empty_Node then
Output_Name
(Name_Of (Package_Node_Of (Node, In_Tree), In_Tree));
else
Write_String ("project");
end if;
Write_String ("'");
Output_Attribute_Name (Name_Of (Node, In_Tree));
declare
Index : constant Name_Id :=
Associative_Array_Index_Of (Node, In_Tree);
begin
if Index /= No_Name then
Write_String (" (");
Output_String (Index);
Write_String (")");
end if;
end;
when N_Case_Construction =>
pragma Debug (Indicate_Tested (N_Case_Construction));
declare
Case_Item : Project_Node_Id;
Is_Non_Empty : Boolean := False;
begin
Case_Item := First_Case_Item_Of (Node, In_Tree);
while Case_Item /= Empty_Node loop
if First_Declarative_Item_Of (Case_Item, In_Tree) /=
Empty_Node
or else not Eliminate_Empty_Case_Constructions
then
Is_Non_Empty := True;
exit;
end if;
Case_Item := Next_Case_Item (Case_Item, In_Tree);
end loop;
if Is_Non_Empty then
Write_Empty_Line;
Print (First_Comment_Before (Node, In_Tree), Indent);
Start_Line (Indent);
Write_String ("case ");
Print
(Case_Variable_Reference_Of (Node, In_Tree),
Indent);
Write_String (" is");
Write_End_Of_Line_Comment (Node);
Print
(First_Comment_After (Node, In_Tree),
Indent + Increment);
declare
Case_Item : Project_Node_Id :=
First_Case_Item_Of (Node, In_Tree);
begin
while Case_Item /= Empty_Node loop
pragma Assert
(Kind_Of (Case_Item, In_Tree) = N_Case_Item);
Print (Case_Item, Indent + Increment);
Case_Item :=
Next_Case_Item (Case_Item, In_Tree);
end loop;
end;
Print (First_Comment_Before_End (Node, In_Tree),
Indent + Increment);
Start_Line (Indent);
Write_Line ("end case;");
Print
(First_Comment_After_End (Node, In_Tree), Indent);
end if;
end;
when N_Case_Item =>
pragma Debug (Indicate_Tested (N_Case_Item));
if First_Declarative_Item_Of (Node, In_Tree) /= Empty_Node
or else not Eliminate_Empty_Case_Constructions
then
Write_Empty_Line;
Print (First_Comment_Before (Node, In_Tree), Indent);
Start_Line (Indent);
Write_String ("when ");
if First_Choice_Of (Node, In_Tree) = Empty_Node then
Write_String ("others");
else
declare
Label : Project_Node_Id :=
First_Choice_Of (Node, In_Tree);
begin
while Label /= Empty_Node loop
Print (Label, Indent);
Label := Next_Literal_String (Label, In_Tree);
if Label /= Empty_Node then
Write_String (" | ");
end if;
end loop;
end;
end if;
Write_String (" =>");
Write_End_Of_Line_Comment (Node);
Print
(First_Comment_After (Node, In_Tree),
Indent + Increment);
declare
First : constant Project_Node_Id :=
First_Declarative_Item_Of (Node, In_Tree);
begin
if First = Empty_Node then
Write_Empty_Line;
else
Print (First, Indent + Increment);
end if;
end;
end if;
when N_Comment_Zones =>
-- Nothing to do, because it will not be processed directly
null;
when N_Comment =>
pragma Debug (Indicate_Tested (N_Comment));
if Follows_Empty_Line (Node, In_Tree) then
Write_Empty_Line;
end if;
Start_Line (Indent);
Write_String ("--");
Write_String
(Get_Name_String (String_Value_Of (Node, In_Tree)),
Truncated => True);
Write_Line ("");
if Is_Followed_By_Empty_Line (Node, In_Tree) then
Write_Empty_Line;
end if;
Print (Next_Comment (Node, In_Tree), Indent);
end case;
end if;
end Print;
-- Start of processing for Pretty_Print
begin
if W_Char = null then
Write_Char := Output.Write_Char'Access;
else
Write_Char := W_Char;
end if;
if W_Eol = null then
Write_Eol := Output.Write_Eol'Access;
else
Write_Eol := W_Eol;
end if;
if W_Str = null then
Write_Str := Output.Write_Str'Access;
else
Write_Str := W_Str;
end if;
Print (Project, 0);
if W_Char = null or else W_Str = null then
Output.Write_Eol;
end if;
end Pretty_Print;
-----------------------
-- Output_Statistics --
-----------------------
procedure Output_Statistics is
begin
Output.Write_Line ("Project_Node_Kinds not tested:");
for Kind in Project_Node_Kind loop
if Kind /= N_Comment_Zones and then Not_Tested (Kind) then
Output.Write_Str (" ");
Output.Write_Line (Project_Node_Kind'Image (Kind));
end if;
end loop;
Output.Write_Eol;
end Output_Statistics;
end Prj.PP;
|
-----------------------------------------------------------------------
-- servlet-responses.web -- Servlet Responses with AWS server
-- Copyright (C) 2009, 2010, 2011 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- 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.Streams;
with AWS.Response;
with Util.Streams;
with Util.Streams.Texts;
package Servlet.Responses.Web is
type Response is new Servlet.Responses.Response and Util.Streams.Output_Stream with private;
-- Write the buffer array to the output stream.
procedure Write (Stream : in out Response;
Buffer : in Ada.Streams.Stream_Element_Array);
-- Flush the buffer (if any) to the sink.
procedure Flush (Stream : in out Response);
-- Iterate over the response headers and executes the <b>Process</b> procedure.
procedure Iterate_Headers (Resp : in Response;
Process : not null access
procedure (Name : in String;
Value : in String));
-- Returns a boolean indicating whether the named response header has already
-- been set.
function Contains_Header (Resp : in Response;
Name : in String) return Boolean;
-- Sets a response header with the given name and value. If the header had already
-- been set, the new value overwrites the previous one. The containsHeader
-- method can be used to test for the presence of a header before setting its value.
procedure Set_Header (Resp : in out Response;
Name : in String;
Value : in String);
-- Adds a response header with the given name and value.
-- This method allows response headers to have multiple values.
procedure Add_Header (Resp : in out Response;
Name : in String;
Value : in String);
-- Sends a temporary redirect response to the client using the specified redirect
-- location URL. This method can accept relative URLs; the servlet container must
-- convert the relative URL to an absolute URL before sending the response to the
-- client. If the location is relative without a leading '/' the container
-- interprets it as relative to the current request URI. If the location is relative
-- with a leading '/' the container interprets it as relative to the servlet
-- container root.
--
-- If the response has already been committed, this method throws an
-- IllegalStateException. After using this method, the response should be
-- considered to be committed and should not be written to.
procedure Send_Redirect (Resp : in out Response;
Location : in String);
-- Prepare the response data by collecting the status, content type and message body.
procedure Build (Resp : in out Response);
-- Get the response data
function Get_Data (Resp : in Response) return AWS.Response.Data;
private
overriding
procedure Initialize (Resp : in out Response);
type Response is new Servlet.Responses.Response and Util.Streams.Output_Stream with record
Data : AWS.Response.Data;
Content : aliased Util.Streams.Texts.Print_Stream;
Redirect : Boolean := False;
end record;
end Servlet.Responses.Web;
|
-- This spec has been automatically generated from STM32L5x2.svd
pragma Restrictions (No_Elaboration_Code);
pragma Ada_2012;
pragma Style_Checks (Off);
with HAL;
with System;
package STM32_SVD.SPI is
pragma Preelaborate;
---------------
-- Registers --
---------------
subtype CR1_BR_Field is HAL.UInt3;
-- control register 1
type CR1_Register is record
-- Clock phase
CPHA : Boolean := False;
-- Clock polarity
CPOL : Boolean := False;
-- Master selection
MSTR : Boolean := False;
-- Baud rate control
BR : CR1_BR_Field := 16#0#;
-- SPI enable
SPE : Boolean := False;
-- Frame format
LSBFIRST : Boolean := False;
-- Internal slave select
SSI : Boolean := False;
-- Software slave management
SSM : Boolean := False;
-- Receive only
RXONLY : Boolean := False;
-- Data frame format
DFF : Boolean := False;
-- CRC transfer next
CRCNEXT : Boolean := False;
-- Hardware CRC calculation enable
CRCEN : Boolean := False;
-- Output enable in bidirectional mode
BIDIOE : Boolean := False;
-- Bidirectional data mode enable
BIDIMODE : Boolean := False;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CR1_Register use record
CPHA at 0 range 0 .. 0;
CPOL at 0 range 1 .. 1;
MSTR at 0 range 2 .. 2;
BR at 0 range 3 .. 5;
SPE at 0 range 6 .. 6;
LSBFIRST at 0 range 7 .. 7;
SSI at 0 range 8 .. 8;
SSM at 0 range 9 .. 9;
RXONLY at 0 range 10 .. 10;
DFF at 0 range 11 .. 11;
CRCNEXT at 0 range 12 .. 12;
CRCEN at 0 range 13 .. 13;
BIDIOE at 0 range 14 .. 14;
BIDIMODE at 0 range 15 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype CR2_DS_Field is HAL.UInt4;
-- control register 2
type CR2_Register is record
-- Rx buffer DMA enable
RXDMAEN : Boolean := False;
-- Tx buffer DMA enable
TXDMAEN : Boolean := False;
-- SS output enable
SSOE : Boolean := False;
-- NSS pulse management
NSSP : Boolean := False;
-- Frame format
FRF : Boolean := False;
-- Error interrupt enable
ERRIE : Boolean := False;
-- RX buffer not empty interrupt enable
RXNEIE : Boolean := False;
-- Tx buffer empty interrupt enable
TXEIE : Boolean := False;
-- Data size
DS : CR2_DS_Field := 16#0#;
-- FIFO reception threshold
FRXTH : Boolean := False;
-- Last DMA transfer for reception
LDMA_RX : Boolean := False;
-- Last DMA transfer for transmission
LDMA_TX : Boolean := False;
-- unspecified
Reserved_15_31 : HAL.UInt17 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CR2_Register use record
RXDMAEN at 0 range 0 .. 0;
TXDMAEN at 0 range 1 .. 1;
SSOE at 0 range 2 .. 2;
NSSP at 0 range 3 .. 3;
FRF at 0 range 4 .. 4;
ERRIE at 0 range 5 .. 5;
RXNEIE at 0 range 6 .. 6;
TXEIE at 0 range 7 .. 7;
DS at 0 range 8 .. 11;
FRXTH at 0 range 12 .. 12;
LDMA_RX at 0 range 13 .. 13;
LDMA_TX at 0 range 14 .. 14;
Reserved_15_31 at 0 range 15 .. 31;
end record;
subtype SR_FRLVL_Field is HAL.UInt2;
subtype SR_FTLVL_Field is HAL.UInt2;
-- status register
type SR_Register is record
-- Read-only. Receive buffer not empty
RXNE : Boolean := False;
-- Read-only. Transmit buffer empty
TXE : Boolean := True;
-- unspecified
Reserved_2_3 : HAL.UInt2 := 16#0#;
-- CRC error flag
CRCERR : Boolean := False;
-- Read-only. Mode fault
MODF : Boolean := False;
-- Read-only. Overrun flag
OVR : Boolean := False;
-- Read-only. Busy flag
BSY : Boolean := False;
-- Read-only. TI frame format error
TIFRFE : Boolean := False;
-- Read-only. FIFO reception level
FRLVL : SR_FRLVL_Field := 16#0#;
-- Read-only. FIFO transmission level
FTLVL : SR_FTLVL_Field := 16#0#;
-- unspecified
Reserved_13_31 : HAL.UInt19 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for SR_Register use record
RXNE at 0 range 0 .. 0;
TXE at 0 range 1 .. 1;
Reserved_2_3 at 0 range 2 .. 3;
CRCERR at 0 range 4 .. 4;
MODF at 0 range 5 .. 5;
OVR at 0 range 6 .. 6;
BSY at 0 range 7 .. 7;
TIFRFE at 0 range 8 .. 8;
FRLVL at 0 range 9 .. 10;
FTLVL at 0 range 11 .. 12;
Reserved_13_31 at 0 range 13 .. 31;
end record;
subtype DR_DR_Field is HAL.UInt16;
-- data register
type DR_Register is record
-- Data register
DR : DR_DR_Field := 16#0#;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for DR_Register use record
DR at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype CRCPR_CRCPOLY_Field is HAL.UInt16;
-- CRC polynomial register
type CRCPR_Register is record
-- CRC polynomial register
CRCPOLY : CRCPR_CRCPOLY_Field := 16#7#;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CRCPR_Register use record
CRCPOLY at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype RXCRCR_RxCRC_Field is HAL.UInt16;
-- RX CRC register
type RXCRCR_Register is record
-- Read-only. Rx CRC register
RxCRC : RXCRCR_RxCRC_Field;
-- unspecified
Reserved_16_31 : HAL.UInt16;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for RXCRCR_Register use record
RxCRC at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype TXCRCR_TxCRC_Field is HAL.UInt16;
-- TX CRC register
type TXCRCR_Register is record
-- Read-only. Tx CRC register
TxCRC : TXCRCR_TxCRC_Field;
-- unspecified
Reserved_16_31 : HAL.UInt16;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for TXCRCR_Register use record
TxCRC at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
-----------------
-- Peripherals --
-----------------
-- Serial peripheral interface
type SPI_Peripheral is record
-- control register 1
CR1 : aliased CR1_Register;
-- control register 2
CR2 : aliased CR2_Register;
-- status register
SR : aliased SR_Register;
-- data register
DR : aliased DR_Register;
-- CRC polynomial register
CRCPR : aliased CRCPR_Register;
-- RX CRC register
RXCRCR : aliased RXCRCR_Register;
-- TX CRC register
TXCRCR : aliased TXCRCR_Register;
end record
with Volatile;
for SPI_Peripheral use record
CR1 at 16#0# range 0 .. 31;
CR2 at 16#4# range 0 .. 31;
SR at 16#8# range 0 .. 31;
DR at 16#C# range 0 .. 31;
CRCPR at 16#10# range 0 .. 31;
RXCRCR at 16#14# range 0 .. 31;
TXCRCR at 16#18# range 0 .. 31;
end record;
-- Serial peripheral interface
SEC_SPI1_Periph : aliased SPI_Peripheral
with Import, Address => System'To_Address (16#50013000#);
-- Serial peripheral interface
SEC_SPI2_Periph : aliased SPI_Peripheral
with Import, Address => System'To_Address (16#50003800#);
-- Serial peripheral interface
SEC_SPI3_Periph : aliased SPI_Peripheral
with Import, Address => System'To_Address (16#50003C00#);
-- Serial peripheral interface
SPI1_Periph : aliased SPI_Peripheral
with Import, Address => System'To_Address (16#40013000#);
-- Serial peripheral interface
SPI2_Periph : aliased SPI_Peripheral
with Import, Address => System'To_Address (16#40003800#);
-- Serial peripheral interface
SPI3_Periph : aliased SPI_Peripheral
with Import, Address => System'To_Address (16#40003C00#);
end STM32_SVD.SPI;
|
with
Interfaces.C,
System;
use type
System.Address;
package body FLTK.Widgets.Buttons.Toggle is
procedure toggle_button_set_draw_hook
(W, D : in System.Address);
pragma Import (C, toggle_button_set_draw_hook, "toggle_button_set_draw_hook");
pragma Inline (toggle_button_set_draw_hook);
procedure toggle_button_set_handle_hook
(W, H : in System.Address);
pragma Import (C, toggle_button_set_handle_hook, "toggle_button_set_handle_hook");
pragma Inline (toggle_button_set_handle_hook);
function new_fl_toggle_button
(X, Y, W, H : in Interfaces.C.int;
Text : in Interfaces.C.char_array)
return System.Address;
pragma Import (C, new_fl_toggle_button, "new_fl_toggle_button");
pragma Inline (new_fl_toggle_button);
procedure free_fl_toggle_button
(B : in System.Address);
pragma Import (C, free_fl_toggle_button, "free_fl_toggle_button");
pragma Inline (free_fl_toggle_button);
procedure fl_toggle_button_draw
(W : in System.Address);
pragma Import (C, fl_toggle_button_draw, "fl_toggle_button_draw");
pragma Inline (fl_toggle_button_draw);
function fl_toggle_button_handle
(W : in System.Address;
E : in Interfaces.C.int)
return Interfaces.C.int;
pragma Import (C, fl_toggle_button_handle, "fl_toggle_button_handle");
pragma Inline (fl_toggle_button_handle);
procedure Finalize
(This : in out Toggle_Button) is
begin
if This.Void_Ptr /= System.Null_Address and then
This in Toggle_Button'Class
then
free_fl_toggle_button (This.Void_Ptr);
This.Void_Ptr := System.Null_Address;
end if;
Finalize (Button (This));
end Finalize;
package body Forge is
function Create
(X, Y, W, H : in Integer;
Text : in String)
return Toggle_Button is
begin
return This : Toggle_Button do
This.Void_Ptr := new_fl_toggle_button
(Interfaces.C.int (X),
Interfaces.C.int (Y),
Interfaces.C.int (W),
Interfaces.C.int (H),
Interfaces.C.To_C (Text));
fl_widget_set_user_data
(This.Void_Ptr,
Widget_Convert.To_Address (This'Unchecked_Access));
toggle_button_set_draw_hook (This.Void_Ptr, Draw_Hook'Address);
toggle_button_set_handle_hook (This.Void_Ptr, Handle_Hook'Address);
end return;
end Create;
end Forge;
procedure Draw
(This : in out Toggle_Button) is
begin
fl_toggle_button_draw (This.Void_Ptr);
end Draw;
function Handle
(This : in out Toggle_Button;
Event : in Event_Kind)
return Event_Outcome is
begin
return Event_Outcome'Val
(fl_toggle_button_handle (This.Void_Ptr, Event_Kind'Pos (Event)));
end Handle;
end FLTK.Widgets.Buttons.Toggle;
|
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2010-2012, Vadim Godunko <vgodunko@gmail.com> --
-- 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.Links;
package AMF.Internals.Links is
function Create_Link
(Association : CMOF_Element;
First_Element : AMF_Element;
Second_Element : AMF_Element) return AMF_Link;
procedure Create_Link
(Association : CMOF_Element;
First_Element : AMF_Element;
Second_Element : AMF_Element);
-- Creates link between two elements.
procedure Create_Link
(Association : CMOF_Element;
First_Element : AMF_Element;
Second_Element : AMF_Element;
Link : AMF_Link);
-- Creates link and add it into set of links to which specified link
-- belongs.
function Proxy (Self : AMF_Link) return not null AMF.Links.Link_Access;
function Opposite_Element
(Self : AMF_Link;
Element : AMF_Element) return AMF_Element;
-- Returns opposite element of the link or Null_Element when Link is
-- No_Link.
procedure Internal_Create_Link
(Association : CMOF_Element;
First_Element : AMF_Element;
First_Property : CMOF_Element;
Second_Element : AMF_Element;
Second_Property : CMOF_Element);
-- Creates link between two elements. It uses only Property::upper
-- attribute and intended to be used to construct initial CMOF
-- metametamodel only.
end AMF.Internals.Links;
|
------------------------------------------------------------------------------
-- --
-- GNAT LIBRARY COMPONENTS --
-- --
-- G N A T . S E C U R E _ H A S H E S . S H A 2 _ 6 4 --
-- --
-- B o d y --
-- --
-- Copyright (C) 2009-2019, 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. --
-- --
------------------------------------------------------------------------------
package body GNAT.Secure_Hashes.SHA2_64 is
use Interfaces;
------------
-- Sigma0 --
------------
function Sigma0 (X : Word) return Word is
begin
return Rotate_Right (X, 28)
xor Rotate_Right (X, 34)
xor Rotate_Right (X, 39);
end Sigma0;
------------
-- Sigma1 --
------------
function Sigma1 (X : Word) return Word is
begin
return Rotate_Right (X, 14)
xor Rotate_Right (X, 18)
xor Rotate_Right (X, 41);
end Sigma1;
--------
-- S0 --
--------
function S0 (X : Word) return Word is
begin
return Rotate_Right (X, 1)
xor Rotate_Right (X, 8)
xor Shift_Right (X, 7);
end S0;
--------
-- S1 --
--------
function S1 (X : Word) return Word is
begin
return Rotate_Right (X, 19)
xor Rotate_Right (X, 61)
xor Shift_Right (X, 6);
end S1;
end GNAT.Secure_Hashes.SHA2_64;
|
------------------------------------------------------------------------------
-- --
-- Ada User Repository Annex (AURA) --
-- ANNEXI-STRAYLINE Reference Implementation --
-- --
-- Command Line Interface --
-- --
-- ------------------------------------------------------------------------ --
-- --
-- Copyright (C) 2020, ANNEXI-STRAYLINE Trans-Human Ltd. --
-- All rights reserved. --
-- --
-- Original Contributors: --
-- * Richard Wai (ANNEXI-STRAYLINE) --
-- --
-- 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 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 --
-- OWNER 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 package contains the types and operations related to the configuration
-- of an AURA subsystem
with Progress;
with Unit_Names;
with Registrar.Subsystems;
package Configuration is
------------------------
-- Configuration_Pass --
------------------------
procedure Configuration_Pass;
procedure Process_Root_Configuration;
Configuration_Progress: aliased Progress.Progress_Tracker;
-- For all Subsystems in the Regsitry of State Aquired, Configuration_Pass
-- attempts to promote the Subsystem to Available, if possible.
--
-- ** Any Subsystems checked-out from "System" repositories are promoted to
-- "Available" during Checkout, and will not be configured. These
-- subsystems were configured at build-time for the repository.
--
-- The Configuration_Pass process for each Subsystem is as follows:
--
-- 1. If a Registry entry for the expected configuration file (AURA.XYZ)
-- exists, its hash is compared with the hash of the same configuration
-- from Last_Run (if Last_Run exists). If the hash differs, the process
-- progresses immediately to Step 3.
--
-- If there is no configuration unit but a manifest exists, the process
-- progresses immediately to Step 2.
--
-- If the hash does not differ, the pre-loaded configuration information
-- is copied from Last_Run, and the process progresses immediately to
-- Step 4
--
-- If there is no configuration unit and no manifest, an empty
-- configuration unit is generated, and configuration is deemed complete.
--
-- -- Root Configuration special case -----------------------------------
-- The AURA subsystem is handled as a special case, particularily there
-- may be a configuration file with the unit name "aura.root" The root
-- configuration unit never has a manifest.
-- ----------------------------------------------------------------------
--
-- If Process_Root_Configuration is invoked, the AURA subsystem is
-- entered for configuration.
--
-- If the root configuration package exists, and the hash differs, then
-- Step 3 is invoked for it, otherwise Step 4 is invoked.
--
-- The Root Configuration package shall not have a Codepaths package.
--
-- 2. Step 2 installs the default configuration unit from the manifest.
--
-- Step 2 is always followed by Step 3
--
-- 3. Step 3 attempts to build, run, and extract the relevent values from
-- the configuration unit.
--
-- a) The configuration unit is scanned for relevent configuration
-- parameters. If no relevent parameters are found, configuration is
-- deemed complete.
--
-- Currently, relevent configuration parameters must always and only
-- be constant String objects. If this is violated, the process is
-- aborted.
--
-- b) The relevant configuration parameters are then used to auto-
-- generate a temporary program to extract the value of those
-- parameters. If the program fails to compile, the process is
-- aborted. If the program completes abnormally, the process is
-- aborted.
--
-- If the program completes successfully, the configuration values
-- have been loaded, Configuration is complete, and the Subsystem is
-- updated in the registry
--
-- 4. The subsystem's configuration data has been loaded. If there are any
-- codepaths configured, those subdirectories are entered with the
-- registrar. Configuration is deemed complete, and the Subsystem becomes
-- "Available"
--
-- Callers to Configuration_Pass should wait for
-- Registrar.Registration.Entry_Progress after Configuration_Progress,
-- except for Process_Root_Configuration
-- Utility functions
function Config_Unit_Name (Target: Registrar.Subsystems.Subsystem)
return Unit_Names.Unit_Name;
-- Returns the unit name of the configuration unit for a given subsystem
function Manifest_Unit_Name (Target: Registrar.Subsystems.Subsystem)
return Unit_Names.Unit_Name;
-- Returns the unit name of the manifest unit for a given subsystem
end Configuration;
|
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2012, Vadim Godunko <vgodunko@gmail.com> --
-- 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.
------------------------------------------------------------------------------
package AMF.Internals.Tables.Utp_Metamodel.Objects is
procedure Initialize;
private
procedure Initialize_1 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_2 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_3 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_4 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_5 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_6 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_7 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_8 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_9 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_10 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_11 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_12 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_13 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_14 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_15 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_16 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_17 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_18 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_19 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_20 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_21 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_22 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_23 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_24 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_25 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_26 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_27 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_28 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_29 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_30 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_31 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_32 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_33 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_34 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_35 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_36 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_37 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_38 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_39 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_40 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_41 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_42 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_43 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_44 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_45 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_46 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_47 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_48 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_49 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_50 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_51 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_52 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_53 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_54 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_55 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_56 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_57 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_58 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_59 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_60 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_61 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_62 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_63 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_64 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_65 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_66 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_67 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_68 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_69 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_70 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_71 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_72 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_73 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_74 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_75 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_76 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_77 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_78 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_79 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_80 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_81 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_82 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_83 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_84 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_85 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_86 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_87 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_88 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_89 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_90 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_91 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_92 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_93 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_94 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_95 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_96 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_97 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_98 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_99 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_100 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_101 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_102 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_103 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_104 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_105 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_106 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_107 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_108 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_109 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_110 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_111 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_112 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_113 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_114 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_115 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_116 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_117 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_118 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_119 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_120 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_121 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_122 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_123 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_124 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_125 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_126 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_127 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_128 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_129 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_130 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_131 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_132 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_133 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_134 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_135 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_136 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_137 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_138 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_139 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_140 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_141 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_142 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_143 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_144 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_145 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_146 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_147 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_148 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_149 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_150 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_151 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_152 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_153 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_154 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_155 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_156 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_157 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_158 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_159 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_160 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_161 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_162 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_163 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_164 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_165 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_166 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_167 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_168 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_169 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_170 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_171 (Extent : AMF.Internals.AMF_Extent);
procedure Initialize_172 (Extent : AMF.Internals.AMF_Extent);
end AMF.Internals.Tables.Utp_Metamodel.Objects;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUNTIME COMPONENTS --
-- --
-- S Y S T E M . W I D _ W C H A R --
-- --
-- B o d y --
-- --
-- $Revision$
-- --
-- Copyright (C) 1992-1998 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, 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. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with System.WCh_Con; use System.WCh_Con;
package body System.Wid_WChar is
--------------------------
-- Width_Wide_Character --
--------------------------
function Width_Wide_Character
(Lo, Hi : Wide_Character;
EM : WC_Encoding_Method)
return Natural
is
W : Natural;
P : Natural;
begin
W := 0;
for C in Lo .. Hi loop
P := Wide_Character'Pos (C);
-- Here if we find a character in wide character range
if P > 16#FF# then
case EM is
when WCEM_Hex =>
return Natural'Max (W, 5);
when WCEM_Upper =>
return Natural'Max (W, 2);
when WCEM_Shift_JIS =>
return Natural'Max (W, 2);
when WCEM_EUC =>
return Natural'Max (W, 2);
when WCEM_UTF8 =>
if Hi > Wide_Character'Val (16#07FF#) then
return Natural'Max (W, 3);
else
return Natural'Max (W, 2);
end if;
when WCEM_Brackets =>
return Natural'Max (W, 8);
end case;
-- If we are in character range then use length of character image
else
declare
S : constant String := Character'Image (Character'Val (P));
begin
W := Natural'Max (W, S'Length);
end;
end if;
end loop;
return W;
end Width_Wide_Character;
end System.Wid_WChar;
|
-- OEML _ REST API
-- This section will provide necessary information about the `CoinAPI OEML REST API` protocol. <br/> This API is also available in the Postman application: <a href=\"https://postman.coinapi.io/\" target=\"_blank\">https://postman.coinapi.io/</a> <br/><br/> Implemented Standards: * [HTTP1.0](https://datatracker.ietf.org/doc/html/rfc1945) * [HTTP1.1](https://datatracker.ietf.org/doc/html/rfc2616) * [HTTP2.0](https://datatracker.ietf.org/doc/html/rfc7540)
--
-- The version of the OpenAPI document: v1
-- Contact: support@coinapi.io
--
-- NOTE: This package is auto generated by OpenAPI-Generator 5.3.0.
-- https://openapi-generator.tech
-- Do not edit the class manually.
package body .Models is
pragma Style_Checks ("-mr");
pragma Warnings (Off, "*use clause for package*");
use Swagger.Streams;
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in RejectReason_Type) is
begin
Into.Start_Entity (Name);
Into.End_Entity (Name);
end Serialize;
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in RejectReason_Type_Vectors.Vector) is
begin
Into.Start_Array (Name);
for Item of Value loop
Serialize (Into, "", Item);
end loop;
Into.End_Array (Name);
end Serialize;
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out RejectReason_Type) is
Object : Swagger.Value_Type;
begin
Swagger.Streams.Deserialize (From, Name, Object);
end Deserialize;
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out RejectReason_Type_Vectors.Vector) is
List : Swagger.Value_Array_Type;
Item : RejectReason_Type;
begin
Value.Clear;
Swagger.Streams.Deserialize (From, Name, List);
for Data of List loop
Deserialize (Data, "", Item);
Value.Append (Item);
end loop;
end Deserialize;
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in MessageReject_Type) is
begin
Into.Start_Entity (Name);
Into.Write_Entity ("type", Value.P_Type);
Serialize (Into, "reject_reason", Value.Reject_Reason);
Into.Write_Entity ("exchange_id", Value.Exchange_Id);
Into.Write_Entity ("message", Value.Message);
Into.Write_Entity ("rejected_message", Value.Rejected_Message);
Into.End_Entity (Name);
end Serialize;
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in MessageReject_Type_Vectors.Vector) is
begin
Into.Start_Array (Name);
for Item of Value loop
Serialize (Into, "", Item);
end loop;
Into.End_Array (Name);
end Serialize;
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out MessageReject_Type) is
Object : Swagger.Value_Type;
begin
Swagger.Streams.Deserialize (From, Name, Object);
Swagger.Streams.Deserialize (Object, "type", Value.P_Type);
Deserialize (Object, "reject_reason", Value.Reject_Reason);
Swagger.Streams.Deserialize (Object, "exchange_id", Value.Exchange_Id);
Swagger.Streams.Deserialize (Object, "message", Value.Message);
Swagger.Streams.Deserialize (Object, "rejected_message", Value.Rejected_Message);
end Deserialize;
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out MessageReject_Type_Vectors.Vector) is
List : Swagger.Value_Array_Type;
Item : MessageReject_Type;
begin
Value.Clear;
Swagger.Streams.Deserialize (From, Name, List);
for Data of List loop
Deserialize (Data, "", Item);
Value.Append (Item);
end loop;
end Deserialize;
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in ValidationError_Type) is
begin
Into.Start_Entity (Name);
Into.Write_Entity ("type", Value.P_Type);
Into.Write_Entity ("title", Value.Title);
Serialize (Into, "status", Value.Status);
Into.Write_Entity ("traceId", Value.Trace_Id);
Into.Write_Entity ("errors", Value.Errors);
Into.End_Entity (Name);
end Serialize;
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in ValidationError_Type_Vectors.Vector) is
begin
Into.Start_Array (Name);
for Item of Value loop
Serialize (Into, "", Item);
end loop;
Into.End_Array (Name);
end Serialize;
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out ValidationError_Type) is
Object : Swagger.Value_Type;
begin
Swagger.Streams.Deserialize (From, Name, Object);
Swagger.Streams.Deserialize (Object, "type", Value.P_Type);
Swagger.Streams.Deserialize (Object, "title", Value.Title);
Swagger.Streams.Deserialize (Object, "status", Value.Status);
Swagger.Streams.Deserialize (Object, "traceId", Value.Trace_Id);
Swagger.Streams.Deserialize (Object, "errors", Value.Errors);
end Deserialize;
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out ValidationError_Type_Vectors.Vector) is
List : Swagger.Value_Array_Type;
Item : ValidationError_Type;
begin
Value.Clear;
Swagger.Streams.Deserialize (From, Name, List);
for Data of List loop
Deserialize (Data, "", Item);
Value.Append (Item);
end loop;
end Deserialize;
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in OrdType_Type) is
begin
Into.Start_Entity (Name);
Into.End_Entity (Name);
end Serialize;
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in OrdType_Type_Vectors.Vector) is
begin
Into.Start_Array (Name);
for Item of Value loop
Serialize (Into, "", Item);
end loop;
Into.End_Array (Name);
end Serialize;
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out OrdType_Type) is
Object : Swagger.Value_Type;
begin
Swagger.Streams.Deserialize (From, Name, Object);
end Deserialize;
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out OrdType_Type_Vectors.Vector) is
List : Swagger.Value_Array_Type;
Item : OrdType_Type;
begin
Value.Clear;
Swagger.Streams.Deserialize (From, Name, List);
for Data of List loop
Deserialize (Data, "", Item);
Value.Append (Item);
end loop;
end Deserialize;
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in OrdStatus_Type) is
begin
Into.Start_Entity (Name);
Into.End_Entity (Name);
end Serialize;
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in OrdStatus_Type_Vectors.Vector) is
begin
Into.Start_Array (Name);
for Item of Value loop
Serialize (Into, "", Item);
end loop;
Into.End_Array (Name);
end Serialize;
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out OrdStatus_Type) is
Object : Swagger.Value_Type;
begin
Swagger.Streams.Deserialize (From, Name, Object);
end Deserialize;
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out OrdStatus_Type_Vectors.Vector) is
List : Swagger.Value_Array_Type;
Item : OrdStatus_Type;
begin
Value.Clear;
Swagger.Streams.Deserialize (From, Name, List);
for Data of List loop
Deserialize (Data, "", Item);
Value.Append (Item);
end loop;
end Deserialize;
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in OrderCancelAllRequest_Type) is
begin
Into.Start_Entity (Name);
Into.Write_Entity ("exchange_id", Value.Exchange_Id);
Into.End_Entity (Name);
end Serialize;
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in OrderCancelAllRequest_Type_Vectors.Vector) is
begin
Into.Start_Array (Name);
for Item of Value loop
Serialize (Into, "", Item);
end loop;
Into.End_Array (Name);
end Serialize;
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out OrderCancelAllRequest_Type) is
Object : Swagger.Value_Type;
begin
Swagger.Streams.Deserialize (From, Name, Object);
Swagger.Streams.Deserialize (Object, "exchange_id", Value.Exchange_Id);
end Deserialize;
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out OrderCancelAllRequest_Type_Vectors.Vector) is
List : Swagger.Value_Array_Type;
Item : OrderCancelAllRequest_Type;
begin
Value.Clear;
Swagger.Streams.Deserialize (From, Name, List);
for Data of List loop
Deserialize (Data, "", Item);
Value.Append (Item);
end loop;
end Deserialize;
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in OrderCancelSingleRequest_Type) is
begin
Into.Start_Entity (Name);
Into.Write_Entity ("exchange_id", Value.Exchange_Id);
Into.Write_Entity ("exchange_order_id", Value.Exchange_Order_Id);
Into.Write_Entity ("client_order_id", Value.Client_Order_Id);
Into.End_Entity (Name);
end Serialize;
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in OrderCancelSingleRequest_Type_Vectors.Vector) is
begin
Into.Start_Array (Name);
for Item of Value loop
Serialize (Into, "", Item);
end loop;
Into.End_Array (Name);
end Serialize;
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out OrderCancelSingleRequest_Type) is
Object : Swagger.Value_Type;
begin
Swagger.Streams.Deserialize (From, Name, Object);
Swagger.Streams.Deserialize (Object, "exchange_id", Value.Exchange_Id);
Swagger.Streams.Deserialize (Object, "exchange_order_id", Value.Exchange_Order_Id);
Swagger.Streams.Deserialize (Object, "client_order_id", Value.Client_Order_Id);
end Deserialize;
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out OrderCancelSingleRequest_Type_Vectors.Vector) is
List : Swagger.Value_Array_Type;
Item : OrderCancelSingleRequest_Type;
begin
Value.Clear;
Swagger.Streams.Deserialize (From, Name, List);
for Data of List loop
Deserialize (Data, "", Item);
Value.Append (Item);
end loop;
end Deserialize;
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in OrdSide_Type) is
begin
Into.Start_Entity (Name);
Into.End_Entity (Name);
end Serialize;
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in OrdSide_Type_Vectors.Vector) is
begin
Into.Start_Array (Name);
for Item of Value loop
Serialize (Into, "", Item);
end loop;
Into.End_Array (Name);
end Serialize;
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out OrdSide_Type) is
Object : Swagger.Value_Type;
begin
Swagger.Streams.Deserialize (From, Name, Object);
end Deserialize;
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out OrdSide_Type_Vectors.Vector) is
List : Swagger.Value_Array_Type;
Item : OrdSide_Type;
begin
Value.Clear;
Swagger.Streams.Deserialize (From, Name, List);
for Data of List loop
Deserialize (Data, "", Item);
Value.Append (Item);
end loop;
end Deserialize;
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in TimeInForce_Type) is
begin
Into.Start_Entity (Name);
Into.End_Entity (Name);
end Serialize;
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in TimeInForce_Type_Vectors.Vector) is
begin
Into.Start_Array (Name);
for Item of Value loop
Serialize (Into, "", Item);
end loop;
Into.End_Array (Name);
end Serialize;
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out TimeInForce_Type) is
Object : Swagger.Value_Type;
begin
Swagger.Streams.Deserialize (From, Name, Object);
end Deserialize;
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out TimeInForce_Type_Vectors.Vector) is
List : Swagger.Value_Array_Type;
Item : TimeInForce_Type;
begin
Value.Clear;
Swagger.Streams.Deserialize (From, Name, List);
for Data of List loop
Deserialize (Data, "", Item);
Value.Append (Item);
end loop;
end Deserialize;
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in OrderNewSingleRequest_Type) is
begin
Into.Start_Entity (Name);
Into.Write_Entity ("exchange_id", Value.Exchange_Id);
Into.Write_Entity ("client_order_id", Value.Client_Order_Id);
Into.Write_Entity ("symbol_id_exchange", Value.Symbol_Id_Exchange);
Into.Write_Entity ("symbol_id_coinapi", Value.Symbol_Id_Coinapi);
Serialize (Into, "amount_order", Value.Amount_Order);
Serialize (Into, "price", Value.Price);
Serialize (Into, "side", Value.Side);
Serialize (Into, "order_type", Value.Order_Type);
Serialize (Into, "time_in_force", Value.Time_In_Force);
Serialize (Into, "expire_time", Value.Expire_Time);
Serialize (Into, "exec_inst", Value.Exec_Inst);
Into.End_Entity (Name);
end Serialize;
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in OrderNewSingleRequest_Type_Vectors.Vector) is
begin
Into.Start_Array (Name);
for Item of Value loop
Serialize (Into, "", Item);
end loop;
Into.End_Array (Name);
end Serialize;
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out OrderNewSingleRequest_Type) is
Object : Swagger.Value_Type;
begin
Swagger.Streams.Deserialize (From, Name, Object);
Swagger.Streams.Deserialize (Object, "exchange_id", Value.Exchange_Id);
Swagger.Streams.Deserialize (Object, "client_order_id", Value.Client_Order_Id);
Swagger.Streams.Deserialize (Object, "symbol_id_exchange", Value.Symbol_Id_Exchange);
Swagger.Streams.Deserialize (Object, "symbol_id_coinapi", Value.Symbol_Id_Coinapi);
Swagger.Streams.Deserialize (Object, "amount_order", Value.Amount_Order);
Swagger.Streams.Deserialize (Object, "price", Value.Price);
Deserialize (Object, "side", Value.Side);
Deserialize (Object, "order_type", Value.Order_Type);
Deserialize (Object, "time_in_force", Value.Time_In_Force);
Swagger.Streams.Deserialize (Object, "expire_time", Value.Expire_Time);
Swagger.Streams.Deserialize (Object, "exec_inst", Value.Exec_Inst);
end Deserialize;
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out OrderNewSingleRequest_Type_Vectors.Vector) is
List : Swagger.Value_Array_Type;
Item : OrderNewSingleRequest_Type;
begin
Value.Clear;
Swagger.Streams.Deserialize (From, Name, List);
for Data of List loop
Deserialize (Data, "", Item);
Value.Append (Item);
end loop;
end Deserialize;
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in Fills_Type) is
begin
Into.Start_Entity (Name);
Serialize (Into, "time", Value.Time);
Serialize (Into, "price", Value.Price);
Serialize (Into, "amount", Value.Amount);
Into.End_Entity (Name);
end Serialize;
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in Fills_Type_Vectors.Vector) is
begin
Into.Start_Array (Name);
for Item of Value loop
Serialize (Into, "", Item);
end loop;
Into.End_Array (Name);
end Serialize;
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out Fills_Type) is
Object : Swagger.Value_Type;
begin
Swagger.Streams.Deserialize (From, Name, Object);
Swagger.Streams.Deserialize (Object, "time", Value.Time);
Swagger.Streams.Deserialize (Object, "price", Value.Price);
Swagger.Streams.Deserialize (Object, "amount", Value.Amount);
end Deserialize;
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out Fills_Type_Vectors.Vector) is
List : Swagger.Value_Array_Type;
Item : Fills_Type;
begin
Value.Clear;
Swagger.Streams.Deserialize (From, Name, List);
for Data of List loop
Deserialize (Data, "", Item);
Value.Append (Item);
end loop;
end Deserialize;
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in OrderExecutionReport_Type) is
begin
Into.Start_Entity (Name);
Into.Write_Entity ("exchange_id", Value.Exchange_Id);
Into.Write_Entity ("client_order_id", Value.Client_Order_Id);
Into.Write_Entity ("symbol_id_exchange", Value.Symbol_Id_Exchange);
Into.Write_Entity ("symbol_id_coinapi", Value.Symbol_Id_Coinapi);
Serialize (Into, "amount_order", Value.Amount_Order);
Serialize (Into, "price", Value.Price);
Serialize (Into, "side", Value.Side);
Serialize (Into, "order_type", Value.Order_Type);
Serialize (Into, "time_in_force", Value.Time_In_Force);
Serialize (Into, "expire_time", Value.Expire_Time);
Serialize (Into, "exec_inst", Value.Exec_Inst);
Into.Write_Entity ("client_order_id_format_exchange", Value.Client_Order_Id_Format_Exchange);
Into.Write_Entity ("exchange_order_id", Value.Exchange_Order_Id);
Serialize (Into, "amount_open", Value.Amount_Open);
Serialize (Into, "amount_filled", Value.Amount_Filled);
Serialize (Into, "avg_px", Value.Avg_Px);
Serialize (Into, "status", Value.Status);
Serialize (Into, "status_history", Value.Status_History);
Into.Write_Entity ("error_message", Value.Error_Message);
Serialize (Into, "fills", Value.Fills);
Into.End_Entity (Name);
end Serialize;
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in OrderExecutionReport_Type_Vectors.Vector) is
begin
Into.Start_Array (Name);
for Item of Value loop
Serialize (Into, "", Item);
end loop;
Into.End_Array (Name);
end Serialize;
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out OrderExecutionReport_Type) is
Object : Swagger.Value_Type;
begin
Swagger.Streams.Deserialize (From, Name, Object);
Swagger.Streams.Deserialize (Object, "exchange_id", Value.Exchange_Id);
Swagger.Streams.Deserialize (Object, "client_order_id", Value.Client_Order_Id);
Swagger.Streams.Deserialize (Object, "symbol_id_exchange", Value.Symbol_Id_Exchange);
Swagger.Streams.Deserialize (Object, "symbol_id_coinapi", Value.Symbol_Id_Coinapi);
Swagger.Streams.Deserialize (Object, "amount_order", Value.Amount_Order);
Swagger.Streams.Deserialize (Object, "price", Value.Price);
Deserialize (Object, "side", Value.Side);
Deserialize (Object, "order_type", Value.Order_Type);
Deserialize (Object, "time_in_force", Value.Time_In_Force);
Swagger.Streams.Deserialize (Object, "expire_time", Value.Expire_Time);
Swagger.Streams.Deserialize (Object, "exec_inst", Value.Exec_Inst);
Swagger.Streams.Deserialize (Object, "client_order_id_format_exchange", Value.Client_Order_Id_Format_Exchange);
Swagger.Streams.Deserialize (Object, "exchange_order_id", Value.Exchange_Order_Id);
Swagger.Streams.Deserialize (Object, "amount_open", Value.Amount_Open);
Swagger.Streams.Deserialize (Object, "amount_filled", Value.Amount_Filled);
Swagger.Streams.Deserialize (Object, "avg_px", Value.Avg_Px);
Deserialize (Object, "status", Value.Status);
Swagger.Streams.Deserialize (Object, "status_history", Value.Status_History);
Swagger.Streams.Deserialize (Object, "error_message", Value.Error_Message);
Deserialize (Object, "fills", Value.Fills);
end Deserialize;
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out OrderExecutionReport_Type_Vectors.Vector) is
List : Swagger.Value_Array_Type;
Item : OrderExecutionReport_Type;
begin
Value.Clear;
Swagger.Streams.Deserialize (From, Name, List);
for Data of List loop
Deserialize (Data, "", Item);
Value.Append (Item);
end loop;
end Deserialize;
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in OrderExecutionReportAllOf_Type) is
begin
Into.Start_Entity (Name);
Into.Write_Entity ("client_order_id_format_exchange", Value.Client_Order_Id_Format_Exchange);
Into.Write_Entity ("exchange_order_id", Value.Exchange_Order_Id);
Serialize (Into, "amount_open", Value.Amount_Open);
Serialize (Into, "amount_filled", Value.Amount_Filled);
Serialize (Into, "avg_px", Value.Avg_Px);
Serialize (Into, "status", Value.Status);
Serialize (Into, "status_history", Value.Status_History);
Into.Write_Entity ("error_message", Value.Error_Message);
Serialize (Into, "fills", Value.Fills);
Into.End_Entity (Name);
end Serialize;
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in OrderExecutionReportAllOf_Type_Vectors.Vector) is
begin
Into.Start_Array (Name);
for Item of Value loop
Serialize (Into, "", Item);
end loop;
Into.End_Array (Name);
end Serialize;
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out OrderExecutionReportAllOf_Type) is
Object : Swagger.Value_Type;
begin
Swagger.Streams.Deserialize (From, Name, Object);
Swagger.Streams.Deserialize (Object, "client_order_id_format_exchange", Value.Client_Order_Id_Format_Exchange);
Swagger.Streams.Deserialize (Object, "exchange_order_id", Value.Exchange_Order_Id);
Swagger.Streams.Deserialize (Object, "amount_open", Value.Amount_Open);
Swagger.Streams.Deserialize (Object, "amount_filled", Value.Amount_Filled);
Swagger.Streams.Deserialize (Object, "avg_px", Value.Avg_Px);
Deserialize (Object, "status", Value.Status);
Swagger.Streams.Deserialize (Object, "status_history", Value.Status_History);
Swagger.Streams.Deserialize (Object, "error_message", Value.Error_Message);
Deserialize (Object, "fills", Value.Fills);
end Deserialize;
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out OrderExecutionReportAllOf_Type_Vectors.Vector) is
List : Swagger.Value_Array_Type;
Item : OrderExecutionReportAllOf_Type;
begin
Value.Clear;
Swagger.Streams.Deserialize (From, Name, List);
for Data of List loop
Deserialize (Data, "", Item);
Value.Append (Item);
end loop;
end Deserialize;
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in BalanceData_Type) is
begin
Into.Start_Entity (Name);
Into.Write_Entity ("asset_id_exchange", Value.Asset_Id_Exchange);
Into.Write_Entity ("asset_id_coinapi", Value.Asset_Id_Coinapi);
Serialize (Into, "balance", Value.Balance);
Serialize (Into, "available", Value.Available);
Serialize (Into, "locked", Value.Locked);
Into.Write_Entity ("last_updated_by", Value.Last_Updated_By);
Serialize (Into, "rate_usd", Value.Rate_Usd);
Serialize (Into, "traded", Value.Traded);
Into.End_Entity (Name);
end Serialize;
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in BalanceData_Type_Vectors.Vector) is
begin
Into.Start_Array (Name);
for Item of Value loop
Serialize (Into, "", Item);
end loop;
Into.End_Array (Name);
end Serialize;
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out BalanceData_Type) is
Object : Swagger.Value_Type;
begin
Swagger.Streams.Deserialize (From, Name, Object);
Swagger.Streams.Deserialize (Object, "asset_id_exchange", Value.Asset_Id_Exchange);
Swagger.Streams.Deserialize (Object, "asset_id_coinapi", Value.Asset_Id_Coinapi);
Swagger.Streams.Deserialize (Object, "balance", Value.Balance);
Swagger.Streams.Deserialize (Object, "available", Value.Available);
Swagger.Streams.Deserialize (Object, "locked", Value.Locked);
Swagger.Streams.Deserialize (Object, "last_updated_by", Value.Last_Updated_By);
Swagger.Streams.Deserialize (Object, "rate_usd", Value.Rate_Usd);
Swagger.Streams.Deserialize (Object, "traded", Value.Traded);
end Deserialize;
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out BalanceData_Type_Vectors.Vector) is
List : Swagger.Value_Array_Type;
Item : BalanceData_Type;
begin
Value.Clear;
Swagger.Streams.Deserialize (From, Name, List);
for Data of List loop
Deserialize (Data, "", Item);
Value.Append (Item);
end loop;
end Deserialize;
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in Balance_Type) is
begin
Into.Start_Entity (Name);
Into.Write_Entity ("exchange_id", Value.Exchange_Id);
Serialize (Into, "data", Value.Data);
Into.End_Entity (Name);
end Serialize;
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in Balance_Type_Vectors.Vector) is
begin
Into.Start_Array (Name);
for Item of Value loop
Serialize (Into, "", Item);
end loop;
Into.End_Array (Name);
end Serialize;
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out Balance_Type) is
Object : Swagger.Value_Type;
begin
Swagger.Streams.Deserialize (From, Name, Object);
Swagger.Streams.Deserialize (Object, "exchange_id", Value.Exchange_Id);
Deserialize (Object, "data", Value.Data);
end Deserialize;
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out Balance_Type_Vectors.Vector) is
List : Swagger.Value_Array_Type;
Item : Balance_Type;
begin
Value.Clear;
Swagger.Streams.Deserialize (From, Name, List);
for Data of List loop
Deserialize (Data, "", Item);
Value.Append (Item);
end loop;
end Deserialize;
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in Position_Type) is
begin
Into.Start_Entity (Name);
Into.Write_Entity ("exchange_id", Value.Exchange_Id);
Serialize (Into, "data", Value.Data);
Into.End_Entity (Name);
end Serialize;
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in Position_Type_Vectors.Vector) is
begin
Into.Start_Array (Name);
for Item of Value loop
Serialize (Into, "", Item);
end loop;
Into.End_Array (Name);
end Serialize;
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out Position_Type) is
Object : Swagger.Value_Type;
begin
Swagger.Streams.Deserialize (From, Name, Object);
Swagger.Streams.Deserialize (Object, "exchange_id", Value.Exchange_Id);
Deserialize (Object, "data", Value.Data);
end Deserialize;
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out Position_Type_Vectors.Vector) is
List : Swagger.Value_Array_Type;
Item : Position_Type;
begin
Value.Clear;
Swagger.Streams.Deserialize (From, Name, List);
for Data of List loop
Deserialize (Data, "", Item);
Value.Append (Item);
end loop;
end Deserialize;
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in PositionData_Type) is
begin
Into.Start_Entity (Name);
Into.Write_Entity ("symbol_id_exchange", Value.Symbol_Id_Exchange);
Into.Write_Entity ("symbol_id_coinapi", Value.Symbol_Id_Coinapi);
Serialize (Into, "avg_entry_price", Value.Avg_Entry_Price);
Serialize (Into, "quantity", Value.Quantity);
Serialize (Into, "side", Value.Side);
Serialize (Into, "unrealized_pnl", Value.Unrealized_Pnl);
Serialize (Into, "leverage", Value.Leverage);
Into.Write_Entity ("cross_margin", Value.Cross_Margin);
Serialize (Into, "liquidation_price", Value.Liquidation_Price);
Into.Write_Entity ("raw_data", Value.Raw_Data);
Into.End_Entity (Name);
end Serialize;
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in PositionData_Type_Vectors.Vector) is
begin
Into.Start_Array (Name);
for Item of Value loop
Serialize (Into, "", Item);
end loop;
Into.End_Array (Name);
end Serialize;
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out PositionData_Type) is
Object : Swagger.Value_Type;
begin
Swagger.Streams.Deserialize (From, Name, Object);
Swagger.Streams.Deserialize (Object, "symbol_id_exchange", Value.Symbol_Id_Exchange);
Swagger.Streams.Deserialize (Object, "symbol_id_coinapi", Value.Symbol_Id_Coinapi);
Swagger.Streams.Deserialize (Object, "avg_entry_price", Value.Avg_Entry_Price);
Swagger.Streams.Deserialize (Object, "quantity", Value.Quantity);
Deserialize (Object, "side", Value.Side);
Swagger.Streams.Deserialize (Object, "unrealized_pnl", Value.Unrealized_Pnl);
Swagger.Streams.Deserialize (Object, "leverage", Value.Leverage);
Swagger.Streams.Deserialize (Object, "cross_margin", Value.Cross_Margin);
Swagger.Streams.Deserialize (Object, "liquidation_price", Value.Liquidation_Price);
Deserialize (Object, "raw_data", Value.Raw_Data);
end Deserialize;
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out PositionData_Type_Vectors.Vector) is
List : Swagger.Value_Array_Type;
Item : PositionData_Type;
begin
Value.Clear;
Swagger.Streams.Deserialize (From, Name, List);
for Data of List loop
Deserialize (Data, "", Item);
Value.Append (Item);
end loop;
end Deserialize;
end .Models;
|
------------------------------------------------------------------------------
-- --
-- GNU ADA 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 --
-- --
-- S p e c --
-- --
-- Copyright (C) 1992-2005, 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 package contains all the GNULL primitives that interface directly
-- with the underlying OS.
with System.Parameters;
-- used for Size_Type
with System.Tasking;
-- used for Task_Id
with System.OS_Interface;
-- used for Thread_Id
package System.Task_Primitives.Operations is
pragma Preelaborate;
package ST renames System.Tasking;
package OSI renames System.OS_Interface;
procedure Initialize (Environment_Task : ST.Task_Id);
-- Perform initialization and set up of the environment task for proper
-- operation of the tasking run-time. This must be called once, before any
-- other subprograms of this package are called.
procedure Create_Task
(T : ST.Task_Id;
Wrapper : System.Address;
Stack_Size : System.Parameters.Size_Type;
Priority : System.Any_Priority;
Succeeded : out Boolean);
pragma Inline (Create_Task);
-- Create a new low-level task with ST.Task_Id T and place other needed
-- information in the ATCB.
--
-- A new thread of control is created, with a stack of at least Stack_Size
-- storage units, and the procedure Wrapper is called by this new thread
-- of control. If Stack_Size = Unspecified_Storage_Size, choose a default
-- stack size; this may be effectively "unbounded" on some systems.
--
-- The newly created low-level task is associated with the ST.Task_Id T
-- such that any subsequent call to Self from within the context of the
-- low-level task returns T.
--
-- The caller is responsible for ensuring that the storage of the Ada
-- task control block object pointed to by T persists for the lifetime
-- of the new task.
--
-- Succeeded is set to true unless creation of the task failed,
-- as it may if there are insufficient resources to create another task.
procedure Enter_Task (Self_ID : ST.Task_Id);
pragma Inline (Enter_Task);
-- Initialize data structures specific to the calling task. Self must be
-- the ID of the calling task. It must be called (once) by the task
-- immediately after creation, while abort is still deferred. The effects
-- of other operations defined below are not defined unless the caller has
-- previously called Initialize_Task.
procedure Exit_Task;
pragma Inline (Exit_Task);
-- Destroy the thread of control. Self must be the ID of the calling task.
-- The effects of further calls to operations defined below on the task
-- are undefined thereafter.
function New_ATCB (Entry_Num : ST.Task_Entry_Index) return ST.Task_Id;
pragma Inline (New_ATCB);
-- Allocate a new ATCB with the specified number of entries
procedure Initialize_TCB (Self_ID : ST.Task_Id; Succeeded : out Boolean);
pragma Inline (Initialize_TCB);
-- Initialize all fields of the TCB
procedure Finalize_TCB (T : ST.Task_Id);
pragma Inline (Finalize_TCB);
-- Finalizes Private_Data of ATCB, and then deallocates it. This is also
-- responsible for recovering any storage or other resources that were
-- allocated by Create_Task (the one in this package). This should only be
-- called from Free_Task. After it is called there should be no further
-- reference to the ATCB that corresponds to T.
procedure Abort_Task (T : ST.Task_Id);
pragma Inline (Abort_Task);
-- Abort the task specified by T (the target task). This causes the target
-- task to asynchronously raise Abort_Signal if abort is not deferred, or
-- if it is blocked on an interruptible system call.
--
-- precondition:
-- the calling task is holding T's lock and has abort deferred
--
-- postcondition:
-- the calling task is holding T's lock and has abort deferred.
-- ??? modify GNARL to skip wakeup and always call Abort_Task
function Self return ST.Task_Id;
pragma Inline (Self);
-- Return a pointer to the Ada Task Control Block of the calling task
type Lock_Level is
(PO_Level,
Global_Task_Level,
RTS_Lock_Level,
ATCB_Level);
-- Type used to describe kind of lock for second form of Initialize_Lock
-- call specified below. See locking rules in System.Tasking (spec) for
-- more details.
procedure Initialize_Lock (Prio : System.Any_Priority; L : access Lock);
procedure Initialize_Lock (L : access RTS_Lock; Level : Lock_Level);
pragma Inline (Initialize_Lock);
-- Initialize a lock object.
--
-- For Lock, Prio is the ceiling priority associated with the lock. For
-- RTS_Lock, the ceiling is implicitly Priority'Last.
--
-- If the underlying system does not support priority ceiling
-- locking, the Prio parameter is ignored.
--
-- The effect of either initialize operation is undefined unless is a lock
-- object that has not been initialized, or which has been finalized since
-- it was last initialized.
--
-- The effects of the other operations on lock objects are undefined
-- unless the lock object has been initialized and has not since been
-- finalized.
--
-- Initialization of the per-task lock is implicit in Create_Task.
--
-- These operations raise Storage_Error if a lack of storage is detected.
procedure Finalize_Lock (L : access Lock);
procedure Finalize_Lock (L : access RTS_Lock);
pragma Inline (Finalize_Lock);
-- Finalize a lock object, freeing any resources allocated by the
-- corresponding Initialize_Lock operation.
procedure Write_Lock (L : access Lock; Ceiling_Violation : out Boolean);
procedure Write_Lock (L : access RTS_Lock; Global_Lock : Boolean := False);
procedure Write_Lock (T : ST.Task_Id);
pragma Inline (Write_Lock);
-- Lock a lock object for write access. After this operation returns,
-- the calling task holds write permission for the lock object. No other
-- Write_Lock or Read_Lock operation on the same lock object will return
-- until this task executes an Unlock operation on the same object. The
-- effect is undefined if the calling task already holds read or write
-- permission for the lock object L.
--
-- For the operation on Lock, Ceiling_Violation is set to true iff the
-- operation failed, which will happen if there is a priority ceiling
-- violation.
--
-- For the operation on RTS_Lock, Global_Lock should be set to True
-- if L is a global lock (Single_RTS_Lock, Global_Task_Lock).
--
-- For the operation on ST.Task_Id, the lock is the special lock object
-- associated with that task's ATCB. This lock has effective ceiling
-- priority high enough that it is safe to call by a task with any
-- priority in the range System.Priority. It is implicitly initialized
-- by task creation. The effect is undefined if the calling task already
-- holds T's lock, or has interrupt-level priority. Finalization of the
-- per-task lock is implicit in Exit_Task.
procedure Read_Lock (L : access Lock; Ceiling_Violation : out Boolean);
pragma Inline (Read_Lock);
-- Lock a lock object for read access. After this operation returns,
-- the calling task has non-exclusive read permission for the logical
-- resources that are protected by the lock. No other Write_Lock operation
-- on the same object will return until this task and any other tasks with
-- read permission for this lock have executed Unlock operation(s) on the
-- lock object. A Read_Lock for a lock object may return immediately while
-- there are tasks holding read permission, provided there are no tasks
-- holding write permission for the object. The effect is undefined if
-- the calling task already holds read or write permission for L.
--
-- Alternatively: An implementation may treat Read_Lock identically to
-- Write_Lock. This simplifies the implementation, but reduces the level
-- of concurrency that can be achieved.
--
-- Note that Read_Lock is not defined for RT_Lock and ST.Task_Id.
-- That is because (1) so far Read_Lock has always been implemented
-- the same as Write_Lock, (2) most lock usage inside the RTS involves
-- potential write access, and (3) implementations of priority ceiling
-- locking that make a reader-writer distinction have higher overhead.
procedure Unlock (L : access Lock);
procedure Unlock (L : access RTS_Lock; Global_Lock : Boolean := False);
procedure Unlock (T : ST.Task_Id);
pragma Inline (Unlock);
-- Unlock a locked lock object.
--
-- The effect is undefined unless the calling task holds read or write
-- permission for the lock L, and L is the lock object most recently
-- locked by the calling task for which the calling task still holds
-- read or write permission. (That is, matching pairs of Lock and Unlock
-- operations on each lock object must be properly nested.)
-- For the operation on RTS_Lock, Global_Lock should be set to True if L
-- is a global lock (Single_RTS_Lock, Global_Task_Lock).
--
-- Note that Write_Lock for RTS_Lock does not have an out-parameter.
-- RTS_Locks are used in situations where we have not made provision for
-- recovery from ceiling violations. We do not expect them to occur inside
-- the runtime system, because all RTS locks have ceiling Priority'Last.
-- There is one way there can be a ceiling violation. That is if the
-- runtime system is called from a task that is executing in the
-- Interrupt_Priority range.
-- It is not clear what to do about ceiling violations due to RTS calls
-- done at interrupt priority. In general, it is not acceptable to give
-- all RTS locks interrupt priority, since that whould give terrible
-- performance on systems where this has the effect of masking hardware
-- interrupts, though we could get away with allowing
-- Interrupt_Priority'last where we are layered on an OS that does not
-- allow us to mask interrupts. Ideally, we would like to raise
-- Program_Error back at the original point of the RTS call, but this
-- would require a lot of detailed analysis and recoding, with almost
-- certain performance penalties.
-- For POSIX systems, we considered just skipping setting priority ceiling
-- on RTS locks. This would mean there is no ceiling violation, but we
-- would end up with priority inversions inside the runtime system,
-- resulting in failure to satisfy the Ada priority rules, and possible
-- missed validation tests. This could be compensated-for by explicit
-- priority-change calls to raise the caller to Priority'Last whenever it
-- first enters the runtime system, but the expected overhead seems high,
-- though it might be lower than using locks with ceilings if the
-- underlying implementation of ceiling locks is an inefficient one.
-- This issue should be reconsidered whenever we get around to checking
-- for calls to potentially blocking operations from within protected
-- operations. If we check for such calls and catch them on entry to the
-- OS, it may be that we can eliminate the possibility of ceiling
-- violations inside the RTS. For this to work, we would have to forbid
-- explicitly setting the priority of a task to anything in the
-- Interrupt_Priority range, at least. We would also have to check that
-- there are no RTS-lock operations done inside any operations that are
-- not treated as potentially blocking.
-- The latter approach seems to be the best, i.e. to check on entry to RTS
-- calls that may need to use locks that the priority is not in the
-- interrupt range. If there are RTS operations that NEED to be called
-- from interrupt handlers, those few RTS locks should then be converted
-- to PO-type locks, with ceiling Interrupt_Priority'Last.
-- For now, we will just shut down the system if there is ceiling violation
procedure Yield (Do_Yield : Boolean := True);
pragma Inline (Yield);
-- Yield the processor. Add the calling task to the tail of the ready
-- queue for its active_priority. The Do_Yield argument is only used in
-- some very rare cases very a yield should have an effect on a specific
-- target and not on regular ones.
procedure Set_Priority
(T : ST.Task_Id;
Prio : System.Any_Priority;
Loss_Of_Inheritance : Boolean := False);
pragma Inline (Set_Priority);
-- Set the priority of the task specified by T to T.Current_Priority. The
-- priority set is what would correspond to the Ada concept of "base
-- priority" in the terms of the lower layer system, but the operation may
-- be used by the upper layer to implement changes in "active priority"
-- that are not due to lock effects. The effect should be consistent with
-- the Ada Reference Manual. In particular, when a task lowers its
-- priority due to the loss of inherited priority, it goes at the head of
-- the queue for its new priority (RM D.2.2 par 9). Loss_Of_Inheritance
-- helps the underlying implementation to do it right when the OS doesn't.
function Get_Priority (T : ST.Task_Id) return System.Any_Priority;
pragma Inline (Get_Priority);
-- Returns the priority last set by Set_Priority for this task
function Monotonic_Clock return Duration;
pragma Inline (Monotonic_Clock);
-- Returns "absolute" time, represented as an offset relative to "the
-- Epoch", which is Jan 1, 1970. This clock implementation is immune to
-- the system's clock changes.
function RT_Resolution return Duration;
pragma Inline (RT_Resolution);
-- Returns resolution of the underlying clock used to implement RT_Clock
----------------
-- Extensions --
----------------
-- Whoever calls either of the Sleep routines is responsible
-- for checking for pending aborts before the call.
-- Pending priority changes are handled internally.
procedure Sleep
(Self_ID : ST.Task_Id;
Reason : System.Tasking.Task_States);
pragma Inline (Sleep);
-- Wait until the current task, T, is signaled to wake up.
--
-- precondition:
-- The calling task is holding its own ATCB lock
-- and has abort deferred
--
-- postcondition:
-- The calling task is holding its own ATCB lock and has abort deferred.
-- The effect is to atomically unlock T's lock and wait, so that another
-- task that is able to lock T's lock can be assured that the wait has
-- actually commenced, and that a Wakeup operation will cause the waiting
-- task to become ready for execution once again. When Sleep returns, the
-- waiting task will again hold its own ATCB lock. The waiting task may
-- become ready for execution at any time (that is, spurious wakeups are
-- permitted), but it will definitely become ready for execution when a
-- Wakeup operation is performed for the same task.
procedure Timed_Sleep
(Self_ID : ST.Task_Id;
Time : Duration;
Mode : ST.Delay_Modes;
Reason : System.Tasking.Task_States;
Timedout : out Boolean;
Yielded : out Boolean);
-- Combination of Sleep (above) and Timed_Delay
procedure Timed_Delay
(Self_ID : ST.Task_Id;
Time : Duration;
Mode : ST.Delay_Modes);
-- Implement the semantics of the delay statement.
-- The caller should be abort-deferred and should not hold any locks.
procedure Wakeup
(T : ST.Task_Id;
Reason : System.Tasking.Task_States);
pragma Inline (Wakeup);
-- Wake up task T if it is waiting on a Sleep call (of ordinary
-- or timed variety), making it ready for execution once again.
-- If the task T is not waiting on a Sleep, the operation has no effect.
function Environment_Task return ST.Task_Id;
pragma Inline (Environment_Task);
-- Return the task ID of the environment task
-- Consider putting this into a variable visible directly
-- by the rest of the runtime system. ???
function Get_Thread_Id (T : ST.Task_Id) return OSI.Thread_Id;
-- Return the thread id of the specified task
function Is_Valid_Task return Boolean;
pragma Inline (Is_Valid_Task);
-- Does the calling thread have an ATCB?
function Register_Foreign_Thread return ST.Task_Id;
-- Allocate and initialize a new ATCB for the current thread
-----------------------
-- RTS Entrance/Exit --
-----------------------
-- Following two routines are used for possible operations needed to be
-- setup/cleared upon entrance/exit of RTS while maintaining a single
-- thread of control in the RTS. Since we intend these routines to be used
-- for implementing the Single_Lock RTS, Lock_RTS should follow the first
-- Defer_Abortion operation entering RTS. In the same fashion Unlock_RTS
-- should preceed the last Undefer_Abortion exiting RTS.
--
-- These routines also replace the functions Lock/Unlock_All_Tasks_List
procedure Lock_RTS;
-- Take the global RTS lock
procedure Unlock_RTS;
-- Release the global RTS lock
--------------------
-- Stack Checking --
--------------------
-- Stack checking in GNAT is done using the concept of stack probes. A
-- stack probe is an operation that will generate a storage error if
-- an insufficient amount of stack space remains in the current task.
-- The exact mechanism for a stack probe is target dependent. Typical
-- possibilities are to use a load from a non-existent page, a store to a
-- read-only page, or a comparison with some stack limit constant. Where
-- possible we prefer to use a trap on a bad page access, since this has
-- less overhead. The generation of stack probes is either automatic if
-- the ABI requires it (as on for example DEC Unix), or is controlled by
-- the gcc parameter -fstack-check.
-- When we are using bad-page accesses, we need a bad page, called guard
-- page, at the end of each task stack. On some systems, this is provided
-- automatically, but on other systems, we need to create the guard page
-- ourselves, and the procedure Stack_Guard is provided for this purpose.
procedure Stack_Guard (T : ST.Task_Id; On : Boolean);
-- Ensure guard page is set if one is needed and the underlying thread
-- system does not provide it. The procedure is as follows:
--
-- 1. When we create a task adjust its size so a guard page can
-- safely be set at the bottom of the stack.
--
-- 2. When the thread is created (and its stack allocated by the
-- underlying thread system), get the stack base (and size, depending
-- how the stack is growing), and create the guard page taking care
-- of page boundaries issues.
--
-- 3. When the task is destroyed, remove the guard page.
--
-- If On is true then protect the stack bottom (i.e make it read only)
-- else unprotect it (i.e. On is True for the call when creating a task,
-- and False when a task is destroyed).
--
-- The call to Stack_Guard has no effect if guard pages are not used on
-- the target, or if guard pages are automatically provided by the system.
------------------------
-- Suspension objects --
------------------------
-- These subprograms provide the functionality required for synchronizing
-- on a suspension object. Tasks can suspend execution and relinquish the
-- processors until the condition is signaled.
function Current_State (S : Suspension_Object) return Boolean;
-- Return the state of the suspension object
procedure Set_False (S : in out Suspension_Object);
-- Set the state of the suspension object to False
procedure Set_True (S : in out Suspension_Object);
-- Set the state of the suspension object to True. If a task were
-- suspended on the protected object then this task is released (and
-- the state of the suspension object remains set to False).
procedure Suspend_Until_True (S : in out Suspension_Object);
-- If the state of the suspension object is True then the calling task
-- continues its execution, and the state is set to False. If the state
-- of the object is False then the task is suspended on the suspension
-- object until a Set_True operation is executed. Program_Error is raised
-- if another task is already waiting on that suspension object.
procedure Initialize (S : in out Suspension_Object);
-- Initialize the suspension object
procedure Finalize (S : in out Suspension_Object);
-- Finalize the suspension object
-----------------------------------------
-- Runtime System Debugging Interfaces --
-----------------------------------------
-- These interfaces have been added to assist in debugging the
-- tasking runtime system.
function Check_Exit (Self_ID : ST.Task_Id) return Boolean;
pragma Inline (Check_Exit);
-- Check that the current task is holding only Global_Task_Lock
function Check_No_Locks (Self_ID : ST.Task_Id) return Boolean;
pragma Inline (Check_No_Locks);
-- Check that current task is holding no locks
function Suspend_Task
(T : ST.Task_Id;
Thread_Self : OSI.Thread_Id) return Boolean;
-- Suspend a specific task when the underlying thread library provides
-- such functionality, unless the thread associated with T is Thread_Self.
-- Such functionality is needed by gdb on some targets (e.g VxWorks)
-- Return True is the operation is successful
function Resume_Task
(T : ST.Task_Id;
Thread_Self : OSI.Thread_Id) return Boolean;
-- Resume a specific task when the underlying thread library provides
-- such functionality, unless the thread associated with T is Thread_Self.
-- Such functionality is needed by gdb on some targets (e.g VxWorks)
-- Return True is the operation is successful
end System.Task_Primitives.Operations;
|
-- Copyright (c) 2010 - 2018, Nordic Semiconductor ASA
--
-- All rights reserved.
--
-- 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, except as embedded into a Nordic
-- Semiconductor ASA integrated circuit in a product or a software update for
-- such product, 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 Nordic Semiconductor ASA nor the names of its
-- contributors may be used to endorse or promote products derived from this
-- software without specific prior written permission.
--
-- 4. This software, with or without modification, must only be used with a
-- Nordic Semiconductor ASA integrated circuit.
--
-- 5. Any software provided in binary form under this license must not be reverse
-- engineered, decompiled, modified and/or disassembled.
--
-- THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS
-- OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-- OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE
-- DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA 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 spec has been automatically generated from nrf52.svd
pragma Restrictions (No_Elaboration_Code);
pragma Ada_2012;
pragma Style_Checks (Off);
with HAL;
with System;
package NRF_SVD.RADIO is
pragma Preelaborate;
---------------
-- Registers --
---------------
-- Shortcut between READY event and START task
type SHORTS_READY_START_Field is
(-- Disable shortcut
Disabled,
-- Enable shortcut
Enabled)
with Size => 1;
for SHORTS_READY_START_Field use
(Disabled => 0,
Enabled => 1);
-- Shortcut between END event and DISABLE task
type SHORTS_END_DISABLE_Field is
(-- Disable shortcut
Disabled,
-- Enable shortcut
Enabled)
with Size => 1;
for SHORTS_END_DISABLE_Field use
(Disabled => 0,
Enabled => 1);
-- Shortcut between DISABLED event and TXEN task
type SHORTS_DISABLED_TXEN_Field is
(-- Disable shortcut
Disabled,
-- Enable shortcut
Enabled)
with Size => 1;
for SHORTS_DISABLED_TXEN_Field use
(Disabled => 0,
Enabled => 1);
-- Shortcut between DISABLED event and RXEN task
type SHORTS_DISABLED_RXEN_Field is
(-- Disable shortcut
Disabled,
-- Enable shortcut
Enabled)
with Size => 1;
for SHORTS_DISABLED_RXEN_Field use
(Disabled => 0,
Enabled => 1);
-- Shortcut between ADDRESS event and RSSISTART task
type SHORTS_ADDRESS_RSSISTART_Field is
(-- Disable shortcut
Disabled,
-- Enable shortcut
Enabled)
with Size => 1;
for SHORTS_ADDRESS_RSSISTART_Field use
(Disabled => 0,
Enabled => 1);
-- Shortcut between END event and START task
type SHORTS_END_START_Field is
(-- Disable shortcut
Disabled,
-- Enable shortcut
Enabled)
with Size => 1;
for SHORTS_END_START_Field use
(Disabled => 0,
Enabled => 1);
-- Shortcut between ADDRESS event and BCSTART task
type SHORTS_ADDRESS_BCSTART_Field is
(-- Disable shortcut
Disabled,
-- Enable shortcut
Enabled)
with Size => 1;
for SHORTS_ADDRESS_BCSTART_Field use
(Disabled => 0,
Enabled => 1);
-- Shortcut between DISABLED event and RSSISTOP task
type SHORTS_DISABLED_RSSISTOP_Field is
(-- Disable shortcut
Disabled,
-- Enable shortcut
Enabled)
with Size => 1;
for SHORTS_DISABLED_RSSISTOP_Field use
(Disabled => 0,
Enabled => 1);
-- Shortcut register
type SHORTS_Register is record
-- Shortcut between READY event and START task
READY_START : SHORTS_READY_START_Field := NRF_SVD.RADIO.Disabled;
-- Shortcut between END event and DISABLE task
END_DISABLE : SHORTS_END_DISABLE_Field := NRF_SVD.RADIO.Disabled;
-- Shortcut between DISABLED event and TXEN task
DISABLED_TXEN : SHORTS_DISABLED_TXEN_Field :=
NRF_SVD.RADIO.Disabled;
-- Shortcut between DISABLED event and RXEN task
DISABLED_RXEN : SHORTS_DISABLED_RXEN_Field :=
NRF_SVD.RADIO.Disabled;
-- Shortcut between ADDRESS event and RSSISTART task
ADDRESS_RSSISTART : SHORTS_ADDRESS_RSSISTART_Field :=
NRF_SVD.RADIO.Disabled;
-- Shortcut between END event and START task
END_START : SHORTS_END_START_Field := NRF_SVD.RADIO.Disabled;
-- Shortcut between ADDRESS event and BCSTART task
ADDRESS_BCSTART : SHORTS_ADDRESS_BCSTART_Field :=
NRF_SVD.RADIO.Disabled;
-- unspecified
Reserved_7_7 : HAL.Bit := 16#0#;
-- Shortcut between DISABLED event and RSSISTOP task
DISABLED_RSSISTOP : SHORTS_DISABLED_RSSISTOP_Field :=
NRF_SVD.RADIO.Disabled;
-- unspecified
Reserved_9_31 : HAL.UInt23 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for SHORTS_Register use record
READY_START at 0 range 0 .. 0;
END_DISABLE at 0 range 1 .. 1;
DISABLED_TXEN at 0 range 2 .. 2;
DISABLED_RXEN at 0 range 3 .. 3;
ADDRESS_RSSISTART at 0 range 4 .. 4;
END_START at 0 range 5 .. 5;
ADDRESS_BCSTART at 0 range 6 .. 6;
Reserved_7_7 at 0 range 7 .. 7;
DISABLED_RSSISTOP at 0 range 8 .. 8;
Reserved_9_31 at 0 range 9 .. 31;
end record;
-- Write '1' to Enable interrupt for READY event
type INTENSET_READY_Field is
(-- Read: Disabled
Disabled,
-- Read: Enabled
Enabled)
with Size => 1;
for INTENSET_READY_Field use
(Disabled => 0,
Enabled => 1);
-- Write '1' to Enable interrupt for READY event
type INTENSET_READY_Field_1 is
(-- Reset value for the field
Intenset_Ready_Field_Reset,
-- Enable
Set)
with Size => 1;
for INTENSET_READY_Field_1 use
(Intenset_Ready_Field_Reset => 0,
Set => 1);
-- Write '1' to Enable interrupt for ADDRESS event
type INTENSET_ADDRESS_Field is
(-- Read: Disabled
Disabled,
-- Read: Enabled
Enabled)
with Size => 1;
for INTENSET_ADDRESS_Field use
(Disabled => 0,
Enabled => 1);
-- Write '1' to Enable interrupt for ADDRESS event
type INTENSET_ADDRESS_Field_1 is
(-- Reset value for the field
Intenset_Address_Field_Reset,
-- Enable
Set)
with Size => 1;
for INTENSET_ADDRESS_Field_1 use
(Intenset_Address_Field_Reset => 0,
Set => 1);
-- Write '1' to Enable interrupt for PAYLOAD event
type INTENSET_PAYLOAD_Field is
(-- Read: Disabled
Disabled,
-- Read: Enabled
Enabled)
with Size => 1;
for INTENSET_PAYLOAD_Field use
(Disabled => 0,
Enabled => 1);
-- Write '1' to Enable interrupt for PAYLOAD event
type INTENSET_PAYLOAD_Field_1 is
(-- Reset value for the field
Intenset_Payload_Field_Reset,
-- Enable
Set)
with Size => 1;
for INTENSET_PAYLOAD_Field_1 use
(Intenset_Payload_Field_Reset => 0,
Set => 1);
-- Write '1' to Enable interrupt for END event
type INTENSET_END_Field is
(-- Read: Disabled
Disabled,
-- Read: Enabled
Enabled)
with Size => 1;
for INTENSET_END_Field use
(Disabled => 0,
Enabled => 1);
-- Write '1' to Enable interrupt for END event
type INTENSET_END_Field_1 is
(-- Reset value for the field
Intenset_End_Field_Reset,
-- Enable
Set)
with Size => 1;
for INTENSET_END_Field_1 use
(Intenset_End_Field_Reset => 0,
Set => 1);
-- Write '1' to Enable interrupt for DISABLED event
type INTENSET_DISABLED_Field is
(-- Read: Disabled
Disabled,
-- Read: Enabled
Enabled)
with Size => 1;
for INTENSET_DISABLED_Field use
(Disabled => 0,
Enabled => 1);
-- Write '1' to Enable interrupt for DISABLED event
type INTENSET_DISABLED_Field_1 is
(-- Reset value for the field
Intenset_Disabled_Field_Reset,
-- Enable
Set)
with Size => 1;
for INTENSET_DISABLED_Field_1 use
(Intenset_Disabled_Field_Reset => 0,
Set => 1);
-- Write '1' to Enable interrupt for DEVMATCH event
type INTENSET_DEVMATCH_Field is
(-- Read: Disabled
Disabled,
-- Read: Enabled
Enabled)
with Size => 1;
for INTENSET_DEVMATCH_Field use
(Disabled => 0,
Enabled => 1);
-- Write '1' to Enable interrupt for DEVMATCH event
type INTENSET_DEVMATCH_Field_1 is
(-- Reset value for the field
Intenset_Devmatch_Field_Reset,
-- Enable
Set)
with Size => 1;
for INTENSET_DEVMATCH_Field_1 use
(Intenset_Devmatch_Field_Reset => 0,
Set => 1);
-- Write '1' to Enable interrupt for DEVMISS event
type INTENSET_DEVMISS_Field is
(-- Read: Disabled
Disabled,
-- Read: Enabled
Enabled)
with Size => 1;
for INTENSET_DEVMISS_Field use
(Disabled => 0,
Enabled => 1);
-- Write '1' to Enable interrupt for DEVMISS event
type INTENSET_DEVMISS_Field_1 is
(-- Reset value for the field
Intenset_Devmiss_Field_Reset,
-- Enable
Set)
with Size => 1;
for INTENSET_DEVMISS_Field_1 use
(Intenset_Devmiss_Field_Reset => 0,
Set => 1);
-- Write '1' to Enable interrupt for RSSIEND event
type INTENSET_RSSIEND_Field is
(-- Read: Disabled
Disabled,
-- Read: Enabled
Enabled)
with Size => 1;
for INTENSET_RSSIEND_Field use
(Disabled => 0,
Enabled => 1);
-- Write '1' to Enable interrupt for RSSIEND event
type INTENSET_RSSIEND_Field_1 is
(-- Reset value for the field
Intenset_Rssiend_Field_Reset,
-- Enable
Set)
with Size => 1;
for INTENSET_RSSIEND_Field_1 use
(Intenset_Rssiend_Field_Reset => 0,
Set => 1);
-- Write '1' to Enable interrupt for BCMATCH event
type INTENSET_BCMATCH_Field is
(-- Read: Disabled
Disabled,
-- Read: Enabled
Enabled)
with Size => 1;
for INTENSET_BCMATCH_Field use
(Disabled => 0,
Enabled => 1);
-- Write '1' to Enable interrupt for BCMATCH event
type INTENSET_BCMATCH_Field_1 is
(-- Reset value for the field
Intenset_Bcmatch_Field_Reset,
-- Enable
Set)
with Size => 1;
for INTENSET_BCMATCH_Field_1 use
(Intenset_Bcmatch_Field_Reset => 0,
Set => 1);
-- Write '1' to Enable interrupt for CRCOK event
type INTENSET_CRCOK_Field is
(-- Read: Disabled
Disabled,
-- Read: Enabled
Enabled)
with Size => 1;
for INTENSET_CRCOK_Field use
(Disabled => 0,
Enabled => 1);
-- Write '1' to Enable interrupt for CRCOK event
type INTENSET_CRCOK_Field_1 is
(-- Reset value for the field
Intenset_Crcok_Field_Reset,
-- Enable
Set)
with Size => 1;
for INTENSET_CRCOK_Field_1 use
(Intenset_Crcok_Field_Reset => 0,
Set => 1);
-- Write '1' to Enable interrupt for CRCERROR event
type INTENSET_CRCERROR_Field is
(-- Read: Disabled
Disabled,
-- Read: Enabled
Enabled)
with Size => 1;
for INTENSET_CRCERROR_Field use
(Disabled => 0,
Enabled => 1);
-- Write '1' to Enable interrupt for CRCERROR event
type INTENSET_CRCERROR_Field_1 is
(-- Reset value for the field
Intenset_Crcerror_Field_Reset,
-- Enable
Set)
with Size => 1;
for INTENSET_CRCERROR_Field_1 use
(Intenset_Crcerror_Field_Reset => 0,
Set => 1);
-- Enable interrupt
type INTENSET_Register is record
-- Write '1' to Enable interrupt for READY event
READY : INTENSET_READY_Field_1 := Intenset_Ready_Field_Reset;
-- Write '1' to Enable interrupt for ADDRESS event
ADDRESS : INTENSET_ADDRESS_Field_1 :=
Intenset_Address_Field_Reset;
-- Write '1' to Enable interrupt for PAYLOAD event
PAYLOAD : INTENSET_PAYLOAD_Field_1 :=
Intenset_Payload_Field_Reset;
-- Write '1' to Enable interrupt for END event
END_k : INTENSET_END_Field_1 := Intenset_End_Field_Reset;
-- Write '1' to Enable interrupt for DISABLED event
DISABLED : INTENSET_DISABLED_Field_1 :=
Intenset_Disabled_Field_Reset;
-- Write '1' to Enable interrupt for DEVMATCH event
DEVMATCH : INTENSET_DEVMATCH_Field_1 :=
Intenset_Devmatch_Field_Reset;
-- Write '1' to Enable interrupt for DEVMISS event
DEVMISS : INTENSET_DEVMISS_Field_1 :=
Intenset_Devmiss_Field_Reset;
-- Write '1' to Enable interrupt for RSSIEND event
RSSIEND : INTENSET_RSSIEND_Field_1 :=
Intenset_Rssiend_Field_Reset;
-- unspecified
Reserved_8_9 : HAL.UInt2 := 16#0#;
-- Write '1' to Enable interrupt for BCMATCH event
BCMATCH : INTENSET_BCMATCH_Field_1 :=
Intenset_Bcmatch_Field_Reset;
-- unspecified
Reserved_11_11 : HAL.Bit := 16#0#;
-- Write '1' to Enable interrupt for CRCOK event
CRCOK : INTENSET_CRCOK_Field_1 := Intenset_Crcok_Field_Reset;
-- Write '1' to Enable interrupt for CRCERROR event
CRCERROR : INTENSET_CRCERROR_Field_1 :=
Intenset_Crcerror_Field_Reset;
-- unspecified
Reserved_14_31 : HAL.UInt18 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for INTENSET_Register use record
READY at 0 range 0 .. 0;
ADDRESS at 0 range 1 .. 1;
PAYLOAD at 0 range 2 .. 2;
END_k at 0 range 3 .. 3;
DISABLED at 0 range 4 .. 4;
DEVMATCH at 0 range 5 .. 5;
DEVMISS at 0 range 6 .. 6;
RSSIEND at 0 range 7 .. 7;
Reserved_8_9 at 0 range 8 .. 9;
BCMATCH at 0 range 10 .. 10;
Reserved_11_11 at 0 range 11 .. 11;
CRCOK at 0 range 12 .. 12;
CRCERROR at 0 range 13 .. 13;
Reserved_14_31 at 0 range 14 .. 31;
end record;
-- Write '1' to Disable interrupt for READY event
type INTENCLR_READY_Field is
(-- Read: Disabled
Disabled,
-- Read: Enabled
Enabled)
with Size => 1;
for INTENCLR_READY_Field use
(Disabled => 0,
Enabled => 1);
-- Write '1' to Disable interrupt for READY event
type INTENCLR_READY_Field_1 is
(-- Reset value for the field
Intenclr_Ready_Field_Reset,
-- Disable
Clear)
with Size => 1;
for INTENCLR_READY_Field_1 use
(Intenclr_Ready_Field_Reset => 0,
Clear => 1);
-- Write '1' to Disable interrupt for ADDRESS event
type INTENCLR_ADDRESS_Field is
(-- Read: Disabled
Disabled,
-- Read: Enabled
Enabled)
with Size => 1;
for INTENCLR_ADDRESS_Field use
(Disabled => 0,
Enabled => 1);
-- Write '1' to Disable interrupt for ADDRESS event
type INTENCLR_ADDRESS_Field_1 is
(-- Reset value for the field
Intenclr_Address_Field_Reset,
-- Disable
Clear)
with Size => 1;
for INTENCLR_ADDRESS_Field_1 use
(Intenclr_Address_Field_Reset => 0,
Clear => 1);
-- Write '1' to Disable interrupt for PAYLOAD event
type INTENCLR_PAYLOAD_Field is
(-- Read: Disabled
Disabled,
-- Read: Enabled
Enabled)
with Size => 1;
for INTENCLR_PAYLOAD_Field use
(Disabled => 0,
Enabled => 1);
-- Write '1' to Disable interrupt for PAYLOAD event
type INTENCLR_PAYLOAD_Field_1 is
(-- Reset value for the field
Intenclr_Payload_Field_Reset,
-- Disable
Clear)
with Size => 1;
for INTENCLR_PAYLOAD_Field_1 use
(Intenclr_Payload_Field_Reset => 0,
Clear => 1);
-- Write '1' to Disable interrupt for END event
type INTENCLR_END_Field is
(-- Read: Disabled
Disabled,
-- Read: Enabled
Enabled)
with Size => 1;
for INTENCLR_END_Field use
(Disabled => 0,
Enabled => 1);
-- Write '1' to Disable interrupt for END event
type INTENCLR_END_Field_1 is
(-- Reset value for the field
Intenclr_End_Field_Reset,
-- Disable
Clear)
with Size => 1;
for INTENCLR_END_Field_1 use
(Intenclr_End_Field_Reset => 0,
Clear => 1);
-- Write '1' to Disable interrupt for DISABLED event
type INTENCLR_DISABLED_Field is
(-- Read: Disabled
Disabled,
-- Read: Enabled
Enabled)
with Size => 1;
for INTENCLR_DISABLED_Field use
(Disabled => 0,
Enabled => 1);
-- Write '1' to Disable interrupt for DISABLED event
type INTENCLR_DISABLED_Field_1 is
(-- Reset value for the field
Intenclr_Disabled_Field_Reset,
-- Disable
Clear)
with Size => 1;
for INTENCLR_DISABLED_Field_1 use
(Intenclr_Disabled_Field_Reset => 0,
Clear => 1);
-- Write '1' to Disable interrupt for DEVMATCH event
type INTENCLR_DEVMATCH_Field is
(-- Read: Disabled
Disabled,
-- Read: Enabled
Enabled)
with Size => 1;
for INTENCLR_DEVMATCH_Field use
(Disabled => 0,
Enabled => 1);
-- Write '1' to Disable interrupt for DEVMATCH event
type INTENCLR_DEVMATCH_Field_1 is
(-- Reset value for the field
Intenclr_Devmatch_Field_Reset,
-- Disable
Clear)
with Size => 1;
for INTENCLR_DEVMATCH_Field_1 use
(Intenclr_Devmatch_Field_Reset => 0,
Clear => 1);
-- Write '1' to Disable interrupt for DEVMISS event
type INTENCLR_DEVMISS_Field is
(-- Read: Disabled
Disabled,
-- Read: Enabled
Enabled)
with Size => 1;
for INTENCLR_DEVMISS_Field use
(Disabled => 0,
Enabled => 1);
-- Write '1' to Disable interrupt for DEVMISS event
type INTENCLR_DEVMISS_Field_1 is
(-- Reset value for the field
Intenclr_Devmiss_Field_Reset,
-- Disable
Clear)
with Size => 1;
for INTENCLR_DEVMISS_Field_1 use
(Intenclr_Devmiss_Field_Reset => 0,
Clear => 1);
-- Write '1' to Disable interrupt for RSSIEND event
type INTENCLR_RSSIEND_Field is
(-- Read: Disabled
Disabled,
-- Read: Enabled
Enabled)
with Size => 1;
for INTENCLR_RSSIEND_Field use
(Disabled => 0,
Enabled => 1);
-- Write '1' to Disable interrupt for RSSIEND event
type INTENCLR_RSSIEND_Field_1 is
(-- Reset value for the field
Intenclr_Rssiend_Field_Reset,
-- Disable
Clear)
with Size => 1;
for INTENCLR_RSSIEND_Field_1 use
(Intenclr_Rssiend_Field_Reset => 0,
Clear => 1);
-- Write '1' to Disable interrupt for BCMATCH event
type INTENCLR_BCMATCH_Field is
(-- Read: Disabled
Disabled,
-- Read: Enabled
Enabled)
with Size => 1;
for INTENCLR_BCMATCH_Field use
(Disabled => 0,
Enabled => 1);
-- Write '1' to Disable interrupt for BCMATCH event
type INTENCLR_BCMATCH_Field_1 is
(-- Reset value for the field
Intenclr_Bcmatch_Field_Reset,
-- Disable
Clear)
with Size => 1;
for INTENCLR_BCMATCH_Field_1 use
(Intenclr_Bcmatch_Field_Reset => 0,
Clear => 1);
-- Write '1' to Disable interrupt for CRCOK event
type INTENCLR_CRCOK_Field is
(-- Read: Disabled
Disabled,
-- Read: Enabled
Enabled)
with Size => 1;
for INTENCLR_CRCOK_Field use
(Disabled => 0,
Enabled => 1);
-- Write '1' to Disable interrupt for CRCOK event
type INTENCLR_CRCOK_Field_1 is
(-- Reset value for the field
Intenclr_Crcok_Field_Reset,
-- Disable
Clear)
with Size => 1;
for INTENCLR_CRCOK_Field_1 use
(Intenclr_Crcok_Field_Reset => 0,
Clear => 1);
-- Write '1' to Disable interrupt for CRCERROR event
type INTENCLR_CRCERROR_Field is
(-- Read: Disabled
Disabled,
-- Read: Enabled
Enabled)
with Size => 1;
for INTENCLR_CRCERROR_Field use
(Disabled => 0,
Enabled => 1);
-- Write '1' to Disable interrupt for CRCERROR event
type INTENCLR_CRCERROR_Field_1 is
(-- Reset value for the field
Intenclr_Crcerror_Field_Reset,
-- Disable
Clear)
with Size => 1;
for INTENCLR_CRCERROR_Field_1 use
(Intenclr_Crcerror_Field_Reset => 0,
Clear => 1);
-- Disable interrupt
type INTENCLR_Register is record
-- Write '1' to Disable interrupt for READY event
READY : INTENCLR_READY_Field_1 := Intenclr_Ready_Field_Reset;
-- Write '1' to Disable interrupt for ADDRESS event
ADDRESS : INTENCLR_ADDRESS_Field_1 :=
Intenclr_Address_Field_Reset;
-- Write '1' to Disable interrupt for PAYLOAD event
PAYLOAD : INTENCLR_PAYLOAD_Field_1 :=
Intenclr_Payload_Field_Reset;
-- Write '1' to Disable interrupt for END event
END_k : INTENCLR_END_Field_1 := Intenclr_End_Field_Reset;
-- Write '1' to Disable interrupt for DISABLED event
DISABLED : INTENCLR_DISABLED_Field_1 :=
Intenclr_Disabled_Field_Reset;
-- Write '1' to Disable interrupt for DEVMATCH event
DEVMATCH : INTENCLR_DEVMATCH_Field_1 :=
Intenclr_Devmatch_Field_Reset;
-- Write '1' to Disable interrupt for DEVMISS event
DEVMISS : INTENCLR_DEVMISS_Field_1 :=
Intenclr_Devmiss_Field_Reset;
-- Write '1' to Disable interrupt for RSSIEND event
RSSIEND : INTENCLR_RSSIEND_Field_1 :=
Intenclr_Rssiend_Field_Reset;
-- unspecified
Reserved_8_9 : HAL.UInt2 := 16#0#;
-- Write '1' to Disable interrupt for BCMATCH event
BCMATCH : INTENCLR_BCMATCH_Field_1 :=
Intenclr_Bcmatch_Field_Reset;
-- unspecified
Reserved_11_11 : HAL.Bit := 16#0#;
-- Write '1' to Disable interrupt for CRCOK event
CRCOK : INTENCLR_CRCOK_Field_1 := Intenclr_Crcok_Field_Reset;
-- Write '1' to Disable interrupt for CRCERROR event
CRCERROR : INTENCLR_CRCERROR_Field_1 :=
Intenclr_Crcerror_Field_Reset;
-- unspecified
Reserved_14_31 : HAL.UInt18 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for INTENCLR_Register use record
READY at 0 range 0 .. 0;
ADDRESS at 0 range 1 .. 1;
PAYLOAD at 0 range 2 .. 2;
END_k at 0 range 3 .. 3;
DISABLED at 0 range 4 .. 4;
DEVMATCH at 0 range 5 .. 5;
DEVMISS at 0 range 6 .. 6;
RSSIEND at 0 range 7 .. 7;
Reserved_8_9 at 0 range 8 .. 9;
BCMATCH at 0 range 10 .. 10;
Reserved_11_11 at 0 range 11 .. 11;
CRCOK at 0 range 12 .. 12;
CRCERROR at 0 range 13 .. 13;
Reserved_14_31 at 0 range 14 .. 31;
end record;
-- CRC status of packet received
type CRCSTATUS_CRCSTATUS_Field is
(-- Packet received with CRC error
Crcerror,
-- Packet received with CRC ok
Crcok)
with Size => 1;
for CRCSTATUS_CRCSTATUS_Field use
(Crcerror => 0,
Crcok => 1);
-- CRC status
type CRCSTATUS_Register is record
-- Read-only. CRC status of packet received
CRCSTATUS : CRCSTATUS_CRCSTATUS_Field;
-- unspecified
Reserved_1_31 : HAL.UInt31;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CRCSTATUS_Register use record
CRCSTATUS at 0 range 0 .. 0;
Reserved_1_31 at 0 range 1 .. 31;
end record;
subtype RXMATCH_RXMATCH_Field is HAL.UInt3;
-- Received address
type RXMATCH_Register is record
-- Read-only. Received address
RXMATCH : RXMATCH_RXMATCH_Field;
-- unspecified
Reserved_3_31 : HAL.UInt29;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for RXMATCH_Register use record
RXMATCH at 0 range 0 .. 2;
Reserved_3_31 at 0 range 3 .. 31;
end record;
subtype RXCRC_RXCRC_Field is HAL.UInt24;
-- CRC field of previously received packet
type RXCRC_Register is record
-- Read-only. CRC field of previously received packet
RXCRC : RXCRC_RXCRC_Field;
-- unspecified
Reserved_24_31 : HAL.UInt8;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for RXCRC_Register use record
RXCRC at 0 range 0 .. 23;
Reserved_24_31 at 0 range 24 .. 31;
end record;
subtype DAI_DAI_Field is HAL.UInt3;
-- Device address match index
type DAI_Register is record
-- Read-only. Device address match index
DAI : DAI_DAI_Field;
-- unspecified
Reserved_3_31 : HAL.UInt29;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for DAI_Register use record
DAI at 0 range 0 .. 2;
Reserved_3_31 at 0 range 3 .. 31;
end record;
subtype FREQUENCY_FREQUENCY_Field is HAL.UInt7;
-- Channel map selection.
type FREQUENCY_MAP_Field is
(-- Channel map between 2400 MHZ .. 2500 MHz
Default,
-- Channel map between 2360 MHZ .. 2460 MHz
Low)
with Size => 1;
for FREQUENCY_MAP_Field use
(Default => 0,
Low => 1);
-- Frequency
type FREQUENCY_Register is record
-- Radio channel frequency
FREQUENCY : FREQUENCY_FREQUENCY_Field := 16#2#;
-- unspecified
Reserved_7_7 : HAL.Bit := 16#0#;
-- Channel map selection.
MAP : FREQUENCY_MAP_Field := NRF_SVD.RADIO.Default;
-- unspecified
Reserved_9_31 : HAL.UInt23 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for FREQUENCY_Register use record
FREQUENCY at 0 range 0 .. 6;
Reserved_7_7 at 0 range 7 .. 7;
MAP at 0 range 8 .. 8;
Reserved_9_31 at 0 range 9 .. 31;
end record;
-- RADIO output power.
type TXPOWER_TXPOWER_Field is
(-- 0 dBm
Val_0DBm,
-- +3 dBm
Pos3DBm,
-- +4 dBm
Pos4DBm,
-- -40 dBm
Neg40DBm,
-- -20 dBm
Neg20DBm,
-- -16 dBm
Neg16DBm,
-- -12 dBm
Neg12DBm,
-- -8 dBm
Neg8DBm,
-- -4 dBm
Neg4DBm,
-- Deprecated enumerator - -40 dBm
Neg30DBm)
with Size => 8;
for TXPOWER_TXPOWER_Field use
(Val_0DBm => 0,
Pos3DBm => 3,
Pos4DBm => 4,
Neg40DBm => 216,
Neg20DBm => 236,
Neg16DBm => 240,
Neg12DBm => 244,
Neg8DBm => 248,
Neg4DBm => 252,
Neg30DBm => 255);
-- Output power
type TXPOWER_Register is record
-- RADIO output power.
TXPOWER : TXPOWER_TXPOWER_Field := NRF_SVD.RADIO.Val_0DBm;
-- unspecified
Reserved_8_31 : HAL.UInt24 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for TXPOWER_Register use record
TXPOWER at 0 range 0 .. 7;
Reserved_8_31 at 0 range 8 .. 31;
end record;
-- Radio data rate and modulation setting. The radio supports
-- Frequency-shift Keying (FSK) modulation.
type MODE_MODE_Field is
(-- 1 Mbit/s Nordic proprietary radio mode
Nrf_1Mbit,
-- 2 Mbit/s Nordic proprietary radio mode
Nrf_2Mbit,
-- Deprecated enumerator - 250 kbit/s Nordic proprietary radio mode
Nrf_250Kbit,
-- 1 Mbit/s Bluetooth Low Energy
Ble_1Mbit,
-- 2 Mbit/s Bluetooth Low Energy
Ble_2Mbit)
with Size => 4;
for MODE_MODE_Field use
(Nrf_1Mbit => 0,
Nrf_2Mbit => 1,
Nrf_250Kbit => 2,
Ble_1Mbit => 3,
Ble_2Mbit => 4);
-- Data rate and modulation
type MODE_Register is record
-- Radio data rate and modulation setting. The radio supports
-- Frequency-shift Keying (FSK) modulation.
MODE : MODE_MODE_Field := NRF_SVD.RADIO.Nrf_1Mbit;
-- unspecified
Reserved_4_31 : HAL.UInt28 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for MODE_Register use record
MODE at 0 range 0 .. 3;
Reserved_4_31 at 0 range 4 .. 31;
end record;
subtype PCNF0_LFLEN_Field is HAL.UInt4;
subtype PCNF0_S1LEN_Field is HAL.UInt4;
-- Include or exclude S1 field in RAM
type PCNF0_S1INCL_Field is
(-- Include S1 field in RAM only if S1LEN > 0
Automatic,
-- Always include S1 field in RAM independent of S1LEN
Include)
with Size => 1;
for PCNF0_S1INCL_Field use
(Automatic => 0,
Include => 1);
-- Length of preamble on air. Decision point: TASKS_START task
type PCNF0_PLEN_Field is
(-- 8-bit preamble
Val_8BIT,
-- 16-bit preamble
Val_16BIT)
with Size => 1;
for PCNF0_PLEN_Field use
(Val_8BIT => 0,
Val_16BIT => 1);
-- Packet configuration register 0
type PCNF0_Register is record
-- Length on air of LENGTH field in number of bits.
LFLEN : PCNF0_LFLEN_Field := 16#0#;
-- unspecified
Reserved_4_7 : HAL.UInt4 := 16#0#;
-- Length on air of S0 field in number of bytes.
S0LEN : Boolean := False;
-- unspecified
Reserved_9_15 : HAL.UInt7 := 16#0#;
-- Length on air of S1 field in number of bits.
S1LEN : PCNF0_S1LEN_Field := 16#0#;
-- Include or exclude S1 field in RAM
S1INCL : PCNF0_S1INCL_Field := NRF_SVD.RADIO.Automatic;
-- unspecified
Reserved_21_23 : HAL.UInt3 := 16#0#;
-- Length of preamble on air. Decision point: TASKS_START task
PLEN : PCNF0_PLEN_Field := NRF_SVD.RADIO.Val_8BIT;
-- unspecified
Reserved_25_31 : HAL.UInt7 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for PCNF0_Register use record
LFLEN at 0 range 0 .. 3;
Reserved_4_7 at 0 range 4 .. 7;
S0LEN at 0 range 8 .. 8;
Reserved_9_15 at 0 range 9 .. 15;
S1LEN at 0 range 16 .. 19;
S1INCL at 0 range 20 .. 20;
Reserved_21_23 at 0 range 21 .. 23;
PLEN at 0 range 24 .. 24;
Reserved_25_31 at 0 range 25 .. 31;
end record;
subtype PCNF1_MAXLEN_Field is HAL.UInt8;
subtype PCNF1_STATLEN_Field is HAL.UInt8;
subtype PCNF1_BALEN_Field is HAL.UInt3;
-- On air endianness of packet, this applies to the S0, LENGTH, S1 and the
-- PAYLOAD fields.
type PCNF1_ENDIAN_Field is
(-- Least Significant bit on air first
Little,
-- Most significant bit on air first
Big)
with Size => 1;
for PCNF1_ENDIAN_Field use
(Little => 0,
Big => 1);
-- Enable or disable packet whitening
type PCNF1_WHITEEN_Field is
(-- Disable
Disabled,
-- Enable
Enabled)
with Size => 1;
for PCNF1_WHITEEN_Field use
(Disabled => 0,
Enabled => 1);
-- Packet configuration register 1
type PCNF1_Register is record
-- Maximum length of packet payload. If the packet payload is larger
-- than MAXLEN, the radio will truncate the payload to MAXLEN.
MAXLEN : PCNF1_MAXLEN_Field := 16#0#;
-- Static length in number of bytes
STATLEN : PCNF1_STATLEN_Field := 16#0#;
-- Base address length in number of bytes
BALEN : PCNF1_BALEN_Field := 16#0#;
-- unspecified
Reserved_19_23 : HAL.UInt5 := 16#0#;
-- On air endianness of packet, this applies to the S0, LENGTH, S1 and
-- the PAYLOAD fields.
ENDIAN : PCNF1_ENDIAN_Field := NRF_SVD.RADIO.Little;
-- Enable or disable packet whitening
WHITEEN : PCNF1_WHITEEN_Field := NRF_SVD.RADIO.Disabled;
-- unspecified
Reserved_26_31 : HAL.UInt6 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for PCNF1_Register use record
MAXLEN at 0 range 0 .. 7;
STATLEN at 0 range 8 .. 15;
BALEN at 0 range 16 .. 18;
Reserved_19_23 at 0 range 19 .. 23;
ENDIAN at 0 range 24 .. 24;
WHITEEN at 0 range 25 .. 25;
Reserved_26_31 at 0 range 26 .. 31;
end record;
-- PREFIX0_AP array element
subtype PREFIX0_AP_Element is HAL.UInt8;
-- PREFIX0_AP array
type PREFIX0_AP_Field_Array is array (0 .. 3) of PREFIX0_AP_Element
with Component_Size => 8, Size => 32;
-- Prefixes bytes for logical addresses 0-3
type PREFIX0_Register
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- AP as a value
Val : HAL.UInt32;
when True =>
-- AP as an array
Arr : PREFIX0_AP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 32, Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for PREFIX0_Register use record
Val at 0 range 0 .. 31;
Arr at 0 range 0 .. 31;
end record;
-- PREFIX1_AP array element
subtype PREFIX1_AP_Element is HAL.UInt8;
-- PREFIX1_AP array
type PREFIX1_AP_Field_Array is array (4 .. 7) of PREFIX1_AP_Element
with Component_Size => 8, Size => 32;
-- Prefixes bytes for logical addresses 4-7
type PREFIX1_Register
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- AP as a value
Val : HAL.UInt32;
when True =>
-- AP as an array
Arr : PREFIX1_AP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 32, Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for PREFIX1_Register use record
Val at 0 range 0 .. 31;
Arr at 0 range 0 .. 31;
end record;
subtype TXADDRESS_TXADDRESS_Field is HAL.UInt3;
-- Transmit address select
type TXADDRESS_Register is record
-- Transmit address select
TXADDRESS : TXADDRESS_TXADDRESS_Field := 16#0#;
-- unspecified
Reserved_3_31 : HAL.UInt29 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for TXADDRESS_Register use record
TXADDRESS at 0 range 0 .. 2;
Reserved_3_31 at 0 range 3 .. 31;
end record;
-- Enable or disable reception on logical address 0.
type RXADDRESSES_ADDR0_Field is
(-- Disable
Disabled,
-- Enable
Enabled)
with Size => 1;
for RXADDRESSES_ADDR0_Field use
(Disabled => 0,
Enabled => 1);
-- RXADDRESSES_ADDR array
type RXADDRESSES_ADDR_Field_Array is array (0 .. 7)
of RXADDRESSES_ADDR0_Field
with Component_Size => 1, Size => 8;
-- Type definition for RXADDRESSES_ADDR
type RXADDRESSES_ADDR_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- ADDR as a value
Val : HAL.UInt8;
when True =>
-- ADDR as an array
Arr : RXADDRESSES_ADDR_Field_Array;
end case;
end record
with Unchecked_Union, Size => 8;
for RXADDRESSES_ADDR_Field use record
Val at 0 range 0 .. 7;
Arr at 0 range 0 .. 7;
end record;
-- Receive address select
type RXADDRESSES_Register is record
-- Enable or disable reception on logical address 0.
ADDR : RXADDRESSES_ADDR_Field :=
(As_Array => False, Val => 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 RXADDRESSES_Register use record
ADDR at 0 range 0 .. 7;
Reserved_8_31 at 0 range 8 .. 31;
end record;
-- CRC length in number of bytes.
type CRCCNF_LEN_Field is
(-- CRC length is zero and CRC calculation is disabled
Disabled,
-- CRC length is one byte and CRC calculation is enabled
One,
-- CRC length is two bytes and CRC calculation is enabled
Two,
-- CRC length is three bytes and CRC calculation is enabled
Three)
with Size => 2;
for CRCCNF_LEN_Field use
(Disabled => 0,
One => 1,
Two => 2,
Three => 3);
-- Include or exclude packet address field out of CRC calculation.
type CRCCNF_SKIPADDR_Field is
(-- CRC calculation includes address field
Include,
-- CRC calculation does not include address field. The CRC calculation will
-- start at the first byte after the address.
Skip)
with Size => 1;
for CRCCNF_SKIPADDR_Field use
(Include => 0,
Skip => 1);
-- CRC configuration
type CRCCNF_Register is record
-- CRC length in number of bytes.
LEN : CRCCNF_LEN_Field := NRF_SVD.RADIO.Disabled;
-- unspecified
Reserved_2_7 : HAL.UInt6 := 16#0#;
-- Include or exclude packet address field out of CRC calculation.
SKIPADDR : CRCCNF_SKIPADDR_Field := NRF_SVD.RADIO.Include;
-- unspecified
Reserved_9_31 : HAL.UInt23 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CRCCNF_Register use record
LEN at 0 range 0 .. 1;
Reserved_2_7 at 0 range 2 .. 7;
SKIPADDR at 0 range 8 .. 8;
Reserved_9_31 at 0 range 9 .. 31;
end record;
subtype CRCPOLY_CRCPOLY_Field is HAL.UInt24;
-- CRC polynomial
type CRCPOLY_Register is record
-- CRC polynomial
CRCPOLY : CRCPOLY_CRCPOLY_Field := 16#0#;
-- unspecified
Reserved_24_31 : HAL.UInt8 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CRCPOLY_Register use record
CRCPOLY at 0 range 0 .. 23;
Reserved_24_31 at 0 range 24 .. 31;
end record;
subtype CRCINIT_CRCINIT_Field is HAL.UInt24;
-- CRC initial value
type CRCINIT_Register is record
-- CRC initial value
CRCINIT : CRCINIT_CRCINIT_Field := 16#0#;
-- unspecified
Reserved_24_31 : HAL.UInt8 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CRCINIT_Register use record
CRCINIT at 0 range 0 .. 23;
Reserved_24_31 at 0 range 24 .. 31;
end record;
subtype TIFS_TIFS_Field is HAL.UInt8;
-- Inter Frame Spacing in us
type TIFS_Register is record
-- Inter Frame Spacing in us
TIFS : TIFS_TIFS_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 TIFS_Register use record
TIFS at 0 range 0 .. 7;
Reserved_8_31 at 0 range 8 .. 31;
end record;
subtype RSSISAMPLE_RSSISAMPLE_Field is HAL.UInt7;
-- RSSI sample
type RSSISAMPLE_Register is record
-- Read-only. RSSI sample
RSSISAMPLE : RSSISAMPLE_RSSISAMPLE_Field;
-- unspecified
Reserved_7_31 : HAL.UInt25;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for RSSISAMPLE_Register use record
RSSISAMPLE at 0 range 0 .. 6;
Reserved_7_31 at 0 range 7 .. 31;
end record;
-- Current radio state
type STATE_STATE_Field is
(-- RADIO is in the Disabled state
Disabled,
-- RADIO is in the RXRU state
Rxru,
-- RADIO is in the RXIDLE state
Rxidle,
-- RADIO is in the RX state
Rx,
-- RADIO is in the RXDISABLED state
Rxdisable,
-- RADIO is in the TXRU state
Txru,
-- RADIO is in the TXIDLE state
Txidle,
-- RADIO is in the TX state
Tx,
-- RADIO is in the TXDISABLED state
Txdisable)
with Size => 4;
for STATE_STATE_Field use
(Disabled => 0,
Rxru => 1,
Rxidle => 2,
Rx => 3,
Rxdisable => 4,
Txru => 9,
Txidle => 10,
Tx => 11,
Txdisable => 12);
-- Current radio state
type STATE_Register is record
-- Read-only. Current radio state
STATE : STATE_STATE_Field;
-- unspecified
Reserved_4_31 : HAL.UInt28;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for STATE_Register use record
STATE at 0 range 0 .. 3;
Reserved_4_31 at 0 range 4 .. 31;
end record;
subtype DATAWHITEIV_DATAWHITEIV_Field is HAL.UInt7;
-- Data whitening initial value
type DATAWHITEIV_Register is record
-- Data whitening initial value. Bit 6 is hard-wired to '1', writing '0'
-- to it has no effect, and it will always be read back and used by the
-- device as '1'.
DATAWHITEIV : DATAWHITEIV_DATAWHITEIV_Field := 16#40#;
-- unspecified
Reserved_7_31 : HAL.UInt25 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for DATAWHITEIV_Register use record
DATAWHITEIV at 0 range 0 .. 6;
Reserved_7_31 at 0 range 7 .. 31;
end record;
-- Description collection[0]: Device address base segment 0
-- Description collection[0]: Device address base segment 0
type DAB_Registers is array (0 .. 7) of HAL.UInt32;
subtype DAP_DAP_Field is HAL.UInt16;
-- Description collection[0]: Device address prefix 0
type DAP_Register is record
-- Device address prefix 0
DAP : DAP_DAP_Field := 16#0#;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for DAP_Register use record
DAP at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
-- Description collection[0]: Device address prefix 0
type DAP_Registers is array (0 .. 7) of DAP_Register;
-- Enable or disable device address matching using device address 0
type DACNF_ENA0_Field is
(-- Disabled
Disabled,
-- Enabled
Enabled)
with Size => 1;
for DACNF_ENA0_Field use
(Disabled => 0,
Enabled => 1);
-- DACNF_ENA array
type DACNF_ENA_Field_Array is array (0 .. 7) of DACNF_ENA0_Field
with Component_Size => 1, Size => 8;
-- Type definition for DACNF_ENA
type DACNF_ENA_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- ENA as a value
Val : HAL.UInt8;
when True =>
-- ENA as an array
Arr : DACNF_ENA_Field_Array;
end case;
end record
with Unchecked_Union, Size => 8;
for DACNF_ENA_Field use record
Val at 0 range 0 .. 7;
Arr at 0 range 0 .. 7;
end record;
-- DACNF_TXADD array
type DACNF_TXADD_Field_Array is array (0 .. 7) of Boolean
with Component_Size => 1, Size => 8;
-- Type definition for DACNF_TXADD
type DACNF_TXADD_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TXADD as a value
Val : HAL.UInt8;
when True =>
-- TXADD as an array
Arr : DACNF_TXADD_Field_Array;
end case;
end record
with Unchecked_Union, Size => 8;
for DACNF_TXADD_Field use record
Val at 0 range 0 .. 7;
Arr at 0 range 0 .. 7;
end record;
-- Device address match configuration
type DACNF_Register is record
-- Enable or disable device address matching using device address 0
ENA : DACNF_ENA_Field := (As_Array => False, Val => 16#0#);
-- TxAdd for device address 0
TXADD : DACNF_TXADD_Field := (As_Array => False, Val => 16#0#);
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for DACNF_Register use record
ENA at 0 range 0 .. 7;
TXADD at 0 range 8 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
-- Radio ramp-up time
type MODECNF0_RU_Field is
(-- Default ramp-up time (tRXEN), compatible with firmware written for nRF51
Default,
-- Fast ramp-up (tRXEN,FAST), see electrical specification for more
-- information
Fast)
with Size => 1;
for MODECNF0_RU_Field use
(Default => 0,
Fast => 1);
-- Default TX value
type MODECNF0_DTX_Field is
(-- Transmit '1'
B1,
-- Transmit '0'
B0,
-- Transmit center frequency
Center)
with Size => 2;
for MODECNF0_DTX_Field use
(B1 => 0,
B0 => 1,
Center => 2);
-- Radio mode configuration register 0
type MODECNF0_Register is record
-- Radio ramp-up time
RU : MODECNF0_RU_Field := NRF_SVD.RADIO.Default;
-- unspecified
Reserved_1_7 : HAL.UInt7 := 16#0#;
-- Default TX value
DTX : MODECNF0_DTX_Field := NRF_SVD.RADIO.Center;
-- unspecified
Reserved_10_31 : HAL.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for MODECNF0_Register use record
RU at 0 range 0 .. 0;
Reserved_1_7 at 0 range 1 .. 7;
DTX at 0 range 8 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
-- Peripheral power control. The peripheral and its registers will be reset
-- to its initial state by switching the peripheral off and then back on
-- again.
type POWER_POWER_Field is
(-- Peripheral is powered off
Disabled,
-- Peripheral is powered on
Enabled)
with Size => 1;
for POWER_POWER_Field use
(Disabled => 0,
Enabled => 1);
-- Peripheral power control
type POWER_Register is record
-- Peripheral power control. The peripheral and its registers will be
-- reset to its initial state by switching the peripheral off and then
-- back on again.
POWER : POWER_POWER_Field := NRF_SVD.RADIO.Enabled;
-- unspecified
Reserved_1_31 : HAL.UInt31 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for POWER_Register use record
POWER at 0 range 0 .. 0;
Reserved_1_31 at 0 range 1 .. 31;
end record;
-----------------
-- Peripherals --
-----------------
-- 2.4 GHz Radio
type RADIO_Peripheral is record
-- Enable RADIO in TX mode
TASKS_TXEN : aliased HAL.UInt32;
-- Enable RADIO in RX mode
TASKS_RXEN : aliased HAL.UInt32;
-- Start RADIO
TASKS_START : aliased HAL.UInt32;
-- Stop RADIO
TASKS_STOP : aliased HAL.UInt32;
-- Disable RADIO
TASKS_DISABLE : aliased HAL.UInt32;
-- Start the RSSI and take one single sample of the receive signal
-- strength.
TASKS_RSSISTART : aliased HAL.UInt32;
-- Stop the RSSI measurement
TASKS_RSSISTOP : aliased HAL.UInt32;
-- Start the bit counter
TASKS_BCSTART : aliased HAL.UInt32;
-- Stop the bit counter
TASKS_BCSTOP : aliased HAL.UInt32;
-- RADIO has ramped up and is ready to be started
EVENTS_READY : aliased HAL.UInt32;
-- Address sent or received
EVENTS_ADDRESS : aliased HAL.UInt32;
-- Packet payload sent or received
EVENTS_PAYLOAD : aliased HAL.UInt32;
-- Packet sent or received
EVENTS_END : aliased HAL.UInt32;
-- RADIO has been disabled
EVENTS_DISABLED : aliased HAL.UInt32;
-- A device address match occurred on the last received packet
EVENTS_DEVMATCH : aliased HAL.UInt32;
-- No device address match occurred on the last received packet
EVENTS_DEVMISS : aliased HAL.UInt32;
-- Sampling of receive signal strength complete.
EVENTS_RSSIEND : aliased HAL.UInt32;
-- Bit counter reached bit count value.
EVENTS_BCMATCH : aliased HAL.UInt32;
-- Packet received with CRC ok
EVENTS_CRCOK : aliased HAL.UInt32;
-- Packet received with CRC error
EVENTS_CRCERROR : aliased HAL.UInt32;
-- Shortcut register
SHORTS : aliased SHORTS_Register;
-- Enable interrupt
INTENSET : aliased INTENSET_Register;
-- Disable interrupt
INTENCLR : aliased INTENCLR_Register;
-- CRC status
CRCSTATUS : aliased CRCSTATUS_Register;
-- Received address
RXMATCH : aliased RXMATCH_Register;
-- CRC field of previously received packet
RXCRC : aliased RXCRC_Register;
-- Device address match index
DAI : aliased DAI_Register;
-- Packet pointer
PACKETPTR : aliased HAL.UInt32;
-- Frequency
FREQUENCY : aliased FREQUENCY_Register;
-- Output power
TXPOWER : aliased TXPOWER_Register;
-- Data rate and modulation
MODE : aliased MODE_Register;
-- Packet configuration register 0
PCNF0 : aliased PCNF0_Register;
-- Packet configuration register 1
PCNF1 : aliased PCNF1_Register;
-- Base address 0
BASE0 : aliased HAL.UInt32;
-- Base address 1
BASE1 : aliased HAL.UInt32;
-- Prefixes bytes for logical addresses 0-3
PREFIX0 : aliased PREFIX0_Register;
-- Prefixes bytes for logical addresses 4-7
PREFIX1 : aliased PREFIX1_Register;
-- Transmit address select
TXADDRESS : aliased TXADDRESS_Register;
-- Receive address select
RXADDRESSES : aliased RXADDRESSES_Register;
-- CRC configuration
CRCCNF : aliased CRCCNF_Register;
-- CRC polynomial
CRCPOLY : aliased CRCPOLY_Register;
-- CRC initial value
CRCINIT : aliased CRCINIT_Register;
-- Unspecified
UNUSED0 : aliased HAL.UInt32;
-- Inter Frame Spacing in us
TIFS : aliased TIFS_Register;
-- RSSI sample
RSSISAMPLE : aliased RSSISAMPLE_Register;
-- Current radio state
STATE : aliased STATE_Register;
-- Data whitening initial value
DATAWHITEIV : aliased DATAWHITEIV_Register;
-- Bit counter compare
BCC : aliased HAL.UInt32;
-- Description collection[0]: Device address base segment 0
DAB : aliased DAB_Registers;
-- Description collection[0]: Device address prefix 0
DAP : aliased DAP_Registers;
-- Device address match configuration
DACNF : aliased DACNF_Register;
-- Radio mode configuration register 0
MODECNF0 : aliased MODECNF0_Register;
-- Peripheral power control
POWER : aliased POWER_Register;
end record
with Volatile;
for RADIO_Peripheral use record
TASKS_TXEN at 16#0# range 0 .. 31;
TASKS_RXEN at 16#4# range 0 .. 31;
TASKS_START at 16#8# range 0 .. 31;
TASKS_STOP at 16#C# range 0 .. 31;
TASKS_DISABLE at 16#10# range 0 .. 31;
TASKS_RSSISTART at 16#14# range 0 .. 31;
TASKS_RSSISTOP at 16#18# range 0 .. 31;
TASKS_BCSTART at 16#1C# range 0 .. 31;
TASKS_BCSTOP at 16#20# range 0 .. 31;
EVENTS_READY at 16#100# range 0 .. 31;
EVENTS_ADDRESS at 16#104# range 0 .. 31;
EVENTS_PAYLOAD at 16#108# range 0 .. 31;
EVENTS_END at 16#10C# range 0 .. 31;
EVENTS_DISABLED at 16#110# range 0 .. 31;
EVENTS_DEVMATCH at 16#114# range 0 .. 31;
EVENTS_DEVMISS at 16#118# range 0 .. 31;
EVENTS_RSSIEND at 16#11C# range 0 .. 31;
EVENTS_BCMATCH at 16#128# range 0 .. 31;
EVENTS_CRCOK at 16#130# range 0 .. 31;
EVENTS_CRCERROR at 16#134# range 0 .. 31;
SHORTS at 16#200# range 0 .. 31;
INTENSET at 16#304# range 0 .. 31;
INTENCLR at 16#308# range 0 .. 31;
CRCSTATUS at 16#400# range 0 .. 31;
RXMATCH at 16#408# range 0 .. 31;
RXCRC at 16#40C# range 0 .. 31;
DAI at 16#410# range 0 .. 31;
PACKETPTR at 16#504# range 0 .. 31;
FREQUENCY at 16#508# range 0 .. 31;
TXPOWER at 16#50C# range 0 .. 31;
MODE at 16#510# range 0 .. 31;
PCNF0 at 16#514# range 0 .. 31;
PCNF1 at 16#518# range 0 .. 31;
BASE0 at 16#51C# range 0 .. 31;
BASE1 at 16#520# range 0 .. 31;
PREFIX0 at 16#524# range 0 .. 31;
PREFIX1 at 16#528# range 0 .. 31;
TXADDRESS at 16#52C# range 0 .. 31;
RXADDRESSES at 16#530# range 0 .. 31;
CRCCNF at 16#534# range 0 .. 31;
CRCPOLY at 16#538# range 0 .. 31;
CRCINIT at 16#53C# range 0 .. 31;
UNUSED0 at 16#540# range 0 .. 31;
TIFS at 16#544# range 0 .. 31;
RSSISAMPLE at 16#548# range 0 .. 31;
STATE at 16#550# range 0 .. 31;
DATAWHITEIV at 16#554# range 0 .. 31;
BCC at 16#560# range 0 .. 31;
DAB at 16#600# range 0 .. 255;
DAP at 16#620# range 0 .. 255;
DACNF at 16#640# range 0 .. 31;
MODECNF0 at 16#650# range 0 .. 31;
POWER at 16#FFC# range 0 .. 31;
end record;
-- 2.4 GHz Radio
RADIO_Periph : aliased RADIO_Peripheral
with Import, Address => RADIO_Base;
end NRF_SVD.RADIO;
|
-----------------------------------------------------------------------
-- awa-storages-services -- Storage service
-- Copyright (C) 2012 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- 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.Calendar;
with Ada.Strings.Unbounded;
with Security.Permissions;
with ADO;
with ASF.Parts;
with AWA.Modules;
with AWA.Modules.Lifecycles;
with AWA.Storages.Models;
with AWA.Storages.Stores;
with AWA.Storages.Stores.Databases;
-- == Storage Service ==
-- The <tt>Storage_Service</tt> provides the operations to access and use the persisent storage.
-- It controls the permissions that grant access to the service for users.
--
-- Other modules can be notified of storage changes by registering a listener
-- on the storage module.
--
-- @include awa-storages-stores.ads
package AWA.Storages.Services is
package ACL_Create_Storage is new Security.Permissions.Definition ("storage-create");
package ACL_Delete_Storage is new Security.Permissions.Definition ("storage-delete");
package ACL_Create_Folder is new Security.Permissions.Definition ("folder-create");
type Read_Mode is (READ, WRITE);
type Expire_Type is (ONE_HOUR, ONE_DAY, TWO_DAYS, ONE_WEEK, ONE_YEAR, NEVER);
package Storage_Lifecycle is
new AWA.Modules.Lifecycles (Element_Type => AWA.Storages.Models.Storage_Ref'Class);
subtype Listener is Storage_Lifecycle.Listener;
-- ------------------------------
-- Storage Service
-- ------------------------------
-- The <b>Storage_Service</b> defines a set of operations to store and retrieve
-- a data object from the persistent storage. The data object is treated as a raw
-- byte stream. The persistent storage can be implemented by a database, a file
-- system or a remote service such as Amazon AWS.
type Storage_Service is new AWA.Modules.Module_Manager with private;
type Storage_Service_Access is access all Storage_Service'Class;
-- Initializes the storage service.
overriding
procedure Initialize (Service : in out Storage_Service;
Module : in AWA.Modules.Module'Class);
-- Get the persistent store that manages the data store identified by <tt>Kind</tt>.
function Get_Store (Service : in Storage_Service;
Kind : in AWA.Storages.Models.Storage_Type)
return AWA.Storages.Stores.Store_Access;
-- Create or save the folder.
procedure Save_Folder (Service : in Storage_Service;
Folder : in out AWA.Storages.Models.Storage_Folder_Ref'Class);
-- Load the folder instance identified by the given identifier.
procedure Load_Folder (Service : in Storage_Service;
Folder : in out AWA.Storages.Models.Storage_Folder_Ref'Class;
Id : in ADO.Identifier);
-- Save the data object contained in the <b>Data</b> part element into the
-- target storage represented by <b>Into</b>.
procedure Save (Service : in Storage_Service;
Into : in out AWA.Storages.Models.Storage_Ref'Class;
Data : in ASF.Parts.Part'Class;
Storage : in AWA.Storages.Models.Storage_Type);
-- Save the file pointed to by the <b>Path</b> string in the storage
-- object represented by <b>Into</b> and managed by the storage service.
procedure Save (Service : in Storage_Service;
Into : in out AWA.Storages.Models.Storage_Ref'Class;
Path : in String;
Storage : in AWA.Storages.Models.Storage_Type);
-- Load the storage instance identified by the given identifier.
procedure Load_Storage (Service : in Storage_Service;
Storage : in out AWA.Storages.Models.Storage_Ref'Class;
Id : in ADO.Identifier);
-- Load the storage content identified by <b>From</b> into the blob descriptor <b>Into</b>.
-- Raises the <b>NOT_FOUND</b> exception if there is no such storage.
procedure Load (Service : in Storage_Service;
From : in ADO.Identifier;
Name : out Ada.Strings.Unbounded.Unbounded_String;
Mime : out Ada.Strings.Unbounded.Unbounded_String;
Date : out Ada.Calendar.Time;
Into : out ADO.Blob_Ref);
-- Load the storage content into a file. If the data is not stored in a file, a temporary
-- file is created with the data content fetched from the store (ex: the database).
-- The `Mode` parameter indicates whether the file will be read or written.
-- The `Expire` parameter allows to control the expiration of the temporary file.
procedure Get_Local_File (Service : in Storage_Service;
From : in ADO.Identifier;
Mode : in Read_Mode := READ;
Into : out Storage_File);
procedure Create_Local_File (Service : in Storage_Service;
Into : out Storage_File);
-- Deletes the storage instance.
procedure Delete (Service : in Storage_Service;
Storage : in out AWA.Storages.Models.Storage_Ref'Class);
-- Deletes the storage instance.
procedure Delete (Service : in Storage_Service;
Storage : in ADO.Identifier);
private
type Store_Access_Array is
array (AWA.Storages.Models.Storage_Type) of AWA.Storages.Stores.Store_Access;
type Storage_Service is new AWA.Modules.Module_Manager with record
Stores : Store_Access_Array;
Database_Store : aliased AWA.Storages.Stores.Databases.Database_Store;
end record;
end AWA.Storages.Services;
|
with Ada.Text_IO; use Ada.Text_IO;
with Sorted_List; use Sorted_List;
with Ada.Sequential_IO;
with Ada.Integer_Text_IO; use Ada.Integer_Text_IO;
procedure lab6final is
type Array_Of_Integers is Array(1..10) of Integer;
type Person is
record
Last_Name: String(1..20);
First_Name: String(1..20);
Street_Address: String(1..20);
Postal_Address: String(1..20);
Number_Of_Interests: Integer;
Interests: Array_Of_Integers;
end record;
package My_IO is new Ada.Sequential_IO(Person); use My_IO;
-- -- -- -- -- -- -- -- -- -- -- -- -- -- --
procedure Get(output: out List_Type) is
temp: Integer;
begin
loop
Get(temp);
exit when temp = 0;
Insert(output, temp);
end loop;
end Get;
procedure Select_From_Interests(Input: in My_IO.File_Type; Selected_Interests: in List_Type) is
Person_Input: Person;
Found_Interests: List_Type;
Outfile: Ada.Text_IO.File_Type;
begin
Create(Outfile,Out_File,"RESULT.TXT");
while not End_Of_File(Input) loop
Read(Input,Person_Input);
for i in Person_Input.Interests'Range loop
if Member(Selected_Interests, Person_Input.Interests(i)) then
Insert(Found_Interests, Person_Input.Interests(i));
end if;
end loop;
if not Empty(Found_Interests) then
Put(Outfile, Person_Input.First_Name);
Put(Outfile, " ");
Put(Outfile, Person_Input.Last_Name);
Put(Outfile, " ");
Put(Outfile, Person_Input.Street_Address);
Put(Outfile, " ");
Put(Outfile, Person_Input.Postal_Address);
Put(Outfile, " *** Intressen: ");
Put(Outfile, Found_Interests);
New_Line(Outfile);
Put(Outfile, "----------------------------------------------------------------------------------------------------");
New_Line(Outfile);
Delete(Found_Interests);
end if;
--Compare(L1,P1,L2);
--Put(F2,P1,L2);
end loop;
Reset(Outfile,In_File);
--Put(Selected_Interests);
end Select_From_Interests;
-- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Input: My_IO.File_Type;
Selected_Interests: List_Type;
begin
Put("Ange en följd av intressen 1 till 15, max 10 st. Avsluta med 0: ");
New_Line;
Get(Selected_Interests);
-- Put(Selected_Interests);
Open(File => Input, Mode => In_File, Name => "REG.BIN");
Select_From_Interests(Input, Selected_Interests);
end lab6final; |
-- Copyright (c) 2021 Maxim Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-- License-Filename: LICENSE
-------------------------------------------------------------
with Ada.Text_IO;
with Ada.Wide_Wide_Text_IO;
with Ada.Streams;
with League.String_Vectors;
with League.Characters.Latin;
with League.Text_Codecs;
with League.Stream_Element_Vectors;
with Network.Addresses;
package body Listeners is
function "+" (Text : Wide_Wide_String)
return League.Strings.Universal_String
renames League.Strings.To_Universal_String;
overriding procedure On_Reject
(Self : in out Listener;
Value : League.Strings.Universal_String) renames Closed;
----------------
-- On_Resolve --
----------------
overriding procedure On_Resolve
(Self : in out Listener;
Value : Network.Connections.Connection_Access) is
begin
Ada.Wide_Wide_Text_IO.Put ("Connected to ");
Ada.Wide_Wide_Text_IO.Put_Line
(Network.Addresses.To_String (Value.Remote).To_Wide_Wide_String);
Self.Remote := Value;
Value.Set_Listener (Self'Unchecked_Access);
end On_Resolve;
------------
-- Closed --
------------
overriding procedure Closed
(Self : in out Listener;
Error : League.Strings.Universal_String)
is
pragma Unreferenced (Self);
begin
Ada.Text_IO.Put_Line ("Closed: " & Error.To_UTF_8_String);
Self.Done := True;
end Closed;
---------------
-- Can_Write --
---------------
overriding procedure Can_Write (Self : in out Listener) is
List : League.String_Vectors.Universal_String_Vector;
CRLF : League.Strings.Universal_String;
begin
Ada.Text_IO.Put_Line ("Can_Write");
CRLF.Append (League.Characters.Latin.Carriage_Return);
CRLF.Append (League.Characters.Latin.Line_Feed);
List.Append (+"GET / HTTP/1.1");
List.Append (+"Host: www.ada-ru.org");
List.Append (+"");
List.Append (+"");
declare
Last : Ada.Streams.Stream_Element_Count;
Data : constant Ada.Streams.Stream_Element_Array :=
League.Text_Codecs.Codec_For_Application_Locale.Encode
(List.Join (CRLF)).To_Stream_Element_Array;
begin
Self.Remote.Write (Data, Last);
Ada.Text_IO.Put_Line (Last'Image);
Ada.Streams.Stream_IO.Create (Self.Output, Name => "/tmp/aaa.bin");
end;
end Can_Write;
--------------
-- Can_Read --
--------------
overriding procedure Can_Read (Self : in out Listener) is
use type Ada.Streams.Stream_Element_Count;
Count : Natural := 0;
Data : Ada.Streams.Stream_Element_Array (1 .. 512);
Last : Ada.Streams.Stream_Element_Count;
begin
Ada.Text_IO.Put_Line ("Can_Read");
loop
Self.Remote.Read (Data, Last);
Ada.Streams.Stream_IO.Write (Self.Output, Data (1 .. Last));
exit when Last < Data'First;
Count := Count + 1;
end loop;
Ada.Text_IO.Put_Line (Count'Image & Last'Image);
end Can_Read;
end Listeners;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- A D A . W I D E _ W I D E _ T E X T _ I O . M O D U L A R _ I O --
-- --
-- B o d y --
-- --
-- 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. --
-- --
-- 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.Wide_Wide_Text_IO.Modular_Aux;
with System.Unsigned_Types; use System.Unsigned_Types;
with System.WCh_Con; use System.WCh_Con;
with System.WCh_WtS; use System.WCh_WtS;
package body Ada.Wide_Wide_Text_IO.Modular_IO is
subtype TFT is Ada.Wide_Wide_Text_IO.File_Type;
-- File type required for calls to routines in Aux
package Aux renames Ada.Wide_Wide_Text_IO.Modular_Aux;
---------
-- Get --
---------
procedure Get
(File : File_Type;
Item : out Num;
Width : Field := 0)
is
begin
if Num'Size > Unsigned'Size then
Aux.Get_LLU (TFT (File), Long_Long_Unsigned (Item), Width);
else
Aux.Get_Uns (TFT (File), Unsigned (Item), Width);
end if;
exception
when Constraint_Error => raise Data_Error;
end Get;
procedure Get
(Item : out Num;
Width : Field := 0)
is
begin
Get (Current_Input, Item, Width);
end Get;
procedure Get
(From : Wide_Wide_String;
Item : out Num;
Last : out Positive)
is
S : constant String := Wide_Wide_String_To_String (From, WCEM_Upper);
-- String on which we do the actual conversion. Note that the method
-- used for wide character encoding is irrelevant, since if there is
-- a character outside the Standard.Character range then the call to
-- Aux.Gets will raise Data_Error in any case.
begin
if Num'Size > Unsigned'Size then
Aux.Gets_LLU (S, Long_Long_Unsigned (Item), Last);
else
Aux.Gets_Uns (S, Unsigned (Item), Last);
end if;
exception
when Constraint_Error => raise Data_Error;
end Get;
---------
-- Put --
---------
procedure Put
(File : File_Type;
Item : Num;
Width : Field := Default_Width;
Base : Number_Base := Default_Base)
is
begin
if Num'Size > Unsigned'Size then
Aux.Put_LLU (TFT (File), Long_Long_Unsigned (Item), Width, Base);
else
Aux.Put_Uns (TFT (File), Unsigned (Item), Width, Base);
end if;
end Put;
procedure Put
(Item : Num;
Width : Field := Default_Width;
Base : Number_Base := Default_Base)
is
begin
Put (Current_Output, Item, Width, Base);
end Put;
procedure Put
(To : out Wide_Wide_String;
Item : Num;
Base : Number_Base := Default_Base)
is
S : String (To'First .. To'Last);
begin
if Num'Size > Unsigned'Size then
Aux.Puts_LLU (S, Long_Long_Unsigned (Item), Base);
else
Aux.Puts_Uns (S, Unsigned (Item), Base);
end if;
for J in S'Range loop
To (J) := Wide_Wide_Character'Val (Character'Pos (S (J)));
end loop;
end Put;
end Ada.Wide_Wide_Text_IO.Modular_IO;
|
with u1;
package u2 is
subtype t is u1.t;
end u2;
|
package Giza.Hershey_Fonts.Scriptc 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 => 17,
Width => 11,
Height => 21,
Y_Offset => -12,
X_Offset => -5,
Vects => (Raise_Pen,
(3, -12),
(2, -11),
(0, 1),
Raise_Pen,
(3, -11),
(0, 1),
Raise_Pen,
(3, -12),
(4, -11),
(0, 1),
Raise_Pen,
(-2, 7),
(-3, 8),
(-2, 9),
(-1, 8),
(-2, 7)));
Glyph_2 : aliased constant Glyph :=
(Number_Of_Vectors => 12,
Width => 18,
Height => 7,
Y_Offset => -12,
X_Offset => -9,
Vects => (Raise_Pen,
(-2, -12),
(-4, -5),
Raise_Pen,
(-1, -12),
(-4, -5),
Raise_Pen,
(7, -12),
(5, -5),
Raise_Pen,
(8, -12),
(5, -5)));
Glyph_3 : aliased constant Glyph :=
(Number_Of_Vectors => 12,
Width => 21,
Height => 28,
Y_Offset => -12,
X_Offset => -10,
Vects => (Raise_Pen,
(1, -12),
(-6, 16),
Raise_Pen,
(7, -12),
(0, 16),
Raise_Pen,
(-6, -1),
(8, -1),
Raise_Pen,
(-7, 5),
(7, 5)));
Glyph_4 : aliased constant Glyph :=
(Number_Of_Vectors => 41,
Width => 21,
Height => 29,
Y_Offset => -16,
X_Offset => -10,
Vects => (Raise_Pen,
(2, -16),
(-6, 13),
Raise_Pen,
(7, -16),
(-1, 13),
Raise_Pen,
(8, -8),
(7, -7),
(8, -6),
(9, -7),
(9, -8),
(8, -10),
(7, -11),
(4, -12),
(0, -12),
(-3, -11),
(-5, -9),
(-5, -7),
(-4, -5),
(-3, -4),
(4, 0),
(6, 2),
Raise_Pen,
(-5, -7),
(-3, -5),
(4, -1),
(5, 0),
(6, 2),
(6, 5),
(5, 7),
(4, 8),
(1, 9),
(-3, 9),
(-6, 8),
(-7, 7),
(-8, 5),
(-8, 4),
(-7, 3),
(-6, 4),
(-7, 5)));
Glyph_5 : aliased constant Glyph :=
(Number_Of_Vectors => 32,
Width => 24,
Height => 21,
Y_Offset => -12,
X_Offset => -12,
Vects => (Raise_Pen,
(9, -12),
(-9, 9),
Raise_Pen,
(-4, -12),
(-2, -10),
(-2, -8),
(-3, -6),
(-5, -5),
(-7, -5),
(-9, -7),
(-9, -9),
(-8, -11),
(-6, -12),
(-4, -12),
(-2, -11),
(1, -10),
(4, -10),
(7, -11),
(9, -12),
Raise_Pen,
(5, 2),
(3, 3),
(2, 5),
(2, 7),
(4, 9),
(6, 9),
(8, 8),
(9, 6),
(9, 4),
(7, 2),
(5, 2)));
Glyph_6 : aliased constant Glyph :=
(Number_Of_Vectors => 55,
Width => 26,
Height => 21,
Y_Offset => -12,
X_Offset => -13,
Vects => (Raise_Pen,
(10, -4),
(9, -3),
(10, -2),
(11, -3),
(11, -4),
(10, -5),
(9, -5),
(7, -4),
(5, -2),
(0, 6),
(-2, 8),
(-4, 9),
(-7, 9),
(-10, 8),
(-11, 6),
(-11, 4),
(-10, 2),
(-9, 1),
(-7, 0),
(-2, -2),
(0, -3),
(2, -5),
(3, -7),
(3, -9),
(2, -11),
(0, -12),
(-2, -11),
(-3, -9),
(-3, -6),
(-2, 0),
(-1, 3),
(1, 6),
(3, 8),
(5, 9),
(7, 9),
(8, 7),
(8, 6),
Raise_Pen,
(-7, 9),
(-9, 8),
(-10, 6),
(-10, 4),
(-9, 2),
(-8, 1),
(-2, -2),
Raise_Pen,
(-3, -6),
(-2, -1),
(-1, 2),
(1, 5),
(3, 7),
(5, 8),
(7, 8),
(8, 7)));
Glyph_7 : aliased constant Glyph :=
(Number_Of_Vectors => 8,
Width => 11,
Height => 6,
Y_Offset => -12,
X_Offset => -5,
Vects => (Raise_Pen,
(3, -10),
(2, -11),
(3, -12),
(4, -11),
(4, -10),
(3, -8),
(1, -6)));
Glyph_8 : aliased constant Glyph :=
(Number_Of_Vectors => 20,
Width => 15,
Height => 32,
Y_Offset => -16,
X_Offset => -7,
Vects => (Raise_Pen,
(8, -16),
(4, -13),
(1, -10),
(-1, -7),
(-3, -3),
(-4, 2),
(-4, 6),
(-3, 11),
(-2, 14),
(-1, 16),
Raise_Pen,
(4, -13),
(1, -9),
(-1, -5),
(-2, -2),
(-3, 3),
(-3, 8),
(-2, 13),
(-1, 16)));
Glyph_9 : aliased constant Glyph :=
(Number_Of_Vectors => 20,
Width => 15,
Height => 32,
Y_Offset => -16,
X_Offset => -8,
Vects => (Raise_Pen,
(1, -16),
(2, -14),
(3, -11),
(4, -6),
(4, -2),
(3, 3),
(1, 7),
(-1, 10),
(-4, 13),
(-8, 16),
Raise_Pen,
(1, -16),
(2, -13),
(3, -8),
(3, -3),
(2, 2),
(1, 5),
(-1, 9),
(-4, 13)));
Glyph_10 : aliased constant Glyph :=
(Number_Of_Vectors => 9,
Width => 17,
Height => 12,
Y_Offset => -12,
X_Offset => -8,
Vects => (Raise_Pen,
(2, -12),
(2, 0),
Raise_Pen,
(-3, -9),
(7, -3),
Raise_Pen,
(7, -9),
(-3, -3)));
Glyph_11 : aliased constant Glyph :=
(Number_Of_Vectors => 6,
Width => 26,
Height => 18,
Y_Offset => -9,
X_Offset => -13,
Vects => (Raise_Pen,
(0, -9),
(0, 9),
Raise_Pen,
(-9, 0),
(9, 0)));
Glyph_12 : aliased constant Glyph :=
(Number_Of_Vectors => 8,
Width => 11,
Height => 6,
Y_Offset => 7,
X_Offset => -5,
Vects => (Raise_Pen,
(-2, 9),
(-3, 8),
(-2, 7),
(-1, 8),
(-1, 9),
(-2, 11),
(-4, 13)));
Glyph_13 : aliased constant Glyph :=
(Number_Of_Vectors => 3,
Width => 26,
Height => 0,
Y_Offset => 0,
X_Offset => -13,
Vects => (Raise_Pen,
(-9, 0),
(9, 0)));
Glyph_14 : aliased constant Glyph :=
(Number_Of_Vectors => 6,
Width => 11,
Height => 2,
Y_Offset => 7,
X_Offset => -5,
Vects => (Raise_Pen,
(-2, 7),
(-3, 8),
(-2, 9),
(-1, 8),
(-2, 7)));
Glyph_15 : aliased constant Glyph :=
(Number_Of_Vectors => 3,
Width => 22,
Height => 32,
Y_Offset => -16,
X_Offset => -11,
Vects => (Raise_Pen,
(13, -16),
(-13, 16)));
Glyph_16 : aliased constant Glyph :=
(Number_Of_Vectors => 42,
Width => 21,
Height => 21,
Y_Offset => -12,
X_Offset => -10,
Vects => (Raise_Pen,
(2, -12),
(-1, -11),
(-3, -9),
(-5, -6),
(-6, -3),
(-7, 1),
(-7, 4),
(-6, 7),
(-5, 8),
(-3, 9),
(-1, 9),
(2, 8),
(4, 6),
(6, 3),
(7, 0),
(8, -4),
(8, -7),
(7, -10),
(6, -11),
(4, -12),
(2, -12),
Raise_Pen,
(2, -12),
(0, -11),
(-2, -9),
(-4, -6),
(-5, -3),
(-6, 1),
(-6, 4),
(-5, 7),
(-3, 9),
Raise_Pen,
(-1, 9),
(1, 8),
(3, 6),
(5, 3),
(6, 0),
(7, -4),
(7, -7),
(6, -10),
(4, -12)));
Glyph_17 : aliased constant Glyph :=
(Number_Of_Vectors => 15,
Width => 21,
Height => 21,
Y_Offset => -12,
X_Offset => -10,
Vects => (Raise_Pen,
(2, -8),
(-3, 9),
Raise_Pen,
(4, -12),
(-2, 9),
Raise_Pen,
(4, -12),
(1, -9),
(-2, -7),
(-4, -6),
Raise_Pen,
(3, -9),
(-1, -7),
(-4, -6)));
Glyph_18 : aliased constant Glyph :=
(Number_Of_Vectors => 42,
Width => 21,
Height => 21,
Y_Offset => -12,
X_Offset => -10,
Vects => (Raise_Pen,
(-3, -8),
(-2, -7),
(-3, -6),
(-4, -7),
(-4, -8),
(-3, -10),
(-2, -11),
(1, -12),
(4, -12),
(7, -11),
(8, -9),
(8, -7),
(7, -5),
(5, -3),
(2, -1),
(-2, 1),
(-5, 3),
(-7, 5),
(-9, 9),
Raise_Pen,
(4, -12),
(6, -11),
(7, -9),
(7, -7),
(6, -5),
(4, -3),
(-2, 1),
Raise_Pen,
(-8, 7),
(-7, 6),
(-5, 6),
(0, 8),
(3, 8),
(5, 7),
(6, 5),
Raise_Pen,
(-5, 6),
(0, 9),
(3, 9),
(5, 8),
(6, 5)));
Glyph_19 : aliased constant Glyph :=
(Number_Of_Vectors => 50,
Width => 21,
Height => 21,
Y_Offset => -12,
X_Offset => -10,
Vects => (Raise_Pen,
(-3, -8),
(-2, -7),
(-3, -6),
(-4, -7),
(-4, -8),
(-3, -10),
(-2, -11),
(1, -12),
(4, -12),
(7, -11),
(8, -9),
(8, -7),
(7, -5),
(4, -3),
(1, -2),
Raise_Pen,
(4, -12),
(6, -11),
(7, -9),
(7, -7),
(6, -5),
(4, -3),
Raise_Pen,
(-1, -2),
(1, -2),
(4, -1),
(5, 0),
(6, 2),
(6, 5),
(5, 7),
(4, 8),
(1, 9),
(-3, 9),
(-6, 8),
(-7, 7),
(-8, 5),
(-8, 4),
(-7, 3),
(-6, 4),
(-7, 5),
Raise_Pen,
(1, -2),
(3, -1),
(4, 0),
(5, 2),
(5, 5),
(4, 7),
(3, 8),
(1, 9)));
Glyph_20 : aliased constant Glyph :=
(Number_Of_Vectors => 10,
Width => 21,
Height => 21,
Y_Offset => -12,
X_Offset => -10,
Vects => (Raise_Pen,
(6, -11),
(0, 9),
Raise_Pen,
(7, -12),
(1, 9),
Raise_Pen,
(7, -12),
(-8, 3),
(8, 3)));
Glyph_21 : aliased constant Glyph :=
(Number_Of_Vectors => 39,
Width => 21,
Height => 21,
Y_Offset => -12,
X_Offset => -10,
Vects => (Raise_Pen,
(-1, -12),
(-6, -2),
Raise_Pen,
(-1, -12),
(9, -12),
Raise_Pen,
(-1, -11),
(4, -11),
(9, -12),
Raise_Pen,
(-6, -2),
(-5, -3),
(-2, -4),
(1, -4),
(4, -3),
(5, -2),
(6, 0),
(6, 3),
(5, 6),
(3, 8),
(0, 9),
(-3, 9),
(-6, 8),
(-7, 7),
(-8, 5),
(-8, 4),
(-7, 3),
(-6, 4),
(-7, 5),
Raise_Pen,
(1, -4),
(3, -3),
(4, -2),
(5, 0),
(5, 3),
(4, 6),
(2, 8),
(0, 9)));
Glyph_22 : aliased constant Glyph :=
(Number_Of_Vectors => 46,
Width => 21,
Height => 21,
Y_Offset => -12,
X_Offset => -10,
Vects => (Raise_Pen,
(7, -9),
(6, -8),
(7, -7),
(8, -8),
(8, -9),
(7, -11),
(5, -12),
(2, -12),
(-1, -11),
(-3, -9),
(-5, -6),
(-6, -3),
(-7, 1),
(-7, 5),
(-6, 7),
(-5, 8),
(-3, 9),
(0, 9),
(3, 8),
(5, 6),
(6, 4),
(6, 1),
(5, -1),
(4, -2),
(2, -3),
(-1, -3),
(-3, -2),
(-5, 0),
(-6, 2),
Raise_Pen,
(2, -12),
(0, -11),
(-2, -9),
(-4, -6),
(-5, -3),
(-6, 1),
(-6, 6),
(-5, 8),
Raise_Pen,
(0, 9),
(2, 8),
(4, 6),
(5, 4),
(5, 0),
(4, -2)));
Glyph_23 : aliased constant Glyph :=
(Number_Of_Vectors => 30,
Width => 21,
Height => 21,
Y_Offset => -12,
X_Offset => -10,
Vects => (Raise_Pen,
(-4, -12),
(-6, -6),
Raise_Pen,
(9, -12),
(8, -9),
(6, -6),
(1, 0),
(-1, 3),
(-2, 5),
(-3, 9),
Raise_Pen,
(6, -6),
(0, 0),
(-2, 3),
(-3, 5),
(-4, 9),
Raise_Pen,
(-5, -9),
(-2, -12),
(0, -12),
(5, -9),
Raise_Pen,
(-4, -10),
(-2, -11),
(0, -11),
(5, -9),
(7, -9),
(8, -10),
(9, -12)));
Glyph_24 : aliased constant Glyph :=
(Number_Of_Vectors => 63,
Width => 21,
Height => 21,
Y_Offset => -12,
X_Offset => -10,
Vects => (Raise_Pen,
(1, -12),
(-2, -11),
(-3, -10),
(-4, -8),
(-4, -5),
(-3, -3),
(-1, -2),
(2, -2),
(6, -3),
(7, -4),
(8, -6),
(8, -9),
(7, -11),
(4, -12),
(1, -12),
Raise_Pen,
(1, -12),
(-1, -11),
(-2, -10),
(-3, -8),
(-3, -5),
(-2, -3),
(-1, -2),
Raise_Pen,
(2, -2),
(5, -3),
(6, -4),
(7, -6),
(7, -9),
(6, -11),
(4, -12),
Raise_Pen,
(-1, -2),
(-5, -1),
(-7, 1),
(-8, 3),
(-8, 6),
(-7, 8),
(-4, 9),
(0, 9),
(4, 8),
(5, 7),
(6, 5),
(6, 2),
(5, 0),
(4, -1),
(2, -2),
Raise_Pen,
(-1, -2),
(-4, -1),
(-6, 1),
(-7, 3),
(-7, 6),
(-6, 8),
(-4, 9),
Raise_Pen,
(0, 9),
(3, 8),
(4, 7),
(5, 5),
(5, 1),
(4, -1)));
Glyph_25 : aliased constant Glyph :=
(Number_Of_Vectors => 46,
Width => 21,
Height => 21,
Y_Offset => -12,
X_Offset => -10,
Vects => (Raise_Pen,
(7, -5),
(6, -3),
(4, -1),
(2, 0),
(-1, 0),
(-3, -1),
(-4, -2),
(-5, -4),
(-5, -7),
(-4, -9),
(-2, -11),
(1, -12),
(4, -12),
(6, -11),
(7, -10),
(8, -8),
(8, -4),
(7, 0),
(6, 3),
(4, 6),
(2, 8),
(-1, 9),
(-4, 9),
(-6, 8),
(-7, 6),
(-7, 5),
(-6, 4),
(-5, 5),
(-6, 6),
Raise_Pen,
(-3, -1),
(-4, -3),
(-4, -7),
(-3, -9),
(-1, -11),
(1, -12),
Raise_Pen,
(6, -11),
(7, -9),
(7, -4),
(6, 0),
(5, 3),
(3, 6),
(1, 8),
(-1, 9)));
Glyph_26 : aliased constant Glyph :=
(Number_Of_Vectors => 11,
Width => 11,
Height => 14,
Y_Offset => -5,
X_Offset => -5,
Vects => (Raise_Pen,
(1, -5),
(0, -4),
(1, -3),
(2, -4),
(1, -5),
Raise_Pen,
(-2, 7),
(-3, 8),
(-2, 9),
(-1, 8)));
Glyph_27 : aliased constant Glyph :=
(Number_Of_Vectors => 14,
Width => 11,
Height => 18,
Y_Offset => -5,
X_Offset => -5,
Vects => (Raise_Pen,
(1, -5),
(0, -4),
(1, -3),
(2, -4),
(1, -5),
Raise_Pen,
(-2, 9),
(-3, 8),
(-2, 7),
(-1, 8),
(-1, 9),
(-2, 11),
(-4, 13)));
Glyph_28 : aliased constant Glyph :=
(Number_Of_Vectors => 4,
Width => 24,
Height => 18,
Y_Offset => -9,
X_Offset => -12,
Vects => (Raise_Pen,
(8, -9),
(-8, 0),
(8, 9)));
Glyph_29 : aliased constant Glyph :=
(Number_Of_Vectors => 6,
Width => 26,
Height => 6,
Y_Offset => -3,
X_Offset => -13,
Vects => (Raise_Pen,
(-9, -3),
(9, -3),
Raise_Pen,
(-9, 3),
(9, 3)));
Glyph_30 : aliased constant Glyph :=
(Number_Of_Vectors => 4,
Width => 24,
Height => 18,
Y_Offset => -9,
X_Offset => -12,
Vects => (Raise_Pen,
(-8, -9),
(8, 0),
(-8, 9)));
Glyph_31 : aliased constant Glyph :=
(Number_Of_Vectors => 34,
Width => 21,
Height => 21,
Y_Offset => -12,
X_Offset => -10,
Vects => (Raise_Pen,
(-3, -8),
(-2, -7),
(-3, -6),
(-4, -7),
(-4, -8),
(-3, -10),
(-2, -11),
(1, -12),
(5, -12),
(8, -11),
(9, -9),
(9, -7),
(8, -5),
(7, -4),
(1, -2),
(-1, -1),
(-1, 1),
(0, 2),
(2, 2),
Raise_Pen,
(5, -12),
(7, -11),
(8, -9),
(8, -7),
(7, -5),
(6, -4),
(4, -3),
Raise_Pen,
(-2, 7),
(-3, 8),
(-2, 9),
(-1, 8),
(-2, 7)));
Glyph_32 : aliased constant Glyph :=
(Number_Of_Vectors => 56,
Width => 27,
Height => 21,
Y_Offset => -12,
X_Offset => -13,
Vects => (Raise_Pen,
(5, -4),
(4, -6),
(2, -7),
(-1, -7),
(-3, -6),
(-4, -5),
(-5, -2),
(-5, 1),
(-4, 3),
(-2, 4),
(1, 4),
(3, 3),
(4, 1),
Raise_Pen,
(-1, -7),
(-3, -5),
(-4, -2),
(-4, 1),
(-3, 3),
(-2, 4),
Raise_Pen,
(5, -7),
(4, 1),
(4, 3),
(6, 4),
(8, 4),
(10, 2),
(11, -1),
(11, -3),
(10, -6),
(9, -8),
(7, -10),
(5, -11),
(2, -12),
(-1, -12),
(-4, -11),
(-6, -10),
(-8, -8),
(-9, -6),
(-10, -3),
(-10, 0),
(-9, 3),
(-8, 5),
(-6, 7),
(-4, 8),
(-1, 9),
(2, 9),
(5, 8),
(7, 7),
(8, 6),
Raise_Pen,
(6, -7),
(5, 1),
(5, 3),
(6, 4)));
Glyph_33 : aliased constant Glyph :=
(Number_Of_Vectors => 38,
Width => 23,
Height => 21,
Y_Offset => -12,
X_Offset => -13,
Vects => (Raise_Pen,
(6, -12),
(4, -10),
(2, -7),
(-1, -2),
(-3, 1),
(-6, 5),
(-9, 8),
(-11, 9),
(-13, 9),
(-14, 8),
(-14, 6),
(-13, 5),
(-12, 6),
(-13, 7),
Raise_Pen,
(6, -12),
(5, -8),
(3, 2),
(2, 9),
Raise_Pen,
(6, -12),
(3, 9),
Raise_Pen,
(2, 9),
(2, 7),
(1, 4),
(0, 2),
(-2, 0),
(-4, -1),
(-6, -1),
(-7, 0),
(-7, 2),
(-6, 5),
(-3, 8),
(0, 9),
(4, 9),
(6, 8)));
Glyph_34 : aliased constant Glyph :=
(Number_Of_Vectors => 70,
Width => 24,
Height => 21,
Y_Offset => -12,
X_Offset => -12,
Vects => (Raise_Pen,
(3, -11),
(2, -10),
(1, -8),
(-1, -3),
(-3, 3),
(-4, 5),
(-6, 8),
(-8, 9),
Raise_Pen,
(2, -10),
(1, -7),
(-1, 1),
(-2, 4),
(-3, 6),
(-5, 8),
(-8, 9),
(-10, 9),
(-11, 8),
(-11, 6),
(-10, 5),
(-9, 6),
(-10, 7),
Raise_Pen,
(-3, -6),
(-4, -4),
(-5, -3),
(-7, -3),
(-8, -4),
(-8, -6),
(-7, -8),
(-5, -10),
(-3, -11),
(0, -12),
(6, -12),
(8, -11),
(9, -9),
(9, -7),
(8, -5),
(6, -4),
(2, -3),
(0, -3),
Raise_Pen,
(6, -12),
(7, -11),
(8, -9),
(8, -7),
(7, -5),
(6, -4),
Raise_Pen,
(2, -3),
(5, -2),
(6, -1),
(7, 1),
(7, 4),
(6, 7),
(5, 8),
(3, 9),
(1, 9),
(0, 8),
(0, 6),
(1, 3),
Raise_Pen,
(2, -3),
(4, -2),
(5, -1),
(6, 1),
(6, 4),
(5, 7),
(3, 9)));
Glyph_35 : aliased constant Glyph :=
(Number_Of_Vectors => 41,
Width => 21,
Height => 21,
Y_Offset => -12,
X_Offset => -10,
Vects => (Raise_Pen,
(-7, -10),
(-8, -8),
(-8, -6),
(-7, -4),
(-4, -3),
(-1, -3),
(3, -4),
(5, -5),
(7, -7),
(8, -9),
(8, -11),
(7, -12),
(5, -12),
(2, -11),
(-1, -8),
(-3, -5),
(-5, -1),
(-6, 3),
(-6, 6),
(-5, 8),
(-2, 9),
(0, 9),
(3, 8),
(5, 6),
(6, 4),
(6, 2),
(5, 0),
(3, 0),
(1, 1),
(0, 3),
Raise_Pen,
(5, -12),
(3, -11),
(0, -8),
(-2, -5),
(-4, -1),
(-5, 3),
(-5, 6),
(-4, 8),
(-2, 9)));
Glyph_36 : aliased constant Glyph :=
(Number_Of_Vectors => 43,
Width => 23,
Height => 21,
Y_Offset => -12,
X_Offset => -12,
Vects => (Raise_Pen,
(3, -11),
(2, -10),
(1, -8),
(-1, -3),
(-3, 3),
(-4, 5),
(-6, 8),
(-8, 9),
Raise_Pen,
(2, -10),
(1, -7),
(-1, 1),
(-2, 4),
(-3, 6),
(-5, 8),
(-8, 9),
(-10, 9),
(-11, 8),
(-11, 6),
(-10, 5),
(-8, 5),
(-6, 6),
(-4, 8),
(-2, 9),
(1, 9),
(3, 8),
(5, 6),
(7, 2),
(8, -3),
(8, -6),
(7, -9),
(5, -11),
(3, -12),
(-2, -12),
(-5, -11),
(-7, -9),
(-8, -7),
(-8, -5),
(-7, -4),
(-5, -4),
(-4, -5),
(-3, -7)));
Glyph_37 : aliased constant Glyph :=
(Number_Of_Vectors => 49,
Width => 19,
Height => 21,
Y_Offset => -12,
X_Offset => -9,
Vects => (Raise_Pen,
(5, -9),
(4, -8),
(4, -6),
(5, -5),
(7, -5),
(8, -7),
(8, -9),
(7, -11),
(5, -12),
(2, -12),
(0, -11),
(-1, -10),
(-2, -8),
(-2, -6),
(-1, -4),
(1, -3),
Raise_Pen,
(2, -12),
(0, -10),
(-1, -8),
(-1, -5),
(1, -3),
Raise_Pen,
(1, -3),
(-1, -3),
(-4, -2),
(-6, 0),
(-7, 2),
(-7, 5),
(-6, 7),
(-5, 8),
(-3, 9),
(0, 9),
(3, 8),
(5, 6),
(6, 4),
(6, 2),
(5, 0),
(3, 0),
(1, 1),
(0, 3),
Raise_Pen,
(-1, -3),
(-3, -2),
(-5, 0),
(-6, 2),
(-6, 6),
(-5, 8)));
Glyph_38 : aliased constant Glyph :=
(Number_Of_Vectors => 46,
Width => 21,
Height => 21,
Y_Offset => -12,
X_Offset => -11,
Vects => (Raise_Pen,
(5, -10),
(4, -8),
(2, -3),
(0, 3),
(-1, 5),
(-3, 8),
(-5, 9),
Raise_Pen,
(-1, -6),
(-2, -4),
(-4, -3),
(-6, -3),
(-7, -5),
(-7, -7),
(-6, -9),
(-4, -11),
(-1, -12),
(9, -12),
(6, -11),
(5, -10),
(4, -7),
(2, 1),
(1, 4),
(0, 6),
(-2, 8),
(-5, 9),
(-7, 9),
(-9, 8),
(-10, 7),
(-10, 6),
(-9, 5),
(-8, 6),
(-9, 7),
Raise_Pen,
(1, -12),
(5, -11),
(6, -11),
Raise_Pen,
(-3, 1),
(-2, 0),
(0, -1),
(4, -1),
(6, -2),
(8, -5),
(6, 2)));
Glyph_39 : aliased constant Glyph :=
(Number_Of_Vectors => 53,
Width => 22,
Height => 21,
Y_Offset => -12,
X_Offset => -11,
Vects => (Raise_Pen,
(-8, -9),
(-9, -7),
(-9, -5),
(-8, -3),
(-6, -2),
(-3, -2),
(0, -3),
(2, -4),
(5, -7),
(6, -10),
(6, -11),
(5, -12),
(4, -12),
(2, -11),
(0, -9),
(-1, -7),
(-2, -4),
(-2, -1),
(-1, 1),
(1, 2),
(3, 2),
(5, 1),
(7, -1),
(8, -3),
Raise_Pen,
(5, -12),
(3, -11),
(1, -9),
(0, -7),
(-1, -4),
(-1, 0),
(1, 2),
Raise_Pen,
(8, -3),
(7, 1),
(5, 5),
(3, 7),
(1, 8),
(-3, 9),
(-6, 9),
(-8, 8),
(-9, 6),
(-9, 5),
(-8, 4),
(-7, 5),
(-8, 6),
Raise_Pen,
(7, 1),
(5, 4),
(3, 6),
(0, 8),
(-3, 9)));
Glyph_40 : aliased constant Glyph :=
(Number_Of_Vectors => 55,
Width => 24,
Height => 21,
Y_Offset => -12,
X_Offset => -12,
Vects => (Raise_Pen,
(-6, -6),
(-7, -7),
(-7, -9),
(-6, -11),
(-3, -12),
(0, -12),
(-3, -1),
(-5, 5),
(-6, 7),
(-7, 8),
(-9, 9),
(-11, 9),
(-12, 8),
(-12, 6),
(-11, 5),
(-10, 6),
(-11, 7),
Raise_Pen,
(0, -12),
(-3, -3),
(-4, 0),
(-6, 5),
(-7, 7),
(-9, 9),
Raise_Pen,
(-8, 2),
(-7, 1),
(-5, 0),
(4, -3),
(6, -4),
(9, -6),
(11, -8),
(12, -10),
(12, -11),
(11, -12),
(10, -12),
(8, -11),
(6, -8),
(5, -6),
(3, 0),
(2, 4),
(2, 7),
(4, 9),
(5, 9),
(7, 8),
(9, 6),
Raise_Pen,
(10, -12),
(8, -10),
(6, -6),
(4, 0),
(3, 4),
(3, 7),
(4, 9)));
Glyph_41 : aliased constant Glyph :=
(Number_Of_Vectors => 33,
Width => 16,
Height => 21,
Y_Offset => -12,
X_Offset => -9,
Vects => (Raise_Pen,
(5, -10),
(3, -7),
(1, -2),
(-1, 3),
(-2, 5),
(-4, 8),
(-6, 9),
Raise_Pen,
(7, -6),
(5, -4),
(2, -3),
(-1, -3),
(-3, -4),
(-4, -6),
(-4, -8),
(-3, -10),
(-1, -11),
(3, -12),
(7, -12),
(5, -10),
(4, -8),
(2, -2),
(0, 4),
(-1, 6),
(-3, 8),
(-6, 9),
(-8, 9),
(-9, 8),
(-9, 6),
(-8, 5),
(-7, 6),
(-8, 7)));
Glyph_42 : aliased constant Glyph :=
(Number_Of_Vectors => 34,
Width => 17,
Height => 25,
Y_Offset => -12,
X_Offset => -9,
Vects => (Raise_Pen,
(7, -12),
(5, -10),
(3, -7),
(1, -2),
(-2, 7),
(-4, 11),
Raise_Pen,
(7, -5),
(5, -3),
(2, -2),
(-1, -2),
(-3, -3),
(-4, -5),
(-4, -7),
(-3, -9),
(-1, -11),
(3, -12),
(7, -12),
(5, -9),
(4, -7),
(1, 2),
(-1, 6),
(-2, 8),
(-4, 11),
(-5, 12),
(-7, 13),
(-8, 12),
(-8, 10),
(-7, 8),
(-5, 6),
(-3, 5),
(0, 4),
(4, 3)));
Glyph_43 : aliased constant Glyph :=
(Number_Of_Vectors => 59,
Width => 24,
Height => 21,
Y_Offset => -12,
X_Offset => -12,
Vects => (Raise_Pen,
(-6, -6),
(-7, -7),
(-7, -9),
(-5, -11),
(-2, -12),
(0, -12),
(-3, -1),
(-5, 5),
(-6, 7),
(-7, 8),
(-9, 9),
(-11, 9),
(-12, 8),
(-12, 6),
(-11, 5),
(-10, 6),
(-11, 7),
Raise_Pen,
(0, -12),
(-3, -3),
(-4, 0),
(-6, 5),
(-7, 7),
(-9, 9),
Raise_Pen,
(8, -11),
(5, -7),
(3, -5),
(1, -4),
(-2, -3),
Raise_Pen,
(11, -11),
(10, -10),
(11, -9),
(12, -10),
(12, -11),
(11, -12),
(10, -12),
(8, -11),
(5, -6),
(4, -5),
(2, -4),
(-2, -3),
Raise_Pen,
(-2, -3),
(1, -2),
(2, 0),
(3, 7),
(4, 9),
Raise_Pen,
(-2, -3),
(0, -2),
(1, 0),
(2, 7),
(4, 9),
(5, 9),
(7, 8),
(9, 6)));
Glyph_44 : aliased constant Glyph :=
(Number_Of_Vectors => 40,
Width => 18,
Height => 21,
Y_Offset => -12,
X_Offset => -9,
Vects => (Raise_Pen,
(-5, -9),
(-6, -7),
(-6, -5),
(-5, -3),
(-3, -2),
(0, -2),
(3, -3),
(5, -4),
(8, -7),
(9, -10),
(9, -11),
(8, -12),
(7, -12),
(5, -11),
(4, -10),
(2, -7),
(-2, 3),
(-3, 5),
(-5, 8),
(-7, 9),
Raise_Pen,
(4, -10),
(2, -6),
(0, 1),
(-1, 4),
(-2, 6),
(-4, 8),
(-7, 9),
(-9, 9),
(-10, 8),
(-10, 6),
(-9, 5),
(-7, 5),
(-5, 6),
(-2, 8),
(0, 9),
(3, 9),
(5, 8),
(7, 6)));
Glyph_45 : aliased constant Glyph :=
(Number_Of_Vectors => 49,
Width => 28,
Height => 21,
Y_Offset => -12,
X_Offset => -14,
Vects => (Raise_Pen,
(0, -12),
(-4, -3),
(-7, 3),
(-9, 6),
(-11, 8),
(-13, 9),
(-15, 9),
(-16, 8),
(-16, 6),
(-15, 5),
(-14, 6),
(-15, 7),
Raise_Pen,
(0, -12),
(-2, -5),
(-3, -1),
(-4, 4),
(-4, 8),
(-2, 9),
Raise_Pen,
(0, -12),
(-1, -8),
(-2, -3),
(-3, 4),
(-3, 8),
(-2, 9),
Raise_Pen,
(9, -12),
(5, -3),
(0, 6),
(-2, 9),
Raise_Pen,
(9, -12),
(7, -5),
(6, -1),
(5, 4),
(5, 8),
(7, 9),
(8, 9),
(10, 8),
(12, 6),
Raise_Pen,
(9, -12),
(8, -8),
(7, -3),
(6, 4),
(6, 8),
(7, 9)));
Glyph_46 : aliased constant Glyph :=
(Number_Of_Vectors => 38,
Width => 23,
Height => 21,
Y_Offset => -12,
X_Offset => -11,
Vects => (Raise_Pen,
(0, -12),
(-1, -8),
(-3, -2),
(-5, 3),
(-6, 5),
(-8, 8),
(-10, 9),
(-12, 9),
(-13, 8),
(-13, 6),
(-12, 5),
(-11, 6),
(-12, 7),
Raise_Pen,
(0, -12),
(0, -7),
(1, 4),
(2, 9),
Raise_Pen,
(0, -12),
(1, -7),
(2, 4),
(2, 9),
Raise_Pen,
(14, -11),
(13, -10),
(14, -9),
(15, -10),
(15, -11),
(14, -12),
(12, -12),
(10, -11),
(8, -8),
(7, -6),
(5, -1),
(3, 5),
(2, 9)));
Glyph_47 : aliased constant Glyph :=
(Number_Of_Vectors => 34,
Width => 21,
Height => 21,
Y_Offset => -12,
X_Offset => -10,
Vects => (Raise_Pen,
(1, -12),
(-1, -11),
(-3, -9),
(-5, -6),
(-6, -4),
(-7, 0),
(-7, 4),
(-6, 7),
(-5, 8),
(-3, 9),
(-1, 9),
(2, 8),
(4, 6),
(6, 3),
(7, 1),
(8, -3),
(8, -7),
(7, -10),
(6, -11),
(5, -11),
(3, -10),
(1, -8),
(-1, -4),
(-2, 1),
(-2, 4),
Raise_Pen,
(-1, -11),
(-3, -8),
(-5, -4),
(-6, 0),
(-6, 4),
(-5, 7),
(-3, 9)));
Glyph_48 : aliased constant Glyph :=
(Number_Of_Vectors => 53,
Width => 23,
Height => 21,
Y_Offset => -12,
X_Offset => -12,
Vects => (Raise_Pen,
(3, -11),
(2, -10),
(1, -8),
(-1, -3),
(-3, 3),
(-4, 5),
(-6, 8),
(-8, 9),
Raise_Pen,
(2, -10),
(1, -7),
(-1, 1),
(-2, 4),
(-3, 6),
(-5, 8),
(-8, 9),
(-10, 9),
(-11, 8),
(-11, 6),
(-10, 5),
(-9, 6),
(-10, 7),
Raise_Pen,
(-3, -6),
(-4, -4),
(-5, -3),
(-7, -3),
(-8, -4),
(-8, -6),
(-7, -8),
(-5, -10),
(-3, -11),
(0, -12),
(4, -12),
(7, -11),
(8, -10),
(9, -8),
(9, -5),
(8, -3),
(7, -2),
(4, -1),
(2, -1),
(0, -2),
Raise_Pen,
(4, -12),
(6, -11),
(7, -10),
(8, -8),
(8, -5),
(7, -3),
(6, -2),
(4, -1)));
Glyph_49 : aliased constant Glyph :=
(Number_Of_Vectors => 43,
Width => 21,
Height => 21,
Y_Offset => -12,
X_Offset => -10,
Vects => (Raise_Pen,
(3, -8),
(3, -6),
(2, -4),
(1, -3),
(-1, -2),
(-3, -2),
(-4, -4),
(-4, -6),
(-3, -9),
(-1, -11),
(2, -12),
(5, -12),
(7, -11),
(8, -9),
(8, -5),
(7, -2),
(5, 1),
(1, 5),
(-2, 7),
(-4, 8),
(-7, 9),
(-9, 9),
(-10, 8),
(-10, 6),
(-9, 5),
(-7, 5),
(-5, 6),
(-2, 8),
(1, 9),
(4, 9),
(6, 8),
(8, 6),
Raise_Pen,
(5, -12),
(6, -11),
(7, -9),
(7, -5),
(6, -2),
(4, 1),
(1, 4),
(-3, 7),
(-7, 9)));
Glyph_50 : aliased constant Glyph :=
(Number_Of_Vectors => 65,
Width => 24,
Height => 21,
Y_Offset => -12,
X_Offset => -12,
Vects => (Raise_Pen,
(3, -11),
(2, -10),
(1, -8),
(-1, -3),
(-3, 3),
(-4, 5),
(-6, 8),
(-8, 9),
Raise_Pen,
(2, -10),
(1, -7),
(-1, 1),
(-2, 4),
(-3, 6),
(-5, 8),
(-8, 9),
(-10, 9),
(-11, 8),
(-11, 6),
(-10, 5),
(-9, 6),
(-10, 7),
Raise_Pen,
(-3, -6),
(-4, -4),
(-5, -3),
(-7, -3),
(-8, -4),
(-8, -6),
(-7, -8),
(-5, -10),
(-3, -11),
(0, -12),
(5, -12),
(8, -11),
(9, -9),
(9, -7),
(8, -5),
(7, -4),
(4, -3),
(0, -3),
Raise_Pen,
(5, -12),
(7, -11),
(8, -9),
(8, -7),
(7, -5),
(6, -4),
(4, -3),
Raise_Pen,
(0, -3),
(3, -2),
(4, 0),
(5, 7),
(6, 9),
Raise_Pen,
(0, -3),
(2, -2),
(3, 0),
(4, 7),
(6, 9),
(7, 9),
(9, 8),
(11, 6)));
Glyph_51 : aliased constant Glyph :=
(Number_Of_Vectors => 36,
Width => 20,
Height => 21,
Y_Offset => -12,
X_Offset => -10,
Vects => (Raise_Pen,
(-4, -9),
(-5, -7),
(-5, -5),
(-4, -3),
(-2, -2),
(1, -2),
(4, -3),
(6, -4),
(9, -7),
(10, -10),
(10, -11),
(9, -12),
(8, -12),
(6, -11),
(5, -10),
(4, -8),
(3, -5),
(1, 2),
(0, 5),
(-2, 8),
(-4, 9),
Raise_Pen,
(4, -8),
(3, -4),
(2, 3),
(1, 6),
(-1, 8),
(-4, 9),
(-7, 9),
(-9, 8),
(-10, 6),
(-10, 5),
(-9, 4),
(-8, 5),
(-9, 6)));
Glyph_52 : aliased constant Glyph :=
(Number_Of_Vectors => 38,
Width => 18,
Height => 21,
Y_Offset => -12,
X_Offset => -9,
Vects => (Raise_Pen,
(7, -10),
(6, -8),
(4, -3),
(2, 3),
(1, 5),
(-1, 8),
(-3, 9),
Raise_Pen,
(1, -6),
(0, -4),
(-2, -3),
(-4, -3),
(-5, -5),
(-5, -7),
(-4, -9),
(-2, -11),
(1, -12),
(10, -12),
(8, -11),
(7, -10),
(6, -7),
(4, 1),
(3, 4),
(2, 6),
(0, 8),
(-3, 9),
(-5, 9),
(-7, 8),
(-8, 7),
(-8, 6),
(-7, 5),
(-6, 6),
(-7, 7),
Raise_Pen,
(3, -12),
(7, -11),
(8, -11)));
Glyph_53 : aliased constant Glyph :=
(Number_Of_Vectors => 39,
Width => 22,
Height => 21,
Y_Offset => -12,
X_Offset => -11,
Vects => (Raise_Pen,
(-10, -8),
(-8, -11),
(-6, -12),
(-5, -12),
(-3, -10),
(-3, -7),
(-4, -4),
(-7, 4),
(-7, 7),
(-6, 9),
Raise_Pen,
(-5, -12),
(-4, -10),
(-4, -7),
(-7, 1),
(-8, 4),
(-8, 7),
(-6, 9),
(-4, 9),
(-2, 8),
(1, 5),
(3, 2),
(4, 0),
Raise_Pen,
(8, -12),
(4, 0),
(3, 4),
(3, 7),
(5, 9),
(6, 9),
(8, 8),
(10, 6),
Raise_Pen,
(9, -12),
(5, 0),
(4, 4),
(4, 7),
(5, 9)));
Glyph_54 : aliased constant Glyph :=
(Number_Of_Vectors => 36,
Width => 21,
Height => 21,
Y_Offset => -12,
X_Offset => -11,
Vects => (Raise_Pen,
(-10, -8),
(-8, -11),
(-6, -12),
(-5, -12),
(-3, -10),
(-3, -7),
(-4, -3),
(-6, 4),
(-6, 7),
(-5, 9),
Raise_Pen,
(-5, -12),
(-4, -10),
(-4, -7),
(-6, 0),
(-7, 4),
(-7, 7),
(-5, 9),
(-4, 9),
(-1, 8),
(2, 5),
(4, 2),
(6, -2),
(7, -5),
(8, -9),
(8, -11),
(7, -12),
(6, -12),
(5, -11),
(4, -9),
(4, -6),
(5, -4),
(7, -2),
(9, -1),
(11, -1)));
Glyph_55 : aliased constant Glyph :=
(Number_Of_Vectors => 41,
Width => 23,
Height => 21,
Y_Offset => -12,
X_Offset => -12,
Vects => (Raise_Pen,
(-9, -6),
(-10, -6),
(-11, -7),
(-11, -9),
(-10, -11),
(-8, -12),
(-4, -12),
(-5, -10),
(-6, -6),
(-7, 3),
(-8, 9),
Raise_Pen,
(-6, -6),
(-6, 3),
(-7, 9),
Raise_Pen,
(4, -12),
(2, -10),
(0, -6),
(-3, 3),
(-5, 7),
(-7, 9),
Raise_Pen,
(4, -12),
(3, -10),
(2, -6),
(1, 3),
(0, 9),
Raise_Pen,
(2, -6),
(2, 3),
(1, 9),
Raise_Pen,
(14, -12),
(12, -11),
(10, -9),
(8, -6),
(5, 3),
(3, 7),
(1, 9)));
Glyph_56 : aliased constant Glyph :=
(Number_Of_Vectors => 52,
Width => 20,
Height => 21,
Y_Offset => -12,
X_Offset => -10,
Vects => (Raise_Pen,
(-2, -7),
(-3, -6),
(-5, -6),
(-6, -7),
(-6, -9),
(-5, -11),
(-3, -12),
(-1, -12),
(1, -11),
(2, -9),
(2, -6),
(1, -2),
(-1, 3),
(-3, 6),
(-5, 8),
(-8, 9),
(-10, 9),
(-11, 8),
(-11, 6),
(-10, 5),
(-9, 6),
(-10, 7),
Raise_Pen,
(-1, -12),
(0, -11),
(1, -9),
(1, -6),
(0, -2),
(-2, 3),
(-4, 6),
(-6, 8),
(-8, 9),
Raise_Pen,
(11, -11),
(10, -10),
(11, -9),
(12, -10),
(12, -11),
(11, -12),
(9, -12),
(7, -11),
(5, -9),
(3, -6),
(1, -2),
(0, 3),
(0, 6),
(1, 8),
(2, 9),
(3, 9),
(5, 8),
(7, 6)));
Glyph_57 : aliased constant Glyph :=
(Number_Of_Vectors => 42,
Width => 22,
Height => 21,
Y_Offset => -12,
X_Offset => -11,
Vects => (Raise_Pen,
(-8, -8),
(-6, -11),
(-4, -12),
(-3, -12),
(-1, -11),
(-1, -9),
(-3, -3),
(-3, 0),
(-2, 2),
Raise_Pen,
(-3, -12),
(-2, -11),
(-2, -9),
(-4, -3),
(-4, 0),
(-2, 2),
(0, 2),
(3, 1),
(5, -1),
(7, -4),
(8, -6),
Raise_Pen,
(10, -12),
(8, -6),
(5, 2),
(3, 6),
Raise_Pen,
(11, -12),
(9, -6),
(7, -1),
(5, 3),
(3, 6),
(1, 8),
(-2, 9),
(-6, 9),
(-8, 8),
(-9, 6),
(-9, 5),
(-8, 4),
(-7, 5),
(-8, 6)));
Glyph_58 : aliased constant Glyph :=
(Number_Of_Vectors => 44,
Width => 21,
Height => 21,
Y_Offset => -12,
X_Offset => -11,
Vects => (Raise_Pen,
(8, -10),
(7, -8),
(5, -3),
(4, 0),
(3, 2),
(1, 5),
(-1, 7),
(-3, 8),
(-6, 9),
Raise_Pen,
(1, -6),
(0, -4),
(-2, -3),
(-4, -3),
(-5, -5),
(-5, -7),
(-4, -9),
(-2, -11),
(1, -12),
(11, -12),
(9, -11),
(8, -10),
(7, -7),
(6, -3),
(4, 3),
(2, 6),
(-1, 8),
(-6, 9),
(-10, 9),
(-11, 8),
(-11, 6),
(-10, 5),
(-8, 5),
(-6, 6),
(-3, 8),
(-1, 9),
(2, 9),
(5, 8),
(7, 6),
Raise_Pen,
(4, -12),
(8, -11),
(9, -11)));
Glyph_59 : aliased constant Glyph :=
(Number_Of_Vectors => 12,
Width => 14,
Height => 32,
Y_Offset => -16,
X_Offset => -7,
Vects => (Raise_Pen,
(-3, -16),
(-3, 16),
Raise_Pen,
(-2, -16),
(-2, 16),
Raise_Pen,
(-3, -16),
(4, -16),
Raise_Pen,
(-3, 16),
(4, 16)));
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 => 12,
Width => 14,
Height => 32,
Y_Offset => -16,
X_Offset => -7,
Vects => (Raise_Pen,
(2, -16),
(2, 16),
Raise_Pen,
(3, -16),
(3, 16),
Raise_Pen,
(-4, -16),
(3, -16),
Raise_Pen,
(-4, 16),
(3, 16)));
Glyph_62 : aliased constant Glyph :=
(Number_Of_Vectors => 11,
Width => 16,
Height => 18,
Y_Offset => -9,
X_Offset => -8,
Vects => (Raise_Pen,
(-2, -6),
(0, -9),
(2, -6),
Raise_Pen,
(-5, -3),
(0, -8),
(5, -3),
Raise_Pen,
(0, -8),
(0, 9)));
Glyph_63 : aliased constant Glyph :=
(Number_Of_Vectors => 3,
Width => 16,
Height => 0,
Y_Offset => 11,
X_Offset => -8,
Vects => (Raise_Pen,
(-8, 11),
(8, 11)));
Glyph_64 : aliased constant Glyph :=
(Number_Of_Vectors => 8,
Width => 11,
Height => 6,
Y_Offset => -12,
X_Offset => -5,
Vects => (Raise_Pen,
(4, -12),
(2, -10),
(1, -8),
(1, -7),
(2, -6),
(3, -7),
(2, -8)));
Glyph_65 : aliased constant Glyph :=
(Number_Of_Vectors => 33,
Width => 16,
Height => 9,
Y_Offset => 0,
X_Offset => -7,
Vects => (Raise_Pen,
(3, 3),
(2, 1),
(0, 0),
(-2, 0),
(-4, 1),
(-5, 2),
(-6, 4),
(-6, 6),
(-5, 8),
(-3, 9),
(-1, 9),
(1, 8),
(2, 6),
Raise_Pen,
(-2, 0),
(-4, 2),
(-5, 4),
(-5, 7),
(-3, 9),
Raise_Pen,
(4, 0),
(2, 6),
(2, 8),
(4, 9),
(6, 8),
(7, 7),
(9, 4),
Raise_Pen,
(5, 0),
(3, 6),
(3, 8),
(4, 9)));
Glyph_66 : aliased constant Glyph :=
(Number_Of_Vectors => 23,
Width => 14,
Height => 21,
Y_Offset => -12,
X_Offset => -6,
Vects => (Raise_Pen,
(-6, 4),
(-4, 1),
(-2, -3),
Raise_Pen,
(1, -12),
(-5, 6),
(-5, 8),
(-3, 9),
(-2, 9),
(0, 8),
(2, 6),
(3, 3),
(3, 0),
(4, 4),
(5, 5),
(6, 5),
(8, 4),
Raise_Pen,
(2, -12),
(-4, 6),
(-4, 8),
(-3, 9)));
Glyph_67 : aliased constant Glyph :=
(Number_Of_Vectors => 22,
Width => 12,
Height => 9,
Y_Offset => 0,
X_Offset => -6,
Vects => (Raise_Pen,
(2, 1),
(1, 2),
(2, 2),
(2, 1),
(1, 0),
(-1, 0),
(-3, 1),
(-4, 2),
(-5, 4),
(-5, 6),
(-4, 8),
(-2, 9),
(1, 9),
(4, 7),
(6, 4),
Raise_Pen,
(-1, 0),
(-3, 2),
(-4, 4),
(-4, 7),
(-2, 9)));
Glyph_68 : aliased constant Glyph :=
(Number_Of_Vectors => 33,
Width => 16,
Height => 21,
Y_Offset => -12,
X_Offset => -7,
Vects => (Raise_Pen,
(3, 3),
(2, 1),
(0, 0),
(-2, 0),
(-4, 1),
(-5, 2),
(-6, 4),
(-6, 6),
(-5, 8),
(-3, 9),
(-1, 9),
(1, 8),
(2, 6),
Raise_Pen,
(-2, 0),
(-4, 2),
(-5, 4),
(-5, 7),
(-3, 9),
Raise_Pen,
(8, -12),
(2, 6),
(2, 8),
(4, 9),
(6, 8),
(7, 7),
(9, 4),
Raise_Pen,
(9, -12),
(3, 6),
(3, 8),
(4, 9)));
Glyph_69 : aliased constant Glyph :=
(Number_Of_Vectors => 23,
Width => 12,
Height => 9,
Y_Offset => 0,
X_Offset => -6,
Vects => (Raise_Pen,
(-3, 7),
(-1, 6),
(0, 5),
(1, 3),
(1, 1),
(0, 0),
(-1, 0),
(-3, 1),
(-4, 2),
(-5, 4),
(-5, 6),
(-4, 8),
(-2, 9),
(1, 9),
(4, 7),
(6, 4),
Raise_Pen,
(-1, 0),
(-3, 2),
(-4, 4),
(-4, 7),
(-2, 9)));
Glyph_70 : aliased constant Glyph :=
(Number_Of_Vectors => 27,
Width => 9,
Height => 33,
Y_Offset => -12,
X_Offset => -3,
Vects => (Raise_Pen,
(0, 0),
(3, -3),
(5, -6),
(6, -9),
(6, -11),
(5, -12),
(3, -11),
(2, -9),
(-7, 18),
(-7, 20),
(-6, 21),
(-4, 20),
(-3, 17),
(-2, 8),
(-1, 9),
(1, 9),
(3, 8),
(4, 7),
(6, 4),
Raise_Pen,
(2, -9),
(1, -4),
(0, 0),
(-3, 9),
(-5, 14),
(-7, 18)));
Glyph_71 : aliased constant Glyph :=
(Number_Of_Vectors => 38,
Width => 16,
Height => 21,
Y_Offset => 0,
X_Offset => -7,
Vects => (Raise_Pen,
(3, 3),
(2, 1),
(0, 0),
(-2, 0),
(-4, 1),
(-5, 2),
(-6, 4),
(-6, 6),
(-5, 8),
(-3, 9),
(-1, 9),
(1, 8),
(2, 6),
Raise_Pen,
(-2, 0),
(-4, 2),
(-5, 4),
(-5, 7),
(-3, 9),
Raise_Pen,
(4, 0),
(-2, 18),
Raise_Pen,
(5, 0),
(2, 9),
(0, 14),
(-2, 18),
(-3, 20),
(-5, 21),
(-6, 20),
(-6, 18),
(-5, 15),
(-3, 13),
(0, 11),
(4, 9),
(7, 7),
(9, 4)));
Glyph_72 : aliased constant Glyph :=
(Number_Of_Vectors => 30,
Width => 15,
Height => 21,
Y_Offset => -12,
X_Offset => -6,
Vects => (Raise_Pen,
(-6, 4),
(-4, 1),
(-2, -3),
Raise_Pen,
(1, -12),
(-6, 9),
Raise_Pen,
(2, -12),
(-5, 9),
Raise_Pen,
(-3, 3),
(-1, 1),
(1, 0),
(2, 0),
(4, 1),
(4, 3),
(3, 6),
(3, 8),
(4, 9),
Raise_Pen,
(2, 0),
(3, 1),
(3, 3),
(2, 6),
(2, 8),
(4, 9),
(6, 8),
(7, 7),
(9, 4)));
Glyph_73 : aliased constant Glyph :=
(Number_Of_Vectors => 19,
Width => 8,
Height => 15,
Y_Offset => -6,
X_Offset => -4,
Vects => (Raise_Pen,
(1, -6),
(0, -5),
(1, -4),
(2, -5),
(1, -6),
Raise_Pen,
(-1, 0),
(-3, 6),
(-3, 8),
(-1, 9),
(1, 8),
(2, 7),
(4, 4),
Raise_Pen,
(0, 0),
(-2, 6),
(-2, 8),
(-1, 9)));
Glyph_74 : aliased constant Glyph :=
(Number_Of_Vectors => 24,
Width => 8,
Height => 27,
Y_Offset => -6,
X_Offset => -4,
Vects => (Raise_Pen,
(1, -6),
(0, -5),
(1, -4),
(2, -5),
(1, -6),
Raise_Pen,
(-1, 0),
(-7, 18),
Raise_Pen,
(0, 0),
(-3, 9),
(-5, 14),
(-7, 18),
(-8, 20),
(-10, 21),
(-11, 20),
(-11, 18),
(-10, 15),
(-8, 13),
(-5, 11),
(-1, 9),
(2, 7),
(4, 4)));
Glyph_75 : aliased constant Glyph :=
(Number_Of_Vectors => 31,
Width => 14,
Height => 21,
Y_Offset => -12,
X_Offset => -6,
Vects => (Raise_Pen,
(-6, 4),
(-4, 1),
(-2, -3),
Raise_Pen,
(1, -12),
(-6, 9),
Raise_Pen,
(2, -12),
(-5, 9),
Raise_Pen,
(3, 0),
(3, 1),
(4, 1),
(3, 0),
(2, 0),
(0, 2),
(-3, 3),
Raise_Pen,
(-3, 3),
(0, 4),
(1, 8),
(2, 9),
Raise_Pen,
(-3, 3),
(-1, 4),
(0, 8),
(2, 9),
(3, 9),
(6, 7),
(8, 4)));
Glyph_76 : aliased constant Glyph :=
(Number_Of_Vectors => 17,
Width => 8,
Height => 21,
Y_Offset => -12,
X_Offset => -4,
Vects => (Raise_Pen,
(-4, 4),
(-2, 1),
(0, -3),
Raise_Pen,
(3, -12),
(-3, 6),
(-3, 8),
(-1, 9),
(1, 8),
(2, 7),
(4, 4),
Raise_Pen,
(4, -12),
(-2, 6),
(-2, 8),
(-1, 9)));
Glyph_77 : aliased constant Glyph :=
(Number_Of_Vectors => 45,
Width => 25,
Height => 9,
Y_Offset => 0,
X_Offset => -13,
Vects => (Raise_Pen,
(-13, 4),
(-11, 1),
(-9, 0),
(-7, 1),
(-7, 3),
(-9, 9),
Raise_Pen,
(-9, 0),
(-8, 1),
(-8, 3),
(-10, 9),
Raise_Pen,
(-7, 3),
(-5, 1),
(-3, 0),
(-2, 0),
(0, 1),
(0, 3),
(-2, 9),
Raise_Pen,
(-2, 0),
(-1, 1),
(-1, 3),
(-3, 9),
Raise_Pen,
(0, 3),
(2, 1),
(4, 0),
(5, 0),
(7, 1),
(7, 3),
(6, 6),
(6, 8),
(7, 9),
Raise_Pen,
(5, 0),
(6, 1),
(6, 3),
(5, 6),
(5, 8),
(7, 9),
(9, 8),
(10, 7),
(12, 4)));
Glyph_78 : aliased constant Glyph :=
(Number_Of_Vectors => 32,
Width => 18,
Height => 9,
Y_Offset => 0,
X_Offset => -9,
Vects => (Raise_Pen,
(-9, 4),
(-7, 1),
(-5, 0),
(-3, 1),
(-3, 3),
(-5, 9),
Raise_Pen,
(-5, 0),
(-4, 1),
(-4, 3),
(-6, 9),
Raise_Pen,
(-3, 3),
(-1, 1),
(1, 0),
(2, 0),
(4, 1),
(4, 3),
(3, 6),
(3, 8),
(4, 9),
Raise_Pen,
(2, 0),
(3, 1),
(3, 3),
(2, 6),
(2, 8),
(4, 9),
(6, 8),
(7, 7),
(9, 4)));
Glyph_79 : aliased constant Glyph :=
(Number_Of_Vectors => 29,
Width => 14,
Height => 9,
Y_Offset => 0,
X_Offset => -7,
Vects => (Raise_Pen,
(0, 0),
(-2, 0),
(-4, 1),
(-5, 2),
(-6, 4),
(-6, 6),
(-5, 8),
(-3, 9),
(-1, 9),
(1, 8),
(2, 7),
(3, 5),
(3, 3),
(2, 1),
(0, 0),
(-1, 1),
(-1, 3),
(0, 5),
(2, 6),
(4, 6),
(6, 5),
(7, 4),
Raise_Pen,
(-2, 0),
(-4, 2),
(-5, 4),
(-5, 7),
(-3, 9)));
Glyph_80 : aliased constant Glyph :=
(Number_Of_Vectors => 30,
Width => 15,
Height => 27,
Y_Offset => -6,
X_Offset => -6,
Vects => (Raise_Pen,
(-6, 4),
(-4, 1),
(-2, -3),
Raise_Pen,
(-1, -6),
(-10, 21),
Raise_Pen,
(0, -6),
(-9, 21),
Raise_Pen,
(-3, 3),
(-1, 1),
(1, 0),
(2, 0),
(4, 1),
(4, 3),
(3, 6),
(3, 8),
(4, 9),
Raise_Pen,
(2, 0),
(3, 1),
(3, 3),
(2, 6),
(2, 8),
(4, 9),
(6, 8),
(7, 7),
(9, 4)));
Glyph_81 : aliased constant Glyph :=
(Number_Of_Vectors => 35,
Width => 16,
Height => 21,
Y_Offset => 0,
X_Offset => -7,
Vects => (Raise_Pen,
(3, 3),
(2, 1),
(0, 0),
(-2, 0),
(-4, 1),
(-5, 2),
(-6, 4),
(-6, 6),
(-5, 8),
(-3, 9),
(-1, 9),
(1, 8),
Raise_Pen,
(-2, 0),
(-4, 2),
(-5, 4),
(-5, 7),
(-3, 9),
Raise_Pen,
(4, 0),
(-2, 18),
(-2, 20),
(-1, 21),
(1, 20),
(2, 17),
(2, 9),
(4, 9),
(7, 7),
(9, 4),
Raise_Pen,
(5, 0),
(2, 9),
(0, 14),
(-2, 18)));
Glyph_82 : aliased constant Glyph :=
(Number_Of_Vectors => 24,
Width => 14,
Height => 9,
Y_Offset => 0,
X_Offset => -6,
Vects => (Raise_Pen,
(-6, 4),
(-4, 1),
(-2, 0),
(0, 1),
(0, 3),
(-2, 9),
Raise_Pen,
(-2, 0),
(-1, 1),
(-1, 3),
(-3, 9),
Raise_Pen,
(0, 3),
(2, 1),
(4, 0),
(5, 0),
(4, 3),
Raise_Pen,
(4, 0),
(4, 3),
(5, 5),
(6, 5),
(8, 4)));
Glyph_83 : aliased constant Glyph :=
(Number_Of_Vectors => 22,
Width => 12,
Height => 10,
Y_Offset => -1,
X_Offset => -4,
Vects => (Raise_Pen,
(-4, 4),
(-2, 1),
(-1, -1),
(-1, 1),
(2, 3),
(3, 5),
(3, 7),
(2, 8),
(0, 9),
Raise_Pen,
(-1, 1),
(1, 3),
(2, 5),
(2, 7),
(0, 9),
Raise_Pen,
(-4, 8),
(-2, 9),
(3, 9),
(6, 7),
(8, 4)));
Glyph_84 : aliased constant Glyph :=
(Number_Of_Vectors => 20,
Width => 8,
Height => 21,
Y_Offset => -12,
X_Offset => -4,
Vects => (Raise_Pen,
(-4, 4),
(-2, 1),
(0, -3),
Raise_Pen,
(3, -12),
(-3, 6),
(-3, 8),
(-1, 9),
(1, 8),
(2, 7),
(4, 4),
Raise_Pen,
(4, -12),
(-2, 6),
(-2, 8),
(-1, 9),
Raise_Pen,
(-2, -4),
(4, -4)));
Glyph_85 : aliased constant Glyph :=
(Number_Of_Vectors => 27,
Width => 16,
Height => 9,
Y_Offset => 0,
X_Offset => -7,
Vects => (Raise_Pen,
(-4, 0),
(-6, 6),
(-6, 8),
(-4, 9),
(-3, 9),
(-1, 8),
(1, 6),
(3, 3),
Raise_Pen,
(-3, 0),
(-5, 6),
(-5, 8),
(-4, 9),
Raise_Pen,
(4, 0),
(2, 6),
(2, 8),
(4, 9),
(6, 8),
(7, 7),
(9, 4),
Raise_Pen,
(5, 0),
(3, 6),
(3, 8),
(4, 9)));
Glyph_86 : aliased constant Glyph :=
(Number_Of_Vectors => 23,
Width => 15,
Height => 9,
Y_Offset => 0,
X_Offset => -7,
Vects => (Raise_Pen,
(-4, 0),
(-5, 2),
(-6, 5),
(-6, 8),
(-4, 9),
(-3, 9),
(0, 8),
(2, 6),
(3, 3),
(3, 0),
Raise_Pen,
(-3, 0),
(-4, 2),
(-5, 5),
(-5, 8),
(-4, 9),
Raise_Pen,
(3, 0),
(4, 4),
(5, 5),
(6, 5),
(8, 4)));
Glyph_87 : aliased constant Glyph :=
(Number_Of_Vectors => 36,
Width => 21,
Height => 9,
Y_Offset => 0,
X_Offset => -10,
Vects => (Raise_Pen,
(-6, 0),
(-8, 2),
(-9, 5),
(-9, 8),
(-7, 9),
(-6, 9),
(-4, 8),
(-2, 6),
Raise_Pen,
(-5, 0),
(-7, 2),
(-8, 5),
(-8, 8),
(-7, 9),
Raise_Pen,
(0, 0),
(-2, 6),
(-2, 8),
(0, 9),
(1, 9),
(3, 8),
(5, 6),
(6, 3),
(6, 0),
Raise_Pen,
(1, 0),
(-1, 6),
(-1, 8),
(0, 9),
Raise_Pen,
(6, 0),
(7, 4),
(8, 5),
(9, 5),
(11, 4)));
Glyph_88 : aliased constant Glyph :=
(Number_Of_Vectors => 42,
Width => 16,
Height => 9,
Y_Offset => 0,
X_Offset => -8,
Vects => (Raise_Pen,
(-8, 4),
(-6, 1),
(-4, 0),
(-2, 0),
(-1, 1),
(-1, 3),
(-2, 6),
(-3, 8),
(-5, 9),
(-6, 9),
(-7, 8),
(-7, 7),
(-6, 7),
(-7, 8),
Raise_Pen,
(5, 1),
(4, 2),
(5, 2),
(5, 1),
(4, 0),
(3, 0),
(1, 1),
(0, 3),
(-1, 6),
(-1, 8),
(0, 9),
(3, 9),
(6, 7),
(8, 4),
Raise_Pen,
(-1, 1),
(0, 3),
Raise_Pen,
(1, 1),
(-1, 3),
Raise_Pen,
(-2, 6),
(-1, 8),
Raise_Pen,
(-1, 6),
(-3, 8)));
Glyph_89 : aliased constant Glyph :=
(Number_Of_Vectors => 32,
Width => 16,
Height => 21,
Y_Offset => 0,
X_Offset => -7,
Vects => (Raise_Pen,
(-4, 0),
(-6, 6),
(-6, 8),
(-4, 9),
(-3, 9),
(-1, 8),
(1, 6),
(3, 3),
Raise_Pen,
(-3, 0),
(-5, 6),
(-5, 8),
(-4, 9),
Raise_Pen,
(4, 0),
(-2, 18),
Raise_Pen,
(5, 0),
(2, 9),
(0, 14),
(-2, 18),
(-3, 20),
(-5, 21),
(-6, 20),
(-6, 18),
(-5, 15),
(-3, 13),
(0, 11),
(4, 9),
(7, 7),
(9, 4)));
Glyph_90 : aliased constant Glyph :=
(Number_Of_Vectors => 38,
Width => 13,
Height => 21,
Y_Offset => 0,
X_Offset => -6,
Vects => (Raise_Pen,
(-6, 4),
(-4, 1),
(-2, 0),
(0, 0),
(2, 1),
(2, 4),
(1, 6),
(-2, 8),
(-4, 9),
Raise_Pen,
(0, 0),
(1, 1),
(1, 4),
(0, 6),
(-2, 8),
Raise_Pen,
(-4, 9),
(-2, 10),
(-1, 12),
(-1, 15),
(-2, 18),
(-4, 20),
(-6, 21),
(-7, 20),
(-7, 18),
(-6, 15),
(-3, 12),
(0, 10),
(4, 7),
(7, 4),
Raise_Pen,
(-4, 9),
(-3, 10),
(-2, 12),
(-2, 15),
(-3, 18),
(-4, 20)));
Glyph_91 : aliased constant Glyph :=
(Number_Of_Vectors => 40,
Width => 14,
Height => 32,
Y_Offset => -16,
X_Offset => -7,
Vects => (Raise_Pen,
(2, -16),
(0, -15),
(-1, -14),
(-2, -12),
(-2, -10),
(-1, -8),
(0, -7),
(1, -5),
(1, -3),
(-1, -1),
Raise_Pen,
(0, -15),
(-1, -13),
(-1, -11),
(0, -9),
(1, -8),
(2, -6),
(2, -4),
(1, -2),
(-3, 0),
(1, 2),
(2, 4),
(2, 6),
(1, 8),
(0, 9),
(-1, 11),
(-1, 13),
(0, 15),
Raise_Pen,
(-1, 1),
(1, 3),
(1, 5),
(0, 7),
(-1, 8),
(-2, 10),
(-2, 12),
(-1, 14),
(0, 15),
(2, 16)));
Glyph_92 : aliased constant Glyph :=
(Number_Of_Vectors => 3,
Width => 8,
Height => 32,
Y_Offset => -16,
X_Offset => -4,
Vects => (Raise_Pen,
(0, -16),
(0, 16)));
Glyph_93 : aliased constant Glyph :=
(Number_Of_Vectors => 40,
Width => 14,
Height => 32,
Y_Offset => -16,
X_Offset => -7,
Vects => (Raise_Pen,
(-2, -16),
(0, -15),
(1, -14),
(2, -12),
(2, -10),
(1, -8),
(0, -7),
(-1, -5),
(-1, -3),
(1, -1),
Raise_Pen,
(0, -15),
(1, -13),
(1, -11),
(0, -9),
(-1, -8),
(-2, -6),
(-2, -4),
(-1, -2),
(3, 0),
(-1, 2),
(-2, 4),
(-2, 6),
(-1, 8),
(0, 9),
(1, 11),
(1, 13),
(0, 15),
Raise_Pen,
(1, 1),
(-1, 3),
(-1, 5),
(0, 7),
(1, 8),
(2, 10),
(2, 12),
(1, 14),
(0, 15),
(-2, 16)));
Glyph_94 : 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)));
Glyph_95 : aliased constant Glyph :=
(Number_Of_Vectors => 14,
Width => 15,
Height => 8,
Y_Offset => -12,
X_Offset => -7,
Vects => (Raise_Pen,
(1, -12),
(-1, -11),
(-2, -9),
(-2, -7),
(-1, -5),
(1, -4),
(3, -4),
(5, -5),
(6, -7),
(6, -9),
(5, -11),
(3, -12),
(1, -12)));
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 => 33);
Font : constant Giza.Font.Ref_Const := Font_D'Access;
end Giza.Hershey_Fonts.Scriptc;
|
-- Copyright (c) 2019 Maxim Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-- License-Filename: LICENSE
-------------------------------------------------------------
with Program.Lexical_Elements;
with Program.Elements.Enumeration_Literal_Specifications;
with Program.Elements.Enumeration_Types;
with Program.Element_Visitors;
package Program.Nodes.Enumeration_Types is
pragma Preelaborate;
type Enumeration_Type is
new Program.Nodes.Node
and Program.Elements.Enumeration_Types.Enumeration_Type
and Program.Elements.Enumeration_Types.Enumeration_Type_Text
with private;
function Create
(Left_Bracket_Token : not null Program.Lexical_Elements
.Lexical_Element_Access;
Literals : not null Program.Elements
.Enumeration_Literal_Specifications
.Enumeration_Literal_Specification_Vector_Access;
Right_Bracket_Token : not null Program.Lexical_Elements
.Lexical_Element_Access)
return Enumeration_Type;
type Implicit_Enumeration_Type is
new Program.Nodes.Node
and Program.Elements.Enumeration_Types.Enumeration_Type
with private;
function Create
(Literals : not null Program.Elements
.Enumeration_Literal_Specifications
.Enumeration_Literal_Specification_Vector_Access;
Is_Part_Of_Implicit : Boolean := False;
Is_Part_Of_Inherited : Boolean := False;
Is_Part_Of_Instance : Boolean := False)
return Implicit_Enumeration_Type
with Pre =>
Is_Part_Of_Implicit or Is_Part_Of_Inherited or Is_Part_Of_Instance;
private
type Base_Enumeration_Type is
abstract new Program.Nodes.Node
and Program.Elements.Enumeration_Types.Enumeration_Type
with record
Literals : not null Program.Elements.Enumeration_Literal_Specifications
.Enumeration_Literal_Specification_Vector_Access;
end record;
procedure Initialize (Self : aliased in out Base_Enumeration_Type'Class);
overriding procedure Visit
(Self : not null access Base_Enumeration_Type;
Visitor : in out Program.Element_Visitors.Element_Visitor'Class);
overriding function Literals
(Self : Base_Enumeration_Type)
return not null Program.Elements.Enumeration_Literal_Specifications
.Enumeration_Literal_Specification_Vector_Access;
overriding function Is_Enumeration_Type_Element
(Self : Base_Enumeration_Type)
return Boolean;
overriding function Is_Type_Definition_Element
(Self : Base_Enumeration_Type)
return Boolean;
overriding function Is_Definition_Element
(Self : Base_Enumeration_Type)
return Boolean;
type Enumeration_Type is
new Base_Enumeration_Type
and Program.Elements.Enumeration_Types.Enumeration_Type_Text
with record
Left_Bracket_Token : not null Program.Lexical_Elements
.Lexical_Element_Access;
Right_Bracket_Token : not null Program.Lexical_Elements
.Lexical_Element_Access;
end record;
overriding function To_Enumeration_Type_Text
(Self : aliased in out Enumeration_Type)
return Program.Elements.Enumeration_Types.Enumeration_Type_Text_Access;
overriding function Left_Bracket_Token
(Self : Enumeration_Type)
return not null Program.Lexical_Elements.Lexical_Element_Access;
overriding function Right_Bracket_Token
(Self : Enumeration_Type)
return not null Program.Lexical_Elements.Lexical_Element_Access;
type Implicit_Enumeration_Type is
new Base_Enumeration_Type
with record
Is_Part_Of_Implicit : Boolean;
Is_Part_Of_Inherited : Boolean;
Is_Part_Of_Instance : Boolean;
end record;
overriding function To_Enumeration_Type_Text
(Self : aliased in out Implicit_Enumeration_Type)
return Program.Elements.Enumeration_Types.Enumeration_Type_Text_Access;
overriding function Is_Part_Of_Implicit
(Self : Implicit_Enumeration_Type)
return Boolean;
overriding function Is_Part_Of_Inherited
(Self : Implicit_Enumeration_Type)
return Boolean;
overriding function Is_Part_Of_Instance
(Self : Implicit_Enumeration_Type)
return Boolean;
end Program.Nodes.Enumeration_Types;
|
pragma Task_Dispatching_Policy(FIFO_Within_Priorities);
with Ada.Text_Io; use Ada.Text_Io;
with Ada.Real_Time; use Ada.Real_Time;
with Ada.Real_Time.Timing_Events; use Ada.Real_Time.Timing_Events;
with Example1; use Example1;
procedure Firm is
task type Periodic_Firm is
pragma Priority(5);
end Periodic_Firm;
task body Periodic_Firm is
Next : Time;
Interval : Time_Span := Milliseconds(1);
begin
Next := Clock + Interval;
loop
select
delay until Next;
Put("-");
then abort
Sense;
end select;
delay until Next;
Next := Next + Interval;
end loop;
end Periodic_Firm;
ftask : Periodic_Firm;
begin
Put_Line("Firm_Task!");
end Firm;
|
-----------------------------------------------------------------------
-- Util.Concurrent -- Concurrent Counters
-- Copyright (C) 2009, 2010, 2015 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- 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.
-----------------------------------------------------------------------
-- The <b>Counters</b> package defines the <b>Counter</b> type which provides
-- atomic increment and decrement operations. It is intended to be used to
-- implement reference counting in a multi-threaded environment.
--
-- type Ref is record
-- Cnt : Counter;
-- Data : ...;
-- end record;
--
-- Object : access Ref;
-- Is_Last : Boolean;
-- begin
-- Decrement (Object.Cnt, Is_Last); -- Multi-task safe operation
-- if Is_Last then
-- Free (Object);
-- end if;
--
-- Unlike the Ada portable implementation based on protected type, this implementation
-- does not require that <b>Counter</b> be a limited type.
private with Interfaces;
package Util.Concurrent.Counters is
pragma Preelaborate;
-- ------------------------------
-- Atomic Counter
-- ------------------------------
-- The atomic <b>Counter</b> implements a simple counter that can be
-- incremented or decremented atomically.
type Counter is private;
type Counter_Access is access all Counter;
-- Increment the counter atomically.
procedure Increment (C : in out Counter);
pragma Inline_Always (Increment);
-- Increment the counter atomically and return the value before increment.
procedure Increment (C : in out Counter;
Value : out Integer);
pragma Inline_Always (Increment);
-- Decrement the counter atomically.
procedure Decrement (C : in out Counter);
pragma Inline_Always (Decrement);
-- Decrement the counter atomically and return a status.
procedure Decrement (C : in out Counter;
Is_Zero : out Boolean);
pragma Inline_Always (Decrement);
-- Get the counter value
function Value (C : in Counter) return Integer;
pragma Inline_Always (Value);
ONE : constant Counter;
private
-- This implementation works without an Ada protected type:
-- o The size of the target object is 10 times smaller.
-- o Increment and Decrement operations are 5 times faster.
-- o It works by using special instructions
-- o The counter is Atomic to make sure the compiler will use atomic read/write instructions
-- and it prevents optimization (Atomic implies Volatile). The Atomic does not mean
-- that atomic instructions are used.
type Counter is record
Value : Interfaces.Unsigned_32 := 0;
pragma Atomic (Value);
end record;
ONE : constant Counter := Counter '(Value => 1);
end Util.Concurrent.Counters;
|
with
gel.remote.World,
gel.Sprite,
gel.Joint,
openGL.Model,
physics.Space,
-- physics.Engine,
physics.Model,
lace.Event,
lace.Observer,
lace.Subject,
lace.Subject_and_deferred_Observer,
lace.Any,
ada.Tags.generic_dispatching_Constructor,
ada.unchecked_Conversion,
ada.Containers.Vectors,
ada.Containers.hashed_Maps;
limited
with
openGL.Renderer.lean;
package gel.World
--
-- Provides a gel world.
--
is
type Item is limited new lace.Subject_and_deferred_Observer.item
and gel.remote.World.item
with private;
type View is access all Item'Class;
type Views is array (math.Index range <>) of View; -- TODO: Use a Positive type instead of 'math.Index'.
use Math;
---------
-- Forge
--
package Forge
is
function to_World (Name : in String;
Id : in world_Id;
space_Kind : in physics.space_Kind;
Renderer : access openGL.Renderer.lean.item'Class) return gel.World.item;
function new_World (Name : in String;
Id : in world_Id;
space_Kind : in physics.space_Kind;
Renderer : access openGL.Renderer.lean.item'Class) return gel.World.view;
end Forge;
overriding
procedure destroy (Self : in out Item);
procedure free (Self : in out View);
--------------
-- Attributes
--
function local_Observer (Self : in Item) return lace.Observer.view;
function local_Subject (Self : in Item) return lace.Subject .view;
function Id (Self : in Item) return world_Id;
function Age (Self : in Item) return Duration;
procedure Age_is (Self : in out Item; Now : in Duration);
procedure Gravity_is (Self : in out Item; Now : in Vector_3);
function space_Kind (Self : in Item) return physics.space_Kind;
function Space (Self : in Item) return physics.Space.view;
procedure update_Bounds (Self : in out Item; of_Sprite : in gel.Sprite.view);
procedure update_Site (Self : in out Item; of_Sprite : in gel.Sprite.view;
To : in Vector_3);
procedure update_Scale (Self : in out Item; of_Sprite : in gel.Sprite.view;
To : in Vector_3);
procedure set_Speed (Self : in out Item; of_Sprite : in gel.Sprite.view;
To : in Vector_3);
procedure set_xy_Spin (Self : in out Item; of_Sprite : in gel.Sprite.view;
To : in Radians);
procedure apply_Force (Self : in out Item; to_Sprite : in gel.Sprite.view;
Force : in Vector_3);
-----------
-- Sprites
--
function new_sprite_Id (Self : access Item) return sprite_Id;
function free_sprite_Set (Self : access Item) return gel.Sprite.views;
function Sprites (Self : in Item) return gel.Sprite.views;
function fetch_Sprite (Self : in Item; Id : in sprite_Id) return gel.Sprite.view;
procedure destroy (Self : in out Item; the_Sprite : in gel.Sprite.view);
procedure set_Scale (Self : in out Item; for_Sprite : in gel.Sprite.view;
To : in Vector_3);
type sprite_transform_Pair is
record
Sprite : gel.Sprite.view;
Transform : Matrix_4x4;
end record;
type sprite_transform_Pairs is array (Positive range <>) of sprite_transform_Pair;
function sprite_Transforms (Self : in Item) return sprite_transform_Pairs;
----------
--- Joints
--
procedure destroy (Self : in out Item; the_Joint : in gel.Joint.view);
procedure set_local_Anchor_on_A (Self : in out Item; for_Joint : in gel.Joint.view;
To : in Vector_3);
procedure set_local_Anchor_on_B (Self : in out Item; for_Joint : in gel.Joint.view;
To : in Vector_3);
--------------
--- Collisions
--
type a_Contact is
record
Site : Vector_3;
end record;
type Contacts is array (Positive range 1 .. 4) of a_Contact;
type a_Manifold is
record
Sprites : Sprite.views (1 .. 2);
Contact : a_Contact;
end record;
type Manifold_array is array (Positive range <>) of a_Manifold;
function manifold_Count (Self : in Item) return Natural;
function Manifold (Self : in Item; Index : in Positive) return a_Manifold;
function Manifolds (Self : in Item) return Manifold_array;
type impact_Filter is access function (the_Manifold : in a_Manifold) return Boolean;
--
-- Returns True if the impact is of interest and requires a response.
type impact_Response is access procedure (the_Manifold : in a_Manifold;
the_World : in World.view);
procedure add_impact_Response (Self : in out Item; Filter : in impact_Filter;
Response : in impact_Response);
--------------
--- Operations
--
procedure is_a_Mirror (Self : access Item'Class; of_World : in gel.remote.World.view);
procedure add (Self : in out Item; the_Model : in openGL .Model.view);
procedure add (Self : in out Item; the_Model : in physics.Model.view);
procedure add (Self : access Item; the_Sprite : in gel.Sprite.view;
and_Children : in Boolean := False);
procedure add (Self : in out Item; the_Joint : in gel.Joint.view);
procedure rid (Self : in out Item; the_Sprite : in gel.Sprite.view;
and_Children : in Boolean := False);
procedure rid (Self : in out Item; the_Joint : in gel.Joint.view);
procedure start (Self : access Item);
procedure evolve (Self : in out Item; By : in Duration);
procedure allow_broken_Joints (Self : out Item);
procedure handle_broken_Joints (Self : in out Item; the_Joints : in Joint.views);
--
-- Detaches any broken joints from associated sprites.
-- Override this to do custom handling of broken joints.
-- tbd: This should be in private section and only available to child packages.
---------------
--- Ray Casting
--
type ray_Collision is
record
near_Sprite : gel.Sprite.view;
hit_Fraction : Real;
Normal_world : Vector_3;
Site_world : Vector_3;
end record;
type Any_limited_view is access all lace.Any.limited_item'Class;
type raycast_collision_Event is new lace.Event.item with
record
near_Sprite : gel.Sprite.view;
Context : Any_limited_view;
Site_world : Vector_3;
end record;
overriding
procedure destruct (Self : in out raycast_collision_Event);
type no_Parameters is null record;
function to_raycast_collision_Event (Params : not null access no_Parameters) return raycast_collision_Event;
function raycast_collision_Event_dispatching_Constructor is new ada.Tags.generic_dispatching_Constructor (raycast_collision_Event,
Parameters => no_Parameters,
Constructor => to_raycast_collision_Event);
procedure cast_Ray (Self : in Item; From, To : in Vector_3;
Observer : in lace.Observer.view;
Context : access lace.Any.limited_Item'Class;
Event_Kind : in raycast_collision_Event'Class);
--
-- Casts a ray between From and To.
-- The Observer is informed of the 1st collision with a Sprite via a raycast_collision_Event.
-- Context is optional and is passed back to the Observer within the Context field of the raycast_collision_Event
-- for use by the raycast_collision_Event response.
--------------------
--- World Mirroring
--
overriding
procedure register (Self : access Item; the_Mirror : in remote.World.view;
Mirror_as_observer : in lace.Observer.view);
overriding
procedure deregister (Self : access Item; the_Mirror : in remote.World.view);
overriding
procedure motion_Updates_are (Self : in Item; Now : in remote.World.motion_Updates);
--
-- 'Self' must use 'in' as mode to ensure async transmission with DSA.
overriding
function graphics_Models (Self : in Item) return remote.World.graphics_Model_Set;
overriding
function physics_Models (Self : in Item) return remote.World.physics_Model_Set;
overriding
function Sprites (Self : in Item) return remote.World.sprite_model_Pairs;
----------
--- Models
--
-- Graphics Models
--
use type openGL.Model.view;
use type gel.graphics_model_Id;
function Hash is new ada.unchecked_Conversion (gel.graphics_model_Id, ada.Containers.Hash_type);
package id_Maps_of_model is new ada.Containers.hashed_Maps (gel.graphics_model_Id, openGL.Model.view,
Hash, "=");
function local_graphics_Models (Self : in Item) return id_Maps_of_model.Map;
-- Physics Models
--
use type Standard.physics.Model.view,
Standard.physics.model_Id;
function Hash is new ada.unchecked_Conversion (physics.model_Id, ada.Containers.Hash_type);
package id_Maps_of_physics_model is new ada.Containers.hashed_Maps (physics.model_Id, physics.Model.view,
Hash, "=");
function local_physics_Models (Self : in Item) return id_Maps_of_physics_model.Map;
---------
--- Misc
--
procedure wait_on_Evolve (Self : in out Item);
------------------
--- Testing/Debug
--
overriding
procedure kick_Sprite (Self : in out Item; sprite_Id : in gel.Sprite_Id);
private
----------
--- Engine
--
-- task
-- type Engine (the_World : access gel.World.item'Class)
-- is
-- entry start (space_Kind : in physics.space_Kind);
-- entry stop;
--
-- entry reset_Age;
--
-- pragma storage_Size (20_000_000);
-- end Engine;
--
-- type Engine_view is access all Engine;
-----------------
--- Signal Object
--
protected
type signal_Object
is
entry wait;
procedure signal;
private
Open : Boolean := False;
end signal_Object;
type signal_Object_view is access all signal_Object;
----------------------------
--- sprite_transform_Updater
--
-- task
-- type sprite_transform_Updater (the_World : access gel.World.item'Class)
-- is
-- entry stop;
-- end sprite_transform_Updater;
--
-- type sprite_transform_Updater_view is access all sprite_transform_Updater;
---------------------
--- id_Maps_of_sprite
--
use type Sprite.view;
function Hash is new ada.unchecked_Conversion (gel.sprite_Id, ada.Containers.Hash_type);
package id_Maps_of_sprite is new ada.Containers.hashed_Maps (gel.sprite_Id, gel.Sprite.view,
Hash => Hash,
equivalent_Keys => "=");
-----------------------------
--- sprite_Maps_of_transforms
--
function Hash is new ada.unchecked_Conversion (gel.Sprite.view, ada.Containers.Hash_type);
package sprite_Maps_of_transforms is new ada.Containers.hashed_Maps (Sprite.view, Matrix_4x4,
Hash => Hash,
equivalent_Keys => "=");
-------------------------
--- all_sprite_Transforms
--
protected
type all_sprite_Transforms
is
procedure add (the_Sprite : in Sprite.view;
Transform : in Matrix_4x4);
procedure set (To : in sprite_Maps_of_transforms.Map);
function fetch return sprite_Maps_of_transforms.Map;
private
sprite_Map_of_transforms : sprite_Maps_of_transforms.Map;
end all_sprite_Transforms;
-----------------
--- Duration_safe
--
protected
type Duration_safe
is
procedure Duration_is (Now : in Duration);
function Duration return Duration;
private
the_Duration : standard.Duration;
end Duration_safe;
-----------
--- Mirrors
--
use type remote.World.View;
package world_Vectors is new ada.Containers.Vectors (Positive, remote.World.view);
subtype world_Vector is world_Vectors.Vector;
-------------------
--- Engine Commands
--
-- type command_Kind is (add_Sprite,
-- rid_Sprite,
-- -- scale_Sprite,
-- destroy_Sprite,
-- -- update_Bounds,
-- update_Site,
-- -- set_Speed,
-- -- apply_Force,
-- -- set_xy_Spin,
-- -- add_Joint,
-- -- rid_Joint,
-- -- set_Joint_local_Anchor,
-- free_Joint,
-- cast_Ray,
-- new_impact_Response);
-- -- set_Gravity);
--
-- type Command (Kind : command_Kind := command_Kind'First) is
-- record
-- Sprite : gel.Sprite.view;
--
-- case Kind
-- is
-- when add_Sprite =>
-- add_Children : Boolean;
--
-- when rid_Sprite =>
-- rid_Children : Boolean;
--
-- when update_Site =>
-- Site : Vector_3;
--
-- -- when scale_Sprite =>
-- -- Scale : math.Vector_3;
--
-- -- when apply_Force =>
-- -- Force : math.Vector_3;
--
-- -- when set_Speed =>
-- -- Speed : math.Vector_3;
--
-- -- when set_xy_Spin =>
-- -- xy_Spin : math.Radians;
--
-- when --add_Joint |
-- -- rid_Joint |
-- free_Joint =>
-- Joint : gel.Joint.view;
--
-- -- when set_Joint_local_Anchor =>
-- -- anchor_Joint : gel.Joint.view;
-- -- is_Anchor_A : Boolean; -- When false, is anchor B.
-- -- local_Anchor : math.Vector_3;
--
-- when cast_Ray =>
-- From, To : Vector_3;
-- Observer : lace.Observer.view;
-- Context : Any_limited_view;
-- event_Kind : ada.Tags.Tag;
--
-- when new_impact_Response =>
-- Filter : impact_Filter;
-- Response : impact_Response;
--
-- -- when set_Gravity =>
-- -- Gravity : math.Vector_3;
--
-- when others =>
-- null;
-- end case;
-- end record;
--
-- type Commands is array (Positive range 1 .. 200_000) of Command;
--
--
-- protected
-- type safe_command_Set
-- is
-- function is_Empty return Boolean;
--
-- procedure add (the_Command : in Command);
-- procedure Fetch (To : out Commands;
-- Count : out Natural);
-- private
-- Set : Commands;
-- the_Count : Natural := 0;
-- end safe_command_Set;
--
-- type safe_command_Set_view is access all safe_command_Set;
type free_Set is
record
Sprites : gel.Sprite.views (1 .. 10_000);
Count : Natural := 0;
end record;
type free_Sets is array (1 .. 2) of free_Set;
---------------
--- safe_Joints
--
subtype safe_Joints is gel.Joint.views (1 .. 10_000);
protected
type safe_joint_Set
is
function is_Empty return Boolean;
procedure add (the_Joint : in gel.Joint.view);
procedure Fetch (To : out safe_Joints;
Count : out Natural);
private
Set : safe_Joints;
the_Count : Natural := 0;
end safe_joint_Set;
--------------
--- World Item
--
-- TODO: refactor into two subclasses 'local' and 'mirror'.
type Item is limited new lace.Subject_and_deferred_Observer.item
and gel.remote.World.item with
record
local_Subject_and_deferred_Observer : lace.Subject_and_deferred_Observer.view;
Id : world_Id;
space_Kind : physics.space_Kind;
physics_Space : aliased physics.Space.view;
-- physics_Engine : aliased physics.Engine.item;
Renderer : access openGL.Renderer.lean.item'Class; -- Is *not* owned by Item.
Age : Duration := 0.0;
graphics_Models : aliased id_Maps_of_model .Map;
physics_Models : aliased id_Maps_of_physics_model.Map;
Sprites : gel.Sprite.views (1 .. 100_000);
sprite_Count : Index;
all_sprite_Transforms : World.all_sprite_Transforms;
new_sprite_transforms_Available : Signal_Object;
-- sprite_transform_Updater : World.sprite_transform_Updater (Item'Access);
evolver_Done : Signal_Object;
-- Mirrors
--
is_a_Mirror : Boolean := False;
Age_at_last_mirror_update : Duration := 0.0;
Mirrors : World_vector; -- Used by a master world.
id_Map_of_Sprite : id_Maps_of_sprite.Map;
-- Ids
--
last_used_sprite_Id : gel.sprite_Id := 0;
last_used_model_Id : gel.graphics_model_Id := 0;
last_used_physics_model_Id : physics .model_Id := 0;
-- Command sets
--
-- Commands : safe_command_Set_view := new safe_command_Set;
free_Sets : World.free_Sets;
current_free_Set : Integer := 2;
-- Collisions
--
Manifolds : Manifold_array (1 .. 50_000);
manifold_Count : Natural := 0;
-- Broken Joints
--
broken_Joints : safe_joint_Set;
broken_joints_Allowed : Boolean := False;
-- Engine
--
-- Engine : World.Engine (Item'Access);
end record;
end gel.World;
|
-------------------------------------------------------------------------------
-- Copyright (c) 2019, Daniel King
-- 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.
-- * The name of the copyright holder may not 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 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 Keccak.Generic_Duplex;
with Keccak.Generic_Sponge;
pragma Elaborate_All (Keccak.Generic_Duplex);
pragma Elaborate_All (Keccak.Generic_Sponge);
-- @summary
-- Instantiation of Keccak-p[800,12], with a Sponge and Duplex built on top of it.
package Keccak.Keccak_800.Rounds_12
with SPARK_Mode => On
is
procedure Permute is new KeccakF_800_Permutation.Permute
(Num_Rounds => 12);
package Sponge is new Keccak.Generic_Sponge
(State_Size_Bits => KeccakF_800.State_Size_Bits,
State_Type => State,
Init_State => KeccakF_800.Init,
Permute => Permute,
XOR_Bits_Into_State => KeccakF_800_Lanes.XOR_Bits_Into_State,
Extract_Data => KeccakF_800_Lanes.Extract_Bytes,
Pad => Keccak.Padding.Pad101_Multi_Blocks);
package Duplex is new Keccak.Generic_Duplex
(State_Size_Bits => KeccakF_800.State_Size_Bits,
State_Type => State,
Init_State => KeccakF_800.Init,
Permute => Permute,
XOR_Bits_Into_State => KeccakF_800_Lanes.XOR_Bits_Into_State,
Extract_Bits => KeccakF_800_Lanes.Extract_Bits,
Pad => Keccak.Padding.Pad101_Single_Block,
Min_Padding_Bits => Keccak.Padding.Pad101_Min_Bits);
end Keccak.Keccak_800.Rounds_12;
|
------------------------------------------------------------------------------
-- --
-- Giza --
-- --
-- Copyright (C) 2016 Fabien Chouteau (chouteau@adacore.com) --
-- --
-- --
-- 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 Giza.Bitmaps.Indexed_1bit;
package Giza.Image.Bitmap.Indexed_1bit is
new Indexed_Bitmaps (Giza.Bitmaps.Indexed_1bit);
|
-- Copyright 2008-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
My_Circle : Circle := (Pos => (1, 2), Radius => 3);
begin
Do_Nothing (My_Circle); -- STOP
end Foo;
|
-- https://adventofcode.com/2020/day/8
--- Day 8: Handheld Halting ---
--
-- Your flight to the major airline hub reaches cruising altitude without incident. While you consider checking the in-flight menu for one of those drinks that come with a little umbrella, you are interrupted by the kid sitting next to you.
--
-- Their handheld game console won't turn on! They ask if you can take a look.
--
-- You narrow the problem down to a strange infinite loop in the boot code (your puzzle input) of the device. You should be able to fix it, but first you need to be able to run the code in isolation.
--
-- The boot code is represented as a text file with one instruction per line of text. Each instruction consists of an operation (acc, jmp, or nop) and an argument (a signed number like +4 or -20).
--
-- acc increases or decreases a single global value called the accumulator by the value given in the argument. For example, acc +7 would increase the accumulator by 7. The accumulator starts at 0. After an acc instruction, the instruction immediately below it is executed next.
-- jmp jumps to a new instruction relative to itself. The next instruction to execute is found using the argument as an offset from the jmp instruction; for example, jmp +2 would skip the next instruction, jmp +1 would continue to the instruction immediately below it, and jmp -20 would cause the instruction 20 lines above to be executed next.
-- nop stands for No OPeration - it does nothing. The instruction immediately below it is executed next.
--
-- For example, consider the following program:
--
-- nop +0
-- acc +1
-- jmp +4
-- acc +3
-- jmp -3
-- acc -99
-- acc +1
-- jmp -4
-- acc +6
--
-- These instructions are visited in this order:
--
-- nop +0 | 1
-- acc +1 | 2, 8(!)
-- jmp +4 | 3
-- acc +3 | 6
-- jmp -3 | 7
-- acc -99 |
-- acc +1 | 4
-- jmp -4 | 5
-- acc +6 |
--
-- First, the nop +0 does nothing. Then, the accumulator is increased from 0 to 1 (acc +1) and jmp +4 sets the next instruction to the other acc +1 near the bottom. After it increases the accumulator from 1 to 2, jmp -4 executes, setting the next instruction to the only acc +3. It sets the accumulator to 5, and jmp -3 causes the program to continue back at the first acc +1.
--
-- This is an infinite loop: with this sequence of jumps, the program will run forever. The moment the program tries to run any instruction a second time, you know it will never terminate.
--
-- Immediately before the program would run an instruction a second time, the value in the accumulator is 5.
--
-- Run your copy of the boot code. Immediately before any instruction is executed a second time, what value is in the accumulator?
--
-- Your puzzle answer was 1586.
--
-- The first half of this puzzle is complete! It provides one gold star: *
-- --- Part Two ---
--
-- After some careful analysis, you believe that exactly one instruction is corrupted.
--
-- Somewhere in the program, either a jmp is supposed to be a nop, or a nop is supposed to be a jmp. (No acc instructions were harmed in the corruption of this boot code.)
--
-- The program is supposed to terminate by attempting to execute an instruction immediately after the last instruction in the file. By changing exactly one jmp or nop, you can repair the boot code and make it terminate correctly.
--
-- For example, consider the same program from above:
--
-- nop +0
-- acc +1
-- jmp +4
-- acc +3
-- jmp -3
-- acc -99
-- acc +1
-- jmp -4
-- acc +6
--
-- If you change the first instruction from nop +0 to jmp +0, it would create a single-instruction infinite loop, never leaving that instruction. If you change almost any of the jmp instructions, the program will still eventually find another jmp instruction and loop forever.
--
-- However, if you change the second-to-last instruction (from jmp -4 to nop -4), the program terminates! The instructions are visited in this order:
--
-- nop +0 | 1
-- acc +1 | 2
-- jmp +4 | 3
-- acc +3 |
-- jmp -3 |
-- acc -99 |
-- acc +1 | 4
-- nop -4 | 5
-- acc +6 | 6
--
-- After the last instruction (acc +6), the program terminates by attempting to run the instruction below the last instruction in the file. With this change, after the program terminates, the accumulator contains the value 8 (acc +1, acc +1, acc +6).
--
-- Fix the program so that it terminates normally by changing exactly one jmp (to nop) or nop (to jmp). What is the value of the accumulator after the program terminates?
with GNAT.Source_Info;
with Ada.Containers.Vectors;
package Adventofcode.Day_8 is
type Op_Code is (Nop, Acc, Jmp);
type Instruction_Type is record
Executed : Boolean := False;
Code : Op_Code := Nop;
Value : Integer := 0;
end record;
package Memory_Type_Impl is new Ada.Containers.Vectors (Natural, Instruction_Type);
type Memory_Type is new Memory_Type_Impl.Vector with null record;
procedure Load (Memory : in out Memory_Type; From_Path : String);
procedure Assemble (Self : in out Memory_Type; Line : String);
type Base_Computer is limited interface;
procedure Load (Self : in out Base_Computer; From_Path : String) is abstract;
procedure Run (Self : in out Base_Computer) is abstract;
procedure Print (Self : in out Base_Computer) is abstract;
type Computer_Type is new Base_Computer with record
Runing : Boolean := True;
Execution_OK : Boolean := False;
Trace : Boolean := False;
Accumulator : Integer := 0;
Program_Counter : Integer := 0;
Storage : Memory_Type;
end record;
overriding procedure Load (Self : in out Computer_Type; From_Path : String);
procedure Reset (Self : in out Computer_Type);
procedure Acc_Op (Self : in out Computer_Type);
procedure Jmp_Op (Self : in out Computer_Type);
procedure Nop_Op (Self : in out Computer_Type);
procedure Step (Self : in out Computer_Type);
overriding procedure Run (Self : in out Computer_Type);
overriding procedure Print (Self : in out Computer_Type);
procedure Print_Trace (Self : in out Computer_Type; Location : String := GNAT.Source_Info.Enclosing_Entity);
private
Decoder : array (Op_Code) of access procedure (Self : in out Computer_Type) :=
(Acc => Acc_Op'Access,
Jmp => Jmp_Op'Access,
Nop => Nop_Op'Access);
end Adventofcode.Day_8;
|
------------------------------------------------------------------------------
-- --
-- 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. --
-- --
------------------------------------------------------------------------------
-- This package acts as if it is a motor containing a quadrature encoder. As
-- such, one can query the current wheel rotation direction, which is based
-- on the internal encoder inputs.
-- It is this package that contains and manages the timer that is in quad
-- encoder mode, taking the two signals as inputs and providing the counts
-- and direction information. In effect is is decoding the hardware signals
-- produced by the encoder hardware, but they are not known as "decoders" in
-- the industry.
-- The set up and use of the timer in this "encoder mode" is the purpose of
-- the demonstration.
with STM32.GPIO; use STM32.GPIO;
with STM32.Timers; use STM32.Timers;
with STM32.Device; use STM32.Device;
with HAL; use HAL;
package Motor is
pragma Elaborate_Body;
function Encoder_Count return UInt32;
type Direction is (Forward, Backward);
function Current_Direction return Direction;
private
Encoder_Tach0 : constant GPIO_Point := PA8;
Encoder_Tach1 : constant GPIO_Point := PE11;
Encoder_Timer : Timer renames Timer_1;
Encoder_AF : constant STM32.GPIO_Alternate_Function := GPIO_AF_TIM1_1;
end Motor;
|
-- This spec has been automatically generated from STM32WL5x_CM4.svd
pragma Restrictions (No_Elaboration_Code);
pragma Ada_2012;
pragma Style_Checks (Off);
with HAL;
with System;
package STM32_SVD.PWR is
pragma Preelaborate;
---------------
-- Registers --
---------------
subtype CR1_LPMS_Field is HAL.UInt3;
subtype CR1_VOS_Field is HAL.UInt2;
-- Power control register 1
type CR1_Register is record
-- Low-power mode selection for CPU1
LPMS : CR1_LPMS_Field := 16#0#;
-- sub-GHz SPI NSS source select
SUBGHZSPINSSSEL : Boolean := False;
-- Flash memory power down mode during LPRun for CPU1
FPDR : Boolean := False;
-- Flash memory power down mode during LPSleep for CPU1
FPDS : Boolean := False;
-- unspecified
Reserved_6_7 : HAL.UInt2 := 16#0#;
-- Disable backup domain write protection
DBP : Boolean := False;
-- Voltage scaling range selection
VOS : CR1_VOS_Field := 16#1#;
-- unspecified
Reserved_11_13 : HAL.UInt3 := 16#0#;
-- Low-power run
LPR : Boolean := False;
-- unspecified
Reserved_15_31 : HAL.UInt17 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CR1_Register use record
LPMS at 0 range 0 .. 2;
SUBGHZSPINSSSEL at 0 range 3 .. 3;
FPDR at 0 range 4 .. 4;
FPDS at 0 range 5 .. 5;
Reserved_6_7 at 0 range 6 .. 7;
DBP at 0 range 8 .. 8;
VOS at 0 range 9 .. 10;
Reserved_11_13 at 0 range 11 .. 13;
LPR at 0 range 14 .. 14;
Reserved_15_31 at 0 range 15 .. 31;
end record;
subtype CR2_PLS_Field is HAL.UInt3;
-- Power control register 2
type CR2_Register is record
-- Power voltage detector enable
PVDE : Boolean := False;
-- Power voltage detector level selection.
PLS : CR2_PLS_Field := 16#0#;
-- unspecified
Reserved_4_5 : HAL.UInt2 := 16#0#;
-- Peripheral voltage monitoring 3 enable: VDDA vs. 1.62V
PVME3 : Boolean := False;
-- unspecified
Reserved_7_31 : HAL.UInt25 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CR2_Register use record
PVDE at 0 range 0 .. 0;
PLS at 0 range 1 .. 3;
Reserved_4_5 at 0 range 4 .. 5;
PVME3 at 0 range 6 .. 6;
Reserved_7_31 at 0 range 7 .. 31;
end record;
-- CR3_EWUP array
type CR3_EWUP_Field_Array is array (1 .. 3) of Boolean
with Component_Size => 1, Size => 3;
-- Type definition for CR3_EWUP
type CR3_EWUP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- EWUP as a value
Val : HAL.UInt3;
when True =>
-- EWUP as an array
Arr : CR3_EWUP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 3;
for CR3_EWUP_Field use record
Val at 0 range 0 .. 2;
Arr at 0 range 0 .. 2;
end record;
-- Power control register 3
type CR3_Register is record
-- Enable Wakeup pin WKUP1 for CPU1
EWUP : CR3_EWUP_Field := (As_Array => False, Val => 16#0#);
-- unspecified
Reserved_3_6 : HAL.UInt4 := 16#0#;
-- Ultra-low-power enable
EULPEN : Boolean := False;
-- Enable wakeup PVD for CPU1
EWPVD : Boolean := False;
-- SRAM2 retention in Standby mode
RRS : Boolean := False;
-- Apply pull-up and pull-down configuration from CPU1
APC : Boolean := False;
-- Enable Radio BUSY Wakeup from Standby for CPU1
EWRFBUSY : Boolean := False;
-- unspecified
Reserved_12_12 : HAL.Bit := 16#0#;
-- akeup for CPU1
EWRFIRQ : Boolean := False;
-- nable CPU2 Hold interrupt for CPU1
EC2H : Boolean := False;
-- Enable internal wakeup line for CPU1
EIWUL : Boolean := True;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CR3_Register use record
EWUP at 0 range 0 .. 2;
Reserved_3_6 at 0 range 3 .. 6;
EULPEN at 0 range 7 .. 7;
EWPVD at 0 range 8 .. 8;
RRS at 0 range 9 .. 9;
APC at 0 range 10 .. 10;
EWRFBUSY at 0 range 11 .. 11;
Reserved_12_12 at 0 range 12 .. 12;
EWRFIRQ at 0 range 13 .. 13;
EC2H at 0 range 14 .. 14;
EIWUL at 0 range 15 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
-- CR4_WP array
type CR4_WP_Field_Array is array (1 .. 3) of Boolean
with Component_Size => 1, Size => 3;
-- Type definition for CR4_WP
type CR4_WP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- WP as a value
Val : HAL.UInt3;
when True =>
-- WP as an array
Arr : CR4_WP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 3;
for CR4_WP_Field use record
Val at 0 range 0 .. 2;
Arr at 0 range 0 .. 2;
end record;
-- Power control register 4
type CR4_Register is record
-- Wakeup pin WKUP1 polarity
WP : CR4_WP_Field := (As_Array => False, Val => 16#0#);
-- unspecified
Reserved_3_7 : HAL.UInt5 := 16#0#;
-- VBAT battery charging enable
VBE : Boolean := False;
-- VBAT battery charging resistor selection
VBRS : Boolean := False;
-- unspecified
Reserved_10_10 : HAL.Bit := 16#0#;
-- Wakeup Radio BUSY polarity
WRFBUSYP : Boolean := False;
-- unspecified
Reserved_12_14 : HAL.UInt3 := 16#0#;
-- oot CPU2 after reset or wakeup from Stop or Standby modes.
C2BOOT : Boolean := False;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CR4_Register use record
WP at 0 range 0 .. 2;
Reserved_3_7 at 0 range 3 .. 7;
VBE at 0 range 8 .. 8;
VBRS at 0 range 9 .. 9;
Reserved_10_10 at 0 range 10 .. 10;
WRFBUSYP at 0 range 11 .. 11;
Reserved_12_14 at 0 range 12 .. 14;
C2BOOT at 0 range 15 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
-- SR1_WUF array
type SR1_WUF_Field_Array is array (1 .. 3) of Boolean
with Component_Size => 1, Size => 3;
-- Type definition for SR1_WUF
type SR1_WUF_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- WUF as a value
Val : HAL.UInt3;
when True =>
-- WUF as an array
Arr : SR1_WUF_Field_Array;
end case;
end record
with Unchecked_Union, Size => 3;
for SR1_WUF_Field use record
Val at 0 range 0 .. 2;
Arr at 0 range 0 .. 2;
end record;
-- Power status register 1
type SR1_Register is record
-- Read-only. Wakeup flag 1
WUF : SR1_WUF_Field;
-- unspecified
Reserved_3_7 : HAL.UInt5;
-- Read-only. Wakeup PVD flag
WPVDF : Boolean;
-- unspecified
Reserved_9_10 : HAL.UInt2;
-- Read-only. Radio BUSY wakeup flag
WRFBUSYF : Boolean;
-- unspecified
Reserved_12_13 : HAL.UInt2;
-- Read-only. PU2 Hold interrupt flag
C2HF : Boolean;
-- Read-only. Internal wakeup interrupt flag
WUFI : Boolean;
-- unspecified
Reserved_16_31 : HAL.UInt16;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for SR1_Register use record
WUF at 0 range 0 .. 2;
Reserved_3_7 at 0 range 3 .. 7;
WPVDF at 0 range 8 .. 8;
Reserved_9_10 at 0 range 9 .. 10;
WRFBUSYF at 0 range 11 .. 11;
Reserved_12_13 at 0 range 12 .. 13;
C2HF at 0 range 14 .. 14;
WUFI at 0 range 15 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
-- Power status register 2
type SR2_Register is record
-- Read-only. PU2 boot/wakeup request source information
C2BOOTS : Boolean;
-- Read-only. Radio BUSY signal status
RFBUSYS : Boolean;
-- Read-only. Radio BUSY masked signal status
RFBUSYMS : Boolean;
-- Read-only. SMPS ready flag
SMPSRDY : Boolean;
-- Read-only. LDO ready flag
LDORDY : Boolean;
-- Read-only. Radio end of life flag
RFEOLF : Boolean;
-- Read-only. regulator2 low power flag
REGMRS : Boolean;
-- Read-only. Flash ready
FLASHRDY : Boolean;
-- Read-only. regulator1 started
REGLPS : Boolean;
-- Read-only. regulator1 low power flag
REGLPF : Boolean;
-- Read-only. Voltage scaling flag
VOSF : Boolean;
-- Read-only. Power voltage detector output
PVDO : Boolean;
-- unspecified
Reserved_12_13 : HAL.UInt2;
-- Read-only. Peripheral voltage monitoring output: VDDA vs. 1.62 V
PVMO3 : Boolean;
-- unspecified
Reserved_15_31 : HAL.UInt17;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for SR2_Register use record
C2BOOTS at 0 range 0 .. 0;
RFBUSYS at 0 range 1 .. 1;
RFBUSYMS at 0 range 2 .. 2;
SMPSRDY at 0 range 3 .. 3;
LDORDY at 0 range 4 .. 4;
RFEOLF at 0 range 5 .. 5;
REGMRS at 0 range 6 .. 6;
FLASHRDY at 0 range 7 .. 7;
REGLPS at 0 range 8 .. 8;
REGLPF at 0 range 9 .. 9;
VOSF at 0 range 10 .. 10;
PVDO at 0 range 11 .. 11;
Reserved_12_13 at 0 range 12 .. 13;
PVMO3 at 0 range 14 .. 14;
Reserved_15_31 at 0 range 15 .. 31;
end record;
-- SCR_CWUF array
type SCR_CWUF_Field_Array is array (1 .. 3) of Boolean
with Component_Size => 1, Size => 3;
-- Type definition for SCR_CWUF
type SCR_CWUF_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- CWUF as a value
Val : HAL.UInt3;
when True =>
-- CWUF as an array
Arr : SCR_CWUF_Field_Array;
end case;
end record
with Unchecked_Union, Size => 3;
for SCR_CWUF_Field use record
Val at 0 range 0 .. 2;
Arr at 0 range 0 .. 2;
end record;
-- Power status clear register
type SCR_Register is record
-- Write-only. Clear wakeup flag 1
CWUF : SCR_CWUF_Field := (As_Array => False, Val => 16#0#);
-- unspecified
Reserved_3_7 : HAL.UInt5 := 16#0#;
-- Write-only. Clear wakeup PVD interrupt flag
CWPVDF : Boolean := False;
-- unspecified
Reserved_9_10 : HAL.UInt2 := 16#0#;
-- Write-only. Clear wakeup Radio BUSY flag
CWRFBUSYF : Boolean := False;
-- unspecified
Reserved_12_13 : HAL.UInt2 := 16#0#;
-- Write-only. lear CPU2 Hold interrupt flag
CC2HF : Boolean := False;
-- unspecified
Reserved_15_31 : HAL.UInt17 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for SCR_Register use record
CWUF at 0 range 0 .. 2;
Reserved_3_7 at 0 range 3 .. 7;
CWPVDF at 0 range 8 .. 8;
Reserved_9_10 at 0 range 9 .. 10;
CWRFBUSYF at 0 range 11 .. 11;
Reserved_12_13 at 0 range 12 .. 13;
CC2HF at 0 range 14 .. 14;
Reserved_15_31 at 0 range 15 .. 31;
end record;
-- Power control register 5
type CR5_Register is record
-- unspecified
Reserved_0_13 : HAL.UInt14 := 16#0#;
-- Enable Radio End Of Life detector enabled
RFEOLEN : Boolean := False;
-- Enable SMPS Step Down converter SMPS mode enabled.
SMPSEN : Boolean := False;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CR5_Register use record
Reserved_0_13 at 0 range 0 .. 13;
RFEOLEN at 0 range 14 .. 14;
SMPSEN at 0 range 15 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
-- PUCRA_PU array
type PUCRA_PU_Field_Array is array (0 .. 15) of Boolean
with Component_Size => 1, Size => 16;
-- Type definition for PUCRA_PU
type PUCRA_PU_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- PU as a value
Val : HAL.UInt16;
when True =>
-- PU as an array
Arr : PUCRA_PU_Field_Array;
end case;
end record
with Unchecked_Union, Size => 16;
for PUCRA_PU_Field use record
Val at 0 range 0 .. 15;
Arr at 0 range 0 .. 15;
end record;
-- Power Port A pull-up control register
type PUCRA_Register is record
-- PU0
PU : PUCRA_PU_Field := (As_Array => False, Val => 16#0#);
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for PUCRA_Register use record
PU at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
-- PDCRA_PD array
type PDCRA_PD_Field_Array is array (0 .. 15) of Boolean
with Component_Size => 1, Size => 16;
-- Type definition for PDCRA_PD
type PDCRA_PD_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- PD as a value
Val : HAL.UInt16;
when True =>
-- PD as an array
Arr : PDCRA_PD_Field_Array;
end case;
end record
with Unchecked_Union, Size => 16;
for PDCRA_PD_Field use record
Val at 0 range 0 .. 15;
Arr at 0 range 0 .. 15;
end record;
-- Power Port A pull-down control register
type PDCRA_Register is record
-- PD0
PD : PDCRA_PD_Field := (As_Array => False, Val => 16#0#);
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for PDCRA_Register use record
PD at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
-- PUCRB_PU array
type PUCRB_PU_Field_Array is array (0 .. 15) of Boolean
with Component_Size => 1, Size => 16;
-- Type definition for PUCRB_PU
type PUCRB_PU_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- PU as a value
Val : HAL.UInt16;
when True =>
-- PU as an array
Arr : PUCRB_PU_Field_Array;
end case;
end record
with Unchecked_Union, Size => 16;
for PUCRB_PU_Field use record
Val at 0 range 0 .. 15;
Arr at 0 range 0 .. 15;
end record;
-- Power Port B pull-up control register
type PUCRB_Register is record
-- PU0
PU : PUCRB_PU_Field := (As_Array => False, Val => 16#0#);
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for PUCRB_Register use record
PU at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
-- PDCRB_PD array
type PDCRB_PD_Field_Array is array (0 .. 15) of Boolean
with Component_Size => 1, Size => 16;
-- Type definition for PDCRB_PD
type PDCRB_PD_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- PD as a value
Val : HAL.UInt16;
when True =>
-- PD as an array
Arr : PDCRB_PD_Field_Array;
end case;
end record
with Unchecked_Union, Size => 16;
for PDCRB_PD_Field use record
Val at 0 range 0 .. 15;
Arr at 0 range 0 .. 15;
end record;
-- Power Port B pull-down control register
type PDCRB_Register is record
-- PD0
PD : PDCRB_PD_Field := (As_Array => False, Val => 16#0#);
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for PDCRB_Register use record
PD at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
-- PUCRC_PU array
type PUCRC_PU_Field_Array is array (0 .. 6) of Boolean
with Component_Size => 1, Size => 7;
-- Type definition for PUCRC_PU
type PUCRC_PU_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- PU as a value
Val : HAL.UInt7;
when True =>
-- PU as an array
Arr : PUCRC_PU_Field_Array;
end case;
end record
with Unchecked_Union, Size => 7;
for PUCRC_PU_Field use record
Val at 0 range 0 .. 6;
Arr at 0 range 0 .. 6;
end record;
-- PUCRC_PU array
type PUCRC_PU_Field_Array_1 is array (13 .. 15) of Boolean
with Component_Size => 1, Size => 3;
-- Type definition for PUCRC_PU
type PUCRC_PU_Field_1
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- PU as a value
Val : HAL.UInt3;
when True =>
-- PU as an array
Arr : PUCRC_PU_Field_Array_1;
end case;
end record
with Unchecked_Union, Size => 3;
for PUCRC_PU_Field_1 use record
Val at 0 range 0 .. 2;
Arr at 0 range 0 .. 2;
end record;
-- Power Port C pull-up control register
type PUCRC_Register is record
-- PU0
PU : PUCRC_PU_Field := (As_Array => False, Val => 16#0#);
-- unspecified
Reserved_7_12 : HAL.UInt6 := 16#0#;
-- PU13
PU_1 : PUCRC_PU_Field_1 := (As_Array => False, Val => 16#0#);
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for PUCRC_Register use record
PU at 0 range 0 .. 6;
Reserved_7_12 at 0 range 7 .. 12;
PU_1 at 0 range 13 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
-- PDCRC_PD array
type PDCRC_PD_Field_Array is array (0 .. 6) of Boolean
with Component_Size => 1, Size => 7;
-- Type definition for PDCRC_PD
type PDCRC_PD_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- PD as a value
Val : HAL.UInt7;
when True =>
-- PD as an array
Arr : PDCRC_PD_Field_Array;
end case;
end record
with Unchecked_Union, Size => 7;
for PDCRC_PD_Field use record
Val at 0 range 0 .. 6;
Arr at 0 range 0 .. 6;
end record;
-- PDCRC_PD array
type PDCRC_PD_Field_Array_1 is array (13 .. 15) of Boolean
with Component_Size => 1, Size => 3;
-- Type definition for PDCRC_PD
type PDCRC_PD_Field_1
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- PD as a value
Val : HAL.UInt3;
when True =>
-- PD as an array
Arr : PDCRC_PD_Field_Array_1;
end case;
end record
with Unchecked_Union, Size => 3;
for PDCRC_PD_Field_1 use record
Val at 0 range 0 .. 2;
Arr at 0 range 0 .. 2;
end record;
-- Power Port C pull-down control register
type PDCRC_Register is record
-- PD0
PD : PDCRC_PD_Field := (As_Array => False, Val => 16#0#);
-- unspecified
Reserved_7_12 : HAL.UInt6 := 16#0#;
-- PD13
PD_1 : PDCRC_PD_Field_1 := (As_Array => False, Val => 16#0#);
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for PDCRC_Register use record
PD at 0 range 0 .. 6;
Reserved_7_12 at 0 range 7 .. 12;
PD_1 at 0 range 13 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
-- Power Port H pull-up control register
type PUCRH_Register is record
-- unspecified
Reserved_0_2 : HAL.UInt3 := 16#0#;
-- pull-up
PU3 : Boolean := False;
-- unspecified
Reserved_4_31 : HAL.UInt28 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for PUCRH_Register use record
Reserved_0_2 at 0 range 0 .. 2;
PU3 at 0 range 3 .. 3;
Reserved_4_31 at 0 range 4 .. 31;
end record;
-- Power Port H pull-down control register
type PDCRH_Register is record
-- unspecified
Reserved_0_2 : HAL.UInt3 := 16#0#;
-- pull-down
PD3 : Boolean := False;
-- unspecified
Reserved_4_31 : HAL.UInt28 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for PDCRH_Register use record
Reserved_0_2 at 0 range 0 .. 2;
PD3 at 0 range 3 .. 3;
Reserved_4_31 at 0 range 4 .. 31;
end record;
subtype C2CR1_LPMS_Field is HAL.UInt3;
-- Power CPU2 control register 1 [dual core device only]
type C2CR1_Register is record
-- Low-power mode selection for CPU2
LPMS : C2CR1_LPMS_Field := 16#7#;
-- unspecified
Reserved_3_3 : HAL.Bit := 16#0#;
-- Flash memory power down mode during LPRun for CPU2
FPDR : Boolean := False;
-- Flash memory power down mode during LPSleep for CPU2
FPDS : Boolean := False;
-- unspecified
Reserved_6_31 : HAL.UInt26 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for C2CR1_Register use record
LPMS at 0 range 0 .. 2;
Reserved_3_3 at 0 range 3 .. 3;
FPDR at 0 range 4 .. 4;
FPDS at 0 range 5 .. 5;
Reserved_6_31 at 0 range 6 .. 31;
end record;
-- C2CR3_EWUP array
type C2CR3_EWUP_Field_Array is array (1 .. 3) of Boolean
with Component_Size => 1, Size => 3;
-- Type definition for C2CR3_EWUP
type C2CR3_EWUP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- EWUP as a value
Val : HAL.UInt3;
when True =>
-- EWUP as an array
Arr : C2CR3_EWUP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 3;
for C2CR3_EWUP_Field use record
Val at 0 range 0 .. 2;
Arr at 0 range 0 .. 2;
end record;
-- Power CPU2 control register 3 [dual core device only]
type C2CR3_Register is record
-- Enable Wakeup pin WKUP1 for CPU2
EWUP : C2CR3_EWUP_Field := (As_Array => False, Val => 16#0#);
-- unspecified
Reserved_3_7 : HAL.UInt5 := 16#0#;
-- Enable wakeup PVD for CPU2
EWPVD : Boolean := False;
-- unspecified
Reserved_9_9 : HAL.Bit := 16#0#;
-- Apply pull-up and pull-down configuration for CPU2
APC : Boolean := False;
-- EWRFBUSY
EWRFBUSY : Boolean := False;
-- unspecified
Reserved_12_12 : HAL.Bit := 16#0#;
-- akeup for CPU2
EWRFIRQ : Boolean := False;
-- unspecified
Reserved_14_14 : HAL.Bit := 16#0#;
-- Enable internal wakeup line for CPU2
EIWUL : Boolean := True;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for C2CR3_Register use record
EWUP at 0 range 0 .. 2;
Reserved_3_7 at 0 range 3 .. 7;
EWPVD at 0 range 8 .. 8;
Reserved_9_9 at 0 range 9 .. 9;
APC at 0 range 10 .. 10;
EWRFBUSY at 0 range 11 .. 11;
Reserved_12_12 at 0 range 12 .. 12;
EWRFIRQ at 0 range 13 .. 13;
Reserved_14_14 at 0 range 14 .. 14;
EIWUL at 0 range 15 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
-- Power extended status and status clear register
type EXTSCR_Register is record
-- Write-only. Clear CPU1 Stop Standby flags
C1CSSF : Boolean := False;
-- Write-only. lear CPU2 Stop Standby flags
C2CSSF : Boolean := False;
-- unspecified
Reserved_2_7 : HAL.UInt6 := 16#0#;
-- Read-only. System Standby flag for CPU1. (no core states retained)
C1SBF : Boolean := False;
-- Read-only. System Stop2 flag for CPU1. (partial core states retained)
C1STOP2F : Boolean := False;
-- Read-only. System Stop0, 1 flag for CPU1. (All core states retained)
C1STOPF : Boolean := False;
-- Read-only. ystem Standby flag for CPU2. (no core states retained)
C2SBF : Boolean := False;
-- Read-only. ystem Stop2 flag for CPU2. (partial core states retained)
C2STOP2F : Boolean := False;
-- Read-only. ystem Stop0, 1 flag for CPU2. (All core states retained)
C2STOPF : Boolean := False;
-- Read-only. CPU1 deepsleep mode
C1DS : Boolean := False;
-- Read-only. PU2 deepsleep mode
C2DS : Boolean := False;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for EXTSCR_Register use record
C1CSSF at 0 range 0 .. 0;
C2CSSF at 0 range 1 .. 1;
Reserved_2_7 at 0 range 2 .. 7;
C1SBF at 0 range 8 .. 8;
C1STOP2F at 0 range 9 .. 9;
C1STOPF at 0 range 10 .. 10;
C2SBF at 0 range 11 .. 11;
C2STOP2F at 0 range 12 .. 12;
C2STOPF at 0 range 13 .. 13;
C1DS at 0 range 14 .. 14;
C2DS at 0 range 15 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
-- Power security configuration register [dual core device only]
type SECCFGR_Register is record
-- unspecified
Reserved_0_14 : HAL.UInt15 := 16#0#;
-- wakeup on CPU2 illegal access interrupt enable
C2EWILA : Boolean := True;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for SECCFGR_Register use record
Reserved_0_14 at 0 range 0 .. 14;
C2EWILA at 0 range 15 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
-- Power SPI3 control register
type SUBGHZSPICR_Register is record
-- unspecified
Reserved_0_14 : HAL.UInt15 := 16#0#;
-- sub-GHz SPI NSS control
NSS : Boolean := True;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for SUBGHZSPICR_Register use record
Reserved_0_14 at 0 range 0 .. 14;
NSS at 0 range 15 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype RSSCMDR_RSSCMD_Field is HAL.UInt8;
-- RSS Command register [dual core device only]
type RSSCMDR_Register is record
-- RSS command
RSSCMD : RSSCMDR_RSSCMD_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 RSSCMDR_Register use record
RSSCMD at 0 range 0 .. 7;
Reserved_8_31 at 0 range 8 .. 31;
end record;
-----------------
-- Peripherals --
-----------------
-- Power control
type PWR_Peripheral is record
-- Power control register 1
CR1 : aliased CR1_Register;
-- Power control register 2
CR2 : aliased CR2_Register;
-- Power control register 3
CR3 : aliased CR3_Register;
-- Power control register 4
CR4 : aliased CR4_Register;
-- Power status register 1
SR1 : aliased SR1_Register;
-- Power status register 2
SR2 : aliased SR2_Register;
-- Power status clear register
SCR : aliased SCR_Register;
-- Power control register 5
CR5 : aliased CR5_Register;
-- Power Port A pull-up control register
PUCRA : aliased PUCRA_Register;
-- Power Port A pull-down control register
PDCRA : aliased PDCRA_Register;
-- Power Port B pull-up control register
PUCRB : aliased PUCRB_Register;
-- Power Port B pull-down control register
PDCRB : aliased PDCRB_Register;
-- Power Port C pull-up control register
PUCRC : aliased PUCRC_Register;
-- Power Port C pull-down control register
PDCRC : aliased PDCRC_Register;
-- Power Port H pull-up control register
PUCRH : aliased PUCRH_Register;
-- Power Port H pull-down control register
PDCRH : aliased PDCRH_Register;
-- Power CPU2 control register 1 [dual core device only]
C2CR1 : aliased C2CR1_Register;
-- Power CPU2 control register 3 [dual core device only]
C2CR3 : aliased C2CR3_Register;
-- Power extended status and status clear register
EXTSCR : aliased EXTSCR_Register;
-- Power security configuration register [dual core device only]
SECCFGR : aliased SECCFGR_Register;
-- Power SPI3 control register
SUBGHZSPICR : aliased SUBGHZSPICR_Register;
-- RSS Command register [dual core device only]
RSSCMDR : aliased RSSCMDR_Register;
end record
with Volatile;
for PWR_Peripheral use record
CR1 at 16#0# range 0 .. 31;
CR2 at 16#4# range 0 .. 31;
CR3 at 16#8# range 0 .. 31;
CR4 at 16#C# range 0 .. 31;
SR1 at 16#10# range 0 .. 31;
SR2 at 16#14# range 0 .. 31;
SCR at 16#18# range 0 .. 31;
CR5 at 16#1C# range 0 .. 31;
PUCRA at 16#20# range 0 .. 31;
PDCRA at 16#24# range 0 .. 31;
PUCRB at 16#28# range 0 .. 31;
PDCRB at 16#2C# range 0 .. 31;
PUCRC at 16#30# range 0 .. 31;
PDCRC at 16#34# range 0 .. 31;
PUCRH at 16#58# range 0 .. 31;
PDCRH at 16#5C# range 0 .. 31;
C2CR1 at 16#80# range 0 .. 31;
C2CR3 at 16#84# range 0 .. 31;
EXTSCR at 16#88# range 0 .. 31;
SECCFGR at 16#8C# range 0 .. 31;
SUBGHZSPICR at 16#90# range 0 .. 31;
RSSCMDR at 16#98# range 0 .. 31;
end record;
-- Power control
PWR_Periph : aliased PWR_Peripheral
with Import, Address => PWR_Base;
end STM32_SVD.PWR;
|
-- Copyright 2009-2016 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 Octal is new Integer range 0 .. 7;
type Octal_Array is array (Positive range <>) of Octal;
pragma Pack (Octal_Array);
type Octal_Buffer (Size : Positive) is record
Buffer : Octal_Array (1 .. Size);
Length : Integer;
end record;
My_Buffer : Octal_Buffer (Size => 8);
begin
My_Buffer.Buffer := (1, 2, 3, 4, 5, 6, 7, 0);
My_Buffer.Length := My_Buffer.Size;
Do_Nothing (My_Buffer'Address); -- START
end Foo;
|
-- SPDX-FileCopyrightText: 2019 Max Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-------------------------------------------------------------
with Program.Lexical_Elements;
with Program.Elements.Definitions;
with Program.Elements.Record_Types;
with Program.Element_Visitors;
package Program.Nodes.Record_Types is
pragma Preelaborate;
type Record_Type is
new Program.Nodes.Node and Program.Elements.Record_Types.Record_Type
and Program.Elements.Record_Types.Record_Type_Text
with private;
function Create
(Abstract_Token : Program.Lexical_Elements.Lexical_Element_Access;
Tagged_Token : Program.Lexical_Elements.Lexical_Element_Access;
Limited_Token : Program.Lexical_Elements.Lexical_Element_Access;
Record_Definition : not null Program.Elements.Definitions
.Definition_Access)
return Record_Type;
type Implicit_Record_Type is
new Program.Nodes.Node and Program.Elements.Record_Types.Record_Type
with private;
function Create
(Record_Definition : not null Program.Elements.Definitions
.Definition_Access;
Is_Part_Of_Implicit : Boolean := False;
Is_Part_Of_Inherited : Boolean := False;
Is_Part_Of_Instance : Boolean := False)
return Implicit_Record_Type
with Pre =>
Is_Part_Of_Implicit or Is_Part_Of_Inherited or Is_Part_Of_Instance;
private
type Base_Record_Type is
abstract new Program.Nodes.Node
and Program.Elements.Record_Types.Record_Type
with record
Record_Definition : not null Program.Elements.Definitions
.Definition_Access;
end record;
procedure Initialize (Self : in out Base_Record_Type'Class);
overriding procedure Visit
(Self : not null access Base_Record_Type;
Visitor : in out Program.Element_Visitors.Element_Visitor'Class);
overriding function Record_Definition
(Self : Base_Record_Type)
return not null Program.Elements.Definitions.Definition_Access;
overriding function Is_Record_Type (Self : Base_Record_Type) return Boolean;
overriding function Is_Type_Definition
(Self : Base_Record_Type)
return Boolean;
overriding function Is_Definition (Self : Base_Record_Type) return Boolean;
type Record_Type is
new Base_Record_Type and Program.Elements.Record_Types.Record_Type_Text
with record
Abstract_Token : Program.Lexical_Elements.Lexical_Element_Access;
Tagged_Token : Program.Lexical_Elements.Lexical_Element_Access;
Limited_Token : Program.Lexical_Elements.Lexical_Element_Access;
end record;
overriding function To_Record_Type_Text
(Self : in out Record_Type)
return Program.Elements.Record_Types.Record_Type_Text_Access;
overriding function Abstract_Token
(Self : Record_Type)
return Program.Lexical_Elements.Lexical_Element_Access;
overriding function Tagged_Token
(Self : Record_Type)
return Program.Lexical_Elements.Lexical_Element_Access;
overriding function Limited_Token
(Self : Record_Type)
return Program.Lexical_Elements.Lexical_Element_Access;
type Implicit_Record_Type is
new Base_Record_Type
with record
Is_Part_Of_Implicit : Boolean;
Is_Part_Of_Inherited : Boolean;
Is_Part_Of_Instance : Boolean;
end record;
overriding function To_Record_Type_Text
(Self : in out Implicit_Record_Type)
return Program.Elements.Record_Types.Record_Type_Text_Access;
overriding function Is_Part_Of_Implicit
(Self : Implicit_Record_Type)
return Boolean;
overriding function Is_Part_Of_Inherited
(Self : Implicit_Record_Type)
return Boolean;
overriding function Is_Part_Of_Instance
(Self : Implicit_Record_Type)
return Boolean;
end Program.Nodes.Record_Types;
|
------------------------------------------------------------------------------
-- --
-- Copyright (C) 2015, 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. --
-- --
------------------------------------------------------------------------------
package body STM32.Board is
------------------
-- All_LEDs_Off --
------------------
procedure All_LEDs_Off is
begin
Clear (All_LEDs);
end All_LEDs_Off;
-----------------
-- All_LEDs_On --
-----------------
procedure All_LEDs_On is
begin
Set (All_LEDs);
end All_LEDs_On;
---------------------
-- Initialize_LEDs --
---------------------
procedure Initialize_LEDs is
Conf : GPIO_Port_Configuration;
begin
Enable_Clock (All_LEDs);
Conf.Mode := Mode_Out;
Conf.Output_Type := Push_Pull;
Conf.Speed := Speed_100MHz;
Conf.Resistors := Floating;
Configure_IO (All_LEDs, Conf);
end Initialize_LEDs;
--------------------------------
-- Configure_User_Button_GPIO --
--------------------------------
procedure Configure_User_Button_GPIO is
Config : GPIO_Port_Configuration;
begin
Enable_Clock (User_Button_Point);
Config.Mode := Mode_In;
Config.Resistors := Floating;
Configure_IO (User_Button_Point, Config);
end Configure_User_Button_GPIO;
end STM32.Board;
|
------------------------------------------------------------------------
-- Copyright (C) 2005-2020 by <ada.rocks@jlfencey.com> --
-- --
-- This work is free. You can redistribute it and/or modify it under --
-- the terms of the Do What The Fuck You Want To Public License, --
-- Version 2, as published by Sam Hocevar. See the LICENSE file for --
-- more details. --
------------------------------------------------------------------------
pragma License (Unrestricted);
------------------------------------------------------------------------
-- AMD Élan(tm) SC 520 embedded microprocessor --
-- MMCR -> Software Timer Registers --
-- --
-- reference: User's Manual Chapter 18, --
-- Register Set Manual Chapter 15 --
------------------------------------------------------------------------
package Elan520.Software_Timer_Registers is
USEC_IN_MSEC : constant := 1_000;
-- used in counter register stuff
subtype Milliseconds is Integer range 0 .. 2**16 - 1;
subtype Microseconds is Integer range 0 .. USEC_IN_MSEC - 1;
-- maximum value which can be read (65535ms + 999us)
subtype Full_Microseconds is Integer range
0 .. USEC_IN_MSEC * Milliseconds'Last + Microseconds'Last;
-- used in configuration register (timer calibration)
type Base_Frequency is (MHz_33_333, MHz_33_000);
for Base_Frequency use (MHz_33_333 => 2#0#,
MHz_33_000 => 2#1#);
---------------------------------------------------------------------
-- Software Timer Millisecond Count (SWTMRMILLI) --
-- Memory Mapped, Read Only --
-- MMCR Offset C60h --
-- --
-- Software Timer Microsecond Count (SWTMRMICRO) --
-- Memory Mapped, Read Only --
-- MMCR Offset C62h --
---------------------------------------------------------------------
-- because it would be quite stupid to declare both registers
-- independent from each other (which would force us to read each
-- single register individually which does not make sense unless we
-- care about the timing of _internal_ processor bus cycles), let us
-- declare the type as if this would be one single (32-bit-)register
-- only
-- this easily makes sure that with each reading a correct result is
-- delivered (see note on side effect next)
-- SIDEEFFECT: the milliseconds counter Ms_Cnt is reset to zero on
-- reads
MMCR_OFFSET_TIMER : constant := 16#C60#;
TIMER_SIZE : constant := 32;
type Timer is
record
-- milliseconds counter (read first)
Ms_Cnt : Milliseconds;
-- microseconds counter (latched when Ms_Cnt is read)
Us_Cnt : Microseconds;
end record;
for Timer use
record
Ms_Cnt at 0 range 0 .. 15; -- at MMCR + 16#C60#
Us_Cnt at 0 range 16 .. 25; -- at MMCR + 16#C62#
-- bits 26 .. 31 are reserved
end record;
for Timer'Size use TIMER_SIZE;
---------------------------------------------------------------------
-- Software Timer Configuration (SWTMRCFG) --
-- Memory Mapped, Read/Write --
-- MMCR Offset C64h --
---------------------------------------------------------------------
MMCR_OFFSET_CONFIGURATION : constant := 16#C64#;
CONFIGURATION_SIZE : constant := 8;
type Configuration is
record
Xtal_Freq : Base_Frequency;
end record;
for Configuration use
record
Xtal_Freq at 0 range 0 .. 0;
-- bits 1 .. 7 are reserved
end record;
for Configuration'Size use CONFIGURATION_SIZE;
function To_Microseconds (Timer_Read : in Timer)
return Full_Microseconds;
pragma Pure_Function (To_Microseconds);
end Elan520.Software_Timer_Registers;
|
with System.Address_To_Named_Access_Conversions;
with System.Standard_Allocators;
with System.System_Allocators;
package body System.Unbounded_Allocators is
use type Storage_Elements.Integer_Address;
use type Storage_Elements.Storage_Offset;
package HA_Conv is
new Address_To_Named_Access_Conversions (Header, Header_Access);
Header_Offset : constant Storage_Elements.Storage_Count :=
Storage_Elements.Storage_Offset (
(Header'Size / Standard'Storage_Unit
+ Storage_Elements.Integer_Address'(
Standard'Maximum_Alignment - 1))
and not (Standard'Maximum_Alignment - 1));
procedure Deallocate (X : not null Header_Access);
procedure Deallocate (X : not null Header_Access) is
begin
pragma Assert ((HA_Conv.To_Address (X.Previous) and 1) = 0);
X.Previous.Next := X.Next;
X.Next.Previous :=
HA_Conv.To_Pointer (
(HA_Conv.To_Address (X.Next.Previous) and 1)
or HA_Conv.To_Address (X.Previous));
System_Allocators.Free (HA_Conv.To_Address (X));
end Deallocate;
-- implementation
procedure Initialize (Object : in out Unbounded_Allocator) is
X : Address;
begin
X := System_Allocators.Allocate (Header'Size / Standard'Storage_Unit);
HA_Conv.To_Pointer (X).Previous := HA_Conv.To_Pointer (1 or X);
HA_Conv.To_Pointer (X).Next := HA_Conv.To_Pointer (X);
Object := Unbounded_Allocator (HA_Conv.To_Pointer (X));
end Initialize;
procedure Finalize (Object : in out Unbounded_Allocator) is
begin
while Object.Next /= Header_Access (Object) loop
Deallocate (Object.Next);
end loop;
System_Allocators.Free (HA_Conv.To_Address (Header_Access (Object)));
end Finalize;
procedure Allocate (
Allocator : Unbounded_Allocator;
Storage_Address : out Address;
Size_In_Storage_Elements : Storage_Elements.Storage_Count;
Alignment : Storage_Elements.Storage_Count)
is
X : Address;
begin
X := System_Allocators.Allocate (
Header'Size / Standard'Storage_Unit + Size_In_Storage_Elements,
Alignment =>
Storage_Elements.Storage_Offset'Max (Header'Alignment, Alignment));
if X = Null_Address then
Standard_Allocators.Raise_Heap_Exhausted;
end if;
Storage_Address := X + Header_Offset;
HA_Conv.To_Pointer (X).Previous := Header_Access (Allocator);
HA_Conv.To_Pointer (X).Next := Allocator.Next;
HA_Conv.To_Pointer (X).Previous.Next := HA_Conv.To_Pointer (X);
HA_Conv.To_Pointer (X).Next.Previous :=
HA_Conv.To_Pointer (
(HA_Conv.To_Address (HA_Conv.To_Pointer (X).Next.Previous) and 1)
or X);
end Allocate;
procedure Deallocate (
Allocator : Unbounded_Allocator;
Storage_Address : Address;
Size_In_Storage_Elements : Storage_Elements.Storage_Count;
Alignment : Storage_Elements.Storage_Count)
is
pragma Unreferenced (Allocator);
pragma Unreferenced (Size_In_Storage_Elements);
pragma Unreferenced (Alignment);
X : constant not null Header_Access :=
HA_Conv.To_Pointer (Storage_Address - Header_Offset);
begin
Deallocate (X);
end Deallocate;
function Allocator_Of (Storage_Address : Address)
return Unbounded_Allocator is
X : constant not null Header_Access :=
HA_Conv.To_Pointer (Storage_Address - Header_Offset);
I : not null Header_Access := X.Next;
begin
pragma Assert ((HA_Conv.To_Address (X.Previous) and 1) = 0);
loop
pragma Assert (I /= X);
if (HA_Conv.To_Address (I.Previous) and 1) /= 0 then
return Unbounded_Allocator (I);
end if;
I := I.Next;
end loop;
end Allocator_Of;
end System.Unbounded_Allocators;
|
-----------------------------------------------------------------------
-- css-parser-tests -- Unit tests for CSS parser
-- Copyright (C) 2017 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- 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.Text_IO;
with Ada.Directories;
with Util.Measures;
with CSS.Core.Sheets;
with CSS.Core.Errors.Default;
package body CSS.Parser.Tests is
use Ada.Strings.Unbounded;
-- ------------------------------
-- Test case name
-- ------------------------------
overriding
function Name (T : in Test) return Util.Tests.Message_String is
begin
return Util.Tests.Format ("Test CSS parser " & To_String (T.Name));
end Name;
-- ------------------------------
-- Perform the test.
-- ------------------------------
overriding
procedure Run_Test (T : in out Test) is
Name : constant String := Ada.Strings.Unbounded.To_String (T.Name);
Path : constant String := Ada.Strings.Unbounded.To_String (T.File);
Doc : aliased CSS.Core.Sheets.CSSStylesheet;
Errors : aliased CSS.Core.Errors.Default.Error_Handler;
begin
Doc.Set_Href (Name);
Ada.Text_IO.Create (Errors.File, Ada.Text_IO.Out_File, To_String (T.Result));
declare
Time : Util.Measures.Stamp;
begin
CSS.Parser.Load (Path, Doc'Unchecked_Access, Errors'Unchecked_Access);
Util.Measures.Report (Time, "CSS parse " & Name);
end;
Ada.Text_IO.Close (Errors.File);
if T.Has_Error then
T.Assert (Errors.Error_Count > 0, "No error reported for '" & Name & "'");
else
Util.Tests.Assert_Equals (T, 0, Errors.Error_Count,
"Errors reported for '" & Name & "'");
Ada.Directories.Delete_File (To_String (T.Result));
end if;
exception
when others =>
if Ada.Text_IO.Is_Open (Errors.File) then
Ada.Text_IO.Close (Errors.File);
end if;
raise;
end Run_Test;
procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite) is
use Ada.Directories;
procedure Add_Parser_Tests (Dir : in String;
Has_Error : in Boolean);
function Create_Test (Name : in String;
Path : in String) return Test_Case_Access;
Expect_Dir : constant String := "regtests/expect/";
Expect_Path : constant String := Util.Tests.Get_Path (Expect_Dir);
Result_Path : constant String := Util.Tests.Get_Test_Path ("");
Search : Search_Type;
Filter : constant Filter_Type := (others => True);
Ent : Directory_Entry_Type;
function Create_Test (Name : in String;
Path : in String) return Test_Case_Access is
Tst : Test_Case_Access;
begin
Tst := new Test;
Tst.Name := To_Unbounded_String (Name);
Tst.File := To_Unbounded_String (Path);
Tst.Expect := To_Unbounded_String (Expect_Path & Name);
Tst.Result := To_Unbounded_String (Result_Path & Name);
return Tst;
end Create_Test;
procedure Add_Parser_Tests (Dir : in String;
Has_Error : in Boolean) is
Path : constant String := Util.Tests.Get_Path (Dir);
begin
if Kind (Path) /= Directory then
Ada.Text_IO.Put_Line ("Cannot read test directory: " & Path);
end if;
Start_Search (Search, Directory => Path, Pattern => "*.css", Filter => Filter);
while More_Entries (Search) loop
Get_Next_Entry (Search, Ent);
declare
Simple : constant String := Simple_Name (Ent);
Name : constant String := Base_Name (Simple);
Tst : Test_Case_Access;
begin
if Simple /= "." and then Simple /= ".."
and then Simple /= ".svn" and then Simple (Simple'Last) /= '~'
then
Tst := Create_Test (Name, Path & "/" & Simple);
if Tst /= null then
Tst.Has_Error := Has_Error;
Suite.Add_Test (Tst.all'Access);
end if;
end if;
end;
end loop;
end Add_Parser_Tests;
begin
Add_Parser_Tests ("regtests/files/parser", False);
Add_Parser_Tests ("regtests/files/errors", True);
end Add_Tests;
end CSS.Parser.Tests;
|
------------------------------------------------------------------------------
-- --
-- Ada User Repository Annex (AURA) --
-- ANNEXI-STRAYLINE Reference Implementation --
-- --
-- Command Line Interface --
-- --
-- ------------------------------------------------------------------------ --
-- --
-- Copyright (C) 2020, ANNEXI-STRAYLINE Trans-Human Ltd. --
-- All rights reserved. --
-- --
-- Original Contributors: --
-- * Richard Wai (ANNEXI-STRAYLINE) --
-- --
-- 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 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 --
-- OWNER 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. --
-- --
------------------------------------------------------------------------------
separate (Specification_Scanner)
procedure Scan_Subprogram
(Buffer : in out Ada_Lexical_Parser.Source_Buffer;
Unit_Tree : in out Declaration_Trees.Tree;
Subprogram_Node: in Declaration_Trees.Cursor)
is
use Ada_Lexical_Parser;
use Declaration_Trees;
package Toolkit is new Parse_Toolkit (Buffer); use Toolkit;
use type WWU.Unbounded_Wide_Wide_String;
This_Ent: Declared_Entity renames Unit_Tree(Subprogram_Node);
procedure Add_Parameter is
Parameter_Ent: Declared_Entity;
begin
Parameter_Ent.Kind := Object_Declaration;
Parameter_Ent.Name := Current_Element.Content;
Next_Element;
Assert_Syntax (Category = Delimiter and then Content = ":");
Next_Element;
while Category = Reserved_Word loop
Assert_Syntax (Content in
"in" | "out"
| "not" | "null" | "access"
| "aliased");
Next_Element;
end loop;
Assert_Syntax (Category = Identifier);
Load_Identifier (This_Ent.Subtype_Mark);
end Add_Parameter;
begin
This_Ent.Kind := Subprogram_Declaration;
Load_Identifier (This_Ent.Name);
Assert_Syntax (Category in Delimiter | Reserved_Word
and then Content in
";" | "(" | "return"
| "is" | "with" | "renames");
if Category = Delimiter and then Content = "(" then
-- Process parameters
loop
Add_Parameter;
Assert_Syntax (Category = Delimiter);
exit when Content = ")";
Assert_Syntax (Content = ";");
end loop;
Next_Element;
end if;
if Category = Delimiter and then Content = ";" then
return;
end if;
Assert_Syntax (Category in Reserved_Word
and then Content in "return" | "is" | "with" | "renames");
if Content = "return" then
-- Record the subtype mark
Next_Element;
Assert_Syntax (Category = Identifier);
Load_Identifier (This_Ent.Subtype_Mark);
end if;
if Category = Identifier and then Content = ";" then
return;
end if;
Assert_Syntax (Category = Reserved_Word
and then Content in "is" | "with" | "renames");
if Content = "is" then
-- Either a function expression or a null procedure. We allow either
-- without checking if it really is a function or a procedure because
-- this is just a scanner. We care about an "is" only because we want
-- to extract the expression
Next_Element;
Assert_Syntax
((Category = Delimiter and then Content = "(")
or else (Category = Reserved_Word and then Content = "null"));
if Content = "(" then
-- For ease of parsing, we will pull in the expression including
-- the surrouding parenthesis. This allivates us from needing to
-- track depth. We simply go until we hit "with" or ";".
This_Ent.Expression := Current_Element.Content;
loop
Next_Element;
exit when Category = Delimiter and then Content = ";";
exit when Category = Reserved_Word and then Content = "with";
This_Ent.Expression
:= This_Ent.Expression & Current_Element.Content;
end loop;
elsif Content = "null" then
Next_Element;
Assert_Syntax (Category = Delimiter and then Content = ";");
return;
end if;
end if;
if Category = Identifier and then Content = ";" then
return;
end if;
Assert_Syntax (Category = Reserved_Word
and then Content in "with" | "renames");
-- For renames, rename must come before "with"
-- Also, expression functions obviously cannot also be a rename
if Content = "renames" then
Assert_Syntax (WWU.Length (This_Ent.Expression) = 0);
This_Ent.Is_Renaming := True;
Next_Element;
Assert_Syntax (Category = Identifier);
Load_Identifier (This_Ent.Renamed_Entity_Name);
end if;
Assert_Syntax (Category = Reserved_Word and then Content = "with");
-- We're not interested in the aspect_specification part
Skip_To_Semicolon;
end Scan_Subprogram;
|
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- S Y S T E M . A U X _ D E C --
-- --
-- B o d y --
-- --
-- Copyright (C) 1992-2009, 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. --
-- --
------------------------------------------------------------------------------
pragma Style_Checks (All_Checks);
-- Turn off alpha ordering check on subprograms, this unit is laid
-- out to correspond to the declarations in the DEC 83 System unit.
with System.Soft_Links;
package body System.Aux_DEC is
package SSL renames System.Soft_Links;
-----------------------------------
-- Operations on Largest_Integer --
-----------------------------------
-- It would be nice to replace these with intrinsics, but that does
-- not work yet (the back end would be ok, but GNAT itself objects)
type LIU is mod 2 ** Largest_Integer'Size;
-- Unsigned type of same length as Largest_Integer
function To_LI is new Ada.Unchecked_Conversion (LIU, Largest_Integer);
function From_LI is new Ada.Unchecked_Conversion (Largest_Integer, LIU);
function "not" (Left : Largest_Integer) return Largest_Integer is
begin
return To_LI (not From_LI (Left));
end "not";
function "and" (Left, Right : Largest_Integer) return Largest_Integer is
begin
return To_LI (From_LI (Left) and From_LI (Right));
end "and";
function "or" (Left, Right : Largest_Integer) return Largest_Integer is
begin
return To_LI (From_LI (Left) or From_LI (Right));
end "or";
function "xor" (Left, Right : Largest_Integer) return Largest_Integer is
begin
return To_LI (From_LI (Left) xor From_LI (Right));
end "xor";
--------------------------------------
-- Arithmetic Operations on Address --
--------------------------------------
-- It would be nice to replace these with intrinsics, but that does
-- not work yet (the back end would be ok, but GNAT itself objects)
Asiz : constant Integer := Integer (Address'Size) - 1;
type SA is range -(2 ** Asiz) .. 2 ** Asiz - 1;
-- Signed type of same size as Address
function To_A is new Ada.Unchecked_Conversion (SA, Address);
function From_A is new Ada.Unchecked_Conversion (Address, SA);
function "+" (Left : Address; Right : Integer) return Address is
begin
return To_A (From_A (Left) + SA (Right));
end "+";
function "+" (Left : Integer; Right : Address) return Address is
begin
return To_A (SA (Left) + From_A (Right));
end "+";
function "-" (Left : Address; Right : Address) return Integer is
pragma Unsuppress (All_Checks);
-- Because this can raise Constraint_Error for 64-bit addresses
begin
return Integer (From_A (Left) - From_A (Right));
end "-";
function "-" (Left : Address; Right : Integer) return Address is
begin
return To_A (From_A (Left) - SA (Right));
end "-";
------------------------
-- Fetch_From_Address --
------------------------
function Fetch_From_Address (A : Address) return Target is
type T_Ptr is access all Target;
function To_T_Ptr is new Ada.Unchecked_Conversion (Address, T_Ptr);
Ptr : constant T_Ptr := To_T_Ptr (A);
begin
return Ptr.all;
end Fetch_From_Address;
-----------------------
-- Assign_To_Address --
-----------------------
procedure Assign_To_Address (A : Address; T : Target) is
type T_Ptr is access all Target;
function To_T_Ptr is new Ada.Unchecked_Conversion (Address, T_Ptr);
Ptr : constant T_Ptr := To_T_Ptr (A);
begin
Ptr.all := T;
end Assign_To_Address;
---------------------------------
-- Operations on Unsigned_Byte --
---------------------------------
-- It would be nice to replace these with intrinsics, but that does
-- not work yet (the back end would be ok, but GNAT itself objects)
type BU is mod 2 ** Unsigned_Byte'Size;
-- Unsigned type of same length as Unsigned_Byte
function To_B is new Ada.Unchecked_Conversion (BU, Unsigned_Byte);
function From_B is new Ada.Unchecked_Conversion (Unsigned_Byte, BU);
function "not" (Left : Unsigned_Byte) return Unsigned_Byte is
begin
return To_B (not From_B (Left));
end "not";
function "and" (Left, Right : Unsigned_Byte) return Unsigned_Byte is
begin
return To_B (From_B (Left) and From_B (Right));
end "and";
function "or" (Left, Right : Unsigned_Byte) return Unsigned_Byte is
begin
return To_B (From_B (Left) or From_B (Right));
end "or";
function "xor" (Left, Right : Unsigned_Byte) return Unsigned_Byte is
begin
return To_B (From_B (Left) xor From_B (Right));
end "xor";
---------------------------------
-- Operations on Unsigned_Word --
---------------------------------
-- It would be nice to replace these with intrinsics, but that does
-- not work yet (the back end would be ok, but GNAT itself objects)
type WU is mod 2 ** Unsigned_Word'Size;
-- Unsigned type of same length as Unsigned_Word
function To_W is new Ada.Unchecked_Conversion (WU, Unsigned_Word);
function From_W is new Ada.Unchecked_Conversion (Unsigned_Word, WU);
function "not" (Left : Unsigned_Word) return Unsigned_Word is
begin
return To_W (not From_W (Left));
end "not";
function "and" (Left, Right : Unsigned_Word) return Unsigned_Word is
begin
return To_W (From_W (Left) and From_W (Right));
end "and";
function "or" (Left, Right : Unsigned_Word) return Unsigned_Word is
begin
return To_W (From_W (Left) or From_W (Right));
end "or";
function "xor" (Left, Right : Unsigned_Word) return Unsigned_Word is
begin
return To_W (From_W (Left) xor From_W (Right));
end "xor";
-------------------------------------
-- Operations on Unsigned_Longword --
-------------------------------------
-- It would be nice to replace these with intrinsics, but that does
-- not work yet (the back end would be ok, but GNAT itself objects)
type LWU is mod 2 ** Unsigned_Longword'Size;
-- Unsigned type of same length as Unsigned_Longword
function To_LW is new Ada.Unchecked_Conversion (LWU, Unsigned_Longword);
function From_LW is new Ada.Unchecked_Conversion (Unsigned_Longword, LWU);
function "not" (Left : Unsigned_Longword) return Unsigned_Longword is
begin
return To_LW (not From_LW (Left));
end "not";
function "and" (Left, Right : Unsigned_Longword) return Unsigned_Longword is
begin
return To_LW (From_LW (Left) and From_LW (Right));
end "and";
function "or" (Left, Right : Unsigned_Longword) return Unsigned_Longword is
begin
return To_LW (From_LW (Left) or From_LW (Right));
end "or";
function "xor" (Left, Right : Unsigned_Longword) return Unsigned_Longword is
begin
return To_LW (From_LW (Left) xor From_LW (Right));
end "xor";
-------------------------------
-- Operations on Unsigned_32 --
-------------------------------
-- It would be nice to replace these with intrinsics, but that does
-- not work yet (the back end would be ok, but GNAT itself objects)
type U32 is mod 2 ** Unsigned_32'Size;
-- Unsigned type of same length as Unsigned_32
function To_U32 is new Ada.Unchecked_Conversion (U32, Unsigned_32);
function From_U32 is new Ada.Unchecked_Conversion (Unsigned_32, U32);
function "not" (Left : Unsigned_32) return Unsigned_32 is
begin
return To_U32 (not From_U32 (Left));
end "not";
function "and" (Left, Right : Unsigned_32) return Unsigned_32 is
begin
return To_U32 (From_U32 (Left) and From_U32 (Right));
end "and";
function "or" (Left, Right : Unsigned_32) return Unsigned_32 is
begin
return To_U32 (From_U32 (Left) or From_U32 (Right));
end "or";
function "xor" (Left, Right : Unsigned_32) return Unsigned_32 is
begin
return To_U32 (From_U32 (Left) xor From_U32 (Right));
end "xor";
-------------------------------------
-- Operations on Unsigned_Quadword --
-------------------------------------
-- It would be nice to replace these with intrinsics, but that does
-- not work yet (the back end would be ok, but GNAT itself objects)
type QWU is mod 2 ** 64; -- 64 = Unsigned_Quadword'Size
-- Unsigned type of same length as Unsigned_Quadword
function To_QW is new Ada.Unchecked_Conversion (QWU, Unsigned_Quadword);
function From_QW is new Ada.Unchecked_Conversion (Unsigned_Quadword, QWU);
function "not" (Left : Unsigned_Quadword) return Unsigned_Quadword is
begin
return To_QW (not From_QW (Left));
end "not";
function "and" (Left, Right : Unsigned_Quadword) return Unsigned_Quadword is
begin
return To_QW (From_QW (Left) and From_QW (Right));
end "and";
function "or" (Left, Right : Unsigned_Quadword) return Unsigned_Quadword is
begin
return To_QW (From_QW (Left) or From_QW (Right));
end "or";
function "xor" (Left, Right : Unsigned_Quadword) return Unsigned_Quadword is
begin
return To_QW (From_QW (Left) xor From_QW (Right));
end "xor";
-----------------------
-- Clear_Interlocked --
-----------------------
procedure Clear_Interlocked
(Bit : in out Boolean;
Old_Value : out Boolean)
is
begin
SSL.Lock_Task.all;
Old_Value := Bit;
Bit := False;
SSL.Unlock_Task.all;
end Clear_Interlocked;
procedure Clear_Interlocked
(Bit : in out Boolean;
Old_Value : out Boolean;
Retry_Count : Natural;
Success_Flag : out Boolean)
is
pragma Warnings (Off, Retry_Count);
begin
SSL.Lock_Task.all;
Old_Value := Bit;
Bit := False;
Success_Flag := True;
SSL.Unlock_Task.all;
end Clear_Interlocked;
---------------------
-- Set_Interlocked --
---------------------
procedure Set_Interlocked
(Bit : in out Boolean;
Old_Value : out Boolean)
is
begin
SSL.Lock_Task.all;
Old_Value := Bit;
Bit := True;
SSL.Unlock_Task.all;
end Set_Interlocked;
procedure Set_Interlocked
(Bit : in out Boolean;
Old_Value : out Boolean;
Retry_Count : Natural;
Success_Flag : out Boolean)
is
pragma Warnings (Off, Retry_Count);
begin
SSL.Lock_Task.all;
Old_Value := Bit;
Bit := True;
Success_Flag := True;
SSL.Unlock_Task.all;
end Set_Interlocked;
---------------------
-- Add_Interlocked --
---------------------
procedure Add_Interlocked
(Addend : Short_Integer;
Augend : in out Aligned_Word;
Sign : out Integer)
is
begin
SSL.Lock_Task.all;
Augend.Value := Augend.Value + Addend;
if Augend.Value < 0 then
Sign := -1;
elsif Augend.Value > 0 then
Sign := +1;
else
Sign := 0;
end if;
SSL.Unlock_Task.all;
end Add_Interlocked;
----------------
-- Add_Atomic --
----------------
procedure Add_Atomic
(To : in out Aligned_Integer;
Amount : Integer)
is
begin
SSL.Lock_Task.all;
To.Value := To.Value + Amount;
SSL.Unlock_Task.all;
end Add_Atomic;
procedure Add_Atomic
(To : in out Aligned_Integer;
Amount : Integer;
Retry_Count : Natural;
Old_Value : out Integer;
Success_Flag : out Boolean)
is
pragma Warnings (Off, Retry_Count);
begin
SSL.Lock_Task.all;
Old_Value := To.Value;
To.Value := To.Value + Amount;
Success_Flag := True;
SSL.Unlock_Task.all;
end Add_Atomic;
procedure Add_Atomic
(To : in out Aligned_Long_Integer;
Amount : Long_Integer)
is
begin
SSL.Lock_Task.all;
To.Value := To.Value + Amount;
SSL.Unlock_Task.all;
end Add_Atomic;
procedure Add_Atomic
(To : in out Aligned_Long_Integer;
Amount : Long_Integer;
Retry_Count : Natural;
Old_Value : out Long_Integer;
Success_Flag : out Boolean)
is
pragma Warnings (Off, Retry_Count);
begin
SSL.Lock_Task.all;
Old_Value := To.Value;
To.Value := To.Value + Amount;
Success_Flag := True;
SSL.Unlock_Task.all;
end Add_Atomic;
----------------
-- And_Atomic --
----------------
type IU is mod 2 ** Integer'Size;
type LU is mod 2 ** Long_Integer'Size;
function To_IU is new Ada.Unchecked_Conversion (Integer, IU);
function From_IU is new Ada.Unchecked_Conversion (IU, Integer);
function To_LU is new Ada.Unchecked_Conversion (Long_Integer, LU);
function From_LU is new Ada.Unchecked_Conversion (LU, Long_Integer);
procedure And_Atomic
(To : in out Aligned_Integer;
From : Integer)
is
begin
SSL.Lock_Task.all;
To.Value := From_IU (To_IU (To.Value) and To_IU (From));
SSL.Unlock_Task.all;
end And_Atomic;
procedure And_Atomic
(To : in out Aligned_Integer;
From : Integer;
Retry_Count : Natural;
Old_Value : out Integer;
Success_Flag : out Boolean)
is
pragma Warnings (Off, Retry_Count);
begin
SSL.Lock_Task.all;
Old_Value := To.Value;
To.Value := From_IU (To_IU (To.Value) and To_IU (From));
Success_Flag := True;
SSL.Unlock_Task.all;
end And_Atomic;
procedure And_Atomic
(To : in out Aligned_Long_Integer;
From : Long_Integer)
is
begin
SSL.Lock_Task.all;
To.Value := From_LU (To_LU (To.Value) and To_LU (From));
SSL.Unlock_Task.all;
end And_Atomic;
procedure And_Atomic
(To : in out Aligned_Long_Integer;
From : Long_Integer;
Retry_Count : Natural;
Old_Value : out Long_Integer;
Success_Flag : out Boolean)
is
pragma Warnings (Off, Retry_Count);
begin
SSL.Lock_Task.all;
Old_Value := To.Value;
To.Value := From_LU (To_LU (To.Value) and To_LU (From));
Success_Flag := True;
SSL.Unlock_Task.all;
end And_Atomic;
---------------
-- Or_Atomic --
---------------
procedure Or_Atomic
(To : in out Aligned_Integer;
From : Integer)
is
begin
SSL.Lock_Task.all;
To.Value := From_IU (To_IU (To.Value) or To_IU (From));
SSL.Unlock_Task.all;
end Or_Atomic;
procedure Or_Atomic
(To : in out Aligned_Integer;
From : Integer;
Retry_Count : Natural;
Old_Value : out Integer;
Success_Flag : out Boolean)
is
pragma Warnings (Off, Retry_Count);
begin
SSL.Lock_Task.all;
Old_Value := To.Value;
To.Value := From_IU (To_IU (To.Value) or To_IU (From));
Success_Flag := True;
SSL.Unlock_Task.all;
end Or_Atomic;
procedure Or_Atomic
(To : in out Aligned_Long_Integer;
From : Long_Integer)
is
begin
SSL.Lock_Task.all;
To.Value := From_LU (To_LU (To.Value) or To_LU (From));
SSL.Unlock_Task.all;
end Or_Atomic;
procedure Or_Atomic
(To : in out Aligned_Long_Integer;
From : Long_Integer;
Retry_Count : Natural;
Old_Value : out Long_Integer;
Success_Flag : out Boolean)
is
pragma Warnings (Off, Retry_Count);
begin
SSL.Lock_Task.all;
Old_Value := To.Value;
To.Value := From_LU (To_LU (To.Value) or To_LU (From));
Success_Flag := True;
SSL.Unlock_Task.all;
end Or_Atomic;
------------------------------------
-- Declarations for Queue Objects --
------------------------------------
type QR;
type QR_Ptr is access QR;
type QR is record
Forward : QR_Ptr;
Backward : QR_Ptr;
end record;
function To_QR_Ptr is new Ada.Unchecked_Conversion (Address, QR_Ptr);
function From_QR_Ptr is new Ada.Unchecked_Conversion (QR_Ptr, Address);
------------
-- Insqhi --
------------
procedure Insqhi
(Item : Address;
Header : Address;
Status : out Insq_Status)
is
Hedr : constant QR_Ptr := To_QR_Ptr (Header);
Next : constant QR_Ptr := Hedr.Forward;
Itm : constant QR_Ptr := To_QR_Ptr (Item);
begin
SSL.Lock_Task.all;
Itm.Forward := Next;
Itm.Backward := Hedr;
Hedr.Forward := Itm;
if Next = null then
Status := OK_First;
else
Next.Backward := Itm;
Status := OK_Not_First;
end if;
SSL.Unlock_Task.all;
end Insqhi;
------------
-- Remqhi --
------------
procedure Remqhi
(Header : Address;
Item : out Address;
Status : out Remq_Status)
is
Hedr : constant QR_Ptr := To_QR_Ptr (Header);
Next : constant QR_Ptr := Hedr.Forward;
begin
SSL.Lock_Task.all;
Item := From_QR_Ptr (Next);
if Next = null then
Status := Fail_Was_Empty;
else
Hedr.Forward := To_QR_Ptr (Item).Forward;
if Hedr.Forward = null then
Status := OK_Empty;
else
Hedr.Forward.Backward := Hedr;
Status := OK_Not_Empty;
end if;
end if;
SSL.Unlock_Task.all;
end Remqhi;
------------
-- Insqti --
------------
procedure Insqti
(Item : Address;
Header : Address;
Status : out Insq_Status)
is
Hedr : constant QR_Ptr := To_QR_Ptr (Header);
Prev : constant QR_Ptr := Hedr.Backward;
Itm : constant QR_Ptr := To_QR_Ptr (Item);
begin
SSL.Lock_Task.all;
Itm.Backward := Prev;
Itm.Forward := Hedr;
Hedr.Backward := Itm;
if Prev = null then
Status := OK_First;
else
Prev.Forward := Itm;
Status := OK_Not_First;
end if;
SSL.Unlock_Task.all;
end Insqti;
------------
-- Remqti --
------------
procedure Remqti
(Header : Address;
Item : out Address;
Status : out Remq_Status)
is
Hedr : constant QR_Ptr := To_QR_Ptr (Header);
Prev : constant QR_Ptr := Hedr.Backward;
begin
SSL.Lock_Task.all;
Item := From_QR_Ptr (Prev);
if Prev = null then
Status := Fail_Was_Empty;
else
Hedr.Backward := To_QR_Ptr (Item).Backward;
if Hedr.Backward = null then
Status := OK_Empty;
else
Hedr.Backward.Forward := Hedr;
Status := OK_Not_Empty;
end if;
end if;
SSL.Unlock_Task.all;
end Remqti;
end System.Aux_DEC;
|
with Ada.Text_IO; use Ada.Text_IO;
procedure Hello is
begin
Put_Line ("Hello world.");
end Hello;
|
--
-- 6.1 Subprogram Declarations
--
-- NOTE: This module is not compilation is used only for testing purposes
--
package Subprogram_Declarations is
-- Examples of subprogram declarations:
procedure Traverse_Tree;
procedure Increment(X : in out Integer);
procedure Right_Indent(Margin : out Line_Size); -- see 3.5.4
procedure Switch(From, To : in out Link); -- see 3.10.1
function Random return Probability; -- see 3.5.7
function Min_Cell(X : Link) return Cell; -- see 3.10.1
function Next_Frame(K : Positive) return Frame; -- see 3.10
function Dot_Product(Left, Right : Vector) return Real; -- see 3.6
function "*"(Left, Right : Matrix) return Matrix; -- see 3.6
-- Examples of in parameters with default expressions:
procedure Print_Header
(Pages : in Natural;
Center : in Boolean := True);
end Subprogram_Declarations; |
No-one has translated the zmsg_test example into Ada yet. Be the first to create
zmsg_test in Ada and get one free Internet! If you're the author of the Ada
binding, this is a great way to get people to use 0MQ in Ada.
To submit a new translation email it to zeromq-dev@lists.zeromq.org. Please:
* Stick to identical functionality and naming used in examples so that readers
can easily compare languages.
* You MUST place your name as author in the examples so readers can contact you.
* You MUST state in the email that you license your code under the MIT/X11
license.
Subscribe to this list at http://lists.zeromq.org/mailman/listinfo/zeromq-dev.
|
with Extraction.Node_Edge_Types;
with Extraction.Utilities;
package body Extraction.Derived_Type_Defs is
use type LALCO.Ada_Node_Kind_Type;
function Has_Interfaces(Node : LAL.Ada_Node'Class) return Boolean is
(Node.Kind in LALCO.Ada_Derived_Type_Def | LALCO.Ada_Task_Def | LALCO.Ada_Protected_Type_Decl | LALCO.Ada_Single_Protected_Decl);
function Get_Interfaces(Node : LAL.Ada_Node'Class) return LAL.Parent_List is
begin
case Node.Kind is
when LALCO.Ada_Derived_Type_Def =>
return Node.As_Derived_Type_Def.F_Interfaces;
when LALCO.Ada_Task_Def =>
return Node.As_Task_Def.F_Interfaces;
when LALCO.Ada_Protected_Type_Decl =>
return Node.As_Protected_Type_Decl.F_Interfaces;
when LALCO.Ada_Single_Protected_Decl =>
return Node.As_Single_Protected_Decl.F_Interfaces;
when others =>
raise Internal_Extraction_Error with "Cases in Has_Interfaces and Get_Interfaces do not match";
end case;
end Get_Interfaces;
procedure Extract_Edges
(Node : LAL.Ada_Node'Class;
Graph : Graph_Operations.Graph_Context)
is
begin
if Node.Kind = LALCO.Ada_Derived_Type_Def then
declare
Derived_Type_Def : constant LAL.Derived_Type_Def := Node.As_Derived_Type_Def;
Type_Decl : constant LAL.Basic_Decl := Utilities.Get_Parent_Basic_Decl(Derived_Type_Def);
Subtype_Indication : constant LAL.Subtype_Indication := Derived_Type_Def.F_Subtype_Indication;
begin
if not Subtype_Indication.Is_Null then
declare
Parent : constant LAL.Basic_Decl := Utilities.Get_Referenced_Decl(Subtype_Indication.F_Name);
begin
Graph.Write_Edge(Type_Decl, Parent, Node_Edge_Types.Edge_Type_Derives_From);
end;
end if;
end;
end if;
if Has_Interfaces(Node) then
declare
Decl : constant LAL.Basic_Decl := Utilities.Get_Parent_Basic_Decl(Node);
begin
for Interface_Ref of Get_Interfaces(Node) loop
declare
Parent : constant LAL.Basic_Decl := Utilities.Get_Referenced_Decl(Interface_Ref);
begin
Graph.Write_Edge(Decl, Parent, Node_Edge_Types.Edge_Type_Derives_From);
end;
end loop;
end;
end if;
end Extract_Edges;
end Extraction.Derived_Type_Defs;
|
-----------------------------------------------------------------------
-- akt-commands -- Ada Keystore Tool commands
-- Copyright (C) 2019 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- 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 System.Multiprocessors;
with Ada.Command_Line;
with Ada.Text_IO;
with Ada.Unchecked_Deallocation;
with Util.Strings;
with Util.Commands.Parsers.GNAT_Parser;
with AKT.Configs;
with AKT.Commands.Drivers;
with AKT.Commands.Set;
with AKT.Commands.Get;
with AKT.Commands.Create;
with AKT.Commands.List;
with AKT.Commands.Remove;
with AKT.Commands.Edit;
with AKT.Commands.Extract;
with AKT.Commands.Store;
with AKT.Commands.Password.Add;
with AKT.Commands.Password.Set;
with AKT.Commands.Password.Remove;
with AKT.Commands.Info;
with AKT.Commands.Config;
with Keystore.Passwords.Input;
with Keystore.Passwords.Files;
with Keystore.Passwords.Unsafe;
with Keystore.Passwords.Cmds;
package body AKT.Commands is
use type Keystore.Passwords.Provider_Access;
use type Keystore.Header_Slot_Count_Type;
use type Keystore.Passwords.Keys.Key_Provider_Access;
Help_Command : aliased AKT.Commands.Drivers.Help_Command_Type;
Set_Command : aliased AKT.Commands.Set.Command_Type;
Store_Command : aliased AKT.Commands.Store.Command_Type;
Get_Command : aliased AKT.Commands.Get.Command_Type;
Extract_Command : aliased AKT.Commands.Extract.Command_Type;
Create_Command : aliased AKT.Commands.Create.Command_Type;
List_Command : aliased AKT.Commands.List.Command_Type;
Remove_Command : aliased AKT.Commands.Remove.Command_Type;
Edit_Command : aliased AKT.Commands.Edit.Command_Type;
Set_Password_Command : aliased AKT.Commands.Password.Set.Command_Type;
Add_Password_Command : aliased AKT.Commands.Password.Add.Command_Type;
Remove_Password_Command : aliased AKT.Commands.Password.Remove.Command_Type;
Info_Command : aliased AKT.Commands.Info.Command_Type;
Config_Command : aliased AKT.Commands.Config.Command_Type;
Driver : Drivers.Driver_Type;
-- ------------------------------
-- Print the command usage.
-- ------------------------------
procedure Usage (Args : in Argument_List'Class;
Context : in out Context_Type;
Name : in String := "") is
begin
GC.Display_Help (Context.Command_Config);
if Name'Length > 0 then
Driver.Usage (Args, Context, Name);
end if;
Ada.Command_Line.Set_Exit_Status (Ada.Command_Line.Failure);
end Usage;
-- ------------------------------
-- Open the keystore file using the password password.
-- When `Use_Worker` is set, a workers of N tasks is created and assigned to the keystore
-- for the decryption and encryption process.
-- ------------------------------
procedure Open_Keystore (Context : in out Context_Type;
Args : in Argument_List'Class;
Use_Worker : in Boolean := False) is
begin
Setup_Password_Provider (Context);
Setup_Key_Provider (Context);
Context.Wallet.Open (Path => Context.Get_Keystore_Path (Args),
Data_Path => Context.Data_Path.all,
Config => Context.Config,
Info => Context.Info);
if not Context.No_Password_Opt or else Context.Info.Header_Count = 0 then
if Context.Key_Provider /= null then
Context.Wallet.Set_Master_Key (Context.Key_Provider.all);
end if;
if Context.Provider = null then
Context.Provider := Keystore.Passwords.Input.Create (-("Enter password: "), False);
end if;
Context.Wallet.Unlock (Context.Provider.all, Context.Slot);
else
Context.GPG.Load_Secrets (Context.Wallet);
Context.Wallet.Set_Master_Key (Context.GPG);
Context.Wallet.Unlock (Context.GPG, Context.Slot);
end if;
if Use_Worker then
Context.Workers := new Keystore.Task_Manager (Context.Worker_Count);
Keystore.Start (Context.Workers);
Context.Wallet.Set_Work_Manager (Context.Workers);
end if;
end Open_Keystore;
-- ------------------------------
-- Open the keystore file and change the password.
-- ------------------------------
procedure Change_Password (Context : in out Context_Type;
Args : in Argument_List'Class;
New_Password : in out Keystore.Passwords.Provider'Class;
Config : in Keystore.Wallet_Config;
Mode : in Keystore.Mode_Type) is
begin
Context.Wallet.Open (Path => Context.Get_Keystore_Path (Args),
Data_Path => Context.Data_Path.all,
Config => Context.Config,
Info => Context.Info);
if not Context.No_Password_Opt or else Context.Info.Header_Count = 0 then
if Context.Key_Provider /= null then
Context.Wallet.Set_Master_Key (Context.Key_Provider.all);
end if;
Context.Wallet.Unlock (Context.Provider.all, Context.Slot);
Context.Wallet.Set_Key (Password => Context.Provider.all,
New_Password => New_Password,
Config => Config,
Mode => Mode);
else
Context.GPG.Load_Secrets (Context.Wallet);
Context.Wallet.Set_Master_Key (Context.GPG);
Context.Wallet.Unlock (Context.GPG, Context.Slot);
Context.Wallet.Set_Key (Password => Context.GPG,
New_Password => New_Password,
Config => Config,
Mode => Mode);
end if;
end Change_Password;
-- ------------------------------
-- Execute the command with its arguments.
-- ------------------------------
procedure Execute (Name : in String;
Args : in Argument_List'Class;
Context : in out Context_Type) is
begin
Log.Info ("Execute command {0}", Name);
Driver.Execute (Name, Args, Context);
end Execute;
-- ------------------------------
-- Initialize the commands.
-- ------------------------------
overriding
procedure Initialize (Context : in out Context_Type) is
begin
Intl.Initialize ("akt", AKT.Configs.PREFIX & "/share/locale");
Context.Worker_Count := Positive (System.Multiprocessors.Number_Of_CPUs);
GC.Set_Usage (Config => Context.Command_Config,
Usage => "[switchs] command [arguments]",
Help => -("akt - tool to store and protect your sensitive data"));
GC.Define_Switch (Config => Context.Command_Config,
Output => Context.Version'Access,
Switch => "-V",
Long_Switch => "--version",
Help => -("Print the version"));
GC.Define_Switch (Config => Context.Command_Config,
Output => Context.Verbose'Access,
Switch => "-v",
Long_Switch => "--verbose",
Help => -("Verbose execution mode"));
GC.Define_Switch (Config => Context.Command_Config,
Output => Context.Debug'Access,
Switch => "-vv",
Long_Switch => "--debug",
Help => -("Enable debug execution"));
GC.Define_Switch (Config => Context.Command_Config,
Output => Context.Dump'Access,
Switch => "-vvv",
Long_Switch => "--debug-dump",
Help => -("Enable debug dump execution"));
GC.Define_Switch (Config => Context.Command_Config,
Output => Context.Zero'Access,
Switch => "-z",
Long_Switch => "--zero",
Help => -("Erase and fill with zeros instead of random values"));
GC.Define_Switch (Config => Context.Command_Config,
Output => Context.Config_File'Access,
Switch => "-c:",
Long_Switch => "--config=",
Argument => "PATH",
Help => -("Defines the path for akt global configuration"));
GC.Define_Switch (Config => Context.Command_Config,
Output => Context.Worker_Count'Access,
Switch => "-t:",
Long_Switch => "--thread=",
Initial => Context.Worker_Count,
Argument => "COUNT",
Help => -("Number of threads for the encryption/decryption process"));
GC.Initialize_Option_Scan (Stop_At_First_Non_Switch => True);
Driver.Set_Description (-("akt - tool to store and protect your sensitive data"));
Driver.Set_Usage (-("[-V] [-v] [-vv] [-vvv] [-c path] [-t count] [-z] " &
"<command> [<args>]" & ASCII.LF &
"where:" & ASCII.LF &
" -V Print the tool version" & ASCII.LF &
" -v Verbose execution mode" & ASCII.LF &
" -vv Debug execution mode" & ASCII.LF &
" -vvv Dump execution mode" & ASCII.LF &
" -c path Defines the path for akt " &
"global configuration" & ASCII.LF &
" -t count Number of threads for the " &
"encryption/decryption process" & ASCII.LF &
" -z Erase and fill with zeros instead of random values"));
Driver.Add_Command ("help",
-("print some help"),
Help_Command'Access);
Driver.Add_Command ("config",
-("get or set global options"),
Config_Command'Access);
Driver.Add_Command ("set",
-("insert or update a value in the keystore"),
Set_Command'Access);
Driver.Add_Command ("store",
-("read the standard input and insert or update the"
& " content in the keystore"),
Store_Command'Access);
Driver.Add_Command ("get",
-("get a value from the keystore"),
Get_Command'Access);
Driver.Add_Command ("extract",
-("get a value from the keystore"),
Extract_Command'Access);
Driver.Add_Command ("create",
-("create the keystore"),
Create_Command'Access);
Driver.Add_Command ("list",
-("list values of the keystore"),
List_Command'Access);
Driver.Add_Command ("remove",
-("remove values from the keystore"),
Remove_Command'Access);
Driver.Add_Command ("edit",
-("edit the value with an external editor"),
Edit_Command'Access);
Driver.Add_Command ("password-set",
-("change the password"),
Set_Password_Command'Access);
Driver.Add_Command ("password-add",
-("add a password"),
Add_Password_Command'Access);
Driver.Add_Command ("password-remove",
-("remove a password"),
Remove_Password_Command'Access);
Driver.Add_Command ("info",
-("report information about the keystore"),
Info_Command'Access);
end Initialize;
-- ------------------------------
-- Setup the command before parsing the arguments and executing it.
-- ------------------------------
procedure Setup (Config : in out GC.Command_Line_Configuration;
Context : in out Context_Type) is
begin
GC.Define_Switch (Config => Config,
Output => Context.Wallet_File'Access,
Switch => "-k:",
Long_Switch => "--keystore=",
Argument => "PATH",
Help => -("Defines the path for the keystore file"));
GC.Define_Switch (Config => Config,
Output => Context.Data_Path'Access,
Switch => "-d:",
Long_Switch => "--data-path=",
Argument => "PATH",
Help => -("The directory which contains the keystore data blocks"));
GC.Define_Switch (Config => Config,
Output => Context.Password_File'Access,
Long_Switch => "--passfile=",
Argument => "PATH",
Help => -("Read the file that contains the password"));
GC.Define_Switch (Config => Config,
Output => Context.Unsafe_Password'Access,
Long_Switch => "--passfd=",
Argument => "NUM",
Help => -("Read the password from the pipe with"
& " the given file descriptor"));
GC.Define_Switch (Config => Config,
Output => Context.Unsafe_Password'Access,
Long_Switch => "--passsocket=",
Help => -("The password is passed within the socket connection"));
GC.Define_Switch (Config => Config,
Output => Context.Password_Env'Access,
Long_Switch => "--passenv=",
Argument => "NAME",
Help => -("Read the environment variable that contains"
& " the password (not safe)"));
GC.Define_Switch (Config => Config,
Output => Context.Unsafe_Password'Access,
Switch => "-p:",
Long_Switch => "--password=",
Help => -("The password is passed within the command line (not safe)"));
GC.Define_Switch (Config => Config,
Output => Context.Password_Askpass'Access,
Long_Switch => "--passask",
Help => -("Run the ssh-askpass command to get the password"));
GC.Define_Switch (Config => Config,
Output => Context.Password_Command'Access,
Long_Switch => "--passcmd=",
Argument => "COMMAND",
Help => -("Run the command to get the password"));
GC.Define_Switch (Config => Config,
Output => Context.Wallet_Key_File'Access,
Long_Switch => "--wallet-key-file=",
Argument => "PATH",
Help => -("Read the file that contains the wallet keys"));
end Setup;
procedure Setup_Password_Provider (Context : in out Context_Type) is
begin
if Context.Password_Askpass then
Context.Provider := Keystore.Passwords.Cmds.Create ("ssh-askpass");
elsif Context.Password_Command'Length > 0 then
Context.Provider := Keystore.Passwords.Cmds.Create (Context.Password_Command.all);
elsif Context.Password_File'Length > 0 then
Context.Provider := Keystore.Passwords.Files.Create (Context.Password_File.all);
elsif Context.Password_Command'Length > 0 then
Context.Provider := Keystore.Passwords.Cmds.Create (Context.Password_Command.all);
elsif Context.Unsafe_Password'Length > 0 then
Context.Provider := Keystore.Passwords.Unsafe.Create (Context.Unsafe_Password.all);
else
Context.No_Password_Opt := True;
end if;
Context.Key_Provider := Keystore.Passwords.Keys.Create (Keystore.DEFAULT_WALLET_KEY);
end Setup_Password_Provider;
procedure Setup_Key_Provider (Context : in out Context_Type) is
begin
if Context.Wallet_Key_File'Length > 0 then
Context.Key_Provider := Keystore.Passwords.Files.Create (Context.Wallet_Key_File.all);
end if;
end Setup_Key_Provider;
procedure Initialize (Context : in out Keystore.Passwords.GPG.Context_Type) is
begin
if AKT.Configs.Exists (AKT.Configs.GPG_CRYPT_CONFIG) then
Context.Set_Encrypt_Command (AKT.Configs.Get (AKT.Configs.GPG_CRYPT_CONFIG));
end if;
if AKT.Configs.Exists (AKT.Configs.GPG_DECRYPT_CONFIG) then
Context.Set_Decrypt_Command (AKT.Configs.Get (AKT.Configs.GPG_DECRYPT_CONFIG));
end if;
if AKT.Configs.Exists (AKT.Configs.GPG_LIST_CONFIG) then
Context.Set_List_Key_Command (AKT.Configs.Get (AKT.Configs.GPG_LIST_CONFIG));
end if;
end Initialize;
procedure Parse (Context : in out Context_Type;
Arguments : out Util.Commands.Dynamic_Argument_List) is
begin
GC.Getopt (Config => Context.Command_Config);
Util.Commands.Parsers.GNAT_Parser.Get_Arguments (Arguments, GC.Get_Argument);
if Context.Debug or Context.Verbose or Context.Dump then
AKT.Configure_Logs (Debug => Context.Debug,
Dump => Context.Dump,
Verbose => Context.Verbose);
end if;
AKT.Configs.Initialize (Context.Config_File.all);
Initialize (Context.GPG);
if Context.Version then
Ada.Text_IO.Put_Line (AKT.Configs.RELEASE);
return;
end if;
Context.Config.Randomize := not Context.Zero;
declare
Cmd_Name : constant String := Arguments.Get_Command_Name;
begin
if Cmd_Name'Length = 0 then
AKT.Commands.Log.Error (-("Missing command name to execute."));
AKT.Commands.Usage (Arguments, Context);
Ada.Command_Line.Set_Exit_Status (Ada.Command_Line.Failure);
return;
end if;
AKT.Commands.Execute (Cmd_Name, Arguments, Context);
exception
when GNAT.Command_Line.Invalid_Parameter =>
AKT.Commands.Log.Error (-("Missing option parameter"));
raise Error;
end;
end Parse;
procedure Parse_Range (Value : in String;
Config : in out Keystore.Wallet_Config) is
Pos : constant Natural := Util.Strings.Index (Value, ':');
Low : Integer := Config.Min_Counter;
High : Integer := Config.Max_Counter;
begin
if Pos > 0 then
Low := Integer'Value (Value (Value'First .. Pos - 1));
High := Integer'Value (Value (Pos + 1 .. Value'Last));
else
High := Integer'Value (Value);
if Low > High then
Low := High;
end if;
end if;
if not (Low in Positive'Range) or not (High in Positive'Range) then
AKT.Commands.Log.Error (-("Value is out of range"));
raise Error;
end if;
if Low > High then
AKT.Commands.Log.Error (-("The min counter is greater than max counter"));
raise Error;
end if;
Config.Min_Counter := Positive (Low);
Config.Max_Counter := Positive (High);
exception
when Error =>
raise;
when others =>
AKT.Commands.Log.Error (-("Invalid counter range: {0}"), Value);
AKT.Commands.Log.Error (-("Valid format are 'MAX_COUNTER' or "
& "'MIN_COUNTER:MAX_COUNTER'"));
AKT.Commands.Log.Error (-("Counters must be positive integers."));
raise Error;
end Parse_Range;
-- ------------------------------
-- Get the keystore file path.
-- ------------------------------
function Get_Keystore_Path (Context : in out Context_Type;
Args : in Argument_List'Class) return String is
begin
if Context.Wallet_File'Length > 0 then
Context.First_Arg := 1;
return Context.Wallet_File.all;
elsif Args.Get_Count > 0 then
Context.First_Arg := 2;
return Args.Get_Argument (1);
else
raise No_Keystore_File;
end if;
end Get_Keystore_Path;
overriding
procedure Finalize (Context : in out Context_Type) is
use type Keystore.Task_Manager_Access;
procedure Free is
new Ada.Unchecked_Deallocation (Object => Keystore.Passwords.Provider'Class,
Name => Keystore.Passwords.Provider_Access);
procedure Free is
new Ada.Unchecked_Deallocation (Object => Keystore.Task_Manager,
Name => Keystore.Task_Manager_Access);
begin
if Context.Workers /= null then
Keystore.Stop (Context.Workers);
Free (Context.Workers);
end if;
GC.Free (Context.Command_Config);
Free (Context.Provider);
end Finalize;
end AKT.Commands;
|
-- Copyright (c) 2020 Maxim Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-- License-Filename: LICENSE
-------------------------------------------------------------
package body Torrent.Contexts is
-----------------------
-- Add_Metainfo_File --
-----------------------
procedure Add_Metainfo_File
(Self : in out Context'Class;
File : not null Torrent.Metainfo_Files.Metainfo_File_Access)
is
File_Count : constant Ada.Containers.Count_Type :=
Ada.Containers.Count_Type (File.File_Count);
Job : constant Downloader_Access := new Torrent.Downloaders.Downloader
(Context => Self'Unchecked_Access,
Meta => File,
File_Count => File_Count,
Piece_Count => File.Piece_Count);
begin
Job.Initialize (Self.Peer_Id, Self.Path);
Self.Downloaders.Insert (File.Info_Hash, Job);
end Add_Metainfo_File;
-------------
-- Connect --
-------------
procedure Connect
(Self : Context'Class;
Job : Torrent.Downloaders.Downloader_Access;
Address : GNAT.Sockets.Sock_Addr_Type) is
begin
Self.Initiator.Connect (Job, Address);
end Connect;
---------------
-- Connected --
---------------
procedure Connected
(Self : Context'Class;
Value : Torrent.Connections.Connection_Access) is
begin
Self.Manager.Connected (Value);
end Connected;
-------------------
-- Find_Download --
-------------------
function Find_Download
(Self : Context'Class;
Hash : SHA1) return Torrent.Downloaders.Downloader_Access
is
Cursor : constant Downloader_Maps.Cursor := Self.Downloaders.Find (Hash);
begin
if Downloader_Maps.Has_Element (Cursor) then
return Torrent.Downloaders.Downloader_Access
(Downloader_Maps.Element (Cursor));
else
return null;
end if;
end Find_Download;
----------------
-- Initialize --
----------------
procedure Initialize
(Self : in out Context'Class;
Id : Torrent.SHA1;
Path : League.Strings.Universal_String) is
begin
Self.Path := Path;
Self.Peer_Id := Id;
end Initialize;
-----------
-- Start --
-----------
procedure Start
(Self : in out Context'Class;
Next_Update : out Ada.Calendar.Time)
is
use type Ada.Calendar.Time;
begin
Next_Update := Ada.Calendar.Clock + 3600.0;
for J of Self.Downloaders loop
J.Start;
end loop;
end Start;
----------
-- Stop --
----------
procedure Stop (Self : in out Context'Class) is
begin
for J of Self.Downloaders loop
J.Stop;
end loop;
Self.Manager.Complete;
Self.Initiator.Stop;
end Stop;
------------
-- Update --
------------
procedure Update
(Self : in out Context'Class;
Next_Update : out Ada.Calendar.Time)
is
use type Ada.Calendar.Time;
begin
Next_Update := Ada.Calendar.Clock + 3600.0;
for J of Self.Downloaders loop
J.Update;
end loop;
end Update;
end Torrent.Contexts;
|
-- Generated by Snowball 2.2.0 - https://snowballstem.org/
package body Stemmer.Indonesian is
pragma Style_Checks ("-mr");
pragma Warnings (Off, "*variable*is never read and never assigned*");
pragma Warnings (Off, "*mode could be*instead of*");
pragma Warnings (Off, "*formal parameter.*is not modified*");
pragma Warnings (Off, "*this line is too long*");
pragma Warnings (Off, "*is not referenced*");
procedure R_VOWEL (Z : in out Context_Type; Result : out Boolean);
procedure R_SUFFIX_I_OK (Z : in out Context_Type; Result : out Boolean);
procedure R_SUFFIX_AN_OK (Z : in out Context_Type; Result : out Boolean);
procedure R_SUFFIX_KAN_OK (Z : in out Context_Type; Result : out Boolean);
procedure R_KER (Z : in out Context_Type; Result : out Boolean);
procedure R_Remove_suffix (Z : in out Context_Type; Result : out Boolean);
procedure R_Remove_second_order_prefix (Z : in out Context_Type; Result : out Boolean);
procedure R_Remove_first_order_prefix (Z : in out Context_Type; Result : out Boolean);
procedure R_Remove_possessive_pronoun (Z : in out Context_Type; Result : out Boolean);
procedure R_Remove_particle (Z : in out Context_Type; Result : out Boolean);
procedure Among_Handler (Context : in out Stemmer.Context_Type'Class; Operation : in Operation_Index; Result : out Boolean);
G_Vowel : constant Grouping_Array (0 .. 23) := (
True, False, False, False, True, False, False, False,
True, False, False, False, False, False, True, False,
False, False, False, False, True, False, False, False
);
Among_String : constant String := "kah" & "lah" & "pun" & "nya" & "ku" & "mu" & "i" & "an" & "kan" & "di" & "ke"
& "me" & "mem" & "men" & "meng" & "meny" & "pem" & "pen" & "peng" & "peny"
& "ter" & "be" & "belajar" & "ber" & "pe" & "pelajar" & "per";
A_0 : constant Among_Array_Type (0 .. 2) := (
(1, 3, -1, 1, 0),
(4, 6, -1, 1, 0),
(7, 9, -1, 1, 0));
A_1 : constant Among_Array_Type (0 .. 2) := (
(10, 12, -1, 1, 0),
(13, 14, -1, 1, 0),
(15, 16, -1, 1, 0));
A_2 : constant Among_Array_Type (0 .. 2) := (
(17, 17, -1, 1, 1),
(18, 19, -1, 1, 2),
(20, 22, 1, 1, 3));
A_3 : constant Among_Array_Type (0 .. 11) := (
(23, 24, -1, 1, 0),
(25, 26, -1, 2, 0),
(27, 28, -1, 1, 0),
(29, 31, 2, 5, 0),
(32, 34, 2, 1, 0),
(35, 38, 4, 1, 0),
(39, 42, 4, 3, 4),
(43, 45, -1, 6, 0),
(46, 48, -1, 2, 0),
(49, 52, 8, 2, 0),
(53, 56, 8, 4, 5),
(57, 59, -1, 1, 0));
A_4 : constant Among_Array_Type (0 .. 5) := (
(60, 61, -1, 3, 6),
(62, 68, 0, 4, 0),
(69, 71, 0, 3, 0),
(72, 73, -1, 1, 0),
(74, 80, 3, 2, 0),
(81, 83, 3, 1, 0));
procedure R_Remove_particle (Z : in out Context_Type; Result : out Boolean) is
C : Result_Index;
A : Integer;
begin
-- (, line 50
Z.Ket := Z.C; -- [, line 51
-- substring, line 51
if Z.C - 2 <= Z.Lb or else (Character'Pos (Z.P (Z.C)) /= 104 and then Character'Pos (Z.P (Z.C)) /= 110) then
Result := False;
return;
-- substring, line 51
end if;
Find_Among_Backward (Z, A_0, Among_String, null, A);
if A = 0 then
Result := False;
return;
end if;
Z.Bra := Z.C; -- ], line 51
-- (, line 52
-- delete, line 52
Slice_Del (Z);
Z.I_Measure := Z.I_Measure - 1;
Result := True;
end R_Remove_particle;
procedure R_Remove_possessive_pronoun (Z : in out Context_Type; Result : out Boolean) is
C : Result_Index;
A : Integer;
begin
-- (, line 56
Z.Ket := Z.C; -- [, line 57
-- substring, line 57
if Z.C - 1 <= Z.Lb or else (Character'Pos (Z.P (Z.C)) /= 97 and then Character'Pos (Z.P (Z.C)) /= 117) then
Result := False;
return;
-- substring, line 57
end if;
Find_Among_Backward (Z, A_1, Among_String, null, A);
if A = 0 then
Result := False;
return;
end if;
Z.Bra := Z.C; -- ], line 57
-- (, line 58
-- delete, line 58
Slice_Del (Z);
Z.I_Measure := Z.I_Measure - 1;
Result := True;
end R_Remove_possessive_pronoun;
procedure R_SUFFIX_KAN_OK (Z : in out Context_Type; Result : out Boolean) is
C : Result_Index;
A : Integer;
begin
-- and, line 85
if not (Z.I_Prefix /= 3) then
Result := False;
return;
end if;
if not (Z.I_Prefix /= 2) then
Result := False;
return;
end if;
Result := True;
end R_SUFFIX_KAN_OK;
procedure R_SUFFIX_AN_OK (Z : in out Context_Type; Result : out Boolean) is
begin
Result := (Z.I_Prefix /= 1);
end R_SUFFIX_AN_OK;
procedure R_SUFFIX_I_OK (Z : in out Context_Type; Result : out Boolean) is
C : Result_Index;
A : Integer;
v_1 : Char_Index;
begin
-- (, line 91
if not (Z.I_Prefix <= 2) then
Result := False;
return;
end if;
-- not, line 128
v_1 := Z.L - Z.C;
-- literal, line 128
C := Eq_S_Backward (Z, "s");
if C = 0 then
goto lab0;
end if;
Z.C := Z.C - C;
Result := False;
return;
<<lab0>>
Z.C := Z.L - v_1;
Result := True;
end R_SUFFIX_I_OK;
procedure R_Remove_suffix (Z : in out Context_Type; Result : out Boolean) is
C : Result_Index;
A : Integer;
begin
-- (, line 131
Z.Ket := Z.C; -- [, line 132
-- substring, line 132
if Z.C <= Z.Lb or else (Character'Pos (Z.P (Z.C)) /= 105 and then Character'Pos (Z.P (Z.C)) /= 110) then
Result := False;
return;
-- substring, line 132
end if;
Find_Among_Backward (Z, A_2, Among_String, Among_Handler'Access, A);
if A = 0 then
Result := False;
return;
end if;
Z.Bra := Z.C; -- ], line 132
-- (, line 134
-- delete, line 134
Slice_Del (Z);
Z.I_Measure := Z.I_Measure - 1;
Result := True;
end R_Remove_suffix;
procedure R_VOWEL (Z : in out Context_Type; Result : out Boolean) is
C : Result_Index;
A : Integer;
begin
In_Grouping (Z, G_Vowel, 97, 117, False, C);
if C /= 0 then
Result := False;
return;
end if;
Result := True;
end R_VOWEL;
procedure R_KER (Z : in out Context_Type; Result : out Boolean) is
C : Result_Index;
A : Integer;
begin
-- (, line 143
Out_Grouping (Z, G_Vowel, 97, 117, False, C);
if C /= 0 then
Result := False;
return;
end if;
-- literal, line 143
C := Eq_S (Z, "er");
if C = 0 then
Result := False;
return;
end if;
Z.C := Z.C + C;
Result := True;
end R_KER;
procedure R_Remove_first_order_prefix (Z : in out Context_Type; Result : out Boolean) is
C : Result_Index;
A : Integer;
v_1 : Char_Index;
v_2 : Char_Index;
v_3 : Char_Index;
v_4 : Char_Index;
begin
-- (, line 145
Z.Bra := Z.C; -- [, line 146
-- substring, line 146
if Z.C + 1 >= Z.L or else (Character'Pos (Z.P (Z.C + 1 + 1)) /= 105 and then Character'Pos (Z.P (Z.C + 1 + 1)) /= 101) then
Result := False;
return;
-- substring, line 146
end if;
Find_Among (Z, A_3, Among_String, Among_Handler'Access, A);
if A = 0 then
Result := False;
return;
end if;
Z.Ket := Z.C; -- ], line 146
-- among, line 146
case A is
when 1 =>
-- (, line 147
-- delete, line 147
Slice_Del (Z);
Z.I_Prefix := 1;
Z.I_Measure := Z.I_Measure - 1;
when 2 =>
-- (, line 148
-- delete, line 148
Slice_Del (Z);
Z.I_Prefix := 3;
Z.I_Measure := Z.I_Measure - 1;
when 3 =>
-- (, line 149
Z.I_Prefix := 1;
-- <-, line 149
Slice_From (Z, "s");
Z.I_Measure := Z.I_Measure - 1;
when 4 =>
-- (, line 150
Z.I_Prefix := 3;
-- <-, line 150
Slice_From (Z, "s");
Z.I_Measure := Z.I_Measure - 1;
when 5 =>
-- (, line 151
Z.I_Prefix := 1;
Z.I_Measure := Z.I_Measure - 1;
-- or, line 151
v_1 := Z.C;
-- and, line 151
v_2 := Z.C;
In_Grouping (Z, G_Vowel, 97, 117, False, C);
if C /= 0 then
goto lab1;
end if;
Z.C := v_2;
-- <-, line 151
Slice_From (Z, "p");
goto lab0;
<<lab1>>
Z.C := v_1;
-- delete, line 151
Slice_Del (Z);
<<lab0>>
when 6 =>
-- (, line 152
Z.I_Prefix := 3;
Z.I_Measure := Z.I_Measure - 1;
-- or, line 152
v_3 := Z.C;
-- and, line 152
v_4 := Z.C;
In_Grouping (Z, G_Vowel, 97, 117, False, C);
if C /= 0 then
goto lab3;
end if;
Z.C := v_4;
-- <-, line 152
Slice_From (Z, "p");
goto lab2;
<<lab3>>
Z.C := v_3;
-- delete, line 152
Slice_Del (Z);
<<lab2>>
when others =>
null;
end case;
Result := True;
end R_Remove_first_order_prefix;
procedure R_Remove_second_order_prefix (Z : in out Context_Type; Result : out Boolean) is
C : Result_Index;
A : Integer;
begin
-- (, line 156
Z.Bra := Z.C; -- [, line 162
-- substring, line 162
if Z.C + 1 >= Z.L or else Character'Pos (Z.P (Z.C + 1 + 1)) /= 101 then
Result := False;
return;
-- substring, line 162
end if;
Find_Among (Z, A_4, Among_String, Among_Handler'Access, A);
if A = 0 then
Result := False;
return;
end if;
Z.Ket := Z.C; -- ], line 162
-- among, line 162
case A is
when 1 =>
-- (, line 163
-- delete, line 163
Slice_Del (Z);
Z.I_Prefix := 2;
Z.I_Measure := Z.I_Measure - 1;
when 2 =>
-- (, line 164
-- <-, line 164
Slice_From (Z, "ajar");
Z.I_Measure := Z.I_Measure - 1;
when 3 =>
-- (, line 165
-- delete, line 165
Slice_Del (Z);
Z.I_Prefix := 4;
Z.I_Measure := Z.I_Measure - 1;
when 4 =>
-- (, line 166
-- <-, line 166
Slice_From (Z, "ajar");
Z.I_Prefix := 4;
Z.I_Measure := Z.I_Measure - 1;
when others =>
null;
end case;
Result := True;
end R_Remove_second_order_prefix;
procedure Stem (Z : in out Context_Type; Result : out Boolean) is
C : Result_Index;
A : Integer;
v_1 : Char_Index;
v_2 : Char_Index;
v_3 : Char_Index;
v_4 : Char_Index;
v_5 : Char_Index;
v_6 : Char_Index;
v_7 : Char_Index;
v_8 : Char_Index;
v_9 : Char_Index;
v_10 : Char_Index;
begin
-- (, line 171
Z.I_Measure := 0;
-- do, line 173
v_1 := Z.C;
-- repeat, line 173
<<lab1>>
loop
v_2 := Z.C;
-- (, line 173
-- gopast, line 173
-- grouping vowel, line 173
Out_Grouping (Z, G_Vowel, 97, 117, True, C);
if C < 0 then
goto lab2;
end if;
Z.C := Z.C + C;
Z.I_Measure := Z.I_Measure + 1;
goto lab1;
<<lab2>>
Z.C := v_2;
exit;
end loop;
<<lab0>>
Z.C := v_1;
if not (Z.I_Measure > 2) then
Result := False;
return;
end if;
Z.I_Prefix := 0;
Z.Lb := Z.C; Z.C := Z.L; -- backwards, line 176
-- (, line 176
-- do, line 177
v_3 := Z.L - Z.C;
-- call remove_particle, line 177
R_Remove_particle (Z, Result);
Z.C := Z.L - v_3;
if not (Z.I_Measure > 2) then
Result := False;
return;
end if;
-- do, line 179
v_4 := Z.L - Z.C;
-- call remove_possessive_pronoun, line 179
R_Remove_possessive_pronoun (Z, Result);
Z.C := Z.L - v_4;
Z.C := Z.Lb;
if not (Z.I_Measure > 2) then
Result := False;
return;
end if;
-- or, line 188
v_5 := Z.C;
-- test, line 182
v_6 := Z.C;
-- (, line 182
-- call remove_first_order_prefix, line 183
R_Remove_first_order_prefix (Z, Result);
if not Result then
goto lab5;
end if;
-- do, line 184
v_7 := Z.C;
-- (, line 184
-- test, line 185
v_8 := Z.C;
-- (, line 185
if not (Z.I_Measure > 2) then
goto lab6;
end if;
Z.Lb := Z.C; Z.C := Z.L; -- backwards, line 185
-- call remove_suffix, line 185
R_Remove_suffix (Z, Result);
if not Result then
goto lab6;
end if;
Z.C := Z.Lb;
Z.C := v_8;
if not (Z.I_Measure > 2) then
goto lab6;
end if;
-- call remove_second_order_prefix, line 186
R_Remove_second_order_prefix (Z, Result);
if not Result then
goto lab6;
end if;
<<lab6>>
Z.C := v_7;
Z.C := v_6;
goto lab4;
<<lab5>>
Z.C := v_5;
-- (, line 188
-- do, line 189
v_9 := Z.C;
-- call remove_second_order_prefix, line 189
R_Remove_second_order_prefix (Z, Result);
Z.C := v_9;
-- do, line 190
v_10 := Z.C;
-- (, line 190
if not (Z.I_Measure > 2) then
goto lab7;
end if;
Z.Lb := Z.C; Z.C := Z.L; -- backwards, line 190
-- call remove_suffix, line 190
R_Remove_suffix (Z, Result);
if not Result then
goto lab7;
end if;
Z.C := Z.Lb;
<<lab7>>
Z.C := v_10;
<<lab4>>
Result := True;
end Stem;
procedure Among_Handler (Context : in out Stemmer.Context_Type'Class; Operation : in Operation_Index; Result : out Boolean) is
begin
case Operation is
when 1 =>
R_SUFFIX_I_OK (Context_Type (Context), Result);
when 2 =>
R_SUFFIX_AN_OK (Context_Type (Context), Result);
when 3 =>
R_SUFFIX_KAN_OK (Context_Type (Context), Result);
when 4 =>
R_VOWEL (Context_Type (Context), Result);
when 5 =>
R_VOWEL (Context_Type (Context), Result);
when 6 =>
R_KER (Context_Type (Context), Result);
when others =>
Result := False;
end case;
end Among_Handler;
end Stemmer.Indonesian;
|
with
AdaM.Factory;
package body AdaM.Declaration.of_renaming.a_package
is
-- Storage Pool
--
record_Version : constant := 1;
pool_Size : constant := 5_000;
package Pool is new AdaM.Factory.Pools (".adam-store",
"Declarations.of_renaming.a_package",
pool_Size,
record_Version,
Declaration.of_renaming.a_package.item,
Declaration.of_renaming.a_package.view);
-- Forge
--
procedure define (Self : in out Item)
is
begin
null;
end define;
overriding
procedure destruct (Self : in out Item)
is
begin
null;
end destruct;
function new_Declaration return View
is
new_View : constant Declaration.of_renaming.a_package.view := Pool.new_Item;
begin
define (Declaration.of_renaming.a_package.item (new_View.all));
return new_View;
end new_Declaration;
procedure free (Self : in out Declaration.of_renaming.a_package.view)
is
begin
destruct (Declaration.of_renaming.a_package.item (Self.all));
Pool.free (Self);
end free;
-- Attributes
--
overriding
function Id (Self : access Item) return AdaM.Id
is
begin
return Pool.to_Id (Self);
end Id;
-- Streams
--
procedure View_write (Stream : not null access Ada.Streams.Root_Stream_Type'Class;
Self : in View)
renames Pool.View_write;
procedure View_read (Stream : not null access Ada.Streams.Root_Stream_Type'Class;
Self : out View)
renames Pool.View_read;
end AdaM.Declaration.of_renaming.a_package;
|
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- G N A T . S T R I N G S --
-- --
-- S p e c --
-- --
-- Copyright (C) 1995-2009, 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. --
-- --
-- --
-- --
-- --
-- --
-- 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. --
-- --
------------------------------------------------------------------------------
-- Common String access types and related subprograms
-- See file s-string.ads for full documentation of the interface
with System.Strings;
package GNAT.Strings renames System.Strings;
|
package body ACO.Utils.DS.Generic_Collection is
procedure Initialize
(C : in out Collection)
is
begin
Clear (C);
end Initialize;
procedure Clear
(C : in out Collection)
is
begin
C.Start := 1;
C.Size := 0;
end Clear;
function Is_Full
(C : Collection)
return Boolean
is
(C.Size >= C.Max_Size);
function Is_Empty
(C : Collection)
return Boolean
is
(C.Size = 0);
function Is_Valid_Index
(C : Collection;
Index : Positive)
return Boolean
is
(Index <= C.Size);
function Available
(C : Collection)
return Natural
is
(C.Max_Size - C.Size);
function Length
(C : Collection)
return Natural
is
(C.Size);
function First
(C : Collection)
return Item_Type
is
(C.Items (C.Start));
function Last
(C : Collection)
return Item_Type
is
(C.Items (((C.Start - 1 + C.Size - 1) mod C.Max_Size) + 1));
procedure Insert
(C : in out Collection;
Item : in Item_Type)
is
begin
C.Start := ((C.Start - 2) mod C.Max_Size) + 1;
C.Size := C.Size + 1;
C.Items (C.Start) := Item;
end Insert;
procedure Insert
(C : in out Collection;
Item : in Item_Type;
Before : in Positive)
is
begin
if C.Size = 0 or else Before = 1 then
Insert (C, Item);
else
-- We are inserting in the middle.
--
-- In the comments below, 'left' means the part of Items
-- before the Itement which the new entry is to be inserted
-- before (indexed by Actual), 'right' means the part after.
declare
Start : Item_Index renames C.Start;
Actual : constant Item_Index :=
((Start - 1 + Before - 1) mod C.Max_Size) + 1;
Last : constant Item_Index :=
((Start - 1 + C.Size - 1) mod C.Max_Size) + 1;
begin
if Start = 1 or else Start > Actual then
-- the left part is wedged, shift the right part up
C.Items (Actual + 1 .. Last + 1) := C.Items (Actual .. Last);
C.Items (Actual) := Item;
elsif Last = C.Items'Last or else Last < Actual then
-- the right part is wedged, shift the left part down
C.Items (Start - 1 .. Actual - 2) :=
C.Items (Start .. Actual - 1);
Start := Start - 1;
C.Items (Actual - 1) := Item;
elsif Before < C.Size / 2 then
-- the left part is shorter, shift it down
C.Items (Start - 1 .. Actual - 2) :=
C.Items (Start .. Actual - 1);
Start := Start - 1;
C.Items (Actual - 1) := Item;
else
-- the right part is shorter, shift it up
C.Items (Actual + 1 .. Last + 1) := C.Items (Actual .. Last);
C.Items (Actual) := Item;
end if;
C.Size := C.Size + 1;
end;
end if;
end Insert;
procedure Append
(C : in out Collection;
Item : in Item_Type)
is
begin
C.Size := C.Size + 1;
C.Items (((C.Start - 1 + C.Size - 1) mod C.Max_Size) + 1) := Item;
end Append;
procedure Append
(C : in out Collection;
Item : in Item_Type;
After : in Positive)
is
begin
if C.Size = 0 or else After = C.Size then
Append (C, Item);
else
Insert (C, Item, Before => After + 1);
end if;
end Append;
procedure Remove
(C : in out Collection;
From : in Positive)
is
begin
if C.Size = 1 then
Clear (C);
elsif From = 1 then
C.Start := (C.Start mod C.Max_Size) + 1;
C.Size := C.Size - 1;
elsif From = C.Size then
C.Size := C.Size - 1;
else
-- We are removing from the middle.
--
-- In the comments below, 'left' means the part of Items
-- before the Itement to be removed (indexed by Actual),
-- 'right' means the part after.
declare
Start : Item_Index renames C.Start;
Actual : constant Item_Index :=
((Start - 1 + From - 1) mod C.Max_Size) + 1;
Last : constant Item_Index :=
((Start - 1 + C.Size - 1) mod C.Max_Size) + 1;
begin
if Start > Actual then
-- the left part wraps round; shift the right part down
C.Items (Actual .. Last - 1) := C.Items (Actual + 1 .. Last);
elsif Actual > Last then
-- the right part wraps round; shift the left part up
C.Items (Start + 1 .. Actual) := C.Items (Start .. Actual - 1);
Start := Start + 1;
elsif C.Max_Size > 1 and then From < C.Size / 2 then
-- the left part is shorter
C.Items (Start + 1 .. Actual) := C.Items (Start .. Actual - 1);
Start := Start + 1;
else
-- the right part is shorter
C.Items (Actual .. Last - 1) := C.Items (Actual + 1 .. Last);
end if;
C.Size := C.Size - 1;
end;
end if;
end Remove;
procedure Replace
(C : in out Collection;
Index : in Positive;
Item : in Item_Type)
is
begin
C.Items (((C.Start - 1 + Index - 1) mod C.Max_Size) + 1) := Item;
end Replace;
function Item_At
(C : Collection;
Index : Positive)
return Item_Type
is
(C.Items (((C.Start - 1 + Index - 1) mod C.Max_Size) + 1));
function Location
(C : Collection;
Item : Item_Type;
Start : Positive := 1)
return Natural
is
begin
if C.Size = 0 then
return No_Index;
end if;
for I in Start .. C.Size loop
if C.Items (((C.Start - 1 + I - 1) mod C.Max_Size) + 1) = Item then
return I;
end if;
end loop;
return No_Index;
end Location;
end ACO.Utils.DS.Generic_Collection;
|
-- Copyright (c) 2019 Maxim Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-- License-Filename: LICENSE
-------------------------------------------------------------
package body Program.Nodes.Function_Calls is
function Create
(Prefix : 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)
return Function_Call is
begin
return Result : Function_Call :=
(Prefix => Prefix, Left_Bracket_Token => Left_Bracket_Token,
Parameters => Parameters, Right_Bracket_Token => Right_Bracket_Token,
Enclosing_Element => null)
do
Initialize (Result);
end return;
end Create;
function Create
(Prefix : not null Program.Elements.Expressions
.Expression_Access;
Parameters : Program.Elements.Parameter_Associations
.Parameter_Association_Vector_Access;
Is_Part_Of_Implicit : Boolean := False;
Is_Part_Of_Inherited : Boolean := False;
Is_Part_Of_Instance : Boolean := False)
return Implicit_Function_Call is
begin
return Result : Implicit_Function_Call :=
(Prefix => Prefix, Parameters => Parameters,
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 Prefix
(Self : Base_Function_Call)
return not null Program.Elements.Expressions.Expression_Access is
begin
return Self.Prefix;
end Prefix;
overriding function Parameters
(Self : Base_Function_Call)
return Program.Elements.Parameter_Associations
.Parameter_Association_Vector_Access is
begin
return Self.Parameters;
end Parameters;
overriding function Left_Bracket_Token
(Self : Function_Call)
return Program.Lexical_Elements.Lexical_Element_Access is
begin
return Self.Left_Bracket_Token;
end Left_Bracket_Token;
overriding function Right_Bracket_Token
(Self : Function_Call)
return Program.Lexical_Elements.Lexical_Element_Access is
begin
return Self.Right_Bracket_Token;
end Right_Bracket_Token;
overriding function Is_Part_Of_Implicit
(Self : Implicit_Function_Call)
return Boolean is
begin
return Self.Is_Part_Of_Implicit;
end Is_Part_Of_Implicit;
overriding function Is_Part_Of_Inherited
(Self : Implicit_Function_Call)
return Boolean is
begin
return Self.Is_Part_Of_Inherited;
end Is_Part_Of_Inherited;
overriding function Is_Part_Of_Instance
(Self : Implicit_Function_Call)
return Boolean is
begin
return Self.Is_Part_Of_Instance;
end Is_Part_Of_Instance;
procedure Initialize (Self : aliased in out Base_Function_Call'Class) is
begin
Set_Enclosing_Element (Self.Prefix, Self'Unchecked_Access);
for Item in Self.Parameters.Each_Element loop
Set_Enclosing_Element (Item.Element, Self'Unchecked_Access);
end loop;
null;
end Initialize;
overriding function Is_Function_Call_Element
(Self : Base_Function_Call)
return Boolean is
pragma Unreferenced (Self);
begin
return True;
end Is_Function_Call_Element;
overriding function Is_Expression_Element
(Self : Base_Function_Call)
return Boolean is
pragma Unreferenced (Self);
begin
return True;
end Is_Expression_Element;
overriding procedure Visit
(Self : not null access Base_Function_Call;
Visitor : in out Program.Element_Visitors.Element_Visitor'Class) is
begin
Visitor.Function_Call (Self);
end Visit;
overriding function To_Function_Call_Text
(Self : aliased in out Function_Call)
return Program.Elements.Function_Calls.Function_Call_Text_Access is
begin
return Self'Unchecked_Access;
end To_Function_Call_Text;
overriding function To_Function_Call_Text
(Self : aliased in out Implicit_Function_Call)
return Program.Elements.Function_Calls.Function_Call_Text_Access is
pragma Unreferenced (Self);
begin
return null;
end To_Function_Call_Text;
end Program.Nodes.Function_Calls;
|
--------------------------------------------------------------------------------
-- Copyright (c) 2013, Felix Krause <contact@flyx.org>
--
-- Permission to use, copy, modify, and/or 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 CL.Platforms;
with CL.Contexts;
with CL.Programs;
package CL.Kernels is
type Kernel is new Runtime_Object with null record;
type Kernel_List is array (Positive range <>) of Kernel;
package Constructors is
function Create (Source : Programs.Program'Class; Name : String) return Kernel;
function Create_All_In_Program (Source : Programs.Program'Class)
return Kernel_List;
end Constructors;
overriding procedure Adjust (Object : in out Kernel);
overriding procedure Finalize (Object : in out Kernel);
-- Only use the types declared in CL for Argument_Type.
-- Do not use with CL tagged types; use Set_Kernel_Argument_Object instead
generic
type Argument_Type is private;
Argument_Index : UInt;
procedure Set_Kernel_Argument (Target : Kernel; Value : Argument_Type);
procedure Set_Kernel_Argument_Object (Target : Kernel;
Index : UInt;
Value : Runtime_Object'Class);
function Function_Name (Source : Kernel) return String;
function Argument_Number (Source : Kernel) return UInt;
function Reference_Count (Source : Kernel) return UInt;
function Context (Source : Kernel) return Contexts.Context;
function Program (Source : Kernel) return Programs.Program;
function Work_Group_Size (Source : Kernel; Device : Platforms.Device)
return Size;
function Compile_Work_Group_Size (Source : Kernel; Device : Platforms.Device)
return Size_List;
function Local_Memory_Size (Source : Kernel; Device : Platforms.Device)
return ULong;
end CL.Kernels;
|
------------------------------------------------------------------------------
-- Copyright (c) 2015-2017, 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. --
------------------------------------------------------------------------------
------------------------------------------------------------------------------
-- Lithium.Log provides the glue between ada-syslog and natools-web. --
------------------------------------------------------------------------------
with Natools.Cron;
with Natools.Web;
package Lithium.Log is
procedure Initialize (Debug : in Boolean);
procedure Text_IO_Log
(Severity : in Natools.Web.Severities.Code;
Message : in String);
procedure Syslog_Log
(Severity : in Natools.Web.Severities.Code;
Message : in String);
type Marker is new Natools.Cron.Callback with null record;
overriding procedure Run (Object : in out Marker);
end Lithium.Log;
|
<?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>hls_video_processor</name>
<ret_bitwidth>0</ret_bitwidth>
<ports class_id="2" tracking_level="0" version="0">
<count>16</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>stream_in_V_data_V</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>stream_in.V.data.V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>24</bitwidth>
</Value>
<direction>0</direction>
<if_type>0</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>stream_in_V_keep_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>stream_in.V.keep.V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>3</bitwidth>
</Value>
<direction>0</direction>
<if_type>0</if_type>
<array_size>0</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>stream_in_V_strb_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>stream_in.V.strb.V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>3</bitwidth>
</Value>
<direction>0</direction>
<if_type>0</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_4">
<Value>
<Obj>
<type>1</type>
<id>4</id>
<name>stream_in_V_user_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>stream_in.V.user.V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<direction>0</direction>
<if_type>0</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_5">
<Value>
<Obj>
<type>1</type>
<id>5</id>
<name>stream_in_V_last_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>stream_in.V.last.V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<direction>0</direction>
<if_type>0</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_6">
<Value>
<Obj>
<type>1</type>
<id>6</id>
<name>stream_in_V_id_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>stream_in.V.id.V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<direction>0</direction>
<if_type>0</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_7">
<Value>
<Obj>
<type>1</type>
<id>7</id>
<name>stream_in_V_dest_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>stream_in.V.dest.V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<direction>0</direction>
<if_type>0</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_8">
<Value>
<Obj>
<type>1</type>
<id>8</id>
<name>stream_out_V_data_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>stream_out.V.data.V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>24</bitwidth>
</Value>
<direction>1</direction>
<if_type>0</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_9">
<Value>
<Obj>
<type>1</type>
<id>9</id>
<name>stream_out_V_keep_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>stream_out.V.keep.V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>3</bitwidth>
</Value>
<direction>1</direction>
<if_type>0</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_10">
<Value>
<Obj>
<type>1</type>
<id>10</id>
<name>stream_out_V_strb_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>stream_out.V.strb.V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>3</bitwidth>
</Value>
<direction>1</direction>
<if_type>0</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_11">
<Value>
<Obj>
<type>1</type>
<id>11</id>
<name>stream_out_V_user_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>stream_out.V.user.V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<direction>1</direction>
<if_type>0</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_12">
<Value>
<Obj>
<type>1</type>
<id>12</id>
<name>stream_out_V_last_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>stream_out.V.last.V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<direction>1</direction>
<if_type>0</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_13">
<Value>
<Obj>
<type>1</type>
<id>13</id>
<name>stream_out_V_id_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>stream_out.V.id.V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<direction>1</direction>
<if_type>0</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_14">
<Value>
<Obj>
<type>1</type>
<id>14</id>
<name>stream_out_V_dest_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>stream_out.V.dest.V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<direction>1</direction>
<if_type>0</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_15">
<Value>
<Obj>
<type>1</type>
<id>15</id>
<name>brightness_V</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>
<direction>0</direction>
<if_type>0</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_16">
<Value>
<Obj>
<type>1</type>
<id>16</id>
<name>color_correct_V</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>1</bitwidth>
</Value>
<direction>0</direction>
<if_type>0</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>34</count>
<item_version>0</item_version>
<item class_id="9" tracking_level="1" version="0" object_id="_17">
<Value>
<Obj>
<type>0</type>
<id>21</id>
<name>color_correct_V_read</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>1</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>124</item>
<item>125</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>0.00</m_delay>
<m_topoIndex>29</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_18">
<Value>
<Obj>
<type>0</type>
<id>22</id>
<name>brightness_V_read</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>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>127</item>
<item>128</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>0.00</m_delay>
<m_topoIndex>30</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_19">
<Value>
<Obj>
<type>0</type>
<id>23</id>
<name>img_input_cols_V_c20</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>12</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>130</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="_20">
<Value>
<Obj>
<type>0</type>
<id>24</id>
<name>img_input_cols_V_c</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>12</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>131</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="_21">
<Value>
<Obj>
<type>0</type>
<id>25</id>
<name>img_input_rows_V_c20</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>12</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>132</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>3</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_22">
<Value>
<Obj>
<type>0</type>
<id>26</id>
<name>img_input_rows_V_c</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>12</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>133</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>4</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>img_input_data_strea</name>
<fileName>hls_video_processor/hls_video_processor.cpp</fileName>
<fileDirectory>C:\Users\byronxu\Documents\6.S193</fileDirectory>
<lineNumber>405</lineNumber>
<contextFuncName>hls_video_processor</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item class_id="11" tracking_level="0" version="0">
<first>C:\Users\byronxu\Documents\6.S193</first>
<second class_id="12" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="13" tracking_level="0" version="0">
<first class_id="14" tracking_level="0" version="0">
<first>hls_video_processor/hls_video_processor.cpp</first>
<second>hls_video_processor</second>
</first>
<second>405</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>img_input.data_stream[0].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>134</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>5</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_24">
<Value>
<Obj>
<type>0</type>
<id>48</id>
<name>img_input_data_strea_1</name>
<fileName>hls_video_processor/hls_video_processor.cpp</fileName>
<fileDirectory>C:\Users\byronxu\Documents\6.S193</fileDirectory>
<lineNumber>405</lineNumber>
<contextFuncName>hls_video_processor</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>C:\Users\byronxu\Documents\6.S193</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>hls_video_processor/hls_video_processor.cpp</first>
<second>hls_video_processor</second>
</first>
<second>405</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>img_input.data_stream[1].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>135</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>6</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_25">
<Value>
<Obj>
<type>0</type>
<id>51</id>
<name>img_input_data_strea_2</name>
<fileName>hls_video_processor/hls_video_processor.cpp</fileName>
<fileDirectory>C:\Users\byronxu\Documents\6.S193</fileDirectory>
<lineNumber>405</lineNumber>
<contextFuncName>hls_video_processor</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>C:\Users\byronxu\Documents\6.S193</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>hls_video_processor/hls_video_processor.cpp</first>
<second>hls_video_processor</second>
</first>
<second>405</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>img_input.data_stream[2].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>136</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>7</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_26">
<Value>
<Obj>
<type>0</type>
<id>54</id>
<name>img_crop_data_stream</name>
<fileName>hls_video_processor/hls_video_processor.cpp</fileName>
<fileDirectory>C:\Users\byronxu\Documents\6.S193</fileDirectory>
<lineNumber>406</lineNumber>
<contextFuncName>hls_video_processor</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>C:\Users\byronxu\Documents\6.S193</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>hls_video_processor/hls_video_processor.cpp</first>
<second>hls_video_processor</second>
</first>
<second>406</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>img_crop.data_stream[0].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>137</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>8</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_27">
<Value>
<Obj>
<type>0</type>
<id>57</id>
<name>img_crop_data_stream_1</name>
<fileName>hls_video_processor/hls_video_processor.cpp</fileName>
<fileDirectory>C:\Users\byronxu\Documents\6.S193</fileDirectory>
<lineNumber>406</lineNumber>
<contextFuncName>hls_video_processor</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>C:\Users\byronxu\Documents\6.S193</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>hls_video_processor/hls_video_processor.cpp</first>
<second>hls_video_processor</second>
</first>
<second>406</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>img_crop.data_stream[1].V</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>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>9</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_28">
<Value>
<Obj>
<type>0</type>
<id>60</id>
<name>img_crop_data_stream_2</name>
<fileName>hls_video_processor/hls_video_processor.cpp</fileName>
<fileDirectory>C:\Users\byronxu\Documents\6.S193</fileDirectory>
<lineNumber>406</lineNumber>
<contextFuncName>hls_video_processor</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>C:\Users\byronxu\Documents\6.S193</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>hls_video_processor/hls_video_processor.cpp</first>
<second>hls_video_processor</second>
</first>
<second>406</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>img_crop.data_stream[2].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>139</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>10</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_29">
<Value>
<Obj>
<type>0</type>
<id>63</id>
<name>img_nogamma_data_str</name>
<fileName>hls_video_processor/hls_video_processor.cpp</fileName>
<fileDirectory>C:\Users\byronxu\Documents\6.S193</fileDirectory>
<lineNumber>408</lineNumber>
<contextFuncName>hls_video_processor</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>C:\Users\byronxu\Documents\6.S193</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>hls_video_processor/hls_video_processor.cpp</first>
<second>hls_video_processor</second>
</first>
<second>408</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>img_nogamma.data_stream[0].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>140</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>11</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_30">
<Value>
<Obj>
<type>0</type>
<id>66</id>
<name>img_nogamma_data_str_1</name>
<fileName>hls_video_processor/hls_video_processor.cpp</fileName>
<fileDirectory>C:\Users\byronxu\Documents\6.S193</fileDirectory>
<lineNumber>408</lineNumber>
<contextFuncName>hls_video_processor</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>C:\Users\byronxu\Documents\6.S193</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>hls_video_processor/hls_video_processor.cpp</first>
<second>hls_video_processor</second>
</first>
<second>408</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>img_nogamma.data_stream[1].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>141</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>12</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_31">
<Value>
<Obj>
<type>0</type>
<id>69</id>
<name>img_nogamma_data_str_2</name>
<fileName>hls_video_processor/hls_video_processor.cpp</fileName>
<fileDirectory>C:\Users\byronxu\Documents\6.S193</fileDirectory>
<lineNumber>408</lineNumber>
<contextFuncName>hls_video_processor</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>C:\Users\byronxu\Documents\6.S193</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>hls_video_processor/hls_video_processor.cpp</first>
<second>hls_video_processor</second>
</first>
<second>408</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>img_nogamma.data_stream[2].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>142</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>13</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_32">
<Value>
<Obj>
<type>0</type>
<id>72</id>
<name>img_scaled_data_stre</name>
<fileName>hls_video_processor/hls_video_processor.cpp</fileName>
<fileDirectory>C:\Users\byronxu\Documents\6.S193</fileDirectory>
<lineNumber>409</lineNumber>
<contextFuncName>hls_video_processor</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>C:\Users\byronxu\Documents\6.S193</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>hls_video_processor/hls_video_processor.cpp</first>
<second>hls_video_processor</second>
</first>
<second>409</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>img_scaled.data_stream[0].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>143</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>14</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_33">
<Value>
<Obj>
<type>0</type>
<id>75</id>
<name>img_scaled_data_stre_1</name>
<fileName>hls_video_processor/hls_video_processor.cpp</fileName>
<fileDirectory>C:\Users\byronxu\Documents\6.S193</fileDirectory>
<lineNumber>409</lineNumber>
<contextFuncName>hls_video_processor</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>C:\Users\byronxu\Documents\6.S193</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>hls_video_processor/hls_video_processor.cpp</first>
<second>hls_video_processor</second>
</first>
<second>409</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>img_scaled.data_stream[1].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>144</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>15</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_34">
<Value>
<Obj>
<type>0</type>
<id>78</id>
<name>img_scaled_data_stre_2</name>
<fileName>hls_video_processor/hls_video_processor.cpp</fileName>
<fileDirectory>C:\Users\byronxu\Documents\6.S193</fileDirectory>
<lineNumber>409</lineNumber>
<contextFuncName>hls_video_processor</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>C:\Users\byronxu\Documents\6.S193</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>hls_video_processor/hls_video_processor.cpp</first>
<second>hls_video_processor</second>
</first>
<second>409</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>img_scaled.data_stream[2].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>145</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>16</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_35">
<Value>
<Obj>
<type>0</type>
<id>81</id>
<name>img_adjusted_data_st</name>
<fileName>hls_video_processor/hls_video_processor.cpp</fileName>
<fileDirectory>C:\Users\byronxu\Documents\6.S193</fileDirectory>
<lineNumber>410</lineNumber>
<contextFuncName>hls_video_processor</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>C:\Users\byronxu\Documents\6.S193</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>hls_video_processor/hls_video_processor.cpp</first>
<second>hls_video_processor</second>
</first>
<second>410</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>img_adjusted.data_stream[0].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>146</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>17</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_36">
<Value>
<Obj>
<type>0</type>
<id>84</id>
<name>img_adjusted_data_st_1</name>
<fileName>hls_video_processor/hls_video_processor.cpp</fileName>
<fileDirectory>C:\Users\byronxu\Documents\6.S193</fileDirectory>
<lineNumber>410</lineNumber>
<contextFuncName>hls_video_processor</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>C:\Users\byronxu\Documents\6.S193</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>hls_video_processor/hls_video_processor.cpp</first>
<second>hls_video_processor</second>
</first>
<second>410</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>img_adjusted.data_stream[1].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>147</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>18</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_37">
<Value>
<Obj>
<type>0</type>
<id>87</id>
<name>img_adjusted_data_st_2</name>
<fileName>hls_video_processor/hls_video_processor.cpp</fileName>
<fileDirectory>C:\Users\byronxu\Documents\6.S193</fileDirectory>
<lineNumber>410</lineNumber>
<contextFuncName>hls_video_processor</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>C:\Users\byronxu\Documents\6.S193</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>hls_video_processor/hls_video_processor.cpp</first>
<second>hls_video_processor</second>
</first>
<second>410</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>img_adjusted.data_stream[2].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>148</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>19</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_38">
<Value>
<Obj>
<type>0</type>
<id>90</id>
<name>img_out_data_stream_s</name>
<fileName>hls_video_processor/hls_video_processor.cpp</fileName>
<fileDirectory>C:\Users\byronxu\Documents\6.S193</fileDirectory>
<lineNumber>412</lineNumber>
<contextFuncName>hls_video_processor</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>C:\Users\byronxu\Documents\6.S193</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>hls_video_processor/hls_video_processor.cpp</first>
<second>hls_video_processor</second>
</first>
<second>412</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>img_out.data_stream[0].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>149</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>20</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_39">
<Value>
<Obj>
<type>0</type>
<id>93</id>
<name>img_out_data_stream_1</name>
<fileName>hls_video_processor/hls_video_processor.cpp</fileName>
<fileDirectory>C:\Users\byronxu\Documents\6.S193</fileDirectory>
<lineNumber>412</lineNumber>
<contextFuncName>hls_video_processor</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>C:\Users\byronxu\Documents\6.S193</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>hls_video_processor/hls_video_processor.cpp</first>
<second>hls_video_processor</second>
</first>
<second>412</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>img_out.data_stream[1].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>150</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>21</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_40">
<Value>
<Obj>
<type>0</type>
<id>96</id>
<name>img_out_data_stream_2</name>
<fileName>hls_video_processor/hls_video_processor.cpp</fileName>
<fileDirectory>C:\Users\byronxu\Documents\6.S193</fileDirectory>
<lineNumber>412</lineNumber>
<contextFuncName>hls_video_processor</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>C:\Users\byronxu\Documents\6.S193</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>hls_video_processor/hls_video_processor.cpp</first>
<second>hls_video_processor</second>
</first>
<second>412</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>img_out.data_stream[2].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>151</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>22</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_41">
<Value>
<Obj>
<type>0</type>
<id>110</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>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>4</count>
<item_version>0</item_version>
<item>153</item>
<item>154</item>
<item>155</item>
<item>156</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>23</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_42">
<Value>
<Obj>
<type>0</type>
<id>113</id>
<name></name>
<fileName>hls_video_processor/hls_video_processor.cpp</fileName>
<fileDirectory>C:\Users\byronxu\Documents\6.S193</fileDirectory>
<lineNumber>416</lineNumber>
<contextFuncName>hls_video_processor</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>C:\Users\byronxu\Documents\6.S193</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>hls_video_processor/hls_video_processor.cpp</first>
<second>hls_video_processor</second>
</first>
<second>416</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>16</count>
<item_version>0</item_version>
<item>158</item>
<item>159</item>
<item>160</item>
<item>161</item>
<item>162</item>
<item>163</item>
<item>164</item>
<item>165</item>
<item>166</item>
<item>167</item>
<item>168</item>
<item>169</item>
<item>170</item>
<item>171</item>
<item>987</item>
<item>989</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>24</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_43">
<Value>
<Obj>
<type>0</type>
<id>114</id>
<name>extLd_loc_channel</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>12</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>173</item>
<item>174</item>
<item>988</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>25</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_44">
<Value>
<Obj>
<type>0</type>
<id>115</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>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>11</count>
<item_version>0</item_version>
<item>176</item>
<item>177</item>
<item>178</item>
<item>179</item>
<item>180</item>
<item>181</item>
<item>182</item>
<item>183</item>
<item>184</item>
<item>986</item>
<item>990</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>26</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_45">
<Value>
<Obj>
<type>0</type>
<id>116</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>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>10</count>
<item_version>0</item_version>
<item>186</item>
<item>187</item>
<item>188</item>
<item>189</item>
<item>190</item>
<item>191</item>
<item>192</item>
<item>231</item>
<item>985</item>
<item>991</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>27</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_46">
<Value>
<Obj>
<type>0</type>
<id>117</id>
<name></name>
<fileName>hls_video_processor/hls_video_processor.cpp</fileName>
<fileDirectory>C:\Users\byronxu\Documents\6.S193</fileDirectory>
<lineNumber>425</lineNumber>
<contextFuncName>hls_video_processor</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>C:\Users\byronxu\Documents\6.S193</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>hls_video_processor/hls_video_processor.cpp</first>
<second>hls_video_processor</second>
</first>
<second>425</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>9</count>
<item_version>0</item_version>
<item>194</item>
<item>195</item>
<item>196</item>
<item>197</item>
<item>198</item>
<item>199</item>
<item>200</item>
<item>984</item>
<item>992</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>28</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_47">
<Value>
<Obj>
<type>0</type>
<id>118</id>
<name></name>
<fileName>hls_video_processor/hls_video_processor.cpp</fileName>
<fileDirectory>C:\Users\byronxu\Documents\6.S193</fileDirectory>
<lineNumber>428</lineNumber>
<contextFuncName>hls_video_processor</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>C:\Users\byronxu\Documents\6.S193</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>hls_video_processor/hls_video_processor.cpp</first>
<second>hls_video_processor</second>
</first>
<second>428</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>14</count>
<item_version>0</item_version>
<item>202</item>
<item>203</item>
<item>204</item>
<item>205</item>
<item>206</item>
<item>207</item>
<item>208</item>
<item>209</item>
<item>210</item>
<item>232</item>
<item>233</item>
<item>234</item>
<item>983</item>
<item>993</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>3.25</m_delay>
<m_topoIndex>31</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_48">
<Value>
<Obj>
<type>0</type>
<id>119</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>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>9</count>
<item_version>0</item_version>
<item>212</item>
<item>213</item>
<item>214</item>
<item>215</item>
<item>216</item>
<item>217</item>
<item>218</item>
<item>982</item>
<item>994</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>32</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_49">
<Value>
<Obj>
<type>0</type>
<id>120</id>
<name></name>
<fileName>hls_video_processor/hls_video_processor.cpp</fileName>
<fileDirectory>C:\Users\byronxu\Documents\6.S193</fileDirectory>
<lineNumber>437</lineNumber>
<contextFuncName>hls_video_processor</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>C:\Users\byronxu\Documents\6.S193</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>hls_video_processor/hls_video_processor.cpp</first>
<second>hls_video_processor</second>
</first>
<second>437</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>13</count>
<item_version>0</item_version>
<item>220</item>
<item>221</item>
<item>222</item>
<item>223</item>
<item>224</item>
<item>225</item>
<item>226</item>
<item>227</item>
<item>228</item>
<item>229</item>
<item>230</item>
<item>981</item>
<item>995</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>33</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_50">
<Value>
<Obj>
<type>0</type>
<id>121</id>
<name></name>
<fileName>hls_video_processor/hls_video_processor.cpp</fileName>
<fileDirectory>C:\Users\byronxu\Documents\6.S193</fileDirectory>
<lineNumber>448</lineNumber>
<contextFuncName>hls_video_processor</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>C:\Users\byronxu\Documents\6.S193</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>hls_video_processor/hls_video_processor.cpp</first>
<second>hls_video_processor</second>
</first>
<second>448</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>34</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
</nodes>
<consts class_id="15" tracking_level="0" version="0">
<count>10</count>
<item_version>0</item_version>
<item class_id="16" tracking_level="1" version="0" object_id="_51">
<Value>
<Obj>
<type>2</type>
<id>129</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="_52">
<Value>
<Obj>
<type>2</type>
<id>152</id>
<name>Block_proc</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><constant:Block__proc></content>
</item>
<item class_id_reference="16" object_id="_53">
<Value>
<Obj>
<type>2</type>
<id>157</id>
<name>AXIvideo2Mat</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><constant:AXIvideo2Mat></content>
</item>
<item class_id_reference="16" object_id="_54">
<Value>
<Obj>
<type>2</type>
<id>172</id>
<name>Block_proc55</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>12</bitwidth>
</Value>
<const_type>6</const_type>
<content><constant:Block__proc55></content>
</item>
<item class_id_reference="16" object_id="_55">
<Value>
<Obj>
<type>2</type>
<id>175</id>
<name>Loop_loop_height_pro_2</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><constant:Loop_loop_height_pro.2></content>
</item>
<item class_id_reference="16" object_id="_56">
<Value>
<Obj>
<type>2</type>
<id>185</id>
<name>Loop_loop_height_pro_1</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><constant:Loop_loop_height_pro.1></content>
</item>
<item class_id_reference="16" object_id="_57">
<Value>
<Obj>
<type>2</type>
<id>193</id>
<name>video_scale</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><constant:video_scale></content>
</item>
<item class_id_reference="16" object_id="_58">
<Value>
<Obj>
<type>2</type>
<id>201</id>
<name>brightness_color_adj</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><constant:brightness_color_adj></content>
</item>
<item class_id_reference="16" object_id="_59">
<Value>
<Obj>
<type>2</type>
<id>211</id>
<name>Loop_loop_height_pro</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><constant:Loop_loop_height_pro></content>
</item>
<item class_id_reference="16" object_id="_60">
<Value>
<Obj>
<type>2</type>
<id>219</id>
<name>Mat2AXIvideo</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><constant:Mat2AXIvideo></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="_61">
<Obj>
<type>3</type>
<id>122</id>
<name>hls_video_processor</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>34</count>
<item_version>0</item_version>
<item>21</item>
<item>22</item>
<item>23</item>
<item>24</item>
<item>25</item>
<item>26</item>
<item>45</item>
<item>48</item>
<item>51</item>
<item>54</item>
<item>57</item>
<item>60</item>
<item>63</item>
<item>66</item>
<item>69</item>
<item>72</item>
<item>75</item>
<item>78</item>
<item>81</item>
<item>84</item>
<item>87</item>
<item>90</item>
<item>93</item>
<item>96</item>
<item>110</item>
<item>113</item>
<item>114</item>
<item>115</item>
<item>116</item>
<item>117</item>
<item>118</item>
<item>119</item>
<item>120</item>
<item>121</item>
</node_objs>
</item>
</blocks>
<edges class_id="19" tracking_level="0" version="0">
<count>113</count>
<item_version>0</item_version>
<item class_id="20" tracking_level="1" version="0" object_id="_62">
<id>125</id>
<edge_type>1</edge_type>
<source_obj>16</source_obj>
<sink_obj>21</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_63">
<id>128</id>
<edge_type>1</edge_type>
<source_obj>15</source_obj>
<sink_obj>22</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_64">
<id>130</id>
<edge_type>1</edge_type>
<source_obj>129</source_obj>
<sink_obj>23</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_65">
<id>131</id>
<edge_type>1</edge_type>
<source_obj>129</source_obj>
<sink_obj>24</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_66">
<id>132</id>
<edge_type>1</edge_type>
<source_obj>129</source_obj>
<sink_obj>25</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_67">
<id>133</id>
<edge_type>1</edge_type>
<source_obj>129</source_obj>
<sink_obj>26</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_68">
<id>134</id>
<edge_type>1</edge_type>
<source_obj>129</source_obj>
<sink_obj>45</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_69">
<id>135</id>
<edge_type>1</edge_type>
<source_obj>129</source_obj>
<sink_obj>48</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_70">
<id>136</id>
<edge_type>1</edge_type>
<source_obj>129</source_obj>
<sink_obj>51</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_71">
<id>137</id>
<edge_type>1</edge_type>
<source_obj>129</source_obj>
<sink_obj>54</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_72">
<id>138</id>
<edge_type>1</edge_type>
<source_obj>129</source_obj>
<sink_obj>57</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_73">
<id>139</id>
<edge_type>1</edge_type>
<source_obj>129</source_obj>
<sink_obj>60</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_74">
<id>140</id>
<edge_type>1</edge_type>
<source_obj>129</source_obj>
<sink_obj>63</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_75">
<id>141</id>
<edge_type>1</edge_type>
<source_obj>129</source_obj>
<sink_obj>66</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_76">
<id>142</id>
<edge_type>1</edge_type>
<source_obj>129</source_obj>
<sink_obj>69</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_77">
<id>143</id>
<edge_type>1</edge_type>
<source_obj>129</source_obj>
<sink_obj>72</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_78">
<id>144</id>
<edge_type>1</edge_type>
<source_obj>129</source_obj>
<sink_obj>75</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_79">
<id>145</id>
<edge_type>1</edge_type>
<source_obj>129</source_obj>
<sink_obj>78</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_80">
<id>146</id>
<edge_type>1</edge_type>
<source_obj>129</source_obj>
<sink_obj>81</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_81">
<id>147</id>
<edge_type>1</edge_type>
<source_obj>129</source_obj>
<sink_obj>84</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_82">
<id>148</id>
<edge_type>1</edge_type>
<source_obj>129</source_obj>
<sink_obj>87</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_83">
<id>149</id>
<edge_type>1</edge_type>
<source_obj>129</source_obj>
<sink_obj>90</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_84">
<id>150</id>
<edge_type>1</edge_type>
<source_obj>129</source_obj>
<sink_obj>93</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_85">
<id>151</id>
<edge_type>1</edge_type>
<source_obj>129</source_obj>
<sink_obj>96</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_86">
<id>153</id>
<edge_type>1</edge_type>
<source_obj>152</source_obj>
<sink_obj>110</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_87">
<id>154</id>
<edge_type>1</edge_type>
<source_obj>26</source_obj>
<sink_obj>110</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_88">
<id>155</id>
<edge_type>1</edge_type>
<source_obj>25</source_obj>
<sink_obj>110</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_89">
<id>156</id>
<edge_type>1</edge_type>
<source_obj>24</source_obj>
<sink_obj>110</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_90">
<id>158</id>
<edge_type>1</edge_type>
<source_obj>157</source_obj>
<sink_obj>113</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_91">
<id>159</id>
<edge_type>1</edge_type>
<source_obj>1</source_obj>
<sink_obj>113</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_92">
<id>160</id>
<edge_type>1</edge_type>
<source_obj>2</source_obj>
<sink_obj>113</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_93">
<id>161</id>
<edge_type>1</edge_type>
<source_obj>3</source_obj>
<sink_obj>113</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_94">
<id>162</id>
<edge_type>1</edge_type>
<source_obj>4</source_obj>
<sink_obj>113</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_95">
<id>163</id>
<edge_type>1</edge_type>
<source_obj>5</source_obj>
<sink_obj>113</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_96">
<id>164</id>
<edge_type>1</edge_type>
<source_obj>6</source_obj>
<sink_obj>113</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_97">
<id>165</id>
<edge_type>1</edge_type>
<source_obj>7</source_obj>
<sink_obj>113</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_98">
<id>166</id>
<edge_type>1</edge_type>
<source_obj>26</source_obj>
<sink_obj>113</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_99">
<id>167</id>
<edge_type>1</edge_type>
<source_obj>24</source_obj>
<sink_obj>113</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_100">
<id>168</id>
<edge_type>1</edge_type>
<source_obj>45</source_obj>
<sink_obj>113</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_101">
<id>169</id>
<edge_type>1</edge_type>
<source_obj>48</source_obj>
<sink_obj>113</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_102">
<id>170</id>
<edge_type>1</edge_type>
<source_obj>51</source_obj>
<sink_obj>113</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_103">
<id>171</id>
<edge_type>1</edge_type>
<source_obj>23</source_obj>
<sink_obj>113</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_104">
<id>173</id>
<edge_type>1</edge_type>
<source_obj>172</source_obj>
<sink_obj>114</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_105">
<id>174</id>
<edge_type>1</edge_type>
<source_obj>25</source_obj>
<sink_obj>114</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_106">
<id>176</id>
<edge_type>1</edge_type>
<source_obj>175</source_obj>
<sink_obj>115</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_107">
<id>177</id>
<edge_type>1</edge_type>
<source_obj>23</source_obj>
<sink_obj>115</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_108">
<id>178</id>
<edge_type>1</edge_type>
<source_obj>114</source_obj>
<sink_obj>115</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_109">
<id>179</id>
<edge_type>1</edge_type>
<source_obj>45</source_obj>
<sink_obj>115</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_110">
<id>180</id>
<edge_type>1</edge_type>
<source_obj>48</source_obj>
<sink_obj>115</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_111">
<id>181</id>
<edge_type>1</edge_type>
<source_obj>51</source_obj>
<sink_obj>115</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_112">
<id>182</id>
<edge_type>1</edge_type>
<source_obj>54</source_obj>
<sink_obj>115</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_113">
<id>183</id>
<edge_type>1</edge_type>
<source_obj>57</source_obj>
<sink_obj>115</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_114">
<id>184</id>
<edge_type>1</edge_type>
<source_obj>60</source_obj>
<sink_obj>115</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_115">
<id>186</id>
<edge_type>1</edge_type>
<source_obj>185</source_obj>
<sink_obj>116</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_116">
<id>187</id>
<edge_type>1</edge_type>
<source_obj>54</source_obj>
<sink_obj>116</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_117">
<id>188</id>
<edge_type>1</edge_type>
<source_obj>57</source_obj>
<sink_obj>116</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_118">
<id>189</id>
<edge_type>1</edge_type>
<source_obj>60</source_obj>
<sink_obj>116</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_119">
<id>190</id>
<edge_type>1</edge_type>
<source_obj>63</source_obj>
<sink_obj>116</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_120">
<id>191</id>
<edge_type>1</edge_type>
<source_obj>66</source_obj>
<sink_obj>116</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_121">
<id>192</id>
<edge_type>1</edge_type>
<source_obj>69</source_obj>
<sink_obj>116</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_122">
<id>194</id>
<edge_type>1</edge_type>
<source_obj>193</source_obj>
<sink_obj>117</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_123">
<id>195</id>
<edge_type>1</edge_type>
<source_obj>63</source_obj>
<sink_obj>117</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_124">
<id>196</id>
<edge_type>1</edge_type>
<source_obj>66</source_obj>
<sink_obj>117</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_125">
<id>197</id>
<edge_type>1</edge_type>
<source_obj>69</source_obj>
<sink_obj>117</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_126">
<id>198</id>
<edge_type>1</edge_type>
<source_obj>72</source_obj>
<sink_obj>117</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_127">
<id>199</id>
<edge_type>1</edge_type>
<source_obj>75</source_obj>
<sink_obj>117</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_128">
<id>200</id>
<edge_type>1</edge_type>
<source_obj>78</source_obj>
<sink_obj>117</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_129">
<id>202</id>
<edge_type>1</edge_type>
<source_obj>201</source_obj>
<sink_obj>118</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_130">
<id>203</id>
<edge_type>1</edge_type>
<source_obj>72</source_obj>
<sink_obj>118</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_131">
<id>204</id>
<edge_type>1</edge_type>
<source_obj>75</source_obj>
<sink_obj>118</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_132">
<id>205</id>
<edge_type>1</edge_type>
<source_obj>78</source_obj>
<sink_obj>118</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_133">
<id>206</id>
<edge_type>1</edge_type>
<source_obj>81</source_obj>
<sink_obj>118</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_134">
<id>207</id>
<edge_type>1</edge_type>
<source_obj>84</source_obj>
<sink_obj>118</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_135">
<id>208</id>
<edge_type>1</edge_type>
<source_obj>87</source_obj>
<sink_obj>118</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_136">
<id>209</id>
<edge_type>1</edge_type>
<source_obj>22</source_obj>
<sink_obj>118</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_137">
<id>210</id>
<edge_type>1</edge_type>
<source_obj>21</source_obj>
<sink_obj>118</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_138">
<id>212</id>
<edge_type>1</edge_type>
<source_obj>211</source_obj>
<sink_obj>119</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_139">
<id>213</id>
<edge_type>1</edge_type>
<source_obj>81</source_obj>
<sink_obj>119</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_140">
<id>214</id>
<edge_type>1</edge_type>
<source_obj>84</source_obj>
<sink_obj>119</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_141">
<id>215</id>
<edge_type>1</edge_type>
<source_obj>87</source_obj>
<sink_obj>119</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_142">
<id>216</id>
<edge_type>1</edge_type>
<source_obj>90</source_obj>
<sink_obj>119</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_143">
<id>217</id>
<edge_type>1</edge_type>
<source_obj>93</source_obj>
<sink_obj>119</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_144">
<id>218</id>
<edge_type>1</edge_type>
<source_obj>96</source_obj>
<sink_obj>119</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_145">
<id>220</id>
<edge_type>1</edge_type>
<source_obj>219</source_obj>
<sink_obj>120</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_146">
<id>221</id>
<edge_type>1</edge_type>
<source_obj>90</source_obj>
<sink_obj>120</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_147">
<id>222</id>
<edge_type>1</edge_type>
<source_obj>93</source_obj>
<sink_obj>120</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_148">
<id>223</id>
<edge_type>1</edge_type>
<source_obj>96</source_obj>
<sink_obj>120</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_149">
<id>224</id>
<edge_type>1</edge_type>
<source_obj>8</source_obj>
<sink_obj>120</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_150">
<id>225</id>
<edge_type>1</edge_type>
<source_obj>9</source_obj>
<sink_obj>120</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_151">
<id>226</id>
<edge_type>1</edge_type>
<source_obj>10</source_obj>
<sink_obj>120</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_152">
<id>227</id>
<edge_type>1</edge_type>
<source_obj>11</source_obj>
<sink_obj>120</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_153">
<id>228</id>
<edge_type>1</edge_type>
<source_obj>12</source_obj>
<sink_obj>120</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_154">
<id>229</id>
<edge_type>1</edge_type>
<source_obj>13</source_obj>
<sink_obj>120</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_155">
<id>230</id>
<edge_type>1</edge_type>
<source_obj>14</source_obj>
<sink_obj>120</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_156">
<id>231</id>
<edge_type>1</edge_type>
<source_obj>17</source_obj>
<sink_obj>116</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_157">
<id>232</id>
<edge_type>1</edge_type>
<source_obj>18</source_obj>
<sink_obj>118</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_158">
<id>233</id>
<edge_type>1</edge_type>
<source_obj>19</source_obj>
<sink_obj>118</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_159">
<id>234</id>
<edge_type>1</edge_type>
<source_obj>20</source_obj>
<sink_obj>118</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_160">
<id>981</id>
<edge_type>4</edge_type>
<source_obj>119</source_obj>
<sink_obj>120</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_161">
<id>982</id>
<edge_type>4</edge_type>
<source_obj>118</source_obj>
<sink_obj>119</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_162">
<id>983</id>
<edge_type>4</edge_type>
<source_obj>117</source_obj>
<sink_obj>118</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_163">
<id>984</id>
<edge_type>4</edge_type>
<source_obj>116</source_obj>
<sink_obj>117</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_164">
<id>985</id>
<edge_type>4</edge_type>
<source_obj>115</source_obj>
<sink_obj>116</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_165">
<id>986</id>
<edge_type>4</edge_type>
<source_obj>113</source_obj>
<sink_obj>115</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_166">
<id>987</id>
<edge_type>4</edge_type>
<source_obj>110</source_obj>
<sink_obj>113</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_167">
<id>988</id>
<edge_type>4</edge_type>
<source_obj>110</source_obj>
<sink_obj>114</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_168">
<id>989</id>
<edge_type>4</edge_type>
<source_obj>110</source_obj>
<sink_obj>113</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_169">
<id>990</id>
<edge_type>4</edge_type>
<source_obj>113</source_obj>
<sink_obj>115</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_170">
<id>991</id>
<edge_type>4</edge_type>
<source_obj>115</source_obj>
<sink_obj>116</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_171">
<id>992</id>
<edge_type>4</edge_type>
<source_obj>116</source_obj>
<sink_obj>117</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_172">
<id>993</id>
<edge_type>4</edge_type>
<source_obj>117</source_obj>
<sink_obj>118</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_173">
<id>994</id>
<edge_type>4</edge_type>
<source_obj>118</source_obj>
<sink_obj>119</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_174">
<id>995</id>
<edge_type>4</edge_type>
<source_obj>119</source_obj>
<sink_obj>120</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="_175">
<mId>1</mId>
<mTag>hls_video_processor</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>122</item>
</basic_blocks>
<mII>-1</mII>
<mDepth>-1</mDepth>
<mMinTripCount>-1</mMinTripCount>
<mMaxTripCount>-1</mMaxTripCount>
<mMinLatency>2076845</mMinLatency>
<mMaxLatency>2079004</mMaxLatency>
<mIsDfPipe>1</mIsDfPipe>
<mDfPipe class_id="23" tracking_level="1" version="0" object_id="_176">
<port_list class_id="24" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</port_list>
<process_list class_id="25" tracking_level="0" version="0">
<count>9</count>
<item_version>0</item_version>
<item class_id="26" tracking_level="1" version="0" object_id="_177">
<type>0</type>
<name>Block_proc_U0</name>
<ssdmobj_id>110</ssdmobj_id>
<pins class_id="27" tracking_level="0" version="0">
<count>3</count>
<item_version>0</item_version>
<item class_id="28" tracking_level="1" version="0" object_id="_178">
<port class_id="29" tracking_level="1" version="0" object_id="_179">
<name>img_input_rows_V_out</name>
<dir>0</dir>
<type>1</type>
</port>
<inst class_id="30" tracking_level="1" version="0" object_id="_180">
<type>0</type>
<name>Block_proc_U0</name>
<ssdmobj_id>110</ssdmobj_id>
</inst>
</item>
<item class_id_reference="28" object_id="_181">
<port class_id_reference="29" object_id="_182">
<name>img_input_rows_V_out1</name>
<dir>0</dir>
<type>1</type>
</port>
<inst class_id_reference="30" object_id_reference="_180"></inst>
</item>
<item class_id_reference="28" object_id="_183">
<port class_id_reference="29" object_id="_184">
<name>img_input_cols_V_out</name>
<dir>0</dir>
<type>1</type>
</port>
<inst class_id_reference="30" object_id_reference="_180"></inst>
</item>
</pins>
</item>
<item class_id_reference="26" object_id="_185">
<type>0</type>
<name>AXIvideo2Mat_U0</name>
<ssdmobj_id>113</ssdmobj_id>
<pins>
<count>13</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_186">
<port class_id_reference="29" object_id="_187">
<name>AXI_video_strm_V_data_V</name>
<dir>3</dir>
<type>0</type>
</port>
<inst class_id_reference="30" object_id="_188">
<type>0</type>
<name>AXIvideo2Mat_U0</name>
<ssdmobj_id>113</ssdmobj_id>
</inst>
</item>
<item class_id_reference="28" object_id="_189">
<port class_id_reference="29" object_id="_190">
<name>AXI_video_strm_V_keep_V</name>
<dir>3</dir>
<type>0</type>
</port>
<inst class_id_reference="30" object_id_reference="_188"></inst>
</item>
<item class_id_reference="28" object_id="_191">
<port class_id_reference="29" object_id="_192">
<name>AXI_video_strm_V_strb_V</name>
<dir>3</dir>
<type>0</type>
</port>
<inst class_id_reference="30" object_id_reference="_188"></inst>
</item>
<item class_id_reference="28" object_id="_193">
<port class_id_reference="29" object_id="_194">
<name>AXI_video_strm_V_user_V</name>
<dir>3</dir>
<type>0</type>
</port>
<inst class_id_reference="30" object_id_reference="_188"></inst>
</item>
<item class_id_reference="28" object_id="_195">
<port class_id_reference="29" object_id="_196">
<name>AXI_video_strm_V_last_V</name>
<dir>3</dir>
<type>0</type>
</port>
<inst class_id_reference="30" object_id_reference="_188"></inst>
</item>
<item class_id_reference="28" object_id="_197">
<port class_id_reference="29" object_id="_198">
<name>AXI_video_strm_V_id_V</name>
<dir>3</dir>
<type>0</type>
</port>
<inst class_id_reference="30" object_id_reference="_188"></inst>
</item>
<item class_id_reference="28" object_id="_199">
<port class_id_reference="29" object_id="_200">
<name>AXI_video_strm_V_dest_V</name>
<dir>3</dir>
<type>0</type>
</port>
<inst class_id_reference="30" object_id_reference="_188"></inst>
</item>
<item class_id_reference="28" object_id="_201">
<port class_id_reference="29" object_id="_202">
<name>img_rows_V</name>
<dir>0</dir>
<type>0</type>
</port>
<inst class_id_reference="30" object_id_reference="_188"></inst>
</item>
<item class_id_reference="28" object_id="_203">
<port class_id_reference="29" object_id="_204">
<name>img_cols_V</name>
<dir>0</dir>
<type>0</type>
</port>
<inst class_id_reference="30" object_id_reference="_188"></inst>
</item>
<item class_id_reference="28" object_id="_205">
<port class_id_reference="29" object_id="_206">
<name>img_data_stream_0_V</name>
<dir>0</dir>
<type>1</type>
</port>
<inst class_id_reference="30" object_id_reference="_188"></inst>
</item>
<item class_id_reference="28" object_id="_207">
<port class_id_reference="29" object_id="_208">
<name>img_data_stream_1_V</name>
<dir>0</dir>
<type>1</type>
</port>
<inst class_id_reference="30" object_id_reference="_188"></inst>
</item>
<item class_id_reference="28" object_id="_209">
<port class_id_reference="29" object_id="_210">
<name>img_data_stream_2_V</name>
<dir>0</dir>
<type>1</type>
</port>
<inst class_id_reference="30" object_id_reference="_188"></inst>
</item>
<item class_id_reference="28" object_id="_211">
<port class_id_reference="29" object_id="_212">
<name>img_cols_V_out</name>
<dir>0</dir>
<type>1</type>
</port>
<inst class_id_reference="30" object_id_reference="_188"></inst>
</item>
</pins>
</item>
<item class_id_reference="26" object_id="_213">
<type>0</type>
<name>Block_proc55_U0</name>
<ssdmobj_id>114</ssdmobj_id>
<pins>
<count>2</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_214">
<port class_id_reference="29" object_id="_215">
<name>img_input_rows_V</name>
<dir>0</dir>
<type>0</type>
</port>
<inst class_id_reference="30" object_id="_216">
<type>0</type>
<name>Block_proc55_U0</name>
<ssdmobj_id>114</ssdmobj_id>
</inst>
</item>
<item class_id_reference="28" object_id="_217">
<port class_id_reference="29" object_id="_218">
<name>ap_return</name>
<dir>3</dir>
<type>1</type>
</port>
<inst class_id_reference="30" object_id_reference="_216"></inst>
</item>
</pins>
</item>
<item class_id_reference="26" object_id="_219">
<type>0</type>
<name>Loop_loop_height_pro_2_U0</name>
<ssdmobj_id>115</ssdmobj_id>
<pins>
<count>8</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_220">
<port class_id_reference="29" object_id="_221">
<name>img_input_cols_V_c20</name>
<dir>0</dir>
<type>0</type>
</port>
<inst class_id_reference="30" object_id="_222">
<type>0</type>
<name>Loop_loop_height_pro_2_U0</name>
<ssdmobj_id>115</ssdmobj_id>
</inst>
</item>
<item class_id_reference="28" object_id="_223">
<port class_id_reference="29" object_id="_224">
<name>extLd_loc_channel</name>
<dir>3</dir>
<type>0</type>
</port>
<inst class_id_reference="30" object_id_reference="_222"></inst>
</item>
<item class_id_reference="28" object_id="_225">
<port class_id_reference="29" object_id="_226">
<name>img_input_data_strea</name>
<dir>0</dir>
<type>0</type>
</port>
<inst class_id_reference="30" object_id_reference="_222"></inst>
</item>
<item class_id_reference="28" object_id="_227">
<port class_id_reference="29" object_id="_228">
<name>img_input_data_strea_1</name>
<dir>0</dir>
<type>0</type>
</port>
<inst class_id_reference="30" object_id_reference="_222"></inst>
</item>
<item class_id_reference="28" object_id="_229">
<port class_id_reference="29" object_id="_230">
<name>img_input_data_strea_2</name>
<dir>0</dir>
<type>0</type>
</port>
<inst class_id_reference="30" object_id_reference="_222"></inst>
</item>
<item class_id_reference="28" object_id="_231">
<port class_id_reference="29" object_id="_232">
<name>img_crop_data_stream</name>
<dir>0</dir>
<type>1</type>
</port>
<inst class_id_reference="30" object_id_reference="_222"></inst>
</item>
<item class_id_reference="28" object_id="_233">
<port class_id_reference="29" object_id="_234">
<name>img_crop_data_stream_1</name>
<dir>0</dir>
<type>1</type>
</port>
<inst class_id_reference="30" object_id_reference="_222"></inst>
</item>
<item class_id_reference="28" object_id="_235">
<port class_id_reference="29" object_id="_236">
<name>img_crop_data_stream_2</name>
<dir>0</dir>
<type>1</type>
</port>
<inst class_id_reference="30" object_id_reference="_222"></inst>
</item>
</pins>
</item>
<item class_id_reference="26" object_id="_237">
<type>0</type>
<name>Loop_loop_height_pro_1_U0</name>
<ssdmobj_id>116</ssdmobj_id>
<pins>
<count>7</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_238">
<port class_id_reference="29" object_id="_239">
<name>img_crop_data_stream_0_V</name>
<dir>0</dir>
<type>0</type>
</port>
<inst class_id_reference="30" object_id="_240">
<type>0</type>
<name>Loop_loop_height_pro_1_U0</name>
<ssdmobj_id>116</ssdmobj_id>
</inst>
</item>
<item class_id_reference="28" object_id="_241">
<port class_id_reference="29" object_id="_242">
<name>img_crop_data_stream_1_V</name>
<dir>0</dir>
<type>0</type>
</port>
<inst class_id_reference="30" object_id_reference="_240"></inst>
</item>
<item class_id_reference="28" object_id="_243">
<port class_id_reference="29" object_id="_244">
<name>img_crop_data_stream_2_V</name>
<dir>0</dir>
<type>0</type>
</port>
<inst class_id_reference="30" object_id_reference="_240"></inst>
</item>
<item class_id_reference="28" object_id="_245">
<port class_id_reference="29" object_id="_246">
<name>img_nogamma_data_stream_0_V</name>
<dir>0</dir>
<type>1</type>
</port>
<inst class_id_reference="30" object_id_reference="_240"></inst>
</item>
<item class_id_reference="28" object_id="_247">
<port class_id_reference="29" object_id="_248">
<name>img_nogamma_data_stream_1_V</name>
<dir>0</dir>
<type>1</type>
</port>
<inst class_id_reference="30" object_id_reference="_240"></inst>
</item>
<item class_id_reference="28" object_id="_249">
<port class_id_reference="29" object_id="_250">
<name>img_nogamma_data_stream_2_V</name>
<dir>0</dir>
<type>1</type>
</port>
<inst class_id_reference="30" object_id_reference="_240"></inst>
</item>
<item class_id_reference="28" object_id="_251">
<port class_id_reference="29" object_id="_252">
<name>lut_srgb_decode</name>
<dir>2</dir>
<type>0</type>
</port>
<inst class_id_reference="30" object_id_reference="_240"></inst>
</item>
</pins>
</item>
<item class_id_reference="26" object_id="_253">
<type>0</type>
<name>video_scale_U0</name>
<ssdmobj_id>117</ssdmobj_id>
<pins>
<count>6</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_254">
<port class_id_reference="29" object_id="_255">
<name>src_data_stream_0_V</name>
<dir>0</dir>
<type>0</type>
</port>
<inst class_id_reference="30" object_id="_256">
<type>0</type>
<name>video_scale_U0</name>
<ssdmobj_id>117</ssdmobj_id>
</inst>
</item>
<item class_id_reference="28" object_id="_257">
<port class_id_reference="29" object_id="_258">
<name>src_data_stream_1_V</name>
<dir>0</dir>
<type>0</type>
</port>
<inst class_id_reference="30" object_id_reference="_256"></inst>
</item>
<item class_id_reference="28" object_id="_259">
<port class_id_reference="29" object_id="_260">
<name>src_data_stream_2_V</name>
<dir>0</dir>
<type>0</type>
</port>
<inst class_id_reference="30" object_id_reference="_256"></inst>
</item>
<item class_id_reference="28" object_id="_261">
<port class_id_reference="29" object_id="_262">
<name>dst_data_stream_0_V</name>
<dir>0</dir>
<type>1</type>
</port>
<inst class_id_reference="30" object_id_reference="_256"></inst>
</item>
<item class_id_reference="28" object_id="_263">
<port class_id_reference="29" object_id="_264">
<name>dst_data_stream_1_V</name>
<dir>0</dir>
<type>1</type>
</port>
<inst class_id_reference="30" object_id_reference="_256"></inst>
</item>
<item class_id_reference="28" object_id="_265">
<port class_id_reference="29" object_id="_266">
<name>dst_data_stream_2_V</name>
<dir>0</dir>
<type>1</type>
</port>
<inst class_id_reference="30" object_id_reference="_256"></inst>
</item>
</pins>
</item>
<item class_id_reference="26" object_id="_267">
<type>0</type>
<name>brightness_color_adj_U0</name>
<ssdmobj_id>118</ssdmobj_id>
<pins>
<count>11</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_268">
<port class_id_reference="29" object_id="_269">
<name>src_data_stream_0_V</name>
<dir>0</dir>
<type>0</type>
</port>
<inst class_id_reference="30" object_id="_270">
<type>0</type>
<name>brightness_color_adj_U0</name>
<ssdmobj_id>118</ssdmobj_id>
</inst>
</item>
<item class_id_reference="28" object_id="_271">
<port class_id_reference="29" object_id="_272">
<name>src_data_stream_1_V</name>
<dir>0</dir>
<type>0</type>
</port>
<inst class_id_reference="30" object_id_reference="_270"></inst>
</item>
<item class_id_reference="28" object_id="_273">
<port class_id_reference="29" object_id="_274">
<name>src_data_stream_2_V</name>
<dir>0</dir>
<type>0</type>
</port>
<inst class_id_reference="30" object_id_reference="_270"></inst>
</item>
<item class_id_reference="28" object_id="_275">
<port class_id_reference="29" object_id="_276">
<name>dst_data_stream_0_V</name>
<dir>0</dir>
<type>1</type>
</port>
<inst class_id_reference="30" object_id_reference="_270"></inst>
</item>
<item class_id_reference="28" object_id="_277">
<port class_id_reference="29" object_id="_278">
<name>dst_data_stream_1_V</name>
<dir>0</dir>
<type>1</type>
</port>
<inst class_id_reference="30" object_id_reference="_270"></inst>
</item>
<item class_id_reference="28" object_id="_279">
<port class_id_reference="29" object_id="_280">
<name>dst_data_stream_2_V</name>
<dir>0</dir>
<type>1</type>
</port>
<inst class_id_reference="30" object_id_reference="_270"></inst>
</item>
<item class_id_reference="28" object_id="_281">
<port class_id_reference="29" object_id="_282">
<name>brightness_index_V</name>
<dir>3</dir>
<type>0</type>
</port>
<inst class_id_reference="30" object_id_reference="_270"></inst>
</item>
<item class_id_reference="28" object_id="_283">
<port class_id_reference="29" object_id="_284">
<name>color_correct_V</name>
<dir>3</dir>
<type>0</type>
</port>
<inst class_id_reference="30" object_id_reference="_270"></inst>
</item>
<item class_id_reference="28" object_id="_285">
<port class_id_reference="29" object_id="_286">
<name>lut_perceptual_brigh_1</name>
<dir>2</dir>
<type>0</type>
</port>
<inst class_id_reference="30" object_id_reference="_270"></inst>
</item>
<item class_id_reference="28" object_id="_287">
<port class_id_reference="29" object_id="_288">
<name>lut_perceptual_brigh</name>
<dir>2</dir>
<type>0</type>
</port>
<inst class_id_reference="30" object_id_reference="_270"></inst>
</item>
<item class_id_reference="28" object_id="_289">
<port class_id_reference="29" object_id="_290">
<name>lut_perceptual_brigh_2</name>
<dir>2</dir>
<type>0</type>
</port>
<inst class_id_reference="30" object_id_reference="_270"></inst>
</item>
</pins>
</item>
<item class_id_reference="26" object_id="_291">
<type>0</type>
<name>Loop_loop_height_pro_U0</name>
<ssdmobj_id>119</ssdmobj_id>
<pins>
<count>6</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_292">
<port class_id_reference="29" object_id="_293">
<name>img_adjusted_data_stream_0_V</name>
<dir>0</dir>
<type>0</type>
</port>
<inst class_id_reference="30" object_id="_294">
<type>0</type>
<name>Loop_loop_height_pro_U0</name>
<ssdmobj_id>119</ssdmobj_id>
</inst>
</item>
<item class_id_reference="28" object_id="_295">
<port class_id_reference="29" object_id="_296">
<name>img_adjusted_data_stream_1_V</name>
<dir>0</dir>
<type>0</type>
</port>
<inst class_id_reference="30" object_id_reference="_294"></inst>
</item>
<item class_id_reference="28" object_id="_297">
<port class_id_reference="29" object_id="_298">
<name>img_adjusted_data_stream_2_V</name>
<dir>0</dir>
<type>0</type>
</port>
<inst class_id_reference="30" object_id_reference="_294"></inst>
</item>
<item class_id_reference="28" object_id="_299">
<port class_id_reference="29" object_id="_300">
<name>img_out_data_stream_0_V</name>
<dir>0</dir>
<type>1</type>
</port>
<inst class_id_reference="30" object_id_reference="_294"></inst>
</item>
<item class_id_reference="28" object_id="_301">
<port class_id_reference="29" object_id="_302">
<name>img_out_data_stream_1_V</name>
<dir>0</dir>
<type>1</type>
</port>
<inst class_id_reference="30" object_id_reference="_294"></inst>
</item>
<item class_id_reference="28" object_id="_303">
<port class_id_reference="29" object_id="_304">
<name>img_out_data_stream_2_V</name>
<dir>0</dir>
<type>1</type>
</port>
<inst class_id_reference="30" object_id_reference="_294"></inst>
</item>
</pins>
</item>
<item class_id_reference="26" object_id="_305">
<type>0</type>
<name>Mat2AXIvideo_U0</name>
<ssdmobj_id>120</ssdmobj_id>
<pins>
<count>10</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_306">
<port class_id_reference="29" object_id="_307">
<name>img_data_stream_0_V</name>
<dir>0</dir>
<type>0</type>
</port>
<inst class_id_reference="30" object_id="_308">
<type>0</type>
<name>Mat2AXIvideo_U0</name>
<ssdmobj_id>120</ssdmobj_id>
</inst>
</item>
<item class_id_reference="28" object_id="_309">
<port class_id_reference="29" object_id="_310">
<name>img_data_stream_1_V</name>
<dir>0</dir>
<type>0</type>
</port>
<inst class_id_reference="30" object_id_reference="_308"></inst>
</item>
<item class_id_reference="28" object_id="_311">
<port class_id_reference="29" object_id="_312">
<name>img_data_stream_2_V</name>
<dir>0</dir>
<type>0</type>
</port>
<inst class_id_reference="30" object_id_reference="_308"></inst>
</item>
<item class_id_reference="28" object_id="_313">
<port class_id_reference="29" object_id="_314">
<name>AXI_video_strm_V_data_V</name>
<dir>3</dir>
<type>1</type>
</port>
<inst class_id_reference="30" object_id_reference="_308"></inst>
</item>
<item class_id_reference="28" object_id="_315">
<port class_id_reference="29" object_id="_316">
<name>AXI_video_strm_V_keep_V</name>
<dir>3</dir>
<type>1</type>
</port>
<inst class_id_reference="30" object_id_reference="_308"></inst>
</item>
<item class_id_reference="28" object_id="_317">
<port class_id_reference="29" object_id="_318">
<name>AXI_video_strm_V_strb_V</name>
<dir>3</dir>
<type>1</type>
</port>
<inst class_id_reference="30" object_id_reference="_308"></inst>
</item>
<item class_id_reference="28" object_id="_319">
<port class_id_reference="29" object_id="_320">
<name>AXI_video_strm_V_user_V</name>
<dir>3</dir>
<type>1</type>
</port>
<inst class_id_reference="30" object_id_reference="_308"></inst>
</item>
<item class_id_reference="28" object_id="_321">
<port class_id_reference="29" object_id="_322">
<name>AXI_video_strm_V_last_V</name>
<dir>3</dir>
<type>1</type>
</port>
<inst class_id_reference="30" object_id_reference="_308"></inst>
</item>
<item class_id_reference="28" object_id="_323">
<port class_id_reference="29" object_id="_324">
<name>AXI_video_strm_V_id_V</name>
<dir>3</dir>
<type>1</type>
</port>
<inst class_id_reference="30" object_id_reference="_308"></inst>
</item>
<item class_id_reference="28" object_id="_325">
<port class_id_reference="29" object_id="_326">
<name>AXI_video_strm_V_dest_V</name>
<dir>3</dir>
<type>1</type>
</port>
<inst class_id_reference="30" object_id_reference="_308"></inst>
</item>
</pins>
</item>
</process_list>
<channel_list class_id="31" tracking_level="0" version="0">
<count>23</count>
<item_version>0</item_version>
<item class_id="32" tracking_level="1" version="0" object_id="_327">
<type>1</type>
<name>img_input_rows_V_c</name>
<ssdmobj_id>26</ssdmobj_id>
<ctype>0</ctype>
<depth>2</depth>
<bitwidth>12</bitwidth>
<source class_id_reference="28" object_id="_328">
<port class_id_reference="29" object_id="_329">
<name>in</name>
<dir>3</dir>
<type>0</type>
</port>
<inst class_id_reference="30" object_id_reference="_180"></inst>
</source>
<sink class_id_reference="28" object_id="_330">
<port class_id_reference="29" object_id="_331">
<name>out</name>
<dir>3</dir>
<type>1</type>
</port>
<inst class_id_reference="30" object_id_reference="_188"></inst>
</sink>
</item>
<item class_id_reference="32" object_id="_332">
<type>1</type>
<name>img_input_rows_V_c20</name>
<ssdmobj_id>25</ssdmobj_id>
<ctype>0</ctype>
<depth>2</depth>
<bitwidth>12</bitwidth>
<source class_id_reference="28" object_id="_333">
<port class_id_reference="29" object_id="_334">
<name>in</name>
<dir>3</dir>
<type>0</type>
</port>
<inst class_id_reference="30" object_id_reference="_180"></inst>
</source>
<sink class_id_reference="28" object_id="_335">
<port class_id_reference="29" object_id="_336">
<name>out</name>
<dir>3</dir>
<type>1</type>
</port>
<inst class_id_reference="30" object_id_reference="_216"></inst>
</sink>
</item>
<item class_id_reference="32" object_id="_337">
<type>1</type>
<name>img_input_cols_V_c</name>
<ssdmobj_id>24</ssdmobj_id>
<ctype>0</ctype>
<depth>2</depth>
<bitwidth>12</bitwidth>
<source class_id_reference="28" object_id="_338">
<port class_id_reference="29" object_id="_339">
<name>in</name>
<dir>3</dir>
<type>0</type>
</port>
<inst class_id_reference="30" object_id_reference="_180"></inst>
</source>
<sink class_id_reference="28" object_id="_340">
<port class_id_reference="29" object_id="_341">
<name>out</name>
<dir>3</dir>
<type>1</type>
</port>
<inst class_id_reference="30" object_id_reference="_188"></inst>
</sink>
</item>
<item class_id_reference="32" object_id="_342">
<type>1</type>
<name>img_input_data_strea</name>
<ssdmobj_id>45</ssdmobj_id>
<ctype>0</ctype>
<depth>2</depth>
<bitwidth>8</bitwidth>
<source class_id_reference="28" object_id="_343">
<port class_id_reference="29" object_id="_344">
<name>in</name>
<dir>3</dir>
<type>0</type>
</port>
<inst class_id_reference="30" object_id_reference="_188"></inst>
</source>
<sink class_id_reference="28" object_id="_345">
<port class_id_reference="29" object_id="_346">
<name>out</name>
<dir>3</dir>
<type>1</type>
</port>
<inst class_id_reference="30" object_id_reference="_222"></inst>
</sink>
</item>
<item class_id_reference="32" object_id="_347">
<type>1</type>
<name>img_input_data_strea_1</name>
<ssdmobj_id>48</ssdmobj_id>
<ctype>0</ctype>
<depth>2</depth>
<bitwidth>8</bitwidth>
<source class_id_reference="28" object_id="_348">
<port class_id_reference="29" object_id="_349">
<name>in</name>
<dir>3</dir>
<type>0</type>
</port>
<inst class_id_reference="30" object_id_reference="_188"></inst>
</source>
<sink class_id_reference="28" object_id="_350">
<port class_id_reference="29" object_id="_351">
<name>out</name>
<dir>3</dir>
<type>1</type>
</port>
<inst class_id_reference="30" object_id_reference="_222"></inst>
</sink>
</item>
<item class_id_reference="32" object_id="_352">
<type>1</type>
<name>img_input_data_strea_2</name>
<ssdmobj_id>51</ssdmobj_id>
<ctype>0</ctype>
<depth>2</depth>
<bitwidth>8</bitwidth>
<source class_id_reference="28" object_id="_353">
<port class_id_reference="29" object_id="_354">
<name>in</name>
<dir>3</dir>
<type>0</type>
</port>
<inst class_id_reference="30" object_id_reference="_188"></inst>
</source>
<sink class_id_reference="28" object_id="_355">
<port class_id_reference="29" object_id="_356">
<name>out</name>
<dir>3</dir>
<type>1</type>
</port>
<inst class_id_reference="30" object_id_reference="_222"></inst>
</sink>
</item>
<item class_id_reference="32" object_id="_357">
<type>1</type>
<name>img_input_cols_V_c20</name>
<ssdmobj_id>23</ssdmobj_id>
<ctype>0</ctype>
<depth>2</depth>
<bitwidth>12</bitwidth>
<source class_id_reference="28" object_id="_358">
<port class_id_reference="29" object_id="_359">
<name>in</name>
<dir>3</dir>
<type>0</type>
</port>
<inst class_id_reference="30" object_id_reference="_188"></inst>
</source>
<sink class_id_reference="28" object_id="_360">
<port class_id_reference="29" object_id="_361">
<name>out</name>
<dir>3</dir>
<type>1</type>
</port>
<inst class_id_reference="30" object_id_reference="_222"></inst>
</sink>
</item>
<item class_id_reference="32" object_id="_362">
<type>1</type>
<name>extLd_loc_channel</name>
<ssdmobj_id>114</ssdmobj_id>
<ctype>0</ctype>
<depth>2</depth>
<bitwidth>12</bitwidth>
<source class_id_reference="28" object_id="_363">
<port class_id_reference="29" object_id="_364">
<name>in</name>
<dir>3</dir>
<type>0</type>
</port>
<inst class_id_reference="30" object_id_reference="_216"></inst>
</source>
<sink class_id_reference="28" object_id="_365">
<port class_id_reference="29" object_id="_366">
<name>out</name>
<dir>3</dir>
<type>1</type>
</port>
<inst class_id_reference="30" object_id_reference="_222"></inst>
</sink>
</item>
<item class_id_reference="32" object_id="_367">
<type>1</type>
<name>img_crop_data_stream</name>
<ssdmobj_id>54</ssdmobj_id>
<ctype>0</ctype>
<depth>2</depth>
<bitwidth>8</bitwidth>
<source class_id_reference="28" object_id="_368">
<port class_id_reference="29" object_id="_369">
<name>in</name>
<dir>3</dir>
<type>0</type>
</port>
<inst class_id_reference="30" object_id_reference="_222"></inst>
</source>
<sink class_id_reference="28" object_id="_370">
<port class_id_reference="29" object_id="_371">
<name>out</name>
<dir>3</dir>
<type>1</type>
</port>
<inst class_id_reference="30" object_id_reference="_240"></inst>
</sink>
</item>
<item class_id_reference="32" object_id="_372">
<type>1</type>
<name>img_crop_data_stream_1</name>
<ssdmobj_id>57</ssdmobj_id>
<ctype>0</ctype>
<depth>2</depth>
<bitwidth>8</bitwidth>
<source class_id_reference="28" object_id="_373">
<port class_id_reference="29" object_id="_374">
<name>in</name>
<dir>3</dir>
<type>0</type>
</port>
<inst class_id_reference="30" object_id_reference="_222"></inst>
</source>
<sink class_id_reference="28" object_id="_375">
<port class_id_reference="29" object_id="_376">
<name>out</name>
<dir>3</dir>
<type>1</type>
</port>
<inst class_id_reference="30" object_id_reference="_240"></inst>
</sink>
</item>
<item class_id_reference="32" object_id="_377">
<type>1</type>
<name>img_crop_data_stream_2</name>
<ssdmobj_id>60</ssdmobj_id>
<ctype>0</ctype>
<depth>2</depth>
<bitwidth>8</bitwidth>
<source class_id_reference="28" object_id="_378">
<port class_id_reference="29" object_id="_379">
<name>in</name>
<dir>3</dir>
<type>0</type>
</port>
<inst class_id_reference="30" object_id_reference="_222"></inst>
</source>
<sink class_id_reference="28" object_id="_380">
<port class_id_reference="29" object_id="_381">
<name>out</name>
<dir>3</dir>
<type>1</type>
</port>
<inst class_id_reference="30" object_id_reference="_240"></inst>
</sink>
</item>
<item class_id_reference="32" object_id="_382">
<type>1</type>
<name>img_nogamma_data_str</name>
<ssdmobj_id>63</ssdmobj_id>
<ctype>0</ctype>
<depth>2</depth>
<bitwidth>32</bitwidth>
<source class_id_reference="28" object_id="_383">
<port class_id_reference="29" object_id="_384">
<name>in</name>
<dir>3</dir>
<type>0</type>
</port>
<inst class_id_reference="30" object_id_reference="_240"></inst>
</source>
<sink class_id_reference="28" object_id="_385">
<port class_id_reference="29" object_id="_386">
<name>out</name>
<dir>3</dir>
<type>1</type>
</port>
<inst class_id_reference="30" object_id_reference="_256"></inst>
</sink>
</item>
<item class_id_reference="32" object_id="_387">
<type>1</type>
<name>img_nogamma_data_str_1</name>
<ssdmobj_id>66</ssdmobj_id>
<ctype>0</ctype>
<depth>2</depth>
<bitwidth>32</bitwidth>
<source class_id_reference="28" object_id="_388">
<port class_id_reference="29" object_id="_389">
<name>in</name>
<dir>3</dir>
<type>0</type>
</port>
<inst class_id_reference="30" object_id_reference="_240"></inst>
</source>
<sink class_id_reference="28" object_id="_390">
<port class_id_reference="29" object_id="_391">
<name>out</name>
<dir>3</dir>
<type>1</type>
</port>
<inst class_id_reference="30" object_id_reference="_256"></inst>
</sink>
</item>
<item class_id_reference="32" object_id="_392">
<type>1</type>
<name>img_nogamma_data_str_2</name>
<ssdmobj_id>69</ssdmobj_id>
<ctype>0</ctype>
<depth>2</depth>
<bitwidth>32</bitwidth>
<source class_id_reference="28" object_id="_393">
<port class_id_reference="29" object_id="_394">
<name>in</name>
<dir>3</dir>
<type>0</type>
</port>
<inst class_id_reference="30" object_id_reference="_240"></inst>
</source>
<sink class_id_reference="28" object_id="_395">
<port class_id_reference="29" object_id="_396">
<name>out</name>
<dir>3</dir>
<type>1</type>
</port>
<inst class_id_reference="30" object_id_reference="_256"></inst>
</sink>
</item>
<item class_id_reference="32" object_id="_397">
<type>1</type>
<name>img_scaled_data_stre</name>
<ssdmobj_id>72</ssdmobj_id>
<ctype>0</ctype>
<depth>2</depth>
<bitwidth>32</bitwidth>
<source class_id_reference="28" object_id="_398">
<port class_id_reference="29" object_id="_399">
<name>in</name>
<dir>3</dir>
<type>0</type>
</port>
<inst class_id_reference="30" object_id_reference="_256"></inst>
</source>
<sink class_id_reference="28" object_id="_400">
<port class_id_reference="29" object_id="_401">
<name>out</name>
<dir>3</dir>
<type>1</type>
</port>
<inst class_id_reference="30" object_id_reference="_270"></inst>
</sink>
</item>
<item class_id_reference="32" object_id="_402">
<type>1</type>
<name>img_scaled_data_stre_1</name>
<ssdmobj_id>75</ssdmobj_id>
<ctype>0</ctype>
<depth>2</depth>
<bitwidth>32</bitwidth>
<source class_id_reference="28" object_id="_403">
<port class_id_reference="29" object_id="_404">
<name>in</name>
<dir>3</dir>
<type>0</type>
</port>
<inst class_id_reference="30" object_id_reference="_256"></inst>
</source>
<sink class_id_reference="28" object_id="_405">
<port class_id_reference="29" object_id="_406">
<name>out</name>
<dir>3</dir>
<type>1</type>
</port>
<inst class_id_reference="30" object_id_reference="_270"></inst>
</sink>
</item>
<item class_id_reference="32" object_id="_407">
<type>1</type>
<name>img_scaled_data_stre_2</name>
<ssdmobj_id>78</ssdmobj_id>
<ctype>0</ctype>
<depth>2</depth>
<bitwidth>32</bitwidth>
<source class_id_reference="28" object_id="_408">
<port class_id_reference="29" object_id="_409">
<name>in</name>
<dir>3</dir>
<type>0</type>
</port>
<inst class_id_reference="30" object_id_reference="_256"></inst>
</source>
<sink class_id_reference="28" object_id="_410">
<port class_id_reference="29" object_id="_411">
<name>out</name>
<dir>3</dir>
<type>1</type>
</port>
<inst class_id_reference="30" object_id_reference="_270"></inst>
</sink>
</item>
<item class_id_reference="32" object_id="_412">
<type>1</type>
<name>img_adjusted_data_st</name>
<ssdmobj_id>81</ssdmobj_id>
<ctype>0</ctype>
<depth>2</depth>
<bitwidth>32</bitwidth>
<source class_id_reference="28" object_id="_413">
<port class_id_reference="29" object_id="_414">
<name>in</name>
<dir>3</dir>
<type>0</type>
</port>
<inst class_id_reference="30" object_id_reference="_270"></inst>
</source>
<sink class_id_reference="28" object_id="_415">
<port class_id_reference="29" object_id="_416">
<name>out</name>
<dir>3</dir>
<type>1</type>
</port>
<inst class_id_reference="30" object_id_reference="_294"></inst>
</sink>
</item>
<item class_id_reference="32" object_id="_417">
<type>1</type>
<name>img_adjusted_data_st_1</name>
<ssdmobj_id>84</ssdmobj_id>
<ctype>0</ctype>
<depth>2</depth>
<bitwidth>32</bitwidth>
<source class_id_reference="28" object_id="_418">
<port class_id_reference="29" object_id="_419">
<name>in</name>
<dir>3</dir>
<type>0</type>
</port>
<inst class_id_reference="30" object_id_reference="_270"></inst>
</source>
<sink class_id_reference="28" object_id="_420">
<port class_id_reference="29" object_id="_421">
<name>out</name>
<dir>3</dir>
<type>1</type>
</port>
<inst class_id_reference="30" object_id_reference="_294"></inst>
</sink>
</item>
<item class_id_reference="32" object_id="_422">
<type>1</type>
<name>img_adjusted_data_st_2</name>
<ssdmobj_id>87</ssdmobj_id>
<ctype>0</ctype>
<depth>2</depth>
<bitwidth>32</bitwidth>
<source class_id_reference="28" object_id="_423">
<port class_id_reference="29" object_id="_424">
<name>in</name>
<dir>3</dir>
<type>0</type>
</port>
<inst class_id_reference="30" object_id_reference="_270"></inst>
</source>
<sink class_id_reference="28" object_id="_425">
<port class_id_reference="29" object_id="_426">
<name>out</name>
<dir>3</dir>
<type>1</type>
</port>
<inst class_id_reference="30" object_id_reference="_294"></inst>
</sink>
</item>
<item class_id_reference="32" object_id="_427">
<type>1</type>
<name>img_out_data_stream_s</name>
<ssdmobj_id>90</ssdmobj_id>
<ctype>0</ctype>
<depth>2</depth>
<bitwidth>8</bitwidth>
<source class_id_reference="28" object_id="_428">
<port class_id_reference="29" object_id="_429">
<name>in</name>
<dir>3</dir>
<type>0</type>
</port>
<inst class_id_reference="30" object_id_reference="_294"></inst>
</source>
<sink class_id_reference="28" object_id="_430">
<port class_id_reference="29" object_id="_431">
<name>out</name>
<dir>3</dir>
<type>1</type>
</port>
<inst class_id_reference="30" object_id_reference="_308"></inst>
</sink>
</item>
<item class_id_reference="32" object_id="_432">
<type>1</type>
<name>img_out_data_stream_1</name>
<ssdmobj_id>93</ssdmobj_id>
<ctype>0</ctype>
<depth>2</depth>
<bitwidth>8</bitwidth>
<source class_id_reference="28" object_id="_433">
<port class_id_reference="29" object_id="_434">
<name>in</name>
<dir>3</dir>
<type>0</type>
</port>
<inst class_id_reference="30" object_id_reference="_294"></inst>
</source>
<sink class_id_reference="28" object_id="_435">
<port class_id_reference="29" object_id="_436">
<name>out</name>
<dir>3</dir>
<type>1</type>
</port>
<inst class_id_reference="30" object_id_reference="_308"></inst>
</sink>
</item>
<item class_id_reference="32" object_id="_437">
<type>1</type>
<name>img_out_data_stream_2</name>
<ssdmobj_id>96</ssdmobj_id>
<ctype>0</ctype>
<depth>2</depth>
<bitwidth>8</bitwidth>
<source class_id_reference="28" object_id="_438">
<port class_id_reference="29" object_id="_439">
<name>in</name>
<dir>3</dir>
<type>0</type>
</port>
<inst class_id_reference="30" object_id_reference="_294"></inst>
</source>
<sink class_id_reference="28" object_id="_440">
<port class_id_reference="29" object_id="_441">
<name>out</name>
<dir>3</dir>
<type>1</type>
</port>
<inst class_id_reference="30" object_id_reference="_308"></inst>
</sink>
</item>
</channel_list>
<net_list class_id="33" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</net_list>
</mDfPipe>
</item>
</cdfg_regions>
<fsm class_id="-1"></fsm>
<res class_id="-1"></res>
<node_label_latency class_id="36" tracking_level="0" version="0">
<count>34</count>
<item_version>0</item_version>
<item class_id="37" tracking_level="0" version="0">
<first>21</first>
<second class_id="38" tracking_level="0" version="0">
<first>9</first>
<second>0</second>
</second>
</item>
<item>
<first>22</first>
<second>
<first>9</first>
<second>0</second>
</second>
</item>
<item>
<first>23</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>24</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>25</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>26</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>45</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>48</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>51</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>54</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>57</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>60</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>63</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>66</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>69</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>72</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>75</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>78</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>81</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>84</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>87</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>90</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>93</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>96</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>110</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>113</first>
<second>
<first>1</first>
<second>1</second>
</second>
</item>
<item>
<first>114</first>
<second>
<first>3</first>
<second>0</second>
</second>
</item>
<item>
<first>115</first>
<second>
<first>3</first>
<second>1</second>
</second>
</item>
<item>
<first>116</first>
<second>
<first>5</first>
<second>1</second>
</second>
</item>
<item>
<first>117</first>
<second>
<first>7</first>
<second>1</second>
</second>
</item>
<item>
<first>118</first>
<second>
<first>9</first>
<second>1</second>
</second>
</item>
<item>
<first>119</first>
<second>
<first>11</first>
<second>1</second>
</second>
</item>
<item>
<first>120</first>
<second>
<first>13</first>
<second>1</second>
</second>
</item>
<item>
<first>121</first>
<second>
<first>15</first>
<second>0</second>
</second>
</item>
</node_label_latency>
<bblk_ent_exit class_id="39" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="40" tracking_level="0" version="0">
<first>122</first>
<second class_id="41" tracking_level="0" version="0">
<first>0</first>
<second>15</second>
</second>
</item>
</bblk_ent_exit>
<regions class_id="42" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="43" tracking_level="1" version="0" object_id="_442">
<region_name>hls_video_processor</region_name>
<basic_blocks>
<count>1</count>
<item_version>0</item_version>
<item>122</item>
</basic_blocks>
<nodes>
<count>101</count>
<item_version>0</item_version>
<item>21</item>
<item>22</item>
<item>23</item>
<item>24</item>
<item>25</item>
<item>26</item>
<item>27</item>
<item>28</item>
<item>29</item>
<item>30</item>
<item>31</item>
<item>32</item>
<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>
<item>43</item>
<item>44</item>
<item>45</item>
<item>46</item>
<item>47</item>
<item>48</item>
<item>49</item>
<item>50</item>
<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>
<item>65</item>
<item>66</item>
<item>67</item>
<item>68</item>
<item>69</item>
<item>70</item>
<item>71</item>
<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>
<item>82</item>
<item>83</item>
<item>84</item>
<item>85</item>
<item>86</item>
<item>87</item>
<item>88</item>
<item>89</item>
<item>90</item>
<item>91</item>
<item>92</item>
<item>93</item>
<item>94</item>
<item>95</item>
<item>96</item>
<item>97</item>
<item>98</item>
<item>99</item>
<item>100</item>
<item>101</item>
<item>102</item>
<item>103</item>
<item>104</item>
<item>105</item>
<item>106</item>
<item>107</item>
<item>108</item>
<item>109</item>
<item>110</item>
<item>111</item>
<item>112</item>
<item>113</item>
<item>114</item>
<item>115</item>
<item>116</item>
<item>117</item>
<item>118</item>
<item>119</item>
<item>120</item>
<item>121</item>
</nodes>
<anchor_node>-1</anchor_node>
<region_type>16</region_type>
<interval>0</interval>
<pipe_depth>0</pipe_depth>
</item>
</regions>
<dp_fu_nodes class_id="44" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</dp_fu_nodes>
<dp_fu_nodes_expression class_id="45" 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="46" 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="47" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</dp_port_io_nodes>
<port2core class_id="48" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</port2core>
<node2core>
<count>0</count>
<item_version>0</item_version>
</node2core>
</syndb>
</boost_serialization>
|
--------------------------------------------------------------------------------------------------------------------
-- Copyright (c) 2013-2020, Luke A. Guest
--
-- This software is provided 'as-is', without any express or implied
-- warranty. In no event will the authors be held liable for any damages
-- arising from the use of this software.
--
-- Permission is granted to anyone to use this software for any purpose,
-- including commercial applications, and to alter it and redistribute it
-- freely, subject to the following restrictions:
--
-- 1. The origin of this software must not be misrepresented; you must not
-- claim that you wrote the original software. If you use this software
-- in a product, an acknowledgment in the product documentation would be
-- appreciated but is not required.
--
-- 2. Altered source versions must be plainly marked as such, and must not be
-- misrepresented as being the original software.
--
-- 3. This notice may not be removed or altered from any source
-- distribution.
--------------------------------------------------------------------------------------------------------------------
-- SDL_Suites
--
-- Tests to check the Ada 2012 bindings for correctness.
--------------------------------------------------------------------------------------------------------------------
with AUnit; use AUnit;
with Pixel_Format_Test_Cases;
with Colour_Test_Cases;
package body SDL_Suites is
use Test_Suites;
Pixel_Tests : aliased Pixel_Format_Test_Cases.Pixel_Format_Test_Case;
Colour_Tests : aliased Colour_Test_Cases.Colour_Test_Case;
function Suite return Access_Test_Suite is
Result : constant Access_Test_Suite := AUnit.Test_Suites.New_Suite;
begin
Result.Add_Test (Pixel_Tests'Access);
Result.Add_Test (Colour_Tests'Access);
return Result;
end Suite;
end SDL_Suites;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- S Y S T E M . T R A C E B A C K . S Y M B O L I C --
-- --
-- B o d y --
-- --
-- Copyright (C) 1999-2020, 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. --
-- --
------------------------------------------------------------------------------
-- This is the default implementation for platforms where the full capability
-- is not supported. It returns tracebacks as lists of hexadecimal addresses
-- of the form "0x...".
with Ada.Exceptions.Traceback; use Ada.Exceptions.Traceback;
with System.Address_Image;
package body System.Traceback.Symbolic is
-- Note that Suppress_Hex is ignored in this version of this package.
------------------------
-- Symbolic_Traceback --
------------------------
function Symbolic_Traceback
(Traceback : System.Traceback_Entries.Tracebacks_Array) return String
is
begin
if Traceback'Length = 0 then
return "";
else
declare
Img : String := System.Address_Image (Traceback (Traceback'First));
Result : String (1 .. (Img'Length + 3) * Traceback'Length);
Last : Natural := 0;
begin
for J in Traceback'Range loop
Img := System.Address_Image (Traceback (J));
Result (Last + 1 .. Last + 2) := "0x";
Last := Last + 2;
Result (Last + 1 .. Last + Img'Length) := Img;
Last := Last + Img'Length + 1;
Result (Last) := ' ';
end loop;
Result (Last) := ASCII.LF;
return Result (1 .. Last);
end;
end if;
end Symbolic_Traceback;
-- "No_Hex" is ignored in this version, because otherwise we have nothing
-- at all to print.
function Symbolic_Traceback_No_Hex
(Traceback : System.Traceback_Entries.Tracebacks_Array) return String is
begin
return Symbolic_Traceback (Traceback);
end Symbolic_Traceback_No_Hex;
function Symbolic_Traceback
(E : Ada.Exceptions.Exception_Occurrence) return String
is
begin
return Symbolic_Traceback (Ada.Exceptions.Traceback.Tracebacks (E));
end Symbolic_Traceback;
function Symbolic_Traceback_No_Hex
(E : Ada.Exceptions.Exception_Occurrence) return String is
begin
return Symbolic_Traceback (E);
end Symbolic_Traceback_No_Hex;
------------------
-- Enable_Cache --
------------------
procedure Enable_Cache (Include_Modules : Boolean := False) is
begin
null;
end Enable_Cache;
end System.Traceback.Symbolic;
|
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- S Y S T E M . F A T _ I E E E _ S H O R T _ F L O A T --
-- --
-- S p e c --
-- --
-- Copyright (C) 1992-2005 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. --
-- --
--
--
--
--
--
--
--
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- This package contains an instantiation of the floating-point attribute
-- runtime routines for IEEE short float. This is used on VMS targest where
-- we can't just use Float, since this may have been mapped to Vax_Float
-- using a Float_Representation configuration pragma.
with System.Fat_Gen;
package System.Fat_IEEE_Short_Float is
pragma Pure;
type Fat_IEEE_Short is digits 6;
pragma Float_Representation (IEEE_Float, Fat_IEEE_Short);
-- Note the only entity from this package that is acccessed by Rtsfind
-- is the name of the package instantiation. Entities within this package
-- (i.e. the individual floating-point attribute routines) are accessed
-- by name using selected notation.
package Attr_IEEE_Short is new System.Fat_Gen (Fat_IEEE_Short);
end System.Fat_IEEE_Short_Float;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.