CombinedText stringlengths 4 3.42M |
|---|
with Ada.Unchecked_Deallocation;
with Physics; use Physics;
with Materials;
with Circles;
package body Worlds is
-- init world
procedure Init(This : in out World; dt : in Float; MaxEnts : Natural := 32)
is
VecZero : constant Vec2D := (0.0, 0.0);
begin
This.MaxEntities := MaxEnts;
This.dt := dt;
This.Invdt := 1.0 / dt;
This.Entities := new EntsList.List;
This.Environments := new EntsList.List;
This.Links := new LinksList.List;
This.Cols := new ColsList.List;
This.InvalidChecker := null;
This.MaxSpeed := VecZero;
This.StaticEnt :=
Circles.Create(VecZero, VecZero, VecZero, 1.0,
Materials.STATIC.SetFriction.SetRestitution(LinkTypesFactors(LTRope)));
end Init;
procedure IncreaseMaxEntities(This : in out World; Count : Positive)
is
begin
This.MaxEntities := This.MaxEntities + Count;
end IncreaseMaxEntities;
procedure Step(This : in out World; Mode : StepModes := Step_Normal)
is
begin
if Mode = Step_LowRAM then
StepLowRAM(This);
else
StepNormal(This);
end if;
end Step;
-- Add entity to the world
procedure AddEntity(This : in out World; Ent : not null EntityClassAcc)
is
begin
if This.MaxEntities = 0
or else Integer(This.Entities.Length)
+ Integer(This.Environments.Length)
+ Integer(This.Links.Length) < This.MaxEntities
then
This.Entities.Append(Ent);
end if;
end AddEntity;
procedure SetMaxSpeed(This : in out World; Speed : Vec2D) is
begin
This.MaxSpeed := Speed;
end SetMaxSpeed;
-- Add env to the world
procedure AddEnvironment(This : in out World; Ent : not null EntityClassAcc)
is
begin
if This.MaxEntities = 0
or else Integer(This.Entities.Length)
+ Integer(This.Environments.Length)
+ Integer(This.Links.Length) < This.MaxEntities
then
This.Environments.Append(Ent);
end if;
end AddEnvironment;
procedure LinkEntities(This : in out World; A, B : EntityClassAcc; LinkType : LinkTypes; Factor : Float := 0.0) is
begin
if This.MaxEntities = 0
or else Integer(This.Entities.Length)
+ Integer(This.Environments.Length)
+ Integer(This.Links.Length) < This.MaxEntities
then
This.Links.Append(CreateLink(A, B, LinkType, Factor));
end if;
end LinkEntities;
procedure UnlinkEntity(This : in out World; E : EntityClassAcc) is
CurLink : LinkAcc;
Edited : Boolean := False;
begin
loop
Edited := False;
declare
use LinksList;
Curs : LinksList.Cursor := This.Links.First;
begin
while Curs /= LinksList.No_Element loop
CurLink := LinksList.Element(Curs);
if CurLink.A = E or CurLink.B = E then
This.Links.Delete(Curs);
FreeLink(CurLink);
Edited := True;
end if;
exit when Edited;
Curs := LinksList.Next(Curs);
end loop;
end;
exit when not Edited;
end loop;
end UnlinkEntity;
-- clear the world (deep free)
procedure Free(This : in out World)
is
use EntsList; use LinksList;
procedure FreeEntList is new Ada.Unchecked_Deallocation(EntsList.List, EntsListAcc);
procedure FreeLinkList is new Ada.Unchecked_Deallocation(LinksList.List, LinksListAcc);
procedure FreeColsList is new Ada.Unchecked_Deallocation(ColsList.List, ColsListAcc);
Curs : EntsList.Cursor := This.Entities.First;
CursL : LinksList.Cursor := This.Links.First;
TmpLink : LinkAcc;
begin
while CursL /= LinksList.No_Element loop
TmpLink := LinksList.Element(CursL);
FreeLink(TmpLink);
CursL := LinksList.Next(CursL);
end loop;
while Curs /= EntsList.No_Element loop
FreeEnt(EntsList.Element(Curs));
Curs := EntsList.Next(Curs);
end loop;
Curs := This.Environments.First;
while Curs /= EntsList.No_Element loop
FreeEnt(EntsList.Element(Curs));
Curs := EntsList.Next(Curs);
end loop;
FreeEnt(This.StaticEnt);
This.Entities.Clear;
This.Environments.Clear;
This.Links.Clear;
This.Cols.Clear;
FreeEntList(This.Entities);
FreeEntList(This.Environments);
FreeLinkList(This.Links);
FreeColsList(This.Cols);
end Free;
-- Gives the world a function to check if entities are valid or not
procedure SetInvalidChecker(This : in out World; Invalider : EntCheckerAcc)
is
begin
if Invalider /= null then
This.InvalidChecker := Invalider;
end if;
end SetInvalidChecker;
-- Remove entity from the world
procedure RemoveEntity(This : in out World; Ent : EntityClassAcc; Destroy : Boolean)
is
Curs : EntsList.Cursor := This.Entities.Find(Ent);
begin
This.Entities.Delete(Curs);
This.UnlinkEntity(Ent);
if Destroy then
FreeEnt(Ent);
end if;
end RemoveEntity;
-- Remove entity from the world
procedure RemoveEnvironment(This : in out World; Ent : not null EntityClassAcc; Destroy : Boolean)
is
Curs : EntsList.Cursor := This.Environments.Find(Ent);
begin
This.Environments.Delete(Curs);
if Destroy then
FreeEnt(Ent);
end if;
end RemoveEnvironment;
function GetEntities(This : in World) return EntsListAcc
is
begin
return This.Entities;
end GetEntities;
function GetClosest(This : in out World; Pos : Vec2D; SearchMode : SearchModes := SM_All) return EntityClassAcc
is
use EntsList;
EntList : constant EntsListAcc := (if SearchMode = SM_All or SearchMode = SM_Entity
then This.Entities
else This.Environments);
Curs : EntsList.Cursor := EntList.First;
Ent : EntityClassAcc;
begin
while Curs /= EntsList.No_Element loop
Ent := EntsList.Element(Curs);
if IsInside(Pos, Ent) then
return Ent;
end if;
Curs := EntsList.Next(Curs);
end loop;
if SearchMode = SM_All then
return This.GetClosest(Pos, SM_Environment);
end if;
return null;
end GetClosest;
function GetEnvironments(This : in World) return EntsListAcc
is
begin
return This.Environments;
end GetEnvironments;
function GetLinks(This : in World) return LinksListAcc
is
begin
return This.Links;
end GetLinks;
procedure CheckEntities(This : in out World)
is
begin
if This.InvalidChecker /= null then
declare
E : EntityClassAcc;
Edited : Boolean := False;
begin
loop
Edited := False;
declare
use EntsList;
Curs : EntsList.Cursor := This.Entities.First;
begin
while Curs /= EntsList.No_Element loop
E := EntsList.Element(Curs);
if This.InvalidChecker.all(E) then
This.RemoveEntity(E, True);
Edited := True;
end if;
exit when Edited;
Curs := EntsList.Next(Curs);
end loop;
end;
exit when not Edited;
end loop;
end;
end if;
end CheckEntities;
end Worlds;
|
pragma License (Unrestricted);
with Ada.Characters.Conversions;
package Ada.Characters.Handling is
-- pragma Pure;
pragma Preelaborate; -- use mapping
-- Note: These single Character functions propagates Constraint_Error for
-- 16#80# .. 16#FF#.
-- If you want to handle full-unicode, use Wide_Wide_Character.
-- If you want to handle ISO_646, use ASCII.Handling.
-- If you want to handle latin-1, sorry
-- this runtime can not handle the code incompatible with unicode.
-- Character classification functions
-- extended
-- These are the implementation of Wide_Characters.Handling.Is_Basic and
-- Wide_Wide_Characters.Handling.Is_Basic.
-- They are defined different from Characters.Handling.Is_Basic.
function Overloaded_Is_Basic (Item : Wide_Character) return Boolean;
function Overloaded_Is_Basic (Item : Wide_Wide_Character) return Boolean;
pragma Inline (Overloaded_Is_Basic);
-- extended
function Overloaded_Is_Control (Item : Character) return Boolean;
function Overloaded_Is_Control (Item : Wide_Character) return Boolean;
function Overloaded_Is_Control (Item : Wide_Wide_Character)
return Boolean;
function Overloaded_Is_Graphic (Item : Character) return Boolean;
function Overloaded_Is_Graphic (Item : Wide_Character) return Boolean;
function Overloaded_Is_Graphic (Item : Wide_Wide_Character)
return Boolean;
function Overloaded_Is_Letter (Item : Character) return Boolean;
function Overloaded_Is_Letter (Item : Wide_Character) return Boolean;
function Overloaded_Is_Letter (Item : Wide_Wide_Character) return Boolean;
function Overloaded_Is_Lower (Item : Character) return Boolean;
function Overloaded_Is_Lower (Item : Wide_Character) return Boolean;
function Overloaded_Is_Lower (Item : Wide_Wide_Character) return Boolean;
function Overloaded_Is_Upper (Item : Character) return Boolean;
function Overloaded_Is_Upper (Item : Wide_Character) return Boolean;
function Overloaded_Is_Upper (Item : Wide_Wide_Character) return Boolean;
function Overloaded_Is_Digit (Item : Character) return Boolean;
function Overloaded_Is_Digit (Item : Wide_Character) return Boolean;
function Overloaded_Is_Digit (Item : Wide_Wide_Character) return Boolean;
function Overloaded_Is_Hexadecimal_Digit (Item : Character)
return Boolean;
function Overloaded_Is_Hexadecimal_Digit (Item : Wide_Character)
return Boolean;
function Overloaded_Is_Hexadecimal_Digit (Item : Wide_Wide_Character)
return Boolean;
function Overloaded_Is_Alphanumeric (Item : Character) return Boolean;
function Overloaded_Is_Alphanumeric (Item : Wide_Character)
return Boolean;
function Overloaded_Is_Alphanumeric (Item : Wide_Wide_Character)
return Boolean;
function Overloaded_Is_Special (Item : Character) return Boolean;
function Overloaded_Is_Special (Item : Wide_Character) return Boolean;
function Overloaded_Is_Special (Item : Wide_Wide_Character)
return Boolean;
pragma Inline (Overloaded_Is_Control);
pragma Inline (Overloaded_Is_Graphic);
pragma Inline (Overloaded_Is_Letter);
pragma Inline (Overloaded_Is_Lower);
pragma Inline (Overloaded_Is_Upper);
pragma Inline (Overloaded_Is_Digit);
pragma Inline (Overloaded_Is_Hexadecimal_Digit);
pragma Inline (Overloaded_Is_Alphanumeric);
pragma Inline (Overloaded_Is_Special);
function Is_Control (Item : Character) return Boolean
renames Overloaded_Is_Control;
function Is_Graphic (Item : Character) return Boolean
renames Overloaded_Is_Graphic;
function Is_Letter (Item : Character) return Boolean
renames Overloaded_Is_Letter;
function Is_Lower (Item : Character) return Boolean
renames Overloaded_Is_Lower;
function Is_Upper (Item : Character) return Boolean
renames Overloaded_Is_Upper;
function Is_Basic (Item : Character) return Boolean
renames Is_Letter; -- all letters are "basic" in ASCII
function Is_Digit (Item : Character) return Boolean
renames Overloaded_Is_Digit;
function Is_Decimal_Digit (Item : Character) return Boolean
renames Is_Digit;
function Is_Hexadecimal_Digit (Item : Character) return Boolean
renames Overloaded_Is_Hexadecimal_Digit;
function Is_Alphanumeric (Item : Character) return Boolean
renames Overloaded_Is_Alphanumeric;
function Is_Special (Item : Character) return Boolean
renames Overloaded_Is_Special;
-- function Is_Line_Terminator (Item : Character) return Boolean;
-- function Is_Mark (Item : Character) return Boolean;
-- function Is_Other_Format (Item : Character) return Boolean;
-- function Is_Punctuation_Connector (Item : Character) return Boolean;
-- function Is_Space (Item : Character) return Boolean;
-- Conversion functions for Character and String
-- extended
function Overloaded_To_Lower (Item : Character) return Character;
function Overloaded_To_Lower (Item : Wide_Character)
return Wide_Character;
function Overloaded_To_Lower (Item : Wide_Wide_Character)
return Wide_Wide_Character;
function Overloaded_To_Upper (Item : Character) return Character;
function Overloaded_To_Upper (Item : Wide_Character)
return Wide_Character;
function Overloaded_To_Upper (Item : Wide_Wide_Character)
return Wide_Wide_Character;
function Overloaded_To_Basic (Item : Character) return Character;
function Overloaded_To_Basic (Item : Wide_Character)
return Wide_Character;
function Overloaded_To_Basic (Item : Wide_Wide_Character)
return Wide_Wide_Character;
pragma Inline (Overloaded_To_Lower);
pragma Inline (Overloaded_To_Upper);
pragma Inline (Overloaded_To_Basic);
function To_Lower (Item : Character) return Character
renames Overloaded_To_Lower;
function To_Upper (Item : Character) return Character
renames Overloaded_To_Upper;
-- extended from here
-- Unicode case folding for comparison.
function To_Case_Folding (Item : Character) return Character
renames To_Lower; -- same as To_Lower in ASCII
-- to here
function To_Basic (Item : Character) return Character
renames Overloaded_To_Basic;
-- extended
function Overloaded_To_Lower (Item : String) return String;
function Overloaded_To_Lower (Item : Wide_String) return Wide_String;
function Overloaded_To_Lower (Item : Wide_Wide_String)
return Wide_Wide_String;
function Overloaded_To_Upper (Item : String) return String;
function Overloaded_To_Upper (Item : Wide_String) return Wide_String;
function Overloaded_To_Upper (Item : Wide_Wide_String)
return Wide_Wide_String;
function Overloaded_To_Basic (Item : String) return String;
function Overloaded_To_Basic (Item : Wide_String) return Wide_String;
function Overloaded_To_Basic (Item : Wide_Wide_String)
return Wide_Wide_String;
pragma Inline (Overloaded_To_Lower);
pragma Inline (Overloaded_To_Upper);
pragma Inline (Overloaded_To_Basic);
function To_Lower (Item : String) return String
renames Overloaded_To_Lower;
function To_Upper (Item : String) return String
renames Overloaded_To_Upper;
-- extended from here
function To_Case_Folding (Item : String) return String;
-- to here
function To_Basic (Item : String) return String
renames Overloaded_To_Basic;
pragma Inline (To_Case_Folding);
-- Classifications of and conversions between Character and ISO 646
subtype ISO_646 is Character range Character'Val (0) .. Character'Val (127);
function Is_ISO_646 (Item : Character) return Boolean;
function Is_ISO_646 (Item : String) return Boolean;
pragma Inline (Is_ISO_646);
function To_ISO_646 (Item : Character; Substitute : ISO_646 := ' ')
return ISO_646;
pragma Inline (To_ISO_646);
function To_ISO_646 (Item : String; Substitute : ISO_646 := ' ')
return String;
pragma Inline (To_ISO_646);
-- The functions Is_Character, Is_String, To_Character, To_String,
-- To_Wide_Character, and To_Wide_String are obsolescent; see J.14.
function Is_Character (Item : Wide_Character) return Boolean
renames Conversions.Is_Character;
function Is_String (Item : Wide_String) return Boolean
renames Conversions.Is_String;
function To_Character (
Item : Wide_Character;
Substitute : Character := ' ')
return Character
renames Conversions.To_Character;
function To_String (
Item : Wide_String;
Substitute : Character := ' ')
return String
renames Conversions.To_String;
function To_Wide_Character (
Item : Character;
Substitute : Wide_Character := ' ') -- additional
return Wide_Character
renames Conversions.To_Wide_Character;
function To_Wide_String (
Item : String;
Substitute : Wide_String := " ") -- additional
return Wide_String
renames Conversions.To_Wide_String;
end Ada.Characters.Handling;
|
-- Copyright 2014-2017 Free Software Foundation, Inc.
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
package Pack is
type Interactive_Command is abstract tagged null record;
type Interactive_Command_Access is access all Interactive_Command'Class;
type String_Access is access all String;
type My_Command is new Interactive_Command with record
menu_name : String_Access;
end record;
function New_Command return Interactive_Command_Access;
procedure Id (C : in out Interactive_Command_Access);
end Pack;
|
-- This spec has been automatically generated from STM32L0x1.svd
pragma Restrictions (No_Elaboration_Code);
pragma Ada_2012;
pragma Style_Checks (Off);
with System;
package STM32_SVD.STK is
pragma Preelaborate;
---------------
-- Registers --
---------------
-- SysTick control and status register
type CSR_Register is record
-- Counter enable
ENABLE : STM32_SVD.Bit;
-- SysTick exception request enable
TICKINT : STM32_SVD.Bit;
-- Clock source selection
CLKSOURCE : STM32_SVD.Bit;
-- unspecified
Reserved_3_15 : STM32_SVD.UInt13;
-- COUNTFLAG
COUNTFLAG : STM32_SVD.Bit;
-- unspecified
Reserved_17_31 : STM32_SVD.UInt15;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CSR_Register use record
ENABLE at 0 range 0 .. 0;
TICKINT at 0 range 1 .. 1;
CLKSOURCE at 0 range 2 .. 2;
Reserved_3_15 at 0 range 3 .. 15;
COUNTFLAG at 0 range 16 .. 16;
Reserved_17_31 at 0 range 17 .. 31;
end record;
-- SysTick reload value register
type RVR_Register is record
-- RELOAD value
RELOAD : STM32_SVD.UInt24;
-- unspecified
Reserved_24_31 : STM32_SVD.Byte;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for RVR_Register use record
RELOAD at 0 range 0 .. 23;
Reserved_24_31 at 0 range 24 .. 31;
end record;
-- SysTick current value register
type CVR_Register is record
-- Current counter value
CURRENT : STM32_SVD.UInt24;
-- unspecified
Reserved_24_31 : STM32_SVD.Byte;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CVR_Register use record
CURRENT at 0 range 0 .. 23;
Reserved_24_31 at 0 range 24 .. 31;
end record;
-- SysTick calibration value register
type CALIB_Register is record
-- Calibration value
TENMS : STM32_SVD.UInt24;
-- unspecified
Reserved_24_29 : STM32_SVD.UInt6;
-- SKEW flag: Indicates whether the TENMS value is exact
SKEW : STM32_SVD.Bit;
-- NOREF flag. Reads as zero
NOREF : STM32_SVD.Bit;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CALIB_Register use record
TENMS at 0 range 0 .. 23;
Reserved_24_29 at 0 range 24 .. 29;
SKEW at 0 range 30 .. 30;
NOREF at 0 range 31 .. 31;
end record;
-----------------
-- Peripherals --
-----------------
-- SysTick timer
type STK_Peripheral is record
-- SysTick control and status register
CSR : aliased CSR_Register;
-- SysTick reload value register
RVR : aliased RVR_Register;
-- SysTick current value register
CVR : aliased CVR_Register;
-- SysTick calibration value register
CALIB : aliased CALIB_Register;
end record
with Volatile;
for STK_Peripheral use record
CSR at 16#0# range 0 .. 31;
RVR at 16#4# range 0 .. 31;
CVR at 16#8# range 0 .. 31;
CALIB at 16#C# range 0 .. 31;
end record;
-- SysTick timer
STK_Periph : aliased STK_Peripheral
with Import, Address => STK_Base;
end STM32_SVD.STK;
|
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Localization, Internationalization, Globalization for Ada --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2012-2015, 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$
------------------------------------------------------------------------------
pragma Restrictions (No_Elaboration_Code);
-- GNAT: enforce generation of preinitialized data section instead of
-- generation of elaboration code.
package Matreshka.Internals.Unicode.Ucd.Core_0118 is
pragma Preelaborate;
Group_0118 : aliased constant Core_Second_Stage
:= (16#A0# .. 16#BF# => -- 0118A0 .. 0118BF
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#C0# .. 16#DF# => -- 0118C0 .. 0118DF
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#E0# .. 16#E9# => -- 0118E0 .. 0118E9
(Decimal_Number, Neutral,
Other, Numeric, Numeric, Numeric,
(Grapheme_Base
| ID_Continue
| XID_Continue => True,
others => False)),
16#EA# .. 16#F2# => -- 0118EA .. 0118F2
(Other_Number, Neutral,
Other, Other, Other, Alphabetic,
(Grapheme_Base => True,
others => False)),
16#FF# => -- 0118FF
(Other_Letter, Neutral,
Other, A_Letter, O_Letter, Alphabetic,
(Alphabetic
| Grapheme_Base
| ID_Continue
| ID_Start
| XID_Continue
| XID_Start => True,
others => False)),
others =>
(Unassigned, Neutral,
Other, Other, Other, Unknown,
(others => False)));
end Matreshka.Internals.Unicode.Ucd.Core_0118;
|
-----------------------------------------------------------------------
-- awa-components -- UI Components
-- Copyright (C) 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.
-----------------------------------------------------------------------
package AWA.Components is
end AWA.Components;
|
-- Abstract :
--
-- See spec.
--
-- Copyright (C) 2002 - 2005, 2008 - 2015, 2017 - 2019 Free Software Foundation, Inc.
--
-- This file is part of the WisiToken package.
--
-- The WisiToken package is free software; you can redistribute it
-- and/or modify it under terms of the GNU General Public License as
-- published by the Free Software Foundation; either version 3, or
-- (at your option) any later version. This library is distributed in
-- the hope that it will be useful, but WITHOUT ANY WARRANTY; without
-- even the implied warranty of MERCHAN- TABILITY or FITNESS FOR A
-- PARTICULAR PURPOSE.
--
-- As a special exception under Section 7 of GPL version 3, you are granted
-- additional permissions described in the GCC Runtime Library Exception,
-- version 3.1, as published by the Free Software Foundation.
pragma License (Modified_GPL);
with Ada.Containers;
with Ada.Text_IO;
with SAL.Gen_Definite_Doubly_Linked_Lists;
package body WisiToken.Generate.LR.LALR_Generate is
package Item_List_Cursor_Lists is new SAL.Gen_Definite_Doubly_Linked_Lists (LR1_Items.Item_Lists.Cursor);
type Item_Map is record
-- Keep track of all copies of Item, so Lookaheads can be updated
-- after they are initially copied.
From : LR1_Items.Item_Lists.Cursor;
To : Item_List_Cursor_Lists.List;
end record;
package Item_Map_Lists is new SAL.Gen_Definite_Doubly_Linked_Lists (Item_Map);
-- IMPROVEME: should be a 3D array indexed by Prod, rhs_index,
-- dot_index. But it's not broken or slow, so we're not fixing it.
function Propagate_Lookahead (Descriptor : in WisiToken.Descriptor) return Token_ID_Set_Access
is begin
return new Token_ID_Set'(LR1_Items.To_Lookahead (Descriptor.Last_Lookahead, Descriptor));
end Propagate_Lookahead;
function Null_Lookahead (Descriptor : in WisiToken.Descriptor) return Token_ID_Set_Access
is begin
return new Token_ID_Set'(Descriptor.First_Terminal .. Descriptor.Last_Lookahead => False);
end Null_Lookahead;
----------
-- Debug output
procedure Put
(Grammar : in WisiToken.Productions.Prod_Arrays.Vector;
Descriptor : in WisiToken.Descriptor;
Propagations : in Item_Map_Lists.List)
is
use LR1_Items.Item_Lists;
begin
for Map of Propagations loop
Ada.Text_IO.Put ("From ");
LR1_Items.Put (Grammar, Descriptor, Constant_Ref (Map.From), Show_Lookaheads => True);
Ada.Text_IO.New_Line;
for Cur of Map.To loop
Ada.Text_IO.Put ("To ");
LR1_Items.Put (Grammar, Descriptor, Constant_Ref (Cur), Show_Lookaheads => True);
Ada.Text_IO.New_Line;
end loop;
end loop;
end Put;
----------
-- Generate utils
function LALR_Goto_Transitions
(Kernel : in LR1_Items.Item_Set;
Symbol : in Token_ID;
First_Nonterm_Set : in Token_Array_Token_Set;
Grammar : in WisiToken.Productions.Prod_Arrays.Vector;
Descriptor : in WisiToken.Descriptor)
return LR1_Items.Item_Set
is
use Token_ID_Arrays;
use LR1_Items;
use LR1_Items.Item_Lists;
Goto_Set : Item_Set;
Dot_ID : Token_ID;
begin
for Item of Kernel.Set loop
if Has_Element (Item.Dot) then
Dot_ID := Element (Item.Dot);
-- ID of token after Dot
-- If Symbol = EOF_Token, this is the start symbol accept
-- production; don't need a kernel with dot after EOF.
if (Dot_ID = Symbol and Symbol /= Descriptor.EOI_ID) and then
not Has_Element (Find (Item.Prod, Next (Item.Dot), Goto_Set))
then
Goto_Set.Set.Insert
((Prod => Item.Prod,
Dot => Next (Item.Dot),
Lookaheads => new Token_ID_Set'(Item.Lookaheads.all)));
if Trace_Generate > Detail then
Ada.Text_IO.Put_Line ("LALR_Goto_Transitions 1 " & Image (Symbol, Descriptor));
Put (Grammar, Descriptor, Goto_Set);
end if;
end if;
if Dot_ID in Descriptor.First_Nonterminal .. Descriptor.Last_Nonterminal and then
First_Nonterm_Set (Dot_ID, Symbol)
then
-- Find the production(s) that create Dot_ID with first token Symbol
-- and put them in.
for Prod of Grammar loop
for RHS_2_I in Prod.RHSs.First_Index .. Prod.RHSs.Last_Index loop
declare
P_ID : constant Production_ID := (Prod.LHS, RHS_2_I);
Dot_2 : constant Token_ID_Arrays.Cursor := Prod.RHSs (RHS_2_I).Tokens.First;
begin
if (Dot_ID = Prod.LHS or First_Nonterm_Set (Dot_ID, Prod.LHS)) and
(Has_Element (Dot_2) and then Element (Dot_2) = Symbol)
then
if not Has_Element (Find (P_ID, Next (Dot_2), Goto_Set)) then
Goto_Set.Set.Insert
((Prod => P_ID,
Dot => Next (Dot_2),
Lookaheads => Null_Lookahead (Descriptor)));
-- else already in goto set
end if;
end if;
end;
end loop;
end loop;
if Trace_Generate > Detail then
Ada.Text_IO.Put_Line ("LALR_Goto_Transitions 2 " & Image (Symbol, Descriptor));
Put (Grammar, Descriptor, Goto_Set);
end if;
end if;
end if; -- item.dot /= null
end loop;
return Goto_Set;
end LALR_Goto_Transitions;
function LALR_Kernels
(Grammar : in WisiToken.Productions.Prod_Arrays.Vector;
First_Nonterm_Set : in Token_Array_Token_Set;
Descriptor : in WisiToken.Descriptor)
return LR1_Items.Item_Set_List
is
use all type Token_ID_Arrays.Cursor;
use all type Ada.Containers.Count_Type;
use LR1_Items;
First_State_Index : constant State_Index := 0;
Kernels : LR1_Items.Item_Set_List;
Kernel_Tree : LR1_Items.Item_Set_Trees.Tree; -- for fast find
States_To_Check : State_Index_Queues.Queue;
Checking_State : State_Index;
New_Item_Set : Item_Set :=
(Set => Item_Lists.To_List
((Prod => (Grammar.First_Index, 0),
Dot => Grammar (Grammar.First_Index).RHSs (0).Tokens.First,
Lookaheads => Null_Lookahead (Descriptor))),
Goto_List => <>,
Dot_IDs => <>,
State => First_State_Index);
Found_State : Unknown_State_Index;
begin
Kernels.Set_First (First_State_Index);
Add (New_Item_Set, Kernels, Kernel_Tree, Descriptor, Include_Lookaheads => False);
States_To_Check.Put (First_State_Index);
loop
exit when States_To_Check.Is_Empty;
Checking_State := States_To_Check.Get;
if Trace_Generate > Detail then
Ada.Text_IO.Put ("Checking ");
Put (Grammar, Descriptor, Kernels (Checking_State));
end if;
for Symbol in Descriptor.First_Terminal .. Descriptor.Last_Nonterminal loop
-- LALR_Goto_Transitions does _not_ ignore Symbol if it is not in
-- Item_Set.Dot_IDs, so we can't iterate on that here as we do in
-- LR1_Generate.
New_Item_Set := LALR_Goto_Transitions
(Kernels (Checking_State), Symbol, First_Nonterm_Set, Grammar, Descriptor);
if New_Item_Set.Set.Length > 0 then
Found_State := Find (New_Item_Set, Kernel_Tree, Match_Lookaheads => False);
if Found_State = Unknown_State then
New_Item_Set.State := Kernels.Last_Index + 1;
States_To_Check.Put (New_Item_Set.State);
Add (New_Item_Set, Kernels, Kernel_Tree, Descriptor, Include_Lookaheads => False);
if Trace_Generate > Detail then
Ada.Text_IO.Put_Line (" adding state" & Unknown_State_Index'Image (Kernels.Last_Index));
Ada.Text_IO.Put_Line
(" state" & Unknown_State_Index'Image (Checking_State) &
" adding goto on " & Image (Symbol, Descriptor) & " to state" &
Unknown_State_Index'Image (Kernels.Last_Index));
end if;
Kernels (Checking_State).Goto_List.Insert ((Symbol, Kernels.Last_Index));
else
-- If there's not already a goto entry between these two sets, create one.
if not Is_In ((Symbol, Found_State), Kernels (Checking_State).Goto_List) then
if Trace_Generate > Detail then
Ada.Text_IO.Put_Line
(" state" & Unknown_State_Index'Image (Checking_State) &
" adding goto on " & Image (Symbol, Descriptor) & " to state" &
Unknown_State_Index'Image (Found_State));
end if;
Kernels (Checking_State).Goto_List.Insert ((Symbol, Found_State));
end if;
end if;
end if;
end loop;
end loop;
if Trace_Generate > Detail then
Ada.Text_IO.New_Line;
end if;
return Kernels;
end LALR_Kernels;
-- Add a propagation entry (if it doesn't already exist) from From in
-- From_Set to To_Item.
procedure Add_Propagation
(From : in LR1_Items.Item;
From_Set : in LR1_Items.Item_Set;
To_Item : in LR1_Items.Item_Lists.Cursor;
Propagations : in out Item_Map_Lists.List)
is
use Item_Map_Lists;
use Item_List_Cursor_Lists;
use LR1_Items;
use LR1_Items.Item_Lists;
From_Cur : constant Item_Lists.Cursor := Find (From, From_Set);
From_Match : Item_Map_Lists.Cursor := Propagations.First;
To_Match : Item_List_Cursor_Lists.Cursor;
begin
Find_From :
loop
exit Find_From when not Has_Element (From_Match);
declare
Map : Item_Map renames Constant_Ref (From_Match);
begin
if From_Cur = Map.From then
To_Match := Map.To.First;
loop
exit when not Has_Element (To_Match);
declare
use all type SAL.Compare_Result;
Cur : Item_Lists.Cursor renames Constant_Ref (To_Match);
Test_Item : LR1_Items.Item renames Constant_Ref (Cur);
begin
if Equal = LR1_Items.Item_Compare (Test_Item, Constant_Ref (To_Item)) then
exit Find_From;
end if;
end;
Next (To_Match);
end loop;
exit Find_From;
end if;
end;
Next (From_Match);
end loop Find_From;
if not Has_Element (From_Match) then
Propagations.Append ((From_Cur, To_List (To_Item)));
elsif not Has_Element (To_Match) then
Ref (From_Match).To.Append (To_Item);
else
raise SAL.Programmer_Error with "Add_Propagation: unexpected case";
end if;
end Add_Propagation;
-- Calculate the lookaheads from Closure_Item for Source_Item.
-- Source_Item must be one of the kernel items in Source_Set.
-- Closure_Item must be an item in the lookahead closure of Source_Item for #.
--
-- Spontaneous lookaheads are put in Source_Item.Lookahead,
-- propagated lookaheads in Propagations.
--
-- Set Used_Tokens = True for all tokens in lookaheads.
procedure Generate_Lookahead_Info
(Source_Item : in LR1_Items.Item;
Source_Set : in LR1_Items.Item_Set;
Closure_Item : in LR1_Items.Item;
Propagations : in out Item_Map_Lists.List;
Descriptor : in WisiToken.Descriptor;
Grammar : in WisiToken.Productions.Prod_Arrays.Vector;
Kernels : in out LR1_Items.Item_Set_List)
is
use LR1_Items;
use LR1_Items.Item_Lists;
use Token_ID_Arrays;
Spontaneous_Count : Integer := 0;
begin
if Trace_Generate > Outline then
Ada.Text_IO.Put_Line (" closure_item: ");
LR1_Items.Put (Grammar, Descriptor, Closure_Item);
Ada.Text_IO.New_Line;
end if;
if not Has_Element (Closure_Item.Dot) then
return;
end if;
declare
ID : constant Token_ID := Element (Closure_Item.Dot);
Next_Dot : constant Token_ID_Arrays.Cursor := Next (Closure_Item.Dot);
Goto_State : constant Unknown_State_Index := LR1_Items.Goto_State (Source_Set, ID);
To_Item : constant Item_Lists.Cursor :=
(if Goto_State = Unknown_State then Item_Lists.No_Element
else LR1_Items.Find (Closure_Item.Prod, Next_Dot, Kernels (Goto_State)));
begin
if Closure_Item.Lookaheads (Descriptor.Last_Lookahead) and Has_Element (To_Item) then
Add_Propagation
(From => Source_Item,
From_Set => Source_Set,
To_Item => To_Item,
Propagations => Propagations);
end if;
if Has_Element (To_Item) then
if Trace_Generate > Outline then
Spontaneous_Count := Spontaneous_Count + 1;
Ada.Text_IO.Put_Line (" spontaneous: " & Lookahead_Image (Closure_Item.Lookaheads.all, Descriptor));
end if;
LR1_Items.Include (Ref (To_Item), Closure_Item.Lookaheads.all, Descriptor);
end if;
end;
end Generate_Lookahead_Info;
procedure Propagate_Lookaheads
(List : in Item_Map_Lists.List;
Descriptor : in WisiToken.Descriptor)
is
-- In List, update all To lookaheads from From lookaheads,
-- recursively.
use LR1_Items.Item_Lists;
More_To_Check : Boolean := True;
Added_One : Boolean;
begin
while More_To_Check loop
More_To_Check := False;
for Mapping of List loop
for Copy of Mapping.To loop
LR1_Items.Include (Ref (Copy), Constant_Ref (Mapping.From).Lookaheads.all, Added_One, Descriptor);
More_To_Check := More_To_Check or Added_One;
end loop;
end loop;
end loop;
end Propagate_Lookaheads;
-- Calculate the LALR(1) lookaheads for Grammar.
-- Kernels should be the sets of LR(0) kernels on input, and will
-- become the set of LALR(1) kernels on output.
procedure Fill_In_Lookaheads
(Grammar : in WisiToken.Productions.Prod_Arrays.Vector;
Has_Empty_Production : in Token_ID_Set;
First_Terminal_Sequence : in Token_Sequence_Arrays.Vector;
Kernels : in out LR1_Items.Item_Set_List;
Descriptor : in WisiToken.Descriptor)
is
pragma Warnings (Off, """Kernel_Item_Set"" is not modified, could be declared constant");
-- WORKAROUND: GNAT GPL 2018 complains Kernel_Item_Set could be a constant, but
-- when we declare that, it complains the target of the assignment of
-- .Prod, .Dot below must be a variable.
Kernel_Item_Set : LR1_Items.Item_Set := -- used for temporary arg to Closure
(Set => LR1_Items.Item_Lists.To_List
((Prod => <>,
Dot => <>,
Lookaheads => Propagate_Lookahead (Descriptor))),
Goto_List => <>,
Dot_IDs => <>,
State => <>);
Closure : LR1_Items.Item_Set;
Propagation_List : Item_Map_Lists.List;
begin
for Kernel of Kernels loop
if Trace_Generate > Outline then
Ada.Text_IO.Put ("Adding lookaheads for ");
LR1_Items.Put (Grammar, Descriptor, Kernel);
end if;
for Kernel_Item of Kernel.Set loop
Kernel_Item_Set.Set (Kernel_Item_Set.Set.First).Prod := Kernel_Item.Prod;
Kernel_Item_Set.Set (Kernel_Item_Set.Set.First).Dot := Kernel_Item.Dot;
Closure := LR1_Items.Closure
(Kernel_Item_Set, Has_Empty_Production, First_Terminal_Sequence, Grammar, Descriptor);
for Closure_Item of Closure.Set loop
Generate_Lookahead_Info
(Kernel_Item, Kernel, Closure_Item, Propagation_List, Descriptor, Grammar, Kernels);
end loop;
end loop;
end loop;
if Trace_Generate > Outline then
Ada.Text_IO.New_Line;
Ada.Text_IO.Put_Line ("Propagations:");
Put (Grammar, Descriptor, Propagation_List);
Ada.Text_IO.New_Line;
end if;
Propagate_Lookaheads (Propagation_List, Descriptor);
end Fill_In_Lookaheads;
-- Add actions for all Kernels to Table.
procedure Add_Actions
(Kernels : in LR1_Items.Item_Set_List;
Grammar : in WisiToken.Productions.Prod_Arrays.Vector;
Has_Empty_Production : in Token_ID_Set;
First_Nonterm_Set : in Token_Array_Token_Set;
First_Terminal_Sequence : in Token_Sequence_Arrays.Vector;
Conflict_Counts : out Conflict_Count_Lists.List;
Conflicts : out Conflict_Lists.List;
Table : in out Parse_Table;
Descriptor : in WisiToken.Descriptor)
is
Closure : LR1_Items.Item_Set;
begin
for Kernel of Kernels loop
-- IMPROVEME: there are three "closure" computations that could
-- probably be refactored to save computation; in
-- LALR_Goto_Transitions, Fill_In_Lookaheads, and here.
Closure := LR1_Items.Closure (Kernel, Has_Empty_Production, First_Terminal_Sequence, Grammar, Descriptor);
Add_Actions
(Closure, Table, Grammar, Has_Empty_Production, First_Nonterm_Set,
Conflict_Counts, Conflicts, Descriptor);
end loop;
if Trace_Generate > Detail then
Ada.Text_IO.New_Line;
end if;
end Add_Actions;
function Generate
(Grammar : in WisiToken.Productions.Prod_Arrays.Vector;
Descriptor : in WisiToken.Descriptor;
Known_Conflicts : in Conflict_Lists.List := Conflict_Lists.Empty_List;
McKenzie_Param : in McKenzie_Param_Type := Default_McKenzie_Param;
Put_Parse_Table : in Boolean := False;
Include_Extra : in Boolean := False;
Ignore_Conflicts : in Boolean := False;
Partial_Recursion : in Boolean := True)
return Parse_Table_Ptr
is
use all type Ada.Containers.Count_Type;
Ignore_Unused_Tokens : constant Boolean := WisiToken.Trace_Generate > Detail;
Ignore_Unknown_Conflicts : constant Boolean := Ignore_Conflicts or WisiToken.Trace_Generate > Detail;
Unused_Tokens : constant Boolean := WisiToken.Generate.Check_Unused_Tokens (Descriptor, Grammar);
Table : Parse_Table_Ptr;
Has_Empty_Production : constant Token_ID_Set := WisiToken.Generate.Has_Empty_Production (Grammar);
Recursions : constant WisiToken.Generate.Recursions :=
(if Partial_Recursion
then WisiToken.Generate.Compute_Partial_Recursion (Grammar)
else WisiToken.Generate.Compute_Full_Recursion (Grammar));
Minimal_Terminal_Sequences : constant Minimal_Sequence_Array :=
Compute_Minimal_Terminal_Sequences (Descriptor, Grammar, Recursions);
Minimal_Terminal_First : constant Token_Array_Token_ID :=
Compute_Minimal_Terminal_First (Descriptor, Minimal_Terminal_Sequences);
First_Nonterm_Set : constant Token_Array_Token_Set := WisiToken.Generate.First
(Grammar, Has_Empty_Production, Descriptor.First_Terminal);
First_Terminal_Sequence : constant Token_Sequence_Arrays.Vector :=
WisiToken.Generate.To_Terminal_Sequence_Array (First_Nonterm_Set, Descriptor);
Kernels : LR1_Items.Item_Set_List := LALR_Kernels (Grammar, First_Nonterm_Set, Descriptor);
Conflict_Counts : Conflict_Count_Lists.List;
Unknown_Conflicts : Conflict_Lists.List;
Known_Conflicts_Edit : Conflict_Lists.List := Known_Conflicts;
begin
WisiToken.Generate.Error := False; -- necessary in unit tests; some previous test might have encountered an error.
Fill_In_Lookaheads (Grammar, Has_Empty_Production, First_Terminal_Sequence, Kernels, Descriptor);
if Unused_Tokens then
WisiToken.Generate.Error := not Ignore_Unused_Tokens;
Ada.Text_IO.New_Line;
end if;
if Trace_Generate > Detail then
Ada.Text_IO.New_Line;
Ada.Text_IO.Put_Line ("LR(1) Kernels:");
LR1_Items.Put (Grammar, Descriptor, Kernels, Show_Lookaheads => True);
end if;
Table := new Parse_Table
(State_First => Kernels.First_Index,
State_Last => Kernels.Last_Index,
First_Terminal => Descriptor.First_Terminal,
Last_Terminal => Descriptor.Last_Terminal,
First_Nonterminal => Descriptor.First_Nonterminal,
Last_Nonterminal => Descriptor.Last_Nonterminal);
if McKenzie_Param = Default_McKenzie_Param then
-- Descriminants in Default are wrong
Table.McKenzie_Param :=
(First_Terminal => Descriptor.First_Terminal,
Last_Terminal => Descriptor.Last_Terminal,
First_Nonterminal => Descriptor.First_Nonterminal,
Last_Nonterminal => Descriptor.Last_Nonterminal,
Insert => (others => 0),
Delete => (others => 0),
Push_Back => (others => 0),
Undo_Reduce => (others => 0),
Minimal_Complete_Cost_Delta => Default_McKenzie_Param.Minimal_Complete_Cost_Delta,
Fast_Forward => Default_McKenzie_Param.Fast_Forward,
Matching_Begin => Default_McKenzie_Param.Matching_Begin,
Ignore_Check_Fail => Default_McKenzie_Param.Ignore_Check_Fail,
Task_Count => Default_McKenzie_Param.Task_Count,
Check_Limit => Default_McKenzie_Param.Check_Limit,
Check_Delta_Limit => Default_McKenzie_Param.Check_Delta_Limit,
Enqueue_Limit => Default_McKenzie_Param.Enqueue_Limit);
else
Table.McKenzie_Param := McKenzie_Param;
end if;
Add_Actions
(Kernels, Grammar, Has_Empty_Production, First_Nonterm_Set, First_Terminal_Sequence, Conflict_Counts,
Unknown_Conflicts, Table.all, Descriptor);
for State in Table.States'Range loop
if Trace_Generate > Extra then
Ada.Text_IO.Put_Line ("Set_Minimal_Complete_Actions:" & State_Index'Image (State));
end if;
WisiToken.Generate.LR.Set_Minimal_Complete_Actions
(Table.States (State), Kernels (State), Descriptor, Grammar, Minimal_Terminal_Sequences,
Minimal_Terminal_First);
end loop;
if Put_Parse_Table then
WisiToken.Generate.LR.Put_Parse_Table
(Table, "LALR", Grammar, Recursions, Minimal_Terminal_Sequences, Kernels, Conflict_Counts, Descriptor,
Include_Extra);
end if;
Delete_Known (Unknown_Conflicts, Known_Conflicts_Edit);
if Unknown_Conflicts.Length > 0 then
Ada.Text_IO.Put_Line (Ada.Text_IO.Current_Error, "unknown conflicts:");
Put (Unknown_Conflicts, Ada.Text_IO.Current_Error, Descriptor);
Ada.Text_IO.New_Line (Ada.Text_IO.Current_Error);
WisiToken.Generate.Error := WisiToken.Generate.Error or not Ignore_Unknown_Conflicts;
end if;
if Known_Conflicts_Edit.Length > 0 then
Ada.Text_IO.Put_Line (Ada.Text_IO.Current_Error, "excess known conflicts:");
Put (Known_Conflicts_Edit, Ada.Text_IO.Current_Error, Descriptor);
Ada.Text_IO.New_Line (Ada.Text_IO.Current_Error);
WisiToken.Generate.Error := WisiToken.Generate.Error or not Ignore_Unknown_Conflicts;
end if;
return Table;
end Generate;
end WisiToken.Generate.LR.LALR_Generate;
|
package body Loop_Optimization1_Pkg is
type Unconstrained_Array_Type
is array (Index_Type range <>) of Element_Type;
procedure Local (UA : in out Unconstrained_Array_Type) is
begin
null;
end;
procedure Proc (CA : in out Constrained_Array_Type) is
begin
Local (Unconstrained_Array_Type (CA));
end;
end Loop_Optimization1_Pkg;
|
-- { dg-do run }
with Init9; use Init9;
with Ada.Numerics; use Ada.Numerics;
with Text_IO; use Text_IO;
with Dump;
procedure T9 is
Local_R1 : R1;
Local_R2 : R2;
begin
Local_R1.F := My_R1.F + 1.0;
Put ("Local_R1 :");
Dump (Local_R1'Address, R1'Max_Size_In_Storage_Elements);
New_Line;
-- { dg-output "Local_R1 : 8c 16 22 aa fd 90 10 40.*\n" }
Local_R2.F := My_R2.F + 1.0;
Put ("Local_R2 :");
Dump (Local_R2'Address, R2'Max_Size_In_Storage_Elements);
New_Line;
-- { dg-output "Local_R2 : 40 10 90 fd aa 22 16 8c.*\n" }
Local_R1.F := Pi;
Put ("Local_R1 :");
Dump (Local_R1'Address, R1'Max_Size_In_Storage_Elements);
New_Line;
-- { dg-output "Local_R1 : 18 2d 44 54 fb 21 09 40.*\n" }
Local_R2.F := Pi;
Put ("Local_R2 :");
Dump (Local_R2'Address, R2'Max_Size_In_Storage_Elements);
New_Line;
-- { dg-output "Local_R2 : 40 09 21 fb 54 44 2d 18.*\n" }
Local_R1.F := Local_R1.F + 1.0;
Put ("Local_R1 :");
Dump (Local_R1'Address, R1'Max_Size_In_Storage_Elements);
New_Line;
-- { dg-output "Local_R1 : 8c 16 22 aa fd 90 10 40.*\n" }
Local_R2.F := Local_R2.F + 1.0;
Put ("Local_R2 :");
Dump (Local_R2'Address, R2'Max_Size_In_Storage_Elements);
New_Line;
-- { dg-output "Local_R2 : 40 10 90 fd aa 22 16 8c.*\n" }
end;
|
---------------------------------------------------------------------------------
-- Copyright 2004-2005 © Luke A. Guest
--
-- This code is to be used for tutorial purposes only.
-- You may not redistribute this code in any form without my express permission.
---------------------------------------------------------------------------------
package body Geometrical_Methods is
function CollisionDetected(P : in Plane.Object; V : in Vector3.Object) return Boolean is
begin
-- Equation of a plane in vector notation:
-- Pn . V = d
-- Where:
-- Pn = Plane normal
-- V = Vector to test against
-- d = Distance of the plane from the origin along the plane's normal.
if Vector3.Dot(V, P.Normal) - P.Distance = 0.0 then
return True;
end if;
return False;
end CollisionDetected;
function CollisionDetected(P : in Plane.Object; L : in Line_Segment.Object) return Boolean is
-- Equation of a plane in vector notation:
-- Pn . V = d
-- Where:
-- Pn = Plane normal
-- V = Vector to test against
-- d = Distance of the plane from the origin along the plane's normal.
-- This seems to work no matter if PlaneD is added or subtracted from the dot products.
EndPoint1 : Float := Vector3.Dot(L.StartPoint, P.Normal) - P.Distance;
EndPoint2 : Float := Vector3.Dot(L.EndPoint, P.Normal) - P.Distance;
begin
--Put_Line("EndPoint1: " & Float'Image(EndPoint1) & " EndPoint2: " & Float'Image(EndPoint2));
if EndPoint1 * EndPoint2 < 0.0 then
return True;
end if;
return False;
end CollisionDetected;
-- This is the same equation as the closest point on a line.
-- q' = q + (distance - q.n)n
function ClosestPoint(V : in Vector3.Object; P : in Plane.Object) return Vector3.Object is
Temp : Float := P.Distance - Vector3.Dot(V, P.Normal);
Prod : Vector3.Object := P.Normal * Temp;
begin
return V + Prod;
end ClosestPoint;
end Geometrical_Methods;
|
-- This file is generated by SWIG. Please do not modify by hand.
--
with Interfaces.C;
with Interfaces.C;
with Interfaces.C.Pointers;
package xcb.xcb_list_properties_cookie_t is
-- Item
--
type Item is record
sequence : aliased Interfaces.C.unsigned;
end record;
-- Item_Array
--
type Item_Array is
array
(Interfaces.C
.size_t range <>) of aliased xcb.xcb_list_properties_cookie_t
.Item;
-- Pointer
--
package C_Pointers is new Interfaces.C.Pointers
(Index => Interfaces.C.size_t,
Element => xcb.xcb_list_properties_cookie_t.Item,
Element_Array => xcb.xcb_list_properties_cookie_t.Item_Array,
Default_Terminator => (others => <>));
subtype Pointer is C_Pointers.Pointer;
-- Pointer_Array
--
type Pointer_Array is
array
(Interfaces.C
.size_t range <>) of aliased xcb.xcb_list_properties_cookie_t
.Pointer;
-- Pointer_Pointer
--
package C_Pointer_Pointers is new Interfaces.C.Pointers
(Index => Interfaces.C.size_t,
Element => xcb.xcb_list_properties_cookie_t.Pointer,
Element_Array => xcb.xcb_list_properties_cookie_t.Pointer_Array,
Default_Terminator => null);
subtype Pointer_Pointer is C_Pointer_Pointers.Pointer;
end xcb.xcb_list_properties_cookie_t;
|
pragma Ada_2005;
pragma Style_Checks (Off);
with Interfaces.C; use Interfaces.C;
package wmmintrin_h is
-- Copyright (C) 2008-2017 Free Software Foundation, Inc.
-- This file is part of GCC.
-- GCC 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, or (at your option)
-- any later version.
-- GCC 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.
-- 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/>.
-- Implemented from the specification included in the Intel C++ Compiler
-- User Guide and Reference, version 10.1.
-- We need definitions from the SSE2 header file.
-- AES
-- Performs 1 round of AES decryption of the first m128i using
-- the second m128i as a round key.
-- skipped func _mm_aesdec_si128
-- Performs the last round of AES decryption of the first m128i
-- using the second m128i as a round key.
-- skipped func _mm_aesdeclast_si128
-- Performs 1 round of AES encryption of the first m128i using
-- the second m128i as a round key.
-- skipped func _mm_aesenc_si128
-- Performs the last round of AES encryption of the first m128i
-- using the second m128i as a round key.
-- skipped func _mm_aesenclast_si128
-- Performs the InverseMixColumn operation on the source m128i
-- and stores the result into m128i destination.
-- skipped func _mm_aesimc_si128
-- Generates a m128i round key for the input m128i AES cipher key and
-- byte round constant. The second parameter must be a compile time
-- constant.
-- PCLMUL
-- Performs carry-less integer multiplication of 64-bit halves of
-- 128-bit input operands. The third parameter inducates which 64-bit
-- haves of the input parameters v1 and v2 should be used. It must be
-- a compile time constant.
end wmmintrin_h;
|
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- S C N --
-- --
-- S p e c --
-- --
-- Copyright (C) 1992-2016, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING3. If not, go to --
-- http://www.gnu.org/licenses for a complete copy of the license. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- This package contains the lexical analyzer routines. This is used by the
-- compiler for scanning Ada source files.
with Casing; use Casing;
with Errout; use Errout;
with Scng;
with Style; use Style;
with Types; use Types;
package Scn is
procedure Initialize_Scanner
(Unit : Unit_Number_Type;
Index : Source_File_Index);
-- Initialize lexical scanner for scanning a new file. The caller has
-- completed the construction of the Units.Table entry for the specified
-- Unit and Index references the corresponding source file. A special
-- case is when Unit = No_Unit_Number, and Index corresponds to the
-- source index for reading the configuration pragma file.
function Determine_Token_Casing return Casing_Type;
-- Determines the casing style of the current token, which is either a
-- keyword or an identifier. See also package Casing.
procedure Post_Scan;
-- Create nodes for tokens: Char_Literal, Identifier, Real_Literal,
-- Integer_Literal, String_Literal and Operator_Symbol.
procedure Scan_Reserved_Identifier (Force_Msg : Boolean);
-- This procedure is called to convert the current token, which the caller
-- has checked is for a reserved word, to an equivalent identifier. This is
-- of course only used in error situations where the parser can detect that
-- a reserved word is being used as an identifier. An appropriate error
-- message, pointing to the token, is also issued if either this is the
-- first occurrence of misuse of this identifier, or if Force_Msg is True.
-------------
-- Scanner --
-------------
-- The scanner used by the compiler is an instantiation of the
-- generic package Scng with routines appropriate to the compiler
package Scanner is new Scng
(Post_Scan => Post_Scan,
Error_Msg => Error_Msg,
Error_Msg_S => Error_Msg_S,
Error_Msg_SC => Error_Msg_SC,
Error_Msg_SP => Error_Msg_SP,
Style => Style.Style_Inst);
procedure Scan renames Scanner.Scan;
-- Scan scans out the next token, and advances the scan state accordingly
-- (see package Scans for details). If the scan encounters an illegal
-- token, then an error message is issued pointing to the bad character,
-- and Scan returns a reasonable substitute token of some kind.
end Scn;
|
package Opt59_Pkg is
type Boolean_Vector is array (1 .. 8) of Boolean;
function Get_BV1 return Boolean_Vector;
function Get_BV2 return Boolean_Vector;
procedure Test (B : Boolean);
end Opt59_Pkg;
|
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- S Y S T E M . L I B M _ P R E F I X --
-- --
-- S p e c --
-- --
-- Copyright (C) 2015, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- --
-- --
-- --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- The is the Ada Cert Math specific version of s-libpre.ads.
package System.Libm_Prefix is
pragma Pure;
Prefix : constant String := "";
end System.Libm_Prefix;
|
--
-- Copyright (C) 2017, AdaCore
--
-- This spec has been automatically generated from M2Sxxx.svd
pragma Ada_2012;
pragma Style_Checks (Off);
with System;
-- No description provided for this peripheral
package Interfaces.SF2.System_Registers is
pragma Preelaborate;
pragma No_Elaboration_Code_All;
---------------
-- Registers --
---------------
-- No description provided for this register
type ESRAM_CR_Register is record
-- No description provided for this field
SW_CC_ESRAMFWREMAP : Boolean := False;
-- No description provided for this field
SW_CC_ESRAM1FWREMAP : Boolean := False;
-- unspecified
Reserved_2_31 : Interfaces.SF2.UInt30 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for ESRAM_CR_Register use record
SW_CC_ESRAMFWREMAP at 0 range 0 .. 0;
SW_CC_ESRAM1FWREMAP at 0 range 1 .. 1;
Reserved_2_31 at 0 range 2 .. 31;
end record;
-- ESRAM_MAX_LAT_CR_SW_MAX_LAT_ESRAM array element
subtype ESRAM_MAX_LAT_CR_SW_MAX_LAT_ESRAM_Element is Interfaces.SF2.UInt3;
-- ESRAM_MAX_LAT_CR_SW_MAX_LAT_ESRAM array
type ESRAM_MAX_LAT_CR_SW_MAX_LAT_ESRAM_Field_Array is array (0 .. 1)
of ESRAM_MAX_LAT_CR_SW_MAX_LAT_ESRAM_Element
with Component_Size => 3, Size => 6;
-- Type definition for ESRAM_MAX_LAT_CR_SW_MAX_LAT_ESRAM
type ESRAM_MAX_LAT_CR_SW_MAX_LAT_ESRAM_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- SW_MAX_LAT_ESRAM as a value
Val : Interfaces.SF2.UInt6;
when True =>
-- SW_MAX_LAT_ESRAM as an array
Arr : ESRAM_MAX_LAT_CR_SW_MAX_LAT_ESRAM_Field_Array;
end case;
end record
with Unchecked_Union, Size => 6;
for ESRAM_MAX_LAT_CR_SW_MAX_LAT_ESRAM_Field use record
Val at 0 range 0 .. 5;
Arr at 0 range 0 .. 5;
end record;
-- No description provided for this register
type ESRAM_MAX_LAT_CR_Register is record
-- No description provided for this field
SW_MAX_LAT_ESRAM : ESRAM_MAX_LAT_CR_SW_MAX_LAT_ESRAM_Field :=
(As_Array => False, Val => 16#0#);
-- unspecified
Reserved_6_31 : Interfaces.SF2.UInt26 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for ESRAM_MAX_LAT_CR_Register use record
SW_MAX_LAT_ESRAM at 0 range 0 .. 5;
Reserved_6_31 at 0 range 6 .. 31;
end record;
-- No description provided for this register
type DDR_CR_Register is record
-- No description provided for this field
SW_CC_DDRFWREMAP : Boolean := False;
-- unspecified
Reserved_1_31 : Interfaces.SF2.UInt31 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for DDR_CR_Register use record
SW_CC_DDRFWREMAP at 0 range 0 .. 0;
Reserved_1_31 at 0 range 1 .. 31;
end record;
subtype ENVM_CR_SW_ENVMREMAPSIZE_Field is Interfaces.SF2.UInt5;
subtype ENVM_CR_NV_FREQRNG_Field is Interfaces.SF2.Byte;
-- ENVM_CR_NV_DPD array
type ENVM_CR_NV_DPD_Field_Array is array (0 .. 1) of Boolean
with Component_Size => 1, Size => 2;
-- Type definition for ENVM_CR_NV_DPD
type ENVM_CR_NV_DPD_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- NV_DPD as a value
Val : Interfaces.SF2.UInt2;
when True =>
-- NV_DPD as an array
Arr : ENVM_CR_NV_DPD_Field_Array;
end case;
end record
with Unchecked_Union, Size => 2;
for ENVM_CR_NV_DPD_Field use record
Val at 0 range 0 .. 1;
Arr at 0 range 0 .. 1;
end record;
-- No description provided for this register
type ENVM_CR_Register is record
-- No description provided for this field
SW_ENVMREMAPSIZE : ENVM_CR_SW_ENVMREMAPSIZE_Field := 16#0#;
-- No description provided for this field
NV_FREQRNG : ENVM_CR_NV_FREQRNG_Field := 16#0#;
-- No description provided for this field
NV_DPD : ENVM_CR_NV_DPD_Field :=
(As_Array => False, Val => 16#0#);
-- No description provided for this field
ENVM_PERSIST : Boolean := False;
-- No description provided for this field
ENVM_SENSE_ON : Boolean := False;
-- unspecified
Reserved_17_31 : Interfaces.SF2.UInt15 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for ENVM_CR_Register use record
SW_ENVMREMAPSIZE at 0 range 0 .. 4;
NV_FREQRNG at 0 range 5 .. 12;
NV_DPD at 0 range 13 .. 14;
ENVM_PERSIST at 0 range 15 .. 15;
ENVM_SENSE_ON at 0 range 16 .. 16;
Reserved_17_31 at 0 range 17 .. 31;
end record;
subtype ENVM_REMAP_BASE_CR_SW_ENVMREMAPBASE_Field is Interfaces.SF2.UInt18;
-- No description provided for this register
type ENVM_REMAP_BASE_CR_Register is record
-- No description provided for this field
SW_ENVMREMAPENABLE : Boolean := False;
-- No description provided for this field
SW_ENVMREMAPBASE : ENVM_REMAP_BASE_CR_SW_ENVMREMAPBASE_Field := 16#0#;
-- unspecified
Reserved_19_31 : Interfaces.SF2.UInt13 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for ENVM_REMAP_BASE_CR_Register use record
SW_ENVMREMAPENABLE at 0 range 0 .. 0;
SW_ENVMREMAPBASE at 0 range 1 .. 18;
Reserved_19_31 at 0 range 19 .. 31;
end record;
subtype ENVM_REMAP_FAB_CR_SW_ENVMFABREMAPBASE_Field is
Interfaces.SF2.UInt18;
-- No description provided for this register
type ENVM_REMAP_FAB_CR_Register is record
-- No description provided for this field
SW_ENVMFABREMAPENABLE : Boolean := False;
-- No description provided for this field
SW_ENVMFABREMAPBASE : ENVM_REMAP_FAB_CR_SW_ENVMFABREMAPBASE_Field :=
16#0#;
-- unspecified
Reserved_19_31 : Interfaces.SF2.UInt13 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for ENVM_REMAP_FAB_CR_Register use record
SW_ENVMFABREMAPENABLE at 0 range 0 .. 0;
SW_ENVMFABREMAPBASE at 0 range 1 .. 18;
Reserved_19_31 at 0 range 19 .. 31;
end record;
-- No description provided for this register
type CC_CR_Register is record
-- No description provided for this field
CC_CACHE_ENB : Boolean := False;
-- No description provided for this field
CC_SBUS_WR_MODE : Boolean := False;
-- No description provided for this field
CC_CACHE_LOCK : Boolean := False;
-- unspecified
Reserved_3_31 : Interfaces.SF2.UInt29 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CC_CR_Register use record
CC_CACHE_ENB at 0 range 0 .. 0;
CC_SBUS_WR_MODE at 0 range 1 .. 1;
CC_CACHE_LOCK at 0 range 2 .. 2;
Reserved_3_31 at 0 range 3 .. 31;
end record;
subtype CC_REGION_CR_CC_CACHE_REGION_Field is Interfaces.SF2.UInt4;
-- No description provided for this register
type CC_REGION_CR_Register is record
-- No description provided for this field
CC_CACHE_REGION : CC_REGION_CR_CC_CACHE_REGION_Field := 16#0#;
-- unspecified
Reserved_4_31 : Interfaces.SF2.UInt28 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CC_REGION_CR_Register use record
CC_CACHE_REGION at 0 range 0 .. 3;
Reserved_4_31 at 0 range 4 .. 31;
end record;
subtype CC_LOCK_BASE_ADDR_CR_CC_LOCK_BASEADD_Field is Interfaces.SF2.UInt19;
-- No description provided for this register
type CC_LOCK_BASE_ADDR_CR_Register is record
-- No description provided for this field
CC_LOCK_BASEADD : CC_LOCK_BASE_ADDR_CR_CC_LOCK_BASEADD_Field := 16#0#;
-- unspecified
Reserved_19_31 : Interfaces.SF2.UInt13 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CC_LOCK_BASE_ADDR_CR_Register use record
CC_LOCK_BASEADD at 0 range 0 .. 18;
Reserved_19_31 at 0 range 19 .. 31;
end record;
subtype CC_FLUSH_INDX_CR_CC_FLUSH_INDEX_Field is Interfaces.SF2.UInt6;
-- No description provided for this register
type CC_FLUSH_INDX_CR_Register is record
-- No description provided for this field
CC_FLUSH_INDEX : CC_FLUSH_INDX_CR_CC_FLUSH_INDEX_Field := 16#0#;
-- unspecified
Reserved_6_31 : Interfaces.SF2.UInt26 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CC_FLUSH_INDX_CR_Register use record
CC_FLUSH_INDEX at 0 range 0 .. 5;
Reserved_6_31 at 0 range 6 .. 31;
end record;
subtype DDRB_BUF_TIMER_CR_DDRB_TIMER_Field is Interfaces.SF2.UInt10;
-- No description provided for this register
type DDRB_BUF_TIMER_CR_Register is record
-- No description provided for this field
DDRB_TIMER : DDRB_BUF_TIMER_CR_DDRB_TIMER_Field := 16#0#;
-- unspecified
Reserved_10_31 : Interfaces.SF2.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for DDRB_BUF_TIMER_CR_Register use record
DDRB_TIMER at 0 range 0 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
subtype DDRB_NB_ADDR_CR_DDRB_NB_ADDR_Field is Interfaces.SF2.UInt16;
-- No description provided for this register
type DDRB_NB_ADDR_CR_Register is record
-- No description provided for this field
DDRB_NB_ADDR : DDRB_NB_ADDR_CR_DDRB_NB_ADDR_Field := 16#0#;
-- unspecified
Reserved_16_31 : Interfaces.SF2.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for DDRB_NB_ADDR_CR_Register use record
DDRB_NB_ADDR at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype DDRB_NB_SIZE_CR_DDRB_NB_SZ_Field is Interfaces.SF2.UInt4;
-- No description provided for this register
type DDRB_NB_SIZE_CR_Register is record
-- No description provided for this field
DDRB_NB_SZ : DDRB_NB_SIZE_CR_DDRB_NB_SZ_Field := 16#0#;
-- unspecified
Reserved_4_31 : Interfaces.SF2.UInt28 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for DDRB_NB_SIZE_CR_Register use record
DDRB_NB_SZ at 0 range 0 .. 3;
Reserved_4_31 at 0 range 4 .. 31;
end record;
subtype DDRB_CR_DDR_DS_MAP_Field is Interfaces.SF2.UInt4;
subtype DDRB_CR_DDR_HPD_MAP_Field is Interfaces.SF2.UInt4;
subtype DDRB_CR_DDR_SW_MAP_Field is Interfaces.SF2.UInt4;
subtype DDRB_CR_DDR_IDC_MAP_Field is Interfaces.SF2.UInt4;
-- No description provided for this register
type DDRB_CR_Register is record
-- No description provided for this field
DDRB_DS_WEN : Boolean := False;
-- No description provided for this field
DDRB_DS_REN : Boolean := False;
-- No description provided for this field
DDRB_HPD_WEN : Boolean := False;
-- No description provided for this field
DDRB_HPD_REN : Boolean := False;
-- No description provided for this field
DDRB_SW_WEN : Boolean := False;
-- No description provided for this field
DDRB_SW_REN : Boolean := False;
-- No description provided for this field
DDRB_IDC_EN : Boolean := False;
-- No description provided for this field
DDRB_BUF_SZ : Boolean := False;
-- No description provided for this field
DDR_DS_MAP : DDRB_CR_DDR_DS_MAP_Field := 16#0#;
-- No description provided for this field
DDR_HPD_MAP : DDRB_CR_DDR_HPD_MAP_Field := 16#0#;
-- No description provided for this field
DDR_SW_MAP : DDRB_CR_DDR_SW_MAP_Field := 16#0#;
-- No description provided for this field
DDR_IDC_MAP : DDRB_CR_DDR_IDC_MAP_Field := 16#0#;
-- unspecified
Reserved_24_31 : Interfaces.SF2.Byte := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for DDRB_CR_Register use record
DDRB_DS_WEN at 0 range 0 .. 0;
DDRB_DS_REN at 0 range 1 .. 1;
DDRB_HPD_WEN at 0 range 2 .. 2;
DDRB_HPD_REN at 0 range 3 .. 3;
DDRB_SW_WEN at 0 range 4 .. 4;
DDRB_SW_REN at 0 range 5 .. 5;
DDRB_IDC_EN at 0 range 6 .. 6;
DDRB_BUF_SZ at 0 range 7 .. 7;
DDR_DS_MAP at 0 range 8 .. 11;
DDR_HPD_MAP at 0 range 12 .. 15;
DDR_SW_MAP at 0 range 16 .. 19;
DDR_IDC_MAP at 0 range 20 .. 23;
Reserved_24_31 at 0 range 24 .. 31;
end record;
-- No description provided for this register
type EDAC_CR_Register is record
-- No description provided for this field
ESRAM0_EDAC_EN : Boolean := False;
-- No description provided for this field
ESRAM1_EDAC_EN : Boolean := False;
-- No description provided for this field
CC_EDAC_EN : Boolean := False;
-- No description provided for this field
MAC_EDAC_TX_EN : Boolean := False;
-- No description provided for this field
MAC_EDAC_RX_EN : Boolean := False;
-- No description provided for this field
USB_EDAC_EN : Boolean := False;
-- No description provided for this field
CAN_EDAC_EN : Boolean := False;
-- unspecified
Reserved_7_31 : Interfaces.SF2.UInt25 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for EDAC_CR_Register use record
ESRAM0_EDAC_EN at 0 range 0 .. 0;
ESRAM1_EDAC_EN at 0 range 1 .. 1;
CC_EDAC_EN at 0 range 2 .. 2;
MAC_EDAC_TX_EN at 0 range 3 .. 3;
MAC_EDAC_RX_EN at 0 range 4 .. 4;
USB_EDAC_EN at 0 range 5 .. 5;
CAN_EDAC_EN at 0 range 6 .. 6;
Reserved_7_31 at 0 range 7 .. 31;
end record;
subtype MASTER_WEIGHT0_CR_SW_WEIGHT_IC_Field is Interfaces.SF2.UInt5;
subtype MASTER_WEIGHT0_CR_SW_WEIGHT_S_Field is Interfaces.SF2.UInt5;
subtype MASTER_WEIGHT0_CR_SW_WEIGHT_GIGE_Field is Interfaces.SF2.UInt5;
subtype MASTER_WEIGHT0_CR_SW_WEIGHT_FAB_0_Field is Interfaces.SF2.UInt5;
subtype MASTER_WEIGHT0_CR_SW_WEIGHT_FAB_1_Field is Interfaces.SF2.UInt5;
subtype MASTER_WEIGHT0_CR_SW_WEIGHT_PDMA_Field is Interfaces.SF2.UInt5;
-- No description provided for this register
type MASTER_WEIGHT0_CR_Register is record
-- No description provided for this field
SW_WEIGHT_IC : MASTER_WEIGHT0_CR_SW_WEIGHT_IC_Field := 16#0#;
-- No description provided for this field
SW_WEIGHT_S : MASTER_WEIGHT0_CR_SW_WEIGHT_S_Field := 16#0#;
-- No description provided for this field
SW_WEIGHT_GIGE : MASTER_WEIGHT0_CR_SW_WEIGHT_GIGE_Field := 16#0#;
-- No description provided for this field
SW_WEIGHT_FAB_0 : MASTER_WEIGHT0_CR_SW_WEIGHT_FAB_0_Field := 16#0#;
-- No description provided for this field
SW_WEIGHT_FAB_1 : MASTER_WEIGHT0_CR_SW_WEIGHT_FAB_1_Field := 16#0#;
-- No description provided for this field
SW_WEIGHT_PDMA : MASTER_WEIGHT0_CR_SW_WEIGHT_PDMA_Field := 16#0#;
-- unspecified
Reserved_30_31 : Interfaces.SF2.UInt2 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for MASTER_WEIGHT0_CR_Register use record
SW_WEIGHT_IC at 0 range 0 .. 4;
SW_WEIGHT_S at 0 range 5 .. 9;
SW_WEIGHT_GIGE at 0 range 10 .. 14;
SW_WEIGHT_FAB_0 at 0 range 15 .. 19;
SW_WEIGHT_FAB_1 at 0 range 20 .. 24;
SW_WEIGHT_PDMA at 0 range 25 .. 29;
Reserved_30_31 at 0 range 30 .. 31;
end record;
subtype MASTER_WEIGHT1_CR_SW_WEIGHT_HPDMA_Field is Interfaces.SF2.UInt5;
subtype MASTER_WEIGHT1_CR_SW_WEIGHT_USB_Field is Interfaces.SF2.UInt5;
subtype MASTER_WEIGHT1_CR_SW_WEIGHT_G_Field is Interfaces.SF2.UInt5;
-- No description provided for this register
type MASTER_WEIGHT1_CR_Register is record
-- No description provided for this field
SW_WEIGHT_HPDMA : MASTER_WEIGHT1_CR_SW_WEIGHT_HPDMA_Field := 16#0#;
-- No description provided for this field
SW_WEIGHT_USB : MASTER_WEIGHT1_CR_SW_WEIGHT_USB_Field := 16#0#;
-- No description provided for this field
SW_WEIGHT_G : MASTER_WEIGHT1_CR_SW_WEIGHT_G_Field := 16#0#;
-- unspecified
Reserved_15_31 : Interfaces.SF2.UInt17 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for MASTER_WEIGHT1_CR_Register use record
SW_WEIGHT_HPDMA at 0 range 0 .. 4;
SW_WEIGHT_USB at 0 range 5 .. 9;
SW_WEIGHT_G at 0 range 10 .. 14;
Reserved_15_31 at 0 range 15 .. 31;
end record;
-- No description provided for this register
type SOFT_IRQ_CR_Register is record
-- No description provided for this field
SOFTINTERRUPT : Boolean := False;
-- unspecified
Reserved_1_31 : Interfaces.SF2.UInt31 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for SOFT_IRQ_CR_Register use record
SOFTINTERRUPT at 0 range 0 .. 0;
Reserved_1_31 at 0 range 1 .. 31;
end record;
-- No description provided for this register
type SOFT_RESET_CR_Register is record
-- No description provided for this field
ENVM0_SOFTRESET : Boolean := False;
-- No description provided for this field
ENVM1_SOFTRESET : Boolean := False;
-- No description provided for this field
ESRAM0_SOFTRESET : Boolean := False;
-- No description provided for this field
ESRAM1_SOFTRESET : Boolean := False;
-- No description provided for this field
MAC_SOFTRESET : Boolean := False;
-- No description provided for this field
PDMA_SOFTRESET : Boolean := False;
-- No description provided for this field
TIMER_SOFTRESET : Boolean := False;
-- No description provided for this field
MMUART0_SOFTRESET : Boolean := False;
-- No description provided for this field
MMUART1_SOFTRESET : Boolean := False;
-- No description provided for this field
G4SPI0_SOFTRESET : Boolean := False;
-- No description provided for this field
G4SPI1_SOFTRESET : Boolean := False;
-- No description provided for this field
I2C0_SOFTRESET : Boolean := False;
-- No description provided for this field
I2C1_SOFTRESET : Boolean := False;
-- No description provided for this field
CAN_SOFTRESET : Boolean := False;
-- No description provided for this field
USB_SOFTRESET : Boolean := False;
-- No description provided for this field
COMBLK_SOFTRESET : Boolean := False;
-- No description provided for this field
FPGA_SOFTRESET : Boolean := False;
-- No description provided for this field
HPDMA_SOFTRESET : Boolean := False;
-- No description provided for this field
FIC32_0_SOFTRESET : Boolean := False;
-- No description provided for this field
FIC32_1_SOFTRESET : Boolean := False;
-- No description provided for this field
MSS_GPIO_SOFTRESET : Boolean := False;
-- No description provided for this field
MSS_GPOUT_7_0_SOFT_RESET : Boolean := False;
-- No description provided for this field
MSS_GPOUT_15_8_SOFT_RESET : Boolean := False;
-- No description provided for this field
MSS_GPOUT_23_16_SOFT_RESET : Boolean := False;
-- No description provided for this field
MSS_GPOUT_31_24_SOFT_RESET : Boolean := False;
-- No description provided for this field
MDDR_CTLR_SOFTRESET : Boolean := False;
-- No description provided for this field
MDDR_FIC64_SOFTRESET : Boolean := False;
-- unspecified
Reserved_27_31 : Interfaces.SF2.UInt5 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for SOFT_RESET_CR_Register use record
ENVM0_SOFTRESET at 0 range 0 .. 0;
ENVM1_SOFTRESET at 0 range 1 .. 1;
ESRAM0_SOFTRESET at 0 range 2 .. 2;
ESRAM1_SOFTRESET at 0 range 3 .. 3;
MAC_SOFTRESET at 0 range 4 .. 4;
PDMA_SOFTRESET at 0 range 5 .. 5;
TIMER_SOFTRESET at 0 range 6 .. 6;
MMUART0_SOFTRESET at 0 range 7 .. 7;
MMUART1_SOFTRESET at 0 range 8 .. 8;
G4SPI0_SOFTRESET at 0 range 9 .. 9;
G4SPI1_SOFTRESET at 0 range 10 .. 10;
I2C0_SOFTRESET at 0 range 11 .. 11;
I2C1_SOFTRESET at 0 range 12 .. 12;
CAN_SOFTRESET at 0 range 13 .. 13;
USB_SOFTRESET at 0 range 14 .. 14;
COMBLK_SOFTRESET at 0 range 15 .. 15;
FPGA_SOFTRESET at 0 range 16 .. 16;
HPDMA_SOFTRESET at 0 range 17 .. 17;
FIC32_0_SOFTRESET at 0 range 18 .. 18;
FIC32_1_SOFTRESET at 0 range 19 .. 19;
MSS_GPIO_SOFTRESET at 0 range 20 .. 20;
MSS_GPOUT_7_0_SOFT_RESET at 0 range 21 .. 21;
MSS_GPOUT_15_8_SOFT_RESET at 0 range 22 .. 22;
MSS_GPOUT_23_16_SOFT_RESET at 0 range 23 .. 23;
MSS_GPOUT_31_24_SOFT_RESET at 0 range 24 .. 24;
MDDR_CTLR_SOFTRESET at 0 range 25 .. 25;
MDDR_FIC64_SOFTRESET at 0 range 26 .. 26;
Reserved_27_31 at 0 range 27 .. 31;
end record;
subtype M3_CR_STCALIB_25_0_Field is Interfaces.SF2.UInt26;
subtype M3_CR_STCLK_DIVISOR_Field is Interfaces.SF2.UInt2;
-- No description provided for this register
type M3_CR_Register is record
-- No description provided for this field
STCALIB_25_0 : M3_CR_STCALIB_25_0_Field := 16#0#;
-- No description provided for this field
STCLK_DIVISOR : M3_CR_STCLK_DIVISOR_Field := 16#0#;
-- No description provided for this field
M3_MPU_DISABLE : Boolean := False;
-- unspecified
Reserved_29_31 : Interfaces.SF2.UInt3 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for M3_CR_Register use record
STCALIB_25_0 at 0 range 0 .. 25;
STCLK_DIVISOR at 0 range 26 .. 27;
M3_MPU_DISABLE at 0 range 28 .. 28;
Reserved_29_31 at 0 range 29 .. 31;
end record;
subtype FAB_IF_CR_SW_FIC_REG_SEL_Field is Interfaces.SF2.UInt6;
-- No description provided for this register
type FAB_IF_CR_Register is record
-- No description provided for this field
FAB0_AHB_BYPASS : Boolean := False;
-- No description provided for this field
FAB1_AHB_BYPASS : Boolean := False;
-- No description provided for this field
FAB0_AHB_MODE : Boolean := False;
-- No description provided for this field
FAB1_AHB_MODE : Boolean := False;
-- No description provided for this field
SW_FIC_REG_SEL : FAB_IF_CR_SW_FIC_REG_SEL_Field := 16#0#;
-- unspecified
Reserved_10_31 : Interfaces.SF2.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for FAB_IF_CR_Register use record
FAB0_AHB_BYPASS at 0 range 0 .. 0;
FAB1_AHB_BYPASS at 0 range 1 .. 1;
FAB0_AHB_MODE at 0 range 2 .. 2;
FAB1_AHB_MODE at 0 range 3 .. 3;
SW_FIC_REG_SEL at 0 range 4 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
-- No description provided for this register
type LOOPBACK_CR_Register is record
-- No description provided for this field
MSS_MMUARTLOOPBACK : Boolean := False;
-- No description provided for this field
MSS_SPILOOPBACK : Boolean := False;
-- No description provided for this field
MSS_I2CLOOPBACK : Boolean := False;
-- No description provided for this field
MSS_GPIOLOOPBACK : Boolean := False;
-- unspecified
Reserved_4_31 : Interfaces.SF2.UInt28 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for LOOPBACK_CR_Register use record
MSS_MMUARTLOOPBACK at 0 range 0 .. 0;
MSS_SPILOOPBACK at 0 range 1 .. 1;
MSS_I2CLOOPBACK at 0 range 2 .. 2;
MSS_GPIOLOOPBACK at 0 range 3 .. 3;
Reserved_4_31 at 0 range 4 .. 31;
end record;
-- No description provided for this register
type GPIO_SYSRESET_SEL_CR_Register is record
-- No description provided for this field
MSS_GPIO_7_0_SYSRESET_SEL : Boolean := False;
-- No description provided for this field
MSS_GPIO_15_8_SYSRESET_SEL : Boolean := False;
-- No description provided for this field
MSS_GPIO_23_16_SYSRESET_SEL : Boolean := False;
-- No description provided for this field
MSS_GPIO_31_24_SYSRESET_SEL : Boolean := False;
-- unspecified
Reserved_4_31 : Interfaces.SF2.UInt28 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for GPIO_SYSRESET_SEL_CR_Register use record
MSS_GPIO_7_0_SYSRESET_SEL at 0 range 0 .. 0;
MSS_GPIO_15_8_SYSRESET_SEL at 0 range 1 .. 1;
MSS_GPIO_23_16_SYSRESET_SEL at 0 range 2 .. 2;
MSS_GPIO_31_24_SYSRESET_SEL at 0 range 3 .. 3;
Reserved_4_31 at 0 range 4 .. 31;
end record;
-- No description provided for this register
type MDDR_CR_Register is record
-- No description provided for this field
MDDR_CONFIG_LOCAL : Boolean := False;
-- No description provided for this field
SDR_MODE : Boolean := False;
-- No description provided for this field
F_AXI_AHB_MODE : Boolean := False;
-- No description provided for this field
PHY_SELF_REF_EN : Boolean := False;
-- unspecified
Reserved_4_31 : Interfaces.SF2.UInt28 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for MDDR_CR_Register use record
MDDR_CONFIG_LOCAL at 0 range 0 .. 0;
SDR_MODE at 0 range 1 .. 1;
F_AXI_AHB_MODE at 0 range 2 .. 2;
PHY_SELF_REF_EN at 0 range 3 .. 3;
Reserved_4_31 at 0 range 4 .. 31;
end record;
subtype USB_IO_INPUT_SEL_CR_USB_IO_INPUT_SEL_Field is Interfaces.SF2.UInt2;
-- No description provided for this register
type USB_IO_INPUT_SEL_CR_Register is record
-- No description provided for this field
USB_IO_INPUT_SEL : USB_IO_INPUT_SEL_CR_USB_IO_INPUT_SEL_Field := 16#0#;
-- unspecified
Reserved_2_31 : Interfaces.SF2.UInt30 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for USB_IO_INPUT_SEL_CR_Register use record
USB_IO_INPUT_SEL at 0 range 0 .. 1;
Reserved_2_31 at 0 range 2 .. 31;
end record;
-- No description provided for this register
type PERIPH_CLK_MUX_SEL_CR_Register is record
-- No description provided for this field
SPI0_SCK_FAB_SEL : Boolean := False;
-- No description provided for this field
SPI1_SCK_FAB_SEL : Boolean := False;
-- No description provided for this field
TRACECLK_DIV2_SEL : Boolean := False;
-- unspecified
Reserved_3_31 : Interfaces.SF2.UInt29 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for PERIPH_CLK_MUX_SEL_CR_Register use record
SPI0_SCK_FAB_SEL at 0 range 0 .. 0;
SPI1_SCK_FAB_SEL at 0 range 1 .. 1;
TRACECLK_DIV2_SEL at 0 range 2 .. 2;
Reserved_3_31 at 0 range 3 .. 31;
end record;
-- No description provided for this register
type WDOG_CR_Register is record
-- No description provided for this field
G4_TESTWDOGENABLE : Boolean := False;
-- No description provided for this field
G4_TESTWDOGMODE : Boolean := False;
-- unspecified
Reserved_2_31 : Interfaces.SF2.UInt30 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for WDOG_CR_Register use record
G4_TESTWDOGENABLE at 0 range 0 .. 0;
G4_TESTWDOGMODE at 0 range 1 .. 1;
Reserved_2_31 at 0 range 2 .. 31;
end record;
subtype MDDR_IO_CALIB_CR_PCODE_Field is Interfaces.SF2.UInt6;
subtype MDDR_IO_CALIB_CR_NCODE_Field is Interfaces.SF2.UInt6;
-- No description provided for this register
type MDDR_IO_CALIB_CR_Register is record
-- No description provided for this field
PCODE : MDDR_IO_CALIB_CR_PCODE_Field := 16#0#;
-- No description provided for this field
NCODE : MDDR_IO_CALIB_CR_NCODE_Field := 16#0#;
-- No description provided for this field
CALIB_TRIM : Boolean := False;
-- No description provided for this field
CALIB_START : Boolean := False;
-- No description provided for this field
CALIB_LOCK : Boolean := False;
-- unspecified
Reserved_15_31 : Interfaces.SF2.UInt17 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for MDDR_IO_CALIB_CR_Register use record
PCODE at 0 range 0 .. 5;
NCODE at 0 range 6 .. 11;
CALIB_TRIM at 0 range 12 .. 12;
CALIB_START at 0 range 13 .. 13;
CALIB_LOCK at 0 range 14 .. 14;
Reserved_15_31 at 0 range 15 .. 31;
end record;
subtype SPARE_OUT_CR_MSS_SPARE_OUT_Field is Interfaces.SF2.UInt16;
-- No description provided for this register
type SPARE_OUT_CR_Register is record
-- No description provided for this field
MSS_SPARE_OUT : SPARE_OUT_CR_MSS_SPARE_OUT_Field := 16#0#;
-- unspecified
Reserved_16_31 : Interfaces.SF2.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for SPARE_OUT_CR_Register use record
MSS_SPARE_OUT at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
-- No description provided for this register
type EDAC_IRQ_ENABLE_CR_Register is record
-- No description provided for this field
ESRAM0_EDAC_1E_EN : Boolean := False;
-- No description provided for this field
ESRAM0_EDAC_2E_EN : Boolean := False;
-- No description provided for this field
ESRAM1_EDAC_1E_EN : Boolean := False;
-- No description provided for this field
ESRAM1_EDAC_2E_EN : Boolean := False;
-- No description provided for this field
CC_EDAC_1E_EN : Boolean := False;
-- No description provided for this field
CC_EDAC_2E_EN : Boolean := False;
-- No description provided for this field
MAC_EDAC_TX_1E_EN : Boolean := False;
-- No description provided for this field
MAC_EDAC_TX_2E_EN : Boolean := False;
-- No description provided for this field
MAC_EDAC_RX_1E_EN : Boolean := False;
-- No description provided for this field
MAC_EDAC_RX_2E_EN : Boolean := False;
-- No description provided for this field
USB_EDAC_1E_EN : Boolean := False;
-- No description provided for this field
USB_EDAC_2E_EN : Boolean := False;
-- No description provided for this field
CAN_EDAC_1E_EN : Boolean := False;
-- No description provided for this field
CAN_EDAC_2E_EN : Boolean := False;
-- No description provided for this field
MDDR_ECC_INT_EN : Boolean := False;
-- unspecified
Reserved_15_31 : Interfaces.SF2.UInt17 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for EDAC_IRQ_ENABLE_CR_Register use record
ESRAM0_EDAC_1E_EN at 0 range 0 .. 0;
ESRAM0_EDAC_2E_EN at 0 range 1 .. 1;
ESRAM1_EDAC_1E_EN at 0 range 2 .. 2;
ESRAM1_EDAC_2E_EN at 0 range 3 .. 3;
CC_EDAC_1E_EN at 0 range 4 .. 4;
CC_EDAC_2E_EN at 0 range 5 .. 5;
MAC_EDAC_TX_1E_EN at 0 range 6 .. 6;
MAC_EDAC_TX_2E_EN at 0 range 7 .. 7;
MAC_EDAC_RX_1E_EN at 0 range 8 .. 8;
MAC_EDAC_RX_2E_EN at 0 range 9 .. 9;
USB_EDAC_1E_EN at 0 range 10 .. 10;
USB_EDAC_2E_EN at 0 range 11 .. 11;
CAN_EDAC_1E_EN at 0 range 12 .. 12;
CAN_EDAC_2E_EN at 0 range 13 .. 13;
MDDR_ECC_INT_EN at 0 range 14 .. 14;
Reserved_15_31 at 0 range 15 .. 31;
end record;
-- No description provided for this register
type USB_CR_Register is record
-- No description provided for this field
USB_UTMI_SEL : Boolean := False;
-- No description provided for this field
USB_DDR_SELECT : Boolean := False;
-- unspecified
Reserved_2_31 : Interfaces.SF2.UInt30 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for USB_CR_Register use record
USB_UTMI_SEL at 0 range 0 .. 0;
USB_DDR_SELECT at 0 range 1 .. 1;
Reserved_2_31 at 0 range 2 .. 31;
end record;
-- No description provided for this register
type ESRAM_PIPELINE_CR_Register is record
-- No description provided for this field
ESRAM_PIPELINE_ENABLE : Boolean := False;
-- unspecified
Reserved_1_31 : Interfaces.SF2.UInt31 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for ESRAM_PIPELINE_CR_Register use record
ESRAM_PIPELINE_ENABLE at 0 range 0 .. 0;
Reserved_1_31 at 0 range 1 .. 31;
end record;
subtype MSS_IRQ_ENABLE_CR_SW_INTERRUPT_EN_Field is Interfaces.SF2.UInt7;
subtype MSS_IRQ_ENABLE_CR_CC_INTERRUPT_EN_Field is Interfaces.SF2.UInt3;
subtype MSS_IRQ_ENABLE_CR_DDRB_INTERRUPT_EN_Field is Interfaces.SF2.UInt10;
-- No description provided for this register
type MSS_IRQ_ENABLE_CR_Register is record
-- No description provided for this field
SW_INTERRUPT_EN : MSS_IRQ_ENABLE_CR_SW_INTERRUPT_EN_Field := 16#0#;
-- No description provided for this field
CC_INTERRUPT_EN : MSS_IRQ_ENABLE_CR_CC_INTERRUPT_EN_Field := 16#0#;
-- No description provided for this field
DDRB_INTERRUPT_EN : MSS_IRQ_ENABLE_CR_DDRB_INTERRUPT_EN_Field := 16#0#;
-- unspecified
Reserved_20_31 : Interfaces.SF2.UInt12 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for MSS_IRQ_ENABLE_CR_Register use record
SW_INTERRUPT_EN at 0 range 0 .. 6;
CC_INTERRUPT_EN at 0 range 7 .. 9;
DDRB_INTERRUPT_EN at 0 range 10 .. 19;
Reserved_20_31 at 0 range 20 .. 31;
end record;
-- No description provided for this register
type RTC_WAKEUP_CR_Register is record
-- No description provided for this field
RTC_WAKEUP_M3_EN : Boolean := False;
-- No description provided for this field
RTC_WAKEUP_FAB_EN : Boolean := False;
-- No description provided for this field
RTC_WAKEUP_G4C_EN : Boolean := False;
-- unspecified
Reserved_3_31 : Interfaces.SF2.UInt29 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for RTC_WAKEUP_CR_Register use record
RTC_WAKEUP_M3_EN at 0 range 0 .. 0;
RTC_WAKEUP_FAB_EN at 0 range 1 .. 1;
RTC_WAKEUP_G4C_EN at 0 range 2 .. 2;
Reserved_3_31 at 0 range 3 .. 31;
end record;
subtype MAC_CR_ETH_LINE_SPEED_Field is Interfaces.SF2.UInt2;
subtype MAC_CR_ETH_PHY_MODE_Field is Interfaces.SF2.UInt3;
subtype MAC_CR_RGMII_TXC_DELAY_Field is Interfaces.SF2.UInt4;
-- No description provided for this register
type MAC_CR_Register is record
-- No description provided for this field
ETH_LINE_SPEED : MAC_CR_ETH_LINE_SPEED_Field := 16#0#;
-- No description provided for this field
ETH_PHY_MODE : MAC_CR_ETH_PHY_MODE_Field := 16#0#;
-- No description provided for this field
RGMII_TXC_DELAY : MAC_CR_RGMII_TXC_DELAY_Field := 16#0#;
-- unspecified
Reserved_9_31 : Interfaces.SF2.UInt23 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for MAC_CR_Register use record
ETH_LINE_SPEED at 0 range 0 .. 1;
ETH_PHY_MODE at 0 range 2 .. 4;
RGMII_TXC_DELAY at 0 range 5 .. 8;
Reserved_9_31 at 0 range 9 .. 31;
end record;
subtype MSSDDR_PLL_STATUS_LOW_CR_FACC_PLL_DIVR_Field is
Interfaces.SF2.UInt6;
subtype MSSDDR_PLL_STATUS_LOW_CR_FACC_PLL_DIVF_Field is
Interfaces.SF2.UInt10;
subtype MSSDDR_PLL_STATUS_LOW_CR_FACC_PLL_DIVQ_Field is
Interfaces.SF2.UInt3;
subtype MSSDDR_PLL_STATUS_LOW_CR_FACC_PLL_RANGE_Field is
Interfaces.SF2.UInt4;
subtype MSSDDR_PLL_STATUS_LOW_CR_FACC_PLL_LOCKWIN_Field is
Interfaces.SF2.UInt3;
subtype MSSDDR_PLL_STATUS_LOW_CR_FACC_PLL_LOCKCNT_Field is
Interfaces.SF2.UInt4;
-- No description provided for this register
type MSSDDR_PLL_STATUS_LOW_CR_Register is record
-- No description provided for this field
FACC_PLL_DIVR : MSSDDR_PLL_STATUS_LOW_CR_FACC_PLL_DIVR_Field :=
16#0#;
-- No description provided for this field
FACC_PLL_DIVF : MSSDDR_PLL_STATUS_LOW_CR_FACC_PLL_DIVF_Field :=
16#0#;
-- No description provided for this field
FACC_PLL_DIVQ : MSSDDR_PLL_STATUS_LOW_CR_FACC_PLL_DIVQ_Field :=
16#0#;
-- No description provided for this field
FACC_PLL_RANGE : MSSDDR_PLL_STATUS_LOW_CR_FACC_PLL_RANGE_Field :=
16#0#;
-- No description provided for this field
FACC_PLL_LOCKWIN : MSSDDR_PLL_STATUS_LOW_CR_FACC_PLL_LOCKWIN_Field :=
16#0#;
-- No description provided for this field
FACC_PLL_LOCKCNT : MSSDDR_PLL_STATUS_LOW_CR_FACC_PLL_LOCKCNT_Field :=
16#0#;
-- unspecified
Reserved_30_31 : Interfaces.SF2.UInt2 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for MSSDDR_PLL_STATUS_LOW_CR_Register use record
FACC_PLL_DIVR at 0 range 0 .. 5;
FACC_PLL_DIVF at 0 range 6 .. 15;
FACC_PLL_DIVQ at 0 range 16 .. 18;
FACC_PLL_RANGE at 0 range 19 .. 22;
FACC_PLL_LOCKWIN at 0 range 23 .. 25;
FACC_PLL_LOCKCNT at 0 range 26 .. 29;
Reserved_30_31 at 0 range 30 .. 31;
end record;
subtype MSSDDR_PLL_STATUS_HIGH_CR_FACC_PLL_SSMD_Field is
Interfaces.SF2.UInt2;
subtype MSSDDR_PLL_STATUS_HIGH_CR_FACC_PLL_SSMF_Field is
Interfaces.SF2.UInt5;
-- No description provided for this register
type MSSDDR_PLL_STATUS_HIGH_CR_Register is record
-- No description provided for this field
FACC_PLL_BYPASS : Boolean := False;
-- No description provided for this field
FACC_PLL_MODE_1V2 : Boolean := False;
-- No description provided for this field
FACC_PLL_MODE_3V3 : Boolean := False;
-- No description provided for this field
FACC_PLL_FSE : Boolean := False;
-- No description provided for this field
FACC_PLL_PD : Boolean := False;
-- No description provided for this field
FACC_PLL_SSE : Boolean := False;
-- No description provided for this field
FACC_PLL_SSMD : MSSDDR_PLL_STATUS_HIGH_CR_FACC_PLL_SSMD_Field :=
16#0#;
-- No description provided for this field
FACC_PLL_SSMF : MSSDDR_PLL_STATUS_HIGH_CR_FACC_PLL_SSMF_Field :=
16#0#;
-- unspecified
Reserved_13_31 : Interfaces.SF2.UInt19 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for MSSDDR_PLL_STATUS_HIGH_CR_Register use record
FACC_PLL_BYPASS at 0 range 0 .. 0;
FACC_PLL_MODE_1V2 at 0 range 1 .. 1;
FACC_PLL_MODE_3V3 at 0 range 2 .. 2;
FACC_PLL_FSE at 0 range 3 .. 3;
FACC_PLL_PD at 0 range 4 .. 4;
FACC_PLL_SSE at 0 range 5 .. 5;
FACC_PLL_SSMD at 0 range 6 .. 7;
FACC_PLL_SSMF at 0 range 8 .. 12;
Reserved_13_31 at 0 range 13 .. 31;
end record;
subtype MSSDDR_FACC1_CR_DIVISOR_A_Field is Interfaces.SF2.UInt2;
subtype MSSDDR_FACC1_CR_APB0_DIVISOR_Field is Interfaces.SF2.UInt3;
subtype MSSDDR_FACC1_CR_APB1_DIVISOR_Field is Interfaces.SF2.UInt3;
subtype MSSDDR_FACC1_CR_FCLK_DIVISOR_Field is Interfaces.SF2.UInt3;
subtype MSSDDR_FACC1_CR_FIC32_0_DIVISOR_Field is Interfaces.SF2.UInt3;
subtype MSSDDR_FACC1_CR_FIC32_1_DIVISOR_Field is Interfaces.SF2.UInt3;
subtype MSSDDR_FACC1_CR_FIC64_DIVISOR_Field is Interfaces.SF2.UInt3;
subtype MSSDDR_FACC1_CR_BASE_DIVISOR_Field is Interfaces.SF2.UInt3;
-- No description provided for this register
type MSSDDR_FACC1_CR_Register is record
-- No description provided for this field
DIVISOR_A : MSSDDR_FACC1_CR_DIVISOR_A_Field := 16#0#;
-- No description provided for this field
APB0_DIVISOR : MSSDDR_FACC1_CR_APB0_DIVISOR_Field := 16#0#;
-- No description provided for this field
APB1_DIVISOR : MSSDDR_FACC1_CR_APB1_DIVISOR_Field := 16#0#;
-- No description provided for this field
DDR_CLK_EN : Boolean := False;
-- No description provided for this field
FCLK_DIVISOR : MSSDDR_FACC1_CR_FCLK_DIVISOR_Field := 16#0#;
-- No description provided for this field
FACC_GLMUX_SEL : Boolean := False;
-- No description provided for this field
FIC32_0_DIVISOR : MSSDDR_FACC1_CR_FIC32_0_DIVISOR_Field := 16#0#;
-- No description provided for this field
FIC32_1_DIVISOR : MSSDDR_FACC1_CR_FIC32_1_DIVISOR_Field := 16#0#;
-- No description provided for this field
FIC64_DIVISOR : MSSDDR_FACC1_CR_FIC64_DIVISOR_Field := 16#0#;
-- No description provided for this field
BASE_DIVISOR : MSSDDR_FACC1_CR_BASE_DIVISOR_Field := 16#0#;
-- No description provided for this field
PERSIST_CC : Boolean := False;
-- No description provided for this field
CONTROLLER_PLL_INIT : Boolean := False;
-- No description provided for this field
FACC_FAB_REF_SEL : Boolean := False;
-- unspecified
Reserved_28_31 : Interfaces.SF2.UInt4 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for MSSDDR_FACC1_CR_Register use record
DIVISOR_A at 0 range 0 .. 1;
APB0_DIVISOR at 0 range 2 .. 4;
APB1_DIVISOR at 0 range 5 .. 7;
DDR_CLK_EN at 0 range 8 .. 8;
FCLK_DIVISOR at 0 range 9 .. 11;
FACC_GLMUX_SEL at 0 range 12 .. 12;
FIC32_0_DIVISOR at 0 range 13 .. 15;
FIC32_1_DIVISOR at 0 range 16 .. 18;
FIC64_DIVISOR at 0 range 19 .. 21;
BASE_DIVISOR at 0 range 22 .. 24;
PERSIST_CC at 0 range 25 .. 25;
CONTROLLER_PLL_INIT at 0 range 26 .. 26;
FACC_FAB_REF_SEL at 0 range 27 .. 27;
Reserved_28_31 at 0 range 28 .. 31;
end record;
subtype MSSDDR_FACC2_CR_RTC_CLK_SEL_Field is Interfaces.SF2.UInt2;
subtype MSSDDR_FACC2_CR_FACC_SRC_SEL_Field is Interfaces.SF2.UInt3;
subtype MSSDDR_FACC2_CR_FACC_STANDBY_SEL_Field is Interfaces.SF2.UInt3;
-- No description provided for this register
type MSSDDR_FACC2_CR_Register is record
-- No description provided for this field
RTC_CLK_SEL : MSSDDR_FACC2_CR_RTC_CLK_SEL_Field := 16#0#;
-- No description provided for this field
FACC_SRC_SEL : MSSDDR_FACC2_CR_FACC_SRC_SEL_Field := 16#0#;
-- No description provided for this field
FACC_PRE_SRC_SEL : Boolean := False;
-- No description provided for this field
FACC_STANDBY_SEL : MSSDDR_FACC2_CR_FACC_STANDBY_SEL_Field := 16#0#;
-- No description provided for this field
MSS_25_50MHZ_EN : Boolean := False;
-- No description provided for this field
MSS_1MHZ_EN : Boolean := False;
-- No description provided for this field
MSS_CLK_ENVM_EN : Boolean := False;
-- No description provided for this field
MSS_XTAL_EN : Boolean := False;
-- No description provided for this field
MSS_XTAL_RTC_EN : Boolean := False;
-- unspecified
Reserved_14_31 : Interfaces.SF2.UInt18 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for MSSDDR_FACC2_CR_Register use record
RTC_CLK_SEL at 0 range 0 .. 1;
FACC_SRC_SEL at 0 range 2 .. 4;
FACC_PRE_SRC_SEL at 0 range 5 .. 5;
FACC_STANDBY_SEL at 0 range 6 .. 8;
MSS_25_50MHZ_EN at 0 range 9 .. 9;
MSS_1MHZ_EN at 0 range 10 .. 10;
MSS_CLK_ENVM_EN at 0 range 11 .. 11;
MSS_XTAL_EN at 0 range 12 .. 12;
MSS_XTAL_RTC_EN at 0 range 13 .. 13;
Reserved_14_31 at 0 range 14 .. 31;
end record;
-- No description provided for this register
type PLL_LOCK_EN_CR_Register is record
-- No description provided for this field
MPLL_LOCK_EN : Boolean := False;
-- No description provided for this field
MPLL_LOCK_LOST_EN : Boolean := False;
-- No description provided for this field
FAB_PLL_LOCK_EN : Boolean := False;
-- No description provided for this field
FAB_PLL_LOCK_LOST_EN : Boolean := False;
-- unspecified
Reserved_4_31 : Interfaces.SF2.UInt28 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for PLL_LOCK_EN_CR_Register use record
MPLL_LOCK_EN at 0 range 0 .. 0;
MPLL_LOCK_LOST_EN at 0 range 1 .. 1;
FAB_PLL_LOCK_EN at 0 range 2 .. 2;
FAB_PLL_LOCK_LOST_EN at 0 range 3 .. 3;
Reserved_4_31 at 0 range 4 .. 31;
end record;
-- No description provided for this register
type MSSDDR_CLK_CALIB_CR_Register is record
-- No description provided for this field
FAB_CALIB_START : Boolean := False;
-- unspecified
Reserved_1_31 : Interfaces.SF2.UInt31 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for MSSDDR_CLK_CALIB_CR_Register use record
FAB_CALIB_START at 0 range 0 .. 0;
Reserved_1_31 at 0 range 1 .. 31;
end record;
subtype PLL_DELAY_LINE_SEL_CR_PLL_REF_DEL_SEL_Field is Interfaces.SF2.UInt2;
subtype PLL_DELAY_LINE_SEL_CR_PLL_FB_DEL_SEL_Field is Interfaces.SF2.UInt2;
-- No description provided for this register
type PLL_DELAY_LINE_SEL_CR_Register is record
-- No description provided for this field
PLL_REF_DEL_SEL : PLL_DELAY_LINE_SEL_CR_PLL_REF_DEL_SEL_Field := 16#0#;
-- No description provided for this field
PLL_FB_DEL_SEL : PLL_DELAY_LINE_SEL_CR_PLL_FB_DEL_SEL_Field := 16#0#;
-- unspecified
Reserved_4_31 : Interfaces.SF2.UInt28 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for PLL_DELAY_LINE_SEL_CR_Register use record
PLL_REF_DEL_SEL at 0 range 0 .. 1;
PLL_FB_DEL_SEL at 0 range 2 .. 3;
Reserved_4_31 at 0 range 4 .. 31;
end record;
-- No description provided for this register
type MAC_STAT_CLRONRD_CR_Register is record
-- No description provided for this field
MAC_STAT_CLRONRD : Boolean := False;
-- unspecified
Reserved_1_31 : Interfaces.SF2.UInt31 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for MAC_STAT_CLRONRD_CR_Register use record
MAC_STAT_CLRONRD at 0 range 0 .. 0;
Reserved_1_31 at 0 range 1 .. 31;
end record;
-- No description provided for this register
type RESET_SOURCE_CR_Register is record
-- No description provided for this field
PO_RESET_DETECT : Boolean := False;
-- No description provided for this field
CONTROLLER_RESET_DETECT : Boolean := False;
-- No description provided for this field
CONTROLLER_M3_RESET_DETECT : Boolean := False;
-- No description provided for this field
SOFT_RESET_DETECT : Boolean := False;
-- No description provided for this field
LOCKUP_RESET_DETECT : Boolean := False;
-- No description provided for this field
WDOG_RESET_DETECT : Boolean := False;
-- No description provided for this field
USER_RESET_DETECT : Boolean := False;
-- No description provided for this field
USER_M3_RESET_DETECT : Boolean := False;
-- unspecified
Reserved_8_31 : Interfaces.SF2.UInt24 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for RESET_SOURCE_CR_Register use record
PO_RESET_DETECT at 0 range 0 .. 0;
CONTROLLER_RESET_DETECT at 0 range 1 .. 1;
CONTROLLER_M3_RESET_DETECT at 0 range 2 .. 2;
SOFT_RESET_DETECT at 0 range 3 .. 3;
LOCKUP_RESET_DETECT at 0 range 4 .. 4;
WDOG_RESET_DETECT at 0 range 5 .. 5;
USER_RESET_DETECT at 0 range 6 .. 6;
USER_M3_RESET_DETECT at 0 range 7 .. 7;
Reserved_8_31 at 0 range 8 .. 31;
end record;
subtype CC_ECCERRINDXADR_SR_CC_DECC_ERR_1E_ADD_Field is
Interfaces.SF2.UInt6;
subtype CC_ECCERRINDXADR_SR_CC_DECC_ERR_2E_ADD_Field is
Interfaces.SF2.UInt6;
-- No description provided for this register
type CC_ECCERRINDXADR_SR_Register is record
-- Read-only. No description provided for this field
CC_DECC_ERR_1E_ADD : CC_ECCERRINDXADR_SR_CC_DECC_ERR_1E_ADD_Field;
-- Read-only. No description provided for this field
CC_DECC_ERR_2E_ADD : CC_ECCERRINDXADR_SR_CC_DECC_ERR_2E_ADD_Field;
-- unspecified
Reserved_12_31 : Interfaces.SF2.UInt20;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CC_ECCERRINDXADR_SR_Register use record
CC_DECC_ERR_1E_ADD at 0 range 0 .. 5;
CC_DECC_ERR_2E_ADD at 0 range 6 .. 11;
Reserved_12_31 at 0 range 12 .. 31;
end record;
-- No description provided for this register
type DDRB_BUF_EMPTY_SR_Register is record
-- Read-only. No description provided for this field
DDRB_DS_WBEMPTY : Boolean;
-- Read-only. No description provided for this field
DDRB_DS_RBEMPTY : Boolean;
-- Read-only. No description provided for this field
DDRB_SW_WBEMPTY : Boolean;
-- Read-only. No description provided for this field
DDRB_SW_RBEMPTY : Boolean;
-- Read-only. No description provided for this field
DDRB_HPD_WBEMPTY : Boolean;
-- Read-only. No description provided for this field
DDRB_HPD_RBEMPTY : Boolean;
-- Read-only. No description provided for this field
DDRB_IDC_RBEMPTY : Boolean;
-- unspecified
Reserved_7_31 : Interfaces.SF2.UInt25;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for DDRB_BUF_EMPTY_SR_Register use record
DDRB_DS_WBEMPTY at 0 range 0 .. 0;
DDRB_DS_RBEMPTY at 0 range 1 .. 1;
DDRB_SW_WBEMPTY at 0 range 2 .. 2;
DDRB_SW_RBEMPTY at 0 range 3 .. 3;
DDRB_HPD_WBEMPTY at 0 range 4 .. 4;
DDRB_HPD_RBEMPTY at 0 range 5 .. 5;
DDRB_IDC_RBEMPTY at 0 range 6 .. 6;
Reserved_7_31 at 0 range 7 .. 31;
end record;
-- No description provided for this register
type DDRB_DSBL_DN_SR_Register is record
-- Read-only. No description provided for this field
DDRB_DS_WDSBL_DN : Boolean;
-- Read-only. No description provided for this field
DDRB_DS_RDSBL_DN : Boolean;
-- Read-only. No description provided for this field
DDRB_SW_WDSBL_DN : Boolean;
-- Read-only. No description provided for this field
DDRB_SW_RDSBL_DN : Boolean;
-- Read-only. No description provided for this field
DDRB_HPD_WDSBL_DN : Boolean;
-- Read-only. No description provided for this field
DDRB_HPD_RDSBL_DN : Boolean;
-- Read-only. No description provided for this field
DDRB_IDC_DSBL_DN : Boolean;
-- unspecified
Reserved_7_31 : Interfaces.SF2.UInt25;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for DDRB_DSBL_DN_SR_Register use record
DDRB_DS_WDSBL_DN at 0 range 0 .. 0;
DDRB_DS_RDSBL_DN at 0 range 1 .. 1;
DDRB_SW_WDSBL_DN at 0 range 2 .. 2;
DDRB_SW_RDSBL_DN at 0 range 3 .. 3;
DDRB_HPD_WDSBL_DN at 0 range 4 .. 4;
DDRB_HPD_RDSBL_DN at 0 range 5 .. 5;
DDRB_IDC_DSBL_DN at 0 range 6 .. 6;
Reserved_7_31 at 0 range 7 .. 31;
end record;
subtype ESRAM0_EDAC_CNT_ESRAM0_EDAC_CNT_1E_Field is Interfaces.SF2.UInt16;
subtype ESRAM0_EDAC_CNT_ESRAM0_EDAC_CNT_2E_Field is Interfaces.SF2.UInt16;
-- No description provided for this register
type ESRAM0_EDAC_CNT_Register is record
-- Read-only. No description provided for this field
ESRAM0_EDAC_CNT_1E : ESRAM0_EDAC_CNT_ESRAM0_EDAC_CNT_1E_Field;
-- Read-only. No description provided for this field
ESRAM0_EDAC_CNT_2E : ESRAM0_EDAC_CNT_ESRAM0_EDAC_CNT_2E_Field;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for ESRAM0_EDAC_CNT_Register use record
ESRAM0_EDAC_CNT_1E at 0 range 0 .. 15;
ESRAM0_EDAC_CNT_2E at 0 range 16 .. 31;
end record;
subtype ESRAM1_EDAC_CNT_ESRAM1_EDAC_CNT_1E_Field is Interfaces.SF2.UInt16;
subtype ESRAM1_EDAC_CNT_ESRAM1_EDAC_CNT_2E_Field is Interfaces.SF2.UInt16;
-- No description provided for this register
type ESRAM1_EDAC_CNT_Register is record
-- Read-only. No description provided for this field
ESRAM1_EDAC_CNT_1E : ESRAM1_EDAC_CNT_ESRAM1_EDAC_CNT_1E_Field;
-- Read-only. No description provided for this field
ESRAM1_EDAC_CNT_2E : ESRAM1_EDAC_CNT_ESRAM1_EDAC_CNT_2E_Field;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for ESRAM1_EDAC_CNT_Register use record
ESRAM1_EDAC_CNT_1E at 0 range 0 .. 15;
ESRAM1_EDAC_CNT_2E at 0 range 16 .. 31;
end record;
subtype CC_EDAC_CNT_CC_EDAC_CNT_1E_Field is Interfaces.SF2.UInt16;
subtype CC_EDAC_CNT_CC_EDAC_CNT_2E_Field is Interfaces.SF2.UInt16;
-- No description provided for this register
type CC_EDAC_CNT_Register is record
-- Read-only. No description provided for this field
CC_EDAC_CNT_1E : CC_EDAC_CNT_CC_EDAC_CNT_1E_Field;
-- Read-only. No description provided for this field
CC_EDAC_CNT_2E : CC_EDAC_CNT_CC_EDAC_CNT_2E_Field;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CC_EDAC_CNT_Register use record
CC_EDAC_CNT_1E at 0 range 0 .. 15;
CC_EDAC_CNT_2E at 0 range 16 .. 31;
end record;
subtype MAC_EDAC_TX_CNT_MAC_EDAC_TX_CNT_1E_Field is Interfaces.SF2.UInt16;
subtype MAC_EDAC_TX_CNT_MAC_EDAC_TX_CNT_2E_Field is Interfaces.SF2.UInt16;
-- No description provided for this register
type MAC_EDAC_TX_CNT_Register is record
-- Read-only. No description provided for this field
MAC_EDAC_TX_CNT_1E : MAC_EDAC_TX_CNT_MAC_EDAC_TX_CNT_1E_Field;
-- Read-only. No description provided for this field
MAC_EDAC_TX_CNT_2E : MAC_EDAC_TX_CNT_MAC_EDAC_TX_CNT_2E_Field;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for MAC_EDAC_TX_CNT_Register use record
MAC_EDAC_TX_CNT_1E at 0 range 0 .. 15;
MAC_EDAC_TX_CNT_2E at 0 range 16 .. 31;
end record;
subtype MAC_EDAC_RX_CNT_MAC_EDAC_RX_CNT_1E_Field is Interfaces.SF2.UInt16;
subtype MAC_EDAC_RX_CNT_MAC_EDAC_RX_CNT_2E_Field is Interfaces.SF2.UInt16;
-- No description provided for this register
type MAC_EDAC_RX_CNT_Register is record
-- Read-only. No description provided for this field
MAC_EDAC_RX_CNT_1E : MAC_EDAC_RX_CNT_MAC_EDAC_RX_CNT_1E_Field;
-- Read-only. No description provided for this field
MAC_EDAC_RX_CNT_2E : MAC_EDAC_RX_CNT_MAC_EDAC_RX_CNT_2E_Field;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for MAC_EDAC_RX_CNT_Register use record
MAC_EDAC_RX_CNT_1E at 0 range 0 .. 15;
MAC_EDAC_RX_CNT_2E at 0 range 16 .. 31;
end record;
subtype USB_EDAC_CNT_USB_EDAC_CNT_1E_Field is Interfaces.SF2.UInt16;
subtype USB_EDAC_CNT_USB_EDAC_CNT_2E_Field is Interfaces.SF2.UInt16;
-- No description provided for this register
type USB_EDAC_CNT_Register is record
-- Read-only. No description provided for this field
USB_EDAC_CNT_1E : USB_EDAC_CNT_USB_EDAC_CNT_1E_Field;
-- Read-only. No description provided for this field
USB_EDAC_CNT_2E : USB_EDAC_CNT_USB_EDAC_CNT_2E_Field;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for USB_EDAC_CNT_Register use record
USB_EDAC_CNT_1E at 0 range 0 .. 15;
USB_EDAC_CNT_2E at 0 range 16 .. 31;
end record;
subtype CAN_EDAC_CNT_CAN_EDAC_CNT_1E_Field is Interfaces.SF2.UInt16;
subtype CAN_EDAC_CNT_CAN_EDAC_CNT_2E_Field is Interfaces.SF2.UInt16;
-- No description provided for this register
type CAN_EDAC_CNT_Register is record
-- Read-only. No description provided for this field
CAN_EDAC_CNT_1E : CAN_EDAC_CNT_CAN_EDAC_CNT_1E_Field;
-- Read-only. No description provided for this field
CAN_EDAC_CNT_2E : CAN_EDAC_CNT_CAN_EDAC_CNT_2E_Field;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CAN_EDAC_CNT_Register use record
CAN_EDAC_CNT_1E at 0 range 0 .. 15;
CAN_EDAC_CNT_2E at 0 range 16 .. 31;
end record;
subtype ESRAM0_EDAC_ADR_ESRAM0_EDAC_1E_AD_Field is Interfaces.SF2.UInt13;
subtype ESRAM0_EDAC_ADR_ESRAM0_EDAC_2E_AD_Field is Interfaces.SF2.UInt13;
-- No description provided for this register
type ESRAM0_EDAC_ADR_Register is record
-- Read-only. No description provided for this field
ESRAM0_EDAC_1E_AD : ESRAM0_EDAC_ADR_ESRAM0_EDAC_1E_AD_Field;
-- Read-only. No description provided for this field
ESRAM0_EDAC_2E_AD : ESRAM0_EDAC_ADR_ESRAM0_EDAC_2E_AD_Field;
-- unspecified
Reserved_26_31 : Interfaces.SF2.UInt6;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for ESRAM0_EDAC_ADR_Register use record
ESRAM0_EDAC_1E_AD at 0 range 0 .. 12;
ESRAM0_EDAC_2E_AD at 0 range 13 .. 25;
Reserved_26_31 at 0 range 26 .. 31;
end record;
subtype ESRAM1_EDAC_ADR_ESRAM1_EDAC_1E_AD_Field is Interfaces.SF2.UInt13;
subtype ESRAM1_EDAC_ADR_ESRAM1_EDAC_2E_AD_Field is Interfaces.SF2.UInt13;
-- No description provided for this register
type ESRAM1_EDAC_ADR_Register is record
-- Read-only. No description provided for this field
ESRAM1_EDAC_1E_AD : ESRAM1_EDAC_ADR_ESRAM1_EDAC_1E_AD_Field;
-- Read-only. No description provided for this field
ESRAM1_EDAC_2E_AD : ESRAM1_EDAC_ADR_ESRAM1_EDAC_2E_AD_Field;
-- unspecified
Reserved_26_31 : Interfaces.SF2.UInt6;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for ESRAM1_EDAC_ADR_Register use record
ESRAM1_EDAC_1E_AD at 0 range 0 .. 12;
ESRAM1_EDAC_2E_AD at 0 range 13 .. 25;
Reserved_26_31 at 0 range 26 .. 31;
end record;
subtype MAC_EDAC_RX_ADR_MAC_EDAC_RX_1E_AD_Field is Interfaces.SF2.UInt11;
subtype MAC_EDAC_RX_ADR_MAC_EDAC_RX_2E_AD_Field is Interfaces.SF2.UInt11;
-- No description provided for this register
type MAC_EDAC_RX_ADR_Register is record
-- Read-only. No description provided for this field
MAC_EDAC_RX_1E_AD : MAC_EDAC_RX_ADR_MAC_EDAC_RX_1E_AD_Field;
-- Read-only. No description provided for this field
MAC_EDAC_RX_2E_AD : MAC_EDAC_RX_ADR_MAC_EDAC_RX_2E_AD_Field;
-- unspecified
Reserved_22_31 : Interfaces.SF2.UInt10;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for MAC_EDAC_RX_ADR_Register use record
MAC_EDAC_RX_1E_AD at 0 range 0 .. 10;
MAC_EDAC_RX_2E_AD at 0 range 11 .. 21;
Reserved_22_31 at 0 range 22 .. 31;
end record;
subtype MAC_EDAC_TX_ADR_MAC_EDAC_TX_1E_AD_Field is Interfaces.SF2.UInt10;
subtype MAC_EDAC_TX_ADR_MAC_EDAC_TX_2E_AD_Field is Interfaces.SF2.UInt10;
-- No description provided for this register
type MAC_EDAC_TX_ADR_Register is record
-- Read-only. No description provided for this field
MAC_EDAC_TX_1E_AD : MAC_EDAC_TX_ADR_MAC_EDAC_TX_1E_AD_Field;
-- Read-only. No description provided for this field
MAC_EDAC_TX_2E_AD : MAC_EDAC_TX_ADR_MAC_EDAC_TX_2E_AD_Field;
-- unspecified
Reserved_20_31 : Interfaces.SF2.UInt12;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for MAC_EDAC_TX_ADR_Register use record
MAC_EDAC_TX_1E_AD at 0 range 0 .. 9;
MAC_EDAC_TX_2E_AD at 0 range 10 .. 19;
Reserved_20_31 at 0 range 20 .. 31;
end record;
subtype CAN_EDAC_ADR_CAN_EDAC_1E_AD_Field is Interfaces.SF2.UInt9;
subtype CAN_EDAC_ADR_CAN_EDAC_2E_AD_Field is Interfaces.SF2.UInt9;
-- No description provided for this register
type CAN_EDAC_ADR_Register is record
-- Read-only. No description provided for this field
CAN_EDAC_1E_AD : CAN_EDAC_ADR_CAN_EDAC_1E_AD_Field;
-- Read-only. No description provided for this field
CAN_EDAC_2E_AD : CAN_EDAC_ADR_CAN_EDAC_2E_AD_Field;
-- unspecified
Reserved_18_31 : Interfaces.SF2.UInt14;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CAN_EDAC_ADR_Register use record
CAN_EDAC_1E_AD at 0 range 0 .. 8;
CAN_EDAC_2E_AD at 0 range 9 .. 17;
Reserved_18_31 at 0 range 18 .. 31;
end record;
subtype USB_EDAC_ADR_USB_EDAC_1E_AD_Field is Interfaces.SF2.UInt11;
subtype USB_EDAC_ADR_USB_EDAC_2E_AD_Field is Interfaces.SF2.UInt11;
-- No description provided for this register
type USB_EDAC_ADR_Register is record
-- Read-only. No description provided for this field
USB_EDAC_1E_AD : USB_EDAC_ADR_USB_EDAC_1E_AD_Field;
-- Read-only. No description provided for this field
USB_EDAC_2E_AD : USB_EDAC_ADR_USB_EDAC_2E_AD_Field;
-- unspecified
Reserved_22_31 : Interfaces.SF2.UInt10;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for USB_EDAC_ADR_Register use record
USB_EDAC_1E_AD at 0 range 0 .. 10;
USB_EDAC_2E_AD at 0 range 11 .. 21;
Reserved_22_31 at 0 range 22 .. 31;
end record;
-- No description provided for this register
type MM0_1_2_SECURITY_Register is record
-- No description provided for this field
MM0_1_2_MS0_ALLOWED_R : Boolean := False;
-- No description provided for this field
MM0_1_2_MS0_ALLOWED_W : Boolean := False;
-- No description provided for this field
MM0_1_2_MS1_ALLOWED_R : Boolean := False;
-- No description provided for this field
MM0_1_2_MS1_ALLOWED_W : Boolean := False;
-- No description provided for this field
MM0_1_2_MS2_ALLOWED_R : Boolean := False;
-- No description provided for this field
MM0_1_2_MS2_ALLOWED_W : Boolean := False;
-- No description provided for this field
MM0_1_2_MS3_ALLOWED_R : Boolean := False;
-- No description provided for this field
MM0_1_2_MS3_ALLOWED_W : Boolean := False;
-- No description provided for this field
MM0_1_2_MS6_ALLOWED_R : Boolean := False;
-- No description provided for this field
MM0_1_2_MS6_ALLOWED_W : Boolean := False;
-- unspecified
Reserved_10_31 : Interfaces.SF2.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for MM0_1_2_SECURITY_Register use record
MM0_1_2_MS0_ALLOWED_R at 0 range 0 .. 0;
MM0_1_2_MS0_ALLOWED_W at 0 range 1 .. 1;
MM0_1_2_MS1_ALLOWED_R at 0 range 2 .. 2;
MM0_1_2_MS1_ALLOWED_W at 0 range 3 .. 3;
MM0_1_2_MS2_ALLOWED_R at 0 range 4 .. 4;
MM0_1_2_MS2_ALLOWED_W at 0 range 5 .. 5;
MM0_1_2_MS3_ALLOWED_R at 0 range 6 .. 6;
MM0_1_2_MS3_ALLOWED_W at 0 range 7 .. 7;
MM0_1_2_MS6_ALLOWED_R at 0 range 8 .. 8;
MM0_1_2_MS6_ALLOWED_W at 0 range 9 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
-- No description provided for this register
type MM4_5_FIC64_SECURITY_Register is record
-- No description provided for this field
MM4_5_FIC64_MS0_ALLOWED_R : Boolean := False;
-- No description provided for this field
MM4_5_FIC64_MS0_ALLOWED_W : Boolean := False;
-- No description provided for this field
MM4_5_FIC64_MS1_ALLOWED_R : Boolean := False;
-- No description provided for this field
MM4_5_FIC64_MS1_ALLOWED_W : Boolean := False;
-- No description provided for this field
MM4_5_FIC64_MS2_ALLOWED_R : Boolean := False;
-- No description provided for this field
MM4_5_FIC64_MS2_ALLOWED_W : Boolean := False;
-- No description provided for this field
MM4_5_FIC64_MS3_ALLOWED_R : Boolean := False;
-- No description provided for this field
MM4_5_FIC64_MS3_ALLOWED_W : Boolean := False;
-- No description provided for this field
MM4_5_FIC64_MS6_ALLOWED_R : Boolean := False;
-- No description provided for this field
MM4_5_FIC64_MS6_ALLOWED_W : Boolean := False;
-- unspecified
Reserved_10_31 : Interfaces.SF2.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for MM4_5_FIC64_SECURITY_Register use record
MM4_5_FIC64_MS0_ALLOWED_R at 0 range 0 .. 0;
MM4_5_FIC64_MS0_ALLOWED_W at 0 range 1 .. 1;
MM4_5_FIC64_MS1_ALLOWED_R at 0 range 2 .. 2;
MM4_5_FIC64_MS1_ALLOWED_W at 0 range 3 .. 3;
MM4_5_FIC64_MS2_ALLOWED_R at 0 range 4 .. 4;
MM4_5_FIC64_MS2_ALLOWED_W at 0 range 5 .. 5;
MM4_5_FIC64_MS3_ALLOWED_R at 0 range 6 .. 6;
MM4_5_FIC64_MS3_ALLOWED_W at 0 range 7 .. 7;
MM4_5_FIC64_MS6_ALLOWED_R at 0 range 8 .. 8;
MM4_5_FIC64_MS6_ALLOWED_W at 0 range 9 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
-- No description provided for this register
type MM3_6_7_8_SECURITY_Register is record
-- No description provided for this field
MM3_6_7_8_MS0_ALLOWED_R : Boolean := False;
-- No description provided for this field
MM3_6_7_8_MS0_ALLOWED_W : Boolean := False;
-- No description provided for this field
MM3_6_7_8_MS1_ALLOWED_R : Boolean := False;
-- No description provided for this field
MM3_6_7_8_MS1_ALLOWED_W : Boolean := False;
-- No description provided for this field
MM3_6_7_8_MS2_ALLOWED_R : Boolean := False;
-- No description provided for this field
MM3_6_7_8_MS2_ALLOWED_W : Boolean := False;
-- No description provided for this field
MM3_6_7_8_MS3_ALLOWED_R : Boolean := False;
-- No description provided for this field
MM3_6_7_8_MS3_ALLOWED_W : Boolean := False;
-- No description provided for this field
MM3_6_7_8_MS6_ALLOWED_R : Boolean := False;
-- No description provided for this field
MM3_6_7_8_MS6_ALLOWED_W : Boolean := False;
-- unspecified
Reserved_10_31 : Interfaces.SF2.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for MM3_6_7_8_SECURITY_Register use record
MM3_6_7_8_MS0_ALLOWED_R at 0 range 0 .. 0;
MM3_6_7_8_MS0_ALLOWED_W at 0 range 1 .. 1;
MM3_6_7_8_MS1_ALLOWED_R at 0 range 2 .. 2;
MM3_6_7_8_MS1_ALLOWED_W at 0 range 3 .. 3;
MM3_6_7_8_MS2_ALLOWED_R at 0 range 4 .. 4;
MM3_6_7_8_MS2_ALLOWED_W at 0 range 5 .. 5;
MM3_6_7_8_MS3_ALLOWED_R at 0 range 6 .. 6;
MM3_6_7_8_MS3_ALLOWED_W at 0 range 7 .. 7;
MM3_6_7_8_MS6_ALLOWED_R at 0 range 8 .. 8;
MM3_6_7_8_MS6_ALLOWED_W at 0 range 9 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
-- No description provided for this register
type MM9_SECURITY_Register is record
-- No description provided for this field
MM9_MS0_ALLOWED_R : Boolean := False;
-- No description provided for this field
MM9_MS0_ALLOWED_W : Boolean := False;
-- No description provided for this field
MM9_MS1_ALLOWED_R : Boolean := False;
-- No description provided for this field
MM9_MS1_ALLOWED_W : Boolean := False;
-- No description provided for this field
MM9_MS2_ALLOWED_R : Boolean := False;
-- No description provided for this field
MM9_MS2_ALLOWED_W : Boolean := False;
-- No description provided for this field
MM9_MS3_ALLOWED_R : Boolean := False;
-- No description provided for this field
MM9_MS3_ALLOWED_W : Boolean := False;
-- No description provided for this field
MM9_MS6_ALLOWED_R : Boolean := False;
-- No description provided for this field
MM9_MS6_ALLOWED_W : Boolean := False;
-- unspecified
Reserved_10_31 : Interfaces.SF2.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for MM9_SECURITY_Register use record
MM9_MS0_ALLOWED_R at 0 range 0 .. 0;
MM9_MS0_ALLOWED_W at 0 range 1 .. 1;
MM9_MS1_ALLOWED_R at 0 range 2 .. 2;
MM9_MS1_ALLOWED_W at 0 range 3 .. 3;
MM9_MS2_ALLOWED_R at 0 range 4 .. 4;
MM9_MS2_ALLOWED_W at 0 range 5 .. 5;
MM9_MS3_ALLOWED_R at 0 range 6 .. 6;
MM9_MS3_ALLOWED_W at 0 range 7 .. 7;
MM9_MS6_ALLOWED_R at 0 range 8 .. 8;
MM9_MS6_ALLOWED_W at 0 range 9 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
subtype M3_SR_CURRPRI_Field is Interfaces.SF2.Byte;
-- No description provided for this register
type M3_SR_Register is record
-- Read-only. No description provided for this field
CURRPRI : M3_SR_CURRPRI_Field;
-- unspecified
Reserved_8_31 : Interfaces.SF2.UInt24;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for M3_SR_Register use record
CURRPRI at 0 range 0 .. 7;
Reserved_8_31 at 0 range 8 .. 31;
end record;
subtype ETM_COUNT_HIGH_ETMCOUNT_47_32_Field is Interfaces.SF2.UInt16;
subtype ETM_COUNT_HIGH_ETMINTNUM_Field is Interfaces.SF2.UInt9;
subtype ETM_COUNT_HIGH_ETMINTSTAT_Field is Interfaces.SF2.UInt3;
-- No description provided for this register
type ETM_COUNT_HIGH_Register is record
-- Read-only. No description provided for this field
ETMCOUNT_47_32 : ETM_COUNT_HIGH_ETMCOUNT_47_32_Field;
-- Read-only. No description provided for this field
ETMINTNUM : ETM_COUNT_HIGH_ETMINTNUM_Field;
-- Read-only. No description provided for this field
ETMINTSTAT : ETM_COUNT_HIGH_ETMINTSTAT_Field;
-- unspecified
Reserved_28_31 : Interfaces.SF2.UInt4;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for ETM_COUNT_HIGH_Register use record
ETMCOUNT_47_32 at 0 range 0 .. 15;
ETMINTNUM at 0 range 16 .. 24;
ETMINTSTAT at 0 range 25 .. 27;
Reserved_28_31 at 0 range 28 .. 31;
end record;
-- No description provided for this register
type DEVICE_SR_Register is record
-- Read-only. No description provided for this field
CORE_UP_SYNC : Boolean;
-- Read-only. No description provided for this field
VIRGIN_PART : Boolean;
-- Read-only. No description provided for this field
FF_IN_PROGRESS_SYNC : Boolean;
-- Read-only. No description provided for this field
WATCHDOG_FREEZE_SYNC : Boolean;
-- Read-only. No description provided for this field
FLASH_VALID_SYNC : Boolean;
-- Read-only. No description provided for this field
M3_DISABLE : Boolean;
-- Read-only. No description provided for this field
M3_DEBUG_ENABLE : Boolean;
-- unspecified
Reserved_7_31 : Interfaces.SF2.UInt25;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for DEVICE_SR_Register use record
CORE_UP_SYNC at 0 range 0 .. 0;
VIRGIN_PART at 0 range 1 .. 1;
FF_IN_PROGRESS_SYNC at 0 range 2 .. 2;
WATCHDOG_FREEZE_SYNC at 0 range 3 .. 3;
FLASH_VALID_SYNC at 0 range 4 .. 4;
M3_DISABLE at 0 range 5 .. 5;
M3_DEBUG_ENABLE at 0 range 6 .. 6;
Reserved_7_31 at 0 range 7 .. 31;
end record;
-- No description provided for this register
type ENVM_PROTECT_USER_Register is record
-- No description provided for this field
NVM0_LOWER_M3ACCESS : Boolean := False;
-- No description provided for this field
NVM0_LOWER_FABRIC_ACCESS : Boolean := False;
-- No description provided for this field
NVM0_LOWER_OTHERS_ACCESS : Boolean := False;
-- No description provided for this field
NVM0_LOWER_WRITE_ALLOWED : Boolean := False;
-- No description provided for this field
NVM0_UPPER_M3ACCESS : Boolean := False;
-- No description provided for this field
NVM0_UPPER_FABRIC_ACCESS : Boolean := False;
-- No description provided for this field
NVM0_UPPER_OTHERS_ACCESS : Boolean := False;
-- No description provided for this field
NVM0_UPPER_WRITE_ALLOWED : Boolean := False;
-- No description provided for this field
NVM1_LOWER_M3ACCESS : Boolean := False;
-- No description provided for this field
NVM1_LOWER_FABRIC_ACCESS : Boolean := False;
-- No description provided for this field
NVM1_LOWER_OTHERS_ACCESS : Boolean := False;
-- No description provided for this field
NVM1_LOWER_WRITE_ALLOWED : Boolean := False;
-- No description provided for this field
NVM1_UPPER_M3ACCESS : Boolean := False;
-- No description provided for this field
NVM1_UPPER_FABRIC_ACCESS : Boolean := False;
-- No description provided for this field
NVM1_UPPER_OTHERS_ACCESS : Boolean := False;
-- No description provided for this field
NVM1_UPPER_WRITE_ALLOWED : Boolean := False;
-- unspecified
Reserved_16_31 : Interfaces.SF2.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for ENVM_PROTECT_USER_Register use record
NVM0_LOWER_M3ACCESS at 0 range 0 .. 0;
NVM0_LOWER_FABRIC_ACCESS at 0 range 1 .. 1;
NVM0_LOWER_OTHERS_ACCESS at 0 range 2 .. 2;
NVM0_LOWER_WRITE_ALLOWED at 0 range 3 .. 3;
NVM0_UPPER_M3ACCESS at 0 range 4 .. 4;
NVM0_UPPER_FABRIC_ACCESS at 0 range 5 .. 5;
NVM0_UPPER_OTHERS_ACCESS at 0 range 6 .. 6;
NVM0_UPPER_WRITE_ALLOWED at 0 range 7 .. 7;
NVM1_LOWER_M3ACCESS at 0 range 8 .. 8;
NVM1_LOWER_FABRIC_ACCESS at 0 range 9 .. 9;
NVM1_LOWER_OTHERS_ACCESS at 0 range 10 .. 10;
NVM1_LOWER_WRITE_ALLOWED at 0 range 11 .. 11;
NVM1_UPPER_M3ACCESS at 0 range 12 .. 12;
NVM1_UPPER_FABRIC_ACCESS at 0 range 13 .. 13;
NVM1_UPPER_OTHERS_ACCESS at 0 range 14 .. 14;
NVM1_UPPER_WRITE_ALLOWED at 0 range 15 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
-- No description provided for this register
type G4C_ENVM_STATUS_Register is record
-- No description provided for this field
CODE_SHADOW_EN : Boolean := False;
-- unspecified
Reserved_1_31 : Interfaces.SF2.UInt31 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for G4C_ENVM_STATUS_Register use record
CODE_SHADOW_EN at 0 range 0 .. 0;
Reserved_1_31 at 0 range 1 .. 31;
end record;
subtype DEVICE_VERSION_IDP_Field is Interfaces.SF2.UInt16;
subtype DEVICE_VERSION_IDV_Field is Interfaces.SF2.UInt4;
-- No description provided for this register
type DEVICE_VERSION_Register is record
-- Read-only. No description provided for this field
IDP : DEVICE_VERSION_IDP_Field;
-- Read-only. No description provided for this field
IDV : DEVICE_VERSION_IDV_Field;
-- unspecified
Reserved_20_31 : Interfaces.SF2.UInt12;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for DEVICE_VERSION_Register use record
IDP at 0 range 0 .. 15;
IDV at 0 range 16 .. 19;
Reserved_20_31 at 0 range 20 .. 31;
end record;
-- No description provided for this register
type MSSDDR_PLL_STATUS_Register is record
-- Read-only. No description provided for this field
FACC_PLL_LOCK : Boolean;
-- Read-only. No description provided for this field
FAB_PLL_LOCK : Boolean;
-- Read-only. No description provided for this field
MPLL_LOCK : Boolean;
-- Read-only. No description provided for this field
RCOSC_DIV2 : Boolean;
-- unspecified
Reserved_4_31 : Interfaces.SF2.UInt28;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for MSSDDR_PLL_STATUS_Register use record
FACC_PLL_LOCK at 0 range 0 .. 0;
FAB_PLL_LOCK at 0 range 1 .. 1;
MPLL_LOCK at 0 range 2 .. 2;
RCOSC_DIV2 at 0 range 3 .. 3;
Reserved_4_31 at 0 range 4 .. 31;
end record;
-- No description provided for this register
type USB_SR_Register is record
-- Read-only. No description provided for this field
POWERDN : Boolean;
-- Read-only. No description provided for this field
LPI_CARKIT_EN : Boolean;
-- unspecified
Reserved_2_31 : Interfaces.SF2.UInt30;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for USB_SR_Register use record
POWERDN at 0 range 0 .. 0;
LPI_CARKIT_EN at 0 range 1 .. 1;
Reserved_2_31 at 0 range 2 .. 31;
end record;
subtype ENVM_SR_ENVM_BUSY_Field is Interfaces.SF2.UInt2;
-- No description provided for this register
type ENVM_SR_Register is record
-- Read-only. No description provided for this field
ENVM_BUSY : ENVM_SR_ENVM_BUSY_Field;
-- unspecified
Reserved_2_31 : Interfaces.SF2.UInt30;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for ENVM_SR_Register use record
ENVM_BUSY at 0 range 0 .. 1;
Reserved_2_31 at 0 range 2 .. 31;
end record;
subtype SPARE_IN_MSS_SPARE_IN_Field is Interfaces.SF2.UInt16;
-- No description provided for this register
type SPARE_IN_Register is record
-- Read-only. No description provided for this field
MSS_SPARE_IN : SPARE_IN_MSS_SPARE_IN_Field;
-- unspecified
Reserved_16_31 : Interfaces.SF2.UInt16;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for SPARE_IN_Register use record
MSS_SPARE_IN at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype MDDR_IO_CALIB_STATUS_CALIB_NCODE_Field is Interfaces.SF2.UInt6;
subtype MDDR_IO_CALIB_STATUS_CALIB_PCODE_Field is Interfaces.SF2.UInt6;
-- No description provided for this register
type MDDR_IO_CALIB_STATUS_Register is record
-- Read-only. No description provided for this field
CALIB_STATUS : Boolean;
-- Read-only. No description provided for this field
CALIB_NCODE : MDDR_IO_CALIB_STATUS_CALIB_NCODE_Field;
-- Read-only. No description provided for this field
CALIB_PCODE : MDDR_IO_CALIB_STATUS_CALIB_PCODE_Field;
-- Read-only. No description provided for this field
CALIB_NCOMP : Boolean;
-- Read-only. No description provided for this field
CALIB_PCOMP : Boolean;
-- unspecified
Reserved_15_31 : Interfaces.SF2.UInt17;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for MDDR_IO_CALIB_STATUS_Register use record
CALIB_STATUS at 0 range 0 .. 0;
CALIB_NCODE at 0 range 1 .. 6;
CALIB_PCODE at 0 range 7 .. 12;
CALIB_NCOMP at 0 range 13 .. 13;
CALIB_PCOMP at 0 range 14 .. 14;
Reserved_15_31 at 0 range 15 .. 31;
end record;
-- No description provided for this register
type MSSDDR_CLK_CALIB_STATUS_Register is record
-- Read-only. No description provided for this field
FAB_CALIB_FAIL : Boolean;
-- unspecified
Reserved_1_31 : Interfaces.SF2.UInt31;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for MSSDDR_CLK_CALIB_STATUS_Register use record
FAB_CALIB_FAIL at 0 range 0 .. 0;
Reserved_1_31 at 0 range 1 .. 31;
end record;
subtype WDOGLOAD_G4_TESTWDOGLOAD_Field is Interfaces.SF2.UInt26;
-- No description provided for this register
type WDOGLOAD_Register is record
-- No description provided for this field
G4_TESTWDOGLOAD : WDOGLOAD_G4_TESTWDOGLOAD_Field := 16#0#;
-- unspecified
Reserved_26_31 : Interfaces.SF2.UInt6 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for WDOGLOAD_Register use record
G4_TESTWDOGLOAD at 0 range 0 .. 25;
Reserved_26_31 at 0 range 26 .. 31;
end record;
subtype FAB_PROT_SIZE_SW_PROTREGIONSIZE_Field is Interfaces.SF2.UInt5;
-- No description provided for this register
type FAB_PROT_SIZE_Register is record
-- No description provided for this field
SW_PROTREGIONSIZE : FAB_PROT_SIZE_SW_PROTREGIONSIZE_Field := 16#0#;
-- unspecified
Reserved_5_31 : Interfaces.SF2.UInt27 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for FAB_PROT_SIZE_Register use record
SW_PROTREGIONSIZE at 0 range 0 .. 4;
Reserved_5_31 at 0 range 5 .. 31;
end record;
-- No description provided for this register
type MSS_GPIO_DEF_Register is record
-- No description provided for this field
MSS_GPIO_7_0_DEF : Boolean := False;
-- No description provided for this field
MSS_GPIO_15_8_DEF : Boolean := False;
-- No description provided for this field
MSS_GPIO_23_16_DEF : Boolean := False;
-- No description provided for this field
MSS_GPIO_31_24_DEF : Boolean := False;
-- unspecified
Reserved_4_31 : Interfaces.SF2.UInt28 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for MSS_GPIO_DEF_Register use record
MSS_GPIO_7_0_DEF at 0 range 0 .. 0;
MSS_GPIO_15_8_DEF at 0 range 1 .. 1;
MSS_GPIO_23_16_DEF at 0 range 2 .. 2;
MSS_GPIO_31_24_DEF at 0 range 3 .. 3;
Reserved_4_31 at 0 range 4 .. 31;
end record;
-- No description provided for this register
type EDAC_SR_Register is record
-- No description provided for this field
ESRAM0_EDAC_1E : Boolean := False;
-- No description provided for this field
ESRAM0_EDAC_2E : Boolean := False;
-- No description provided for this field
ESRAM1_EDAC_1E : Boolean := False;
-- No description provided for this field
ESRAM1_EDAC_2E : Boolean := False;
-- No description provided for this field
CC_EDAC_1E : Boolean := False;
-- No description provided for this field
CC_EDAC_2E : Boolean := False;
-- No description provided for this field
MAC_EDAC_TX_1E : Boolean := False;
-- No description provided for this field
MAC_EDAC_TX_2E : Boolean := False;
-- No description provided for this field
MAC_EDAC_RX_1E : Boolean := False;
-- No description provided for this field
MAC_EDAC_RX_2E : Boolean := False;
-- No description provided for this field
USB_EDAC_1E : Boolean := False;
-- No description provided for this field
USB_EDAC_2E : Boolean := False;
-- No description provided for this field
CAN_EDAC_1E : Boolean := False;
-- No description provided for this field
CAN_EDAC_2E : Boolean := False;
-- unspecified
Reserved_14_31 : Interfaces.SF2.UInt18 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for EDAC_SR_Register use record
ESRAM0_EDAC_1E at 0 range 0 .. 0;
ESRAM0_EDAC_2E at 0 range 1 .. 1;
ESRAM1_EDAC_1E at 0 range 2 .. 2;
ESRAM1_EDAC_2E at 0 range 3 .. 3;
CC_EDAC_1E at 0 range 4 .. 4;
CC_EDAC_2E at 0 range 5 .. 5;
MAC_EDAC_TX_1E at 0 range 6 .. 6;
MAC_EDAC_TX_2E at 0 range 7 .. 7;
MAC_EDAC_RX_1E at 0 range 8 .. 8;
MAC_EDAC_RX_2E at 0 range 9 .. 9;
USB_EDAC_1E at 0 range 10 .. 10;
USB_EDAC_2E at 0 range 11 .. 11;
CAN_EDAC_1E at 0 range 12 .. 12;
CAN_EDAC_2E at 0 range 13 .. 13;
Reserved_14_31 at 0 range 14 .. 31;
end record;
-- No description provided for this register
type MSS_INTERNAL_SR_Register is record
-- No description provided for this field
MPLL_LOCK_INT : Boolean := False;
-- No description provided for this field
MPLL_LOCKLOST_INT : Boolean := False;
-- No description provided for this field
FAB_PLL_LOCK_INT : Boolean := False;
-- No description provided for this field
FAB_PLL_LOCKLOST_INT : Boolean := False;
-- No description provided for this field
MDDR_IO_CALIB_INT : Boolean := False;
-- No description provided for this field
MDDR_ECC_INT : Boolean := False;
-- No description provided for this field
FIC64_INT : Boolean := False;
-- unspecified
Reserved_7_31 : Interfaces.SF2.UInt25 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for MSS_INTERNAL_SR_Register use record
MPLL_LOCK_INT at 0 range 0 .. 0;
MPLL_LOCKLOST_INT at 0 range 1 .. 1;
FAB_PLL_LOCK_INT at 0 range 2 .. 2;
FAB_PLL_LOCKLOST_INT at 0 range 3 .. 3;
MDDR_IO_CALIB_INT at 0 range 4 .. 4;
MDDR_ECC_INT at 0 range 5 .. 5;
FIC64_INT at 0 range 6 .. 6;
Reserved_7_31 at 0 range 7 .. 31;
end record;
subtype MSS_EXTERNAL_SR_SW_ERRORSTATUS_Field is Interfaces.SF2.UInt7;
subtype MSS_EXTERNAL_SR_DDRB_RDWR_ERR_REG_Field is Interfaces.SF2.UInt6;
subtype MSS_EXTERNAL_SR_CC_HRESP_ERR_Field is Interfaces.SF2.UInt3;
-- No description provided for this register
type MSS_EXTERNAL_SR_Register is record
-- No description provided for this field
SW_ERRORSTATUS : MSS_EXTERNAL_SR_SW_ERRORSTATUS_Field := 16#0#;
-- No description provided for this field
DDRB_RDWR_ERR_REG : MSS_EXTERNAL_SR_DDRB_RDWR_ERR_REG_Field := 16#0#;
-- No description provided for this field
DDRB_DS_WR_ERR : Boolean := False;
-- No description provided for this field
DDRB_SW_WR_ERR : Boolean := False;
-- No description provided for this field
DDRB_HPD_WR_ERR : Boolean := False;
-- No description provided for this field
DDRB_LCKOUT : Boolean := False;
-- No description provided for this field
DDRB_LOCK_MID : Boolean := False;
-- No description provided for this field
CC_HRESP_ERR : MSS_EXTERNAL_SR_CC_HRESP_ERR_Field := 16#0#;
-- unspecified
Reserved_21_31 : Interfaces.SF2.UInt11 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for MSS_EXTERNAL_SR_Register use record
SW_ERRORSTATUS at 0 range 0 .. 6;
DDRB_RDWR_ERR_REG at 0 range 7 .. 12;
DDRB_DS_WR_ERR at 0 range 13 .. 13;
DDRB_SW_WR_ERR at 0 range 14 .. 14;
DDRB_HPD_WR_ERR at 0 range 15 .. 15;
DDRB_LCKOUT at 0 range 16 .. 16;
DDRB_LOCK_MID at 0 range 17 .. 17;
CC_HRESP_ERR at 0 range 18 .. 20;
Reserved_21_31 at 0 range 21 .. 31;
end record;
-- No description provided for this register
type WDOGTIMEOUTEVENT_Register is record
-- No description provided for this field
WDOGTIMEOUTEVENT : Boolean := False;
-- unspecified
Reserved_1_31 : Interfaces.SF2.UInt31 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for WDOGTIMEOUTEVENT_Register use record
WDOGTIMEOUTEVENT at 0 range 0 .. 0;
Reserved_1_31 at 0 range 1 .. 31;
end record;
-- No description provided for this register
type CLR_MSS_COUNTERS_Register is record
-- No description provided for this field
CC_IC_MISS_CNTCLR : Boolean := False;
-- No description provided for this field
CC_IC_HIT_CNTCLR : Boolean := False;
-- No description provided for this field
CC_DC_MISS_CNTCLR : Boolean := False;
-- No description provided for this field
CC_DC_HIT_CNTCLR : Boolean := False;
-- No description provided for this field
CC_IC_TRANS_CNTCLR : Boolean := False;
-- No description provided for this field
CC_DC_TRANS_CNTCLR : Boolean := False;
-- unspecified
Reserved_6_31 : Interfaces.SF2.UInt26 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CLR_MSS_COUNTERS_Register use record
CC_IC_MISS_CNTCLR at 0 range 0 .. 0;
CC_IC_HIT_CNTCLR at 0 range 1 .. 1;
CC_DC_MISS_CNTCLR at 0 range 2 .. 2;
CC_DC_HIT_CNTCLR at 0 range 3 .. 3;
CC_IC_TRANS_CNTCLR at 0 range 4 .. 4;
CC_DC_TRANS_CNTCLR at 0 range 5 .. 5;
Reserved_6_31 at 0 range 6 .. 31;
end record;
-- No description provided for this register
type CLR_EDAC_COUNTERS_Register is record
-- No description provided for this field
ESRAM0_EDAC_CNTCLR_1E : Boolean := False;
-- No description provided for this field
ESRAM0_EDAC_CNTCLR_2E : Boolean := False;
-- No description provided for this field
ESRAM1_EDAC_CNTCLR_1E : Boolean := False;
-- No description provided for this field
ESRAM1_EDAC_CNTCLR_2E : Boolean := False;
-- No description provided for this field
CC_EDAC_CNTCLR_1E : Boolean := False;
-- No description provided for this field
CC_EDAC_CNTCLR_2E : Boolean := False;
-- No description provided for this field
MAC_EDAC_TX_CNTCLR_1E : Boolean := False;
-- No description provided for this field
MAC_EDAC_TX_CNTCLR_2E : Boolean := False;
-- No description provided for this field
MAC_EDAC_RX_CNTCLR_1E : Boolean := False;
-- No description provided for this field
MAC_EDAC_RX_CNTCLR_2E : Boolean := False;
-- No description provided for this field
USB_EDAC_CNTCLR_1E : Boolean := False;
-- No description provided for this field
USB_EDAC_CNTCLR_2E : Boolean := False;
-- No description provided for this field
CAN_EDAC_CNTCLR_1E : Boolean := False;
-- No description provided for this field
CAN_EDAC_CNTCLR_2E : Boolean := False;
-- unspecified
Reserved_14_31 : Interfaces.SF2.UInt18 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CLR_EDAC_COUNTERS_Register use record
ESRAM0_EDAC_CNTCLR_1E at 0 range 0 .. 0;
ESRAM0_EDAC_CNTCLR_2E at 0 range 1 .. 1;
ESRAM1_EDAC_CNTCLR_1E at 0 range 2 .. 2;
ESRAM1_EDAC_CNTCLR_2E at 0 range 3 .. 3;
CC_EDAC_CNTCLR_1E at 0 range 4 .. 4;
CC_EDAC_CNTCLR_2E at 0 range 5 .. 5;
MAC_EDAC_TX_CNTCLR_1E at 0 range 6 .. 6;
MAC_EDAC_TX_CNTCLR_2E at 0 range 7 .. 7;
MAC_EDAC_RX_CNTCLR_1E at 0 range 8 .. 8;
MAC_EDAC_RX_CNTCLR_2E at 0 range 9 .. 9;
USB_EDAC_CNTCLR_1E at 0 range 10 .. 10;
USB_EDAC_CNTCLR_2E at 0 range 11 .. 11;
CAN_EDAC_CNTCLR_1E at 0 range 12 .. 12;
CAN_EDAC_CNTCLR_2E at 0 range 13 .. 13;
Reserved_14_31 at 0 range 14 .. 31;
end record;
-- No description provided for this register
type FLUSH_CR_Register is record
-- No description provided for this field
CC_FLUSH_CACHE : Boolean := False;
-- No description provided for this field
CC_FLUSH_CHLINE : Boolean := False;
-- No description provided for this field
DDRB_FLSHDS : Boolean := False;
-- No description provided for this field
DDRB_FLSHHPD : Boolean := False;
-- No description provided for this field
DDRB_FLSHSW : Boolean := False;
-- No description provided for this field
DDRB_INVALID_DS : Boolean := False;
-- No description provided for this field
DDRB_INVALID_SW : Boolean := False;
-- No description provided for this field
DDRB_INVALID_HPD : Boolean := False;
-- No description provided for this field
DDRB_INVALID_IDC : Boolean := False;
-- unspecified
Reserved_9_31 : Interfaces.SF2.UInt23 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for FLUSH_CR_Register use record
CC_FLUSH_CACHE at 0 range 0 .. 0;
CC_FLUSH_CHLINE at 0 range 1 .. 1;
DDRB_FLSHDS at 0 range 2 .. 2;
DDRB_FLSHHPD at 0 range 3 .. 3;
DDRB_FLSHSW at 0 range 4 .. 4;
DDRB_INVALID_DS at 0 range 5 .. 5;
DDRB_INVALID_SW at 0 range 6 .. 6;
DDRB_INVALID_HPD at 0 range 7 .. 7;
DDRB_INVALID_IDC at 0 range 8 .. 8;
Reserved_9_31 at 0 range 9 .. 31;
end record;
-- No description provided for this register
type MAC_STAT_CLR_CR_Register is record
-- No description provided for this field
MAC_STAT_CLR : Boolean := False;
-- unspecified
Reserved_1_31 : Interfaces.SF2.UInt31 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for MAC_STAT_CLR_CR_Register use record
MAC_STAT_CLR at 0 range 0 .. 0;
Reserved_1_31 at 0 range 1 .. 31;
end record;
subtype IOMUXCELL_0_CONFIG_MSS_IOMUXSEL4_0_Field is Interfaces.SF2.UInt3;
subtype IOMUXCELL_0_CONFIG_MSS_IOMUXSEL5_0_Field is Interfaces.SF2.UInt3;
-- No description provided for this register
type IOMUXCELL_0_CONFIG_Register is record
-- No description provided for this field
MSS_IOMUXSEL0_0 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL1_0 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL2_0 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL3_0 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL4_0 : IOMUXCELL_0_CONFIG_MSS_IOMUXSEL4_0_Field := 16#0#;
-- No description provided for this field
MSS_IOMUXSEL5_0 : IOMUXCELL_0_CONFIG_MSS_IOMUXSEL5_0_Field := 16#0#;
-- unspecified
Reserved_10_31 : Interfaces.SF2.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for IOMUXCELL_0_CONFIG_Register use record
MSS_IOMUXSEL0_0 at 0 range 0 .. 0;
MSS_IOMUXSEL1_0 at 0 range 1 .. 1;
MSS_IOMUXSEL2_0 at 0 range 2 .. 2;
MSS_IOMUXSEL3_0 at 0 range 3 .. 3;
MSS_IOMUXSEL4_0 at 0 range 4 .. 6;
MSS_IOMUXSEL5_0 at 0 range 7 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
subtype IOMUXCELL_1_CONFIG_MSS_IOMUXSEL4_1_Field is Interfaces.SF2.UInt3;
subtype IOMUXCELL_1_CONFIG_MSS_IOMUXSEL5_1_Field is Interfaces.SF2.UInt3;
-- No description provided for this register
type IOMUXCELL_1_CONFIG_Register is record
-- No description provided for this field
MSS_IOMUXSEL0_1 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL1_1 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL2_1 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL3_1 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL4_1 : IOMUXCELL_1_CONFIG_MSS_IOMUXSEL4_1_Field := 16#0#;
-- No description provided for this field
MSS_IOMUXSEL5_1 : IOMUXCELL_1_CONFIG_MSS_IOMUXSEL5_1_Field := 16#0#;
-- unspecified
Reserved_10_31 : Interfaces.SF2.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for IOMUXCELL_1_CONFIG_Register use record
MSS_IOMUXSEL0_1 at 0 range 0 .. 0;
MSS_IOMUXSEL1_1 at 0 range 1 .. 1;
MSS_IOMUXSEL2_1 at 0 range 2 .. 2;
MSS_IOMUXSEL3_1 at 0 range 3 .. 3;
MSS_IOMUXSEL4_1 at 0 range 4 .. 6;
MSS_IOMUXSEL5_1 at 0 range 7 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
subtype IOMUXCELL_2_CONFIG_MSS_IOMUXSEL4_2_Field is Interfaces.SF2.UInt3;
subtype IOMUXCELL_2_CONFIG_MSS_IOMUXSEL5_2_Field is Interfaces.SF2.UInt3;
-- No description provided for this register
type IOMUXCELL_2_CONFIG_Register is record
-- No description provided for this field
MSS_IOMUXSEL0_2 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL1_2 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL2_2 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL3_2 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL4_2 : IOMUXCELL_2_CONFIG_MSS_IOMUXSEL4_2_Field := 16#0#;
-- No description provided for this field
MSS_IOMUXSEL5_2 : IOMUXCELL_2_CONFIG_MSS_IOMUXSEL5_2_Field := 16#0#;
-- unspecified
Reserved_10_31 : Interfaces.SF2.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for IOMUXCELL_2_CONFIG_Register use record
MSS_IOMUXSEL0_2 at 0 range 0 .. 0;
MSS_IOMUXSEL1_2 at 0 range 1 .. 1;
MSS_IOMUXSEL2_2 at 0 range 2 .. 2;
MSS_IOMUXSEL3_2 at 0 range 3 .. 3;
MSS_IOMUXSEL4_2 at 0 range 4 .. 6;
MSS_IOMUXSEL5_2 at 0 range 7 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
subtype IOMUXCELL_3_CONFIG_MSS_IOMUXSEL4_3_Field is Interfaces.SF2.UInt3;
subtype IOMUXCELL_3_CONFIG_MSS_IOMUXSEL5_3_Field is Interfaces.SF2.UInt3;
-- No description provided for this register
type IOMUXCELL_3_CONFIG_Register is record
-- No description provided for this field
MSS_IOMUXSEL0_3 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL1_3 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL2_3 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL3_3 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL4_3 : IOMUXCELL_3_CONFIG_MSS_IOMUXSEL4_3_Field := 16#0#;
-- No description provided for this field
MSS_IOMUXSEL5_3 : IOMUXCELL_3_CONFIG_MSS_IOMUXSEL5_3_Field := 16#0#;
-- unspecified
Reserved_10_31 : Interfaces.SF2.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for IOMUXCELL_3_CONFIG_Register use record
MSS_IOMUXSEL0_3 at 0 range 0 .. 0;
MSS_IOMUXSEL1_3 at 0 range 1 .. 1;
MSS_IOMUXSEL2_3 at 0 range 2 .. 2;
MSS_IOMUXSEL3_3 at 0 range 3 .. 3;
MSS_IOMUXSEL4_3 at 0 range 4 .. 6;
MSS_IOMUXSEL5_3 at 0 range 7 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
subtype IOMUXCELL_4_CONFIG_MSS_IOMUXSEL4_4_Field is Interfaces.SF2.UInt3;
subtype IOMUXCELL_4_CONFIG_MSS_IOMUXSEL5_4_Field is Interfaces.SF2.UInt3;
-- No description provided for this register
type IOMUXCELL_4_CONFIG_Register is record
-- No description provided for this field
MSS_IOMUXSEL0_4 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL1_4 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL2_4 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL3_4 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL4_4 : IOMUXCELL_4_CONFIG_MSS_IOMUXSEL4_4_Field := 16#0#;
-- No description provided for this field
MSS_IOMUXSEL5_4 : IOMUXCELL_4_CONFIG_MSS_IOMUXSEL5_4_Field := 16#0#;
-- unspecified
Reserved_10_31 : Interfaces.SF2.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for IOMUXCELL_4_CONFIG_Register use record
MSS_IOMUXSEL0_4 at 0 range 0 .. 0;
MSS_IOMUXSEL1_4 at 0 range 1 .. 1;
MSS_IOMUXSEL2_4 at 0 range 2 .. 2;
MSS_IOMUXSEL3_4 at 0 range 3 .. 3;
MSS_IOMUXSEL4_4 at 0 range 4 .. 6;
MSS_IOMUXSEL5_4 at 0 range 7 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
subtype IOMUXCELL_5_CONFIG_MSS_IOMUXSEL4_5_Field is Interfaces.SF2.UInt3;
subtype IOMUXCELL_5_CONFIG_MSS_IOMUXSEL5_5_Field is Interfaces.SF2.UInt3;
-- No description provided for this register
type IOMUXCELL_5_CONFIG_Register is record
-- No description provided for this field
MSS_IOMUXSEL0_5 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL1_5 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL2_5 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL3_5 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL4_5 : IOMUXCELL_5_CONFIG_MSS_IOMUXSEL4_5_Field := 16#0#;
-- No description provided for this field
MSS_IOMUXSEL5_5 : IOMUXCELL_5_CONFIG_MSS_IOMUXSEL5_5_Field := 16#0#;
-- unspecified
Reserved_10_31 : Interfaces.SF2.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for IOMUXCELL_5_CONFIG_Register use record
MSS_IOMUXSEL0_5 at 0 range 0 .. 0;
MSS_IOMUXSEL1_5 at 0 range 1 .. 1;
MSS_IOMUXSEL2_5 at 0 range 2 .. 2;
MSS_IOMUXSEL3_5 at 0 range 3 .. 3;
MSS_IOMUXSEL4_5 at 0 range 4 .. 6;
MSS_IOMUXSEL5_5 at 0 range 7 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
subtype IOMUXCELL_6_CONFIG_MSS_IOMUXSEL4_6_Field is Interfaces.SF2.UInt3;
subtype IOMUXCELL_6_CONFIG_MSS_IOMUXSEL5_6_Field is Interfaces.SF2.UInt3;
-- No description provided for this register
type IOMUXCELL_6_CONFIG_Register is record
-- No description provided for this field
MSS_IOMUXSEL0_6 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL1_6 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL2_6 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL3_6 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL4_6 : IOMUXCELL_6_CONFIG_MSS_IOMUXSEL4_6_Field := 16#0#;
-- No description provided for this field
MSS_IOMUXSEL5_6 : IOMUXCELL_6_CONFIG_MSS_IOMUXSEL5_6_Field := 16#0#;
-- unspecified
Reserved_10_31 : Interfaces.SF2.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for IOMUXCELL_6_CONFIG_Register use record
MSS_IOMUXSEL0_6 at 0 range 0 .. 0;
MSS_IOMUXSEL1_6 at 0 range 1 .. 1;
MSS_IOMUXSEL2_6 at 0 range 2 .. 2;
MSS_IOMUXSEL3_6 at 0 range 3 .. 3;
MSS_IOMUXSEL4_6 at 0 range 4 .. 6;
MSS_IOMUXSEL5_6 at 0 range 7 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
subtype IOMUXCELL_7_CONFIG_MSS_IOMUXSEL4_7_Field is Interfaces.SF2.UInt3;
subtype IOMUXCELL_7_CONFIG_MSS_IOMUXSEL5_7_Field is Interfaces.SF2.UInt3;
-- No description provided for this register
type IOMUXCELL_7_CONFIG_Register is record
-- No description provided for this field
MSS_IOMUXSEL0_7 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL1_7 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL2_7 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL3_7 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL4_7 : IOMUXCELL_7_CONFIG_MSS_IOMUXSEL4_7_Field := 16#0#;
-- No description provided for this field
MSS_IOMUXSEL5_7 : IOMUXCELL_7_CONFIG_MSS_IOMUXSEL5_7_Field := 16#0#;
-- unspecified
Reserved_10_31 : Interfaces.SF2.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for IOMUXCELL_7_CONFIG_Register use record
MSS_IOMUXSEL0_7 at 0 range 0 .. 0;
MSS_IOMUXSEL1_7 at 0 range 1 .. 1;
MSS_IOMUXSEL2_7 at 0 range 2 .. 2;
MSS_IOMUXSEL3_7 at 0 range 3 .. 3;
MSS_IOMUXSEL4_7 at 0 range 4 .. 6;
MSS_IOMUXSEL5_7 at 0 range 7 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
subtype IOMUXCELL_8_CONFIG_MSS_IOMUXSEL4_8_Field is Interfaces.SF2.UInt3;
subtype IOMUXCELL_8_CONFIG_MSS_IOMUXSEL5_8_Field is Interfaces.SF2.UInt3;
-- No description provided for this register
type IOMUXCELL_8_CONFIG_Register is record
-- No description provided for this field
MSS_IOMUXSEL0_8 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL1_8 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL2_8 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL3_8 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL4_8 : IOMUXCELL_8_CONFIG_MSS_IOMUXSEL4_8_Field := 16#0#;
-- No description provided for this field
MSS_IOMUXSEL5_8 : IOMUXCELL_8_CONFIG_MSS_IOMUXSEL5_8_Field := 16#0#;
-- unspecified
Reserved_10_31 : Interfaces.SF2.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for IOMUXCELL_8_CONFIG_Register use record
MSS_IOMUXSEL0_8 at 0 range 0 .. 0;
MSS_IOMUXSEL1_8 at 0 range 1 .. 1;
MSS_IOMUXSEL2_8 at 0 range 2 .. 2;
MSS_IOMUXSEL3_8 at 0 range 3 .. 3;
MSS_IOMUXSEL4_8 at 0 range 4 .. 6;
MSS_IOMUXSEL5_8 at 0 range 7 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
subtype IOMUXCELL_9_CONFIG_MSS_IOMUXSEL4_9_Field is Interfaces.SF2.UInt3;
subtype IOMUXCELL_9_CONFIG_MSS_IOMUXSEL5_9_Field is Interfaces.SF2.UInt3;
-- No description provided for this register
type IOMUXCELL_9_CONFIG_Register is record
-- No description provided for this field
MSS_IOMUXSEL0_9 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL1_9 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL2_9 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL3_9 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL4_9 : IOMUXCELL_9_CONFIG_MSS_IOMUXSEL4_9_Field := 16#0#;
-- No description provided for this field
MSS_IOMUXSEL5_9 : IOMUXCELL_9_CONFIG_MSS_IOMUXSEL5_9_Field := 16#0#;
-- unspecified
Reserved_10_31 : Interfaces.SF2.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for IOMUXCELL_9_CONFIG_Register use record
MSS_IOMUXSEL0_9 at 0 range 0 .. 0;
MSS_IOMUXSEL1_9 at 0 range 1 .. 1;
MSS_IOMUXSEL2_9 at 0 range 2 .. 2;
MSS_IOMUXSEL3_9 at 0 range 3 .. 3;
MSS_IOMUXSEL4_9 at 0 range 4 .. 6;
MSS_IOMUXSEL5_9 at 0 range 7 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
subtype IOMUXCELL_10_CONFIG_MSS_IOMUXSEL4_10_Field is Interfaces.SF2.UInt3;
subtype IOMUXCELL_10_CONFIG_MSS_IOMUXSEL5_10_Field is Interfaces.SF2.UInt3;
-- No description provided for this register
type IOMUXCELL_10_CONFIG_Register is record
-- No description provided for this field
MSS_IOMUXSEL0_10 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL1_10 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL2_10 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL3_10 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL4_10 : IOMUXCELL_10_CONFIG_MSS_IOMUXSEL4_10_Field := 16#0#;
-- No description provided for this field
MSS_IOMUXSEL5_10 : IOMUXCELL_10_CONFIG_MSS_IOMUXSEL5_10_Field := 16#0#;
-- unspecified
Reserved_10_31 : Interfaces.SF2.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for IOMUXCELL_10_CONFIG_Register use record
MSS_IOMUXSEL0_10 at 0 range 0 .. 0;
MSS_IOMUXSEL1_10 at 0 range 1 .. 1;
MSS_IOMUXSEL2_10 at 0 range 2 .. 2;
MSS_IOMUXSEL3_10 at 0 range 3 .. 3;
MSS_IOMUXSEL4_10 at 0 range 4 .. 6;
MSS_IOMUXSEL5_10 at 0 range 7 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
subtype IOMUXCELL_11_CONFIG_MSS_IOMUXSEL4_11_Field is Interfaces.SF2.UInt3;
subtype IOMUXCELL_11_CONFIG_MSS_IOMUXSEL5_11_Field is Interfaces.SF2.UInt3;
-- No description provided for this register
type IOMUXCELL_11_CONFIG_Register is record
-- No description provided for this field
MSS_IOMUXSEL0_11 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL1_11 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL2_11 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL3_11 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL4_11 : IOMUXCELL_11_CONFIG_MSS_IOMUXSEL4_11_Field := 16#0#;
-- No description provided for this field
MSS_IOMUXSEL5_11 : IOMUXCELL_11_CONFIG_MSS_IOMUXSEL5_11_Field := 16#0#;
-- unspecified
Reserved_10_31 : Interfaces.SF2.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for IOMUXCELL_11_CONFIG_Register use record
MSS_IOMUXSEL0_11 at 0 range 0 .. 0;
MSS_IOMUXSEL1_11 at 0 range 1 .. 1;
MSS_IOMUXSEL2_11 at 0 range 2 .. 2;
MSS_IOMUXSEL3_11 at 0 range 3 .. 3;
MSS_IOMUXSEL4_11 at 0 range 4 .. 6;
MSS_IOMUXSEL5_11 at 0 range 7 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
subtype IOMUXCELL_12_CONFIG_MSS_IOMUXSEL4_12_Field is Interfaces.SF2.UInt3;
subtype IOMUXCELL_12_CONFIG_MSS_IOMUXSEL5_12_Field is Interfaces.SF2.UInt3;
-- No description provided for this register
type IOMUXCELL_12_CONFIG_Register is record
-- No description provided for this field
MSS_IOMUXSEL0_12 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL1_12 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL2_12 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL3_12 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL4_12 : IOMUXCELL_12_CONFIG_MSS_IOMUXSEL4_12_Field := 16#0#;
-- No description provided for this field
MSS_IOMUXSEL5_12 : IOMUXCELL_12_CONFIG_MSS_IOMUXSEL5_12_Field := 16#0#;
-- unspecified
Reserved_10_31 : Interfaces.SF2.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for IOMUXCELL_12_CONFIG_Register use record
MSS_IOMUXSEL0_12 at 0 range 0 .. 0;
MSS_IOMUXSEL1_12 at 0 range 1 .. 1;
MSS_IOMUXSEL2_12 at 0 range 2 .. 2;
MSS_IOMUXSEL3_12 at 0 range 3 .. 3;
MSS_IOMUXSEL4_12 at 0 range 4 .. 6;
MSS_IOMUXSEL5_12 at 0 range 7 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
subtype IOMUXCELL_13_CONFIG_MSS_IOMUXSEL4_13_Field is Interfaces.SF2.UInt3;
subtype IOMUXCELL_13_CONFIG_MSS_IOMUXSEL5_13_Field is Interfaces.SF2.UInt3;
-- No description provided for this register
type IOMUXCELL_13_CONFIG_Register is record
-- No description provided for this field
MSS_IOMUXSEL0_13 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL1_13 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL2_13 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL3_13 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL4_13 : IOMUXCELL_13_CONFIG_MSS_IOMUXSEL4_13_Field := 16#0#;
-- No description provided for this field
MSS_IOMUXSEL5_13 : IOMUXCELL_13_CONFIG_MSS_IOMUXSEL5_13_Field := 16#0#;
-- unspecified
Reserved_10_31 : Interfaces.SF2.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for IOMUXCELL_13_CONFIG_Register use record
MSS_IOMUXSEL0_13 at 0 range 0 .. 0;
MSS_IOMUXSEL1_13 at 0 range 1 .. 1;
MSS_IOMUXSEL2_13 at 0 range 2 .. 2;
MSS_IOMUXSEL3_13 at 0 range 3 .. 3;
MSS_IOMUXSEL4_13 at 0 range 4 .. 6;
MSS_IOMUXSEL5_13 at 0 range 7 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
subtype IOMUXCELL_14_CONFIG_MSS_IOMUXSEL4_14_Field is Interfaces.SF2.UInt3;
subtype IOMUXCELL_14_CONFIG_MSS_IOMUXSEL5_14_Field is Interfaces.SF2.UInt3;
-- No description provided for this register
type IOMUXCELL_14_CONFIG_Register is record
-- No description provided for this field
MSS_IOMUXSEL0_14 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL1_14 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL2_14 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL3_14 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL4_14 : IOMUXCELL_14_CONFIG_MSS_IOMUXSEL4_14_Field := 16#0#;
-- No description provided for this field
MSS_IOMUXSEL5_14 : IOMUXCELL_14_CONFIG_MSS_IOMUXSEL5_14_Field := 16#0#;
-- unspecified
Reserved_10_31 : Interfaces.SF2.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for IOMUXCELL_14_CONFIG_Register use record
MSS_IOMUXSEL0_14 at 0 range 0 .. 0;
MSS_IOMUXSEL1_14 at 0 range 1 .. 1;
MSS_IOMUXSEL2_14 at 0 range 2 .. 2;
MSS_IOMUXSEL3_14 at 0 range 3 .. 3;
MSS_IOMUXSEL4_14 at 0 range 4 .. 6;
MSS_IOMUXSEL5_14 at 0 range 7 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
subtype IOMUXCELL_15_CONFIG_MSS_IOMUXSEL4_15_Field is Interfaces.SF2.UInt3;
subtype IOMUXCELL_15_CONFIG_MSS_IOMUXSEL5_15_Field is Interfaces.SF2.UInt3;
-- No description provided for this register
type IOMUXCELL_15_CONFIG_Register is record
-- No description provided for this field
MSS_IOMUXSEL0_15 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL1_15 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL2_15 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL3_15 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL4_15 : IOMUXCELL_15_CONFIG_MSS_IOMUXSEL4_15_Field := 16#0#;
-- No description provided for this field
MSS_IOMUXSEL5_15 : IOMUXCELL_15_CONFIG_MSS_IOMUXSEL5_15_Field := 16#0#;
-- unspecified
Reserved_10_31 : Interfaces.SF2.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for IOMUXCELL_15_CONFIG_Register use record
MSS_IOMUXSEL0_15 at 0 range 0 .. 0;
MSS_IOMUXSEL1_15 at 0 range 1 .. 1;
MSS_IOMUXSEL2_15 at 0 range 2 .. 2;
MSS_IOMUXSEL3_15 at 0 range 3 .. 3;
MSS_IOMUXSEL4_15 at 0 range 4 .. 6;
MSS_IOMUXSEL5_15 at 0 range 7 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
subtype IOMUXCELL_16_CONFIG_MSS_IOMUXSEL4_16_Field is Interfaces.SF2.UInt3;
subtype IOMUXCELL_16_CONFIG_MSS_IOMUXSEL5_16_Field is Interfaces.SF2.UInt3;
-- No description provided for this register
type IOMUXCELL_16_CONFIG_Register is record
-- No description provided for this field
MSS_IOMUXSEL0_16 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL1_16 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL2_16 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL3_16 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL4_16 : IOMUXCELL_16_CONFIG_MSS_IOMUXSEL4_16_Field := 16#0#;
-- No description provided for this field
MSS_IOMUXSEL5_16 : IOMUXCELL_16_CONFIG_MSS_IOMUXSEL5_16_Field := 16#0#;
-- unspecified
Reserved_10_31 : Interfaces.SF2.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for IOMUXCELL_16_CONFIG_Register use record
MSS_IOMUXSEL0_16 at 0 range 0 .. 0;
MSS_IOMUXSEL1_16 at 0 range 1 .. 1;
MSS_IOMUXSEL2_16 at 0 range 2 .. 2;
MSS_IOMUXSEL3_16 at 0 range 3 .. 3;
MSS_IOMUXSEL4_16 at 0 range 4 .. 6;
MSS_IOMUXSEL5_16 at 0 range 7 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
subtype IOMUXCELL_17_CONFIG_MSS_IOMUXSEL4_17_Field is Interfaces.SF2.UInt3;
subtype IOMUXCELL_17_CONFIG_MSS_IOMUXSEL5_17_Field is Interfaces.SF2.UInt3;
-- No description provided for this register
type IOMUXCELL_17_CONFIG_Register is record
-- No description provided for this field
MSS_IOMUXSEL0_17 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL1_17 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL2_17 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL3_17 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL4_17 : IOMUXCELL_17_CONFIG_MSS_IOMUXSEL4_17_Field := 16#0#;
-- No description provided for this field
MSS_IOMUXSEL5_17 : IOMUXCELL_17_CONFIG_MSS_IOMUXSEL5_17_Field := 16#0#;
-- unspecified
Reserved_10_31 : Interfaces.SF2.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for IOMUXCELL_17_CONFIG_Register use record
MSS_IOMUXSEL0_17 at 0 range 0 .. 0;
MSS_IOMUXSEL1_17 at 0 range 1 .. 1;
MSS_IOMUXSEL2_17 at 0 range 2 .. 2;
MSS_IOMUXSEL3_17 at 0 range 3 .. 3;
MSS_IOMUXSEL4_17 at 0 range 4 .. 6;
MSS_IOMUXSEL5_17 at 0 range 7 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
subtype IOMUXCELL_18_CONFIG_MSS_IOMUXSEL4_18_Field is Interfaces.SF2.UInt3;
subtype IOMUXCELL_18_CONFIG_MSS_IOMUXSEL5_18_Field is Interfaces.SF2.UInt3;
-- No description provided for this register
type IOMUXCELL_18_CONFIG_Register is record
-- No description provided for this field
MSS_IOMUXSEL0_18 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL1_18 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL2_18 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL3_18 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL4_18 : IOMUXCELL_18_CONFIG_MSS_IOMUXSEL4_18_Field := 16#0#;
-- No description provided for this field
MSS_IOMUXSEL5_18 : IOMUXCELL_18_CONFIG_MSS_IOMUXSEL5_18_Field := 16#0#;
-- unspecified
Reserved_10_31 : Interfaces.SF2.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for IOMUXCELL_18_CONFIG_Register use record
MSS_IOMUXSEL0_18 at 0 range 0 .. 0;
MSS_IOMUXSEL1_18 at 0 range 1 .. 1;
MSS_IOMUXSEL2_18 at 0 range 2 .. 2;
MSS_IOMUXSEL3_18 at 0 range 3 .. 3;
MSS_IOMUXSEL4_18 at 0 range 4 .. 6;
MSS_IOMUXSEL5_18 at 0 range 7 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
subtype IOMUXCELL_19_CONFIG_MSS_IOMUXSEL4_19_Field is Interfaces.SF2.UInt3;
subtype IOMUXCELL_19_CONFIG_MSS_IOMUXSEL5_19_Field is Interfaces.SF2.UInt3;
-- No description provided for this register
type IOMUXCELL_19_CONFIG_Register is record
-- No description provided for this field
MSS_IOMUXSEL0_19 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL1_19 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL2_19 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL3_19 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL4_19 : IOMUXCELL_19_CONFIG_MSS_IOMUXSEL4_19_Field := 16#0#;
-- No description provided for this field
MSS_IOMUXSEL5_19 : IOMUXCELL_19_CONFIG_MSS_IOMUXSEL5_19_Field := 16#0#;
-- unspecified
Reserved_10_31 : Interfaces.SF2.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for IOMUXCELL_19_CONFIG_Register use record
MSS_IOMUXSEL0_19 at 0 range 0 .. 0;
MSS_IOMUXSEL1_19 at 0 range 1 .. 1;
MSS_IOMUXSEL2_19 at 0 range 2 .. 2;
MSS_IOMUXSEL3_19 at 0 range 3 .. 3;
MSS_IOMUXSEL4_19 at 0 range 4 .. 6;
MSS_IOMUXSEL5_19 at 0 range 7 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
subtype IOMUXCELL_20_CONFIG_MSS_IOMUXSEL4_20_Field is Interfaces.SF2.UInt3;
subtype IOMUXCELL_20_CONFIG_MSS_IOMUXSEL5_20_Field is Interfaces.SF2.UInt3;
-- No description provided for this register
type IOMUXCELL_20_CONFIG_Register is record
-- No description provided for this field
MSS_IOMUXSEL0_20 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL1_20 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL2_20 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL3_20 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL4_20 : IOMUXCELL_20_CONFIG_MSS_IOMUXSEL4_20_Field := 16#0#;
-- No description provided for this field
MSS_IOMUXSEL5_20 : IOMUXCELL_20_CONFIG_MSS_IOMUXSEL5_20_Field := 16#0#;
-- unspecified
Reserved_10_31 : Interfaces.SF2.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for IOMUXCELL_20_CONFIG_Register use record
MSS_IOMUXSEL0_20 at 0 range 0 .. 0;
MSS_IOMUXSEL1_20 at 0 range 1 .. 1;
MSS_IOMUXSEL2_20 at 0 range 2 .. 2;
MSS_IOMUXSEL3_20 at 0 range 3 .. 3;
MSS_IOMUXSEL4_20 at 0 range 4 .. 6;
MSS_IOMUXSEL5_20 at 0 range 7 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
subtype IOMUXCELL_21_CONFIG_MSS_IOMUXSEL4_21_Field is Interfaces.SF2.UInt3;
subtype IOMUXCELL_21_CONFIG_MSS_IOMUXSEL5_21_Field is Interfaces.SF2.UInt3;
-- No description provided for this register
type IOMUXCELL_21_CONFIG_Register is record
-- No description provided for this field
MSS_IOMUXSEL0_21 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL1_21 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL2_21 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL3_21 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL4_21 : IOMUXCELL_21_CONFIG_MSS_IOMUXSEL4_21_Field := 16#0#;
-- No description provided for this field
MSS_IOMUXSEL5_21 : IOMUXCELL_21_CONFIG_MSS_IOMUXSEL5_21_Field := 16#0#;
-- unspecified
Reserved_10_31 : Interfaces.SF2.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for IOMUXCELL_21_CONFIG_Register use record
MSS_IOMUXSEL0_21 at 0 range 0 .. 0;
MSS_IOMUXSEL1_21 at 0 range 1 .. 1;
MSS_IOMUXSEL2_21 at 0 range 2 .. 2;
MSS_IOMUXSEL3_21 at 0 range 3 .. 3;
MSS_IOMUXSEL4_21 at 0 range 4 .. 6;
MSS_IOMUXSEL5_21 at 0 range 7 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
subtype IOMUXCELL_22_CONFIG_MSS_IOMUXSEL4_22_Field is Interfaces.SF2.UInt3;
subtype IOMUXCELL_22_CONFIG_MSS_IOMUXSEL5_22_Field is Interfaces.SF2.UInt3;
-- No description provided for this register
type IOMUXCELL_22_CONFIG_Register is record
-- No description provided for this field
MSS_IOMUXSEL0_22 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL1_22 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL2_22 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL3_22 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL4_22 : IOMUXCELL_22_CONFIG_MSS_IOMUXSEL4_22_Field := 16#0#;
-- No description provided for this field
MSS_IOMUXSEL5_22 : IOMUXCELL_22_CONFIG_MSS_IOMUXSEL5_22_Field := 16#0#;
-- unspecified
Reserved_10_31 : Interfaces.SF2.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for IOMUXCELL_22_CONFIG_Register use record
MSS_IOMUXSEL0_22 at 0 range 0 .. 0;
MSS_IOMUXSEL1_22 at 0 range 1 .. 1;
MSS_IOMUXSEL2_22 at 0 range 2 .. 2;
MSS_IOMUXSEL3_22 at 0 range 3 .. 3;
MSS_IOMUXSEL4_22 at 0 range 4 .. 6;
MSS_IOMUXSEL5_22 at 0 range 7 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
subtype IOMUXCELL_23_CONFIG_MSS_IOMUXSEL4_23_Field is Interfaces.SF2.UInt3;
subtype IOMUXCELL_23_CONFIG_MSS_IOMUXSEL5_23_Field is Interfaces.SF2.UInt3;
-- No description provided for this register
type IOMUXCELL_23_CONFIG_Register is record
-- No description provided for this field
MSS_IOMUXSEL0_23 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL1_23 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL2_23 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL3_23 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL4_23 : IOMUXCELL_23_CONFIG_MSS_IOMUXSEL4_23_Field := 16#0#;
-- No description provided for this field
MSS_IOMUXSEL5_23 : IOMUXCELL_23_CONFIG_MSS_IOMUXSEL5_23_Field := 16#0#;
-- unspecified
Reserved_10_31 : Interfaces.SF2.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for IOMUXCELL_23_CONFIG_Register use record
MSS_IOMUXSEL0_23 at 0 range 0 .. 0;
MSS_IOMUXSEL1_23 at 0 range 1 .. 1;
MSS_IOMUXSEL2_23 at 0 range 2 .. 2;
MSS_IOMUXSEL3_23 at 0 range 3 .. 3;
MSS_IOMUXSEL4_23 at 0 range 4 .. 6;
MSS_IOMUXSEL5_23 at 0 range 7 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
subtype IOMUXCELL_24_CONFIG_MSS_IOMUXSEL4_24_Field is Interfaces.SF2.UInt3;
subtype IOMUXCELL_24_CONFIG_MSS_IOMUXSEL5_24_Field is Interfaces.SF2.UInt3;
-- No description provided for this register
type IOMUXCELL_24_CONFIG_Register is record
-- No description provided for this field
MSS_IOMUXSEL0_24 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL1_24 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL2_24 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL3_24 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL4_24 : IOMUXCELL_24_CONFIG_MSS_IOMUXSEL4_24_Field := 16#0#;
-- No description provided for this field
MSS_IOMUXSEL5_24 : IOMUXCELL_24_CONFIG_MSS_IOMUXSEL5_24_Field := 16#0#;
-- unspecified
Reserved_10_31 : Interfaces.SF2.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for IOMUXCELL_24_CONFIG_Register use record
MSS_IOMUXSEL0_24 at 0 range 0 .. 0;
MSS_IOMUXSEL1_24 at 0 range 1 .. 1;
MSS_IOMUXSEL2_24 at 0 range 2 .. 2;
MSS_IOMUXSEL3_24 at 0 range 3 .. 3;
MSS_IOMUXSEL4_24 at 0 range 4 .. 6;
MSS_IOMUXSEL5_24 at 0 range 7 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
subtype IOMUXCELL_25_CONFIG_MSS_IOMUXSEL4_25_Field is Interfaces.SF2.UInt3;
subtype IOMUXCELL_25_CONFIG_MSS_IOMUXSEL5_25_Field is Interfaces.SF2.UInt3;
-- No description provided for this register
type IOMUXCELL_25_CONFIG_Register is record
-- No description provided for this field
MSS_IOMUXSEL0_25 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL1_25 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL2_25 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL3_25 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL4_25 : IOMUXCELL_25_CONFIG_MSS_IOMUXSEL4_25_Field := 16#0#;
-- No description provided for this field
MSS_IOMUXSEL5_25 : IOMUXCELL_25_CONFIG_MSS_IOMUXSEL5_25_Field := 16#0#;
-- unspecified
Reserved_10_31 : Interfaces.SF2.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for IOMUXCELL_25_CONFIG_Register use record
MSS_IOMUXSEL0_25 at 0 range 0 .. 0;
MSS_IOMUXSEL1_25 at 0 range 1 .. 1;
MSS_IOMUXSEL2_25 at 0 range 2 .. 2;
MSS_IOMUXSEL3_25 at 0 range 3 .. 3;
MSS_IOMUXSEL4_25 at 0 range 4 .. 6;
MSS_IOMUXSEL5_25 at 0 range 7 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
subtype IOMUXCELL_26_CONFIG_MSS_IOMUXSEL4_26_Field is Interfaces.SF2.UInt3;
subtype IOMUXCELL_26_CONFIG_MSS_IOMUXSEL5_26_Field is Interfaces.SF2.UInt3;
-- No description provided for this register
type IOMUXCELL_26_CONFIG_Register is record
-- No description provided for this field
MSS_IOMUXSEL0_26 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL1_26 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL2_26 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL3_26 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL4_26 : IOMUXCELL_26_CONFIG_MSS_IOMUXSEL4_26_Field := 16#0#;
-- No description provided for this field
MSS_IOMUXSEL5_26 : IOMUXCELL_26_CONFIG_MSS_IOMUXSEL5_26_Field := 16#0#;
-- unspecified
Reserved_10_31 : Interfaces.SF2.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for IOMUXCELL_26_CONFIG_Register use record
MSS_IOMUXSEL0_26 at 0 range 0 .. 0;
MSS_IOMUXSEL1_26 at 0 range 1 .. 1;
MSS_IOMUXSEL2_26 at 0 range 2 .. 2;
MSS_IOMUXSEL3_26 at 0 range 3 .. 3;
MSS_IOMUXSEL4_26 at 0 range 4 .. 6;
MSS_IOMUXSEL5_26 at 0 range 7 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
subtype IOMUXCELL_27_CONFIG_MSS_IOMUXSEL4_27_Field is Interfaces.SF2.UInt3;
subtype IOMUXCELL_27_CONFIG_MSS_IOMUXSEL5_27_Field is Interfaces.SF2.UInt3;
-- No description provided for this register
type IOMUXCELL_27_CONFIG_Register is record
-- No description provided for this field
MSS_IOMUXSEL0_27 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL1_27 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL2_27 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL3_27 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL4_27 : IOMUXCELL_27_CONFIG_MSS_IOMUXSEL4_27_Field := 16#0#;
-- No description provided for this field
MSS_IOMUXSEL5_27 : IOMUXCELL_27_CONFIG_MSS_IOMUXSEL5_27_Field := 16#0#;
-- unspecified
Reserved_10_31 : Interfaces.SF2.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for IOMUXCELL_27_CONFIG_Register use record
MSS_IOMUXSEL0_27 at 0 range 0 .. 0;
MSS_IOMUXSEL1_27 at 0 range 1 .. 1;
MSS_IOMUXSEL2_27 at 0 range 2 .. 2;
MSS_IOMUXSEL3_27 at 0 range 3 .. 3;
MSS_IOMUXSEL4_27 at 0 range 4 .. 6;
MSS_IOMUXSEL5_27 at 0 range 7 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
subtype IOMUXCELL_28_CONFIG_MSS_IOMUXSEL4_28_Field is Interfaces.SF2.UInt3;
subtype IOMUXCELL_28_CONFIG_MSS_IOMUXSEL5_28_Field is Interfaces.SF2.UInt3;
-- No description provided for this register
type IOMUXCELL_28_CONFIG_Register is record
-- No description provided for this field
MSS_IOMUXSEL0_28 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL1_28 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL2_28 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL3_28 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL4_28 : IOMUXCELL_28_CONFIG_MSS_IOMUXSEL4_28_Field := 16#0#;
-- No description provided for this field
MSS_IOMUXSEL5_28 : IOMUXCELL_28_CONFIG_MSS_IOMUXSEL5_28_Field := 16#0#;
-- unspecified
Reserved_10_31 : Interfaces.SF2.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for IOMUXCELL_28_CONFIG_Register use record
MSS_IOMUXSEL0_28 at 0 range 0 .. 0;
MSS_IOMUXSEL1_28 at 0 range 1 .. 1;
MSS_IOMUXSEL2_28 at 0 range 2 .. 2;
MSS_IOMUXSEL3_28 at 0 range 3 .. 3;
MSS_IOMUXSEL4_28 at 0 range 4 .. 6;
MSS_IOMUXSEL5_28 at 0 range 7 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
subtype IOMUXCELL_29_CONFIG_MSS_IOMUXSEL4_29_Field is Interfaces.SF2.UInt3;
subtype IOMUXCELL_29_CONFIG_MSS_IOMUXSEL5_29_Field is Interfaces.SF2.UInt3;
-- No description provided for this register
type IOMUXCELL_29_CONFIG_Register is record
-- No description provided for this field
MSS_IOMUXSEL0_29 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL1_29 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL2_29 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL3_29 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL4_29 : IOMUXCELL_29_CONFIG_MSS_IOMUXSEL4_29_Field := 16#0#;
-- No description provided for this field
MSS_IOMUXSEL5_29 : IOMUXCELL_29_CONFIG_MSS_IOMUXSEL5_29_Field := 16#0#;
-- unspecified
Reserved_10_31 : Interfaces.SF2.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for IOMUXCELL_29_CONFIG_Register use record
MSS_IOMUXSEL0_29 at 0 range 0 .. 0;
MSS_IOMUXSEL1_29 at 0 range 1 .. 1;
MSS_IOMUXSEL2_29 at 0 range 2 .. 2;
MSS_IOMUXSEL3_29 at 0 range 3 .. 3;
MSS_IOMUXSEL4_29 at 0 range 4 .. 6;
MSS_IOMUXSEL5_29 at 0 range 7 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
subtype IOMUXCELL_30_CONFIG_MSS_IOMUXSEL4_30_Field is Interfaces.SF2.UInt3;
subtype IOMUXCELL_30_CONFIG_MSS_IOMUXSEL5_30_Field is Interfaces.SF2.UInt3;
-- No description provided for this register
type IOMUXCELL_30_CONFIG_Register is record
-- No description provided for this field
MSS_IOMUXSEL0_30 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL1_30 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL2_30 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL3_30 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL4_30 : IOMUXCELL_30_CONFIG_MSS_IOMUXSEL4_30_Field := 16#0#;
-- No description provided for this field
MSS_IOMUXSEL5_30 : IOMUXCELL_30_CONFIG_MSS_IOMUXSEL5_30_Field := 16#0#;
-- unspecified
Reserved_10_31 : Interfaces.SF2.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for IOMUXCELL_30_CONFIG_Register use record
MSS_IOMUXSEL0_30 at 0 range 0 .. 0;
MSS_IOMUXSEL1_30 at 0 range 1 .. 1;
MSS_IOMUXSEL2_30 at 0 range 2 .. 2;
MSS_IOMUXSEL3_30 at 0 range 3 .. 3;
MSS_IOMUXSEL4_30 at 0 range 4 .. 6;
MSS_IOMUXSEL5_30 at 0 range 7 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
subtype IOMUXCELL_31_CONFIG_MSS_IOMUXSEL4_31_Field is Interfaces.SF2.UInt3;
subtype IOMUXCELL_31_CONFIG_MSS_IOMUXSEL5_31_Field is Interfaces.SF2.UInt3;
-- No description provided for this register
type IOMUXCELL_31_CONFIG_Register is record
-- No description provided for this field
MSS_IOMUXSEL0_31 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL1_31 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL2_31 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL3_31 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL4_31 : IOMUXCELL_31_CONFIG_MSS_IOMUXSEL4_31_Field := 16#0#;
-- No description provided for this field
MSS_IOMUXSEL5_31 : IOMUXCELL_31_CONFIG_MSS_IOMUXSEL5_31_Field := 16#0#;
-- unspecified
Reserved_10_31 : Interfaces.SF2.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for IOMUXCELL_31_CONFIG_Register use record
MSS_IOMUXSEL0_31 at 0 range 0 .. 0;
MSS_IOMUXSEL1_31 at 0 range 1 .. 1;
MSS_IOMUXSEL2_31 at 0 range 2 .. 2;
MSS_IOMUXSEL3_31 at 0 range 3 .. 3;
MSS_IOMUXSEL4_31 at 0 range 4 .. 6;
MSS_IOMUXSEL5_31 at 0 range 7 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
subtype IOMUXCELL_32_CONFIG_MSS_IOMUXSEL4_32_Field is Interfaces.SF2.UInt3;
subtype IOMUXCELL_32_CONFIG_MSS_IOMUXSEL5_32_Field is Interfaces.SF2.UInt3;
-- No description provided for this register
type IOMUXCELL_32_CONFIG_Register is record
-- No description provided for this field
MSS_IOMUXSEL0_32 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL1_32 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL2_32 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL3_32 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL4_32 : IOMUXCELL_32_CONFIG_MSS_IOMUXSEL4_32_Field := 16#0#;
-- No description provided for this field
MSS_IOMUXSEL5_32 : IOMUXCELL_32_CONFIG_MSS_IOMUXSEL5_32_Field := 16#0#;
-- unspecified
Reserved_10_31 : Interfaces.SF2.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for IOMUXCELL_32_CONFIG_Register use record
MSS_IOMUXSEL0_32 at 0 range 0 .. 0;
MSS_IOMUXSEL1_32 at 0 range 1 .. 1;
MSS_IOMUXSEL2_32 at 0 range 2 .. 2;
MSS_IOMUXSEL3_32 at 0 range 3 .. 3;
MSS_IOMUXSEL4_32 at 0 range 4 .. 6;
MSS_IOMUXSEL5_32 at 0 range 7 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
subtype IOMUXCELL_33_CONFIG_MSS_IOMUXSEL4_33_Field is Interfaces.SF2.UInt3;
subtype IOMUXCELL_33_CONFIG_MSS_IOMUXSEL5_33_Field is Interfaces.SF2.UInt3;
-- No description provided for this register
type IOMUXCELL_33_CONFIG_Register is record
-- No description provided for this field
MSS_IOMUXSEL0_33 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL1_33 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL2_33 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL3_33 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL4_33 : IOMUXCELL_33_CONFIG_MSS_IOMUXSEL4_33_Field := 16#0#;
-- No description provided for this field
MSS_IOMUXSEL5_33 : IOMUXCELL_33_CONFIG_MSS_IOMUXSEL5_33_Field := 16#0#;
-- unspecified
Reserved_10_31 : Interfaces.SF2.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for IOMUXCELL_33_CONFIG_Register use record
MSS_IOMUXSEL0_33 at 0 range 0 .. 0;
MSS_IOMUXSEL1_33 at 0 range 1 .. 1;
MSS_IOMUXSEL2_33 at 0 range 2 .. 2;
MSS_IOMUXSEL3_33 at 0 range 3 .. 3;
MSS_IOMUXSEL4_33 at 0 range 4 .. 6;
MSS_IOMUXSEL5_33 at 0 range 7 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
subtype IOMUXCELL_34_CONFIG_MSS_IOMUXSEL4_34_Field is Interfaces.SF2.UInt3;
subtype IOMUXCELL_34_CONFIG_MSS_IOMUXSEL5_34_Field is Interfaces.SF2.UInt3;
-- No description provided for this register
type IOMUXCELL_34_CONFIG_Register is record
-- No description provided for this field
MSS_IOMUXSEL0_34 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL1_34 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL2_34 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL3_34 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL4_34 : IOMUXCELL_34_CONFIG_MSS_IOMUXSEL4_34_Field := 16#0#;
-- No description provided for this field
MSS_IOMUXSEL5_34 : IOMUXCELL_34_CONFIG_MSS_IOMUXSEL5_34_Field := 16#0#;
-- unspecified
Reserved_10_31 : Interfaces.SF2.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for IOMUXCELL_34_CONFIG_Register use record
MSS_IOMUXSEL0_34 at 0 range 0 .. 0;
MSS_IOMUXSEL1_34 at 0 range 1 .. 1;
MSS_IOMUXSEL2_34 at 0 range 2 .. 2;
MSS_IOMUXSEL3_34 at 0 range 3 .. 3;
MSS_IOMUXSEL4_34 at 0 range 4 .. 6;
MSS_IOMUXSEL5_34 at 0 range 7 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
subtype IOMUXCELL_35_CONFIG_MSS_IOMUXSEL4_35_Field is Interfaces.SF2.UInt3;
subtype IOMUXCELL_35_CONFIG_MSS_IOMUXSEL5_35_Field is Interfaces.SF2.UInt3;
-- No description provided for this register
type IOMUXCELL_35_CONFIG_Register is record
-- No description provided for this field
MSS_IOMUXSEL0_35 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL1_35 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL2_35 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL3_35 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL4_35 : IOMUXCELL_35_CONFIG_MSS_IOMUXSEL4_35_Field := 16#0#;
-- No description provided for this field
MSS_IOMUXSEL5_35 : IOMUXCELL_35_CONFIG_MSS_IOMUXSEL5_35_Field := 16#0#;
-- unspecified
Reserved_10_31 : Interfaces.SF2.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for IOMUXCELL_35_CONFIG_Register use record
MSS_IOMUXSEL0_35 at 0 range 0 .. 0;
MSS_IOMUXSEL1_35 at 0 range 1 .. 1;
MSS_IOMUXSEL2_35 at 0 range 2 .. 2;
MSS_IOMUXSEL3_35 at 0 range 3 .. 3;
MSS_IOMUXSEL4_35 at 0 range 4 .. 6;
MSS_IOMUXSEL5_35 at 0 range 7 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
subtype IOMUXCELL_36_CONFIG_MSS_IOMUXSEL4_36_Field is Interfaces.SF2.UInt3;
subtype IOMUXCELL_36_CONFIG_MSS_IOMUXSEL5_36_Field is Interfaces.SF2.UInt3;
-- No description provided for this register
type IOMUXCELL_36_CONFIG_Register is record
-- No description provided for this field
MSS_IOMUXSEL0_36 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL1_36 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL2_36 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL3_36 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL4_36 : IOMUXCELL_36_CONFIG_MSS_IOMUXSEL4_36_Field := 16#0#;
-- No description provided for this field
MSS_IOMUXSEL5_36 : IOMUXCELL_36_CONFIG_MSS_IOMUXSEL5_36_Field := 16#0#;
-- unspecified
Reserved_10_31 : Interfaces.SF2.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for IOMUXCELL_36_CONFIG_Register use record
MSS_IOMUXSEL0_36 at 0 range 0 .. 0;
MSS_IOMUXSEL1_36 at 0 range 1 .. 1;
MSS_IOMUXSEL2_36 at 0 range 2 .. 2;
MSS_IOMUXSEL3_36 at 0 range 3 .. 3;
MSS_IOMUXSEL4_36 at 0 range 4 .. 6;
MSS_IOMUXSEL5_36 at 0 range 7 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
subtype IOMUXCELL_37_CONFIG_MSS_IOMUXSEL4_37_Field is Interfaces.SF2.UInt3;
subtype IOMUXCELL_37_CONFIG_MSS_IOMUXSEL5_37_Field is Interfaces.SF2.UInt3;
-- No description provided for this register
type IOMUXCELL_37_CONFIG_Register is record
-- No description provided for this field
MSS_IOMUXSEL0_37 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL1_37 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL2_37 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL3_37 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL4_37 : IOMUXCELL_37_CONFIG_MSS_IOMUXSEL4_37_Field := 16#0#;
-- No description provided for this field
MSS_IOMUXSEL5_37 : IOMUXCELL_37_CONFIG_MSS_IOMUXSEL5_37_Field := 16#0#;
-- unspecified
Reserved_10_31 : Interfaces.SF2.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for IOMUXCELL_37_CONFIG_Register use record
MSS_IOMUXSEL0_37 at 0 range 0 .. 0;
MSS_IOMUXSEL1_37 at 0 range 1 .. 1;
MSS_IOMUXSEL2_37 at 0 range 2 .. 2;
MSS_IOMUXSEL3_37 at 0 range 3 .. 3;
MSS_IOMUXSEL4_37 at 0 range 4 .. 6;
MSS_IOMUXSEL5_37 at 0 range 7 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
subtype IOMUXCELL_38_CONFIG_MSS_IOMUXSEL4_38_Field is Interfaces.SF2.UInt3;
subtype IOMUXCELL_38_CONFIG_MSS_IOMUXSEL5_38_Field is Interfaces.SF2.UInt3;
-- No description provided for this register
type IOMUXCELL_38_CONFIG_Register is record
-- No description provided for this field
MSS_IOMUXSEL0_38 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL1_38 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL2_38 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL3_38 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL4_38 : IOMUXCELL_38_CONFIG_MSS_IOMUXSEL4_38_Field := 16#0#;
-- No description provided for this field
MSS_IOMUXSEL5_38 : IOMUXCELL_38_CONFIG_MSS_IOMUXSEL5_38_Field := 16#0#;
-- unspecified
Reserved_10_31 : Interfaces.SF2.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for IOMUXCELL_38_CONFIG_Register use record
MSS_IOMUXSEL0_38 at 0 range 0 .. 0;
MSS_IOMUXSEL1_38 at 0 range 1 .. 1;
MSS_IOMUXSEL2_38 at 0 range 2 .. 2;
MSS_IOMUXSEL3_38 at 0 range 3 .. 3;
MSS_IOMUXSEL4_38 at 0 range 4 .. 6;
MSS_IOMUXSEL5_38 at 0 range 7 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
subtype IOMUXCELL_39_CONFIG_MSS_IOMUXSEL4_39_Field is Interfaces.SF2.UInt3;
subtype IOMUXCELL_39_CONFIG_MSS_IOMUXSEL5_39_Field is Interfaces.SF2.UInt3;
-- No description provided for this register
type IOMUXCELL_39_CONFIG_Register is record
-- No description provided for this field
MSS_IOMUXSEL0_39 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL1_39 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL2_39 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL3_39 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL4_39 : IOMUXCELL_39_CONFIG_MSS_IOMUXSEL4_39_Field := 16#0#;
-- No description provided for this field
MSS_IOMUXSEL5_39 : IOMUXCELL_39_CONFIG_MSS_IOMUXSEL5_39_Field := 16#0#;
-- unspecified
Reserved_10_31 : Interfaces.SF2.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for IOMUXCELL_39_CONFIG_Register use record
MSS_IOMUXSEL0_39 at 0 range 0 .. 0;
MSS_IOMUXSEL1_39 at 0 range 1 .. 1;
MSS_IOMUXSEL2_39 at 0 range 2 .. 2;
MSS_IOMUXSEL3_39 at 0 range 3 .. 3;
MSS_IOMUXSEL4_39 at 0 range 4 .. 6;
MSS_IOMUXSEL5_39 at 0 range 7 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
subtype IOMUXCELL_40_CONFIG_MSS_IOMUXSEL4_40_Field is Interfaces.SF2.UInt3;
subtype IOMUXCELL_40_CONFIG_MSS_IOMUXSEL5_40_Field is Interfaces.SF2.UInt3;
-- No description provided for this register
type IOMUXCELL_40_CONFIG_Register is record
-- No description provided for this field
MSS_IOMUXSEL0_40 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL1_40 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL2_40 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL3_40 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL4_40 : IOMUXCELL_40_CONFIG_MSS_IOMUXSEL4_40_Field := 16#0#;
-- No description provided for this field
MSS_IOMUXSEL5_40 : IOMUXCELL_40_CONFIG_MSS_IOMUXSEL5_40_Field := 16#0#;
-- unspecified
Reserved_10_31 : Interfaces.SF2.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for IOMUXCELL_40_CONFIG_Register use record
MSS_IOMUXSEL0_40 at 0 range 0 .. 0;
MSS_IOMUXSEL1_40 at 0 range 1 .. 1;
MSS_IOMUXSEL2_40 at 0 range 2 .. 2;
MSS_IOMUXSEL3_40 at 0 range 3 .. 3;
MSS_IOMUXSEL4_40 at 0 range 4 .. 6;
MSS_IOMUXSEL5_40 at 0 range 7 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
subtype IOMUXCELL_41_CONFIG_MSS_IOMUXSEL4_41_Field is Interfaces.SF2.UInt3;
subtype IOMUXCELL_41_CONFIG_MSS_IOMUXSEL5_41_Field is Interfaces.SF2.UInt3;
-- No description provided for this register
type IOMUXCELL_41_CONFIG_Register is record
-- No description provided for this field
MSS_IOMUXSEL0_41 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL1_41 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL2_41 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL3_41 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL4_41 : IOMUXCELL_41_CONFIG_MSS_IOMUXSEL4_41_Field := 16#0#;
-- No description provided for this field
MSS_IOMUXSEL5_41 : IOMUXCELL_41_CONFIG_MSS_IOMUXSEL5_41_Field := 16#0#;
-- unspecified
Reserved_10_31 : Interfaces.SF2.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for IOMUXCELL_41_CONFIG_Register use record
MSS_IOMUXSEL0_41 at 0 range 0 .. 0;
MSS_IOMUXSEL1_41 at 0 range 1 .. 1;
MSS_IOMUXSEL2_41 at 0 range 2 .. 2;
MSS_IOMUXSEL3_41 at 0 range 3 .. 3;
MSS_IOMUXSEL4_41 at 0 range 4 .. 6;
MSS_IOMUXSEL5_41 at 0 range 7 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
subtype IOMUXCELL_42_CONFIG_MSS_IOMUXSEL4_42_Field is Interfaces.SF2.UInt3;
subtype IOMUXCELL_42_CONFIG_MSS_IOMUXSEL5_42_Field is Interfaces.SF2.UInt3;
-- No description provided for this register
type IOMUXCELL_42_CONFIG_Register is record
-- No description provided for this field
MSS_IOMUXSEL0_42 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL1_42 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL2_42 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL3_42 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL4_42 : IOMUXCELL_42_CONFIG_MSS_IOMUXSEL4_42_Field := 16#0#;
-- No description provided for this field
MSS_IOMUXSEL5_42 : IOMUXCELL_42_CONFIG_MSS_IOMUXSEL5_42_Field := 16#0#;
-- unspecified
Reserved_10_31 : Interfaces.SF2.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for IOMUXCELL_42_CONFIG_Register use record
MSS_IOMUXSEL0_42 at 0 range 0 .. 0;
MSS_IOMUXSEL1_42 at 0 range 1 .. 1;
MSS_IOMUXSEL2_42 at 0 range 2 .. 2;
MSS_IOMUXSEL3_42 at 0 range 3 .. 3;
MSS_IOMUXSEL4_42 at 0 range 4 .. 6;
MSS_IOMUXSEL5_42 at 0 range 7 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
subtype IOMUXCELL_43_CONFIG_MSS_IOMUXSEL4_43_Field is Interfaces.SF2.UInt3;
subtype IOMUXCELL_43_CONFIG_MSS_IOMUXSEL5_43_Field is Interfaces.SF2.UInt3;
-- No description provided for this register
type IOMUXCELL_43_CONFIG_Register is record
-- No description provided for this field
MSS_IOMUXSEL0_43 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL1_43 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL2_43 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL3_43 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL4_43 : IOMUXCELL_43_CONFIG_MSS_IOMUXSEL4_43_Field := 16#0#;
-- No description provided for this field
MSS_IOMUXSEL5_43 : IOMUXCELL_43_CONFIG_MSS_IOMUXSEL5_43_Field := 16#0#;
-- unspecified
Reserved_10_31 : Interfaces.SF2.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for IOMUXCELL_43_CONFIG_Register use record
MSS_IOMUXSEL0_43 at 0 range 0 .. 0;
MSS_IOMUXSEL1_43 at 0 range 1 .. 1;
MSS_IOMUXSEL2_43 at 0 range 2 .. 2;
MSS_IOMUXSEL3_43 at 0 range 3 .. 3;
MSS_IOMUXSEL4_43 at 0 range 4 .. 6;
MSS_IOMUXSEL5_43 at 0 range 7 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
subtype IOMUXCELL_44_CONFIG_MSS_IOMUXSEL4_44_Field is Interfaces.SF2.UInt3;
subtype IOMUXCELL_44_CONFIG_MSS_IOMUXSEL5_44_Field is Interfaces.SF2.UInt3;
-- No description provided for this register
type IOMUXCELL_44_CONFIG_Register is record
-- No description provided for this field
MSS_IOMUXSEL0_44 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL1_44 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL2_44 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL3_44 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL4_44 : IOMUXCELL_44_CONFIG_MSS_IOMUXSEL4_44_Field := 16#0#;
-- No description provided for this field
MSS_IOMUXSEL5_44 : IOMUXCELL_44_CONFIG_MSS_IOMUXSEL5_44_Field := 16#0#;
-- unspecified
Reserved_10_31 : Interfaces.SF2.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for IOMUXCELL_44_CONFIG_Register use record
MSS_IOMUXSEL0_44 at 0 range 0 .. 0;
MSS_IOMUXSEL1_44 at 0 range 1 .. 1;
MSS_IOMUXSEL2_44 at 0 range 2 .. 2;
MSS_IOMUXSEL3_44 at 0 range 3 .. 3;
MSS_IOMUXSEL4_44 at 0 range 4 .. 6;
MSS_IOMUXSEL5_44 at 0 range 7 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
subtype IOMUXCELL_45_CONFIG_MSS_IOMUXSEL4_45_Field is Interfaces.SF2.UInt3;
subtype IOMUXCELL_45_CONFIG_MSS_IOMUXSEL5_45_Field is Interfaces.SF2.UInt3;
-- No description provided for this register
type IOMUXCELL_45_CONFIG_Register is record
-- No description provided for this field
MSS_IOMUXSEL0_45 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL1_45 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL2_45 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL3_45 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL4_45 : IOMUXCELL_45_CONFIG_MSS_IOMUXSEL4_45_Field := 16#0#;
-- No description provided for this field
MSS_IOMUXSEL5_45 : IOMUXCELL_45_CONFIG_MSS_IOMUXSEL5_45_Field := 16#0#;
-- unspecified
Reserved_10_31 : Interfaces.SF2.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for IOMUXCELL_45_CONFIG_Register use record
MSS_IOMUXSEL0_45 at 0 range 0 .. 0;
MSS_IOMUXSEL1_45 at 0 range 1 .. 1;
MSS_IOMUXSEL2_45 at 0 range 2 .. 2;
MSS_IOMUXSEL3_45 at 0 range 3 .. 3;
MSS_IOMUXSEL4_45 at 0 range 4 .. 6;
MSS_IOMUXSEL5_45 at 0 range 7 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
subtype IOMUXCELL_46_CONFIG_MSS_IOMUXSEL4_46_Field is Interfaces.SF2.UInt3;
subtype IOMUXCELL_46_CONFIG_MSS_IOMUXSEL5_46_Field is Interfaces.SF2.UInt3;
-- No description provided for this register
type IOMUXCELL_46_CONFIG_Register is record
-- No description provided for this field
MSS_IOMUXSEL0_46 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL1_46 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL2_46 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL3_46 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL4_46 : IOMUXCELL_46_CONFIG_MSS_IOMUXSEL4_46_Field := 16#0#;
-- No description provided for this field
MSS_IOMUXSEL5_46 : IOMUXCELL_46_CONFIG_MSS_IOMUXSEL5_46_Field := 16#0#;
-- unspecified
Reserved_10_31 : Interfaces.SF2.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for IOMUXCELL_46_CONFIG_Register use record
MSS_IOMUXSEL0_46 at 0 range 0 .. 0;
MSS_IOMUXSEL1_46 at 0 range 1 .. 1;
MSS_IOMUXSEL2_46 at 0 range 2 .. 2;
MSS_IOMUXSEL3_46 at 0 range 3 .. 3;
MSS_IOMUXSEL4_46 at 0 range 4 .. 6;
MSS_IOMUXSEL5_46 at 0 range 7 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
subtype IOMUXCELL_47_CONFIG_MSS_IOMUXSEL4_47_Field is Interfaces.SF2.UInt3;
subtype IOMUXCELL_47_CONFIG_MSS_IOMUXSEL5_47_Field is Interfaces.SF2.UInt3;
-- No description provided for this register
type IOMUXCELL_47_CONFIG_Register is record
-- No description provided for this field
MSS_IOMUXSEL0_47 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL1_47 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL2_47 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL3_47 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL4_47 : IOMUXCELL_47_CONFIG_MSS_IOMUXSEL4_47_Field := 16#0#;
-- No description provided for this field
MSS_IOMUXSEL5_47 : IOMUXCELL_47_CONFIG_MSS_IOMUXSEL5_47_Field := 16#0#;
-- unspecified
Reserved_10_31 : Interfaces.SF2.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for IOMUXCELL_47_CONFIG_Register use record
MSS_IOMUXSEL0_47 at 0 range 0 .. 0;
MSS_IOMUXSEL1_47 at 0 range 1 .. 1;
MSS_IOMUXSEL2_47 at 0 range 2 .. 2;
MSS_IOMUXSEL3_47 at 0 range 3 .. 3;
MSS_IOMUXSEL4_47 at 0 range 4 .. 6;
MSS_IOMUXSEL5_47 at 0 range 7 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
subtype IOMUXCELL_48_CONFIG_MSS_IOMUXSEL4_48_Field is Interfaces.SF2.UInt3;
subtype IOMUXCELL_48_CONFIG_MSS_IOMUXSEL5_48_Field is Interfaces.SF2.UInt3;
-- No description provided for this register
type IOMUXCELL_48_CONFIG_Register is record
-- No description provided for this field
MSS_IOMUXSEL0_48 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL1_48 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL2_48 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL3_48 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL4_48 : IOMUXCELL_48_CONFIG_MSS_IOMUXSEL4_48_Field := 16#0#;
-- No description provided for this field
MSS_IOMUXSEL5_48 : IOMUXCELL_48_CONFIG_MSS_IOMUXSEL5_48_Field := 16#0#;
-- unspecified
Reserved_10_31 : Interfaces.SF2.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for IOMUXCELL_48_CONFIG_Register use record
MSS_IOMUXSEL0_48 at 0 range 0 .. 0;
MSS_IOMUXSEL1_48 at 0 range 1 .. 1;
MSS_IOMUXSEL2_48 at 0 range 2 .. 2;
MSS_IOMUXSEL3_48 at 0 range 3 .. 3;
MSS_IOMUXSEL4_48 at 0 range 4 .. 6;
MSS_IOMUXSEL5_48 at 0 range 7 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
subtype IOMUXCELL_49_CONFIG_MSS_IOMUXSEL4_49_Field is Interfaces.SF2.UInt3;
subtype IOMUXCELL_49_CONFIG_MSS_IOMUXSEL5_49_Field is Interfaces.SF2.UInt3;
-- No description provided for this register
type IOMUXCELL_49_CONFIG_Register is record
-- No description provided for this field
MSS_IOMUXSEL0_49 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL1_49 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL2_49 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL3_49 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL4_49 : IOMUXCELL_49_CONFIG_MSS_IOMUXSEL4_49_Field := 16#0#;
-- No description provided for this field
MSS_IOMUXSEL5_49 : IOMUXCELL_49_CONFIG_MSS_IOMUXSEL5_49_Field := 16#0#;
-- unspecified
Reserved_10_31 : Interfaces.SF2.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for IOMUXCELL_49_CONFIG_Register use record
MSS_IOMUXSEL0_49 at 0 range 0 .. 0;
MSS_IOMUXSEL1_49 at 0 range 1 .. 1;
MSS_IOMUXSEL2_49 at 0 range 2 .. 2;
MSS_IOMUXSEL3_49 at 0 range 3 .. 3;
MSS_IOMUXSEL4_49 at 0 range 4 .. 6;
MSS_IOMUXSEL5_49 at 0 range 7 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
subtype IOMUXCELL_50_CONFIG_MSS_IOMUXSEL4_50_Field is Interfaces.SF2.UInt3;
subtype IOMUXCELL_50_CONFIG_MSS_IOMUXSEL5_50_Field is Interfaces.SF2.UInt3;
-- No description provided for this register
type IOMUXCELL_50_CONFIG_Register is record
-- No description provided for this field
MSS_IOMUXSEL0_50 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL1_50 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL2_50 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL3_50 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL4_50 : IOMUXCELL_50_CONFIG_MSS_IOMUXSEL4_50_Field := 16#0#;
-- No description provided for this field
MSS_IOMUXSEL5_50 : IOMUXCELL_50_CONFIG_MSS_IOMUXSEL5_50_Field := 16#0#;
-- unspecified
Reserved_10_31 : Interfaces.SF2.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for IOMUXCELL_50_CONFIG_Register use record
MSS_IOMUXSEL0_50 at 0 range 0 .. 0;
MSS_IOMUXSEL1_50 at 0 range 1 .. 1;
MSS_IOMUXSEL2_50 at 0 range 2 .. 2;
MSS_IOMUXSEL3_50 at 0 range 3 .. 3;
MSS_IOMUXSEL4_50 at 0 range 4 .. 6;
MSS_IOMUXSEL5_50 at 0 range 7 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
subtype IOMUXCELL_51_CONFIG_MSS_IOMUXSEL4_51_Field is Interfaces.SF2.UInt3;
subtype IOMUXCELL_51_CONFIG_MSS_IOMUXSEL5_51_Field is Interfaces.SF2.UInt3;
-- No description provided for this register
type IOMUXCELL_51_CONFIG_Register is record
-- No description provided for this field
MSS_IOMUXSEL0_51 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL1_51 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL2_51 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL3_51 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL4_51 : IOMUXCELL_51_CONFIG_MSS_IOMUXSEL4_51_Field := 16#0#;
-- No description provided for this field
MSS_IOMUXSEL5_51 : IOMUXCELL_51_CONFIG_MSS_IOMUXSEL5_51_Field := 16#0#;
-- unspecified
Reserved_10_31 : Interfaces.SF2.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for IOMUXCELL_51_CONFIG_Register use record
MSS_IOMUXSEL0_51 at 0 range 0 .. 0;
MSS_IOMUXSEL1_51 at 0 range 1 .. 1;
MSS_IOMUXSEL2_51 at 0 range 2 .. 2;
MSS_IOMUXSEL3_51 at 0 range 3 .. 3;
MSS_IOMUXSEL4_51 at 0 range 4 .. 6;
MSS_IOMUXSEL5_51 at 0 range 7 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
subtype IOMUXCELL_52_CONFIG_MSS_IOMUXSEL4_52_Field is Interfaces.SF2.UInt3;
subtype IOMUXCELL_52_CONFIG_MSS_IOMUXSEL5_52_Field is Interfaces.SF2.UInt3;
-- No description provided for this register
type IOMUXCELL_52_CONFIG_Register is record
-- No description provided for this field
MSS_IOMUXSEL0_52 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL1_52 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL2_52 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL3_52 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL4_52 : IOMUXCELL_52_CONFIG_MSS_IOMUXSEL4_52_Field := 16#0#;
-- No description provided for this field
MSS_IOMUXSEL5_52 : IOMUXCELL_52_CONFIG_MSS_IOMUXSEL5_52_Field := 16#0#;
-- unspecified
Reserved_10_31 : Interfaces.SF2.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for IOMUXCELL_52_CONFIG_Register use record
MSS_IOMUXSEL0_52 at 0 range 0 .. 0;
MSS_IOMUXSEL1_52 at 0 range 1 .. 1;
MSS_IOMUXSEL2_52 at 0 range 2 .. 2;
MSS_IOMUXSEL3_52 at 0 range 3 .. 3;
MSS_IOMUXSEL4_52 at 0 range 4 .. 6;
MSS_IOMUXSEL5_52 at 0 range 7 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
subtype IOMUXCELL_53_CONFIG_MSS_IOMUXSEL4_53_Field is Interfaces.SF2.UInt3;
subtype IOMUXCELL_53_CONFIG_MSS_IOMUXSEL5_53_Field is Interfaces.SF2.UInt3;
-- No description provided for this register
type IOMUXCELL_53_CONFIG_Register is record
-- No description provided for this field
MSS_IOMUXSEL0_53 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL1_53 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL2_53 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL3_53 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL4_53 : IOMUXCELL_53_CONFIG_MSS_IOMUXSEL4_53_Field := 16#0#;
-- No description provided for this field
MSS_IOMUXSEL5_53 : IOMUXCELL_53_CONFIG_MSS_IOMUXSEL5_53_Field := 16#0#;
-- unspecified
Reserved_10_31 : Interfaces.SF2.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for IOMUXCELL_53_CONFIG_Register use record
MSS_IOMUXSEL0_53 at 0 range 0 .. 0;
MSS_IOMUXSEL1_53 at 0 range 1 .. 1;
MSS_IOMUXSEL2_53 at 0 range 2 .. 2;
MSS_IOMUXSEL3_53 at 0 range 3 .. 3;
MSS_IOMUXSEL4_53 at 0 range 4 .. 6;
MSS_IOMUXSEL5_53 at 0 range 7 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
subtype IOMUXCELL_54_CONFIG_MSS_IOMUXSEL4_54_Field is Interfaces.SF2.UInt3;
subtype IOMUXCELL_54_CONFIG_MSS_IOMUXSEL5_54_Field is Interfaces.SF2.UInt3;
-- No description provided for this register
type IOMUXCELL_54_CONFIG_Register is record
-- No description provided for this field
MSS_IOMUXSEL0_54 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL1_54 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL2_54 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL3_54 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL4_54 : IOMUXCELL_54_CONFIG_MSS_IOMUXSEL4_54_Field := 16#0#;
-- No description provided for this field
MSS_IOMUXSEL5_54 : IOMUXCELL_54_CONFIG_MSS_IOMUXSEL5_54_Field := 16#0#;
-- unspecified
Reserved_10_31 : Interfaces.SF2.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for IOMUXCELL_54_CONFIG_Register use record
MSS_IOMUXSEL0_54 at 0 range 0 .. 0;
MSS_IOMUXSEL1_54 at 0 range 1 .. 1;
MSS_IOMUXSEL2_54 at 0 range 2 .. 2;
MSS_IOMUXSEL3_54 at 0 range 3 .. 3;
MSS_IOMUXSEL4_54 at 0 range 4 .. 6;
MSS_IOMUXSEL5_54 at 0 range 7 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
subtype IOMUXCELL_55_CONFIG_MSS_IOMUXSEL4_55_Field is Interfaces.SF2.UInt3;
subtype IOMUXCELL_55_CONFIG_MSS_IOMUXSEL5_55_Field is Interfaces.SF2.UInt3;
-- No description provided for this register
type IOMUXCELL_55_CONFIG_Register is record
-- No description provided for this field
MSS_IOMUXSEL0_55 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL1_55 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL2_55 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL3_55 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL4_55 : IOMUXCELL_55_CONFIG_MSS_IOMUXSEL4_55_Field := 16#0#;
-- No description provided for this field
MSS_IOMUXSEL5_55 : IOMUXCELL_55_CONFIG_MSS_IOMUXSEL5_55_Field := 16#0#;
-- unspecified
Reserved_10_31 : Interfaces.SF2.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for IOMUXCELL_55_CONFIG_Register use record
MSS_IOMUXSEL0_55 at 0 range 0 .. 0;
MSS_IOMUXSEL1_55 at 0 range 1 .. 1;
MSS_IOMUXSEL2_55 at 0 range 2 .. 2;
MSS_IOMUXSEL3_55 at 0 range 3 .. 3;
MSS_IOMUXSEL4_55 at 0 range 4 .. 6;
MSS_IOMUXSEL5_55 at 0 range 7 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
subtype IOMUXCELL_56_CONFIG_MSS_IOMUXSEL4_56_Field is Interfaces.SF2.UInt3;
subtype IOMUXCELL_56_CONFIG_MSS_IOMUXSEL5_56_Field is Interfaces.SF2.UInt3;
-- No description provided for this register
type IOMUXCELL_56_CONFIG_Register is record
-- No description provided for this field
MSS_IOMUXSEL0_56 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL1_56 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL2_56 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL3_56 : Boolean := False;
-- No description provided for this field
MSS_IOMUXSEL4_56 : IOMUXCELL_56_CONFIG_MSS_IOMUXSEL4_56_Field := 16#0#;
-- No description provided for this field
MSS_IOMUXSEL5_56 : IOMUXCELL_56_CONFIG_MSS_IOMUXSEL5_56_Field := 16#0#;
-- unspecified
Reserved_10_31 : Interfaces.SF2.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for IOMUXCELL_56_CONFIG_Register use record
MSS_IOMUXSEL0_56 at 0 range 0 .. 0;
MSS_IOMUXSEL1_56 at 0 range 1 .. 1;
MSS_IOMUXSEL2_56 at 0 range 2 .. 2;
MSS_IOMUXSEL3_56 at 0 range 3 .. 3;
MSS_IOMUXSEL4_56 at 0 range 4 .. 6;
MSS_IOMUXSEL5_56 at 0 range 7 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
-- No description provided for this register
type NVM_PROTECT_FACTORY_Register is record
-- No description provided for this field
NVM0F_LOWER_M3ACCESS : Boolean := False;
-- No description provided for this field
NVM0F_LOWER_FABRIC_ACCESS : Boolean := False;
-- No description provided for this field
NVM0F_LOWER_OTHERS_ACCESS : Boolean := False;
-- No description provided for this field
NVM0F_LOWER_WRITE_ALLOWED : Boolean := False;
-- No description provided for this field
NVM0F_UPPER_M3ACCESS : Boolean := False;
-- No description provided for this field
NVM0F_UPPER_FABRIC_ACCESS : Boolean := False;
-- No description provided for this field
NVM0F_UPPER_OTHERS_ACCESS : Boolean := False;
-- No description provided for this field
NVM0F_UPPER_WRITE_ALLOWED : Boolean := False;
-- No description provided for this field
NVM1F_LOWER_M3ACCESS : Boolean := False;
-- No description provided for this field
NVM1F_LOWER_FABRIC_ACCESS : Boolean := False;
-- No description provided for this field
NVM1F_LOWER_OTHERS_ACCESS : Boolean := False;
-- No description provided for this field
NVM1F_LOWER_WRITE_ALLOWED : Boolean := False;
-- No description provided for this field
NVM1F_UPPER_M3ACCESS : Boolean := False;
-- No description provided for this field
NVM1F_UPPER_FABRIC_ACCESS : Boolean := False;
-- No description provided for this field
NVM1F_UPPER_OTHERS_ACCESS : Boolean := False;
-- No description provided for this field
NVM1F_UPPER_WRITE_ALLOWED : Boolean := False;
-- unspecified
Reserved_16_31 : Interfaces.SF2.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for NVM_PROTECT_FACTORY_Register use record
NVM0F_LOWER_M3ACCESS at 0 range 0 .. 0;
NVM0F_LOWER_FABRIC_ACCESS at 0 range 1 .. 1;
NVM0F_LOWER_OTHERS_ACCESS at 0 range 2 .. 2;
NVM0F_LOWER_WRITE_ALLOWED at 0 range 3 .. 3;
NVM0F_UPPER_M3ACCESS at 0 range 4 .. 4;
NVM0F_UPPER_FABRIC_ACCESS at 0 range 5 .. 5;
NVM0F_UPPER_OTHERS_ACCESS at 0 range 6 .. 6;
NVM0F_UPPER_WRITE_ALLOWED at 0 range 7 .. 7;
NVM1F_LOWER_M3ACCESS at 0 range 8 .. 8;
NVM1F_LOWER_FABRIC_ACCESS at 0 range 9 .. 9;
NVM1F_LOWER_OTHERS_ACCESS at 0 range 10 .. 10;
NVM1F_LOWER_WRITE_ALLOWED at 0 range 11 .. 11;
NVM1F_UPPER_M3ACCESS at 0 range 12 .. 12;
NVM1F_UPPER_FABRIC_ACCESS at 0 range 13 .. 13;
NVM1F_UPPER_OTHERS_ACCESS at 0 range 14 .. 14;
NVM1F_UPPER_WRITE_ALLOWED at 0 range 15 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype DEVICE_STATUS_FIXED_ENVM_BLOCK_SIZE_Field is Interfaces.SF2.UInt2;
-- No description provided for this register
type DEVICE_STATUS_FIXED_Register is record
-- No description provided for this field
G4_FACTORY_TEST_MODE : Boolean := False;
-- No description provided for this field
M3_ALLOWED : Boolean := False;
-- No description provided for this field
CAN_ALLOWED : Boolean := False;
-- No description provided for this field
ENVM1_PRESENT : Boolean := False;
-- No description provided for this field
ENVM_BLOCK_SIZE : DEVICE_STATUS_FIXED_ENVM_BLOCK_SIZE_Field :=
16#0#;
-- No description provided for this field
FIC32_1_DISABLE : Boolean := False;
-- unspecified
Reserved_7_31 : Interfaces.SF2.UInt25 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for DEVICE_STATUS_FIXED_Register use record
G4_FACTORY_TEST_MODE at 0 range 0 .. 0;
M3_ALLOWED at 0 range 1 .. 1;
CAN_ALLOWED at 0 range 2 .. 2;
ENVM1_PRESENT at 0 range 3 .. 3;
ENVM_BLOCK_SIZE at 0 range 4 .. 5;
FIC32_1_DISABLE at 0 range 6 .. 6;
Reserved_7_31 at 0 range 7 .. 31;
end record;
-- MBIST_ES0_MBIST_ES0_ADDR array element
subtype MBIST_ES0_MBIST_ES0_ADDR_Element is Interfaces.SF2.UInt13;
-- MBIST_ES0_MBIST_ES0_ADDR array
type MBIST_ES0_MBIST_ES0_ADDR_Field_Array is array (0 .. 1)
of MBIST_ES0_MBIST_ES0_ADDR_Element
with Component_Size => 13, Size => 26;
-- Type definition for MBIST_ES0_MBIST_ES0_ADDR
type MBIST_ES0_MBIST_ES0_ADDR_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- MBIST_ES0_ADDR as a value
Val : Interfaces.SF2.UInt26;
when True =>
-- MBIST_ES0_ADDR as an array
Arr : MBIST_ES0_MBIST_ES0_ADDR_Field_Array;
end case;
end record
with Unchecked_Union, Size => 26;
for MBIST_ES0_MBIST_ES0_ADDR_Field use record
Val at 0 range 0 .. 25;
Arr at 0 range 0 .. 25;
end record;
subtype MBIST_ES0_MBIST_ES0_COUNT_Field is Interfaces.SF2.UInt2;
-- No description provided for this register
type MBIST_ES0_Register is record
-- No description provided for this field
MBIST_ES0_ADDR : MBIST_ES0_MBIST_ES0_ADDR_Field :=
(As_Array => False, Val => 16#0#);
-- No description provided for this field
MBIST_ES0_COUNT : MBIST_ES0_MBIST_ES0_COUNT_Field := 16#0#;
-- unspecified
Reserved_28_31 : Interfaces.SF2.UInt4 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for MBIST_ES0_Register use record
MBIST_ES0_ADDR at 0 range 0 .. 25;
MBIST_ES0_COUNT at 0 range 26 .. 27;
Reserved_28_31 at 0 range 28 .. 31;
end record;
-- MBIST_ES1_MBIST_ES1_ADDR array element
subtype MBIST_ES1_MBIST_ES1_ADDR_Element is Interfaces.SF2.UInt13;
-- MBIST_ES1_MBIST_ES1_ADDR array
type MBIST_ES1_MBIST_ES1_ADDR_Field_Array is array (0 .. 1)
of MBIST_ES1_MBIST_ES1_ADDR_Element
with Component_Size => 13, Size => 26;
-- Type definition for MBIST_ES1_MBIST_ES1_ADDR
type MBIST_ES1_MBIST_ES1_ADDR_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- MBIST_ES1_ADDR as a value
Val : Interfaces.SF2.UInt26;
when True =>
-- MBIST_ES1_ADDR as an array
Arr : MBIST_ES1_MBIST_ES1_ADDR_Field_Array;
end case;
end record
with Unchecked_Union, Size => 26;
for MBIST_ES1_MBIST_ES1_ADDR_Field use record
Val at 0 range 0 .. 25;
Arr at 0 range 0 .. 25;
end record;
subtype MBIST_ES1_MBIST_ES1_COUNT_Field is Interfaces.SF2.UInt2;
-- No description provided for this register
type MBIST_ES1_Register is record
-- No description provided for this field
MBIST_ES1_ADDR : MBIST_ES1_MBIST_ES1_ADDR_Field :=
(As_Array => False, Val => 16#0#);
-- No description provided for this field
MBIST_ES1_COUNT : MBIST_ES1_MBIST_ES1_COUNT_Field := 16#0#;
-- unspecified
Reserved_28_31 : Interfaces.SF2.UInt4 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for MBIST_ES1_Register use record
MBIST_ES1_ADDR at 0 range 0 .. 25;
MBIST_ES1_COUNT at 0 range 26 .. 27;
Reserved_28_31 at 0 range 28 .. 31;
end record;
-- No description provided for this register
type MSDDR_PLL_STAUS_1_Register is record
-- No description provided for this field
PLL_TEST_MODE : Boolean := False;
-- unspecified
Reserved_1_31 : Interfaces.SF2.UInt31 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for MSDDR_PLL_STAUS_1_Register use record
PLL_TEST_MODE at 0 range 0 .. 0;
Reserved_1_31 at 0 range 1 .. 31;
end record;
-- REDUNDANCY_ESRAM0_RED_ESRAM0_ADDR array element
subtype REDUNDANCY_ESRAM0_RED_ESRAM0_ADDR_Element is Interfaces.SF2.UInt13;
-- REDUNDANCY_ESRAM0_RED_ESRAM0_ADDR array
type REDUNDANCY_ESRAM0_RED_ESRAM0_ADDR_Field_Array is array (0 .. 1)
of REDUNDANCY_ESRAM0_RED_ESRAM0_ADDR_Element
with Component_Size => 13, Size => 26;
-- Type definition for REDUNDANCY_ESRAM0_RED_ESRAM0_ADDR
type REDUNDANCY_ESRAM0_RED_ESRAM0_ADDR_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- RED_ESRAM0_ADDR as a value
Val : Interfaces.SF2.UInt26;
when True =>
-- RED_ESRAM0_ADDR as an array
Arr : REDUNDANCY_ESRAM0_RED_ESRAM0_ADDR_Field_Array;
end case;
end record
with Unchecked_Union, Size => 26;
for REDUNDANCY_ESRAM0_RED_ESRAM0_ADDR_Field use record
Val at 0 range 0 .. 25;
Arr at 0 range 0 .. 25;
end record;
-- No description provided for this register
type REDUNDANCY_ESRAM0_Register is record
-- No description provided for this field
RED_ESRAM0_ADDR : REDUNDANCY_ESRAM0_RED_ESRAM0_ADDR_Field :=
(As_Array => False, Val => 16#0#);
-- unspecified
Reserved_26_31 : Interfaces.SF2.UInt6 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for REDUNDANCY_ESRAM0_Register use record
RED_ESRAM0_ADDR at 0 range 0 .. 25;
Reserved_26_31 at 0 range 26 .. 31;
end record;
-- REDUNDANCY_ESRAM1_RED_ESRAM1_ADDR array element
subtype REDUNDANCY_ESRAM1_RED_ESRAM1_ADDR_Element is Interfaces.SF2.UInt13;
-- REDUNDANCY_ESRAM1_RED_ESRAM1_ADDR array
type REDUNDANCY_ESRAM1_RED_ESRAM1_ADDR_Field_Array is array (0 .. 1)
of REDUNDANCY_ESRAM1_RED_ESRAM1_ADDR_Element
with Component_Size => 13, Size => 26;
-- Type definition for REDUNDANCY_ESRAM1_RED_ESRAM1_ADDR
type REDUNDANCY_ESRAM1_RED_ESRAM1_ADDR_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- RED_ESRAM1_ADDR as a value
Val : Interfaces.SF2.UInt26;
when True =>
-- RED_ESRAM1_ADDR as an array
Arr : REDUNDANCY_ESRAM1_RED_ESRAM1_ADDR_Field_Array;
end case;
end record
with Unchecked_Union, Size => 26;
for REDUNDANCY_ESRAM1_RED_ESRAM1_ADDR_Field use record
Val at 0 range 0 .. 25;
Arr at 0 range 0 .. 25;
end record;
-- No description provided for this register
type REDUNDANCY_ESRAM1_Register is record
-- No description provided for this field
RED_ESRAM1_ADDR : REDUNDANCY_ESRAM1_RED_ESRAM1_ADDR_Field :=
(As_Array => False, Val => 16#0#);
-- unspecified
Reserved_26_31 : Interfaces.SF2.UInt6 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for REDUNDANCY_ESRAM1_Register use record
RED_ESRAM1_ADDR at 0 range 0 .. 25;
Reserved_26_31 at 0 range 26 .. 31;
end record;
-- No description provided for this register
type SERDESIF_Register is record
-- No description provided for this field
SERDESIF0_GEN2 : Boolean := False;
-- No description provided for this field
SERDESIF1_GEN2 : Boolean := False;
-- unspecified
Reserved_2_31 : Interfaces.SF2.UInt30 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for SERDESIF_Register use record
SERDESIF0_GEN2 at 0 range 0 .. 0;
SERDESIF1_GEN2 at 0 range 1 .. 1;
Reserved_2_31 at 0 range 2 .. 31;
end record;
-----------------
-- Peripherals --
-----------------
-- No description provided for this peripheral
type System_Registers_Peripheral is record
-- No description provided for this register
ESRAM_CR : aliased ESRAM_CR_Register;
-- No description provided for this register
ESRAM_MAX_LAT_CR : aliased ESRAM_MAX_LAT_CR_Register;
-- No description provided for this register
DDR_CR : aliased DDR_CR_Register;
-- No description provided for this register
ENVM_CR : aliased ENVM_CR_Register;
-- No description provided for this register
ENVM_REMAP_BASE_CR : aliased ENVM_REMAP_BASE_CR_Register;
-- No description provided for this register
ENVM_REMAP_FAB_CR : aliased ENVM_REMAP_FAB_CR_Register;
-- No description provided for this register
CC_CR : aliased CC_CR_Register;
-- No description provided for this register
CC_REGION_CR : aliased CC_REGION_CR_Register;
-- No description provided for this register
CC_LOCK_BASE_ADDR_CR : aliased CC_LOCK_BASE_ADDR_CR_Register;
-- No description provided for this register
CC_FLUSH_INDX_CR : aliased CC_FLUSH_INDX_CR_Register;
-- No description provided for this register
DDRB_BUF_TIMER_CR : aliased DDRB_BUF_TIMER_CR_Register;
-- No description provided for this register
DDRB_NB_ADDR_CR : aliased DDRB_NB_ADDR_CR_Register;
-- No description provided for this register
DDRB_NB_SIZE_CR : aliased DDRB_NB_SIZE_CR_Register;
-- No description provided for this register
DDRB_CR : aliased DDRB_CR_Register;
-- No description provided for this register
EDAC_CR : aliased EDAC_CR_Register;
-- No description provided for this register
MASTER_WEIGHT0_CR : aliased MASTER_WEIGHT0_CR_Register;
-- No description provided for this register
MASTER_WEIGHT1_CR : aliased MASTER_WEIGHT1_CR_Register;
-- No description provided for this register
SOFT_IRQ_CR : aliased SOFT_IRQ_CR_Register;
-- No description provided for this register
SOFT_RESET_CR : aliased SOFT_RESET_CR_Register;
-- No description provided for this register
M3_CR : aliased M3_CR_Register;
-- No description provided for this register
FAB_IF_CR : aliased FAB_IF_CR_Register;
-- No description provided for this register
LOOPBACK_CR : aliased LOOPBACK_CR_Register;
-- No description provided for this register
GPIO_SYSRESET_SEL_CR : aliased GPIO_SYSRESET_SEL_CR_Register;
-- No description provided for this register
GPIN_SRC_SEL_CR : aliased Interfaces.SF2.UInt32;
-- No description provided for this register
MDDR_CR : aliased MDDR_CR_Register;
-- No description provided for this register
USB_IO_INPUT_SEL_CR : aliased USB_IO_INPUT_SEL_CR_Register;
-- No description provided for this register
PERIPH_CLK_MUX_SEL_CR : aliased PERIPH_CLK_MUX_SEL_CR_Register;
-- No description provided for this register
WDOG_CR : aliased WDOG_CR_Register;
-- No description provided for this register
MDDR_IO_CALIB_CR : aliased MDDR_IO_CALIB_CR_Register;
-- No description provided for this register
SPARE_OUT_CR : aliased SPARE_OUT_CR_Register;
-- No description provided for this register
EDAC_IRQ_ENABLE_CR : aliased EDAC_IRQ_ENABLE_CR_Register;
-- No description provided for this register
USB_CR : aliased USB_CR_Register;
-- No description provided for this register
ESRAM_PIPELINE_CR : aliased ESRAM_PIPELINE_CR_Register;
-- No description provided for this register
MSS_IRQ_ENABLE_CR : aliased MSS_IRQ_ENABLE_CR_Register;
-- No description provided for this register
RTC_WAKEUP_CR : aliased RTC_WAKEUP_CR_Register;
-- No description provided for this register
MAC_CR : aliased MAC_CR_Register;
-- No description provided for this register
MSSDDR_PLL_STATUS_LOW_CR : aliased MSSDDR_PLL_STATUS_LOW_CR_Register;
-- No description provided for this register
MSSDDR_PLL_STATUS_HIGH_CR : aliased MSSDDR_PLL_STATUS_HIGH_CR_Register;
-- No description provided for this register
MSSDDR_FACC1_CR : aliased MSSDDR_FACC1_CR_Register;
-- No description provided for this register
MSSDDR_FACC2_CR : aliased MSSDDR_FACC2_CR_Register;
-- No description provided for this register
PLL_LOCK_EN_CR : aliased PLL_LOCK_EN_CR_Register;
-- No description provided for this register
MSSDDR_CLK_CALIB_CR : aliased MSSDDR_CLK_CALIB_CR_Register;
-- No description provided for this register
PLL_DELAY_LINE_SEL_CR : aliased PLL_DELAY_LINE_SEL_CR_Register;
-- No description provided for this register
MAC_STAT_CLRONRD_CR : aliased MAC_STAT_CLRONRD_CR_Register;
-- No description provided for this register
RESET_SOURCE_CR : aliased RESET_SOURCE_CR_Register;
-- No description provided for this register
CC_ERRRSPADDRD_SR : aliased Interfaces.SF2.UInt32;
-- No description provided for this register
CC_ERRRSPADDRI_SR : aliased Interfaces.SF2.UInt32;
-- No description provided for this register
CC_ERRRSPADDRS_SR : aliased Interfaces.SF2.UInt32;
-- No description provided for this register
CC_ECCERRINDXADR_SR : aliased CC_ECCERRINDXADR_SR_Register;
-- No description provided for this register
CC_IC_MISS_CNTR_SR : aliased Interfaces.SF2.UInt32;
-- No description provided for this register
CC_IC_HIT_CNTR_SR : aliased Interfaces.SF2.UInt32;
-- No description provided for this register
CC_DC_MISS_CNTR_SR : aliased Interfaces.SF2.UInt32;
-- No description provided for this register
CC_DC_HIT_CNTR_CR : aliased Interfaces.SF2.UInt32;
-- No description provided for this register
CC_IC_TRANS_CNTR_SR : aliased Interfaces.SF2.UInt32;
-- No description provided for this register
CC_DC_TRANS_CNTR_SR : aliased Interfaces.SF2.UInt32;
-- No description provided for this register
DDRB_DS_ERR_ADR_SR : aliased Interfaces.SF2.UInt32;
-- No description provided for this register
DDRB_HPD_ERR_ADR_SR : aliased Interfaces.SF2.UInt32;
-- No description provided for this register
DDRB_SW_ERR_ADR_SR : aliased Interfaces.SF2.UInt32;
-- No description provided for this register
DDRB_BUF_EMPTY_SR : aliased DDRB_BUF_EMPTY_SR_Register;
-- No description provided for this register
DDRB_DSBL_DN_SR : aliased DDRB_DSBL_DN_SR_Register;
-- No description provided for this register
ESRAM0_EDAC_CNT : aliased ESRAM0_EDAC_CNT_Register;
-- No description provided for this register
ESRAM1_EDAC_CNT : aliased ESRAM1_EDAC_CNT_Register;
-- No description provided for this register
CC_EDAC_CNT : aliased CC_EDAC_CNT_Register;
-- No description provided for this register
MAC_EDAC_TX_CNT : aliased MAC_EDAC_TX_CNT_Register;
-- No description provided for this register
MAC_EDAC_RX_CNT : aliased MAC_EDAC_RX_CNT_Register;
-- No description provided for this register
USB_EDAC_CNT : aliased USB_EDAC_CNT_Register;
-- No description provided for this register
CAN_EDAC_CNT : aliased CAN_EDAC_CNT_Register;
-- No description provided for this register
ESRAM0_EDAC_ADR : aliased ESRAM0_EDAC_ADR_Register;
-- No description provided for this register
ESRAM1_EDAC_ADR : aliased ESRAM1_EDAC_ADR_Register;
-- No description provided for this register
MAC_EDAC_RX_ADR : aliased MAC_EDAC_RX_ADR_Register;
-- No description provided for this register
MAC_EDAC_TX_ADR : aliased MAC_EDAC_TX_ADR_Register;
-- No description provided for this register
CAN_EDAC_ADR : aliased CAN_EDAC_ADR_Register;
-- No description provided for this register
USB_EDAC_ADR : aliased USB_EDAC_ADR_Register;
-- No description provided for this register
MM0_1_2_SECURITY : aliased MM0_1_2_SECURITY_Register;
-- No description provided for this register
MM4_5_FIC64_SECURITY : aliased MM4_5_FIC64_SECURITY_Register;
-- No description provided for this register
MM3_6_7_8_SECURITY : aliased MM3_6_7_8_SECURITY_Register;
-- No description provided for this register
MM9_SECURITY : aliased MM9_SECURITY_Register;
-- No description provided for this register
M3_SR : aliased M3_SR_Register;
-- No description provided for this register
ETM_COUNT_LOW : aliased Interfaces.SF2.UInt32;
-- No description provided for this register
ETM_COUNT_HIGH : aliased ETM_COUNT_HIGH_Register;
-- No description provided for this register
DEVICE_SR : aliased DEVICE_SR_Register;
-- No description provided for this register
ENVM_PROTECT_USER : aliased ENVM_PROTECT_USER_Register;
-- No description provided for this register
G4C_ENVM_STATUS : aliased G4C_ENVM_STATUS_Register;
-- No description provided for this register
DEVICE_VERSION : aliased DEVICE_VERSION_Register;
-- No description provided for this register
MSSDDR_PLL_STATUS : aliased MSSDDR_PLL_STATUS_Register;
-- No description provided for this register
USB_SR : aliased USB_SR_Register;
-- No description provided for this register
ENVM_SR : aliased ENVM_SR_Register;
-- No description provided for this register
SPARE_IN : aliased SPARE_IN_Register;
-- No description provided for this register
DDRB_STATUS : aliased Interfaces.SF2.UInt32;
-- No description provided for this register
MDDR_IO_CALIB_STATUS : aliased MDDR_IO_CALIB_STATUS_Register;
-- No description provided for this register
MSSDDR_CLK_CALIB_STATUS : aliased MSSDDR_CLK_CALIB_STATUS_Register;
-- No description provided for this register
WDOGLOAD : aliased WDOGLOAD_Register;
-- No description provided for this register
WDOGMVRP : aliased Interfaces.SF2.UInt32;
-- No description provided for this register
USERCONFIG0 : aliased Interfaces.SF2.UInt32;
-- No description provided for this register
USERCONFIG1 : aliased Interfaces.SF2.UInt32;
-- No description provided for this register
USERCONFIG2 : aliased Interfaces.SF2.UInt32;
-- No description provided for this register
USERCONFIG3 : aliased Interfaces.SF2.UInt32;
-- No description provided for this register
FAB_PROT_SIZE : aliased FAB_PROT_SIZE_Register;
-- No description provided for this register
FAB_PROT_BASE : aliased Interfaces.SF2.UInt32;
-- No description provided for this register
MSS_GPIO_DEF : aliased MSS_GPIO_DEF_Register;
-- No description provided for this register
EDAC_SR : aliased EDAC_SR_Register;
-- No description provided for this register
MSS_INTERNAL_SR : aliased MSS_INTERNAL_SR_Register;
-- No description provided for this register
MSS_EXTERNAL_SR : aliased MSS_EXTERNAL_SR_Register;
-- No description provided for this register
WDOGTIMEOUTEVENT : aliased WDOGTIMEOUTEVENT_Register;
-- No description provided for this register
CLR_MSS_COUNTERS : aliased CLR_MSS_COUNTERS_Register;
-- No description provided for this register
CLR_EDAC_COUNTERS : aliased CLR_EDAC_COUNTERS_Register;
-- No description provided for this register
FLUSH_CR : aliased FLUSH_CR_Register;
-- No description provided for this register
MAC_STAT_CLR_CR : aliased MAC_STAT_CLR_CR_Register;
-- No description provided for this register
IOMUXCELL_0_CONFIG : aliased IOMUXCELL_0_CONFIG_Register;
-- No description provided for this register
IOMUXCELL_1_CONFIG : aliased IOMUXCELL_1_CONFIG_Register;
-- No description provided for this register
IOMUXCELL_2_CONFIG : aliased IOMUXCELL_2_CONFIG_Register;
-- No description provided for this register
IOMUXCELL_3_CONFIG : aliased IOMUXCELL_3_CONFIG_Register;
-- No description provided for this register
IOMUXCELL_4_CONFIG : aliased IOMUXCELL_4_CONFIG_Register;
-- No description provided for this register
IOMUXCELL_5_CONFIG : aliased IOMUXCELL_5_CONFIG_Register;
-- No description provided for this register
IOMUXCELL_6_CONFIG : aliased IOMUXCELL_6_CONFIG_Register;
-- No description provided for this register
IOMUXCELL_7_CONFIG : aliased IOMUXCELL_7_CONFIG_Register;
-- No description provided for this register
IOMUXCELL_8_CONFIG : aliased IOMUXCELL_8_CONFIG_Register;
-- No description provided for this register
IOMUXCELL_9_CONFIG : aliased IOMUXCELL_9_CONFIG_Register;
-- No description provided for this register
IOMUXCELL_10_CONFIG : aliased IOMUXCELL_10_CONFIG_Register;
-- No description provided for this register
IOMUXCELL_11_CONFIG : aliased IOMUXCELL_11_CONFIG_Register;
-- No description provided for this register
IOMUXCELL_12_CONFIG : aliased IOMUXCELL_12_CONFIG_Register;
-- No description provided for this register
IOMUXCELL_13_CONFIG : aliased IOMUXCELL_13_CONFIG_Register;
-- No description provided for this register
IOMUXCELL_14_CONFIG : aliased IOMUXCELL_14_CONFIG_Register;
-- No description provided for this register
IOMUXCELL_15_CONFIG : aliased IOMUXCELL_15_CONFIG_Register;
-- No description provided for this register
IOMUXCELL_16_CONFIG : aliased IOMUXCELL_16_CONFIG_Register;
-- No description provided for this register
IOMUXCELL_17_CONFIG : aliased IOMUXCELL_17_CONFIG_Register;
-- No description provided for this register
IOMUXCELL_18_CONFIG : aliased IOMUXCELL_18_CONFIG_Register;
-- No description provided for this register
IOMUXCELL_19_CONFIG : aliased IOMUXCELL_19_CONFIG_Register;
-- No description provided for this register
IOMUXCELL_20_CONFIG : aliased IOMUXCELL_20_CONFIG_Register;
-- No description provided for this register
IOMUXCELL_21_CONFIG : aliased IOMUXCELL_21_CONFIG_Register;
-- No description provided for this register
IOMUXCELL_22_CONFIG : aliased IOMUXCELL_22_CONFIG_Register;
-- No description provided for this register
IOMUXCELL_23_CONFIG : aliased IOMUXCELL_23_CONFIG_Register;
-- No description provided for this register
IOMUXCELL_24_CONFIG : aliased IOMUXCELL_24_CONFIG_Register;
-- No description provided for this register
IOMUXCELL_25_CONFIG : aliased IOMUXCELL_25_CONFIG_Register;
-- No description provided for this register
IOMUXCELL_26_CONFIG : aliased IOMUXCELL_26_CONFIG_Register;
-- No description provided for this register
IOMUXCELL_27_CONFIG : aliased IOMUXCELL_27_CONFIG_Register;
-- No description provided for this register
IOMUXCELL_28_CONFIG : aliased IOMUXCELL_28_CONFIG_Register;
-- No description provided for this register
IOMUXCELL_29_CONFIG : aliased IOMUXCELL_29_CONFIG_Register;
-- No description provided for this register
IOMUXCELL_30_CONFIG : aliased IOMUXCELL_30_CONFIG_Register;
-- No description provided for this register
IOMUXCELL_31_CONFIG : aliased IOMUXCELL_31_CONFIG_Register;
-- No description provided for this register
IOMUXCELL_32_CONFIG : aliased IOMUXCELL_32_CONFIG_Register;
-- No description provided for this register
IOMUXCELL_33_CONFIG : aliased IOMUXCELL_33_CONFIG_Register;
-- No description provided for this register
IOMUXCELL_34_CONFIG : aliased IOMUXCELL_34_CONFIG_Register;
-- No description provided for this register
IOMUXCELL_35_CONFIG : aliased IOMUXCELL_35_CONFIG_Register;
-- No description provided for this register
IOMUXCELL_36_CONFIG : aliased IOMUXCELL_36_CONFIG_Register;
-- No description provided for this register
IOMUXCELL_37_CONFIG : aliased IOMUXCELL_37_CONFIG_Register;
-- No description provided for this register
IOMUXCELL_38_CONFIG : aliased IOMUXCELL_38_CONFIG_Register;
-- No description provided for this register
IOMUXCELL_39_CONFIG : aliased IOMUXCELL_39_CONFIG_Register;
-- No description provided for this register
IOMUXCELL_40_CONFIG : aliased IOMUXCELL_40_CONFIG_Register;
-- No description provided for this register
IOMUXCELL_41_CONFIG : aliased IOMUXCELL_41_CONFIG_Register;
-- No description provided for this register
IOMUXCELL_42_CONFIG : aliased IOMUXCELL_42_CONFIG_Register;
-- No description provided for this register
IOMUXCELL_43_CONFIG : aliased IOMUXCELL_43_CONFIG_Register;
-- No description provided for this register
IOMUXCELL_44_CONFIG : aliased IOMUXCELL_44_CONFIG_Register;
-- No description provided for this register
IOMUXCELL_45_CONFIG : aliased IOMUXCELL_45_CONFIG_Register;
-- No description provided for this register
IOMUXCELL_46_CONFIG : aliased IOMUXCELL_46_CONFIG_Register;
-- No description provided for this register
IOMUXCELL_47_CONFIG : aliased IOMUXCELL_47_CONFIG_Register;
-- No description provided for this register
IOMUXCELL_48_CONFIG : aliased IOMUXCELL_48_CONFIG_Register;
-- No description provided for this register
IOMUXCELL_49_CONFIG : aliased IOMUXCELL_49_CONFIG_Register;
-- No description provided for this register
IOMUXCELL_50_CONFIG : aliased IOMUXCELL_50_CONFIG_Register;
-- No description provided for this register
IOMUXCELL_51_CONFIG : aliased IOMUXCELL_51_CONFIG_Register;
-- No description provided for this register
IOMUXCELL_52_CONFIG : aliased IOMUXCELL_52_CONFIG_Register;
-- No description provided for this register
IOMUXCELL_53_CONFIG : aliased IOMUXCELL_53_CONFIG_Register;
-- No description provided for this register
IOMUXCELL_54_CONFIG : aliased IOMUXCELL_54_CONFIG_Register;
-- No description provided for this register
IOMUXCELL_55_CONFIG : aliased IOMUXCELL_55_CONFIG_Register;
-- No description provided for this register
IOMUXCELL_56_CONFIG : aliased IOMUXCELL_56_CONFIG_Register;
-- No description provided for this register
NVM_PROTECT_FACTORY : aliased NVM_PROTECT_FACTORY_Register;
-- No description provided for this register
DEVICE_STATUS_FIXED : aliased DEVICE_STATUS_FIXED_Register;
-- No description provided for this register
MBIST_ES0 : aliased MBIST_ES0_Register;
-- No description provided for this register
MBIST_ES1 : aliased MBIST_ES1_Register;
-- No description provided for this register
MSDDR_PLL_STAUS_1 : aliased MSDDR_PLL_STAUS_1_Register;
-- No description provided for this register
REDUNDANCY_ESRAM0 : aliased REDUNDANCY_ESRAM0_Register;
-- No description provided for this register
REDUNDANCY_ESRAM1 : aliased REDUNDANCY_ESRAM1_Register;
-- No description provided for this register
SERDESIF : aliased SERDESIF_Register;
end record
with Volatile;
for System_Registers_Peripheral use record
ESRAM_CR at 16#0# range 0 .. 31;
ESRAM_MAX_LAT_CR at 16#4# range 0 .. 31;
DDR_CR at 16#8# range 0 .. 31;
ENVM_CR at 16#C# range 0 .. 31;
ENVM_REMAP_BASE_CR at 16#10# range 0 .. 31;
ENVM_REMAP_FAB_CR at 16#14# range 0 .. 31;
CC_CR at 16#18# range 0 .. 31;
CC_REGION_CR at 16#1C# range 0 .. 31;
CC_LOCK_BASE_ADDR_CR at 16#20# range 0 .. 31;
CC_FLUSH_INDX_CR at 16#24# range 0 .. 31;
DDRB_BUF_TIMER_CR at 16#28# range 0 .. 31;
DDRB_NB_ADDR_CR at 16#2C# range 0 .. 31;
DDRB_NB_SIZE_CR at 16#30# range 0 .. 31;
DDRB_CR at 16#34# range 0 .. 31;
EDAC_CR at 16#38# range 0 .. 31;
MASTER_WEIGHT0_CR at 16#3C# range 0 .. 31;
MASTER_WEIGHT1_CR at 16#40# range 0 .. 31;
SOFT_IRQ_CR at 16#44# range 0 .. 31;
SOFT_RESET_CR at 16#48# range 0 .. 31;
M3_CR at 16#4C# range 0 .. 31;
FAB_IF_CR at 16#50# range 0 .. 31;
LOOPBACK_CR at 16#54# range 0 .. 31;
GPIO_SYSRESET_SEL_CR at 16#58# range 0 .. 31;
GPIN_SRC_SEL_CR at 16#5C# range 0 .. 31;
MDDR_CR at 16#60# range 0 .. 31;
USB_IO_INPUT_SEL_CR at 16#64# range 0 .. 31;
PERIPH_CLK_MUX_SEL_CR at 16#68# range 0 .. 31;
WDOG_CR at 16#6C# range 0 .. 31;
MDDR_IO_CALIB_CR at 16#70# range 0 .. 31;
SPARE_OUT_CR at 16#74# range 0 .. 31;
EDAC_IRQ_ENABLE_CR at 16#78# range 0 .. 31;
USB_CR at 16#7C# range 0 .. 31;
ESRAM_PIPELINE_CR at 16#80# range 0 .. 31;
MSS_IRQ_ENABLE_CR at 16#84# range 0 .. 31;
RTC_WAKEUP_CR at 16#88# range 0 .. 31;
MAC_CR at 16#8C# range 0 .. 31;
MSSDDR_PLL_STATUS_LOW_CR at 16#90# range 0 .. 31;
MSSDDR_PLL_STATUS_HIGH_CR at 16#94# range 0 .. 31;
MSSDDR_FACC1_CR at 16#98# range 0 .. 31;
MSSDDR_FACC2_CR at 16#9C# range 0 .. 31;
PLL_LOCK_EN_CR at 16#A0# range 0 .. 31;
MSSDDR_CLK_CALIB_CR at 16#A4# range 0 .. 31;
PLL_DELAY_LINE_SEL_CR at 16#A8# range 0 .. 31;
MAC_STAT_CLRONRD_CR at 16#AC# range 0 .. 31;
RESET_SOURCE_CR at 16#B0# range 0 .. 31;
CC_ERRRSPADDRD_SR at 16#B4# range 0 .. 31;
CC_ERRRSPADDRI_SR at 16#B8# range 0 .. 31;
CC_ERRRSPADDRS_SR at 16#BC# range 0 .. 31;
CC_ECCERRINDXADR_SR at 16#C0# range 0 .. 31;
CC_IC_MISS_CNTR_SR at 16#C4# range 0 .. 31;
CC_IC_HIT_CNTR_SR at 16#C8# range 0 .. 31;
CC_DC_MISS_CNTR_SR at 16#CC# range 0 .. 31;
CC_DC_HIT_CNTR_CR at 16#D0# range 0 .. 31;
CC_IC_TRANS_CNTR_SR at 16#D4# range 0 .. 31;
CC_DC_TRANS_CNTR_SR at 16#D8# range 0 .. 31;
DDRB_DS_ERR_ADR_SR at 16#DC# range 0 .. 31;
DDRB_HPD_ERR_ADR_SR at 16#E0# range 0 .. 31;
DDRB_SW_ERR_ADR_SR at 16#E4# range 0 .. 31;
DDRB_BUF_EMPTY_SR at 16#E8# range 0 .. 31;
DDRB_DSBL_DN_SR at 16#EC# range 0 .. 31;
ESRAM0_EDAC_CNT at 16#F0# range 0 .. 31;
ESRAM1_EDAC_CNT at 16#F4# range 0 .. 31;
CC_EDAC_CNT at 16#F8# range 0 .. 31;
MAC_EDAC_TX_CNT at 16#FC# range 0 .. 31;
MAC_EDAC_RX_CNT at 16#100# range 0 .. 31;
USB_EDAC_CNT at 16#104# range 0 .. 31;
CAN_EDAC_CNT at 16#108# range 0 .. 31;
ESRAM0_EDAC_ADR at 16#10C# range 0 .. 31;
ESRAM1_EDAC_ADR at 16#110# range 0 .. 31;
MAC_EDAC_RX_ADR at 16#114# range 0 .. 31;
MAC_EDAC_TX_ADR at 16#118# range 0 .. 31;
CAN_EDAC_ADR at 16#11C# range 0 .. 31;
USB_EDAC_ADR at 16#120# range 0 .. 31;
MM0_1_2_SECURITY at 16#124# range 0 .. 31;
MM4_5_FIC64_SECURITY at 16#128# range 0 .. 31;
MM3_6_7_8_SECURITY at 16#12C# range 0 .. 31;
MM9_SECURITY at 16#130# range 0 .. 31;
M3_SR at 16#134# range 0 .. 31;
ETM_COUNT_LOW at 16#138# range 0 .. 31;
ETM_COUNT_HIGH at 16#13C# range 0 .. 31;
DEVICE_SR at 16#140# range 0 .. 31;
ENVM_PROTECT_USER at 16#144# range 0 .. 31;
G4C_ENVM_STATUS at 16#148# range 0 .. 31;
DEVICE_VERSION at 16#14C# range 0 .. 31;
MSSDDR_PLL_STATUS at 16#150# range 0 .. 31;
USB_SR at 16#154# range 0 .. 31;
ENVM_SR at 16#158# range 0 .. 31;
SPARE_IN at 16#15C# range 0 .. 31;
DDRB_STATUS at 16#160# range 0 .. 31;
MDDR_IO_CALIB_STATUS at 16#164# range 0 .. 31;
MSSDDR_CLK_CALIB_STATUS at 16#168# range 0 .. 31;
WDOGLOAD at 16#16C# range 0 .. 31;
WDOGMVRP at 16#170# range 0 .. 31;
USERCONFIG0 at 16#174# range 0 .. 31;
USERCONFIG1 at 16#178# range 0 .. 31;
USERCONFIG2 at 16#17C# range 0 .. 31;
USERCONFIG3 at 16#180# range 0 .. 31;
FAB_PROT_SIZE at 16#184# range 0 .. 31;
FAB_PROT_BASE at 16#188# range 0 .. 31;
MSS_GPIO_DEF at 16#18C# range 0 .. 31;
EDAC_SR at 16#190# range 0 .. 31;
MSS_INTERNAL_SR at 16#194# range 0 .. 31;
MSS_EXTERNAL_SR at 16#198# range 0 .. 31;
WDOGTIMEOUTEVENT at 16#19C# range 0 .. 31;
CLR_MSS_COUNTERS at 16#1A0# range 0 .. 31;
CLR_EDAC_COUNTERS at 16#1A4# range 0 .. 31;
FLUSH_CR at 16#1A8# range 0 .. 31;
MAC_STAT_CLR_CR at 16#1AC# range 0 .. 31;
IOMUXCELL_0_CONFIG at 16#1B0# range 0 .. 31;
IOMUXCELL_1_CONFIG at 16#1B4# range 0 .. 31;
IOMUXCELL_2_CONFIG at 16#1B8# range 0 .. 31;
IOMUXCELL_3_CONFIG at 16#1BC# range 0 .. 31;
IOMUXCELL_4_CONFIG at 16#1C0# range 0 .. 31;
IOMUXCELL_5_CONFIG at 16#1C4# range 0 .. 31;
IOMUXCELL_6_CONFIG at 16#1C8# range 0 .. 31;
IOMUXCELL_7_CONFIG at 16#1CC# range 0 .. 31;
IOMUXCELL_8_CONFIG at 16#1D0# range 0 .. 31;
IOMUXCELL_9_CONFIG at 16#1D4# range 0 .. 31;
IOMUXCELL_10_CONFIG at 16#1D8# range 0 .. 31;
IOMUXCELL_11_CONFIG at 16#1DC# range 0 .. 31;
IOMUXCELL_12_CONFIG at 16#1E0# range 0 .. 31;
IOMUXCELL_13_CONFIG at 16#1E4# range 0 .. 31;
IOMUXCELL_14_CONFIG at 16#1E8# range 0 .. 31;
IOMUXCELL_15_CONFIG at 16#1EC# range 0 .. 31;
IOMUXCELL_16_CONFIG at 16#1F0# range 0 .. 31;
IOMUXCELL_17_CONFIG at 16#1F4# range 0 .. 31;
IOMUXCELL_18_CONFIG at 16#1F8# range 0 .. 31;
IOMUXCELL_19_CONFIG at 16#1FC# range 0 .. 31;
IOMUXCELL_20_CONFIG at 16#200# range 0 .. 31;
IOMUXCELL_21_CONFIG at 16#204# range 0 .. 31;
IOMUXCELL_22_CONFIG at 16#208# range 0 .. 31;
IOMUXCELL_23_CONFIG at 16#20C# range 0 .. 31;
IOMUXCELL_24_CONFIG at 16#210# range 0 .. 31;
IOMUXCELL_25_CONFIG at 16#214# range 0 .. 31;
IOMUXCELL_26_CONFIG at 16#218# range 0 .. 31;
IOMUXCELL_27_CONFIG at 16#21C# range 0 .. 31;
IOMUXCELL_28_CONFIG at 16#220# range 0 .. 31;
IOMUXCELL_29_CONFIG at 16#224# range 0 .. 31;
IOMUXCELL_30_CONFIG at 16#228# range 0 .. 31;
IOMUXCELL_31_CONFIG at 16#22C# range 0 .. 31;
IOMUXCELL_32_CONFIG at 16#230# range 0 .. 31;
IOMUXCELL_33_CONFIG at 16#234# range 0 .. 31;
IOMUXCELL_34_CONFIG at 16#238# range 0 .. 31;
IOMUXCELL_35_CONFIG at 16#23C# range 0 .. 31;
IOMUXCELL_36_CONFIG at 16#240# range 0 .. 31;
IOMUXCELL_37_CONFIG at 16#244# range 0 .. 31;
IOMUXCELL_38_CONFIG at 16#248# range 0 .. 31;
IOMUXCELL_39_CONFIG at 16#24C# range 0 .. 31;
IOMUXCELL_40_CONFIG at 16#250# range 0 .. 31;
IOMUXCELL_41_CONFIG at 16#254# range 0 .. 31;
IOMUXCELL_42_CONFIG at 16#258# range 0 .. 31;
IOMUXCELL_43_CONFIG at 16#25C# range 0 .. 31;
IOMUXCELL_44_CONFIG at 16#260# range 0 .. 31;
IOMUXCELL_45_CONFIG at 16#264# range 0 .. 31;
IOMUXCELL_46_CONFIG at 16#268# range 0 .. 31;
IOMUXCELL_47_CONFIG at 16#26C# range 0 .. 31;
IOMUXCELL_48_CONFIG at 16#270# range 0 .. 31;
IOMUXCELL_49_CONFIG at 16#274# range 0 .. 31;
IOMUXCELL_50_CONFIG at 16#278# range 0 .. 31;
IOMUXCELL_51_CONFIG at 16#27C# range 0 .. 31;
IOMUXCELL_52_CONFIG at 16#280# range 0 .. 31;
IOMUXCELL_53_CONFIG at 16#284# range 0 .. 31;
IOMUXCELL_54_CONFIG at 16#288# range 0 .. 31;
IOMUXCELL_55_CONFIG at 16#28C# range 0 .. 31;
IOMUXCELL_56_CONFIG at 16#290# range 0 .. 31;
NVM_PROTECT_FACTORY at 16#294# range 0 .. 31;
DEVICE_STATUS_FIXED at 16#298# range 0 .. 31;
MBIST_ES0 at 16#29C# range 0 .. 31;
MBIST_ES1 at 16#2A0# range 0 .. 31;
MSDDR_PLL_STAUS_1 at 16#2A4# range 0 .. 31;
REDUNDANCY_ESRAM0 at 16#2A8# range 0 .. 31;
REDUNDANCY_ESRAM1 at 16#2AC# range 0 .. 31;
SERDESIF at 16#2B0# range 0 .. 31;
end record;
-- No description provided for this peripheral
System_Registers_Periph : aliased System_Registers_Peripheral
with Import, Address => System_Registers_Base;
end Interfaces.SF2.System_Registers;
|
-- SPDX-FileCopyrightText: 2021 Max Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-------------------------------------------------------------
package body Program.Complete_Contexts.Assignment_Statements is
--------------------------
-- Assignment_Statement --
--------------------------
procedure Assignment_Statement
(Sets : not null Program.Interpretations.Context_Access;
Setter : not null Program.Cross_Reference_Updaters
.Cross_Reference_Updater_Access;
Element : not null Program.Elements.Assignment_Statements
.Assignment_Statement_Access)
is
View : Program.Visibility.View;
begin
Resolve_To_Any_Type
(Element => Element.Variable_Name,
Sets => Sets,
Setter => Setter,
Result => View);
Resolve_To_Expected_Type
(Element => Element.Expression.To_Element,
Sets => Sets,
Setter => Setter,
Expect => View);
end Assignment_Statement;
end Program.Complete_Contexts.Assignment_Statements;
|
------------------------------------------------------------------------------
-- --
-- GNAT LIBRARY COMPONENTS --
-- --
-- ADA.CONTAINERS.HASH_TABLES.GENERIC_BOUNDED_KEYS --
-- --
-- B o d y --
-- --
-- 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/>. --
-- --
-- This unit was originally developed by Matthew J Heaney. --
------------------------------------------------------------------------------
package body Ada.Containers.Hash_Tables.Generic_Bounded_Keys is
pragma Warnings (Off, "variable ""Busy*"" is not referenced");
pragma Warnings (Off, "variable ""Lock*"" is not referenced");
-- See comment in Ada.Containers.Helpers
-----------------------------
-- Checked_Equivalent_Keys --
-----------------------------
function Checked_Equivalent_Keys
(HT : aliased in out Hash_Table_Type'Class;
Key : Key_Type;
Node : Count_Type) return Boolean
is
Lock : With_Lock (HT.TC'Unrestricted_Access);
begin
return Equivalent_Keys (Key, HT.Nodes (Node));
end Checked_Equivalent_Keys;
-------------------
-- Checked_Index --
-------------------
function Checked_Index
(HT : aliased in out Hash_Table_Type'Class;
Key : Key_Type) return Hash_Type
is
Lock : With_Lock (HT.TC'Unrestricted_Access);
begin
return HT.Buckets'First + Hash (Key) mod HT.Buckets'Length;
end Checked_Index;
--------------------------
-- Delete_Key_Sans_Free --
--------------------------
procedure Delete_Key_Sans_Free
(HT : in out Hash_Table_Type'Class;
Key : Key_Type;
X : out Count_Type)
is
Indx : Hash_Type;
Prev : Count_Type;
begin
if HT.Length = 0 then
X := 0;
return;
end if;
-- Per AI05-0022, the container implementation is required to detect
-- element tampering by a generic actual subprogram.
TC_Check (HT.TC);
Indx := Checked_Index (HT, Key);
X := HT.Buckets (Indx);
if X = 0 then
return;
end if;
if Checked_Equivalent_Keys (HT, Key, X) then
TC_Check (HT.TC);
HT.Buckets (Indx) := Next (HT.Nodes (X));
HT.Length := HT.Length - 1;
return;
end if;
loop
Prev := X;
X := Next (HT.Nodes (Prev));
if X = 0 then
return;
end if;
if Checked_Equivalent_Keys (HT, Key, X) then
TC_Check (HT.TC);
Set_Next (HT.Nodes (Prev), Next => Next (HT.Nodes (X)));
HT.Length := HT.Length - 1;
return;
end if;
end loop;
end Delete_Key_Sans_Free;
----------
-- Find --
----------
function Find
(HT : Hash_Table_Type'Class;
Key : Key_Type) return Count_Type
is
Indx : Hash_Type;
Node : Count_Type;
begin
if HT.Length = 0 then
return 0;
end if;
Indx := Checked_Index (HT'Unrestricted_Access.all, Key);
Node := HT.Buckets (Indx);
while Node /= 0 loop
if Checked_Equivalent_Keys
(HT'Unrestricted_Access.all, Key, Node)
then
return Node;
end if;
Node := Next (HT.Nodes (Node));
end loop;
return 0;
end Find;
--------------------------------
-- Generic_Conditional_Insert --
--------------------------------
procedure Generic_Conditional_Insert
(HT : in out Hash_Table_Type'Class;
Key : Key_Type;
Node : out Count_Type;
Inserted : out Boolean)
is
Indx : Hash_Type;
begin
-- Per AI05-0022, the container implementation is required to detect
-- element tampering by a generic actual subprogram.
TC_Check (HT.TC);
Indx := Checked_Index (HT, Key);
Node := HT.Buckets (Indx);
if Node = 0 then
if Checks and then HT.Length = HT.Capacity then
raise Capacity_Error with "no more capacity for insertion";
end if;
Node := New_Node;
Set_Next (HT.Nodes (Node), Next => 0);
Inserted := True;
HT.Buckets (Indx) := Node;
HT.Length := HT.Length + 1;
return;
end if;
loop
if Checked_Equivalent_Keys (HT, Key, Node) then
Inserted := False;
return;
end if;
Node := Next (HT.Nodes (Node));
exit when Node = 0;
end loop;
if Checks and then HT.Length = HT.Capacity then
raise Capacity_Error with "no more capacity for insertion";
end if;
Node := New_Node;
Set_Next (HT.Nodes (Node), Next => HT.Buckets (Indx));
Inserted := True;
HT.Buckets (Indx) := Node;
HT.Length := HT.Length + 1;
end Generic_Conditional_Insert;
-----------------------------
-- Generic_Replace_Element --
-----------------------------
procedure Generic_Replace_Element
(HT : in out Hash_Table_Type'Class;
Node : Count_Type;
Key : Key_Type)
is
pragma Assert (HT.Length > 0);
pragma Assert (Node /= 0);
BB : Buckets_Type renames HT.Buckets;
NN : Nodes_Type renames HT.Nodes;
Old_Indx : Hash_Type;
New_Indx : constant Hash_Type := Checked_Index (HT, Key);
New_Bucket : Count_Type renames BB (New_Indx);
N, M : Count_Type;
begin
-- Per AI05-0022, the container implementation is required to detect
-- element tampering by a generic actual subprogram.
-- The following block appears to be vestigial -- this should be done
-- using Checked_Index instead. Also, we might have to move the actual
-- tampering checks to the top of the subprogram, in order to prevent
-- infinite recursion when calling Hash. (This is similar to how Insert
-- and Delete are implemented.) This implies that we will have to defer
-- the computation of New_Index until after the tampering check. ???
declare
Lock : With_Lock (HT.TC'Unrestricted_Access);
begin
Old_Indx := HT.Buckets'First + Hash (NN (Node)) mod HT.Buckets'Length;
end;
-- Replace_Element is allowed to change a node's key to Key
-- (generic formal operation Assign provides the mechanism), but
-- only if Key is not already in the hash table. (In a unique-key
-- hash table as this one, a key is mapped to exactly one node.)
if Checked_Equivalent_Keys (HT, Key, Node) then
TE_Check (HT.TC);
-- The new Key value is mapped to this same Node, so Node
-- stays in the same bucket.
Assign (NN (Node), Key);
return;
end if;
-- Key is not equivalent to Node, so we now have to determine if it's
-- equivalent to some other node in the hash table. This is the case
-- irrespective of whether Key is in the same or a different bucket from
-- Node.
N := New_Bucket;
while N /= 0 loop
if Checks and then Checked_Equivalent_Keys (HT, Key, N) then
pragma Assert (N /= Node);
raise Program_Error with
"attempt to replace existing element";
end if;
N := Next (NN (N));
end loop;
-- We have determined that Key is not already in the hash table, so
-- the change is tentatively allowed. We now perform the standard
-- checks to determine whether the hash table is locked (because you
-- cannot change an element while it's in use by Query_Element or
-- Update_Element), or if the container is busy (because moving a
-- node to a different bucket would interfere with iteration).
if Old_Indx = New_Indx then
-- The node is already in the bucket implied by Key. In this case
-- we merely change its value without moving it.
TE_Check (HT.TC);
Assign (NN (Node), Key);
return;
end if;
-- The node is a bucket different from the bucket implied by Key
TC_Check (HT.TC);
-- Do the assignment first, before moving the node, so that if Assign
-- propagates an exception, then the hash table will not have been
-- modified (except for any possible side-effect Assign had on Node).
Assign (NN (Node), Key);
-- Now we can safely remove the node from its current bucket
N := BB (Old_Indx); -- get value of first node in old bucket
pragma Assert (N /= 0);
if N = Node then -- node is first node in its bucket
BB (Old_Indx) := Next (NN (Node));
else
pragma Assert (HT.Length > 1);
loop
M := Next (NN (N));
pragma Assert (M /= 0);
if M = Node then
Set_Next (NN (N), Next => Next (NN (Node)));
exit;
end if;
N := M;
end loop;
end if;
-- Now we link the node into its new bucket (corresponding to Key)
Set_Next (NN (Node), Next => New_Bucket);
New_Bucket := Node;
end Generic_Replace_Element;
-----------
-- Index --
-----------
function Index
(HT : Hash_Table_Type'Class;
Key : Key_Type) return Hash_Type is
begin
return HT.Buckets'First + Hash (Key) mod HT.Buckets'Length;
end Index;
end Ada.Containers.Hash_Tables.Generic_Bounded_Keys;
|
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE boost_serialization>
<boost_serialization signature="serialization::archive" version="14">
<syndb class_id="0" tracking_level="0" version="0">
<userIPLatency>-1</userIPLatency>
<userIPName></userIPName>
<cdfg class_id="1" tracking_level="1" version="0" object_id="_0">
<name>Loop_2_proc</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>p_hw_input_stencil_stream_to_delayed_input_V_value_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></originalName>
<rtlName></rtlName>
<coreName>FIFO_SRL</coreName>
</Obj>
<bitwidth>72</bitwidth>
</Value>
<direction>0</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs class_id="7" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_2">
<Value>
<Obj>
<type>1</type>
<id>2</id>
<name>p_delayed_input_stencil_stream_V_value_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>FIFO_SRL</coreName>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<direction>1</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
</ports>
<nodes class_id="8" tracking_level="0" version="0">
<count>11</count>
<item_version>0</item_version>
<item class_id="9" tracking_level="1" version="0" object_id="_3">
<Value>
<Obj>
<type>0</type>
<id>7</id>
<name></name>
<fileName>hls_target.cpp</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/paper_apps_8_shifts/sharpen</fileDirectory>
<lineNumber>87</lineNumber>
<contextFuncName>hls_target</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item class_id="10" tracking_level="0" version="0">
<first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/paper_apps_8_shifts/sharpen</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>hls_target.cpp</first>
<second>hls_target</second>
</first>
<second>87</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>26</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_4">
<Value>
<Obj>
<type>0</type>
<id>9</id>
<name>indvar_flatten</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>3</bitwidth>
</Value>
<oprand_edges>
<count>4</count>
<item_version>0</item_version>
<item>44</item>
<item>45</item>
<item>46</item>
<item>47</item>
</oprand_edges>
<opcode>phi</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_5">
<Value>
<Obj>
<type>0</type>
<id>10</id>
<name>exitcond_flatten</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>48</item>
<item>50</item>
</oprand_edges>
<opcode>icmp</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_6">
<Value>
<Obj>
<type>0</type>
<id>11</id>
<name>indvar_flatten_next</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>3</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>51</item>
<item>53</item>
</oprand_edges>
<opcode>add</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_7">
<Value>
<Obj>
<type>0</type>
<id>12</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>3</count>
<item_version>0</item_version>
<item>54</item>
<item>55</item>
<item>56</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_8">
<Value>
<Obj>
<type>0</type>
<id>17</id>
<name>tmp_value_V</name>
<fileName>hls_target.cpp</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/paper_apps_8_shifts/sharpen</fileDirectory>
<lineNumber>95</lineNumber>
<contextFuncName>hls_target</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/paper_apps_8_shifts/sharpen</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>hls_target.cpp</first>
<second>hls_target</second>
</first>
<second>95</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>tmp.value.V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>72</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>28</item>
<item>29</item>
</oprand_edges>
<opcode>read</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_9">
<Value>
<Obj>
<type>0</type>
<id>18</id>
<name>p_355</name>
<fileName>../../../lib_files/Stencil.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/paper_apps_8_shifts/sharpen</fileDirectory>
<lineNumber>122</lineNumber>
<contextFuncName>operator Stencil</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/paper_apps_8_shifts/sharpen</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Stencil.h</first>
<second>operator Stencil</second>
</first>
<second>122</second>
</item>
<item>
<first>
<first>hls_target.cpp</first>
<second>hls_target</second>
</first>
<second>95</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>_355</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<oprand_edges>
<count>4</count>
<item_version>0</item_version>
<item>31</item>
<item>32</item>
<item>34</item>
<item>36</item>
</oprand_edges>
<opcode>partselect</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_10">
<Value>
<Obj>
<type>0</type>
<id>19</id>
<name>p_360</name>
<fileName>hls_target.cpp</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/paper_apps_8_shifts/sharpen</fileDirectory>
<lineNumber>179</lineNumber>
<contextFuncName>hls_target</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/paper_apps_8_shifts/sharpen</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>hls_target.cpp</first>
<second>hls_target</second>
</first>
<second>179</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>_360</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>37</item>
</oprand_edges>
<opcode>zext</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_11">
<Value>
<Obj>
<type>0</type>
<id>20</id>
<name></name>
<fileName>hls_target.cpp</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/paper_apps_8_shifts/sharpen</fileDirectory>
<lineNumber>182</lineNumber>
<contextFuncName>hls_target</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/paper_apps_8_shifts/sharpen</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>hls_target.cpp</first>
<second>hls_target</second>
</first>
<second>182</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>39</item>
<item>40</item>
<item>41</item>
</oprand_edges>
<opcode>write</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_12">
<Value>
<Obj>
<type>0</type>
<id>22</id>
<name></name>
<fileName>hls_target.cpp</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/paper_apps_8_shifts/sharpen</fileDirectory>
<lineNumber>89</lineNumber>
<contextFuncName>hls_target</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/paper_apps_8_shifts/sharpen</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>hls_target.cpp</first>
<second>hls_target</second>
</first>
<second>89</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>42</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_13">
<Value>
<Obj>
<type>0</type>
<id>24</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>0</count>
<item_version>0</item_version>
</oprand_edges>
<opcode>ret</opcode>
<m_Display>0</m_Display>
</item>
</nodes>
<consts class_id="15" tracking_level="0" version="0">
<count>5</count>
<item_version>0</item_version>
<item class_id="16" tracking_level="1" version="0" object_id="_14">
<Value>
<Obj>
<type>2</type>
<id>33</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<const_type>0</const_type>
<content>64</content>
</item>
<item class_id_reference="16" object_id="_15">
<Value>
<Obj>
<type>2</type>
<id>35</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<const_type>0</const_type>
<content>71</content>
</item>
<item class_id_reference="16" object_id="_16">
<Value>
<Obj>
<type>2</type>
<id>43</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>3</bitwidth>
</Value>
<const_type>0</const_type>
<content>0</content>
</item>
<item class_id_reference="16" object_id="_17">
<Value>
<Obj>
<type>2</type>
<id>49</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>3</bitwidth>
</Value>
<const_type>0</const_type>
<content>4</content>
</item>
<item class_id_reference="16" object_id="_18">
<Value>
<Obj>
<type>2</type>
<id>52</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>3</bitwidth>
</Value>
<const_type>0</const_type>
<content>1</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="_19">
<Obj>
<type>3</type>
<id>8</id>
<name>newFuncRoot</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<node_objs>
<count>1</count>
<item_version>0</item_version>
<item>7</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_20">
<Obj>
<type>3</type>
<id>13</id>
<name>.preheader58</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<node_objs>
<count>4</count>
<item_version>0</item_version>
<item>9</item>
<item>10</item>
<item>11</item>
<item>12</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_21">
<Obj>
<type>3</type>
<id>23</id>
<name>.preheader58.preheader</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<node_objs>
<count>5</count>
<item_version>0</item_version>
<item>17</item>
<item>18</item>
<item>19</item>
<item>20</item>
<item>22</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_22">
<Obj>
<type>3</type>
<id>25</id>
<name>.exitStub</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<node_objs>
<count>1</count>
<item_version>0</item_version>
<item>24</item>
</node_objs>
</item>
</blocks>
<edges class_id="19" tracking_level="0" version="0">
<count>24</count>
<item_version>0</item_version>
<item class_id="20" tracking_level="1" version="0" object_id="_23">
<id>26</id>
<edge_type>2</edge_type>
<source_obj>13</source_obj>
<sink_obj>7</sink_obj>
</item>
<item class_id_reference="20" object_id="_24">
<id>29</id>
<edge_type>1</edge_type>
<source_obj>1</source_obj>
<sink_obj>17</sink_obj>
</item>
<item class_id_reference="20" object_id="_25">
<id>32</id>
<edge_type>1</edge_type>
<source_obj>17</source_obj>
<sink_obj>18</sink_obj>
</item>
<item class_id_reference="20" object_id="_26">
<id>34</id>
<edge_type>1</edge_type>
<source_obj>33</source_obj>
<sink_obj>18</sink_obj>
</item>
<item class_id_reference="20" object_id="_27">
<id>36</id>
<edge_type>1</edge_type>
<source_obj>35</source_obj>
<sink_obj>18</sink_obj>
</item>
<item class_id_reference="20" object_id="_28">
<id>37</id>
<edge_type>1</edge_type>
<source_obj>18</source_obj>
<sink_obj>19</sink_obj>
</item>
<item class_id_reference="20" object_id="_29">
<id>40</id>
<edge_type>1</edge_type>
<source_obj>2</source_obj>
<sink_obj>20</sink_obj>
</item>
<item class_id_reference="20" object_id="_30">
<id>41</id>
<edge_type>1</edge_type>
<source_obj>19</source_obj>
<sink_obj>20</sink_obj>
</item>
<item class_id_reference="20" object_id="_31">
<id>42</id>
<edge_type>2</edge_type>
<source_obj>13</source_obj>
<sink_obj>22</sink_obj>
</item>
<item class_id_reference="20" object_id="_32">
<id>44</id>
<edge_type>1</edge_type>
<source_obj>43</source_obj>
<sink_obj>9</sink_obj>
</item>
<item class_id_reference="20" object_id="_33">
<id>45</id>
<edge_type>2</edge_type>
<source_obj>8</source_obj>
<sink_obj>9</sink_obj>
</item>
<item class_id_reference="20" object_id="_34">
<id>46</id>
<edge_type>1</edge_type>
<source_obj>11</source_obj>
<sink_obj>9</sink_obj>
</item>
<item class_id_reference="20" object_id="_35">
<id>47</id>
<edge_type>2</edge_type>
<source_obj>23</source_obj>
<sink_obj>9</sink_obj>
</item>
<item class_id_reference="20" object_id="_36">
<id>48</id>
<edge_type>1</edge_type>
<source_obj>9</source_obj>
<sink_obj>10</sink_obj>
</item>
<item class_id_reference="20" object_id="_37">
<id>50</id>
<edge_type>1</edge_type>
<source_obj>49</source_obj>
<sink_obj>10</sink_obj>
</item>
<item class_id_reference="20" object_id="_38">
<id>51</id>
<edge_type>1</edge_type>
<source_obj>9</source_obj>
<sink_obj>11</sink_obj>
</item>
<item class_id_reference="20" object_id="_39">
<id>53</id>
<edge_type>1</edge_type>
<source_obj>52</source_obj>
<sink_obj>11</sink_obj>
</item>
<item class_id_reference="20" object_id="_40">
<id>54</id>
<edge_type>1</edge_type>
<source_obj>10</source_obj>
<sink_obj>12</sink_obj>
</item>
<item class_id_reference="20" object_id="_41">
<id>55</id>
<edge_type>2</edge_type>
<source_obj>23</source_obj>
<sink_obj>12</sink_obj>
</item>
<item class_id_reference="20" object_id="_42">
<id>56</id>
<edge_type>2</edge_type>
<source_obj>25</source_obj>
<sink_obj>12</sink_obj>
</item>
<item class_id_reference="20" object_id="_43">
<id>144</id>
<edge_type>2</edge_type>
<source_obj>8</source_obj>
<sink_obj>13</sink_obj>
</item>
<item class_id_reference="20" object_id="_44">
<id>145</id>
<edge_type>2</edge_type>
<source_obj>13</source_obj>
<sink_obj>25</sink_obj>
</item>
<item class_id_reference="20" object_id="_45">
<id>146</id>
<edge_type>2</edge_type>
<source_obj>13</source_obj>
<sink_obj>23</sink_obj>
</item>
<item class_id_reference="20" object_id="_46">
<id>147</id>
<edge_type>2</edge_type>
<source_obj>23</source_obj>
<sink_obj>13</sink_obj>
</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="_47">
<mId>1</mId>
<mTag>Loop_2_proc</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>6</mMinLatency>
<mMaxLatency>-1</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"></mDfPipe>
</item>
<item class_id_reference="22" object_id="_48">
<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>8</item>
</basic_blocks>
<mII>-1</mII>
<mDepth>-1</mDepth>
<mMinTripCount>-1</mMinTripCount>
<mMaxTripCount>-1</mMaxTripCount>
<mMinLatency>0</mMinLatency>
<mMaxLatency>-1</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"></mDfPipe>
</item>
<item class_id_reference="22" object_id="_49">
<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>13</item>
<item>23</item>
</basic_blocks>
<mII>1</mII>
<mDepth>2</mDepth>
<mMinTripCount>4</mMinTripCount>
<mMaxTripCount>4</mMaxTripCount>
<mMinLatency>4</mMinLatency>
<mMaxLatency>-1</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"></mDfPipe>
</item>
<item class_id_reference="22" object_id="_50">
<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>25</item>
</basic_blocks>
<mII>-1</mII>
<mDepth>-1</mDepth>
<mMinTripCount>-1</mMinTripCount>
<mMaxTripCount>-1</mMaxTripCount>
<mMinLatency>0</mMinLatency>
<mMaxLatency>-1</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"></mDfPipe>
</item>
</cdfg_regions>
<fsm class_id="24" tracking_level="1" version="0" object_id="_51">
<states class_id="25" tracking_level="0" version="0">
<count>4</count>
<item_version>0</item_version>
<item class_id="26" tracking_level="1" version="0" object_id="_52">
<id>1</id>
<operations class_id="27" tracking_level="0" version="0">
<count>5</count>
<item_version>0</item_version>
<item class_id="28" tracking_level="1" version="0" object_id="_53">
<id>3</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_54">
<id>4</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_55">
<id>5</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_56">
<id>6</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_57">
<id>7</id>
<stage>1</stage>
<latency>1</latency>
</item>
</operations>
</item>
<item class_id_reference="26" object_id="_58">
<id>2</id>
<operations>
<count>4</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_59">
<id>9</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_60">
<id>10</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_61">
<id>11</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_62">
<id>12</id>
<stage>1</stage>
<latency>1</latency>
</item>
</operations>
</item>
<item class_id_reference="26" object_id="_63">
<id>3</id>
<operations>
<count>9</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_64">
<id>14</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_65">
<id>15</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_66">
<id>16</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_67">
<id>17</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_68">
<id>18</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_69">
<id>19</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_70">
<id>20</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_71">
<id>21</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_72">
<id>22</id>
<stage>1</stage>
<latency>1</latency>
</item>
</operations>
</item>
<item class_id_reference="26" object_id="_73">
<id>4</id>
<operations>
<count>1</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_74">
<id>24</id>
<stage>1</stage>
<latency>1</latency>
</item>
</operations>
</item>
</states>
<transitions class_id="29" tracking_level="0" version="0">
<count>4</count>
<item_version>0</item_version>
<item class_id="30" tracking_level="1" version="0" object_id="_75">
<inState>1</inState>
<outState>2</outState>
<condition class_id="31" tracking_level="0" version="0">
<id>12</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="_76">
<inState>3</inState>
<outState>2</outState>
<condition>
<id>19</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="_77">
<inState>2</inState>
<outState>4</outState>
<condition>
<id>18</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>10</first>
<second>0</second>
</first>
<second>0</second>
</item>
</item>
</sop>
</condition>
</item>
<item class_id_reference="30" object_id="_78">
<inState>2</inState>
<outState>3</outState>
<condition>
<id>20</id>
<sop>
<count>1</count>
<item_version>0</item_version>
<item>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>10</first>
<second>0</second>
</first>
<second>1</second>
</item>
</item>
</sop>
</condition>
</item>
</transitions>
</fsm>
<res class_id="-1"></res>
<node_label_latency class_id="37" tracking_level="0" version="0">
<count>11</count>
<item_version>0</item_version>
<item class_id="38" tracking_level="0" version="0">
<first>7</first>
<second class_id="39" tracking_level="0" version="0">
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>9</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>10</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>11</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>12</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>17</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>18</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>19</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>20</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>22</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>24</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
</node_label_latency>
<bblk_ent_exit class_id="40" tracking_level="0" version="0">
<count>4</count>
<item_version>0</item_version>
<item class_id="41" tracking_level="0" version="0">
<first>8</first>
<second class_id="42" tracking_level="0" version="0">
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>13</first>
<second>
<first>1</first>
<second>1</second>
</second>
</item>
<item>
<first>23</first>
<second>
<first>2</first>
<second>2</second>
</second>
</item>
<item>
<first>25</first>
<second>
<first>2</first>
<second>2</second>
</second>
</item>
</bblk_ent_exit>
<regions class_id="43" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="44" tracking_level="1" version="0" object_id="_79">
<region_name>Loop 1</region_name>
<basic_blocks>
<count>2</count>
<item_version>0</item_version>
<item>13</item>
<item>23</item>
</basic_blocks>
<nodes>
<count>0</count>
<item_version>0</item_version>
</nodes>
<anchor_node>-1</anchor_node>
<region_type>8</region_type>
<interval>1</interval>
<pipe_depth>2</pipe_depth>
</item>
</regions>
<dp_fu_nodes class_id="45" tracking_level="0" version="0">
<count>7</count>
<item_version>0</item_version>
<item class_id="46" tracking_level="0" version="0">
<first>52</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>17</item>
</second>
</item>
<item>
<first>58</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>20</item>
</second>
</item>
<item>
<first>69</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>9</item>
</second>
</item>
<item>
<first>76</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>10</item>
</second>
</item>
<item>
<first>82</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>11</item>
</second>
</item>
<item>
<first>88</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>18</item>
</second>
</item>
<item>
<first>98</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>19</item>
</second>
</item>
</dp_fu_nodes>
<dp_fu_nodes_expression class_id="48" tracking_level="0" version="0">
<count>5</count>
<item_version>0</item_version>
<item class_id="49" tracking_level="0" version="0">
<first>exitcond_flatten_fu_76</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>10</item>
</second>
</item>
<item>
<first>indvar_flatten_next_fu_82</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>11</item>
</second>
</item>
<item>
<first>indvar_flatten_phi_fu_69</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>9</item>
</second>
</item>
<item>
<first>p_355_fu_88</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>18</item>
</second>
</item>
<item>
<first>p_360_fu_98</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>19</item>
</second>
</item>
</dp_fu_nodes_expression>
<dp_fu_nodes_module>
<count>0</count>
<item_version>0</item_version>
</dp_fu_nodes_module>
<dp_fu_nodes_io>
<count>2</count>
<item_version>0</item_version>
<item>
<first>StgValue_20_write_fu_58</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>20</item>
</second>
</item>
<item>
<first>tmp_value_V_read_fu_52</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>17</item>
</second>
</item>
</dp_fu_nodes_io>
<return_ports>
<count>0</count>
<item_version>0</item_version>
</return_ports>
<dp_mem_port_nodes class_id="50" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</dp_mem_port_nodes>
<dp_reg_nodes>
<count>3</count>
<item_version>0</item_version>
<item>
<first>65</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>9</item>
</second>
</item>
<item>
<first>103</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>10</item>
</second>
</item>
<item>
<first>107</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>11</item>
</second>
</item>
</dp_reg_nodes>
<dp_regname_nodes>
<count>3</count>
<item_version>0</item_version>
<item>
<first>exitcond_flatten_reg_103</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>10</item>
</second>
</item>
<item>
<first>indvar_flatten_next_reg_107</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>11</item>
</second>
</item>
<item>
<first>indvar_flatten_reg_65</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>9</item>
</second>
</item>
</dp_regname_nodes>
<dp_reg_phi>
<count>1</count>
<item_version>0</item_version>
<item>
<first>65</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>9</item>
</second>
</item>
</dp_reg_phi>
<dp_regname_phi>
<count>1</count>
<item_version>0</item_version>
<item>
<first>indvar_flatten_reg_65</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>9</item>
</second>
</item>
</dp_regname_phi>
<dp_port_io_nodes class_id="51" tracking_level="0" version="0">
<count>2</count>
<item_version>0</item_version>
<item class_id="52" tracking_level="0" version="0">
<first>p_delayed_input_stencil_stream_V_value_V</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>write</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>20</item>
</second>
</item>
</second>
</item>
<item>
<first>p_hw_input_stencil_stream_to_delayed_input_V_value_V</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>read</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>17</item>
</second>
</item>
</second>
</item>
</dp_port_io_nodes>
<port2core class_id="53" tracking_level="0" version="0">
<count>2</count>
<item_version>0</item_version>
<item class_id="54" tracking_level="0" version="0">
<first>1</first>
<second>FIFO_SRL</second>
</item>
<item>
<first>2</first>
<second>FIFO_SRL</second>
</item>
</port2core>
<node2core>
<count>0</count>
<item_version>0</item_version>
</node2core>
</syndb>
</boost_serialization>
|
--------------------------------------------------------------------------------------------------------------------
-- Copyright (c) 2013-2018 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.TTFs
--------------------------------------------------------------------------------------------------------------------
with Interfaces.C.Strings;
with SDL.Error;
package body SDL.TTFs is
use type C.char_array;
use type C.int;
function Initialise return Boolean is
function TTF_Init return C.int with
Import => True,
Convention => C,
External_Name => "TTF_Init";
Result : C.int := TTF_Init;
begin
return (Result = Success);
end Initialise;
overriding
procedure Finalize (Self : in out Fonts) is
procedure TTF_Close_Font (Font : in Fonts_Ref) with
Import => True,
Convention => C,
External_Name => "TTF_CloseFont";
procedure TTF_Quit with
Import => True,
Convention => C,
External_Name => "TTF_Quit";
begin
if Self.Internal /= null then
if Self.Source_Freed = False then
TTF_Close_Font (Self.Internal);
end if;
Self.Internal := null;
TTF_Quit;
end if;
end Finalize;
function Style (Self : in Fonts) return Font_Styles is
function TTF_Get_Font_Style (Font : in Fonts_Ref) return Font_Styles with
Import => True,
Convention => C,
External_Name => "TTF_GetFontStyle";
begin
return TTF_Get_Font_Style (Self.Internal);
end Style;
procedure Set_Style (Self : in out Fonts; Now : in Font_Styles) is
procedure TTF_Set_Font_Style (Font : in Fonts_Ref; Now : in Font_Styles) with
Import => True,
Convention => C,
External_Name => "TTF_SetFontStyle";
begin
TTF_Set_Font_Style (Self.Internal, Now);
end Set_Style;
function Outline (Self : in Fonts) return Font_Outlines is
function TTF_Get_Font_Outline (Font : in Fonts_Ref) return Font_Outlines with
Import => True,
Convention => C,
External_Name => "TTF_GetFontOutline";
begin
return TTF_Get_Font_Outline (Self.Internal);
end Outline;
procedure Set_Outline (Self : in out Fonts; Now : in Font_Outlines := Outlines_Off) is
procedure TTF_Set_Font_Outline (Font : in Fonts_Ref; Now : in Font_Outlines) with
Import => True,
Convention => C,
External_Name => "TTF_SetFontOutline";
begin
TTF_Set_Font_Outline (Self.Internal, Now);
end Set_Outline;
function Hinting (Self : in Fonts) return Font_Hints is
function TTF_Get_Font_Hinting (Font : in Fonts_Ref) return Font_Hints with
Import => True,
Convention => C,
External_Name => "TTF_GetFontHinting";
begin
return TTF_Get_Font_Hinting (Self.Internal);
end Hinting;
procedure Set_Hinting (Self : in out Fonts; Now : in Font_Hints := Normal) is
procedure TTF_Set_Font_Hinting (Font : in Fonts_Ref; Now : in Font_Hints) with
Import => True,
Convention => C,
External_Name => "TTF_SetFontHinting";
begin
TTF_Set_Font_Hinting (Self.Internal, Now);
end Set_Hinting;
function Kerning (Self : in Fonts) return Boolean is
function TTF_Get_Font_Kerning (Font : in Fonts_Ref) return C.int with
Import => True,
Convention => C,
External_Name => "TTF_GetFontKerning";
Enabled : C.int := TTF_Get_Font_Kerning (Self.Internal);
begin
return (if Enabled = 0 then False else True);
end Kerning;
procedure Set_Kerning (Self : in out Fonts; Now : in Boolean) is
procedure TTF_Set_Font_Kerning (Font : in Fonts_Ref; Now : in C.int) with
Import => True,
Convention => C,
External_Name => "TTF_SetFontKerning";
begin
TTF_Set_Font_Kerning (Font => Self.Internal,
Now => (if Now = True then 1 else 0));
end Set_Kerning;
function Height (Self : in Fonts) return Font_Measurements is
function TTF_Font_Height (Font : in Fonts_Ref) return Font_Measurements with
Import => True,
Convention => C,
External_Name => "TTF_FontHeight";
begin
return TTF_Font_Height (Self.Internal);
end Height;
function Ascent (Self : in Fonts) return Font_Measurements is
function TTF_Font_Ascent (Font : in Fonts_Ref) return Font_Measurements with
Import => True,
Convention => C,
External_Name => "TTF_FontAscent";
begin
return TTF_Font_Ascent (Self.Internal);
end Ascent;
function Descent (Self : in Fonts) return Font_Measurements is
function TTF_Font_Descent (Font : in Fonts_Ref) return Font_Measurements with
Import => True,
Convention => C,
External_Name => "TTF_FontDescent";
begin
return TTF_Font_Descent (Self.Internal);
end Descent;
function Line_Skip (Self : in Fonts) return Font_Measurements is
function TTF_Font_Line_Skip (Font : in Fonts_Ref) return Font_Measurements with
Import => True,
Convention => C,
External_Name => "TTF_FontLineSkip";
begin
return TTF_Font_Line_Skip (Self.Internal);
end Line_Skip;
function Faces (Self : in Fonts) return Font_Faces is
function TTF_Font_Faces (Font : in Fonts_Ref) return Font_Faces with
Import => True,
Convention => C,
External_Name => "TTF_FontFaces";
begin
return TTF_Font_Faces (Self.Internal);
end Faces;
function Is_Face_Fixed_Width (Self : in Fonts) return Boolean is
function TTF_Font_Face_Is_Fixed_Width (Font : in Fonts_Ref) return C.int with
Import => True,
Convention => C,
External_Name => "TTF_FontFaceIsFixedWidth";
Result : C.int := TTF_Font_Face_Is_Fixed_Width (Self.Internal);
begin
return (if Result > 0 then True else False);
end Is_Face_Fixed_Width;
function Face_Family_Name (Self : in Fonts) return String is
function TTF_Font_Face_Family_Name (Font : in Fonts_Ref) return C.Strings.chars_ptr with
Import => True,
Convention => C,
External_Name => "TTF_FontFaceFamilyName";
begin
return C.Strings.Value (TTF_Font_Face_Family_Name (Self.Internal));
end Face_Family_Name;
function Face_Style_Name (Self : in Fonts) return String is
function TTF_Font_Face_Style_Name (Font : in Fonts_Ref) return C.Strings.chars_ptr with
Import => True,
Convention => C,
External_Name => "TTF_FontFaceStyleName";
begin
return C.Strings.Value (TTF_Font_Face_Style_Name (Self.Internal));
end Face_Style_Name;
function Size_Latin_1 (Self : in Fonts; Text : in String) return SDL.Sizes is
function TTF_Size_Text (Font : in Fonts_Ref;
Text : in C.Strings.chars_ptr;
W : out Dimension;
H : out Dimension) return C.int with
Import => True,
Convention => C,
External_Name => "TTF_SizeText";
Size : SDL.Sizes := SDL.Zero_Size;
C_Text : C.Strings.chars_ptr := C.Strings.New_String (Text);
Result : C.int := TTF_Size_Text (Self.Internal, C_Text, Size.Width, Size.Height);
begin
C.Strings.Free (C_Text);
return Size;
end Size_Latin_1;
function Size_UTF_8 (Self : in Fonts; Text : in UTF_Strings.UTF_8_String) return SDL.Sizes is
function TTF_Size_UTF_8 (Font : in Fonts_Ref;
Text : in C.Strings.chars_ptr;
W : out Dimension;
H : out Dimension) return C.int with
Import => True,
Convention => C,
External_Name => "TTF_SizeUTF8";
Size : SDL.Sizes := SDL.Zero_Size;
C_Text : C.Strings.chars_ptr := C.Strings.New_String (Text);
Result : C.int := TTF_Size_UTF_8 (Self.Internal, C_Text, Size.Width, Size.Height);
begin
return Size;
end Size_UTF_8;
function Make_Surface_From_Pointer (S : in Video.Surfaces.Internal_Surface_Pointer;
Owns : in Boolean := False) return Video.Surfaces.Surface with
Import => True,
Convention => Ada;
function Render_Solid (Self : in Fonts;
Text : in String;
Colour : in SDL.Video.Palettes.Colour) return SDL.Video.Surfaces.Surface is
function TTF_Render_Text_Solid (Font : in Fonts_Ref;
Text : in C.Strings.chars_ptr;
Colour : in SDL.Video.Palettes.Colour)
return Video.Surfaces.Internal_Surface_Pointer with
Import => True,
Convention => C,
External_Name => "TTF_RenderText_Solid";
C_Text : C.Strings.chars_ptr := C.Strings.New_String (Text);
begin
return S : SDL.Video.Surfaces.Surface :=
Make_Surface_From_Pointer (S => TTF_Render_Text_Solid (Self.Internal, C_Text, Colour),
Owns => True)
do
C.Strings.Free (C_Text);
end return;
end Render_Solid;
function Render_Shaded (Self : in Fonts;
Text : in String;
Colour : in SDL.Video.Palettes.Colour;
Background_Colour : in SDL.Video.Palettes.Colour) return SDL.Video.Surfaces.Surface is
function TTF_Render_Text_Shaded (Font : in Fonts_Ref;
Text : in C.Strings.chars_ptr;
Colour : in SDL.Video.Palettes.Colour;
Background_Colour : in SDL.Video.Palettes.Colour)
return Video.Surfaces.Internal_Surface_Pointer with
Import => True,
Convention => C,
External_Name => "TTF_RenderText_Shaded";
C_Text : C.Strings.chars_ptr := C.Strings.New_String (Text);
begin
return S : SDL.Video.Surfaces.Surface :=
Make_Surface_From_Pointer (S => TTF_Render_Text_Shaded (Self.Internal, C_Text, Colour, Background_Colour),
Owns => True)
do
C.Strings.Free (C_Text);
end return;
end Render_Shaded;
function Render_Blended (Self : in Fonts;
Text : in String;
Colour : in SDL.Video.Palettes.Colour) return SDL.Video.Surfaces.Surface is
function TTF_Render_Text_Blended (Font : in Fonts_Ref;
Text : in C.Strings.chars_ptr;
Colour : in SDL.Video.Palettes.Colour)
return Video.Surfaces.Internal_Surface_Pointer with
Import => True,
Convention => C,
External_Name => "TTF_RenderText_Blended";
C_Text : C.Strings.chars_ptr := C.Strings.New_String (Text);
begin
return S : SDL.Video.Surfaces.Surface :=
Make_Surface_From_Pointer (S => TTF_Render_Text_Blended (Self.Internal, C_Text, Colour),
Owns => True)
do
C.Strings.Free (C_Text);
end return;
end Render_Blended;
end SDL.TTFs;
|
-- This file is generated by SWIG. Please do not modify by hand.
--
with Interfaces.C;
with Interfaces.C;
with Interfaces.C.Pointers;
package xcb.xcb_get_atom_name_cookie_t is
-- Item
--
type Item is record
sequence : aliased Interfaces.C.unsigned;
end record;
-- Item_Array
--
type Item_Array is
array
(Interfaces.C.size_t range <>) of aliased xcb.xcb_get_atom_name_cookie_t
.Item;
-- Pointer
--
package C_Pointers is new Interfaces.C.Pointers
(Index => Interfaces.C.size_t,
Element => xcb.xcb_get_atom_name_cookie_t.Item,
Element_Array => xcb.xcb_get_atom_name_cookie_t.Item_Array,
Default_Terminator => (others => <>));
subtype Pointer is C_Pointers.Pointer;
-- Pointer_Array
--
type Pointer_Array is
array
(Interfaces.C.size_t range <>) of aliased xcb.xcb_get_atom_name_cookie_t
.Pointer;
-- Pointer_Pointer
--
package C_Pointer_Pointers is new Interfaces.C.Pointers
(Index => Interfaces.C.size_t,
Element => xcb.xcb_get_atom_name_cookie_t.Pointer,
Element_Array => xcb.xcb_get_atom_name_cookie_t.Pointer_Array,
Default_Terminator => null);
subtype Pointer_Pointer is C_Pointer_Pointers.Pointer;
end xcb.xcb_get_atom_name_cookie_t;
|
-- SPDX-FileCopyrightText: 2019 Max Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-------------------------------------------------------------
with Program.Elements.Type_Definitions;
with Program.Lexical_Elements;
with Program.Elements.Definitions;
package Program.Elements.Record_Types is
pragma Pure (Program.Elements.Record_Types);
type Record_Type is
limited interface and Program.Elements.Type_Definitions.Type_Definition;
type Record_Type_Access is access all Record_Type'Class
with Storage_Size => 0;
not overriding function Record_Definition
(Self : Record_Type)
return not null Program.Elements.Definitions.Definition_Access
is abstract;
type Record_Type_Text is limited interface;
type Record_Type_Text_Access is access all Record_Type_Text'Class
with Storage_Size => 0;
not overriding function To_Record_Type_Text
(Self : in out Record_Type)
return Record_Type_Text_Access is abstract;
not overriding function Abstract_Token
(Self : Record_Type_Text)
return Program.Lexical_Elements.Lexical_Element_Access is abstract;
not overriding function Tagged_Token
(Self : Record_Type_Text)
return Program.Lexical_Elements.Lexical_Element_Access is abstract;
not overriding function Limited_Token
(Self : Record_Type_Text)
return Program.Lexical_Elements.Lexical_Element_Access is abstract;
end Program.Elements.Record_Types;
|
-- Copyright (c) 2010-2011 Xiph.Org Foundation, Skype Limited
--
-- Most of the documentation has been copied from opus.h and opus_defines.h
-- and is licensed under the license of those files; the Simplified BSD License.
--
-- Copyright (c) 2014 onox <denkpadje@gmail.com>
--
-- 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 Interfaces.C;
package Opus is
-- The Opus codec is designed for interactive speech and audio
-- transmission over the Internet. It is designed by the IETF Codec
-- Working Group and incorporates technology from Skype's SILK codec
-- and Xiph.Org's CELT codec.
--
-- The Opus codec is designed to handle a wide range of interactive
-- audio applications, including Voice over IP, videoconferencing,
-- in-game chat, and even remote live music performances. It can scale
-- from low bit-rate narrowband speech to very high quality stereo
-- music. Its main features are:
--
-- * Sampling rates from 8 to 48 kHz
-- * Bit-rates from 6 kb/s to 510 kb/s
-- * Support for both constant bit-rate (CBR) and variable bit-rate (VBR)
-- * Audio bandwidth from narrowband to full-band
-- * Support for speech and music
-- * Support for mono and stereo
-- * Support for multichannel (up to 255 channels)
-- * Frame sizes from 2.5 ms to 60 ms
-- * Good loss robustness and packet loss concealment (PLC)
-- * Floating point and fixed-point implementation
type Channel_Type is (Mono, Stereo);
type Application_Type is (VoIP, Audio, Restricted_Low_Delay)
with Convention => C;
-- 1. VOIP gives best quality at a given bitrate for voice signals. It
-- enhances the input signal by high-pass filtering and forward error
-- correction to protect against packet loss. Use this mode for typical
-- VoIP applications. Because of the enhancement, even at high bitrates
-- the output may sound different from the input.
--
-- 2. Audio gives best quality at a given bitrate for most non-voice
-- signals like music. Use this mode for music and mixed (music/voice)
-- content, broadcast, and applications requiring less than 15 ms of
-- coding delay.
--
-- 3. Restricted_Low_Delay configures low-delay mode that disables the
-- speech-optimized mode in exchange for slightly reduced delay. This
-- mode can only be set on an newly initialized or freshly reset encoder
-- because it changes the codec delay. This is useful when the caller knows
-- that the speech-optimized modes will not be needed (use with caution).
type Sampling_Rate is (Rate_8_kHz, Rate_12_kHz, Rate_16_kHz, Rate_24_kHz, Rate_48_kHz)
with Convention => C;
type Bandwidth is (Auto, Narrow_Band, Medium_Band, Wide_Band, Super_Wide_Band, Full_Band)
with Convention => C;
type Opus_Int16 is new Interfaces.C.short;
subtype PCM_Range is Natural range 0 .. 5760;
-- 8 kHz with 2.5 ms/frame mono = 20 samples/frame
-- 48 kHz with 60 ms/frame stereo = 5760 samples/frame
use type Interfaces.C.int;
type PCM_Buffer is array (PCM_Range range <>) of Opus_Int16
with Convention => C;
type Byte_Array is array (Natural range <>) of Interfaces.C.unsigned_char
with Convention => C;
function Get_Version return String;
Bad_Argument : exception;
Buffer_Too_Small : exception;
Internal_Error : exception;
Invalid_Packet : exception;
Unimplemented : exception;
Invalid_State : exception;
Allocation_Fail : exception;
Invalid_Result : exception;
private
type C_Boolean is new Boolean
with Convention => C;
for Channel_Type use
(Mono => 1,
Stereo => 2);
for Application_Type use
(VoIP => 2048,
Audio => 2049,
Restricted_Low_Delay => 2051);
for Sampling_Rate use
(Rate_8_kHz => 8000,
Rate_12_kHz => 12000,
Rate_16_kHz => 16000,
Rate_24_kHz => 24000,
Rate_48_kHz => 48000);
for Bandwidth use
(Auto => -1000,
Narrow_Band => 1101,
Medium_Band => 1102,
Wide_Band => 1103,
Super_Wide_Band => 1104,
Full_Band => 1105);
procedure Check_Error (Error : in Interfaces.C.int);
end Opus;
|
-- This file is generated by SWIG. Please do not modify by hand.
--
with Interfaces;
with swig;
with Interfaces.C;
with Interfaces.C.Pointers;
package xcb.xcb_glx_get_query_objectiv_arb_reply_t is
-- Item
--
type Item is record
response_type : aliased Interfaces.Unsigned_8;
pad0 : aliased Interfaces.Unsigned_8;
sequence : aliased Interfaces.Unsigned_16;
length : aliased Interfaces.Unsigned_32;
pad1 : aliased swig.int8_t_Array (0 .. 3);
n : aliased Interfaces.Unsigned_32;
datum : aliased Interfaces.Integer_32;
pad2 : aliased swig.int8_t_Array (0 .. 11);
end record;
-- Item_Array
--
type Item_Array is
array
(Interfaces.C
.size_t range <>) of aliased xcb
.xcb_glx_get_query_objectiv_arb_reply_t
.Item;
-- Pointer
--
package C_Pointers is new Interfaces.C.Pointers
(Index => Interfaces.C.size_t,
Element => xcb.xcb_glx_get_query_objectiv_arb_reply_t.Item,
Element_Array => xcb.xcb_glx_get_query_objectiv_arb_reply_t.Item_Array,
Default_Terminator => (others => <>));
subtype Pointer is C_Pointers.Pointer;
-- Pointer_Array
--
type Pointer_Array is
array
(Interfaces.C
.size_t range <>) of aliased xcb
.xcb_glx_get_query_objectiv_arb_reply_t
.Pointer;
-- Pointer_Pointer
--
package C_Pointer_Pointers is new Interfaces.C.Pointers
(Index => Interfaces.C.size_t,
Element => xcb.xcb_glx_get_query_objectiv_arb_reply_t.Pointer,
Element_Array =>
xcb.xcb_glx_get_query_objectiv_arb_reply_t.Pointer_Array,
Default_Terminator => null);
subtype Pointer_Pointer is C_Pointer_Pointers.Pointer;
end xcb.xcb_glx_get_query_objectiv_arb_reply_t;
|
-- This spec has been automatically generated from STM32L4x5.svd
pragma Restrictions (No_Elaboration_Code);
pragma Ada_2012;
pragma Style_Checks (Off);
with HAL;
with System;
package STM32_SVD.CRS is
pragma Preelaborate;
---------------
-- Registers --
---------------
subtype CR_TRIM_Field is HAL.UInt6;
-- control register
type CR_Register is record
-- SYNC event OK interrupt enable
SYNCOKIE : Boolean := False;
-- SYNC warning interrupt enable
SYNCWARNIE : Boolean := False;
-- Synchronization or trimming error interrupt enable
ERRIE : Boolean := False;
-- Expected SYNC interrupt enable
ESYNCIE : Boolean := False;
-- unspecified
Reserved_4_4 : HAL.Bit := 16#0#;
-- Frequency error counter enable
CEN : Boolean := False;
-- Automatic trimming enable
AUTOTRIMEN : Boolean := False;
-- Generate software SYNC event
SWSYNC : Boolean := False;
-- HSI48 oscillator smooth trimming
TRIM : CR_TRIM_Field := 16#20#;
-- unspecified
Reserved_14_31 : HAL.UInt18 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CR_Register use record
SYNCOKIE at 0 range 0 .. 0;
SYNCWARNIE at 0 range 1 .. 1;
ERRIE at 0 range 2 .. 2;
ESYNCIE at 0 range 3 .. 3;
Reserved_4_4 at 0 range 4 .. 4;
CEN at 0 range 5 .. 5;
AUTOTRIMEN at 0 range 6 .. 6;
SWSYNC at 0 range 7 .. 7;
TRIM at 0 range 8 .. 13;
Reserved_14_31 at 0 range 14 .. 31;
end record;
subtype CFGR_RELOAD_Field is HAL.UInt16;
subtype CFGR_FELIM_Field is HAL.UInt8;
subtype CFGR_SYNCDIV_Field is HAL.UInt3;
subtype CFGR_SYNCSRC_Field is HAL.UInt2;
-- configuration register
type CFGR_Register is record
-- Counter reload value
RELOAD : CFGR_RELOAD_Field := 16#BB7F#;
-- Frequency error limit
FELIM : CFGR_FELIM_Field := 16#22#;
-- SYNC divider
SYNCDIV : CFGR_SYNCDIV_Field := 16#0#;
-- unspecified
Reserved_27_27 : HAL.Bit := 16#0#;
-- SYNC signal source selection
SYNCSRC : CFGR_SYNCSRC_Field := 16#2#;
-- unspecified
Reserved_30_30 : HAL.Bit := 16#0#;
-- SYNC polarity selection
SYNCPOL : Boolean := False;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CFGR_Register use record
RELOAD at 0 range 0 .. 15;
FELIM at 0 range 16 .. 23;
SYNCDIV at 0 range 24 .. 26;
Reserved_27_27 at 0 range 27 .. 27;
SYNCSRC at 0 range 28 .. 29;
Reserved_30_30 at 0 range 30 .. 30;
SYNCPOL at 0 range 31 .. 31;
end record;
subtype ISR_FECAP_Field is HAL.UInt16;
-- interrupt and status register
type ISR_Register is record
-- Read-only. SYNC event OK flag
SYNCOKF : Boolean;
-- Read-only. SYNC warning flag
SYNCWARNF : Boolean;
-- Read-only. Error flag
ERRF : Boolean;
-- Read-only. Expected SYNC flag
ESYNCF : Boolean;
-- unspecified
Reserved_4_7 : HAL.UInt4;
-- Read-only. SYNC error
SYNCERR : Boolean;
-- Read-only. SYNC missed
SYNCMISS : Boolean;
-- Read-only. Trimming overflow or underflow
TRIMOVF : Boolean;
-- unspecified
Reserved_11_14 : HAL.UInt4;
-- Read-only. Frequency error direction
FEDIR : Boolean;
-- Read-only. Frequency error capture
FECAP : ISR_FECAP_Field;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for ISR_Register use record
SYNCOKF at 0 range 0 .. 0;
SYNCWARNF at 0 range 1 .. 1;
ERRF at 0 range 2 .. 2;
ESYNCF at 0 range 3 .. 3;
Reserved_4_7 at 0 range 4 .. 7;
SYNCERR at 0 range 8 .. 8;
SYNCMISS at 0 range 9 .. 9;
TRIMOVF at 0 range 10 .. 10;
Reserved_11_14 at 0 range 11 .. 14;
FEDIR at 0 range 15 .. 15;
FECAP at 0 range 16 .. 31;
end record;
-- interrupt flag clear register
type ICR_Register is record
-- SYNC event OK clear flag
SYNCOKC : Boolean := False;
-- SYNC warning clear flag
SYNCWARNC : Boolean := False;
-- Error clear flag
ERRC : Boolean := False;
-- Expected SYNC clear flag
ESYNCC : Boolean := False;
-- unspecified
Reserved_4_31 : HAL.UInt28 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for ICR_Register use record
SYNCOKC at 0 range 0 .. 0;
SYNCWARNC at 0 range 1 .. 1;
ERRC at 0 range 2 .. 2;
ESYNCC at 0 range 3 .. 3;
Reserved_4_31 at 0 range 4 .. 31;
end record;
-----------------
-- Peripherals --
-----------------
-- Clock recovery system
type CRS_Peripheral is record
-- control register
CR : aliased CR_Register;
-- configuration register
CFGR : aliased CFGR_Register;
-- interrupt and status register
ISR : aliased ISR_Register;
-- interrupt flag clear register
ICR : aliased ICR_Register;
end record
with Volatile;
for CRS_Peripheral use record
CR at 16#0# range 0 .. 31;
CFGR at 16#4# range 0 .. 31;
ISR at 16#8# range 0 .. 31;
ICR at 16#C# range 0 .. 31;
end record;
-- Clock recovery system
CRS_Periph : aliased CRS_Peripheral
with Import, Address => System'To_Address (16#40006000#);
end STM32_SVD.CRS;
|
with Ada.Strings.UTF_Encoding.Wide_Wide_Strings;
with Interfaces.C.Strings;
with Notcurses_Thin;
package body Notcurses.Strings is
function Width
(Str : Wide_Wide_String)
return Natural
is
use Ada.Strings.UTF_Encoding.Wide_Wide_Strings;
use Interfaces.C.Strings;
Chars : constant chars_ptr := New_String (Encode (Str));
begin
return Natural (Notcurses_Thin.ncstrwidth (Chars));
end Width;
end Notcurses.Strings;
|
-----------------------------------------------------------------------
-- security-auth-oauth-github -- Github OAuth based authentication
-- Copyright (C) 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 Util.Log.Loggers;
with Util.Http.Clients;
with Util.Properties.JSON;
package body Security.Auth.OAuth.Github is
use Util.Log;
Log : constant Loggers.Logger := Util.Log.Loggers.Create ("Security.Auth.OAuth.Github");
-- ------------------------------
-- Verify the OAuth access token and retrieve information about the user.
-- ------------------------------
overriding
procedure Verify_Access_Token (Realm : in Manager;
Assoc : in Association;
Request : in Parameters'Class;
Token : in Security.OAuth.Clients.Access_Token_Access;
Result : in out Authentication) is
pragma Unreferenced (Request);
URI : constant String := "https://api.github.com/user";
Http : Util.Http.Clients.Client;
Reply : Util.Http.Clients.Response;
Props : Util.Properties.Manager;
begin
Http.Add_Header ("Authorization", "token " & Token.Get_Name);
Http.Get (URI, Reply);
if Reply.Get_Status /= Util.Http.SC_OK then
Log.Warn ("Cannot retrieve Github user information");
Set_Result (Result, INVALID_SIGNATURE, "invalid access token");
return;
end if;
Util.Properties.JSON.Parse_JSON (Props, Reply.Get_Body);
Result.Identity := Realm.Issuer;
Append (Result.Identity, "/");
Append (Result.Identity, String '(Props.Get ("id")));
Result.Claimed_Id := Result.Identity;
Result.First_Name := To_Unbounded_String (Props.Get ("name"));
Result.Full_Name := To_Unbounded_String (Props.Get ("name"));
-- The email is optional and depends on the scope.
Result.Email := To_Unbounded_String (Props.Get ("email"));
Set_Result (Result, AUTHENTICATED, "authenticated");
end Verify_Access_Token;
end Security.Auth.OAuth.Github;
|
package Return2_Pkg is
function F return String;
function G (Line : String; Index : Positive) return String;
end Return2_Pkg;
|
-- { dg-do compile { target i?86-*-* x86_64-*-* } }
-- { dg-options "-O3 -msse2 -fdump-tree-vect-details" }
package body Vect17 is
procedure Add (X, Y : aliased Sarray; R : aliased out Sarray) is
begin
for I in Sarray'Range loop
R(I) := X(I) + Y(I);
end loop;
end;
end Vect17;
-- { dg-final { scan-tree-dump "possible aliasing" "vect" } }
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
-- --
-- S Y S T E M . B B . P A R A M E T E R S --
-- --
-- S p e c --
-- --
-- Copyright (C) 1999-2002 Universidad Politecnica de Madrid --
-- Copyright (C) 2003-2005 The European Space Agency --
-- Copyright (C) 2003-2017, AdaCore --
-- --
-- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNARL is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNARL was developed by the GNARL team at Florida State University. --
-- Extensive contributions were provided by Ada Core Technologies, Inc. --
-- --
-- The port of GNARL to bare board targets was initially developed by the --
-- Real-Time Systems Group at the Technical University of Madrid. --
-- --
------------------------------------------------------------------------------
-- This package defines basic parameters used by the low level tasking system
-- This is the Cortex A9 (ARMv7) version of this package
pragma Restrictions (No_Elaboration_Code);
package System.BB.Parameters is
pragma Pure;
--------------------
-- Hardware clock --
--------------------
Clock_Frequency : constant := 19_200_000;
-- Frequency of the CPU clock in Hz. We hard-code this hear to allow static
-- computation of the required prescaler.
Ticks_Per_Second : constant := Clock_Frequency;
----------------
-- Interrupts --
----------------
-- These definitions are in this package in order to isolate target
-- dependencies.
subtype Interrupt_Range is Natural range 0 .. 11 + 64;
-- Number of interrupts supported by RPI2.
Trap_Vectors : constant := 7;
-- ARM in general has these traps:
-- 0 (at 16#0000#) Reset
-- 1 (at 16#0004#) Undefined Instruction (synchronous)
-- 2 (at 16#0008#) Supervisor Call (synchronous)
-- 3 (at 16#000C#) Abort - Prefetch (synchronous)
-- 4 (at 16#0010#) Abort - Data (asynchronous)
-- 5 (at 16#0014#) IRQ Trap (asynchronous)
-- 6 (at 16#0018#) FIQ Trap (asynchronous)
Interrupt_Unmask_Priority : constant System.Interrupt_Priority :=
System.Interrupt_Priority'First;
-- The priority under which we unmask interrupts.
-- Useful when we use FIQ to simulate priorities on ARM.
------------------------
-- Context Management --
------------------------
-- The run time stores a minimal amount of state in the thread context.
-- Most state will be saved on the task's stack when calling a potentially
-- blocking operation, or on the interrupt stack when the task is pre-
-- empted. Most of the space is currently required for floating point
-- state, which is saved lazily.
-- The ARM processor needs to save:
-- * 6 integer registers of 32 bits (r0, r1, PC, CPSR, R12, SP)
-- for normal processing
-- * 33 floating point registers of 32 bits (s0 .. s31, FPCSR)
-- This amounts to 39 registers, rounded up to 40 for alignment.
Context_Buffer_Capacity : constant := 40;
------------
-- Stacks --
------------
Interrupt_Stack_Size : constant := 4096; -- bytes
-- Size of each of the interrupt stacks. Each processor has its own
-- set of interrupt stacks, one per interrupt priority.
Interrupt_Sec_Stack_Size : constant := 128;
-- Size of the secondary stack for interrupt handlers
----------
-- CPUS --
----------
Max_Number_Of_CPUs : constant := 4;
-- Maximum number of CPUs
Multiprocessor : constant Boolean := Max_Number_Of_CPUs /= 1;
-- Are we on a multiprocessor board?
---------------
-- Privilege --
---------------
type Runtime_EL_Type is range 1 .. 2;
Runtime_EL : constant Runtime_EL_Type := 2;
-- Exception level for the runtime (currently used only on aarch64). Only
-- EL1 and EL2 are supported. EL0 and EL3 are excluded as they don't
-- provide timers.
end System.BB.Parameters;
|
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- C L E A N --
-- --
-- B o d y --
-- --
-- Copyright (C) 2003-2020, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING3. If not, go to --
-- http://www.gnu.org/licenses for a complete copy of the license. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with ALI; use ALI;
with Make_Util; use Make_Util;
with Namet; use Namet;
with Opt; use Opt;
with Osint; use Osint;
with Osint.M; use Osint.M;
with Switch; use Switch;
with Table;
with Targparm;
with Types; use Types;
with Ada.Command_Line; use Ada.Command_Line;
with GNAT.Command_Line; use GNAT.Command_Line;
with GNAT.Directory_Operations; use GNAT.Directory_Operations;
with GNAT.IO; use GNAT.IO;
with GNAT.OS_Lib; use GNAT.OS_Lib;
package body Clean is
-- Suffixes of various files
Assembly_Suffix : constant String := ".s";
Tree_Suffix : constant String := ".adt";
Object_Suffix : constant String := Get_Target_Object_Suffix.all;
Debug_Suffix : constant String := ".dg";
Repinfo_Suffix : constant String := ".rep";
-- Suffix of representation info files
B_Start : constant String := "b~";
-- Prefix of binder generated file, and number of actual characters used
Object_Directory_Path : String_Access := null;
-- The path name of the object directory, set with switch -D
Force_Deletions : Boolean := False;
-- Set to True by switch -f. When True, attempts to delete non writable
-- files will be done.
Do_Nothing : Boolean := False;
-- Set to True when switch -n is specified. When True, no file is deleted.
-- gnatclean only lists the files that would have been deleted if the
-- switch -n had not been specified.
File_Deleted : Boolean := False;
-- Set to True if at least one file has been deleted
Copyright_Displayed : Boolean := False;
Usage_Displayed : Boolean := False;
Project_File_Name : String_Access := null;
package Sources is new Table.Table
(Table_Component_Type => File_Name_Type,
Table_Index_Type => Natural,
Table_Low_Bound => 0,
Table_Initial => 10,
Table_Increment => 100,
Table_Name => "Clean.Processed_Projects");
-- Table to store all the source files of a library unit: spec, body and
-- subunits, to detect .dg files and delete them.
-----------------------------
-- Other local subprograms --
-----------------------------
function Assembly_File_Name (Source : File_Name_Type) return String;
-- Returns the assembly file name corresponding to Source
procedure Clean_Executables;
-- Do the cleaning work when no project file is specified
function Debug_File_Name (Source : File_Name_Type) return String;
-- Name of the expanded source file corresponding to Source
procedure Delete (In_Directory : String; File : String);
-- Delete one file, or list the file name if switch -n is specified
procedure Delete_Binder_Generated_Files
(Dir : String;
Source : File_Name_Type);
-- Delete the binder generated file in directory Dir for Source, if they
-- exist: for Unix these are b~<source>.ads, b~<source>.adb,
-- b~<source>.ali and b~<source>.o.
procedure Display_Copyright;
-- Display the Copyright notice. If called several times, display the
-- Copyright notice only the first time.
procedure Initialize;
-- Call the necessary package initializations
function Object_File_Name (Source : File_Name_Type) return String;
-- Returns the object file name corresponding to Source
procedure Parse_Cmd_Line;
-- Parse the command line
function Repinfo_File_Name (Source : File_Name_Type) return String;
-- Returns the repinfo file name corresponding to Source
function Tree_File_Name (Source : File_Name_Type) return String;
-- Returns the tree file name corresponding to Source
procedure Usage;
-- Display the usage. If called several times, the usage is displayed only
-- the first time.
------------------------
-- Assembly_File_Name --
------------------------
function Assembly_File_Name (Source : File_Name_Type) return String is
Src : constant String := Get_Name_String (Source);
begin
-- If the source name has an extension, then replace it with
-- the assembly suffix.
for Index in reverse Src'First + 1 .. Src'Last loop
if Src (Index) = '.' then
return Src (Src'First .. Index - 1) & Assembly_Suffix;
end if;
end loop;
-- If there is no dot, or if it is the first character, just add the
-- assembly suffix.
return Src & Assembly_Suffix;
end Assembly_File_Name;
-----------------------
-- Clean_Executables --
-----------------------
procedure Clean_Executables is
Main_Source_File : File_Name_Type;
-- Current main source
Main_Lib_File : File_Name_Type;
-- ALI file of the current main
Lib_File : File_Name_Type;
-- Current ALI file
Full_Lib_File : File_Name_Type;
-- Full name of the current ALI file
Text : Text_Buffer_Ptr;
The_ALI : ALI_Id;
Found : Boolean;
Source : Queue.Source_Info;
begin
Queue.Initialize;
-- It does not really matter if there is or not an object file
-- corresponding to an ALI file: if there is one, it will be deleted.
Opt.Check_Object_Consistency := False;
-- Proceed each executable one by one. Each source is marked as it is
-- processed, so common sources between executables will not be
-- processed several times.
for N_File in 1 .. Osint.Number_Of_Files loop
Main_Source_File := Next_Main_Source;
Main_Lib_File :=
Osint.Lib_File_Name (Main_Source_File, Current_File_Index);
if Main_Lib_File /= No_File then
Queue.Insert
((File => Main_Lib_File,
Unit => No_Unit_Name,
Index => 0));
end if;
while not Queue.Is_Empty loop
Sources.Set_Last (0);
Queue.Extract (Found, Source);
pragma Assert (Found);
pragma Assert (Source.File /= No_File);
Lib_File := Source.File;
Full_Lib_File := Osint.Full_Lib_File_Name (Lib_File);
-- If we have existing ALI file that is not read-only, process it
if Full_Lib_File /= No_File
and then not Is_Readonly_Library (Full_Lib_File)
then
Text := Read_Library_Info (Lib_File);
if Text /= null then
The_ALI :=
Scan_ALI (Lib_File, Text, Ignore_ED => False, Err => True);
Free (Text);
-- If no error was produced while loading this ALI file,
-- insert into the queue all the unmarked withed sources.
if The_ALI /= No_ALI_Id then
for J in ALIs.Table (The_ALI).First_Unit ..
ALIs.Table (The_ALI).Last_Unit
loop
Sources.Increment_Last;
Sources.Table (Sources.Last) :=
ALI.Units.Table (J).Sfile;
for K in ALI.Units.Table (J).First_With ..
ALI.Units.Table (J).Last_With
loop
if Withs.Table (K).Afile /= No_File then
Queue.Insert
((File => Withs.Table (K).Afile,
Unit => No_Unit_Name,
Index => 0));
end if;
end loop;
end loop;
-- Look for subunits and put them in the Sources table
for J in ALIs.Table (The_ALI).First_Sdep ..
ALIs.Table (The_ALI).Last_Sdep
loop
if Sdep.Table (J).Subunit_Name /= No_Name then
Sources.Increment_Last;
Sources.Table (Sources.Last) :=
Sdep.Table (J).Sfile;
end if;
end loop;
end if;
end if;
-- Now delete all existing files corresponding to this ALI file
declare
Obj_Dir : constant String :=
Dir_Name (Get_Name_String (Full_Lib_File));
Obj : constant String := Object_File_Name (Lib_File);
Adt : constant String := Tree_File_Name (Lib_File);
Asm : constant String := Assembly_File_Name (Lib_File);
begin
Delete (Obj_Dir, Get_Name_String (Lib_File));
if Is_Regular_File (Obj_Dir & Dir_Separator & Obj) then
Delete (Obj_Dir, Obj);
end if;
if Is_Regular_File (Obj_Dir & Dir_Separator & Adt) then
Delete (Obj_Dir, Adt);
end if;
if Is_Regular_File (Obj_Dir & Dir_Separator & Asm) then
Delete (Obj_Dir, Asm);
end if;
-- Delete expanded source files (.dg) and/or repinfo files
-- (.rep) if any
for J in 1 .. Sources.Last loop
declare
Deb : constant String :=
Debug_File_Name (Sources.Table (J));
Rep : constant String :=
Repinfo_File_Name (Sources.Table (J));
begin
if Is_Regular_File (Obj_Dir & Dir_Separator & Deb) then
Delete (Obj_Dir, Deb);
end if;
if Is_Regular_File (Obj_Dir & Dir_Separator & Rep) then
Delete (Obj_Dir, Rep);
end if;
end;
end loop;
end;
end if;
end loop;
-- Delete the executable, if it exists, and the binder generated
-- files, if any.
if not Compile_Only then
declare
Source : constant File_Name_Type :=
Strip_Suffix (Main_Lib_File);
Executable : constant String :=
Get_Name_String (Executable_Name (Source));
begin
if Is_Regular_File (Executable) then
Delete ("", Executable);
end if;
Delete_Binder_Generated_Files (Get_Current_Dir, Source);
end;
end if;
end loop;
end Clean_Executables;
---------------------
-- Debug_File_Name --
---------------------
function Debug_File_Name (Source : File_Name_Type) return String is
begin
return Get_Name_String (Source) & Debug_Suffix;
end Debug_File_Name;
------------
-- Delete --
------------
procedure Delete (In_Directory : String; File : String) is
Full_Name : String (1 .. In_Directory'Length + File'Length + 1);
Last : Natural := 0;
Success : Boolean;
begin
-- Indicate that at least one file is deleted or is to be deleted
File_Deleted := True;
-- Build the path name of the file to delete
Last := In_Directory'Length;
Full_Name (1 .. Last) := In_Directory;
if Last > 0 and then Full_Name (Last) /= Directory_Separator then
Last := Last + 1;
Full_Name (Last) := Directory_Separator;
end if;
Full_Name (Last + 1 .. Last + File'Length) := File;
Last := Last + File'Length;
-- If switch -n was used, simply output the path name
if Do_Nothing then
Put_Line (Full_Name (1 .. Last));
-- Otherwise, delete the file if it is writable
else
if Force_Deletions
or else Is_Writable_File (Full_Name (1 .. Last))
or else Is_Symbolic_Link (Full_Name (1 .. Last))
then
Delete_File (Full_Name (1 .. Last), Success);
-- Here if no deletion required
else
Success := False;
end if;
if Verbose_Mode or else not Quiet_Output then
if not Success then
Put ("Warning: """);
Put (Full_Name (1 .. Last));
Put_Line (""" could not be deleted");
else
Put ("""");
Put (Full_Name (1 .. Last));
Put_Line (""" has been deleted");
end if;
end if;
end if;
end Delete;
-----------------------------------
-- Delete_Binder_Generated_Files --
-----------------------------------
procedure Delete_Binder_Generated_Files
(Dir : String;
Source : File_Name_Type)
is
Source_Name : constant String := Get_Name_String (Source);
Current : constant String := Get_Current_Dir;
Last : constant Positive := B_Start'Length + Source_Name'Length;
File_Name : String (1 .. Last + 4);
begin
Change_Dir (Dir);
-- Build the file name (before the extension)
File_Name (1 .. B_Start'Length) := B_Start;
File_Name (B_Start'Length + 1 .. Last) := Source_Name;
-- Spec
File_Name (Last + 1 .. Last + 4) := ".ads";
if Is_Regular_File (File_Name (1 .. Last + 4)) then
Delete (Dir, File_Name (1 .. Last + 4));
end if;
-- Body
File_Name (Last + 1 .. Last + 4) := ".adb";
if Is_Regular_File (File_Name (1 .. Last + 4)) then
Delete (Dir, File_Name (1 .. Last + 4));
end if;
-- ALI file
File_Name (Last + 1 .. Last + 4) := ".ali";
if Is_Regular_File (File_Name (1 .. Last + 4)) then
Delete (Dir, File_Name (1 .. Last + 4));
end if;
-- Object file
File_Name (Last + 1 .. Last + Object_Suffix'Length) := Object_Suffix;
if Is_Regular_File (File_Name (1 .. Last + Object_Suffix'Length)) then
Delete (Dir, File_Name (1 .. Last + Object_Suffix'Length));
end if;
-- Change back to previous directory
Change_Dir (Current);
end Delete_Binder_Generated_Files;
-----------------------
-- Display_Copyright --
-----------------------
procedure Display_Copyright is
begin
if not Copyright_Displayed then
Copyright_Displayed := True;
Display_Version ("GNATCLEAN", "2003");
end if;
end Display_Copyright;
---------------
-- Gnatclean --
---------------
procedure Gnatclean is
begin
-- Do the necessary initializations
Clean.Initialize;
-- Parse the command line, getting the switches and the executable names
Parse_Cmd_Line;
if Verbose_Mode then
Display_Copyright;
end if;
Osint.Add_Default_Search_Dirs;
Targparm.Get_Target_Parameters;
if Osint.Number_Of_Files = 0 then
if Argument_Count = 0 then
Usage;
else
Try_Help;
end if;
return;
end if;
if Verbose_Mode then
New_Line;
end if;
if Project_File_Name /= null then
declare
Gprclean_Path : constant String_Access :=
Locate_Exec_On_Path ("gprclean");
Arg_Len : Natural := Argument_Count;
Pos : Natural := 0;
Target : String_Access := null;
Success : Boolean := False;
begin
if Gprclean_Path = null then
Fail_Program
("project files are no longer supported by gnatclean;" &
" use gprclean instead");
end if;
Find_Program_Name;
if Name_Len > 10
and then Name_Buffer (Name_Len - 8 .. Name_Len) = "gnatclean"
then
Target := new String'(Name_Buffer (1 .. Name_Len - 9));
Arg_Len := Arg_Len + 1;
end if;
declare
Args : Argument_List (1 .. Arg_Len);
begin
if Target /= null then
Args (1) := new String'("--target=" & Target.all);
Pos := 1;
end if;
for J in 1 .. Argument_Count loop
Pos := Pos + 1;
Args (Pos) := new String'(Argument (J));
end loop;
Spawn (Gprclean_Path.all, Args, Success);
if Success then
Exit_Program (E_Success);
else
Exit_Program (E_Errors);
end if;
end;
end;
end if;
Clean_Executables;
-- In verbose mode, if Delete has not been called, indicate that no file
-- needs to be deleted.
if Verbose_Mode and (not File_Deleted) then
New_Line;
if Do_Nothing then
Put_Line ("No file needs to be deleted");
else
Put_Line ("No file has been deleted");
end if;
end if;
end Gnatclean;
----------------
-- Initialize --
----------------
procedure Initialize is
begin
-- Reset global variables
Free (Object_Directory_Path);
Do_Nothing := False;
File_Deleted := False;
Copyright_Displayed := False;
Usage_Displayed := False;
end Initialize;
----------------------
-- Object_File_Name --
----------------------
function Object_File_Name (Source : File_Name_Type) return String is
Src : constant String := Get_Name_String (Source);
begin
-- If the source name has an extension, then replace it with
-- the Object suffix.
for Index in reverse Src'First + 1 .. Src'Last loop
if Src (Index) = '.' then
return Src (Src'First .. Index - 1) & Object_Suffix;
end if;
end loop;
-- If there is no dot, or if it is the first character, just add the
-- ALI suffix.
return Src & Object_Suffix;
end Object_File_Name;
--------------------
-- Parse_Cmd_Line --
--------------------
procedure Parse_Cmd_Line is
Last : constant Natural := Argument_Count;
Index : Positive;
Source_Index : Int := 0;
procedure Check_Version_And_Help is new Check_Version_And_Help_G (Usage);
begin
-- First, check for --version and --help
Check_Version_And_Help ("GNATCLEAN", "2003");
-- First, check for switch -P and, if found and gprclean is available,
-- silently invoke gprclean, with switch --target if not on a native
-- platform.
declare
Arg_Len : Positive := Argument_Count;
Call_Gprclean : Boolean := False;
Gprclean : String_Access := null;
Pos : Natural := 0;
Success : Boolean;
Target : String_Access := null;
begin
Find_Program_Name;
if Name_Len >= 9
and then Name_Buffer (Name_Len - 8 .. Name_Len) = "gnatclean"
then
if Name_Len > 9 then
Target := new String'(Name_Buffer (1 .. Name_Len - 10));
Arg_Len := Arg_Len + 1;
end if;
for J in 1 .. Argument_Count loop
declare
Arg : constant String := Argument (J);
begin
if Arg'Length >= 2
and then Arg (Arg'First .. Arg'First + 1) = "-P"
then
Call_Gprclean := True;
exit;
end if;
end;
end loop;
if Call_Gprclean then
Gprclean := Locate_Exec_On_Path (Exec_Name => "gprclean");
if Gprclean /= null then
declare
Args : Argument_List (1 .. Arg_Len);
begin
if Target /= null then
Args (1) := new String'("--target=" & Target.all);
Pos := 1;
end if;
for J in 1 .. Argument_Count loop
Pos := Pos + 1;
Args (Pos) := new String'(Argument (J));
end loop;
Spawn (Gprclean.all, Args, Success);
Free (Gprclean);
if Success then
Exit_Program (E_Success);
else
Exit_Program (E_Fatal);
end if;
end;
end if;
end if;
end if;
end;
Index := 1;
while Index <= Last loop
declare
Arg : constant String := Argument (Index);
procedure Bad_Argument;
pragma No_Return (Bad_Argument);
-- Signal bad argument
------------------
-- Bad_Argument --
------------------
procedure Bad_Argument is
begin
Fail ("invalid argument """ & Arg & """");
end Bad_Argument;
begin
if Arg'Length /= 0 then
if Arg (1) = '-' then
if Arg'Length = 1 then
Bad_Argument;
end if;
case Arg (2) is
when '-' =>
if Arg'Length > Subdirs_Option'Length
and then
Arg (1 .. Subdirs_Option'Length) = Subdirs_Option
then
null;
-- Subdirs are only used in gprclean
elsif Arg = Make_Util.Unchecked_Shared_Lib_Imports then
Opt.Unchecked_Shared_Lib_Imports := True;
else
Bad_Argument;
end if;
when 'a' =>
if Arg'Length < 4 then
Bad_Argument;
end if;
if Arg (3) = 'O' then
Add_Lib_Search_Dir (Arg (4 .. Arg'Last));
elsif Arg (3) = 'P' then
null;
-- This is only for gprclean
else
Bad_Argument;
end if;
when 'c' =>
Compile_Only := True;
when 'D' =>
if Object_Directory_Path /= null then
Fail ("duplicate -D switch");
elsif Project_File_Name /= null then
Fail ("-P and -D cannot be used simultaneously");
end if;
if Arg'Length > 2 then
declare
Dir : constant String := Arg (3 .. Arg'Last);
begin
if not Is_Directory (Dir) then
Fail (Dir & " is not a directory");
else
Add_Lib_Search_Dir (Dir);
end if;
end;
else
if Index = Last then
Fail ("no directory specified after -D");
end if;
Index := Index + 1;
declare
Dir : constant String := Argument (Index);
begin
if not Is_Directory (Dir) then
Fail (Dir & " is not a directory");
else
Add_Lib_Search_Dir (Dir);
end if;
end;
end if;
when 'e' =>
if Arg = "-eL" then
Follow_Links_For_Files := True;
Follow_Links_For_Dirs := True;
else
Bad_Argument;
end if;
when 'f' =>
Force_Deletions := True;
Directories_Must_Exist_In_Projects := False;
when 'F' =>
Full_Path_Name_For_Brief_Errors := True;
when 'h' =>
Usage;
when 'i' =>
if Arg'Length = 2 then
Bad_Argument;
end if;
Source_Index := 0;
for J in 3 .. Arg'Last loop
if Arg (J) not in '0' .. '9' then
Bad_Argument;
end if;
Source_Index :=
(20 * Source_Index) +
(Character'Pos (Arg (J)) - Character'Pos ('0'));
end loop;
when 'I' =>
if Arg = "-I-" then
Opt.Look_In_Primary_Dir := False;
else
if Arg'Length = 2 then
Bad_Argument;
end if;
Add_Lib_Search_Dir (Arg (3 .. Arg'Last));
end if;
when 'n' =>
Do_Nothing := True;
when 'P' =>
if Project_File_Name /= null then
Fail ("multiple -P switches");
elsif Object_Directory_Path /= null then
Fail ("-D and -P cannot be used simultaneously");
end if;
if Arg'Length > 2 then
declare
Prj : constant String := Arg (3 .. Arg'Last);
begin
if Prj'Length > 1
and then Prj (Prj'First) = '='
then
Project_File_Name :=
new String'
(Prj (Prj'First + 1 .. Prj'Last));
else
Project_File_Name := new String'(Prj);
end if;
end;
else
if Index = Last then
Fail ("no project specified after -P");
end if;
Index := Index + 1;
Project_File_Name := new String'(Argument (Index));
end if;
when 'q' =>
Quiet_Output := True;
when 'r' =>
null;
-- This is only for gprclean
when 'v' =>
if Arg = "-v" then
Verbose_Mode := True;
elsif Arg = "-vP0"
or else Arg = "-vP1"
or else Arg = "-vP2"
then
null;
-- This is only for gprclean
else
Bad_Argument;
end if;
when 'X' =>
if Arg'Length = 2 then
Bad_Argument;
end if;
when others =>
Bad_Argument;
end case;
else
Add_File (Arg, Source_Index);
end if;
end if;
end;
Index := Index + 1;
end loop;
end Parse_Cmd_Line;
-----------------------
-- Repinfo_File_Name --
-----------------------
function Repinfo_File_Name (Source : File_Name_Type) return String is
begin
return Get_Name_String (Source) & Repinfo_Suffix;
end Repinfo_File_Name;
--------------------
-- Tree_File_Name --
--------------------
function Tree_File_Name (Source : File_Name_Type) return String is
Src : constant String := Get_Name_String (Source);
begin
-- If source name has an extension, then replace it with the tree suffix
for Index in reverse Src'First + 1 .. Src'Last loop
if Src (Index) = '.' then
return Src (Src'First .. Index - 1) & Tree_Suffix;
end if;
end loop;
-- If there is no dot, or if it is the first character, just add the
-- tree suffix.
return Src & Tree_Suffix;
end Tree_File_Name;
-----------
-- Usage --
-----------
procedure Usage is
begin
if not Usage_Displayed then
Usage_Displayed := True;
Display_Copyright;
Put_Line ("Usage: gnatclean [switches] {[-innn] name}");
New_Line;
Display_Usage_Version_And_Help;
Put_Line (" names is one or more file names from which " &
"the .adb or .ads suffix may be omitted");
Put_Line (" names may be omitted if -P<project> is specified");
New_Line;
Put_Line (" --subdirs=dir real obj/lib/exec dirs are subdirs");
Put_Line (" " & Make_Util.Unchecked_Shared_Lib_Imports);
Put_Line (" Allow shared libraries to import static libraries");
New_Line;
Put_Line (" -c Only delete compiler generated files");
Put_Line (" -D dir Specify dir as the object library");
Put_Line (" -eL Follow symbolic links when processing " &
"project files");
Put_Line (" -f Force deletions of unwritable files");
Put_Line (" -F Full project path name " &
"in brief error messages");
Put_Line (" -h Display this message");
Put_Line (" -innn Index of unit in source for following names");
Put_Line (" -n Nothing to do: only list files to delete");
Put_Line (" -Pproj Use GNAT Project File proj");
Put_Line (" -q Be quiet/terse");
Put_Line (" -r Clean all projects recursively");
Put_Line (" -v Verbose mode");
Put_Line (" -vPx Specify verbosity when parsing " &
"GNAT Project Files");
Put_Line (" -Xnm=val Specify an external reference " &
"for GNAT Project Files");
New_Line;
Put_Line (" -aPdir Add directory dir to project search path");
New_Line;
Put_Line (" -aOdir Specify ALI/object files search path");
Put_Line (" -Idir Like -aOdir");
Put_Line (" -I- Don't look for source/library files " &
"in the default directory");
New_Line;
end if;
end Usage;
end Clean;
|
with Interfaces;
with Ada.Numerics.Float_Random;
with Ada.Assertions;
with Vector_Math;
with Materials;
with Ada.Unchecked_Deallocation;
with Ray_Tracer;
use Interfaces;
use Vector_Math;
use Materials;
use Ada.Assertions;
use Ray_Tracer;
private package Ray_Tracer.Integrators is
---------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------
-- integrators
--
type Integrator is abstract tagged record
gen : RandRef := null;
end record;
type IntegratorRef is access Integrator'Class;
function PathTrace(self : Integrator; r : Ray; prevSample : MatSample; recursion_level : Integer) return float3 is abstract;
procedure Init(self : in out Integrator) is abstract;
procedure DoPass(self : in out Integrator; colBuff : AccumBuffRef);
-- stupid path tracer
--
type SimplePathTracer is new Integrator with null record;
procedure Init(self : in out SimplePathTracer);
function PathTrace(self : SimplePathTracer; r : Ray; prevSample : MatSample; recursion_level : Integer) return float3;
-- path tracer with shadow rays
--
type PathTracerWithShadowRays is new Integrator with null record;
procedure Init(self : in out PathTracerWithShadowRays);
function PathTrace(self : PathTracerWithShadowRays; r : Ray; prevSample : MatSample; recursion_level : Integer) return float3;
-- path tracer with MIS
--
type PathTracerMIS is new Integrator with null record;
procedure Init(self : in out PathTracerMIS);
function PathTrace(self : PathTracerMIS; r : Ray; prevSample : MatSample; recursion_level : Integer) return float3;
end Ray_Tracer.Integrators;
|
-- POK header
--
-- The following file is a part of the POK project. Any modification should
-- be made according to the POK licence. You CANNOT use this file or a part
-- of a file for your own project.
--
-- For more information on the POK licence, please see our LICENCE FILE
--
-- Please follow the coding guidelines described in doc/CODING_GUIDELINES
--
-- Copyright (c) 2007-2021 POK team
package Subprograms is
procedure Hello_Part1;
end Subprograms;
|
--------------------------------------------------------------------------------
-- MIT License
--
-- Copyright (c) 2020 Zane Myers
--
-- 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.
--------------------------------------------------------------------------------
-- This package describes a generic Single Precision Floating Point Vulkan Math type.
--------------------------------------------------------------------------------
package body Vulkan.Math.GenFType is
function "<" (left, right : in Vkm_GenFType) return Vkm_GenBType is
result : Vkm_GenBType(last_index => left.last_index);
begin
for index in Vkm_Indices'First .. left.last_index loop
result.data(index) := Vkm_Bool(left.data(index) < right.data(index));
end loop;
return result;
end "<";
----------------------------------------------------------------------------
function "<=" (left, right : in Vkm_GenFType) return Vkm_GenBType is
result : Vkm_GenBType(last_index => left.last_index);
begin
for index in Vkm_Indices'First .. left.last_index loop
result.data(index) := Vkm_Bool(left.data(index) <= right.data(index));
end loop;
return result;
end "<=";
----------------------------------------------------------------------------
function ">" (left, right : in Vkm_GenFType) return Vkm_GenBType is
result : Vkm_GenBType(last_index => left.last_index);
begin
for index in Vkm_Indices'First .. left.last_index loop
result.data(index) := Vkm_Bool(left.data(index) > right.data(index));
end loop;
return result;
end ">";
----------------------------------------------------------------------------
function ">=" (left, right : in Vkm_GenFType) return Vkm_GenBType is
result : Vkm_GenBType(last_index => left.last_index);
begin
for index in Vkm_Indices'First .. left.last_index loop
result.data(index) := Vkm_Bool(left.data(index) >= right.data(index));
end loop;
return result;
end ">=";
----------------------------------------------------------------------------
-- Generic Operations
----------------------------------------------------------------------------
function Apply_Func_IVF_IVF_IVB_RVF(IVF1, IVF2 : in Vkm_GenFType;
IVB1 : in Vkm_GenBType) return Vkm_GenFType is
Result : Vkm_GenFType := IVF1;
begin
for I in Vkm_Indices'First .. To_Vkm_Indices(IVF1.Length) loop
Result.data(I) := Func(IVF1.data(I), IVF2.data(I), IVB1.data(I));
end loop;
return Result;
end Apply_Func_IVF_IVF_IVB_RVF;
function Apply_Func_IVF_RVB(IVF1 : in Vkm_GenFType) return Vkm_GenBType is
Result : Vkm_GenBType := (Last_Index => IVF1.Last_Index, others => <>);
begin
for I in Vkm_Indices'First .. IVF1.Last_Index loop
Result.data(I) := Func(IVF1.data(I));
end loop;
return Result;
end Apply_Func_IVF_RVB;
function Apply_Func_IVF_RVI (IVF1 : in Vkm_GenFType) return Vkm_GenIType is
Result : Vkm_GenIType := (Last_Index => IVF1.Last_Index, others => <>);
begin
for I in Vkm_Indices'First .. IVF1.Last_Index loop
Result.data(I) := Func(IVF1.data(I));
end loop;
return Result;
end Apply_Func_IVF_RVI;
function Apply_Func_IVI_RVF (IVI1 : in Vkm_GenIType) return Vkm_GenFType is
Result : Vkm_GenFType := (Last_Index => IVI1.Last_Index, others => <>);
begin
for I in Vkm_Indices'First .. IVI1.Last_Index loop
Result.data(I) := Func(IVI1.data(I));
end loop;
return Result;
end Apply_Func_IVI_RVF;
function Apply_Func_IVF_RVU (IVF1 : in Vkm_GenFType) return Vkm_GenUType is
Result : Vkm_GenUType := (Last_Index => IVF1.Last_Index, others => <>);
begin
for I in Vkm_Indices'First .. IVF1.Last_Index loop
Result.data(I) := Func(IVF1.data(I));
end loop;
return Result;
end Apply_Func_IVF_RVU;
function Apply_Func_IVU_RVF (IVU1 : in Vkm_GenUType) return Vkm_GenFType is
Result : Vkm_GenFType := (Last_Index => IVU1.Last_Index, others => <>);
begin
for I in Vkm_Indices'First .. IVU1.Last_Index loop
Result.data(I) := Func(IVU1.data(I));
end loop;
return Result;
end Apply_Func_IVU_RVF;
function Apply_Func_IVF_OVI_RVF(IVF : in Vkm_GenFType;
OVI : out Vkm_GenIType) return Vkm_GenFType is
Result : Vkm_GenFType := (Last_Index => IVF.Last_Index, others => <>);
begin
for I in Vkm_Indices'First .. IVF.Last_Index loop
Result.data(I) := Func(IVF.data(I),OVI.data(I));
end loop;
return Result;
end Apply_Func_IVF_OVI_RVF;
function Apply_Func_IVF_IVI_RVF(IVF : in Vkm_GenFType;
IVI : in Vkm_GenIType) return Vkm_GenFType is
Result : Vkm_GenFType := (Last_Index => IVF.Last_Index, others => <>);
begin
for I in Vkm_Indices'First .. IVF.Last_Index loop
Result.data(I) := Func(IVF.data(I),IVI.data(I));
end loop;
return Result;
end Apply_Func_IVF_IVI_RVF;
function Apply_Func_IVF_IVF_RVB(IVF1, IVF2 : in Vkm_GenFType) return Vkm_GenBType is
Result : Vkm_GenBType := (Last_Index => IVF1.Last_Index, others => <>);
begin
for I in Vkm_Indices'First .. IVF1.Last_Index loop
Result.data(I) := Func(IVF1.data(I), IVF2.data(I));
end loop;
return Result;
end Apply_Func_IVF_IVF_RVB;
end Vulkan.Math.GenFType;
|
pragma License (Unrestricted);
-- implementation unit
with Ada.Tags; -- [gcc-5] is confused in C390004 if this line is "private with"
package System.Storage_Pools.Standard_Pools is
pragma Preelaborate;
type Standard_Pool is
limited new Storage_Pools.Root_Storage_Pool with null record
with Disable_Controlled => True;
pragma Finalize_Storage_Only (Standard_Pool);
overriding procedure Allocate (
Pool : in out Standard_Pool;
Storage_Address : out Address;
Size_In_Storage_Elements : Storage_Elements.Storage_Count;
Alignment : Storage_Elements.Storage_Count);
overriding procedure Deallocate (
Pool : in out Standard_Pool;
Storage_Address : Address;
Size_In_Storage_Elements : Storage_Elements.Storage_Count;
Alignment : Storage_Elements.Storage_Count);
overriding function Storage_Size (Pool : Standard_Pool)
return Storage_Elements.Storage_Count is
(Storage_Elements.Storage_Count'Last);
-- The "standard storage pool" object, is implementation-defined,
-- but mentioned in RM 13.11(17).
Standard_Storage_Pool : constant not null access Standard_Pool;
private
Dispatcher : aliased constant Ada.Tags.Tag := Standard_Pool'Tag;
Standard_Storage_Pool : constant not null access Standard_Pool :=
Standard_Pool'Deref (Dispatcher'Address)'Unrestricted_Access;
end System.Storage_Pools.Standard_Pools;
|
package Sizetype3 is
type Values_Array is array (Positive range <>) of Integer;
type Values_Array_Access is access all Values_Array;
procedure Simplify_Type_Of;
end Sizetype3;
|
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Localization, Internationalization, Globalization for Ada --
-- --
-- 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$
------------------------------------------------------------------------------
with Matreshka.Internals.Strings.Configuration;
with Matreshka.Internals.Unicode.Characters.Latin;
with Matreshka.Internals.Utf16;
package body Matreshka.Internals.Text_Codecs.Windows1251 is
use Matreshka.Internals.Strings.Configuration;
use Matreshka.Internals.Unicode.Characters.Latin;
use type Matreshka.Internals.Unicode.Code_Unit_32;
use type Matreshka.Internals.Utf16.Utf16_String_Index;
Decode_Table : constant
array (Ada.Streams.Stream_Element range 16#80# .. 16#BF#)
of Matreshka.Internals.Unicode.Code_Point
:= (16#80# => 16#0402#, -- CYRILLIC CAPITAL LETTER DJE
16#81# => 16#0403#, -- CYRILLIC CAPITAL LETTER GJE
16#82# => 16#201A#, -- SINGLE LOW-9 QUOTATION MARK
16#83# => 16#0453#, -- CYRILLIC SMALL LETTER GJE
16#84# => 16#201E#, -- DOUBLE LOW-9 QUOTATION MARK
16#85# => 16#2026#, -- HORIZONTAL ELLIPSIS
16#86# => 16#2020#, -- DAGGER
16#87# => 16#2021#, -- DOUBLE DAGGER
16#88# => 16#20AC#, -- EURO SIGN
16#89# => 16#2030#, -- PER MILLE SIGN
16#8A# => 16#0409#, -- CYRILLIC CAPITAL LETTER LJE
16#8B# => 16#2039#, -- SINGLE LEFT-POINTING ANGLE QUOTATION
-- MARK
16#8C# => 16#040A#, -- CYRILLIC CAPITAL LETTER NJE
16#8D# => 16#040C#, -- CYRILLIC CAPITAL LETTER KJE
16#8E# => 16#040B#, -- CYRILLIC CAPITAL LETTER TSHE
16#8F# => 16#040F#, -- CYRILLIC CAPITAL LETTER DZHE
16#90# => 16#0452#, -- CYRILLIC SMALL LETTER DJE
16#91# => 16#2018#, -- LEFT SINGLE QUOTATION MARK
16#92# => 16#2019#, -- RIGHT SINGLE QUOTATION MARK
16#93# => 16#201C#, -- LEFT DOUBLE QUOTATION MARK
16#94# => 16#201D#, -- RIGHT DOUBLE QUOTATION MARK
16#95# => 16#2022#, -- BULLET
16#96# => 16#2013#, -- EN DASH
16#97# => 16#2014#, -- EM DASH
16#98# => Question_Mark,
16#99# => 16#2122#, -- TRADE MARK SIGN
16#9A# => 16#0459#, -- CYRILLIC SMALL LETTER LJE
16#9B# => 16#203A#, -- SINGLE RIGHT-POINTING ANGLE QUOTATION
-- MARK
16#9C# => 16#045A#, -- CYRILLIC SMALL LETTER NJE
16#9D# => 16#045C#, -- CYRILLIC SMALL LETTER KJE
16#9E# => 16#045B#, -- CYRILLIC SMALL LETTER TSHE
16#9F# => 16#045F#, -- CYRILLIC SMALL LETTER DZHE
16#A0# => 16#00A0#, -- NO-BREAK SPACE
16#A1# => 16#040E#, -- CYRILLIC CAPITAL LETTER SHORT U
16#A2# => 16#045E#, -- CYRILLIC SMALL LETTER SHORT U
16#A3# => 16#0408#, -- CYRILLIC CAPITAL LETTER JE
16#A4# => 16#00A4#, -- CURRENCY SIGN
16#A5# => 16#0490#, -- CYRILLIC CAPITAL LETTER GHE WITH UPTURN
16#A6# => 16#00A6#, -- BROKEN BAR
16#A7# => 16#00A7#, -- SECTION SIGN
16#A8# => 16#0401#, -- CYRILLIC CAPITAL LETTER IO
16#A9# => 16#00A9#, -- COPYRIGHT SIGN
16#AA# => 16#0404#, -- CYRILLIC CAPITAL LETTER UKRAINIAN IE
16#AB# => 16#00AB#, -- LEFT-POINTING DOUBLE ANGLE QUOTATION
-- MARK
16#AC# => 16#00AC#, -- NOT SIGN
16#AD# => 16#00AD#, -- SOFT HYPHEN
16#AE# => 16#00AE#, -- REGISTERED SIGN
16#AF# => 16#0407#, -- CYRILLIC CAPITAL LETTER YI
16#B0# => 16#00B0#, -- DEGREE SIGN
16#B1# => 16#00B1#, -- PLUS-MINUS SIGN
16#B2# => 16#0406#, -- CYRILLIC CAPITAL LETTER
-- BYELORUSSIAN-UKRAINIAN I
16#B3# => 16#0456#, -- CYRILLIC SMALL LETTER
-- BYELORUSSIAN-UKRAINIAN I
16#B4# => 16#0491#, -- CYRILLIC SMALL LETTER GHE WITH UPTURN
16#B5# => 16#00B5#, -- MICRO SIGN
16#B6# => 16#00B6#, -- PILCROW SIGN
16#B7# => 16#00B7#, -- MIDDLE DOT
16#B8# => 16#0451#, -- CYRILLIC SMALL LETTER IO
16#B9# => 16#2116#, -- NUMERO SIGN
16#BA# => 16#0454#, -- CYRILLIC SMALL LETTER UKRAINIAN IE
16#BB# => 16#00BB#, -- RIGHT-POINTING DOUBLE ANGLE QUOTATION
-- MARK
16#BC# => 16#0458#, -- CYRILLIC SMALL LETTER JE
16#BD# => 16#0405#, -- CYRILLIC CAPITAL LETTER DZE
16#BE# => 16#0455#, -- CYRILLIC SMALL LETTER DZE
16#BF# => 16#0457#); -- CYRILLIC SMALL LETTER YI
Encode_Table_00 : constant
array (Matreshka.Internals.Unicode.Code_Point range 16#00A0# .. 16#00BF#)
of Ada.Streams.Stream_Element
:= (16#00A0# => 16#A0#, -- NO-BREAK SPACE
16#00A4# => 16#A4#, -- CURRENCY SIGN
16#00A6# => 16#A6#, -- BROKEN BAR
16#00A7# => 16#A7#, -- SECTION SIGN
16#00A9# => 16#A9#, -- COPYRIGHT SIGN
16#00AB# => 16#AB#, -- LEFT-POINTING DOUBLE ANGLE QUOTATION
-- MARK
16#00AC# => 16#AC#, -- NOT SIGN
16#00AD# => 16#AD#, -- SOFT HYPHEN
16#00AE# => 16#AE#, -- REGISTERED SIGN
16#00B0# => 16#B0#, -- DEGREE SIGN
16#00B1# => 16#B1#, -- PLUS-MINUS SIGN
16#00B5# => 16#B5#, -- MICRO SIGN
16#00B6# => 16#B6#, -- PILCROW SIGN
16#00B7# => 16#B7#, -- MIDDLE DOT
16#00BB# => 16#BB#, -- RIGHT-POINTING DOUBLE ANGLE QUOTATION
-- MARK
others => Question_Mark);
Encode_Table_04a : constant
array (Matreshka.Internals.Unicode.Code_Point range 16#0400# .. 16#040F#)
of Ada.Streams.Stream_Element
:= (16#0401# => 16#A8#, -- CYRILLIC CAPITAL LETTER IO
16#0402# => 16#80#, -- CYRILLIC CAPITAL LETTER DJE
16#0403# => 16#81#, -- CYRILLIC CAPITAL LETTER GJE
16#0404# => 16#AA#, -- CYRILLIC CAPITAL LETTER UKRAINIAN IE
16#0405# => 16#BD#, -- CYRILLIC CAPITAL LETTER DZE
16#0406# => 16#B2#, -- CYRILLIC CAPITAL LETTER
-- BYELORUSSIAN-UKRAINIAN I
16#0407# => 16#AF#, -- CYRILLIC CAPITAL LETTER YI
16#0408# => 16#A3#, -- CYRILLIC CAPITAL LETTER JE
16#0409# => 16#8A#, -- CYRILLIC CAPITAL LETTER LJE
16#040A# => 16#8C#, -- CYRILLIC CAPITAL LETTER NJE
16#040B# => 16#8E#, -- CYRILLIC CAPITAL LETTER TSHE
16#040C# => 16#8D#, -- CYRILLIC CAPITAL LETTER KJE
16#040E# => 16#A1#, -- CYRILLIC CAPITAL LETTER SHORT U
16#040F# => 16#8F#, -- CYRILLIC CAPITAL LETTER DZHE
others => Question_Mark);
Encode_Table_04b : constant
array (Matreshka.Internals.Unicode.Code_Point range 16#0450# .. 16#049F#)
of Ada.Streams.Stream_Element
:= (16#0451# => 16#B8#, -- CYRILLIC SMALL LETTER IO
16#0452# => 16#90#, -- CYRILLIC SMALL LETTER DJE
16#0453# => 16#83#, -- CYRILLIC SMALL LETTER GJE
16#0454# => 16#BA#, -- CYRILLIC SMALL LETTER UKRAINIAN IE
16#0455# => 16#BE#, -- CYRILLIC SMALL LETTER DZE
16#0456# => 16#B3#, -- CYRILLIC SMALL LETTER
-- BYELORUSSIAN-UKRAINIAN I
16#0457# => 16#BF#, -- CYRILLIC SMALL LETTER YI
16#0458# => 16#BC#, -- CYRILLIC SMALL LETTER JE
16#0459# => 16#9A#, -- CYRILLIC SMALL LETTER LJE
16#045A# => 16#9C#, -- CYRILLIC SMALL LETTER NJE
16#045B# => 16#9E#, -- CYRILLIC SMALL LETTER TSHE
16#045C# => 16#9D#, -- CYRILLIC SMALL LETTER KJE
16#045E# => 16#A2#, -- CYRILLIC SMALL LETTER SHORT U
16#045F# => 16#9F#, -- CYRILLIC SMALL LETTER DZHE
16#0490# => 16#A5#, -- CYRILLIC CAPITAL LETTER GHE WITH UPTURN
16#0491# => 16#B4#, -- CYRILLIC SMALL LETTER GHE WITH UPTURN
others => Question_Mark);
Encode_Table_20 : constant
array (Matreshka.Internals.Unicode.Code_Point range 16#2010# .. 16#203F#)
of Ada.Streams.Stream_Element
:= (16#2013# => 16#96#, -- EN DASH
16#2014# => 16#97#, -- EM DASH
16#2018# => 16#91#, -- LEFT SINGLE QUOTATION MARK
16#2019# => 16#92#, -- RIGHT SINGLE QUOTATION MARK
16#201A# => 16#82#, -- SINGLE LOW-9 QUOTATION MARK
16#201C# => 16#93#, -- LEFT DOUBLE QUOTATION MARK
16#201D# => 16#94#, -- RIGHT DOUBLE QUOTATION MARK
16#201E# => 16#84#, -- DOUBLE LOW-9 QUOTATION MARK
16#2020# => 16#86#, -- DAGGER
16#2021# => 16#87#, -- DOUBLE DAGGER
16#2022# => 16#95#, -- BULLET
16#2026# => 16#85#, -- HORIZONTAL ELLIPSIS
16#2030# => 16#89#, -- PER MILLE SIGN
16#2039# => 16#8B#, -- SINGLE LEFT-POINTING ANGLE QUOTATION
-- MARK
16#203A# => 16#9B#, -- SINGLE RIGHT-POINTING ANGLE QUOTATION
-- MARK
others => Question_Mark);
-------------------
-- Decode_Append --
-------------------
overriding procedure Decode_Append
(Self : in out Windows1251_Decoder;
Data : Ada.Streams.Stream_Element_Array;
String : in out Matreshka.Internals.Strings.Shared_String_Access) is
begin
Matreshka.Internals.Strings.Mutate (String, String.Unused + Data'Length);
for J in Data'Range loop
case Data (J) is
when 16#00# .. 16#7F# =>
-- Directly mapped.
Self.Unchecked_Append
(Self,
String,
Matreshka.Internals.Unicode.Code_Point (Data (J)));
when 16#80# .. 16#BF# =>
-- Table translated.
Self.Unchecked_Append (Self, String, Decode_Table (Data (J)));
when 16#C0# .. 16#FF# =>
-- Computed.
Self.Unchecked_Append
(Self,
String,
Matreshka.Internals.Unicode.Code_Point (Data (J))
- 16#C0# + 16#0410#);
end case;
end loop;
String_Handler.Fill_Null_Terminator (String);
end Decode_Append;
-------------
-- Decoder --
-------------
function Decoder (Mode : Decoder_Mode) return Abstract_Decoder'Class is
begin
case Mode is
when Raw =>
return
Windows1251_Decoder'
(Skip_LF => False,
Unchecked_Append => Unchecked_Append_Raw'Access);
when XML_1_0 =>
return
Windows1251_Decoder'
(Skip_LF => False,
Unchecked_Append => Unchecked_Append_XML10'Access);
when XML_1_1 =>
return
Windows1251_Decoder'
(Skip_LF => False,
Unchecked_Append => Unchecked_Append_XML11'Access);
end case;
end Decoder;
------------
-- Encode --
------------
overriding procedure Encode
(Self : in out Windows1251_Encoder;
String : not null Matreshka.Internals.Strings.Shared_String_Access;
Buffer : out MISEV.Shared_Stream_Element_Vector_Access)
is
pragma Unreferenced (Self);
use Matreshka.Internals.Stream_Element_Vectors;
use Ada.Streams;
Code : Matreshka.Internals.Unicode.Code_Point;
Position : Matreshka.Internals.Utf16.Utf16_String_Index := 0;
Element : Ada.Streams.Stream_Element;
begin
if String.Unused = 0 then
Buffer := Empty_Shared_Stream_Element_Vector'Access;
else
Buffer :=
Allocate (Ada.Streams.Stream_Element_Offset (String.Unused));
while Position < String.Unused loop
Matreshka.Internals.Utf16.Unchecked_Next
(String.Value, Position, Code);
if Code in 16#0000# .. 16#007F# then
-- Direct mapping.
Element := Stream_Element (Code);
elsif Code in 16#0410# .. 16#044F# then
-- Computable mapping.
Element := Stream_Element (Code - 16#0410#) + 16#C0#;
elsif Code in 16#00A0# .. 16#00BF# then
-- Table translation, range 00A0 .. 00BF.
Element := Encode_Table_00 (Code);
elsif Code in 16#0400# .. 16#040F# then
-- Table translation, range 0400 .. 040F.
Element := Encode_Table_04a (Code);
elsif Code in 16#0450# .. 16#049F# then
-- Table translation, range 0450 .. 049F.
Element := Encode_Table_04b (Code);
elsif Code in 16#2010# .. 16#203F# then
-- Table translation, range 2010 .. 203F.
Element := Encode_Table_20 (Code);
elsif Code = 16#20AC# then
-- 16#20AC# => 16#88# -- EURO SIGN
Element := 16#88#;
elsif Code = 16#2116# then
-- 16#2116# => 16#B9# -- NUMERO SIGN
Element := 16#B9#;
elsif Code = 16#2122# then
-- 16#2122# => 16#99# -- TRADE MARK SIGN
Element := 16#99#;
else
Element := Question_Mark;
end if;
Buffer.Value (Buffer.Length) := Element;
Buffer.Length := Buffer.Length + 1;
end loop;
end if;
end Encode;
-------------
-- Encoder --
-------------
function Encoder return Abstract_Encoder'Class is
begin
return Windows1251_Encoder'(null record);
end Encoder;
--------------
-- Is_Error --
--------------
overriding function Is_Error (Self : Windows1251_Decoder) return Boolean is
pragma Unreferenced (Self);
begin
return False;
end Is_Error;
-------------------
-- Is_Mailformed --
-------------------
overriding function Is_Mailformed
(Self : Windows1251_Decoder) return Boolean
is
pragma Unreferenced (Self);
begin
return False;
end Is_Mailformed;
end Matreshka.Internals.Text_Codecs.Windows1251;
|
procedure Parenthesis_Matter is
subtype SmallIntType is Integer range 0..12;
function SmallIntVal return SmallIntType is
begin
return 0;
end SmallIntVal;
begin
case SmallIntVal is
when 0 => null;
-- when 13 => null; -- error
when others => null;
end case;
case (SmallIntVal) is
when 0 => null;
when 13 => null; -- no error
when others => null;
end case;
end Parenthesis_Matter;
|
with
gel.Forge,
gel.Conversions,
physics.Model,
openGL.Model.any,
opengl.Palette,
opengl.Program .lit_colored_textured_skinned,
opengl.Geometry.lit_colored_textured_skinned,
collada.Document,
collada.Library,
collada.Library.controllers,
collada.Library.animations,
ada.Strings.unbounded,
ada.Strings.Maps;
package body gel.Rig
is
use linear_Algebra_3D;
-----------
--- Utility
--
function "+" (From : in ada.strings.unbounded.unbounded_String) return String
renames ada.strings.unbounded.to_String;
function "+" (From : in String) return ada.strings.unbounded.unbounded_String
renames ada.strings.unbounded.to_unbounded_String;
function to_gel_joint_Id (Parent, Child : in bone_Id) return gel_joint_Id
is
use ada.Strings.unbounded;
begin
return Parent & "_to_" & Child;
end to_gel_joint_Id;
function to_Math (From : in collada.Matrix_4x4) return math.Matrix_4x4
is
begin
return (1 => (From (1, 1), From (1, 2), From (1, 3), From (1, 4)),
2 => (From (2, 1), From (2, 2), From (2, 3), From (2, 4)),
3 => (From (3, 1), From (3, 2), From (3, 3), From (3, 4)),
4 => (From (4, 1), From (4, 2), From (4, 3), From (4, 4)));
end to_Math;
function to_Details (Length : Real := Unspecified;
width_Factor,
depth_Factor : Real := 0.1;
pitch_Limits,
yaw_Limits,
roll_Limits : gel.Sprite.DoF_Limits := (to_Radians (-15.0),
to_Radians ( 15.0))) return bone_Details
is
begin
return (Length, width_Factor, depth_Factor,
pitch_Limits, yaw_Limits, roll_Limits);
end to_Details;
---------
--- Forge
--
package body Forge
is
function new_Rig (in_World : in gel.World.view;
Model : in openGL.Model.view;
Mass : in Real := 0.0;
is_Kinematic : in Boolean := False) return Rig.view
is
Self : constant Rig.view := new Rig.item;
begin
Self.define (in_World, Model, Mass, is_Kinematic);
return Self;
end new_Rig;
function new_Rig (bone_Sprites : in bone_id_Map_of_sprite;
joint_inv_bind_Matrices : in inverse_bind_matrix_Vector;
joint_site_Offets : in joint_Id_Map_of_bone_site_offset;
Model : in openGL.Model.view) return Rig.view
is
the_Box : constant Rig.View := new Rig.item;
begin
the_Box.bone_Sprites := bone_Sprites;
the_Box.joint_inv_bind_Matrices := joint_inv_bind_Matrices;
the_Box.phys_joint_site_Offets := joint_site_Offets;
the_Box.Model := Model;
return the_Box;
end new_Rig;
end Forge;
---------------------------
--- Skin program parameters
--
overriding
procedure enable (Self : in out skin_program_Parameters)
is
use joint_id_Maps_of_slot;
subtype Program_view is openGL.Program.lit_colored_textured_skinned.view;
Cursor : joint_id_Maps_of_slot.Cursor := Self.joint_Map_of_slot.First;
Slot : Integer;
begin
while has_Element (Cursor)
loop
Slot := Element (Cursor);
Program_view (Self.Program).bone_Transform_is (Which => Slot,
Now => Self.bone_Transforms.Element (Slot));
next (Cursor);
end loop;
end enable;
-------------
--- Animation
--
procedure define_global_Transform_for (Self : in out Item'Class; the_Joint : in collada.Library.visual_scenes.Node_view;
Slot : in out Positive)
is
use collada.Library;
which_Joint : constant scene_joint_Id := the_Joint.Id;
child_Joints : constant visual_scenes.Nodes := the_Joint.Children;
default_scene_Joint : scene_Joint;
the_global_Transform : constant Matrix_4x4 := Transpose (the_Joint.global_Transform); -- Transpose to convert to row-major.
begin
Self.joint_pose_Transforms.insert (which_Joint, the_global_Transform);
Self.collada_Joints .insert (which_Joint, the_Joint);
default_scene_Joint.Node := the_Joint;
Self.scene_Joints.insert (which_Joint, default_scene_Joint);
for i in child_Joints'Range
loop
Slot := Slot + 1;
define_global_Transform_for (Self, child_Joints (i), Slot); -- Recurse over children.
end loop;
end define_global_Transform_for;
procedure update_global_Transform_for (Self : in out Item'Class; the_Joint : in collada.Library.visual_scenes.Node_view)
is
use collada.Library,
ada.Strings.unbounded;
which_Joint : constant scene_joint_Id := the_Joint.Id;
child_Joints : constant visual_scenes.Nodes := the_Joint.Children;
the_global_Transform : constant Matrix_4x4 := math.Transpose (the_Joint.global_Transform); -- Transpose to convert to row-major.
joint_site_Offet : Vector_3;
begin
if which_Joint = Self.root_Joint.Name
then joint_site_Offet := (0.0, 0.0, 0.0);
else joint_site_Offet := Self.anim_joint_site_Offets (which_Joint);
end if;
Self.joint_pose_Transforms.replace (which_Joint, (the_global_Transform));
Self.scene_Joints (which_Joint).Transform := the_global_Transform;
declare
use type gel.Sprite.view;
the_bone_Id : constant bone_Id := which_Joint;
Site : Vector_3;
Rotation : Matrix_3x3;
begin
if Self.bone_Sprites (the_bone_Id) /= null
then
Site := get_Translation (the_global_Transform);
Site := Site - joint_site_Offet * (get_Rotation (the_global_Transform));
Site := Site * Inverse (Self.base_Sprite.Spin);
Site := Site + Self.overall_Site;
Rotation := Inverse (get_Rotation (the_global_Transform));
Rotation := Self.base_Sprite.Spin * Rotation;
Self.bone_Sprites (the_bone_Id).all.Site_is (Site);
if which_Joint /= Self.root_Joint.Name
then
Self.bone_Sprites (the_bone_Id).all.Spin_is (Rotation);
end if;
end if;
end;
for i in child_Joints'Range
loop
Self.update_global_Transform_for (child_Joints (i)); -- Recurse over children.
end loop;
end update_global_Transform_for;
procedure update_all_global_Transforms (Self : in out Item'Class)
is
begin
Self.update_global_Transform_for (Self.root_Joint); -- Re-determine all joint transforms, recursively.
end update_all_global_Transforms;
procedure set_rotation_Angle (Self : in out Item'Class; for_Joint : in scene_joint_Id;
Axis : in axis_Kind;
To : in Real)
is
begin
case Axis is
when x_Axis => Self.set_x_rotation_Angle (for_Joint, To);
when y_Axis => Self.set_y_rotation_Angle (for_Joint, To);
when z_Axis => Self.set_z_rotation_Angle (for_Joint, To);
end case;
end set_rotation_Angle;
procedure set_Location (Self : in out Item'Class; for_Joint : in scene_joint_Id;
To : in Vector_3)
is
begin
Self.scene_Joints (for_Joint).Node.set_Location (To);
end set_Location;
procedure set_Location_x (Self : in out Item'Class; for_Joint : in scene_joint_Id;
To : in Real)
is
begin
Self.scene_Joints (for_Joint).Node.set_Location_x (To);
end set_Location_x;
procedure set_Location_y (Self : in out Item'Class; for_Joint : in scene_joint_Id;
To : in Real)
is
begin
Self.scene_Joints (for_Joint).Node.set_Location_y (To);
end set_Location_y;
procedure set_Location_z (Self : in out Item'Class; for_Joint : in scene_joint_Id;
To : in Real)
is
begin
Self.scene_Joints (for_Joint).Node.set_Location_z (To);
end set_location_z;
procedure set_Transform (Self : in out Item'Class; for_Joint : in scene_joint_Id;
To : in Matrix_4x4)
is
begin
Self.scene_Joints (for_Joint).Node.set_Transform (To);
end set_Transform;
procedure set_x_rotation_Angle (Self : in out Item'Class; for_Joint : in scene_joint_Id;
To : in Real)
is
begin
Self.scene_Joints (for_Joint).Node.set_x_rotation_Angle (To);
end set_x_rotation_Angle;
procedure set_y_rotation_Angle (Self : in out Item'Class; for_Joint : in scene_joint_Id;
To : in Real)
is
begin
Self.scene_Joints (for_Joint).Node.set_y_rotation_Angle (To);
end set_y_rotation_Angle;
procedure set_z_rotation_Angle (Self : in out Item'Class; for_Joint : in scene_joint_Id;
To : in Real)
is
begin
Self.scene_Joints (for_Joint).Node.set_z_rotation_Angle (To);
end set_z_rotation_Angle;
----------
--- Define
--
procedure define (Self : in out Item; in_World : in gel .World.view;
Model : in openGL.Model.view;
Mass : in Real := 0.0;
is_Kinematic : in Boolean := False;
bone_Details : in bone_id_Map_of_details := bone_id_Maps_of_details.empty_Map)
is
use collada.Document,
collada.Library,
collada.Library.visual_Scenes,
ada.Strings.unbounded,
ada.Strings;
type any_Model_view is access all openGL.Model.any.item;
the_Model : constant any_Model_view := any_Model_view (Model);
the_Document : constant collada.Document.item := to_Document (openGL.to_String (the_Model.Model));
function get_root_Joint return visual_Scenes.Node_view
is
begin
if the_Document.Libraries.visual_Scenes.skeletal_Root = ""
then
return the_Document.Libraries.visual_Scenes.Contents (1).root_Node;
else
return the_Document.Libraries.visual_Scenes.Contents (1).root_Node.Child (1);
end if;
end get_root_Joint;
the_root_Joint : constant visual_scenes.Node_view := get_root_Joint;
prior_bone_Length : Real := 1.0;
package joint_id_Maps_of_vector_3 is new ada.Containers.hashed_Maps (Key_type => scene_joint_Id,
Element_type => Vector_3,
Hash => ada.Strings.unbounded.Hash,
equivalent_Keys => ada.Strings.unbounded."=",
"=" => "=");
subtype joint_id_Map_of_vector_3 is joint_id_Maps_of_vector_3.Map;
joint_Sites : joint_id_Map_of_vector_3;
procedure set_Site_for (the_Joint : in visual_Scenes.Node_view)
is
which_Joint : constant scene_joint_Id := the_Joint.Id;
child_Joints : constant visual_Scenes.Nodes := the_Joint.Children;
begin
if which_Joint = Self.root_Joint.Name
then
joint_Sites.insert (which_Joint,
(0.0, 0.0, 0.0));
else
joint_Sites.insert (which_Joint,
get_Translation (Self.joint_bind_Matrix (which_Joint)));
end if;
for i in child_Joints'Range
loop
set_Site_for (child_Joints (i)); -- Recurse over children.
end loop;
end set_Site_for;
procedure create_Bone (the_Bone : in bone_Id;
start_Joint : in scene_joint_Id;
end_Point : in Vector_3;
Scale : in Vector_3;
Mass : in Real)
is
use opengl.Palette;
new_Sprite : gel.Sprite.view;
the_bone_Site : constant Vector_3 := midPoint (joint_Sites (start_Joint),
end_Point);
begin
if the_Bone = Self.root_Joint.Name
then
declare
use standard.physics.Model;
Size : constant Vector_3 := (0.1, 0.1, 0.1);
physics_Model : constant standard.physics.Model.View
:= standard.physics.Model.Forge.new_physics_Model (shape_Info => (Kind => Cube,
half_Extents => Size / 2.0),
Mass => 1.0);
begin
new_Sprite := gel.Sprite.Forge.new_Sprite ("Skin Sprite",
gel.sprite.World_view (in_World),
math.Origin_3D,
Model,
physics_Model,
is_Kinematic => is_Kinematic);
end;
new_Sprite.Site_is ((0.0, 0.0, 0.0));
new_Sprite.Spin_is (Identity_3x3);
Self.bone_pose_Transforms.insert (the_Bone, Identity_4x4);
Self.skin_Sprite := new_Sprite;
else
new_Sprite := gel.Forge.new_box_Sprite (in_World => in_World.all'Access,
Mass => 1.0,
Size => Scale,
Colors => (1 => Black,
3 => Green,
4 => Blue,
others => Red),
is_Kinematic => is_Kinematic);
new_Sprite.Site_is (the_bone_Site);
new_Sprite.Spin_is (Inverse (get_Rotation (Self.joint_bind_Matrix (start_Joint))));
new_Sprite.is_Visible (False);
Self.anim_joint_site_Offets.insert (the_Bone, Inverse (get_Rotation (Self.joint_inv_bind_Matrix (start_Joint)))
* (joint_Sites (start_Joint) - the_bone_Site));
Self.phys_joint_site_Offets.insert (the_Bone, joint_Sites (start_Joint) - the_bone_Site);
Self.bone_pose_Transforms .insert (the_Bone, to_transform_Matrix (Rotation => get_Rotation (Self.joint_pose_Transforms (start_Joint)),
Translation => the_bone_Site));
end if;
Self.bone_Sprites.insert (the_Bone, new_Sprite);
declare
new_Sprite : constant gel.Sprite.view := gel.Forge.new_box_Sprite (in_World => in_World,
Mass => 0.0,
Size => (0.02, 0.02, 0.02),
Colors => (others => Yellow),
is_Kinematic => True);
begin
Self.joint_Sprites.insert (the_Bone, new_Sprite);
end;
end create_Bone;
procedure create_Bone_for (the_Joint : in visual_Scenes.Node_view; Parent : in bone_Id)
is
use bone_id_Maps_of_details;
which_Joint : constant scene_joint_Id := the_Joint.Id;
child_Joints : constant visual_Scenes.Nodes := the_Joint.Children;
the_bone_Details : Rig.bone_Details;
bone_Length : Real;
end_Point : Vector_3;
new_Joint : gel.Joint.view;
function guessed_bone_Length return Real
is
begin
if child_Joints'Length = 0
then
return prior_bone_Length;
else
if which_Joint = Self.root_Joint.Name
then
return Distance (joint_Sites.Element (which_Joint),
joint_Sites.Element (child_Joints (child_Joints'First).Id));
else
return Distance (joint_Sites.Element (which_Joint),
joint_Sites.Element (child_Joints (child_Joints'Last).Id));
end if;
end if;
end guessed_bone_Length;
begin
if bone_Details.contains (which_Joint)
then
the_bone_Details := bone_Details.Element (which_Joint);
if the_bone_Details.Length = Unspecified
then bone_Length := guessed_bone_Length;
else bone_Length := the_bone_Details.Length;
end if;
else
bone_Length := guessed_bone_Length;
end if;
end_Point := joint_Sites.Element (which_Joint)
+ (0.0, bone_Length, 0.0) * get_Rotation (Self.joint_bind_Matrix (which_Joint));
prior_bone_Length := bone_Length;
Self.joint_Parent.insert (which_Joint, Parent);
create_Bone (which_Joint,
which_Joint,
end_Point,
(the_bone_Details.width_Factor * bone_Length,
bone_Length * 0.90,
the_bone_Details.depth_Factor * bone_Length),
1.0);
if Parent /= (+"")
then
Self.Sprite (Parent).attach_via_ball_Socket (Self.bone_Sprites (which_Joint),
pivot_Axis => x_Rotation_from (0.0),
pivot_Anchor => joint_Sites.Element (which_Joint),
pitch_Limits => the_bone_Details.pitch_Limits,
yaw_Limits => the_bone_Details. yaw_Limits,
roll_Limits => the_bone_Details. roll_Limits,
new_Joint => new_Joint);
Self.Joints.insert (to_gel_joint_Id (Parent, which_Joint),
new_Joint);
end if;
for i in child_Joints'Range
loop
create_Bone_for (child_Joints (i), -- Recurse over children.
parent => which_Joint);
end loop;
end create_Bone_for;
use collada.Library.Controllers;
global_transform_Slot : Positive := 1;
begin
Self.root_Joint := the_root_Joint; -- Remember our root joint.
Self.Model := Model.all'unchecked_Access; -- Remember our model.
--- Parse Controllers.
--
-- Set the bind shape matrix.
--
Self.bind_shape_Matrix := Transpose (bind_shape_Matrix_of (the_Document.Libraries.Controllers.Contents (1).Skin));
-- Set the joint slots.
--
declare
the_Skin : constant Controllers.Skin := the_Document.Libraries.Controllers.Contents (1).Skin;
the_joint_Names : constant collada.Text_array := joint_Names_of (the_Skin);
begin
for i in 1 .. Integer (the_joint_Names'Length)
loop
Self.program_Parameters.joint_Map_of_slot.insert (the_joint_Names (i),
i);
end loop;
end;
-- Set the inverse bind matrices for all joints.
--
declare
the_Skin : constant Controllers.Skin := the_Document.Libraries.Controllers.Contents (1).Skin;
the_bind_Poses : constant collada.Matrix_4x4_array := bind_Poses_of (the_Skin);
begin
for i in 1 .. Integer (the_bind_Poses'Length)
loop
Self.joint_inv_bind_Matrices .append (Transpose (the_bind_Poses (i))); -- Transpose corrects for collada column vectors.
Self.program_Parameters.bone_Transforms.append (Identity_4x4);
end loop;
end;
--- Parse Visual Scene.
--
Self.define_global_Transform_for (the_root_Joint, -- Determine all joint transforms, recursively.
Slot => global_transform_Slot);
set_Site_for (the_root_Joint);
create_Bone_for (the_root_Joint, Parent => +""); -- Create all other bones, recursively.
--- Parse the Collada animations file.
--
declare
use collada.Library.Animations;
the_Animations : constant access Animation_array := the_Document.Libraries.Animations.Contents;
begin
if the_Animations /= null
then
for Each in the_Animations'Range
loop
declare
the_Animation : constant animations.Animation := the_Animations (Each);
the_Inputs : access collada.float_Array := Inputs_of (the_Animation);
procedure common_setup (Channel : in channel_Id;
scene_Joint : in scene_Joint_Id;
Sid : in String)
is
default_scene_Joint : rig.scene_Joint;
default_Channel : animation_Channel;
begin
Self.Channels.insert (Channel, default_Channel);
Self.Channels (Channel).Target := Self.scene_Joints (scene_Joint).Node.fetch_Transform (Sid);
Self.Channels (Channel).target_Joint := scene_Joint;
Self.Channels (Channel).Times := Inputs_of (the_Animation);
Self.Channels (Channel).Values := Outputs_of (the_Animation);
end common_setup;
procedure setup_Rotation (Channel : in channel_Id;
scene_Joint : in scene_Joint_Id;
Sid : in String)
is
begin
common_setup (Channel, scene_Joint, Sid);
-- For angle interpolation during 'rotation' animation.
--
Self.Channels (Channel).initial_Angle := Self.Channels (Channel).Values (1);
Self.Channels (Channel).current_Angle := Self.Channels (Channel).initial_Angle;
end setup_Rotation;
procedure setup_Location (Channel : in channel_Id;
scene_Joint : in scene_Joint_Id;
Sid : in String)
is
begin
common_setup (Channel, scene_Joint, Sid);
-- For location interpolation during 'translation' animation.
--
Self.Channels (Channel).current_Site := (Self.Channels (Channel).Values (1),
Self.Channels (Channel).Values (2),
Self.Channels (Channel).Values (3));
Self.Channels (Channel).initial_Site := Self.Channels (Channel).current_Site;
end setup_Location;
procedure setup_Location_x (Channel : in channel_Id;
scene_Joint : in scene_Joint_Id;
Sid : in String)
is
begin
common_setup (Channel, scene_Joint, Sid);
-- For matrix interpolation during 'full_transform' animation.
--
Self.Channels (Channel).Transforms := new Transforms (1 .. Self.Channels (Channel).Values'Length);
for i in Self.Channels (Channel).Transforms'Range
loop
declare
the_X_Value : constant Real := Self.Channels (Channel).Values (i);
begin
Self.Channels (Channel).Transforms (i) := (Rotation => to_Quaternion (Identity_3x3),
Translation => (the_X_Value, 0.0, 0.0));
end;
end loop;
Self.Channels (Channel).initial_Transform := Self.Channels (Channel).Transforms (1);
Self.Channels (Channel).current_Transform := Self.Channels (Channel).initial_Transform;
Self.Channels (Channel).current_Site := Self.Channels (Channel).initial_Transform.Translation;
Self.Channels (Channel).initial_Site := Self.Channels (Channel).current_Site;
end setup_Location_x;
procedure setup_Location_y (Channel : in channel_Id;
scene_Joint : in scene_Joint_Id;
Sid : in String)
is
begin
common_setup (Channel, scene_Joint, Sid);
-- For matrix interpolation during 'full_transform' animation.
--
Self.Channels (Channel).Transforms := new Transforms (1 .. Self.Channels (Channel).Values'Length);
for i in Self.Channels (Channel).Transforms'Range
loop
declare
the_Y_Value : constant Real := Self.Channels (Channel).Values (i);
begin
Self.Channels (Channel).Transforms (i) := (rotation => to_Quaternion (Identity_3x3),
translation => (0.0, the_Y_Value, 0.0));
end;
end loop;
Self.Channels (Channel).initial_Transform := Self.Channels (Channel).Transforms (1);
Self.Channels (Channel).current_Transform := Self.Channels (Channel).initial_Transform;
Self.Channels (Channel).current_Site := Self.Channels (Channel).initial_Transform.Translation;
Self.Channels (Channel).initial_Site := Self.Channels (Channel).current_Site;
end setup_Location_y;
procedure setup_Location_z (Channel : in channel_Id;
scene_Joint : in scene_Joint_Id;
Sid : in String)
is
begin
common_setup (Channel, scene_Joint, Sid);
-- For matrix interpolation during 'full_transform' animation.
--
Self.Channels (Channel).Transforms := new Transforms (1 .. Self.Channels (Channel).Values'Length);
for i in Self.Channels (Channel).Transforms'Range
loop
declare
the_Z_Value : constant Real := Self.Channels (Channel).Values (i);
begin
Self.Channels (Channel).Transforms (i) := (rotation => to_Quaternion (Identity_3x3),
translation => (0.0, 0.0, the_Z_Value));
end;
end loop;
Self.Channels (Channel).initial_Transform := Self.Channels (Channel).Transforms (1);
Self.Channels (Channel).current_Transform := Self.Channels (Channel).initial_Transform;
Self.Channels (Channel).current_Site := Self.Channels (Channel).initial_Transform.Translation;
Self.Channels (Channel).initial_Site := Self.Channels (Channel).current_Site;
end setup_Location_z;
procedure setup_full_Transform (Channel : in channel_Id;
scene_Joint : in scene_Joint_Id;
Sid : in String)
is
begin
common_setup (Channel, scene_Joint, Sid);
-- For matrix interpolation during 'full_transform' animation.
--
Self.Channels (Channel).Transforms := new Transforms (1 .. Collada.matrix_Count (Self.Channels (Channel).Values.all));
for i in Self.Channels (Channel).Transforms'Range
loop
declare
the_Matrix : constant math.Matrix_4x4 := Transpose (Collada.get_Matrix (Self.Channels (Channel).Values.all,
which => i));
begin
Self.Channels (Channel).Transforms (i) := (Rotation => to_Quaternion (get_Rotation (the_Matrix)),
Translation => get_Translation (the_Matrix));
end;
end loop;
Self.Channels (Channel).initial_Transform := Self.Channels (Channel).Transforms (1);
Self.Channels (Channel).current_Transform := Self.Channels (Channel).initial_Transform;
Self.Channels (Channel).current_Site := Self.Channels (Channel).initial_Transform.Translation;
Self.Channels (Channel).initial_Site := Self.Channels (Channel).current_Site;
end setup_full_Transform;
function Index (Source : in unbounded_String;
Pattern : in String;
Going : in Direction := Forward;
Mapping : in Maps.character_Mapping := ada.Strings.Maps.Identity) return Natural
renames ada.Strings.unbounded.Index;
begin
if Index (the_Animation.Channel.Target, "hips/transform") /= 0 then
setup_full_Transform (+"hips", +"hips", "transform");
elsif Index (the_Animation.Channel.Target, "thigh_L/transform") /= 0 then
setup_full_Transform (+"thigh_L", +"thigh_L", "transform");
elsif Index (the_Animation.Channel.Target, "shin_L/transform") /= 0 then
setup_full_Transform (+"shin_L", +"shin_L", "transform");
elsif Index (the_Animation.Channel.Target, "foot_L/transform") /= 0 then
setup_full_Transform (+"foot_L", +"foot_L", "transform");
elsif Index (the_Animation.Channel.Target, "toe_L/transform") /= 0 then
setup_full_Transform (+"toe_L", +"toe_L", "transform");
elsif Index (the_Animation.Channel.Target, "thigh_R/transform") /= 0 then
setup_full_Transform (+"thigh_R", +"thigh_R", "transform");
elsif Index (the_Animation.Channel.Target, "shin_R/transform") /= 0 then
setup_full_Transform (+"shin_R", +"shin_R", "transform");
elsif Index (the_Animation.Channel.Target, "foot_R/transform") /= 0 then
setup_full_Transform (+"foot_R", +"foot_R", "transform");
elsif Index (the_Animation.Channel.Target, "toe_R/transform") /= 0 then
setup_full_Transform (+"toe_R", +"toe_R", "transform");
elsif Index (the_Animation.Channel.Target, "spine/transform") /= 0 then
setup_full_Transform (+"spine", +"spine", "transform");
elsif Index (the_Animation.Channel.Target, "chest/transform") /= 0 then
setup_full_Transform (+"chest", +"chest", "transform");
elsif Index (the_Animation.Channel.Target, "clavicle_R/transform") /= 0 then
setup_full_Transform (+"clavicle_R", +"clavicle_R", "transform");
elsif Index (the_Animation.Channel.Target, "upper_arm_R/transform") /= 0 then
setup_full_Transform (+"upper_arm_R", +"upper_arm_R", "transform");
elsif Index (the_Animation.Channel.Target, "forearm_R/transform") /= 0 then
setup_full_Transform (+"forearm_R", +"forearm_R", "transform");
elsif Index (the_Animation.Channel.Target, "hand_R/transform") /= 0 then
setup_full_Transform (+"hand_R", +"hand_R", "transform");
elsif Index (the_Animation.Channel.Target, "thumb_02_R/transform") /= 0 then
setup_full_Transform (+"thumb_02_R", +"thumb_02_R", "transform");
elsif Index (the_Animation.Channel.Target, "thumb_03_R/transform") /= 0 then
setup_full_Transform (+"thumb_03_R", +"thumb_03_R", "transform");
elsif Index (the_Animation.Channel.Target, "f_ring_01_R/transform") /= 0 then
setup_full_Transform (+"f_ring_01_R", +"f_ring_01_R", "transform");
elsif Index (the_Animation.Channel.Target, "f_index_01_R/transform") /= 0 then
setup_full_Transform (+"f_index_01_R", +"f_index_01_R", "transform");
elsif Index (the_Animation.Channel.Target, "clavicle_L/transform") /= 0 then
setup_full_Transform (+"clavicle_L", +"clavicle_L", "transform");
elsif Index (the_Animation.Channel.Target, "upper_arm_L/transform") /= 0 then
setup_full_Transform (+"upper_arm_L", +"upper_arm_L", "transform");
elsif Index (the_Animation.Channel.Target, "forearm_L/transform") /= 0 then
setup_full_Transform (+"forearm_L", +"forearm_L", "transform");
elsif Index (the_Animation.Channel.Target, "hand_L/transform") /= 0 then
setup_full_Transform (+"hand_L", +"hand_L", "transform");
elsif Index (the_Animation.Channel.Target, "thumb_02_L/transform") /= 0 then
setup_full_Transform (+"thumb_02_L", +"thumb_02_L", "transform");
elsif Index (the_Animation.Channel.Target, "thumb_03_L/transform") /= 0 then
setup_full_Transform (+"thumb_03_L", +"thumb_03_L", "transform");
elsif Index (the_Animation.Channel.Target, "f_ring_01_L/transform") /= 0 then
setup_full_Transform (+"f_ring_01_L", +"f_ring_01_L", "transform");
elsif Index (the_Animation.Channel.Target, "f_index_01_L/transform") /= 0 then
setup_full_Transform (+"f_index_01_L", +"f_index_01_L", "transform");
elsif Index (the_Animation.Channel.Target, "neck/transform") /= 0 then
setup_full_Transform (+"neck", +"neck", "transform");
elsif Index (the_Animation.Channel.Target, "head/transform") /= 0 then
setup_full_Transform (+"head", +"head", "transform");
elsif Index (the_Animation.Channel.Target, "jaw/transform") /= 0 then
setup_full_Transform (+"jaw", +"jaw", "transform");
elsif Index (the_Animation.Channel.Target, "eye_R/transform") /= 0 then
setup_full_Transform (+"eye_R", +"eye_R", "transform");
elsif Index (the_Animation.Channel.Target, "eye_L/transform") /= 0 then
setup_full_Transform (+"eye_L", +"eye_L", "transform");
elsif Index (the_Animation.Channel.Target, "stride_bone/location.X") /= 0 then
-- setup_Location_x (+"stride_bone_x", +"stride_bone", "x");
setup_Location_x (+"stride_bone_x", +"human", "x");
elsif Index (the_Animation.Channel.Target, "stride_bone/location.Y") /= 0 then
-- setup_Location_y (+"stride_bone_y", +"stride_bone", "y");
setup_Location_y (+"stride_bone_y", +"human", "y");
elsif Index (the_Animation.Channel.Target, "stride_bone/location.Z") /= 0 then
-- setup_Location_z (+"stride_bone_z", +"stride_bone", "z");
setup_Location_z (+"stride_bone_z", +"human", "z");
else
raise constraint_Error with +the_Animation.Channel.Target & " not handled";
end if;
end;
end loop;
end if;
end;
end define;
procedure enable_Graphics (Self : in out Item)
is
begin
Self .program_Parameters.Program_is (opengl.Program.view (opengl.Geometry.lit_colored_textured_skinned.Program));
Self.skin_Sprite.program_Parameters_are (Self.program_Parameters'unchecked_Access);
end enable_Graphics;
function Joints (Self : in Item) return gel_joint_id_Map_of_gel_Joint
is
begin
return Self.Joints;
end Joints;
function joint_inv_bind_Matrices (Self : in Item'Class) return inverse_bind_matrix_Vector
is
begin
return Self.joint_inv_bind_Matrices;
end joint_inv_bind_Matrices;
procedure joint_inv_bind_Matrices_are (Self : in out Item'Class; Now : in inverse_bind_matrix_Vector)
is
begin
Self.joint_inv_bind_Matrices := Now;
end joint_inv_bind_Matrices_are;
function joint_site_Offets (Self : in Item'Class) return joint_Id_Map_of_bone_site_offset
is
begin
return Self.phys_joint_site_Offets;
end joint_site_Offets;
--------------
--- Attributes
--
procedure Site_is (Self :in out Item; Now : in Vector_3)
is
begin
Self.base_Sprite.move (to_Site => Now);
Self.overall_Site := Now;
end Site_is;
procedure Spin_is (Self :in out Item; Now : in Matrix_3x3)
is
begin
Self.base_Sprite.rotate (to_Spin => Now);
end Spin_is;
function Sprite (Self : in Item'Class; Bone : in bone_Id) return gel.Sprite.view
is
begin
return Self.bone_Sprites (Bone);
end Sprite;
function base_Sprite (Self : in Item'Class) return gel.Sprite.view
is
begin
return Self.bone_Sprites.Element (Self.root_Joint.Name);
end base_Sprite;
function skin_Sprite (Self : in Item'Class) return gel.Sprite.view
is
begin
return Self.skin_Sprite;
end skin_Sprite;
function bone_Sprites (Self : in Item) return bone_id_Map_of_sprite
is
begin
return Self.bone_Sprites;
end bone_Sprites;
procedure set_GL_program_Parameters (Self : in out Item'Class; for_Bone : in controller_joint_Id;
To : in Matrix_4x4)
is
use gel.Conversions;
bone_Slot : constant Positive := Self.program_Parameters.joint_Map_of_slot.Element (for_Bone);
begin
Self.program_Parameters.bone_Transforms.replace_Element (bone_Slot,
to_GL (To));
end set_GL_program_Parameters;
procedure animation_Transforms_are (Self : in out Item'Class; Now : in bone_id_Map_of_transform)
is
begin
Self.animation_Transforms := Now;
end animation_Transforms_are;
procedure motion_Mode_is (Self : in out Item; Now : in motion_Mode)
is
begin
Self.Mode := Now;
end motion_Mode_is;
--------------
--- Operations
--
procedure evolve (Self : in out Item'Class; world_Age : in Duration)
is
function get_root_Transform return Matrix_4x4
is
begin
case Self.Mode
is
when Dynamics =>
return Self.base_Sprite.Transform;
when Animation =>
declare
the_Transform : Matrix_4x4;
begin
set_Rotation (the_Transform, x_Rotation_from (to_Radians (0.0)));
set_Translation (the_Transform, -get_Translation (Inverse (Self.joint_pose_Transforms (Self.root_Joint.Name))));
return the_Transform;
end;
end case;
end get_root_Transform;
root_Transform : constant Matrix_4x4 := get_root_Transform;
inv_root_Transform : constant Matrix_4x4 := Inverse (root_Transform);
function joint_Transform_for (the_collada_Joint : in controller_joint_Id) return Matrix_4x4
is
begin
case Self.Mode
is
when Dynamics =>
declare
the_bone_Transform : constant Matrix_4x4 := Self.Sprite (the_collada_Joint).Transform;
the_joint_site_Offset : Vector_3 := Self.phys_joint_site_Offets (the_collada_Joint);
the_joint_Transform : Matrix_4x4;
begin
the_joint_site_Offset := the_joint_site_Offset
* get_Rotation (Self.joint_inv_bind_Matrix (the_collada_Joint))
* get_Rotation (the_bone_Transform);
set_Translation (the_joint_Transform, get_Translation (the_bone_Transform) + the_joint_site_Offset);
set_Rotation (the_joint_Transform, get_Rotation (the_bone_Transform));
Self.joint_Sprites (the_collada_Joint).all.Site_is (get_Translation (the_joint_Transform));
return the_joint_Transform;
end;
when Animation =>
Self.joint_Sprites (the_collada_Joint).all.Site_is ( get_Translation (Self.scene_Joints (the_collada_Joint).Transform));
Self.joint_Sprites (the_collada_Joint).all.Spin_is (Inverse (get_Rotation (Self.scene_Joints (the_collada_Joint).Transform)));
return Self.scene_Joints (the_collada_Joint).Transform;
end case;
end joint_Transform_for;
procedure set_Transform_for (the_Bone : in controller_joint_Id)
is
the_Slot : constant Positive := Self.program_Parameters.joint_Map_of_slot (the_Bone);
begin
Self.set_GL_program_Parameters (for_Bone => the_Bone,
To => Self.bind_shape_Matrix
* Self.joint_inv_bind_Matrices.Element (the_Slot)
* joint_Transform_for (the_Bone)
* inv_root_Transform);
end set_Transform_for;
procedure set_proxy_Transform_for (the_Bone : in controller_joint_Id; the_Proxy : in controller_joint_Id)
is
the_Slot : constant Positive := Self.program_Parameters.joint_Map_of_slot (the_Proxy);
begin
Self.set_GL_program_Parameters (for_bone => the_Bone,
to => Self.bind_shape_Matrix
* Self.joint_inv_bind_Matrices .Element (the_Slot)
* joint_Transform_for (the_Proxy)
* inv_root_Transform);
end set_proxy_Transform_for;
use joint_Id_Maps_of_bone_site_offset;
Cursor : joint_Id_Maps_of_bone_site_offset.Cursor := Self.phys_joint_site_Offets.First;
begin
if Self.Mode = Animation
then
Self.animate (world_Age);
end if;
while has_Element (Cursor)
loop
if Self.program_Parameters.joint_Map_of_slot.Contains (Key (Cursor))
then
set_Transform_for (Key (Cursor)); -- Updates gl skin program params.
end if;
next (Cursor);
end loop;
end evolve;
procedure assume_Pose (Self : in out Item)
is
use bone_id_Maps_of_transform;
the_Bone : gel.Sprite.view;
Cursor : bone_id_Maps_of_transform.Cursor := Self.bone_pose_Transforms.First;
begin
while has_Element (Cursor)
loop
the_Bone := Self.bone_Sprites (Key (Cursor));
the_Bone.Transform_is (Element (Cursor));
next (Cursor);
end loop;
end assume_Pose;
function Parent_of (Self : in Item; the_Bone : in bone_Id) return bone_Id
is
begin
if Self.joint_Parent.Contains (the_Bone)
then
return Self.joint_Parent.Element (the_Bone);
else
return null_Id;
end if;
end Parent_of;
function joint_site_Offet (Self : in Item; for_Bone : in bone_Id) return math.Vector_3
is
begin
return Self.phys_joint_site_Offets.Element (for_Bone);
end joint_site_Offet;
function joint_inv_bind_Matrix (Self : in Item; for_Bone : in bone_Id) return math.Matrix_4x4
is
use ada.Strings.unbounded;
begin
if for_Bone = Self.root_Joint.Name
then
return math.Identity_4x4;
else
return Self.joint_inv_bind_Matrices.Element (Self.program_Parameters.joint_Map_of_slot.Element (for_Bone));
end if;
end joint_inv_bind_Matrix;
function joint_bind_Matrix (Self : in Item; for_Bone : in bone_Id) return Matrix_4x4
is
begin
return Inverse (Self.joint_inv_bind_Matrix (for_Bone));
end joint_bind_Matrix;
-------------
--- Animation
--
procedure animate (Self : in out Item; world_Age : in Duration)
is
Now : Duration;
Elapsed : Duration;
procedure update_rotation_Animation (for_Channel : in channel_Id;
for_Joint : in scene_joint_Id;
for_Axis : in axis_Kind)
is
the_Channel : animation_Channel renames Self.Channels (for_Channel);
Cursor : math.Index renames the_Channel.Cursor;
function Reduced (Angle : in Real) return Real -- TODO: Use Degrees type.
is
begin
if Angle > 180.0 then return -360.0 + Angle;
elsif Angle < -180.0 then return 360.0 + Angle;
else return Angle;
end if;
end Reduced;
begin
if Cursor < the_Channel.Times'Last
then
if Cursor = 0
or else Elapsed > Duration (the_Channel.Times (Cursor))
then
Cursor := Cursor + 1;
if Cursor = 1
then
if the_Channel.Times (Cursor) = 0.0
then
the_Channel.interp_Delta := Reduced (the_Channel.Values (Cursor) - the_Channel.current_Angle);
else
the_Channel.interp_Delta := Reduced (the_Channel.Values (Cursor) - the_Channel.current_Angle)
/ (the_Channel.Times (Cursor));
end if;
else
the_Channel.interp_Delta := Reduced (the_Channel.Values (Cursor) - the_Channel.current_Angle)
/ (the_Channel.Times (Cursor) - the_Channel.Times (Cursor - 1));
end if;
the_Channel.interp_Delta := the_Channel.interp_Delta / 60.0; -- 60.0 is frames/sec.
end if;
end if;
if Elapsed < Duration (the_Channel.Times (the_Channel.Times'Last))
then
the_Channel.current_Angle := Reduced ( the_Channel.current_Angle
+ the_Channel.interp_Delta);
Self.set_rotation_Angle (for_Joint,
for_Axis,
To => to_Radians (Degrees (the_Channel.current_Angle)));
end if;
end update_rotation_Animation;
procedure update_location_Animation (for_Channel : in channel_Id;
for_Joint : in scene_joint_Id)
is
the_Channel : animation_Channel renames Self.Channels (for_Channel);
Cursor : Index renames the_Channel.Cursor;
Elapsed : constant Duration := Now - Self.start_Time;
function site_X return Real is begin return the_Channel.Values ((Cursor - 1) * 3 + 1); end site_X;
function site_Y return Real is begin return the_Channel.Values ((Cursor - 1) * 3 + 2); end site_Y;
function site_Z return Real is begin return the_Channel.Values ((Cursor - 1) * 3 + 3); end site_Z;
begin
if Cursor < the_Channel.Times'Last
then
if Cursor = 0
or else Elapsed > Duration (the_Channel.Times (Cursor))
then
Cursor := Cursor + 1;
if Cursor = 1
then
if the_Channel.Times (Cursor) = 0.0
then
the_Channel.site_interp_Delta (1) := site_X - the_Channel.current_Site (1);
the_Channel.site_interp_Delta (2) := site_Y - the_Channel.current_Site (2);
the_Channel.site_interp_Delta (3) := site_Z - the_Channel.current_Site (3);
else
the_Channel.site_interp_Delta (1) := (site_X - the_Channel.current_Site (1))
/ (the_Channel.Times (Cursor));
the_Channel.site_interp_Delta (2) := (site_Y - the_Channel.current_Site (2))
/ (the_Channel.Times (Cursor));
the_Channel.site_interp_Delta (3) := (site_Z - the_Channel.current_Site (3))
/ (the_Channel.Times (Cursor));
end if;
else
the_Channel.site_interp_Delta (1) := (site_X - the_Channel.current_Site (1))
/ (the_Channel.Times (Cursor) - the_Channel.Times (Cursor - 1));
the_Channel.site_interp_Delta (2) := (site_Y - the_Channel.current_Site (2))
/ (the_Channel.Times (Cursor) - the_Channel.Times (Cursor - 1));
the_Channel.site_interp_Delta (3) := (site_Z - the_Channel.current_Site (3))
/ (the_Channel.Times (Cursor) - the_Channel.Times (Cursor - 1));
end if;
the_Channel.site_interp_Delta (1) := the_Channel.site_interp_Delta (1) / 60.0; -- 60.0 is frames/sec.
the_Channel.site_interp_Delta (2) := the_Channel.site_interp_Delta (2) / 60.0; --
the_Channel.site_interp_Delta (3) := the_Channel.site_interp_Delta (3) / 60.0; --
end if;
Self.set_Location (the_Channel.target_Joint, to => the_Channel.current_Site);
the_Channel.current_Site (1) := the_Channel.current_Site (1) + the_Channel.site_interp_Delta (1);
the_Channel.current_Site (2) := the_Channel.current_Site (2) + the_Channel.site_interp_Delta (2);
the_Channel.current_Site (3) := the_Channel.current_Site (3) + the_Channel.site_interp_Delta (3);
end if;
end update_location_Animation;
procedure update_location_X_Animation (for_Channel : in channel_Id;
for_Joint : in scene_joint_Id)
is
the_Channel : animation_Channel renames Self.Channels (for_Channel);
Cursor : Index renames the_Channel.Cursor;
Elapsed : constant Duration := Now - Self.start_Time;
function site_X return Real is begin return the_Channel.Values (Cursor); end site_X;
begin
if Cursor < the_Channel.Times'Last
then
if Cursor = 0
or else Elapsed > Duration (the_Channel.Times (Cursor))
then
Cursor := Cursor + 1;
if Cursor = 1
then
if the_Channel.Times (Cursor) = 0.0
then
the_Channel.site_interp_Delta (1) := site_X - the_Channel.current_Site (1);
else
the_Channel.site_interp_Delta (1) := (site_X - the_Channel.current_Site (1))
/ (the_Channel.Times (Cursor));
end if;
else
the_Channel.site_interp_Delta (1) := (site_X - the_Channel.current_Site (1))
/ (the_Channel.Times (Cursor) - the_Channel.Times (Cursor - 1));
end if;
the_Channel.site_interp_Delta (1) := the_Channel.site_interp_Delta (1) / 60.0; -- 60.0 is frames/sec.
end if;
Self.set_Location_x (the_Channel.target_Joint, To => the_Channel.current_Site (1));
the_Channel.current_Site (1) := the_Channel.current_Site (1) + the_Channel.site_interp_Delta (1);
end if;
end update_location_X_Animation;
procedure update_location_Y_Animation (for_Channel : in channel_Id;
for_Joint : in scene_joint_Id)
is
the_Channel : animation_Channel renames Self.Channels (for_Channel);
Cursor : Index renames the_Channel.Cursor;
Elapsed : constant Duration := Now - Self.start_Time;
function site_Y return math.Real is begin return the_Channel.Values (Cursor); end site_Y;
begin
if Cursor < the_Channel.Times'Last
then
if Cursor = 0
or else Elapsed > Duration (the_Channel.Times (Cursor))
then
Cursor := Cursor + 1;
if Cursor = 1
then
if the_Channel.Times (Cursor) = 0.0
then
the_Channel.site_interp_Delta (2) := site_Y - the_Channel.current_Site (2);
else
the_Channel.site_interp_Delta (2) := (site_Y - the_Channel.current_Site (2))
/ (the_Channel.Times (Cursor));
end if;
else
the_Channel.site_interp_Delta (2) := (site_Y - the_Channel.current_Site (2))
/ (the_Channel.Times (Cursor) - the_Channel.Times (Cursor - 1));
end if;
the_Channel.site_interp_Delta (2) := the_Channel.site_interp_Delta (2) / 60.0; -- 60.0 is frames/sec
end if;
Self.set_Location_y (the_Channel.target_Joint, To => the_Channel.current_Site (2));
the_Channel.current_Site (2) := the_Channel.current_Site (2) + the_Channel.site_interp_Delta (2);
end if;
end update_location_Y_Animation;
procedure update_location_Z_Animation (for_Channel : in channel_Id;
for_Joint : in scene_joint_Id)
is
the_Channel : animation_Channel renames Self.Channels (for_Channel);
Cursor : math.Index renames the_Channel.Cursor;
Elapsed : constant Duration := Now - Self.start_Time;
function site_Z return math.Real is begin return the_Channel.Values (Cursor); end site_Z;
begin
if Cursor < the_Channel.Times'Last
then
if Cursor = 0
or else Elapsed > Duration (the_Channel.Times (Cursor))
then
Cursor := Cursor + 1;
if Cursor = 1
then
if the_Channel.Times (Cursor) = 0.0
then
the_Channel.site_interp_Delta (3) := site_Z - the_Channel.current_Site (3);
else
the_Channel.site_interp_Delta (3) := (site_Z - the_Channel.current_Site (3))
/ (the_Channel.Times (Cursor));
end if;
else
the_Channel.site_interp_Delta (3) := (site_Z - the_Channel.current_Site (3))
/ (the_Channel.Times (Cursor) - the_Channel.Times (Cursor - 1));
end if;
the_Channel.site_interp_Delta (3) := the_Channel.site_interp_Delta (3) / 60.0; -- 60.0 is frames/sec
end if;
Self.set_Location_z (the_Channel.target_Joint, To => the_Channel.current_Site (3));
the_Channel.current_Site (3) := the_Channel.current_Site (3) + the_Channel.site_interp_Delta (3);
end if;
end update_location_Z_Animation;
procedure update_full_transform_Animation (for_Channel : in channel_Id;
for_Joint : in scene_joint_Id)
is
the_Channel : animation_Channel renames Self.Channels (for_Channel);
Cursor : Index renames the_Channel.Cursor;
Cursor_updated : Boolean := False;
new_Transform : Matrix_4x4 := Identity_4x4;
begin
if Cursor = the_Channel.Times'Last
then
Cursor := 0;
Self.start_Time := Now;
end if;
-- Rotation
--
declare
Initial : Transform;
begin
if Cursor < the_Channel.Times'Last
then
if Cursor = 0
or else Elapsed > Duration (the_Channel.Times (Cursor))
then
Cursor := Cursor + 1;
Cursor_updated := True;
if Cursor = 1
then
Initial := the_Channel.current_Transform;
if the_Channel.Times (Cursor) = 0.0
then
the_Channel.Transform_interp_Delta := 1.0 / 60.0;
else
the_Channel.Transform_interp_Delta := the_Channel.Times (Cursor);
end if;
else
Initial := the_Channel.Transforms (Cursor - 1);
the_Channel.Transform_interp_Delta := the_Channel.Times (Cursor) - the_Channel.Times (Cursor - 1);
end if;
the_Channel.current_Transform := the_Channel.Transforms (Cursor);
the_Channel.Transform_interp_Delta := 1.0 / (the_Channel.Transform_interp_Delta * 60.0); -- 60.0 is frames/sec.
the_Channel.slerp_Time := 0.0;
else
if Cursor > 1
then Initial := the_Channel.Transforms (Cursor - 1);
else Initial := the_Channel.Transforms (Cursor);
end if;
end if;
else
Initial := the_Channel.Transforms (1);
end if;
if Elapsed < Duration (the_Channel.Times (the_Channel.Times'Last))
then
set_Rotation (new_Transform, to_Matrix (Slerp (Initial.Rotation,
the_Channel.current_Transform.Rotation,
the_Channel.slerp_Time)));
the_Channel.slerp_Time := the_Channel.slerp_Time
+ the_Channel.Transform_interp_Delta;
end if;
end;
-- Location
--
declare
use type Vector_3;
desired_Site : constant Vector_3 := the_Channel.Transforms (Cursor).Translation;
begin
if Cursor < the_Channel.Times'Last
then
if Cursor_updated
then
if Cursor = 1
then
if the_Channel.Times (Cursor) = 0.0
then
the_Channel.site_interp_Delta := desired_Site - the_Channel.current_Site;
else
the_Channel.site_interp_Delta := (desired_Site - the_Channel.current_Site)
/ (the_Channel.Times (Cursor));
end if;
else
the_Channel.site_interp_Delta := (desired_Site - the_Channel.current_Site)
/ (the_Channel.Times (Cursor) - the_Channel.Times (Cursor - 1));
end if;
the_Channel.site_interp_Delta := the_Channel.site_interp_Delta / 60.0; -- 60.0 is frames/sec.
end if;
the_Channel.current_Site := the_Channel.current_Site + the_Channel.site_interp_Delta;
set_Translation (new_Transform, To => the_Channel.current_Site);
end if;
end;
-- Scale
--
-- (TODO)
-- Store the new transform.
--
Self.set_Transform (the_Channel.target_Joint,
To => Transpose (new_Transform)); -- Transpose to convert to collada column vectors.
end update_full_transform_Animation;
begin
Now := world_Age;
if Self.start_Time = 0.0 then
Self.start_Time := Now;
end if;
Elapsed := Now - Self.start_Time;
declare
use channel_id_Maps_of_animation_Channel,
ada.Strings.Unbounded;
Cursor : channel_id_Maps_of_animation_Channel.Cursor := Self.Channels.First;
begin
while has_Element (Cursor)
loop
if Key (Cursor) = (+"stride_bone_x")
then
update_location_X_Animation (Key (Cursor),
Key (Cursor));
elsif Key (Cursor) = (+"stride_bone_y")
then
update_location_Y_Animation (Key (Cursor),
Key (Cursor));
elsif Key (Cursor) = (+"stride_bone_z")
then
update_location_Z_Animation (Key (Cursor),
Key (Cursor));
else
update_full_transform_Animation (Key (Cursor),
Key (Cursor));
end if;
next (Cursor);
end loop;
end;
Self.update_all_global_Transforms;
end animate;
procedure reset_Animation (Self : in out Item)
is
use channel_id_Maps_of_animation_Channel;
Cursor : channel_id_Maps_of_animation_Channel.Cursor := Self.Channels.First;
the_Channel : animation_Channel;
begin
Self.start_Time := 0.0;
while has_Element (Cursor)
loop
the_Channel := Element (Cursor);
the_Channel.Cursor := 0;
the_Channel.current_Angle := the_Channel.initial_Angle;
the_Channel.current_Site := the_Channel.initial_Site;
the_Channel.interp_Delta := 0.0;
Self.Channels.replace_Element (Cursor, the_Channel);
next (Cursor);
end loop;
end reset_Animation;
end gel.Rig;
|
pragma Ada_2005;
pragma Style_Checks (Off);
pragma Warnings (Off);
with Interfaces.C; use Interfaces.C;
package GStreamer.GST_Low_Level.gstreamer_0_10_gst_pbutils_pbutils_h is
-- GStreamer base utils library
-- * Copyright (C) 2006 Tim-Philipp Müller <tim centricular net>
-- *
-- * This library is free software; you can redistribute it and/or
-- * modify it under the terms of the GNU Library General Public
-- * License as published by the Free Software Foundation; either
-- * version 2 of the License, or (at your option) any later version.
-- *
-- * This library is distributed in the hope that it will be useful,
-- * but WITHOUT ANY WARRANTY; without even the implied warranty of
-- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- * Library General Public License for more details.
-- *
-- * You should have received a copy of the GNU Library General Public
-- * License along with this library; if not, write to the
-- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-- * Boston, MA 02111-1307, USA.
--
procedure gst_pb_utils_init; -- gst/pbutils/pbutils.h:37
pragma Import (C, gst_pb_utils_init, "gst_pb_utils_init");
end GStreamer.GST_Low_Level.gstreamer_0_10_gst_pbutils_pbutils_h;
|
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- S I N F O . C N --
-- --
-- B o d y --
-- --
-- Copyright (C) 1992-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. 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 child package of Sinfo contains some routines that permit in place
-- alteration of existing tree nodes by changing the value in the Nkind
-- field. Since Nkind functions logically in a manner similar to a variant
-- record discriminant part, such alterations cannot be permitted in a
-- general manner, but in some specific cases, the fields of related nodes
-- have been deliberately layed out in a manner that permits such alteration.
with Atree; use Atree;
with Snames; use Snames;
package body Sinfo.CN is
use Atree.Unchecked_Access;
-- This package is one of the few packages which is allowed to make direct
-- references to tree nodes (since it is in the business of providing a
-- higher level of tree access which other clients are expected to use and
-- which implements checks).
------------------------------------------------------------
-- Change_Character_Literal_To_Defining_Character_Literal --
------------------------------------------------------------
procedure Change_Character_Literal_To_Defining_Character_Literal
(N : in out Node_Id)
is
begin
Set_Nkind (N, N_Defining_Character_Literal);
N := Extend_Node (N);
end Change_Character_Literal_To_Defining_Character_Literal;
------------------------------------
-- Change_Conversion_To_Unchecked --
------------------------------------
procedure Change_Conversion_To_Unchecked (N : Node_Id) is
begin
Set_Do_Overflow_Check (N, False);
Set_Do_Tag_Check (N, False);
Set_Do_Length_Check (N, False);
Set_Nkind (N, N_Unchecked_Type_Conversion);
end Change_Conversion_To_Unchecked;
----------------------------------------------
-- Change_Identifier_To_Defining_Identifier --
----------------------------------------------
procedure Change_Identifier_To_Defining_Identifier (N : in out Node_Id) is
begin
Set_Nkind (N, N_Defining_Identifier);
N := Extend_Node (N);
end Change_Identifier_To_Defining_Identifier;
---------------------------------------------
-- Change_Name_To_Procedure_Call_Statement --
---------------------------------------------
procedure Change_Name_To_Procedure_Call_Statement (N : Node_Id) is
begin
-- Case of Indexed component, which is a procedure call with arguments
if Nkind (N) = N_Indexed_Component then
declare
Prefix_Node : constant Node_Id := Prefix (N);
Exprs_Node : constant List_Id := Expressions (N);
begin
Change_Node (N, N_Procedure_Call_Statement);
Set_Name (N, Prefix_Node);
Set_Parameter_Associations (N, Exprs_Node);
end;
-- Case of function call node, which is a really a procedure call
elsif Nkind (N) = N_Function_Call then
declare
Fname_Node : constant Node_Id := Name (N);
Params_List : constant List_Id := Parameter_Associations (N);
begin
Change_Node (N, N_Procedure_Call_Statement);
Set_Name (N, Fname_Node);
Set_Parameter_Associations (N, Params_List);
end;
-- Case of call to attribute that denotes a procedure. Here we just
-- leave the attribute reference unchanged.
elsif Nkind (N) = N_Attribute_Reference
and then Is_Procedure_Attribute_Name (Attribute_Name (N))
then
null;
-- All other cases of names are parameterless procedure calls
else
declare
Name_Node : constant Node_Id := Relocate_Node (N);
begin
Change_Node (N, N_Procedure_Call_Statement);
Set_Name (N, Name_Node);
end;
end if;
end Change_Name_To_Procedure_Call_Statement;
--------------------------------------------------------
-- Change_Operator_Symbol_To_Defining_Operator_Symbol --
--------------------------------------------------------
procedure Change_Operator_Symbol_To_Defining_Operator_Symbol
(N : in out Node_Id)
is
begin
Set_Nkind (N, N_Defining_Operator_Symbol);
Set_Node2 (N, Empty); -- Clear unused Str2 field
N := Extend_Node (N);
end Change_Operator_Symbol_To_Defining_Operator_Symbol;
----------------------------------------------
-- Change_Operator_Symbol_To_String_Literal --
----------------------------------------------
procedure Change_Operator_Symbol_To_String_Literal (N : Node_Id) is
begin
Set_Nkind (N, N_String_Literal);
Set_Node1 (N, Empty); -- clear Name1 field
end Change_Operator_Symbol_To_String_Literal;
------------------------------------------------
-- Change_Selected_Component_To_Expanded_Name --
------------------------------------------------
procedure Change_Selected_Component_To_Expanded_Name (N : Node_Id) is
begin
Set_Nkind (N, N_Expanded_Name);
Set_Chars (N, Chars (Selector_Name (N)));
end Change_Selected_Component_To_Expanded_Name;
end Sinfo.CN;
|
package body System.Native_Real_Time is
use type C.signed_int;
function Clock return Native_Time is
Result : aliased C.time.struct_timespec;
begin
if C.time.clock_gettime (C.time.CLOCK_MONOTONIC, Result'Access) < 0 then
raise Program_Error; -- ???
end if;
return Result;
end Clock;
procedure Simple_Delay_Until (T : Native_Time) is
Timeout_T : constant Duration := To_Duration (T);
Current_T : constant Duration := To_Duration (Clock);
D : Duration;
begin
if Timeout_T > Current_T then
D := Timeout_T - Current_T;
else
D := 0.0; -- always calling Delay_For for abort checking
end if;
System.Native_Time.Delay_For (D);
end Simple_Delay_Until;
procedure Delay_Until (T : Native_Time) is
begin
Delay_Until_Hook.all (T);
end Delay_Until;
end System.Native_Real_Time;
|
with Numerics, Numerics.Sparse_Matrices;
use Numerics, Numerics.Sparse_Matrices;
package Forward_AD.AD2D is
type AD2D is tagged private;
type AD2D_Vector is array (Nat range <>) of AD2D;
function "+" (A, B : in AD2D) return AD2D;
function "-" (A, B : in AD2D) return AD2D;
function "*" (A : in AD2D;
B : in AD2D) return AD_Type;
function "-" (A : in AD2D) return AD2D;
function Square (A : in AD2D) return AD_Type is (A * A);
function To_AD2D_Vector (Pos_Vector : in Pos2D_Vector) return AD2D_Vector
with Pre => Pos_Vector'Length mod 2 = 0;
private
type AD2D is tagged
record
X : AD_Type;
Y : AD_Type;
end record;
end Forward_AD.AD2D;
|
------------------------------------------------------------------------------
-- --
-- Copyright (C) 2017-2020, Fabien Chouteau --
-- --
-- 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 AGATE.Scheduler; use AGATE.Scheduler;
with AGATE.Traces;
package body AGATE.Mutexes is
---------------
-- Wait_Lock --
---------------
procedure Wait_Lock
(Mut : Mutex_ID)
is
T : constant Task_Object_Access := Task_Object_Access (Current_Task);
begin
if T.Base_Prio > Mut.Prio then
raise Program_Error with
"Task priority must be less than or equal to the mutex priority";
end if;
Change_Priority (Mut.Prio);
if Mut.Owner = null then
Mut.Owner := T;
Traces.Lock (Mut, Task_ID (Mut.Owner));
else
-- Suspend the current task
Scheduler.Suspend (Scheduler.Mutex);
-- Add it to the waiting queue
Insert_Task (Mut.all, T);
if Context_Switch_Needed then
Do_Context_Switch;
end if;
end if;
end Wait_Lock;
--------------
-- Try_Lock --
--------------
function Try_Lock
(Mut : Mutex_ID)
return Boolean
is
T : constant Task_Object_Access := Task_Object_Access (Current_Task);
begin
if T.Base_Prio > Mut.Prio then
raise Program_Error with
"Task priority must be less than or equal to the mutex priority";
end if;
if Mut.Owner = null then
Mut.Owner := T;
Change_Priority (Mut.Prio);
Traces.Lock (Mut, Task_ID (Mut.Owner));
return True;
else
return False;
end if;
end Try_Lock;
-------------
-- Release --
-------------
procedure Release
(Mut : Mutex_ID)
is
begin
if Mut.Owner = null then
raise Program_Error;
end if;
if Mut.Owner /= Task_Object_Access (Current_Task) then
raise Program_Error;
end if;
Change_Priority (Current_Task.Base_Prio);
Traces.Release (Mut, Current_Task);
Mut.Owner := Mut.Waiting_List;
if Mut.Owner /= null then
Mut.Waiting_List := Mut.Owner.Next;
Mut.Owner.Next := null;
Traces.Lock (Mut, Task_ID (Mut.Owner));
Scheduler.Resume (Task_ID (Mut.Owner));
end if;
end Release;
-----------------
-- Insert_Task --
-----------------
procedure Insert_Task
(Mut : in out Mutex;
T : Task_Object_Access)
is
begin
-- TODO: This is LIFO, so probably not the best... :)
T.Next := Mut.Waiting_List;
Mut.Waiting_List := T;
end Insert_Task;
end AGATE.Mutexes;
|
with GESTE;
with GESTE.Maths_Types;
with GESTE_Config;
pragma Style_Checks (Off);
package Game_Assets is
Palette : aliased GESTE.Palette_Type := (
0 => 391,
1 => 59147,
2 => 22089,
3 => 58727,
4 => 52303,
5 => 4907,
6 => 41834,
7 => 39694,
8 => 16847,
9 => 35372,
10 => 17208,
11 => 14856,
12 => 21228,
13 => 29681,
14 => 63423,
15 => 42326,
16 => 57613,
17 => 11414,
18 => 65535,
19 => 46486,
20 => 0);
type Object_Kind is (Rectangle_Obj, Point_Obj,
Ellipse_Obj, Polygon_Obj, Tile_Obj, Text_Obj);
type String_Access is access all String;
type Object
(Kind : Object_Kind := Rectangle_Obj)
is record
Name : String_Access;
Id : Natural;
X : GESTE.Maths_Types.Value;
Y : GESTE.Maths_Types.Value;
Width : GESTE.Maths_Types.Value;
Height : GESTE.Maths_Types.Value;
Str : String_Access;
Tile_Id : GESTE_Config.Tile_Index;
end record;
type Object_Array is array (Natural range <>)
of Object;
end Game_Assets;
|
with Ada.Text_IO; use Ada.Text_IO;
procedure Dinesman is
subtype Floor is Positive range 1 .. 5;
type People is (Baker, Cooper, Fletcher, Miller, Smith);
type Floors is array (People'Range) of Floor;
type PtFloors is access all Floors;
function Constrained (f : PtFloors) return Boolean is begin
if f (Baker) /= Floor'Last and
f (Cooper) /= Floor'First and
Floor'First < f (Fletcher) and f (Fletcher) < Floor'Last and
f (Miller) > f (Cooper) and
abs (f (Smith) - f (Fletcher)) /= 1 and
abs (f (Fletcher) - f (Cooper)) /= 1
then return True; end if;
return False;
end Constrained;
procedure Solve (list : PtFloors; n : Natural) is
procedure Swap (I : People; J : Natural) is
temp : constant Floor := list (People'Val (J));
begin list (People'Val (J)) := list (I); list (I) := temp;
end Swap;
begin
if n = 1 then
if Constrained (list) then
for p in People'Range loop
Put_Line (p'Img & " on floor " & list (p)'Img);
end loop;
end if;
return;
end if;
for i in People'First .. People'Val (n - 1) loop
Solve (list, n - 1);
if n mod 2 = 1 then Swap (People'First, n - 1);
else Swap (i, n - 1); end if;
end loop;
end Solve;
thefloors : aliased Floors;
begin
for person in People'Range loop
thefloors (person) := People'Pos (person) + Floor'First;
end loop;
Solve (thefloors'Access, Floors'Length);
end Dinesman;
|
-- Copyright (c) 2019 Maxim Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-- License-Filename: LICENSE
-------------------------------------------------------------
with Program.Lexical_Elements;
with Program.Scanned_Rule_Handlers;
with Program.Scanner_States;
with Program.Source_Buffers;
package Program.Scanners is
pragma Pure;
type Scanner is tagged limited private;
-- Scaner of source code
procedure Set_Source
(Self : in out Scanner'Class;
Source : not null Program.Source_Buffers.Source_Buffer_Access);
-- Assign source buffer to the scanner
function Get_Source (Self : Scanner'Class)
return not null Program.Source_Buffers.Source_Buffer_Access;
-- Get assigned source buffer
procedure Set_Handler
(Self : in out Scanner'Class;
Handler : not null Program.Scanned_Rule_Handlers.Handler_Access);
-- Assign rule handler to the scanner
subtype Start_Condition is Program.Scanner_States.State;
procedure Set_Start_Condition
(Self : in out Scanner'Class;
Condition : Start_Condition);
-- Set new start condition to the scanner
function Get_Start_Condition (Self : Scanner'Class) return Start_Condition;
-- Get current start condition
procedure Get_Token
(Self : access Scanner'Class;
Value : out Program.Lexical_Elements.Lexical_Element_Kind);
-- Scan for next token. The scanner searches for text matching regexps
-- and calls corresponding routine of rule handler. Rule handler decodes
-- token kind and return Skip flag. Get_Token returns when Skip = False.
function Get_Span (Self : Scanner'Class) return Program.Source_Buffers.Span;
-- Get Span of last token
package Tables is
use Program.Scanner_States;
subtype Code_Point is Natural;
function To_Class (Value : Code_Point) return Character_Class
with Inline;
function Switch (S : State; Class : Character_Class) return State
with Inline;
function Rule (S : State) return Rule_Index;
end Tables;
private
Buffer_Half_Size : constant := 1024;
End_Of_Buffer : constant Program.Source_Buffers.Character_Length := 0;
subtype Buffer_Index is Positive range 1 .. 2 * Buffer_Half_Size;
Error_Character : constant Program.Scanner_States.Character_Class := 0;
Error_State : constant Program.Scanner_States.State :=
Program.Scanner_States.Error_State;
type Scanner is tagged limited record
Handler : Program.Scanned_Rule_Handlers.Handler_Access;
Source : Program.Source_Buffers.Source_Buffer_Access;
Start : Program.Scanner_States.State := Program.Scanner_States.INITIAL;
Next : Buffer_Index := 1; -- Where we scan Classes buffer
Offset : Positive := 1; -- Corresponding offset in Source_Buffer
From : Positive := 1; -- Start of token in Source_Buffer
To : Natural; -- End of token in Source_Buffer
EOF : Natural := 0;
Classes : Program.Source_Buffers.Character_Info_Array (Buffer_Index) :=
(1 => (Class => Error_Character, Length => End_Of_Buffer),
others => <>);
end record;
procedure Read_Buffer (Self : in out Scanner'Class);
end Program.Scanners;
|
-- C41401A.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 IF THE PREFIX OF THE FOLLOWING
-- ATTRIBUTES HAS THE VALUE NULL:
-- A) 'CALLABLE AND 'TERMINATED FOR A TASK TYPE.
-- B) 'FIRST, 'FIRST(N), 'LAST, 'LAST(N), 'LENGTH, 'LENGTH(N),
-- 'RANGE, AND 'RANGE(N) FOR AN ARRAY TYPE.
-- TBN 10/2/86
-- EDS 07/14/98 AVOID OPTIMIZATION
WITH REPORT; USE REPORT;
PROCEDURE C41401A IS
SUBTYPE INT IS INTEGER RANGE 1 .. 10;
TASK TYPE TT IS
ENTRY E;
END TT;
TYPE ACC_TT IS ACCESS TT;
TYPE NULL_ARR1 IS ARRAY (2 .. 1) OF INTEGER;
TYPE ARRAY1 IS ARRAY (INT RANGE <>) OF INTEGER;
TYPE NULL_ARR2 IS ARRAY (3 .. 1, 2 .. 1) OF INTEGER;
TYPE ARRAY2 IS ARRAY (INT RANGE <>, INT RANGE <>) OF INTEGER;
TYPE ACC_NULL1 IS ACCESS NULL_ARR1;
TYPE ACC_ARR1 IS ACCESS ARRAY1;
TYPE ACC_NULL2 IS ACCESS NULL_ARR2;
TYPE ACC_ARR2 IS ACCESS ARRAY2;
PTR_TT : ACC_TT;
PTR_ARA1: ACC_NULL1;
PTR_ARA2 : ACC_ARR1 (1 .. 4);
PTR_ARA3 : ACC_NULL2;
PTR_ARA4 : ACC_ARR2 (1 .. 2, 2 .. 4);
BOOL_VAR : BOOLEAN := FALSE;
INT_VAR : INTEGER := 1;
TASK BODY TT IS
BEGIN
ACCEPT E;
END TT;
BEGIN
TEST ("C41401A", "CHECK THAT CONSTRAINT_ERROR IS RAISED IF THE " &
"PREFIX HAS A VALUE OF NULL FOR THE FOLLOWING " &
"ATTRIBUTES: 'CALLABLE, 'TERMINATED, 'FIRST, " &
"'LAST, 'LENGTH, AND 'RANGE");
BEGIN
IF EQUAL (3, 2) THEN
PTR_TT := NEW TT;
END IF;
BOOL_VAR := IDENT_BOOL(PTR_TT'CALLABLE);
FAILED ("CONSTRAINT_ERROR NOT RAISED - 1 " & BOOLEAN'IMAGE(BOOL_VAR));
EXCEPTION
WHEN CONSTRAINT_ERROR =>
NULL;
WHEN OTHERS =>
FAILED ("UNEXPECTED EXCEPTION RAISED - 2");
END;
BEGIN
IF EQUAL (1, 3) THEN
PTR_TT := NEW TT;
END IF;
BOOL_VAR := IDENT_BOOL(PTR_TT'TERMINATED);
FAILED ("CONSTRAINT_ERROR NOT RAISED - 3 " & BOOLEAN'IMAGE(BOOL_VAR));
EXCEPTION
WHEN CONSTRAINT_ERROR =>
NULL;
WHEN OTHERS =>
FAILED ("UNEXPECTED EXCEPTION RAISED - 4");
END;
BEGIN
INT_VAR := IDENT_INT(PTR_ARA1'FIRST);
FAILED ("CONSTRAINT_ERROR NOT RAISED - 5 " & INTEGER'IMAGE(INT_VAR));
EXCEPTION
WHEN CONSTRAINT_ERROR =>
NULL;
WHEN OTHERS =>
FAILED ("UNEXPECTED EXCEPTION RAISED - 6");
END;
BEGIN
INT_VAR := IDENT_INT(PTR_ARA2'LAST);
FAILED ("CONSTRAINT_ERROR NOT RAISED - 7 " & INTEGER'IMAGE(INT_VAR));
EXCEPTION
WHEN CONSTRAINT_ERROR =>
NULL;
WHEN OTHERS =>
FAILED ("UNEXPECTED EXCEPTION RAISED - 8");
END;
BEGIN
INT_VAR := IDENT_INT(PTR_ARA1'LENGTH);
FAILED ("CONSTRAINT_ERROR NOT RAISED - 9 " & INTEGER'IMAGE(INT_VAR));
EXCEPTION
WHEN CONSTRAINT_ERROR =>
NULL;
WHEN OTHERS =>
FAILED ("UNEXPECTED EXCEPTION RAISED - 10");
END;
BEGIN
DECLARE
A : ARRAY1 (PTR_ARA2'RANGE);
BEGIN
A (1) := IDENT_INT(1);
FAILED ("CONSTRAINT_ERROR NOT RAISED - 11 " &
INTEGER'IMAGE(A(1)));
EXCEPTION
WHEN OTHERS =>
FAILED ("CONSTRAINT_ERROR NOT RAISED - 11 ");
END;
EXCEPTION
WHEN CONSTRAINT_ERROR =>
NULL;
WHEN OTHERS =>
FAILED ("UNEXPECTED EXCEPTION RAISED - 12");
END;
BEGIN
INT_VAR := IDENT_INT(PTR_ARA3'FIRST(2));
FAILED ("CONSTRAINT_ERROR NOT RAISED - 13 " & INTEGER'IMAGE(INT_VAR));
EXCEPTION
WHEN CONSTRAINT_ERROR =>
NULL;
WHEN OTHERS =>
FAILED ("UNEXPECTED EXCEPTION RAISED - 14");
END;
BEGIN
INT_VAR := IDENT_INT(PTR_ARA4'LAST(2));
FAILED ("CONSTRAINT_ERROR NOT RAISED - 15 " & INTEGER'IMAGE(INT_VAR));
EXCEPTION
WHEN CONSTRAINT_ERROR =>
NULL;
WHEN OTHERS =>
FAILED ("UNEXPECTED EXCEPTION RAISED - 16");
END;
BEGIN
INT_VAR := IDENT_INT(PTR_ARA3'LENGTH(2));
FAILED ("CONSTRAINT_ERROR NOT RAISED - 17 " & INTEGER'IMAGE(INT_VAR));
EXCEPTION
WHEN CONSTRAINT_ERROR =>
NULL;
WHEN OTHERS =>
FAILED ("UNEXPECTED EXCEPTION RAISED - 18");
END;
BEGIN
DECLARE
A : ARRAY1 (PTR_ARA4'RANGE(2));
BEGIN
A (1) := IDENT_INT(1);
FAILED ("CONSTRAINT_ERROR NOT RAISED - 19 " &
INTEGER'IMAGE(A(1)));
EXCEPTION
WHEN OTHERS =>
FAILED ("CONSTRAINT_ERROR NOT RAISED - 19 ");
END;
EXCEPTION
WHEN CONSTRAINT_ERROR =>
NULL;
WHEN OTHERS =>
FAILED ("UNEXPECTED EXCEPTION RAISED - 20");
END;
BEGIN
INT_VAR := IDENT_INT(PTR_ARA4'LAST(1));
FAILED ("CONSTRAINT_ERROR NOT RAISED - 21 " & INTEGER'IMAGE(INT_VAR));
EXCEPTION
WHEN CONSTRAINT_ERROR =>
NULL;
WHEN OTHERS =>
FAILED ("UNEXPECTED EXCEPTION RAISED - 22");
END;
BEGIN
INT_VAR := IDENT_INT(PTR_ARA3'LENGTH(1));
FAILED ("CONSTRAINT_ERROR NOT RAISED - 23 " & INTEGER'IMAGE(INT_VAR));
EXCEPTION
WHEN CONSTRAINT_ERROR =>
NULL;
WHEN OTHERS =>
FAILED ("UNEXPECTED EXCEPTION RAISED - 24");
END;
RESULT;
END C41401A;
|
------------------------------------------------------------------------------
-- --
-- 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.Primitive_Types.Hash is
new AMF.Elements.Generic_Hash (UML_Primitive_Type, UML_Primitive_Type_Access);
|
$NetBSD: patch-posix-signals.adb,v 1.5 2014/04/30 16:27:04 marino Exp $
Fix style check violation for GNAT 4.9
--- posix-signals.adb.orig 2012-05-10 13:32:11.000000000 +0000
+++ posix-signals.adb
@@ -340,16 +340,18 @@ package body POSIX.Signals is
begin
for Sig in Signal loop
if Reserved_Signal (Sig) then
- if Sig /= SIGKILL and then Sig /= SIGSTOP and then
- sigismember (Set.C'Unchecked_Access, int (Sig)) = 1 then
- Raise_POSIX_Error (Invalid_Argument);
+ if Sig /= SIGKILL and then Sig /= SIGSTOP then
+ if sigismember (Set.C'Unchecked_Access, int (Sig)) = 1 then
+ Raise_POSIX_Error (Invalid_Argument);
+ end if;
end if;
else
-- This signal might be attached to a
-- task entry or protected procedure
if sigismember (Set.C'Unchecked_Access, int (Sig)) = 1
- and then (SI.Is_Entry_Attached (SIID (Sig))
- or else SI.Is_Handler_Attached (SIID (Sig))) then
+ and then (SI.Is_Entry_Attached (SIID (Sig))
+ or else SI.Is_Handler_Attached (SIID (Sig)))
+ then
Raise_POSIX_Error (Invalid_Argument);
end if;
end if;
@@ -466,7 +468,8 @@ package body POSIX.Signals is
(Set : Signal_Set; Sig : Signal) return Boolean is
begin
if Sig = Signal_Null
- or else sigismember (Set.C'Unchecked_Access, int (Sig)) = 1 then
+ or else sigismember (Set.C'Unchecked_Access, int (Sig)) = 1
+ then
return True;
end if;
return False;
@@ -500,8 +503,7 @@ package body POSIX.Signals is
if not Reserved_Signal (Sig) then
-- It is OK to modify this signal's masking, using the
-- interfaces of System.Interrupts.
- if sigismember
- (New_Mask.C'Unchecked_Access, int (Sig)) = 1 then
+ if sigismember (New_Mask.C'Unchecked_Access, int (Sig)) = 1 then
if not SI.Is_Blocked (SIID (Sig)) then
Disposition (Sig) := SI_To_Mask;
end if;
@@ -551,8 +553,7 @@ package body POSIX.Signals is
if not Reserved_Signal (Sig) then
-- It is OK to modify this signal's masking, using the
-- interfaces of System.Interrupts.
- if sigismember
- (Mask_to_Add.C'Unchecked_Access, int (Sig)) = 1 then
+ if sigismember (Mask_to_Add.C'Unchecked_Access, int (Sig)) = 1 then
if not SI.Is_Blocked (SIID (Sig)) then
Disposition (Sig) := SI_To_Mask;
end if;
@@ -602,7 +603,8 @@ package body POSIX.Signals is
-- It is OK to modify this signal's masking, using the
-- interfaces of System.Interrupts.
if sigismember
- (Mask_to_Subtract.C'Unchecked_Access, int (Sig)) = 1 then
+ (Mask_to_Subtract.C'Unchecked_Access, int (Sig)) = 1
+ then
if SI.Is_Blocked (SIID (Sig)) then
Disposition (Sig) := SI_To_Unmask;
end if;
@@ -639,7 +641,8 @@ package body POSIX.Signals is
-- may be more values in POSIX.Signal
-- than System.Interrupts.Interrupt_ID
if pthread_sigmask
- (SIG_BLOCK, null, Old_Mask.C'Unchecked_Access) = 0 then
+ (SIG_BLOCK, null, Old_Mask.C'Unchecked_Access) = 0
+ then
null;
end if;
-- Delete any ublocked signals from System.Interrupts.
@@ -1004,8 +1007,7 @@ package body POSIX.Signals is
Result : aliased int;
begin
Check_Awaitable (Set);
- if sigwait
- (Set.C'Unchecked_Access, Result'Unchecked_Access) = -1 then
+ if sigwait (Set.C'Unchecked_Access, Result'Unchecked_Access) = -1 then
Raise_POSIX_Error (Fetch_Errno);
end if;
return Signal (Result);
@@ -1156,7 +1158,8 @@ begin
if Integer (Sig) <= Integer (SIID'Last) then
if SI.Is_Reserved (SIID (Sig)) and then (Sig /= SIGKILL
- and Sig /= SIGSTOP) then
+ and Sig /= SIGSTOP)
+ then
Reserved_Signal (Sig) := True;
end if;
else
|
------------------------------------------------------------------------------
-- --
-- SPARK LIBRARY COMPONENTS --
-- --
-- S P A R K . --
-- F L O A T I N G _ P O I N T _ A R I T H M E T I C _ L E M M A S --
-- --
-- B o d y --
-- --
-- Copyright (C) 2017, AdaCore --
-- --
-- SPARK 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. SPARK 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/>. --
-- --
------------------------------------------------------------------------------
package body SPARK.Floating_Point_Arithmetic_Lemmas
with SPARK_Mode => Off -- TEST_ON
is
procedure Lemma_Add_Is_Monotonic
(Val1 : Fl;
Val2 : Fl;
Val3 : Fl)
is null;
procedure Lemma_Sub_Is_Monotonic
(Val1 : Fl;
Val2 : Fl;
Val3 : Fl)
is null;
procedure Lemma_Mul_Is_Monotonic
(Val1 : Fl;
Val2 : Fl;
Val3 : Fl)
is null;
procedure Lemma_Mul_Is_Antimonotonic
(Val1 : Fl;
Val2 : Fl;
Val3 : Fl)
is null;
procedure Lemma_Mul_Is_Contracting
(Val1 : Fl;
Val2 : Fl)
is null;
procedure Lemma_Div_Is_Monotonic
(Val1 : Fl;
Val2 : Fl;
Val3 : Fl)
is null;
procedure Lemma_Div_Is_Antimonotonic
(Val1 : Fl;
Val2 : Fl;
Val3 : Fl)
is null;
end SPARK.Floating_Point_Arithmetic_Lemmas;
|
-- Ada_GUI implementation based on Gnoga. Adapted 2021
-- --
-- GNOGA - The GNU Omnificent GUI for Ada --
-- --
-- G N O G A . G U I . E L E M E N T . C A N V A S --
-- --
-- S p e c --
-- --
-- --
-- Copyright (C) 2014 David Botton --
-- --
-- This library is free software; you can redistribute it and/or modify --
-- it under terms of the GNU General Public License as published by the --
-- Free Software Foundation; either version 3, or (at your option) any --
-- later version. This library is distributed in the hope that it will be --
-- useful, but WITHOUT ANY WARRANTY; without even the implied warranty of --
-- 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/>. --
-- --
-- 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. --
-- --
-- For more information please go to http://www.gnoga.com --
------------------------------------------------------------------------------
with Ada.Finalization;
package Ada_GUI.Gnoga.Gui.Element.Canvas is
-------------------------------------------------------------------------
-- Canvas_Types
-------------------------------------------------------------------------
type Canvas_Type is new Gnoga.Gui.Element.Element_Type with private;
type Canvas_Access is access all Canvas_Type;
type Pointer_To_Canvas_Class is access all Canvas_Type'Class;
-------------------------------------------------------------------------
-- Canvas_Type - Creation Methods
-------------------------------------------------------------------------
procedure Create (Canvas : in out Canvas_Type;
Parent : in out Gnoga.Gui.Base_Type'Class;
Width : in Integer;
Height : in Integer;
ID : in String := "");
-- Create a Canvas container
-------------------------------------------------------------------------
-- Context_Types
-------------------------------------------------------------------------
type Context_Type is
new Ada.Finalization.Limited_Controlled with private;
type Context_Access is access all Context_Type;
type Pointer_To_Context_Class is access all Context_Type'Class;
overriding procedure Finalize (Object : in out Context_Type);
-- Clear browser reference to created context
-------------------------------------------------------------------------
-- Context_Type - Properties
-------------------------------------------------------------------------
procedure Property (Context : in out Context_Type;
Name : in String;
Value : in String);
procedure Property (Context : in out Context_Type;
Name : in String;
Value : in Integer);
procedure Property (Context : in out Context_Type;
Name : in String;
Value : in Boolean);
procedure Property (Context : in out Context_Type;
Name : in String;
Value : in Float);
function Property (Context : Context_Type; Name : String) return String;
function Property (Context : Context_Type; Name : String) return Integer;
function Property (Context : Context_Type; Name : String) return Boolean;
function Property (Context : Context_Type; Name : String) return Float;
-------------------------------------------------------------------------
-- Context_Type - Methods
-------------------------------------------------------------------------
procedure Execute (Context : in out Context_Type; Method : String);
function Execute (Context : Context_Type; Method : String)
return String;
-- Internal Methods --
function ID (Context : Context_Type) return String;
function Connection_ID (Context : Context_Type)
return Gnoga.Connection_ID;
private
type Canvas_Type is new Gnoga.Gui.Element.Element_Type with null record;
type Context_Type is
new Ada.Finalization.Limited_Controlled with
record
Connection_ID : Gnoga.Connection_ID :=
Gnoga.No_Connection;
Context_ID : Gnoga.Web_ID;
end record;
end Ada_GUI.Gnoga.Gui.Element.Canvas;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- S Y S T E M . P A C K _ 1 3 --
-- --
-- S p e c --
-- --
-- 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. --
-- --
------------------------------------------------------------------------------
-- Handling of packed arrays with Component_Size = 13
package System.Pack_13 is
pragma Preelaborate;
Bits : constant := 13;
type Bits_13 is mod 2 ** Bits;
for Bits_13'Size use Bits;
-- In all subprograms below, Rev_SSO is set True if the array has the
-- non-default scalar storage order.
function Get_13
(Arr : System.Address;
N : Natural;
Rev_SSO : Boolean) return Bits_13 with Inline;
-- Arr is the address of the packed array, N is the zero-based
-- subscript. This element is extracted and returned.
procedure Set_13
(Arr : System.Address;
N : Natural;
E : Bits_13;
Rev_SSO : Boolean) with Inline;
-- Arr is the address of the packed array, N is the zero-based
-- subscript. This element is set to the given value.
end System.Pack_13;
|
--****p* Data_Streams/Files
-- DESCRIPTION
-- The user can use as data stream for sample I/O files with different
-- format. Every implemented format corresponds to a different implementation
-- of the Data_Source or Data_Destination interface defined in the package
-- Data_Streams.
--
-- In order to make it easier to manage different format at runtime,
-- this package acts as a kind of "broker" that recognizes the format
-- and create the correct object to handle it.
--
-- The interface of this package is really simple: it provides two
-- Open functions (Open.source and Open.destination) that look
-- at the filename to guess the format if this is not explicitely
-- specified by the user. If given the special filename the opening
-- functions use the standard input/output.
--
-- |html <h2>Options in filename</h2>
--
-- Sometimes it is necessary to give to the procedure opening the
-- source/destination some information that cannot be found in the
-- file itself. For example, if the file is just a raw sequence
-- of samples, it is not possible to read from it the sampling
-- frequency. As another example, when we open a data destination
-- that can accept both Sample_Type and Float formats, we cannot know
-- which format the user desires.
--
-- In order to solve this kind of problems we allow to append to the
-- filename an option string. The option string is separated from
-- the filename by "::" and it is a sequence of assignaments
-- key=value separated by commas. For example,
--
-- |html <center><code>/tmp/impulse.txt::fmt=float,foo,bar=0</code></center>
--
-- is a filename that identifies the file
-- |html <code>/tmp/impulse.txt</code> and associates with it three options
-- |html <code>fmt, foo</code> and
-- |html <code>bar</code> with values, respectively,
-- |html <code>float</code>, the empty string and 0.
--
-- Note that the option section is defined as the part of the filename
-- that goes
-- |html <b>from the last "::" to the end</b>. Therefore, the following
-- filename
--
-- |html <center><code>/tmp/pippo::jimmy=9,::bar=0</code></center>
--
-- is a filename that identifies the file
-- |html <code>/tmp/pippo::jimmy=9,</code> (yes, with a comma at the end...
-- pretty silly filename, I agree...) with option
-- |html <code>bar=0</code> and
-- |html <b>not</b> a file
-- |html <code>/tmp/pippo</code> with options
-- |html <code>jimmy=9</code> and
-- |html <code>::bar=0</code>.
--
-- Note that this structure does not allow to have neither "::" nor "," in an option
-- value. Currently no escape mechanism is used, maybe later.
--
-- Finally, notes that the option mechanism applies
-- |html <b>also to the special name "-"</b>.
-- For example, if we open a data detination with name
--
-- |html <center><code>-::fmt=float</code></center>
--
-- the output samples will be written to the standard output
-- in floating point format.
--***
package Fakedsp.Data_Streams.Files is
--****t* Files/File_Type
-- SOURCE
type File_Type is (Wav_File, Text_File, Unknown);
-- DESCRIPTION
-- Enumeration type representing the currently recognized format.
-- This type is here since we want to allow the user to specify
-- the format when the source/destination is open, without
-- any guessing on the library side.
--
-- It is a good idea to extend this type when a new format is added.
--***
--****f* Files/Open.Source
-- SOURCE
function Open (Filename : String;
Format : File_Type := Unknown)
return Data_Source_Access;
-- DESCRIPTION
-- Open a Data_Source based on the file with the specified filename and
-- format (WAV, text-based, ...). If the special
-- filename "-" is used, the standard input is used.
--
-- If Format = Unknown, then:
-- * if Filename = "-", format Text_File is used by default, otherwise
-- * the format is guessed on the basis of the extension (maybe
-- in the future we will check the content too).
--
-- Sampling frequency and number of channels are read from the
-- specified file or from the options read from the filename
--***
--****f* Files/Open.Destination
-- SOURCE
function Open (Filename : String;
Sampling : Frequency_Hz;
Format : File_Type := Unknown;
Last_Channel : Channel_Index := 1)
return Data_Destination_Access
with Pre => Sampling /= Unspecified_Frequency;
-- DESCRIPTION
-- Open a Data_Destination based on the file with the specified filename and
-- format (WAV, text-based, ...). If the special
-- filename "-" is used, the standard output is used.
--
-- If Format = Unknown, then
--
-- * if Filename = "-", format Text_File is used by default, otherwise
-- * the format is guessed on the basis of the extension.
--***
end Fakedsp.Data_Streams.Files;
|
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- SQL Database Access --
-- --
-- Testsuite Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2013, 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 test checks support of integer, floating point, date/time and
-- character data types in MySQL driver.
------------------------------------------------------------------------------
with League.Calendars.ISO_8601;
with League.Holders.Integers;
with League.Holders.Long_Long_Integers;
with League.Holders.Floats;
with League.Holders.Long_Floats;
with League.Strings;
with SQL.Databases;
with SQL.Options;
with SQL.Queries;
with Matreshka.Internals.SQL_Drivers.MySQL.Factory;
pragma Unreferenced (Matreshka.Internals.SQL_Drivers.MySQL.Factory);
procedure Test_284 is
use type League.Strings.Universal_String;
function "+"
(Item : Wide_Wide_String) return League.Strings.Universal_String
renames League.Strings.To_Universal_String;
DB_Driver : constant League.Strings.Universal_String := +"MYSQL";
DB_Options : SQL.Options.SQL_Options;
Timestamp_Value : League.Calendars.Date_Time
:= League.Calendars.Clock;
Datetime_Value : League.Calendars.Date_Time
:= League.Calendars.Clock;
begin
-- Remove fractional part of Date_Time, it is not supported by MySQL
-- server.
declare
Year : League.Calendars.ISO_8601.Year_Number;
Month : League.Calendars.ISO_8601.Month_Number;
Day : League.Calendars.ISO_8601.Day_Number;
Hour : League.Calendars.ISO_8601.Hour_Number;
Minute : League.Calendars.ISO_8601.Minute_Number;
Second : League.Calendars.ISO_8601.Second_Number;
Fraction : League.Calendars.ISO_8601.Nanosecond_100_Number;
begin
League.Calendars.ISO_8601.Split
(Timestamp_Value, Year, Month, Day, Hour, Minute, Second, Fraction);
Timestamp_Value :=
League.Calendars.ISO_8601.Create
(Year, Month, Day, Hour, Minute, Second, 0);
League.Calendars.ISO_8601.Split
(Datetime_Value, Year, Month, Day, Hour, Minute, Second, Fraction);
Datetime_Value :=
League.Calendars.ISO_8601.Create
(Year, Month, Day, Hour, Minute, Second, 0);
end;
DB_Options.Set (+"database", +"test");
declare
Database : aliased SQL.Databases.SQL_Database
:= SQL.Databases.Create (DB_Driver, DB_Options);
begin
Database.Open;
declare
Query : SQL.Queries.SQL_Query := Database.Query;
begin
-- Create table for test data.
Query.Prepare
(+"CREATE TABLE test_284"
& " (timestamp TIMESTAMP NOT NULL,"
& " datetime DATETIME NOT NULL,"
& " tiny TINYINT NOT NULL,"
& " small SMALLINT NOT NULL,"
& " medium MEDIUMINT NOT NULL,"
& " intv INTEGER NOT NULL,"
& " big BIGINT NOT NULL,"
& " ubig BIGINT UNSIGNED NOT NULL,"
& " floatv FLOAT NOT NULL,"
& " doublev DOUBLE NOT NULL,"
& " c10 CHAR(10) NOT NULL,"
& " vchar VARCHAR (20) NOT NULL)"
& " CHARACTER SET utf8");
Query.Execute;
-- Insert data.
Query.Prepare
(+"INSERT INTO test_284"
& " (timestamp, datetime, tiny, small, medium, intv, big,"
& " ubig, floatv, doublev, c10, vchar)"
& " VALUES"
& " (:timestamp, :datetime, :tiny, :small, :medium, :int,"
& " :big, :ubig, :floatv, :doublev, :c10, :vchar)");
Query.Bind_Value
(+":datetime", League.Holders.To_Holder (Datetime_Value));
Query.Bind_Value
(+":timestamp", League.Holders.To_Holder (Timestamp_Value));
Query.Bind_Value (+":tiny", League.Holders.Integers.To_Holder (1));
Query.Bind_Value (+":small", League.Holders.Integers.To_Holder (-2));
Query.Bind_Value (+":medium", League.Holders.Integers.To_Holder (3));
Query.Bind_Value (+":int", League.Holders.Integers.To_Holder (-4));
Query.Bind_Value
(+":big",
League.Holders.Long_Long_Integers.To_Holder (-9223372036854775807));
Query.Bind_Value
(+":ubig",
League.Holders.Long_Long_Integers.To_Holder (9223372036854775807));
Query.Bind_Value (+":floatv", League.Holders.Floats.To_Holder (2.6));
Query.Bind_Value
(+":doublev", League.Holders.Long_Floats.To_Holder (-4.3));
Query.Bind_Value (+":c10", League.Holders.To_Holder (+"abcdefghij"));
Query.Bind_Value (+":vchar", League.Holders.To_Holder (+"АБВГД"));
Query.Execute;
end;
declare
use type League.Calendars.Date_Time;
Query : SQL.Queries.SQL_Query := Database.Query;
begin
-- Obtain data and check expected value.
Query.Prepare
(+"SELECT timestamp, datetime, tiny, small, medium, intv, big,"
& " ubig, floatv, doublev, c10, vchar"
& " FROM test_284");
Query.Execute;
if not Query.Next then
raise Program_Error;
end if;
if League.Holders.Element (Query.Value (1)) /= Timestamp_Value then
raise Program_Error;
end if;
if League.Holders.Element (Query.Value (2)) /= Datetime_Value then
raise Program_Error;
end if;
if League.Holders.Integers.Element (Query.Value (3)) /= 1 then
raise Program_Error;
end if;
if League.Holders.Integers.Element (Query.Value (4)) /= -2 then
raise Program_Error;
end if;
if League.Holders.Integers.Element (Query.Value (5)) /= 3 then
raise Program_Error;
end if;
if League.Holders.Integers.Element (Query.Value (6)) /= -4 then
raise Program_Error;
end if;
if League.Holders.Long_Long_Integers.Element (Query.Value (7))
/= -9223372036854775807
then
raise Program_Error;
end if;
if League.Holders.Long_Long_Integers.Element (Query.Value (8))
/= 9223372036854775807
then
raise Program_Error;
end if;
if League.Holders.Floats.Element (Query.Value (9)) /= 2.6 then
raise Program_Error;
end if;
if League.Holders.Long_Floats.Element (Query.Value (10)) /= -4.3 then
raise Program_Error;
end if;
if League.Holders.Element (Query.Value (11)) /= +"abcdefghij" then
raise Program_Error;
end if;
if League.Holders.Element (Query.Value (12)) /= +"АБВГД" then
raise Program_Error;
end if;
end;
Database.Close;
end;
end Test_284;
|
with impact.d2.orbs.Collision,
impact.d2.orbs.Contact,
impact.d2.orbs.Solid,
impact.d2.Math;
package impact.d2.orbs.toi_Solver
--
--
--
is
use impact.d2.Math;
--
-- class b2Contact;
-- class b2Body;
-- struct b2TOIConstraint;
-- class b2StackAllocator;
-- This is a pure position solver for a single movable body in contact with
-- multiple non-moving bodies.
--
type b2TOISolver is tagged private;
procedure destruct (Self : in out b2TOISolver);
procedure Initialize (Self : in out b2TOISolver; contacts : in Contact.views;
toiBody : access Solid.item'Class);
procedure Clear (Self : in out b2TOISolver);
-- Perform one solver iteration. Returns true if converged.
--
function Solve (Self : in b2TOISolver; baumgarte : float32) return Boolean;
private
type Solid_view is access all Solid.item'Class;
type b2TOIConstraint is
record
localPoints : b2Vec2_array (1 .. b2_maxManifoldPoints);
localNormal : b2Vec2;
localPoint : b2Vec2;
kind : collision.b2Manifold_Kind;
radius : float32;
pointCount : int32;
bodyA : Solid_view;
bodyB : Solid_view;
end record;
type b2TOIConstraints is array (int32 range <>) of aliased b2TOIConstraint;
type b2TOIConstraints_view is access all b2TOIConstraints;
type b2TOISolver is tagged
record
m_constraints : b2TOIConstraints_view;
m_count : int32 := 0;
m_toiBody : access Solid.item'Class;
end record;
-- class b2TOISolver
-- {
-- public:
-- ~b2TOISolver();
--
-- void Initialize(b2Contact** contacts, int32 contactCount, b2Body* toiBody);
-- void Clear();
--
-- // Perform one solver iteration. Returns true if converged.
-- bool Solve(float32 baumgarte);
--
-- private:
--
-- b2TOIConstraint* m_constraints;
-- int32 m_count;
-- b2Body* m_toiBody;
-- b2StackAllocator* m_allocator;
-- };
--
-- #endif
end impact.d2.orbs.toi_Solver;
|
with PIN;
with PasswordDatabase;
with Ada.Containers; use Ada.Containers;
with Ada.Text_IO; use Ada.Text_IO;
package PasswordManager with SPARK_Mode is
type Information is private;
-- Private function returns length of database in Password Manager
function StoredDatabaseLength(Manager_Information : in Information)
return Ada.Containers.Count_Type;
-- Private function returns Master Pin in Password Manager
function GetMasterPin(Manager_Information: in Information) return PIN.PIN;
-- Private function returns database in Password Manager
function GetDatabase(Manager_Information: in Information) return PasswordDatabase.Database;
-- Private function returns status of Password Manager
function IsLocked(Manager_Information: in Information) return Boolean;
-- Inital Password Manager Setup
procedure Init(Pin_Input : in String;
Manager_Information : out Information) with
Pre => (Pin_Input' Length = 4 and
(for all I in Pin_Input'Range => Pin_Input(I) >= '0'
and Pin_Input(I) <= '9'));
-- Gets the current status of the Password Manager
function Lock_Status(Manager_Information : in Information) return Boolean;
-- Only executes Unlock_Manager if the current state is unlocked
procedure Execute_Unlock(Manager_Information : in out Information;
Pin_Input : in PIN.PIN);
-- Procedure changes state of the Password Manager to Unlocked
procedure Unlock_Manager(Manager_Information : in out Information;
Pin_Input : in PIN.PIN) with
Pre => (IsLocked(Manager_Information)),
Post =>(if PIN."="(GetMasterPin(Manager_Information), Pin_Input)
then IsLocked(Manager_Information) = False);
-- Only executes Lock_Manager if the current state is unlocked
procedure Execute_Lock(Manager_Information : in out Information;
Pin_Input : in PIN.PIN);
-- Procedure changes state of the Password Manager to Locked
procedure Lock_Manager(Manager_Information : in out Information;
Pin_Input : in PIN.PIN) with
Pre => (IsLocked(Manager_Information) = False),
Post => PIN."="(GetMasterPin(Manager_Information), Pin_Input) and
IsLocked(Manager_Information);
-- Only executes Get Command if requirements are met
procedure Execute_Get_Command(Manager_Information : in Information;
Input_Url : in PasswordDatabase.URL);
-- Get Command executed
procedure Get_Database(Manager_Information : in Information;
Input_Url : in PasswordDatabase.URL) with
Pre => (IsLocked(Manager_Information) = False
and PasswordDatabase.Has_Password_For
(GetDatabase(Manager_Information), Input_Url));
-- Only executes Put Command if requirements are met
procedure Execute_Put_Command(Manager_Information : in out Information;
Input_Url : in PasswordDatabase.URL;
Input_Pwd : in PasswordDatabase.Password);
-- Put Command executed
procedure Put_Database(Manager_Information : in out Information;
Input_Url : in PasswordDatabase.URL;
Input_Pwd : in PasswordDatabase.Password) with
Pre => (IsLocked(Manager_Information) = False and
StoredDatabaseLength(Manager_Information)
< PasswordDatabase.Max_Entries);
-- Only executes Rem Command if requirements are met
procedure Execute_Rem_Command(Manager_Information : in out Information;
Input_Url : in PasswordDatabase.URL);
-- Rem Command executed
procedure Rem_Database(Manager_Information : in out Information;
Input_Url : in PasswordDatabase.URL) with
Pre => (IsLocked(Manager_Information) = False and
PasswordDatabase.Has_Password_For
(GetDatabase(Manager_Information), Input_Url));
private
-- Password Manager is Record which encapsulates
-- Locked status, Master Pin and Master Database
type Information is record
Is_Locked : Boolean;
Master_Pin : PIN.PIN;
Master_Database : PasswordDatabase.Database;
end record;
-- private function declarations
function GetMasterPin(Manager_Information: in Information) return PIN.PIN is
(Manager_Information.Master_Pin);
function StoredDatabaseLength(Manager_Information : in Information)
return Ada.Containers.Count_Type is
(PasswordDatabase.Length(Manager_Information.Master_Database));
function GetDatabase(Manager_Information: in Information)
return PasswordDatabase.Database is
(Manager_Information.Master_Database);
function IsLocked(Manager_Information: in Information) return Boolean is
(Manager_Information.Is_Locked);
end PasswordManager;
|
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Web Framework --
-- --
-- Tools Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2015, 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 Asis;
with Engines.Contexts;
with League.Strings;
package Properties.Expressions.Function_Calls is
function Code
(Engine : access Engines.Contexts.Context;
Element : Asis.Expression;
Name : Engines.Text_Property) return League.Strings.Universal_String;
function Call_Convention
(Engine : access Engines.Contexts.Context;
Element : Asis.Declaration;
Name : Engines.Convention_Property)
return Engines.Convention_Kind;
end Properties.Expressions.Function_Calls;
|
# Turns capslock off
ifj caps turn_off
goto off_done
:turn_off
toggle caps
:off_done
# Turn light on depending on caps state
:light_off
light off
goto loop
:light_on
light on
:loop
wait 100
ifj caps light_on
goto light_off
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- A D A . S T R I N G S . W I D E _ W I D E _ S E A R C H --
-- --
-- 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. --
-- --
-- As a special exception, if other files instantiate generics from this --
-- unit, or you link this unit with other files to produce an executable, --
-- this unit does not by itself cause the resulting executable to be --
-- covered by the GNU General Public License. This exception does not --
-- however invalidate any other reasons why the executable file might be --
-- covered by the GNU Public License. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- This package contains search functions from Ada.Strings.Wide_Wide_Fixed.
-- They are separated because Ada.Strings.Wide_Wide_Bounded shares these
-- search functions with Ada.Strings.Wide_Wide_Unbounded, and we don't want
-- to drag other irrelevant stuff from Ada.Strings.Wide_Wide_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.Wide_Wide_Maps;
private package Ada.Strings.Wide_Wide_Search is
pragma Preelaborate;
function Index
(Source : Wide_Wide_String;
Pattern : Wide_Wide_String;
Going : Direction := Forward;
Mapping : Wide_Wide_Maps.Wide_Wide_Character_Mapping :=
Wide_Wide_Maps.Identity) return Natural;
function Index
(Source : Wide_Wide_String;
Pattern : Wide_Wide_String;
Going : Direction := Forward;
Mapping : Wide_Wide_Maps.Wide_Wide_Character_Mapping_Function)
return Natural;
function Index
(Source : Wide_Wide_String;
Set : Wide_Wide_Maps.Wide_Wide_Character_Set;
Test : Membership := Inside;
Going : Direction := Forward) return Natural;
function Index
(Source : Wide_Wide_String;
Pattern : Wide_Wide_String;
From : Positive;
Going : Direction := Forward;
Mapping : Wide_Wide_Maps.Wide_Wide_Character_Mapping :=
Wide_Wide_Maps.Identity)
return Natural;
function Index
(Source : Wide_Wide_String;
Pattern : Wide_Wide_String;
From : Positive;
Going : Direction := Forward;
Mapping : Wide_Wide_Maps.Wide_Wide_Character_Mapping_Function)
return Natural;
function Index
(Source : Wide_Wide_String;
Set : Wide_Wide_Maps.Wide_Wide_Character_Set;
From : Positive;
Test : Membership := Inside;
Going : Direction := Forward) return Natural;
function Index_Non_Blank
(Source : Wide_Wide_String;
Going : Direction := Forward) return Natural;
function Index_Non_Blank
(Source : Wide_Wide_String;
From : Positive;
Going : Direction := Forward) return Natural;
function Count
(Source : Wide_Wide_String;
Pattern : Wide_Wide_String;
Mapping : Wide_Wide_Maps.Wide_Wide_Character_Mapping :=
Wide_Wide_Maps.Identity)
return Natural;
function Count
(Source : Wide_Wide_String;
Pattern : Wide_Wide_String;
Mapping : Wide_Wide_Maps.Wide_Wide_Character_Mapping_Function)
return Natural;
function Count
(Source : Wide_Wide_String;
Set : Wide_Wide_Maps.Wide_Wide_Character_Set) return Natural;
procedure Find_Token
(Source : Wide_Wide_String;
Set : Wide_Wide_Maps.Wide_Wide_Character_Set;
Test : Membership;
First : out Positive;
Last : out Natural);
end Ada.Strings.Wide_Wide_Search;
|
------------------------------------------------------------------------------
-- --
-- GNAT LIBRARY COMPONENTS --
-- --
-- G N A T . M D 5 --
-- --
-- S p e c --
-- --
-- Copyright (C) 2009-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. --
-- --
------------------------------------------------------------------------------
-- This package implements the MD5 Message-Digest Algorithm as described in
-- RFC 1321. The complete text of RFC 1321 can be found at:
-- http://www.ietf.org/rfc/rfc1321.txt
-- See the declaration of GNAT.Secure_Hashes.H in g-sechas.ads for complete
-- documentation.
with GNAT.Secure_Hashes.MD5;
with System;
package GNAT.MD5 is new GNAT.Secure_Hashes.H
(Block_Words => GNAT.Secure_Hashes.MD5.Block_Words,
State_Words => 4,
Hash_Words => 4,
Hash_Bit_Order => System.Low_Order_First,
Hash_State => GNAT.Secure_Hashes.MD5.Hash_State,
Initial_State => GNAT.Secure_Hashes.MD5.Initial_State,
Transform => GNAT.Secure_Hashes.MD5.Transform);
|
-----------------------------------------------------------------------
-- keystore-gpg_tests -- Test AKT with GPG2
-- 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 Ada.Strings.Unbounded;
with Util.Tests;
package Keystore.GPG_Tests is
procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite);
type Test is new Util.Tests.Test with null record;
-- Test the akt keystore creation.
procedure Test_Create (T : in out Test);
-- Test the akt keystore for several users each having their own GPG key.
procedure Test_Create_Multi_User (T : in out Test);
-- Test the akt info command on the GPG protected keystore.
procedure Test_Info (T : in out Test);
-- Test the akt password-add command to add a GPG key to a keystore.
procedure Test_Add_Password (T : in out Test);
-- Test the akt password-remove command to remove a GPG key from the keystore.
procedure Test_Remove_Password (T : in out Test);
-- Test update content with store command
procedure Test_Update_File (T : in out Test);
procedure Execute (T : in out Test;
Command : in String;
Input : in String;
Output : in String;
Result : out Ada.Strings.Unbounded.Unbounded_String;
Status : in Natural := 0);
procedure Execute (T : in out Test;
Command : in String;
Result : out Ada.Strings.Unbounded.Unbounded_String;
Status : in Natural := 0);
procedure Execute (T : in out Test;
Command : in String;
Expect : in String;
Status : in Natural := 0);
end Keystore.GPG_Tests;
|
With
NSO.Helpers,
Ada.Text_IO,
Config, INI,
GNAT.Sockets.Server,
GNAT.Sockets.SMTP.Client.Synchronous;
Procedure Send_Report(Text : String:= ""; Params : INI.Instance:= INI.Empty) is
use all type GNAT.Sockets.SMTP.Client.Mail;
Use GNAT.Sockets.SMTP.Client, GNAT.Sockets.Server;
DEBUG : Constant Boolean:= False;
EMAIL : Constant Boolean:= True;
Recpipant : Constant String:=
(if DEBUG
then "<efish@nmsu.edu>" -- Developer's e-mail address.
else "report_ops@sp.nso.edu" -- The reporting mail-list; note: SP.NSO.EDU
);
Function Test_Message return String is
Use NSO.Helpers;
CRLF : Constant String := (ASCII.CR, ASCII.LF);
-- Wraps the given text in CRLF.
Function "+"(Text : String) return String is
(CRLF & Text & CRLF) with Inline;
Function "+"(Left, Right: String) return String is
(CRLF & Left & (+Right)) with Inline;
MaxWide: Constant String := "maxwidth: 120em;";
Head : Constant String := HTML_Tag("head", "");
Content: Constant String := HTML_Tag("body", Text, "Style", MaxWide);
-- Prolog : Constant String := "<HTML><head></head><body style=""maxwidth: 120em;"">";
-- Epilog : Constant String := "</body></HTML>";
-- Function As_HTML(HTML_Body : String) return String is
-- ( Prolog & CRLF & HTML_Body & CRLF & Epilog) with Inline;
Begin
Return Result : Constant String := HTML_Tag("HTML", Head + Content) do
--As_HTML(Text) do
if DEBUG then
Ada.Text_IO.Put_Line( Result );
end if;
End return;
End;
Message : Mail renames Create
(Mime => "text/html",
Subject => "EMAIL-REPORT" & (if DEBUG then " [DEBUG]" else ""),
From => "<LVTT@NSO.EDU>",
To => Recpipant,
Contents => Test_Message
-- Cc => ,
-- Bcc => ,
-- Date =>
);
Buffer : Constant := 1024 * 2;
Factory : aliased Connections_Factory;
Server : aliased Connections_Server (Factory'Access, 0);
Client : Connection_Ptr :=
new SMTP_Client
( Listener => Server'Unchecked_Access,
Reply_Length => Buffer,
Input_Size => 80,
Output_Size => Buffer
);
-- This procedure **DOES NOT** work!
Procedure Async_Send is
use type Config.Pascal_String;
Begin
Set_Credentials (SMTP_Client (Client.all),
User => +Config.User,
Password => +Config.Password
);
Send( SMTP_Client (Client.all), Message );
Connect(
Listener => Server,
Client => Client,
Host => +Config.Host,
Port => GNAT.Sockets.SMTP.SMTP_Port
);
end Async_Send;
-- This procedure **WORKS**!!
Procedure Synch_Send is
use GNAT.Sockets.SMTP.Client.Synchronous, Config;
Begin
Send(
Server => Server,
Host => +Config.Host, -- Currently: "mail.nso.edu"
Message => Message,
User => +Config.User, -- User of the mail-system.
Password => +Config.Password, -- Their password.
Timeout => 10.0
);
end Synch_Send;
Begin
if EMAIL and Text /= "" then
Synch_Send;
end if;
End Send_Report;
|
-- SPDX-FileCopyrightText: 2019 Max Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-------------------------------------------------------------
with Program.Elements.Anonymous_Access_Definitions;
with Program.Lexical_Elements;
with Program.Elements.Subtype_Indications;
package Program.Elements.Anonymous_Access_To_Objects is
pragma Pure (Program.Elements.Anonymous_Access_To_Objects);
type Anonymous_Access_To_Object is
limited interface
and Program.Elements.Anonymous_Access_Definitions
.Anonymous_Access_Definition;
type Anonymous_Access_To_Object_Access is
access all Anonymous_Access_To_Object'Class with Storage_Size => 0;
not overriding function Subtype_Indication
(Self : Anonymous_Access_To_Object)
return not null Program.Elements.Subtype_Indications
.Subtype_Indication_Access is abstract;
not overriding function Has_Not_Null
(Self : Anonymous_Access_To_Object)
return Boolean is abstract;
not overriding function Has_All
(Self : Anonymous_Access_To_Object)
return Boolean is abstract;
not overriding function Has_Constant
(Self : Anonymous_Access_To_Object)
return Boolean is abstract;
type Anonymous_Access_To_Object_Text is limited interface;
type Anonymous_Access_To_Object_Text_Access is
access all Anonymous_Access_To_Object_Text'Class with Storage_Size => 0;
not overriding function To_Anonymous_Access_To_Object_Text
(Self : in out Anonymous_Access_To_Object)
return Anonymous_Access_To_Object_Text_Access is abstract;
not overriding function Not_Token
(Self : Anonymous_Access_To_Object_Text)
return Program.Lexical_Elements.Lexical_Element_Access is abstract;
not overriding function Null_Token
(Self : Anonymous_Access_To_Object_Text)
return Program.Lexical_Elements.Lexical_Element_Access is abstract;
not overriding function Access_Token
(Self : Anonymous_Access_To_Object_Text)
return not null Program.Lexical_Elements.Lexical_Element_Access
is abstract;
not overriding function All_Token
(Self : Anonymous_Access_To_Object_Text)
return Program.Lexical_Elements.Lexical_Element_Access is abstract;
not overriding function Constant_Token
(Self : Anonymous_Access_To_Object_Text)
return Program.Lexical_Elements.Lexical_Element_Access is abstract;
end Program.Elements.Anonymous_Access_To_Objects;
|
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- XML Processor --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2014, 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$
------------------------------------------------------------------------------
package body Matreshka.DOM_Document_Fragments is
----------------
-- Enter_Node --
----------------
overriding procedure Enter_Node
(Self : not null access Document_Fragment_Node;
Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class;
Control : in out XML.DOM.Visitors.Traverse_Control) is
begin
Visitor.Enter_Document_Fragment
(XML.DOM.Document_Fragments.DOM_Document_Fragment_Access (Self),
Control);
end Enter_Node;
-------------------
-- Get_Node_Name --
-------------------
overriding function Get_Node_Name
(Self : not null access constant Document_Fragment_Node)
return League.Strings.Universal_String
is
pragma Unreferenced (Self);
begin
return League.Strings.To_Universal_String ("#document-fragment");
end Get_Node_Name;
-------------------
-- Get_Node_Type --
-------------------
overriding function Get_Node_Type
(Self : not null access constant Document_Fragment_Node)
return XML.DOM.Node_Type
is
pragma Unreferenced (Self);
begin
return XML.DOM.Document_Fragment_Node;
end Get_Node_Type;
----------------
-- Leave_Node --
----------------
overriding procedure Leave_Node
(Self : not null access Document_Fragment_Node;
Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class;
Control : in out XML.DOM.Visitors.Traverse_Control) is
begin
Visitor.Leave_Document_Fragment
(XML.DOM.Document_Fragments.DOM_Document_Fragment_Access (Self),
Control);
end Leave_Node;
----------------
-- Visit_Node --
----------------
overriding procedure Visit_Node
(Self : not null access Document_Fragment_Node;
Iterator : in out XML.DOM.Visitors.Abstract_Iterator'Class;
Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class;
Control : in out XML.DOM.Visitors.Traverse_Control) is
begin
Iterator.Visit_Document_Fragment
(Visitor,
XML.DOM.Document_Fragments.DOM_Document_Fragment_Access (Self),
Control);
end Visit_Node;
end Matreshka.DOM_Document_Fragments;
|
------------------------------------------------------------------------------
-- --
-- Copyright (C) 2020, AdaCore --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions are --
-- met: --
-- 1. Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- 2. Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in --
-- the documentation and/or other materials provided with the --
-- distribution. --
-- 3. Neither the name of the copyright holder nor the names of its --
-- contributors may be used to endorse or promote products derived --
-- from this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT --
-- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, --
-- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY --
-- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT --
-- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE --
-- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
package body LSM303AGR is
function To_Axis_Data is new Ada.Unchecked_Conversion (UInt10, Axis_Data);
function Read_Register
(This : LSM303AGR_Accelerometer'Class; Device_Address : I2C_Address;
Register_Addr : Register_Address) return UInt8;
procedure Write_Register
(This : LSM303AGR_Accelerometer'Class; Device_Address : I2C_Address;
Register_Addr : Register_Address; Val : UInt8);
function Check_Device_Id
(This : LSM303AGR_Accelerometer; Device_Address : I2C_Address;
WHO_AM_I_Register : Register_Address; Device_Id : Device_Identifier)
return Boolean;
function To_Multi_Byte_Read_Address
(Register_Addr : Register_Address) return UInt16;
procedure Configure (This : LSM303AGR_Accelerometer; Date_Rate : Data_Rate)
is
CTRLA : CTRL_REG1_A_Register;
begin
CTRLA.Xen := 1;
CTRLA.Yen := 1;
CTRLA.Zen := 1;
CTRLA.LPen := 0;
CTRLA.ODR := Date_Rate'Enum_Rep;
This.Write_Register
(Accelerometer_Address, CTRL_REG1_A, To_UInt8 (CTRLA));
end Configure;
procedure Assert_Status (Status : I2C_Status);
-------------------
-- Read_Register --
-------------------
function Read_Register
(This : LSM303AGR_Accelerometer'Class; Device_Address : I2C_Address;
Register_Addr : Register_Address) return UInt8
is
Data : I2C_Data (1 .. 1);
Status : I2C_Status;
begin
This.Port.Mem_Read
(Addr => Device_Address, Mem_Addr => UInt16 (Register_Addr),
Mem_Addr_Size => Memory_Size_8b, Data => Data, Status => Status);
Assert_Status (Status);
return Data (Data'First);
end Read_Register;
--------------------
-- Write_Register --
--------------------
procedure Write_Register
(This : LSM303AGR_Accelerometer'Class; Device_Address : I2C_Address;
Register_Addr : Register_Address; Val : UInt8)
is
Status : I2C_Status;
begin
This.Port.Mem_Write
(Addr => Device_Address, Mem_Addr => UInt16 (Register_Addr),
Mem_Addr_Size => Memory_Size_8b, Data => (1 => Val),
Status => Status);
Assert_Status (Status);
end Write_Register;
-----------------------------------
-- Check_Accelerometer_Device_Id --
-----------------------------------
function Check_Accelerometer_Device_Id
(This : LSM303AGR_Accelerometer) return Boolean
is
begin
return
Check_Device_Id
(This, Accelerometer_Address, WHO_AM_I_A, Accelerometer_Device_Id);
end Check_Accelerometer_Device_Id;
----------------------------------
-- Check_Magnetometer_Device_Id --
----------------------------------
function Check_Magnetometer_Device_Id
(This : LSM303AGR_Accelerometer) return Boolean
is
begin
return
Check_Device_Id
(This, Magnetometer_Address, WHO_AM_I_M, Magnetometer_Device_Id);
end Check_Magnetometer_Device_Id;
---------------------
-- Check_Device_Id --
---------------------
function Check_Device_Id
(This : LSM303AGR_Accelerometer; Device_Address : I2C_Address;
WHO_AM_I_Register : Register_Address; Device_Id : Device_Identifier)
return Boolean
is
begin
return
Read_Register (This, Device_Address, WHO_AM_I_Register) =
UInt8 (Device_Id);
end Check_Device_Id;
------------------------
-- Read_Accelerometer --
------------------------
function Read_Accelerometer
(This : LSM303AGR_Accelerometer) return All_Axes_Data
is
-------------
-- Convert --
-------------
function Convert (Low, High : UInt8) return Axis_Data;
function Convert (Low, High : UInt8) return Axis_Data is
Tmp : UInt10;
begin
-- TODO: support HiRes and LoPow modes
-- in conversion.
Tmp := UInt10 (Shift_Right (Low, 6));
Tmp := Tmp or UInt10 (High) * 2**2;
return To_Axis_Data (Tmp);
end Convert;
Status : I2C_Status;
Data : I2C_Data (1 .. 6) := (others => 0);
AxisData : All_Axes_Data := (X => 0, Y => 0, Z => 0);
begin
This.Port.Mem_Read
(Addr => Accelerometer_Address,
Mem_Addr => To_Multi_Byte_Read_Address (OUT_X_L_A),
Mem_Addr_Size => Memory_Size_8b, Data => Data, Status => Status);
Assert_Status (Status);
-- LSM303AGR has its X-axis in the opposite direction
-- of the MMA8653FCR1 sensor.
AxisData.X := Convert (Data (1), Data (2)) * Axis_Data (-1);
AxisData.Y := Convert (Data (3), Data (4));
AxisData.Z := Convert (Data (5), Data (6));
return AxisData;
end Read_Accelerometer;
function To_Multi_Byte_Read_Address
(Register_Addr : Register_Address) return UInt16
-- Based on the i2c behavior of the sensor p.38,
-- high MSB address allows reading multiple bytes
-- from slave devices.
is
begin
return UInt16 (Register_Addr) or MULTI_BYTE_READ;
end To_Multi_Byte_Read_Address;
procedure Assert_Status (Status : I2C_Status) is
begin
if Status /= Ok then
-- No error handling...
raise Program_Error;
end if;
end Assert_Status;
end LSM303AGR;
|
-----------------------------------------------------------------------
-- awa-blogs-tests -- Unit tests for blogs module
-- Copyright (C) 2011, 2012, 2013 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 Util.Tests;
with AWA.Tests;
package AWA.Blogs.Modules.Tests is
procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite);
type Test is new AWA.Tests.Test with null record;
-- Test creation of blog by simulating web requests.
procedure Test_Create_Blog (T : in out Test);
-- Test creating and updating of a blog post
procedure Test_Create_Post (T : in out Test);
end AWA.Blogs.Modules.Tests;
|
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Web Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2015-2018, 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 League.Strings;
with Servlet.HTTP_Sessions;
package Spikedog.HTTP_Session_Managers is
pragma Preelaborate;
type HTTP_Session_Manager is limited interface;
type HTTP_Session_Manager_Access is access all HTTP_Session_Manager'Class;
not overriding function Is_Session_Identifier_Valid
(Self : HTTP_Session_Manager;
Identifier : League.Strings.Universal_String) return Boolean is abstract;
-- Returns True when given session identifier is valid (it can be processed
-- by session manager, but not necessary points to any active session).
not overriding function Get_Session
(Self : in out HTTP_Session_Manager;
Identifier : League.Strings.Universal_String)
return access Servlet.HTTP_Sessions.HTTP_Session'Class is abstract;
-- Returns session this specified identifier, or null when session with
-- given identifier is not known. When session is found its last access
-- time attribute is updated to current time.
not overriding function New_Session
(Self : in out HTTP_Session_Manager)
return access Servlet.HTTP_Sessions.HTTP_Session'Class is abstract;
not overriding procedure Change_Session_Id
(Self : in out HTTP_Session_Manager;
Session : not null access Servlet.HTTP_Sessions.HTTP_Session'Class)
is abstract;
-- Changes session identifier for given session.
end Spikedog.HTTP_Session_Managers;
|
-- CC1004A.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.
--*
-- OBJECTIVE:
-- CHECK THAT THE ELABORATION OF A GENERIC DECLARATION
-- DOES NOT ELABORATE THE SUBPROGRAM OR PACKAGE SPECIFICATION.
-- HISTORY:
-- DAT 07/31/81 CREATED ORIGINAL TEST.
-- SPS 10/18/82
-- SPS 02/09/83
-- JET 01/07/88 UPDATED HEADER FORMAT AND ADDED CODE TO
-- PREVENT OPTIMIZATION.
WITH REPORT; USE REPORT;
PROCEDURE CC1004A IS
BEGIN
TEST ("CC1004A", "THE SPECIFICATION PART OF A GENERIC " &
"SUBPROGRAM IS NOT ELABORATED AT THE " &
"ELABORATION OF THE DECLARATION");
BEGIN
DECLARE
SUBTYPE I1 IS INTEGER RANGE 1 .. 1;
GENERIC
PROCEDURE PROC (P1: I1 := IDENT_INT(2));
PROCEDURE PROC (P1: I1 := IDENT_INT(2)) IS
BEGIN
IF NOT EQUAL (P1,P1) THEN
COMMENT ("DON'T OPTIMIZE THIS");
END IF;
END PROC;
BEGIN
BEGIN
DECLARE
PROCEDURE P IS NEW PROC;
BEGIN
IF NOT EQUAL(3,3) THEN
P(1);
END IF;
END;
EXCEPTION
WHEN OTHERS =>
FAILED ("INSTANTIATION ELABORATES SPEC");
END;
END;
EXCEPTION
WHEN OTHERS =>
FAILED ("DECL ELABORATED SPEC PART - 1");
END;
BEGIN
DECLARE
SUBTYPE I1 IS INTEGER RANGE 1 .. 1;
GENERIC
PACKAGE PKG IS
X : INTEGER := I1(IDENT_INT(2));
END PKG;
BEGIN
BEGIN
DECLARE
PACKAGE P IS NEW PKG;
BEGIN
FAILED ("PACKAGE INSTANTIATION FAILED");
IF NOT EQUAL(P.X,P.X) THEN
COMMENT("DON'T OPTIMIZE THIS");
END IF;
END;
EXCEPTION
WHEN CONSTRAINT_ERROR => NULL;
WHEN OTHERS => FAILED ("WRONG EXCEPTION - 2");
END;
END;
EXCEPTION
WHEN OTHERS =>
FAILED ("DECL ELABORATED SPEC PART - 2");
END;
RESULT;
END CC1004A;
|
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE boost_serialization>
<boost_serialization signature="serialization::archive" version="14">
<syndb class_id="0" tracking_level="0" version="0">
<userIPLatency>-1</userIPLatency>
<userIPName></userIPName>
<cdfg class_id="1" tracking_level="1" version="0" object_id="_0">
<name>hls_target</name>
<ret_bitwidth>0</ret_bitwidth>
<ports class_id="2" tracking_level="0" version="0">
<count>4</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>hw_input_V_value_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>hw_input.V.value.V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>32</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>hw_input_V_last_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>hw_input.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="_3">
<Value>
<Obj>
<type>1</type>
<id>3</id>
<name>hw_output_V_value_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>hw_output.V.value.V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>32</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="_4">
<Value>
<Obj>
<type>1</type>
<id>4</id>
<name>hw_output_V_last_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>hw_output.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>
</ports>
<nodes class_id="8" tracking_level="0" version="0">
<count>4</count>
<item_version>0</item_version>
<item class_id="9" tracking_level="1" version="0" object_id="_5">
<Value>
<Obj>
<type>0</type>
<id>11</id>
<name>p_hw_input_stencil_st</name>
<fileName>hls_target.cpp</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_shifts/conv2d</fileDirectory>
<lineNumber>57</lineNumber>
<contextFuncName>hls_target</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item class_id="10" tracking_level="0" version="0">
<first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_shifts/conv2d</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>hls_target.cpp</first>
<second>hls_target</second>
</first>
<second>57</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>_hw_input_stencil_stream.V.value.V</originalName>
<rtlName></rtlName>
<coreName>FIFO_SRL</coreName>
</Obj>
<bitwidth>288</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>22</item>
</oprand_edges>
<opcode>alloca</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_6">
<Value>
<Obj>
<type>0</type>
<id>17</id>
<name></name>
<fileName>hls_target.cpp</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_shifts/conv2d</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>hls_target</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_shifts/conv2d</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>hls_target.cpp</first>
<second>hls_target</second>
</first>
<second>61</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>4</count>
<item_version>0</item_version>
<item>24</item>
<item>25</item>
<item>26</item>
<item>27</item>
</oprand_edges>
<opcode>call</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_7">
<Value>
<Obj>
<type>0</type>
<id>18</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>6</count>
<item_version>0</item_version>
<item>29</item>
<item>30</item>
<item>31</item>
<item>32</item>
<item>136</item>
<item>137</item>
</oprand_edges>
<opcode>call</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_8">
<Value>
<Obj>
<type>0</type>
<id>19</id>
<name></name>
<fileName>hls_target.cpp</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_shifts/conv2d</fileDirectory>
<lineNumber>159</lineNumber>
<contextFuncName>hls_target</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_shifts/conv2d</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>hls_target.cpp</first>
<second>hls_target</second>
</first>
<second>159</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>
</item>
</nodes>
<consts class_id="15" tracking_level="0" version="0">
<count>3</count>
<item_version>0</item_version>
<item class_id="16" tracking_level="1" version="0" object_id="_9">
<Value>
<Obj>
<type>2</type>
<id>21</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="_10">
<Value>
<Obj>
<type>2</type>
<id>23</id>
<name>linebuffer_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:linebuffer.1></content>
</item>
<item class_id_reference="16" object_id="_11">
<Value>
<Obj>
<type>2</type>
<id>28</id>
<name>Loop_1_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:Loop_1_proc></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="_12">
<Obj>
<type>3</type>
<id>20</id>
<name>hls_target</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<node_objs>
<count>4</count>
<item_version>0</item_version>
<item>11</item>
<item>17</item>
<item>18</item>
<item>19</item>
</node_objs>
</item>
</blocks>
<edges class_id="19" tracking_level="0" version="0">
<count>11</count>
<item_version>0</item_version>
<item class_id="20" tracking_level="1" version="0" object_id="_13">
<id>22</id>
<edge_type>1</edge_type>
<source_obj>21</source_obj>
<sink_obj>11</sink_obj>
</item>
<item class_id_reference="20" object_id="_14">
<id>24</id>
<edge_type>1</edge_type>
<source_obj>23</source_obj>
<sink_obj>17</sink_obj>
</item>
<item class_id_reference="20" object_id="_15">
<id>25</id>
<edge_type>1</edge_type>
<source_obj>1</source_obj>
<sink_obj>17</sink_obj>
</item>
<item class_id_reference="20" object_id="_16">
<id>26</id>
<edge_type>1</edge_type>
<source_obj>2</source_obj>
<sink_obj>17</sink_obj>
</item>
<item class_id_reference="20" object_id="_17">
<id>27</id>
<edge_type>1</edge_type>
<source_obj>11</source_obj>
<sink_obj>17</sink_obj>
</item>
<item class_id_reference="20" object_id="_18">
<id>29</id>
<edge_type>1</edge_type>
<source_obj>28</source_obj>
<sink_obj>18</sink_obj>
</item>
<item class_id_reference="20" object_id="_19">
<id>30</id>
<edge_type>1</edge_type>
<source_obj>11</source_obj>
<sink_obj>18</sink_obj>
</item>
<item class_id_reference="20" object_id="_20">
<id>31</id>
<edge_type>1</edge_type>
<source_obj>3</source_obj>
<sink_obj>18</sink_obj>
</item>
<item class_id_reference="20" object_id="_21">
<id>32</id>
<edge_type>1</edge_type>
<source_obj>4</source_obj>
<sink_obj>18</sink_obj>
</item>
<item class_id_reference="20" object_id="_22">
<id>136</id>
<edge_type>4</edge_type>
<source_obj>17</source_obj>
<sink_obj>18</sink_obj>
</item>
<item class_id_reference="20" object_id="_23">
<id>137</id>
<edge_type>4</edge_type>
<source_obj>17</source_obj>
<sink_obj>18</sink_obj>
</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="_24">
<mId>1</mId>
<mTag>hls_target</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>20</item>
</basic_blocks>
<mII>-1</mII>
<mDepth>-1</mDepth>
<mMinTripCount>-1</mMinTripCount>
<mMaxTripCount>-1</mMaxTripCount>
<mMinLatency>2077921</mMinLatency>
<mMaxLatency>-1</mMaxLatency>
<mIsDfPipe>1</mIsDfPipe>
<mDfPipe class_id="23" tracking_level="1" version="0" object_id="_25">
<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>2</count>
<item_version>0</item_version>
<item class_id="26" tracking_level="1" version="0" object_id="_26">
<type>0</type>
<name>linebuffer_1_U0</name>
<ssdmobj_id>17</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="_27">
<port class_id="29" tracking_level="1" version="0" object_id="_28">
<name>in_axi_stream_V_value_V</name>
<dir>3</dir>
<type>0</type>
</port>
<inst class_id="30" tracking_level="1" version="0" object_id="_29">
<type>0</type>
<name>linebuffer_1_U0</name>
<ssdmobj_id>17</ssdmobj_id>
</inst>
</item>
<item class_id_reference="28" object_id="_30">
<port class_id_reference="29" object_id="_31">
<name>in_axi_stream_V_last_V</name>
<dir>3</dir>
<type>0</type>
</port>
<inst class_id_reference="30" object_id_reference="_29"></inst>
</item>
<item class_id_reference="28" object_id="_32">
<port class_id_reference="29" object_id="_33">
<name>out_stream_V_value_V</name>
<dir>0</dir>
<type>1</type>
</port>
<inst class_id_reference="30" object_id_reference="_29"></inst>
</item>
</pins>
</item>
<item class_id_reference="26" object_id="_34">
<type>0</type>
<name>Loop_1_proc_U0</name>
<ssdmobj_id>18</ssdmobj_id>
<pins>
<count>3</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_35">
<port class_id_reference="29" object_id="_36">
<name>p_hw_input_stencil_stream_V_value_V</name>
<dir>0</dir>
<type>0</type>
</port>
<inst class_id_reference="30" object_id="_37">
<type>0</type>
<name>Loop_1_proc_U0</name>
<ssdmobj_id>18</ssdmobj_id>
</inst>
</item>
<item class_id_reference="28" object_id="_38">
<port class_id_reference="29" object_id="_39">
<name>hw_output_V_value_V</name>
<dir>3</dir>
<type>1</type>
</port>
<inst class_id_reference="30" object_id_reference="_37"></inst>
</item>
<item class_id_reference="28" object_id="_40">
<port class_id_reference="29" object_id="_41">
<name>hw_output_V_last_V</name>
<dir>3</dir>
<type>1</type>
</port>
<inst class_id_reference="30" object_id_reference="_37"></inst>
</item>
</pins>
</item>
</process_list>
<channel_list class_id="31" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="32" tracking_level="1" version="0" object_id="_42">
<type>1</type>
<name>p_hw_input_stencil_st</name>
<ssdmobj_id>11</ssdmobj_id>
<ctype>0</ctype>
<depth>1</depth>
<bitwidth>288</bitwidth>
<source class_id_reference="28" object_id="_43">
<port class_id_reference="29" object_id="_44">
<name>in</name>
<dir>3</dir>
<type>0</type>
</port>
<inst class_id_reference="30" object_id_reference="_29"></inst>
</source>
<sink class_id_reference="28" object_id="_45">
<port class_id_reference="29" object_id="_46">
<name>out</name>
<dir>3</dir>
<type>1</type>
</port>
<inst class_id_reference="30" object_id_reference="_37"></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="34" tracking_level="1" version="0" object_id="_47">
<states class_id="35" tracking_level="0" version="0">
<count>4</count>
<item_version>0</item_version>
<item class_id="36" tracking_level="1" version="0" object_id="_48">
<id>1</id>
<operations class_id="37" tracking_level="0" version="0">
<count>2</count>
<item_version>0</item_version>
<item class_id="38" tracking_level="1" version="0" object_id="_49">
<id>11</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="38" object_id="_50">
<id>17</id>
<stage>2</stage>
<latency>2</latency>
</item>
</operations>
</item>
<item class_id_reference="36" object_id="_51">
<id>2</id>
<operations>
<count>1</count>
<item_version>0</item_version>
<item class_id_reference="38" object_id="_52">
<id>17</id>
<stage>1</stage>
<latency>2</latency>
</item>
</operations>
</item>
<item class_id_reference="36" object_id="_53">
<id>3</id>
<operations>
<count>1</count>
<item_version>0</item_version>
<item class_id_reference="38" object_id="_54">
<id>18</id>
<stage>2</stage>
<latency>2</latency>
</item>
</operations>
</item>
<item class_id_reference="36" object_id="_55">
<id>4</id>
<operations>
<count>13</count>
<item_version>0</item_version>
<item class_id_reference="38" object_id="_56">
<id>5</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="38" object_id="_57">
<id>6</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="38" object_id="_58">
<id>7</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="38" object_id="_59">
<id>8</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="38" object_id="_60">
<id>9</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="38" object_id="_61">
<id>10</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="38" object_id="_62">
<id>12</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="38" object_id="_63">
<id>13</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="38" object_id="_64">
<id>14</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="38" object_id="_65">
<id>15</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="38" object_id="_66">
<id>16</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="38" object_id="_67">
<id>18</id>
<stage>1</stage>
<latency>2</latency>
</item>
<item class_id_reference="38" object_id="_68">
<id>19</id>
<stage>1</stage>
<latency>1</latency>
</item>
</operations>
</item>
</states>
<transitions class_id="39" tracking_level="0" version="0">
<count>3</count>
<item_version>0</item_version>
<item class_id="40" tracking_level="1" version="0" object_id="_69">
<inState>1</inState>
<outState>2</outState>
<condition class_id="41" tracking_level="0" version="0">
<id>0</id>
<sop class_id="42" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="43" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</item>
</sop>
</condition>
</item>
<item class_id_reference="40" object_id="_70">
<inState>2</inState>
<outState>3</outState>
<condition>
<id>1</id>
<sop>
<count>1</count>
<item_version>0</item_version>
<item>
<count>0</count>
<item_version>0</item_version>
</item>
</sop>
</condition>
</item>
<item class_id_reference="40" object_id="_71">
<inState>3</inState>
<outState>4</outState>
<condition>
<id>2</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="-1"></res>
<node_label_latency class_id="45" tracking_level="0" version="0">
<count>4</count>
<item_version>0</item_version>
<item class_id="46" tracking_level="0" version="0">
<first>11</first>
<second class_id="47" tracking_level="0" version="0">
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>17</first>
<second>
<first>0</first>
<second>1</second>
</second>
</item>
<item>
<first>18</first>
<second>
<first>2</first>
<second>1</second>
</second>
</item>
<item>
<first>19</first>
<second>
<first>3</first>
<second>0</second>
</second>
</item>
</node_label_latency>
<bblk_ent_exit class_id="48" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="49" tracking_level="0" version="0">
<first>20</first>
<second class_id="50" tracking_level="0" version="0">
<first>0</first>
<second>3</second>
</second>
</item>
</bblk_ent_exit>
<regions class_id="51" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="52" tracking_level="1" version="0" object_id="_72">
<region_name>hls_target</region_name>
<basic_blocks>
<count>1</count>
<item_version>0</item_version>
<item>20</item>
</basic_blocks>
<nodes>
<count>15</count>
<item_version>0</item_version>
<item>5</item>
<item>6</item>
<item>7</item>
<item>8</item>
<item>9</item>
<item>10</item>
<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>
</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="53" tracking_level="0" version="0">
<count>3</count>
<item_version>0</item_version>
<item class_id="54" tracking_level="0" version="0">
<first>48</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>11</item>
</second>
</item>
<item>
<first>52</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>17</item>
<item>17</item>
</second>
</item>
<item>
<first>61</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>18</item>
<item>18</item>
</second>
</item>
</dp_fu_nodes>
<dp_fu_nodes_expression class_id="56" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="57" tracking_level="0" version="0">
<first>p_hw_input_stencil_st_fu_48</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>11</item>
</second>
</item>
</dp_fu_nodes_expression>
<dp_fu_nodes_module>
<count>2</count>
<item_version>0</item_version>
<item>
<first>grp_Loop_1_proc_fu_61</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>18</item>
<item>18</item>
</second>
</item>
<item>
<first>grp_linebuffer_1_fu_52</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>17</item>
<item>17</item>
</second>
</item>
</dp_fu_nodes_module>
<dp_fu_nodes_io>
<count>0</count>
<item_version>0</item_version>
</dp_fu_nodes_io>
<return_ports>
<count>0</count>
<item_version>0</item_version>
</return_ports>
<dp_mem_port_nodes class_id="58" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</dp_mem_port_nodes>
<dp_reg_nodes>
<count>1</count>
<item_version>0</item_version>
<item>
<first>70</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>11</item>
</second>
</item>
</dp_reg_nodes>
<dp_regname_nodes>
<count>1</count>
<item_version>0</item_version>
<item>
<first>p_hw_input_stencil_st_reg_70</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>11</item>
</second>
</item>
</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="59" tracking_level="0" version="0">
<count>4</count>
<item_version>0</item_version>
<item class_id="60" tracking_level="0" version="0">
<first>hw_input_V_last_V</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>call</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>17</item>
</second>
</item>
</second>
</item>
<item>
<first>hw_input_V_value_V</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>call</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>17</item>
</second>
</item>
</second>
</item>
<item>
<first>hw_output_V_last_V</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>call</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>18</item>
</second>
</item>
</second>
</item>
<item>
<first>hw_output_V_value_V</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>call</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>18</item>
</second>
</item>
</second>
</item>
</dp_port_io_nodes>
<port2core class_id="61" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</port2core>
<node2core>
<count>1</count>
<item_version>0</item_version>
<item class_id="62" tracking_level="0" version="0">
<first>11</first>
<second>FIFO_SRL</second>
</item>
</node2core>
</syndb>
</boost_serialization>
|
-- Copyright 2021 Jeff Foley. All rights reserved.
-- Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
name = "Searchcode"
type = "scrape"
function start()
set_rate_limit(2)
end
function vertical(ctx, domain)
for i=0,20 do
local page, err = request(ctx, {url=build_url(domain, i)})
if (err ~= nil and err ~= "") then
log(ctx, "vertical request to service failed: " .. err)
break
end
page = page:gsub("<strong>", "")
local ok = find_names(ctx, page, domain)
if not ok then
break
end
check_rate_limit()
end
end
function build_url(domain, pagenum)
return "https://searchcode.com/?q=." .. domain .. "&p=" .. pagenum
end
function find_names(ctx, content, domain)
local names = find(content, subdomain_regex)
if (names == nil or #names == 0) then
return false
end
local found = false
for _, name in pairs(names) do
if in_scope(ctx, name) then
found = true
new_name(ctx, name)
end
end
if not found then
return false
end
return true
end
|
-----------------------------------------------------------------------
-- awa-events-dispatchers-actions -- Event dispatcher to Ada bean actions
-- 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.Strings.Unbounded;
with Ada.Exceptions;
with Util.Beans.Objects;
with Util.Beans.Basic;
with Util.Log.Loggers;
with EL.Contexts;
with EL.Contexts.Default;
with EL.Variables;
with EL.Variables.Default;
with ASF.Beans;
with ASF.Requests;
with ASF.Sessions;
with AWA.Events.Action_Method;
package body AWA.Events.Dispatchers.Actions is
use Ada.Strings.Unbounded;
use Util.Log;
Log : constant Loggers.Logger := Loggers.Create ("AWA.Events.Dispatchers.Actions");
-- ------------------------------
-- Dispatch the event identified by <b>Event</b>.
-- The event actions which are associated with the event are executed synchronously.
-- ------------------------------
procedure Dispatch (Manager : in Action_Dispatcher;
Event : in Module_Event'Class) is
use Util.Beans.Objects;
-- Dispatch the event to the event action identified by <b>Action</b>.
procedure Dispatch_One (Action : in Event_Action);
type Event_Bean is new Util.Beans.Basic.Readonly_Bean with null record;
overriding
function Get_Value (From : in Event_Bean;
Name : in String) return Util.Beans.Objects.Object;
-- ------------------------------
-- Get the value identified by the name.
-- If the name cannot be found, the method should return the Null object.
-- ------------------------------
overriding
function Get_Value (From : in Event_Bean;
Name : in String) return Util.Beans.Objects.Object is
pragma Unreferenced (From);
begin
return Event.Get_Value (Name);
end Get_Value;
Variables : aliased EL.Variables.Default.Default_Variable_Mapper;
-- ------------------------------
-- Default Resolver
-- ------------------------------
type Event_ELResolver is limited new EL.Contexts.ELResolver with record
Request : ASF.Requests.Request_Access;
Application : AWA.Applications.Application_Access;
end record;
overriding
function Get_Value (Resolver : Event_ELResolver;
Context : EL.Contexts.ELContext'Class;
Base : access Util.Beans.Basic.Readonly_Bean'Class;
Name : Unbounded_String) return Util.Beans.Objects.Object;
overriding
procedure Set_Value (Resolver : in out Event_ELResolver;
Context : in EL.Contexts.ELContext'Class;
Base : access Util.Beans.Basic.Bean'Class;
Name : in Unbounded_String;
Value : in Util.Beans.Objects.Object);
-- ------------------------------
-- Get the value associated with a base object and a given property.
-- ------------------------------
overriding
function Get_Value (Resolver : Event_ELResolver;
Context : EL.Contexts.ELContext'Class;
Base : access Util.Beans.Basic.Readonly_Bean'Class;
Name : Unbounded_String) return Util.Beans.Objects.Object is
use Util.Beans.Basic;
use EL.Variables;
use type ASF.Requests.Request_Access;
Result : Object;
Bean : Util.Beans.Basic.Readonly_Bean_Access;
Scope : ASF.Beans.Scope_Type;
Key : constant String := To_String (Name);
begin
if Base /= null then
return Base.Get_Value (Key);
end if;
if Resolver.Request /= null then
Result := Resolver.Request.Get_Attribute (Key);
if not Util.Beans.Objects.Is_Null (Result) then
return Result;
end if;
-- If there is a session, look if the attribute is defined there.
declare
Session : constant ASF.Sessions.Session := Resolver.Request.Get_Session;
begin
if Session.Is_Valid then
Result := Session.Get_Attribute (Key);
if not Util.Beans.Objects.Is_Null (Result) then
return Result;
end if;
end if;
end;
end if;
Resolver.Application.Create (Name, Context, Bean, Scope);
if Bean = null then
return Resolver.Application.Get_Global (Name, Context);
end if;
Result := To_Object (Bean);
if Resolver.Request /= null then
Resolver.Request.Set_Attribute (Key, Result);
else
Variables.Bind (Key, Result);
end if;
return Result;
end Get_Value;
-- ------------------------------
-- Set the value associated with a base object and a given property.
-- ------------------------------
overriding
procedure Set_Value (Resolver : in out Event_ELResolver;
Context : in EL.Contexts.ELContext'Class;
Base : access Util.Beans.Basic.Bean'Class;
Name : in Unbounded_String;
Value : in Util.Beans.Objects.Object) is
pragma Unreferenced (Context);
use type ASF.Requests.Request_Access;
Key : constant String := To_String (Name);
begin
if Base /= null then
Base.Set_Value (Name => Key, Value => Value);
elsif Resolver.Request /= null then
Resolver.Request.Set_Attribute (Name => Key, Value => Value);
else
Variables.Bind (To_String (Name), Value);
end if;
end Set_Value;
Local_Event : aliased Event_Bean;
Resolver : aliased Event_ELResolver;
ELContext : aliased EL.Contexts.Default.Default_Context;
-- ------------------------------
-- Dispatch the event to the event action identified by <b>Action</b>.
-- ------------------------------
procedure Dispatch_One (Action : in Event_Action) is
use Ada.Exceptions;
Method : EL.Expressions.Method_Info;
begin
Method := Action.Action.Get_Method_Info (Context => ELContext);
if Method.Object.all in Util.Beans.Basic.Bean'Class then
-- If we have a prepare method and the bean provides a Set_Value method,
-- call the preparation method to fill the bean with some values.
EL.Beans.Initialize (Util.Beans.Basic.Bean'Class (Method.Object.all),
Action.Properties,
ELContext);
end if;
-- Execute the specified method on the bean and give it the event object.
AWA.Events.Action_Method.Execute (Method => Method,
Param => Event);
-- If an exception is raised by the action, do not propagate it:
-- o We have to dispatch the event to other actions.
-- o The event may be dispatched asynchronously and there is no handler
-- that could handle such exception
exception
when E : others =>
Log.Error ("Error when executing event action {0}: {1}: {2}",
Action.Action.Get_Expression, Exception_Name (E), Exception_Message (E));
end Dispatch_One;
Pos : Event_Action_Lists.Cursor := Manager.Actions.First;
begin
Resolver.Application := Manager.Application;
ELContext.Set_Resolver (Resolver'Unchecked_Access);
ELContext.Set_Variable_Mapper (Variables'Unchecked_Access);
Variables.Bind (Name => "event",
Value => To_Object (Local_Event'Unchecked_Access, STATIC));
while Event_Action_Lists.Has_Element (Pos) loop
Event_Action_Lists.Query_Element (Pos, Dispatch_One'Access);
Event_Action_Lists.Next (Pos);
end loop;
end Dispatch;
-- ------------------------------
-- Add an action invoked when an event is dispatched through this dispatcher.
-- When the event queue dispatches the event, the Ada bean identified by the method action
-- represented by <b>Action</b> is created and initialized by evaluating and setting the
-- parameters defined in <b>Params</b>. The action method is then invoked.
-- ------------------------------
procedure Add_Action (Manager : in out Action_Dispatcher;
Action : in EL.Expressions.Method_Expression;
Params : in EL.Beans.Param_Vectors.Vector) is
Item : Event_Action;
begin
Item.Action := Action;
Item.Properties := Params;
Manager.Actions.Append (Item);
end Add_Action;
-- ------------------------------
-- Create a new dispatcher associated with the application.
-- ------------------------------
function Create_Dispatcher (Application : in AWA.Applications.Application_Access)
return Dispatcher_Access is
Result : constant Dispatcher_Access := new Action_Dispatcher '(Dispatcher with
Application => Application,
others => <>);
begin
return Result.all'Access;
end Create_Dispatcher;
end AWA.Events.Dispatchers.Actions;
|
-- SPDX-FileCopyrightText: 2019 Max Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-------------------------------------------------------------
package body Program.Nodes.Discrete_Simple_Expression_Ranges is
function Create
(Lower_Bound : not null Program.Elements.Expressions
.Expression_Access;
Double_Dot_Token : not null Program.Lexical_Elements
.Lexical_Element_Access;
Upper_Bound : not null Program.Elements.Expressions
.Expression_Access;
Is_Discrete_Subtype_Definition : Boolean := False)
return Discrete_Simple_Expression_Range is
begin
return Result : Discrete_Simple_Expression_Range :=
(Lower_Bound => Lower_Bound, Double_Dot_Token => Double_Dot_Token,
Upper_Bound => Upper_Bound,
Is_Discrete_Subtype_Definition => Is_Discrete_Subtype_Definition,
Enclosing_Element => null)
do
Initialize (Result);
end return;
end Create;
function Create
(Lower_Bound : not null Program.Elements.Expressions
.Expression_Access;
Upper_Bound : not null Program.Elements.Expressions
.Expression_Access;
Is_Part_Of_Implicit : Boolean := False;
Is_Part_Of_Inherited : Boolean := False;
Is_Part_Of_Instance : Boolean := False;
Is_Discrete_Subtype_Definition : Boolean := False)
return Implicit_Discrete_Simple_Expression_Range is
begin
return Result : Implicit_Discrete_Simple_Expression_Range :=
(Lower_Bound => Lower_Bound, Upper_Bound => Upper_Bound,
Is_Part_Of_Implicit => Is_Part_Of_Implicit,
Is_Part_Of_Inherited => Is_Part_Of_Inherited,
Is_Part_Of_Instance => Is_Part_Of_Instance,
Is_Discrete_Subtype_Definition => Is_Discrete_Subtype_Definition,
Enclosing_Element => null)
do
Initialize (Result);
end return;
end Create;
overriding function Lower_Bound
(Self : Base_Discrete_Simple_Expression_Range)
return not null Program.Elements.Expressions.Expression_Access is
begin
return Self.Lower_Bound;
end Lower_Bound;
overriding function Upper_Bound
(Self : Base_Discrete_Simple_Expression_Range)
return not null Program.Elements.Expressions.Expression_Access is
begin
return Self.Upper_Bound;
end Upper_Bound;
overriding function Is_Discrete_Subtype_Definition
(Self : Base_Discrete_Simple_Expression_Range)
return Boolean is
begin
return Self.Is_Discrete_Subtype_Definition;
end Is_Discrete_Subtype_Definition;
overriding function Double_Dot_Token
(Self : Discrete_Simple_Expression_Range)
return not null Program.Lexical_Elements.Lexical_Element_Access is
begin
return Self.Double_Dot_Token;
end Double_Dot_Token;
overriding function Is_Part_Of_Implicit
(Self : Implicit_Discrete_Simple_Expression_Range)
return Boolean is
begin
return Self.Is_Part_Of_Implicit;
end Is_Part_Of_Implicit;
overriding function Is_Part_Of_Inherited
(Self : Implicit_Discrete_Simple_Expression_Range)
return Boolean is
begin
return Self.Is_Part_Of_Inherited;
end Is_Part_Of_Inherited;
overriding function Is_Part_Of_Instance
(Self : Implicit_Discrete_Simple_Expression_Range)
return Boolean is
begin
return Self.Is_Part_Of_Instance;
end Is_Part_Of_Instance;
procedure Initialize
(Self : in out Base_Discrete_Simple_Expression_Range'Class) is
begin
Set_Enclosing_Element (Self.Lower_Bound, Self'Unchecked_Access);
Set_Enclosing_Element (Self.Upper_Bound, Self'Unchecked_Access);
null;
end Initialize;
overriding function Is_Discrete_Simple_Expression_Range
(Self : Base_Discrete_Simple_Expression_Range)
return Boolean is
pragma Unreferenced (Self);
begin
return True;
end Is_Discrete_Simple_Expression_Range;
overriding function Is_Discrete_Range
(Self : Base_Discrete_Simple_Expression_Range)
return Boolean is
pragma Unreferenced (Self);
begin
return True;
end Is_Discrete_Range;
overriding function Is_Definition
(Self : Base_Discrete_Simple_Expression_Range)
return Boolean is
pragma Unreferenced (Self);
begin
return True;
end Is_Definition;
overriding procedure Visit
(Self : not null access Base_Discrete_Simple_Expression_Range;
Visitor : in out Program.Element_Visitors.Element_Visitor'Class) is
begin
Visitor.Discrete_Simple_Expression_Range (Self);
end Visit;
overriding function To_Discrete_Simple_Expression_Range_Text
(Self : in out Discrete_Simple_Expression_Range)
return Program.Elements.Discrete_Simple_Expression_Ranges
.Discrete_Simple_Expression_Range_Text_Access is
begin
return Self'Unchecked_Access;
end To_Discrete_Simple_Expression_Range_Text;
overriding function To_Discrete_Simple_Expression_Range_Text
(Self : in out Implicit_Discrete_Simple_Expression_Range)
return Program.Elements.Discrete_Simple_Expression_Ranges
.Discrete_Simple_Expression_Range_Text_Access is
pragma Unreferenced (Self);
begin
return null;
end To_Discrete_Simple_Expression_Range_Text;
end Program.Nodes.Discrete_Simple_Expression_Ranges;
|
-- Copyright 2018-2021 Free Software Foundation, Inc.
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
procedure Foo_H731_021 is
Procedure C_Func;
Procedure C_FuncNoDebug;
pragma Import (C, C_Func, "MixedCaseFunc");
pragma Import (C, C_FuncNoDebug, "NoDebugMixedCaseFunc");
begin
C_Func;
C_FuncNoDebug;
end Foo_H731_021;
|
------------------------------------------------------------------------------
-- --
-- Copyright (c) 2016 Vitalij Bondarenko <vibondare@gmail.com> --
-- --
------------------------------------------------------------------------------
-- --
-- The MIT License (MIT) --
-- --
-- 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 Formatted_Output.Integer_Output;
package Formatted_Output_Long_Long_Integer is
new Formatted_Output.Integer_Output (Long_Long_Integer);
|
-- { dg-do run }
-- { dg-options "-gnatws" }
with discr3; use discr3;
with Text_IO; use Text_IO;
procedure Conv_Bug is
begin
begin
V2 := S2 (V1);
exception
when Constraint_Error => null;
when others => Put_Line ("Wrong Exception raised");
end;
begin
V2 := S2(V1(V1'Range));
Put_Line ("No exception raised - 2");
exception
when Constraint_Error => null;
when others => Put_Line ("Wrong Exception raised");
end;
begin
V2 := S2 (V3);
Put_Line ("No exception raised - 3");
exception
when Constraint_Error => null;
when others => Put_Line ("Wrong Exception raised");
end;
end Conv_Bug;
|
limited
with
openGL.Program;
package openGL.Variable.uniform
--
-- Models a uniform variable for shaders.
--
is
type Item is abstract new Variable.item with private;
---------
-- Forge
--
procedure define (Self : in out Item; Program : access openGL.Program.item'class;
Name : in String);
overriding
procedure destroy (Self : in out Item);
-----------
-- Actuals
--
type bool is new Variable.uniform.item with private;
type int is new Variable.uniform.item with private;
type float is new Variable.uniform.item with private;
type vec3 is new Variable.uniform.item with private;
type vec4 is new Variable.uniform.item with private;
type mat3 is new Variable.uniform.item with private;
type mat4 is new Variable.uniform.item with private;
procedure Value_is (Self : in bool; Now : in Boolean);
procedure Value_is (Self : in int; Now : in Integer);
procedure Value_is (Self : in float; Now : in Real);
procedure Value_is (Self : in vec3; Now : in Vector_3);
procedure Value_is (Self : in vec4; Now : in Vector_4);
procedure Value_is (Self : in mat3; Now : in Matrix_3x3);
procedure Value_is (Self : in mat4; Now : in Matrix_4x4);
private
type Item is abstract new openGL.Variable.item with null record;
type bool is new Variable.uniform.item with null record;
type int is new Variable.uniform.item with null record;
type float is new Variable.uniform.item with null record;
type vec3 is new Variable.uniform.item with null record;
type vec4 is new Variable.uniform.item with null record;
type mat3 is new Variable.uniform.item with null record;
type mat4 is new Variable.uniform.item with null record;
end openGL.Variable.uniform;
|
-- Copyright 2014-2015 Free Software Foundation, Inc.
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
package body Pck is
procedure Do_Nothing (A : System.Address) is
begin
null;
end Do_Nothing;
end Pck;
|
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Web Framework --
-- --
-- Tools Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2015, 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 Asis;
with Engines.Contexts;
with League.Strings;
package Properties.Expressions.If_Expression is
function Code
(Engine : access Engines.Contexts.Context;
Element : Asis.Expression;
Name : Engines.Text_Property) return League.Strings.Universal_String;
end Properties.Expressions.If_Expression;
|
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- S W I T C H - B --
-- --
-- S p e c --
-- --
-- Copyright (C) 2001 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 scans binder switches. Note that the body of Usage must be
-- coordinated with the switches that are recognized by this package.
-- The Usage package also acts as the official documentation for the
-- switches that are recognized. In addition, package Debug documents
-- the otherwise undocumented debug switches that are also recognized.
package Switch.B is
procedure Scan_Binder_Switches (Switch_Chars : String);
-- Procedures to scan out binder switches stored in the given string.
-- The first character is known to be a valid switch character, and there
-- are no blanks or other switch terminator characters in the string, so
-- the entire string should consist of valid switch characters, except that
-- an optional terminating NUL character is allowed. A bad switch causes
-- a fatal error exit and control does not return. The call also sets
-- Usage_Requested to True if a ? switch is encountered.
end Switch.B;
|
with DDS.Request_Reply.Replier.Typed_Replier_Generic;
with Dds.Builtin_Octets_DataReader;
with Dds.Builtin_Octets_DataWriter;
package DDS.Request_Reply.Tests.Simple.Octets_Replier is new
DDS.Request_Reply.Replier.Typed_Replier_Generic
(Reply_DataWriter => Dds.Builtin_Octets_DataWriter,
Request_DataReader => Dds.Builtin_Octets_DataReader);
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- A D A . E X C E P T I O N S . L A S T _ C H A N C E _ H A N D L E R --
-- --
-- S p e c --
-- --
-- Copyright (C) 2003 Free Software Foundation, Inc. --
-- --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow --
-- apply solely to the contents of the part following the private keyword. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 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. --
-- --
------------------------------------------------------------------------------
-- Last chance handler. Unhandled exceptions are passed to this
-- routine.
procedure Ada.Exceptions.Last_Chance_Handler
(Except : Exception_Occurrence);
pragma Export (C,
Last_Chance_Handler,
"__gnat_last_chance_handler");
pragma No_Return (Last_Chance_Handler);
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- A D A . S T R I N G S . W I D E _ W I D E _ B O U N D E D --
-- --
-- S p e c --
-- --
-- Copyright (C) 1992-2020, Free Software Foundation, Inc. --
-- --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow --
-- apply solely to the contents of the part following the private keyword. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with Ada.Strings.Wide_Wide_Maps;
with Ada.Strings.Wide_Wide_Superbounded;
package Ada.Strings.Wide_Wide_Bounded is
pragma Preelaborate;
generic
Max : Positive;
-- Maximum length of a Bounded_Wide_Wide_String
package Generic_Bounded_Length is
Max_Length : constant Positive := Max;
type Bounded_Wide_Wide_String is private;
pragma Preelaborable_Initialization (Bounded_Wide_Wide_String);
Null_Bounded_Wide_Wide_String : constant Bounded_Wide_Wide_String;
subtype Length_Range is Natural range 0 .. Max_Length;
function Length (Source : Bounded_Wide_Wide_String) return Length_Range;
--------------------------------------------------------
-- Conversion, Concatenation, and Selection Functions --
--------------------------------------------------------
function To_Bounded_Wide_Wide_String
(Source : Wide_Wide_String;
Drop : Truncation := Error) return Bounded_Wide_Wide_String;
function To_Wide_Wide_String
(Source : Bounded_Wide_Wide_String) return Wide_Wide_String;
procedure Set_Bounded_Wide_Wide_String
(Target : out Bounded_Wide_Wide_String;
Source : Wide_Wide_String;
Drop : Truncation := Error);
pragma Ada_05 (Set_Bounded_Wide_Wide_String);
function Append
(Left : Bounded_Wide_Wide_String;
Right : Bounded_Wide_Wide_String;
Drop : Truncation := Error) return Bounded_Wide_Wide_String;
function Append
(Left : Bounded_Wide_Wide_String;
Right : Wide_Wide_String;
Drop : Truncation := Error) return Bounded_Wide_Wide_String;
function Append
(Left : Wide_Wide_String;
Right : Bounded_Wide_Wide_String;
Drop : Truncation := Error) return Bounded_Wide_Wide_String;
function Append
(Left : Bounded_Wide_Wide_String;
Right : Wide_Wide_Character;
Drop : Truncation := Error) return Bounded_Wide_Wide_String;
function Append
(Left : Wide_Wide_Character;
Right : Bounded_Wide_Wide_String;
Drop : Truncation := Error) return Bounded_Wide_Wide_String;
procedure Append
(Source : in out Bounded_Wide_Wide_String;
New_Item : Bounded_Wide_Wide_String;
Drop : Truncation := Error);
procedure Append
(Source : in out Bounded_Wide_Wide_String;
New_Item : Wide_Wide_String;
Drop : Truncation := Error);
procedure Append
(Source : in out Bounded_Wide_Wide_String;
New_Item : Wide_Wide_Character;
Drop : Truncation := Error);
function "&"
(Left : Bounded_Wide_Wide_String;
Right : Bounded_Wide_Wide_String) return Bounded_Wide_Wide_String;
function "&"
(Left : Bounded_Wide_Wide_String;
Right : Wide_Wide_String) return Bounded_Wide_Wide_String;
function "&"
(Left : Wide_Wide_String;
Right : Bounded_Wide_Wide_String) return Bounded_Wide_Wide_String;
function "&"
(Left : Bounded_Wide_Wide_String;
Right : Wide_Wide_Character) return Bounded_Wide_Wide_String;
function "&"
(Left : Wide_Wide_Character;
Right : Bounded_Wide_Wide_String) return Bounded_Wide_Wide_String;
function Element
(Source : Bounded_Wide_Wide_String;
Index : Positive) return Wide_Wide_Character;
procedure Replace_Element
(Source : in out Bounded_Wide_Wide_String;
Index : Positive;
By : Wide_Wide_Character);
function Slice
(Source : Bounded_Wide_Wide_String;
Low : Positive;
High : Natural) return Wide_Wide_String;
function Bounded_Slice
(Source : Bounded_Wide_Wide_String;
Low : Positive;
High : Natural) return Bounded_Wide_Wide_String;
pragma Ada_05 (Bounded_Slice);
procedure Bounded_Slice
(Source : Bounded_Wide_Wide_String;
Target : out Bounded_Wide_Wide_String;
Low : Positive;
High : Natural);
pragma Ada_05 (Bounded_Slice);
function "="
(Left : Bounded_Wide_Wide_String;
Right : Bounded_Wide_Wide_String) return Boolean;
function "="
(Left : Bounded_Wide_Wide_String;
Right : Wide_Wide_String) return Boolean;
function "="
(Left : Wide_Wide_String;
Right : Bounded_Wide_Wide_String) return Boolean;
function "<"
(Left : Bounded_Wide_Wide_String;
Right : Bounded_Wide_Wide_String) return Boolean;
function "<"
(Left : Bounded_Wide_Wide_String;
Right : Wide_Wide_String) return Boolean;
function "<"
(Left : Wide_Wide_String;
Right : Bounded_Wide_Wide_String) return Boolean;
function "<="
(Left : Bounded_Wide_Wide_String;
Right : Bounded_Wide_Wide_String) return Boolean;
function "<="
(Left : Bounded_Wide_Wide_String;
Right : Wide_Wide_String) return Boolean;
function "<="
(Left : Wide_Wide_String;
Right : Bounded_Wide_Wide_String) return Boolean;
function ">"
(Left : Bounded_Wide_Wide_String;
Right : Bounded_Wide_Wide_String) return Boolean;
function ">"
(Left : Bounded_Wide_Wide_String;
Right : Wide_Wide_String) return Boolean;
function ">"
(Left : Wide_Wide_String;
Right : Bounded_Wide_Wide_String) return Boolean;
function ">="
(Left : Bounded_Wide_Wide_String;
Right : Bounded_Wide_Wide_String) return Boolean;
function ">="
(Left : Bounded_Wide_Wide_String;
Right : Wide_Wide_String) return Boolean;
function ">="
(Left : Wide_Wide_String;
Right : Bounded_Wide_Wide_String) return Boolean;
----------------------
-- Search Functions --
----------------------
function Index
(Source : Bounded_Wide_Wide_String;
Pattern : Wide_Wide_String;
Going : Direction := Forward;
Mapping : Wide_Wide_Maps.Wide_Wide_Character_Mapping :=
Wide_Wide_Maps.Identity)
return Natural;
function Index
(Source : Bounded_Wide_Wide_String;
Pattern : Wide_Wide_String;
Going : Direction := Forward;
Mapping : Wide_Wide_Maps.Wide_Wide_Character_Mapping_Function)
return Natural;
function Index
(Source : Bounded_Wide_Wide_String;
Set : Wide_Wide_Maps.Wide_Wide_Character_Set;
Test : Membership := Inside;
Going : Direction := Forward) return Natural;
function Index
(Source : Bounded_Wide_Wide_String;
Pattern : Wide_Wide_String;
From : Positive;
Going : Direction := Forward;
Mapping : Wide_Wide_Maps.Wide_Wide_Character_Mapping :=
Wide_Wide_Maps.Identity)
return Natural;
pragma Ada_05 (Index);
function Index
(Source : Bounded_Wide_Wide_String;
Pattern : Wide_Wide_String;
From : Positive;
Going : Direction := Forward;
Mapping : Wide_Wide_Maps.Wide_Wide_Character_Mapping_Function)
return Natural;
pragma Ada_05 (Index);
function Index
(Source : Bounded_Wide_Wide_String;
Set : Wide_Wide_Maps.Wide_Wide_Character_Set;
From : Positive;
Test : Membership := Inside;
Going : Direction := Forward) return Natural;
pragma Ada_05 (Index);
function Index_Non_Blank
(Source : Bounded_Wide_Wide_String;
Going : Direction := Forward) return Natural;
function Index_Non_Blank
(Source : Bounded_Wide_Wide_String;
From : Positive;
Going : Direction := Forward) return Natural;
pragma Ada_05 (Index_Non_Blank);
function Count
(Source : Bounded_Wide_Wide_String;
Pattern : Wide_Wide_String;
Mapping : Wide_Wide_Maps.Wide_Wide_Character_Mapping :=
Wide_Wide_Maps.Identity)
return Natural;
function Count
(Source : Bounded_Wide_Wide_String;
Pattern : Wide_Wide_String;
Mapping : Wide_Wide_Maps.Wide_Wide_Character_Mapping_Function)
return Natural;
function Count
(Source : Bounded_Wide_Wide_String;
Set : Wide_Wide_Maps.Wide_Wide_Character_Set) return Natural;
procedure Find_Token
(Source : Bounded_Wide_Wide_String;
Set : Wide_Wide_Maps.Wide_Wide_Character_Set;
From : Positive;
Test : Membership;
First : out Positive;
Last : out Natural);
pragma Ada_2012 (Find_Token);
procedure Find_Token
(Source : Bounded_Wide_Wide_String;
Set : Wide_Wide_Maps.Wide_Wide_Character_Set;
Test : Membership;
First : out Positive;
Last : out Natural);
------------------------------------
-- String Translation Subprograms --
------------------------------------
function Translate
(Source : Bounded_Wide_Wide_String;
Mapping : Wide_Wide_Maps.Wide_Wide_Character_Mapping)
return Bounded_Wide_Wide_String;
procedure Translate
(Source : in out Bounded_Wide_Wide_String;
Mapping : Wide_Wide_Maps.Wide_Wide_Character_Mapping);
function Translate
(Source : Bounded_Wide_Wide_String;
Mapping : Wide_Wide_Maps.Wide_Wide_Character_Mapping_Function)
return Bounded_Wide_Wide_String;
procedure Translate
(Source : in out Bounded_Wide_Wide_String;
Mapping : Wide_Wide_Maps.Wide_Wide_Character_Mapping_Function);
---------------------------------------
-- String Transformation Subprograms --
---------------------------------------
function Replace_Slice
(Source : Bounded_Wide_Wide_String;
Low : Positive;
High : Natural;
By : Wide_Wide_String;
Drop : Truncation := Error) return Bounded_Wide_Wide_String;
procedure Replace_Slice
(Source : in out Bounded_Wide_Wide_String;
Low : Positive;
High : Natural;
By : Wide_Wide_String;
Drop : Truncation := Error);
function Insert
(Source : Bounded_Wide_Wide_String;
Before : Positive;
New_Item : Wide_Wide_String;
Drop : Truncation := Error) return Bounded_Wide_Wide_String;
procedure Insert
(Source : in out Bounded_Wide_Wide_String;
Before : Positive;
New_Item : Wide_Wide_String;
Drop : Truncation := Error);
function Overwrite
(Source : Bounded_Wide_Wide_String;
Position : Positive;
New_Item : Wide_Wide_String;
Drop : Truncation := Error) return Bounded_Wide_Wide_String;
procedure Overwrite
(Source : in out Bounded_Wide_Wide_String;
Position : Positive;
New_Item : Wide_Wide_String;
Drop : Truncation := Error);
function Delete
(Source : Bounded_Wide_Wide_String;
From : Positive;
Through : Natural) return Bounded_Wide_Wide_String;
procedure Delete
(Source : in out Bounded_Wide_Wide_String;
From : Positive;
Through : Natural);
---------------------------------
-- String Selector Subprograms --
---------------------------------
function Trim
(Source : Bounded_Wide_Wide_String;
Side : Trim_End) return Bounded_Wide_Wide_String;
procedure Trim
(Source : in out Bounded_Wide_Wide_String;
Side : Trim_End);
function Trim
(Source : Bounded_Wide_Wide_String;
Left : Wide_Wide_Maps.Wide_Wide_Character_Set;
Right : Wide_Wide_Maps.Wide_Wide_Character_Set)
return Bounded_Wide_Wide_String;
procedure Trim
(Source : in out Bounded_Wide_Wide_String;
Left : Wide_Wide_Maps.Wide_Wide_Character_Set;
Right : Wide_Wide_Maps.Wide_Wide_Character_Set);
function Head
(Source : Bounded_Wide_Wide_String;
Count : Natural;
Pad : Wide_Wide_Character := Wide_Wide_Space;
Drop : Truncation := Error) return Bounded_Wide_Wide_String;
procedure Head
(Source : in out Bounded_Wide_Wide_String;
Count : Natural;
Pad : Wide_Wide_Character := Wide_Wide_Space;
Drop : Truncation := Error);
function Tail
(Source : Bounded_Wide_Wide_String;
Count : Natural;
Pad : Wide_Wide_Character := Wide_Wide_Space;
Drop : Truncation := Error) return Bounded_Wide_Wide_String;
procedure Tail
(Source : in out Bounded_Wide_Wide_String;
Count : Natural;
Pad : Wide_Wide_Character := Wide_Wide_Space;
Drop : Truncation := Error);
------------------------------------
-- String Constructor Subprograms --
------------------------------------
function "*"
(Left : Natural;
Right : Wide_Wide_Character) return Bounded_Wide_Wide_String;
function "*"
(Left : Natural;
Right : Wide_Wide_String) return Bounded_Wide_Wide_String;
function "*"
(Left : Natural;
Right : Bounded_Wide_Wide_String) return Bounded_Wide_Wide_String;
function Replicate
(Count : Natural;
Item : Wide_Wide_Character;
Drop : Truncation := Error) return Bounded_Wide_Wide_String;
function Replicate
(Count : Natural;
Item : Wide_Wide_String;
Drop : Truncation := Error) return Bounded_Wide_Wide_String;
function Replicate
(Count : Natural;
Item : Bounded_Wide_Wide_String;
Drop : Truncation := Error) return Bounded_Wide_Wide_String;
private
-- Most of the implementation is in the separate non generic package
-- Ada.Strings.Wide_Wide_Superbounded. Type Bounded_Wide_Wide_String is
-- derived from type Wide_Wide_Superbounded.Super_String with the
-- maximum length constraint. In almost all cases, the routines in
-- Wide_Wide_Superbounded can be called with no requirement to pass the
-- maximum length explicitly, since there is at least one
-- Bounded_Wide_Wide_String argument from which the maximum length can
-- be obtained. For all such routines, the implementation in this
-- private part is simply renaming of the corresponding routine in the
-- super bouded package.
-- The five exceptions are the * and Replicate routines operating on
-- character values. For these cases, we have a routine in the body
-- that calls the superbounded routine passing the maximum length
-- explicitly as an extra parameter.
type Bounded_Wide_Wide_String is
new Wide_Wide_Superbounded.Super_String (Max_Length);
-- Deriving Bounded_Wide_Wide_String from
-- Wide_Wide_Superbounded.Super_String is the real trick, it ensures
-- that the type Bounded_Wide_Wide_String declared in the generic
-- instantiation is compatible with the Super_String type declared in
-- the Wide_Wide_Superbounded package.
Null_Bounded_Wide_Wide_String : constant Bounded_Wide_Wide_String :=
(Max_Length => Max_Length,
Current_Length => 0,
Data =>
(1 .. Max_Length =>
Wide_Wide_Superbounded.Wide_Wide_NUL));
pragma Inline (To_Bounded_Wide_Wide_String);
procedure Set_Bounded_Wide_Wide_String
(Target : out Bounded_Wide_Wide_String;
Source : Wide_Wide_String;
Drop : Truncation := Error)
renames Set_Super_String;
function Length
(Source : Bounded_Wide_Wide_String) return Length_Range
renames Super_Length;
function To_Wide_Wide_String
(Source : Bounded_Wide_Wide_String) return Wide_Wide_String
renames Super_To_String;
function Append
(Left : Bounded_Wide_Wide_String;
Right : Bounded_Wide_Wide_String;
Drop : Truncation := Error) return Bounded_Wide_Wide_String
renames Super_Append;
function Append
(Left : Bounded_Wide_Wide_String;
Right : Wide_Wide_String;
Drop : Truncation := Error) return Bounded_Wide_Wide_String
renames Super_Append;
function Append
(Left : Wide_Wide_String;
Right : Bounded_Wide_Wide_String;
Drop : Truncation := Error) return Bounded_Wide_Wide_String
renames Super_Append;
function Append
(Left : Bounded_Wide_Wide_String;
Right : Wide_Wide_Character;
Drop : Truncation := Error) return Bounded_Wide_Wide_String
renames Super_Append;
function Append
(Left : Wide_Wide_Character;
Right : Bounded_Wide_Wide_String;
Drop : Truncation := Error) return Bounded_Wide_Wide_String
renames Super_Append;
procedure Append
(Source : in out Bounded_Wide_Wide_String;
New_Item : Bounded_Wide_Wide_String;
Drop : Truncation := Error)
renames Super_Append;
procedure Append
(Source : in out Bounded_Wide_Wide_String;
New_Item : Wide_Wide_String;
Drop : Truncation := Error)
renames Super_Append;
procedure Append
(Source : in out Bounded_Wide_Wide_String;
New_Item : Wide_Wide_Character;
Drop : Truncation := Error)
renames Super_Append;
function "&"
(Left : Bounded_Wide_Wide_String;
Right : Bounded_Wide_Wide_String) return Bounded_Wide_Wide_String
renames Concat;
function "&"
(Left : Bounded_Wide_Wide_String;
Right : Wide_Wide_String) return Bounded_Wide_Wide_String
renames Concat;
function "&"
(Left : Wide_Wide_String;
Right : Bounded_Wide_Wide_String) return Bounded_Wide_Wide_String
renames Concat;
function "&"
(Left : Bounded_Wide_Wide_String;
Right : Wide_Wide_Character) return Bounded_Wide_Wide_String
renames Concat;
function "&"
(Left : Wide_Wide_Character;
Right : Bounded_Wide_Wide_String) return Bounded_Wide_Wide_String
renames Concat;
function Element
(Source : Bounded_Wide_Wide_String;
Index : Positive) return Wide_Wide_Character
renames Super_Element;
procedure Replace_Element
(Source : in out Bounded_Wide_Wide_String;
Index : Positive;
By : Wide_Wide_Character)
renames Super_Replace_Element;
function Slice
(Source : Bounded_Wide_Wide_String;
Low : Positive;
High : Natural) return Wide_Wide_String
renames Super_Slice;
function Bounded_Slice
(Source : Bounded_Wide_Wide_String;
Low : Positive;
High : Natural) return Bounded_Wide_Wide_String
renames Super_Slice;
procedure Bounded_Slice
(Source : Bounded_Wide_Wide_String;
Target : out Bounded_Wide_Wide_String;
Low : Positive;
High : Natural)
renames Super_Slice;
overriding function "="
(Left : Bounded_Wide_Wide_String;
Right : Bounded_Wide_Wide_String) return Boolean
renames Equal;
function "="
(Left : Bounded_Wide_Wide_String;
Right : Wide_Wide_String) return Boolean
renames Equal;
function "="
(Left : Wide_Wide_String;
Right : Bounded_Wide_Wide_String) return Boolean
renames Equal;
function "<"
(Left : Bounded_Wide_Wide_String;
Right : Bounded_Wide_Wide_String) return Boolean
renames Less;
function "<"
(Left : Bounded_Wide_Wide_String;
Right : Wide_Wide_String) return Boolean
renames Less;
function "<"
(Left : Wide_Wide_String;
Right : Bounded_Wide_Wide_String) return Boolean
renames Less;
function "<="
(Left : Bounded_Wide_Wide_String;
Right : Bounded_Wide_Wide_String) return Boolean
renames Less_Or_Equal;
function "<="
(Left : Bounded_Wide_Wide_String;
Right : Wide_Wide_String) return Boolean
renames Less_Or_Equal;
function "<="
(Left : Wide_Wide_String;
Right : Bounded_Wide_Wide_String) return Boolean
renames Less_Or_Equal;
function ">"
(Left : Bounded_Wide_Wide_String;
Right : Bounded_Wide_Wide_String) return Boolean
renames Greater;
function ">"
(Left : Bounded_Wide_Wide_String;
Right : Wide_Wide_String) return Boolean
renames Greater;
function ">"
(Left : Wide_Wide_String;
Right : Bounded_Wide_Wide_String) return Boolean
renames Greater;
function ">="
(Left : Bounded_Wide_Wide_String;
Right : Bounded_Wide_Wide_String) return Boolean
renames Greater_Or_Equal;
function ">="
(Left : Bounded_Wide_Wide_String;
Right : Wide_Wide_String) return Boolean
renames Greater_Or_Equal;
function ">="
(Left : Wide_Wide_String;
Right : Bounded_Wide_Wide_String) return Boolean
renames Greater_Or_Equal;
function Index
(Source : Bounded_Wide_Wide_String;
Pattern : Wide_Wide_String;
Going : Direction := Forward;
Mapping : Wide_Wide_Maps.Wide_Wide_Character_Mapping :=
Wide_Wide_Maps.Identity)
return Natural
renames Super_Index;
function Index
(Source : Bounded_Wide_Wide_String;
Pattern : Wide_Wide_String;
Going : Direction := Forward;
Mapping : Wide_Wide_Maps.Wide_Wide_Character_Mapping_Function)
return Natural
renames Super_Index;
function Index
(Source : Bounded_Wide_Wide_String;
Set : Wide_Wide_Maps.Wide_Wide_Character_Set;
Test : Membership := Inside;
Going : Direction := Forward) return Natural
renames Super_Index;
function Index
(Source : Bounded_Wide_Wide_String;
Pattern : Wide_Wide_String;
From : Positive;
Going : Direction := Forward;
Mapping : Wide_Wide_Maps.Wide_Wide_Character_Mapping :=
Wide_Wide_Maps.Identity)
return Natural
renames Super_Index;
function Index
(Source : Bounded_Wide_Wide_String;
Pattern : Wide_Wide_String;
From : Positive;
Going : Direction := Forward;
Mapping : Wide_Wide_Maps.Wide_Wide_Character_Mapping_Function)
return Natural
renames Super_Index;
function Index
(Source : Bounded_Wide_Wide_String;
Set : Wide_Wide_Maps.Wide_Wide_Character_Set;
From : Positive;
Test : Membership := Inside;
Going : Direction := Forward) return Natural
renames Super_Index;
function Index_Non_Blank
(Source : Bounded_Wide_Wide_String;
Going : Direction := Forward) return Natural
renames Super_Index_Non_Blank;
function Index_Non_Blank
(Source : Bounded_Wide_Wide_String;
From : Positive;
Going : Direction := Forward) return Natural
renames Super_Index_Non_Blank;
function Count
(Source : Bounded_Wide_Wide_String;
Pattern : Wide_Wide_String;
Mapping : Wide_Wide_Maps.Wide_Wide_Character_Mapping :=
Wide_Wide_Maps.Identity)
return Natural
renames Super_Count;
function Count
(Source : Bounded_Wide_Wide_String;
Pattern : Wide_Wide_String;
Mapping : Wide_Wide_Maps.Wide_Wide_Character_Mapping_Function)
return Natural
renames Super_Count;
function Count
(Source : Bounded_Wide_Wide_String;
Set : Wide_Wide_Maps.Wide_Wide_Character_Set) return Natural
renames Super_Count;
procedure Find_Token
(Source : Bounded_Wide_Wide_String;
Set : Wide_Wide_Maps.Wide_Wide_Character_Set;
From : Positive;
Test : Membership;
First : out Positive;
Last : out Natural)
renames Super_Find_Token;
procedure Find_Token
(Source : Bounded_Wide_Wide_String;
Set : Wide_Wide_Maps.Wide_Wide_Character_Set;
Test : Membership;
First : out Positive;
Last : out Natural)
renames Super_Find_Token;
function Translate
(Source : Bounded_Wide_Wide_String;
Mapping : Wide_Wide_Maps.Wide_Wide_Character_Mapping)
return Bounded_Wide_Wide_String
renames Super_Translate;
procedure Translate
(Source : in out Bounded_Wide_Wide_String;
Mapping : Wide_Wide_Maps.Wide_Wide_Character_Mapping)
renames Super_Translate;
function Translate
(Source : Bounded_Wide_Wide_String;
Mapping : Wide_Wide_Maps.Wide_Wide_Character_Mapping_Function)
return Bounded_Wide_Wide_String
renames Super_Translate;
procedure Translate
(Source : in out Bounded_Wide_Wide_String;
Mapping : Wide_Wide_Maps.Wide_Wide_Character_Mapping_Function)
renames Super_Translate;
function Replace_Slice
(Source : Bounded_Wide_Wide_String;
Low : Positive;
High : Natural;
By : Wide_Wide_String;
Drop : Truncation := Error) return Bounded_Wide_Wide_String
renames Super_Replace_Slice;
procedure Replace_Slice
(Source : in out Bounded_Wide_Wide_String;
Low : Positive;
High : Natural;
By : Wide_Wide_String;
Drop : Truncation := Error)
renames Super_Replace_Slice;
function Insert
(Source : Bounded_Wide_Wide_String;
Before : Positive;
New_Item : Wide_Wide_String;
Drop : Truncation := Error) return Bounded_Wide_Wide_String
renames Super_Insert;
procedure Insert
(Source : in out Bounded_Wide_Wide_String;
Before : Positive;
New_Item : Wide_Wide_String;
Drop : Truncation := Error)
renames Super_Insert;
function Overwrite
(Source : Bounded_Wide_Wide_String;
Position : Positive;
New_Item : Wide_Wide_String;
Drop : Truncation := Error) return Bounded_Wide_Wide_String
renames Super_Overwrite;
procedure Overwrite
(Source : in out Bounded_Wide_Wide_String;
Position : Positive;
New_Item : Wide_Wide_String;
Drop : Truncation := Error)
renames Super_Overwrite;
function Delete
(Source : Bounded_Wide_Wide_String;
From : Positive;
Through : Natural) return Bounded_Wide_Wide_String
renames Super_Delete;
procedure Delete
(Source : in out Bounded_Wide_Wide_String;
From : Positive;
Through : Natural)
renames Super_Delete;
function Trim
(Source : Bounded_Wide_Wide_String;
Side : Trim_End) return Bounded_Wide_Wide_String
renames Super_Trim;
procedure Trim
(Source : in out Bounded_Wide_Wide_String;
Side : Trim_End)
renames Super_Trim;
function Trim
(Source : Bounded_Wide_Wide_String;
Left : Wide_Wide_Maps.Wide_Wide_Character_Set;
Right : Wide_Wide_Maps.Wide_Wide_Character_Set)
return Bounded_Wide_Wide_String
renames Super_Trim;
procedure Trim
(Source : in out Bounded_Wide_Wide_String;
Left : Wide_Wide_Maps.Wide_Wide_Character_Set;
Right : Wide_Wide_Maps.Wide_Wide_Character_Set)
renames Super_Trim;
function Head
(Source : Bounded_Wide_Wide_String;
Count : Natural;
Pad : Wide_Wide_Character := Wide_Wide_Space;
Drop : Truncation := Error) return Bounded_Wide_Wide_String
renames Super_Head;
procedure Head
(Source : in out Bounded_Wide_Wide_String;
Count : Natural;
Pad : Wide_Wide_Character := Wide_Wide_Space;
Drop : Truncation := Error)
renames Super_Head;
function Tail
(Source : Bounded_Wide_Wide_String;
Count : Natural;
Pad : Wide_Wide_Character := Wide_Wide_Space;
Drop : Truncation := Error) return Bounded_Wide_Wide_String
renames Super_Tail;
procedure Tail
(Source : in out Bounded_Wide_Wide_String;
Count : Natural;
Pad : Wide_Wide_Character := Wide_Wide_Space;
Drop : Truncation := Error)
renames Super_Tail;
function "*"
(Left : Natural;
Right : Bounded_Wide_Wide_String) return Bounded_Wide_Wide_String
renames Times;
function Replicate
(Count : Natural;
Item : Bounded_Wide_Wide_String;
Drop : Truncation := Error) return Bounded_Wide_Wide_String
renames Super_Replicate;
end Generic_Bounded_Length;
end Ada.Strings.Wide_Wide_Bounded;
|
------------------------------------------------------------------------------
-- --
-- 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$
------------------------------------------------------------------------------
with League.Holders;
package AMF.Real_Collections.Internals is
pragma Preelaborate;
function To_Holder
(Item : AMF.Real_Collections.Sequence_Of_Real)
return League.Holders.Holder;
end AMF.Real_Collections.Internals;
|
with Ahven.Framework;
with Container.Api;
package Test_Container.Read is
package Skill renames Container.Api;
use Container;
use Container.Api;
type Test is new Ahven.Framework.Test_Case with null record;
procedure Initialize (T : in out Test);
procedure Constant_Length_Array;
procedure Variable_Length_Array;
procedure List;
procedure Set;
procedure Map;
end Test_Container.Read;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- I N T E R F A C E S . C P P --
-- --
-- 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. --
-- --
-- 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. --
-- --
------------------------------------------------------------------------------
-- Missing package comment ???
with Ada.Tags;
package Interfaces.CPP is
pragma Elaborate_Body;
-- We have a dummy body to deal with bootstrap path issues
subtype Vtable_Ptr is Ada.Tags.Tag;
-- These need commenting (this is not an RM package!)
function Expanded_Name (T : Vtable_Ptr) return String
renames Ada.Tags.Expanded_Name;
function External_Tag (T : Vtable_Ptr) return String
renames Ada.Tags.External_Tag;
end Interfaces.CPP;
|
-- MIT License
--
-- Copyright (c) 2021 Glen Cornell <glen.m.cornell@gmail.com>
--
-- 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.
-- To be merged with gnat.sockets.os_constants...
-- from /usr/inlude/linux/can.h
-- from /usr/inlude/linux/can/raw.h
-- from /usr/inlude/bits/socket_type.h
package Sockets.Os_Constants is
pragma Pure;
-- special address description flags for the CAN_ID
CAN_EFF_FLAG : constant := 16#80000000#; -- EFF/SFF is set in the MSB
CAN_RTR_FLAG : constant := 16#40000000#; -- remote transmission request
CAN_ERR_FLAG : constant := 16#20000000#; -- error message frame
-- valid bits in CAN ID for frame formats
CAN_SFF_MASK : constant := 16#000007FF#; -- standard frame format (SFF)
CAN_EFF_MASK : constant := 16#1FFFFFFF#; -- extended frame format (EFF)
CAN_ERR_MASK : constant := 16#1FFFFFFF#; -- omit EFF, RTR, ERR flags
CAN_INV_FILTER : constant := 16#20000000#; -- to be set in can_filter.can_id
CAN_RAW_FILTER_MAX : constant := 512; -- maximum number of can_filter set via setsockopt()
-----------------------
-- protocol families --
-----------------------
SOCK_RAW : constant := 3; -- Raw protocol interface.
-- particular protocols of the protocol family PF_CAN
CAN_RAW : constant := 1; -- RAW sockets
CAN_BCM : constant := 2; -- Broadcast Manager
CAN_TP16 : constant := 3; -- VAG Transport Protocol v1.6
CAN_TP20 : constant := 4; -- VAG Transport Protocol v2.0
CAN_MCNET : constant := 5; -- Bosch MCNet
CAN_ISOTP : constant := 6; -- ISO 15765-2 Transport Protocol
CAN_NPROTO : constant := 7;
-- Protocol families.
PF_CAN : constant := 29; -- Controller Area Network.
-- Address families.
AF_CAN : constant := PF_CAN;
--------------------
-- Socket options --
--------------------
SOL_CAN_BASE : constant := 100;
SOL_CAN_RAW : constant := SOL_CAN_BASE + CAN_RAW;
CAN_RAW_FILTER : constant := 1; -- set 0 .. n can_filter(s)
CAN_RAW_ERR_FILTER : constant := 2; -- set filter for error frames
CAN_RAW_LOOPBACK : constant := 3; -- local loopback (default:on)
CAN_RAW_RECV_OWN_MSGS : constant := 4; -- receive my own msgs (default:off)
CAN_RAW_FD_FRAMES : constant := 5; -- allow CAN FD frames (default:off)
CAN_RAW_JOIN_FILTERS : constant := 6; -- all filters must match to trigger
end Sockets.Os_Constants;
|
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Localization, Internationalization, Globalization for Ada --
-- --
-- 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$
------------------------------------------------------------------------------
private package Matreshka.Internals.Text_Codecs.Windows1251 is
pragma Preelaborate;
-------------------------
-- Windows1251_Decoder --
-------------------------
type Windows1251_Decoder is new Abstract_Decoder with private;
overriding function Is_Error (Self : Windows1251_Decoder) return Boolean;
overriding function Is_Mailformed
(Self : Windows1251_Decoder) return Boolean;
overriding procedure Decode_Append
(Self : in out Windows1251_Decoder;
Data : Ada.Streams.Stream_Element_Array;
String : in out Matreshka.Internals.Strings.Shared_String_Access);
function Decoder (Mode : Decoder_Mode) return Abstract_Decoder'Class;
-------------------------
-- Windows1251_Encoder --
-------------------------
type Windows1251_Encoder is new Abstract_Encoder with private;
overriding procedure Encode
(Self : in out Windows1251_Encoder;
String : not null Matreshka.Internals.Strings.Shared_String_Access;
Buffer : out MISEV.Shared_Stream_Element_Vector_Access);
function Encoder return Abstract_Encoder'Class;
private
type Windows1251_Decoder is new Abstract_Decoder with null record;
type Windows1251_Encoder is new Abstract_Encoder with null record;
end Matreshka.Internals.Text_Codecs.Windows1251;
|
--------------------------------------------------------------------------------------------------------------------
-- Copyright (c) 2013-2018 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.Events.Touches
--
-- WARNING!! A lot of the data bindings in this specification is guess-work, especially the ranges for things. There
-- also an inconsistency in the usage of Fingers_Touching within SDL itself.
--
-- See:
-- https://bugzilla.libsdl.org/show_bug.cgi?id=3060
-- http://lists.libsdl.org/pipermail/sdl-libsdl.org/2015-July/098468.html
--------------------------------------------------------------------------------------------------------------------
with Interfaces.C;
package SDL.Events.Touches is
-- Touch events.
Finger_Down : constant Event_Types := 16#0000_0700#;
Finger_Up : constant Event_Types := Finger_Down + 1;
Finger_Motion : constant Event_Types := Finger_Down + 2;
-- Gesture events.
Dollar_Gesture : constant Event_Types := 16#0000_0800#;
Dollar_Record : constant Event_Types := Dollar_Gesture + 1;
Dollar_Multi_Gesture : constant Event_Types := Dollar_Gesture + 2;
-- TODO: Find out if these really should be signed or not, the C version uses Sint64 for both.
type Touch_IDs is range -1 .. 2 ** 63 - 1 with
Convention => C,
Size => 64;
type Finger_IDs is range 0 .. 2 ** 63 - 1 with
Convention => C,
Size => 64;
type Gesture_IDs is range 0 .. 2 ** 63 - 1 with
Convention => C,
Size => 64;
type Touch_Locations is digits 3 range 0.0 .. 1.0 with
Convention => C,
Size => 32;
type Touch_Distances is digits 3 range -1.0 .. 1.0 with
Convention => C,
Size => 32;
type Touch_Pressures is digits 3 range 0.0 .. 1.0 with
Convention => C,
Size => 32;
type Finger_Events is
record
Event_Type : Event_Types; -- Will be set to Finger_Down, Finger_Up or Finger_Motion.
Time_Stamp : Time_Stamps;
Touch_ID : Touch_IDs;
Finger_ID : Finger_IDs;
X : Touch_Locations;
Y : Touch_Locations;
Delta_X : Touch_Distances;
Delta_Y : Touch_Distances;
Pressure : Touch_Pressures;
end record with
Convention => C;
type Finger_Rotations is digits 3 range -360.0 .. 360.0 with
Convention => C,
Size => 32;
subtype Finger_Pinches is Interfaces.C.C_float;
type Fingers_Touching is range 0 .. 2 ** 16 -1 with
Convention => C,
Size => 16;
type Multi_Gesture_Events is
record
Event_Type : Event_Types; -- Will be set to Dollar_Multi_Gesture.
Time_Stamp : Time_Stamps;
Touch_ID : Touch_IDs;
Theta : Finger_Rotations;
Distance : Finger_Pinches;
Centre_X : Touch_Locations;
Centre_Y : Touch_Locations;
Fingers : Fingers_Touching;
Padding : Padding_16;
end record with
Convention => C;
subtype Dollar_Errors is Interfaces.C.C_float;
type Dollar_Events is
record
Event_Type : Event_Types; -- Will be set to Dollar_Gesture or Dollar_Record.
Time_Stamp : Time_Stamps;
Touch_ID : Touch_IDs;
Gesture_ID : Gesture_IDs;
Fingers : Fingers_Touching;
Error : Dollar_Errors;
Centre_X : Touch_Locations;
Centre_Y : Touch_Locations;
end record with
Convention => C;
private
for Finger_Events use
record
Event_Type at 0 * SDL.Word range 0 .. 31;
Time_Stamp at 1 * SDL.Word range 0 .. 31;
Touch_ID at 2 * SDL.Word range 0 .. 63;
Finger_ID at 4 * SDL.Word range 0 .. 63;
X at 6 * SDL.Word range 0 .. 31;
Y at 7 * SDL.Word range 0 .. 31;
Delta_X at 8 * SDL.Word range 0 .. 31;
Delta_Y at 9 * SDL.Word range 0 .. 31;
Pressure at 10 * SDL.Word range 0 .. 31;
end record;
for Multi_Gesture_Events use
record
Event_Type at 0 * SDL.Word range 0 .. 31;
Time_Stamp at 1 * SDL.Word range 0 .. 31;
Touch_ID at 2 * SDL.Word range 0 .. 63;
Theta at 4 * SDL.Word range 0 .. 31;
Distance at 5 * SDL.Word range 0 .. 31;
Centre_X at 6 * SDL.Word range 0 .. 31;
Centre_Y at 7 * SDL.Word range 0 .. 31;
Fingers at 8 * SDL.Word range 0 .. 15;
Padding at 8 * SDL.Word range 16 .. 31;
end record;
for Dollar_Events use
record
Event_Type at 0 * SDL.Word range 0 .. 31;
Time_Stamp at 1 * SDL.Word range 0 .. 31;
Touch_ID at 2 * SDL.Word range 0 .. 63;
Gesture_ID at 4 * SDL.Word range 0 .. 63;
Fingers at 6 * SDL.Word range 0 .. 31; -- Inconsistent, type is 16 bits, but SDL uses 32 here.
Error at 7 * SDL.Word range 0 .. 31;
Centre_X at 8 * SDL.Word range 0 .. 31;
Centre_Y at 9 * SDL.Word range 0 .. 31;
end record;
end SDL.Events.Touches;
|
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Web Framework --
-- --
-- Tools Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2012-2013, 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$
------------------------------------------------------------------------------
package WSDL.AST.Messages is
pragma Preelaborate;
type Interface_Message_Node is new Abstract_Node with record
Parent : WSDL.AST.Interface_Operation_Access;
-- Value of {parent} property.
Message_Label : League.Strings.Universal_String;
-- Value of {message label} property.
Direction : WSDL.AST.Message_Directions;
-- Value of {direction} property.
Message_Content_Model : WSDL.AST.Message_Content_Models;
-- Value of {message content model} property.
Element : WSDL.AST.Qualified_Name;
-- Name of the element which is used as content of the message.
end record;
overriding procedure Enter
(Self : not null access Interface_Message_Node;
Visitor : in out WSDL.Visitors.WSDL_Visitor'Class;
Control : in out WSDL.Iterators.Traverse_Control);
overriding procedure Leave
(Self : not null access Interface_Message_Node;
Visitor : in out WSDL.Visitors.WSDL_Visitor'Class;
Control : in out WSDL.Iterators.Traverse_Control);
overriding procedure Visit
(Self : not null access Interface_Message_Node;
Iterator : in out WSDL.Iterators.WSDL_Iterator'Class;
Visitor : in out WSDL.Visitors.WSDL_Visitor'Class;
Control : in out WSDL.Iterators.Traverse_Control);
end WSDL.AST.Messages;
|
-- Copyright 2012-2017 Free Software Foundation, Inc.
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
package body Ops is
function Make (X: Natural) return Int is
begin
return Int (X);
end Make;
function "+" (I1, I2 : Int) return Int is
begin
return Int (IntRep (I1) + IntRep (I2));
end;
function "-" (I1, I2 : Int) return Int is
begin
return Int (IntRep (I1) - IntRep (I2));
end;
function "*" (I1, I2 : Int) return Int is
begin
return Int (IntRep (I1) * IntRep (I2));
end;
function "/" (I1, I2 : Int) return Int is
begin
return Int (IntRep (I1) / IntRep (I2));
end;
function "mod" (I1, I2 : Int) return Int is
begin
return Int (IntRep (I1) mod IntRep (I2));
end;
function "rem" (I1, I2 : Int) return Int is
begin
return Int (IntRep (I1) rem IntRep (I2));
end;
function "**" (I1, I2 : Int) return Int is
Result : IntRep := 1;
begin
for J in 1 .. IntRep (I2) loop
Result := IntRep (I1) * Result;
end loop;
return Int (Result);
end;
function "<" (I1, I2 : Int) return Boolean is
begin
return IntRep (I1) < IntRep (I2);
end;
function "<=" (I1, I2 : Int) return Boolean is
begin
return IntRep (I1) <= IntRep (I2);
end;
function ">" (I1, I2 : Int) return Boolean is
begin
return IntRep (I1) > IntRep (I2);
end;
function ">=" (I1, I2 : Int) return Boolean is
begin
return IntRep (I1) >= IntRep (I2);
end;
function "=" (I1, I2 : Int) return Boolean is
begin
return IntRep (I1) = IntRep (I2);
end;
function "and" (I1, I2 : Int) return Int is
begin
return Int (IntRep (I1) and IntRep (I2));
end;
function "or" (I1, I2 : Int) return Int is
begin
return Int (IntRep (I1) or IntRep (I2));
end;
function "xor" (I1, I2 : Int) return Int is
begin
return Int (IntRep (I1) xor IntRep (I2));
end;
function "&" (I1, I2 : Int) return Int is
begin
return Int (IntRep (I1) and IntRep (I2));
end;
function "abs" (I1 : Int) return Int is
begin
return Int (abs IntRep (I1));
end;
function "not" (I1 : Int) return Int is
begin
return Int (not IntRep (I1));
end;
function "+" (I1 : Int) return Int is
begin
return Int (IntRep (I1));
end;
function "-" (I1 : Int) return Int is
begin
return Int (-IntRep (I1));
end;
procedure Dummy (I1 : Int) is
begin
null;
end Dummy;
procedure Dummy (B1 : Boolean) is
begin
null;
end Dummy;
end Ops;
|
with Tkmrpc.Request;
with Tkmrpc.Response;
package Tkmrpc.Operation_Handlers.Ike.Esa_Select is
procedure Handle (Req : Request.Data_Type; Res : out Response.Data_Type);
-- Handler for the esa_select operation.
end Tkmrpc.Operation_Handlers.Ike.Esa_Select;
|
-- SPDX-FileCopyrightText: 2021 Max Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-------------------------------------------------------------
with Ada.Streams;
with GNAT.Sockets;
with Network.Streams;
private
package Network.Managers.TCP_V4_Out is
type Out_Socket (Poll : Network.Polls.Poll_Access) is
limited new Network.Polls.Listener
and Network.Connections.Connection with
record
Promise : aliased Connection_Promises.Controller;
Error : League.Strings.Universal_String;
Internal : GNAT.Sockets.Socket_Type;
Events : Network.Polls.Event_Set := (others => False);
-- When In_Event, desired events to watch in Poll, otherwise active
-- watching events.
Is_Closed : Boolean := False; -- Has been closed already
In_Event : Boolean := False; -- Inside On_Event
Remote : Network.Addresses.Address;
Listener : Network.Connections.Listener_Access;
end record;
type Out_Socket_Access is access all Out_Socket;
overriding function Is_Closed (Self : Out_Socket) return Boolean;
overriding procedure Set_Input_Listener
(Self : in out Out_Socket;
Value : Network.Streams.Input_Listener_Access);
overriding procedure Set_Output_Listener
(Self : in out Out_Socket;
Value : Network.Streams.Output_Listener_Access);
overriding function Has_Listener (Self : Out_Socket) return Boolean;
overriding procedure On_Event
(Self : in out Out_Socket;
Events : Network.Polls.Event_Set);
overriding procedure Read
(Self : in out Out_Socket;
Data : out Ada.Streams.Stream_Element_Array;
Last : out Ada.Streams.Stream_Element_Offset);
overriding procedure Write
(Self : in out Out_Socket;
Data : Ada.Streams.Stream_Element_Array;
Last : out Ada.Streams.Stream_Element_Offset);
overriding procedure Close (Self : in out Out_Socket);
overriding function Remote (Self : Out_Socket)
return Network.Addresses.Address;
end Network.Managers.TCP_V4_Out;
|
------------------------------------------------------------------------------
-- --
-- Copyright (C) 2019, AdaCore --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions are --
-- met: --
-- 1. Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- 2. Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in --
-- the documentation and/or other materials provided with the --
-- distribution. --
-- 3. Neither the name of the copyright holder nor the names of its --
-- contributors may be used to endorse or promote products derived --
-- from this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT --
-- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, --
-- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY --
-- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT --
-- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE --
-- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
with Feather_STM32F405.I2C;
with AdaFruit.CharlieWing;
with HAL; use HAL;
procedure Main is
Matrix : AdaFruit.CharlieWing.Device (Feather_STM32F405.I2C.Controller, 0);
pragma Style_Checks (Off);
A : constant := 1;
Text : constant array (AdaFruit.CharlieWing.Y_Coord, 0 .. 74) of HAL.Bit :=
((0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, A, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, A, 0, 0, 0, 0, 0, others => 0),
(A, 0, 0, 0, A, 0, 0, 0, 0, 0, 0, A, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, A, 0, 0, 0, A, 0, 0, A, 0, 0, A, 0, 0, A, 0, 0, 0, 0, 0, 0, A, A, 0, 0, 0, 0, 0, A, 0, 0, 0, 0, 0, others => 0),
(A, A, 0, A, A, 0, 0, A, A, 0, 0, A, 0, 0, A, 0, 0, A, A, 0, 0, 0, A, 0, 0, 0, A, 0, 0, 0, 0, A, A, A, 0, A, 0, 0, 0, 0, 0, A, 0, 0, A, 0, 0, A, A, A, 0, 0, A, A, 0, others => 0),
(A, 0, A, 0, A, 0, 0, 0, 0, A, 0, A, 0, A, 0, 0, A, 0, 0, A, 0, 0, A, 0, 0, 0, A, 0, A, A, 0, 0, A, 0, 0, A, A, A, 0, 0, 0, A, 0, 0, A, 0, A, 0, 0, A, 0, 0, 0, 0, A, others => 0),
(A, 0, 0, 0, A, 0, 0, A, A, A, 0, A, A, 0, 0, 0, A, A, A, A, 0, 0, A, 0, A, 0, A, 0, 0, A, 0, 0, A, 0, 0, A, 0, 0, A, 0, 0, A, A, A, A, 0, A, 0, 0, A, 0, 0, A, A, A, others => 0),
(A, 0, 0, 0, A, 0, A, 0, 0, A, 0, A, 0, A, 0, 0, A, 0, 0, 0, 0, 0, A, A, 0, A, A, 0, 0, A, 0, 0, A, 0, 0, A, 0, 0, A, 0, 0, A, 0, 0, A, 0, A, 0, 0, A, 0, A, 0, 0, A, others => 0),
(A, 0, 0, 0, A, 0, 0, A, A, A, 0, A, 0, 0, A, 0, 0, A, A, 0, 0, 0, A, 0, 0, 0, A, 0, A, A, A, 0, A, A, 0, A, 0, 0, A, 0, 0, A, 0, 0, A, 0, 0, A, A, A, 0, 0, A, A, A, others => 0));
pragma Style_Checks (On);
begin
Feather_STM32F405.I2C.Initialize (400_000);
Matrix.Initialize;
Matrix.Fill (10);
loop
for Column in Text'Range (2) loop
for X in AdaFruit.CharlieWing.X_Coord loop
for Y in AdaFruit.CharlieWing.Y_Coord loop
if Text (Y, (X + Column) mod Text'Length (2)) = 1 then
Matrix.Enable (X, Y);
else
Matrix.Disable (X, Y);
end if;
end loop;
end loop;
delay 0.1;
end loop;
end loop;
end Main;
|
-- C95085O.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 AFTER AN ENTRY CALL FOR THE
-- CASE OF A PRIVATE TYPE IMPLEMENTED AS AN ACCESS TYPE WHERE THE VALUE
-- OF THE FORMAL PARAMETER DOES NOT BELONG TO THE SUBTYPE OF THE ACTUAL
-- PARAMETER.
-- JWC 10/30/85
-- JRK 1/15/86 ENSURE THAT EXCEPTION RAISED AFTER CALL, NOT BEFORE
-- CALL.
WITH REPORT; USE REPORT;
PROCEDURE C95085O IS
BEGIN
TEST ("C95085O", "CHECK THAT PRIVATE TYPE (ACCESS) RAISES " &
"CONSTRAINT_ERROR AFTER CALL WHEN FORMAL " &
"PARAMETER VALUE IS NOT IN ACTUAL'S SUBTYPE");
DECLARE
CALLED : BOOLEAN := FALSE;
PACKAGE P IS
TYPE T IS PRIVATE;
DC : CONSTANT T;
GENERIC PACKAGE PP IS
END PP;
PRIVATE
TYPE T IS ACCESS STRING;
DC : CONSTANT T := NEW STRING'("AAA");
END P;
TASK TSK IS
ENTRY E (X : IN OUT P.T);
END TSK;
TASK BODY TSK IS
BEGIN
SELECT
ACCEPT E (X : IN OUT P.T) DO
CALLED := TRUE;
X := P.DC;
END E;
OR
TERMINATE;
END SELECT;
EXCEPTION
WHEN OTHERS =>
FAILED ("EXCEPTION RAISED IN TASK BODY");
END TSK;
GENERIC
Y : IN OUT P.T;
PACKAGE CALL IS
END CALL;
PACKAGE BODY CALL IS
BEGIN
TSK.E (Y);
FAILED ("EXCEPTION NOT RAISED AFTER RETURN");
EXCEPTION
WHEN CONSTRAINT_ERROR =>
IF NOT CALLED THEN
FAILED ("EXCEPTION RAISED BEFORE CALL");
END IF;
WHEN OTHERS =>
FAILED ("WRONG EXCEPTION RAISED");
END CALL;
PACKAGE BODY P IS
Z : T (1..5) := NEW STRING'("CCCCC");
PACKAGE BODY PP IS
PACKAGE CALL_Q IS NEW CALL (Z);
END PP;
END P;
BEGIN
BEGIN
DECLARE
PACKAGE CALL_Q_NOW IS NEW P.PP; -- START HERE.
BEGIN
NULL;
END;
EXCEPTION
WHEN OTHERS =>
FAILED ("WRONG HANDLER INVOKED");
END;
END;
RESULT;
END C95085O;
|
--
-- Copyright (C) 2015-2016 secunet Security Networks AG
--
-- 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 2 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.
--
package HW.GFX.GMA.Display_Probing
is
type Port_List_Range is range 0 .. 7;
type Port_List is array (Port_List_Range) of Port_Type;
All_Ports : constant Port_List :=
(DP1, DP2, DP3, HDMI1, HDMI2, HDMI3, Analog, Internal);
procedure Scan_Ports
(Configs : out Pipe_Configs;
Ports : in Port_List := All_Ports;
Max_Pipe : in Pipe_Index := Pipe_Index'Last;
Keep_Power : in Boolean := False);
end HW.GFX.GMA.Display_Probing;
|
------------------------------------------------------------------------------
-- --
-- Copyright (C) 2018-2021, AdaCore --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions are --
-- met: --
-- 1. Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- 2. Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in --
-- the documentation and/or other materials provided with the --
-- distribution. --
-- 3. Neither the name of the copyright holder nor the names of its --
-- contributors may be used to endorse or promote products derived --
-- from this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT --
-- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, --
-- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY --
-- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT --
-- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE --
-- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
with Ada.Unchecked_Conversion;
package body USB.Device.HID.Mouse is
--------------
-- Set_Move --
--------------
procedure Set_Move (This : in out Instance;
X, Y : Interfaces.Integer_8)
is
function To_UInt8 is new Ada.Unchecked_Conversion (Interfaces.Integer_8,
UInt8);
begin
This.Report (2) := To_UInt8 (X);
This.Report (3) := To_UInt8 (Y);
end Set_Move;
---------------
-- Set_Click --
---------------
procedure Set_Click (This : in out Instance;
Btn1, Btn2, Btn3 : Boolean := False)
is
begin
This.Report (1) := (if Btn1 then 1 else 0) or
(if Btn2 then 2 else 0) or
(if Btn3 then 4 else 0);
end Set_Click;
end USB.Device.HID.Mouse;
|
------------------------------------------------------------------------------
-- --
-- GNU ADA RUN-TIME LIBRARY (GNARL) COMPONENTS --
-- --
-- S Y S T E M - S T A C K _ U S A G E --
-- --
-- S p e c --
-- --
-- Copyright (C) 2004-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. --
-- --
------------------------------------------------------------------------------
with System;
with System.Storage_Elements;
with System.Address_To_Access_Conversions;
package System.Stack_Usage is
pragma Preelaborate;
package SSE renames System.Storage_Elements;
Byte_Size : constant := 8;
Word_32_Size : constant := 4 * Byte_Size;
type Word_32 is mod 2 ** Word_32_Size;
for Word_32'Alignment use 4;
subtype Stack_Address is SSE.Integer_Address;
-- Address on the stack
--
-- Note: in this package, when comparing two addresses on the stack, the
-- comments use the terms "outer", "inner", "outermost" and "innermost"
-- instead of the ambigous "higher", "lower", "highest" and "lowest".
-- "inner" means "closer to the bottom of stack" and is the contrary of
-- "outer". "innermost" means "closest address to the bottom of stack". The
-- stack is growing from the inner to the outer.
-- Top/Bottom would be much better than inner and outer ???
function To_Stack_Address (Value : System.Address) return Stack_Address
renames System.Storage_Elements.To_Integer;
type Stack_Analyzer is private;
-- Type of the stack analyzer tool. It is used to fill a portion of
-- the stack with Pattern, and to compute the stack used after some
-- execution.
-- Usage:
-- A typical use of the package is something like:
-- A : Stack_Analyzer;
-- task T is
-- pragma Storage_Size (A_Storage_Size);
-- end T;
-- [...]
-- Bottom_Of_Stack : aliased Integer;
-- -- Bottom_Of_Stack'Address will be used as an approximation of
-- -- the bottom of stack. A good practise is to avoid allocating
-- -- other local variables on this stack, as it would degrade
-- -- the quality of this approximation.
-- begin
-- Initialize_Analyzer (A,
-- "Task t",
-- A_Storage_Size - A_Guard,
-- To_Stack_Address (Bottom_Of_Stack'Address));
-- Fill_Stack (A);
-- Some_User_Code;
-- Compute_Result (A);
-- Report_Result (A);
-- end T;
-- Errors:
--
-- We are instrumenting the code to measure the stack used by the user
-- code. This method has a number of systematic errors, but several
-- methods can be used to evaluate or reduce those errors. Here are
-- those errors and the strategy that we use to deal with them:
-- Bottom offset:
-- Description: The procedure used to fill the stack with a given
-- pattern will itself have a stack frame. The value of the stack
-- pointer in this procedure is, therefore, different from the value
-- before the call to the instrumentation procedure.
-- Strategy: The user of this package should measure the bottom of stack
-- before the call to Fill_Stack and pass it in parameter.
-- Instrumentation threshold at writing:
-- Description: The procedure used to fill the stack with a given
-- pattern will itself have a stack frame. Therefore, it will
-- fill the stack after this stack frame. This part of the stack will
-- appear as used in the final measure.
-- Strategy: As the user passes the value of the bottom of stack to
-- the instrumentation to deal with the bottom offset error, and as as
-- the instrumentation procedure knows where the pattern filling start
-- on the stack, the difference between the two values is the minimum
-- stack usage that the method can measure. If, when the results are
-- computed, the pattern zone has been left untouched, we conclude
-- that the stack usage is inferior to this minimum stack usage.
-- Instrumentation threshold at reading:
-- Description: The procedure used to read the stack at the end of the
-- execution clobbers the stack by allocating its stack frame. If this
-- stack frame is bigger than the total stack used by the user code at
-- this point, it will increase the measured stack size.
-- Strategy: We could augment this stack frame and see if it changes the
-- measure. However, this error should be negligeable.
-- Pattern zone overflow:
-- Description: The stack grows outer than the outermost bound of the
-- pattern zone. In that case, the outermost region modified in the
-- pattern is not the maximum value of the stack pointer during the
-- execution.
-- Strategy: At the end of the execution, the difference between the
-- outermost memory region modified in the pattern zone and the
-- outermost bound of the pattern zone can be understood as the
-- biggest allocation that the method could have detect, provided
-- that there is no "Untouched allocated zone" error and no "Pattern
-- usage in user code" error. If no object in the user code is likely
-- to have this size, this is not likely to happen.
-- Pattern usage in user code:
-- Description: The pattern can be found in the object of the user code.
-- Therefore, the address space where this object has been allocated
-- will appear as untouched.
-- Strategy: Choose a pattern that is uncommon. 16#0000_0000# is the
-- worst choice; 16#DEAD_BEEF# can be a good one. A good choice is an
-- address which is not a multiple of 2, and which is not in the
-- target address space. You can also change the pattern to see if it
-- changes the measure. Note that this error *very* rarely influence
-- the measure of the total stack usage: to have some influence, the
-- pattern has to be used in the object that has been allocated on the
-- outermost address of the used stack.
-- Stack overflow:
-- Description: The pattern zone does not fit on the stack. This may
-- lead to an erroneous execution.
-- Strategy: Specify a storage size that is bigger than the size of the
-- pattern. 2 times bigger should be enough.
-- Augmentation of the user stack frames:
-- Description: The use of instrumentation object or procedure may
-- augment the stack frame of the caller.
-- Strategy: Do *not* inline the instrumentation procedures. Do *not*
-- allocate the Stack_Analyzer object on the stack.
-- Untouched allocated zone:
-- Description: The user code may allocate objects that it will never
-- touch. In that case, the pattern will not be changed.
-- Strategy: There are no way to detect this error. Fortunately, this
-- error is really rare, and it is most probably a bug in the user
-- code, e.g. some uninitialized variable. It is (most of the time)
-- harmless: it influences the measure only if the untouched allocated
-- zone happens to be located at the outermost value of the stack
-- pointer for the whole execution.
procedure Initialize (Buffer_Size : Natural);
pragma Export (C, Initialize, "__gnat_stack_usage_initialize");
-- Initializes the size of the buffer that stores the results. Only the
-- first Buffer_Size results are stored. Any results that do not fit in
-- this buffer will be displayed on the fly.
procedure Fill_Stack (Analyzer : in out Stack_Analyzer);
-- Fill an area of the stack with the pattern Analyzer.Pattern. The size
-- of this area is Analyzer.Size. After the call to this procedure,
-- the memory will look like that:
--
-- Stack growing
-- ----------------------------------------------------------------------->
-- |<---------------------->|<----------------------------------->|
-- | Stack frame | Memory filled with Analyzer.Pattern |
-- | of Fill_Stack | |
-- | (deallocated at | |
-- | the end of the call) | |
-- ^ | |
-- Analyzer.Bottom_Of_Stack ^ |
-- Analyzer.Inner_Pattern_Mark ^
-- Analyzer.Outer_Pattern_Mark
procedure Initialize_Analyzer
(Analyzer : in out Stack_Analyzer;
Task_Name : String;
Size : Natural;
Bottom : Stack_Address;
Pattern : Word_32 := 16#DEAD_BEEF#);
-- Should be called before any use of a Stack_Analyzer, to initialize it.
-- Size is the size of the pattern zone. Bottom should be a close
-- approximation of the caller base frame address.
Is_Enabled : Boolean := False;
-- When this flag is true, then stack analysis is enabled
procedure Compute_Result (Analyzer : in out Stack_Analyzer);
-- Read the patern zone and deduce the stack usage. It should be called
-- from the same frame as Fill_Stack. If Analyzer.Probe is not null, an
-- array of Word_32 with Analyzer.Probe elements is allocated on
-- Compute_Result's stack frame. Probe can be used to detect the error:
-- "instrumentation threshold at reading". See above. After the call
-- to this procedure, the memory will look like:
--
-- Stack growing
-- ----------------------------------------------------------------------->
-- |<---------------------->|<-------------->|<--------->|<--------->|
-- | Stack frame | Array of | used | Memory |
-- | of Compute_Result | Analyzer.Probe | during | filled |
-- | (deallocated at | elements | the | with |
-- | the end of the call) | | execution | pattern |
-- | ^ | | |
-- | Inner_Pattern_Mark | | |
-- | | |
-- |<----------------------------------------------------> |
-- Stack used ^
-- Outer_Pattern_Mark
procedure Report_Result (Analyzer : Stack_Analyzer);
-- Store the results of the computation in memory, at the address
-- corresponding to the symbol __gnat_stack_usage_results. This is not
-- done inside Compute_Resuls in order to use as less stack as possible
-- within a task.
procedure Output_Results;
-- Print the results computed so far on the standard output. Should be
-- called when all tasks are dead.
pragma Export (C, Output_Results, "__gnat_stack_usage_output_results");
private
Task_Name_Length : constant := 32;
package Word_32_Addr is
new System.Address_To_Access_Conversions (Word_32);
type Stack_Analyzer is record
Task_Name : String (1 .. Task_Name_Length);
-- Name of the task
Size : Natural;
-- Size of the pattern zone
Pattern : Word_32;
-- Pattern used to recognize untouched memory
Inner_Pattern_Mark : Stack_Address;
-- Innermost bound of the pattern area on the stack
Outer_Pattern_Mark : Stack_Address;
-- Outermost bound of the pattern area on the stack
Outermost_Touched_Mark : Stack_Address;
-- Outermost address of the pattern area whose value it is pointing
-- at has been modified during execution. If the systematic error are
-- compensated, it is the outermost value of the stack pointer during
-- the execution.
Bottom_Of_Stack : Stack_Address;
-- Address of the bottom of the stack, as given by the caller of
-- Initialize_Analyzer.
Array_Address : System.Address;
-- Address of the array of Word_32 that represents the pattern zone
First_Is_Outermost : Boolean;
-- Set to true if the first element of the array of Word_32 that
-- represents the pattern zone is at the outermost address of the
-- pattern zone; false if it is the innermost address.
Result_Id : Positive;
-- Id of the result. If less than value given to gnatbind -u corresponds
-- to the location in the result array of result for the current task.
end record;
Environment_Task_Analyzer : Stack_Analyzer;
Compute_Environment_Task : Boolean;
type Task_Result is record
Task_Name : String (1 .. Task_Name_Length);
Measure : Natural;
Max_Size : Natural;
end record;
type Result_Array_Type is array (Positive range <>) of Task_Result;
type Result_Array_Ptr is access all Result_Array_Type;
Result_Array : Result_Array_Ptr;
pragma Export (C, Result_Array, "__gnat_stack_usage_results");
-- Exported in order to have an easy accessible symbol in when debugging
Next_Id : Positive := 1;
-- Id of the next stack analyzer
function Stack_Size
(SP_Low : Stack_Address;
SP_High : Stack_Address) return Natural;
pragma Inline (Stack_Size);
-- Return the size of a portion of stack delimeted by SP_High and SP_Low
-- (), i.e. the difference between SP_High and SP_Low. The storage element
-- pointed by SP_Low is not included in the size. Inlined to reduce the
-- size of the stack used by the instrumentation code.
end System.Stack_Usage;
|
-- $Header: /dc/uc/self/arcadia/ayacc/src/RCS/output_file_body.a,v 1.2 1993/05/31 22:36:35 self Exp self $
-- Copyright (c) 1990 Regents of the University of California.
-- All rights reserved.
--
-- The primary authors of ayacc were David Taback and Deepak Tolani.
-- Enhancements were made by Ronald J. Schmalz.
--
-- Send requests for ayacc information to ayacc-info@ics.uci.edu
-- Send bug reports for ayacc to ayacc-bugs@ics.uci.edu
--
-- Redistribution and use in source and binary forms are permitted
-- provided that the above copyright notice and this paragraph are
-- duplicated in all such forms and that any documentation,
-- advertising materials, and other materials related to such
-- distribution and use acknowledge that the software was developed
-- by the University of California, Irvine. The name of the
-- University may not be used to endorse or promote products derived
-- from this software without specific prior written permission.
-- THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
-- IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
-- WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-- Module : output_file_body.ada
-- Component of : ayacc
-- Version : 1.2
-- Date : 11/21/86 12:32:10
-- SCCS File : disk21~/rschm/hasee/sccs/ayacc/sccs/sxoutput_file_body.ada
-- $Header: /dc/uc/self/arcadia/ayacc/src/RCS/output_file_body.a,v 1.2 1993/05/31 22:36:35 self Exp self $
-- $Log: output_file_body.a,v $
-- Revision 1.2 1993/05/31 22:36:35 self
-- added exception handler when opening files
--
-- Revision 1.1 1993/05/31 22:05:03 self
-- Initial revision
--
--Revision 1.1 88/08/08 14:16:40 arcadia
--Initial revision
--
-- Revision 0.1 86/04/01 15:08:26 ada
-- This version fixes some minor bugs with empty grammars
-- and $$ expansion. It also uses vads5.1b enhancements
-- such as pragma inline.
--
--
-- Revision 0.0 86/02/19 18:37:50 ada
--
-- These files comprise the initial version of Ayacc
-- designed and implemented by David Taback and Deepak Tolani.
-- Ayacc has been compiled and tested under the Verdix Ada compiler
-- version 4.06 on a vax 11/750 running Unix 4.2BSD.
--
with Actions_File, Ayacc_File_Names, Lexical_Analyzer, Options, Parse_Table,
Parse_Template_File, Source_File, Text_IO;
use Actions_File, Ayacc_File_Names, Lexical_Analyzer, Options, Parse_Table,
Parse_Template_File, Source_File, Text_IO;
package body Output_File is
SCCS_ID : constant String := "@(#) output_file_body.ada, Version 1.2";
Outfile : File_Type;
procedure Open_Spec is
begin
Create(Outfile, Out_File, Get_Out_File_Name & "ds");
exception
when Name_Error | Use_Error =>
Put_Line("Ayacc: Error Opening """ & Get_Out_File_Name & "ds" & """.");
raise;
end Open_Spec;
procedure Close is
begin
Put_Line (Outfile, "end " & Main_Unit_Name & ";");
Close(Outfile);
end Close;
procedure Open_Body is
begin
Create(Outfile, Out_File, Get_Out_File_Name & "db");
exception
when Name_Error | Use_Error =>
Put_Line("Ayacc: Error Opening """ & Get_Out_File_Name & "db" & """.");
raise;
end Open_Body;
-- Make the parser body section by reading the source --
-- and template files and merging them appropriately --
procedure Make_Output_File is
Text : String(1..260);
Length : Natural;
I : Integer;
-- UMASS CODES :
Umass_Codes : Boolean := False;
-- Indicates whether or not current line of the template
-- is the Umass codes.
UCI_Codes_Deleted : Boolean := False;
-- Indicates whether or not current line of the template
-- is UCI codes which should be deleted in Ayacc-extension.
-- END OF UMASS CODES.
procedure Copy_Chunk is
begin
while not Source_File.Is_End_of_File loop
Source_File.Read_Line(Text, Length);
if Length > 1 then
I := 1;
while (I < Length - 1 and then Text(I) = ' ') loop
I := I + 1;
end loop;
if Text(I..I+1) = "##" then
exit;
end if;
end if;
Put_Line(Outfile, Text(1..Length));
end loop;
end Copy_Chunk;
begin
Open_Spec; -- Open the output file.
-- Read the first part of the source file up to '##'
-- or to end of file.
-- This is inteded to be put before the spec files package
-- clause
Copy_Chunk;
-- Emit the package clause
Put_Line (Outfile, "package " & Main_Unit_Name & " is ");
-- Read the second part of the source file up to '##'
-- or to end of file.
-- This is inteded to be put into the spec file
Copy_Chunk;
Close; -- The spec file
Open_Body; -- Open the output file.
-- Read the third part of the source file up to '##'
-- or to end of file.
-- This is inteded to be put before the body files package
-- clause
Copy_Chunk;
Put_Line (Outfile, "with " & Main_Unit_Name & ".Goto_Table;");
Put_Line (Outfile, "use " & Main_Unit_Name & ".Goto_Table;");
Put_Line (Outfile, "with " & Main_Unit_Name & ".Tokens;");
Put_Line (Outfile, "use " & Main_Unit_Name & ".Tokens;");
Put_Line (Outfile, "with " & Main_Unit_Name & ".Shift_Reduce;");
Put_Line (Outfile, "use " & Main_Unit_Name & ".Shift_Reduce;");
New_Line (Outfile);
Put_Line (Outfile, "package body " & Main_Unit_Name & " is ");
Put_line (Outfile, " package " & Main_Unit_Name & "_Goto renames " &
Main_Unit_Name & ".Goto_Table;");
Put_line (Outfile, " package " & Main_Unit_Name & "_Tokens renames " &
Main_Unit_Name & ".Tokens;");
Put_line (Outfile, " package " & Main_Unit_Name & "_Shift_Reduce " &
" renames " & Main_Unit_Name &
".Shift_Reduce;");
-- Read the fourth part of the source file up to '##'
-- or to end of file.
Copy_Chunk;
Parse_Template_File.Open;
-- Copy the header from the parse template
loop
Parse_Template_File.Read(Text,Length);
if Length > 1 and then Text(1..2) = "%%" then
exit;
else
-- UMASS CODES :
-- In the template, the codes between "-- UMASS CODES : " and
-- "-- END OF UMASS CODES." are specific to be used by Ayacc-extension.
-- Also the codes between "-- UCI CODES DELETED : " and
-- "-- END OF UCI CODES DELETED." should only be generated in
-- Ayacc and should be deleted in Ayacc-extension.
-- Ayacc-extension has more power in error recovery. So we
-- generate Umass codes only when Error_Recovery_Extension is True.
-- And we delete the necessary UCI codes when Error_Recovery_
-- Extension is True.
if Length = 16 and then Text(1..16) = "-- UMASS CODES :" then
Umass_Codes := True;
end if;
if Length = 22 and then Text(1..22) = "-- UCI CODES DELETED :" then
UCI_CODES_Deleted := True;
Parse_Template_File.Read(Text,Length);
-- We read next line because we do not want to generate
-- the comment "-- UCI CODES DELETED :" anyway.
elsif Length = 28 and then Text(1..28) = "-- END OF UCI CODES DELETED." then
UCI_CODES_Deleted := False;
Parse_Template_File.Read(Text,Length);
-- We read next line because we do not want to generate
-- the comment "-- END OF UCI CODES DELETED :" anyway.
end if;
if Options.Error_Recovery_Extension then
-- Do not generate UCI codes which should be deleted.
if not UCI_CODES_Deleted then
PUT_LINE(Outfile,Text(1..Length));
end if;
else
-- Do not generate UMASS codes.
if not Umass_Codes then
PUT_LINE(Outfile,Text(1..Length));
end if;
end if;
if Length = 22 and then Text(1..22) = "-- END OF UMASS CODES." then
Umass_Codes := False;
end if;
-- END OF UMASS CODES.
-- UCI CODES commented out :
-- The following line is commented out because it is done in Umass codes.
-- Put_Line(Outfile, Text(1..Length));
end if;
end loop;
Put_Line (Outfile, " package yy_goto_tables renames");
Put_Line (Outfile, " " & Goto_Tables_Unit_Name & ';');
Put_Line (Outfile, " package yy_shift_reduce_tables renames");
Put_Line (Outfile, " " & Shift_Reduce_Tables_Unit_Name & ';');
Put_Line (Outfile, " package yy_tokens renames");
Put_Line (Outfile, " " & Tokens_Unit_Name & ';');
-- UMASS CODES :
if Options.Error_Recovery_Extension then
Put_Line (OutFile, " -- UMASS CODES :" );
Put_Line (Outfile, " package yy_error_report renames");
Put_Line (OutFile, " " & Error_Report_Unit_Name & ";");
Put_Line (OutFile, " -- END OF UMASS CODES." );
end if;
-- END OF UMASS CODES.
-- Copy the first half of the parse template
loop
Parse_Template_File.Read(Text,Length);
if Length > 1 and then Text(1..2) = "%%" then
exit;
else
-- UMASS CODES :
-- In the template, the codes between "-- UMASS CODES : " and
-- "-- END OF UMASS CODES." are specific to be used by Ayacc-extension.
-- Also the codes between "-- UCI CODES DELETED : " and
-- "-- END OF UCI CODES DELETED." should only be generated in
-- Ayacc and should be deleted in Ayacc-extension.
-- Ayacc-extension has more power in error recovery. So we
-- generate Umass codes only when Error_Recovery_Extension is True.
-- And we delete the necessary UCI codes when Error_Recovery_
-- Extension is True.
if Length = 16 and then Text(1..16) = "-- UMASS CODES :" then
Umass_Codes := True;
end if;
if Length = 22 and then Text(1..22) = "-- UCI CODES DELETED :" then
UCI_CODES_Deleted := True;
Parse_Template_File.Read(Text,Length);
-- We read next line because we do not want to generate
-- the comment "-- UCI CODES DELETED :" anyway.
elsif Length = 28 and then Text(1..28) = "-- END OF UCI CODES DELETED." then
UCI_CODES_Deleted := False;
Parse_Template_File.Read(Text,Length);
-- We read next line because we do not want to generate
-- the comment "-- END OF UCI CODES DELETED :" anyway.
end if;
if Options.Error_Recovery_Extension then
-- Do not generate UCI codes which should be deleted.
if not UCI_CODES_Deleted then
PUT_LINE(Outfile,Text(1..Length));
end if;
else
-- Do not generate UMASS codes.
if not Umass_Codes then
PUT_LINE(Outfile,Text(1..Length));
end if;
end if;
if Length = 22 and then Text(1..22) = "-- END OF UMASS CODES." then
Umass_Codes := False;
end if;
-- END OF UMASS CODES.
-- UCI CODES commented out :
-- The following line is commented out because it is done in Umass codes.
-- Put_Line(Outfile, Text(1..Length));
end if;
end loop;
-- Copy declarations and procedures needed in the parse template
Put_Line (Outfile," DEBUG : constant boolean := " &
Boolean'Image (Options.Debug) & ';');
-- Consume Template Up To User Action Routines.
loop
Parse_Template_File.Read(Text,Length);
if Length > 1 and then Text(1..2) = "%%" then
exit;
else
-- UMASS CODES :
-- In the template, the codes between "-- UMASS CODES : " and
-- "-- END OF UMASS CODES." are specific to be used by Ayacc-extension.
-- Also the codes between "-- UCI CODES DELETED : " and
-- "-- END OF UCI CODES DELETED." should only be generated in
-- Ayacc and should be deleted in Ayacc-extension.
-- Ayacc-extension has more power in error recovery. So we
-- generate Umass codes only when Error_Recovery_Extension is True.
-- And we delete the necessary UCI codes when Error_Recovery_
-- Extension is True.
if Length = 16 and then Text(1..16) = "-- UMASS CODES :" then
Umass_Codes := True;
end if;
if Length = 22 and then Text(1..22) = "-- UCI CODES DELETED :" then
UCI_CODES_Deleted := True;
Parse_Template_File.Read(Text,Length);
-- We read next line because we do not want to generate
-- the comment "-- UCI CODES DELETED :" anyway.
elsif Length = 28 and then Text(1..28) = "-- END OF UCI CODES DELETED." then
UCI_CODES_Deleted := False;
Parse_Template_File.Read(Text,Length);
-- We read next line because we do not want to generate
-- the comment "-- END OF UCI CODES DELETED :" anyway.
end if;
if Options.Error_Recovery_Extension then
-- Do not generate UCI codes which should be deleted.
if not UCI_CODES_Deleted then
PUT_LINE(Outfile,Text(1..Length));
end if;
else
-- Do not generate UMASS codes.
if not Umass_Codes then
PUT_LINE(Outfile,Text(1..Length));
end if;
end if;
if Length = 22 and then Text(1..22) = "-- END OF UMASS CODES." then
Umass_Codes := False;
end if;
-- END OF UMASS CODES.
-- UCI CODES commented out :
-- The following line is commented out because it is done in Umass codes.
-- Put_Line(Outfile, Text(1..Length));
end if;
end loop;
Actions_File.Open(Actions_File.Read_File);
loop
exit when Actions_File.Is_End_of_File;
Actions_File.Read_Line(Text,Length);
Put_Line(Outfile, Text(1..Length));
end loop;
Actions_File.Delete;
-- Finish writing the template file
loop
exit when Parse_Template_File.Is_End_of_File;
Parse_Template_File.Read(Text,Length);
-- UMASS CODES :
-- In the template, the codes between "-- UMASS CODES : " and
-- "-- END OF UMASS CODES." are specific to be used by Ayacc-extension.
-- Also the codes between "-- UCI CODES DELETED : " and
-- "-- END OF UCI CODES DELETED." should only be generated in
-- Ayacc and should be deleted in Ayacc-extension.
-- Ayacc-extension has more power in error recovery. So we
-- generate Umass codes only when Error_Recovery_Extension is True.
-- And we delete the necessary UCI codes when Error_Recovery_
-- Extension is True.
if Length = 16 and then Text(1..16) = "-- UMASS CODES :" then
Umass_Codes := True;
end if;
if Length = 22 and then Text(1..22) = "-- UCI CODES DELETED :" then
UCI_CODES_Deleted := True;
Parse_Template_File.Read(Text,Length);
-- We read next line because we do not want to generate
-- the comment "-- UCI CODES DELETED :" anyway.
elsif Length = 28 and then Text(1..28) = "-- END OF UCI CODES DELETED." then
UCI_CODES_Deleted := False;
Parse_Template_File.Read(Text,Length);
-- We read next line because we do not want to generate
-- the comment "-- END OF UCI CODES DELETED :" anyway.
end if;
if Options.Error_Recovery_Extension then
-- Do not generate UCI codes which should be deleted.
if not UCI_CODES_Deleted then
PUT_LINE(Outfile,Text(1..Length));
end if;
else
-- Do not generate UMASS codes.
if not Umass_Codes then
PUT_LINE(Outfile,Text(1..Length));
end if;
end if;
if Length = 22 and then Text(1..22) = "-- END OF UMASS CODES." then
Umass_Codes := False;
end if;
-- END OF UMASS CODES.
-- UCI CODES commented out :
-- The following line is commented out because it is done in Umass codes.
-- Put_Line(Outfile, Text(1..Length));
end loop;
Parse_Template_File.Close;
-- Copy rest of input file after ##
while not Source_File.Is_End_of_File loop
Source_File.Read_Line(Text, Length);
-- UMASS CODES :
-- If the generated codes has the extension of
-- error recovery, there may be another section
-- for error reporting. So we return if we find "%%".
if Options.Error_Recovery_Extension then
if Length > 1 and then Text(1..2) = "%%" then
exit;
end if;
end if;
-- END OF UMASS CODES.
Put_Line(Outfile, Text(1..Length));
end loop;
Close;
end Make_Output_File;
end Output_File;
|
------------------------------------------------------------------------------
-- Copyright (c) 2011, Natacha Porté --
-- --
-- Permission to use, copy, modify, and distribute this software for any --
-- purpose with or without fee is hereby granted, provided that the above --
-- copyright notice and this permission notice appear in all copies. --
-- --
-- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES --
-- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF --
-- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR --
-- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES --
-- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN --
-- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF --
-- OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. --
------------------------------------------------------------------------------
with Ada.Containers.Indefinite_Vectors;
with Ada.Exceptions;
with Ada.Strings.Unbounded;
with Natools.Getopt_Long;
package body Natools.Getopt_Long_Tests is
package US renames Ada.Strings.Unbounded;
----------------------------------------
-- Dynamic command line argument list --
----------------------------------------
package String_Vectors is new Ada.Containers.Indefinite_Vectors
(Index_Type => Positive, Element_Type => String);
Command_Line : String_Vectors.Vector;
function Argument_Count return Natural;
function Argument (Number : Positive) return String;
function Argument_Count return Natural is
begin
return Natural (Command_Line.Length);
end Argument_Count;
function Argument (Number : Positive) return String is
begin
return Command_Line.Element (Number);
end Argument;
--------------------------------
-- Arguments used for testing --
--------------------------------
type Option_Id is
(Short_No_Arg, Short_No_Arg_2, Short_Opt_Arg, Short_Arg,
Long_No_Arg, Long_Opt_Arg, Long_Arg, Long_Ambiguous,
Mixed_No_Arg, Mixed_Opt_Arg, Mixed_Arg,
Command_Argument);
type Flag_Seen_Array is array (Option_Id) of Boolean;
type Flag_Argument_Array is array (Option_Id) of US.Unbounded_String;
Separator : constant Character := ';';
package Getopt is new Natools.Getopt_Long (Option_Id);
function Getopt_Config
(Posixly_Correct, Long_Only : Boolean)
return Getopt.Configuration;
-- Create the Getopt.Configuration object used for these tests.
function Getopt_Config
(Posixly_Correct, Long_Only : Boolean)
return Getopt.Configuration is
begin
return OD : Getopt.Configuration do
OD.Add_Option ('a', Getopt.No_Argument, Short_No_Arg);
OD.Add_Option ('q', Getopt.No_Argument, Short_No_Arg_2);
OD.Add_Option ('f', Getopt.Required_Argument, Short_Arg);
OD.Add_Option ('v', Getopt.Optional_Argument, Short_Opt_Arg);
OD.Add_Option ("aq", Getopt.No_Argument, Long_Ambiguous);
OD.Add_Option ("aquatic", Getopt.No_Argument, Long_No_Arg);
OD.Add_Option ("color", Getopt.Optional_Argument, Long_Opt_Arg);
OD.Add_Option ("input", Getopt.Required_Argument, Long_Arg);
OD.Add_Option ("execute", 'e', Getopt.Required_Argument, Mixed_Arg);
OD.Add_Option ("ignore-case", 'i', Getopt.No_Argument, Mixed_No_Arg);
OD.Add_Option ("write", 'w', Getopt.Optional_Argument, Mixed_Opt_Arg);
OD.Posixly_Correct (Posixly_Correct);
OD.Use_Long_Only (Long_Only);
end return;
end Getopt_Config;
-------------------
-- Test Handlers --
-------------------
package Handlers is
type Basic is new Getopt.Handlers.Callback with record
Flag_Seen : Flag_Seen_Array := (others => False);
Flag_Argument : Flag_Argument_Array;
Flag_Error : String_Vectors.Vector;
end record;
overriding
procedure Option (Handler : in out Basic;
Id : Option_Id;
Argument : String);
-- Process the given option, by recording it as seen in Flag_Seen
-- and appending the argument to Flag_Argument.
overriding
procedure Argument (Handler : in out Basic;
Argument : String);
-- Process the given argument, by recording it
-- in Flag_Seen (Command_Argument) and appending it
-- to Flag_Argument (Command_Argument).
not overriding
procedure Dump (Handler : Basic;
Report : in out NT.Reporter'Class);
-- Dump the current state (Flag_* variables) into the Report.
type Error_Count is record
Missing_Argument_Long : Natural := 0;
Missing_Argument_Short : Natural := 0;
Unexpected_Argument : Natural := 0;
Unknown_Long_Option : Natural := 0;
Unknown_Short_Option : Natural := 0;
end record;
type Recovering is new Basic with record
Count : Error_Count;
end record;
procedure Increment (Number : in out Natural);
overriding
procedure Missing_Argument
(Handler : in out Recovering;
Id : Option_Id;
Name : Getopt.Any_Name);
overriding
procedure Unexpected_Argument
(Handler : in out Recovering;
Id : Option_Id;
Name : Getopt.Any_Name;
Argument : String);
overriding
procedure Unknown_Option
(Handler : in out Recovering;
Name : Getopt.Any_Name);
end Handlers;
package body Handlers is
overriding
procedure Option (Handler : in out Basic;
Id : Option_Id;
Argument : String) is
begin
Handler.Flag_Seen (Id) := True;
US.Append (Handler.Flag_Argument (Id), Argument & Separator);
end Option;
overriding
procedure Argument (Handler : in out Basic;
Argument : String) is
begin
Option (Handler, Command_Argument, Argument);
end Argument;
not overriding
procedure Dump (Handler : Basic;
Report : in out NT.Reporter'Class)
is
procedure Process (Position : String_Vectors.Cursor);
function Seen_String (Seen : Boolean) return String;
procedure Process (Position : String_Vectors.Cursor) is
begin
Report.Info ("Error """ & String_Vectors.Element (Position) & '"');
end Process;
function Seen_String (Seen : Boolean) return String is
begin
if Seen then
return "Seen";
else
return "Not seen";
end if;
end Seen_String;
begin
Report.Info ("Flags:");
for Id in Option_Id loop
Report.Info (" "
& Option_Id'Image (Id) & ": "
& Seen_String (Handler.Flag_Seen (Id)) & ", """
& US.To_String (Handler.Flag_Argument (Id)) & '"');
end loop;
Handler.Flag_Error.Iterate (Process'Access);
end Dump;
procedure Increment (Number : in out Natural) is
begin
Number := Number + 1;
end Increment;
overriding
procedure Missing_Argument
(Handler : in out Recovering;
Id : Option_Id;
Name : Getopt.Any_Name)
is
pragma Unreferenced (Id);
begin
case Name.Style is
when Getopt.Short =>
Increment (Handler.Count.Missing_Argument_Short);
when Getopt.Long =>
Increment (Handler.Count.Missing_Argument_Long);
end case;
end Missing_Argument;
overriding
procedure Unexpected_Argument
(Handler : in out Recovering;
Id : Option_Id;
Name : Getopt.Any_Name;
Argument : String)
is
pragma Unreferenced (Id);
pragma Unreferenced (Name);
pragma Unreferenced (Argument);
begin
Increment (Handler.Count.Unexpected_Argument);
end Unexpected_Argument;
overriding
procedure Unknown_Option
(Handler : in out Recovering;
Name : Getopt.Any_Name) is
begin
case Name.Style is
when Getopt.Short =>
Increment (Handler.Count.Unknown_Short_Option);
when Getopt.Long =>
Increment (Handler.Count.Unknown_Long_Option);
end case;
end Unknown_Option;
end Handlers;
----------------------------
-- Generic test procedure --
----------------------------
procedure Test
(Report : in out NT.Reporter'Class;
Name : String;
Expected_Seen : Flag_Seen_Array;
Expected_Argument : Flag_Argument_Array;
Expected_Error : String_Vectors.Vector := String_Vectors.Empty_Vector;
Posixly_Correct : Boolean := True;
Long_Only : Boolean := False);
procedure Test
(Report : in out NT.Reporter'Class;
Name : String;
Expected_Seen : Flag_Seen_Array;
Expected_Argument : Flag_Argument_Array;
Expected_Error : String_Vectors.Vector := String_Vectors.Empty_Vector;
Posixly_Correct : Boolean := True;
Long_Only : Boolean := False)
is
use type String_Vectors.Vector;
Config : constant Getopt.Configuration
:= Getopt_Config (Posixly_Correct, Long_Only);
Handler : Handlers.Basic;
begin
begin
Getopt.Process
(Config => Config,
Handler => Handler,
Argument_Count => Argument_Count'Access,
Argument => Argument'Access);
exception
when Error : Getopt.Option_Error =>
Handler.Flag_Error.Append
(Ada.Exceptions.Exception_Message (Error));
end;
if Handler.Flag_Seen = Expected_Seen and
Handler.Flag_Argument = Expected_Argument and
Handler.Flag_Error = Expected_Error
then
Report.Item (Name, NT.Success);
else
Report.Item (Name, NT.Fail);
Handler.Dump (Report);
end if;
exception
when Error : others =>
Report.Report_Exception (Name, Error);
Handler.Dump (Report);
end Test;
---------------------------
-- Public test functions --
---------------------------
procedure All_Tests (Report : in out NT.Reporter'Class) is
begin
Test_Arguments (Report);
Test_Empty (Report);
Test_Error_Callbacks (Report);
Test_Everything (Report);
Test_Long (Report);
Test_Long_Only (Report);
Test_Long_Partial (Report);
Test_Long_Partial_Ambiguous (Report);
Test_Missing_Argument_Long (Report);
Test_Missing_Argument_Short (Report);
Test_Mixed_Arg (Report);
Test_Mixed_No_Arg (Report);
Test_Posixly_Correct (Report);
Test_Short_Argument (Report);
Test_Short_Compact (Report);
Test_Short_Expanded (Report);
Test_Unexpected_Argument (Report);
Test_Unknown_Long (Report);
Test_Unknown_Short (Report);
end All_Tests;
procedure Test_Arguments (Report : in out NT.Reporter'Class) is
begin
Command_Line.Clear;
Command_Line.Append ("Argument 1");
Command_Line.Append ("Argument 2");
Command_Line.Append ("Argument 3");
Test (Report, "Arguments without flag",
(Command_Argument => True,
others => False),
(Command_Argument
=> US.To_Unbounded_String ("Argument 1;Argument 2;Argument 3;"),
others => US.Null_Unbounded_String));
end Test_Arguments;
procedure Test_Empty (Report : in out NT.Reporter'Class) is
begin
Command_Line.Clear;
Test (Report, "Empty command line",
(others => False),
(others => US.Null_Unbounded_String));
end Test_Empty;
procedure Test_Error_Callbacks (Report : in out NT.Reporter'Class) is
procedure Local_Test
(Name : String;
Expected_Seen : Flag_Seen_Array;
Expected_Argument : Flag_Argument_Array;
Expected_Count : Handlers.Error_Count);
procedure Local_Test
(Name : String;
Expected_Seen : Flag_Seen_Array;
Expected_Argument : Flag_Argument_Array;
Expected_Count : Handlers.Error_Count)
is
use type Handlers.Error_Count;
Config : constant Getopt.Configuration := Getopt_Config (True, False);
Handler : Handlers.Recovering;
begin
Getopt.Process
(Config => Config,
Handler => Handler,
Argument_Count => Argument_Count'Access,
Argument => Argument'Access);
if Handler.Count /= Expected_Count then
Report.Item (Name, NT.Fail);
if Handler.Count.Missing_Argument_Long
/= Expected_Count.Missing_Argument_Long
then
Report.Info ("Missing argument to long option callback called"
& Natural'Image (Handler.Count.Missing_Argument_Long)
& " times, expected"
& Natural'Image (Expected_Count.Missing_Argument_Long));
end if;
if Handler.Count.Missing_Argument_Short
/= Expected_Count.Missing_Argument_Short
then
Report.Info ("Missing argument to short option callback called"
& Natural'Image (Handler.Count.Missing_Argument_Short)
& " times, expected"
& Natural'Image (Expected_Count.Missing_Argument_Short));
end if;
if Handler.Count.Unexpected_Argument
/= Expected_Count.Unexpected_Argument
then
Report.Info ("Unexpected argument callback called"
& Natural'Image (Handler.Count.Unexpected_Argument)
& " times, expected"
& Natural'Image (Expected_Count.Unexpected_Argument));
end if;
if Handler.Count.Unknown_Long_Option
/= Expected_Count.Unknown_Long_Option
then
Report.Info ("Unknown long option callback called"
& Natural'Image (Handler.Count.Unknown_Long_Option)
& " times, expected"
& Natural'Image (Expected_Count.Unknown_Long_Option));
end if;
if Handler.Count.Unknown_Short_Option
/= Expected_Count.Unknown_Short_Option
then
Report.Info ("Unknown short option callback called"
& Natural'Image (Handler.Count.Unknown_Short_Option)
& " times, expected"
& Natural'Image (Expected_Count.Unknown_Short_Option));
end if;
elsif Handler.Flag_Seen /= Expected_Seen or
Handler.Flag_Argument /= Expected_Argument
then
Report.Item (Name, NT.Fail);
Handler.Dump (Report);
else
Report.Item (Name, NT.Success);
end if;
exception
when Error : others =>
Report.Report_Exception (Name, Error);
Handler.Dump (Report);
end Local_Test;
begin
Report.Section ("Error-handling callbacks");
Command_Line.Clear;
Command_Line.Append ("-af");
Local_Test ("Missing argument for short option",
(Short_No_Arg => True, others => False),
(Short_No_Arg => US.To_Unbounded_String (";"),
others => US.Null_Unbounded_String),
(Missing_Argument_Short => 1, others => 0));
Command_Line.Clear;
Command_Line.Append ("--color");
Command_Line.Append ("--input");
Local_Test ("Missing argument for long option",
(Long_Opt_Arg => True, others => False),
(Long_Opt_Arg => US.To_Unbounded_String (";"),
others => US.Null_Unbounded_String),
(Missing_Argument_Long => 1, others => 0));
Command_Line.Clear;
Command_Line.Append ("--aquatic=extra");
Local_Test ("Unexpected argument",
(others => False),
(others => US.Null_Unbounded_String),
(Unexpected_Argument => 1, others => 0));
Command_Line.Clear;
Command_Line.Append ("-a");
Command_Line.Append ("--ignore-case=true");
Command_Line.Append ("--execute");
Command_Line.Append ("command");
Command_Line.Append ("file");
Local_Test ("Process continues after caught unexpected argument",
(Short_No_Arg | Mixed_Arg | Command_Argument => True,
others => False),
(Short_No_Arg => US.To_Unbounded_String (";"),
Mixed_Arg => US.To_Unbounded_String ("command;"),
Command_Argument => US.To_Unbounded_String ("file;"),
others => US.Null_Unbounded_String),
(Unexpected_Argument => 1, others => 0));
Command_Line.Clear;
Command_Line.Append ("-abqffoo");
Local_Test ("Unknown short option",
(Short_No_Arg | Short_No_Arg_2 | Short_Arg => True,
others => False),
(Short_No_Arg => US.To_Unbounded_String (";"),
Short_No_Arg_2 => US.To_Unbounded_String (";"),
Short_Arg => US.To_Unbounded_String ("foo;"),
others => US.Null_Unbounded_String),
(Unknown_Short_Option => 1, others => 0));
Command_Line.Clear;
Command_Line.Append ("--execute");
Command_Line.Append ("command");
Command_Line.Append ("--unknown=argument");
Command_Line.Append ("file");
Local_Test ("Unknown long option",
(Mixed_Arg | Command_Argument => True, others => False),
(Mixed_Arg => US.To_Unbounded_String ("command;"),
Command_Argument => US.To_Unbounded_String ("file;"),
others => US.Null_Unbounded_String),
(Unknown_Long_Option => 1, others => 0));
Command_Line.Clear;
Command_Line.Append ("--ignore-case");
Command_Line.Append ("-bffoo");
Command_Line.Append ("--aq=unexpected");
Command_Line.Append ("-ecommand");
Command_Line.Append ("--unknown");
Command_Line.Append ("--input");
Local_Test ("All errors simultaneously",
(Short_Arg | Mixed_No_Arg | Mixed_Arg => True,
others => False),
(Short_Arg => US.To_Unbounded_String ("foo;"),
Mixed_Arg => US.To_Unbounded_String ("command;"),
Mixed_No_Arg => US.To_Unbounded_String (";"),
others => US.Null_Unbounded_String),
(Missing_Argument_Long => 1,
Missing_Argument_Short => 0,
Unexpected_Argument => 1,
Unknown_Long_Option => 1,
Unknown_Short_Option => 1));
Report.End_Section;
end Test_Error_Callbacks;
procedure Test_Everything (Report : in out NT.Reporter'Class) is
begin
Command_Line.Clear;
Command_Line.Append ("--write=arg 1");
Command_Line.Append ("-awvfarg 2");
Command_Line.Append ("--aq");
Command_Line.Append ("-e");
Command_Line.Append ("arg 3");
Command_Line.Append ("--ignore-case");
Command_Line.Append ("--color=arg 4");
Command_Line.Append ("-iv");
Command_Line.Append ("--execute=arg 5");
Command_Line.Append ("--color");
Command_Line.Append ("--input");
Command_Line.Append ("arg 6");
Command_Line.Append ("arg 7");
Command_Line.Append ("arg 8");
Test (Report, "Everything together",
(Short_No_Arg_2 | Long_No_Arg => False, others => True),
(Short_No_Arg => US.To_Unbounded_String (";"),
Short_No_Arg_2 => US.Null_Unbounded_String,
Short_Arg => US.To_Unbounded_String ("arg 2;"),
Short_Opt_Arg => US.To_Unbounded_String (";;"),
Long_Ambiguous => US.To_Unbounded_String (";"),
Long_No_Arg => US.Null_Unbounded_String,
Long_Opt_Arg => US.To_Unbounded_String ("arg 4;;"),
Long_Arg => US.To_Unbounded_String ("arg 6;"),
Mixed_Arg => US.To_Unbounded_String ("arg 3;arg 5;"),
Mixed_No_Arg => US.To_Unbounded_String (";;"),
Mixed_Opt_Arg => US.To_Unbounded_String ("arg 1;;"),
Command_Argument => US.To_Unbounded_String ("arg 7;arg 8;")));
end Test_Everything;
procedure Test_Long (Report : in out NT.Reporter'Class) is
begin
Command_Line.Clear;
Command_Line.Append ("--aquatic");
Command_Line.Append ("--input=i equal");
Command_Line.Append ("--color=c equal");
Command_Line.Append ("--input");
Command_Line.Append ("i space");
Command_Line.Append ("--color");
Command_Line.Append ("c space");
Command_Line.Append ("top level");
Test (Report, "Long flags",
(Long_No_Arg | Long_Opt_Arg | Long_Arg | Command_Argument => True,
others => False),
(Long_No_Arg => US.To_Unbounded_String (";"),
Long_Opt_Arg => US.To_Unbounded_String ("c equal;;"),
Long_Arg => US.To_Unbounded_String ("i equal;i space;"),
Command_Argument => US.To_Unbounded_String ("c space;top level;"),
others => US.Null_Unbounded_String));
end Test_Long;
procedure Test_Long_Only (Report : in out NT.Reporter'Class) is
begin
Command_Line.Clear;
Command_Line.Append ("-aq");
-- Can be either 'a' and 'q' short flags or "aq" long flag, depending
-- on Long_Only parameter
-- Without Long_Only (default)
Test (Report, "Long_Only disabled (default)",
(Short_No_Arg | Short_No_Arg_2 => True, others => False),
(Short_No_Arg | Short_No_Arg_2 => US.To_Unbounded_String (";"),
others => US.Null_Unbounded_String),
Long_Only => False);
-- With Long_Only
Test (Report, "Long_Only enabled",
(Long_Ambiguous => True, others => False),
(Long_Ambiguous => US.To_Unbounded_String (";"),
others => US.Null_Unbounded_String),
Long_Only => True);
end Test_Long_Only;
procedure Test_Long_Partial (Report : in out NT.Reporter'Class) is
begin
Command_Line.Clear;
Command_Line.Append ("--aqu");
Command_Line.Append ("--co=foo");
Command_Line.Append ("--in");
Command_Line.Append ("bar");
Test (Report, "Partial matches for long flags",
(Long_No_Arg | Long_Opt_Arg | Long_Arg => True, others => False),
(Long_No_Arg => US.To_Unbounded_String (";"),
Long_Opt_Arg => US.To_Unbounded_String ("foo;"),
Long_Arg => US.To_Unbounded_String ("bar;"),
others => US.Null_Unbounded_String));
end Test_Long_Partial;
procedure Test_Long_Partial_Ambiguous (Report : in out NT.Reporter'Class) is
begin
Command_Line.Clear;
Command_Line.Append ("--i");
-- partial match for both "input" and "ignore-case" long flags
Test (Report, "Ambiguous partial match for long flags",
(others => False),
(others => US.Null_Unbounded_String),
String_Vectors.To_Vector ("Unknown option --i", 1));
Command_Line.Clear;
Command_Line.Append ("--aq");
-- partial match for both "aq" and "aquatic" long flags
-- but exact match is preferred
Test (Report, "Ambiguous exact match for long flags",
(Long_Ambiguous => True, others => False),
(Long_Ambiguous => US.To_Unbounded_String (";"),
others => US.Null_Unbounded_String));
end Test_Long_Partial_Ambiguous;
procedure Test_Missing_Argument_Long (Report : in out NT.Reporter'Class) is
begin
Command_Line.Clear;
Command_Line.Append ("--color");
Command_Line.Append ("--input");
Test (Report, "Missing argument for long option",
(Long_Opt_Arg => True, others => False),
(Long_Opt_Arg => US.To_Unbounded_String (";"),
others => US.Null_Unbounded_String),
String_Vectors.To_Vector
("Missing argument to option --input", 1));
end Test_Missing_Argument_Long;
procedure Test_Missing_Argument_Short (Report : in out NT.Reporter'Class) is
begin
Command_Line.Clear;
Command_Line.Append ("-v");
Command_Line.Append ("-f");
Test (Report, "Missing argument for long option",
(Short_Opt_Arg => True, others => False),
(Short_Opt_Arg => US.To_Unbounded_String (";"),
others => US.Null_Unbounded_String),
String_Vectors.To_Vector ("Missing argument to option -f", 1));
end Test_Missing_Argument_Short;
procedure Test_Mixed_Arg (Report : in out NT.Reporter'Class) is
begin
Command_Line.Clear;
Command_Line.Append ("-efoo");
Command_Line.Append ("-qe");
Command_Line.Append ("bar");
Command_Line.Append ("-aebaz");
Command_Line.Append ("--execute=long");
Test (Report, "Short and long options with arguments",
(Mixed_Arg | Short_No_Arg | Short_No_Arg_2 => True,
others => False),
(Mixed_Arg => US.To_Unbounded_String ("foo;bar;baz;long;"),
Short_No_Arg | Short_No_Arg_2 => US.To_Unbounded_String (";"),
others => US.Null_Unbounded_String));
end Test_Mixed_Arg;
procedure Test_Mixed_No_Arg (Report : in out NT.Reporter'Class) is
begin
Command_Line.Clear;
Command_Line.Append ("-ai");
Command_Line.Append ("--ignore-case");
Test (Report, "Short and long options without arguments",
(Mixed_No_Arg | Short_No_Arg => True, others => False),
(Mixed_No_Arg => US.To_Unbounded_String (";;"),
Short_No_Arg => US.To_Unbounded_String (";"),
others => US.Null_Unbounded_String));
end Test_Mixed_No_Arg;
procedure Test_Posixly_Correct (Report : in out NT.Reporter'Class) is
begin
Command_Line.Clear;
Command_Line.Append ("-a");
Command_Line.Append ("top level");
Command_Line.Append ("-q");
-- Posixly_Correct defines whether this "-q" is a top-level argument
-- or a short flag
-- With the flag
Test (Report, "Posixly correct behavior",
(Short_No_Arg | Command_Argument => True,
others => False),
(Short_No_Arg => US.To_Unbounded_String (";"),
Command_Argument => US.To_Unbounded_String ("top level;-q;"),
others => US.Null_Unbounded_String),
Posixly_Correct => True);
-- Without the flag
Test (Report, "GNU (posixly incorrect) behavior",
(Short_No_Arg | Short_No_Arg_2 | Command_Argument => True,
others => False),
(Short_No_Arg | Short_No_Arg_2 => US.To_Unbounded_String (";"),
Command_Argument => US.To_Unbounded_String ("top level;"),
others => US.Null_Unbounded_String),
Posixly_Correct => False);
end Test_Posixly_Correct;
procedure Test_Short_Argument (Report : in out NT.Reporter'Class) is
begin
Command_Line.Clear;
Command_Line.Append ("-faq");
-- "aq" is argument for 'f' short flag, not 'a' and 'q' short flags
Command_Line.Append ("-f");
Command_Line.Append ("-a");
-- "-a" is argument for 'f' short flag, not 'a' short flag
Command_Line.Append ("-v");
Command_Line.Append ("bar");
-- "bar" is top level argument, because optional argument for short
-- flags are never set
Test (Report, "Arguments to short flags",
(Short_Arg | Short_Opt_Arg | Command_Argument => True,
others => False),
(Short_Arg => US.To_Unbounded_String ("aq;-a;"),
Short_Opt_Arg => US.To_Unbounded_String (";"),
Command_Argument => US.To_Unbounded_String ("bar;"),
others => US.Null_Unbounded_String));
end Test_Short_Argument;
procedure Test_Short_Compact (Report : in out NT.Reporter'Class) is
begin
Command_Line.Clear;
Command_Line.Append ("-avq");
-- "q" is not argument to 'v' short flag, but a short flag itself
Test (Report, "Argumentless compact short flags",
(Short_No_Arg | Short_No_Arg_2 | Short_Opt_Arg => True,
others => False),
(Short_No_Arg | Short_No_Arg_2 | Short_Opt_Arg =>
US.To_Unbounded_String (";"),
others => US.Null_Unbounded_String));
end Test_Short_Compact;
procedure Test_Short_Expanded (Report : in out NT.Reporter'Class) is
begin
Command_Line.Clear;
Command_Line.Append ("-a");
Command_Line.Append ("-v");
Command_Line.Append ("-q");
Test (Report, "Argumentless expanded short flags",
(Short_No_Arg | Short_No_Arg_2 | Short_Opt_Arg => True,
others => False),
(Short_No_Arg | Short_No_Arg_2 | Short_Opt_Arg =>
US.To_Unbounded_String (";"),
others => US.Null_Unbounded_String));
end Test_Short_Expanded;
procedure Test_Unexpected_Argument (Report : in out NT.Reporter'Class) is
begin
Command_Line.Clear;
Command_Line.Append ("--color=foo");
Command_Line.Append ("--aq=bar");
Test (Report, "Unexpected argument to long option",
(Long_Opt_Arg => True, others => False),
(Long_Opt_Arg => US.To_Unbounded_String ("foo;"),
others => US.Null_Unbounded_String),
String_Vectors.To_Vector
("Unexpected argument ""bar"" to option --aq", 1));
end Test_Unexpected_Argument;
procedure Test_Unknown_Long (Report : in out NT.Reporter'Class) is
begin
Command_Line.Clear;
Command_Line.Append ("--long-flag");
Test (Report, "Unknown long flag",
(others => False), (others => US.Null_Unbounded_String),
String_Vectors.To_Vector ("Unknown option --long-flag", 1));
end Test_Unknown_Long;
procedure Test_Unknown_Short (Report : in out NT.Reporter'Class) is
begin
Command_Line.Clear;
Command_Line.Append ("-g");
Test (Report, "Unknown short flag",
(others => False), (others => US.Null_Unbounded_String),
String_Vectors.To_Vector ("Unknown option -g", 1));
end Test_Unknown_Short;
end Natools.Getopt_Long_Tests;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.