content stringlengths 23 1.05M |
|---|
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- G N A T L B R --
-- --
-- B o d y --
-- --
-- $Revision$
-- --
-- Copyright (C) 1997-2000 Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 2, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING. If not, write --
-- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
-- MA 02111-1307, USA. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- Program to create, set, or delete an alternate runtime library.
-- Works by calling an appropriate target specific Makefile residing
-- in the default library object (e.g. adalib) directory from the context
-- of the new library objects directory.
-- Command line arguments are:
-- 1st: --[create | set | delete]=<directory_spec>
-- --create : Build a library
-- --set : Set environment variables to point to a library
-- --delete : Delete a library
-- 2nd: --config=<file_spec>
-- A -gnatg valid file containing desired configuration pragmas
-- This program is currently used only on Alpha/VMS
with Ada.Command_Line; use Ada.Command_Line;
with Ada.Text_IO; use Ada.Text_IO;
with GNAT.OS_Lib; use GNAT.OS_Lib;
with Gnatvsn; use Gnatvsn;
with Interfaces.C_Streams; use Interfaces.C_Streams;
with Osint; use Osint;
with Sdefault; use Sdefault;
with System;
procedure GnatLbr is
pragma Ident (Gnat_Version_String);
type Lib_Mode is (None, Create, Set, Delete);
Next_Arg : Integer;
Mode : Lib_Mode := None;
ADC_File : String_Access := null;
Lib_Dir : String_Access := null;
Make : constant String := "make";
Make_Path : String_Access;
procedure Create_Directory (Name : System.Address; Mode : Integer);
pragma Import (C, Create_Directory, "mkdir");
begin
if Argument_Count = 0 then
Put ("Usage: ");
Put_Line
("gnatlbr --[create|set|delete]=<directory> [--config=<file>]");
Exit_Program (E_Fatal);
end if;
Next_Arg := 1;
loop
exit when Next_Arg > Argument_Count;
Process_One_Arg : declare
Arg : String := Argument (Next_Arg);
begin
if Arg'Length > 9 and then Arg (1 .. 9) = "--create=" then
if Mode = None then
Mode := Create;
Lib_Dir := new String'(Arg (10 .. Arg'Last));
else
Put_Line (Standard_Error, "Error: Multiple modes specified");
Exit_Program (E_Fatal);
end if;
elsif Arg'Length > 6 and then Arg (1 .. 6) = "--set=" then
if Mode = None then
Mode := Set;
Lib_Dir := new String'(Arg (7 .. Arg'Last));
else
Put_Line (Standard_Error, "Error: Multiple modes specified");
Exit_Program (E_Fatal);
end if;
elsif Arg'Length > 9 and then Arg (1 .. 9) = "--delete=" then
if Mode = None then
Mode := Delete;
Lib_Dir := new String'(Arg (10 .. Arg'Last));
else
Put_Line (Standard_Error, "Error: Multiple modes specified");
Exit_Program (E_Fatal);
end if;
elsif Arg'Length > 9 and then Arg (1 .. 9) = "--config=" then
if ADC_File /= null then
Put_Line (Standard_Error,
"Error: Multiple gnat.adc files specified");
Exit_Program (E_Fatal);
end if;
ADC_File := new String'(Arg (10 .. Arg'Last));
else
Put_Line (Standard_Error, "Error: Unrecognized option: " & Arg);
Exit_Program (E_Fatal);
end if;
end Process_One_Arg;
Next_Arg := Next_Arg + 1;
end loop;
case Mode is
when Create =>
-- Validate arguments
if Lib_Dir = null then
Put_Line (Standard_Error, "Error: No library directory specified");
Exit_Program (E_Fatal);
end if;
if Is_Directory (Lib_Dir.all) then
Put_Line (Standard_Error,
"Error:" & Lib_Dir.all & " already exists");
Exit_Program (E_Fatal);
end if;
if ADC_File = null then
Put_Line (Standard_Error,
"Error: No configuration file specified");
Exit_Program (E_Fatal);
end if;
if not Is_Regular_File (ADC_File.all) then
Put_Line (Standard_Error,
"Error: " & ADC_File.all & " doesn't exist");
Exit_Program (E_Fatal);
end if;
Create_Block : declare
Success : Boolean;
Make_Args : Argument_List (1 .. 9);
C_Lib_Dir : String := Lib_Dir.all & ASCII.Nul;
C_ADC_File : String := ADC_File.all & ASCII.Nul;
F_ADC_File : String (1 .. max_path_len);
F_ADC_File_Len : Integer := max_path_len;
Include_Dirs : Integer;
Object_Dirs : Integer;
Include_Dir : array (Integer range 1 .. 256) of String_Access;
Object_Dir : array (Integer range 1 .. 256) of String_Access;
Include_Dir_Name : String_Access;
Object_Dir_Name : String_Access;
begin
-- Create the new top level library directory
if not Is_Directory (Lib_Dir.all) then
Create_Directory (C_Lib_Dir'Address, 8#755#);
end if;
full_name (C_ADC_File'Address, F_ADC_File'Address);
for I in 1 .. max_path_len loop
if F_ADC_File (I) = ASCII.Nul then
F_ADC_File_Len := I - 1;
exit;
end if;
end loop;
--
-- Make a list of the default library source and object
-- directories. Usually only one, except on VMS where
-- there are two.
--
Include_Dirs := 0;
Include_Dir_Name := String_Access (Include_Dir_Default_Name);
Get_Next_Dir_In_Path_Init (String_Access (Include_Dir_Name));
loop
declare
Dir : String_Access := String_Access
(Get_Next_Dir_In_Path (String_Access (Include_Dir_Name)));
begin
exit when Dir = null;
Include_Dirs := Include_Dirs + 1;
Include_Dir (Include_Dirs)
:= String_Access (Normalize_Directory_Name (Dir.all));
end;
end loop;
Object_Dirs := 0;
Object_Dir_Name := String_Access (Object_Dir_Default_Name);
Get_Next_Dir_In_Path_Init (String_Access (Object_Dir_Name));
loop
declare
Dir : String_Access := String_Access
(Get_Next_Dir_In_Path (String_Access (Object_Dir_Name)));
begin
exit when Dir = null;
Object_Dirs := Object_Dirs + 1;
Object_Dir (Object_Dirs)
:= String_Access (Normalize_Directory_Name (Dir.all));
end;
end loop;
-- "Make" an alternate sublibrary for each default sublibrary.
for Dirs in 1 .. Object_Dirs loop
Make_Args (1) :=
new String'("-C");
Make_Args (2) :=
new String'(Lib_Dir.all);
-- Resolve /gnu on VMS by converting to host format and then
-- convert resolved path back to canonical format for the
-- make program. This fixes the problem that can occur when
-- GNU: is a search path pointing to multiple versions of GNAT.
Make_Args (3) :=
new String'("ADA_INCLUDE_PATH=" &
To_Canonical_Dir_Spec
(To_Host_Dir_Spec
(Include_Dir (Dirs).all, True).all, True).all);
Make_Args (4) :=
new String'("ADA_OBJECTS_PATH=" &
To_Canonical_Dir_Spec
(To_Host_Dir_Spec
(Object_Dir (Dirs).all, True).all, True).all);
Make_Args (5) :=
new String'("GNAT_ADC_FILE="
& F_ADC_File (1 .. F_ADC_File_Len));
Make_Args (6) :=
new String'("LIBRARY_VERSION=" & '"' & Library_Version & '"');
Make_Args (7) :=
new String'("-f");
Make_Args (8) :=
new String'(Object_Dir (Dirs).all & "Makefile.lib");
Make_Args (9) :=
new String'("create");
Make_Path := Locate_Exec_On_Path (Make);
Put (Make);
for I in 1 .. Make_Args'Last loop
Put (" ");
Put (Make_Args (I).all);
end loop;
New_Line;
Spawn (Make_Path.all, Make_Args, Success);
if not Success then
Put_Line (Standard_Error, "Error: Make failed");
Exit_Program (E_Fatal);
end if;
end loop;
end Create_Block;
when Set =>
-- Validate arguments.
if Lib_Dir = null then
Put_Line (Standard_Error,
"Error: No library directory specified");
Exit_Program (E_Fatal);
end if;
if not Is_Directory (Lib_Dir.all) then
Put_Line (Standard_Error,
"Error: " & Lib_Dir.all & " doesn't exist");
Exit_Program (E_Fatal);
end if;
if ADC_File = null then
Put_Line (Standard_Error,
"Error: No configuration file specified");
Exit_Program (E_Fatal);
end if;
if not Is_Regular_File (ADC_File.all) then
Put_Line (Standard_Error,
"Error: " & ADC_File.all & " doesn't exist");
Exit_Program (E_Fatal);
end if;
-- Give instructions.
Put_Line ("Copy the contents of "
& ADC_File.all & " into your GNAT.ADC file");
Put_Line ("and use GNAT Make qualifier /OBJECT_SEARCH=("
& To_Host_Dir_Spec
(Lib_Dir (Lib_Dir'First .. Lib_Dir'Last) & "/declib", False).all
& ","
& To_Host_Dir_Spec
(Lib_Dir (Lib_Dir'First .. Lib_Dir'Last) & "/adalib", False).all
& ")");
Put_Line ("or else define ADA_OBJECTS_PATH as " & '"'
& To_Host_Dir_Spec
(Lib_Dir (Lib_Dir'First .. Lib_Dir'Last) & "/declib", False).all
& ','
& To_Host_Dir_Spec
(Lib_Dir (Lib_Dir'First .. Lib_Dir'Last) & "/adalib", False).all
& '"');
when Delete =>
-- Give instructions.
Put_Line ("GNAT Librarian DELETE not yet implemented.");
Put_Line ("Use appropriate system tools to remove library");
when None =>
Put_Line (Standard_Error,
"Error: No mode (create|set|delete) specified");
Exit_Program (E_Fatal);
end case;
end GnatLbr;
|
with Ada.Text_IO;
with Ada_Code;
procedure Ada_Main is
package ATI renames Ada.Text_Io;
begin
ATI.Put_Line ("Ada_Main: Calling Ada_Proc");
Ada_Code.Ada_Proc;
ATI.Put_Line ("Ada_Main: Returned from Ada_Proc");
end Ada_Main;
|
with Ada.Real_Time; use Ada.Real_Time;
package body TT_Patterns is
--------------------
-- Simple_TT_Task --
--------------------
task body Simple_TT_Task is
begin
Task_State.Work_Id := Work_Id;
if Synced_Init then
TTS.Wait_For_Activation (Work_Id, Task_State.Release_Time);
end if;
Task_State.Initialize;
loop
TTS.Wait_For_Activation (Work_Id, Task_State.Release_Time);
Task_State.Main_Code;
end loop;
end Simple_TT_Task;
---------------------------
-- Initial_Final_TT_Task --
---------------------------
task body Initial_Final_TT_Task is
begin
Task_State.Work_Id := Work_Id;
if Synced_Init then
TTS.Wait_For_Activation (Work_Id, Task_State.Release_Time);
end if;
Task_State.Initialize;
loop
TTS.Wait_For_Activation (Work_Id, Task_State.Release_Time);
Task_State.Initial_Code;
TTS.Wait_For_Activation (Work_Id, Task_State.Release_Time);
Task_State.Final_Code;
end loop;
end Initial_Final_TT_Task;
-------------------------------------
-- Initial_Mandatory_Final_TT_Task --
-------------------------------------
task body Initial_Mandatory_Final_TT_Task is
begin
Task_State.Work_Id := Work_Id;
if Synced_Init then
TTS.Wait_For_Activation (Work_Id, Task_State.Release_Time);
end if;
Task_State.Initialize;
loop
TTS.Wait_For_Activation (Work_Id, Task_State.Release_Time);
Task_State.Initial_Code;
TTS.Wait_For_Activation (Work_Id, Task_State.Release_Time);
Task_State.Mandatory_Code;
TTS.Wait_For_Activation (Work_Id, Task_State.Release_Time);
Task_State.Final_Code;
end loop;
end Initial_Mandatory_Final_TT_Task;
------------------------------------------
-- InitialMandatorySliced_Final_TT_Task --
------------------------------------------
task body InitialMandatorySliced_Final_TT_Task is
begin
Task_State.Work_Id := Work_Id;
if Synced_Init then
TTS.Wait_For_Activation (Work_Id, Task_State.Release_Time);
end if;
Task_State.Initialize;
loop
TTS.Wait_For_Activation (Work_Id, Task_State.Release_Time);
Task_State.Initial_Code;
TTS.Continue_Sliced;
Task_State.Mandatory_Code;
TTS.Wait_For_Activation (Work_Id, Task_State.Release_Time);
Task_State.Final_Code;
end loop;
end InitialMandatorySliced_Final_TT_Task;
------------------------------------
-- Iniitial_OptionalFinal_TT_Task --
------------------------------------
task body Initial_OptionalFinal_TT_Task is
begin
if Synced_Init then
TTS.Wait_For_Activation (Initial_Work_Id, Task_State.Release_Time);
Task_State.Work_Id := Initial_Work_Id;
end if;
Task_State.Initialize;
loop
TTS.Wait_For_Activation (Initial_Work_Id, Task_State.Release_Time);
Task_State.Work_Id := Initial_Work_Id;
Task_State.Initial_Code;
if (Task_State.Final_Is_Required) then
TTS.Wait_For_Activation (Optional_Work_Id, Task_State.Release_Time);
Task_State.Work_Id := Optional_Work_Id;
Task_State.Final_Code;
end if;
end loop;
end Initial_OptionalFinal_TT_Task;
---------------------------
-- Simple_Synced_ET_Task --
---------------------------
task body Simple_Synced_ET_Task is
begin
Task_State.Sync_Id := Sync_Id;
if Synced_Init then
TTS.Wait_For_Sync (Sync_Id, Task_State.Release_Time);
end if;
Task_State.Initialize;
loop
TTS.Wait_For_Sync (Sync_Id, Task_State.Release_Time);
Task_State.Main_Code;
end loop;
end Simple_Synced_ET_Task;
-----------------------------------------
-- SyncedInitial_OptionalFinal_ET_Task --
-----------------------------------------
task body SyncedInitial_OptionalFinal_ET_Task is
begin
Task_State.Work_Id := Work_Id;
Task_State.Sync_Id := Sync_Id;
if Synced_Init then
TTS.Wait_For_Sync (Sync_Id, Task_State.Release_Time);
end if;
Task_State.Initialize;
loop
TTS.Wait_For_Sync (Sync_Id, Task_State.Release_Time);
Task_State.Initial_Code;
if (Task_State.Final_Is_Required) then
TTS.Wait_For_Activation (Work_Id, Task_State.Release_Time);
Task_State.Final_Code;
end if;
end loop;
end SyncedInitial_OptionalFinal_ET_Task;
end TT_Patterns;
|
protected body Event is
procedure Signal is
begin
Fired := True;
end Signal;
procedure Reset is
begin
Fired := False;
end Reset;
entry Wait when Fired is
begin
null;
end Wait;
end Event;
|
-- for the Real type
with Support; use Support;
-- for text io
with Ada.Text_IO; use Ada.Text_IO;
with Support.Strings; use Support.Strings;
-- for data io
with BSSNBase.Data_IO;
-- for parsing of the command line arguments
with Support.RegEx; use Support.RegEx;
with Support.CmdLine; use Support.CmdLine;
-- for evolution of initial data
with BSSNBase; use BSSNBase;
with BSSNBase.Evolve;
with BSSNBase.Runge;
procedure BSSNEvolve is
package Real_IO is new Ada.Text_IO.Float_IO (Real); use Real_IO;
package Integer_IO is new Ada.Text_IO.Integer_IO (Integer); use Integer_IO;
procedure initialize is
re_intg : String := "([-+]?[0-9]+)";
re_real : String := "([-+]?[0-9]*[.]?[0-9]+([eE][-+]?[0-9]+)?)"; -- note counts as 2 groups (1.234(e+56))
re_intg_seq : String := re_intg&"x"&re_intg&"x"&re_intg;
re_real_seq_1 : String := re_real;
re_real_seq_2 : String := re_real&":"&re_real;
re_real_seq_3 : String := re_real&":"&re_real&":"&re_real;
begin
if find_command_arg('h') then
Put_Line (" Usage: bssnevolve [-Cc:cmin] [-pNum] [-PInterval] [-Mmax] [-Ncores] \");
Put_Line (" [-tEndTime] [-Fdt] [-Ddata] [-Oresults] [-h]");
Put_Line (" -Cc:cmin : Set the Courant factor to c with minimum cmin, default: c=0.25, cmin=0.025");
Put_Line (" -pNum : Report results every Num time steps, default: p=10");
Put_Line (" -PInterval : Report results after Interval time, default: P=1000.0");
Put_line (" -Mmax : Halt after max time steps, default: M=1000");
Put_Line (" -NNumCores : Use NumCores on multi-core cpus, default: max. number of cores");
Put_Line (" -tEndTime : Halt at this time, default: t=11.0");
Put_Line (" -Fdt : Force fixed time steps of dt, default: variable time step set by Courant");
Put_Line (" -Ddata : Where to find the initial data, default: data/");
Put_Line (" -Oresults : Where to save the results, default: results/");
Put_Line (" -h : This message.");
Support.Halt (0);
else
courant := grep (read_command_arg ('C',"0.25"),re_real_seq_1,1,fail=>0.25);
courant_min := grep (read_command_arg ('C',"0.25:0.025"),re_real_seq_2,3,fail=>0.025);
print_cycle := read_command_arg ('p',10);
print_time_step := read_command_arg ('P',0.10);
max_loop := read_command_arg ('M',1000);
end_time := read_command_arg ('t',11.0);
constant_time_step := read_command_arg ('F',1.0e66);
end if;
end initialize;
begin
initialize;
echo_command_line;
-- two data formats: must match choice with that in adminitial.adb
-- data in binary format
-- BSSNBase.Data_IO.read_grid;
-- BSSNBase.Data_IO.read_data;
-- data in plain text format
BSSNBase.Data_IO.read_grid_fmt;
BSSNBase.Data_IO.read_data_fmt;
BSSNBase.Evolve.evolve_data;
end BSSNEvolve;
|
-- This package has been generated automatically by GNATtest.
-- You are allowed to add your code to the bodies of test routines.
-- Such changes will be kept during further regeneration of this file.
-- All code placed outside of test routine bodies will be lost. The
-- code intended to set up and tear down the test environment should be
-- placed into DG_Types.Test_Data.
with AUnit.Assertions; use AUnit.Assertions;
with System.Assertions;
-- begin read only
-- id:2.2/00/
--
-- This section can be used to add with clauses if necessary.
--
-- end read only
-- begin read only
-- end read only
package body DG_Types.Test_Data.Tests is
-- begin read only
-- id:2.2/01/
--
-- This section can be used to add global variables and other elements.
--
-- end read only
-- begin read only
-- end read only
-- begin read only
procedure Test_Boolean_To_YN (Gnattest_T : in out Test);
procedure Test_Boolean_To_YN_3d5779 (Gnattest_T : in out Test) renames Test_Boolean_To_YN;
-- id:2.2/3d577903f73df662/Boolean_To_YN/1/0/
procedure Test_Boolean_To_YN (Gnattest_T : in out Test) is
-- dg_types.ads:111:5:Boolean_To_YN
-- end read only
pragma Unreferenced (Gnattest_T);
begin
AUnit.Assertions.Assert (Boolean_To_YN(false) = 'N', "Oops!");
AUnit.Assertions.Assert (Boolean_To_YN(true) = 'Y', "Oops!");
-- begin read only
end Test_Boolean_To_YN;
-- end read only
-- begin read only
procedure Test_Clear_W_Bit (Gnattest_T : in out Test);
procedure Test_Clear_W_Bit_3be3ae (Gnattest_T : in out Test) renames Test_Clear_W_Bit;
-- id:2.2/3be3aea25085716b/Clear_W_Bit/1/0/
procedure Test_Clear_W_Bit (Gnattest_T : in out Test) is
-- dg_types.ads:114:5:Clear_W_Bit
-- end read only
pragma Unreferenced (Gnattest_T);
WD : Word_T := 2#11111111_11111111#;
begin
Clear_W_Bit(WD, 3);
AUnit.Assertions.Assert (WD = 2#11101111_11111111#, "Clear_W_Bit.");
Clear_W_Bit(WD, 3);
AUnit.Assertions.Assert (WD = 2#11101111_11111111#, "Clear_W_Bit.");
-- begin read only
end Test_Clear_W_Bit;
-- end read only
-- begin read only
procedure Test_Flip_W_Bit (Gnattest_T : in out Test);
procedure Test_Flip_W_Bit_d2d2b6 (Gnattest_T : in out Test) renames Test_Flip_W_Bit;
-- id:2.2/d2d2b6e658b2b202/Flip_W_Bit/1/0/
procedure Test_Flip_W_Bit (Gnattest_T : in out Test) is
-- dg_types.ads:115:5:Flip_W_Bit
-- end read only
pragma Unreferenced (Gnattest_T);
begin
AUnit.Assertions.Assert
(Gnattest_Generated.Default_Assert_Value,
"Test not implemented.");
-- begin read only
end Test_Flip_W_Bit;
-- end read only
-- begin read only
procedure Test_Set_W_Bit (Gnattest_T : in out Test);
procedure Test_Set_W_Bit_f63f6c (Gnattest_T : in out Test) renames Test_Set_W_Bit;
-- id:2.2/f63f6c8c25ceb56c/Set_W_Bit/1/0/
procedure Test_Set_W_Bit (Gnattest_T : in out Test) is
-- dg_types.ads:116:5:Set_W_Bit
-- end read only
pragma Unreferenced (Gnattest_T);
begin
AUnit.Assertions.Assert
(Gnattest_Generated.Default_Assert_Value,
"Test not implemented.");
-- begin read only
end Test_Set_W_Bit;
-- end read only
-- begin read only
procedure Test_Test_W_Bit (Gnattest_T : in out Test);
procedure Test_Test_W_Bit_7a11db (Gnattest_T : in out Test) renames Test_Test_W_Bit;
-- id:2.2/7a11dba379068970/Test_W_Bit/1/0/
procedure Test_Test_W_Bit (Gnattest_T : in out Test) is
-- dg_types.ads:117:5:Test_W_Bit
-- end read only
pragma Unreferenced (Gnattest_T);
begin
AUnit.Assertions.Assert
(Gnattest_Generated.Default_Assert_Value,
"Test not implemented.");
-- begin read only
end Test_Test_W_Bit;
-- end read only
-- begin read only
procedure Test_Get_W_Bits (Gnattest_T : in out Test);
procedure Test_Get_W_Bits_ea9a74 (Gnattest_T : in out Test) renames Test_Get_W_Bits;
-- id:2.2/ea9a74be9c46ca89/Get_W_Bits/1/0/
procedure Test_Get_W_Bits (Gnattest_T : in out Test) is
-- dg_types.ads:118:5:Get_W_Bits
-- end read only
pragma Unreferenced (Gnattest_T);
begin
AUnit.Assertions.Assert
(Gnattest_Generated.Default_Assert_Value,
"Test not implemented.");
-- begin read only
end Test_Get_W_Bits;
-- end read only
-- begin read only
procedure Test_Get_DW_Bits (Gnattest_T : in out Test);
procedure Test_Get_DW_Bits_a2bf67 (Gnattest_T : in out Test) renames Test_Get_DW_Bits;
-- id:2.2/a2bf6705dcb2799f/Get_DW_Bits/1/0/
procedure Test_Get_DW_Bits (Gnattest_T : in out Test) is
-- dg_types.ads:119:5:Get_DW_Bits
-- end read only
pragma Unreferenced (Gnattest_T);
begin
AUnit.Assertions.Assert
(Gnattest_Generated.Default_Assert_Value,
"Test not implemented.");
-- begin read only
end Test_Get_DW_Bits;
-- end read only
-- begin read only
procedure Test_Test_DW_Bit (Gnattest_T : in out Test);
procedure Test_Test_DW_Bit_799079 (Gnattest_T : in out Test) renames Test_Test_DW_Bit;
-- id:2.2/79907977bd025bc6/Test_DW_Bit/1/0/
procedure Test_Test_DW_Bit (Gnattest_T : in out Test) is
-- dg_types.ads:120:5:Test_DW_Bit
-- end read only
pragma Unreferenced (Gnattest_T);
begin
AUnit.Assertions.Assert
(Gnattest_Generated.Default_Assert_Value,
"Test not implemented.");
-- begin read only
end Test_Test_DW_Bit;
-- end read only
-- begin read only
procedure Test_Clear_QW_Bit (Gnattest_T : in out Test);
procedure Test_Clear_QW_Bit_f212ea (Gnattest_T : in out Test) renames Test_Clear_QW_Bit;
-- id:2.2/f212ea34daf43e93/Clear_QW_Bit/1/0/
procedure Test_Clear_QW_Bit (Gnattest_T : in out Test) is
-- dg_types.ads:121:5:Clear_QW_Bit
-- end read only
pragma Unreferenced (Gnattest_T);
begin
AUnit.Assertions.Assert
(Gnattest_Generated.Default_Assert_Value,
"Test not implemented.");
-- begin read only
end Test_Clear_QW_Bit;
-- end read only
-- begin read only
procedure Test_Set_QW_Bit (Gnattest_T : in out Test);
procedure Test_Set_QW_Bit_1b4331 (Gnattest_T : in out Test) renames Test_Set_QW_Bit;
-- id:2.2/1b4331029495556d/Set_QW_Bit/1/0/
procedure Test_Set_QW_Bit (Gnattest_T : in out Test) is
-- dg_types.ads:122:5:Set_QW_Bit
-- end read only
pragma Unreferenced (Gnattest_T);
begin
AUnit.Assertions.Assert
(Gnattest_Generated.Default_Assert_Value,
"Test not implemented.");
-- begin read only
end Test_Set_QW_Bit;
-- end read only
-- begin read only
procedure Test_Test_QW_Bit (Gnattest_T : in out Test);
procedure Test_Test_QW_Bit_2ec078 (Gnattest_T : in out Test) renames Test_Test_QW_Bit;
-- id:2.2/2ec07802eaff1dfc/Test_QW_Bit/1/0/
procedure Test_Test_QW_Bit (Gnattest_T : in out Test) is
-- dg_types.ads:123:5:Test_QW_Bit
-- end read only
pragma Unreferenced (Gnattest_T);
begin
AUnit.Assertions.Assert
(Gnattest_Generated.Default_Assert_Value,
"Test not implemented.");
-- begin read only
end Test_Test_QW_Bit;
-- end read only
-- begin read only
procedure Test_Get_Lower_Byte (Gnattest_T : in out Test);
procedure Test_Get_Lower_Byte_2c7e4b (Gnattest_T : in out Test) renames Test_Get_Lower_Byte;
-- id:2.2/2c7e4be0e15951e4/Get_Lower_Byte/1/0/
procedure Test_Get_Lower_Byte (Gnattest_T : in out Test) is
-- dg_types.ads:126:5:Get_Lower_Byte
-- end read only
pragma Unreferenced (Gnattest_T);
begin
AUnit.Assertions.Assert
(Gnattest_Generated.Default_Assert_Value,
"Test not implemented.");
-- begin read only
end Test_Get_Lower_Byte;
-- end read only
-- begin read only
procedure Test_Get_Upper_Byte (Gnattest_T : in out Test);
procedure Test_Get_Upper_Byte_d89a4b (Gnattest_T : in out Test) renames Test_Get_Upper_Byte;
-- id:2.2/d89a4b734d8093ff/Get_Upper_Byte/1/0/
procedure Test_Get_Upper_Byte (Gnattest_T : in out Test) is
-- dg_types.ads:127:5:Get_Upper_Byte
-- end read only
pragma Unreferenced (Gnattest_T);
begin
AUnit.Assertions.Assert
(Gnattest_Generated.Default_Assert_Value,
"Test not implemented.");
-- begin read only
end Test_Get_Upper_Byte;
-- end read only
-- begin read only
procedure Test_Swap_Bytes (Gnattest_T : in out Test);
procedure Test_Swap_Bytes_7d46a7 (Gnattest_T : in out Test) renames Test_Swap_Bytes;
-- id:2.2/7d46a7da5fb7f014/Swap_Bytes/1/0/
procedure Test_Swap_Bytes (Gnattest_T : in out Test) is
-- dg_types.ads:128:5:Swap_Bytes
-- end read only
pragma Unreferenced (Gnattest_T);
WD : Word_T := 16#1122#;
begin
AUnit.Assertions.Assert
(Swap_Bytes(WD) = 16#2211#, "Byte swap error.");
-- begin read only
end Test_Swap_Bytes;
-- end read only
-- begin read only
procedure Test_Get_Bytes_From_Word (Gnattest_T : in out Test);
procedure Test_Get_Bytes_From_Word_075975 (Gnattest_T : in out Test) renames Test_Get_Bytes_From_Word;
-- id:2.2/075975fd1f9f3187/Get_Bytes_From_Word/1/0/
procedure Test_Get_Bytes_From_Word (Gnattest_T : in out Test) is
-- dg_types.ads:129:5:Get_Bytes_From_Word
-- end read only
pragma Unreferenced (Gnattest_T);
begin
AUnit.Assertions.Assert
(Gnattest_Generated.Default_Assert_Value,
"Test not implemented.");
-- begin read only
end Test_Get_Bytes_From_Word;
-- end read only
-- begin read only
procedure Test_Word_From_Bytes (Gnattest_T : in out Test);
procedure Test_Word_From_Bytes_ea4510 (Gnattest_T : in out Test) renames Test_Word_From_Bytes;
-- id:2.2/ea45105dc52ddee5/Word_From_Bytes/1/0/
procedure Test_Word_From_Bytes (Gnattest_T : in out Test) is
-- dg_types.ads:130:5:Word_From_Bytes
-- end read only
pragma Unreferenced (Gnattest_T);
begin
AUnit.Assertions.Assert
(Gnattest_Generated.Default_Assert_Value,
"Test not implemented.");
-- begin read only
end Test_Word_From_Bytes;
-- end read only
-- begin read only
procedure Test_Byte_To_String (Gnattest_T : in out Test);
procedure Test_Byte_To_String_d93915 (Gnattest_T : in out Test) renames Test_Byte_To_String;
-- id:2.2/d93915cf2befb78d/Byte_To_String/1/0/
procedure Test_Byte_To_String (Gnattest_T : in out Test) is
-- dg_types.ads:131:5:Byte_To_String
-- end read only
pragma Unreferenced (Gnattest_T);
begin
AUnit.Assertions.Assert
(Gnattest_Generated.Default_Assert_Value,
"Test not implemented.");
-- begin read only
end Test_Byte_To_String;
-- end read only
-- begin read only
procedure Test_Low_Byte_To_Char (Gnattest_T : in out Test);
procedure Test_Low_Byte_To_Char_00e4b2 (Gnattest_T : in out Test) renames Test_Low_Byte_To_Char;
-- id:2.2/00e4b210debe9611/Low_Byte_To_Char/1/0/
procedure Test_Low_Byte_To_Char (Gnattest_T : in out Test) is
-- dg_types.ads:137:5:Low_Byte_To_Char
-- end read only
pragma Unreferenced (Gnattest_T);
begin
AUnit.Assertions.Assert
(Gnattest_Generated.Default_Assert_Value,
"Test not implemented.");
-- begin read only
end Test_Low_Byte_To_Char;
-- end read only
-- begin read only
procedure Test_Byte_Arr_To_Unbounded (Gnattest_T : in out Test);
procedure Test_Byte_Arr_To_Unbounded_8c1bb0 (Gnattest_T : in out Test) renames Test_Byte_Arr_To_Unbounded;
-- id:2.2/8c1bb0c360a7942b/Byte_Arr_To_Unbounded/1/0/
procedure Test_Byte_Arr_To_Unbounded (Gnattest_T : in out Test) is
-- dg_types.ads:138:5:Byte_Arr_To_Unbounded
-- end read only
pragma Unreferenced (Gnattest_T);
begin
AUnit.Assertions.Assert
(Gnattest_Generated.Default_Assert_Value,
"Test not implemented.");
-- begin read only
end Test_Byte_Arr_To_Unbounded;
-- end read only
-- begin read only
procedure Test_Get_Data_Sensitive_Portion (Gnattest_T : in out Test);
procedure Test_Get_Data_Sensitive_Portion_2234ef (Gnattest_T : in out Test) renames Test_Get_Data_Sensitive_Portion;
-- id:2.2/2234ef7c745ecf5f/Get_Data_Sensitive_Portion/1/0/
procedure Test_Get_Data_Sensitive_Portion (Gnattest_T : in out Test) is
-- dg_types.ads:139:5:Get_Data_Sensitive_Portion
-- end read only
pragma Unreferenced (Gnattest_T);
begin
AUnit.Assertions.Assert
(Gnattest_Generated.Default_Assert_Value,
"Test not implemented.");
-- begin read only
end Test_Get_Data_Sensitive_Portion;
-- end read only
-- begin read only
procedure Test_Word_To_String (Gnattest_T : in out Test);
procedure Test_Word_To_String_8605e3 (Gnattest_T : in out Test) renames Test_Word_To_String;
-- id:2.2/8605e33cdf6d5df8/Word_To_String/1/0/
procedure Test_Word_To_String (Gnattest_T : in out Test) is
-- dg_types.ads:142:5:Word_To_String
-- end read only
pragma Unreferenced (Gnattest_T);
begin
AUnit.Assertions.Assert
(Gnattest_Generated.Default_Assert_Value,
"Test not implemented.");
-- begin read only
end Test_Word_To_String;
-- end read only
-- begin read only
procedure Test_Lower_Word (Gnattest_T : in out Test);
procedure Test_Lower_Word_3da74d (Gnattest_T : in out Test) renames Test_Lower_Word;
-- id:2.2/3da74da3a565e72e/Lower_Word/1/0/
procedure Test_Lower_Word (Gnattest_T : in out Test) is
-- dg_types.ads:149:5:Lower_Word
-- end read only
pragma Unreferenced (Gnattest_T);
DW : Dword_T := 16#11223344#;
begin
AUnit.Assertions.Assert
(Lower_Word(DW) = 16#3344#, "Lower_Word wrong");
-- begin read only
end Test_Lower_Word;
-- end read only
-- begin read only
procedure Test_Upper_Word (Gnattest_T : in out Test);
procedure Test_Upper_Word_05c493 (Gnattest_T : in out Test) renames Test_Upper_Word;
-- id:2.2/05c4935ae3cbbbf7/Upper_Word/1/0/
procedure Test_Upper_Word (Gnattest_T : in out Test) is
-- dg_types.ads:150:5:Upper_Word
-- end read only
pragma Unreferenced (Gnattest_T);
begin
AUnit.Assertions.Assert
(Upper_Word(16#11223344#) = 16#1122#, "Upper_Word failed");
-- begin read only
end Test_Upper_Word;
-- end read only
-- begin read only
procedure Test_Dword_From_Two_Words (Gnattest_T : in out Test);
procedure Test_Dword_From_Two_Words_3c389f (Gnattest_T : in out Test) renames Test_Dword_From_Two_Words;
-- id:2.2/3c389fe54f92a263/Dword_From_Two_Words/1/0/
procedure Test_Dword_From_Two_Words (Gnattest_T : in out Test) is
-- dg_types.ads:151:5:Dword_From_Two_Words
-- end read only
pragma Unreferenced (Gnattest_T);
begin
AUnit.Assertions.Assert
(Gnattest_Generated.Default_Assert_Value,
"Test not implemented.");
-- begin read only
end Test_Dword_From_Two_Words;
-- end read only
-- begin read only
procedure Test_Dword_To_String (Gnattest_T : in out Test);
procedure Test_Dword_To_String_55061d (Gnattest_T : in out Test) renames Test_Dword_To_String;
-- id:2.2/55061dad65fd6556/Dword_To_String/1/0/
procedure Test_Dword_To_String (Gnattest_T : in out Test) is
-- dg_types.ads:152:5:Dword_To_String
-- end read only
pragma Unreferenced (Gnattest_T);
begin
AUnit.Assertions.Assert
(Gnattest_Generated.Default_Assert_Value,
"Test not implemented.");
-- begin read only
end Test_Dword_To_String;
-- end read only
-- begin read only
procedure Test_String_To_Dword (Gnattest_T : in out Test);
procedure Test_String_To_Dword_3c5214 (Gnattest_T : in out Test) renames Test_String_To_Dword;
-- id:2.2/3c52147c1eb36d6a/String_To_Dword/1/0/
procedure Test_String_To_Dword (Gnattest_T : in out Test) is
-- dg_types.ads:158:5:String_To_Dword
-- end read only
pragma Unreferenced (Gnattest_T);
begin
AUnit.Assertions.Assert
(Gnattest_Generated.Default_Assert_Value,
"Test not implemented.");
-- begin read only
end Test_String_To_Dword;
-- end read only
-- begin read only
procedure Test_Sext_Word_To_Dword (Gnattest_T : in out Test);
procedure Test_Sext_Word_To_Dword_45b429 (Gnattest_T : in out Test) renames Test_Sext_Word_To_Dword;
-- id:2.2/45b429bd73d9b9ab/Sext_Word_To_Dword/1/0/
procedure Test_Sext_Word_To_Dword (Gnattest_T : in out Test) is
-- dg_types.ads:159:5:Sext_Word_To_Dword
-- end read only
pragma Unreferenced (Gnattest_T);
begin
AUnit.Assertions.Assert
(Gnattest_Generated.Default_Assert_Value,
"Test not implemented.");
-- begin read only
end Test_Sext_Word_To_Dword;
-- end read only
-- begin read only
procedure Test_Lower_Dword (Gnattest_T : in out Test);
procedure Test_Lower_Dword_d008b0 (Gnattest_T : in out Test) renames Test_Lower_Dword;
-- id:2.2/d008b0b4e18ac86d/Lower_Dword/1/0/
procedure Test_Lower_Dword (Gnattest_T : in out Test) is
-- dg_types.ads:162:5:Lower_Dword
-- end read only
pragma Unreferenced (Gnattest_T);
begin
AUnit.Assertions.Assert
(Gnattest_Generated.Default_Assert_Value,
"Test not implemented.");
-- begin read only
end Test_Lower_Dword;
-- end read only
-- begin read only
procedure Test_Upper_Dword (Gnattest_T : in out Test);
procedure Test_Upper_Dword_1042da (Gnattest_T : in out Test) renames Test_Upper_Dword;
-- id:2.2/1042da3a021bee1e/Upper_Dword/1/0/
procedure Test_Upper_Dword (Gnattest_T : in out Test) is
-- dg_types.ads:163:5:Upper_Dword
-- end read only
pragma Unreferenced (Gnattest_T);
begin
AUnit.Assertions.Assert
(Gnattest_Generated.Default_Assert_Value,
"Test not implemented.");
-- begin read only
end Test_Upper_Dword;
-- end read only
-- begin read only
procedure Test_Qword_From_Two_Dwords (Gnattest_T : in out Test);
procedure Test_Qword_From_Two_Dwords_e0cb2c (Gnattest_T : in out Test) renames Test_Qword_From_Two_Dwords;
-- id:2.2/e0cb2ccaa3d68d7d/Qword_From_Two_Dwords/1/0/
procedure Test_Qword_From_Two_Dwords (Gnattest_T : in out Test) is
-- dg_types.ads:164:5:Qword_From_Two_Dwords
-- end read only
pragma Unreferenced (Gnattest_T);
begin
AUnit.Assertions.Assert
(Gnattest_Generated.Default_Assert_Value,
"Test not implemented.");
-- begin read only
end Test_Qword_From_Two_Dwords;
-- end read only
-- begin read only
procedure Test_Int_To_String (Gnattest_T : in out Test);
procedure Test_Int_To_String_506364 (Gnattest_T : in out Test) renames Test_Int_To_String;
-- id:2.2/506364fd134f9088/Int_To_String/1/0/
procedure Test_Int_To_String (Gnattest_T : in out Test) is
-- dg_types.ads:168:5:Int_To_String
-- end read only
pragma Unreferenced (Gnattest_T);
begin
AUnit.Assertions.Assert
(Gnattest_Generated.Default_Assert_Value,
"Test not implemented.");
-- begin read only
end Test_Int_To_String;
-- end read only
-- begin read only
procedure Test_String_To_Integer (Gnattest_T : in out Test);
procedure Test_String_To_Integer_fdacf8 (Gnattest_T : in out Test) renames Test_String_To_Integer;
-- id:2.2/fdacf80ee5f11633/String_To_Integer/1/0/
procedure Test_String_To_Integer (Gnattest_T : in out Test) is
-- dg_types.ads:175:5:String_To_Integer
-- end read only
pragma Unreferenced (Gnattest_T);
begin
AUnit.Assertions.Assert
(Gnattest_Generated.Default_Assert_Value,
"Test not implemented.");
-- begin read only
end Test_String_To_Integer;
-- end read only
-- begin read only
procedure Test_Decode_Dec_Data_Type (Gnattest_T : in out Test);
procedure Test_Decode_Dec_Data_Type_056a82 (Gnattest_T : in out Test) renames Test_Decode_Dec_Data_Type;
-- id:2.2/056a821434fb65a9/Decode_Dec_Data_Type/1/0/
procedure Test_Decode_Dec_Data_Type (Gnattest_T : in out Test) is
-- dg_types.ads:178:5:Decode_Dec_Data_Type
-- end read only
pragma Unreferenced (Gnattest_T);
begin
AUnit.Assertions.Assert
(Gnattest_Generated.Default_Assert_Value,
"Test not implemented.");
-- begin read only
end Test_Decode_Dec_Data_Type;
-- end read only
-- begin read only
procedure Test_Read_Decimal (Gnattest_T : in out Test);
procedure Test_Read_Decimal_385668 (Gnattest_T : in out Test) renames Test_Read_Decimal;
-- id:2.2/385668536c3d7938/Read_Decimal/1/0/
procedure Test_Read_Decimal (Gnattest_T : in out Test) is
-- dg_types.ads:182:5:Read_Decimal
-- end read only
pragma Unreferenced (Gnattest_T);
begin
AUnit.Assertions.Assert
(Gnattest_Generated.Default_Assert_Value,
"Test not implemented.");
-- begin read only
end Test_Read_Decimal;
-- end read only
-- begin read only
procedure Test_DG_Double_To_Long_Float (Gnattest_T : in out Test);
procedure Test_DG_Double_To_Long_Float_2d8c8f (Gnattest_T : in out Test) renames Test_DG_Double_To_Long_Float;
-- id:2.2/2d8c8ff77fd9dc46/DG_Double_To_Long_Float/1/0/
procedure Test_DG_Double_To_Long_Float (Gnattest_T : in out Test) is
-- dg_types.ads:185:5:DG_Double_To_Long_Float
-- end read only
pragma Unreferenced (Gnattest_T);
DG_Dbl : Double_Overlay;
begin
DG_Dbl.Double_QW := 0;
AUnit.Assertions.Assert (DG_Double_To_Long_Float(DG_Dbl) = 0.0, "DG Dbl to LF - Zero conversion error.");
-- Example from https://en.wikipedia.org/wiki/IBM_hexadecimal_floating-point
DG_Dbl.Double_QW := 2#1_100_0010_0111_0110_1010_0000_0000_0000_00000000_00000000_00000000_00000000#;
AUnit.Assertions.Assert (DG_Double_To_Long_Float(DG_Dbl) = (-118.625),
"DG Dbl to LF - Known value conversion error.");
-- begin read only
end Test_DG_Double_To_Long_Float;
-- end read only
-- begin read only
procedure Test_DG_Single_To_Long_Float (Gnattest_T : in out Test);
procedure Test_DG_Single_To_Long_Float_aba5b2 (Gnattest_T : in out Test) renames Test_DG_Single_To_Long_Float;
-- id:2.2/aba5b2674e990076/DG_Single_To_Long_Float/1/0/
procedure Test_DG_Single_To_Long_Float (Gnattest_T : in out Test) is
-- dg_types.ads:186:5:DG_Single_To_Long_Float
-- end read only
pragma Unreferenced (Gnattest_T);
DW : Dword_T := 0;
begin
AUnit.Assertions.Assert (DG_Single_To_Long_Float(DW) = 0.0, "DG Single to LF - Zero conversion error.");
DW := 2#1_100_0010_0111_0110_1010_0000_0000_0000#;
AUnit.Assertions.Assert (DG_Single_To_Long_Float(DW) = (-118.625),
"DG Single to LF - Known value conversion error.");
-- begin read only
end Test_DG_Single_To_Long_Float;
-- end read only
-- begin read only
procedure Test_Long_Float_To_DG_Double (Gnattest_T : in out Test);
procedure Test_Long_Float_To_DG_Double_8175dc (Gnattest_T : in out Test) renames Test_Long_Float_To_DG_Double;
-- id:2.2/8175dc59a873cf72/Long_Float_To_DG_Double/1/0/
procedure Test_Long_Float_To_DG_Double (Gnattest_T : in out Test) is
-- dg_types.ads:187:5:Long_Float_To_DG_Double
-- end read only
pragma Unreferenced (Gnattest_T);
LF : Long_Float := 0.0;
QW : Qword_T;
begin
QW := Long_Float_To_DG_Double(LF);
AUnit.Assertions.Assert (QW = 0, "LF to DG - Zero conversion error");
LF := (-118.625);
QW := Long_Float_To_DG_Double(LF);
AUnit.Assertions.Assert (QW = 2#1_100_0010_0111_0110_1010_0000_0000_0000_00000000_00000000_00000000_00000000#,
"LF to DG Dbl - known value conversion error");
-- begin read only
end Test_Long_Float_To_DG_Double;
-- end read only
-- begin read only
procedure Test_Long_Float_To_DG_Single (Gnattest_T : in out Test);
procedure Test_Long_Float_To_DG_Single_d6dcc8 (Gnattest_T : in out Test) renames Test_Long_Float_To_DG_Single;
-- id:2.2/d6dcc823ca3962be/Long_Float_To_DG_Single/1/0/
procedure Test_Long_Float_To_DG_Single (Gnattest_T : in out Test) is
-- dg_types.ads:188:5:Long_Float_To_DG_Single
-- end read only
pragma Unreferenced (Gnattest_T);
begin
AUnit.Assertions.Assert
(Gnattest_Generated.Default_Assert_Value,
"Test not implemented.");
-- begin read only
end Test_Long_Float_To_DG_Single;
-- end read only
-- begin read only
procedure Test_Byte_To_Integer_8 (Gnattest_T : in out Test);
procedure Test_Byte_To_Integer_8_6ac9f0 (Gnattest_T : in out Test) renames Test_Byte_To_Integer_8;
-- id:2.2/6ac9f0ecd0d28fa6/Byte_To_Integer_8/1/0/
procedure Test_Byte_To_Integer_8 (Gnattest_T : in out Test) is
-- dg_types.ads:191:5:Byte_To_Integer_8
-- end read only
pragma Unreferenced (Gnattest_T);
begin
AUnit.Assertions.Assert
(Gnattest_Generated.Default_Assert_Value,
"Test not implemented.");
-- begin read only
end Test_Byte_To_Integer_8;
-- end read only
-- begin read only
procedure Test_Char_To_Byte (Gnattest_T : in out Test);
procedure Test_Char_To_Byte_11390e (Gnattest_T : in out Test) renames Test_Char_To_Byte;
-- id:2.2/11390e3d9572d1a6/Char_To_Byte/1/0/
procedure Test_Char_To_Byte (Gnattest_T : in out Test) is
-- dg_types.ads:192:5:Char_To_Byte
-- end read only
pragma Unreferenced (Gnattest_T);
begin
AUnit.Assertions.Assert
(Gnattest_Generated.Default_Assert_Value,
"Test not implemented.");
-- begin read only
end Test_Char_To_Byte;
-- end read only
-- begin read only
procedure Test_Byte_To_Char (Gnattest_T : in out Test);
procedure Test_Byte_To_Char_7742da (Gnattest_T : in out Test) renames Test_Byte_To_Char;
-- id:2.2/7742da8507778a8d/Byte_To_Char/1/0/
procedure Test_Byte_To_Char (Gnattest_T : in out Test) is
-- dg_types.ads:193:5:Byte_To_Char
-- end read only
pragma Unreferenced (Gnattest_T);
begin
AUnit.Assertions.Assert
(Gnattest_Generated.Default_Assert_Value,
"Test not implemented.");
-- begin read only
end Test_Byte_To_Char;
-- end read only
-- begin read only
procedure Test_Dword_To_Integer_32 (Gnattest_T : in out Test);
procedure Test_Dword_To_Integer_32_e9169d (Gnattest_T : in out Test) renames Test_Dword_To_Integer_32;
-- id:2.2/e9169d27b9e53e9c/Dword_To_Integer_32/1/0/
procedure Test_Dword_To_Integer_32 (Gnattest_T : in out Test) is
-- dg_types.ads:194:5:Dword_To_Integer_32
-- end read only
pragma Unreferenced (Gnattest_T);
begin
AUnit.Assertions.Assert
(Gnattest_Generated.Default_Assert_Value,
"Test not implemented.");
-- begin read only
end Test_Dword_To_Integer_32;
-- end read only
-- begin read only
procedure Test_Dword_To_Integer (Gnattest_T : in out Test);
procedure Test_Dword_To_Integer_bb8284 (Gnattest_T : in out Test) renames Test_Dword_To_Integer;
-- id:2.2/bb8284dfb5eecd69/Dword_To_Integer/1/0/
procedure Test_Dword_To_Integer (Gnattest_T : in out Test) is
-- dg_types.ads:195:5:Dword_To_Integer
-- end read only
pragma Unreferenced (Gnattest_T);
begin
AUnit.Assertions.Assert
(Gnattest_Generated.Default_Assert_Value,
"Test not implemented.");
-- begin read only
end Test_Dword_To_Integer;
-- end read only
-- begin read only
procedure Test_Integer_32_To_Dword (Gnattest_T : in out Test);
procedure Test_Integer_32_To_Dword_67c35b (Gnattest_T : in out Test) renames Test_Integer_32_To_Dword;
-- id:2.2/67c35b0907b09678/Integer_32_To_Dword/1/0/
procedure Test_Integer_32_To_Dword (Gnattest_T : in out Test) is
-- dg_types.ads:196:5:Integer_32_To_Dword
-- end read only
pragma Unreferenced (Gnattest_T);
begin
AUnit.Assertions.Assert
(Gnattest_Generated.Default_Assert_Value,
"Test not implemented.");
-- begin read only
end Test_Integer_32_To_Dword;
-- end read only
-- begin read only
procedure Test_Integer_32_To_Phys (Gnattest_T : in out Test);
procedure Test_Integer_32_To_Phys_0e179b (Gnattest_T : in out Test) renames Test_Integer_32_To_Phys;
-- id:2.2/0e179b57ce953892/Integer_32_To_Phys/1/0/
procedure Test_Integer_32_To_Phys (Gnattest_T : in out Test) is
-- dg_types.ads:197:5:Integer_32_To_Phys
-- end read only
pragma Unreferenced (Gnattest_T);
begin
AUnit.Assertions.Assert
(Gnattest_Generated.Default_Assert_Value,
"Test not implemented.");
-- begin read only
end Test_Integer_32_To_Phys;
-- end read only
-- begin read only
procedure Test_Word_To_Integer_16 (Gnattest_T : in out Test);
procedure Test_Word_To_Integer_16_a3a65b (Gnattest_T : in out Test) renames Test_Word_To_Integer_16;
-- id:2.2/a3a65b382bb1e065/Word_To_Integer_16/1/0/
procedure Test_Word_To_Integer_16 (Gnattest_T : in out Test) is
-- dg_types.ads:198:5:Word_To_Integer_16
-- end read only
pragma Unreferenced (Gnattest_T);
begin
AUnit.Assertions.Assert
(Gnattest_Generated.Default_Assert_Value,
"Test not implemented.");
-- begin read only
end Test_Word_To_Integer_16;
-- end read only
-- begin read only
procedure Test_Integer_16_To_Word (Gnattest_T : in out Test);
procedure Test_Integer_16_To_Word_40bf8b (Gnattest_T : in out Test) renames Test_Integer_16_To_Word;
-- id:2.2/40bf8b3b3af6c36c/Integer_16_To_Word/1/0/
procedure Test_Integer_16_To_Word (Gnattest_T : in out Test) is
-- dg_types.ads:199:5:Integer_16_To_Word
-- end read only
pragma Unreferenced (Gnattest_T);
begin
AUnit.Assertions.Assert
(Gnattest_Generated.Default_Assert_Value,
"Test not implemented.");
-- begin read only
end Test_Integer_16_To_Word;
-- end read only
-- begin read only
procedure Test_Word_To_Unsigned_16 (Gnattest_T : in out Test);
procedure Test_Word_To_Unsigned_16_d3e005 (Gnattest_T : in out Test) renames Test_Word_To_Unsigned_16;
-- id:2.2/d3e00505fea693e8/Word_To_Unsigned_16/1/0/
procedure Test_Word_To_Unsigned_16 (Gnattest_T : in out Test) is
-- dg_types.ads:200:5:Word_To_Unsigned_16
-- end read only
pragma Unreferenced (Gnattest_T);
begin
AUnit.Assertions.Assert
(Gnattest_Generated.Default_Assert_Value,
"Test not implemented.");
-- begin read only
end Test_Word_To_Unsigned_16;
-- end read only
-- begin read only
procedure Test_Integer_64_To_Unsigned_64 (Gnattest_T : in out Test);
procedure Test_Integer_64_To_Unsigned_64_f5c627 (Gnattest_T : in out Test) renames Test_Integer_64_To_Unsigned_64;
-- id:2.2/f5c627cc3d2eb8ab/Integer_64_To_Unsigned_64/1/0/
procedure Test_Integer_64_To_Unsigned_64 (Gnattest_T : in out Test) is
-- dg_types.ads:201:5:Integer_64_To_Unsigned_64
-- end read only
pragma Unreferenced (Gnattest_T);
begin
AUnit.Assertions.Assert
(Gnattest_Generated.Default_Assert_Value,
"Test not implemented.");
-- begin read only
end Test_Integer_64_To_Unsigned_64;
-- end read only
-- begin read only
procedure Test_Unsigned_32_To_Integer (Gnattest_T : in out Test);
procedure Test_Unsigned_32_To_Integer_5e891f (Gnattest_T : in out Test) renames Test_Unsigned_32_To_Integer;
-- id:2.2/5e891fba56f59941/Unsigned_32_To_Integer/1/0/
procedure Test_Unsigned_32_To_Integer (Gnattest_T : in out Test) is
-- dg_types.ads:202:5:Unsigned_32_To_Integer
-- end read only
pragma Unreferenced (Gnattest_T);
begin
AUnit.Assertions.Assert
(Gnattest_Generated.Default_Assert_Value,
"Test not implemented.");
-- begin read only
end Test_Unsigned_32_To_Integer;
-- end read only
-- begin read only
procedure Test_Integer_To_Unsigned_64 (Gnattest_T : in out Test);
procedure Test_Integer_To_Unsigned_64_d5b49e (Gnattest_T : in out Test) renames Test_Integer_To_Unsigned_64;
-- id:2.2/d5b49ec53f6693eb/Integer_To_Unsigned_64/1/0/
procedure Test_Integer_To_Unsigned_64 (Gnattest_T : in out Test) is
-- dg_types.ads:203:5:Integer_To_Unsigned_64
-- end read only
pragma Unreferenced (Gnattest_T);
begin
AUnit.Assertions.Assert
(Gnattest_Generated.Default_Assert_Value,
"Test not implemented.");
-- begin read only
end Test_Integer_To_Unsigned_64;
-- end read only
-- begin read only
-- id:2.2/02/
--
-- This section can be used to add elaboration code for the global state.
--
begin
-- end read only
null;
-- begin read only
-- end read only
end DG_Types.Test_Data.Tests;
|
pragma License (Unrestricted);
-- implementation unit required by compiler
with Ada.Exceptions;
with System.Synchronous_Control;
package System.Soft_Links is
pragma Preelaborate;
function Do_Get_Current_Excep
return Ada.Exceptions.Exception_Occurrence_Access;
type Get_Current_Excep_Handler is
access function return Ada.Exceptions.Exception_Occurrence_Access;
pragma Favor_Top_Level (Get_Current_Excep_Handler);
-- required for elaboration of packages by compiler (s-soflin.ads)
-- the result would passed to Save_Occurrence or Save_Library_Occurrence.
Get_Current_Excep : constant not null Get_Current_Excep_Handler :=
Do_Get_Current_Excep'Access;
-- required for entry call by compiler (s-soflin.ads)
-- the result would passed to Exceptional_Complete_Rendezvous,
-- Exceptional_Complete_Entry_Body
-- or Exceptional_Complete_Single_Entry_Body.
function Get_GNAT_Exception return Ada.Exceptions.Exception_Id;
pragma Inline (Get_GNAT_Exception);
-- required for library-level controlled object by compiler (s-soflin.ads)
procedure Save_Library_Occurrence (
X : Ada.Exceptions.Exception_Occurrence_Access)
with Import,
Convention => Ada,
External_Name => "system__soft_links__save_library_occurrence";
-- no-operation
function Zero return Integer is (0);
procedure Nop
renames Synchronous_Control.Nop;
type Current_Master_Handler is access function return Integer;
pragma Favor_Top_Level (Current_Master_Handler);
type Enter_Master_Handler is access procedure;
pragma Favor_Top_Level (Enter_Master_Handler);
type Complete_Master_Handler is access procedure;
pragma Favor_Top_Level (Complete_Master_Handler);
-- required for controlled types and task by compiler (s-soflin.ads)
Current_Master : not null Current_Master_Handler := Zero'Access;
-- required for task by compiler (s-soflin.ads)
Enter_Master : not null Enter_Master_Handler := Nop'Access;
Complete_Master : not null Complete_Master_Handler := Nop'Access;
-- required for many times by compiler (s-soflin.ads)
Abort_Defer : Synchronous_Control.Lock_Abort_Handler
renames Synchronous_Control.Lock_Abort_Hook;
-- required for exception handler by compiler (s-soflin.ads)
Abort_Undefer : Synchronous_Control.Unlock_Abort_Handler
renames Synchronous_Control.Unlock_Abort_Hook;
-- required for limited interface by compiler (s-soflin.ads)
type Dummy_Communication_Block is record
Comp_1 : Address;
Comp_2 : Boolean;
Comp_3 : Boolean;
end record;
pragma Suppress_Initialization (Dummy_Communication_Block);
end System.Soft_Links;
|
------------------------------------------------------------------------------
-- G P S --
-- --
-- Copyright (C) 2001-2016, AdaCore --
-- --
-- This 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. This software 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. See the GNU General Public --
-- License for more details. You should have received a copy of the GNU --
-- General Public License distributed with this software; see file --
-- COPYING3. If not, go to http://www.gnu.org/licenses for a complete copy --
-- of the license. --
------------------------------------------------------------------------------
generic
type Generic_Type is private;
package Generic_Stack is
type Simple_Stack is private;
type Generic_Type_Access is access all Generic_Type;
Stack_Empty : exception;
-- Raised by the functions below when stack is empty.
procedure Push (Stack : in out Simple_Stack; Value : Generic_Type);
-- Push Value on top of Stack.
procedure Pop (Stack : in out Simple_Stack; Value : out Generic_Type);
-- Remove the value on top of Stack and return it in Value.
-- Raise Stack_Empty if Stack is empty.
procedure Pop (Stack : in out Simple_Stack);
-- Remove the value on top of Stack.
-- Raise Stack_Empty if Stack is empty.
function Top (Stack : Simple_Stack) return Generic_Type_Access;
-- Return a pointer to the top of the stack.
-- Note that modifying the contents of the returned pointer will
-- modify the contents of the stack.
-- Raise Stack_Empty if Stack is empty.
function Next (Stack : Simple_Stack) return Generic_Type_Access;
-- Return a pointer to the next item of the stack, or null if none.
procedure Traverse_Stack
(Stack : Simple_Stack;
Callback : access function (Obj : Generic_Type) return Boolean);
-- Traverse Stack and call Callback on each element of the stack.
-- Stop when Stack is traversed or when Callback returns False.
procedure Clear (Stack : in out Simple_Stack);
-- Clear the contents of stack. This automatically frees memory for Stack
-- as well.
function Is_Empty (Stack : Simple_Stack) return Boolean;
-- Returns True if the stack is empty.
private
type Type_Array is array (Positive range <>) of aliased Generic_Type;
type Type_Array_Access is access all Type_Array;
type Simple_Stack is record
Values : Type_Array_Access; -- Index starts at 1
Last : Natural := 0; -- Last significant element in Values
end record;
pragma Inline (Push);
pragma Inline (Pop);
pragma Inline (Top);
pragma Inline (Next);
end Generic_Stack;
|
with Ada.Real_Time; use Ada.Real_Time;
with Ada.Numerics;
package Units with
Spark_Mode is
---------------------
-- The unit system
---------------------
type Unit_Type is new Float with -- As tagged Type? -> Generics with Unit_Type'Class
Dimension_System =>
((Unit_Name => Meter, Unit_Symbol => 'm', Dim_Symbol => 'L'),
(Unit_Name => Kilogram, Unit_Symbol => "kg", Dim_Symbol => 'M'),
(Unit_Name => Second, Unit_Symbol => 's', Dim_Symbol => 'T'),
(Unit_Name => Ampere, Unit_Symbol => 'A', Dim_Symbol => 'I'),
(Unit_Name => Kelvin, Unit_Symbol => 'K', Dim_Symbol => "Theta"),
(Unit_Name => Radian, Unit_Symbol => "Rad", Dim_Symbol => "A")),
Default_Value => 0.0; -- required for matrices
type Unit_Array is array (Natural range <>) of Unit_Type;
-- Base Units
subtype Length_Type is Unit_Type with
Dimension => (Symbol => 'm', Meter => 1, others => 0);
subtype Mass_Type is Unit_Type with
Dimension => (Symbol => "kg", Kilogram => 1, others => 0);
subtype Time_Type is Unit_Type with
Dimension => (Symbol => 's', Second => 1, others => 0);
subtype Current_Type is Unit_Type with
Dimension => (Symbol => 'A', Ampere => 1, others => 0);
subtype Temperature_Type is Unit_Type with
Dimension => (Symbol => 'K', Kelvin => 1, others => 0);
subtype Angle_Type is Unit_Type with
Dimension => (Symbol => "Rad", Radian => 1, others => 0);
-- Derived Units
subtype Length_Angle_Ratio_Type is Unit_Type with
Dimension => (Meter => 1, Radian => -1, others => 0);
-- mechanical
subtype Frequency_Type is Unit_Type with
Dimension => (Symbol => "Hz", Second => -1, others => 0);
subtype Force_Type is Unit_Type with
Dimension => (Symbol => "N", Kilogram => 1, Meter => 1, Second => -2, others => 0);
subtype Energy_Type is Unit_Type with
Dimension => (Symbol => "J", Kilogram => 1, Meter => 2, Second => -2, others => 0);
subtype Power_Type is Unit_Type with
Dimension => (Symbol => "W", Kilogram => 1, Meter => 2, Second => -3, others => 0);
subtype Pressure_Type is Unit_Type with
Dimension => (Symbol => "Pa", Kilogram => 1, Meter => -1, Second => -2, others => 0);
-- electromagnetic
subtype Voltage_Type is Unit_Type with
Dimension =>
(Symbol => 'V',
Meter => 2,
Kilogram => 1,
Second => -3,
Ampere => -1,
others => 0);
subtype Charge_Type is Unit_Type with
Dimension => (Symbol => 'C', Second => 1, Ampere => 1, others => 0);
subtype Capacity_Type is Unit_Type with
Dimension =>
(Symbol => 'F',
Kilogram => -1,
Meter => -2,
Second => 4,
Ampere => 2,
others => 0);
subtype Resistivity_Type is Unit_Type with
Dimension =>
(Symbol => "Ω",
Kilogram => 1,
Meter => 2,
Second => -2,
Ampere => -3,
others => 0);
subtype Inductivity_Type is Unit_Type with
Dimension =>
(Symbol => 'H',
Kilogram => 1,
Meter => 2,
Second => -2,
Ampere => -2,
others => 0);
subtype Electric_Field_Type is Unit_Type with
Dimension =>
(Meter => 1,
Kilogram => 1,
Second => -3,
Ampere => -1,
others => 0);
subtype Magnetic_Flux_Type is Unit_Type with
Dimension =>
(Symbol => "Wb",
Kilogram => 1,
Meter => 2,
Second => -2,
Ampere => -1,
others => 0);
subtype Magnetic_Flux_Density_Type is Unit_Type with
Dimension => (Symbol => 'T', Kilogram => 1, Second => -2, Ampere => -1, others => 0);
-- further important dimensions
subtype Area_Type is Unit_Type with
Dimension => (Symbol => "m^2", Meter => 2, others => 0);
subtype Volume_Type is Unit_Type with
Dimension => (Symbol => "m^3", Meter => 3, others => 0);
subtype Linear_Velocity_Type is Unit_Type with
Dimension => (Meter => 1, Second => -1, others => 0);
subtype Angular_Velocity_Type is Unit_Type with
Dimension => (Radian => 1, Second => -1, others => 0);
subtype Linear_Acceleration_Type is Unit_Type with
Dimension => (Meter => 1, Second => -2, others => 0);
subtype Angular_Acceleration_Type is Unit_Type with
Dimension => (Radian => 1, Second => -2, others => 0);
--------------------------
-- Prefixes for units
--------------------------
subtype Prefix_Type is Unit_Type;
--type Prefix_Type is digits 2 range 1.0e-24 .. 1.0e+24;
Yocto : constant Prefix_Type := Prefix_Type (1.0e-24);
Zepto : constant Prefix_Type := Prefix_Type (1.0e-21);
Atto : constant Prefix_Type := Prefix_Type (1.0e-18);
Femto : constant Prefix_Type := Prefix_Type (1.0e-15);
Pico : constant Prefix_Type := Prefix_Type (1.0e-12);
Nano : constant Prefix_Type := Prefix_Type (1.0e-9);
Micro : constant Prefix_Type := Prefix_Type (1.0e-6);
Milli : constant Prefix_Type := Prefix_Type (1.0e-3);
Centi : constant Prefix_Type := Prefix_Type (1.0e-2);
Deci : constant Prefix_Type := Prefix_Type (1.0e-1);
Deca : constant Prefix_Type := Prefix_Type (1.0e+1);
Hecto : constant Prefix_Type := Prefix_Type (1.0e+2);
Kilo : constant Prefix_Type := Prefix_Type (1.0e+3);
Mega : constant Prefix_Type := Prefix_Type (1.0e+6);
Giga : constant Prefix_Type := Prefix_Type (1.0e+9);
Tera : constant Prefix_Type := Prefix_Type (1.0e+12);
Peta : constant Prefix_Type := Prefix_Type (1.0e+15);
Exa : constant Prefix_Type := Prefix_Type (1.0e+18);
Zetta : constant Prefix_Type := Prefix_Type (1.0e+21);
Yotta : constant Prefix_Type := Prefix_Type (1.0e+24);
--------------------------
-- The units
--------------------------
-- Base units
Meter : constant Length_Type := Length_Type (1.0);
Kilogram : constant Mass_Type := Mass_Type (1.0);
Gram : constant Mass_Type := Mass_Type (1.0e-3);
Second : constant Time_Type := Time_Type (1.0);
Ampere : constant Current_Type := Current_Type (1.0);
Kelvin : constant Temperature_Type := Temperature_Type (1.0);
-- Angular Units
Radian : constant Angle_Type := Angle_Type (1.0);
Degree : constant Angle_Type := Angle_Type (2.0 * Ada.Numerics.Pi / 360.0);
Evolution : constant Angle_Type := Angle_Type (2.0 * Ada.Numerics.Pi);
-- Derived Units
Newton : constant Force_Type := Force_Type (1.0);
Joule : constant Energy_Type := Energy_Type (1.0);
Watt : constant Power_Type := Power_Type (1.0);
Ohm : constant Resistivity_Type := Resistivity_Type (1.0);
Pascal : constant Pressure_Type := Pressure_Type (1.0);
Volt : constant Voltage_Type := Voltage_Type (1.0);
Coulomb : constant Charge_Type := Charge_Type(1.0);
Farad : constant Capacity_Type := Capacity_Type(1.0);
Weber : constant Magnetic_Flux_Type := Magnetic_Flux_Type(1.0);
Tesla : constant Magnetic_Flux_Density_Type := Magnetic_Flux_Density_Type(1.0);
Henry : constant Inductivity_Type := Inductivity_Type(1.0);
Hertz : constant Frequency_Type := Frequency_Type (1.0);
-- Non SI but metric
Minute : constant Time_Type := 60.0 * Second;
Hour : constant Time_Type := 60.0 * Minute;
Day : constant Time_Type := 24.0 * Hour;
Tonne : constant Mass_Type := 1_000.0 * Kilogram;
Angstrom : constant Length_Type := 1.0 * Nano * Meter;
Litre : constant Volume_Type := 1.0 * (1.0 * Deci * Meter)**3;
Bar : constant Pressure_Type := 1_000.0 * Hecto * Pascal;
Gauss : constant Magnetic_Flux_Density_Type := 0.1 * Tesla;
--------------------------
-- Physical constants
--------------------------
-- Approximate gravity on the earth's surface
GRAVITY : constant Linear_Acceleration_Type := 9.81 * Meter / (Second**2);
CELSIUS_0 : constant Temperature_Type := 273.15 * Kelvin;
DEGREE_360 : constant Angle_Type := 360.0 * Degree;
RADIAN_2PI : constant Angle_Type := 2.0 * Radian;
-- Physical constants
SPEED_OF_LIGHT : constant Linear_Velocity_Type := 299_792_458.0 * Meter / Second;
PLANCK_CONSTANT : constant Unit_Type := 6.626_070_040 * Joule * Second;
GRAVITY_CONSTANT : constant Linear_Acceleration_Type := 127_137.6 * Kilo * Meter / (Hour**2);
end Units;
|
package body Opt64_PKG is
procedure Encode (X : Integer) is
result : Hash;
begin
case X is
when 1 => result := "1";
when 2 => result := "2";
when 3 => result := "3";
when others => Result := "?";
end case;
Last_Hash := Result;
end;
end;
|
-----------------------------------------------------------------------
-- util-concurrent-pools -- Concurrent Pools
-- Copyright (C) 2011, 2015, 2018 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.Finalization;
-- The <b>Util.Concurrent.Pools</b> generic defines a pool of objects which
-- can be shared by multiple threads. First, the pool is configured to have
-- a number of objects by using the <b>Set_Size</b> procedure. Then, a thread
-- that needs an object uses the <b>Get_Instance</b> to get an object.
-- The object is removed from the pool. As soon as the thread has finished,
-- it puts back the object in the pool using the <b>Release</b> procedure.
--
-- The <b>Get_Instance</b> entry will block until an object is available.
generic
type Element_Type is private;
package Util.Concurrent.Pools is
pragma Preelaborate;
FOREVER : constant Duration := -1.0;
-- Exception raised if the Get_Instance timeout exceeded.
Timeout : exception;
-- Pool of objects
type Pool is limited new Ada.Finalization.Limited_Controlled with private;
-- Get an element instance from the pool.
-- Wait until one instance gets available.
procedure Get_Instance (From : in out Pool;
Item : out Element_Type;
Wait : in Duration := FOREVER);
-- Put the element back to the pool.
procedure Release (Into : in out Pool;
Item : in Element_Type);
-- Set the pool size.
procedure Set_Size (Into : in out Pool;
Capacity : in Positive);
-- Get the number of available elements in the pool.
procedure Get_Available (From : in out Pool;
Available : out Natural);
-- Release the pool elements.
overriding
procedure Finalize (Object : in out Pool);
private
-- To store the pool elements, we use an array which is allocated dynamically
-- by the <b>Set_Size</b> protected operation. The generated code is smaller
-- compared to the use of Ada vectors container.
type Element_Array is array (Positive range <>) of Element_Type;
type Element_Array_Access is access all Element_Array;
Null_Element_Array : constant Element_Array_Access := null;
-- Pool of objects
protected type Protected_Pool is
-- Get an element instance from the pool.
-- Wait until one instance gets available.
entry Get_Instance (Item : out Element_Type);
-- Put the element back to the pool.
procedure Release (Item : in Element_Type);
-- Set the pool size.
procedure Set_Size (Capacity : in Natural);
-- Get the number of available elements.
function Get_Available return Natural;
private
Available : Natural := 0;
Elements : Element_Array_Access := Null_Element_Array;
end Protected_Pool;
type Pool is limited new Ada.Finalization.Limited_Controlled with record
List : Protected_Pool;
end record;
end Util.Concurrent.Pools;
|
-- Copyright 2016-2021 Bartek thindil Jasicki
--
-- This file is part of Steam Sky.
--
-- Steam Sky 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.
--
-- Steam Sky 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 Steam Sky. If not, see <http://www.gnu.org/licenses/>.
with Ada.Exceptions; use Ada.Exceptions;
with Ada.Characters.Handling; use Ada.Characters.Handling;
with DOM.Core; use DOM.Core;
with DOM.Core.Documents;
with DOM.Core.Nodes; use DOM.Core.Nodes;
with DOM.Core.Elements; use DOM.Core.Elements;
with Messages; use Messages;
with Ships.Cargo; use Ships.Cargo;
with Ships.Crew; use Ships.Crew;
with Crew; use Crew;
with Crew.Inventory; use Crew.Inventory;
with Items; use Items;
with Statistics; use Statistics;
with Log; use Log;
with Goals; use Goals;
with Trades; use Trades;
package body Crafts is
procedure LoadRecipes(Reader: Tree_Reader) is
TempRecord: Craft_Data;
TempMaterials: UnboundedString_Container.Vector;
TempAmount: Positive_Container.Vector;
RecipesData: Document;
NodesList, ChildNodes: Node_List;
Amount, DeleteIndex: Natural;
RecipeIndex, ItemIndex, Value: Unbounded_String;
RecipeNode, ChildNode: Node;
MaterialAdded: Boolean;
Action: Data_Action;
SkillIndex: Skills_Container.Extended_Index;
begin
RecipesData := Get_Tree(Reader);
NodesList :=
DOM.Core.Documents.Get_Elements_By_Tag_Name(RecipesData, "recipe");
Load_Recipes_Loop :
for I in 0 .. Length(NodesList) - 1 loop
TempRecord :=
(MaterialTypes => TempMaterials, MaterialAmounts => TempAmount,
ResultIndex => Null_Unbounded_String, ResultAmount => 10_000,
Workplace => ALCHEMY_LAB, Skill => 1, Time => 15, Difficulty => 1,
Tool => To_Unbounded_String("None"), Reputation => -100,
ToolQuality => 100);
RecipeNode := Item(NodesList, I);
RecipeIndex :=
To_Unbounded_String(Get_Attribute(RecipeNode, "index"));
Action :=
(if Get_Attribute(RecipeNode, "action")'Length > 0 then
Data_Action'Value(Get_Attribute(RecipeNode, "action"))
else ADD);
if Action in UPDATE | REMOVE then
if not Recipes_Container.Contains(Recipes_List, RecipeIndex) then
raise Data_Loading_Error
with "Can't " & To_Lower(Data_Action'Image(Action)) &
" recipe '" & To_String(RecipeIndex) &
"', there is no recipe with that index.";
end if;
elsif Recipes_Container.Contains(Recipes_List, RecipeIndex) then
raise Data_Loading_Error
with "Can't add recipe '" & To_String(RecipeIndex) &
"', there is already a recipe with that index.";
end if;
if Action /= REMOVE then
if Action = UPDATE then
TempRecord := Recipes_List(RecipeIndex);
end if;
ChildNodes :=
DOM.Core.Elements.Get_Elements_By_Tag_Name
(RecipeNode, "material");
Read_Materials_Loop :
for J in 0 .. Length(ChildNodes) - 1 loop
ChildNode := Item(ChildNodes, J);
Amount := Natural'Value(Get_Attribute(ChildNode, "amount"));
Value := To_Unbounded_String(Get_Attribute(ChildNode, "type"));
if Amount > 0 then
MaterialAdded := False;
Check_Added_Materials_Loop :
for K in
TempRecord.MaterialTypes.First_Index ..
TempRecord.MaterialTypes.Last_Index loop
if TempRecord.MaterialTypes(K) = Value then
TempRecord.MaterialAmounts(K) := Amount;
MaterialAdded := True;
exit Check_Added_Materials_Loop;
end if;
end loop Check_Added_Materials_Loop;
if not MaterialAdded then
TempRecord.MaterialTypes.Append(New_Item => Value);
TempRecord.MaterialAmounts.Append(New_Item => Amount);
end if;
else
DeleteIndex := TempRecord.MaterialTypes.First_Index;
Delete_Materials_Loop :
while DeleteIndex <= TempRecord.MaterialTypes.Last_Index loop
if TempRecord.MaterialTypes(DeleteIndex) = Value then
TempRecord.MaterialTypes.Delete(Index => DeleteIndex);
exit Delete_Materials_Loop;
end if;
DeleteIndex := DeleteIndex + 1;
end loop Delete_Materials_Loop;
end if;
end loop Read_Materials_Loop;
Value := To_Unbounded_String(Get_Attribute(RecipeNode, "result"));
if Value /= Null_Unbounded_String then
ItemIndex := Value;
if ItemIndex = Null_Unbounded_String then
raise Data_Loading_Error
with "Can't add recipe '" & To_String(RecipeIndex) &
"', result item index '" & To_String(Value) &
"' does't exist.";
end if;
TempRecord.ResultIndex := ItemIndex;
end if;
Value := To_Unbounded_String(Get_Attribute(RecipeNode, "crafted"));
if Value /= Null_Unbounded_String then
TempRecord.ResultAmount := Positive'Value(To_String(Value));
end if;
Value :=
To_Unbounded_String(Get_Attribute(RecipeNode, "workplace"));
if Value /= Null_Unbounded_String then
TempRecord.Workplace := ModuleType'Value(To_String(Value));
end if;
Value := To_Unbounded_String(Get_Attribute(RecipeNode, "skill"));
if Value /= Null_Unbounded_String then
SkillIndex := Find_Skill_Index(To_String(Value));
if SkillIndex = 0 then
raise Data_Loading_Error
with "Can't add recipe '" & To_String(RecipeIndex) &
"', no skill named '" & To_String(Value) & "'";
end if;
TempRecord.Skill := SkillIndex;
end if;
if Get_Attribute(RecipeNode, "time") /= "" then
TempRecord.Time :=
Positive'Value(Get_Attribute(RecipeNode, "time"));
end if;
if Get_Attribute(RecipeNode, "difficulty") /= "" then
TempRecord.Difficulty :=
Positive'Value(Get_Attribute(RecipeNode, "difficulty"));
end if;
if Get_Attribute(RecipeNode, "tool") /= "" then
TempRecord.Tool :=
To_Unbounded_String(Get_Attribute(RecipeNode, "tool"));
end if;
Value :=
To_Unbounded_String(Get_Attribute(RecipeNode, "reputation"));
if Value /= Null_Unbounded_String then
TempRecord.Reputation := Integer'Value(To_String(Value));
end if;
Value :=
To_Unbounded_String(Get_Attribute(RecipeNode, "toolquality"));
if Value /= Null_Unbounded_String then
TempRecord.ToolQuality := Positive'Value(To_String(Value));
end if;
if Action /= UPDATE then
Recipes_Container.Include
(Recipes_List, RecipeIndex, TempRecord);
Log_Message
("Recipe added: " &
To_String(Items_List(TempRecord.ResultIndex).Name),
EVERYTHING);
else
Recipes_List(RecipeIndex) := TempRecord;
Log_Message
("Recipe updated: " &
To_String(Items_List(TempRecord.ResultIndex).Name),
EVERYTHING);
end if;
else
Recipes_Container.Exclude(Recipes_List, RecipeIndex);
Log_Message
("Recipe removed: " & To_String(RecipeIndex), EVERYTHING);
end if;
end loop Load_Recipes_Loop;
end LoadRecipes;
function SetRecipeData(RecipeIndex: Unbounded_String) return Craft_Data is
Recipe: Craft_Data;
ItemIndex: Unbounded_String;
begin
if Length(RecipeIndex) > 6
and then Slice(RecipeIndex, 1, 5) = "Study" then
ItemIndex := Unbounded_Slice(RecipeIndex, 7, Length(RecipeIndex));
Recipe.MaterialTypes.Append(New_Item => Items_List(ItemIndex).IType);
Recipe.MaterialAmounts.Append(New_Item => 1);
Recipe.ResultIndex := ItemIndex;
Recipe.ResultAmount := 0;
Recipe.Workplace := ALCHEMY_LAB;
Set_Recipe_Skill_Loop :
for ProtoRecipe of Recipes_List loop
if ProtoRecipe.ResultIndex = Recipe.ResultIndex then
Recipe.Skill := ProtoRecipe.Skill;
Recipe.Time := ProtoRecipe.Difficulty * 15;
exit Set_Recipe_Skill_Loop;
end if;
end loop Set_Recipe_Skill_Loop;
Recipe.Difficulty := 1;
Recipe.Tool := Alchemy_Tools;
Recipe.ToolQuality := 100;
return Recipe;
elsif Length(RecipeIndex) > 12
and then Slice(RecipeIndex, 1, 11) = "Deconstruct" then
ItemIndex := Unbounded_Slice(RecipeIndex, 13, Length(RecipeIndex));
Recipe.MaterialTypes.Append(New_Item => Items_List(ItemIndex).IType);
Recipe.MaterialAmounts.Append(New_Item => 1);
Recipe.Workplace := ALCHEMY_LAB;
Set_Recipe_Data_Loop :
for ProtoRecipe of Recipes_List loop
if ProtoRecipe.ResultIndex = ItemIndex then
Recipe.Skill := ProtoRecipe.Skill;
Recipe.Time := ProtoRecipe.Difficulty * 15;
Recipe.Difficulty := ProtoRecipe.Difficulty;
Recipe.ResultIndex :=
FindProtoItem(ProtoRecipe.MaterialTypes(1));
Recipe.ResultAmount :=
Positive
(Float'Ceiling
(Float(ProtoRecipe.MaterialAmounts.Element(1)) * 0.8));
if Recipe.ResultAmount = ProtoRecipe.MaterialAmounts(1) then
Recipe.ResultAmount := Recipe.ResultAmount - 1;
end if;
exit Set_Recipe_Data_Loop;
end if;
end loop Set_Recipe_Data_Loop;
Recipe.Tool := Alchemy_Tools;
Recipe.ToolQuality := 100;
return Recipe;
end if;
return Recipes_List(RecipeIndex);
end SetRecipeData;
function CheckRecipe(RecipeIndex: Unbounded_String) return Positive is
Recipe: Craft_Data;
MaterialIndexes: Positive_Container.Vector;
RecipeName: Unbounded_String;
MaxAmount: Positive := Positive'Last;
MType: ModuleType;
begin
Recipe := SetRecipeData(RecipeIndex);
if Length(RecipeIndex) > 6
and then Slice(RecipeIndex, 1, 5) = "Study" then
RecipeName :=
To_Unbounded_String("studying ") &
Items_List(Unbounded_Slice(RecipeIndex, 7, Length(RecipeIndex)))
.Name;
MType := ALCHEMY_LAB;
elsif Length(RecipeIndex) > 12
and then Slice(RecipeIndex, 1, 11) = "Deconstruct" then
RecipeName :=
To_Unbounded_String("deconstructing ") &
Items_List(Unbounded_Slice(RecipeIndex, 13, Length(RecipeIndex)))
.Name;
MType := ALCHEMY_LAB;
else
RecipeName :=
To_Unbounded_String("manufacturing ") &
Items_List(Recipe.ResultIndex).Name;
MType := Recipes_List(RecipeIndex).Workplace;
end if;
-- Check for workshop
declare
HaveWorkshop: Boolean := False;
begin
Check_For_Workshop_Loop :
for Module of Player_Ship.Modules loop
if Modules_List(Module.Proto_Index).MType = MType and
Module.Durability > 0 then
HaveWorkshop := True;
exit Check_For_Workshop_Loop;
end if;
end loop Check_For_Workshop_Loop;
if not HaveWorkshop then
raise Crafting_No_Workshop with To_String(RecipeName);
end if;
end;
-- Check for materials
if Length(RecipeIndex) > 6
and then Slice(RecipeIndex, 1, 5) = "Study" then
Study_Materials_Loop :
for I in Player_Ship.Cargo.Iterate loop
if Items_List(Player_Ship.Cargo(I).ProtoIndex).Name =
Items_List(Recipe.ResultIndex).Name then
MaterialIndexes.Append
(New_Item => Inventory_Container.To_Index(I));
exit Study_Materials_Loop;
end if;
end loop Study_Materials_Loop;
MaxAmount := 1;
elsif Length(RecipeIndex) > 12
and then Slice(RecipeIndex, 1, 11) = "Deconstruct" then
Deconstruct_Materials_Loop :
for I in Player_Ship.Cargo.Iterate loop
if Player_Ship.Cargo(I).ProtoIndex =
Unbounded_Slice(RecipeIndex, 13, Length(RecipeIndex)) then
MaterialIndexes.Append
(New_Item => Inventory_Container.To_Index(I));
MaxAmount := Player_Ship.Cargo(I).Amount;
exit Deconstruct_Materials_Loop;
end if;
end loop Deconstruct_Materials_Loop;
else
Find_Materials_Loop :
for J in Recipe.MaterialTypes.Iterate loop
Check_Player_Cargo_Loop :
for I in Player_Ship.Cargo.Iterate loop
if Items_List(Player_Ship.Cargo(I).ProtoIndex).IType =
Recipe.MaterialTypes(J) and
Player_Ship.Cargo(I).Amount >=
Recipe.MaterialAmounts
(UnboundedString_Container.To_Index(J)) then
MaterialIndexes.Append
(New_Item => Inventory_Container.To_Index(I));
if MaxAmount >
Player_Ship.Cargo(I).Amount /
Recipe.MaterialAmounts
(UnboundedString_Container.To_Index(J)) then
MaxAmount :=
Player_Ship.Cargo(I).Amount /
Recipe.MaterialAmounts
(UnboundedString_Container.To_Index(J));
end if;
exit Check_Player_Cargo_Loop;
end if;
end loop Check_Player_Cargo_Loop;
end loop Find_Materials_Loop;
end if;
if MaterialIndexes.Length < Recipe.MaterialTypes.Length then
raise Crafting_No_Materials with To_String(RecipeName);
end if;
-- Check for tool
declare
HaveTool: Boolean := False;
begin
if Recipe.Tool /= To_Unbounded_String("None")
and then
FindItem
(Inventory => Player_Ship.Cargo, ItemType => Recipe.Tool,
Quality => Recipe.ToolQuality) >
0 then
HaveTool := True;
elsif Recipe.Tool = To_Unbounded_String("None") then
HaveTool := True;
end if;
if not HaveTool then
raise Crafting_No_Tools with To_String(RecipeName);
end if;
end;
-- Check for free space
declare
SpaceNeeded: Integer := 0;
begin
Count_Needed_Space_Loop :
for I in MaterialIndexes.Iterate loop
SpaceNeeded :=
SpaceNeeded +
Items_List(Player_Ship.Cargo(MaterialIndexes(I)).ProtoIndex)
.Weight *
Recipe.MaterialAmounts(Positive_Container.To_Index(I));
end loop Count_Needed_Space_Loop;
if FreeCargo
(SpaceNeeded -
(Items_List(Recipe.ResultIndex).Weight * Recipe.ResultAmount)) <
0 then
raise Trade_No_Free_Cargo;
end if;
end;
return MaxAmount;
end CheckRecipe;
procedure Manufacturing(Minutes: Positive) is
ResultAmount, CraftedAmount, GainedExp: Natural := 0;
Amount, NewAmount: Integer := 0;
Recipe: Craft_Data;
MaterialIndexes: UnboundedString_Container.Vector;
WorkTime, CurrentMinutes, RecipeTime: Integer;
Damage: Damage_Factor := 0.0;
RecipeName: Unbounded_String;
HaveMaterial: Boolean;
CraftingMaterial: Natural;
CrafterIndex: Crew_Container.Extended_Index;
CargoIndex, ToolIndex: Inventory_Container.Extended_Index;
procedure ResetOrder(Module: in out Module_Data; ModuleOwner: Natural) is
HaveWorker: Boolean := False;
begin
if ToolIndex in
Player_Ship.Crew(CrafterIndex).Inventory.First_Index ..
Player_Ship.Crew(CrafterIndex).Inventory.Last_Index then
UpdateCargo
(Player_Ship,
Player_Ship.Crew(CrafterIndex).Inventory(ToolIndex).ProtoIndex,
1,
Player_Ship.Crew(CrafterIndex).Inventory(ToolIndex).Durability);
UpdateInventory
(MemberIndex => CrafterIndex, Amount => -1,
InventoryIndex => ToolIndex);
end if;
Check_Owner_Loop :
for Owner of Module.Owner loop
if Owner = ModuleOwner or ModuleOwner = 0 then
if Owner in
Player_Ship.Crew.First_Index ..
Player_Ship.Crew.Last_Index then
GiveOrders(Player_Ship, Owner, Rest);
end if;
Owner := 0;
end if;
if Owner > 0 then
HaveWorker := True;
end if;
end loop Check_Owner_Loop;
if not HaveWorker then
Module.Crafting_Index := Null_Unbounded_String;
Module.Crafting_Time := 0;
Module.Crafting_Amount := 0;
end if;
end ResetOrder;
begin
Modules_Loop :
for Module of Player_Ship.Modules loop
if Module.M_Type /= WORKSHOP then
goto End_Of_Loop;
end if;
if Module.Crafting_Index = Null_Unbounded_String then
goto End_Of_Loop;
end if;
Owners_Loop :
for Owner of Module.Owner loop
if Owner = 0 then
goto End_Of_Owners_Loop;
end if;
CrafterIndex := Owner;
if Player_Ship.Crew(CrafterIndex).Order = Craft then
CurrentMinutes := Minutes;
RecipeTime := Module.Crafting_Time;
Recipe := SetRecipeData(Module.Crafting_Index);
if Length(Module.Crafting_Index) > 6
and then Slice(Module.Crafting_Index, 1, 5) = "Study" then
RecipeName :=
To_Unbounded_String("studying ") &
Items_List(Recipe.ResultIndex).Name;
elsif Length(Module.Crafting_Index) > 12
and then Slice(Module.Crafting_Index, 1, 11) =
"Deconstruct" then
RecipeName :=
To_Unbounded_String("deconstructing ") &
Items_List
(Unbounded_Slice
(Module.Crafting_Index, 13,
Length(Module.Crafting_Index)))
.Name;
else
RecipeName :=
To_Unbounded_String("manufacturing ") &
Items_List(Recipe.ResultIndex).Name;
end if;
if Module.Durability = 0 then
AddMessage
(To_String(Module.Name) & " is destroyed, so " &
To_String(Player_Ship.Crew(CrafterIndex).Name) &
" can't work on " & To_String(RecipeName) & ".",
CraftMessage, RED);
ResetOrder(Module, Owner);
CurrentMinutes := 0;
end if;
WorkTime := Player_Ship.Crew(CrafterIndex).OrderTime;
CraftedAmount := 0;
Craft_Loop :
while CurrentMinutes > 0 loop
if CurrentMinutes < RecipeTime then
RecipeTime := RecipeTime - CurrentMinutes;
WorkTime := WorkTime - CurrentMinutes;
CurrentMinutes := 0;
goto End_Of_Craft_Loop;
end if;
RecipeTime := RecipeTime - CurrentMinutes;
WorkTime := WorkTime - CurrentMinutes;
CurrentMinutes := 0;
CurrentMinutes := CurrentMinutes - RecipeTime;
WorkTime := WorkTime - RecipeTime;
RecipeTime := Recipe.Time;
MaterialIndexes.Clear;
if Length(Module.Crafting_Index) > 6
and then Slice(Module.Crafting_Index, 1, 5) = "Study" then
Study_Materials_Loop :
for J in Items_List.Iterate loop
if Items_List(J).Name =
Items_List(Recipe.ResultIndex).Name then
MaterialIndexes.Append
(New_Item => Objects_Container.Key(J));
exit Study_Materials_Loop;
end if;
end loop Study_Materials_Loop;
elsif Length(Module.Crafting_Index) > 12
and then Slice(Module.Crafting_Index, 1, 11) =
"Deconstruct" then
MaterialIndexes.Append
(New_Item =>
Unbounded_Slice
(Module.Crafting_Index, 13,
Length(Module.Crafting_Index)));
else
Recipe_Loop :
for K in Recipe.MaterialTypes.Iterate loop
Materials_Loop :
for J in Items_List.Iterate loop
if Items_List(J).IType =
Recipe.MaterialTypes
(UnboundedString_Container.To_Index(K)) then
MaterialIndexes.Append
(New_Item => Objects_Container.Key(J));
exit Materials_Loop;
end if;
end loop Materials_Loop;
end loop Recipe_Loop;
end if;
CraftingMaterial := 0;
Check_Materials_Loop :
for MaterialIndex of MaterialIndexes loop
CraftingMaterial :=
FindItem
(Player_Ship.Cargo,
ItemType => Items_List(MaterialIndex).IType);
if CraftingMaterial = 0 then
AddMessage
("You don't have the crafting materials for " &
To_String(RecipeName) & ".",
CraftMessage, RED);
ResetOrder(Module, Owner);
exit Craft_Loop;
elsif Player_Ship.Cargo(CraftingMaterial).ProtoIndex /=
MaterialIndex then
MaterialIndex :=
Player_Ship.Cargo(CraftingMaterial).ProtoIndex;
end if;
end loop Check_Materials_Loop;
if Recipe.Tool /= To_Unbounded_String("None") then
ToolIndex :=
FindTools
(CrafterIndex, Recipe.Tool, Craft,
Recipe.ToolQuality);
if ToolIndex = 0 then
AddMessage
("You don't have the tool for " &
To_String(RecipeName) & ".",
CraftMessage, RED);
ResetOrder(Module, Owner);
exit Craft_Loop;
end if;
else
ToolIndex := 0;
end if;
Amount := 0;
Count_Amount_Loop :
for J in MaterialIndexes.Iterate loop
Amount :=
Amount +
Items_List(MaterialIndexes(J)).Weight *
Recipe.MaterialAmounts
(UnboundedString_Container.To_Index(J));
end loop Count_Amount_Loop;
ResultAmount :=
Recipe.ResultAmount +
Integer
(Float'Floor
(Float(Recipe.ResultAmount) *
(Float
(GetSkillLevel
(Player_Ship.Crew(CrafterIndex),
Recipe.Skill)) /
100.0)));
Damage :=
1.0 -
Damage_Factor
(Float(Module.Durability) /
Float(Module.Max_Durability));
ResultAmount :=
ResultAmount -
Natural(Float(ResultAmount) * Float(Damage));
if ResultAmount = 0 then
ResultAmount := 1;
end if;
Check_Enough_Materials_Loop :
for J in MaterialIndexes.Iterate loop
HaveMaterial := False;
Check_Cargo_Materials_Loop :
for Item of Player_Ship.Cargo loop
if Items_List(Item.ProtoIndex).IType =
Items_List(MaterialIndexes(J)).IType and
Item.Amount >=
Recipe.MaterialAmounts
(UnboundedString_Container.To_Index(J)) then
HaveMaterial := True;
exit Check_Cargo_Materials_Loop;
end if;
end loop Check_Cargo_Materials_Loop;
exit Check_Enough_Materials_Loop when not HaveMaterial;
end loop Check_Enough_Materials_Loop;
if not HaveMaterial then
AddMessage
("You don't have enough crafting materials for " &
To_String(RecipeName) & ".",
CraftMessage, RED);
ResetOrder(Module, Owner);
exit Craft_Loop;
end if;
CraftedAmount := CraftedAmount + ResultAmount;
Module.Crafting_Amount := Module.Crafting_Amount - 1;
Remove_Materials_Loop :
for J in MaterialIndexes.Iterate loop
CargoIndex := 1;
Remove_Materials_From_Cargo_Loop :
while CargoIndex <= Player_Ship.Cargo.Last_Index loop
if Items_List(Player_Ship.Cargo(CargoIndex).ProtoIndex)
.IType =
Items_List(MaterialIndexes(J)).IType then
if Player_Ship.Cargo(CargoIndex).Amount >
Recipe.MaterialAmounts
(UnboundedString_Container.To_Index(J)) then
NewAmount :=
Player_Ship.Cargo(CargoIndex).Amount -
Recipe.MaterialAmounts
(UnboundedString_Container.To_Index(J));
Player_Ship.Cargo(CargoIndex).Amount :=
NewAmount;
exit Remove_Materials_From_Cargo_Loop;
elsif Player_Ship.Cargo(CargoIndex).Amount =
Recipe.MaterialAmounts
(UnboundedString_Container.To_Index(J)) then
Player_Ship.Cargo.Delete
(Index => CargoIndex, Count => 1);
if ToolIndex > CargoIndex then
ToolIndex := ToolIndex - 1;
end if;
exit Remove_Materials_From_Cargo_Loop;
end if;
end if;
CargoIndex := CargoIndex + 1;
end loop Remove_Materials_From_Cargo_Loop;
end loop Remove_Materials_Loop;
if ToolIndex > 0 then
DamageItem
(Player_Ship.Crew(CrafterIndex).Inventory, ToolIndex,
GetSkillLevel
(Player_Ship.Crew(CrafterIndex), Recipe.Skill),
CrafterIndex);
end if;
if Length(Module.Crafting_Index) < 6
or else
(Length(Module.Crafting_Index) > 6
and then Slice(Module.Crafting_Index, 1, 5) /=
"Study") then
Amount :=
Amount -
(Items_List(Recipe.ResultIndex).Weight * ResultAmount);
if FreeCargo(Amount) < 0 then
AddMessage
("You don't have the free cargo space for " &
To_String(RecipeName) & ".",
CraftMessage, RED);
ResetOrder(Module, Owner);
exit Craft_Loop;
end if;
if Length(Module.Crafting_Index) > 11
and then Slice(Module.Crafting_Index, 1, 11) =
"Deconstruct" then
UpdateCargo
(Player_Ship, Recipe.ResultIndex, ResultAmount);
else
UpdateCargo
(Player_Ship,
Recipes_List(Module.Crafting_Index).ResultIndex,
ResultAmount);
end if;
Update_Crafting_Orders_Loop :
for I in Recipes_List.Iterate loop
if Recipes_List(I).ResultIndex =
Recipe.ResultIndex then
UpdateCraftingOrders(Recipes_Container.Key(I));
exit Update_Crafting_Orders_Loop;
end if;
end loop Update_Crafting_Orders_Loop;
else
Learn_Recipe_Loop :
for I in Recipes_List.Iterate loop
if Recipes_List(I).ResultIndex =
Recipe.ResultIndex then
Known_Recipes.Append
(New_Item => Recipes_Container.Key(I));
exit Learn_Recipe_Loop;
end if;
end loop Learn_Recipe_Loop;
exit Craft_Loop;
end if;
exit Craft_Loop when Module.Crafting_Amount = 0;
<<End_Of_Craft_Loop>>
end loop Craft_Loop;
Module.Crafting_Time := RecipeTime;
if CraftedAmount > 0 then
if Recipe.ResultAmount > 0 then
if Length(Module.Crafting_Index) > 12
and then Slice(Module.Crafting_Index, 1, 11) =
"Deconstruct" then
AddMessage
(To_String(Player_Ship.Crew(CrafterIndex).Name) &
" has recovered" & Integer'Image(CraftedAmount) &
" " &
To_String(Items_List(Recipe.ResultIndex).Name) &
".",
CraftMessage, GREEN);
else
AddMessage
(To_String(Player_Ship.Crew(CrafterIndex).Name) &
" has manufactured" & Integer'Image(CraftedAmount) &
" " &
To_String(Items_List(Recipe.ResultIndex).Name) &
".",
CraftMessage, GREEN);
end if;
Update_Goal_Loop :
for I in Recipes_List.Iterate loop
if Recipes_List(I).ResultIndex =
Recipe.ResultIndex then
UpdateGoal
(CRAFT, Recipes_Container.Key(I), CraftedAmount);
exit Update_Goal_Loop;
end if;
end loop Update_Goal_Loop;
if CurrentGoal.TargetIndex /= Null_Unbounded_String then
UpdateGoal
(CRAFT, Items_List(Recipe.ResultIndex).IType,
CraftedAmount);
if Items_List(Recipe.ResultIndex).ShowType /=
Null_Unbounded_String then
UpdateGoal
(CRAFT, Items_List(Recipe.ResultIndex).ShowType,
CraftedAmount);
end if;
end if;
else
AddMessage
(To_String(Player_Ship.Crew(CrafterIndex).Name) &
" has discovered recipe for " &
To_String(Items_List(Recipe.ResultIndex).Name) & ".",
CraftMessage, GREEN);
UpdateGoal(CRAFT, Null_Unbounded_String);
end if;
end if;
if Player_Ship.Crew(CrafterIndex).Order = Craft then
Update_Work_Time_Loop :
while WorkTime <= 0 loop
GainedExp := GainedExp + 1;
WorkTime := WorkTime + 15;
end loop Update_Work_Time_Loop;
if GainedExp > 0 then
GainExp(GainedExp, Recipe.Skill, CrafterIndex);
end if;
Player_Ship.Crew(CrafterIndex).OrderTime := WorkTime;
if Module.Crafting_Amount = 0 then
ResetOrder(Module, Owner);
end if;
end if;
end if;
<<End_Of_Owners_Loop>>
end loop Owners_Loop;
<<End_Of_Loop>>
end loop Modules_Loop;
exception
when An_Exception : Crew_No_Space_Error =>
AddMessage(Exception_Message(An_Exception), OrderMessage, RED);
GiveOrders(Player_Ship, CrafterIndex, Rest);
end Manufacturing;
procedure SetRecipe
(Workshop, Amount: Positive; RecipeIndex: Unbounded_String) is
RecipeName, ItemIndex: Unbounded_String;
begin
Player_Ship.Modules(Workshop).Crafting_Amount := Amount;
if Length(RecipeIndex) > 6
and then Slice(RecipeIndex, 1, 5) = "Study" then
ItemIndex := Unbounded_Slice(RecipeIndex, 7, Length(RecipeIndex));
Set_Study_Difficulty_Loop :
for ProtoRecipe of Recipes_List loop
if ProtoRecipe.ResultIndex = ItemIndex then
Player_Ship.Modules(Workshop).Crafting_Time :=
ProtoRecipe.Difficulty * 15;
exit Set_Study_Difficulty_Loop;
end if;
end loop Set_Study_Difficulty_Loop;
RecipeName :=
To_Unbounded_String("Studying ") & Items_List(ItemIndex).Name;
Player_Ship.Modules(Workshop).Crafting_Index := RecipeIndex;
elsif Length(RecipeIndex) > 12
and then Slice(RecipeIndex, 1, 11) = "Deconstruct" then
ItemIndex := Unbounded_Slice(RecipeIndex, 13, Length(RecipeIndex));
Set_Deconstruct_Difficulty_Loop :
for ProtoRecipe of Recipes_List loop
if ProtoRecipe.ResultIndex = ItemIndex then
Player_Ship.Modules(Workshop).Crafting_Time :=
ProtoRecipe.Difficulty * 15;
exit Set_Deconstruct_Difficulty_Loop;
end if;
end loop Set_Deconstruct_Difficulty_Loop;
RecipeName :=
To_Unbounded_String("Deconstructing ") & Items_List(ItemIndex).Name;
Player_Ship.Modules(Workshop).Crafting_Index := RecipeIndex;
else
Player_Ship.Modules(Workshop).Crafting_Index := RecipeIndex;
Player_Ship.Modules(Workshop).Crafting_Time :=
Recipes_List(RecipeIndex).Time;
RecipeName := Items_List(Recipes_List(RecipeIndex).ResultIndex).Name;
end if;
AddMessage
(To_String(RecipeName) & " was set as manufacturing order in " &
To_String(Player_Ship.Modules(Workshop).Name) & ".",
CraftMessage);
UpdateOrders(Player_Ship);
end SetRecipe;
end Crafts;
|
-- ___ _ ___ _ _ --
-- / __| |/ (_) | | Common SKilL implementation --
-- \__ \ ' <| | | |__ runtime field restriction handling --
-- |___/_|\_\_|_|____| by: Timm Felden --
-- --
pragma Ada_2012;
with Ada.Containers.Vectors;
with Ada.Unchecked_Conversion;
with Skill.Types;
package Skill.Field_Restrictions is
pragma Warnings (Off);
use type Skill.Types.Annotation;
type Base_T is abstract tagged null record;
-- ID as of SkillTR
function Id (This : access Base_T) return Integer is abstract;
type Base is access all Base_T'Class;
package Vector_P is new Ada.Containers.Vectors (Natural, Base);
subtype Vector is Vector_P.Vector;
function Empty return Vector is
(Vector_P.Empty_Vector);
type Checkable_T is abstract new Base_T with null record;
function Id (This : access Checkable_T) return Integer is abstract;
-- checks argument v, return true iff argument fulfills the condition
function Check (This : access Checkable_T; V : Skill.Types.Box)
return Boolean is abstract;
type Checkable is access all Checkable_T'Class;
-- just because Ada sucks
function To is new Ada.Unchecked_Conversion(Base, Checkable);
function To is new Ada.Unchecked_Conversion(Skill.Types.Box, Skill.Types.Annotation);
type Nonnull_T is new Checkable_T with null record;
overriding
function Id (This : access Nonnull_T) return Integer is
(0);
overriding
function Check (This : access Nonnull_T; V : Skill.Types.Box)
return Boolean is
(To(V)/=null);
-- returns the nonnull instance
function Nonnull return Base;
generic
type T is private;
package Default is
type Restriction is new Base_T with record
Value : T;
end record;
type Ref is access Restriction;
overriding
function Id (This : access Restriction) return Integer is
(1);
end Default;
generic
type T is private;
With function "<=" (L,R : T) return Boolean is <>;
With function To (V : Skill.Types.Box) return T is <>;
package Rage is
type Restriction is new Checkable_T with record
Min : T;
Max : T;
end record;
type Ref is access Restriction;
overriding
function Id (This : access Restriction) return Integer is
(3);
overriding
function Check (This : access Restriction; V : Skill.Types.Box)
return Boolean is
(This.Min <= To(V) and then To(V) <= This.Max);
end Rage;
type Coding_T is new Base_T with record
Name : Skill.Types.String_Access;
end record;
overriding
function Id (This : access Coding_T) return Integer is
(5);
type Constant_Length_Pointer_T is new Base_T with null record;
overriding
function Id (This : access Constant_Length_Pointer_T) return Integer is
(7);
function Constant_Length_Pointer return Base;
end Skill.Field_Restrictions;
|
-- SPDX-License-Identifier: Apache-2.0
--
-- Copyright (c) 2018 onox <denkpadje@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 GL.Low_Level.Enums;
package GL.Pixels.Queries is
pragma Preelaborate;
package LE renames GL.Low_Level.Enums;
use all type LE.Texture_Kind;
type Support is (None, Full_Support, Caveat_Support);
type Encoding is (Linear, sRGB);
type Image_Format_Compatibility_Type is
(Image_Format_Compatibility_By_Size,
Image_Format_Compatibility_By_Class);
type Image_Class is
(Image_Class_4_X_32,
Image_Class_2_X_32,
Image_Class_1_X_32,
Image_Class_4_X_16,
Image_Class_2_X_16,
Image_Class_1_X_16,
Image_Class_4_X_8,
Image_Class_2_X_8,
Image_Class_1_X_8,
Image_Class_11_11_10,
Image_Class_10_10_10_2);
type View_Class is
(View_Class_128_Bits,
View_Class_96_Bits,
View_Class_64_Bits,
View_Class_48_Bits,
View_Class_32_Bits,
View_Class_24_Bits,
View_Class_16_Bits,
View_Class_8_Bits,
View_Class_S3tc_Dxt1_Rgb,
View_Class_S3tc_Dxt1_Rgba,
View_Class_S3tc_Dxt3_Rgba,
View_Class_S3tc_Dxt5_Rgba,
View_Class_Rgtc1_Red,
View_Class_Rgtc2_Rg,
View_Class_Bptc_Unorm,
View_Class_Bptc_Float);
function Sample_Counts
(Format : Internal_Format;
Kind : LE.Texture_Kind) return Size_Array
with Pre => Kind in Texture_2D_Multisample | Texture_2D_Multisample_Array,
Post => Sample_Counts'Result'Length > 0
and then (for all Samples of Sample_Counts'Result => Samples > 0);
-- Return the sample counts available for the internal format of the texture
function Supported
(Format : Internal_Format;
Kind : LE.Texture_Kind) return Boolean;
function Preferred
(Format : Internal_Format;
Kind : LE.Texture_Kind) return Internal_Format;
-----------------------------------------------------------------------------
function Red_Size
(Format : Internal_Format;
Kind : LE.Texture_Kind) return Size;
function Green_Size
(Format : Internal_Format;
Kind : LE.Texture_Kind) return Size;
function Blue_Size
(Format : Internal_Format;
Kind : LE.Texture_Kind) return Size;
function Alpha_Size
(Format : Internal_Format;
Kind : LE.Texture_Kind) return Size;
function Depth_Size
(Format : Internal_Format;
Kind : LE.Texture_Kind) return Size;
function Stencil_Size
(Format : Internal_Format;
Kind : LE.Texture_Kind) return Size;
function Shared_Size
(Format : Internal_Format;
Kind : LE.Texture_Kind) return Size;
-----------------------------------------------------------------------------
function Max_Width
(Format : Internal_Format;
Kind : LE.Texture_Kind) return Size;
function Max_Height
(Format : Internal_Format;
Kind : LE.Texture_Kind) return Size
with Pre => Kind /= Texture_1D;
function Max_Depth
(Format : Internal_Format;
Kind : LE.Texture_Kind) return Size
with Pre => Kind in Texture_3D | Texture_2D_Array | Texture_Cube_Map_Array |
Texture_2D_Multisample_Array;
function Max_Layers
(Format : Internal_Format;
Kind : LE.Texture_Kind) return Size
with Pre => Kind in Texture_1D_Array | Texture_2D_Array | Texture_Cube_Map_Array |
Texture_2D_Multisample_Array;
function Max_Combined_Dimensions
(Format : Internal_Format;
Kind : LE.Texture_Kind) return Long_Size;
-----------------------------------------------------------------------------
function Color_Components
(Format : Internal_Format;
Kind : LE.Texture_Kind) return Boolean;
-- Return True iff Format contains any color component (R, G, B, or A)
function Depth_Components
(Format : Internal_Format;
Kind : LE.Texture_Kind) return Boolean;
-- Return True iff Format contains a depth component
function Stencil_Components
(Format : Internal_Format;
Kind : LE.Texture_Kind) return Boolean;
-- Return True iff Format contains a stencil component
function Color_Renderable
(Format : Internal_Format;
Kind : LE.Texture_Kind) return Boolean;
-- Return True iff Format is color-renderable according to Table 8.12
-- of the OpenGL specification
function Depth_Renderable
(Format : Internal_Format;
Kind : LE.Texture_Kind) return Boolean;
-- Return True iff Format is depth-renderable according to Table 8.13
-- of the OpenGL specification
function Stencil_Renderable
(Format : Internal_Format;
Kind : LE.Texture_Kind) return Boolean;
-- Return True iff Format is stencil-renderable according to Table 8.13
-- of the OpenGL specification
-----------------------------------------------------------------------------
function Framebuffer_Renderable
(Format : Internal_Format;
Kind : LE.Texture_Kind) return Support;
-- Return the support for rendering to a resource with the given
-- internal format and texture kind when attached to a framebuffer
function Framebuffer_Renderable_Layered
(Format : Internal_Format;
Kind : LE.Texture_Kind) return Support;
-- Return the support for layered rendering to a resource with the
-- given internal format and texture kind when attached to a framebuffer
function Framebuffer_Blend
(Format : Internal_Format;
Kind : LE.Texture_Kind) return Support;
-- Return the support for rendering to a resource with the given
-- internal format and texture kind when attached to a framebuffer while
-- blending is enabled
-----------------------------------------------------------------------------
function Texture_Format
(Format : Internal_Format;
Kind : LE.Texture_Kind) return Pixels.Format;
-- Return the format to use for uploading data to a texture for best
-- performance and image quality
--
-- A Constraint_Error is raised if the internal format is not supported
function Texture_Type
(Format : Internal_Format;
Kind : LE.Texture_Kind) return Pixels.Data_Type;
-- Return the data type to use for uploading data to a texture for
-- best performance and image quality
--
-- A Constraint_Error is raised if the internal format is not supported
function Get_Texture_Format
(Format : Internal_Format;
Kind : LE.Texture_Kind) return Pixels.Format;
-- Return the format to use for downloading data from a texture for
-- best performance and image quality
--
-- A Constraint_Error is raised if the internal format is not supported
function Get_Texture_Type
(Format : Internal_Format;
Kind : LE.Texture_Kind) return Pixels.Data_Type;
-- Return the data type to use for downloading data from a texture
-- for best performance and image quality
--
-- A Constraint_Error is raised if the internal format is not supported
-----------------------------------------------------------------------------
function Mipmap
(Format : Internal_Format;
Kind : LE.Texture_Kind) return Boolean;
function Manual_Generate_Mipmap
(Format : Internal_Format;
Kind : LE.Texture_Kind) return Support;
function Auto_Generate_Mipmap
(Format : Internal_Format;
Kind : LE.Texture_Kind) return Support;
-----------------------------------------------------------------------------
function Color_Encoding
(Format : Internal_Format;
Kind : LE.Texture_Kind) return Encoding
with Pre => Color_Components (Format, Kind);
-- Return the color encoding
--
-- A Constraint_Error is raised if the format is not supported
function sRGB_Read
(Format : Internal_Format;
Kind : LE.Texture_Kind) return Support;
-- Return support for converting from sRGB colorspace
function sRGB_Write
(Format : Internal_Format;
Kind : LE.Texture_Kind) return Support;
-- Return support for converting to sRGB colorspace
function sRGB_Decode_Sampling_Time
(Format : Internal_Format;
Kind : LE.Texture_Kind) return Support;
-- Return support for decoding during sampling time
-----------------------------------------------------------------------------
function Filter
(Format : Internal_Format;
Kind : LE.Texture_Kind) return Support;
-- Return support for filter types other than Nearest and
-- Nearest_Mipmap_Nearest
function Vertex_Texture
(Format : Internal_Format;
Kind : LE.Texture_Kind) return Support;
-- Return support for using the resource for texture sampling in
-- a vertex shader
function Tess_Control_Texture
(Format : Internal_Format;
Kind : LE.Texture_Kind) return Support;
-- Return support for using the resource for texture sampling in
-- a tesselation control shader
function Tess_Evaluation_Texture
(Format : Internal_Format;
Kind : LE.Texture_Kind) return Support;
-- Return support for using the resource for texture sampling in
-- a tesselation evaluation shader
function Geometry_Texture
(Format : Internal_Format;
Kind : LE.Texture_Kind) return Support;
-- Return support for using the resource for texture sampling in
-- a geometry shader
function Fragment_Texture
(Format : Internal_Format;
Kind : LE.Texture_Kind) return Support;
-- Return support for using the resource for texture sampling in
-- a fragment shader
function Compute_Texture
(Format : Internal_Format;
Kind : LE.Texture_Kind) return Support;
-- Return support for using the resource for texture sampling in
-- a compute shader
function Texture_Shadow
(Format : Internal_Format;
Kind : LE.Texture_Kind) return Support;
-- Return support for using the resource for shadow samplers
function Texture_Gather
(Format : Internal_Format;
Kind : LE.Texture_Kind) return Support;
-- Return support for using the resource in texture gather operations
function Texture_Gather_Shadow
(Format : Internal_Format;
Kind : LE.Texture_Kind) return Support;
-- Return support for using the resource in texture gather operations
-- with shadow samplers
-----------------------------------------------------------------------------
function Shader_Image_Load
(Format : Internal_Format;
Kind : LE.Texture_Kind) return Support;
-- Return support for using the resource in image load operations
function Shader_Image_Store
(Format : Internal_Format;
Kind : LE.Texture_Kind) return Support;
-- Return support for using the resource in image store operations
function Shader_Image_Atomic
(Format : Internal_Format;
Kind : LE.Texture_Kind) return Support;
-- Return support for using the resource in atomic memory operations
-----------------------------------------------------------------------------
function Image_Texel_Size
(Format : Internal_Format;
Kind : LE.Texture_Kind) return Size;
-- Return the size of a texel when the resource is used as image texture
function Image_Pixel_Format
(Format : Internal_Format;
Kind : LE.Texture_Kind) return Pixels.Format;
-- Return the format of the resource when used as image texture
--
-- A Constraint_Error is raised if the internal format is not supported
function Image_Pixel_Type
(Format : Internal_Format;
Kind : LE.Texture_Kind) return Pixels.Data_Type;
-- Return the data type of the resource when used as image texture
--
-- A Constraint_Error is raised if the internal format is not supported
function Image_Format_Compatibility
(Format : Internal_Format;
Kind : LE.Texture_Kind) return Image_Format_Compatibility_Type;
-- Return matching criteria of the resource when used as image texture
--
-- A Constraint_Error is raised if the internal format is not supported
function Simultaneous_Texture_And_Depth_Test
(Format : Internal_Format;
Kind : LE.Texture_Kind) return Support
with Pre => Depth_Components (Format, Kind);
-- Return support for using the resource in texture sampling while
-- bound as a buffer for depth testing
function Simultaneous_Texture_And_Stencil_Test
(Format : Internal_Format;
Kind : LE.Texture_Kind) return Support
with Pre => Stencil_Components (Format, Kind);
-- Return support for using the resource in texture sampling while
-- bound as a buffer for stencil testing
function Simultaneous_Texture_And_Depth_Write
(Format : Internal_Format;
Kind : LE.Texture_Kind) return Support
with Pre => Depth_Components (Format, Kind);
-- Return support for using the resource in texture sampling while
-- depth writes to the resource
function Simultaneous_Texture_And_Stencil_Write
(Format : Internal_Format;
Kind : LE.Texture_Kind) return Support
with Pre => Stencil_Components (Format, Kind);
-- Return support for using the resource in texture sampling while
-- stencil writes to the resource
-----------------------------------------------------------------------------
function Texture_Compressed_Block_Width
(Format : Compressed_Format;
Kind : LE.Texture_Kind) return Size;
-- Return width of a compressed block in bytes
function Texture_Compressed_Block_Height
(Format : Compressed_Format;
Kind : LE.Texture_Kind) return Size;
-- Return height of a compressed block in bytes
function Texture_Compressed_Block_Size
(Format : Compressed_Format;
Kind : LE.Texture_Kind) return Size;
-- Return number of bytes of a compressed block
-----------------------------------------------------------------------------
function Clear_Buffer
(Format : Internal_Format;
Kind : LE.Texture_Kind) return Support;
function Texture_View
(Format : Internal_Format;
Kind : LE.Texture_Kind) return Support;
function Image_Compatibility_Class
(Format : Internal_Format;
Kind : LE.Texture_Kind) return Image_Class;
-- Return the compatibility class when the resource is used as image texture
--
-- A Constraint_Error is raised if the internal format is not supported
function View_Compatibility_Class
(Format : Internal_Format;
Kind : LE.Texture_Kind) return View_Class;
-- Return the compatibility class when the resource is used as texture view
--
-- A Constraint_Error is raised if the internal format is not supported
private
for Support use
(None => 16#0000#,
Full_Support => 16#82B7#,
Caveat_Support => 16#82B8#);
for Support'Size use Low_Level.Enum'Size;
for Encoding use
(Linear => 16#2601#,
sRGB => 16#8C40#);
for Encoding'Size use Low_Level.Enum'Size;
for Image_Format_Compatibility_Type use
(Image_Format_Compatibility_By_Size => 16#90C8#,
Image_Format_Compatibility_By_Class => 16#90C9#);
for Image_Format_Compatibility_Type'Size use Low_Level.Enum'Size;
for Image_Class use
(Image_Class_4_X_32 => 16#82B9#,
Image_Class_2_X_32 => 16#82BA#,
Image_Class_1_X_32 => 16#82BB#,
Image_Class_4_X_16 => 16#82BC#,
Image_Class_2_X_16 => 16#82BD#,
Image_Class_1_X_16 => 16#82BE#,
Image_Class_4_X_8 => 16#82BF#,
Image_Class_2_X_8 => 16#82C0#,
Image_Class_1_X_8 => 16#82C1#,
Image_Class_11_11_10 => 16#82C2#,
Image_Class_10_10_10_2 => 16#82C3#);
for Image_Class'Size use Low_Level.Enum'Size;
for View_Class use
(View_Class_128_Bits => 16#82C4#,
View_Class_96_Bits => 16#82C5#,
View_Class_64_Bits => 16#82C6#,
View_Class_48_Bits => 16#82C7#,
View_Class_32_Bits => 16#82C8#,
View_Class_24_Bits => 16#82C9#,
View_Class_16_Bits => 16#82CA#,
View_Class_8_Bits => 16#82CB#,
View_Class_S3tc_Dxt1_Rgb => 16#82CC#,
View_Class_S3tc_Dxt1_Rgba => 16#82CD#,
View_Class_S3tc_Dxt3_Rgba => 16#82CE#,
View_Class_S3tc_Dxt5_Rgba => 16#82CF#,
View_Class_Rgtc1_Red => 16#82D0#,
View_Class_Rgtc2_Rg => 16#82D1#,
View_Class_Bptc_Unorm => 16#82D2#,
View_Class_Bptc_Float => 16#82D3#);
for View_Class'Size use Low_Level.Enum'Size;
end GL.Pixels.Queries;
|
-- This spec has been automatically generated from STM32F429x.svd
pragma Restrictions (No_Elaboration_Code);
pragma Ada_2012;
pragma Style_Checks (Off);
with HAL;
with System;
package STM32_SVD.PWR is
pragma Preelaborate;
---------------
-- Registers --
---------------
subtype CR_PLS_Field is HAL.UInt3;
subtype CR_VOS_Field is HAL.UInt2;
subtype CR_UDEN_Field is HAL.UInt2;
-- power control register
type CR_Register is record
-- Low-power deep sleep
LPDS : Boolean := False;
-- Power down deepsleep
PDDS : Boolean := False;
-- Clear wakeup flag
CWUF : Boolean := False;
-- Clear standby flag
CSBF : Boolean := False;
-- Power voltage detector enable
PVDE : Boolean := False;
-- PVD level selection
PLS : CR_PLS_Field := 16#0#;
-- Disable backup domain write protection
DBP : Boolean := False;
-- Flash power down in Stop mode
FPDS : Boolean := False;
-- Low-Power Regulator Low Voltage in deepsleep
LPLVDS : Boolean := False;
-- Main regulator low voltage in deepsleep mode
MRLVDS : Boolean := False;
-- unspecified
Reserved_12_12 : HAL.Bit := 16#0#;
-- ADCDC1
ADCDC1 : Boolean := False;
-- Regulator voltage scaling output selection
VOS : CR_VOS_Field := 16#3#;
-- Over-drive enable
ODEN : Boolean := False;
-- Over-drive switching enabled
ODSWEN : Boolean := False;
-- Under-drive enable in stop mode
UDEN : CR_UDEN_Field := 16#0#;
-- unspecified
Reserved_20_31 : HAL.UInt12 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CR_Register use record
LPDS at 0 range 0 .. 0;
PDDS at 0 range 1 .. 1;
CWUF at 0 range 2 .. 2;
CSBF at 0 range 3 .. 3;
PVDE at 0 range 4 .. 4;
PLS at 0 range 5 .. 7;
DBP at 0 range 8 .. 8;
FPDS at 0 range 9 .. 9;
LPLVDS at 0 range 10 .. 10;
MRLVDS at 0 range 11 .. 11;
Reserved_12_12 at 0 range 12 .. 12;
ADCDC1 at 0 range 13 .. 13;
VOS at 0 range 14 .. 15;
ODEN at 0 range 16 .. 16;
ODSWEN at 0 range 17 .. 17;
UDEN at 0 range 18 .. 19;
Reserved_20_31 at 0 range 20 .. 31;
end record;
subtype CSR_UDRDY_Field is HAL.UInt2;
-- power control/status register
type CSR_Register is record
-- Read-only. Wakeup flag
WUF : Boolean := False;
-- Read-only. Standby flag
SBF : Boolean := False;
-- Read-only. PVD output
PVDO : Boolean := False;
-- Read-only. Backup regulator ready
BRR : Boolean := False;
-- unspecified
Reserved_4_7 : HAL.UInt4 := 16#0#;
-- Enable WKUP pin
EWUP : Boolean := False;
-- Backup regulator enable
BRE : Boolean := False;
-- unspecified
Reserved_10_13 : HAL.UInt4 := 16#0#;
-- Regulator voltage scaling output selection ready bit
VOSRDY : Boolean := False;
-- unspecified
Reserved_15_15 : HAL.Bit := 16#0#;
-- Read-only. Over-drive mode ready
ODRDY : Boolean := False;
-- Read-only. Over-drive mode switching ready
ODSWRDY : Boolean := False;
-- Under-drive ready flag
UDRDY : CSR_UDRDY_Field := 16#0#;
-- unspecified
Reserved_20_31 : HAL.UInt12 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CSR_Register use record
WUF at 0 range 0 .. 0;
SBF at 0 range 1 .. 1;
PVDO at 0 range 2 .. 2;
BRR at 0 range 3 .. 3;
Reserved_4_7 at 0 range 4 .. 7;
EWUP at 0 range 8 .. 8;
BRE at 0 range 9 .. 9;
Reserved_10_13 at 0 range 10 .. 13;
VOSRDY at 0 range 14 .. 14;
Reserved_15_15 at 0 range 15 .. 15;
ODRDY at 0 range 16 .. 16;
ODSWRDY at 0 range 17 .. 17;
UDRDY at 0 range 18 .. 19;
Reserved_20_31 at 0 range 20 .. 31;
end record;
-----------------
-- Peripherals --
-----------------
-- Power control
type PWR_Peripheral is record
-- power control register
CR : aliased CR_Register;
-- power control/status register
CSR : aliased CSR_Register;
end record
with Volatile;
for PWR_Peripheral use record
CR at 16#0# range 0 .. 31;
CSR at 16#4# range 0 .. 31;
end record;
-- Power control
PWR_Periph : aliased PWR_Peripheral
with Import, Address => System'To_Address (16#40007000#);
end STM32_SVD.PWR;
|
-----------------------------------------------------------------------
-- 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;
|
with
--NSO.Helpers,
NSO.Types,
Interfaces,
Ada.Strings.Unbounded,
Ada.Characters.Latin_1,
Ada.Tags.Generic_Dispatching_Constructor,
Ada.Characters.Conversions;
with Ada.Containers;
-- NSO.Types;
Package Body NSO.JSON is
use Ada.Characters.Conversions, Ada.Characters;
Procedure Apply( Object : in Instance'Class ) is
Begin
if Object in Null_Object then
On_Null;
elsif Object in True_Object or Object in False_Object then
On_Boolean( Object in True_Object );
elsif Object in String_Object then
On_String( String_Object(Object).Element.Element );
elsif Object in Number_Object then
On_Number( Number_Object(Object).Element );
elsif Object in Array_Object then
Declare
Procedure Operate( Cursor : Value_Array.Cursor ) is
Idx : Natural renames Value_Array.To_Index(Cursor);
Val : Instance'Class renames Value_Array.Element(Cursor);
Begin
On_Array( Idx, Val );
End Operate;
Begin
Array_Object(Object).Element.Iterate( Operate'Access );
End;
elsif Object in Object_Object then
Declare
Procedure Operate( Cursor : Name_Value_Pairs.Cursor ) is
Key : String renames Name_Value_Pairs.Key(Cursor);
Val : Instance'Class renames Name_Value_Pairs.Element(Cursor);
Begin
On_Object( Key, Val );
End Operate;
Begin
Object_Object(Object).Element.Iterate( Operate'Access );
End;
end if;
End Apply;
Subtype ASCII_Control_Character is Character
with Static_Predicate => ASCII_Control_Character in
Latin_1.NUL..Latin_1.US|Latin_1.DEL;
Subtype ISO_6429_Control_Character is Character
with Static_Predicate => ISO_6429_Control_Character in
Latin_1.Reserved_128..Latin_1.APC;
Subtype Whitespace is Character
with Static_Predicate => Whitespace in
Latin_1.HT|Latin_1.Space|Latin_1.No_Break_Space;
Subtype Control_Character is Character
with Static_Predicate => Control_Character in
ASCII_Control_Character | ISO_6429_Control_Character;
Package Constructors is
Use Ada.Streams, NSO.Types;
-- Use Ada.Strings.Unbounded;
Type Parameter( Stream : not null access Root_Stream_Class ) is record
-- Stream : --not null access NSO.Types.Root_Stream_Class;
-- not null access Ada.Streams.Root_Stream_Type'Class;
Buffer : Nullable_Character := Null;
--Unbounded_String := To_Unbounded_String("");
end record;
-- Type Parameter is record
-- Stream : --not null access NSO.Types.Root_Stream_Class;
-- not null access Ada.Streams.Root_Stream_Type'Class;
-- Buffer : Nullable_Character := Null;
-- --Unbounded_String := To_Unbounded_String("");
-- end record;
Function Expect( C : Character; From : not null access Parameter ) return Boolean is
(if From.Buffer /= Null then From.Buffer.All = C) with Inline;
Function Expect( S : String; From : not null access Parameter ) return Boolean is
(for some C of S => Expect(C, From)) with Inline;
-- Function Expect( S : String; From : not null access Parameter ) return Character
-- with Inline;
function Constructor (Params : not null access Parameter) return Null_Object
with Pre => Expect( 'n', Params );
function Constructor (Params : not null access Parameter) return False_Object
with Pre => Expect( 'f', Params );
function Constructor (Params : not null access Parameter) return True_Object
with Pre => Expect( 't', Params );
function Constructor (Params : not null access Parameter) return String_Object
with Pre => Expect( '"', Params );
function Constructor (Params : not null access Parameter) return Number_Object
with Pre => Expect( "-0123456789", Params );
function Constructor (Params : not null access Parameter) return Array_Object
with Pre => Expect( '[', Params );
function Constructor (Params : not null access Parameter) return Object_Object
with Pre => Expect( '{', Params );
-- Generic
-- with Function Next( Stream : not null access Ada.Streams.Root_Stream_Type'Class ) return Character is <>;
Function Value_Constructor(Stream : not null access Root_Stream_Type'Class) return Instance'Class;
Function Value_Constructor(Params : not null access Parameter) return Instance'Class;
Private
-- Consumes characters from the stream until a non-whitespace character is encountered.
Function Consume_Whitespace( Stream : not null access Root_Stream_Type'Class ) return Character
with Post => Consume_Whitespace'Result not in Whitespace;
Function Consume_Whitespace( P : not null access Parameter ) return Character
with Pre => P.Buffer = Null,
Post => Consume_Whitespace'Result not in Whitespace;
-- This returns the tail of a string.
Function "-"( Input : String ) return String is
( Input(Positive'Succ(Input'First)..Input'Last) )
with Inline, Pure_Function;
-- Asserts that the next element in the stream is the given character.
-- Raises PARSE_ERROR if it does not.
Generic
Context : Parameter;
Function Expect_Character( Element : Character ) return Boolean with Inline;
-- Asserts that the next elemente in the stream are those of the given string.
-- Raises PARSE_ERROR if it does not.
Generic
Context : Parameter;
Procedure Expect_String( Element : String ) with Inline;
-- This function ensures theat the Value is the next item in the stream,
-- it accounts for an unused buffer, as well as checks the buffer's own
-- content if it is used.
Procedure Check (Param : not null access Parameter; Value : String)
with Pre => Value'Length in Positive;
-- If Params.Buffer is empty, it fills it and returns the result,
-- otherwise it simply returns the contents of the buffer.
--
-- NOTE: This will not consume current contents of the buffer, but
-- may consume a character from the stream.
Function Buffer(Params : in out Parameter) Return Character
with Inline;
Function Buffer(Params : not null access Parameter) Return Character
with Inline;
End Constructors;
Package Body Constructors is
Use NSO.Types;
Function Next_Character( Stream : not null access Root_Stream_Class )
return Reference_Character is
( New Character'(Character'Input(Stream)) ) with Inline;
Function Make_Param( Stream : not null access Ada.Streams.Root_Stream_Type'Class ) return Parameter is
Begin
Return Result : Constant Parameter :=
( Buffer => Next_Character( Stream ),
Stream => Stream );
End Make_Param;
Function Buffer(Params : not null access Parameter) Return Character is
( Buffer( Params.All ) );
Function Buffer(Params : in out Parameter) Return Character is
Empty : Constant Boolean := Params.Buffer = Null;
Begin
Return Result : Constant Character :=
(if not Empty then Params.Buffer.All
else Consume_Whitespace(Params.Stream)) do
if Empty then
Params.Buffer := New Character'( Result );
end if;
end return;
End Buffer;
Function Value_Constructor(Params : not null access Parameter) return Instance'Class is
-- If Params.Buffer is empty, it fills it and returns the result,
-- otherwise it simply returns the contents of the buffer.
Function Buffer return Character with Inline is
Empty : Constant Boolean := Params.Buffer = Null;
Begin
Return Result : Constant Character :=
(if not Empty then Params.Buffer.All
else Consume_Whitespace(Params.Stream)) do
if Empty then
Params.Buffer := New Character'( Result );
end if;
end return;
End Buffer;
C : Character renames Buffer;
Begin
-- Here we switch on the character in the buffer, constructing the
-- appropriate object.
Return Result : Constant Instance'Class :=
(case C is
when '{' => Object_Object'(Constructor(Params)),
when '[' => Array_Object' (Constructor(Params)),
when '0'..'9'
| '-' => Number_Object'(Constructor(Params)),
when '"' => String_Object'(Constructor(Params)),
when 't' => True_Object' (Constructor(Params)),
when 'f' => False_Object' (Constructor(Params)),
when 'n' => Null_Object' (Constructor(Params)),
when others => raise Parse_Error
with "'" & C & "' is an invalid character."
);
End Value_Constructor;
Function Value_Constructor(Stream : not null access Root_Stream_Type'Class) return Instance'Class is
use Constructors;
Param : Aliased Parameter:= Make_Param( Stream );
C : Character renames Param.Buffer.All;
Begin
Return Result : Constant Instance'Class := Value_Constructor(Param'Unchecked_Access);
-- (case C is
-- when '{' => Object_Object'(Constructor(Param'Access)),
-- when '[' => Array_Object' (Constructor(Param'Access)),
-- when '0'..'9'
-- | '-' => Number_Object'(Constructor(Param'Access)),
-- when '"' => String_Object'(Constructor(Param'Access)),
-- when 't' => True_Object' (Constructor(Param'Access)),
-- when 'f' => False_Object' (Constructor(Param'Access)),
-- when 'n' => Null_Object' (Constructor(Param'Access)),
-- when others => raise Parse_Error
-- with "'" & C & "' is an invalid character."
-- );
End Value_Constructor;
Function Expect_Character( Element : Character ) return Boolean is
Item : Character renames Character'Input(Context.Stream);
Begin
Return Result : Constant Boolean := Item = Element
or else raise Parse_Error with
"'"&Element&"' expected, but '" &Item& "' found.";
End Expect_Character;
Procedure Expect_String( Element : String ) is
Function Expect is new Expect_Character(Context);
Result : Constant Boolean :=
(for all C of Element => Expect(C));
Begin
Null;
End Expect_String;
Function Consume_Whitespace( Stream : not null access Root_Stream_Type'Class ) return Character is
Begin
Return Result : Character do
Loop
Result:= Character'Input( Stream );
exit when Result not in Whitespace;
End Loop;
End Return;
End Consume_Whitespace;
Function Consume_Whitespace( P : not null access Parameter ) return Character is
(Consume_Whitespace(P.Stream));
-- Begin
-- Return Result : Character do
-- Loop
-- Result:= Character'Input( P.Stream );
-- exit when Result not in Whitespace;
-- End Loop;
-- End Return;
-- End Consume_Whitespace;
Procedure Check (Param : not null access Parameter; Value : String) is
Procedure Expect is new Expect_String(Param.all);
Begin
-- Handle the empty-buffer by matching the next non-whitespace
-- character with the head of the given string.
if Param.Buffer = Null then
Declare
Element : Character renames Value(Value'First);
Item : Character renames Consume_Whitespace(Param);
Begin
if Element /= Item then
Raise Parse_Error with
"'"&Element&"' expected, but '" &Item& "' found.";
end if;
End;
-- Handle the tail.
Expect( -Value );
-- Handle the case where the buffer matches the head of the string.
elsif Param.Buffer.All = Value(Value'First) then
-- Handle the tail.
Expect( -Value );
else -- Buffer not the expected value.
Raise Parse_Error with
"'"& Value(Value'First) &"' expected, but '"
& Param.Buffer.All & "' found.";
end if;
End Check;
function Constructor (Params : not null access Parameter) return Null_Object is
Procedure Expect is new Expect_String(Params.all);
Begin
Return Result : Constant Null_Object := (Value_Type => VK_Null) do
Check( Params, "null" );
End return;
End Constructor;
function Constructor (Params : not null access Parameter) return False_Object is
Procedure Expect is new Expect_String(Params.all);
Begin
Return Result : Constant False_Object := (Value_Type => VK_False) do
Check( Params, "false");
End return;
End Constructor;
function Constructor (Params : not null access Parameter) return True_Object is
Procedure Expect is new Expect_String(Params.all);
Begin
Return Result : Constant True_Object := (Value_Type => VK_True) do
Check( Params, "true");
End return;
End Constructor;
function Constructor (Params : not null access Parameter) return String_Object is
Use Ada.Strings.Unbounded, String_Holder;
Working : Unbounded_String := To_Unbounded_String("");
Escape : Boolean := False;
Subtype Escape_Character is Character
with Static_Predicate => Escape_Character in
'"' | '\' | '/' | 'b' | 'f' | 'n' | 'r' | 't' | 'u';
Procedure Append( Item : Character ) with Inline is
Begin
Append( New_Item => Item, Source => Working );
End Append;
Begin
Check( Params, (1 => '"') );
Return Result : String_Object :=
(Value_Type => VK_String, Element => Empty_Holder) do
-- Read the string from the stream.
READ_STRING:
Loop
Declare
C : Character renames Character'Input( Params.Stream );
Begin
-- Here we handle all escapes, except for the hex-code,
-- which we will do later, due to it intrinsically being
-- referencial to points outside Latin-1.
-- NOTE: If we wanted a wholly conformant implementation
-- then we need a string-form of Unicode.
if Escape then
Escape:= False;
case Escape_Character'(C) is
when '"' => Append( Latin_1.Quotation );
when '\' => Append( Latin_1.Reverse_Solidus );
when '/' => Append( Latin_1.Solidus );
when 'b' => Append( Latin_1.BS );
when 'f' => Append( Latin_1.FF );
when 'n' => Append( Latin_1.LF );
when 'r' => Append( Latin_1.CR );
when 't' => Append( Latin_1.HT );
when 'u' => -- Four-hex escape-value next.
Append( New_Item => "\u", Source => Working );
end case;
elsif C = '\' then
Escape:= True;
elsif C = '"' then
Exit READ_STRING;
else
Append( C );
end if;
End;
End Loop READ_STRING;
-- Here we handle the hex-value escape-codes; because we use a
-- plain Latin-1 string, we have to
HANDLE_HEX_ESCAPES:
Declare
Procedure Hex_Fixup(
Item : in out Unbounded_String;
Index : in Positive
) with Pre => Index in 1..Length(Working)-4 is
Low : Constant Positive := Index+2;
High : Constant Positive := Index+5;
Hex_Value : String renames Slice(Working, Low, High);
Chr_Value : Interfaces.Unsigned_32 renames
Interfaces.Unsigned_32'Value("16#"& Hex_Value &'#');
Temp : Constant Wide_Wide_Character :=
Wide_Wide_Character'Val( Chr_Value );
Ch : Character renames To_Character(Temp,Latin_1.NUL);
Begin
if Is_Character( Temp ) then
-- Replace the slash.
Replace_Element(Item, Index, Ch);
-- Delete the remaining escape sequence.
Delete(Item, Positive'Pred(Low), High);
else
-- Delete the entire sequence.
Delete(Item, Index, High);
end if;
End Hex_Fixup;
Index : Natural:= Natural'First;
Begin
HEX_LOOP:
Loop
Index:= Ada.Strings.Unbounded.Index(Working, "\u");
Exit HEX_LOOP when Index not in Positive;
Hex_Fixup( Working, Index );
End Loop HEX_LOOP;
End HANDLE_HEX_ESCAPES;
Result.Element.Replace_Element( To_String(Working) );
End return;
End Constructor;
function Constructor (Params : not null access Parameter) return Number_Object is
Function Next return Character is
(Character'Input( Params.Stream )) with Inline;
Function Leading_0( Is_Negative : Boolean ) return Boolean;
Generic
Terminator : in out Character;
Function Digit_Sequence return String;
Function Get_Fraction return String;
Function Get_Exponent return String;
Subtype Digit is Character range '0'..'9';
Subtype Number_Character is Character
with Static_Predicate => Number_Character in
Digit|'+'|'-'|'.'|'e'|'E';
Subtype Digit_1_to_9 is Digit range '1'..'9';
Function Leading_0( Is_Negative : Boolean ) return Boolean is
Item : Character renames Params.Buffer.All;
Begin
if Is_Negative then
Item:= Next;
end if;
if Item not in Digit then
Raise Parse_Error with
"Digit expected, but '"& Item &"' found.";
end if;
Return Item = '0';
End Leading_0;
Function Digit_Sequence return String is
C : Character renames Next;
Begin
if C not in Digit then
Terminator:= C;
Return "";
else
Return C & Digit_Sequence;
end if;
End Digit_Sequence;
Negative : Constant Boolean := Buffer(Params) = '-';
C : Character renames Params.Buffer.All;
Lead_0 : Boolean renames Leading_0(Negative);
Function Sequence is new Digit_Sequence( C );
Function Get_Exponent return String is
(if C not in 'e'|'E' then
Raise Parse_Error with
"'E' or 'e' expected, but '"& C &"' found."
else 'E' & Sequence
);
Function Get_Fraction return String is
(if C /= '.' then Raise Parse_Error with
"'.' expected, but '"& C &"' found."
else '.' & Sequence
);
Function Get_Tail return String is
(case Number_Character'(C) is
when 'e' | 'E' => Get_Exponent,
when '.' => Get_Fraction & Get_Tail,
when others => ""
);
-- Buffer : Character renames Params.Buffer.All;
-- Begin
-- if Buffer = '.' then
-- declare
-- Fraction : String renames Get_Fraction;
-- begin
-- Return Fraction &
-- (if Buffer not in 'e'|'E' then "" else Get_Exponent);
-- end;
-- elsif Buffer in 'e' | 'E' then
-- Return Get_Exponent;
-- else
-- Return "";
-- end if;
-- End Get_Tail;
Function Get_Head return String is
(if Leading_0(Negative) then "0" else C & Sequence);
Begin
Return Result : Number_Object := (Value_Type => VK_Number, Element => 0.0) do
Declare
Head : String renames Get_Head;
Tail : String renames Get_Tail;
Begin
Result.Element:= Number'Value( Head & Tail );
End;
End return;
End Constructor;
-- (raise Program_Error with "Unilplemented.");
function Constructor (Params : not null access Parameter) return Array_Object is
use Value_Array;
Function Next(P : not null access Root_Stream_Type'Class:= Params.Stream) return Character
renames Consume_Whitespace;
Begin
Check( Params, (1 => '[') );
Return Result : Array_Object := (Value_Type => VK_Array, Element => Empty_Vector) do
-- Read a comma-separated list of name-value paris separated with colon.
READ_VALUE:
Loop
Declare
P : Aliased Parameter :=
(Buffer => New Character'(Next), Stream => Params.Stream);
C : Character renames P.Buffer.All;
Function Value(Params : not null access Parameter := P'Access)
return Instance'class
renames Value_Constructor;
Begin
Case C is
-- Here we need to contend with the array ending.
-- (Esp. a possibly empty array.)
when ']' => exit READ_VALUE;
-- Here we handle a separator by re-starting the read,
-- discarding the comma from the stream.
when ',' => Null;
-- At this point, we have ensured that no non-value
-- characters are in the stream, and may now get the
-- actual value.
when Others =>
Result.Element.Append( Value );
end case;
End;
End Loop READ_VALUE;
End return;
End Constructor;
function Constructor (Params : not null access Parameter) return Object_Object is
use Name_Value_Pairs;
Function Next(P : not null access Root_Stream_Type'Class:= Params.Stream) return Character
renames Consume_Whitespace;
Begin
Check( Params, (1 => '{') );
Return Result : Object_Object := (Value_Type => VK_Object, Element => Empty_Map) do
-- Read a comma-separated list of values.
READ_NAME_VALUE_PAIR:
Loop
Declare
P : Aliased Parameter :=
(Buffer => New Character'(Next), Stream => Params.Stream);
C : Character renames P.Buffer.All;
Function Value(Params : not null access Parameter := P'Access)
return Instance'class
renames Value_Constructor;
Begin
Case C is
-- Here we need to contend with the array ending.
-- (Esp. a possibly empty array.)
when '}' => exit READ_NAME_VALUE_PAIR;
-- Here we handle a separator by re-starting the read,
-- discarding the comma from the stream.
when ',' => Null;
-- At this point, we have ensured sequence-marker
-- characters have been handled.
-- actual value.
when '"' =>
READ_NAME:
Declare
String_Value : Constant String_Object :=
Constructor( P'Access );
Name : String renames
String_Value.Element.Element;
Begin
C:= Next(Params.Stream);
if C /= ':' then
raise Parse_Error with
"':' expected, but '" &C& "' found.";
else
P.Buffer:= Null;
end if;
READ_VALUE:
Declare
Value : Instance'Class renames
JSON_Class_Input( P.Stream );
Begin
Result.Element.Include( Name, Value );
End READ_VALUE;
End READ_NAME;
when others =>
Raise Parse_Error with
"'"& '"' &"' expected, but '"
& C & "' found.";
end case;
End;
End Loop READ_NAME_VALUE_PAIR;
end return;
End Constructor;
-- (raise Program_Error with "Unilplemented.");
End Constructors;
-- generic
-- type T (<>) is abstract tagged limited private;
-- type Parameters (<>) is limited private;
-- with function Constructor (Params : not null access Parameters) return T
-- is abstract;
-- function Ada.Tags.Generic_Dispatching_Constructor
-- (The_Tag : Tag;
-- Params : not null access Parameters) return T'Class;
------------
-- NULL --
------------
Function "-"(Object : Null_Object) return String is ("null");
Function Value(Object : Null_Object) return Wide_String is ("null");
Overriding
Function Kind(Object : Null_Object) return Value_Kind is (Object.Value_Type);
-------------
-- FALSE --
-------------
Function "-"(Object : False_Object) return String is ("false");
Function Value( Object : False_Object ) return Boolean is (False);
Function Value(Object : False_Object) return Wide_String is ("false");
Overriding
Function Kind(Object : False_Object) return Value_Kind is (Object.Value_Type);
------------
-- TRUE --
------------
Function "-"(Object : True_Object) return String is ("true");
Function Value( Object : True_Object ) return Boolean is (True);
Function Value(Object : True_Object) return Wide_String is ("true");
Overriding
Function Kind(Object : True_Object) return Value_Kind is (Object.Value_Type);
--------------
-- STRING --
--------------
Function "-"(Object : String_Object) return String is
(Object.Element.Element);
Function Value(Object : String_Object) return Wide_Wide_String is ( "IMPLEMENT ME"); --Object.Element.Element );
Overriding
Function Kind(Object : String_Object) return Value_Kind is (Object.Value_Type);
--------------
-- NUMBER --
--------------
Function "-"(Object : Number_Object) return String is
Image : String renames Number'Image( Object.Element );
First : Constant Positive:= Image'First;
Blank : Constant Boolean:= Image(First) = ' ';
Begin
Return (if not Blank then Image
else Image(Positive'Succ(First)..Image'Last)
);
End "-";
Function Value(Object : Number_Object) return Number is (Object.Element);
Overriding
Function Kind(Object : Number_Object) return Value_Kind is (Object.Value_Type);
-------------
-- ARRAY --
-------------
Function "-"(Object : Array_Object) return String is
Use Ada.Strings.Unbounded;
Function As_String( List : Value_Array.Vector ) return Unbounded_String is
Begin
Return Result : Unbounded_String := To_Unbounded_String("") do
Declare
Last : Value_Array.Extended_Index renames List.Last_Index;
Procedure Get_Strings( Cursor : Value_Array.Cursor ) is
Use Value_Array;
Item : Instance'Class renames Element(Cursor);
Value : String renames "-"( Item );
Finished : Constant Boolean := To_Index(Cursor) = Last;
Begin
Append(New_Item => Value, Source => Result);
if not Finished then
Append(New_Item => ',', Source => Result);
end if;
End Get_Strings;
Begin
List.Iterate( Get_Strings'Access );
End;
End return;
End As_String;
Begin
Return '[' & To_String(As_String(Object.Element)) & ']';
End;
Procedure Append ( Object : in out Array_Object; Value : Instance'Class ) is
Begin
Object.Element.Append( Value );
End Append;
Procedure Prepend( Object : in out Array_Object; Value : Instance'Class ) is
Begin
Object.Element.Prepend( Value );
End Prepend;
Function Value(Object : Array_Object) return Value_Array.Vector is (Object.Element);
Overriding
Function Kind(Object : Array_Object) return Value_Kind is (Object.Value_Type);
--------------
-- OBJECT --
--------------
Function "-"(Object : Object_Object) return String is
Use Ada.Strings.Unbounded;
Function As_String( List : Name_Value_Pairs.Map ) return Unbounded_String is
Begin
Return Result : Unbounded_String := To_Unbounded_String("") do
if Integer(List.Length) not in Positive then
return;
end if;
Declare
Last_Key : String renames List.Last_Key;
Procedure Get_Strings( Cursor : Name_Value_Pairs.Cursor ) is
Package NVP renames Name_Value_Pairs;
Key : String renames NVP.Key( Cursor );
Value : Instance'Class renames NVP.Element(Cursor);
Finished : Constant Boolean := Key = Last_Key;
Begin
Append(New_Item => Key, Source => Result);
Append(New_Item => ':', Source => Result);
Append(New_Item => -Value, Source => Result);
if not Finished then
Append(New_Item => ',', Source => Result);
end if;
End Get_Strings;
Begin
List.Iterate( Get_Strings'Access );
End;
End return;
End As_String;
Begin
Return '{' & To_String(As_String(Object.Element)) & '}';
End "-";
Function Value(Object : Object_Object) return Name_Value_Pairs.Map is (Object.Element);
Function Value( Object : Object_Object; Name : String ) return Instance'Class is
( Object.Element( Name ) );
-- ( Object.Element( To_Wide_Wide_String(Name) ) );
-- Function Value( Object : Object_Object; Name : String_Object ) return Instance is
-- ( Object.Element(Name.Value) );
Generic
Type A_Type(<>) is private;
with Function Make( X : A_Type ) Return Instance'Class is <>;
Procedure Generic_Value(Object : in out Object_Object; Name : String; Value : A_Type )
with Inline;
Procedure Generic_Value(Object : in out Object_Object; Name : String; Value : A_Type ) is
Begin
Object.Element.Include( New_Item => Make( Value ), Key => Name );
End Generic_Value;
Function Make_Integer( X : Integer ) return Instance'Class is
( Make( Number(X) ) );
Function Make_Float( X : Float ) return Instance'Class is
( Make( Number(X) ) );
Procedure Value_Instance is new Generic_Value( Integer, Make_Integer );
Procedure Value_Instance is new Generic_Value( Float, Make_Float );
Procedure Value_Instance is new Generic_Value( Boolean );
Procedure Value_Instance is new Generic_Value( String );
Procedure Value_Instance is new Generic_Value( Number );
Procedure Value(Object : in out Object_Object; Name : String; Value : Boolean )
renames Value_Instance;
Procedure Value(Object : in out Object_Object; Name : String; Value : Integer )
renames Value_Instance;
Procedure Value(Object : in out Object_Object; Name : String; Value : Float )
renames Value_Instance;
Procedure Value(Object : in out Object_Object; Name : String; Value : String )
renames Value_Instance;
Procedure Value(Object : in out Object_Object; Name : String; Value : Number )
renames Value_Instance;
Procedure Value(Object : in out Object_Object; Name : String; Value : Instance'Class ) is
Begin
if Object.Element.Contains( Name ) then
Object.Element(Name):= Value;
else
Object.Element.Include( New_Item => Value, Key => Name );
end if;
End Value;
Overriding
Function Kind(Object : Object_Object) return Value_Kind is (Object.Value_Type);
-----------------
-- CONVERSIONS --
-----------------
Function "+"(Right : String) return Wide_Wide_String
renames To_Wide_Wide_String;
Function "+"(Right : Wide_Wide_String) return String_Holder.Holder is
( String_Holder.To_Holder( To_String(Right) ) ); --renames String_Holder.To_Holder;
Function "+"(Right : String) return String_Holder.Holder is
( +Wide_Wide_String'(+Right) ) with Inline;
----------
-- MAKE --
----------
Function Make return Instance'Class is
( Null_Object'(Value_Type => VK_Null) );
Function Make ( Item : String ) return Instance'Class is
( String_Object'(Value_Type => VK_String, Element => +Item) );
Function Make ( Item : Number ) return Instance'Class is
( Number_Object'(Value_Type => VK_Number, Element => Item) );
Function Make ( Item : Boolean ) return Instance'Class is
(if Item then True_Object' (Value_Type => VK_True )
else False_Object'(Value_Type => VK_False) );
Function Make_Array( Length : Natural:= 0;
Default : Number := 0.0
) return Instance'Class is
Use Ada.Containers;
Count : Constant Count_Type:= Count_Type(Length);
Value : Constant Number_Object:= Number_Object'(VK_Number, Default );
Function Constructor return Array_Object with Inline is
Begin
Return Result : Array_Object :=
Array_Object'(Value_Type => VK_Array,
Element => Value_Array.Empty_Vector) do
Result.Element.Reserve_Capacity( Count );
Result.Element.Append( Value, Count );
End return;
End Constructor;
Begin
Return Result : Constant Instance'Class := Constructor;
End Make_Array;
Function Make_Object return Instance'Class is
Use Name_Value_Pairs;
Begin
Return Result : Instance'Class:=
Object_Object'( Value_Type => VK_Object, Element => Empty_Map );
End Make_Object;
procedure JSON_Class_Output(
Stream : not null access Ada.Streams.Root_Stream_Type'Class;
Item : in Instance'Class) is
Begin
null;
End JSON_Class_Output;
Function JSON_Class_Input
(Stream : not null access Ada.Streams.Root_Stream_Type'Class)
return Instance'Class --is
renames Constructors.Value_Constructor;
-- -- Function Next return Character is
-- -- Begin
-- -- Return Result : Character do
-- -- Loop
-- -- Result:= Character'Input( Stream );
-- -- Exit when Result not in Whitespace
-- -- and Result not in Control_Character;
-- -- End Loop;
-- -- end return;
-- -- End Next;
-- Begin
-- declare
-- Use Constructors;
-- Param : Aliased Parameter:=
-- Parameter'(Buffer => New Character'(Next), Stream => Stream);
-- C : Character renames Param.Buffer.All;
-- begin
-- Return Result : Instance'Class :=
-- (case C is
-- when '{' => Object_Object'(Constructor(Param'Access)),
-- when '[' => Array_Object' (Constructor(Param'Access)),
-- when '0'..'9'
-- | '-' => Number_Object'(Constructor(Param'Access)),
-- when '"' => String_Object'(Constructor(Param'Access)),
-- when 't' => True_Object' (Constructor(Param'Access)),
-- when 'f' => False_Object' (Constructor(Param'Access)),
-- when 'n' => Null_Object' (Constructor(Param'Access)),
-- when others => raise Parse_Error
-- with "'" & C & "' is an invalid character."
-- );
-- end;
-- End JSON_Class_Input;
Function Constant_Reference(Object : in Object_Object;
Key : in String
) return String is
Begin
Do_Index:
Declare
Index : Instance'Class renames Object.Element(Key);
Begin
Return Result : Constant String :=
(if Index in String_Object then
-String_Object( Index )
else To_String( Index ));
End Do_Index;
-- Exception
-- when Name_Error => Raise Bad_Index;
End Constant_Reference;
Function Array_Constant(Object : in Array_Object;
Key : in Natural
) return Instance'Class is
Begin
Return Object.Element(Key);
-- Exception
-- when Name_Error => Raise Bad_Index;
End Array_Constant;
Function "**"(Left : Instance'Class; Right : String ) return String is
(if Left in Object_Object and then Object_Object(Left).Element.Contains(Right)
then To_String( Object_Object(Left).Element(Right) )
else ""
);
Function "**"(Left : Instance'Class; Right : Natural ) return Instance'Class is
(if Left in Array_Object and then Natural(Array_Object(Left).Element.Length) > Right
then Array_Object(Left).Element(Right)
else Null_Object'(Value_Type => VK_Null)
);
Procedure Include(Object : in out Object_Object; Name : String; Value : Instance'Class ) is
Begin
Object.Element.Include(Key => Name, New_Item => Value);
End Include;
Procedure Include(Left : in out Object_Object; Right : in Object_Object ) is
Package NVP renames Name_Value_Pairs;
Begin
For C in Right.Element.Iterate loop
Left.Element.Include(New_Item => NVP.Element(C), Key => NVP.Key(C));
end loop;
End Include;
Function Exists(Object : in out Object_Object; Name : String) return Boolean is
( Object.Element.Contains(Name) );
End NSO.JSON;
|
with Ada.Strings.Unbounded;
with Gnat.Regpat;
with Protypo.Api.Engine_Values.Handlers;
with Protypo.Api.Engine_Values.Engine_Value_Vectors;
use Protypo.Api.Engine_Values;
package Protypo.Match_Data_Wrappers is
type Match_Data_Wrapper (<>) is
new Handlers.Ambivalent_Interface
with
private;
type Match_Data_Wrapper_Access is access Match_Data_Wrapper;
function Wrap (Match_Data : Gnat.Regpat.Match_Array;
Source : String)
return Handlers.Ambivalent_Interface_Access;
function Wrap (Match_Data : Gnat.Regpat.Match_Array;
Source : String)
return Engine_Value;
function Is_Field (X : Match_Data_Wrapper; Field : Id) return Boolean;
function Get (X : Match_Data_Wrapper;
Field : Id)
return Handler_Value;
function Get (X : Match_Data_Wrapper;
Index : Engine_Value_Vectors.Vector)
return Handler_Value;
private
use Ada.Strings.Unbounded;
type Submatches_Array is
array (Natural range <>) of Unbounded_String;
type Match_Data_Wrapper (N : Natural)is
new Api.Engine_Values.Handlers.Ambivalent_Interface
with
record
Matched : Boolean;
Submatches : Submatches_Array (0 .. N);
end record;
end Protypo.Match_Data_Wrappers;
|
with Ada.Text_IO;
use Ada.Text_IO;
with Ada.Long_Float_Text_IO;
use Ada.Long_Float_Text_IO;
with Ada.Integer_Text_IO;
use Ada.Integer_Text_IO;
procedure B is
function Solve(C, F, X : in Long_Float) return Long_Float is
acc : Long_Float := 0.0;
n : Natural := 0;
r : Long_Float := 2.0;
t1, t2 : Long_Float;
begin
loop
t1 := acc + X/r;
t2 := acc + C/r + X/(r+F);
if t1 < t2 then
return t1;
end if;
acc := acc + C/r;
r := r + F;
end loop;
end Solve;
T : Natural;
i : Natural := 0;
C, F, X : Long_Float;
begin
Get(Item => T);
while i < T loop
Get(Item => C);
Get(Item => F);
Get(Item => X);
Put(Item => "Case #");
Put(Item => i+1, Width => 0);
Put(Item => ": ");
Put(Item => Solve(C, F, X), Exp => 0, Fore => 0, Aft => 7);
Put_Line("");
i := i + 1;
end loop;
end;
|
package private_extension_declaration is
type Expression is tagged null record;
type PrivateType is new Expression with private;
private
type PrivateType is new Expression with
record
The_Variable : Integer;
end record;
end private_extension_declaration;
|
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Web Framework --
-- --
-- Web API Definition --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2014-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$
------------------------------------------------------------------------------
-- This package provides binding to interface ParentNode.
------------------------------------------------------------------------------
limited with WebAPI.DOM.Elements;
with WebAPI.DOM.HTML_Collections;
with WebAPI.DOM.Node_Lists;
package WebAPI.DOM.Parent_Nodes is
pragma Preelaborate;
type Parent_Node is limited interface;
not overriding function Get_Children
(Self : not null access constant Parent_Node)
return WebAPI.DOM.HTML_Collections.HTML_Collection
is abstract
with Import => True,
Convention => JavaScript_Property_Getter,
Link_Name => "children";
-- Returns the child elements.
--
-- The children attribute must return an HTMLCollection collection rooted
-- at the context object matching only element children.
not overriding function Get_First_Element_Child
(Self : not null access constant Parent_Node)
return WebAPI.DOM.Elements.Element_Access is abstract
with Import => True,
Convention => JavaScript_Property_Getter,
Link_Name => "firstElementChild";
-- Returns the first child that is an element, and null otherwise.
--
-- The firstElementChild attribute must return the first child that is an
-- element, and null otherwise.
not overriding function Get_Last_Element_Child
(Self : not null access constant Parent_Node)
return WebAPI.DOM.Elements.Element_Access is abstract
with Import => True,
Convention => JavaScript_Property_Getter,
Link_Name => "lastElementChild";
-- Returns the last child that is an element, and null otherwise.
--
-- The lastElementChild attribute must return the last child that is an
-- element, and null otherwise.
not overriding function Get_Child_Element_Count
(Self : not null access constant Parent_Node)
return Natural is abstract
with Import => True,
Convention => JavaScript_Property_Getter,
Link_Name => "childElementCount";
-- The childElementCount attribute must return the number of children of
-- the context object that are elements.
not overriding function Query_Selector
(Self : not null access constant Parent_Node;
Selectors : WebAPI.DOM_String)
return WebAPI.DOM.Elements.Element_Access is abstract
with Import => True,
Convention => JavaScript_Method,
Link_Name => "querySelector";
-- Returns the first element that is a descendant of node that matches
-- selectors.
--
-- The querySelector(selectors) method must return the first result of
-- running scope-match a selectors string selectors against the context
-- object, and null if the result is an empty list otherwise.
not overriding function Query_Selector_All
(Self : not null access constant Parent_Node;
Selectors : WebAPI.DOM_String)
return WebAPI.DOM.Node_Lists.Node_List is abstract
with Import => True,
Convention => JavaScript_Method,
Link_Name => "querySelectorAll";
-- Returns all element descendants of node that match selectors.
--
-- The querySelectorAll(selectors) method must return the static result of
-- running scope-match a selectors string selectors against the context
-- object.
end WebAPI.DOM.Parent_Nodes;
|
with Intcode;
package AOC.AOC_2019.Day05 is
type Day_05 is new Day.Day with private;
overriding procedure Init (D : in out Day_05; Root : String);
overriding function Part_1 (D : Day_05) return String;
overriding function Part_2 (D : Day_05) return String;
private
type Day_05 is new Day.Day with record
Compiler : Intcode.Compilers.Compiler;
end record;
end AOC.AOC_2019.Day05;
|
-- { dg-do compile }
with Ada.Unchecked_Conversion;
package body SSO2 is
function Conv is new Ada.Unchecked_Conversion (Arr1, Arr2);
procedure Proc (A1 : Arr1; A2 : out Arr2) is
begin
A2 := Conv (A1);
end;
end SSO2;
|
------------------------------------------------------------------------------
-- AGAR CORE LIBRARY --
-- A G A R . D S O --
-- B o d y --
-- --
-- Copyright (c) 2018-2019, Julien Nadeau Carriere (vedge@csoft.net) --
-- Copyright (c) 2010, coreland (mark@coreland.ath.cx) --
-- --
-- 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 Ada.Unchecked_Conversion;
package body Agar.DSO is
use type C.int;
function Load (Name : in String) return DSO_Access
is
Ch_Name : aliased C.char_array := C.To_C (Name);
begin
return AG_LoadDSO
(Name => CS.To_Chars_Ptr (Ch_Name'Unchecked_Access),
Flags => 0);
end Load;
function Unload (DSO : DSO_Not_Null_Access) return Boolean
is begin
return 1 = AG_UnloadDSO (DSO);
end Unload;
function Lookup (Name : in String) return DSO_Access
is
Ch_Name : aliased C.char_array := C.To_C (Name);
begin
return AG_LookupDSO (CS.To_Chars_Ptr (Ch_Name'Unchecked_Access));
end Lookup;
function Get_List return DSO_List
is
use type C.unsigned;
use DSO_List_To_Strings;
Count : aliased C.unsigned := 0;
Result : DSO_List_To_Strings.Pointer := AG_GetDSOList (Count'Access);
Output : DSO_List;
begin
pragma Assert (Result /= null);
for Index in 1 .. Count loop
declare
Element : constant String := CS.Value (Result.all);
begin
Output.Append (Element);
end;
Increment (Result);
end loop;
AG_FreeDSOList
(List => Result,
Count => Count);
return Output;
end Get_List;
function Symbol_Lookup
(DSO : in DSO_Not_Null_Access;
Symbol : in String) return Subprogram_Access_Type
is
Ch_Symbol : aliased C.char_array := C.To_C (Symbol);
Result : aliased System.Address;
function Convert is new Ada.Unchecked_Conversion
(Source => System.Address,
Target => Subprogram_Access_Type);
begin
if 1 = AG_SymDSO
(DSO => DSO,
Symbol => CS.To_Chars_Ptr (Ch_Symbol'Unchecked_Access),
Value => Result'Unchecked_Access) then
return Convert (Result);
else
return Convert (System.Null_Address);
end if;
end Symbol_Lookup;
end Agar.DSO;
|
package body Input_Backend is
type Key_Array is array (Positive range <>) of Softkey;
procedure Chord (Keys : Key_Array) is
begin
for Key of Keys loop
Qweyboard.Softboard.Handle ((Key, Qweyboard.Key_Press));
end loop;
for Key of reverse Keys loop
Qweyboard.Softboard.Handle ((Key, Qweyboard.Key_Release));
end loop;
end;
function Single (Key : Softkey) return Key_Array is
A : Key_Array (1..1) := (others => Key);
begin
return A;
end;
task body Input is
begin
accept Ready_Wait;
-- This is not something input backends should generally do, but we
-- do it here to ensure the "test" works, regardless of user settings.
Qweyboard.Softboard.Configure ((0.2, others => <>));
-- Begin pressing keys!
Chord (Single (RI));
delay 0.3;
Chord ((LJ, LN, MA, RN, RT));
delay 0.3;
Chord ((LT, LO));
delay 0.3;
Chord ((LT, MY, RP, RF));
delay 0.3;
Chord ((LO, RN));
delay 0.3;
Chord (Single (MA));
delay 0.3;
Chord ((LC, LF));
delay 0.3;
Chord ((LJ, LN, LE, MY, NOSP));
delay 0.3;
Chord ((LJ, LP, LO, MA, RR, RJ, RT, NOSP));
delay 0.3;
Chord ((LC, RO, RN));
delay 0.3;
Chord ((LS, LT, MA, RN, RT, NOSP));
delay 0.3;
Chord ((LL, MY, NOSP));
Qweyboard.Softboard.Shut_Down;
end Input;
end Input_Backend;
|
-- [ dg-do compile }
package body Pack13 is
procedure Set (Myself : Object_Ptr; The_Data : Thirty_Two_Bits.Object) is
begin
Myself.Something.Data_1 := The_Data;
end;
end Pack13;
|
-----------------------------------------------------------------------
-- util-serialize-tools -- Tools to Serialize objects in various formats
-- Copyright (C) 2012, 2016, 2017 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-----------------------------------------------------------------------
with Ada.Containers;
with Util.Streams.Texts;
with Util.Serialize.Mappers.Record_Mapper;
package body Util.Serialize.Tools is
type Object_Field is (FIELD_NAME, FIELD_VALUE);
type Object_Map_Access is access all Util.Beans.Objects.Maps.Map'Class;
type Object_Mapper_Context is record
Map : Object_Map_Access;
Name : Util.Beans.Objects.Object;
end record;
type Object_Mapper_Context_Access is access all Object_Mapper_Context;
procedure Set_Member (Into : in out Object_Mapper_Context;
Field : in Object_Field;
Value : in Util.Beans.Objects.Object);
procedure Set_Member (Into : in out Object_Mapper_Context;
Field : in Object_Field;
Value : in Util.Beans.Objects.Object) is
begin
case Field is
when FIELD_NAME =>
Into.Name := Value;
when FIELD_VALUE =>
Into.Map.Include (Util.Beans.Objects.To_String (Into.Name), Value);
Into.Name := Util.Beans.Objects.Null_Object;
end case;
end Set_Member;
package Object_Mapper is new
Util.Serialize.Mappers.Record_Mapper (Element_Type => Object_Mapper_Context,
Element_Type_Access => Object_Mapper_Context_Access,
Fields => Object_Field,
Set_Member => Set_Member);
JSON_Mapping : aliased Object_Mapper.Mapper;
-- -----------------------
-- Serialize the objects defined in the object map <b>Map</b> into the <b>Output</b>
-- JSON stream. Use the <b>Name</b> as the name of the JSON object.
-- -----------------------
procedure To_JSON (Output : in out Util.Serialize.IO.JSON.Output_Stream'Class;
Name : in String;
Map : in Util.Beans.Objects.Maps.Map) is
use type Ada.Containers.Count_Type;
procedure Write (Name : in String;
Value : in Util.Beans.Objects.Object);
procedure Write (Name : in String;
Value : in Util.Beans.Objects.Object) is
begin
Output.Start_Entity (Name => "");
Output.Write_Attribute (Name => "name",
Value => Util.Beans.Objects.To_Object (Name));
Output.Write_Attribute (Name => "value",
Value => Value);
Output.End_Entity (Name => "");
end Write;
begin
if Map.Length > 0 then
declare
Iter : Util.Beans.Objects.Maps.Cursor := Map.First;
begin
Output.Start_Array (Name => Name);
while Util.Beans.Objects.Maps.Has_Element (Iter) loop
Util.Beans.Objects.Maps.Query_Element (Iter, Write'Access);
Util.Beans.Objects.Maps.Next (Iter);
end loop;
Output.End_Array (Name => Name);
end;
end if;
end To_JSON;
-- -----------------------
-- Serialize the objects defined in the object map <b>Map</b> into an XML stream.
-- Returns the JSON string that contains a serialization of the object maps.
-- -----------------------
function To_JSON (Map : in Util.Beans.Objects.Maps.Map) return String is
use type Ada.Containers.Count_Type;
begin
if Map.Length = 0 then
return "";
end if;
declare
Buffer : aliased Util.Streams.Texts.Print_Stream;
Output : Util.Serialize.IO.JSON.Output_Stream;
begin
Buffer.Initialize (Size => 10000);
Output.Initialize (Buffer'Unchecked_Access);
Output.Start_Document;
To_JSON (Output, "params", Map);
Output.End_Document;
return Util.Streams.Texts.To_String (Buffer);
end;
end To_JSON;
-- -----------------------
-- Deserializes the JSON content passed in <b>Content</b> and restore the object map
-- with their values. The object map passed in <b>Map</b> can contain existing values.
-- They will be overriden by the JSON values.
-- -----------------------
procedure From_JSON (Content : in String;
Map : in out Util.Beans.Objects.Maps.Map) is
Parser : Util.Serialize.IO.JSON.Parser;
Mapper : Util.Serialize.Mappers.Processing;
Context : aliased Object_Mapper_Context;
begin
if Content'Length > 0 then
Context.Map := Map'Unchecked_Access;
Mapper.Add_Mapping ("**", JSON_Mapping'Access);
Object_Mapper.Set_Context (Mapper, Context'Unchecked_Access);
Parser.Parse_String (Content, Mapper);
end if;
end From_JSON;
-- -----------------------
-- Deserializes the JSON content passed in <b>Content</b> and restore the object map
-- with their values.
-- Returns the object map that was restored.
-- -----------------------
function From_JSON (Content : in String) return Util.Beans.Objects.Maps.Map is
Result : Util.Beans.Objects.Maps.Map;
begin
From_JSON (Content, Result);
return Result;
end From_JSON;
begin
JSON_Mapping.Add_Mapping ("name", FIELD_NAME);
JSON_Mapping.Add_Mapping ("value", FIELD_VALUE);
end Util.Serialize.Tools;
|
with ada.text_io, ada.Integer_text_IO, Ada.Text_IO.Text_Streams, Ada.Strings.Fixed, Interfaces.C;
use ada.text_io, ada.Integer_text_IO, Ada.Strings, Ada.Strings.Fixed, Interfaces.C;
procedure aaa_10stringsarray is
type stringptr is access all char_array;
procedure PString(s : stringptr) is
begin
String'Write (Text_Streams.Stream (Current_Output), To_Ada(s.all));
end;
procedure PInt(i : in Integer) is
begin
String'Write (Text_Streams.Stream (Current_Output), Trim(Integer'Image(i), Left));
end;
type toto;
type toto_PTR is access toto;
type toto is record
s : stringptr;
v : Integer;
end record;
function idstring(s : in stringptr) return stringptr is
begin
return s;
end;
procedure printstring(s : in stringptr) is
begin
PString(idstring(s));
PString(new char_array'( To_C("" & Character'Val(10))));
end;
procedure print_toto(t : in toto_PTR) is
begin
PString(t.s);
PString(new char_array'( To_C(" = ")));
PInt(t.v);
PString(new char_array'( To_C("" & Character'Val(10))));
end;
type b is Array (Integer range <>) of stringptr;
type b_PTR is access b;
tab : b_PTR;
a : toto_PTR;
begin
tab := new b (0..1);
for i in integer range 0..1 loop
tab(i) := idstring(new char_array'( To_C("chaine de test")));
end loop;
for j in integer range 0..1 loop
printstring(idstring(tab(j)));
end loop;
a := new toto;
a.s := new char_array'( To_C("one"));
a.v := 1;
print_toto(a);
end;
|
------------------------------------------------------------------------------
-- --
-- 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$
------------------------------------------------------------------------------
with Matreshka.Internals.Strings;
with League.Strings.Internals;
with AMF.Internals.Helpers;
with AMF.Internals.Tables.CMOF_Attributes;
package body AMF.Internals.CMOF_Named_Elements is
use AMF.Internals.Tables.CMOF_Attributes;
use type Matreshka.Internals.Strings.Shared_String_Access;
--------------------
-- All_Namespaces --
--------------------
overriding function All_Namespaces
(Self : not null access constant CMOF_Named_Element_Proxy)
return AMF.CMOF.Namespaces.Collections.Ordered_Set_Of_CMOF_Namespace
is
-- [UML 2.4.1] 7.3.34 NamedElement (from Kernel, Dependencies)
--
-- [1] The query allNamespaces() gives the sequence of namespaces in
-- which the NamedElement is nested, working outwards.
--
-- NamedElement::allNamespaces(): Sequence(Namespace);
--
-- allNamespaces =
-- if self.namespace->isEmpty()
-- then Sequence{}
-- else self.namespace.allNamespaces()->prepend(self.namespace)
-- endif
use type AMF.CMOF.Namespaces.CMOF_Namespace_Access;
The_Namespace : AMF.CMOF.Namespaces.CMOF_Namespace_Access
:= CMOF_Named_Element_Proxy'Class (Self.all).Get_Namespace;
begin
return Result :
AMF.CMOF.Namespaces.Collections.Ordered_Set_Of_CMOF_Namespace
do
while The_Namespace /= null loop
Result.Add (The_Namespace);
The_Namespace := The_Namespace.Get_Namespace;
end loop;
end return;
end All_Namespaces;
--------------
-- Get_Name --
--------------
overriding function Get_Name
(Self : not null access constant CMOF_Named_Element_Proxy)
return Optional_String
is
Aux : constant Matreshka.Internals.Strings.Shared_String_Access
:= Internal_Get_Name (Self.Element);
begin
if Aux = null then
return (Is_Empty => True);
else
return (False, League.Strings.Internals.Create (Aux));
end if;
end Get_Name;
-------------------
-- Get_Namespace --
-------------------
overriding function Get_Namespace
(Self : not null access constant CMOF_Named_Element_Proxy)
return AMF.CMOF.Namespaces.CMOF_Namespace_Access is
begin
return
AMF.CMOF.Namespaces.CMOF_Namespace_Access
(AMF.Internals.Helpers.To_Element
(Internal_Get_Namespace (Self.Element)));
end Get_Namespace;
--------------------
-- Get_Visibility --
--------------------
overriding function Get_Visibility
(Self : not null access constant CMOF_Named_Element_Proxy)
return AMF.CMOF.Optional_CMOF_Visibility_Kind is
begin
return Internal_Get_Visibility (Self.Element);
end Get_Visibility;
--------------------
-- Qualified_Name --
--------------------
overriding function Qualified_Name
(Self : not null access constant CMOF_Named_Element_Proxy)
return League.Strings.Universal_String
is
-- [UML 2.4.1] 7.3.34 NamedElement (from Kernel, Dependencies)
--
-- Constraints
-- [1] If there is no name, or one of the containing namespaces has no
-- name, there is no qualified name.
--
-- (self.name->isEmpty()
-- or self.allNamespaces()->select
-- (ns | ns.name->isEmpty())->notEmpty())
-- implies self.qualifiedName->isEmpty()
--
-- [2] When there is a name, and all of the containing namespaces have a
-- name, the qualified name is constructed from the names of the
-- containing namespaces.
--
-- (self.name->notEmpty()
-- and self.allNamespaces()->select
-- (ns | ns.name->isEmpty())->isEmpty())
-- implies
-- self.qualifiedName =
-- self.allNamespaces()->iterate
-- ( ns : Namespace; result: String = self.name |
-- ns.name->union(self.separator())->union(result))
Namespaces : constant
AMF.CMOF.Namespaces.Collections.Ordered_Set_Of_CMOF_Namespace
:= CMOF_Named_Element_Proxy'Class (Self.all).All_Namespaces;
Separator : constant League.Strings.Universal_String
:= CMOF_Named_Element_Proxy'Class (Self.all).Separator;
Name : AMF.Optional_String
:= CMOF_Named_Element_Proxy'Class (Self.all).Get_Name;
begin
if Name.Is_Empty then
return League.Strings.Empty_Universal_String;
end if;
return Result : League.Strings.Universal_String := Name.Value do
for J in 1 .. Namespaces.Length loop
Name := Namespaces.Element (J).Get_Name;
if Name.Is_Empty then
-- When name of one of owning namespaces is empty the qualified
-- name is empty also. Clear result and exit from namespaces
-- loop.
Result.Clear;
exit;
else
-- Otherwise prepend separator and name of the namespace.
Result.Prepend (Separator);
Result.Prepend (Name.Value);
end if;
end loop;
end return;
end Qualified_Name;
---------------
-- Separator --
---------------
overriding function Separator
(Self : not null access constant CMOF_Named_Element_Proxy)
return League.Strings.Universal_String
is
pragma Unreferenced (Self);
begin
return League.Strings.To_Universal_String ("::");
end Separator;
--------------
-- Set_Name --
--------------
overriding procedure Set_Name
(Self : not null access CMOF_Named_Element_Proxy;
To : Optional_String) is
begin
if To.Is_Empty then
Internal_Set_Name (Self.Element, null);
else
Internal_Set_Name
(Self.Element, League.Strings.Internals.Internal (To.Value));
end if;
end Set_Name;
--------------------
-- Set_Visibility --
--------------------
overriding procedure Set_Visibility
(Self : not null access CMOF_Named_Element_Proxy;
To : AMF.CMOF.Optional_CMOF_Visibility_Kind) is
begin
Internal_Set_Visibility (Self.Element, To);
end Set_Visibility;
end AMF.Internals.CMOF_Named_Elements;
|
-- AoC 2020, Day 6
with Ada.Text_IO;
with Ada.Containers; use Ada.Containers;
with Ada.Containers.Ordered_Sets;
with Ada.Strings.Fixed; use Ada.Strings.Fixed;
package body Day is
package TIO renames Ada.Text_IO;
package Char_Sets is new Ada.Containers.Ordered_Sets
(Element_Type => Character);
use Char_Sets;
function all_set return Char_Sets.Set is
a : Set;
alpha : constant String := "abcdefghijklmnopqrstuvwxyz";
begin
for c of alpha loop
a.insert(c);
end loop;
return a;
end all_set;
function anyone_sum(filename : in String) return Natural is
file : TIO.File_Type;
sum : Natural := 0;
begin
TIO.open(File => file, Mode => TIO.In_File, Name => filename);
while not TIO.end_of_file(file) loop
declare
group : Set;
begin
group_loop:
loop
declare
line : constant String := TIO.get_line(file);
begin
if index_non_blank(line) = 0 then
sum := sum + Natural(length(group));
exit group_loop;
else
for c of line loop
group.include(c);
end loop;
if TIO.end_of_file(file) then
sum := sum + Natural(length(group));
exit group_loop;
end if;
end if;
end;
end loop group_loop;
end;
end loop;
TIO.close(file);
return sum;
end anyone_sum;
function everyone_sum(filename : in String) return Natural is
file : TIO.File_Type;
sum : Natural := 0;
begin
TIO.open(File => file, Mode => TIO.In_File, Name => filename);
while not TIO.end_of_file(file) loop
declare
all_group : Set := all_set;
begin
group_loop:
loop
declare
line : constant String := TIO.get_line(file);
begin
if index_non_blank(line) = 0 then
sum := sum + Natural(length(all_group));
exit group_loop;
else
declare
person : Set;
begin
for c of line loop
person.include(c);
end loop;
all_group := all_group and person;
end;
if TIO.end_of_file(file) then
sum := sum + Natural(length(all_group));
exit group_loop;
end if;
end if;
end;
end loop group_loop;
end;
end loop;
TIO.close(file);
return sum;
end everyone_sum;
end Day;
|
------------------------------------------------------------------------------
-- Copyright (c) 2006-2013, Maxim Reznik
-- 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 Maxim Reznik, 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 OWNER OR CONTRIBUTORS BE
-- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-- POSSIBILITY OF SUCH DAMAGE.
------------------------------------------------------------------------------
package body Asis.Gela.Elements is
function Enclosing_Element
(Element : Base_Element_Node) return Asis.Element is
begin
return Element.Enclosing_Element;
end Enclosing_Element;
procedure Set_Enclosing_Element
(Element : in out Base_Element_Node;
Value : in Asis.Element) is
begin
Element.Enclosing_Element := Value;
end Set_Enclosing_Element;
function Next_Element
(Element : Base_Element_Node) return Asis.Element is
begin
return Element.Next_Element;
end Next_Element;
procedure Set_Next_Element
(Element : in out Base_Element_Node;
Value : in Asis.Element) is
begin
Element.Next_Element := Value;
end Set_Next_Element;
function Is_Part_Of_Implicit
(Element : Base_Element_Node) return Boolean is
begin
return Element.Is_Part_Of_Implicit;
end Is_Part_Of_Implicit;
procedure Set_Is_Part_Of_Implicit
(Element : in out Base_Element_Node;
Value : in Boolean) is
begin
Element.Is_Part_Of_Implicit := Value;
end Set_Is_Part_Of_Implicit;
function Is_Part_Of_Inherited
(Element : Base_Element_Node) return Boolean is
begin
return Element.Is_Part_Of_Inherited;
end Is_Part_Of_Inherited;
procedure Set_Is_Part_Of_Inherited
(Element : in out Base_Element_Node;
Value : in Boolean) is
begin
Element.Is_Part_Of_Inherited := Value;
end Set_Is_Part_Of_Inherited;
function Is_Part_Of_Instance
(Element : Base_Element_Node) return Boolean is
begin
return Element.Is_Part_Of_Instance;
end Is_Part_Of_Instance;
procedure Set_Is_Part_Of_Instance
(Element : in out Base_Element_Node;
Value : in Boolean) is
begin
Element.Is_Part_Of_Instance := Value;
end Set_Is_Part_Of_Instance;
function Start_Position
(Element : Base_Element_Node) return Asis.Text_Position is
begin
return Element.Start_Position;
end Start_Position;
procedure Set_Start_Position
(Element : in out Base_Element_Node;
Value : in Asis.Text_Position) is
begin
Element.Start_Position := Value;
end Set_Start_Position;
function End_Position
(Element : Base_Element_Node) return Asis.Text_Position is
begin
return Element.End_Position;
end End_Position;
procedure Set_End_Position
(Element : in out Base_Element_Node;
Value : in Asis.Text_Position) is
begin
Element.End_Position := Value;
end Set_End_Position;
function Enclosing_Compilation_Unit
(Element : Base_Element_Node) return Asis.Compilation_Unit is
begin
return Element.Enclosing_Compilation_Unit;
end Enclosing_Compilation_Unit;
procedure Set_Enclosing_Compilation_Unit
(Element : in out Base_Element_Node;
Value : in Asis.Compilation_Unit) is
begin
Element.Enclosing_Compilation_Unit := Value;
end Set_Enclosing_Compilation_Unit;
function Hash
(Element : Base_Element_Node) return Asis.ASIS_Integer is
begin
return Element.Hash;
end Hash;
procedure Set_Hash
(Element : in out Base_Element_Node;
Value : in Asis.ASIS_Integer) is
begin
Element.Hash := Value;
end Set_Hash;
function Pragma_Kind
(Element : Pragma_Node) return Asis.Pragma_Kinds is
begin
return Element.Pragma_Kind;
end Pragma_Kind;
procedure Set_Pragma_Kind
(Element : in out Pragma_Node;
Value : in Asis.Pragma_Kinds) is
begin
Element.Pragma_Kind := Value;
end Set_Pragma_Kind;
function Pragma_Name_Image
(Element : Pragma_Node) return Wide_String is
begin
return W.To_Wide_String (Element.Pragma_Name_Image);
end Pragma_Name_Image;
procedure Set_Pragma_Name_Image
(Element : in out Pragma_Node;
Value : in Wide_String) is
begin
Element.Pragma_Name_Image := W.To_Unbounded_Wide_String (Value);
end Set_Pragma_Name_Image;
function Pragma_Argument_Associations
(Element : Pragma_Node;
Include_Pragmas : in Boolean := False) return Asis.Element_List is
begin
return Primary_Association_Lists.To_Element_List
(Element.Pragma_Argument_Associations, Include_Pragmas);
end Pragma_Argument_Associations;
procedure Set_Pragma_Argument_Associations
(Element : in out Pragma_Node;
Value : in Asis.Element) is
begin
Element.Pragma_Argument_Associations := Primary_Association_Lists.List (Value);
end Set_Pragma_Argument_Associations;
function Pragma_Argument_Associations_List
(Element : Pragma_Node) return Asis.Element is
begin
return Asis.Element (Element.Pragma_Argument_Associations);
end Pragma_Argument_Associations_List;
function New_Pragma_Node
(The_Context : ASIS.Context)
return Pragma_Ptr
is
Result : Pragma_Ptr :=
new Pragma_Node;
begin
Set_Enclosing_Compilation_Unit
(Result.all, Current_Unit (The_Context.all));
return Result;
end New_Pragma_Node;
function Element_Kind (Element : Pragma_Node)
return Asis.Element_Kinds is
begin
return A_Pragma;
end;
function Children (Element : access Pragma_Node)
return Traverse_List is
begin
return (1 => (True, Asis.Element (Element.Pragma_Argument_Associations)));
end Children;
function Clone
(Element : Pragma_Node;
Parent : Asis.Element)
return Asis.Element
is
Result : constant Pragma_Ptr := new Pragma_Node;
begin
Result.Enclosing_Element := Parent;
Result.Is_Part_Of_Implicit := Element.Is_Part_Of_Implicit;
Result.Is_Part_Of_Inherited := Element.Is_Part_Of_Inherited;
Result.Is_Part_Of_Instance := Element.Is_Part_Of_Instance;
Result.Start_Position := Element.Start_Position;
Result.End_Position := Element.End_Position;
Result.Enclosing_Compilation_Unit :=
Enclosing_Compilation_Unit (Parent.all);
Result.Hash := Element.Hash;
Result.Pragma_Kind := Element.Pragma_Kind;
Result.Pragma_Name_Image := Element.Pragma_Name_Image;
return Asis.Element (Result);
end Clone;
procedure Copy
(Source : in Asis.Element;
Target : access Pragma_Node;
Cloner : in Cloner_Class;
Parent : in Asis.Element)
is
begin
Set_Pragma_Argument_Associations
(Target.all,
Primary_Association_Lists.Deep_Copy
(Pragma_Argument_Associations (Source.all), Cloner, Asis.Element (Target)));
end Copy;
function Defining_Name_Image
(Element : Defining_Name_Node) return Wide_String is
begin
return W.To_Wide_String (Element.Defining_Name_Image);
end Defining_Name_Image;
procedure Set_Defining_Name_Image
(Element : in out Defining_Name_Node;
Value : in Wide_String) is
begin
Element.Defining_Name_Image := W.To_Unbounded_Wide_String (Value);
end Set_Defining_Name_Image;
function Corresponding_Constant_Declaration
(Element : Defining_Name_Node) return Asis.Element is
begin
return Element.Corresponding_Constant_Declaration;
end Corresponding_Constant_Declaration;
procedure Set_Corresponding_Constant_Declaration
(Element : in out Defining_Name_Node;
Value : in Asis.Element) is
begin
Element.Corresponding_Constant_Declaration := Value;
end Set_Corresponding_Constant_Declaration;
function References
(Element : Defining_Name_Node;
Include_Pragmas : in Boolean := False) return Asis.Element_List is
begin
return Secondary_Reference_Lists.To_Element_List
(Element.References, Include_Pragmas);
end References;
procedure Add_To_References
(Element : in out Defining_Name_Node;
Item : in Asis.Element) is
begin
Secondary_Reference_Lists.Add (Element.References, Item);
end Add_To_References;
function Corresponding_Generic_Element
(Element : Defining_Name_Node) return Asis.Defining_Name is
begin
return Element.Corresponding_Generic_Element;
end Corresponding_Generic_Element;
procedure Set_Corresponding_Generic_Element
(Element : in out Defining_Name_Node;
Value : in Asis.Defining_Name) is
begin
Element.Corresponding_Generic_Element := Value;
end Set_Corresponding_Generic_Element;
function Override
(Element : Defining_Name_Node) return Asis.Defining_Name is
begin
return Element.Override;
end Override;
procedure Set_Override
(Element : in out Defining_Name_Node;
Value : in Asis.Defining_Name) is
begin
Element.Override := Value;
end Set_Override;
function Place
(Element : Defining_Name_Node) return Visibility.Region_Item_Access is
begin
return Element.Place;
end Place;
procedure Set_Place
(Element : in out Defining_Name_Node;
Value : in Visibility.Region_Item_Access) is
begin
Element.Place := Value;
end Set_Place;
function Element_Kind (Element : Defining_Name_Node)
return Asis.Element_Kinds is
begin
return A_Defining_Name;
end;
function Declaration_Origin
(Element : Declaration_Node) return Asis.Declaration_Origins is
begin
return Element.Declaration_Origin;
end Declaration_Origin;
procedure Set_Declaration_Origin
(Element : in out Declaration_Node;
Value : in Asis.Declaration_Origins) is
begin
Element.Declaration_Origin := Value;
end Set_Declaration_Origin;
function Name
(Element : Declaration_Node) return Asis.Element is
begin
return Element.Name;
end Name;
procedure Set_Name
(Element : in out Declaration_Node;
Value : in Asis.Element) is
begin
Element.Name := Value;
end Set_Name;
function Names
(Element : Declaration_Node;
Include_Pragmas : in Boolean := False) return Asis.Element_List is
begin
return Primary_Defining_Name_Lists.To_Element_List
(Element.Names, Include_Pragmas);
end Names;
procedure Set_Names
(Element : in out Declaration_Node;
Value : in Asis.Element) is
begin
Element.Names := Primary_Defining_Name_Lists.List (Value);
end Set_Names;
function Names_List
(Element : Declaration_Node) return Asis.Element is
begin
return Asis.Element (Element.Names);
end Names_List;
function Corresponding_Representation_Clauses
(Element : Declaration_Node;
Include_Pragmas : in Boolean := False) return Asis.Element_List is
begin
return Secondary_Clause_Lists.To_Element_List
(Element.Corresponding_Representation_Clauses, Include_Pragmas);
end Corresponding_Representation_Clauses;
procedure Add_To_Corresponding_Representation_Clauses
(Element : in out Declaration_Node;
Item : in Asis.Element) is
begin
Secondary_Clause_Lists.Add (Element.Corresponding_Representation_Clauses, Item);
end Add_To_Corresponding_Representation_Clauses;
function Corresponding_Pragmas
(Element : Declaration_Node;
Include_Pragmas : in Boolean := False) return Asis.Element_List is
begin
return Secondary_Pragma_Lists.To_Element_List
(Element.Corresponding_Pragmas, Include_Pragmas);
end Corresponding_Pragmas;
procedure Add_To_Corresponding_Pragmas
(Element : in out Declaration_Node;
Item : in Asis.Element) is
begin
Secondary_Pragma_Lists.Add (Element.Corresponding_Pragmas, Item);
end Add_To_Corresponding_Pragmas;
function Place
(Element : Declaration_Node) return Visibility.Region_Item_Access is
begin
return Element.Place;
end Place;
procedure Set_Place
(Element : in out Declaration_Node;
Value : in Visibility.Region_Item_Access) is
begin
Element.Place := Value;
end Set_Place;
function Element_Kind (Element : Declaration_Node)
return Asis.Element_Kinds is
begin
return A_Declaration;
end;
function Children (Element : access Declaration_Node)
return Traverse_List is
begin
return (1 => (True, Asis.Element (Element.Names)));
end Children;
function Element_Kind (Element : Definition_Node)
return Asis.Element_Kinds is
begin
return A_Definition;
end;
function Corresponding_Expression_Type
(Element : Expression_Node) return Asis.Element is
begin
return Element.Corresponding_Expression_Type;
end Corresponding_Expression_Type;
procedure Set_Corresponding_Expression_Type
(Element : in out Expression_Node;
Value : in Asis.Element) is
begin
Element.Corresponding_Expression_Type := Value;
end Set_Corresponding_Expression_Type;
function Is_Static_Expression
(Element : Expression_Node) return Asis.Gela.Fuzzy_Boolean is
begin
return Element.Is_Static_Expression;
end Is_Static_Expression;
procedure Set_Is_Static_Expression
(Element : in out Expression_Node;
Value : in Asis.Gela.Fuzzy_Boolean) is
begin
Element.Is_Static_Expression := Value;
end Set_Is_Static_Expression;
function Element_Kind (Element : Expression_Node)
return Asis.Element_Kinds is
begin
return An_Expression;
end;
function Element_Kind (Element : Association_Node)
return Asis.Element_Kinds is
begin
return An_Association;
end;
function Label_Names
(Element : Statement_Node;
Include_Pragmas : in Boolean := False) return Asis.Element_List is
begin
return Primary_Defining_Name_Lists.To_Element_List
(Element.Label_Names, Include_Pragmas);
end Label_Names;
procedure Set_Label_Names
(Element : in out Statement_Node;
Value : in Asis.Element) is
begin
Element.Label_Names := Primary_Defining_Name_Lists.List (Value);
end Set_Label_Names;
function Label_Names_List
(Element : Statement_Node) return Asis.Element is
begin
return Asis.Element (Element.Label_Names);
end Label_Names_List;
function Corresponding_Pragmas
(Element : Statement_Node;
Include_Pragmas : in Boolean := False) return Asis.Element_List is
begin
return Secondary_Pragma_Lists.To_Element_List
(Element.Corresponding_Pragmas, Include_Pragmas);
end Corresponding_Pragmas;
procedure Add_To_Corresponding_Pragmas
(Element : in out Statement_Node;
Item : in Asis.Element) is
begin
Secondary_Pragma_Lists.Add (Element.Corresponding_Pragmas, Item);
end Add_To_Corresponding_Pragmas;
function Place
(Element : Statement_Node) return Visibility.Region_Item_Access is
begin
return Element.Place;
end Place;
procedure Set_Place
(Element : in out Statement_Node;
Value : in Visibility.Region_Item_Access) is
begin
Element.Place := Value;
end Set_Place;
function Element_Kind (Element : Statement_Node)
return Asis.Element_Kinds is
begin
return A_Statement;
end;
function Children (Element : access Statement_Node)
return Traverse_List is
begin
return (1 => (True, Asis.Element (Element.Label_Names)));
end Children;
function Sequence_Of_Statements
(Element : Path_Node;
Include_Pragmas : in Boolean := False) return Asis.Element_List is
begin
return Primary_Statement_Lists.To_Element_List
(Element.Sequence_Of_Statements, Include_Pragmas);
end Sequence_Of_Statements;
procedure Set_Sequence_Of_Statements
(Element : in out Path_Node;
Value : in Asis.Element) is
begin
Element.Sequence_Of_Statements := Primary_Statement_Lists.List (Value);
end Set_Sequence_Of_Statements;
function Sequence_Of_Statements_List
(Element : Path_Node) return Asis.Element is
begin
return Asis.Element (Element.Sequence_Of_Statements);
end Sequence_Of_Statements_List;
function Element_Kind (Element : Path_Node)
return Asis.Element_Kinds is
begin
return A_Path;
end;
function Children (Element : access Path_Node)
return Traverse_List is
begin
return (1 => (True, Asis.Element (Element.Sequence_Of_Statements)));
end Children;
function Place
(Element : Clause_Node) return Visibility.Region_Item_Access is
begin
return Element.Place;
end Place;
procedure Set_Place
(Element : in out Clause_Node;
Value : in Visibility.Region_Item_Access) is
begin
Element.Place := Value;
end Set_Place;
function Element_Kind (Element : Clause_Node)
return Asis.Element_Kinds is
begin
return A_Clause;
end;
function Choice_Parameter_Specification
(Element : Exception_Handler_Node) return Asis.Element is
begin
return Element.Choice_Parameter_Specification;
end Choice_Parameter_Specification;
procedure Set_Choice_Parameter_Specification
(Element : in out Exception_Handler_Node;
Value : in Asis.Element) is
begin
Element.Choice_Parameter_Specification := Value;
end Set_Choice_Parameter_Specification;
function Exception_Choices
(Element : Exception_Handler_Node;
Include_Pragmas : in Boolean := False) return Asis.Element_List is
begin
return Primary_Choise_Lists.To_Element_List
(Element.Exception_Choices, Include_Pragmas);
end Exception_Choices;
procedure Set_Exception_Choices
(Element : in out Exception_Handler_Node;
Value : in Asis.Element) is
begin
Element.Exception_Choices := Primary_Choise_Lists.List (Value);
end Set_Exception_Choices;
function Exception_Choices_List
(Element : Exception_Handler_Node) return Asis.Element is
begin
return Asis.Element (Element.Exception_Choices);
end Exception_Choices_List;
function Handler_Statements
(Element : Exception_Handler_Node;
Include_Pragmas : in Boolean := False) return Asis.Element_List is
begin
return Primary_Statement_Lists.To_Element_List
(Element.Handler_Statements, Include_Pragmas);
end Handler_Statements;
procedure Set_Handler_Statements
(Element : in out Exception_Handler_Node;
Value : in Asis.Element) is
begin
Element.Handler_Statements := Primary_Statement_Lists.List (Value);
end Set_Handler_Statements;
function Handler_Statements_List
(Element : Exception_Handler_Node) return Asis.Element is
begin
return Asis.Element (Element.Handler_Statements);
end Handler_Statements_List;
function Pragmas
(Element : Exception_Handler_Node;
Include_Pragmas : in Boolean := False) return Asis.Element_List is
begin
return Primary_Pragma_Lists.To_Element_List
(Element.Pragmas, Include_Pragmas);
end Pragmas;
procedure Set_Pragmas
(Element : in out Exception_Handler_Node;
Value : in Asis.Element) is
begin
Element.Pragmas := Primary_Pragma_Lists.List (Value);
end Set_Pragmas;
function Pragmas_List
(Element : Exception_Handler_Node) return Asis.Element is
begin
return Asis.Element (Element.Pragmas);
end Pragmas_List;
function Place
(Element : Exception_Handler_Node) return Visibility.Region_Item_Access is
begin
return Element.Place;
end Place;
procedure Set_Place
(Element : in out Exception_Handler_Node;
Value : in Visibility.Region_Item_Access) is
begin
Element.Place := Value;
end Set_Place;
function New_Exception_Handler_Node
(The_Context : ASIS.Context)
return Exception_Handler_Ptr
is
Result : Exception_Handler_Ptr :=
new Exception_Handler_Node;
begin
Set_Enclosing_Compilation_Unit
(Result.all, Current_Unit (The_Context.all));
return Result;
end New_Exception_Handler_Node;
function Element_Kind (Element : Exception_Handler_Node)
return Asis.Element_Kinds is
begin
return An_Exception_Handler;
end;
function Children (Element : access Exception_Handler_Node)
return Traverse_List is
begin
return ((True, Asis.Element (Element.Pragmas)),
(False, Element.Choice_Parameter_Specification'Access),
(True, Asis.Element (Element.Exception_Choices)),
(True, Asis.Element (Element.Handler_Statements)));
end Children;
function Clone
(Element : Exception_Handler_Node;
Parent : Asis.Element)
return Asis.Element
is
Result : constant Exception_Handler_Ptr := new Exception_Handler_Node;
begin
Result.Enclosing_Element := Parent;
Result.Is_Part_Of_Implicit := Element.Is_Part_Of_Implicit;
Result.Is_Part_Of_Inherited := Element.Is_Part_Of_Inherited;
Result.Is_Part_Of_Instance := Element.Is_Part_Of_Instance;
Result.Start_Position := Element.Start_Position;
Result.End_Position := Element.End_Position;
Result.Enclosing_Compilation_Unit :=
Enclosing_Compilation_Unit (Parent.all);
Result.Hash := Element.Hash;
Result.Place := Element.Place;
return Asis.Element (Result);
end Clone;
procedure Copy
(Source : in Asis.Element;
Target : access Exception_Handler_Node;
Cloner : in Cloner_Class;
Parent : in Asis.Element)
is
begin
Set_Pragmas
(Target.all,
Primary_Pragma_Lists.Deep_Copy
(Pragmas (Source.all), Cloner, Asis.Element (Target)));
Target.Choice_Parameter_Specification :=
Copy (Cloner, Choice_Parameter_Specification (Source.all), Asis.Element (Target));
Set_Exception_Choices
(Target.all,
Primary_Choise_Lists.Deep_Copy
(Exception_Choices (Source.all), Cloner, Asis.Element (Target)));
Set_Handler_Statements
(Target.all,
Primary_Statement_Lists.Deep_Copy
(Handler_Statements (Source.all), Cloner, Asis.Element (Target)));
end Copy;
end Asis.Gela.Elements;
|
with IRC;
package Plugin.Base
is
procedure Say (Message : IRC.Message);
procedure Join (Message : IRC.Message);
procedure Leave (Message : IRC.Message);
procedure Nick (Message : IRC.Message);
end Plugin.Base;
|
-----------------------------------------------------------------------
-- Hyperion.Monitoring.Models -- Hyperion.Monitoring.Models
-----------------------------------------------------------------------
-- File generated by ada-gen DO NOT MODIFY
-- Template used: templates/model/package-spec.xhtml
-- Ada Generator: https://ada-gen.googlecode.com/svn/trunk Revision 1095
-----------------------------------------------------------------------
-- 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.
-----------------------------------------------------------------------
pragma Warnings (Off);
with ADO.Sessions;
with ADO.Objects;
with ADO.Statements;
with ADO.SQL;
with ADO.Schemas;
with Ada.Calendar;
with Ada.Containers.Vectors;
with Ada.Strings.Unbounded;
with Util.Beans.Objects;
with Util.Beans.Objects.Enums;
with Util.Beans.Basic.Lists;
with Hyperion.Hosts.Models;
pragma Warnings (On);
package Hyperion.Monitoring.Models is
pragma Style_Checks ("-mr");
type Format_Type is (FORMAT_JSON);
for Format_Type use (FORMAT_JSON => 0);
package Format_Type_Objects is
new Util.Beans.Objects.Enums (Format_Type);
type Nullable_Format_Type is record
Is_Null : Boolean := True;
Value : Format_Type;
end record;
type Snapshot_Ref is new ADO.Objects.Object_Ref with null record;
type Source_Ref is new ADO.Objects.Object_Ref with null record;
type Series_Ref is new ADO.Objects.Object_Ref with null record;
-- Create an object key for Snapshot.
function Snapshot_Key (Id : in ADO.Identifier) return ADO.Objects.Object_Key;
-- Create an object key for Snapshot from a string.
-- Raises Constraint_Error if the string cannot be converted into the object key.
function Snapshot_Key (Id : in String) return ADO.Objects.Object_Key;
Null_Snapshot : constant Snapshot_Ref;
function "=" (Left, Right : Snapshot_Ref'Class) return Boolean;
-- Set the snapshot identifier
procedure Set_Id (Object : in out Snapshot_Ref;
Value : in ADO.Identifier);
-- Get the snapshot identifier
function Get_Id (Object : in Snapshot_Ref)
return ADO.Identifier;
-- Set the snapshot date
procedure Set_Start_Date (Object : in out Snapshot_Ref;
Value : in Ada.Calendar.Time);
-- Get the snapshot date
function Get_Start_Date (Object : in Snapshot_Ref)
return Ada.Calendar.Time;
-- Set the snapshot end date.
procedure Set_End_Date (Object : in out Snapshot_Ref;
Value : in Ada.Calendar.Time);
-- Get the snapshot end date.
function Get_End_Date (Object : in Snapshot_Ref)
return Ada.Calendar.Time;
-- Get the optimistic lock version
function Get_Version (Object : in Snapshot_Ref)
return Integer;
-- Set the host to which the snapshot is associated
procedure Set_Host (Object : in out Snapshot_Ref;
Value : in Hyperion.Hosts.Models.Host_Ref'Class);
-- Get the host to which the snapshot is associated
function Get_Host (Object : in Snapshot_Ref)
return Hyperion.Hosts.Models.Host_Ref'Class;
-- Load the entity identified by 'Id'.
-- Raises the NOT_FOUND exception if it does not exist.
procedure Load (Object : in out Snapshot_Ref;
Session : in out ADO.Sessions.Session'Class;
Id : in ADO.Identifier);
-- Load the entity identified by 'Id'.
-- Returns True in <b>Found</b> if the object was found and False if it does not exist.
procedure Load (Object : in out Snapshot_Ref;
Session : in out ADO.Sessions.Session'Class;
Id : in ADO.Identifier;
Found : out Boolean);
-- Find and load the entity.
overriding
procedure Find (Object : in out Snapshot_Ref;
Session : in out ADO.Sessions.Session'Class;
Query : in ADO.SQL.Query'Class;
Found : out Boolean);
-- Save the entity. If the entity does not have an identifier, an identifier is allocated
-- and it is inserted in the table. Otherwise, only data fields which have been changed
-- are updated.
overriding
procedure Save (Object : in out Snapshot_Ref;
Session : in out ADO.Sessions.Master_Session'Class);
-- Delete the entity.
overriding
procedure Delete (Object : in out Snapshot_Ref;
Session : in out ADO.Sessions.Master_Session'Class);
overriding
function Get_Value (From : in Snapshot_Ref;
Name : in String) return Util.Beans.Objects.Object;
-- Table definition
SNAPSHOT_TABLE : constant ADO.Schemas.Class_Mapping_Access;
-- Internal method to allocate the Object_Record instance
overriding
procedure Allocate (Object : in out Snapshot_Ref);
-- Copy of the object.
procedure Copy (Object : in Snapshot_Ref;
Into : in out Snapshot_Ref);
package Snapshot_Vectors is
new Ada.Containers.Vectors (Index_Type => Natural,
Element_Type => Snapshot_Ref,
"=" => "=");
subtype Snapshot_Vector is Snapshot_Vectors.Vector;
procedure List (Object : in out Snapshot_Vector;
Session : in out ADO.Sessions.Session'Class;
Query : in ADO.SQL.Query'Class);
-- --------------------
-- The source describes an element of the system that is monitored and which
-- for which we have collected data.
-- --------------------
-- Create an object key for Source.
function Source_Key (Id : in ADO.Identifier) return ADO.Objects.Object_Key;
-- Create an object key for Source from a string.
-- Raises Constraint_Error if the string cannot be converted into the object key.
function Source_Key (Id : in String) return ADO.Objects.Object_Key;
Null_Source : constant Source_Ref;
function "=" (Left, Right : Source_Ref'Class) return Boolean;
-- Set unique identifier.
procedure Set_Id (Object : in out Source_Ref;
Value : in ADO.Identifier);
-- Get unique identifier.
function Get_Id (Object : in Source_Ref)
return ADO.Identifier;
-- Set the time series name.
procedure Set_Name (Object : in out Source_Ref;
Value : in Ada.Strings.Unbounded.Unbounded_String);
procedure Set_Name (Object : in out Source_Ref;
Value : in String);
-- Get the time series name.
function Get_Name (Object : in Source_Ref)
return Ada.Strings.Unbounded.Unbounded_String;
function Get_Name (Object : in Source_Ref)
return String;
-- Set the label to be used in presentation.
procedure Set_Label (Object : in out Source_Ref;
Value : in Ada.Strings.Unbounded.Unbounded_String);
procedure Set_Label (Object : in out Source_Ref;
Value : in String);
-- Get the label to be used in presentation.
function Get_Label (Object : in Source_Ref)
return Ada.Strings.Unbounded.Unbounded_String;
function Get_Label (Object : in Source_Ref)
return String;
-- Get the optimistic lock version
function Get_Version (Object : in Source_Ref)
return Integer;
-- Set the host to which the source is associated
procedure Set_Host (Object : in out Source_Ref;
Value : in Hyperion.Hosts.Models.Host_Ref'Class);
-- Get the host to which the source is associated
function Get_Host (Object : in Source_Ref)
return Hyperion.Hosts.Models.Host_Ref'Class;
-- Load the entity identified by 'Id'.
-- Raises the NOT_FOUND exception if it does not exist.
procedure Load (Object : in out Source_Ref;
Session : in out ADO.Sessions.Session'Class;
Id : in ADO.Identifier);
-- Load the entity identified by 'Id'.
-- Returns True in <b>Found</b> if the object was found and False if it does not exist.
procedure Load (Object : in out Source_Ref;
Session : in out ADO.Sessions.Session'Class;
Id : in ADO.Identifier;
Found : out Boolean);
-- Find and load the entity.
overriding
procedure Find (Object : in out Source_Ref;
Session : in out ADO.Sessions.Session'Class;
Query : in ADO.SQL.Query'Class;
Found : out Boolean);
-- Save the entity. If the entity does not have an identifier, an identifier is allocated
-- and it is inserted in the table. Otherwise, only data fields which have been changed
-- are updated.
overriding
procedure Save (Object : in out Source_Ref;
Session : in out ADO.Sessions.Master_Session'Class);
-- Delete the entity.
overriding
procedure Delete (Object : in out Source_Ref;
Session : in out ADO.Sessions.Master_Session'Class);
overriding
function Get_Value (From : in Source_Ref;
Name : in String) return Util.Beans.Objects.Object;
-- Table definition
SOURCE_TABLE : constant ADO.Schemas.Class_Mapping_Access;
-- Internal method to allocate the Object_Record instance
overriding
procedure Allocate (Object : in out Source_Ref);
-- Copy of the object.
procedure Copy (Object : in Source_Ref;
Into : in out Source_Ref);
package Source_Vectors is
new Ada.Containers.Vectors (Index_Type => Natural,
Element_Type => Source_Ref,
"=" => "=");
subtype Source_Vector is Source_Vectors.Vector;
procedure List (Object : in out Source_Vector;
Session : in out ADO.Sessions.Session'Class;
Query : in ADO.SQL.Query'Class);
-- --------------------
-- The Series table holds the collected data
-- for a given time frame. Values are serialized
-- in the 'content' blob in a format described by
-- the Format_Type enumeration.
-- --------------------
-- Create an object key for Series.
function Series_Key (Id : in ADO.Identifier) return ADO.Objects.Object_Key;
-- Create an object key for Series from a string.
-- Raises Constraint_Error if the string cannot be converted into the object key.
function Series_Key (Id : in String) return ADO.Objects.Object_Key;
Null_Series : constant Series_Ref;
function "=" (Left, Right : Series_Ref'Class) return Boolean;
-- Set the series unique identifier
procedure Set_Id (Object : in out Series_Ref;
Value : in ADO.Identifier);
-- Get the series unique identifier
function Get_Id (Object : in Series_Ref)
return ADO.Identifier;
-- Get the optimistic lock version.
function Get_Version (Object : in Series_Ref)
return Integer;
-- Set the date and time of the first value in the series.
procedure Set_Start_Date (Object : in out Series_Ref;
Value : in Ada.Calendar.Time);
-- Get the date and time of the first value in the series.
function Get_Start_Date (Object : in Series_Ref)
return Ada.Calendar.Time;
-- Set the date and time of the last value in the series.
procedure Set_End_Date (Object : in out Series_Ref;
Value : in Ada.Calendar.Time);
-- Get the date and time of the last value in the series.
function Get_End_Date (Object : in Series_Ref)
return Ada.Calendar.Time;
-- Set the series content (JSON).
procedure Set_Content (Object : in out Series_Ref;
Value : in ADO.Blob_Ref);
-- Get the series content (JSON).
function Get_Content (Object : in Series_Ref)
return ADO.Blob_Ref;
-- Set the number of values in the series.
procedure Set_Count (Object : in out Series_Ref;
Value : in Integer);
-- Get the number of values in the series.
function Get_Count (Object : in Series_Ref)
return Integer;
-- Set the first value of the serie.
procedure Set_First_Value (Object : in out Series_Ref;
Value : in Integer);
-- Get the first value of the serie.
function Get_First_Value (Object : in Series_Ref)
return Integer;
-- Set the format of the content blob data.
procedure Set_Format (Object : in out Series_Ref;
Value : in Hyperion.Monitoring.Models.Format_Type);
-- Get the format of the content blob data.
function Get_Format (Object : in Series_Ref)
return Hyperion.Monitoring.Models.Format_Type;
--
procedure Set_Source (Object : in out Series_Ref;
Value : in Hyperion.Monitoring.Models.Source_Ref'Class);
--
function Get_Source (Object : in Series_Ref)
return Hyperion.Monitoring.Models.Source_Ref'Class;
-- Set the snapshot that produced the series
procedure Set_Snapshot (Object : in out Series_Ref;
Value : in Hyperion.Monitoring.Models.Snapshot_Ref'Class);
-- Get the snapshot that produced the series
function Get_Snapshot (Object : in Series_Ref)
return Hyperion.Monitoring.Models.Snapshot_Ref'Class;
-- Load the entity identified by 'Id'.
-- Raises the NOT_FOUND exception if it does not exist.
procedure Load (Object : in out Series_Ref;
Session : in out ADO.Sessions.Session'Class;
Id : in ADO.Identifier);
-- Load the entity identified by 'Id'.
-- Returns True in <b>Found</b> if the object was found and False if it does not exist.
procedure Load (Object : in out Series_Ref;
Session : in out ADO.Sessions.Session'Class;
Id : in ADO.Identifier;
Found : out Boolean);
-- Find and load the entity.
overriding
procedure Find (Object : in out Series_Ref;
Session : in out ADO.Sessions.Session'Class;
Query : in ADO.SQL.Query'Class;
Found : out Boolean);
-- Save the entity. If the entity does not have an identifier, an identifier is allocated
-- and it is inserted in the table. Otherwise, only data fields which have been changed
-- are updated.
overriding
procedure Save (Object : in out Series_Ref;
Session : in out ADO.Sessions.Master_Session'Class);
-- Delete the entity.
overriding
procedure Delete (Object : in out Series_Ref;
Session : in out ADO.Sessions.Master_Session'Class);
overriding
function Get_Value (From : in Series_Ref;
Name : in String) return Util.Beans.Objects.Object;
-- Table definition
SERIES_TABLE : constant ADO.Schemas.Class_Mapping_Access;
-- Internal method to allocate the Object_Record instance
overriding
procedure Allocate (Object : in out Series_Ref);
-- Copy of the object.
procedure Copy (Object : in Series_Ref;
Into : in out Series_Ref);
private
SNAPSHOT_NAME : aliased constant String := "hyperion_snapshot";
COL_0_1_NAME : aliased constant String := "id";
COL_1_1_NAME : aliased constant String := "start_date";
COL_2_1_NAME : aliased constant String := "end_date";
COL_3_1_NAME : aliased constant String := "version";
COL_4_1_NAME : aliased constant String := "host_id";
SNAPSHOT_DEF : aliased constant ADO.Schemas.Class_Mapping :=
(Count => 5,
Table => SNAPSHOT_NAME'Access,
Members => (
1 => COL_0_1_NAME'Access,
2 => COL_1_1_NAME'Access,
3 => COL_2_1_NAME'Access,
4 => COL_3_1_NAME'Access,
5 => COL_4_1_NAME'Access)
);
SNAPSHOT_TABLE : constant ADO.Schemas.Class_Mapping_Access
:= SNAPSHOT_DEF'Access;
Null_Snapshot : constant Snapshot_Ref
:= Snapshot_Ref'(ADO.Objects.Object_Ref with null record);
type Snapshot_Impl is
new ADO.Objects.Object_Record (Key_Type => ADO.Objects.KEY_INTEGER,
Of_Class => SNAPSHOT_DEF'Access)
with record
Start_Date : Ada.Calendar.Time;
End_Date : Ada.Calendar.Time;
Version : Integer;
Host : Hyperion.Hosts.Models.Host_Ref;
end record;
type Snapshot_Access is access all Snapshot_Impl;
overriding
procedure Destroy (Object : access Snapshot_Impl);
overriding
procedure Find (Object : in out Snapshot_Impl;
Session : in out ADO.Sessions.Session'Class;
Query : in ADO.SQL.Query'Class;
Found : out Boolean);
overriding
procedure Load (Object : in out Snapshot_Impl;
Session : in out ADO.Sessions.Session'Class);
procedure Load (Object : in out Snapshot_Impl;
Stmt : in out ADO.Statements.Query_Statement'Class;
Session : in out ADO.Sessions.Session'Class);
overriding
procedure Save (Object : in out Snapshot_Impl;
Session : in out ADO.Sessions.Master_Session'Class);
procedure Create (Object : in out Snapshot_Impl;
Session : in out ADO.Sessions.Master_Session'Class);
overriding
procedure Delete (Object : in out Snapshot_Impl;
Session : in out ADO.Sessions.Master_Session'Class);
procedure Set_Field (Object : in out Snapshot_Ref'Class;
Impl : out Snapshot_Access);
SOURCE_NAME : aliased constant String := "hyperion_source";
COL_0_2_NAME : aliased constant String := "id";
COL_1_2_NAME : aliased constant String := "name";
COL_2_2_NAME : aliased constant String := "label";
COL_3_2_NAME : aliased constant String := "version";
COL_4_2_NAME : aliased constant String := "host_id";
SOURCE_DEF : aliased constant ADO.Schemas.Class_Mapping :=
(Count => 5,
Table => SOURCE_NAME'Access,
Members => (
1 => COL_0_2_NAME'Access,
2 => COL_1_2_NAME'Access,
3 => COL_2_2_NAME'Access,
4 => COL_3_2_NAME'Access,
5 => COL_4_2_NAME'Access)
);
SOURCE_TABLE : constant ADO.Schemas.Class_Mapping_Access
:= SOURCE_DEF'Access;
Null_Source : constant Source_Ref
:= Source_Ref'(ADO.Objects.Object_Ref with null record);
type Source_Impl is
new ADO.Objects.Object_Record (Key_Type => ADO.Objects.KEY_INTEGER,
Of_Class => SOURCE_DEF'Access)
with record
Name : Ada.Strings.Unbounded.Unbounded_String;
Label : Ada.Strings.Unbounded.Unbounded_String;
Version : Integer;
Host : Hyperion.Hosts.Models.Host_Ref;
end record;
type Source_Access is access all Source_Impl;
overriding
procedure Destroy (Object : access Source_Impl);
overriding
procedure Find (Object : in out Source_Impl;
Session : in out ADO.Sessions.Session'Class;
Query : in ADO.SQL.Query'Class;
Found : out Boolean);
overriding
procedure Load (Object : in out Source_Impl;
Session : in out ADO.Sessions.Session'Class);
procedure Load (Object : in out Source_Impl;
Stmt : in out ADO.Statements.Query_Statement'Class;
Session : in out ADO.Sessions.Session'Class);
overriding
procedure Save (Object : in out Source_Impl;
Session : in out ADO.Sessions.Master_Session'Class);
procedure Create (Object : in out Source_Impl;
Session : in out ADO.Sessions.Master_Session'Class);
overriding
procedure Delete (Object : in out Source_Impl;
Session : in out ADO.Sessions.Master_Session'Class);
procedure Set_Field (Object : in out Source_Ref'Class;
Impl : out Source_Access);
SERIES_NAME : aliased constant String := "hyperion_series";
COL_0_3_NAME : aliased constant String := "id";
COL_1_3_NAME : aliased constant String := "version";
COL_2_3_NAME : aliased constant String := "start_date";
COL_3_3_NAME : aliased constant String := "end_date";
COL_4_3_NAME : aliased constant String := "content";
COL_5_3_NAME : aliased constant String := "count";
COL_6_3_NAME : aliased constant String := "first_value";
COL_7_3_NAME : aliased constant String := "format";
COL_8_3_NAME : aliased constant String := "source_id";
COL_9_3_NAME : aliased constant String := "snapshot_id";
SERIES_DEF : aliased constant ADO.Schemas.Class_Mapping :=
(Count => 10,
Table => SERIES_NAME'Access,
Members => (
1 => COL_0_3_NAME'Access,
2 => COL_1_3_NAME'Access,
3 => COL_2_3_NAME'Access,
4 => COL_3_3_NAME'Access,
5 => COL_4_3_NAME'Access,
6 => COL_5_3_NAME'Access,
7 => COL_6_3_NAME'Access,
8 => COL_7_3_NAME'Access,
9 => COL_8_3_NAME'Access,
10 => COL_9_3_NAME'Access)
);
SERIES_TABLE : constant ADO.Schemas.Class_Mapping_Access
:= SERIES_DEF'Access;
Null_Series : constant Series_Ref
:= Series_Ref'(ADO.Objects.Object_Ref with null record);
type Series_Impl is
new ADO.Objects.Object_Record (Key_Type => ADO.Objects.KEY_INTEGER,
Of_Class => SERIES_DEF'Access)
with record
Version : Integer;
Start_Date : Ada.Calendar.Time;
End_Date : Ada.Calendar.Time;
Content : ADO.Blob_Ref;
Count : Integer;
First_Value : Integer;
Format : Hyperion.Monitoring.Models.Format_Type;
Source : Hyperion.Monitoring.Models.Source_Ref;
Snapshot : Hyperion.Monitoring.Models.Snapshot_Ref;
end record;
type Series_Access is access all Series_Impl;
overriding
procedure Destroy (Object : access Series_Impl);
overriding
procedure Find (Object : in out Series_Impl;
Session : in out ADO.Sessions.Session'Class;
Query : in ADO.SQL.Query'Class;
Found : out Boolean);
overriding
procedure Load (Object : in out Series_Impl;
Session : in out ADO.Sessions.Session'Class);
procedure Load (Object : in out Series_Impl;
Stmt : in out ADO.Statements.Query_Statement'Class;
Session : in out ADO.Sessions.Session'Class);
overriding
procedure Save (Object : in out Series_Impl;
Session : in out ADO.Sessions.Master_Session'Class);
procedure Create (Object : in out Series_Impl;
Session : in out ADO.Sessions.Master_Session'Class);
overriding
procedure Delete (Object : in out Series_Impl;
Session : in out ADO.Sessions.Master_Session'Class);
procedure Set_Field (Object : in out Series_Ref'Class;
Impl : out Series_Access);
end Hyperion.Monitoring.Models;
|
-- CC3019B1.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.
--*
-- THIS IS GENERIC PACKAGE WHICH IS USED TO CHECK THE LEVEL OF
-- NESTED GENERICS SUPPORTED BY AN IMPLEMENTATION. IT IS USED
-- BY THE MAIN PROCEDURE, I.E., CC3019B2M.ADA.
--
-- *** THIS FILE MUST BE COMPILED AFTER CC3019B0.ADA HAS BEEN
-- *** COMPILED.
--
-- HISTORY:
-- EDWARD V. BERARD, 31 AUGUST 1990
WITH CC3019B0_LIST_CLASS ;
GENERIC
TYPE ELEMENT IS LIMITED PRIVATE ;
WITH PROCEDURE ASSIGN (SOURCE : IN OUT ELEMENT ;
DESTINATION : IN OUT ELEMENT) ;
WITH FUNCTION "=" (LEFT : IN ELEMENT ;
RIGHT : IN ELEMENT) RETURN BOOLEAN ;
PACKAGE CC3019B1_STACK_CLASS IS
TYPE STACK IS LIMITED PRIVATE ;
OVERFLOW : EXCEPTION ;
UNDERFLOW : EXCEPTION ;
PROCEDURE PUSH (THIS_ELEMENT : IN OUT ELEMENT ;
ON_TO_THIS_STACK : IN OUT STACK) ;
PROCEDURE POP (THIS_ELEMENT : IN OUT ELEMENT ;
OFF_THIS_STACK : IN OUT STACK) ;
PROCEDURE COPY (THIS_STACK : IN OUT STACK ;
TO_THIS_STACK : IN OUT STACK) ;
PROCEDURE CLEAR (THIS_STACK : IN OUT STACK) ;
GENERIC
WITH PROCEDURE PROCESS (THIS_ELEMENT : IN ELEMENT ;
CONTINUE : OUT BOOLEAN) ;
PROCEDURE ITERATE (OVER_THIS_STACK : IN STACK) ;
FUNCTION NUMBER_OF_ELEMENTS (ON_THIS_STACK : IN STACK)
RETURN NATURAL ;
FUNCTION "=" (LEFT : IN STACK ;
RIGHT : IN STACK) RETURN BOOLEAN ;
PRIVATE
PACKAGE NEW_LIST_CLASS IS
NEW CC3019B0_LIST_CLASS (ELEMENT => ELEMENT,
ASSIGN => ASSIGN,
"=" => "=") ;
TYPE STACK IS NEW NEW_LIST_CLASS.LIST ;
END CC3019B1_STACK_CLASS ;
PACKAGE BODY CC3019B1_STACK_CLASS IS
PROCEDURE PUSH (THIS_ELEMENT : IN OUT ELEMENT ;
ON_TO_THIS_STACK : IN OUT STACK) IS
BEGIN -- PUSH
NEW_LIST_CLASS.ADD (
THIS_ELEMENT => THIS_ELEMENT,
TO_THIS_LIST =>
NEW_LIST_CLASS.LIST (ON_TO_THIS_STACK)) ;
EXCEPTION
WHEN NEW_LIST_CLASS.OVERFLOW => RAISE OVERFLOW ;
END PUSH ;
PROCEDURE POP (THIS_ELEMENT : IN OUT ELEMENT ;
OFF_THIS_STACK : IN OUT STACK) IS
BEGIN -- POP
NEW_LIST_CLASS.DELETE (
THIS_ELEMENT => THIS_ELEMENT,
FROM_THIS_LIST =>
NEW_LIST_CLASS.LIST (OFF_THIS_STACK)) ;
EXCEPTION
WHEN NEW_LIST_CLASS.UNDERFLOW => RAISE UNDERFLOW ;
END POP ;
PROCEDURE COPY (THIS_STACK : IN OUT STACK ;
TO_THIS_STACK : IN OUT STACK) IS
BEGIN -- COPY
NEW_LIST_CLASS.COPY (
THIS_LIST => NEW_LIST_CLASS.LIST (THIS_STACK),
TO_THIS_LIST => NEW_LIST_CLASS.LIST (TO_THIS_STACK)) ;
END COPY ;
PROCEDURE CLEAR (THIS_STACK : IN OUT STACK) IS
BEGIN -- CLEAR
NEW_LIST_CLASS.CLEAR (NEW_LIST_CLASS.LIST (THIS_STACK)) ;
END CLEAR ;
PROCEDURE ITERATE (OVER_THIS_STACK : IN STACK) IS
PROCEDURE STACK_ITERATE IS NEW NEW_LIST_CLASS.ITERATE
(PROCESS => PROCESS) ;
BEGIN -- ITERATE
STACK_ITERATE (NEW_LIST_CLASS.LIST (OVER_THIS_STACK)) ;
END ITERATE ;
FUNCTION NUMBER_OF_ELEMENTS (ON_THIS_STACK : IN STACK)
RETURN NATURAL IS
BEGIN -- NUMBER_OF_ELEMENTS
RETURN NEW_LIST_CLASS.NUMBER_OF_ELEMENTS
(IN_THIS_LIST => NEW_LIST_CLASS.LIST (ON_THIS_STACK)) ;
END NUMBER_OF_ELEMENTS ;
FUNCTION "=" (LEFT : IN STACK ;
RIGHT : IN STACK) RETURN BOOLEAN IS
BEGIN -- "="
RETURN NEW_LIST_CLASS."=" (
LEFT => NEW_LIST_CLASS.LIST (LEFT),
RIGHT => NEW_LIST_CLASS.LIST (RIGHT)) ;
END "=" ;
END CC3019B1_STACK_CLASS ;
|
declare
X : String := "Hello"; -- Create and initialize a local variable
Y : Integer; -- Create an uninitialized variable
Z : Integer renames Y: -- Rename Y (creates a view)
begin
Y := 1; -- Assign variable
end; -- End of the scope
|
-----------------------------------------------------------------------
-- wiki-filters-autolink -- Autolink filter to identify links in wiki
-- Copyright (C) 2016 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 Wiki.Helpers;
package body Wiki.Filters.Autolink is
-- ------------------------------
-- Find the position of the end of the link.
-- Returns 0 if the content is not a link.
-- ------------------------------
function Find_End_Link (Filter : in Autolink_Filter;
Content : in Wiki.Strings.WString) return Natural is
pragma Unreferenced (Filter);
begin
if Content'Length < 7 then
return 0;
elsif not Wiki.Helpers.Is_Url (Content) then
return 0;
else
for Pos in Content'First + 4 .. Content'Last loop
if Wiki.Helpers.Is_Space_Or_Newline (Content (Pos)) then
return Pos - 1;
end if;
end loop;
return Content'Last;
end if;
end Find_End_Link;
-- ------------------------------
-- Add a text content with the given format to the document. Identify URLs in the text
-- and transform them into links. For each link, call the Add_Link operation. The operation
-- recognizes http:// https:// ftp:// ftps://
-- ------------------------------
overriding
procedure Add_Text (Filter : in out Autolink_Filter;
Document : in out Wiki.Documents.Document;
Text : in Wiki.Strings.WString;
Format : in Wiki.Format_Map) is
Pos : Natural := Text'First;
Start : Natural := Text'First;
Last : Natural;
C : Wiki.Strings.WChar;
Check : Boolean := True;
begin
while Pos <= Text'Last loop
C := Text (Pos);
if Wiki.Helpers.Is_Space (C) then
Check := True;
Pos := Pos + 1;
elsif Check then
Last := Autolink_Filter'Class (Filter).Find_End_Link (Text (Pos .. Text'Last));
if Last > 0 then
if Start /= Pos then
Filter_Type (Filter).Add_Text (Document, Text (Start .. Pos - 1), Format);
end if;
declare
Attr : Wiki.Attributes.Attribute_List;
begin
Wiki.Attributes.Append (Attr, String '("href"), Text (Pos .. Last));
Autolink_Filter'Class (Filter).Add_Link (Document, Text (Pos .. Last),
Attr);
end;
Start := Last + 1;
Pos := Start;
else
Check := False;
Pos := Pos + 1;
end if;
else
Pos := Pos + 1;
end if;
end loop;
if Start <= Text'Last then
Filter_Type (Filter).Add_Text (Document, Text (Start .. Text'Last), Format);
end if;
end Add_Text;
end Wiki.Filters.Autolink;
|
with Ada.Text_IO;
package body myeventhandler is
procedure Ping (Event : EV.Event_Access) is begin
Ada.Text_IO.Put_Line ("Ping");
end;
procedure Some_Event (Event : EV.Event_Access) is
My_String : constant String := EV.Get_String (Event, 1); -- by index
My_Float : constant Float := EV.Get_Float (Event, 2);
Width : constant Natural := EV.Get_Natural(Event, "width"); -- by name
Height : constant Natural := EV.Get_Natural(Event, "height");
begin
Ada.Text_IO.Put_Line
("some-event: My_String=" & My_String & "; My_Float=" & Float'Image(My_Float));
Ada.Text_IO.Put_Line(
"some-event: Width=" & Natural'Image(Width) & "; Height=" & Natural'Image(Height));
end;
end myeventhandler;
|
-- This file is covered by the Internet Software Consortium (ISC) License
-- Reference: ../License.txt
-- GCC 6.0 only
-- pragma Suppress (Tampering_Check);
with Definitions; use Definitions;
with HelperText;
with Ada.Text_IO;
private with Ada.Containers.Hashed_Maps;
private with Ada.Containers.Ordered_Sets;
private with Ada.Containers.Vectors;
package PortScan is
package TIO renames Ada.Text_IO;
package HT renames HelperText;
scan_log_error : exception;
type count_type is (total, success, failure, ignored, skipped);
type port_id is private;
type sysroot_characteristics is
record
major : HT.Text;
release : HT.Text;
version : HT.Text;
arch : supported_arch;
end record;
-- Wipe out all scan data so new scan can be performed
procedure reset_ports_tree;
-- Sometimes there is nothing left to do after the sanity check. Let's provide a way to
-- detect that case.
function queue_is_empty return Boolean;
-- Returns the size of the queue before it was pared down.
function original_queue_size return Natural;
-- Returns the current queue size
function queue_length return Integer;
-- Return the length of the original build request
function build_request_length return Integer;
-- Given a port ID, attempt to display the portkey
function get_port_variant (id : port_id) return String;
-- Given a port ID, attempt to display the "ignore" reason
function ignore_reason (id : port_id) return String;
-- Returns true if the given ID is valid (e.g. not port_match_failed)
function valid_port_id (id : port_id) return Boolean;
-- Given a port ID, attempt to return 2-character bucket
function get_bucket (id : port_id) return String;
-- Given an ID and specifying a subpackage, this function returns the package file name.
function calculate_package_name (id : port_id; subpackage : String) return String;
-- Takes origin tuplet (namebase:subpkg:variant) and returns namebase:variant
function convert_depend_origin_to_portkey (origin : String) return String;
-- Takes origin tuplet (namebase-subpkg-variant-version.tzst) and returns subpkg
function subpackage_from_pkgname (pkgname : String) return String;
-- Insert unique NV pair into portlist and dupelist.
procedure insert_into_portlist (port_variant : String);
-- Checks all_ports (id) and returns value of use_procfs
function requires_procfs (id : port_id) return Boolean;
-- Given an index, returns a buildsheet location wrt unkindness
function get_buildsheet_from_origin_list (index : Positive) return String;
-- Returns true if ports binutils (binutils:ravensys) is present in stored origins
-- The pkg version also has to match $binutilsversion
function jail_port_binutils_specified return Boolean;
-- Returns true if ports compiler (gcc9:standard) is present in stored origins
-- The pkg version also has to match $compiler_version
function jail_port_compiler_specified return Boolean;
private
package CON renames Ada.Containers;
max_ports : constant := 8000;
type port_id is range -1 .. max_ports - 1;
subtype port_index is port_id range 0 .. port_id'Last;
port_match_failed : constant port_id := port_id'First;
subtype bucket_code is String (1 .. 2);
pkgng_execution : exception;
circular_logic : exception;
seek_failure : exception;
unknown_format : exception;
type queue_record is
record
ap_index : port_index;
reverse_score : port_index;
end record;
-- Functions for ranking_crate definitions
function "<" (L, R : queue_record) return Boolean;
-- Functions for portkey_crate and package_crate definitions
function port_hash (key : HT.Text) return CON.Hash_Type;
-- Functions for block_crate definitions
function block_hash (key : port_index) return CON.Hash_Type;
function block_ekey (left, right : port_index) return Boolean;
package subqueue is new CON.Vectors
(Element_Type => port_index,
Index_Type => port_index);
package string_crate is new CON.Vectors
(Element_Type => HT.Text,
Index_Type => port_index,
"=" => HT.SU."=");
package sorter is new string_crate.Generic_Sorting ("<" => HT.SU."<");
package ranking_crate is new CON.Ordered_Sets
(Element_Type => queue_record);
package portkey_crate is new CON.Hashed_Maps
(Key_Type => HT.Text,
Element_Type => port_index,
Hash => port_hash,
Equivalent_Keys => HT.equivalent);
package package_crate is new CON.Hashed_Maps
(Key_Type => HT.Text,
Element_Type => Boolean,
Hash => port_hash,
Equivalent_Keys => HT.equivalent);
package block_crate is new CON.Hashed_Maps
(Key_Type => port_index,
Element_Type => port_index,
Hash => block_hash,
Equivalent_Keys => block_ekey);
type subpackage_identifier is
record
port : port_index;
subpackage : HT.Text;
end record;
package spkg_id_crate is new CON.Vectors
(Element_Type => subpackage_identifier,
Index_Type => Positive);
type subpackage_record is
record
subpackage : HT.Text := HT.blank;
pkg_dep_query : HT.Text := HT.blank;
pkg_present : Boolean := False;
remote_pkg : Boolean := False;
never_remote : Boolean := False;
deletion_due : Boolean := False;
spkg_run_deps : spkg_id_crate.Vector;
end record;
package subpackage_crate is new CON.Vectors
(Element_Type => subpackage_record,
Index_Type => Positive);
type port_record is
record
sequence_id : port_index := 0;
key_cursor : portkey_crate.Cursor := portkey_crate.No_Element;
ignore_reason : HT.Text := HT.blank;
pkgversion : HT.Text := HT.blank;
port_variant : HT.Text := HT.blank;
port_namebase : HT.Text := HT.blank;
bucket : bucket_code := "00";
unkind_custom : Boolean := False;
ignored : Boolean := False;
scanned : Boolean := False;
rev_scanned : Boolean := False;
unlist_failed : Boolean := False;
work_locked : Boolean := False;
scan_locked : Boolean := False;
use_procfs : Boolean := False;
reverse_score : port_index := 0;
run_deps : block_crate.Map;
blocked_by : block_crate.Map;
blocks : block_crate.Map;
all_reverse : block_crate.Map;
options : package_crate.Map;
subpackages : subpackage_crate.Vector;
end record;
type dim_make_queue is array (scanners) of subqueue.Vector;
type dim_progress is array (scanners) of port_index;
type dim_all_ports is array (port_index) of port_record;
all_ports : dim_all_ports;
ports_keys : portkey_crate.Map;
make_queue : dim_make_queue;
mq_progress : dim_progress := (others => 0);
rank_queue : ranking_crate.Set;
last_port : port_index := 0;
lot_number : scanners := 1;
lot_counter : port_index := 0;
prescanned : Boolean := False;
log_list : string_crate.Vector;
portlist : string_crate.Vector;
dupelist : string_crate.Vector;
package_list : string_crate.Vector;
distfile_set : portkey_crate.Map;
original_queue_len : CON.Count_Type;
discerr : constant String := "Discovery error";
function get_port_variant (PR : port_record) return String;
function scan_progress return String;
procedure wipe_make_queue;
procedure dump_stack (media : TIO.File_Type);
end PortScan;
|
-----------------------------------------------------------------------
-- awa-commands-start -- Command to start the web server
-- 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 System;
with Servlet.Core;
with Servlet.Server;
with GNAT.Sockets;
with AWA.Applications;
package body AWA.Commands.Start is
use Ada.Strings.Unbounded;
use GNAT.Sockets;
use type System.Address;
-- ------------------------------
-- Start the server and all the application that have been registered.
-- ------------------------------
overriding
procedure Execute (Command : in out Command_Type;
Name : in String;
Args : in Argument_List'Class;
Context : in out Context_Type) is
begin
if Args.Get_Count /= 0 then
Command.Usage (Name, Context);
return;
end if;
Command.Configure_Server (Context);
Command.Configure_Applications (Context);
Command.Start_Server (Context);
Command.Wait_Server (Context);
end Execute;
-- ------------------------------
-- Configure the web server container before applications are registered.
-- ------------------------------
procedure Configure_Server (Command : in out Command_Type;
Context : in out Context_Type) is
Config : Servlet.Server.Configuration;
begin
-- If daemon(3) is available and -d is defined, run it so that the parent
-- process terminates and the child process continues.
if Command.Daemon and Sys_Daemon'Address /= System.Null_Address then
declare
Result : constant Integer := Sys_Daemon (1, 0);
begin
if Result /= 0 then
Context.Console.Error ("Cannot run in background");
end if;
end;
end if;
Config.Listening_Port := Command.Listening_Port;
Config.Max_Connection := Command.Max_Connection;
Config.TCP_No_Delay := Command.TCP_No_Delay;
if Command.Upload'Length > 0 then
Config.Upload_Directory := To_Unbounded_String (Command.Upload.all);
end if;
Command_Drivers.WS.Configure (Config);
end Configure_Server;
-- ------------------------------
-- Configure all registered applications.
-- ------------------------------
procedure Configure_Applications (Command : in out Command_Type;
Context : in out Context_Type) is
pragma Unreferenced (Command);
procedure Configure (URI : in String;
Application : in Servlet.Core.Servlet_Registry_Access);
Count : Natural := 0;
procedure Configure (URI : in String;
Application : in Servlet.Core.Servlet_Registry_Access) is
begin
if Application.all in ASF.Applications.Main.Application'Class then
Configure (ASF.Applications.Main.Application'Class (Application.all),
URI (URI'First + 1 .. URI'Last),
Context);
Count := Count + 1;
end if;
end Configure;
begin
Command_Drivers.WS.Iterate (Configure'Access);
if Count = 0 then
Context.Console.Error (-("There is no application"));
return;
end if;
end Configure_Applications;
-- ------------------------------
-- Start the web server.
-- ------------------------------
procedure Start_Server (Command : in out Command_Type;
Context : in out Context_Type) is
pragma Unreferenced (Command);
begin
Context.Console.Notice (N_INFO, "Starting...");
Command_Drivers.WS.Start;
end Start_Server;
-- ------------------------------
-- Wait for the server to shutdown.
-- ------------------------------
procedure Wait_Server (Command : in out Command_Type;
Context : in out Context_Type) is
pragma Unreferenced (Context);
procedure Shutdown (URI : in String;
Application : in Servlet.Core.Servlet_Registry_Access);
procedure Shutdown (URI : in String;
Application : in Servlet.Core.Servlet_Registry_Access) is
pragma Unreferenced (URI);
begin
if Application.all in AWA.Applications.Application'Class then
AWA.Applications.Application'Class (Application.all).Close;
end if;
end Shutdown;
Address : GNAT.Sockets.Sock_Addr_Type;
Listen : GNAT.Sockets.Socket_Type;
Socket : GNAT.Sockets.Socket_Type;
begin
GNAT.Sockets.Create_Socket (Listen);
Address.Addr := GNAT.Sockets.Loopback_Inet_Addr;
if Command.Management_Port > 0 then
Address.Port := Port_Type (Command.Management_Port);
else
Address.Port := 0;
end if;
GNAT.Sockets.Bind_Socket (Listen, Address);
GNAT.Sockets.Listen_Socket (Listen);
loop
GNAT.Sockets.Accept_Socket (Listen, Socket, Address);
exit;
end loop;
GNAT.Sockets.Close_Socket (Socket);
GNAT.Sockets.Close_Socket (Listen);
Command_Drivers.WS.Iterate (Shutdown'Access);
end Wait_Server;
-- ------------------------------
-- Setup the command before parsing the arguments and executing it.
-- ------------------------------
overriding
procedure Setup (Command : in out Command_Type;
Config : in out GNAT.Command_Line.Command_Line_Configuration;
Context : in out Context_Type) is
begin
GC.Set_Usage (Config => Config,
Usage => Command.Get_Name & " [arguments]",
Help => Command.Get_Description);
GC.Define_Switch (Config => Config,
Output => Command.Management_Port'Access,
Switch => "-m:",
Long_Switch => "--management-port=",
Initial => Command.Management_Port,
Argument => "NUMBER",
Help => -("The server listening management port on localhost"));
GC.Define_Switch (Config => Config,
Output => Command.Listening_Port'Access,
Switch => "-p:",
Long_Switch => "--port=",
Initial => Command.Listening_Port,
Argument => "NUMBER",
Help => -("The server listening port"));
GC.Define_Switch (Config => Config,
Output => Command.Max_Connection'Access,
Switch => "-C:",
Long_Switch => "--connection=",
Initial => Command.Max_Connection,
Argument => "NUMBER",
Help => -("The number of connections handled"));
GC.Define_Switch (Config => Config,
Output => Command.Upload'Access,
Switch => "-u:",
Long_Switch => "--upload=",
Argument => "PATH",
Help => -("The server upload directory"));
GC.Define_Switch (Config => Config,
Output => Command.TCP_No_Delay'Access,
Switch => "-n",
Long_Switch => "--tcp-no-delay",
Help => -("Enable the TCP no delay option"));
if Sys_Daemon'Address /= System.Null_Address then
GC.Define_Switch (Config => Config,
Output => Command.Daemon'Access,
Switch => "-d",
Long_Switch => "--daemon",
Help => -("Run the server in the background"));
end if;
AWA.Commands.Setup_Command (Config, Context);
end Setup;
-- ------------------------------
-- Write the help associated with the command.
-- ------------------------------
overriding
procedure Help (Command : in out Command_Type;
Name : in String;
Context : in out Context_Type) is
pragma Unreferenced (Command, Context);
begin
null;
end Help;
begin
Command_Drivers.Driver.Add_Command ("start",
-("start the web server"),
Command'Access);
end AWA.Commands.Start;
|
with Greetings;
procedure Gmain is
begin
Greetings.Hello;
Greetings.Goodbye;
end Gmain;
|
-- RUN: %llvmgcc -S %s
with System.Machine_Code;
procedure Asm is
begin
System.Machine_Code.Asm ("");
end;
|
--
-- 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;
|
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- S P A R K _ X R E F S --
-- --
-- S p e c --
-- --
-- Copyright (C) 2011-2020, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING3. If not, go to --
-- http://www.gnu.org/licenses for a complete copy of the license. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- This package defines data structures used to expose frontend
-- cross-references to the SPARK backend.
with Types; use Types;
package SPARK_Xrefs is
type SPARK_Xref_Record is record
Entity : Entity_Id;
-- Referenced entity
Ref_Scope : Entity_Id;
-- Scope where the reference occurs
Rtype : Character;
-- Indicates type of the reference, using code used in ALI file:
-- r = reference
-- m = modification
-- s = call
end record;
-- This type holds a subset of the frontend xref entry that is needed by
-- the SPARK backend.
---------------
-- Constants --
---------------
Name_Of_Heap_Variable : constant String := "__HEAP";
-- Name of special variable used in effects to denote reads and writes
-- through explicit dereference.
Heap : Entity_Id := Empty;
-- A special entity which denotes the heap object; it should be considered
-- constant, but needs to be variable, because it can only be initialized
-- after the node tables are created.
-----------------
-- Subprograms --
-----------------
procedure dspark;
-- Debug routine to dump internal SPARK cross-reference tables. This is a
-- raw format dump showing exactly what the tables contain.
end SPARK_Xrefs;
|
-- CD2B11A.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 IF A COLLECTION SIZE SPECIFICATION CAN BE GIVEN FOR AN
-- ACCESS TYPE, THEN OPERATIONS ON VALUES OF THE ACCESS TYPE ARE NOT
-- AFFECTED.
-- HISTORY:
-- BCB 11/01/88 CREATED ORIGINAL TEST.
-- RJW 05/17/89 CHANGED FROM '.DEP' TEST TO '.ADA' TEST.
-- ADDED CHECK FOR UNCHECKED_DEALLOCATION.
WITH REPORT; USE REPORT;
WITH SYSTEM;
WITH UNCHECKED_DEALLOCATION;
PROCEDURE CD2B11A IS
BASIC_SIZE : CONSTANT := 1024;
TYPE MAINTYPE IS ARRAY (INTEGER RANGE <>) OF INTEGER;
TYPE ACC_TYPE IS ACCESS MAINTYPE;
SUBTYPE ACC_RANGE IS ACC_TYPE (1 .. 3);
FOR ACC_TYPE'STORAGE_SIZE USE BASIC_SIZE;
TYPE RECORD_TYPE IS RECORD
COMP : ACC_TYPE;
END RECORD;
CHECK_TYPE1 : ACC_TYPE;
CHECK_TYPE2 : ACC_TYPE;
CHECK_TYPE3 : ACC_TYPE(1..3);
CHECK_ARRAY : ARRAY (1..2) OF ACC_TYPE;
CHECK_RECORD1 : RECORD_TYPE;
CHECK_RECORD2 : RECORD_TYPE;
CHECK_PARAM1 : ACC_TYPE;
CHECK_PARAM2 : ACC_TYPE;
CHECK_NULL : ACC_TYPE := NULL;
PROCEDURE PROC (ACC1,ACC2 : IN OUT ACC_TYPE) IS
BEGIN
IF (ACC1.ALL /= ACC2.ALL) THEN
FAILED ("INCORRECT VALUES FOR DESIGNATED OBJECTS " &
"- 1");
END IF;
IF EQUAL (3,3) THEN
ACC2 := ACC1;
END IF;
IF ACC2 /= ACC1 THEN
FAILED ("INCORRECT RESULTS FOR RELATIONAL OPERATORS " &
"-1");
END IF;
IF (ACC1 IN ACC_RANGE) THEN
FAILED ("INCORRECT RESULTS FOR MEMBERSHIP TEST - 1");
END IF;
END PROC;
BEGIN
TEST ("CD2B11A", "CHECK THAT IF A COLLECTION SIZE SPECIFICATION " &
"CAN BE GIVEN FOR AN ACCESS TYPE, THEN " &
"OPERATIONS ON VALUES OF THE ACCESS TYPE ARE " &
"NOT AFFECTED");
CHECK_PARAM1 := NEW MAINTYPE'(25,35,45);
CHECK_PARAM2 := NEW MAINTYPE'(25,35,45);
PROC (CHECK_PARAM1,CHECK_PARAM2);
IF ACC_TYPE'STORAGE_SIZE < BASIC_SIZE THEN
FAILED ("INCORRECT VALUE FOR ACCESS TYPE STORAGE_SIZE");
END IF;
CHECK_TYPE1 := NEW MAINTYPE'(25,35,45);
CHECK_TYPE2 := NEW MAINTYPE'(25,35,45);
CHECK_TYPE3 := NEW MAINTYPE'(1 => 1,2 => 2,3 => 3);
CHECK_ARRAY (1) := NEW MAINTYPE'(25,35,45);
CHECK_ARRAY (2) := NEW MAINTYPE'(25,35,45);
CHECK_RECORD1.COMP := NEW MAINTYPE'(25,35,45);
CHECK_RECORD2.COMP := NEW MAINTYPE'(25,35,45);
IF (CHECK_TYPE1.ALL /= CHECK_TYPE2.ALL) THEN
FAILED ("INCORRECT VALUES FOR DESIGNATED OBJECTS - 2");
END IF;
IF EQUAL (3,3) THEN
CHECK_TYPE2 := CHECK_TYPE1;
END IF;
IF CHECK_TYPE2 /= CHECK_TYPE1 THEN
FAILED ("INCORRECT RESULTS FOR RELATIONAL OPERATORS - 2");
END IF;
IF (CHECK_TYPE1 IN ACC_RANGE) THEN
FAILED ("INCORRECT RESULTS FOR MEMBERSHIP TEST - 2");
END IF;
IF (CHECK_ARRAY (1).ALL /= CHECK_ARRAY (2).ALL) THEN
FAILED ("INCORRECT VALUES FOR DESIGNATED OBJECTS - 3");
END IF;
IF EQUAL (3,3) THEN
CHECK_ARRAY (2) := CHECK_ARRAY (1);
END IF;
IF CHECK_ARRAY (2) /= CHECK_ARRAY (1) THEN
FAILED ("INCORRECT RESULTS FOR RELATIONAL OPERATORS - 3");
END IF;
IF (CHECK_ARRAY (1) IN ACC_RANGE) THEN
FAILED ("INCORRECT RESULTS FOR MEMBERSHIP TEST - 3");
END IF;
IF (CHECK_RECORD1.COMP.ALL /= CHECK_RECORD2.COMP.ALL) THEN
FAILED ("INCORRECT VALUES FOR DESIGNATED OBJECTS - 4");
END IF;
IF EQUAL (3,3) THEN
CHECK_RECORD2 := CHECK_RECORD1;
END IF;
IF CHECK_RECORD2 /= CHECK_RECORD1 THEN
FAILED ("INCORRECT RESULTS FOR RELATIONAL OPERATORS - 4");
END IF;
IF (CHECK_RECORD1.COMP IN ACC_RANGE) THEN
FAILED ("INCORRECT RESULTS FOR MEMBERSHIP TEST - 4");
END IF;
IF CHECK_TYPE3'FIRST /= IDENT_INT (1) THEN
FAILED ("INCORRECT VALUE FOR CHECK_TYPE3'FIRST");
END IF;
IF CHECK_TYPE3'LAST /= IDENT_INT (3) THEN
FAILED ("INCORRECT VALUE FOR CHECK_TYPE3'LAST");
END IF;
DECLARE
TYPE ACC_CHAR IS ACCESS CHARACTER;
FOR ACC_CHAR'STORAGE_SIZE USE 128;
LIMIT : INTEGER :=
(ACC_CHAR'STORAGE_SIZE * SYSTEM.STORAGE_UNIT)/CHARACTER'SIZE;
ACC_ARRAY : ARRAY (1 .. LIMIT + 1) OF ACC_CHAR;
PLACE : INTEGER;
PROCEDURE FREE IS
NEW UNCHECKED_DEALLOCATION (CHARACTER, ACC_CHAR);
BEGIN
FOR I IN ACC_ARRAY'RANGE LOOP
ACC_ARRAY (IDENT_INT (I)) :=
NEW CHARACTER'
(IDENT_CHAR ((CHARACTER'VAL (I MOD 128))));
PLACE := I;
END LOOP;
FAILED ("NO EXCEPTION RAISED WHEN COLLECTION SIZE EXCEEDED");
EXCEPTION
WHEN STORAGE_ERROR =>
BEGIN
FOR I IN 1 .. PLACE LOOP
IF I MOD 2 = 0 THEN
FREE (ACC_ARRAY (IDENT_INT (I)));
END IF;
END LOOP;
FOR I IN 1 .. PLACE LOOP
IF I MOD 2 = 1 AND THEN
IDENT_CHAR (ACC_ARRAY (I).ALL) /=
CHARACTER'VAL (I MOD IDENT_INT (128)) THEN
FAILED ("INCORRECT VALUE IN ARRAY");
END IF;
END LOOP;
END;
WHEN OTHERS =>
FAILED ("WRONG EXCEPTION RAISED");
END;
RESULT;
END CD2B11A;
|
pragma Ada_2012;
with Ada.Streams; use Ada.Streams;
with Base64_Generic;
with Base64.Routines.Streams; use Base64.Routines.Streams;
package Base64.URLSafe is new Base64_Generic
(Element => Stream_Element, Index => Stream_Element_Offset,
Element_Array => Stream_Element_Array,
Character_To_Value => URLSafe_Character_To_Value,
Value_To_Character => URLSafe_Value_To_Character, Padding => '=');
|
generic
package any_Math.any_Algebra.any_linear.any_d2
is
pragma Pure;
-----------
-- Vector_2
--
function Interpolated (From, To : in Vector_2; Percent : in Percentage) return Vector_2;
function Distance (From, To : in Vector_2) return Real;
function Midpoint (From, To : in Vector_2) return Vector_2;
function Angle_between_pre_Norm (U, V : in Vector_2) return Radians;
--
-- Given that the vectors 'U' and 'V' are already normalized, returns a positive angle between 0 and 180 degrees.
-------------
-- Matrix_2x2
--
function to_Matrix (Row_1,
Row_2 : in Vector_2) return Matrix_2x2;
function to_rotation_Matrix (Angle : in Radians) return Matrix_2x2;
function up_Direction (Self : in Matrix_2x2) return Vector_2;
function right_Direction (Self : in Matrix_2x2) return Vector_2;
------------
-- Transform
--
function to_Transform (Rotation : in Matrix_2x2;
Translation : in Vector_2) return Matrix_3x3;
function to_Transform (From : in Transform_2d) return Matrix_3x3;
function to_translation_Transform (Translation : in Vector_2) return Matrix_3x3;
function to_rotation_Transform (Rotation : in Matrix_2x2) return Matrix_3x3;
function to_rotation_Transform (Angle : in Radians ) return Matrix_3x3;
function to_scale_Transform (Scale : in Vector_2) return Matrix_3x3;
function to_Transform_2d (From : in Matrix_3x3) return Transform_2d;
function to_Transform_2d (Rotation : in Radians;
Translation : in Vector_2) return Transform_2d;
function "*" (Left : in Vector_2; Right : in Transform_2d) return Vector_2;
function "*" (Left : in Vector_2; Right : in Matrix_3x3) return Vector_2;
function Invert (Transform : in Transform_2d) return Transform_2d;
function inverse_Transform (Transform : in Transform_2d; Vector : in Vector_2) return Vector_2;
function get_Rotation (Transform : in Matrix_3x3) return Matrix_2x2;
procedure set_Rotation (Transform : in out Matrix_3x3; To : in Matrix_2x2);
function get_Translation (Transform : in Matrix_3x3) return Vector_2;
procedure set_Translation (Transform : in out Matrix_3x3; To : in Vector_2);
end any_Math.any_Algebra.any_linear.any_d2;
|
with ACO.OD_Types.Entries;
with Ada.Tags;
with Interfaces;
package body ACO.OD is
use ACO.OD_Types.Entries;
use Interfaces;
function Object
(This : Object_Dictionary'Class;
Index : Object_Index)
return Object_Ref
is
(This.Objects (This.Index_Map (Index)));
function Object_Exist
(This : Object_Dictionary'Class;
Index : Object_Index) return Boolean
is (This.Index_Map (Index) /= No_Index);
function Entry_Exist
(This : Object_Dictionary'Class;
Index : Object_Index;
Subindex : Object_Subindex) return Boolean
is
Arr_Idx : constant Index_Type := This.Index_Map (Index);
begin
return Arr_Idx /= No_Index and then
Subindex in This.Objects (Arr_Idx).Entries'Range;
end Entry_Exist;
function Maximum_Nof_Entries
(This : Object_Dictionary;
Index : Object_Index)
return Natural
is (This.Object (Index).Entries'Length);
function Is_Entry_Compatible
(This : Object_Dictionary;
An_Entry : Entry_Base'Class;
Index : Object_Index;
Subindex : Object_Subindex)
return Boolean
is
use type Ada.Tags.Tag;
OD_Entry : constant Entry_Ref := This.Object (Index).Entries (Subindex);
begin
return OD_Entry'Tag = An_Entry'Tag;
end Is_Entry_Compatible;
function Is_Entry_Writable
(This : Object_Dictionary;
Index : Entry_Index)
return Boolean
is
begin
if This.Entry_Exist (Index.Object, Index.Sub) then
return This.Object (Index.Object).Entries (Index.Sub).Is_Writable;
else
return False;
end if;
end Is_Entry_Writable;
function Is_Entry_Readable
(This : Object_Dictionary;
Index : Entry_Index)
return Boolean
is
begin
if This.Entry_Exist (Index.Object, Index.Sub) then
return This.Object (Index.Object).Entries (Index.Sub).Is_Readable;
else
return False;
end if;
end Is_Entry_Readable;
function Get_Entry
(This : Object_Dictionary;
Index : Object_Index;
Subindex : Object_Subindex) return Entry_Base'Class
is
(This.Object (Index).Entries (Subindex).all);
procedure Set_Entry
(This : in out Object_Dictionary;
New_Entry : in Entry_Base'Class;
Index : in Object_Index;
Subindex : in Object_Subindex;
Silently : in Boolean := False)
is
begin
This.Object (Index).Entries (Subindex).all := New_Entry;
if not Silently then
This.Events.Node_Events.Put
((Event => ACO.Events.OD_Entry_Update,
Index => (Index, Subindex)));
end if;
end Set_Entry;
procedure Set_Node_State
(This : in out Object_Dictionary;
Node_State : in ACO.States.State)
is
Prev : ACO.States.State;
begin
Prev := This.Node_State;
This.Node_State := Node_State;
This.Events.Node_Events.Put
((Event => ACO.Events.State_Transition,
State => (Previous => Prev, Current => Node_State)));
end Set_Node_State;
function Get_Node_State (This : Object_Dictionary) return ACO.States.State is
(This.Node_State);
function Get_Hbt_Node_Id (Reg : U32) return ACO.Messages.Node_Nr is
(ACO.Messages.Node_Nr (Shift_Right (Reg, 16) and 16#FF#));
function Get_Hbt_Slave_Subindex
(This : Object_Dictionary;
Node_Id : ACO.Messages.Node_Nr)
return Object_Subindex
is
Object : constant Object_Ref := This.Object (Heartbeat_Consumer_Index);
begin
for I in 1 .. Object.Entries'Last loop
declare
E_Ref : constant Entry_Ref := Object.Entries (I);
Reg : constant U32 := Entry_U32 (E_Ref.all).Read;
use type ACO.Messages.Node_Nr;
begin
if Get_Hbt_Node_Id (Reg) = Node_Id then
return Object_Subindex (I);
end if;
end;
end loop;
return 0; -- First entry is always max subindex, not slave data
end Get_Hbt_Slave_Subindex;
procedure Set_Heartbeat_Consumer_Period
(This : in out Object_Dictionary;
Node_Id : in ACO.Messages.Node_Nr;
Period : in Natural)
is
function Set_Hbt_Period (Reg : U32; Period : Natural) return U32 is
((Reg and 16#FFFF0000#) or (U32 (Period) and 16#FFFF#));
Subindex : Object_Subindex;
E : Entry_U32;
begin
Subindex := This.Get_Hbt_Slave_Subindex (Node_Id);
if This.Entry_Exist (Heartbeat_Consumer_Index, Subindex) then
E := Entry_U32 (This.Get_Entry (Heartbeat_Consumer_Index, Subindex));
E.Write (Set_Hbt_Period (E.Read, Period));
This.Set_Entry (E, Heartbeat_Consumer_Index, Subindex);
end if;
end Set_Heartbeat_Consumer_Period;
function Get_Heartbeat_Consumer_Period
(This : Object_Dictionary;
Node_Id : ACO.Messages.Node_Nr)
return Natural
is
function Get_Hbt_Period (Reg : U32) return Natural is
(Natural (Reg and 16#FFFF#));
Subindex : Object_Subindex;
Reg : U32;
begin
Subindex := This.Get_Hbt_Slave_Subindex (Node_Id);
if This.Entry_Exist (Heartbeat_Consumer_Index, Subindex) then
Reg := Entry_U32 (This.Get_Entry (Heartbeat_Consumer_Index, Subindex)).Read;
return Get_Hbt_Period (Reg);
else
return 0;
end if;
end Get_Heartbeat_Consumer_Period;
procedure Set_Heartbeat_Producer_Period
(This : in out Object_Dictionary;
Period : in Natural)
is
E : Entry_U16;
begin
E.Write (U16 (Period));
This.Set_Entry (E, Heartbeat_Producer_Index, 0);
end Set_Heartbeat_Producer_Period;
function Get_Heartbeat_Producer_Period
(This : Object_Dictionary)
return Natural
is
Period : U16;
begin
if This.Entry_Exist (Heartbeat_Producer_Index, 0) then
Period := Entry_U16 (This.Get_Entry (Heartbeat_Producer_Index, 0)).Read;
return Natural (Period);
else
return 0;
end if;
end Get_Heartbeat_Producer_Period;
procedure Set_Communication_Cycle_Period
(This : in out Object_Dictionary;
Period_Ms : in Natural)
is
Period_s : constant Float := Float(Period_Ms)/1000.0;
E : Entry_Dur;
begin
E.Write (Dur (Duration(Period_s)));
This.Set_Entry (E, Comm_Cycle_Period_Index, 0);
end Set_Communication_Cycle_Period;
procedure Set_Communication_Cycle_Period
(This : in out Object_Dictionary;
Period_Dur : in Duration)
is
E : Entry_Dur;
begin
E.Write (Dur (Period_Dur));
This.Set_Entry (E, Comm_Cycle_Period_Index, 0);
end Set_Communication_Cycle_Period;
function Get_Communication_Cycle_Period
(This : Object_Dictionary)
return Natural
is
Period : Dur;
begin
Period := Entry_Dur (This.Get_Entry (Comm_Cycle_Period_Index, 0)).Read;
return Natural (Period);
end Get_Communication_Cycle_Period;
function Get_Communication_Cycle_Period
(This : Object_Dictionary)
return Duration
is
Stored_Dur : Dur;
Period_Dur : Duration;
begin
Stored_Dur := Entry_Dur(This.Get_Entry (Comm_Cycle_Period_Index, 0)).Read;
Period_Dur := Duration(Stored_Dur);
return Period_Dur;
end Get_Communication_Cycle_Period;
procedure Set_Sync_Counter_Overflow
(This : in out Object_Dictionary;
Period : in Natural)
is
E : Entry_U8;
begin
E.Write (U8 (Period));
This.Set_Entry (E, Sync_Counter_Overflow_Index, 0);
end Set_Sync_Counter_Overflow;
function Get_Sync_Counter_Overflow
(This : Object_Dictionary)
return Natural
is
Period : U8;
begin
Period := Entry_U8 (This.Get_Entry (Sync_Counter_Overflow_Index, 0)).Read;
return Natural (Period);
end Get_Sync_Counter_Overflow;
function Get_SDO_Server_Parameters
(This : Object_Dictionary)
return ACO.SDO_Sessions.SDO_Parameter_Array
is
J : Object_Index := SDO_Server_Base_Index;
begin
while This.Object_Exist (J) loop
J := J + 1;
end loop;
declare
use ACO.Messages, ACO.SDO_Sessions;
Result : SDO_Parameter_Array (0 .. Natural (J - SDO_Server_Base_Index) - 1);
begin
J := SDO_Server_Base_Index;
for I in Result'Range loop
Result (I) :=
(CAN_Id_C2S =>
Id_Type (Entry_U32 (This.Get_Entry (J, 1)).Read and 16#7FF#),
CAN_Id_S2C =>
Id_Type (Entry_U32 (This.Get_Entry (J, 2)).Read and 16#7FF#),
Node =>
Node_Nr (Entry_U8 (This.Get_Entry (J, 3)).Read and 16#7F#));
J := J + 1;
end loop;
return Result;
end;
end Get_SDO_Server_Parameters;
function Get_SDO_Client_Parameters
(This : Object_Dictionary)
return ACO.SDO_Sessions.SDO_Parameter_Array
is
J : Object_Index := SDO_Client_Base_Index;
begin
while This.Object_Exist (J) loop
J := J + 1;
end loop;
declare
use ACO.Messages, ACO.SDO_Sessions;
Result : SDO_Parameter_Array (0 .. Natural (J - SDO_Client_Base_Index) - 1);
begin
J := SDO_Client_Base_Index;
for I in Result'Range loop
Result (I) :=
(CAN_Id_C2S =>
Id_Type (Entry_U32 (This.Get_Entry (J, 1)).Read and 16#7FF#),
CAN_Id_S2C =>
Id_Type (Entry_U32 (This.Get_Entry (J, 2)).Read and 16#7FF#),
Node =>
Node_Nr (Entry_U8 (This.Get_Entry (J, 3)).Read and 16#7F#));
J := J + 1;
end loop;
return Result;
end;
end Get_SDO_Client_Parameters;
end ACO.OD;
|
for Step in Loop_Steps loop
put(Step, 0);
put(", ");
end loop;
put("who do we appreciate?");
|
-- Ada regular expression library
-- (c) Kristian Klomsten Skordal 2020 <kristian.skordal@wafflemail.net>
-- Report bugs and issues on <https://github.com/skordal/ada-regex>
with Ada.Strings.Unbounded;
with Regex.State_Machines; use Regex.State_Machines;
package body Regex.Matchers is
function Matches (Input : in Regular_Expression; Query : in String; Match_Id : out Natural) return Boolean is
Current_State : State_Machine_State_Access := Input.Get_Start_State;
begin
for Symbol of Query loop
declare
Transition_Found : Boolean := False;
begin
Find_Transition : for Transition of Current_State.Transitions loop
case Transition.Transition_On.Symbol_Type is
when Single_Character =>
if Transition.Transition_On.Char = Symbol then
Current_State := Transition.Target_State;
Transition_Found := True;
end if;
when Any_Character =>
Current_State := Transition.Target_State;
Transition_Found := True;
end case;
exit Find_Transition when Transition_Found;
end loop Find_Transition;
if not Transition_Found then
return False;
end if;
end;
end loop;
if Current_State.Accepting then
Match_Id := Current_State.Acceptance_Id;
end if;
return Current_State.Accepting;
end Matches;
function Matches (Input : in Regular_Expression; Query : in String) return Boolean is
Id : Natural;
begin
return Matches (Input, Query, Id);
end Matches;
function Get_Match (Input : in Regular_Expression; Query : in String; Complete_Match : out Boolean) return String
is
package Unbounded renames Ada.Strings.Unbounded;
use type Unbounded.Unbounded_String;
Current_State : State_Machine_State_Access := Input.Get_Start_State;
Match : Unbounded.Unbounded_String := Unbounded.Null_Unbounded_String;
begin
for Symbol of Query loop
declare
Transition_Found : Boolean := False;
begin
Find_Transition : for Transition of Current_State.Transitions loop
case Transition.Transition_On.Symbol_Type is
when Single_Character =>
if Transition.Transition_On.Char = Symbol then
Match := Match & Symbol;
Current_State := Transition.Target_State;
Transition_Found := True;
end if;
when Any_Character =>
Match := Match & Symbol;
Transition_Found := True;
end case;
exit Find_Transition when Transition_Found;
end loop Find_Transition;
exit when not Transition_Found;
end;
end loop;
Complete_Match := Current_State.Accepting;
return Unbounded.To_String (Match);
end Get_Match;
end Regex.Matchers;
|
with Ahven.Framework;
package math_Tests.Geometry_2d
is
type Test is new Ahven.Framework.Test_Case with null record;
overriding procedure Initialize (T : in out Test);
end math_Tests.Geometry_2d;
|
with Ada.Text_IO;
with Hailstones;
procedure Main is
package Integer_IO is new Ada.Text_IO.Integer_IO (Integer);
procedure Print_Sequence (X : Hailstones.Integer_Sequence) is
begin
for I in X'Range loop
Integer_IO.Put (Item => X (I), Width => 0);
if I < X'Last then
Ada.Text_IO.Put (", ");
end if;
end loop;
Ada.Text_IO.New_Line;
end Print_Sequence;
Hailstone_27 : constant Hailstones.Integer_Sequence :=
Hailstones.Create_Sequence (N => 27);
begin
Ada.Text_IO.Put_Line ("Length of 27:" & Integer'Image (Hailstone_27'Length));
Ada.Text_IO.Put ("First four: ");
Print_Sequence (Hailstone_27 (Hailstone_27'First .. Hailstone_27'First + 3));
Ada.Text_IO.Put ("Last four: ");
Print_Sequence (Hailstone_27 (Hailstone_27'Last - 3 .. Hailstone_27'Last));
declare
Longest_Length : Natural := 0;
Longest_N : Positive;
Length : Natural;
begin
for I in 1 .. 99_999 loop
Length := Hailstones.Create_Sequence (N => I)'Length;
if Length > Longest_Length then
Longest_Length := Length;
Longest_N := I;
end if;
end loop;
Ada.Text_IO.Put_Line ("Longest length is" & Integer'Image (Longest_Length));
Ada.Text_IO.Put_Line ("with N =" & Integer'Image (Longest_N));
end;
end Main;
|
-- CD2A53A.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 WHEN SIZE AND SMALL SPECIFICATIONS ARE GIVEN FOR A
-- FIXED POINT TYPE, THEN OPERATIONS ON VALUES OF SUCH A TYPE ARE
-- NOT AFFECTED BY THE REPRESENTATION CLAUSE.
-- APPLICABILITY CRITERIA:
-- All implementations must attempt to compile this test.
--
-- For implementations validating against Systems Programming Annex (C)
-- and which support decimal small values:
-- The test must compile, bind, execute, report PASSED, and
-- complete normally.
--
-- For other implementations:
-- This test may produce at least one error message at compilation,
-- and the error message is associated with one of the items marked:
-- -- N/A => ERROR.
-- The test will be recorded as Not_Applicable.
-- Otherwise, the test must execute and report PASSED.
--
-- All other behaviors are FAILING.
--
-- HISTORY:
-- BCB 08/24/87 CREATED ORIGINAL TEST.
-- DHH 04/12/89 CHANGED EXTENSION FROM '.DEP' TO '.ADA', CHANGED
-- OPERATORS ON 'SIZE TESTS, AND CHANGED 'SIZE CLAUSE
-- SO THAT IT IS NOT A POWER OF TWO.
-- WMC 04/01/92 ELIMINATED TEST REDUNDANCIES.
-- RLB 11/24/98 Added Ada 95 applicability criteria.
WITH REPORT; USE REPORT;
PROCEDURE CD2A53A IS
BASIC_SIZE : CONSTANT := 15;
BASIC_SMALL : CONSTANT := 0.01;
ZERO : CONSTANT := 0.0;
TYPE CHECK_TYPE IS DELTA 1.0 RANGE -4.0 .. 4.0;
FOR CHECK_TYPE'SMALL USE BASIC_SMALL; -- N/A => ERROR.
FOR CHECK_TYPE'SIZE USE BASIC_SIZE; -- N/A => ERROR.
CNEG1 : CHECK_TYPE := -2.7;
CNEG2 : CHECK_TYPE := CHECK_TYPE (-1.0/3.0);
CPOS1 : CHECK_TYPE := CHECK_TYPE (4.0/6.0);
CPOS2 : CHECK_TYPE := 2.7;
CZERO : CHECK_TYPE;
TYPE ARRAY_TYPE IS ARRAY (0 .. 3) OF CHECK_TYPE;
CHARRAY : ARRAY_TYPE :=
(-2.7, CHECK_TYPE (-1.0/3.0), CHECK_TYPE (4.0/6.0), 2.7);
TYPE REC_TYPE IS RECORD
COMPF : CHECK_TYPE := -2.7;
COMPN : CHECK_TYPE := CHECK_TYPE (-1.0/3.0);
COMPP : CHECK_TYPE := CHECK_TYPE (4.0/6.0);
COMPL : CHECK_TYPE := 2.7;
END RECORD;
CHREC : REC_TYPE;
FUNCTION IDENT (FX : CHECK_TYPE) RETURN CHECK_TYPE IS
BEGIN
IF EQUAL (3, 3) THEN
RETURN FX;
ELSE
RETURN 0.0;
END IF;
END IDENT;
PROCEDURE PROC (CN1IN, CP1IN : CHECK_TYPE;
CN2INOUT,CP2INOUT : IN OUT CHECK_TYPE;
CZOUT : OUT CHECK_TYPE) IS
BEGIN
IF IDENT (CN1IN) + CP1IN NOT IN -2.04 .. -2.03 OR
CP2INOUT - IDENT (CP1IN) NOT IN 2.03 .. 2.04 THEN
FAILED ("INCORRECT RESULTS FOR " &
"BINARY ADDING OPERATORS - 1");
END IF;
IF CHECK_TYPE (CN1IN * IDENT (CP1IN)) NOT IN
-1.81 .. -1.78 OR
CHECK_TYPE (IDENT (CN2INOUT) / CP2INOUT) NOT IN
-0.13 .. -0.12 THEN
FAILED ("INCORRECT RESULTS FOR " &
"MULTIPLYING OPERATORS - 1");
END IF;
IF IDENT (CP1IN) NOT IN 0.66 .. 0.670 OR
CN2INOUT IN -0.32 .. 0.0 OR
IDENT (CN2INOUT) IN -1.0 .. -0.35 THEN
FAILED ("INCORRECT RESULTS FOR MEMBERSHIP " &
"OPERATORS - 1");
END IF;
CZOUT := 0.0;
END PROC;
BEGIN
TEST ("CD2A53A", "CHECK THAT WHEN SIZE AND SMALL SPECIFICATIONS " &
"ARE GIVEN FOR A FIXED POINT TYPE, THEN " &
"OPERATIONS ON VALUES OF SUCH A TYPE ARE NOT " &
"AFFECTED BY THE REPRESENTATION CLAUSE");
PROC (CNEG1, CPOS1, CNEG2, CPOS2, CZERO);
IF CNEG1'SIZE < IDENT_INT(BASIC_SIZE) THEN
FAILED ("INCORRECT VALUE FOR CNEG1'SIZE");
END IF;
IF IDENT (CZERO) /= ZERO THEN
FAILED ("INCORRECT VALUE FOR OUT PARAMETER");
END IF;
IF CHECK_TYPE'FIRST > IDENT (-3.99) THEN
FAILED ("INCORRECT VALUE FOR CHECK_TYPE'FIRST");
END IF;
IF CHECK_TYPE'SIZE /= IDENT_INT (BASIC_SIZE) THEN
FAILED ("INCORRECT VALUE FOR CHECK_TYPE'SIZE");
END IF;
IF CHECK_TYPE'SMALL /= BASIC_SMALL THEN
FAILED ("INCORRECT VALUE FOR CHECK_TYPE'SMALL");
END IF;
IF CHECK_TYPE'FORE /= 2 THEN
FAILED ("INCORRECT VALUE FOR CHECK_TYPE'FORE");
END IF;
IF +IDENT (CNEG2) NOT IN -0.34 .. -0.33 OR
IDENT (-CPOS1) NOT IN -0.67 .. -0.66 THEN
FAILED ("INCORRECT RESULTS FOR UNARY ADDING OPERATORS - 2");
END IF;
IF ABS IDENT (CNEG2) NOT IN 0.33 .. 0.34 OR
IDENT (ABS CPOS1) NOT IN 0.66 .. 0.670 THEN
FAILED ("INCORRECT RESULTS FOR ABSOLUTE VALUE " &
"OPERATORS - 2");
END IF;
IF CHARRAY(1)'SIZE < IDENT_INT (BASIC_SIZE) THEN
FAILED ("INCORRECT VALUE FOR CHARRAY(1)'SIZE");
END IF;
IF IDENT (CHARRAY (0)) + CHARRAY (2) NOT IN
-2.04 .. -2.03 OR
CHARRAY (3) - IDENT (CHARRAY (2)) NOT IN
2.03 .. 2.04 THEN
FAILED ("INCORRECT RESULTS FOR BINARY ADDING OPERATORS - 3");
END IF;
IF CHECK_TYPE (CHARRAY (0) * IDENT (CHARRAY (2))) NOT IN
-1.81 .. -1.78 OR
CHECK_TYPE (IDENT (CHARRAY (1)) / CHARRAY (3)) NOT IN
-0.13 .. -0.12 THEN
FAILED ("INCORRECT RESULTS FOR MULTIPLYING OPERATORS - 3");
END IF;
IF IDENT (CHARRAY (2)) NOT IN 0.66 .. 0.670 OR
CHARRAY (1) IN -0.32 .. 0.0 OR
IDENT (CHARRAY (1)) IN -1.0 .. -0.35 THEN
FAILED ("INCORRECT RESULTS FOR MEMBERSHIP " &
"OPERATORS - 3");
END IF;
IF CHREC.COMPP'SIZE < IDENT_INT (BASIC_SIZE) THEN
FAILED ("INCORRECT VALUE FOR CHREC.COMPP'SIZE");
END IF;
IF +IDENT (CHREC.COMPN) NOT IN -0.34 .. -0.33 OR
IDENT (-CHREC.COMPP) NOT IN -0.67 .. -0.66 THEN
FAILED ("INCORRECT RESULTS FOR UNARY ADDING OPERATORS - 4");
END IF;
IF ABS IDENT (CHREC.COMPN) NOT IN 0.33 .. 0.34 OR
IDENT (ABS CHREC.COMPP) NOT IN 0.66 .. 0.670 THEN
FAILED ("INCORRECT RESULTS FOR ABSOLUTE VALUE " &
"OPERATORS - 4");
END IF;
IF IDENT (CHREC.COMPP) NOT IN 0.66 .. 0.670 OR
CHREC.COMPN IN -0.32 .. 0.0 OR
IDENT (CHREC.COMPN) IN -1.0 .. -0.35 THEN
FAILED ("INCORRECT RESULTS FOR MEMBERSHIP " &
"OPERATORS - 4");
END IF;
RESULT;
END CD2A53A;
|
procedure launch_mouse_Motion
--
-- Todo
--
is
begin
null;
end launch_mouse_Motion;
|
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Localization, Internationalization, Globalization for Ada --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2011-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$
------------------------------------------------------------------------------
with Ada.Characters.Latin_1;
with Interfaces;
with System.Machine_Code;
with Matreshka.SIMD.Intel.CPUID;
with Matreshka.Internals.Strings.Handlers.Portable;
with Matreshka.Internals.Strings.Handlers.X86.SSE2;
with Matreshka.Internals.Strings.Handlers.X86.SSE2_POPCNT;
package body Matreshka.Internals.Strings.Configuration is
use Ada.Characters.Latin_1;
use type Interfaces.Unsigned_32;
LFHT : constant String := LF & HT;
function Has_CPUID return Boolean;
-- Returns True when CPU supports 'cpuid' instruction.
---------------
-- Has_CPUID --
---------------
function Has_CPUID return Boolean is
use type Interfaces.Unsigned_32;
eax : Interfaces.Unsigned_32;
ebx : Interfaces.Unsigned_32;
begin
-- This code is copied from GCC's cpuid.h file.
System.Machine_Code.Asm
(Template =>
"pushf{l|d}" & LFHT
& "pushf{l|d}" & LFHT
& "pop{l}" & HT & "%0" & LFHT
& "mov{l}" & HT & "{%0, %1|%1, %0}" & LFHT
& "xor{l}" & HT & "{%2, %0|%0, %2}" & LFHT
& "push{l}" & HT & "%0" & LFHT
& "popf{l|d}" & LFHT
& "pushf{l|d}" & LFHT
& "pop{l}" & HT & "%0" & LFHT
& "popf{l|d}" & LFHT,
Outputs =>
(Interfaces.Unsigned_32'Asm_Output ("=&r", eax),
Interfaces.Unsigned_32'Asm_Output ("=&r", ebx)),
Inputs =>
Interfaces.Unsigned_32'Asm_Input ("i", 16#0020_0000#));
return ((eax xor ebx) and 16#0020_0000#) /= 0;
end Has_CPUID;
----------------
-- Initialize --
----------------
procedure Initialize is
begin
if not Has_CPUID
or else Matreshka.SIMD.Intel.CPUID.Highest_CPUID < 1
then
-- CPU doesn't has CPUID instruction or doesn't support getting of
-- features sets.
String_Handler := Handlers.Portable.Handler'Access;
elsif Matreshka.SIMD.Intel.CPUID.Has_SSE2 then
if Matreshka.SIMD.Intel.CPUID.Has_POPCNT then
-- CPU supports SSE instruction set and POPCNT instruction.
String_Handler := Handlers.X86.SSE2_POPCNT.Handler'Access;
else
-- CPU supports SSE2 instructions set.
String_Handler := Handlers.X86.SSE2.Handler'Access;
end if;
else
-- CPU doesn't supports SSE2 instructions set.
String_Handler := Handlers.Portable.Handler'Access;
end if;
end Initialize;
end Matreshka.Internals.Strings.Configuration;
|
with
gel.Forge,
gel.Sprite,
Physics,
float_Math,
ada.Calendar,
ada.Text_IO,
ada.Exceptions;
package body gel_demo_Server
is
use ada.Calendar,
ada.Text_IO;
package Math renames float_Math;
task body Item
is
the_World : gel.World.server.view;
begin
accept start
do
the_World := gel.World.server.forge.new_World ("Server", 1, physics.Bullet, null);
the_server_World := the_World.all'Access;
end start;
the_World.start;
declare
-- use type math.Real;
the_Box : constant gel.Sprite.view := gel.Forge. new_box_Sprite (the_World.all'Access,
Site => math.Origin_3D,
Size => (20.0, 1.0, 20.0),
Mass => 0.0);
the_Ball : constant gel.Sprite.view := gel.Forge.new_ball_Sprite (the_World.all'Access,
Mass => 1.0);
next_render_Time : ada.calendar.Time;
Counter : Natural := 0;
Done : Boolean := False;
begin
--- Setup.
--
the_World.Gravity_is ((0.0, -10.0, 0.0));
the_World.add (the_Ball, and_Children => False);
the_Ball .Site_is ((0.0, 10.0, 0.0));
the_Ball.Solid.activate;
the_World.add (the_Box, and_Children => False);
the_Box.Site_is ((0.0, -1.0, 0.0));
--- Begin processing.
--
next_render_Time := ada.Calendar.clock;
delay 1.0;
while not Done
loop
select
accept stop
do
Done := True;
end stop;
else
null;
end select;
the_World.evolve;
Counter := Counter + 1;
if Counter = 5 * 60
then
Counter := 0;
the_Ball.Site_is ((0.0, 25.0, 0.0));
end if;
next_render_Time := next_render_Time + gel.World.evolve_Period;
delay until next_render_Time;
end loop;
--- Close
--
the_World.destroy;
end;
exception
when E : others =>
put_Line ("Server unhandled exception ...");
put_Line (ada.exceptions.Exception_Information (E));
put_Line ("Server has terminated !");
end Item;
end gel_demo_Server;
|
generic
type Element_Type is private;
package Asynchronous_Fifo is
protected type Fifo is
procedure Push(Item : Element_Type);
entry Pop(Item : out Element_Type);
private
Value : Element_Type;
Valid : Boolean := False;
end Fifo;
end Asynchronous_Fifo;
|
-- SPDX-License-Identifier: Apache-2.0
--
-- Copyright (c) 2018 - 2019 Joakim Strandberg <joakim@mequinox.se>
--
-- 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 body Aida.Deepend.XML_DOM_Parser is
type State_T is
(Expecting_Object_Start, -- seems to only apply to the root start tag
-- Expecting_Attribute_Or_Text_Or_Comment_Or_CDATA_Or_Object_Start_Or_Object_End,
Expecting_Default, -- Attribute_Or_Text_Or_Comment_Or_CDATA_Or_Object_Start_Or_Object_End
End_State);
function Name (This : Attribute) return String is
(This.My_Name.all);
function Value (This : Attribute) return String is
(This.My_Value.all);
function Name (This : XML_Tag) return String is
(This.My_Name.all);
function Child_Nodes (This : aliased XML_Tag) return Child_Nodes_Ref is
((Element => This.My_Child_Nodes'Access));
function Attributes (This : aliased XML_Tag) return Attributes_Ref is
((Element => This.My_Attributes'Access));
type Argument_Type is limited record
Current_Nodes : Node_Vectors.Vector;
-- The current node is the last Node pointed to in the container
Root_Node : Node_Ptr := null;
State : State_T := Expecting_Object_Start;
end record;
procedure Handle_Start_Tag
(Argument : in out Argument_Type;
Tag_Name : String;
Call_Result : in out Aida.Call_Result) is
begin
case Argument.State is
when Expecting_Object_Start =>
if
Tag_Name'Length > 0 and
Argument.Current_Nodes.Is_Empty
then
declare
Current_Node : constant not null Node_Ptr
:= new Node;
begin
Current_Node.Tag.My_Name
:= new String'(Tag_Name);
Argument.Current_Nodes.Append (Current_Node);
Argument.Root_Node := Current_Node;
end;
Argument.State := Expecting_Default;
else
Call_Result.Initialize (-2132671123, 1966624808);
end if;
when Expecting_Default =>
if Tag_Name'Length > 0 then
declare
Current_Node : constant not null Node_Ptr := new Node;
begin
Current_Node.Tag.My_Name := new String'(Tag_Name);
if
Argument.Current_Nodes.Constant_Reference
(Argument.Current_Nodes.Last_Index).all.Id = Node_Kind_Tag
then
Argument.Current_Nodes.Constant_Reference
(Argument.Current_Nodes.Last_Index).all.Tag.
My_Child_Nodes.Append (Current_Node);
Argument.Current_Nodes.Append (Current_Node);
else
Call_Result.Initialize (1695756105, 1714042669);
end if;
end;
else
Call_Result.Initialize (-0416079960, -1464855808);
end if;
when End_State =>
Call_Result.Initialize (0561631589, 0761077416);
end case;
end Handle_Start_Tag;
procedure Handle_End_Tag
(Argument : in out Argument_Type;
Tag_Name : String;
Call_Result : in out Aida.Call_Result) is
begin
case Argument.State is
when Expecting_Default =>
if not Argument.Current_Nodes.Is_Empty and then
(Argument.Current_Nodes.Constant_Reference
(Argument.Current_Nodes.Last_Index).all.Id = Node_Kind_Tag)
then
if Argument.Current_Nodes.Constant_Reference
(Argument.Current_Nodes.Last_Index).all.Tag.My_Name.all = Tag_Name
then
Argument.Current_Nodes.Delete_Last;
if Argument.Current_Nodes.Is_Empty then
Argument.State := End_State;
end if;
else
Call_Result.Initialize (-0316487383, -2063296151);
end if;
else
Call_Result.Initialize (-1355522791, 1675536860);
end if;
when Expecting_Object_Start | End_State =>
Call_Result.Initialize (-0728861922, -0299445966);
end case;
end Handle_End_Tag;
procedure Handle_Text
(Argument : in out Argument_Type;
Value : String;
Call_Result : in out Aida.Call_Result) is
begin
case Argument.State is
when Expecting_Default =>
if
Value'Length = 0 or
(Value'Length > 0 and then
(for all I in Value'Range =>
Value (I) = ' ' or
Value (I) = Character'Val (10) or
Value (I) = Character'Val (13)))
then
null;
elsif not Argument.Current_Nodes.Is_Empty then
declare
Current_Node : constant not null Node_Ptr
:= new Node (Node_Kind_Text);
begin
Current_Node.all
:= (Id => Node_Kind_Text,
Text => new String'(Value));
if
Argument.Current_Nodes.Constant_Reference
(Argument.Current_Nodes.Last_Index).all.Id = Node_Kind_Tag
then
Argument.Current_Nodes
(Argument.Current_Nodes.Last_Index).all.Tag.
My_Child_Nodes.Append (Current_Node);
else
Call_Result.Initialize (-0944309962, -0212130363);
end if;
end;
else
Call_Result.Initialize (0536156601, 0921613311);
end if;
when Expecting_Object_Start | End_State =>
Call_Result.Initialize (0240750889, 1723362921);
end case;
end Handle_Text;
procedure Handle_Attribute
(Argument : in out Argument_Type;
Attribute_Name : String;
Attribute_Value : String;
Call_Result : in out Aida.Call_Result) is
begin
case Argument.State is
when Expecting_Default =>
if not Argument.Current_Nodes.Is_Empty then
if Attribute_Name'Length > 0 then
declare
Attr : constant not null Attribute_Ptr := new Attribute;
begin
Attr.My_Name
:= new String'(Attribute_Name);
Attr.My_Value
:= new String'(Attribute_Value);
if
Argument.Current_Nodes.Constant_Reference
(Argument.Current_Nodes.Last_Index).all.Id = Node_Kind_Tag
then
Argument.Current_Nodes
(Argument.Current_Nodes.Last_Index).all.Tag.
My_Attributes.Append (Attr);
else
Call_Result.Initialize (0612916249, -0250963769);
end if;
end;
else
Call_Result.Initialize (-1091502024, -1483543078);
end if;
else
Call_Result.Initialize (-0372407662, -1139199208);
end if;
when Expecting_Object_Start | End_State =>
Call_Result.Initialize (1103012185, 0319457400);
end case;
end Handle_Attribute;
procedure Handle_Comment
(Argument : in out Argument_Type;
Value : String;
Call_Result : in out Aida.Call_Result) is
begin
case Argument.State is
when Expecting_Default =>
if not Argument.Current_Nodes.Is_Empty then
if Value'Length > 0 then
declare
Current_Node : constant Node_Ptr
:= new Node (Node_Kind_Comment);
begin
Current_Node.all
:= (Id => Node_Kind_Comment,
Text => new String'(Value));
if
Argument.Current_Nodes.Constant_Reference
(Argument.Current_Nodes.Last_Index).all.Id = Node_Kind_Tag
then
Argument.Current_Nodes.Constant_Reference
(Argument.Current_Nodes.Last_Index).all.Tag.
My_Child_Nodes.Append (Current_Node);
else
Call_Result.Initialize (2066772500, 1193932906);
end if;
end;
else
Call_Result.Initialize (1366102371, 1421674126);
end if;
else
Call_Result.Initialize (0845969060, 0639006566);
end if;
when Expecting_Object_Start |
End_State =>
Call_Result.Initialize (-1373186804, -0874315849);
end case;
end Handle_Comment;
procedure Handle_CDATA
(Argument : in out Argument_Type;
Value : String;
Call_Result : in out Aida.Call_Result) is
begin
case Argument.State is
when Expecting_Default =>
if
not Argument.Current_Nodes.Is_Empty
then
if Value'Length > 0 then
declare
Current_Node : constant Node_Ptr
:= new Node (Node_Kind_CDATA);
begin
Current_Node.all
:= (Id => Node_Kind_CDATA,
Text => new String'(Value));
if
Argument.Current_Nodes.Constant_Reference
(Argument.Current_Nodes.Last_Index).all.Id = Node_Kind_Tag
then
Argument.Current_Nodes.Constant_Reference
(Argument.Current_Nodes.Last_Index).all.Tag.
My_Child_Nodes.Append (Current_Node);
else
Call_Result.Initialize (-2021174626, -1403249390);
end if;
end;
else
Call_Result.Initialize (1915730777, 1973598725);
end if;
else
Call_Result.Initialize (-0076965217, 0193355440);
end if;
when Expecting_Object_Start | End_State =>
Call_Result.Initialize (0698504230, -0963685542);
end case;
end Handle_CDATA;
procedure SAX_Parse is new Aida.XML_SAX_Parse
(Argument_Type,
Handle_Start_Tag,
Handle_End_Tag,
Handle_Text,
Handle_Attribute,
Handle_Comment,
Handle_CDATA);
procedure Parse
(XML_Message : String;
Call_Result : in out Aida.Call_Result;
Root_Node : out Node_Ptr)
is
Argument : Argument_Type;
begin
SAX_Parse (Argument, XML_Message, Call_Result);
Root_Node := Argument.Root_Node;
end Parse;
end Aida.Deepend.XML_DOM_Parser;
|
-- { dg-do compile }
-- { dg-options "-O2" }
with Unchecked_Conversion;
with System;
package body Warn6 is
function Conv is new Unchecked_Conversion (System.Address, Q_T);
procedure Dummy is begin null; end;
end Warn6;
|
-----------------------------------------------------------------------
-- openapi-streams -- Stream operations
-- Copyright (C) 2017, 2020, 2022 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.Beans.Objects.Maps;
with Util.Dates.ISO8601;
package body OpenAPI.Streams is
-- ------------------------------
-- Serialize a list of strings in the stream.
-- ------------------------------
procedure Serialize (Stream : in out Output_Stream'Class;
Name : in String;
Value : in OpenAPI.UString_Vectors.Vector) is
begin
Stream.Start_Array (Name);
for S of Value loop
Stream.Write_Entity ("", S);
end loop;
Stream.End_Array (Name);
end Serialize;
procedure Serialize (Stream : in out Output_Stream'Class;
Name : in String;
Value : in OpenAPI.Nullable_UString_Vectors.Vector) is
begin
Stream.Start_Array (Name);
for S of Value loop
Stream.Write_Entity ("", S);
end loop;
Stream.End_Array (Name);
end Serialize;
-- ------------------------------
-- Serialize a long value.
-- ------------------------------
procedure Serialize (Stream : in out Output_Stream'Class;
Name : in String;
Value : in OpenAPI.Long) is
begin
Stream.Write_Long_Entity (Name, Value);
end Serialize;
procedure Serialize (Stream : in out Output_Stream'Class;
Name : in String;
Value : in OpenAPI.Nullable_Long) is
begin
if Value.Is_Null then
Stream.Write_Null_Entity (Name);
else
Stream.Write_Long_Entity (Name, Value.Value);
end if;
end Serialize;
procedure Serialize (Stream : in out Output_Stream'Class;
Name : in String;
Value : in OpenAPI.UString) is
begin
Stream.Write_Entity (Name, Value);
end Serialize;
procedure Serialize (Stream : in out Output_Stream'Class;
Name : in String;
Value : in OpenAPI.Nullable_UString) is
begin
Stream.Write_Entity (Name, Value);
end Serialize;
procedure Serialize (Stream : in out Output_Stream'Class;
Name : in String;
Value : in Integer_Map) is
begin
null;
end Serialize;
procedure Serialize (Stream : in out Output_Stream'Class;
Name : in String;
Value : in Nullable_Integer_Map) is
begin
null;
end Serialize;
procedure Serialize (Stream : in out Output_Stream'Class;
Name : in String;
Value : in Object_Map) is
procedure Process (Pos : in Util.Beans.Objects.Maps.Cursor);
procedure Process (Pos : in Util.Beans.Objects.Maps.Cursor) is
use Util.Beans.Objects.Maps;
begin
Stream.Write_Entity (Maps.Key (Pos), Maps.Element (Pos));
end Process;
begin
if Name'Length > 0 then
Stream.Start_Entity (Name);
end if;
Util.Beans.Objects.Maps.Maps.Iterate (Value, Process'Access);
if Name'Length > 0 then
Stream.End_Entity (Name);
end if;
end Serialize;
-- ------------------------------
-- Extract a boolean value stored under the given name.
-- ------------------------------
procedure Deserialize (From : in OpenAPI.Value_Type;
Name : in String;
Value : out Boolean) is
Item : OpenAPI.Value_Type;
begin
if Name = "" then
Item := From;
else
Deserialize (From, Name, Item);
end if;
Value := Util.Beans.Objects.To_Boolean (Item);
end Deserialize;
-- ------------------------------
-- Extract a boolean value stored under the given name.
-- ------------------------------
procedure Deserialize (From : in OpenAPI.Value_Type;
Name : in String;
Value : out Nullable_Boolean) is
Item : OpenAPI.Value_Type;
begin
if Name = "" then
Item := From;
else
Deserialize (From, Name, Item);
end if;
if Util.Beans.Objects.Is_Null (Item) then
Value := (Is_Null => True, Value => <>);
else
Value := (Is_Null => False, Value => Util.Beans.Objects.To_Boolean (Item));
end if;
end Deserialize;
-- ------------------------------
-- Extract an integer value stored under the given name.
-- ------------------------------
procedure Deserialize (From : in OpenAPI.Value_Type;
Name : in String;
Value : out Integer) is
Item : OpenAPI.Value_Type;
begin
if Name = "" then
Item := From;
else
Deserialize (From, Name, Item);
end if;
Value := Util.Beans.Objects.To_Integer (Item);
end Deserialize;
procedure Deserialize (From : in OpenAPI.Value_Type;
Name : in String;
Value : out Nullable_Integer) is
Item : OpenAPI.Value_Type;
begin
if Name = "" then
Item := From;
else
Deserialize (From, Name, Item);
end if;
if Util.Beans.Objects.Is_Null (Item) then
Value := (Is_Null => True, Value => 0);
else
Value := (Is_Null => False, Value => Util.Beans.Objects.To_Integer (Item));
end if;
end Deserialize;
-- ------------------------------
-- Extract an integer value stored under the given name.
-- ------------------------------
procedure Deserialize (From : in OpenAPI.Value_Type;
Name : in String;
Value : out Long) is
Item : OpenAPI.Value_Type;
begin
if Name = "" then
Item := From;
else
Deserialize (From, Name, Item);
end if;
Value := Util.Beans.Objects.To_Long_Long_Integer (Item);
end Deserialize;
procedure Deserialize (From : in OpenAPI.Value_Type;
Name : in String;
Value : out Nullable_Long) is
Item : OpenAPI.Value_Type;
begin
if Name = "" then
Item := From;
else
Deserialize (From, Name, Item);
end if;
if Util.Beans.Objects.Is_Null (Item) then
Value := (Is_Null => True, Value => 0);
else
Value := (Is_Null => False, Value => Util.Beans.Objects.To_Long_Long_Integer (Item));
end if;
end Deserialize;
-- ------------------------------
-- Extract a string value stored under the given name.
-- ------------------------------
procedure Deserialize (From : in OpenAPI.Value_Type;
Name : in String;
Value : out UString) is
Item : OpenAPI.Value_Type;
begin
if Name = "" then
Item := From;
else
Deserialize (From, Name, Item);
end if;
Value := Util.Beans.Objects.To_Unbounded_String (Item);
end Deserialize;
procedure Deserialize (From : in OpenAPI.Value_Type;
Name : in String;
Value : out Nullable_UString) is
Item : OpenAPI.Value_Type;
begin
if Name = "" then
Item := From;
else
Deserialize (From, Name, Item);
end if;
Value.Is_Null := Util.Beans.Objects.Is_Null (Item);
if not Value.Is_Null then
Value.Value := Util.Beans.Objects.To_Unbounded_String (Item);
end if;
end Deserialize;
-- ------------------------------
-- Extract a value stored under the given name.
-- ------------------------------
procedure Deserialize (From : in OpenAPI.Value_Type;
Name : in String;
Value : out Value_Type) is
begin
if Name'Length = 0 then
Value := From;
else
Value := Util.Beans.Objects.Get_Value (From, Name);
end if;
end Deserialize;
-- Extract an integer value stored under the given name.
procedure Deserialize (From : in OpenAPI.Value_Type;
Name : in String;
Value : out Value_Array_Type) is
List : Util.Beans.Objects.Object;
begin
if Name'Length = 0 then
List := From;
else
List := Util.Beans.Objects.Get_Value (From, Name);
end if;
if Util.Beans.Objects.Is_Array (List) then
Value.A := List;
else
Value.A := Util.Beans.Objects.Null_Object;
end if;
end Deserialize;
-- Extract an integer value stored under the given name.
procedure Deserialize (From : in OpenAPI.Value_Type;
Name : in String;
Value : out Ada.Calendar.Time) is
Time : OpenAPI.Value_Type;
begin
if Name'Length = 0 then
Time := From;
else
Time := Util.Beans.Objects.Get_Value (From, Name);
end if;
declare
T : constant String := Util.Beans.Objects.To_String (Time);
begin
Value := Util.Dates.ISO8601.Value (T);
end;
end Deserialize;
procedure Deserialize (From : in OpenAPI.Value_Type;
Name : in String;
Value : out Nullable_Date) is
Time : OpenAPI.Value_Type;
begin
if Name'Length = 0 then
Time := From;
else
Time := Util.Beans.Objects.Get_Value (From, Name);
end if;
Value.Is_Null := Util.Beans.Objects.Is_Null (Time);
if not Value.Is_Null then
declare
T : constant String := Util.Beans.Objects.To_String (Time);
begin
Value.Value := Util.Dates.ISO8601.Value (T);
end;
end if;
end Deserialize;
procedure Deserialize (From : in OpenAPI.Value_Type;
Name : in String;
Value : out UString_Vectors.Vector) is
use Util.Beans.Objects;
List : Util.Beans.Objects.Object;
begin
if Name'Length = 0 then
List := From;
else
List := Util.Beans.Objects.Get_Value (From, Name);
end if;
Value.Clear;
if Is_Array (List) then
for I in 1 .. Get_Count (List) loop
Value.Append (To_String (Get_Value (List, I)));
end loop;
end if;
end Deserialize;
procedure Deserialize (From : in OpenAPI.Value_Type;
Name : in String;
Value : out Nullable_UString_Vectors.Vector) is
use Util.Beans.Objects;
List : Util.Beans.Objects.Object;
Item : Util.Beans.Objects.Object;
begin
if Name'Length = 0 then
List := From;
else
List := Util.Beans.Objects.Get_Value (From, Name);
end if;
Value.Clear;
if Is_Array (List) then
for I in 1 .. Get_Count (List) loop
Item := Get_Value (List, I);
if Util.Beans.Objects.Is_Null (Item) then
Value.Append ((Is_Null => True, Value => <>));
else
Value.Append ((Is_Null => False, Value => To_Unbounded_String (Item)));
end if;
end loop;
end if;
end Deserialize;
procedure Deserialize (From : in OpenAPI.Value_Type;
Name : in String;
Value : out Integer_Map) is
procedure Process (Name : in String;
Item : in Util.Beans.Objects.Object);
List : Util.Beans.Objects.Object;
procedure Process (Name : in String;
Item : in Util.Beans.Objects.Object) is
begin
Value.Include (Name, Util.Beans.Objects.To_Integer (Item));
end Process;
begin
if Name'Length = 0 then
List := From;
else
List := Util.Beans.Objects.Get_Value (From, Name);
end if;
Value.Clear;
Util.Beans.Objects.Maps.Iterate (List, Process'Access);
end Deserialize;
procedure Deserialize (From : in OpenAPI.Value_Type;
Name : in String;
Value : out Nullable_Integer_Map) is
procedure Process (Name : in String;
Item : in Util.Beans.Objects.Object);
List : Util.Beans.Objects.Object;
procedure Process (Name : in String;
Item : in Util.Beans.Objects.Object) is
begin
if Util.Beans.Objects.Is_Null (Item) then
Value.Include (Name, (Is_Null => True, Value => <>));
else
Value.Include (Name, (Is_Null => False,
Value => Util.Beans.Objects.To_Integer (Item)));
end if;
end Process;
begin
if Name'Length = 0 then
List := From;
else
List := Util.Beans.Objects.Get_Value (From, Name);
end if;
Value.Clear;
Util.Beans.Objects.Maps.Iterate (List, Process'Access);
end Deserialize;
procedure Deserialize (From : in OpenAPI.Value_Type;
Name : in String;
Value : out Object_Map) is
procedure Process (Name : in String;
Item : in Util.Beans.Objects.Object);
List : Util.Beans.Objects.Object;
procedure Process (Name : in String;
Item : in Util.Beans.Objects.Object) is
begin
Value.Include (Name, Item);
end Process;
begin
if Name'Length = 0 then
List := From;
else
List := Util.Beans.Objects.Get_Value (From, Name);
end if;
Value.Clear;
Util.Beans.Objects.Maps.Iterate (List, Process'Access);
end Deserialize;
end OpenAPI.Streams;
|
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- X R _ T A B L S --
-- --
-- S p e c --
-- --
-- $Revision$
-- --
-- Copyright (C) 1998-2000 Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 2, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING. If not, write --
-- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
-- MA 02111-1307, USA. --
-- --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with Ada.Strings.Unbounded;
package Xr_Tabls is
-------------------
-- Project files --
-------------------
function ALI_File_Name (Ada_File_Name : String) return String;
-- Returns the ali file name corresponding to Ada_File_Name, using the
-- information provided in gnat.adc if it exists
procedure Create_Project_File
(Name : String);
-- Open and parse a new project file
-- If the file Name could not be open or is not a valid project file
-- then a project file associated with the standard default directories
-- is returned
function Find_ALI_File (Short_Name : String) return String;
-- Returns the directory name for the file Short_Name
-- takes into account the obj_dir lines in the project file,
-- and the default paths for Gnat
function Find_Source_File (Short_Name : String) return String;
-- Returns the directory name for the file Short_Name
-- takes into account the src_dir lines in the project file,
-- and the default paths for Gnat
function Next_Src_Dir return String;
-- Returns the next directory to visit to find related source files
-- If there are no more such directory, Length = 0
function Next_Obj_Dir return String;
-- Returns the next directory to visit to find related ali files
-- If there are no more such directory, Length = 0
function Current_Obj_Dir return String;
-- Returns the obj_dir which was returned by the last Next_Obj_Dir call
procedure Parse_Gnatls
(Gnatls_Src_Cache : out Ada.Strings.Unbounded.Unbounded_String;
Gnatls_Obj_Cache : out Ada.Strings.Unbounded.Unbounded_String);
-- Parse the output of Gnatls, to find the standard
-- directories for source files
procedure Reset_Src_Dir;
-- Reset the iterator for Src_Dir
procedure Reset_Obj_Dir;
-- Reset the iterator for Obj_Dir
------------
-- Tables --
------------
type Declaration_Reference is private;
Empty_Declaration : constant Declaration_Reference;
type File_Reference is private;
Empty_File : constant File_Reference;
type Reference is private;
Empty_Reference : constant Reference;
type File_Table is limited private;
type Entity_Table is limited private;
function Add_Declaration
(File_Ref : File_Reference;
Symbol : String;
Line : Natural;
Column : Natural;
Decl_Type : Character)
return Declaration_Reference;
-- Add a new declaration in the table and return the index to it.
-- Decl_Type is the type of the entity
procedure Add_Parent
(Declaration : in out Declaration_Reference;
Symbol : String;
Line : Natural;
Column : Natural;
File_Ref : File_Reference);
-- The parent declaration (Symbol in file File_Ref at position Line and
-- Column) information is added to Declaration.
procedure Add_File
(File_Name : String;
File_Existed : out Boolean;
Ref : out File_Reference;
Visited : Boolean := True;
Emit_Warning : Boolean := False;
Gnatchop_File : String := "";
Gnatchop_Offset : Integer := 0);
-- Add a new reference to a file in the table. Ref is used to return
-- the index in the table where this file is stored On exit,
-- File_Existed is True if the file was already in the table Visited is
-- the value which will be used in the table (if True, the file will
-- not be returned by Next_Unvisited_File). If Emit_Warning is True and
-- the ali file does not exist or does not have cross-referencing
-- informations, then a warning will be emitted.
-- Gnatchop_File is the name of the file that File_Name was extracted from
-- through a call to "gnatchop -r" (with pragma Source_Reference).
-- Gnatchop_Offset should be the index of the first line of File_Name
-- withing Gnatchop_File.
procedure Add_Line
(File : File_Reference;
Line : Natural;
Column : Natural);
-- Add a new reference in a file, which the user has provided
-- on the command line. This is used for a optimized matching
-- algorithm.
procedure Add_Reference
(Declaration : Declaration_Reference;
File_Ref : File_Reference;
Line : Natural;
Column : Natural;
Ref_Type : Character);
-- Add a new reference (Ref_Type = 'r'), body (Ref_Type = 'b') or
-- modification (Ref_Type = 'm') to an entity
type Compare_Result is (LessThan, Equal, GreaterThan);
function Compare (Ref1, Ref2 : Reference) return Compare_Result;
function Compare
(Decl1 : Declaration_Reference;
File2 : File_Reference;
Line2 : Integer;
Col2 : Integer;
Symb2 : String)
return Compare_Result;
-- Compare two references
function First_Body (Decl : Declaration_Reference) return Reference;
function First_Declaration return Declaration_Reference;
function First_Modif (Decl : Declaration_Reference) return Reference;
function First_Reference (Decl : Declaration_Reference) return Reference;
-- Initialize the iterators
function Get_Column (Decl : Declaration_Reference) return String;
function Get_Column (Ref : Reference) return String;
function Get_Declaration
(File_Ref : File_Reference;
Line : Natural;
Column : Natural)
return Declaration_Reference;
-- Returns reference to the declaration found in file File_Ref at the
-- given Line and Column
function Get_Parent
(Decl : Declaration_Reference)
return Declaration_Reference;
-- Returns reference to Decl's parent declaration
function Get_Emit_Warning (File : File_Reference) return Boolean;
-- Returns the Emit_Warning field of the structure
function Get_Gnatchop_File
(File : File_Reference; With_Dir : Boolean := False) return String;
function Get_Gnatchop_File
(Ref : Reference; With_Dir : Boolean := False) return String;
function Get_Gnatchop_File
(Decl : Declaration_Reference; With_Dir : Boolean := False) return String;
-- Return the name of the file that File was extracted from through a
-- call to "gnatchop -r".
-- The file name for File is returned if File wasn't extracted from such a
-- file. The directory will be given only if With_Dir is True.
function Get_File
(Decl : Declaration_Reference;
With_Dir : Boolean := False)
return String;
-- Extract column number or file name from reference
function Get_File
(Ref : Reference;
With_Dir : Boolean := False)
return String;
pragma Inline (Get_File);
function Get_File
(File : File_Reference;
With_Dir : Boolean := False;
Strip : Natural := 0)
return String;
-- Returns the file name (and its directory if With_Dir is True or
-- the user as used the -f switch on the command line.
-- If Strip is not 0, then the last Strip-th "-..." substrings are
-- removed first. For instance, with Strip=2, a file name
-- "parent-child1-child2-child3.ali" would be returned as
-- "parent-child1.ali". This is used when looking for the ALI file to use
-- for a package, since for separates with have to use the parent's ALI.
--
-- "" is returned if there is no such parent unit
function Get_File_Ref (Ref : Reference) return File_Reference;
function Get_Line (Decl : Declaration_Reference) return String;
function Get_Line (Ref : Reference) return String;
function Get_Symbol (Decl : Declaration_Reference) return String;
function Get_Type (Decl : Declaration_Reference) return Character;
-- Functions that return the content of a declaration
function Get_Source_Line (Ref : Reference) return String;
function Get_Source_Line (Decl : Declaration_Reference) return String;
-- Return the source line associated with the reference
procedure Grep_Source_Files;
-- Parse all the source files which have at least one reference, and
-- grep the appropriate lines so that we'll be able to display them.
-- This function should be called once all the .ali files have been
-- parsed, and only if the appropriate user switch has been used.
function Longest_File_Name return Natural;
-- Returns the longest file name found
function Match (Decl : Declaration_Reference) return Boolean;
-- Return True if the declaration matches
function Match
(File : File_Reference;
Line : Natural;
Column : Natural)
return Boolean;
-- Returns True if File:Line:Column was given on the command line
-- by the user
function Next (Decl : Declaration_Reference) return Declaration_Reference;
function Next (Ref : Reference) return Reference;
-- Returns the next declaration, or Empty_Declaration
function Next_Unvisited_File return File_Reference;
-- Returns the next unvisited library file in the list
-- If there is no more unvisited file, return Empty_File
procedure Set_Default_Match (Value : Boolean);
-- Set the default value for match in declarations.
-- This is used so that if no file was provided in the
-- command line, then every file match
procedure Set_Directory
(File : File_Reference;
Dir : String);
-- Set the directory for a file
procedure Set_Unvisited (File_Ref : in File_Reference);
-- Set File_Ref as unvisited. So Next_Unvisited_File will return it.
private
type Project_File (Src_Dir_Length, Obj_Dir_Length : Natural) is record
Src_Dir : String (1 .. Src_Dir_Length);
Src_Dir_Index : Integer;
Obj_Dir : String (1 .. Obj_Dir_Length);
Obj_Dir_Index : Integer;
Last_Obj_Dir_Start : Natural;
end record;
type Project_File_Ptr is access all Project_File;
-- This is actually a list of all the directories to be searched,
-- either for source files or for library files
type String_Access is access all String;
type Ref_In_File;
type Ref_In_File_Ptr is access all Ref_In_File;
type Ref_In_File is record
Line : Natural;
Column : Natural;
Next : Ref_In_File_Ptr := null;
end record;
type File_Record;
type File_Reference is access all File_Record;
Empty_File : constant File_Reference := null;
type File_Record (File_Length : Natural) is record
File : String (1 .. File_Length);
Dir : String_Access := null;
Lines : Ref_In_File_Ptr := null;
Visited : Boolean := False;
Emit_Warning : Boolean := False;
Gnatchop_File : String_Access := null;
Gnatchop_Offset : Integer := 0;
Next : File_Reference := null;
end record;
-- Holds a reference to a source file, that was referenced in at least one
-- ALI file.
-- Gnatchop_File will contain the name of the file that File was extracted
-- From. Gnatchop_Offset contains the index of the first line of File
-- within Gnatchop_File. These two fields are used to properly support
-- gnatchop files and pragma Source_Reference.
type Reference_Record;
type Reference is access all Reference_Record;
Empty_Reference : constant Reference := null;
type Reference_Record is record
File : File_Reference;
Line : Natural;
Column : Natural;
Source_Line : Ada.Strings.Unbounded.Unbounded_String;
Next : Reference := null;
end record;
-- File is a reference to the Ada source file
-- Source_Line is the Line as it appears in the source file. This
-- field is only used when the switch is set on the command line
type Declaration_Record;
type Declaration_Reference is access all Declaration_Record;
Empty_Declaration : constant Declaration_Reference := null;
type Declaration_Record (Symbol_Length : Natural) is record
Symbol : String (1 .. Symbol_Length);
Decl : aliased Reference_Record;
Decl_Type : Character;
Body_Ref : Reference := null;
Ref_Ref : Reference := null;
Modif_Ref : Reference := null;
Match : Boolean := False;
Par_Symbol : Declaration_Reference := null;
Next : Declaration_Reference := null;
end record;
type File_Table is record
Table : File_Reference := null;
Longest_Name : Natural := 0;
end record;
type Entity_Table is record
Table : Declaration_Reference := null;
end record;
pragma Inline (First_Body);
pragma Inline (First_Declaration);
pragma Inline (First_Modif);
pragma Inline (First_Reference);
pragma Inline (Get_Column);
pragma Inline (Get_Emit_Warning);
pragma Inline (Get_File);
pragma Inline (Get_File_Ref);
pragma Inline (Get_Line);
pragma Inline (Get_Symbol);
pragma Inline (Get_Type);
pragma Inline (Longest_File_Name);
pragma Inline (Next);
end Xr_Tabls;
|
with Giza.Window;
with Giza.Widget.Button;
use Giza.Widget;
with Giza.Events; use Giza.Events;
with Giza.Types; use Giza.Types;
package Basic_Test_Window is
subtype Parent is Giza.Window.Instance;
type Test_Window is abstract new Parent with private;
type Test_Window_Ref is access all Test_Window;
overriding
procedure On_Init (This : in out Test_Window);
overriding
function On_Position_Event
(This : in out Test_Window;
Evt : Position_Event_Ref;
Pos : Point_T) return Boolean;
overriding
function Get_Size (This : Test_Window) return Size_T;
private
type Test_Window is abstract new Parent with record
Back : Button.Ref;
end record;
end Basic_Test_Window;
|
package REPRESENTATION_CLAUSE is
type BITS is record
Lower : INTEGER range 0..3;
-- Middle : INTEGER range 0..1;
-- High : INTEGER range 0..3;
end record;
for BITS use record
at mod 8;
Lower at 0 range 0..1;
-- Middle at 0 range 2..2;
-- High at 0 range 3..4;
end record;
-- for BITS'SIZE use 16;
end REPRESENTATION_CLAUSE;
|
------------------------------------------------------------------------------
-- Copyright (c) 2014, Natacha Porté --
-- --
-- Permission to use, copy, modify, and distribute this software for any --
-- purpose with or without fee is hereby granted, provided that the above --
-- copyright notice and this permission notice appear in all copies. --
-- --
-- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES --
-- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF --
-- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR --
-- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES --
-- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN --
-- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF --
-- OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. --
------------------------------------------------------------------------------
with Ada.Environment_Variables;
with Ada.Streams;
with POSIX.IO;
with POSIX.Process_Identification;
with POSIX.Process_Primitives;
with Natools.S_Expressions;
package body HMAC.Pinentry is
procedure Check_OK (Fd : POSIX.IO.File_Descriptor);
-- Check that pinentry OK response is coming through Fd
procedure Check_OK
(Receive, Send : in POSIX.IO.File_Descriptor;
Command : in String);
-- Send Command and wait for OK response
function Read_Line (Fd : POSIX.IO.File_Descriptor) return String;
-- Read a single line from Fd, aussming it will be smaller than 1 kb
procedure Send_Command
(Send : in POSIX.IO.File_Descriptor;
Command : in String);
-- Send Command through the given file descriptor
------------------------------
-- Local Helper Subprograms --
------------------------------
procedure Check_OK (Fd : POSIX.IO.File_Descriptor) is
Line : constant String := Read_Line (Fd);
begin
if Line'Length < 2
or else Line (Line'First .. Line'First + 1) /= "OK"
then
raise Backend_Error with "Not-OK response """ & Line & '"';
end if;
end Check_OK;
procedure Check_OK
(Receive, Send : in POSIX.IO.File_Descriptor;
Command : in String) is
begin
Send_Command (Send, Command);
Check_OK (Receive);
end Check_OK;
function Read_Line (Fd : POSIX.IO.File_Descriptor) return String is
Buffer : Ada.Streams.Stream_Element_Array (1 .. 1024);
Next : Ada.Streams.Stream_Element_Offset := Buffer'First;
Result : Ada.Streams.Stream_Element_Offset;
use type Ada.Streams.Stream_Element;
use type Ada.Streams.Stream_Element_Offset;
begin
loop
POSIX.IO.Read (Fd, Buffer (Next .. Next), Result);
exit when Result /= Next or else Buffer (Next) = 10;
Next := Next + 1;
end loop;
return Natools.S_Expressions.To_String
(Buffer (Buffer'First .. Next - 1));
end Read_Line;
procedure Send_Command
(Send : in POSIX.IO.File_Descriptor;
Command : in String)
is
Last : Ada.Streams.Stream_Element_Offset;
begin
if Command'Length > 0 then
POSIX.IO.Write
(Send,
Natools.S_Expressions.To_Atom (Command & Character'Val (10)),
Last);
end if;
end Send_Command;
----------------------
-- Public Interface --
----------------------
function Get_Key (Command : String) return String is
Local_Send, Local_Receive : POSIX.IO.File_Descriptor;
Remote_Send, Remote_Receive : POSIX.IO.File_Descriptor;
Template : POSIX.Process_Primitives.Process_Template;
Pid : POSIX.Process_Identification.Process_ID;
Args : POSIX.POSIX_String_List;
begin
POSIX.Append (Args, POSIX.To_POSIX_String (Command));
if Ada.Environment_Variables.Exists ("DISPLAY") then
POSIX.Append (Args, POSIX.To_POSIX_String (String'("--display")));
POSIX.Append (Args, POSIX.To_POSIX_String
(Ada.Environment_Variables.Value ("DISPLAY")));
end if;
POSIX.IO.Create_Pipe (Local_Receive, Remote_Send);
POSIX.IO.Create_Pipe (Remote_Receive, Local_Send);
POSIX.Process_Primitives.Open_Template (Template);
POSIX.Process_Primitives.Set_File_Action_To_Duplicate
(Template => Template,
File => POSIX.IO.Standard_Input,
From_File => Remote_Receive);
POSIX.Process_Primitives.Set_File_Action_To_Duplicate
(Template => Template,
File => POSIX.IO.Standard_Output,
From_File => Remote_Send);
POSIX.Process_Primitives.Set_File_Action_To_Close
(Template, Local_Send);
POSIX.Process_Primitives.Set_File_Action_To_Close
(Template, Local_Receive);
POSIX.Process_Primitives.Start_Process_Search
(Pid,
POSIX.Value (Args, 1),
Template,
Args);
POSIX.Process_Primitives.Close_Template (Template);
POSIX.Make_Empty (Args);
Check_OK (Local_Receive);
if POSIX.IO.Is_A_Terminal (POSIX.IO.Standard_Input) then
Check_OK (Local_Receive, Local_Send, "OPTION ttyname="
& POSIX.To_String
(POSIX.IO.Get_Terminal_Name (POSIX.IO.Standard_Input)));
end if;
if Ada.Environment_Variables.Exists ("TERM") then
Check_OK (Local_Receive, Local_Send,
"OPTION ttytype=" & Ada.Environment_Variables.Value ("TERM"));
end if;
if Ada.Environment_Variables.Exists ("LC_CTYPE") then
Check_OK (Local_Receive, Local_Send,
"OPTION lc-ctype=" & Ada.Environment_Variables.Value ("LC_CTYPE"));
end if;
Send_Command (Local_Send, "GETPIN");
declare
Response : constant String := Read_Line (Local_Receive);
begin
if Response'Length < 2
or else Response (Response'First .. Response'First + 1) /= "D "
then
raise Backend_Error with "Unexpected response to GETPIN: """
& Response & '"';
end if;
Check_OK (Local_Receive);
POSIX.IO.Close (Local_Send);
POSIX.IO.Close (Local_Receive);
POSIX.IO.Close (Remote_Send);
POSIX.IO.Close (Remote_Receive);
return Response (Response'First + 2 .. Response'Last);
end;
exception
when others =>
POSIX.Process_Primitives.Close_Template (Template);
POSIX.Make_Empty (Args);
POSIX.IO.Close (Local_Send);
POSIX.IO.Close (Local_Receive);
POSIX.IO.Close (Remote_Send);
POSIX.IO.Close (Remote_Receive);
raise;
end Get_Key;
function Is_Available return Boolean is
begin
return True;
end Is_Available;
end HMAC.Pinentry;
|
-----------------------------------------------------------------------
-- are -- Advanced Resource Embedder
-- Copyright (C) 2021 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.
-----------------------------------------------------------------------
private with Ada.Strings.Unbounded;
private with Ada.Finalization;
private with Ada.Streams;
private with Ada.Strings.Maps;
private with Ada.Containers.Indefinite_Ordered_Maps;
private with Ada.Containers.Indefinite_Vectors;
private with Ada.Directories;
private with Ada.Calendar;
private with Ada.Command_Line;
private with GNAT.Strings;
private with GNAT.Regpat;
private with Util.Strings.Vectors;
package Are is
function "-" (Message : in String) return String is (Message);
type Context_Type is tagged limited private;
type Resource_Type is tagged limited private;
type Resource_Access is access all Resource_Type;
type Resource_List is limited private;
private
subtype UString is Ada.Strings.Unbounded.Unbounded_String;
subtype Character_Set is Ada.Strings.Maps.Character_Set;
type Stream_Element_Access is access all Ada.Streams.Stream_Element_Array;
type File_Format is (FORMAT_RAW, FORMAT_GZIP);
-- The information about a file being embedded.
type File_Info is record
Content : Stream_Element_Access;
Length : Ada.Directories.File_Size;
Modtime : Ada.Calendar.Time;
Format : File_Format := FORMAT_RAW;
Line_Count : Natural := 0;
end record;
-- An ordered map of files being embedded.
package File_Maps is
new Ada.Containers.Indefinite_Ordered_Maps (Key_Type => String,
Element_Type => File_Info,
"<" => "<",
"=" => "=");
type Format_Type is (R_BINARY, R_STRING, R_LINES);
type Line_Filter_Type (Size : GNAT.Regpat.Program_Size;
Replace_Length : Natural) is
record
Pattern : GNAT.Regpat.Pattern_Matcher (Size);
Replace : String (1 .. Replace_Length);
end record;
package Filter_Vectors is
new Ada.Containers.Indefinite_Vectors (Index_Type => Positive,
Element_Type => Line_Filter_Type);
-- A resource is composed of a set of files.
type Resource_Type is limited new Ada.Finalization.Limited_Controlled with record
Next : Resource_Access;
Name : UString;
Format : Format_Type := R_BINARY;
Files : File_Maps.Map;
Separators : Character_Set := Ada.Strings.Maps.Null_Set;
Filters : Filter_Vectors.Vector;
Type_Name : UString;
Content_Type_Name : UString;
Function_Name : UString;
Member_Content_Name : UString;
Member_Length_Name : UString;
Member_Modtime_Name : UString;
Member_Format_Name : UString;
end record;
-- Get the name of type and struct/record members for the generator:
-- - get the value from the resource library definition,
-- - otherwise use the global context,
-- - otherwise use the pre-defined value.
function Get_Type_Name (Resource : in Resource_Type;
Context : in Context_Type'Class;
Default : in String) return String;
function Get_Content_Type_Name (Resource : in Resource_Type;
Context : in Context_Type'Class;
Default : in String) return String;
function Get_Function_Name (Resource : in Resource_Type;
Context : in Context_Type'Class;
Default : in String) return String;
function Get_Member_Content_Name (Resource : in Resource_Type;
Context : in Context_Type'Class;
Default : in String) return String;
function Get_Member_Length_Name (Resource : in Resource_Type;
Context : in Context_Type'Class;
Default : in String) return String;
function Get_Member_Modtime_Name (Resource : in Resource_Type;
Context : in Context_Type'Class;
Default : in String) return String;
function Get_Member_Format_Name (Resource : in Resource_Type;
Context : in Context_Type'Class;
Default : in String) return String;
-- Release the resources.
overriding
procedure Finalize (Context : in out Resource_Type);
-- Load and add the file in the resource library.
procedure Add_File (Resource : in out Resource_Type;
Name : in String;
Path : in String;
Override : in Boolean := False) with
Pre => Name'Length > 0 and Path'Length > 0,
Post => Resource.Files.Contains (Name);
-- Load and add the file in the resource library.
procedure Add_File (Resource : in out Resource_Type;
Name : in String;
Path : in String;
Modtime : in Ada.Calendar.Time;
Override : in Boolean := False) with
Pre => Name'Length > 0 and Path'Length > 0,
Post => Resource.Files.Contains (Name);
-- Add a line filter that will replace contents matching the pattern
-- by the replacement string.
procedure Add_Line_Filter (Resource : in out Resource_Type;
Pattern : in String;
Replacement : in String);
-- Convert the file content to a list of string lines.
procedure Convert_To_Lines (Resource : in Resource_Type;
File : in File_Info;
Lines : in out Util.Strings.Vectors.Vector);
-- Collect the list of files names for the resource (list is sorted).
procedure Collect_Names (Resource : in Resource_Type;
Ignore_Case : in Boolean;
Names : in out Util.Strings.Vectors.Vector);
-- List of resources.
type Resource_List is limited record
Head : Resource_Access;
end record;
-- Create a new resource with the given name.
procedure Create_Resource (List : in out Resource_List;
Name : in String;
Resource : out Resource_Access) with
Pre => Name'Length > 0,
Post => Resource /= null;
-- Get the number of resources in the list.
function Length (List : in Resource_List) return Natural;
-- The context holding and describing information to embed.
type Context_Type is limited new Ada.Finalization.Limited_Controlled with record
Status : Ada.Command_Line.Exit_Status := Ada.Command_Line.Success;
Resources : Resource_List;
Verbose : aliased Boolean := False;
Debug : aliased Boolean := False;
Version : aliased Boolean := False;
Ignore_Case : aliased Boolean := False;
Name_Index : aliased Boolean := False;
Declare_Var : aliased Boolean := False;
No_Type_Declaration : aliased Boolean := False;
List_Content : aliased Boolean := False;
Keep_Temporary : aliased Boolean := False;
Rule_File : aliased GNAT.Strings.String_Access;
Language : aliased GNAT.Strings.String_Access;
Output : aliased GNAT.Strings.String_Access;
Tmp_Dir : aliased GNAT.Strings.String_Access;
Type_Name : aliased GNAT.Strings.String_Access;
Function_Name : aliased GNAT.Strings.String_Access;
Member_Content_Name : aliased GNAT.Strings.String_Access;
Member_Length_Name : aliased GNAT.Strings.String_Access;
Member_Modtime_Name : aliased GNAT.Strings.String_Access;
Member_Format_Name : aliased GNAT.Strings.String_Access;
Resource_Name : aliased GNAT.Strings.String_Access;
Fileset_Pattern : aliased GNAT.Strings.String_Access;
Var_Prefix : aliased GNAT.Strings.String_Access;
end record;
-- Release the context information.
overriding
procedure Finalize (Context : in out Context_Type);
-- Report an error and set the exit status accordingly
procedure Error (Context : in out Context_Type;
Message : in String;
Arg1 : in String;
Arg2 : in String := "");
procedure Error (Context : in out Context_Type;
Message : in String;
Arg1 : in UString;
Arg2 : in String := "");
-- Get a path for the resource generation directory.
function Get_Generation_Path (Context : in Context_Type;
Name : in String) return String;
-- Get the path to write a file taking into account the output directory.
function Get_Output_Path (Context : in Context_Type;
Name : in String) return String;
-- Configure the logs.
procedure Configure_Logs (Debug : in Boolean;
Verbose : in Boolean);
end Are;
|
-- Copyright (c) 2013, Nordic Semiconductor ASA
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions are met:
--
-- * Redistributions of source code must retain the above copyright notice, this
-- list of conditions and the following disclaimer.
--
-- * Redistributions in binary form must reproduce the above copyright notice,
-- this list of conditions and the following disclaimer in the documentation
-- and/or other materials provided with the distribution.
--
-- * Neither the name of Nordic Semiconductor ASA nor the names of its
-- contributors may be used to endorse or promote products derived from
-- this software without specific prior written permission.
--
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-- DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-- FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-- DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-- SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-- OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--
-- This spec has been automatically generated from nrf51.svd
pragma Restrictions (No_Elaboration_Code);
pragma Ada_2012;
pragma Style_Checks (Off);
with HAL;
with System;
package NRF_SVD.MPU is
pragma Preelaborate;
---------------
-- Registers --
---------------
-- POWER_CLOCK region configuration.
type PERR0_POWER_CLOCK_Field is
(-- Peripheral configured in region 1.
Inregion1,
-- Peripheral configured in region 0.
Inregion0)
with Size => 1;
for PERR0_POWER_CLOCK_Field use
(Inregion1 => 0,
Inregion0 => 1);
-- RADIO region configuration.
type PERR0_RADIO_Field is
(-- Peripheral configured in region 1.
Inregion1,
-- Peripheral configured in region 0.
Inregion0)
with Size => 1;
for PERR0_RADIO_Field use
(Inregion1 => 0,
Inregion0 => 1);
-- UART0 region configuration.
type PERR0_UART0_Field is
(-- Peripheral configured in region 1.
Inregion1,
-- Peripheral configured in region 0.
Inregion0)
with Size => 1;
for PERR0_UART0_Field use
(Inregion1 => 0,
Inregion0 => 1);
-- SPI0 and TWI0 region configuration.
type PERR0_SPI0_TWI0_Field is
(-- Peripheral configured in region 1.
Inregion1,
-- Peripheral configured in region 0.
Inregion0)
with Size => 1;
for PERR0_SPI0_TWI0_Field use
(Inregion1 => 0,
Inregion0 => 1);
-- SPI1 and TWI1 region configuration.
type PERR0_SPI1_TWI1_Field is
(-- Peripheral configured in region 1.
Inregion1,
-- Peripheral configured in region 0.
Inregion0)
with Size => 1;
for PERR0_SPI1_TWI1_Field use
(Inregion1 => 0,
Inregion0 => 1);
-- GPIOTE region configuration.
type PERR0_GPIOTE_Field is
(-- Peripheral configured in region 1.
Inregion1,
-- Peripheral configured in region 0.
Inregion0)
with Size => 1;
for PERR0_GPIOTE_Field use
(Inregion1 => 0,
Inregion0 => 1);
-- ADC region configuration.
type PERR0_ADC_Field is
(-- Peripheral configured in region 1.
Inregion1,
-- Peripheral configured in region 0.
Inregion0)
with Size => 1;
for PERR0_ADC_Field use
(Inregion1 => 0,
Inregion0 => 1);
-- TIMER0 region configuration.
type PERR0_TIMER0_Field is
(-- Peripheral configured in region 1.
Inregion1,
-- Peripheral configured in region 0.
Inregion0)
with Size => 1;
for PERR0_TIMER0_Field use
(Inregion1 => 0,
Inregion0 => 1);
-- PERR0_TIMER array
type PERR0_TIMER_Field_Array is array (0 .. 2) of PERR0_TIMER0_Field
with Component_Size => 1, Size => 3;
-- Type definition for PERR0_TIMER
type PERR0_TIMER_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TIMER as a value
Val : HAL.UInt3;
when True =>
-- TIMER as an array
Arr : PERR0_TIMER_Field_Array;
end case;
end record
with Unchecked_Union, Size => 3;
for PERR0_TIMER_Field use record
Val at 0 range 0 .. 2;
Arr at 0 range 0 .. 2;
end record;
-- RTC0 region configuration.
type PERR0_RTC0_Field is
(-- Peripheral configured in region 1.
Inregion1,
-- Peripheral configured in region 0.
Inregion0)
with Size => 1;
for PERR0_RTC0_Field use
(Inregion1 => 0,
Inregion0 => 1);
-- TEMP region configuration.
type PERR0_TEMP_Field is
(-- Peripheral configured in region 1.
Inregion1,
-- Peripheral configured in region 0.
Inregion0)
with Size => 1;
for PERR0_TEMP_Field use
(Inregion1 => 0,
Inregion0 => 1);
-- RNG region configuration.
type PERR0_RNG_Field is
(-- Peripheral configured in region 1.
Inregion1,
-- Peripheral configured in region 0.
Inregion0)
with Size => 1;
for PERR0_RNG_Field use
(Inregion1 => 0,
Inregion0 => 1);
-- ECB region configuration.
type PERR0_ECB_Field is
(-- Peripheral configured in region 1.
Inregion1,
-- Peripheral configured in region 0.
Inregion0)
with Size => 1;
for PERR0_ECB_Field use
(Inregion1 => 0,
Inregion0 => 1);
-- CCM and AAR region configuration.
type PERR0_CCM_AAR_Field is
(-- Peripheral configured in region 1.
Inregion1,
-- Peripheral configured in region 0.
Inregion0)
with Size => 1;
for PERR0_CCM_AAR_Field use
(Inregion1 => 0,
Inregion0 => 1);
-- WDT region configuration.
type PERR0_WDT_Field is
(-- Peripheral configured in region 1.
Inregion1,
-- Peripheral configured in region 0.
Inregion0)
with Size => 1;
for PERR0_WDT_Field use
(Inregion1 => 0,
Inregion0 => 1);
-- RTC1 region configuration.
type PERR0_RTC1_Field is
(-- Peripheral configured in region 1.
Inregion1,
-- Peripheral configured in region 0.
Inregion0)
with Size => 1;
for PERR0_RTC1_Field use
(Inregion1 => 0,
Inregion0 => 1);
-- QDEC region configuration.
type PERR0_QDEC_Field is
(-- Peripheral configured in region 1.
Inregion1,
-- Peripheral configured in region 0.
Inregion0)
with Size => 1;
for PERR0_QDEC_Field use
(Inregion1 => 0,
Inregion0 => 1);
-- LPCOMP region configuration.
type PERR0_LPCOMP_Field is
(-- Peripheral configured in region 1.
Inregion1,
-- Peripheral configured in region 0.
Inregion0)
with Size => 1;
for PERR0_LPCOMP_Field use
(Inregion1 => 0,
Inregion0 => 1);
-- NVMC region configuration.
type PERR0_NVMC_Field is
(-- Peripheral configured in region 1.
Inregion1,
-- Peripheral configured in region 0.
Inregion0)
with Size => 1;
for PERR0_NVMC_Field use
(Inregion1 => 0,
Inregion0 => 1);
-- PPI region configuration.
type PERR0_PPI_Field is
(-- Peripheral configured in region 1.
Inregion1,
-- Peripheral configured in region 0.
Inregion0)
with Size => 1;
for PERR0_PPI_Field use
(Inregion1 => 0,
Inregion0 => 1);
-- Configuration of peripherals in mpu regions.
type PERR0_Register is record
-- POWER_CLOCK region configuration.
POWER_CLOCK : PERR0_POWER_CLOCK_Field := NRF_SVD.MPU.Inregion1;
-- RADIO region configuration.
RADIO : PERR0_RADIO_Field := NRF_SVD.MPU.Inregion1;
-- UART0 region configuration.
UART0 : PERR0_UART0_Field := NRF_SVD.MPU.Inregion1;
-- SPI0 and TWI0 region configuration.
SPI0_TWI0 : PERR0_SPI0_TWI0_Field := NRF_SVD.MPU.Inregion1;
-- SPI1 and TWI1 region configuration.
SPI1_TWI1 : PERR0_SPI1_TWI1_Field := NRF_SVD.MPU.Inregion1;
-- unspecified
Reserved_5_5 : HAL.Bit := 16#0#;
-- GPIOTE region configuration.
GPIOTE : PERR0_GPIOTE_Field := NRF_SVD.MPU.Inregion1;
-- ADC region configuration.
ADC : PERR0_ADC_Field := NRF_SVD.MPU.Inregion1;
-- TIMER0 region configuration.
TIMER : PERR0_TIMER_Field := (As_Array => False, Val => 16#0#);
-- RTC0 region configuration.
RTC0 : PERR0_RTC0_Field := NRF_SVD.MPU.Inregion1;
-- TEMP region configuration.
TEMP : PERR0_TEMP_Field := NRF_SVD.MPU.Inregion1;
-- RNG region configuration.
RNG : PERR0_RNG_Field := NRF_SVD.MPU.Inregion1;
-- ECB region configuration.
ECB : PERR0_ECB_Field := NRF_SVD.MPU.Inregion1;
-- CCM and AAR region configuration.
CCM_AAR : PERR0_CCM_AAR_Field := NRF_SVD.MPU.Inregion1;
-- WDT region configuration.
WDT : PERR0_WDT_Field := NRF_SVD.MPU.Inregion1;
-- RTC1 region configuration.
RTC1 : PERR0_RTC1_Field := NRF_SVD.MPU.Inregion1;
-- QDEC region configuration.
QDEC : PERR0_QDEC_Field := NRF_SVD.MPU.Inregion1;
-- LPCOMP region configuration.
LPCOMP : PERR0_LPCOMP_Field := NRF_SVD.MPU.Inregion1;
-- unspecified
Reserved_20_29 : HAL.UInt10 := 16#0#;
-- NVMC region configuration.
NVMC : PERR0_NVMC_Field := NRF_SVD.MPU.Inregion1;
-- PPI region configuration.
PPI : PERR0_PPI_Field := NRF_SVD.MPU.Inregion1;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for PERR0_Register use record
POWER_CLOCK at 0 range 0 .. 0;
RADIO at 0 range 1 .. 1;
UART0 at 0 range 2 .. 2;
SPI0_TWI0 at 0 range 3 .. 3;
SPI1_TWI1 at 0 range 4 .. 4;
Reserved_5_5 at 0 range 5 .. 5;
GPIOTE at 0 range 6 .. 6;
ADC at 0 range 7 .. 7;
TIMER at 0 range 8 .. 10;
RTC0 at 0 range 11 .. 11;
TEMP at 0 range 12 .. 12;
RNG at 0 range 13 .. 13;
ECB at 0 range 14 .. 14;
CCM_AAR at 0 range 15 .. 15;
WDT at 0 range 16 .. 16;
RTC1 at 0 range 17 .. 17;
QDEC at 0 range 18 .. 18;
LPCOMP at 0 range 19 .. 19;
Reserved_20_29 at 0 range 20 .. 29;
NVMC at 0 range 30 .. 30;
PPI at 0 range 31 .. 31;
end record;
-- Protection enable for region 0.
type PROTENSET0_PROTREG0_Field is
(-- Protection disabled.
Disabled,
-- Protection enabled.
Enabled)
with Size => 1;
for PROTENSET0_PROTREG0_Field use
(Disabled => 0,
Enabled => 1);
-- Protection enable for region 0.
type PROTENSET0_PROTREG0_Field_1 is
(-- Reset value for the field
Protenset0_Protreg0_Field_Reset,
-- Enable protection on write.
Set)
with Size => 1;
for PROTENSET0_PROTREG0_Field_1 use
(Protenset0_Protreg0_Field_Reset => 0,
Set => 1);
-- PROTENSET0_PROTREG array
type PROTENSET0_PROTREG_Field_Array is array (0 .. 31)
of PROTENSET0_PROTREG0_Field_1
with Component_Size => 1, Size => 32;
-- Erase and write protection bit enable set register.
type PROTENSET0_Register
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- PROTREG as a value
Val : HAL.UInt32;
when True =>
-- PROTREG as an array
Arr : PROTENSET0_PROTREG_Field_Array;
end case;
end record
with Unchecked_Union, Size => 32, Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for PROTENSET0_Register use record
Val at 0 range 0 .. 31;
Arr at 0 range 0 .. 31;
end record;
-- Protection enable for region 32.
type PROTENSET1_PROTREG32_Field is
(-- Protection disabled.
Disabled,
-- Protection enabled.
Enabled)
with Size => 1;
for PROTENSET1_PROTREG32_Field use
(Disabled => 0,
Enabled => 1);
-- Protection enable for region 32.
type PROTENSET1_PROTREG32_Field_1 is
(-- Reset value for the field
Protenset1_Protreg32_Field_Reset,
-- Enable protection on write.
Set)
with Size => 1;
for PROTENSET1_PROTREG32_Field_1 use
(Protenset1_Protreg32_Field_Reset => 0,
Set => 1);
-- PROTENSET1_PROTREG array
type PROTENSET1_PROTREG_Field_Array is array (32 .. 63)
of PROTENSET1_PROTREG32_Field_1
with Component_Size => 1, Size => 32;
-- Erase and write protection bit enable set register.
type PROTENSET1_Register
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- PROTREG as a value
Val : HAL.UInt32;
when True =>
-- PROTREG as an array
Arr : PROTENSET1_PROTREG_Field_Array;
end case;
end record
with Unchecked_Union, Size => 32, Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for PROTENSET1_Register use record
Val at 0 range 0 .. 31;
Arr at 0 range 0 .. 31;
end record;
-- Disable protection mechanism in debug mode.
type DISABLEINDEBUG_DISABLEINDEBUG_Field is
(-- Protection enabled.
Enabled,
-- Protection disabled.
Disabled)
with Size => 1;
for DISABLEINDEBUG_DISABLEINDEBUG_Field use
(Enabled => 0,
Disabled => 1);
-- Disable erase and write protection mechanism in debug mode.
type DISABLEINDEBUG_Register is record
-- Disable protection mechanism in debug mode.
DISABLEINDEBUG : DISABLEINDEBUG_DISABLEINDEBUG_Field :=
NRF_SVD.MPU.Disabled;
-- unspecified
Reserved_1_31 : HAL.UInt31 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for DISABLEINDEBUG_Register use record
DISABLEINDEBUG at 0 range 0 .. 0;
Reserved_1_31 at 0 range 1 .. 31;
end record;
-- Erase and write protection block size.
type PROTBLOCKSIZE_PROTBLOCKSIZE_Field is
(-- Erase and write protection block size is 4k.
Val_4K)
with Size => 2;
for PROTBLOCKSIZE_PROTBLOCKSIZE_Field use
(Val_4K => 0);
-- Erase and write protection block size.
type PROTBLOCKSIZE_Register is record
-- Erase and write protection block size.
PROTBLOCKSIZE : PROTBLOCKSIZE_PROTBLOCKSIZE_Field := NRF_SVD.MPU.Val_4K;
-- unspecified
Reserved_2_31 : HAL.UInt30 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for PROTBLOCKSIZE_Register use record
PROTBLOCKSIZE at 0 range 0 .. 1;
Reserved_2_31 at 0 range 2 .. 31;
end record;
-----------------
-- Peripherals --
-----------------
-- Memory Protection Unit.
type MPU_Peripheral is record
-- Configuration of peripherals in mpu regions.
PERR0 : aliased PERR0_Register;
-- Length of RAM region 0.
RLENR0 : aliased HAL.UInt32;
-- Erase and write protection bit enable set register.
PROTENSET0 : aliased PROTENSET0_Register;
-- Erase and write protection bit enable set register.
PROTENSET1 : aliased PROTENSET1_Register;
-- Disable erase and write protection mechanism in debug mode.
DISABLEINDEBUG : aliased DISABLEINDEBUG_Register;
-- Erase and write protection block size.
PROTBLOCKSIZE : aliased PROTBLOCKSIZE_Register;
end record
with Volatile;
for MPU_Peripheral use record
PERR0 at 16#528# range 0 .. 31;
RLENR0 at 16#52C# range 0 .. 31;
PROTENSET0 at 16#600# range 0 .. 31;
PROTENSET1 at 16#604# range 0 .. 31;
DISABLEINDEBUG at 16#608# range 0 .. 31;
PROTBLOCKSIZE at 16#60C# range 0 .. 31;
end record;
-- Memory Protection Unit.
MPU_Periph : aliased MPU_Peripheral
with Import, Address => MPU_Base;
end NRF_SVD.MPU;
|
-- --
-- package Strings_Edit Copyright (c) Dmitry A. Kazakov --
-- Implementation Luebeck --
-- Strings_Edit.Text_Edit Spring, 2000 --
-- --
-- Last revision : 18:40 01 Aug 2019 --
-- --
-- This library is free software; you can redistribute it and/or --
-- modify it under the terms of the GNU General Public License as --
-- published by the Free Software Foundation; either version 2 of --
-- the License, or (at your option) any later version. This library --
-- is distributed in the hope that it will be useful, but WITHOUT --
-- ANY WARRANTY; without even the implied warranty of --
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --
-- General Public License for more details. You should have --
-- received a copy of the GNU General Public License along with --
-- this library; if not, write to the Free Software Foundation, --
-- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. --
-- --
-- As a special exception, if other files instantiate generics from --
-- this unit, or you link this unit with other files to produce an --
-- executable, this unit does not by itself cause the resulting --
-- executable to be covered by the GNU General Public License. This --
-- exception does not however invalidate any other reasons why the --
-- executable file might be covered by the GNU Public License. --
--____________________________________________________________________--
separate (Strings_Edit)
package body Text_Edit is
function TrimCharacter
( Source : in String;
Blank : in Character := ' '
) return String is
First : Integer := Source'First;
Last : Integer := Source'Last;
begin
while First <= Last and then Source (First) = Blank loop
First := First + 1;
end loop;
while First <= Last and then Source (Last) = Blank loop
Last := Last - 1;
end loop;
return Source (First..Last);
end TrimCharacter;
function TrimSet
( Source : in String;
Blanks : in Ada.Strings.Maps.Character_Set
) return String is
First : Integer := Source'First;
Last : Integer := Source'Last;
begin
while ( First <= Last
and then
Ada.Strings.Maps.Is_In (Source (First), Blanks)
)
loop
First := First + 1;
end loop;
while ( First <= Last
and then
Ada.Strings.Maps.Is_In (Source (Last), Blanks)
)
loop
Last := Last - 1;
end loop;
return Source (First..Last);
end TrimSet;
procedure GetCharacter
( Source : in String;
Pointer : in out Integer;
Blank : in Character := ' '
) is
begin
if ( Pointer < Source'First
or else
( Pointer > Source'Last
and then
Pointer - 1 > Source'Last
) )
then
raise Layout_Error;
end if;
for Index in Pointer..Source'Last loop
exit when Source (Index) /= Blank;
Pointer := Pointer + 1;
end loop;
end GetCharacter;
procedure GetSet
( Source : in String;
Pointer : in out Integer;
Blanks : in Ada.Strings.Maps.Character_Set
) is
begin
if ( Pointer < Source'First
or else
( Pointer > Source'Last
and then
Pointer - 1 > Source'Last
) )
then
raise Layout_Error;
end if;
for Index in Pointer..Source'Last loop
exit when not Ada.Strings.Maps.Is_In (Source (Index), Blanks);
Pointer := Pointer + 1;
end loop;
end GetSet;
procedure PutString
( Destination : in out String;
Pointer : in out Integer;
Value : in String;
Field : in Natural := 0;
Justify : in Alignment := Left;
Fill : in Character := ' '
) is
OutField : Natural := Field;
begin
if OutField = 0 then
OutField := Value'Length;
end if;
if ( Pointer < Destination'First
or else
Pointer + OutField - 1 > Destination'Last
or else
OutField < Value'Length
)
then
raise Layout_Error;
end if;
if OutField /= 0 then
if OutField = Value'Length then
Destination (Pointer..Pointer + OutField - 1) := Value;
else
declare
First : Integer;
Next : Integer;
begin
case Justify is
when Left =>
First := Pointer;
Next := First + Value'Length;
for Position in Next..Pointer + OutField - 1 loop
Destination (Position) := Fill;
end loop;
when Center =>
First := Pointer + (OutField - Value'Length) / 2;
Next := First + Value'Length;
for Position in Pointer..First - 1 loop
Destination (Position) := Fill;
end loop;
for Position in Next..Pointer + OutField - 1 loop
Destination (Position) := Fill;
end loop;
when Right =>
Next := Pointer + OutField;
First := Next - Value'Length;
for Position in Pointer..First - 1 loop
Destination (Position) := Fill;
end loop;
end case;
Destination (First..Next - 1) := Value;
end;
end if;
Pointer := Pointer + OutField;
end if;
end PutString;
procedure PutCharacter
( Destination : in out String;
Pointer : in out Integer;
Value : in Character;
Field : in Natural := 0;
Justify : in Alignment := Left;
Fill : in Character := ' '
) is
Text : constant String (1..1) := (1 => Value);
begin
Put (Destination, Pointer, Text, Field, Justify, Fill);
end PutCharacter;
end Text_Edit;
|
with
ada.unchecked_Deallocation;
package body gel.Mouse.local
is
package body Forge
is
function to_Mouse (of_Name : in String) return Item
is
begin
return Self : constant Item := (lace.Subject.local.Forge.to_Subject (of_Name)
with null record)
do
null;
end return;
end to_Mouse;
function new_Mouse (of_Name : in String) return View
is
begin
return new Item' (to_Mouse (of_Name));
end new_Mouse;
end Forge;
procedure free (Self : in out View)
is
procedure deallocate is new ada.unchecked_Deallocation (Item'Class, View);
begin
Self.destroy;
deallocate (Self);
end free;
end gel.Mouse.local;
|
with SDL_video_h; use SDL_video_h;
with Interfaces.C; use Interfaces.C;
with Interfaces.C.Extensions; use Interfaces.C.Extensions;
with SDL_stdinc_h; use SDL_stdinc_h;
with SDL_surface_h; use SDL_surface_h;
package Display.Basic.Utils is
function RGBA_To_Uint32(Screen : access SDL_Surface;
Color : RGBA_T) return Uint32;
procedure Put_Pixel_Slow (Screen : access SDL_Surface;
X, Y : Integer; Color : RGBA_T);
procedure Put_Pixel (Screen : access SDL_Surface;
X, Y : Integer; Color : Uint32);
type T_Internal_Canvas is record
Surface : access SDL_Surface;
Zoom_Factor : Float := 1.0;
Center : Screen_Point := (0, 0);
end record;
procedure Set_Zoom_Factor (Canvas : Canvas_Id; ZF : Float);
procedure Set_Center (Canvas : Canvas_ID; Center : Screen_Point);
function Get_Center (Canvas : Canvas_ID) return Screen_Point;
function Register_SDL_Surface(S : access SDL_Surface) return Canvas_ID;
procedure Update_SDL_Surface(Canvas : Canvas_ID; S : access SDL_Surface);
function Get_Internal_Canvas(Canvas : Canvas_ID) return T_Internal_Canvas with Inline;
private
type Internal_Canvas_Array is array (Canvas_ID) of T_Internal_Canvas;
Internal_Canvas : Internal_Canvas_Array;
end Display.Basic.Utils;
|
--===========================================================================
--
-- This package is the implementation of the Transforme package
--
--===========================================================================
--
-- Copyright 2022 (C) Holger Rodriguez
--
-- SPDX-License-Identifier: BSD-3-Clause
--
package body SH1107.Transformer is
--------------------------------------------------------------------------
-- This driver has 128 columns
COLUMN_SIZE : constant Natural := 128;
--------------------------------------------------------------------------
-- This driver has 16 pages
PAGE_SIZE : constant Natural := 16;
--========================================================================
--
-- This section is the implementation of the get byte index calculation
--
--========================================================================
function Get_Page_Up (Y : Natural) return Natural;
function Get_Page_Right (X : Natural) return Natural;
function Get_Page_Down (Y : Natural) return Natural;
function Get_Page_Left (X : Natural) return Natural;
function Get_Column_Up (X : Natural) return Natural;
function Get_Column_Right (Y : Natural) return Natural;
function Get_Column_Down (X : Natural) return Natural;
function Get_Column_Left (Y : Natural) return Natural;
--------------------------------------------------------------------------
-- see .ads
function Get_Byte_Index (O : SH1107_Orientation;
X, Y : Natural) return Natural is
begin
case O is
when Up =>
return COLUMN_SIZE * Get_Page_Up (Y) + Get_Column_Up (X);
when Right =>
return COLUMN_SIZE * Get_Page_Right (X) + Get_Column_Right (Y);
when Down =>
return COLUMN_SIZE * Get_Page_Down (Y) + Get_Column_Down (X);
when Left =>
return COLUMN_SIZE * Get_Page_Left (X) + Get_Column_Left (Y);
end case;
end Get_Byte_Index;
--------------------------------------------------------------------------
-- If the orienation is Up, this means, that the Y-coordinates
-- map from a logical perspective:
-- increasing Y coordinates are mapped to increasing pages
function Get_Page_Up (Y : Natural) return Natural is
begin
return Y / 8;
end Get_Page_Up;
--------------------------------------------------------------------------
-- If the orienation is Right, this means, that the X-coordinates
-- map from a logical perspective:
-- increasing X coordinates are mapped to decreasing pages
function Get_Page_Right (X : Natural) return Natural is
begin
return PAGE_SIZE - 1 - X / 8;
end Get_Page_Right;
--------------------------------------------------------------------------
-- If the orienation is Down, this means, that the Y-coordinates
-- map from a logical perspective:
-- increasing Y coordinates are mapped to decreasing pages
function Get_Page_Down (Y : Natural) return Natural is
begin
return PAGE_SIZE - 1 - Y / 8;
end Get_Page_Down;
--------------------------------------------------------------------------
-- If the orienation is Left, this means, that the X-coordinates
-- map from a logical perspective:
-- increasing X coordinates are mapped to increasing pages
function Get_Page_Left (X : Natural) return Natural is
begin
return X / 8;
end Get_Page_Left;
--------------------------------------------------------------------------
-- If the orienation is Up, this means, that the X-coordinates
-- map from a logical perspective:
-- increasing X coordinates are mapped to increasing columns
function Get_Column_Up (X : Natural) return Natural is
begin
return X;
end Get_Column_Up;
--------------------------------------------------------------------------
-- If the orienation is Right, this means, that the Y-coordinates
-- map from a logical perspective:
-- increasing Y coordinates are mapped to increasing columns
function Get_Column_Right (Y : Natural) return Natural is
begin
return Y;
end Get_Column_Right;
--------------------------------------------------------------------------
-- If the orienation is Down, this means, that the X-coordinates
-- map from a logical perspective:
-- increasing x coordinates are mapped to decreasing columns
function Get_Column_Down (X : Natural) return Natural is
begin
return SH1107.THE_WIDTH - 1 - X;
end Get_Column_Down;
--------------------------------------------------------------------------
-- If the orienation is Left, this means, that the Y-coordinates
-- map from a logical perspective:
-- increasing Y coordinates are mapped to decreasing columns
function Get_Column_Left (Y : Natural) return Natural is
begin
return SH1107.THE_HEIGHT - 1 - Y;
end Get_Column_Left;
--========================================================================
--
-- This section is the implementation of the bit mask calculation
--
--========================================================================
function Bit_Mask_Up (Y : Natural) return HAL.UInt8;
function Bit_Mask_Right (X : Natural) return HAL.UInt8;
function Bit_Mask_Down (Y : Natural) return HAL.UInt8;
function Bit_Mask_Left (X : Natural) return HAL.UInt8;
--------------------------------------------------------------------------
-- see .ads
function Get_Bit_Mask (O : SH1107_Orientation;
X, Y : Natural) return HAL.UInt8 is
begin
case O is
when Up =>
return Bit_Mask_Up (Y);
when Right =>
return Bit_Mask_Right (X);
when Down =>
return Bit_Mask_Down (Y);
when Left =>
return Bit_Mask_Left (X);
end case;
end Get_Bit_Mask;
--------------------------------------------------------------------------
-- LUT for bits moving from D0 to D7 in a byte
LUT_DO_D7 : constant HAL.UInt8_Array (0 .. 7) := (
0 => 16#01#,
1 => 16#02#,
2 => 16#04#,
3 => 16#08#,
4 => 16#10#,
5 => 16#20#,
6 => 16#40#,
7 => 16#80#
);
--------------------------------------------------------------------------
-- LUT for bits moving from D7 to D0 in a byte
LUT_D7_D0 : constant HAL.UInt8_Array (0 .. 7) := (
0 => 16#80#,
1 => 16#40#,
2 => 16#20#,
3 => 16#10#,
4 => 16#08#,
5 => 16#04#,
6 => 16#02#,
7 => 16#01#
);
--------------------------------------------------------------------------
-- If the orienation is Up, this means, that the Y-coordinates
-- map from a logical perspective:
-- increasing Y coordinates moves the bit mask from D0 -> D7
function Bit_Mask_Up (Y : Natural) return HAL.UInt8 is
begin
return LUT_DO_D7 (Y mod 8);
end Bit_Mask_Up;
--------------------------------------------------------------------------
-- If the orienation is Right, this means, that the X-coordinates
-- map from a logical perspective:
-- increasing X coordinates moves the bit mask from D7 -> D0
function Bit_Mask_Right (X : Natural) return HAL.UInt8 is
begin
return LUT_D7_D0 (X mod 8);
end Bit_Mask_Right;
--------------------------------------------------------------------------
-- If the orienation is Down, this means, that the Y-coordinates
-- map from a logical perspective:
-- increasing Y coordincates moves the bit mask from D7 -> D0
function Bit_Mask_Down (Y : Natural) return HAL.UInt8 is
begin
return LUT_D7_D0 (Y mod 8);
end Bit_Mask_Down;
--------------------------------------------------------------------------
-- If the orienation is Left, this means, that the X-coordinates
-- map from a logical perspective:
-- increasing X coordinates moves the bit mask from D0 -> D7
function Bit_Mask_Left (X : Natural) return HAL.UInt8 is
begin
return LUT_DO_D7 (X mod 8);
end Bit_Mask_Left;
end SH1107.Transformer;
|
with
Shell.Commands,
Ada.Text_IO;
procedure Test_Pipeline_Error
is
use Ada.Text_IO;
begin
Put_Line ("Begin 'Pipeline_Error' test.");
New_Line (2);
Put_Line ("Test 1 =>");
declare
use Shell,
Shell.Commands,
Shell.Commands.Forge;
Commands : Command_Array := To_Commands ("ls /non_existent_file | cat");
begin
Run (Commands);
if Failed (Commands)
then
declare
Which : constant Natural := Which_Failed (Commands);
Error : constant String := +Errors_Of (Results_Of (Commands (Which)));
begin
Put_Line ( "Pipeline failed as expected.");
Put_Line ( "Failed on command" & Natural'Image (Which)
& " '" & Commands (Which).Name & "'.");
Put_Line ( "Error message => '" & Error & "'");
end;
end if;
end;
New_Line (2);
Put_Line ("Test 2 =>");
declare
use Shell,
Shell.Commands,
Shell.Commands.Forge;
Commands : Command_Array := To_Commands ("ls /non_existent_file | cat");
begin
Run (Commands, Raise_Error => True);
exception
when Command_Error =>
declare
Which : constant Natural := Which_Failed (Commands);
Error : constant String := +Errors_Of (Results_Of (Commands (Which)));
begin
Put_Line ( "Pipeline failed and raised an exception, as expected.");
Put_Line ( "Failed on command" & Natural'Image (Which)
& " '" & Commands (Which).Name & "'.");
Put_Line ( "Error message => '" & Error & "'");
end;
end;
New_Line (2);
Put_Line ("End 'Pipeline_Error' test.");
end Test_Pipeline_Error;
|
--------------------------------------------------------------------
--| Program/Package : SCREEN Version : 1.0 |
--------------------------------------------------------------------
--| Abstract : ANSI screen manipulation |
--------------------------------------------------------------------
--| File : screenpkg.ads |
--| Compiler/System : IBM AIX/6000 Ada |
--| Author : John Dalbey Date : 9/28/93 |
--| References : Feldman textbook |
--------------------------------------------------------------------
--| Limitations : To work properly, must be run on VT100 terminal.|
--------------------------------------------------------------------
PACKAGE Screen IS
Screen_Depth : CONSTANT Integer := 24;
Screen_Width : CONSTANT Integer := 80;
SUBTYPE Depth IS Integer RANGE 1..Screen_Depth;
SUBTYPE Width IS Integer RANGE 1..Screen_Width;
TYPE Attribute IS (normal, bold, inverse, blink);
PROCEDURE Beep;
-- assumes : nothing
-- results : the terminal issues a beep tone.
PROCEDURE ClearScreen;
-- assumes : nothing
-- results : the screen is cleared.
PROCEDURE MoveCursor (Row : Depth; Column : Width);
-- assumes : Row and Column have a value.
-- results : The cursor is moved to position (Row, Column).
-- exceptions : Constraint_error can be raised
PROCEDURE SetAttribute (The_Attribute: Attribute);
-- assumes : The_Attribute has a value.
-- results : Subsequent text will be displayed using The_Attribute.
PROCEDURE SaveCursor;
-- assumes : nothing
-- results : the current position of the cursor is saved.
PROCEDURE RestoreCursor;
-- assumes : nothing
-- results : the cursor is restored to it's previously saved position.
END Screen;
|
private with Ada.Containers.Indefinite_Vectors;
generic
type Item_Type (<>) is private;
package History_Variables is
type Variable is tagged limited private;
-- set and get current value
procedure Set(V: in out Variable; Item: Item_Type);
function Get(V: Variable) return Item_Type;
-- number of items in history (including the current one)
function Defined(V: Variable) return Natural;
-- non-destructively search for old values
function Peek(V: Variable; Generation: Natural := 1) return Item_Type;
-- V.Peek(0) returns current value; V.Peek(1) the previous value, etc.
-- when calling V.Peek(i), i must be in 0 .. V.Defined-1, else Constraint_Error is raised
-- destructively restore previous value
procedure Undo(V: in out Variable);
-- old V.Peek(0) is forgotten, old V.Peek(i) is new V.Peek(i-1), etc.
-- accordingly, V.Defined decrements by 1
-- special case: if V.Defined=0 then V.Undo does not change V
private
package Vectors is new Ada.Containers.Indefinite_Vectors
(Index_Type => Positive,
Element_Type => Item_Type);
type Variable is tagged limited record
History: Vectors.Vector;
end record;
end History_Variables;
|
-- CC3019C2M.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 INSTANTIATIONS OF UNITS WITHIN GENERIC UNITS, E.G.
-- TO SUPPORT ITERATORS.
-- THIS TEST SPECIFICALLY CHECKS THAT A
-- NESTING LEVEL OF 3 IS SUPPORTED FOR GENERICS:
-- INSTANTIATE CC3019C1_NESTED_GENERICS IN THE MAIN
-- PROCEDURE, THE INSTANTIATION OF CC3019C0_LIST_CLASS
-- IN GENERIC PACKAGE CC3019C1_NESTED_GENERICS, AND
-- THE INSTANTIATION OF NEW_LIST_CLASS.ITERATE IN
-- PROCEDURE ITERATE IN PACKAGE BODY STACK_CLASS.
--
-- *** THIS IS THE MAIN PROGRAM. IT MUST BE COMPILED AFTER THE
-- *** SOURCE CODE IN FILES CC3019C0.ADA AND CC3019C1.ADA HAVE
-- *** BEEN COMPILED.
--
-- HISTORY:
-- EDWARD V. BERARD, 31 AUGUST 1990
WITH REPORT ;
WITH CC3019C1_NESTED_GENERICS ;
PROCEDURE CC3019C2M IS
TYPE MONTH_TYPE IS (JAN, FEB, MAR, APR, MAY, JUN, JUL, AUG,
SEP, OCT, NOV, DEC) ;
TYPE DAY_TYPE IS RANGE 1 .. 31 ;
TYPE YEAR_TYPE IS RANGE 1904 .. 2050 ;
TYPE DATE IS RECORD
MONTH : MONTH_TYPE ;
DAY : DAY_TYPE ;
YEAR : YEAR_TYPE ;
END RECORD ;
STORE_DATE : DATE ;
TODAY : DATE := (MONTH => AUG,
DAY => 31,
YEAR => 1990) ;
FIRST_DATE : DATE := (MONTH => JUN,
DAY => 4,
YEAR => 1967) ;
BIRTH_DATE : DATE := (MONTH => OCT,
DAY => 3,
YEAR => 1949) ;
WALL_DATE : DATE := (MONTH => NOV,
DAY => 9,
YEAR => 1989) ;
TYPE SEX IS (MALE, FEMALE) ;
TYPE PERSON IS RECORD
BIRTH_DATE : DATE ;
GENDER : SEX ;
NAME : STRING (1 .. 10) ;
END RECORD ;
FIRST_PERSON : PERSON ;
SECOND_PERSON : PERSON ;
MYSELF : PERSON := (BIRTH_DATE => BIRTH_DATE,
GENDER => MALE,
NAME => "ED ") ;
FRIEND : PERSON := (BIRTH_DATE => DATE'(DEC, 27, 1949),
GENDER => MALE,
NAME => "DENNIS ") ;
FATHER : PERSON := (BIRTH_DATE => DATE'(JUL, 5, 1925),
GENDER => MALE,
NAME => "EDWARD ") ;
DAUGHTER : PERSON := (BIRTH_DATE => DATE'(DEC, 10, 1980),
GENDER => FEMALE,
NAME => "CHRISSY ") ;
PROCEDURE ASSIGN (THE_VALUE_OF_THIS_DATE : IN OUT DATE ;
TO_THIS_DATE : IN OUT DATE) ;
FUNCTION IS_EQUAL (LEFT : IN DATE ;
RIGHT : IN DATE) RETURN BOOLEAN ;
PROCEDURE ASSIGN (THE_VALUE_OF_THIS_PERSON : IN OUT PERSON ;
TO_THIS_PERSON : IN OUT PERSON) ;
FUNCTION IS_EQUAL (LEFT : IN PERSON ;
RIGHT : IN PERSON) RETURN BOOLEAN ;
-- INSTANTIATE OUTER GENERIC PACKAGE
PACKAGE NEW_NESTED_GENERICS IS NEW
CC3019C1_NESTED_GENERICS (ELEMENT => DATE,
ASSIGN => ASSIGN,
"=" => IS_EQUAL) ;
FIRST_NNG : NEW_NESTED_GENERICS.NESTED_GENERICS_TYPE ;
SECOND_NNG : NEW_NESTED_GENERICS.NESTED_GENERICS_TYPE ;
FUNCTION "=" (LEFT : IN NEW_NESTED_GENERICS.NESTED_GENERICS_TYPE ;
RIGHT : IN NEW_NESTED_GENERICS.NESTED_GENERICS_TYPE)
RETURN BOOLEAN RENAMES NEW_NESTED_GENERICS."=" ;
-- INSTANTIATE NESTED TASK PACKAGE
PACKAGE NEW_GENERIC_TASK IS NEW
NEW_NESTED_GENERICS.GENERIC_TASK (ELEMENT => PERSON,
ASSIGN => ASSIGN) ;
FIRST_GENERIC_TASK : NEW_GENERIC_TASK.PROTECTED_AREA ;
SECOND_GENERIC_TASK : NEW_GENERIC_TASK.PROTECTED_AREA ;
-- INSTANTIATE NESTED STACK PACKAGE
PACKAGE PERSON_STACK IS NEW
NEW_NESTED_GENERICS.STACK_CLASS (ELEMENT => PERSON,
ASSIGN => ASSIGN,
"=" => IS_EQUAL) ;
FIRST_PERSON_STACK : PERSON_STACK.STACK ;
SECOND_PERSON_STACK : PERSON_STACK.STACK ;
THIRD_PERSON_STACK : PERSON_STACK.STACK ;
FUNCTION "=" (LEFT : IN PERSON_STACK.STACK ;
RIGHT : IN PERSON_STACK.STACK) RETURN BOOLEAN
RENAMES PERSON_STACK."=" ;
PROCEDURE ASSIGN (THE_VALUE_OF_THIS_DATE : IN OUT DATE ;
TO_THIS_DATE : IN OUT DATE) IS
BEGIN -- ASSIGN
TO_THIS_DATE := THE_VALUE_OF_THIS_DATE ;
END ASSIGN ;
FUNCTION IS_EQUAL (LEFT : IN DATE ;
RIGHT : IN DATE) RETURN BOOLEAN IS
BEGIN -- IS_EQUAL
IF (LEFT.MONTH = RIGHT.MONTH) AND (LEFT.DAY = RIGHT.DAY)
AND (LEFT.YEAR = RIGHT.YEAR) THEN
RETURN TRUE ;
ELSE
RETURN FALSE ;
END IF ;
END IS_EQUAL ;
PROCEDURE ASSIGN (THE_VALUE_OF_THIS_PERSON : IN OUT PERSON ;
TO_THIS_PERSON : IN OUT PERSON) IS
BEGIN -- ASSIGN
TO_THIS_PERSON := THE_VALUE_OF_THIS_PERSON ;
END ASSIGN ;
FUNCTION IS_EQUAL (LEFT : IN PERSON ;
RIGHT : IN PERSON) RETURN BOOLEAN IS
BEGIN -- IS_EQUAL
IF (LEFT.BIRTH_DATE = RIGHT.BIRTH_DATE) AND
(LEFT.GENDER = RIGHT.GENDER) AND
(LEFT.NAME = RIGHT.NAME) THEN
RETURN TRUE ;
ELSE
RETURN FALSE ;
END IF ;
END IS_EQUAL ;
BEGIN -- CC3019C2M
REPORT.TEST ("CC3019C2M",
"CHECK INSTANTIATIONS OF UNITS WITHIN GENERIC " &
"UNITS, E.G., TO SUPPORT ITERATORS. THIS TEST " &
"SPECIFICALLY CHECKS THAT A NESTING LEVEL OF 3 " &
"IS SUPPORTED FOR GENERICS.") ;
-- CHECK THE OUTERMOST GENERIC (NEW_NESTED_GENERICS)
NEW_NESTED_GENERICS.SET_ELEMENT (
FOR_THIS_NGT_OBJECT => FIRST_NNG,
TO_THIS_ELEMENT => TODAY) ;
NEW_NESTED_GENERICS.SET_NUMBER (
FOR_THIS_NGT_OBJECT => FIRST_NNG,
TO_THIS_NUMBER => 1) ;
NEW_NESTED_GENERICS.SET_ELEMENT (
FOR_THIS_NGT_OBJECT => SECOND_NNG,
TO_THIS_ELEMENT => FIRST_DATE) ;
NEW_NESTED_GENERICS.SET_NUMBER (
FOR_THIS_NGT_OBJECT => SECOND_NNG,
TO_THIS_NUMBER => 2) ;
IF FIRST_NNG = SECOND_NNG THEN
REPORT.FAILED ("PROBLEMS WITH TESTING EQUALITY FOR " &
"OUTERMOST GENERIC") ;
END IF ;
IF (NEW_NESTED_GENERICS.ELEMENT_OF (THIS_NGT_OBJECT => FIRST_NNG)
/= TODAY) OR
(NEW_NESTED_GENERICS.ELEMENT_OF (
THIS_NGT_OBJECT => SECOND_NNG)
/= FIRST_DATE) THEN
REPORT.FAILED ("PROBLEMS WITH EXTRACTING ELEMENTS IN " &
"OUTERMOST GENERIC") ;
END IF ;
IF (NEW_NESTED_GENERICS.NUMBER_OF (THIS_NGT_OBJECT => FIRST_NNG)
/= 1) OR
(NEW_NESTED_GENERICS.NUMBER_OF (THIS_NGT_OBJECT => SECOND_NNG)
/= 2) THEN
REPORT.FAILED ("PROBLEMS WITH EXTRACTING NUMBERS IN " &
"OUTERMOST GENERIC") ;
END IF ;
NEW_NESTED_GENERICS.COPY (SOURCE => FIRST_NNG,
DESTINATION => SECOND_NNG) ;
IF FIRST_NNG /= SECOND_NNG THEN
REPORT.FAILED ("PROBLEMS WITH COPYING OR TESTING EQUALITY " &
"IN OUTERMOST GENERIC") ;
END IF ;
-- CHECK THE FIRST NESTED GENERIC (GENERIC_TASK)
FIRST_GENERIC_TASK.STORE (ITEM => MYSELF) ;
SECOND_GENERIC_TASK.STORE (ITEM => FRIEND) ;
FIRST_GENERIC_TASK.GET (ITEM => FIRST_PERSON) ;
SECOND_GENERIC_TASK.GET (ITEM => SECOND_PERSON) ;
IF (FIRST_PERSON /= MYSELF) OR (SECOND_PERSON /= FRIEND) THEN
REPORT.FAILED ("PROBLEMS WITH NESTED TASK GENERIC") ;
END IF ;
-- CHECK THE SECOND NESTED GENERIC (STACK_CLASS)
PERSON_STACK.CLEAR (THIS_STACK => FIRST_PERSON_STACK) ;
IF PERSON_STACK.NUMBER_OF_ELEMENTS
(ON_THIS_STACK => FIRST_PERSON_STACK) /= 0 THEN
REPORT.FAILED (
"IMPROPER VALUE RETURNED FROM NUMBER_OF_ELEMENTS - 1") ;
END IF ;
PERSON_STACK.PUSH (THIS_ELEMENT => MYSELF,
ON_TO_THIS_STACK => FIRST_PERSON_STACK) ;
IF PERSON_STACK.NUMBER_OF_ELEMENTS
(ON_THIS_STACK => FIRST_PERSON_STACK) /= 1 THEN
REPORT.FAILED (
"IMPROPER VALUE RETURNED FROM NUMBER_OF_ELEMENTS - 2") ;
END IF ;
PERSON_STACK.PUSH (THIS_ELEMENT => FRIEND,
ON_TO_THIS_STACK => FIRST_PERSON_STACK) ;
IF PERSON_STACK.NUMBER_OF_ELEMENTS
(ON_THIS_STACK => FIRST_PERSON_STACK) /= 2 THEN
REPORT.FAILED (
"IMPROPER VALUE RETURNED FROM NUMBER_OF_ELEMENTS - 3") ;
END IF ;
PERSON_STACK.PUSH (THIS_ELEMENT => FATHER,
ON_TO_THIS_STACK => FIRST_PERSON_STACK) ;
IF PERSON_STACK.NUMBER_OF_ELEMENTS
(ON_THIS_STACK => FIRST_PERSON_STACK) /= 3 THEN
REPORT.FAILED (
"IMPROPER VALUE RETURNED FROM NUMBER_OF_ELEMENTS - 4") ;
END IF ;
PERSON_STACK.POP (THIS_ELEMENT => FIRST_PERSON,
OFF_THIS_STACK => FIRST_PERSON_STACK) ;
IF PERSON_STACK.NUMBER_OF_ELEMENTS
(ON_THIS_STACK => FIRST_PERSON_STACK) /= 2 THEN
REPORT.FAILED (
"IMPROPER VALUE RETURNED FROM NUMBER_OF_ELEMENTS - 5") ;
END IF ;
IF FIRST_PERSON /= FATHER THEN
REPORT.FAILED (
"IMPROPER VALUE REMOVED FROM STACK - 1") ;
END IF ;
PERSON_STACK.CLEAR (THIS_STACK => SECOND_PERSON_STACK) ;
IF PERSON_STACK.NUMBER_OF_ELEMENTS
(ON_THIS_STACK => SECOND_PERSON_STACK) /= 0 THEN
REPORT.FAILED (
"IMPROPER VALUE RETURNED FROM NUMBER_OF_ELEMENTS - 6") ;
END IF ;
PERSON_STACK.COPY (THIS_STACK => FIRST_PERSON_STACK,
TO_THIS_STACK => SECOND_PERSON_STACK) ;
IF FIRST_PERSON_STACK /= SECOND_PERSON_STACK THEN
REPORT.FAILED (
"PROBLEMS WITH COPY OR TEST FOR EQUALITY (STACK)") ;
END IF ;
PERSON_STACK.POP (THIS_ELEMENT => FIRST_PERSON,
OFF_THIS_STACK => SECOND_PERSON_STACK) ;
PERSON_STACK.PUSH (THIS_ELEMENT => DAUGHTER,
ON_TO_THIS_STACK => SECOND_PERSON_STACK) ;
IF FIRST_PERSON_STACK = SECOND_PERSON_STACK THEN
REPORT.FAILED (
"PROBLEMS WITH POP OR TEST FOR EQUALITY (STACK)") ;
END IF ;
UNDERFLOW_EXCEPTION_TEST:
BEGIN -- UNDERFLOW_EXCEPTION_TEST
PERSON_STACK.CLEAR (THIS_STACK => THIRD_PERSON_STACK) ;
PERSON_STACK.POP (THIS_ELEMENT => FIRST_PERSON,
OFF_THIS_STACK => THIRD_PERSON_STACK) ;
REPORT.FAILED ("UNDERFLOW EXCEPTION NOT RAISED") ;
EXCEPTION
WHEN PERSON_STACK.UNDERFLOW => NULL ; -- CORRECT EXCEPTION
-- RAISED
WHEN OTHERS =>
REPORT.FAILED ("INCORRECT EXCEPTION RAISED IN " &
"UNDERFLOW EXCEPTION TEST") ;
END UNDERFLOW_EXCEPTION_TEST ;
OVERFLOW_EXCEPTION_TEST:
BEGIN -- OVERFLOW_EXCEPTION_TEST
PERSON_STACK.CLEAR (THIS_STACK => THIRD_PERSON_STACK) ;
FOR INDEX IN 1 .. 10 LOOP
PERSON_STACK.PUSH (
THIS_ELEMENT => MYSELF,
ON_TO_THIS_STACK => THIRD_PERSON_STACK) ;
END LOOP ;
PERSON_STACK.PUSH (THIS_ELEMENT => MYSELF,
ON_TO_THIS_STACK => THIRD_PERSON_STACK) ;
REPORT.FAILED ("OVERFLOW EXCEPTION NOT RAISED") ;
EXCEPTION
WHEN PERSON_STACK.OVERFLOW => NULL ; -- CORRECT EXCEPTION
-- RAISED
WHEN OTHERS =>
REPORT.FAILED ("INCORRECT EXCEPTION RAISED IN " &
"OVERFLOW EXCEPTION TEST") ;
END OVERFLOW_EXCEPTION_TEST ;
LOCAL_BLOCK:
DECLARE
TYPE PERSON_TABLE IS ARRAY (POSITIVE RANGE 1 .. 10) OF PERSON;
FIRST_PERSON_TABLE : PERSON_TABLE ;
TABLE_INDEX : POSITIVE := 1 ;
PROCEDURE GATHER_PEOPLE (THIS_PERSON : IN PERSON ;
CONTINUE : OUT BOOLEAN) ;
PROCEDURE SHOW_PEOPLE (THIS_PERSON : IN PERSON ;
CONTINUE : OUT BOOLEAN) ;
PROCEDURE GATHER_PERSON_ITERATE IS NEW
PERSON_STACK.ITERATE (PROCESS => GATHER_PEOPLE) ;
PROCEDURE SHOW_PERSON_ITERATE IS NEW
PERSON_STACK.ITERATE (PROCESS => SHOW_PEOPLE) ;
PROCEDURE GATHER_PEOPLE (THIS_PERSON : IN PERSON ;
CONTINUE : OUT BOOLEAN) IS
BEGIN -- GATHER_PEOPLE
FIRST_PERSON_TABLE (TABLE_INDEX) := THIS_PERSON ;
TABLE_INDEX := TABLE_INDEX + 1 ;
CONTINUE := TRUE ;
END GATHER_PEOPLE ;
PROCEDURE SHOW_PEOPLE (THIS_PERSON : IN PERSON ;
CONTINUE : OUT BOOLEAN) IS
BEGIN -- SHOW_PEOPLE
REPORT.COMMENT ("THE BIRTH MONTH IS " &
MONTH_TYPE'IMAGE (THIS_PERSON.BIRTH_DATE.MONTH)) ;
REPORT.COMMENT ("THE BIRTH DAY IS " &
DAY_TYPE'IMAGE (THIS_PERSON.BIRTH_DATE.DAY)) ;
REPORT.COMMENT ("THE BIRTH YEAR IS " &
YEAR_TYPE'IMAGE (THIS_PERSON.BIRTH_DATE.YEAR)) ;
REPORT.COMMENT ("THE GENDER IS " &
SEX'IMAGE (THIS_PERSON.GENDER)) ;
REPORT.COMMENT ("THE NAME IS " & THIS_PERSON.NAME) ;
CONTINUE := TRUE ;
END SHOW_PEOPLE ;
BEGIN -- LOCAL_BLOCK
REPORT.COMMENT ("CONTENTS OF THE FIRST STACK") ;
SHOW_PERSON_ITERATE (OVER_THIS_STACK => FIRST_PERSON_STACK) ;
REPORT.COMMENT ("CONTENTS OF THE SECOND STACK") ;
SHOW_PERSON_ITERATE (OVER_THIS_STACK => SECOND_PERSON_STACK) ;
GATHER_PERSON_ITERATE (OVER_THIS_STACK => FIRST_PERSON_STACK);
IF (FIRST_PERSON_TABLE (1) /= MYSELF) OR
(FIRST_PERSON_TABLE (2) /= FRIEND) THEN
REPORT.FAILED ("PROBLEMS WITH ITERATION - 1") ;
END IF ;
TABLE_INDEX := 1 ;
GATHER_PERSON_ITERATE(OVER_THIS_STACK => SECOND_PERSON_STACK);
IF (FIRST_PERSON_TABLE (1) /= MYSELF) OR
(FIRST_PERSON_TABLE (2) /= DAUGHTER) THEN
REPORT.FAILED ("PROBLEMS WITH ITERATION - 2") ;
END IF ;
END LOCAL_BLOCK ;
REPORT.RESULT ;
END CC3019C2M ;
|
-----------------------------------------------------------------------
-- gen-testsuite -- Testsuite for gen
-- Copyright (C) 2012, 2018 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.Directories;
with Ada.Strings.Unbounded;
with Gen.Artifacts.XMI.Tests;
with Gen.Artifacts.Yaml.Tests;
with Gen.Integration.Tests;
package body Gen.Testsuite is
Tests : aliased Util.Tests.Test_Suite;
Dir : Ada.Strings.Unbounded.Unbounded_String;
function Suite return Util.Tests.Access_Test_Suite is
Result : constant Util.Tests.Access_Test_Suite := Tests'Access;
begin
Gen.Artifacts.XMI.Tests.Add_Tests (Result);
Gen.Artifacts.Yaml.Tests.Add_Tests (Result);
Gen.Integration.Tests.Add_Tests (Result);
return Result;
end Suite;
-- ------------------------------
-- Get the test root directory.
-- ------------------------------
function Get_Test_Directory return String is
begin
return Ada.Strings.Unbounded.To_String (Dir);
end Get_Test_Directory;
procedure Initialize (Props : in Util.Properties.Manager) is
pragma Unreferenced (Props);
begin
Dir := Ada.Strings.Unbounded.To_Unbounded_String (Ada.Directories.Current_Directory);
end Initialize;
end Gen.Testsuite;
|
-----------------------------------------------------------------------
-- util-streams-buffered-lzma -- LZMA streams
-- Copyright (C) 2018, 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 Lzma.Check;
with Lzma.Container;
with Interfaces.C;
with Ada.IO_Exceptions;
package body Util.Streams.Buffered.Lzma is
use type Interfaces.C.size_t;
use type Base.lzma_ret;
subtype size_t is Interfaces.C.size_t;
subtype Offset is Ada.Streams.Stream_Element_Offset;
-- -----------------------
-- Initialize the stream to write on the given stream.
-- An internal buffer is allocated for writing the stream.
-- -----------------------
overriding
procedure Initialize (Stream : in out Compress_Stream;
Output : access Output_Stream'Class;
Size : in Positive) is
Result : Base.lzma_ret;
begin
Output_Buffer_Stream (Stream).Initialize (Output, Size);
Stream.Stream.next_out := Stream.Buffer (Stream.Buffer'First)'Unchecked_Access;
Stream.Stream.avail_out := Stream.Buffer'Length;
Result := Container.lzma_easy_encoder (Stream.Stream'Unchecked_Access, 6,
Check.LZMA_CHECK_CRC64);
if Result /= Base.LZMA_OK then
raise Ada.IO_Exceptions.Device_Error with "Cannot initialize compressor";
end if;
end Initialize;
-- -----------------------
-- Close the sink.
-- -----------------------
overriding
procedure Close (Stream : in out Compress_Stream) is
begin
Stream.Flush;
Output_Buffer_Stream (Stream).Close;
end Close;
-- -----------------------
-- Write the buffer array to the output stream.
-- -----------------------
overriding
procedure Write (Stream : in out Compress_Stream;
Buffer : in Ada.Streams.Stream_Element_Array) is
Last_Pos : Ada.Streams.Stream_Element_Offset;
Encoded : Boolean := False;
Result : Base.lzma_ret;
begin
loop
if Stream.Stream.avail_in = 0 then
Stream.Stream.next_in := Buffer (Buffer'First)'Unrestricted_Access;
Stream.Stream.avail_in := size_t (Buffer'Length);
Encoded := True;
end if;
Result := Base.lzma_code (Stream.Stream'Unchecked_Access, Base.LZMA_RUN);
-- Write the output data when the buffer is full or we reached the end of stream.
if Stream.Stream.avail_out = 0 or Result = Base.LZMA_STREAM_END then
Last_Pos := Stream.Buffer'First + Stream.Buffer'Length
- Offset (Stream.Stream.avail_out) - 1;
Stream.Output.Write (Stream.Buffer (Stream.Buffer'First .. Last_Pos));
Stream.Stream.next_out := Stream.Buffer (Stream.Buffer'First)'Unchecked_Access;
Stream.Stream.avail_out := Stream.Buffer'Length;
end if;
exit when Result /= Base.LZMA_OK or (Stream.Stream.avail_in = 0 and Encoded);
end loop;
end Write;
-- -----------------------
-- Flush the buffer by writing on the output stream.
-- Raises Data_Error if there is no output stream.
-- -----------------------
overriding
procedure Flush (Stream : in out Compress_Stream) is
Last_Pos : Ada.Streams.Stream_Element_Offset;
Result : Base.lzma_ret;
begin
-- Stream is closed, ignore the flush.
if Stream.Buffer = null then
return;
end if;
Stream.Stream.next_in := null;
Stream.Stream.avail_in := 0;
loop
Result := Base.lzma_code (Stream.Stream'Unchecked_Access, Base.LZMA_FINISH);
if Stream.Stream.avail_out = 0 or Result = Base.LZMA_STREAM_END then
Last_Pos := Stream.Buffer'First + Stream.Buffer'Length
- Offset (Stream.Stream.avail_out) - 1;
if Last_Pos >= Stream.Buffer'First then
Stream.Output.Write (Stream.Buffer (Stream.Buffer'First .. Last_Pos));
end if;
Stream.Stream.next_out := Stream.Buffer (Stream.Buffer'First)'Unchecked_Access;
Stream.Stream.avail_out := Stream.Buffer'Length;
end if;
exit when Result /= Base.LZMA_OK;
end loop;
end Flush;
-- -----------------------
-- Flush the stream and release the buffer.
-- -----------------------
overriding
procedure Finalize (Object : in out Compress_Stream) is
begin
Object.Flush;
Output_Buffer_Stream (Object).Finalize;
Base.lzma_end (Object.Stream'Unchecked_Access);
end Finalize;
-- -----------------------
-- Initialize the stream to write on the given stream.
-- An internal buffer is allocated for writing the stream.
-- -----------------------
overriding
procedure Initialize (Stream : in out Decompress_Stream;
Input : access Input_Stream'Class;
Size : in Positive) is
Result : Base.lzma_ret;
begin
Input_Buffer_Stream (Stream).Initialize (Input, Size);
Stream.Stream.next_in := Stream.Buffer (Stream.Buffer'First)'Unchecked_Access;
Stream.Stream.avail_in := 0;
Result := Container.lzma_stream_decoder (Stream.Stream'Unchecked_Access,
Long_Long_Integer'Last,
Container.LZMA_CONCATENATED);
if Result /= Base.LZMA_OK then
raise Ada.IO_Exceptions.Device_Error with "Cannot initialize decompressor";
end if;
end Initialize;
-- -----------------------
-- Write the buffer array to the output stream.
-- -----------------------
overriding
procedure Read (Stream : in out Decompress_Stream;
Into : out Ada.Streams.Stream_Element_Array;
Last : out Ada.Streams.Stream_Element_Offset) is
use type Base.lzma_action;
Result : Base.lzma_ret;
begin
Stream.Stream.next_out := Into (Into'First)'Unrestricted_Access;
Stream.Stream.avail_out := Into'Length;
loop
if Stream.Stream.avail_in = 0 and not Stream.Is_Eof
and Stream.Action = Base.LZMA_RUN
then
Stream.Fill;
if Stream.Write_Pos >= Stream.Read_Pos then
Stream.Stream.avail_in := size_t (Stream.Write_Pos - Stream.Read_Pos);
Stream.Stream.next_in := Stream.Buffer (Stream.Buffer'First)'Unchecked_Access;
else
Stream.Stream.avail_in := 0;
Stream.Stream.next_in := null;
Stream.Action := Base.LZMA_FINISH;
end if;
end if;
Result := Base.lzma_code (Stream.Stream'Unchecked_Access, Stream.Action);
if Stream.Stream.avail_out = 0 or Result = Base.LZMA_STREAM_END then
Last := Into'First + Into'Length
- Offset (Stream.Stream.avail_out) - 1;
return;
end if;
if Result /= Base.LZMA_OK then
raise Ada.IO_Exceptions.Data_Error with "Decompression error";
end if;
end loop;
end Read;
-- -----------------------
-- Flush the stream and release the buffer.
-- -----------------------
overriding
procedure Finalize (Object : in out Decompress_Stream) is
begin
Base.lzma_end (Object.Stream'Unchecked_Access);
Input_Buffer_Stream (Object).Finalize;
end Finalize;
end Util.Streams.Buffered.Lzma;
|
-- SPDX-FileCopyrightText: 2020 Max Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-------------------------------------------------------------
--
-- This package provides Unit_Naming_Schema interface and its methods.
package Program.Unit_Naming is
pragma Preelaborate;
type Unit_Naming_Schema is limited interface;
-- Interface to get compilation Text_Name for given compilation unit.
type Unit_Naming_Schema_Access is access all Unit_Naming_Schema'Class;
for Unit_Naming_Schema_Access'Storage_Size use 0;
not overriding function Standard_Text_Name (Self : Unit_Naming_Schema)
return Text is abstract;
-- Get compilation Text_Name for Standard library package.
not overriding function Declaration_Text_Name
(Self : Unit_Naming_Schema;
Name : Program.Text)
return Text is abstract;
-- Get compilation Text_Name for given library declaration unit.
not overriding function Body_Text_Name
(Self : Unit_Naming_Schema;
Name : Program.Text)
return Text is abstract;
-- Get compilation Text_Name for given body.
not overriding function Subunit_Text_Name
(Self : Unit_Naming_Schema;
Name : Program.Text)
return Text is abstract;
-- Get compilation Text_Name for given subunit.
end Program.Unit_Naming;
|
-- { dg-do compile }
with Discr18_Pkg; use Discr18_Pkg;
procedure Discr18 is
String_10 : String (1..10) := "1234567890";
MD : Multiple_Discriminants (A => 10, B => 10) :=
Multiple_Discriminants'(A => 10,
B => 10,
S1 => String_10,
S2 => String_10);
MDE : Multiple_Discriminant_Extension (C => 10) :=
(MD with C => 10, S3 => String_10);
begin
Do_Something(MDE);
end;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
-- --
-- SYSTEM.TASKING.PROTECTED_OBJECTS.ENTRIES --
-- --
-- B o d y --
-- --
-- Copyright (C) 1998-2021, Free Software Foundation, Inc. --
-- --
-- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- --
-- --
-- --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNARL was developed by the GNARL team at Florida State University. --
-- Extensive contributions were provided by Ada Core Technologies, Inc. --
-- --
------------------------------------------------------------------------------
-- This package contains all the simple primitives related to protected
-- objects with entries (i.e init, lock, unlock).
-- The handling of protected objects with no entries is done in
-- System.Tasking.Protected_Objects, the complex routines for protected
-- objects with entries in System.Tasking.Protected_Objects.Operations.
-- The split between Entries and Operations is needed to break circular
-- dependencies inside the run time.
-- Note: the compiler generates direct calls to this interface, via Rtsfind
package body System.Tasking.Protected_Objects.Entries is
-----------------------------------
-- Initialize_Protection_Entries --
-----------------------------------
procedure Initialize_Protection_Entries
(Object : Protection_Entries_Access;
Ceiling_Priority : Integer;
Compiler_Info : System.Address;
Entry_Queue_Maxes : Protected_Entry_Queue_Max_Access;
Entry_Bodies : Protected_Entry_Body_Access;
Find_Body_Index : Find_Body_Index_Access)
is
begin
Initialize_Protection (Object.Common'Access, Ceiling_Priority);
Object.Compiler_Info := Compiler_Info;
Object.Call_In_Progress := null;
Object.Entry_Queue_Maxes := Entry_Queue_Maxes;
Object.Entry_Bodies := Entry_Bodies;
Object.Find_Body_Index := Find_Body_Index;
for E in Object.Entry_Queues'Range loop
Object.Entry_Queues (E).Head := null;
Object.Entry_Queues (E).Tail := null;
end loop;
end Initialize_Protection_Entries;
------------------
-- Lock_Entries --
------------------
procedure Lock_Entries (Object : Protection_Entries_Access) is
begin
Lock (Object.Common'Access);
end Lock_Entries;
--------------------
-- Unlock_Entries --
--------------------
procedure Unlock_Entries (Object : Protection_Entries_Access) is
begin
Unlock (Object.Common'Access);
end Unlock_Entries;
end System.Tasking.Protected_Objects.Entries;
|
with
ada.Containers;
package lace.Event
--
-- The base class for all derived event types.
--
is
pragma Pure;
subtype subject_Name is String;
subtype observer_Name is String;
type Item is tagged null record;
null_Event : constant Event.item;
procedure destruct (Self : in out Item) is null;
type Kind is new String;
--
-- Uniquely identifies each derived event class.
--
-- Each derived event class will have its own Kind.
--
-- Maps to the extended name of 'ada.Tags.Tag_type' value of each derived
-- event class (see 'Conversions' section in 'lace.Event.utility').
function Hash (the_Kind : in Kind) return ada.Containers.Hash_type;
private
null_Event : constant Event.item := (others => <>);
end lace.Event;
|
-- Copyright (c) 2020 Raspberry Pi (Trading) Ltd.
--
-- SPDX-License-Identifier: BSD-3-Clause
-- This spec has been automatically generated from rp2040.svd
pragma Restrictions (No_Elaboration_Code);
pragma Ada_2012;
pragma Style_Checks (Off);
with HAL;
with System;
-- Single-cycle IO block\n
-- Provides core-local and inter-core hardware for the two processors,
-- with single-cycle access.
package RP_SVD.SIO is
pragma Preelaborate;
---------------
-- Registers --
---------------
subtype GPIO_IN_GPIO_IN_Field is HAL.UInt30;
-- Input value for GPIO pins
type GPIO_IN_Register is record
-- Read-only. Input value for GPIO0...29
GPIO_IN : GPIO_IN_GPIO_IN_Field;
-- unspecified
Reserved_30_31 : HAL.UInt2;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for GPIO_IN_Register use record
GPIO_IN at 0 range 0 .. 29;
Reserved_30_31 at 0 range 30 .. 31;
end record;
subtype GPIO_HI_IN_GPIO_HI_IN_Field is HAL.UInt6;
-- Input value for QSPI pins
type GPIO_HI_IN_Register is record
-- Read-only. Input value on QSPI IO in order 0..5: SCLK, SSn, SD0, SD1,
-- SD2, SD3
GPIO_HI_IN : GPIO_HI_IN_GPIO_HI_IN_Field;
-- unspecified
Reserved_6_31 : HAL.UInt26;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for GPIO_HI_IN_Register use record
GPIO_HI_IN at 0 range 0 .. 5;
Reserved_6_31 at 0 range 6 .. 31;
end record;
subtype GPIO_OUT_GPIO_OUT_Field is HAL.UInt30;
-- GPIO output value
type GPIO_OUT_Register is record
-- Set output level (1/0 -> high/low) for GPIO0...29.\n Reading back
-- gives the last value written, NOT the input value from the pins.\n If
-- core 0 and core 1 both write to GPIO_OUT simultaneously (or to a
-- SET/CLR/XOR alias),\n the result is as though the write from core 0
-- took place first,\n and the write from core 1 was then applied to
-- that intermediate result.
GPIO_OUT : GPIO_OUT_GPIO_OUT_Field := 16#0#;
-- unspecified
Reserved_30_31 : HAL.UInt2 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for GPIO_OUT_Register use record
GPIO_OUT at 0 range 0 .. 29;
Reserved_30_31 at 0 range 30 .. 31;
end record;
subtype GPIO_OUT_SET_GPIO_OUT_SET_Field is HAL.UInt30;
-- GPIO output value set
type GPIO_OUT_SET_Register is record
-- Perform an atomic bit-set on GPIO_OUT, i.e. `GPIO_OUT |= wdata`
GPIO_OUT_SET : GPIO_OUT_SET_GPIO_OUT_SET_Field := 16#0#;
-- unspecified
Reserved_30_31 : HAL.UInt2 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for GPIO_OUT_SET_Register use record
GPIO_OUT_SET at 0 range 0 .. 29;
Reserved_30_31 at 0 range 30 .. 31;
end record;
subtype GPIO_OUT_CLR_GPIO_OUT_CLR_Field is HAL.UInt30;
-- GPIO output value clear
type GPIO_OUT_CLR_Register is record
-- Perform an atomic bit-clear on GPIO_OUT, i.e. `GPIO_OUT &= ~wdata`
GPIO_OUT_CLR : GPIO_OUT_CLR_GPIO_OUT_CLR_Field := 16#0#;
-- unspecified
Reserved_30_31 : HAL.UInt2 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for GPIO_OUT_CLR_Register use record
GPIO_OUT_CLR at 0 range 0 .. 29;
Reserved_30_31 at 0 range 30 .. 31;
end record;
subtype GPIO_OUT_XOR_GPIO_OUT_XOR_Field is HAL.UInt30;
-- GPIO output value XOR
type GPIO_OUT_XOR_Register is record
-- Perform an atomic bitwise XOR on GPIO_OUT, i.e. `GPIO_OUT ^= wdata`
GPIO_OUT_XOR : GPIO_OUT_XOR_GPIO_OUT_XOR_Field := 16#0#;
-- unspecified
Reserved_30_31 : HAL.UInt2 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for GPIO_OUT_XOR_Register use record
GPIO_OUT_XOR at 0 range 0 .. 29;
Reserved_30_31 at 0 range 30 .. 31;
end record;
subtype GPIO_OE_GPIO_OE_Field is HAL.UInt30;
-- GPIO output enable
type GPIO_OE_Register is record
-- Set output enable (1/0 -> output/input) for GPIO0...29.\n Reading
-- back gives the last value written.\n If core 0 and core 1 both write
-- to GPIO_OE simultaneously (or to a SET/CLR/XOR alias),\n the result
-- is as though the write from core 0 took place first,\n and the write
-- from core 1 was then applied to that intermediate result.
GPIO_OE : GPIO_OE_GPIO_OE_Field := 16#0#;
-- unspecified
Reserved_30_31 : HAL.UInt2 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for GPIO_OE_Register use record
GPIO_OE at 0 range 0 .. 29;
Reserved_30_31 at 0 range 30 .. 31;
end record;
subtype GPIO_OE_SET_GPIO_OE_SET_Field is HAL.UInt30;
-- GPIO output enable set
type GPIO_OE_SET_Register is record
-- Perform an atomic bit-set on GPIO_OE, i.e. `GPIO_OE |= wdata`
GPIO_OE_SET : GPIO_OE_SET_GPIO_OE_SET_Field := 16#0#;
-- unspecified
Reserved_30_31 : HAL.UInt2 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for GPIO_OE_SET_Register use record
GPIO_OE_SET at 0 range 0 .. 29;
Reserved_30_31 at 0 range 30 .. 31;
end record;
subtype GPIO_OE_CLR_GPIO_OE_CLR_Field is HAL.UInt30;
-- GPIO output enable clear
type GPIO_OE_CLR_Register is record
-- Perform an atomic bit-clear on GPIO_OE, i.e. `GPIO_OE &= ~wdata`
GPIO_OE_CLR : GPIO_OE_CLR_GPIO_OE_CLR_Field := 16#0#;
-- unspecified
Reserved_30_31 : HAL.UInt2 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for GPIO_OE_CLR_Register use record
GPIO_OE_CLR at 0 range 0 .. 29;
Reserved_30_31 at 0 range 30 .. 31;
end record;
subtype GPIO_OE_XOR_GPIO_OE_XOR_Field is HAL.UInt30;
-- GPIO output enable XOR
type GPIO_OE_XOR_Register is record
-- Perform an atomic bitwise XOR on GPIO_OE, i.e. `GPIO_OE ^= wdata`
GPIO_OE_XOR : GPIO_OE_XOR_GPIO_OE_XOR_Field := 16#0#;
-- unspecified
Reserved_30_31 : HAL.UInt2 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for GPIO_OE_XOR_Register use record
GPIO_OE_XOR at 0 range 0 .. 29;
Reserved_30_31 at 0 range 30 .. 31;
end record;
subtype GPIO_HI_OUT_GPIO_HI_OUT_Field is HAL.UInt6;
-- QSPI output value
type GPIO_HI_OUT_Register is record
-- Set output level (1/0 -> high/low) for QSPI IO0...5.\n Reading back
-- gives the last value written, NOT the input value from the pins.\n If
-- core 0 and core 1 both write to GPIO_HI_OUT simultaneously (or to a
-- SET/CLR/XOR alias),\n the result is as though the write from core 0
-- took place first,\n and the write from core 1 was then applied to
-- that intermediate result.
GPIO_HI_OUT : GPIO_HI_OUT_GPIO_HI_OUT_Field := 16#0#;
-- unspecified
Reserved_6_31 : HAL.UInt26 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for GPIO_HI_OUT_Register use record
GPIO_HI_OUT at 0 range 0 .. 5;
Reserved_6_31 at 0 range 6 .. 31;
end record;
subtype GPIO_HI_OUT_SET_GPIO_HI_OUT_SET_Field is HAL.UInt6;
-- QSPI output value set
type GPIO_HI_OUT_SET_Register is record
-- Perform an atomic bit-set on GPIO_HI_OUT, i.e. `GPIO_HI_OUT |= wdata`
GPIO_HI_OUT_SET : GPIO_HI_OUT_SET_GPIO_HI_OUT_SET_Field := 16#0#;
-- unspecified
Reserved_6_31 : HAL.UInt26 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for GPIO_HI_OUT_SET_Register use record
GPIO_HI_OUT_SET at 0 range 0 .. 5;
Reserved_6_31 at 0 range 6 .. 31;
end record;
subtype GPIO_HI_OUT_CLR_GPIO_HI_OUT_CLR_Field is HAL.UInt6;
-- QSPI output value clear
type GPIO_HI_OUT_CLR_Register is record
-- Perform an atomic bit-clear on GPIO_HI_OUT, i.e. `GPIO_HI_OUT &=
-- ~wdata`
GPIO_HI_OUT_CLR : GPIO_HI_OUT_CLR_GPIO_HI_OUT_CLR_Field := 16#0#;
-- unspecified
Reserved_6_31 : HAL.UInt26 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for GPIO_HI_OUT_CLR_Register use record
GPIO_HI_OUT_CLR at 0 range 0 .. 5;
Reserved_6_31 at 0 range 6 .. 31;
end record;
subtype GPIO_HI_OUT_XOR_GPIO_HI_OUT_XOR_Field is HAL.UInt6;
-- QSPI output value XOR
type GPIO_HI_OUT_XOR_Register is record
-- Perform an atomic bitwise XOR on GPIO_HI_OUT, i.e. `GPIO_HI_OUT ^=
-- wdata`
GPIO_HI_OUT_XOR : GPIO_HI_OUT_XOR_GPIO_HI_OUT_XOR_Field := 16#0#;
-- unspecified
Reserved_6_31 : HAL.UInt26 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for GPIO_HI_OUT_XOR_Register use record
GPIO_HI_OUT_XOR at 0 range 0 .. 5;
Reserved_6_31 at 0 range 6 .. 31;
end record;
subtype GPIO_HI_OE_GPIO_HI_OE_Field is HAL.UInt6;
-- QSPI output enable
type GPIO_HI_OE_Register is record
-- Set output enable (1/0 -> output/input) for QSPI IO0...5.\n Reading
-- back gives the last value written.\n If core 0 and core 1 both write
-- to GPIO_HI_OE simultaneously (or to a SET/CLR/XOR alias),\n the
-- result is as though the write from core 0 took place first,\n and the
-- write from core 1 was then applied to that intermediate result.
GPIO_HI_OE : GPIO_HI_OE_GPIO_HI_OE_Field := 16#0#;
-- unspecified
Reserved_6_31 : HAL.UInt26 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for GPIO_HI_OE_Register use record
GPIO_HI_OE at 0 range 0 .. 5;
Reserved_6_31 at 0 range 6 .. 31;
end record;
subtype GPIO_HI_OE_SET_GPIO_HI_OE_SET_Field is HAL.UInt6;
-- QSPI output enable set
type GPIO_HI_OE_SET_Register is record
-- Perform an atomic bit-set on GPIO_HI_OE, i.e. `GPIO_HI_OE |= wdata`
GPIO_HI_OE_SET : GPIO_HI_OE_SET_GPIO_HI_OE_SET_Field := 16#0#;
-- unspecified
Reserved_6_31 : HAL.UInt26 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for GPIO_HI_OE_SET_Register use record
GPIO_HI_OE_SET at 0 range 0 .. 5;
Reserved_6_31 at 0 range 6 .. 31;
end record;
subtype GPIO_HI_OE_CLR_GPIO_HI_OE_CLR_Field is HAL.UInt6;
-- QSPI output enable clear
type GPIO_HI_OE_CLR_Register is record
-- Perform an atomic bit-clear on GPIO_HI_OE, i.e. `GPIO_HI_OE &=
-- ~wdata`
GPIO_HI_OE_CLR : GPIO_HI_OE_CLR_GPIO_HI_OE_CLR_Field := 16#0#;
-- unspecified
Reserved_6_31 : HAL.UInt26 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for GPIO_HI_OE_CLR_Register use record
GPIO_HI_OE_CLR at 0 range 0 .. 5;
Reserved_6_31 at 0 range 6 .. 31;
end record;
subtype GPIO_HI_OE_XOR_GPIO_HI_OE_XOR_Field is HAL.UInt6;
-- QSPI output enable XOR
type GPIO_HI_OE_XOR_Register is record
-- Perform an atomic bitwise XOR on GPIO_HI_OE, i.e. `GPIO_HI_OE ^=
-- wdata`
GPIO_HI_OE_XOR : GPIO_HI_OE_XOR_GPIO_HI_OE_XOR_Field := 16#0#;
-- unspecified
Reserved_6_31 : HAL.UInt26 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for GPIO_HI_OE_XOR_Register use record
GPIO_HI_OE_XOR at 0 range 0 .. 5;
Reserved_6_31 at 0 range 6 .. 31;
end record;
-- Status register for inter-core FIFOs (mailboxes).\n There is one FIFO in
-- the core 0 -> core 1 direction, and one core 1 -> core 0. Both are 32
-- bits wide and 8 words deep.\n Core 0 can see the read side of the 1->0
-- FIFO (RX), and the write side of 0->1 FIFO (TX).\n Core 1 can see the
-- read side of the 0->1 FIFO (RX), and the write side of 1->0 FIFO (TX).\n
-- The SIO IRQ for each core is the logical OR of the VLD, WOF and ROE
-- fields of its FIFO_ST register.
type FIFO_ST_Register is record
-- Read-only. Value is 1 if this core's RX FIFO is not empty (i.e. if
-- FIFO_RD is valid)
VLD : Boolean := False;
-- Read-only. Value is 1 if this core's TX FIFO is not full (i.e. if
-- FIFO_WR is ready for more data)
RDY : Boolean := True;
-- Write data bit of one shall clear (set to zero) the corresponding bit
-- in the field. Sticky flag indicating the TX FIFO was written when
-- full. This write was ignored by the FIFO.
WOF : Boolean := False;
-- Write data bit of one shall clear (set to zero) the corresponding bit
-- in the field. Sticky flag indicating the RX FIFO was read when empty.
-- This read was ignored by the FIFO.
ROE : Boolean := False;
-- unspecified
Reserved_4_31 : HAL.UInt28 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for FIFO_ST_Register use record
VLD at 0 range 0 .. 0;
RDY at 0 range 1 .. 1;
WOF at 0 range 2 .. 2;
ROE at 0 range 3 .. 3;
Reserved_4_31 at 0 range 4 .. 31;
end record;
-- Control and status register for divider.
type DIV_CSR_Register is record
-- Read-only. Reads as 0 when a calculation is in progress, 1
-- otherwise.\n Writing an operand (xDIVIDEND, xDIVISOR) will
-- immediately start a new calculation, no\n matter if one is already in
-- progress.\n Writing to a result register will immediately terminate
-- any in-progress calculation\n and set the READY and DIRTY flags.
READY : Boolean;
-- Read-only. Changes to 1 when any register is written, and back to 0
-- when QUOTIENT is read.\n Software can use this flag to make
-- save/restore more efficient (skip if not DIRTY).\n If the flag is
-- used in this way, it's recommended to either read QUOTIENT only,\n or
-- REMAINDER and then QUOTIENT, to prevent data loss on context switch.
DIRTY : Boolean;
-- unspecified
Reserved_2_31 : HAL.UInt30;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for DIV_CSR_Register use record
READY at 0 range 0 .. 0;
DIRTY at 0 range 1 .. 1;
Reserved_2_31 at 0 range 2 .. 31;
end record;
subtype INTERP0_CTRL_LANE0_SHIFT_Field is HAL.UInt5;
subtype INTERP0_CTRL_LANE0_MASK_LSB_Field is HAL.UInt5;
subtype INTERP0_CTRL_LANE0_MASK_MSB_Field is HAL.UInt5;
subtype INTERP0_CTRL_LANE0_FORCE_MSB_Field is HAL.UInt2;
-- INTERP0_CTRL_LANE0_OVERF array
type INTERP0_CTRL_LANE0_OVERF_Field_Array is array (0 .. 2) of Boolean
with Component_Size => 1, Size => 3;
-- Type definition for INTERP0_CTRL_LANE0_OVERF
type INTERP0_CTRL_LANE0_OVERF_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- OVERF as a value
Val : HAL.UInt3;
when True =>
-- OVERF as an array
Arr : INTERP0_CTRL_LANE0_OVERF_Field_Array;
end case;
end record
with Unchecked_Union, Size => 3;
for INTERP0_CTRL_LANE0_OVERF_Field use record
Val at 0 range 0 .. 2;
Arr at 0 range 0 .. 2;
end record;
-- Control register for lane 0
type INTERP0_CTRL_LANE0_Register is record
-- Logical right-shift applied to accumulator before masking
SHIFT : INTERP0_CTRL_LANE0_SHIFT_Field := 16#0#;
-- The least-significant bit allowed to pass by the mask (inclusive)
MASK_LSB : INTERP0_CTRL_LANE0_MASK_LSB_Field := 16#0#;
-- The most-significant bit allowed to pass by the mask (inclusive)\n
-- Setting MSB < LSB may cause chip to turn inside-out
MASK_MSB : INTERP0_CTRL_LANE0_MASK_MSB_Field := 16#0#;
-- If SIGNED is set, the shifted and masked accumulator value is
-- sign-extended to 32 bits\n before adding to BASE0, and LANE0 PEEK/POP
-- appear extended to 32 bits when read by processor.
SIGNED : Boolean := False;
-- If 1, feed the opposite lane's accumulator into this lane's shift +
-- mask hardware.\n Takes effect even if ADD_RAW is set (the CROSS_INPUT
-- mux is before the shift+mask bypass)
CROSS_INPUT : Boolean := False;
-- If 1, feed the opposite lane's result into this lane's accumulator on
-- POP.
CROSS_RESULT : Boolean := False;
-- If 1, mask + shift is bypassed for LANE0 result. This does not affect
-- FULL result.
ADD_RAW : Boolean := False;
-- ORed into bits 29:28 of the lane result presented to the processor on
-- the bus.\n No effect on the internal 32-bit datapath. Handy for using
-- a lane to generate sequence\n of pointers into flash or SRAM.
FORCE_MSB : INTERP0_CTRL_LANE0_FORCE_MSB_Field := 16#0#;
-- Only present on INTERP0 on each core. If BLEND mode is enabled:\n -
-- LANE1 result is a linear interpolation between BASE0 and BASE1,
-- controlled\n by the 8 LSBs of lane 1 shift and mask value (a
-- fractional number between\n 0 and 255/256ths)\n - LANE0 result does
-- not have BASE0 added (yields only the 8 LSBs of lane 1 shift+mask
-- value)\n - FULL result does not have lane 1 shift+mask value added
-- (BASE2 + lane 0 shift+mask)\n LANE1 SIGNED flag controls whether the
-- interpolation is signed or unsigned.
BLEND : Boolean := False;
-- unspecified
Reserved_22_22 : HAL.Bit := 16#0#;
-- Read-only. Indicates if any masked-off MSBs in ACCUM0 are set.
OVERF : INTERP0_CTRL_LANE0_OVERF_Field :=
(As_Array => False, Val => 16#0#);
-- unspecified
Reserved_26_31 : HAL.UInt6 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for INTERP0_CTRL_LANE0_Register use record
SHIFT at 0 range 0 .. 4;
MASK_LSB at 0 range 5 .. 9;
MASK_MSB at 0 range 10 .. 14;
SIGNED at 0 range 15 .. 15;
CROSS_INPUT at 0 range 16 .. 16;
CROSS_RESULT at 0 range 17 .. 17;
ADD_RAW at 0 range 18 .. 18;
FORCE_MSB at 0 range 19 .. 20;
BLEND at 0 range 21 .. 21;
Reserved_22_22 at 0 range 22 .. 22;
OVERF at 0 range 23 .. 25;
Reserved_26_31 at 0 range 26 .. 31;
end record;
subtype INTERP0_CTRL_LANE1_SHIFT_Field is HAL.UInt5;
subtype INTERP0_CTRL_LANE1_MASK_LSB_Field is HAL.UInt5;
subtype INTERP0_CTRL_LANE1_MASK_MSB_Field is HAL.UInt5;
subtype INTERP0_CTRL_LANE1_FORCE_MSB_Field is HAL.UInt2;
-- Control register for lane 1
type INTERP0_CTRL_LANE1_Register is record
-- Logical right-shift applied to accumulator before masking
SHIFT : INTERP0_CTRL_LANE1_SHIFT_Field := 16#0#;
-- The least-significant bit allowed to pass by the mask (inclusive)
MASK_LSB : INTERP0_CTRL_LANE1_MASK_LSB_Field := 16#0#;
-- The most-significant bit allowed to pass by the mask (inclusive)\n
-- Setting MSB < LSB may cause chip to turn inside-out
MASK_MSB : INTERP0_CTRL_LANE1_MASK_MSB_Field := 16#0#;
-- If SIGNED is set, the shifted and masked accumulator value is
-- sign-extended to 32 bits\n before adding to BASE1, and LANE1 PEEK/POP
-- appear extended to 32 bits when read by processor.
SIGNED : Boolean := False;
-- If 1, feed the opposite lane's accumulator into this lane's shift +
-- mask hardware.\n Takes effect even if ADD_RAW is set (the CROSS_INPUT
-- mux is before the shift+mask bypass)
CROSS_INPUT : Boolean := False;
-- If 1, feed the opposite lane's result into this lane's accumulator on
-- POP.
CROSS_RESULT : Boolean := False;
-- If 1, mask + shift is bypassed for LANE1 result. This does not affect
-- FULL result.
ADD_RAW : Boolean := False;
-- ORed into bits 29:28 of the lane result presented to the processor on
-- the bus.\n No effect on the internal 32-bit datapath. Handy for using
-- a lane to generate sequence\n of pointers into flash or SRAM.
FORCE_MSB : INTERP0_CTRL_LANE1_FORCE_MSB_Field := 16#0#;
-- unspecified
Reserved_21_31 : HAL.UInt11 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for INTERP0_CTRL_LANE1_Register use record
SHIFT at 0 range 0 .. 4;
MASK_LSB at 0 range 5 .. 9;
MASK_MSB at 0 range 10 .. 14;
SIGNED at 0 range 15 .. 15;
CROSS_INPUT at 0 range 16 .. 16;
CROSS_RESULT at 0 range 17 .. 17;
ADD_RAW at 0 range 18 .. 18;
FORCE_MSB at 0 range 19 .. 20;
Reserved_21_31 at 0 range 21 .. 31;
end record;
subtype INTERP0_ACCUM0_ADD_INTERP0_ACCUM0_ADD_Field is HAL.UInt24;
-- Values written here are atomically added to ACCUM0\n Reading yields lane
-- 0's raw shift and mask value (BASE0 not added).
type INTERP0_ACCUM0_ADD_Register is record
INTERP0_ACCUM0_ADD : INTERP0_ACCUM0_ADD_INTERP0_ACCUM0_ADD_Field :=
16#0#;
-- unspecified
Reserved_24_31 : HAL.UInt8 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for INTERP0_ACCUM0_ADD_Register use record
INTERP0_ACCUM0_ADD at 0 range 0 .. 23;
Reserved_24_31 at 0 range 24 .. 31;
end record;
subtype INTERP0_ACCUM1_ADD_INTERP0_ACCUM1_ADD_Field is HAL.UInt24;
-- Values written here are atomically added to ACCUM1\n Reading yields lane
-- 1's raw shift and mask value (BASE1 not added).
type INTERP0_ACCUM1_ADD_Register is record
INTERP0_ACCUM1_ADD : INTERP0_ACCUM1_ADD_INTERP0_ACCUM1_ADD_Field :=
16#0#;
-- unspecified
Reserved_24_31 : HAL.UInt8 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for INTERP0_ACCUM1_ADD_Register use record
INTERP0_ACCUM1_ADD at 0 range 0 .. 23;
Reserved_24_31 at 0 range 24 .. 31;
end record;
subtype INTERP1_CTRL_LANE0_SHIFT_Field is HAL.UInt5;
subtype INTERP1_CTRL_LANE0_MASK_LSB_Field is HAL.UInt5;
subtype INTERP1_CTRL_LANE0_MASK_MSB_Field is HAL.UInt5;
subtype INTERP1_CTRL_LANE0_FORCE_MSB_Field is HAL.UInt2;
-- INTERP1_CTRL_LANE0_OVERF array
type INTERP1_CTRL_LANE0_OVERF_Field_Array is array (0 .. 2) of Boolean
with Component_Size => 1, Size => 3;
-- Type definition for INTERP1_CTRL_LANE0_OVERF
type INTERP1_CTRL_LANE0_OVERF_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- OVERF as a value
Val : HAL.UInt3;
when True =>
-- OVERF as an array
Arr : INTERP1_CTRL_LANE0_OVERF_Field_Array;
end case;
end record
with Unchecked_Union, Size => 3;
for INTERP1_CTRL_LANE0_OVERF_Field use record
Val at 0 range 0 .. 2;
Arr at 0 range 0 .. 2;
end record;
-- Control register for lane 0
type INTERP1_CTRL_LANE0_Register is record
-- Logical right-shift applied to accumulator before masking
SHIFT : INTERP1_CTRL_LANE0_SHIFT_Field := 16#0#;
-- The least-significant bit allowed to pass by the mask (inclusive)
MASK_LSB : INTERP1_CTRL_LANE0_MASK_LSB_Field := 16#0#;
-- The most-significant bit allowed to pass by the mask (inclusive)\n
-- Setting MSB < LSB may cause chip to turn inside-out
MASK_MSB : INTERP1_CTRL_LANE0_MASK_MSB_Field := 16#0#;
-- If SIGNED is set, the shifted and masked accumulator value is
-- sign-extended to 32 bits\n before adding to BASE0, and LANE0 PEEK/POP
-- appear extended to 32 bits when read by processor.
SIGNED : Boolean := False;
-- If 1, feed the opposite lane's accumulator into this lane's shift +
-- mask hardware.\n Takes effect even if ADD_RAW is set (the CROSS_INPUT
-- mux is before the shift+mask bypass)
CROSS_INPUT : Boolean := False;
-- If 1, feed the opposite lane's result into this lane's accumulator on
-- POP.
CROSS_RESULT : Boolean := False;
-- If 1, mask + shift is bypassed for LANE0 result. This does not affect
-- FULL result.
ADD_RAW : Boolean := False;
-- ORed into bits 29:28 of the lane result presented to the processor on
-- the bus.\n No effect on the internal 32-bit datapath. Handy for using
-- a lane to generate sequence\n of pointers into flash or SRAM.
FORCE_MSB : INTERP1_CTRL_LANE0_FORCE_MSB_Field := 16#0#;
-- unspecified
Reserved_21_21 : HAL.Bit := 16#0#;
-- Only present on INTERP1 on each core. If CLAMP mode is enabled:\n -
-- LANE0 result is shifted and masked ACCUM0, clamped by a lower bound
-- of\n BASE0 and an upper bound of BASE1.\n - Signedness of these
-- comparisons is determined by LANE0_CTRL_SIGNED
CLAMP : Boolean := False;
-- Read-only. Indicates if any masked-off MSBs in ACCUM0 are set.
OVERF : INTERP1_CTRL_LANE0_OVERF_Field :=
(As_Array => False, Val => 16#0#);
-- unspecified
Reserved_26_31 : HAL.UInt6 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for INTERP1_CTRL_LANE0_Register use record
SHIFT at 0 range 0 .. 4;
MASK_LSB at 0 range 5 .. 9;
MASK_MSB at 0 range 10 .. 14;
SIGNED at 0 range 15 .. 15;
CROSS_INPUT at 0 range 16 .. 16;
CROSS_RESULT at 0 range 17 .. 17;
ADD_RAW at 0 range 18 .. 18;
FORCE_MSB at 0 range 19 .. 20;
Reserved_21_21 at 0 range 21 .. 21;
CLAMP at 0 range 22 .. 22;
OVERF at 0 range 23 .. 25;
Reserved_26_31 at 0 range 26 .. 31;
end record;
subtype INTERP1_CTRL_LANE1_SHIFT_Field is HAL.UInt5;
subtype INTERP1_CTRL_LANE1_MASK_LSB_Field is HAL.UInt5;
subtype INTERP1_CTRL_LANE1_MASK_MSB_Field is HAL.UInt5;
subtype INTERP1_CTRL_LANE1_FORCE_MSB_Field is HAL.UInt2;
-- Control register for lane 1
type INTERP1_CTRL_LANE1_Register is record
-- Logical right-shift applied to accumulator before masking
SHIFT : INTERP1_CTRL_LANE1_SHIFT_Field := 16#0#;
-- The least-significant bit allowed to pass by the mask (inclusive)
MASK_LSB : INTERP1_CTRL_LANE1_MASK_LSB_Field := 16#0#;
-- The most-significant bit allowed to pass by the mask (inclusive)\n
-- Setting MSB < LSB may cause chip to turn inside-out
MASK_MSB : INTERP1_CTRL_LANE1_MASK_MSB_Field := 16#0#;
-- If SIGNED is set, the shifted and masked accumulator value is
-- sign-extended to 32 bits\n before adding to BASE1, and LANE1 PEEK/POP
-- appear extended to 32 bits when read by processor.
SIGNED : Boolean := False;
-- If 1, feed the opposite lane's accumulator into this lane's shift +
-- mask hardware.\n Takes effect even if ADD_RAW is set (the CROSS_INPUT
-- mux is before the shift+mask bypass)
CROSS_INPUT : Boolean := False;
-- If 1, feed the opposite lane's result into this lane's accumulator on
-- POP.
CROSS_RESULT : Boolean := False;
-- If 1, mask + shift is bypassed for LANE1 result. This does not affect
-- FULL result.
ADD_RAW : Boolean := False;
-- ORed into bits 29:28 of the lane result presented to the processor on
-- the bus.\n No effect on the internal 32-bit datapath. Handy for using
-- a lane to generate sequence\n of pointers into flash or SRAM.
FORCE_MSB : INTERP1_CTRL_LANE1_FORCE_MSB_Field := 16#0#;
-- unspecified
Reserved_21_31 : HAL.UInt11 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for INTERP1_CTRL_LANE1_Register use record
SHIFT at 0 range 0 .. 4;
MASK_LSB at 0 range 5 .. 9;
MASK_MSB at 0 range 10 .. 14;
SIGNED at 0 range 15 .. 15;
CROSS_INPUT at 0 range 16 .. 16;
CROSS_RESULT at 0 range 17 .. 17;
ADD_RAW at 0 range 18 .. 18;
FORCE_MSB at 0 range 19 .. 20;
Reserved_21_31 at 0 range 21 .. 31;
end record;
subtype INTERP1_ACCUM0_ADD_INTERP1_ACCUM0_ADD_Field is HAL.UInt24;
-- Values written here are atomically added to ACCUM0\n Reading yields lane
-- 0's raw shift and mask value (BASE0 not added).
type INTERP1_ACCUM0_ADD_Register is record
INTERP1_ACCUM0_ADD : INTERP1_ACCUM0_ADD_INTERP1_ACCUM0_ADD_Field :=
16#0#;
-- unspecified
Reserved_24_31 : HAL.UInt8 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for INTERP1_ACCUM0_ADD_Register use record
INTERP1_ACCUM0_ADD at 0 range 0 .. 23;
Reserved_24_31 at 0 range 24 .. 31;
end record;
subtype INTERP1_ACCUM1_ADD_INTERP1_ACCUM1_ADD_Field is HAL.UInt24;
-- Values written here are atomically added to ACCUM1\n Reading yields lane
-- 1's raw shift and mask value (BASE1 not added).
type INTERP1_ACCUM1_ADD_Register is record
INTERP1_ACCUM1_ADD : INTERP1_ACCUM1_ADD_INTERP1_ACCUM1_ADD_Field :=
16#0#;
-- unspecified
Reserved_24_31 : HAL.UInt8 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for INTERP1_ACCUM1_ADD_Register use record
INTERP1_ACCUM1_ADD at 0 range 0 .. 23;
Reserved_24_31 at 0 range 24 .. 31;
end record;
-----------------
-- Peripherals --
-----------------
-- Single-cycle IO block\n Provides core-local and inter-core hardware for
-- the two processors, with single-cycle access.
type SIO_Peripheral is record
-- Processor core identifier\n Value is 0 when read from processor core
-- 0, and 1 when read from processor core 1.
CPUID : aliased HAL.UInt32;
-- Input value for GPIO pins
GPIO_IN : aliased GPIO_IN_Register;
-- Input value for QSPI pins
GPIO_HI_IN : aliased GPIO_HI_IN_Register;
-- GPIO output value
GPIO_OUT : aliased GPIO_OUT_Register;
-- GPIO output value set
GPIO_OUT_SET : aliased GPIO_OUT_SET_Register;
-- GPIO output value clear
GPIO_OUT_CLR : aliased GPIO_OUT_CLR_Register;
-- GPIO output value XOR
GPIO_OUT_XOR : aliased GPIO_OUT_XOR_Register;
-- GPIO output enable
GPIO_OE : aliased GPIO_OE_Register;
-- GPIO output enable set
GPIO_OE_SET : aliased GPIO_OE_SET_Register;
-- GPIO output enable clear
GPIO_OE_CLR : aliased GPIO_OE_CLR_Register;
-- GPIO output enable XOR
GPIO_OE_XOR : aliased GPIO_OE_XOR_Register;
-- QSPI output value
GPIO_HI_OUT : aliased GPIO_HI_OUT_Register;
-- QSPI output value set
GPIO_HI_OUT_SET : aliased GPIO_HI_OUT_SET_Register;
-- QSPI output value clear
GPIO_HI_OUT_CLR : aliased GPIO_HI_OUT_CLR_Register;
-- QSPI output value XOR
GPIO_HI_OUT_XOR : aliased GPIO_HI_OUT_XOR_Register;
-- QSPI output enable
GPIO_HI_OE : aliased GPIO_HI_OE_Register;
-- QSPI output enable set
GPIO_HI_OE_SET : aliased GPIO_HI_OE_SET_Register;
-- QSPI output enable clear
GPIO_HI_OE_CLR : aliased GPIO_HI_OE_CLR_Register;
-- QSPI output enable XOR
GPIO_HI_OE_XOR : aliased GPIO_HI_OE_XOR_Register;
-- Status register for inter-core FIFOs (mailboxes).\n There is one FIFO
-- in the core 0 -> core 1 direction, and one core 1 -> core 0. Both are
-- 32 bits wide and 8 words deep.\n Core 0 can see the read side of the
-- 1->0 FIFO (RX), and the write side of 0->1 FIFO (TX).\n Core 1 can
-- see the read side of the 0->1 FIFO (RX), and the write side of 1->0
-- FIFO (TX).\n The SIO IRQ for each core is the logical OR of the VLD,
-- WOF and ROE fields of its FIFO_ST register.
FIFO_ST : aliased FIFO_ST_Register;
-- Write access to this core's TX FIFO
FIFO_WR : aliased HAL.UInt32;
-- Read access to this core's RX FIFO
FIFO_RD : aliased HAL.UInt32;
-- Spinlock state\n A bitmap containing the state of all 32 spinlocks
-- (1=locked).\n Mainly intended for debugging.
SPINLOCK_ST : aliased HAL.UInt32;
-- Divider unsigned dividend\n Write to the DIVIDEND operand of the
-- divider, i.e. the p in `p / q`.\n Any operand write starts a new
-- calculation. The results appear in QUOTIENT, REMAINDER.\n
-- UDIVIDEND/SDIVIDEND are aliases of the same internal register. The U
-- alias starts an\n unsigned calculation, and the S alias starts a
-- signed calculation.
DIV_UDIVIDEND : aliased HAL.UInt32;
-- Divider unsigned divisor\n Write to the DIVISOR operand of the
-- divider, i.e. the q in `p / q`.\n Any operand write starts a new
-- calculation. The results appear in QUOTIENT, REMAINDER.\n
-- UDIVIDEND/SDIVIDEND are aliases of the same internal register. The U
-- alias starts an\n unsigned calculation, and the S alias starts a
-- signed calculation.
DIV_UDIVISOR : aliased HAL.UInt32;
-- Divider signed dividend\n The same as UDIVIDEND, but starts a signed
-- calculation, rather than unsigned.
DIV_SDIVIDEND : aliased HAL.UInt32;
-- Divider signed divisor\n The same as UDIVISOR, but starts a signed
-- calculation, rather than unsigned.
DIV_SDIVISOR : aliased HAL.UInt32;
-- Divider result quotient\n The result of `DIVIDEND / DIVISOR`
-- (division). Contents undefined while CSR_READY is low.\n For signed
-- calculations, QUOTIENT is negative when the signs of DIVIDEND and
-- DIVISOR differ.\n This register can be written to directly, for
-- context save/restore purposes. This halts any\n in-progress
-- calculation and sets the CSR_READY and CSR_DIRTY flags.\n Reading
-- from QUOTIENT clears the CSR_DIRTY flag, so should read results in
-- the order\n REMAINDER, QUOTIENT if CSR_DIRTY is used.
DIV_QUOTIENT : aliased HAL.UInt32;
-- Divider result remainder\n The result of `DIVIDEND % DIVISOR`
-- (modulo). Contents undefined while CSR_READY is low.\n For signed
-- calculations, REMAINDER is negative only when DIVIDEND is negative.\n
-- This register can be written to directly, for context save/restore
-- purposes. This halts any\n in-progress calculation and sets the
-- CSR_READY and CSR_DIRTY flags.
DIV_REMAINDER : aliased HAL.UInt32;
-- Control and status register for divider.
DIV_CSR : aliased DIV_CSR_Register;
-- Read/write access to accumulator 0
INTERP0_ACCUM0 : aliased HAL.UInt32;
-- Read/write access to accumulator 1
INTERP0_ACCUM1 : aliased HAL.UInt32;
-- Read/write access to BASE0 register.
INTERP0_BASE0 : aliased HAL.UInt32;
-- Read/write access to BASE1 register.
INTERP0_BASE1 : aliased HAL.UInt32;
-- Read/write access to BASE2 register.
INTERP0_BASE2 : aliased HAL.UInt32;
-- Read LANE0 result, and simultaneously write lane results to both
-- accumulators (POP).
INTERP0_POP_LANE0 : aliased HAL.UInt32;
-- Read LANE1 result, and simultaneously write lane results to both
-- accumulators (POP).
INTERP0_POP_LANE1 : aliased HAL.UInt32;
-- Read FULL result, and simultaneously write lane results to both
-- accumulators (POP).
INTERP0_POP_FULL : aliased HAL.UInt32;
-- Read LANE0 result, without altering any internal state (PEEK).
INTERP0_PEEK_LANE0 : aliased HAL.UInt32;
-- Read LANE1 result, without altering any internal state (PEEK).
INTERP0_PEEK_LANE1 : aliased HAL.UInt32;
-- Read FULL result, without altering any internal state (PEEK).
INTERP0_PEEK_FULL : aliased HAL.UInt32;
-- Control register for lane 0
INTERP0_CTRL_LANE0 : aliased INTERP0_CTRL_LANE0_Register;
-- Control register for lane 1
INTERP0_CTRL_LANE1 : aliased INTERP0_CTRL_LANE1_Register;
-- Values written here are atomically added to ACCUM0\n Reading yields
-- lane 0's raw shift and mask value (BASE0 not added).
INTERP0_ACCUM0_ADD : aliased INTERP0_ACCUM0_ADD_Register;
-- Values written here are atomically added to ACCUM1\n Reading yields
-- lane 1's raw shift and mask value (BASE1 not added).
INTERP0_ACCUM1_ADD : aliased INTERP0_ACCUM1_ADD_Register;
-- On write, the lower 16 bits go to BASE0, upper bits to BASE1
-- simultaneously.\n Each half is sign-extended to 32 bits if that
-- lane's SIGNED flag is set.
INTERP0_BASE_1AND0 : aliased HAL.UInt32;
-- Read/write access to accumulator 0
INTERP1_ACCUM0 : aliased HAL.UInt32;
-- Read/write access to accumulator 1
INTERP1_ACCUM1 : aliased HAL.UInt32;
-- Read/write access to BASE0 register.
INTERP1_BASE0 : aliased HAL.UInt32;
-- Read/write access to BASE1 register.
INTERP1_BASE1 : aliased HAL.UInt32;
-- Read/write access to BASE2 register.
INTERP1_BASE2 : aliased HAL.UInt32;
-- Read LANE0 result, and simultaneously write lane results to both
-- accumulators (POP).
INTERP1_POP_LANE0 : aliased HAL.UInt32;
-- Read LANE1 result, and simultaneously write lane results to both
-- accumulators (POP).
INTERP1_POP_LANE1 : aliased HAL.UInt32;
-- Read FULL result, and simultaneously write lane results to both
-- accumulators (POP).
INTERP1_POP_FULL : aliased HAL.UInt32;
-- Read LANE0 result, without altering any internal state (PEEK).
INTERP1_PEEK_LANE0 : aliased HAL.UInt32;
-- Read LANE1 result, without altering any internal state (PEEK).
INTERP1_PEEK_LANE1 : aliased HAL.UInt32;
-- Read FULL result, without altering any internal state (PEEK).
INTERP1_PEEK_FULL : aliased HAL.UInt32;
-- Control register for lane 0
INTERP1_CTRL_LANE0 : aliased INTERP1_CTRL_LANE0_Register;
-- Control register for lane 1
INTERP1_CTRL_LANE1 : aliased INTERP1_CTRL_LANE1_Register;
-- Values written here are atomically added to ACCUM0\n Reading yields
-- lane 0's raw shift and mask value (BASE0 not added).
INTERP1_ACCUM0_ADD : aliased INTERP1_ACCUM0_ADD_Register;
-- Values written here are atomically added to ACCUM1\n Reading yields
-- lane 1's raw shift and mask value (BASE1 not added).
INTERP1_ACCUM1_ADD : aliased INTERP1_ACCUM1_ADD_Register;
-- On write, the lower 16 bits go to BASE0, upper bits to BASE1
-- simultaneously.\n Each half is sign-extended to 32 bits if that
-- lane's SIGNED flag is set.
INTERP1_BASE_1AND0 : aliased HAL.UInt32;
-- Reading from a spinlock address will:\n - Return 0 if lock is already
-- locked\n - Otherwise return nonzero, and simultaneously claim the
-- lock\n\n Writing (any value) releases the lock.\n If core 0 and core
-- 1 attempt to claim the same lock simultaneously, core 0 wins.\n The
-- value returned on success is 0x1 << lock number.
SPINLOCK0 : aliased HAL.UInt32;
-- Reading from a spinlock address will:\n - Return 0 if lock is already
-- locked\n - Otherwise return nonzero, and simultaneously claim the
-- lock\n\n Writing (any value) releases the lock.\n If core 0 and core
-- 1 attempt to claim the same lock simultaneously, core 0 wins.\n The
-- value returned on success is 0x1 << lock number.
SPINLOCK1 : aliased HAL.UInt32;
-- Reading from a spinlock address will:\n - Return 0 if lock is already
-- locked\n - Otherwise return nonzero, and simultaneously claim the
-- lock\n\n Writing (any value) releases the lock.\n If core 0 and core
-- 1 attempt to claim the same lock simultaneously, core 0 wins.\n The
-- value returned on success is 0x1 << lock number.
SPINLOCK2 : aliased HAL.UInt32;
-- Reading from a spinlock address will:\n - Return 0 if lock is already
-- locked\n - Otherwise return nonzero, and simultaneously claim the
-- lock\n\n Writing (any value) releases the lock.\n If core 0 and core
-- 1 attempt to claim the same lock simultaneously, core 0 wins.\n The
-- value returned on success is 0x1 << lock number.
SPINLOCK3 : aliased HAL.UInt32;
-- Reading from a spinlock address will:\n - Return 0 if lock is already
-- locked\n - Otherwise return nonzero, and simultaneously claim the
-- lock\n\n Writing (any value) releases the lock.\n If core 0 and core
-- 1 attempt to claim the same lock simultaneously, core 0 wins.\n The
-- value returned on success is 0x1 << lock number.
SPINLOCK4 : aliased HAL.UInt32;
-- Reading from a spinlock address will:\n - Return 0 if lock is already
-- locked\n - Otherwise return nonzero, and simultaneously claim the
-- lock\n\n Writing (any value) releases the lock.\n If core 0 and core
-- 1 attempt to claim the same lock simultaneously, core 0 wins.\n The
-- value returned on success is 0x1 << lock number.
SPINLOCK5 : aliased HAL.UInt32;
-- Reading from a spinlock address will:\n - Return 0 if lock is already
-- locked\n - Otherwise return nonzero, and simultaneously claim the
-- lock\n\n Writing (any value) releases the lock.\n If core 0 and core
-- 1 attempt to claim the same lock simultaneously, core 0 wins.\n The
-- value returned on success is 0x1 << lock number.
SPINLOCK6 : aliased HAL.UInt32;
-- Reading from a spinlock address will:\n - Return 0 if lock is already
-- locked\n - Otherwise return nonzero, and simultaneously claim the
-- lock\n\n Writing (any value) releases the lock.\n If core 0 and core
-- 1 attempt to claim the same lock simultaneously, core 0 wins.\n The
-- value returned on success is 0x1 << lock number.
SPINLOCK7 : aliased HAL.UInt32;
-- Reading from a spinlock address will:\n - Return 0 if lock is already
-- locked\n - Otherwise return nonzero, and simultaneously claim the
-- lock\n\n Writing (any value) releases the lock.\n If core 0 and core
-- 1 attempt to claim the same lock simultaneously, core 0 wins.\n The
-- value returned on success is 0x1 << lock number.
SPINLOCK8 : aliased HAL.UInt32;
-- Reading from a spinlock address will:\n - Return 0 if lock is already
-- locked\n - Otherwise return nonzero, and simultaneously claim the
-- lock\n\n Writing (any value) releases the lock.\n If core 0 and core
-- 1 attempt to claim the same lock simultaneously, core 0 wins.\n The
-- value returned on success is 0x1 << lock number.
SPINLOCK9 : aliased HAL.UInt32;
-- Reading from a spinlock address will:\n - Return 0 if lock is already
-- locked\n - Otherwise return nonzero, and simultaneously claim the
-- lock\n\n Writing (any value) releases the lock.\n If core 0 and core
-- 1 attempt to claim the same lock simultaneously, core 0 wins.\n The
-- value returned on success is 0x1 << lock number.
SPINLOCK10 : aliased HAL.UInt32;
-- Reading from a spinlock address will:\n - Return 0 if lock is already
-- locked\n - Otherwise return nonzero, and simultaneously claim the
-- lock\n\n Writing (any value) releases the lock.\n If core 0 and core
-- 1 attempt to claim the same lock simultaneously, core 0 wins.\n The
-- value returned on success is 0x1 << lock number.
SPINLOCK11 : aliased HAL.UInt32;
-- Reading from a spinlock address will:\n - Return 0 if lock is already
-- locked\n - Otherwise return nonzero, and simultaneously claim the
-- lock\n\n Writing (any value) releases the lock.\n If core 0 and core
-- 1 attempt to claim the same lock simultaneously, core 0 wins.\n The
-- value returned on success is 0x1 << lock number.
SPINLOCK12 : aliased HAL.UInt32;
-- Reading from a spinlock address will:\n - Return 0 if lock is already
-- locked\n - Otherwise return nonzero, and simultaneously claim the
-- lock\n\n Writing (any value) releases the lock.\n If core 0 and core
-- 1 attempt to claim the same lock simultaneously, core 0 wins.\n The
-- value returned on success is 0x1 << lock number.
SPINLOCK13 : aliased HAL.UInt32;
-- Reading from a spinlock address will:\n - Return 0 if lock is already
-- locked\n - Otherwise return nonzero, and simultaneously claim the
-- lock\n\n Writing (any value) releases the lock.\n If core 0 and core
-- 1 attempt to claim the same lock simultaneously, core 0 wins.\n The
-- value returned on success is 0x1 << lock number.
SPINLOCK14 : aliased HAL.UInt32;
-- Reading from a spinlock address will:\n - Return 0 if lock is already
-- locked\n - Otherwise return nonzero, and simultaneously claim the
-- lock\n\n Writing (any value) releases the lock.\n If core 0 and core
-- 1 attempt to claim the same lock simultaneously, core 0 wins.\n The
-- value returned on success is 0x1 << lock number.
SPINLOCK15 : aliased HAL.UInt32;
-- Reading from a spinlock address will:\n - Return 0 if lock is already
-- locked\n - Otherwise return nonzero, and simultaneously claim the
-- lock\n\n Writing (any value) releases the lock.\n If core 0 and core
-- 1 attempt to claim the same lock simultaneously, core 0 wins.\n The
-- value returned on success is 0x1 << lock number.
SPINLOCK16 : aliased HAL.UInt32;
-- Reading from a spinlock address will:\n - Return 0 if lock is already
-- locked\n - Otherwise return nonzero, and simultaneously claim the
-- lock\n\n Writing (any value) releases the lock.\n If core 0 and core
-- 1 attempt to claim the same lock simultaneously, core 0 wins.\n The
-- value returned on success is 0x1 << lock number.
SPINLOCK17 : aliased HAL.UInt32;
-- Reading from a spinlock address will:\n - Return 0 if lock is already
-- locked\n - Otherwise return nonzero, and simultaneously claim the
-- lock\n\n Writing (any value) releases the lock.\n If core 0 and core
-- 1 attempt to claim the same lock simultaneously, core 0 wins.\n The
-- value returned on success is 0x1 << lock number.
SPINLOCK18 : aliased HAL.UInt32;
-- Reading from a spinlock address will:\n - Return 0 if lock is already
-- locked\n - Otherwise return nonzero, and simultaneously claim the
-- lock\n\n Writing (any value) releases the lock.\n If core 0 and core
-- 1 attempt to claim the same lock simultaneously, core 0 wins.\n The
-- value returned on success is 0x1 << lock number.
SPINLOCK19 : aliased HAL.UInt32;
-- Reading from a spinlock address will:\n - Return 0 if lock is already
-- locked\n - Otherwise return nonzero, and simultaneously claim the
-- lock\n\n Writing (any value) releases the lock.\n If core 0 and core
-- 1 attempt to claim the same lock simultaneously, core 0 wins.\n The
-- value returned on success is 0x1 << lock number.
SPINLOCK20 : aliased HAL.UInt32;
-- Reading from a spinlock address will:\n - Return 0 if lock is already
-- locked\n - Otherwise return nonzero, and simultaneously claim the
-- lock\n\n Writing (any value) releases the lock.\n If core 0 and core
-- 1 attempt to claim the same lock simultaneously, core 0 wins.\n The
-- value returned on success is 0x1 << lock number.
SPINLOCK21 : aliased HAL.UInt32;
-- Reading from a spinlock address will:\n - Return 0 if lock is already
-- locked\n - Otherwise return nonzero, and simultaneously claim the
-- lock\n\n Writing (any value) releases the lock.\n If core 0 and core
-- 1 attempt to claim the same lock simultaneously, core 0 wins.\n The
-- value returned on success is 0x1 << lock number.
SPINLOCK22 : aliased HAL.UInt32;
-- Reading from a spinlock address will:\n - Return 0 if lock is already
-- locked\n - Otherwise return nonzero, and simultaneously claim the
-- lock\n\n Writing (any value) releases the lock.\n If core 0 and core
-- 1 attempt to claim the same lock simultaneously, core 0 wins.\n The
-- value returned on success is 0x1 << lock number.
SPINLOCK23 : aliased HAL.UInt32;
-- Reading from a spinlock address will:\n - Return 0 if lock is already
-- locked\n - Otherwise return nonzero, and simultaneously claim the
-- lock\n\n Writing (any value) releases the lock.\n If core 0 and core
-- 1 attempt to claim the same lock simultaneously, core 0 wins.\n The
-- value returned on success is 0x1 << lock number.
SPINLOCK24 : aliased HAL.UInt32;
-- Reading from a spinlock address will:\n - Return 0 if lock is already
-- locked\n - Otherwise return nonzero, and simultaneously claim the
-- lock\n\n Writing (any value) releases the lock.\n If core 0 and core
-- 1 attempt to claim the same lock simultaneously, core 0 wins.\n The
-- value returned on success is 0x1 << lock number.
SPINLOCK25 : aliased HAL.UInt32;
-- Reading from a spinlock address will:\n - Return 0 if lock is already
-- locked\n - Otherwise return nonzero, and simultaneously claim the
-- lock\n\n Writing (any value) releases the lock.\n If core 0 and core
-- 1 attempt to claim the same lock simultaneously, core 0 wins.\n The
-- value returned on success is 0x1 << lock number.
SPINLOCK26 : aliased HAL.UInt32;
-- Reading from a spinlock address will:\n - Return 0 if lock is already
-- locked\n - Otherwise return nonzero, and simultaneously claim the
-- lock\n\n Writing (any value) releases the lock.\n If core 0 and core
-- 1 attempt to claim the same lock simultaneously, core 0 wins.\n The
-- value returned on success is 0x1 << lock number.
SPINLOCK27 : aliased HAL.UInt32;
-- Reading from a spinlock address will:\n - Return 0 if lock is already
-- locked\n - Otherwise return nonzero, and simultaneously claim the
-- lock\n\n Writing (any value) releases the lock.\n If core 0 and core
-- 1 attempt to claim the same lock simultaneously, core 0 wins.\n The
-- value returned on success is 0x1 << lock number.
SPINLOCK28 : aliased HAL.UInt32;
-- Reading from a spinlock address will:\n - Return 0 if lock is already
-- locked\n - Otherwise return nonzero, and simultaneously claim the
-- lock\n\n Writing (any value) releases the lock.\n If core 0 and core
-- 1 attempt to claim the same lock simultaneously, core 0 wins.\n The
-- value returned on success is 0x1 << lock number.
SPINLOCK29 : aliased HAL.UInt32;
-- Reading from a spinlock address will:\n - Return 0 if lock is already
-- locked\n - Otherwise return nonzero, and simultaneously claim the
-- lock\n\n Writing (any value) releases the lock.\n If core 0 and core
-- 1 attempt to claim the same lock simultaneously, core 0 wins.\n The
-- value returned on success is 0x1 << lock number.
SPINLOCK30 : aliased HAL.UInt32;
-- Reading from a spinlock address will:\n - Return 0 if lock is already
-- locked\n - Otherwise return nonzero, and simultaneously claim the
-- lock\n\n Writing (any value) releases the lock.\n If core 0 and core
-- 1 attempt to claim the same lock simultaneously, core 0 wins.\n The
-- value returned on success is 0x1 << lock number.
SPINLOCK31 : aliased HAL.UInt32;
end record
with Volatile;
for SIO_Peripheral use record
CPUID at 16#0# range 0 .. 31;
GPIO_IN at 16#4# range 0 .. 31;
GPIO_HI_IN at 16#8# range 0 .. 31;
GPIO_OUT at 16#10# range 0 .. 31;
GPIO_OUT_SET at 16#14# range 0 .. 31;
GPIO_OUT_CLR at 16#18# range 0 .. 31;
GPIO_OUT_XOR at 16#1C# range 0 .. 31;
GPIO_OE at 16#20# range 0 .. 31;
GPIO_OE_SET at 16#24# range 0 .. 31;
GPIO_OE_CLR at 16#28# range 0 .. 31;
GPIO_OE_XOR at 16#2C# range 0 .. 31;
GPIO_HI_OUT at 16#30# range 0 .. 31;
GPIO_HI_OUT_SET at 16#34# range 0 .. 31;
GPIO_HI_OUT_CLR at 16#38# range 0 .. 31;
GPIO_HI_OUT_XOR at 16#3C# range 0 .. 31;
GPIO_HI_OE at 16#40# range 0 .. 31;
GPIO_HI_OE_SET at 16#44# range 0 .. 31;
GPIO_HI_OE_CLR at 16#48# range 0 .. 31;
GPIO_HI_OE_XOR at 16#4C# range 0 .. 31;
FIFO_ST at 16#50# range 0 .. 31;
FIFO_WR at 16#54# range 0 .. 31;
FIFO_RD at 16#58# range 0 .. 31;
SPINLOCK_ST at 16#5C# range 0 .. 31;
DIV_UDIVIDEND at 16#60# range 0 .. 31;
DIV_UDIVISOR at 16#64# range 0 .. 31;
DIV_SDIVIDEND at 16#68# range 0 .. 31;
DIV_SDIVISOR at 16#6C# range 0 .. 31;
DIV_QUOTIENT at 16#70# range 0 .. 31;
DIV_REMAINDER at 16#74# range 0 .. 31;
DIV_CSR at 16#78# range 0 .. 31;
INTERP0_ACCUM0 at 16#80# range 0 .. 31;
INTERP0_ACCUM1 at 16#84# range 0 .. 31;
INTERP0_BASE0 at 16#88# range 0 .. 31;
INTERP0_BASE1 at 16#8C# range 0 .. 31;
INTERP0_BASE2 at 16#90# range 0 .. 31;
INTERP0_POP_LANE0 at 16#94# range 0 .. 31;
INTERP0_POP_LANE1 at 16#98# range 0 .. 31;
INTERP0_POP_FULL at 16#9C# range 0 .. 31;
INTERP0_PEEK_LANE0 at 16#A0# range 0 .. 31;
INTERP0_PEEK_LANE1 at 16#A4# range 0 .. 31;
INTERP0_PEEK_FULL at 16#A8# range 0 .. 31;
INTERP0_CTRL_LANE0 at 16#AC# range 0 .. 31;
INTERP0_CTRL_LANE1 at 16#B0# range 0 .. 31;
INTERP0_ACCUM0_ADD at 16#B4# range 0 .. 31;
INTERP0_ACCUM1_ADD at 16#B8# range 0 .. 31;
INTERP0_BASE_1AND0 at 16#BC# range 0 .. 31;
INTERP1_ACCUM0 at 16#C0# range 0 .. 31;
INTERP1_ACCUM1 at 16#C4# range 0 .. 31;
INTERP1_BASE0 at 16#C8# range 0 .. 31;
INTERP1_BASE1 at 16#CC# range 0 .. 31;
INTERP1_BASE2 at 16#D0# range 0 .. 31;
INTERP1_POP_LANE0 at 16#D4# range 0 .. 31;
INTERP1_POP_LANE1 at 16#D8# range 0 .. 31;
INTERP1_POP_FULL at 16#DC# range 0 .. 31;
INTERP1_PEEK_LANE0 at 16#E0# range 0 .. 31;
INTERP1_PEEK_LANE1 at 16#E4# range 0 .. 31;
INTERP1_PEEK_FULL at 16#E8# range 0 .. 31;
INTERP1_CTRL_LANE0 at 16#EC# range 0 .. 31;
INTERP1_CTRL_LANE1 at 16#F0# range 0 .. 31;
INTERP1_ACCUM0_ADD at 16#F4# range 0 .. 31;
INTERP1_ACCUM1_ADD at 16#F8# range 0 .. 31;
INTERP1_BASE_1AND0 at 16#FC# range 0 .. 31;
SPINLOCK0 at 16#100# range 0 .. 31;
SPINLOCK1 at 16#104# range 0 .. 31;
SPINLOCK2 at 16#108# range 0 .. 31;
SPINLOCK3 at 16#10C# range 0 .. 31;
SPINLOCK4 at 16#110# range 0 .. 31;
SPINLOCK5 at 16#114# range 0 .. 31;
SPINLOCK6 at 16#118# range 0 .. 31;
SPINLOCK7 at 16#11C# range 0 .. 31;
SPINLOCK8 at 16#120# range 0 .. 31;
SPINLOCK9 at 16#124# range 0 .. 31;
SPINLOCK10 at 16#128# range 0 .. 31;
SPINLOCK11 at 16#12C# range 0 .. 31;
SPINLOCK12 at 16#130# range 0 .. 31;
SPINLOCK13 at 16#134# range 0 .. 31;
SPINLOCK14 at 16#138# range 0 .. 31;
SPINLOCK15 at 16#13C# range 0 .. 31;
SPINLOCK16 at 16#140# range 0 .. 31;
SPINLOCK17 at 16#144# range 0 .. 31;
SPINLOCK18 at 16#148# range 0 .. 31;
SPINLOCK19 at 16#14C# range 0 .. 31;
SPINLOCK20 at 16#150# range 0 .. 31;
SPINLOCK21 at 16#154# range 0 .. 31;
SPINLOCK22 at 16#158# range 0 .. 31;
SPINLOCK23 at 16#15C# range 0 .. 31;
SPINLOCK24 at 16#160# range 0 .. 31;
SPINLOCK25 at 16#164# range 0 .. 31;
SPINLOCK26 at 16#168# range 0 .. 31;
SPINLOCK27 at 16#16C# range 0 .. 31;
SPINLOCK28 at 16#170# range 0 .. 31;
SPINLOCK29 at 16#174# range 0 .. 31;
SPINLOCK30 at 16#178# range 0 .. 31;
SPINLOCK31 at 16#17C# range 0 .. 31;
end record;
-- Single-cycle IO block\n Provides core-local and inter-core hardware for
-- the two processors, with single-cycle access.
SIO_Periph : aliased SIO_Peripheral
with Import, Address => SIO_Base;
end RP_SVD.SIO;
|
with STM32GD.Clock;
with STM32GD.Clock.Tree;
generic
Input : Clock_Type;
with package Clock_Tree is new STM32GD.Clock.Tree (<>);
package STM32GD.Clock.Timer is
pragma Preelaborate;
procedure Init;
procedure Delay_us (us : Natural);
procedure Delay_ms (ms : Natural);
procedure Delay_s (s : Natural);
end STM32GD.Clock.Timer;
|
with
lace.Event.Logger,
lace.Event.utility,
ada.unchecked_Conversion,
ada.unchecked_Deallocation;
package body lace.make_Observer
is
use type Event.Logger.view;
procedure destroy (Self : in out Item)
is
begin
Self.Responses.destroy;
end destroy;
------------
-- Responses
--
overriding
procedure add (Self : access Item; the_Response : in Response.view;
to_Kind : in Event.Kind;
from_Subject : in Event.subject_Name)
is
begin
Self.Responses.add (Self, the_Response, to_Kind, from_Subject);
end add;
overriding
procedure rid (Self : access Item; the_Response : in Response.view;
to_Kind : in Event.Kind;
from_Subject : in Event.subject_Name)
is
begin
Self.Responses.rid (Self, the_Response, to_Kind, from_Subject);
end rid;
overriding
procedure relay_responseless_Events (Self : in out Item; To : in Observer.view)
is
begin
Self.Responses.relay_responseless_Events (To);
end relay_responseless_Events;
-------------
-- Operations
--
overriding
procedure receive (Self : access Item; the_Event : in Event.item'Class := Event.null_Event;
from_Subject : in Event.subject_Name)
is
begin
Self.Responses.receive (Self, the_Event, from_Subject);
end receive;
overriding
procedure respond (Self : access Item)
is
begin
null; -- This is a null operation since there can never be any deferred events for an 'instant' observer.
end respond;
-----------------
-- Safe Responses
--
protected
body safe_Responses
is
procedure destroy
is
use subject_Maps_of_event_responses;
procedure free is new ada.unchecked_Deallocation (event_response_Map,
event_response_Map_view);
Cursor : subject_Maps_of_event_responses.Cursor := my_Responses.First;
the_Map : event_response_Map_view;
begin
while has_Element (Cursor)
loop
the_Map := Element (Cursor);
free (the_Map);
next (Cursor);
end loop;
end destroy;
------------
-- Responses
--
procedure add (Self : access Item'Class;
the_Response : in Response.view;
to_Kind : in Event.Kind;
from_Subject : in Event.subject_Name)
is
begin
if not my_Responses.contains (from_Subject)
then
my_Responses.insert (from_Subject,
new event_response_Map);
end if;
my_Responses.Element (from_Subject).insert (to_Kind,
the_Response);
if Observer.Logger /= null
then
Observer.Logger.log_new_Response (the_Response,
Observer.item'Class (Self.all),
to_Kind,
from_Subject);
end if;
end add;
procedure rid (Self : access Item'Class;
the_Response : in Response.view;
to_Kind : in Event.Kind;
from_Subject : in Event.subject_Name)
is
begin
my_Responses.Element (from_Subject).delete (to_Kind);
if Observer.Logger /= null
then
Observer.Logger.log_rid_Response (the_Response,
Observer.item'Class (Self.all),
to_Kind,
from_Subject);
end if;
end rid;
procedure relay_responseless_Events (To : in Observer.view)
is
begin
my_relay_Target := To;
end relay_responseless_Events;
function relay_Target return Observer.view
is
begin
return my_relay_Target;
end relay_Target;
function Contains (Subject : in Event.subject_Name) return Boolean
is
begin
return my_Responses.Contains (Subject);
end Contains;
function Element (Subject : in Event.subject_Name) return event_response_Map
is
begin
return my_Responses.Element (Subject).all;
end Element;
-------------
-- Operations
--
procedure receive (Self : access Item'Class;
the_Event : in Event.item'Class := Event.null_Event;
from_Subject : in Event.subject_Name)
is
use event_response_Maps,
subject_Maps_of_event_responses,
lace.Event.utility,
ada.Containers;
use type lace.Observer.view;
the_Responses : event_response_Map renames my_Responses.Element (from_Subject).all;
the_Response : constant event_response_Maps.Cursor := the_Responses.find (to_Kind (the_Event'Tag));
my_Name : constant String := Observer.item'Class (Self.all).Name;
begin
if has_Element (the_Response)
then
Element (the_Response).respond (the_Event);
if Observer.Logger /= null
then
Observer.Logger.log_Response (Element (the_Response),
Observer.view (Self),
the_Event,
from_Subject);
end if;
elsif relay_Target /= null
then
-- Self.relay_Target.notify (the_Event, from_Subject_Name); -- todo: Re-enable event relays.
if Observer.Logger /= null
then
Observer.Logger.log ("[Warning] ~ Relayed events are currently disabled.");
else
raise program_Error with "Event relaying is currently disabled.";
end if;
else
if Observer.Logger /= null
then
Observer.Logger.log ("[Warning] ~ Observer " & my_Name & " has no response to " & Name_of (the_Event)
& " from " & from_Subject & ".");
Observer.Logger.log (" count of responses =>" & the_Responses.Length'Image);
else
raise program_Error with "Observer " & my_Name & " has no response to " & Name_of (the_Event)
& " from " & from_Subject & ".";
end if;
end if;
exception
when constraint_Error =>
if Observer.Logger /= null
then
Observer.Logger.log (my_Name & " has no responses for events from " & from_Subject & ".");
else
raise Program_Error with my_Name & " has no responses for events from " & from_Subject & ".";
end if;
end receive;
end safe_Responses;
end lace.make_Observer;
|
-- C2A001C.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 NON-CONSECUTIVE UNDERSCORES ARE PERMITTED
-- IN EVERY PART OF A BASED FIXED POINT LITERAL THAT USES
-- COLONS INSTEAD OF SHARPS.
-- DCB 04/22/80
-- JRK 10/27/80
-- JBG 5/28/85
WITH REPORT;
PROCEDURE C2A001C IS
USE REPORT;
TYPE FIXED1 IS DELTA 2.0**(-6) RANGE 0.0 .. 10.0;
TYPE FIXED2 IS DELTA 2.0**(-4) RANGE 0.0 .. 100.0;
F2, F4 : FIXED1;
F1, F3, F5 : FIXED2;
BEGIN
TEST("C2A001C", "UNDERSCORES ALLOWED IN BASED FIXED POINT " &
"LITERALS THAT USE COLONS");
F1 := 1.2_5E1;
F2 := 1_6:1.A:;
F3 := 8:1_3.5:;
F4 := 8:2.3_7:;
F5 := 8:3.4:E0_1;
IF F1 = 1.25E1 AND F2 = 16:1.A: AND F3 = 8:13.5: AND
F4 = 8:2.37: AND F5 = 8:3.4:E01 THEN
NULL;
ELSE
FAILED("UNDERSCORES IN FIXED POINT LITERALS NOT " &
"HANDLED CORRECTLY");
END IF;
RESULT;
END C2A001C;
|
with Ada.Text_IO;
procedure Goto_Loop is
begin
<<Start>>
Ada.Text_IO.Put_Line ("Goto Loop!");
goto Start;
end Goto_Loop;
|
with
openGL.Errors,
openGL.Tasks,
GL.Binding;
package body openGL.Primitive.non_indexed
is
---------
-- Forge
--
overriding
procedure define (Self : in out Item; Kind : in facet_Kind)
is
begin
Self.facet_Kind := Kind;
end define;
function new_Primitive (Kind : in facet_Kind;
vertex_Count : in Natural) return Primitive.non_indexed.view
is
Self : constant View := new Item;
begin
define (Self.all, Kind);
Self.vertex_Count := vertex_Count;
return Self;
end new_Primitive;
overriding
procedure destroy (Self : in out Item) is null;
--------------
-- Operations
--
overriding
procedure render (Self : in out Item)
is
use GL,
GL.Binding;
begin
Tasks.check;
glDrawArrays (Thin (Self.facet_Kind),
0,
gl.GLint (Self.vertex_Count));
Errors.log;
end render;
end openGL.Primitive.non_indexed;
|
--
-- Copyright 2018 The wookey project team <wookey@ssi.gouv.fr>
-- - Ryad Benadjila
-- - Arnauld Michelizza
-- - Mathieu Renard
-- - Philippe Thierry
-- - Philippe Trebuchet
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
--
--
with m4.cpu;
with m4.cpu.instructions;
with m4.mpu;
with ewok.debug;
with ewok.layout; use ewok.layout;
with ewok.devices_shared; use ewok.devices_shared;
with ewok.ipc; use ewok.ipc;
with ewok.softirq;
with ewok.devices;
with c.kernel;
with types.c; use type types.c.t_retval;
with applications; -- Automatically generated
with sections; -- Automatically generated
package body ewok.tasks
with spark_mode => off
is
procedure idle_task
is
begin
pragma DEBUG (debug.log (debug.INFO, "IDLE thread"));
m4.cpu.enable_irq;
loop
m4.cpu.instructions.wait_for_interrupt;
end loop;
end idle_task;
procedure finished_task
is
begin
loop null; end loop;
end finished_task;
procedure create_stack
(sp : in system_address;
pc : in system_address;
params : in ewok.t_parameters;
frame_a : out ewok.t_stack_frame_access)
is
begin
frame_a := to_stack_frame_access (sp - (t_stack_frame'size / 8));
frame_a.all.R0 := params(0);
frame_a.all.R1 := params(1);
frame_a.all.R2 := params(2);
frame_a.all.R3 := params(3);
frame_a.all.R4 := 0;
frame_a.all.R5 := 0;
frame_a.all.R6 := 0;
frame_a.all.R7 := 0;
frame_a.all.R8 := 0;
frame_a.all.R9 := 0;
frame_a.all.R10 := 0;
frame_a.all.R11 := 0;
frame_a.all.R12 := 0;
frame_a.all.exc_return := m4.cpu.EXC_THREAD_MODE;
frame_a.all.LR := to_system_address (finished_task'address);
frame_a.all.PC := pc;
frame_a.all.PSR := m4.cpu.t_PSR_register'
(ISR_NUMBER => 0,
ICI_IT_lo => 0,
GE => 0,
Thumb => 1,
ICI_IT_hi => 0,
DSP_overflow => 0,
Overflow => 0,
Carry => 0,
Zero => 0,
Negative => 0);
end create_stack;
procedure set_default_values (tsk : out t_task)
is
begin
tsk.name := " ";
tsk.entry_point := 0;
tsk.ttype := TASK_TYPE_USER;
tsk.mode := TASK_MODE_MAINTHREAD;
tsk.id := ID_UNUSED;
tsk.slot := 0;
tsk.num_slots := 0;
tsk.prio := 0;
#if CONFIG_KERNEL_DOMAIN
tsk.domain := 0;
#end if;
#if CONFIG_KERNEL_SCHED_DEBUG
tsk.count := 0;
tsk.force_count := 0;
tsk.isr_count := 0;
#end if;
#if CONFIG_KERNEL_DMA_ENABLE
tsk.num_dma_shms := 0;
tsk.dma_shm :=
(others => ewok.exported.dma.t_dma_shm_info'
(granted_id => ID_UNUSED,
accessed_id => ID_UNUSED,
base => 0,
size => 0,
access_type => ewok.exported.dma.SHM_ACCESS_READ));
tsk.num_dma_id := 0;
tsk.dma_id := (others => ewok.dma_shared.ID_DMA_UNUSED);
#end if;
tsk.init_done := false;
tsk.num_devs := 0;
tsk.num_devs_mounted := 0;
tsk.device_id := (others => ewok.devices_shared.ID_DEV_UNUSED);
tsk.mounted_device := (others => ewok.devices_shared.ID_DEV_UNUSED);
tsk.data_slot_start := 0;
tsk.data_slot_end := 0;
tsk.txt_slot_start := 0;
tsk.txt_slot_end := 0;
tsk.stack_size := 0;
tsk.state := TASK_STATE_EMPTY;
tsk.isr_state := TASK_STATE_EMPTY;
tsk.ipc_endpoints := (others => NULL);
tsk.ctx.frame_a := NULL;
tsk.isr_ctx := t_isr_context'(0, ID_DEV_UNUSED, ISR_STANDARD, NULL);
end set_default_values;
procedure init_softirq_task
is
params : constant t_parameters := (others => 0);
begin
-- Setting default values
set_default_values (tasks_list(ID_SOFTIRQ));
tasks_list(ID_SOFTIRQ).name := softirq_task_name;
tasks_list(ID_SOFTIRQ).entry_point :=
to_system_address (ewok.softirq.main_task'address);
if tasks_list(ID_SOFTIRQ).entry_point mod 2 = 0 then
tasks_list(ID_SOFTIRQ).entry_point :=
tasks_list(ID_SOFTIRQ).entry_point + 1;
end if;
tasks_list(ID_SOFTIRQ).ttype := TASK_TYPE_KERNEL;
tasks_list(ID_SOFTIRQ).id := ID_SOFTIRQ;
-- Zeroing the stack
declare
stack : byte_array(1 .. STACK_SIZE_SOFTIRQ)
with address => to_address (STACK_TOP_SOFTIRQ - STACK_SIZE_SOFTIRQ);
begin
stack := (others => 0);
end;
-- Create the initial stack frame and set the stack pointer
create_stack
(STACK_TOP_SOFTIRQ,
tasks_list(ID_SOFTIRQ).entry_point,
params,
tasks_list(ID_SOFTIRQ).ctx.frame_a);
tasks_list(ID_SOFTIRQ).stack_size := STACK_SIZE_SOFTIRQ;
tasks_list(ID_SOFTIRQ).state := TASK_STATE_IDLE;
tasks_list(ID_SOFTIRQ).isr_state := TASK_STATE_IDLE;
for i in tasks_list(ID_SOFTIRQ).ipc_endpoints'range loop
tasks_list(ID_SOFTIRQ).ipc_endpoints(i) := NULL;
end loop;
pragma DEBUG (debug.log (debug.INFO, "Created SOFTIRQ context (pc: "
& system_address'image (tasks_list(ID_SOFTIRQ).entry_point)
& ") sp: "
& system_address'image
(to_system_address (tasks_list(ID_SOFTIRQ).ctx.frame_a))));
end init_softirq_task;
procedure init_idle_task
is
params : constant t_parameters := (others => 0);
begin
-- Setting default values
set_default_values (tasks_list(ID_KERNEL));
tasks_list(ID_KERNEL).name := idle_task_name;
tasks_list(ID_KERNEL).entry_point :=
to_system_address (idle_task'address);
if tasks_list(ID_KERNEL).entry_point mod 2 = 0 then
tasks_list(ID_KERNEL).entry_point :=
tasks_list(ID_KERNEL).entry_point + 1;
end if;
tasks_list(ID_KERNEL).ttype := TASK_TYPE_KERNEL;
tasks_list(ID_KERNEL).mode := TASK_MODE_MAINTHREAD;
tasks_list(ID_KERNEL).id := ID_KERNEL;
-- Zeroing the stack
declare
stack : byte_array(1 .. STACK_SIZE_IDLE)
with address => to_address (STACK_TOP_IDLE - STACK_SIZE_IDLE);
begin
stack := (others => 0);
end;
-- Create the initial stack frame and set the stack pointer
create_stack
(STACK_TOP_IDLE,
tasks_list(ID_KERNEL).entry_point,
params,
tasks_list(ID_KERNEL).ctx.frame_a);
tasks_list(ID_KERNEL).stack_size := STACK_SIZE_IDLE;
tasks_list(ID_KERNEL).state := TASK_STATE_RUNNABLE;
tasks_list(ID_KERNEL).isr_state := TASK_STATE_IDLE;
for i in tasks_list(ID_KERNEL).ipc_endpoints'range loop
tasks_list(ID_KERNEL).ipc_endpoints(i) := NULL;
end loop;
pragma DEBUG (debug.log (debug.INFO, "Created context for IDLE task (pc: "
& system_address'image (tasks_list(ID_KERNEL).entry_point)
& ") sp: "
& system_address'image
(to_system_address (tasks_list(ID_KERNEL).ctx.frame_a))));
end init_idle_task;
procedure init_apps
is
user_base : system_address;
params : t_parameters;
random : unsigned_32;
begin
if applications.t_real_task_id'last > ID_APP7 then
debug.panic ("Too many apps");
end if;
user_base := applications.txt_user_region_base;
for id in applications.list'range loop
set_default_values (tasks_list(id));
tasks_list(id).name := applications.list(id).name;
tasks_list(id).entry_point :=
user_base
+ to_unsigned_32 (applications.list(id).slot - 1)
* applications.txt_user_size / 8; -- this is MPU specific
if tasks_list(id).entry_point mod 2 = 0 then
tasks_list(id).entry_point := tasks_list(id).entry_point + 1;
end if;
tasks_list(id).ttype := TASK_TYPE_USER;
tasks_list(id).id := id;
tasks_list(id).slot := applications.list(id).slot;
tasks_list(id).num_slots := applications.list(id).num_slots;
tasks_list(id).prio := applications.list(id).priority;
#if CONFIG_KERNEL_DOMAIN
tasks_list(id).domain := applications.list(id).domain;
#end if;
#if CONFIG_KERNEL_SCHED_DEBUG
tasks_list(id).count := 0;
tasks_list(id).force_count := 0;
tasks_list(id).isr_count := 0;
#end if;
#if CONFIG_KERNEL_DMA_ENABLE
tasks_list(id).num_dma_shms := 0;
tasks_list(id).dma_shm :=
(others => ewok.exported.dma.t_dma_shm_info'
(granted_id => ID_UNUSED,
accessed_id => ID_UNUSED,
base => 0,
size => 0,
access_type => ewok.exported.dma.SHM_ACCESS_READ));
tasks_list(id).num_dma_id := 0;
tasks_list(id).dma_id :=
(others => ewok.dma_shared.ID_DMA_UNUSED);
#end if;
tasks_list(id).num_devs := 0;
tasks_list(id).num_devs_mounted := 0;
tasks_list(id).device_id := (others => ID_DEV_UNUSED);
tasks_list(id).mounted_device := (others => ID_DEV_UNUSED);
tasks_list(id).init_done := false;
tasks_list(id).data_slot_start :=
USER_DATA_BASE
+ to_unsigned_32 (tasks_list(id).slot - 1)
* USER_DATA_SIZE;
tasks_list(id).data_slot_end :=
USER_DATA_BASE
+ to_unsigned_32
(tasks_list(id).slot + tasks_list(id).num_slots - 1)
* USER_DATA_SIZE;
tasks_list(id).txt_slot_start := tasks_list(id).entry_point - 1;
tasks_list(id).txt_slot_end :=
user_base
+ to_unsigned_32
(applications.list(id).slot + tasks_list(id).num_slots - 1)
* applications.txt_user_size / 8; -- this is MPU specific
tasks_list(id).stack_bottom := applications.list(id).stack_bottom;
tasks_list(id).stack_top := applications.list(id).stack_top;
tasks_list(id).stack_size := applications.list(id).stack_size;
tasks_list(id).state := TASK_STATE_RUNNABLE;
tasks_list(id).isr_state := TASK_STATE_IDLE;
for i in tasks_list(id).ipc_endpoints'range loop
tasks_list(id).ipc_endpoints(i) := NULL;
end loop;
-- Zeroing the stack
declare
stack : byte_array(1 .. unsigned_32 (tasks_list(id).stack_size))
with address => to_address
(tasks_list(id).data_slot_end -
unsigned_32 (tasks_list(id).stack_size));
begin
stack := (others => 0);
end;
--
-- Create the initial stack frame and set the stack pointer
--
-- Getting the stack "canary"
if c.kernel.get_random_u32 (random) /= types.c.SUCCESS then
debug.panic ("Unable to get random from TRNG source");
end if;
params := t_parameters'(to_unsigned_32 (id), random, 0, 0);
create_stack
(tasks_list(id).stack_top,
tasks_list(id).entry_point,
params,
tasks_list(id).ctx.frame_a);
tasks_list(id).isr_ctx.entry_point := applications.list(id).start_isr;
pragma DEBUG (debug.log (debug.INFO, "Created task " & tasks_list(id).name
& " (pc: " & system_address'image (tasks_list(id).entry_point)
& ", data: " & system_address'image (tasks_list(id).data_slot_start)
& " - " & system_address'image (tasks_list(id).data_slot_end)
& ", sp: " & system_address'image
(to_system_address (tasks_list(id).ctx.frame_a))
& ", ID" & t_task_id'image (id) & ")"));
end loop;
end init_apps;
function get_task (id : ewok.tasks_shared.t_task_id)
return t_task_access
is
begin
return tasks_list(id)'access;
end get_task;
function get_task_id (name : t_task_name)
return ewok.tasks_shared.t_task_id
is
-- String comparison is a bit tricky here because:
-- - We want it case-unsensitive ('a' and 'A' are the same)
-- - The nul character and space ' ' are consider the same
--
-- The following inner functions are needed to effect comparisons:
-- Convert a character to uppercase
function to_upper (c : character)
return character
is
val : constant natural := character'pos (c);
begin
return
(if c in 'a' .. 'z' then character'val (val - 16#20#) else c);
end;
-- Test if a character is 'nul'
function is_nul (c : character)
return boolean
is begin
return c = ASCII.NUL or c = ' ';
end;
-- Test if the 2 strings are the same
function is_same (s1: t_task_name; s2 : t_task_name)
return boolean
is begin
for i in t_task_name'range loop
if is_nul (s1(i)) and is_nul (s2(i)) then
return true;
end if;
if to_upper (s1(i)) /= to_upper (s2(i)) then
return false;
end if;
end loop;
return true;
end;
begin
for id in applications.list'range loop
if is_same (tasks_list(id).name, name) then
return id;
end if;
end loop;
return ID_UNUSED;
end get_task_id;
#if CONFIG_KERNEL_DOMAIN
function get_domain (id : in ewok.tasks_shared.t_task_id)
return unsigned_8
is
begin
return tasks_list(id).domain;
end get_domain;
#end if;
function get_state
(id : ewok.tasks_shared.t_task_id;
mode : t_task_mode)
return t_task_state
is
begin
if mode = TASK_MODE_MAINTHREAD then
return tasks_list(id).state;
else
return tasks_list(id).isr_state;
end if;
end get_state;
procedure set_state
(id : ewok.tasks_shared.t_task_id;
mode : t_task_mode;
state : t_task_state)
is
begin
if mode = TASK_MODE_MAINTHREAD then
tasks_list(id).state := state;
else
tasks_list(id).isr_state := state;
end if;
end set_state;
function get_mode
(id : in ewok.tasks_shared.t_task_id)
return t_task_mode
is
begin
return tasks_list(id).mode;
end get_mode;
procedure set_mode
(id : in ewok.tasks_shared.t_task_id;
mode : in ewok.tasks_shared.t_task_mode)
is
begin
tasks_list(id).mode := mode;
end set_mode;
function is_ipc_waiting
(id : in ewok.tasks_shared.t_task_id)
return boolean
is
begin
for i in tasks_list(id).ipc_endpoints'range loop
if tasks_list(id).ipc_endpoints(i) /= NULL
and then
tasks_list(id).ipc_endpoints(i).state = ewok.ipc.WAIT_FOR_RECEIVER
and then
ewok.ipc.to_task_id (tasks_list(id).ipc_endpoints(i).to) = id
then
return true;
end if;
end loop;
return false;
end;
procedure append_device
(id : in ewok.tasks_shared.t_task_id;
dev_id : in ewok.devices_shared.t_device_id;
descriptor : out unsigned_8;
success : out boolean)
is
begin
if tasks_list(id).num_devs = MAX_DEVS_PER_TASK then
descriptor := 0;
success := false;
return;
end if;
for i in tasks_list(id).device_id'range loop
if tasks_list(id).device_id(i) = ID_DEV_UNUSED then
tasks_list(id).device_id(i) := dev_id;
tasks_list(id).num_devs := tasks_list(id).num_devs + 1;
descriptor := i;
success := true;
return;
end if;
end loop;
raise program_error;
end append_device;
procedure remove_device
(id : in ewok.tasks_shared.t_task_id;
dev_id : in ewok.devices_shared.t_device_id;
success : out boolean)
is
begin
for i in tasks_list(id).device_id'range loop
if tasks_list(id).device_id(i) = dev_id then
tasks_list(id).device_id(i) := ID_DEV_UNUSED;
tasks_list(id).num_devs := tasks_list(id).num_devs - 1;
success := true;
return;
end if;
end loop;
success := false;
end remove_device;
function is_mounted
(id : in ewok.tasks_shared.t_task_id;
dev_id : in ewok.devices_shared.t_device_id)
return boolean
is
begin
for i in tasks_list(id).mounted_device'range loop
if tasks_list(id).mounted_device(i) = dev_id then
return true;
end if;
end loop;
return false;
end is_mounted;
procedure mount_device
(id : in ewok.tasks_shared.t_task_id;
dev_id : in ewok.devices_shared.t_device_id;
success : out boolean)
is
ok : boolean;
begin
-- The device is already mounted
if is_mounted (id, dev_id) then
success := false;
return;
end if;
-- No available MPU region to map the device in memory
if tasks_list(id).num_devs_mounted = ewok.mpu.MAX_DEVICE_REGIONS then
success := false;
return;
end if;
-- Mounting the device
for i in tasks_list(id).mounted_device'range loop
if tasks_list(id).mounted_device(i) = ID_DEV_UNUSED then
tasks_list(id).mounted_device(i) := dev_id;
tasks_list(id).num_devs_mounted :=
tasks_list(id).num_devs_mounted + 1;
-- Mapping the device in its related MPU region
ewok.devices.mpu_mapping_device
(dev_id, ewok.mpu.device_regions(i), ok);
if not ok then
tasks_list(id).mounted_device(i) := ID_DEV_UNUSED;
tasks_list(id).num_devs_mounted :=
tasks_list(id).num_devs_mounted - 1;
success := false;
return;
end if;
success := true;
return;
end if;
end loop;
raise program_error;
end mount_device;
procedure unmount_device
(id : in ewok.tasks_shared.t_task_id;
dev_id : in ewok.devices_shared.t_device_id;
success : out boolean)
is
begin
for i in tasks_list(id).mounted_device'range loop
if tasks_list(id).mounted_device(i) = dev_id then
tasks_list(id).mounted_device(i) := ID_DEV_UNUSED;
tasks_list(id).num_devs_mounted :=
tasks_list(id).num_devs_mounted - 1;
-- Unmapping the device from its related MPU region
m4.mpu.disable_region (ewok.mpu.device_regions(i));
success := true;
return;
end if;
end loop;
success := false;
end unmount_device;
function is_real_user (id : ewok.tasks_shared.t_task_id) return boolean
is
begin
return (id in applications.t_real_task_id);
end is_real_user;
procedure set_return_value
(id : in ewok.tasks_shared.t_task_id;
mode : in t_task_mode;
val : in unsigned_32)
is
begin
case mode is
when TASK_MODE_MAINTHREAD =>
tasks_list(id).ctx.frame_a.all.R0 := val;
when TASK_MODE_ISRTHREAD =>
tasks_list(id).isr_ctx.frame_a.all.R0 := val;
end case;
end set_return_value;
procedure task_init
is
begin
for id in tasks_list'range loop
set_default_values (tasks_list(id));
end loop;
init_idle_task;
init_softirq_task;
init_apps;
sections.task_map_data;
end task_init;
function is_init_done
(id : ewok.tasks_shared.t_task_id)
return boolean
is
begin
return tasks_list(id).init_done;
end is_init_done;
end ewok.tasks;
|
-- This spec has been automatically generated from STM32WB55x.svd
pragma Restrictions (No_Elaboration_Code);
pragma Ada_2012;
pragma Style_Checks (Off);
with HAL;
with System;
package STM32_SVD.TIM2 is
pragma Preelaborate;
---------------
-- Registers --
---------------
subtype CR1_CMS_Field is HAL.UInt2;
subtype CR1_CKD_Field is HAL.UInt2;
type CR1_Register is record
CEN : Boolean := False;
UDIS : Boolean := False;
URS : Boolean := False;
OPM : Boolean := False;
DIR : Boolean := False;
CMS : CR1_CMS_Field := 16#0#;
ARPE : Boolean := False;
CKD : CR1_CKD_Field := 16#0#;
-- unspecified
Reserved_10_10 : HAL.Bit := 16#0#;
UIFREMAP : Boolean := False;
-- unspecified
Reserved_12_31 : HAL.UInt20 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CR1_Register use record
CEN at 0 range 0 .. 0;
UDIS at 0 range 1 .. 1;
URS at 0 range 2 .. 2;
OPM at 0 range 3 .. 3;
DIR at 0 range 4 .. 4;
CMS at 0 range 5 .. 6;
ARPE at 0 range 7 .. 7;
CKD at 0 range 8 .. 9;
Reserved_10_10 at 0 range 10 .. 10;
UIFREMAP at 0 range 11 .. 11;
Reserved_12_31 at 0 range 12 .. 31;
end record;
subtype CR2_MMS_Field is HAL.UInt3;
type CR2_Register is record
-- unspecified
Reserved_0_2 : HAL.UInt3 := 16#0#;
CCDS : Boolean := False;
MMS : CR2_MMS_Field := 16#0#;
TI1S : Boolean := False;
-- unspecified
Reserved_8_31 : HAL.UInt24 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CR2_Register use record
Reserved_0_2 at 0 range 0 .. 2;
CCDS at 0 range 3 .. 3;
MMS at 0 range 4 .. 6;
TI1S at 0 range 7 .. 7;
Reserved_8_31 at 0 range 8 .. 31;
end record;
subtype SMCR_SMS_Field is HAL.UInt3;
subtype SMCR_TS_Field is HAL.UInt3;
subtype SMCR_ETF_Field is HAL.UInt4;
subtype SMCR_ETPS_Field is HAL.UInt2;
subtype SMCR_TS_Field_1 is HAL.UInt2;
type SMCR_Register is record
SMS : SMCR_SMS_Field := 16#0#;
-- unspecified
Reserved_3_3 : HAL.Bit := 16#0#;
TS : SMCR_TS_Field := 16#0#;
MSM : Boolean := False;
ETF : SMCR_ETF_Field := 16#0#;
ETPS : SMCR_ETPS_Field := 16#0#;
ECE : Boolean := False;
ETP : Boolean := False;
SMS_1 : Boolean := False;
-- unspecified
Reserved_17_19 : HAL.UInt3 := 16#0#;
TS_1 : SMCR_TS_Field_1 := 16#0#;
-- unspecified
Reserved_22_31 : HAL.UInt10 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for SMCR_Register use record
SMS at 0 range 0 .. 2;
Reserved_3_3 at 0 range 3 .. 3;
TS at 0 range 4 .. 6;
MSM at 0 range 7 .. 7;
ETF at 0 range 8 .. 11;
ETPS at 0 range 12 .. 13;
ECE at 0 range 14 .. 14;
ETP at 0 range 15 .. 15;
SMS_1 at 0 range 16 .. 16;
Reserved_17_19 at 0 range 17 .. 19;
TS_1 at 0 range 20 .. 21;
Reserved_22_31 at 0 range 22 .. 31;
end record;
type DIER_Register is record
UIE : Boolean := False;
CC1IE : Boolean := False;
CC2IE : Boolean := False;
CC3IE : Boolean := False;
CC4IE : Boolean := False;
-- unspecified
Reserved_5_5 : HAL.Bit := 16#0#;
TIE : Boolean := False;
-- unspecified
Reserved_7_7 : HAL.Bit := 16#0#;
UDE : Boolean := False;
CC1DE : Boolean := False;
CC2DE : Boolean := False;
CC3DE : Boolean := False;
CC4DE : Boolean := False;
-- unspecified
Reserved_13_31 : HAL.UInt19 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for DIER_Register use record
UIE at 0 range 0 .. 0;
CC1IE at 0 range 1 .. 1;
CC2IE at 0 range 2 .. 2;
CC3IE at 0 range 3 .. 3;
CC4IE at 0 range 4 .. 4;
Reserved_5_5 at 0 range 5 .. 5;
TIE at 0 range 6 .. 6;
Reserved_7_7 at 0 range 7 .. 7;
UDE at 0 range 8 .. 8;
CC1DE at 0 range 9 .. 9;
CC2DE at 0 range 10 .. 10;
CC3DE at 0 range 11 .. 11;
CC4DE at 0 range 12 .. 12;
Reserved_13_31 at 0 range 13 .. 31;
end record;
type SR_Register is record
UIF : Boolean := False;
CC1IF : Boolean := False;
CC2IF : Boolean := False;
CC3IF : Boolean := False;
CC4IF : Boolean := False;
-- unspecified
Reserved_5_5 : HAL.Bit := 16#0#;
TIF : Boolean := False;
-- unspecified
Reserved_7_8 : HAL.UInt2 := 16#0#;
CC1OF : Boolean := False;
CC2OF : Boolean := False;
CC3OF : Boolean := False;
CC4OF : Boolean := False;
-- unspecified
Reserved_13_31 : HAL.UInt19 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for SR_Register use record
UIF at 0 range 0 .. 0;
CC1IF at 0 range 1 .. 1;
CC2IF at 0 range 2 .. 2;
CC3IF at 0 range 3 .. 3;
CC4IF at 0 range 4 .. 4;
Reserved_5_5 at 0 range 5 .. 5;
TIF at 0 range 6 .. 6;
Reserved_7_8 at 0 range 7 .. 8;
CC1OF at 0 range 9 .. 9;
CC2OF at 0 range 10 .. 10;
CC3OF at 0 range 11 .. 11;
CC4OF at 0 range 12 .. 12;
Reserved_13_31 at 0 range 13 .. 31;
end record;
type EGR_Register is record
UG : Boolean := False;
CC1G : Boolean := False;
CC2G : Boolean := False;
CC3G : Boolean := False;
CC4G : Boolean := False;
-- unspecified
Reserved_5_5 : HAL.Bit := 16#0#;
TG : Boolean := False;
-- unspecified
Reserved_7_31 : HAL.UInt25 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for EGR_Register use record
UG at 0 range 0 .. 0;
CC1G at 0 range 1 .. 1;
CC2G at 0 range 2 .. 2;
CC3G at 0 range 3 .. 3;
CC4G at 0 range 4 .. 4;
Reserved_5_5 at 0 range 5 .. 5;
TG at 0 range 6 .. 6;
Reserved_7_31 at 0 range 7 .. 31;
end record;
subtype CCMR1_Output_CC1S_Field is HAL.UInt2;
subtype CCMR1_Output_OC1M_Field is HAL.UInt3;
subtype CCMR1_Output_CC2S_Field is HAL.UInt2;
subtype CCMR1_Output_OC2M_Field is HAL.UInt3;
type CCMR1_Output_Register is record
CC1S : CCMR1_Output_CC1S_Field := 16#0#;
OC1FE : Boolean := False;
OC1PE : Boolean := False;
OC1M : CCMR1_Output_OC1M_Field := 16#0#;
OC1CE : Boolean := False;
CC2S : CCMR1_Output_CC2S_Field := 16#0#;
OC2FE : Boolean := False;
OC2PE : Boolean := False;
OC2M : CCMR1_Output_OC2M_Field := 16#0#;
OC2CE : Boolean := False;
OC1M_1 : Boolean := False;
-- unspecified
Reserved_17_23 : HAL.UInt7 := 16#0#;
OC2M_1 : Boolean := False;
-- unspecified
Reserved_25_31 : HAL.UInt7 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CCMR1_Output_Register use record
CC1S at 0 range 0 .. 1;
OC1FE at 0 range 2 .. 2;
OC1PE at 0 range 3 .. 3;
OC1M at 0 range 4 .. 6;
OC1CE at 0 range 7 .. 7;
CC2S at 0 range 8 .. 9;
OC2FE at 0 range 10 .. 10;
OC2PE at 0 range 11 .. 11;
OC2M at 0 range 12 .. 14;
OC2CE at 0 range 15 .. 15;
OC1M_1 at 0 range 16 .. 16;
Reserved_17_23 at 0 range 17 .. 23;
OC2M_1 at 0 range 24 .. 24;
Reserved_25_31 at 0 range 25 .. 31;
end record;
subtype CCMR1_Input_CC1S_Field is HAL.UInt2;
subtype CCMR1_Input_IC1PSC_Field is HAL.UInt2;
subtype CCMR1_Input_IC1F_Field is HAL.UInt4;
subtype CCMR1_Input_CC2S_Field is HAL.UInt2;
subtype CCMR1_Input_IC2PSC_Field is HAL.UInt2;
subtype CCMR1_Input_IC2F_Field is HAL.UInt4;
type CCMR1_Input_Register is record
CC1S : CCMR1_Input_CC1S_Field := 16#0#;
IC1PSC : CCMR1_Input_IC1PSC_Field := 16#0#;
IC1F : CCMR1_Input_IC1F_Field := 16#0#;
CC2S : CCMR1_Input_CC2S_Field := 16#0#;
IC2PSC : CCMR1_Input_IC2PSC_Field := 16#0#;
IC2F : CCMR1_Input_IC2F_Field := 16#0#;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CCMR1_Input_Register use record
CC1S at 0 range 0 .. 1;
IC1PSC at 0 range 2 .. 3;
IC1F at 0 range 4 .. 7;
CC2S at 0 range 8 .. 9;
IC2PSC at 0 range 10 .. 11;
IC2F at 0 range 12 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype CCMR2_Output_CC3S_Field is HAL.UInt2;
subtype CCMR2_Output_OC3M_Field is HAL.UInt3;
subtype CCMR2_Output_CC4S_Field is HAL.UInt2;
subtype CCMR2_Output_OC4M_Field is HAL.UInt3;
type CCMR2_Output_Register is record
CC3S : CCMR2_Output_CC3S_Field := 16#0#;
OC3FE : Boolean := False;
OC3PE : Boolean := False;
OC3M : CCMR2_Output_OC3M_Field := 16#0#;
OC3CE : Boolean := False;
CC4S : CCMR2_Output_CC4S_Field := 16#0#;
OC4FE : Boolean := False;
OC4PE : Boolean := False;
OC4M : CCMR2_Output_OC4M_Field := 16#0#;
O24CE : Boolean := False;
OC3M_1 : Boolean := False;
-- unspecified
Reserved_17_23 : HAL.UInt7 := 16#0#;
OC4M_1 : Boolean := False;
-- unspecified
Reserved_25_31 : HAL.UInt7 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CCMR2_Output_Register use record
CC3S at 0 range 0 .. 1;
OC3FE at 0 range 2 .. 2;
OC3PE at 0 range 3 .. 3;
OC3M at 0 range 4 .. 6;
OC3CE at 0 range 7 .. 7;
CC4S at 0 range 8 .. 9;
OC4FE at 0 range 10 .. 10;
OC4PE at 0 range 11 .. 11;
OC4M at 0 range 12 .. 14;
O24CE at 0 range 15 .. 15;
OC3M_1 at 0 range 16 .. 16;
Reserved_17_23 at 0 range 17 .. 23;
OC4M_1 at 0 range 24 .. 24;
Reserved_25_31 at 0 range 25 .. 31;
end record;
subtype CCMR2_Input_CC3S_Field is HAL.UInt2;
subtype CCMR2_Input_IC3PSC_Field is HAL.UInt2;
subtype CCMR2_Input_IC3F_Field is HAL.UInt4;
subtype CCMR2_Input_CC4S_Field is HAL.UInt2;
subtype CCMR2_Input_IC4PSC_Field is HAL.UInt2;
subtype CCMR2_Input_IC4F_Field is HAL.UInt4;
type CCMR2_Input_Register is record
CC3S : CCMR2_Input_CC3S_Field := 16#0#;
IC3PSC : CCMR2_Input_IC3PSC_Field := 16#0#;
IC3F : CCMR2_Input_IC3F_Field := 16#0#;
CC4S : CCMR2_Input_CC4S_Field := 16#0#;
IC4PSC : CCMR2_Input_IC4PSC_Field := 16#0#;
IC4F : CCMR2_Input_IC4F_Field := 16#0#;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CCMR2_Input_Register use record
CC3S at 0 range 0 .. 1;
IC3PSC at 0 range 2 .. 3;
IC3F at 0 range 4 .. 7;
CC4S at 0 range 8 .. 9;
IC4PSC at 0 range 10 .. 11;
IC4F at 0 range 12 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
type CCER_Register is record
CC1E : Boolean := False;
CC1P : Boolean := False;
-- unspecified
Reserved_2_2 : HAL.Bit := 16#0#;
CC1NP : Boolean := False;
CC2E : Boolean := False;
CC2P : Boolean := False;
-- unspecified
Reserved_6_6 : HAL.Bit := 16#0#;
CC2NP : Boolean := False;
CC3E : Boolean := False;
CC3P : Boolean := False;
-- unspecified
Reserved_10_10 : HAL.Bit := 16#0#;
CC3NP : Boolean := False;
CC4E : Boolean := False;
CC4P : Boolean := False;
-- unspecified
Reserved_14_14 : HAL.Bit := 16#0#;
CC4NP : Boolean := False;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CCER_Register use record
CC1E at 0 range 0 .. 0;
CC1P at 0 range 1 .. 1;
Reserved_2_2 at 0 range 2 .. 2;
CC1NP at 0 range 3 .. 3;
CC2E at 0 range 4 .. 4;
CC2P at 0 range 5 .. 5;
Reserved_6_6 at 0 range 6 .. 6;
CC2NP at 0 range 7 .. 7;
CC3E at 0 range 8 .. 8;
CC3P at 0 range 9 .. 9;
Reserved_10_10 at 0 range 10 .. 10;
CC3NP at 0 range 11 .. 11;
CC4E at 0 range 12 .. 12;
CC4P at 0 range 13 .. 13;
Reserved_14_14 at 0 range 14 .. 14;
CC4NP at 0 range 15 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype PSC_PSC_Field is HAL.UInt16;
type PSC_Register is record
PSC : PSC_PSC_Field := 16#0#;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for PSC_Register use record
PSC at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype DCR_DBA_Field is HAL.UInt5;
subtype DCR_DBL_Field is HAL.UInt5;
type DCR_Register is record
DBA : DCR_DBA_Field := 16#0#;
-- unspecified
Reserved_5_7 : HAL.UInt3 := 16#0#;
DBL : DCR_DBL_Field := 16#0#;
-- unspecified
Reserved_13_31 : HAL.UInt19 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for DCR_Register use record
DBA at 0 range 0 .. 4;
Reserved_5_7 at 0 range 5 .. 7;
DBL at 0 range 8 .. 12;
Reserved_13_31 at 0 range 13 .. 31;
end record;
subtype DMAR_DMAB_Field is HAL.UInt16;
type DMAR_Register is record
DMAB : DMAR_DMAB_Field := 16#0#;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for DMAR_Register use record
DMAB at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype OR1_TI4_RMP_Field is HAL.UInt2;
type OR1_Register is record
ITR_RMP : Boolean := False;
ETR1_RMP : Boolean := False;
TI4_RMP : OR1_TI4_RMP_Field := 16#0#;
-- unspecified
Reserved_4_31 : HAL.UInt28 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for OR1_Register use record
ITR_RMP at 0 range 0 .. 0;
ETR1_RMP at 0 range 1 .. 1;
TI4_RMP at 0 range 2 .. 3;
Reserved_4_31 at 0 range 4 .. 31;
end record;
subtype AF1_ETRSEL_Field is HAL.UInt4;
type AF1_Register is record
-- unspecified
Reserved_0_13 : HAL.UInt14 := 16#0#;
ETRSEL : AF1_ETRSEL_Field := 16#0#;
-- unspecified
Reserved_18_31 : HAL.UInt14 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for AF1_Register use record
Reserved_0_13 at 0 range 0 .. 13;
ETRSEL at 0 range 14 .. 17;
Reserved_18_31 at 0 range 18 .. 31;
end record;
subtype TISEL_TI1SEL_Field is HAL.UInt4;
subtype TISEL_TI2SEL_Field is HAL.UInt4;
type TISEL_Register is record
TI1SEL : TISEL_TI1SEL_Field := 16#0#;
-- unspecified
Reserved_4_7 : HAL.UInt4 := 16#0#;
TI2SEL : TISEL_TI2SEL_Field := 16#0#;
-- unspecified
Reserved_12_31 : HAL.UInt20 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for TISEL_Register use record
TI1SEL at 0 range 0 .. 3;
Reserved_4_7 at 0 range 4 .. 7;
TI2SEL at 0 range 8 .. 11;
Reserved_12_31 at 0 range 12 .. 31;
end record;
-----------------
-- Peripherals --
-----------------
type TIM2_Disc is
(
Output,
Input);
type TIM2_Peripheral
(Discriminent : TIM2_Disc := Output)
is record
CR1 : aliased CR1_Register;
CR2 : aliased CR2_Register;
SMCR : aliased SMCR_Register;
DIER : aliased DIER_Register;
SR : aliased SR_Register;
EGR : aliased EGR_Register;
CCER : aliased CCER_Register;
CNT : aliased HAL.UInt32;
PSC : aliased PSC_Register;
ARR : aliased HAL.UInt32;
CCR1 : aliased HAL.UInt32;
CCR2 : aliased HAL.UInt32;
CCR3 : aliased HAL.UInt32;
CCR4 : aliased HAL.UInt32;
DCR : aliased DCR_Register;
DMAR : aliased DMAR_Register;
OR1 : aliased OR1_Register;
AF1 : aliased AF1_Register;
TISEL : aliased TISEL_Register;
case Discriminent is
when Output =>
CCMR1_Output : aliased CCMR1_Output_Register;
CCMR2_Output : aliased CCMR2_Output_Register;
when Input =>
CCMR1_Input : aliased CCMR1_Input_Register;
CCMR2_Input : aliased CCMR2_Input_Register;
end case;
end record
with Unchecked_Union, Volatile;
for TIM2_Peripheral use record
CR1 at 16#0# range 0 .. 31;
CR2 at 16#4# range 0 .. 31;
SMCR at 16#8# range 0 .. 31;
DIER at 16#C# range 0 .. 31;
SR at 16#10# range 0 .. 31;
EGR at 16#14# range 0 .. 31;
CCER at 16#20# range 0 .. 31;
CNT at 16#24# range 0 .. 31;
PSC at 16#28# range 0 .. 31;
ARR at 16#2C# range 0 .. 31;
CCR1 at 16#34# range 0 .. 31;
CCR2 at 16#38# range 0 .. 31;
CCR3 at 16#3C# range 0 .. 31;
CCR4 at 16#40# range 0 .. 31;
DCR at 16#48# range 0 .. 31;
DMAR at 16#4C# range 0 .. 31;
OR1 at 16#50# range 0 .. 31;
AF1 at 16#60# range 0 .. 31;
TISEL at 16#68# range 0 .. 31;
CCMR1_Output at 16#18# range 0 .. 31;
CCMR2_Output at 16#1C# range 0 .. 31;
CCMR1_Input at 16#18# range 0 .. 31;
CCMR2_Input at 16#1C# range 0 .. 31;
end record;
TIM2_Periph : aliased TIM2_Peripheral
with Import, Address => System'To_Address (16#40000000#);
end STM32_SVD.TIM2;
|
-----------------------------------------------------------------------------
-- --
-- GNAT RUNTIME COMPONENTS --
-- --
-- A D A . C H A R A C T E R S . H A N D L I N G --
-- --
-- S p e c --
-- --
-- $Revision: 2 $ --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --
-- --
------------------------------------------------------------------------------
package Ada.Characters.Handling is
pragma Preelaborate (Handling);
----------------------------------------
-- Character Classification Functions --
----------------------------------------
function Is_Control (Item : in Character) return Boolean;
function Is_Graphic (Item : in Character) return Boolean;
function Is_Letter (Item : in Character) return Boolean;
function Is_Lower (Item : in Character) return Boolean;
function Is_Upper (Item : in Character) return Boolean;
function Is_Basic (Item : in Character) return Boolean;
function Is_Digit (Item : in Character) return Boolean;
function Is_Decimal_Digit (Item : in Character) return Boolean
renames Is_Digit;
function Is_Hexadecimal_Digit (Item : in Character) return Boolean;
function Is_Alphanumeric (Item : in Character) return Boolean;
function Is_Special (Item : in Character) return Boolean;
---------------------------------------------------
-- Conversion Functions for Character and String --
---------------------------------------------------
function To_Lower (Item : in Character) return Character;
function To_Upper (Item : in Character) return Character;
function To_Basic (Item : in Character) return Character;
function To_Lower (Item : in String) return String;
function To_Upper (Item : in String) return String;
function To_Basic (Item : in String) return String;
----------------------------------------------------------------------
-- 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 : in Character) return Boolean;
function Is_ISO_646 (Item : in String) return Boolean;
function To_ISO_646
(Item : in Character;
Substitute : in ISO_646 := ' ')
return ISO_646;
function To_ISO_646
(Item : in String;
Substitute : in ISO_646 := ' ')
return String;
------------------------------------------------------
-- Classifications of Wide_Character and Characters --
------------------------------------------------------
function Is_Character (Item : in Wide_Character) return Boolean;
function Is_String (Item : in Wide_String) return Boolean;
------------------------------------------------------
-- Conversions between Wide_Character and Character --
------------------------------------------------------
function To_Character
(Item : in Wide_Character;
Substitute : in Character := ' ')
return Character;
function To_String
(Item : in Wide_String;
Substitute : in Character := ' ')
return String;
function To_Wide_Character (Item : in Character) return Wide_Character;
function To_Wide_String (Item : in String) return Wide_String;
private
pragma Inline (Is_Control);
pragma Inline (Is_Graphic);
pragma Inline (Is_Letter);
pragma Inline (Is_Lower);
pragma Inline (Is_Upper);
pragma Inline (Is_Basic);
pragma Inline (Is_Digit);
pragma Inline (Is_Hexadecimal_Digit);
pragma Inline (Is_Alphanumeric);
pragma Inline (Is_Special);
pragma Inline (To_Lower);
pragma Inline (To_Upper);
pragma Inline (To_Basic);
pragma Inline (Is_ISO_646);
pragma Inline (Is_Character);
pragma Inline (To_Character);
pragma Inline (To_Wide_Character);
end Ada.Characters.Handling;
|
-- Copyright (c) 2015-2019 Marcel Schneider
-- for details see License.txt
with TokenValue; use TokenValue;
with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
package body Lexer is
function ReadToken (O : Object) return TokenValue.Object is
TO : TokenValue.Object;
begin
TO.Message := To_Unbounded_String ("Testing");
return TO;
end ReadToken;
end Lexer;
|
package Employee_Data is
type Employee_T is limited private;
type Hourly_Rate_T is new Integer; -- better implementation
type Id_T is new Integer; -- better implementation
function Create
(Name : String;
Rate : Hourly_Rate_T)
return Employee_T;
function Id
(Employee : Employee_T)
return Id_T;
function Name
(Employee : Employee_T)
return String;
function Rate
(Employee : Employee_T)
return Hourly_Rate_T;
private
-- finish implementation
type Employee_T is limited null record;
end Employee_Data;
|
with Ada.Containers.Indefinite_Doubly_Linked_Lists;
with Ada.Finalization;
package Protypo.Api.Engine_Values.List_Wrappers is
type List is tagged private;
procedure Append (Item : in out List;
Value : Engine_Value);
function Iterator (Item : List) return Handlers.Iterator_Interface_Access;
private
package Engine_Value_Lists is
new Ada.Containers.Indefinite_Doubly_Linked_Lists (Engine_Value);
type Value_List_Access is access Engine_Value_Lists.List;
type List is new Ada.Finalization.Controlled with
record
L : Value_List_Access;
end record;
overriding procedure Initialize (Obj : in out List);
end Protypo.Api.Engine_Values.List_Wrappers;
|
-- CD3015E.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 WHEN THERE IS NO ENUMERATION CLAUSE FOR THE PARENT
-- TYPE IN A GENERIC UNIT, THE DERIVED TYPE CAN BE USED CORRECTLY
-- IN ORDERING RELATIONS, INDEXING ARRAYS, AND IN GENERIC
-- INSTANTIATIONS.
-- HISTORY
-- DHH 10/05/87 CREATED ORIGINAL TEST
-- DHH 03/30/89 CHANGED EXTENSION FROM '.DEP' TO '.ADA' AND ADDED
-- CHECK FOR REPRESENTATION CLAUSE.
-- RJW 03/20/90 MODIFIED CHECK FOR ARRAY INDEXING.
-- THS 09/18/90 REVISED WORDING ON FAILURE ERROR MESSAGE.
WITH REPORT; USE REPORT;
WITH ENUM_CHECK; -- CONTAINS A CALL TO 'FAILED'.
PROCEDURE CD3015E IS
BEGIN
TEST ("CD3015E", "CHECK THAT WHEN THERE " &
"IS NO ENUMERATION CLAUSE FOR THE PARENT " &
"TYPE IN A GENERIC UNIT, THE " &
"DERIVED TYPE CAN BE USED CORRECTLY IN " &
"ORDERING RELATIONS, INDEXING ARRAYS, AND IN " &
"GENERIC INSTANTIATIONS");
DECLARE
GENERIC
PACKAGE GENPACK IS
TYPE MAIN IS (RED,BLUE,YELLOW,'R','B','Y');
TYPE HUE IS NEW MAIN;
FOR HUE USE
(RED => 1, BLUE => 6,
YELLOW => 11, 'R' => 16,
'B' => 22, 'Y' => 30);
TYPE BASE IS ARRAY(HUE) OF INTEGER;
COLOR,BASIC : HUE;
BARRAY : BASE;
T : INTEGER := 1;
TYPE INT1 IS RANGE 1 .. 30;
FOR INT1'SIZE USE HUE'SIZE;
PROCEDURE CHECK_1 IS NEW ENUM_CHECK(HUE, INT1);
GENERIC
TYPE ENUM IS (<>);
PROCEDURE CHANGE(X,Y : IN OUT ENUM);
END GENPACK;
PACKAGE BODY GENPACK IS
PROCEDURE CHANGE(X,Y : IN OUT ENUM) IS
T : ENUM;
BEGIN
T := X;
X := Y;
Y := T;
END CHANGE;
PROCEDURE PROC IS NEW CHANGE(HUE);
BEGIN
BASIC := RED;
COLOR := HUE'SUCC(BASIC);
IF (COLOR < BASIC OR
BASIC >= 'R' OR
'Y' <= COLOR OR
COLOR > 'B') THEN
FAILED("ORDERING RELATIONS ARE INCORRECT");
END IF;
PROC(BASIC,COLOR);
IF COLOR /= RED THEN
FAILED("VALUES OF PARAMETERS TO INSTANCE OF " &
"GENERIC UNIT NOT CORRECT AFTER CALL");
END IF;
FOR I IN HUE LOOP
BARRAY(I) := IDENT_INT(T);
T := T + 1;
END LOOP;
IF (BARRAY (RED) /= 1 OR BARRAY (BLUE) /= 2 OR
BARRAY (YELLOW) /= 3 OR BARRAY ('R') /= 4 OR
BARRAY ('B') /= 5 OR BARRAY ('Y') /= 6) THEN
FAILED("INDEXING ARRAY FAILURE");
END IF;
CHECK_1 (YELLOW, 11, "HUE");
END GENPACK;
PACKAGE P IS NEW GENPACK;
BEGIN
NULL;
END;
RESULT;
END CD3015E;
|
--
-- Copyright (C) 2017, AdaCore
--
-- This spec has been automatically generated from ATSAM4SD32C.svd
pragma Ada_2012;
pragma Style_Checks (Off);
with System;
package Interfaces.SAM.SYSC is
pragma Preelaborate;
pragma No_Elaboration_Code_All;
---------------
-- Registers --
---------------
-- General Purpose Backup Register
-- General Purpose Backup Register
type GPBR_GPBR_Registers is array (0 .. 7) of Interfaces.SAM.UInt32
with Volatile;
subtype RSTC_CR_KEY_Field is Interfaces.SAM.Byte;
-- Control Register
type RSTC_CR_Register is record
-- Write-only. Processor Reset
PROCRST : Boolean := False;
-- unspecified
Reserved_1_1 : Interfaces.SAM.Bit := 16#0#;
-- Write-only. Peripheral Reset
PERRST : Boolean := False;
-- Write-only. External Reset
EXTRST : Boolean := False;
-- unspecified
Reserved_4_23 : Interfaces.SAM.UInt20 := 16#0#;
-- Write-only. System Reset Key
KEY : RSTC_CR_KEY_Field := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for RSTC_CR_Register use record
PROCRST at 0 range 0 .. 0;
Reserved_1_1 at 0 range 1 .. 1;
PERRST at 0 range 2 .. 2;
EXTRST at 0 range 3 .. 3;
Reserved_4_23 at 0 range 4 .. 23;
KEY at 0 range 24 .. 31;
end record;
subtype RSTC_SR_RSTTYP_Field is Interfaces.SAM.UInt3;
-- Status Register
type RSTC_SR_Register is record
-- Read-only. User Reset Status
URSTS : Boolean;
-- unspecified
Reserved_1_7 : Interfaces.SAM.UInt7;
-- Read-only. Reset Type
RSTTYP : RSTC_SR_RSTTYP_Field;
-- unspecified
Reserved_11_15 : Interfaces.SAM.UInt5;
-- Read-only. NRST Pin Level
NRSTL : Boolean;
-- Read-only. Software Reset Command in Progress
SRCMP : Boolean;
-- unspecified
Reserved_18_31 : Interfaces.SAM.UInt14;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for RSTC_SR_Register use record
URSTS at 0 range 0 .. 0;
Reserved_1_7 at 0 range 1 .. 7;
RSTTYP at 0 range 8 .. 10;
Reserved_11_15 at 0 range 11 .. 15;
NRSTL at 0 range 16 .. 16;
SRCMP at 0 range 17 .. 17;
Reserved_18_31 at 0 range 18 .. 31;
end record;
subtype RSTC_MR_ERSTL_Field is Interfaces.SAM.UInt4;
subtype RSTC_MR_KEY_Field is Interfaces.SAM.Byte;
-- Mode Register
type RSTC_MR_Register is record
-- User Reset Enable
URSTEN : Boolean := True;
-- unspecified
Reserved_1_3 : Interfaces.SAM.UInt3 := 16#0#;
-- User Reset Interrupt Enable
URSTIEN : Boolean := False;
-- unspecified
Reserved_5_7 : Interfaces.SAM.UInt3 := 16#0#;
-- External Reset Length
ERSTL : RSTC_MR_ERSTL_Field := 16#0#;
-- unspecified
Reserved_12_23 : Interfaces.SAM.UInt12 := 16#0#;
-- Password
KEY : RSTC_MR_KEY_Field := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for RSTC_MR_Register use record
URSTEN at 0 range 0 .. 0;
Reserved_1_3 at 0 range 1 .. 3;
URSTIEN at 0 range 4 .. 4;
Reserved_5_7 at 0 range 5 .. 7;
ERSTL at 0 range 8 .. 11;
Reserved_12_23 at 0 range 12 .. 23;
KEY at 0 range 24 .. 31;
end record;
-- Time Event Selection
type CR_TIMEVSEL_Field is
(
-- Minute change
Minute,
-- Hour change
Hour,
-- Every day at midnight
Midnight,
-- Every day at noon
Noon)
with Size => 2;
for CR_TIMEVSEL_Field use
(Minute => 0,
Hour => 1,
Midnight => 2,
Noon => 3);
-- Calendar Event Selection
type CR_CALEVSEL_Field is
(
-- Week change (every Monday at time 00:00:00)
Week,
-- Month change (every 01 of each month at time 00:00:00)
Month,
-- Year change (every January 1 at time 00:00:00)
Year)
with Size => 2;
for CR_CALEVSEL_Field use
(Week => 0,
Month => 1,
Year => 2);
-- Control Register
type RTC_CR_Register is record
-- Update Request Time Register
UPDTIM : Boolean := False;
-- Update Request Calendar Register
UPDCAL : Boolean := False;
-- unspecified
Reserved_2_7 : Interfaces.SAM.UInt6 := 16#0#;
-- Time Event Selection
TIMEVSEL : CR_TIMEVSEL_Field := Interfaces.SAM.SYSC.Minute;
-- unspecified
Reserved_10_15 : Interfaces.SAM.UInt6 := 16#0#;
-- Calendar Event Selection
CALEVSEL : CR_CALEVSEL_Field := Interfaces.SAM.SYSC.Week;
-- unspecified
Reserved_18_31 : Interfaces.SAM.UInt14 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for RTC_CR_Register use record
UPDTIM at 0 range 0 .. 0;
UPDCAL at 0 range 1 .. 1;
Reserved_2_7 at 0 range 2 .. 7;
TIMEVSEL at 0 range 8 .. 9;
Reserved_10_15 at 0 range 10 .. 15;
CALEVSEL at 0 range 16 .. 17;
Reserved_18_31 at 0 range 18 .. 31;
end record;
subtype RTC_MR_CORRECTION_Field is Interfaces.SAM.UInt7;
-- RTCOUT0 Output Source Selection
type MR_OUT0_Field is
(
-- no waveform, stuck at '0'
No_Wave,
-- 1 Hz square wave
Freq1Hz,
-- 32 Hz square wave
Freq32Hz,
-- 64 Hz square wave
Freq64Hz,
-- 512 Hz square wave
Freq512Hz,
-- output toggles when alarm flag rises
Alarm_Toggle,
-- output is a copy of the alarm flag
Alarm_Flag,
-- duty cycle programmable pulse
Prog_Pulse)
with Size => 3;
for MR_OUT0_Field use
(No_Wave => 0,
Freq1Hz => 1,
Freq32Hz => 2,
Freq64Hz => 3,
Freq512Hz => 4,
Alarm_Toggle => 5,
Alarm_Flag => 6,
Prog_Pulse => 7);
-- RTCOUT1 Output Source Selection
type MR_OUT1_Field is
(
-- no waveform, stuck at '0'
No_Wave,
-- 1 Hz square wave
Freq1Hz,
-- 32 Hz square wave
Freq32Hz,
-- 64 Hz square wave
Freq64Hz,
-- 512 Hz square wave
Freq512Hz,
-- output toggles when alarm flag rises
Alarm_Toggle,
-- output is a copy of the alarm flag
Alarm_Flag,
-- duty cycle programmable pulse
Prog_Pulse)
with Size => 3;
for MR_OUT1_Field use
(No_Wave => 0,
Freq1Hz => 1,
Freq32Hz => 2,
Freq64Hz => 3,
Freq512Hz => 4,
Alarm_Toggle => 5,
Alarm_Flag => 6,
Prog_Pulse => 7);
-- High Duration of the Output Pulse
type MR_THIGH_Field is
(
-- 31.2 ms
H_31Ms,
-- 15.6 ms
H_16Ms,
-- 3.91 Lms
H_4Ms,
-- 976 us
H_976Us,
-- 488 us
H_488Us,
-- 122 us
H_122Us,
-- 30.5 us
H_30Us,
-- 15.2 us
H_15Us)
with Size => 3;
for MR_THIGH_Field use
(H_31Ms => 0,
H_16Ms => 1,
H_4Ms => 2,
H_976Us => 3,
H_488Us => 4,
H_122Us => 5,
H_30Us => 6,
H_15Us => 7);
-- Period of the Output Pulse
type MR_TPERIOD_Field is
(
-- 1 second
P_1S,
-- 500 ms
P_500Ms,
-- 250 ms
P_250Ms,
-- 125 ms
P_125Ms)
with Size => 2;
for MR_TPERIOD_Field use
(P_1S => 0,
P_500Ms => 1,
P_250Ms => 2,
P_125Ms => 3);
-- Mode Register
type RTC_MR_Register is record
-- 12-/24-hour Mode
HRMOD : Boolean := False;
-- PERSIAN Calendar
PERSIAN : Boolean := False;
-- unspecified
Reserved_2_3 : Interfaces.SAM.UInt2 := 16#0#;
-- NEGative PPM Correction
NEGPPM : Boolean := False;
-- unspecified
Reserved_5_7 : Interfaces.SAM.UInt3 := 16#0#;
-- Slow Clock Correction
CORRECTION : RTC_MR_CORRECTION_Field := 16#0#;
-- HIGH PPM Correction
HIGHPPM : Boolean := False;
-- RTCOUT0 Output Source Selection
OUT0 : MR_OUT0_Field := Interfaces.SAM.SYSC.No_Wave;
-- unspecified
Reserved_19_19 : Interfaces.SAM.Bit := 16#0#;
-- RTCOUT1 Output Source Selection
OUT1 : MR_OUT1_Field := Interfaces.SAM.SYSC.No_Wave;
-- unspecified
Reserved_23_23 : Interfaces.SAM.Bit := 16#0#;
-- High Duration of the Output Pulse
THIGH : MR_THIGH_Field := Interfaces.SAM.SYSC.H_31Ms;
-- unspecified
Reserved_27_27 : Interfaces.SAM.Bit := 16#0#;
-- Period of the Output Pulse
TPERIOD : MR_TPERIOD_Field := Interfaces.SAM.SYSC.P_1S;
-- unspecified
Reserved_30_31 : Interfaces.SAM.UInt2 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for RTC_MR_Register use record
HRMOD at 0 range 0 .. 0;
PERSIAN at 0 range 1 .. 1;
Reserved_2_3 at 0 range 2 .. 3;
NEGPPM at 0 range 4 .. 4;
Reserved_5_7 at 0 range 5 .. 7;
CORRECTION at 0 range 8 .. 14;
HIGHPPM at 0 range 15 .. 15;
OUT0 at 0 range 16 .. 18;
Reserved_19_19 at 0 range 19 .. 19;
OUT1 at 0 range 20 .. 22;
Reserved_23_23 at 0 range 23 .. 23;
THIGH at 0 range 24 .. 26;
Reserved_27_27 at 0 range 27 .. 27;
TPERIOD at 0 range 28 .. 29;
Reserved_30_31 at 0 range 30 .. 31;
end record;
subtype RTC_TIMR_SEC_Field is Interfaces.SAM.UInt7;
subtype RTC_TIMR_MIN_Field is Interfaces.SAM.UInt7;
subtype RTC_TIMR_HOUR_Field is Interfaces.SAM.UInt6;
-- Time Register
type RTC_TIMR_Register is record
-- Current Second
SEC : RTC_TIMR_SEC_Field := 16#0#;
-- unspecified
Reserved_7_7 : Interfaces.SAM.Bit := 16#0#;
-- Current Minute
MIN : RTC_TIMR_MIN_Field := 16#0#;
-- unspecified
Reserved_15_15 : Interfaces.SAM.Bit := 16#0#;
-- Current Hour
HOUR : RTC_TIMR_HOUR_Field := 16#0#;
-- Ante Meridiem Post Meridiem Indicator
AMPM : Boolean := False;
-- unspecified
Reserved_23_31 : Interfaces.SAM.UInt9 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for RTC_TIMR_Register use record
SEC at 0 range 0 .. 6;
Reserved_7_7 at 0 range 7 .. 7;
MIN at 0 range 8 .. 14;
Reserved_15_15 at 0 range 15 .. 15;
HOUR at 0 range 16 .. 21;
AMPM at 0 range 22 .. 22;
Reserved_23_31 at 0 range 23 .. 31;
end record;
subtype RTC_CALR_CENT_Field is Interfaces.SAM.UInt7;
subtype RTC_CALR_YEAR_Field is Interfaces.SAM.Byte;
subtype RTC_CALR_MONTH_Field is Interfaces.SAM.UInt5;
subtype RTC_CALR_DAY_Field is Interfaces.SAM.UInt3;
subtype RTC_CALR_DATE_Field is Interfaces.SAM.UInt6;
-- Calendar Register
type RTC_CALR_Register is record
-- Current Century
CENT : RTC_CALR_CENT_Field := 16#20#;
-- unspecified
Reserved_7_7 : Interfaces.SAM.Bit := 16#0#;
-- Current Year
YEAR : RTC_CALR_YEAR_Field := 16#10#;
-- Current Month
MONTH : RTC_CALR_MONTH_Field := 16#1#;
-- Current Day in Current Week
DAY : RTC_CALR_DAY_Field := 16#5#;
-- Current Day in Current Month
DATE : RTC_CALR_DATE_Field := 16#1#;
-- unspecified
Reserved_30_31 : Interfaces.SAM.UInt2 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for RTC_CALR_Register use record
CENT at 0 range 0 .. 6;
Reserved_7_7 at 0 range 7 .. 7;
YEAR at 0 range 8 .. 15;
MONTH at 0 range 16 .. 20;
DAY at 0 range 21 .. 23;
DATE at 0 range 24 .. 29;
Reserved_30_31 at 0 range 30 .. 31;
end record;
subtype RTC_TIMALR_SEC_Field is Interfaces.SAM.UInt7;
subtype RTC_TIMALR_MIN_Field is Interfaces.SAM.UInt7;
subtype RTC_TIMALR_HOUR_Field is Interfaces.SAM.UInt6;
-- Time Alarm Register
type RTC_TIMALR_Register is record
-- Second Alarm
SEC : RTC_TIMALR_SEC_Field := 16#0#;
-- Second Alarm Enable
SECEN : Boolean := False;
-- Minute Alarm
MIN : RTC_TIMALR_MIN_Field := 16#0#;
-- Minute Alarm Enable
MINEN : Boolean := False;
-- Hour Alarm
HOUR : RTC_TIMALR_HOUR_Field := 16#0#;
-- AM/PM Indicator
AMPM : Boolean := False;
-- Hour Alarm Enable
HOUREN : Boolean := False;
-- unspecified
Reserved_24_31 : Interfaces.SAM.Byte := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for RTC_TIMALR_Register use record
SEC at 0 range 0 .. 6;
SECEN at 0 range 7 .. 7;
MIN at 0 range 8 .. 14;
MINEN at 0 range 15 .. 15;
HOUR at 0 range 16 .. 21;
AMPM at 0 range 22 .. 22;
HOUREN at 0 range 23 .. 23;
Reserved_24_31 at 0 range 24 .. 31;
end record;
subtype RTC_CALALR_MONTH_Field is Interfaces.SAM.UInt5;
subtype RTC_CALALR_DATE_Field is Interfaces.SAM.UInt6;
-- Calendar Alarm Register
type RTC_CALALR_Register is record
-- unspecified
Reserved_0_15 : Interfaces.SAM.UInt16 := 16#0#;
-- Month Alarm
MONTH : RTC_CALALR_MONTH_Field := 16#1#;
-- unspecified
Reserved_21_22 : Interfaces.SAM.UInt2 := 16#0#;
-- Month Alarm Enable
MTHEN : Boolean := False;
-- Date Alarm
DATE : RTC_CALALR_DATE_Field := 16#1#;
-- unspecified
Reserved_30_30 : Interfaces.SAM.Bit := 16#0#;
-- Date Alarm Enable
DATEEN : Boolean := False;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for RTC_CALALR_Register use record
Reserved_0_15 at 0 range 0 .. 15;
MONTH at 0 range 16 .. 20;
Reserved_21_22 at 0 range 21 .. 22;
MTHEN at 0 range 23 .. 23;
DATE at 0 range 24 .. 29;
Reserved_30_30 at 0 range 30 .. 30;
DATEEN at 0 range 31 .. 31;
end record;
-- Acknowledge for Update
type SR_ACKUPD_Field is
(
-- Time and calendar registers cannot be updated.
Freerun,
-- Time and calendar registers can be updated.
Update)
with Size => 1;
for SR_ACKUPD_Field use
(Freerun => 0,
Update => 1);
-- Alarm Flag
type SR_ALARM_Field is
(
-- No alarm matching condition occurred.
No_Alarmevent,
-- An alarm matching condition has occurred.
Alarmevent)
with Size => 1;
for SR_ALARM_Field use
(No_Alarmevent => 0,
Alarmevent => 1);
-- Second Event
type SR_SEC_Field is
(
-- No second event has occurred since the last clear.
No_Secevent,
-- At least one second event has occurred since the last clear.
Secevent)
with Size => 1;
for SR_SEC_Field use
(No_Secevent => 0,
Secevent => 1);
-- Time Event
type SR_TIMEV_Field is
(
-- No time event has occurred since the last clear.
No_Timevent,
-- At least one time event has occurred since the last clear.
Timevent)
with Size => 1;
for SR_TIMEV_Field use
(No_Timevent => 0,
Timevent => 1);
-- Calendar Event
type SR_CALEV_Field is
(
-- No calendar event has occurred since the last clear.
No_Calevent,
-- At least one calendar event has occurred since the last clear.
Calevent)
with Size => 1;
for SR_CALEV_Field use
(No_Calevent => 0,
Calevent => 1);
-- Time and/or Date Free Running Error
type SR_TDERR_Field is
(
-- The internal free running counters are carrying valid values since
-- the last read of RTC_SR.
Correct,
-- The internal free running counters have been corrupted (invalid date
-- or time, non-BCD values) since the last read and/or they are still
-- invalid.
Err_Timedate)
with Size => 1;
for SR_TDERR_Field use
(Correct => 0,
Err_Timedate => 1);
-- Status Register
type RTC_SR_Register is record
-- Read-only. Acknowledge for Update
ACKUPD : SR_ACKUPD_Field;
-- Read-only. Alarm Flag
ALARM : SR_ALARM_Field;
-- Read-only. Second Event
SEC : SR_SEC_Field;
-- Read-only. Time Event
TIMEV : SR_TIMEV_Field;
-- Read-only. Calendar Event
CALEV : SR_CALEV_Field;
-- Read-only. Time and/or Date Free Running Error
TDERR : SR_TDERR_Field;
-- unspecified
Reserved_6_31 : Interfaces.SAM.UInt26;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for RTC_SR_Register use record
ACKUPD at 0 range 0 .. 0;
ALARM at 0 range 1 .. 1;
SEC at 0 range 2 .. 2;
TIMEV at 0 range 3 .. 3;
CALEV at 0 range 4 .. 4;
TDERR at 0 range 5 .. 5;
Reserved_6_31 at 0 range 6 .. 31;
end record;
-- Status Clear Command Register
type RTC_SCCR_Register is record
-- Write-only. Acknowledge Clear
ACKCLR : Boolean := False;
-- Write-only. Alarm Clear
ALRCLR : Boolean := False;
-- Write-only. Second Clear
SECCLR : Boolean := False;
-- Write-only. Time Clear
TIMCLR : Boolean := False;
-- Write-only. Calendar Clear
CALCLR : Boolean := False;
-- Write-only. Time and/or Date Free Running Error Clear
TDERRCLR : Boolean := False;
-- unspecified
Reserved_6_31 : Interfaces.SAM.UInt26 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for RTC_SCCR_Register use record
ACKCLR at 0 range 0 .. 0;
ALRCLR at 0 range 1 .. 1;
SECCLR at 0 range 2 .. 2;
TIMCLR at 0 range 3 .. 3;
CALCLR at 0 range 4 .. 4;
TDERRCLR at 0 range 5 .. 5;
Reserved_6_31 at 0 range 6 .. 31;
end record;
-- Interrupt Enable Register
type RTC_IER_Register is record
-- Write-only. Acknowledge Update Interrupt Enable
ACKEN : Boolean := False;
-- Write-only. Alarm Interrupt Enable
ALREN : Boolean := False;
-- Write-only. Second Event Interrupt Enable
SECEN : Boolean := False;
-- Write-only. Time Event Interrupt Enable
TIMEN : Boolean := False;
-- Write-only. Calendar Event Interrupt Enable
CALEN : Boolean := False;
-- Write-only. Time and/or Date Error Interrupt Enable
TDERREN : Boolean := False;
-- unspecified
Reserved_6_31 : Interfaces.SAM.UInt26 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for RTC_IER_Register use record
ACKEN at 0 range 0 .. 0;
ALREN at 0 range 1 .. 1;
SECEN at 0 range 2 .. 2;
TIMEN at 0 range 3 .. 3;
CALEN at 0 range 4 .. 4;
TDERREN at 0 range 5 .. 5;
Reserved_6_31 at 0 range 6 .. 31;
end record;
-- Interrupt Disable Register
type RTC_IDR_Register is record
-- Write-only. Acknowledge Update Interrupt Disable
ACKDIS : Boolean := False;
-- Write-only. Alarm Interrupt Disable
ALRDIS : Boolean := False;
-- Write-only. Second Event Interrupt Disable
SECDIS : Boolean := False;
-- Write-only. Time Event Interrupt Disable
TIMDIS : Boolean := False;
-- Write-only. Calendar Event Interrupt Disable
CALDIS : Boolean := False;
-- Write-only. Time and/or Date Error Interrupt Disable
TDERRDIS : Boolean := False;
-- unspecified
Reserved_6_31 : Interfaces.SAM.UInt26 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for RTC_IDR_Register use record
ACKDIS at 0 range 0 .. 0;
ALRDIS at 0 range 1 .. 1;
SECDIS at 0 range 2 .. 2;
TIMDIS at 0 range 3 .. 3;
CALDIS at 0 range 4 .. 4;
TDERRDIS at 0 range 5 .. 5;
Reserved_6_31 at 0 range 6 .. 31;
end record;
-- Interrupt Mask Register
type RTC_IMR_Register is record
-- Read-only. Acknowledge Update Interrupt Mask
ACK : Boolean;
-- Read-only. Alarm Interrupt Mask
ALR : Boolean;
-- Read-only. Second Event Interrupt Mask
SEC : Boolean;
-- Read-only. Time Event Interrupt Mask
TIM : Boolean;
-- Read-only. Calendar Event Interrupt Mask
CAL : Boolean;
-- unspecified
Reserved_5_31 : Interfaces.SAM.UInt27;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for RTC_IMR_Register use record
ACK at 0 range 0 .. 0;
ALR at 0 range 1 .. 1;
SEC at 0 range 2 .. 2;
TIM at 0 range 3 .. 3;
CAL at 0 range 4 .. 4;
Reserved_5_31 at 0 range 5 .. 31;
end record;
-- Valid Entry Register
type RTC_VER_Register is record
-- Read-only. Non-valid Time
NVTIM : Boolean;
-- Read-only. Non-valid Calendar
NVCAL : Boolean;
-- Read-only. Non-valid Time Alarm
NVTIMALR : Boolean;
-- Read-only. Non-valid Calendar Alarm
NVCALALR : Boolean;
-- unspecified
Reserved_4_31 : Interfaces.SAM.UInt28;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for RTC_VER_Register use record
NVTIM at 0 range 0 .. 0;
NVCAL at 0 range 1 .. 1;
NVTIMALR at 0 range 2 .. 2;
NVCALALR at 0 range 3 .. 3;
Reserved_4_31 at 0 range 4 .. 31;
end record;
subtype RTT_MR_RTPRES_Field is Interfaces.SAM.UInt16;
-- Mode Register
type RTT_MR_Register is record
-- Real-time Timer Prescaler Value
RTPRES : RTT_MR_RTPRES_Field := 16#8000#;
-- Alarm Interrupt Enable
ALMIEN : Boolean := False;
-- Real-time Timer Increment Interrupt Enable
RTTINCIEN : Boolean := False;
-- Real-time Timer Restart
RTTRST : Boolean := False;
-- unspecified
Reserved_19_19 : Interfaces.SAM.Bit := 16#0#;
-- Real-time Timer Disable
RTTDIS : Boolean := False;
-- unspecified
Reserved_21_23 : Interfaces.SAM.UInt3 := 16#0#;
-- Real-Time Clock 1Hz Clock Selection
RTC1HZ : Boolean := False;
-- unspecified
Reserved_25_31 : Interfaces.SAM.UInt7 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for RTT_MR_Register use record
RTPRES at 0 range 0 .. 15;
ALMIEN at 0 range 16 .. 16;
RTTINCIEN at 0 range 17 .. 17;
RTTRST at 0 range 18 .. 18;
Reserved_19_19 at 0 range 19 .. 19;
RTTDIS at 0 range 20 .. 20;
Reserved_21_23 at 0 range 21 .. 23;
RTC1HZ at 0 range 24 .. 24;
Reserved_25_31 at 0 range 25 .. 31;
end record;
-- Status Register
type RTT_SR_Register is record
-- Read-only. Real-time Alarm Status
ALMS : Boolean;
-- Read-only. Real-time Timer Increment
RTTINC : Boolean;
-- unspecified
Reserved_2_31 : Interfaces.SAM.UInt30;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for RTT_SR_Register use record
ALMS at 0 range 0 .. 0;
RTTINC at 0 range 1 .. 1;
Reserved_2_31 at 0 range 2 .. 31;
end record;
-- Voltage Regulator Off
type CR_VROFF_Field is
(
-- no effect.
No_Effect,
-- if KEY is correct, asserts vddcore_nreset and stops the voltage
-- regulator.
Stop_Vreg)
with Size => 1;
for CR_VROFF_Field use
(No_Effect => 0,
Stop_Vreg => 1);
-- Crystal Oscillator Select
type CR_XTALSEL_Field is
(
-- no effect.
No_Effect,
-- if KEY is correct, switches the slow clock on the crystal oscillator
-- output.
Crystal_Sel)
with Size => 1;
for CR_XTALSEL_Field use
(No_Effect => 0,
Crystal_Sel => 1);
subtype SUPC_CR_KEY_Field is Interfaces.SAM.Byte;
-- Supply Controller Control Register
type SUPC_CR_Register is record
-- unspecified
Reserved_0_1 : Interfaces.SAM.UInt2 := 16#0#;
-- Write-only. Voltage Regulator Off
VROFF : CR_VROFF_Field := Interfaces.SAM.SYSC.No_Effect;
-- Write-only. Crystal Oscillator Select
XTALSEL : CR_XTALSEL_Field := Interfaces.SAM.SYSC.No_Effect;
-- unspecified
Reserved_4_23 : Interfaces.SAM.UInt20 := 16#0#;
-- Write-only. Password
KEY : SUPC_CR_KEY_Field := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for SUPC_CR_Register use record
Reserved_0_1 at 0 range 0 .. 1;
VROFF at 0 range 2 .. 2;
XTALSEL at 0 range 3 .. 3;
Reserved_4_23 at 0 range 4 .. 23;
KEY at 0 range 24 .. 31;
end record;
subtype SUPC_SMMR_SMTH_Field is Interfaces.SAM.UInt4;
-- Supply Monitor Sampling Period
type SMMR_SMSMPL_Field is
(
-- Supply Monitor disabled
Smd,
-- Continuous Supply Monitor
Csm,
-- Supply Monitor enabled one SLCK period every 32 SLCK periods
SMMR_SMSMPL_Field_32Slck,
-- Supply Monitor enabled one SLCK period every 256 SLCK periods
SMMR_SMSMPL_Field_256Slck,
-- Supply Monitor enabled one SLCK period every 2,048 SLCK periods
SMMR_SMSMPL_Field_2048Slck)
with Size => 3;
for SMMR_SMSMPL_Field use
(Smd => 0,
Csm => 1,
SMMR_SMSMPL_Field_32Slck => 2,
SMMR_SMSMPL_Field_256Slck => 3,
SMMR_SMSMPL_Field_2048Slck => 4);
-- Supply Monitor Reset Enable
type SMMR_SMRSTEN_Field is
(
-- the core reset signal "vddcore_nreset" is not affected when a supply
-- monitor detection occurs.
Not_Enable,
-- the core reset signal, vddcore_nreset is asserted when a supply
-- monitor detection occurs.
Enable)
with Size => 1;
for SMMR_SMRSTEN_Field use
(Not_Enable => 0,
Enable => 1);
-- Supply Monitor Interrupt Enable
type SMMR_SMIEN_Field is
(
-- the SUPC interrupt signal is not affected when a supply monitor
-- detection occurs.
Not_Enable,
-- the SUPC interrupt signal is asserted when a supply monitor detection
-- occurs.
Enable)
with Size => 1;
for SMMR_SMIEN_Field use
(Not_Enable => 0,
Enable => 1);
-- Supply Controller Supply Monitor Mode Register
type SUPC_SMMR_Register is record
-- Supply Monitor Threshold
SMTH : SUPC_SMMR_SMTH_Field := 16#0#;
-- unspecified
Reserved_4_7 : Interfaces.SAM.UInt4 := 16#0#;
-- Supply Monitor Sampling Period
SMSMPL : SMMR_SMSMPL_Field := Interfaces.SAM.SYSC.Smd;
-- unspecified
Reserved_11_11 : Interfaces.SAM.Bit := 16#0#;
-- Supply Monitor Reset Enable
SMRSTEN : SMMR_SMRSTEN_Field := Interfaces.SAM.SYSC.Not_Enable;
-- Supply Monitor Interrupt Enable
SMIEN : SMMR_SMIEN_Field := Interfaces.SAM.SYSC.Not_Enable;
-- unspecified
Reserved_14_31 : Interfaces.SAM.UInt18 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for SUPC_SMMR_Register use record
SMTH at 0 range 0 .. 3;
Reserved_4_7 at 0 range 4 .. 7;
SMSMPL at 0 range 8 .. 10;
Reserved_11_11 at 0 range 11 .. 11;
SMRSTEN at 0 range 12 .. 12;
SMIEN at 0 range 13 .. 13;
Reserved_14_31 at 0 range 14 .. 31;
end record;
-- Brownout Detector Reset Enable
type MR_BODRSTEN_Field is
(
-- the core reset signal "vddcore_nreset" is not affected when a
-- brownout detection occurs.
Not_Enable,
-- the core reset signal, vddcore_nreset is asserted when a brownout
-- detection occurs.
Enable)
with Size => 1;
for MR_BODRSTEN_Field use
(Not_Enable => 0,
Enable => 1);
-- Brownout Detector Disable
type MR_BODDIS_Field is
(
-- the core brownout detector is enabled.
Enable,
-- the core brownout detector is disabled.
Disable)
with Size => 1;
for MR_BODDIS_Field use
(Enable => 0,
Disable => 1);
-- Voltage Regulator enable
type MR_ONREG_Field is
(
-- Internal voltage regulator is not used (external power supply is
-- used)
Onreg_Unused,
-- internal voltage regulator is used
Onreg_Used)
with Size => 1;
for MR_ONREG_Field use
(Onreg_Unused => 0,
Onreg_Used => 1);
-- Oscillator Bypass
type MR_OSCBYPASS_Field is
(
-- no effect. Clock selection depends on XTALSEL value.
No_Effect,
-- the 32-KHz XTAL oscillator is selected and is put in bypass mode.
Bypass)
with Size => 1;
for MR_OSCBYPASS_Field use
(No_Effect => 0,
Bypass => 1);
subtype SUPC_MR_KEY_Field is Interfaces.SAM.Byte;
-- Supply Controller Mode Register
type SUPC_MR_Register is record
-- unspecified
Reserved_0_11 : Interfaces.SAM.UInt12 := 16#A00#;
-- Brownout Detector Reset Enable
BODRSTEN : MR_BODRSTEN_Field := Interfaces.SAM.SYSC.Enable;
-- Brownout Detector Disable
BODDIS : MR_BODDIS_Field := Interfaces.SAM.SYSC.Enable;
-- Voltage Regulator enable
ONREG : MR_ONREG_Field := Interfaces.SAM.SYSC.Onreg_Used;
-- unspecified
Reserved_15_19 : Interfaces.SAM.UInt5 := 16#0#;
-- Oscillator Bypass
OSCBYPASS : MR_OSCBYPASS_Field := Interfaces.SAM.SYSC.No_Effect;
-- unspecified
Reserved_21_23 : Interfaces.SAM.UInt3 := 16#0#;
-- Password Key
KEY : SUPC_MR_KEY_Field := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for SUPC_MR_Register use record
Reserved_0_11 at 0 range 0 .. 11;
BODRSTEN at 0 range 12 .. 12;
BODDIS at 0 range 13 .. 13;
ONREG at 0 range 14 .. 14;
Reserved_15_19 at 0 range 15 .. 19;
OSCBYPASS at 0 range 20 .. 20;
Reserved_21_23 at 0 range 21 .. 23;
KEY at 0 range 24 .. 31;
end record;
-- Supply Monitor Wake Up Enable
type WUMR_SMEN_Field is
(
-- the supply monitor detection has no wake up effect.
Not_Enable,
-- the supply monitor detection forces the wake up of the core power
-- supply.
Enable)
with Size => 1;
for WUMR_SMEN_Field use
(Not_Enable => 0,
Enable => 1);
-- Real Time Timer Wake Up Enable
type WUMR_RTTEN_Field is
(
-- the RTT alarm signal has no wake up effect.
Not_Enable,
-- the RTT alarm signal forces the wake up of the core power supply.
Enable)
with Size => 1;
for WUMR_RTTEN_Field use
(Not_Enable => 0,
Enable => 1);
-- Real Time Clock Wake Up Enable
type WUMR_RTCEN_Field is
(
-- the RTC alarm signal has no wake up effect.
Not_Enable,
-- the RTC alarm signal forces the wake up of the core power supply.
Enable)
with Size => 1;
for WUMR_RTCEN_Field use
(Not_Enable => 0,
Enable => 1);
-- Low power Debouncer ENable WKUP0
type WUMR_LPDBCEN0_Field is
(
-- the WKUP0 input pin is not connected with low power debouncer.
Not_Enable,
-- the WKUP0 input pin is connected with low power debouncer and can
-- force a core wake up.
Enable)
with Size => 1;
for WUMR_LPDBCEN0_Field use
(Not_Enable => 0,
Enable => 1);
-- Low power Debouncer ENable WKUP1
type WUMR_LPDBCEN1_Field is
(
-- the WKUP1input pin is not connected with low power debouncer.
Not_Enable,
-- the WKUP1 input pin is connected with low power debouncer and can
-- force a core wake up.
Enable)
with Size => 1;
for WUMR_LPDBCEN1_Field use
(Not_Enable => 0,
Enable => 1);
-- Low power Debouncer Clear
type WUMR_LPDBCCLR_Field is
(
-- a low power debounce event does not create an immediate clear on
-- first half GPBR registers.
Not_Enable,
-- a low power debounce event on WKUP0 or WKUP1 generates an immediate
-- clear on first half GPBR registers.
Enable)
with Size => 1;
for WUMR_LPDBCCLR_Field use
(Not_Enable => 0,
Enable => 1);
-- Wake Up Inputs Debouncer Period
type WUMR_WKUPDBC_Field is
(
-- Immediate, no debouncing, detected active at least on one Slow Clock
-- edge.
Immediate,
-- WKUPx shall be in its active state for at least 3 SLCK periods
WUMR_WKUPDBC_Field_3_Sclk,
-- WKUPx shall be in its active state for at least 32 SLCK periods
WUMR_WKUPDBC_Field_32_Sclk,
-- WKUPx shall be in its active state for at least 512 SLCK periods
WUMR_WKUPDBC_Field_512_Sclk,
-- WKUPx shall be in its active state for at least 4,096 SLCK periods
WUMR_WKUPDBC_Field_4096_Sclk,
-- WKUPx shall be in its active state for at least 32,768 SLCK periods
WUMR_WKUPDBC_Field_32768_Sclk)
with Size => 3;
for WUMR_WKUPDBC_Field use
(Immediate => 0,
WUMR_WKUPDBC_Field_3_Sclk => 1,
WUMR_WKUPDBC_Field_32_Sclk => 2,
WUMR_WKUPDBC_Field_512_Sclk => 3,
WUMR_WKUPDBC_Field_4096_Sclk => 4,
WUMR_WKUPDBC_Field_32768_Sclk => 5);
-- Low Power DeBounCer Period
type WUMR_LPDBC_Field is
(
-- Disable the low power debouncer.
Disable,
-- WKUP0/1 in its active state for at least 2 RTCOUT0 periods
WUMR_LPDBC_Field_2_Rtcout0,
-- WKUP0/1 in its active state for at least 3 RTCOUT0 periods
WUMR_LPDBC_Field_3_Rtcout0,
-- WKUP0/1 in its active state for at least 4 RTCOUT0 periods
WUMR_LPDBC_Field_4_Rtcout0,
-- WKUP0/1 in its active state for at least 5 RTCOUT0 periods
WUMR_LPDBC_Field_5_Rtcout0,
-- WKUP0/1 in its active state for at least 6 RTCOUT0 periods
WUMR_LPDBC_Field_6_Rtcout0,
-- WKUP0/1 in its active state for at least 7 RTCOUT0 periods
WUMR_LPDBC_Field_7_Rtcout0,
-- WKUP0/1 in its active state for at least 8 RTCOUT0 periods
WUMR_LPDBC_Field_8_Rtcout0)
with Size => 3;
for WUMR_LPDBC_Field use
(Disable => 0,
WUMR_LPDBC_Field_2_Rtcout0 => 1,
WUMR_LPDBC_Field_3_Rtcout0 => 2,
WUMR_LPDBC_Field_4_Rtcout0 => 3,
WUMR_LPDBC_Field_5_Rtcout0 => 4,
WUMR_LPDBC_Field_6_Rtcout0 => 5,
WUMR_LPDBC_Field_7_Rtcout0 => 6,
WUMR_LPDBC_Field_8_Rtcout0 => 7);
-- Supply Controller Wake Up Mode Register
type SUPC_WUMR_Register is record
-- unspecified
Reserved_0_0 : Interfaces.SAM.Bit := 16#0#;
-- Supply Monitor Wake Up Enable
SMEN : WUMR_SMEN_Field := Interfaces.SAM.SYSC.Not_Enable;
-- Real Time Timer Wake Up Enable
RTTEN : WUMR_RTTEN_Field := Interfaces.SAM.SYSC.Not_Enable;
-- Real Time Clock Wake Up Enable
RTCEN : WUMR_RTCEN_Field := Interfaces.SAM.SYSC.Not_Enable;
-- unspecified
Reserved_4_4 : Interfaces.SAM.Bit := 16#0#;
-- Low power Debouncer ENable WKUP0
LPDBCEN0 : WUMR_LPDBCEN0_Field := Interfaces.SAM.SYSC.Not_Enable;
-- Low power Debouncer ENable WKUP1
LPDBCEN1 : WUMR_LPDBCEN1_Field := Interfaces.SAM.SYSC.Not_Enable;
-- Low power Debouncer Clear
LPDBCCLR : WUMR_LPDBCCLR_Field := Interfaces.SAM.SYSC.Not_Enable;
-- unspecified
Reserved_8_11 : Interfaces.SAM.UInt4 := 16#0#;
-- Wake Up Inputs Debouncer Period
WKUPDBC : WUMR_WKUPDBC_Field := Interfaces.SAM.SYSC.Immediate;
-- unspecified
Reserved_15_15 : Interfaces.SAM.Bit := 16#0#;
-- Low Power DeBounCer Period
LPDBC : WUMR_LPDBC_Field := Interfaces.SAM.SYSC.Disable;
-- unspecified
Reserved_19_31 : Interfaces.SAM.UInt13 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for SUPC_WUMR_Register use record
Reserved_0_0 at 0 range 0 .. 0;
SMEN at 0 range 1 .. 1;
RTTEN at 0 range 2 .. 2;
RTCEN at 0 range 3 .. 3;
Reserved_4_4 at 0 range 4 .. 4;
LPDBCEN0 at 0 range 5 .. 5;
LPDBCEN1 at 0 range 6 .. 6;
LPDBCCLR at 0 range 7 .. 7;
Reserved_8_11 at 0 range 8 .. 11;
WKUPDBC at 0 range 12 .. 14;
Reserved_15_15 at 0 range 15 .. 15;
LPDBC at 0 range 16 .. 18;
Reserved_19_31 at 0 range 19 .. 31;
end record;
-- Wake Up Input Enable 0
type WUIR_WKUPEN0_Field is
(
-- the corresponding wake-up input has no wake up effect.
Disable,
-- the corresponding wake-up input forces the wake up of the core power
-- supply.
Enable)
with Size => 1;
for WUIR_WKUPEN0_Field use
(Disable => 0,
Enable => 1);
-- SUPC_WUIR_WKUPEN array
type SUPC_WUIR_WKUPEN_Field_Array is array (0 .. 15) of WUIR_WKUPEN0_Field
with Component_Size => 1, Size => 16;
-- Type definition for SUPC_WUIR_WKUPEN
type SUPC_WUIR_WKUPEN_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- WKUPEN as a value
Val : Interfaces.SAM.UInt16;
when True =>
-- WKUPEN as an array
Arr : SUPC_WUIR_WKUPEN_Field_Array;
end case;
end record
with Unchecked_Union, Size => 16;
for SUPC_WUIR_WKUPEN_Field use record
Val at 0 range 0 .. 15;
Arr at 0 range 0 .. 15;
end record;
-- Wake Up Input Type 0
type WUIR_WKUPT0_Field is
(
-- a low level for a period defined by WKUPDBC on the corresponding
-- wake-up input forces the wake up of the core power supply.
Low,
-- a high level for a period defined by WKUPDBC on the correspond-ing
-- wake-up input forces the wake up of the core power supply.
High)
with Size => 1;
for WUIR_WKUPT0_Field use
(Low => 0,
High => 1);
-- SUPC_WUIR_WKUPT array
type SUPC_WUIR_WKUPT_Field_Array is array (0 .. 15) of WUIR_WKUPT0_Field
with Component_Size => 1, Size => 16;
-- Type definition for SUPC_WUIR_WKUPT
type SUPC_WUIR_WKUPT_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- WKUPT as a value
Val : Interfaces.SAM.UInt16;
when True =>
-- WKUPT as an array
Arr : SUPC_WUIR_WKUPT_Field_Array;
end case;
end record
with Unchecked_Union, Size => 16;
for SUPC_WUIR_WKUPT_Field use record
Val at 0 range 0 .. 15;
Arr at 0 range 0 .. 15;
end record;
-- Supply Controller Wake Up Inputs Register
type SUPC_WUIR_Register is record
-- Wake Up Input Enable 0
WKUPEN : SUPC_WUIR_WKUPEN_Field := (As_Array => False, Val => 16#0#);
-- Wake Up Input Type 0
WKUPT : SUPC_WUIR_WKUPT_Field := (As_Array => False, Val => 16#0#);
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for SUPC_WUIR_Register use record
WKUPEN at 0 range 0 .. 15;
WKUPT at 0 range 16 .. 31;
end record;
-- WKUP Wake Up Status
type SR_WKUPS_Field is
(
-- no wake up due to the assertion of the WKUP pins has occurred since
-- the last read of SUPC_SR.
No,
-- at least one wake up due to the assertion of the WKUP pins has
-- occurred since the last read of SUPC_SR.
Present)
with Size => 1;
for SR_WKUPS_Field use
(No => 0,
Present => 1);
-- Supply Monitor Detection Wake Up Status
type SR_SMWS_Field is
(
-- no wake up due to a supply monitor detection has occurred since the
-- last read of SUPC_SR.
No,
-- at least one wake up due to a supply monitor detection has occurred
-- since the last read of SUPC_SR.
Present)
with Size => 1;
for SR_SMWS_Field use
(No => 0,
Present => 1);
-- Brownout Detector Reset Status
type SR_BODRSTS_Field is
(
-- no core brownout rising edge event has been detected since the last
-- read of the SUPC_SR.
No,
-- at least one brownout output rising edge event has been detected
-- since the last read of the SUPC_SR.
Present)
with Size => 1;
for SR_BODRSTS_Field use
(No => 0,
Present => 1);
-- Supply Monitor Reset Status
type SR_SMRSTS_Field is
(
-- no supply monitor detection has generated a core reset since the last
-- read of the SUPC_SR.
No,
-- at least one supply monitor detection has generated a core reset
-- since the last read of the SUPC_SR.
Present)
with Size => 1;
for SR_SMRSTS_Field use
(No => 0,
Present => 1);
-- Supply Monitor Status
type SR_SMS_Field is
(
-- no supply monitor detection since the last read of SUPC_SR.
No,
-- at least one supply monitor detection since the last read of SUPC_SR.
Present)
with Size => 1;
for SR_SMS_Field use
(No => 0,
Present => 1);
-- Supply Monitor Output Status
type SR_SMOS_Field is
(
-- the supply monitor detected VDDIO higher than its threshold at its
-- last measurement.
High,
-- the supply monitor detected VDDIO lower than its threshold at its
-- last measurement.
Low)
with Size => 1;
for SR_SMOS_Field use
(High => 0,
Low => 1);
-- 32-kHz Oscillator Selection Status
type SR_OSCSEL_Field is
(
-- the slow clock, SLCK is generated by the embedded 32-kHz RC
-- oscillator.
Rc,
-- the slow clock, SLCK is generated by the 32-kHz crystal oscillator.
Cryst)
with Size => 1;
for SR_OSCSEL_Field use
(Rc => 0,
Cryst => 1);
-- Low Power Debouncer Wake Up Status on WKUP0
type SR_LPDBCS0_Field is
(
-- no wake up due to the assertion of the WKUP0 pin has occurred since
-- the last read of SUPC_SR.
No,
-- at least one wake up due to the assertion of the WKUP0 pin has
-- occurred since the last read of SUPC_SR.
Present)
with Size => 1;
for SR_LPDBCS0_Field use
(No => 0,
Present => 1);
-- Low Power Debouncer Wake Up Status on WKUP1
type SR_LPDBCS1_Field is
(
-- no wake up due to the assertion of the WKUP1 pin has occurred since
-- the last read of SUPC_SR.
No,
-- at least one wake up due to the assertion of the WKUP1 pin has
-- occurred since the last read of SUPC_SR.
Present)
with Size => 1;
for SR_LPDBCS1_Field use
(No => 0,
Present => 1);
-- WKUP Input Status 0
type SR_WKUPIS0_Field is
(
-- the corresponding wake-up input is disabled, or was inactive at the
-- time the debouncer triggered a wake up event.
Dis,
-- the corresponding wake-up input was active at the time the debouncer
-- triggered a wake up event.
En)
with Size => 1;
for SR_WKUPIS0_Field use
(Dis => 0,
En => 1);
-- SUPC_SR_WKUPIS array
type SUPC_SR_WKUPIS_Field_Array is array (0 .. 15) of SR_WKUPIS0_Field
with Component_Size => 1, Size => 16;
-- Type definition for SUPC_SR_WKUPIS
type SUPC_SR_WKUPIS_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- WKUPIS as a value
Val : Interfaces.SAM.UInt16;
when True =>
-- WKUPIS as an array
Arr : SUPC_SR_WKUPIS_Field_Array;
end case;
end record
with Unchecked_Union, Size => 16;
for SUPC_SR_WKUPIS_Field use record
Val at 0 range 0 .. 15;
Arr at 0 range 0 .. 15;
end record;
-- Supply Controller Status Register
type SUPC_SR_Register is record
-- unspecified
Reserved_0_0 : Interfaces.SAM.Bit;
-- Read-only. WKUP Wake Up Status
WKUPS : SR_WKUPS_Field;
-- Read-only. Supply Monitor Detection Wake Up Status
SMWS : SR_SMWS_Field;
-- Read-only. Brownout Detector Reset Status
BODRSTS : SR_BODRSTS_Field;
-- Read-only. Supply Monitor Reset Status
SMRSTS : SR_SMRSTS_Field;
-- Read-only. Supply Monitor Status
SMS : SR_SMS_Field;
-- Read-only. Supply Monitor Output Status
SMOS : SR_SMOS_Field;
-- Read-only. 32-kHz Oscillator Selection Status
OSCSEL : SR_OSCSEL_Field;
-- unspecified
Reserved_8_12 : Interfaces.SAM.UInt5;
-- Read-only. Low Power Debouncer Wake Up Status on WKUP0
LPDBCS0 : SR_LPDBCS0_Field;
-- Read-only. Low Power Debouncer Wake Up Status on WKUP1
LPDBCS1 : SR_LPDBCS1_Field;
-- unspecified
Reserved_15_15 : Interfaces.SAM.Bit;
-- Read-only. WKUP Input Status 0
WKUPIS : SUPC_SR_WKUPIS_Field;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for SUPC_SR_Register use record
Reserved_0_0 at 0 range 0 .. 0;
WKUPS at 0 range 1 .. 1;
SMWS at 0 range 2 .. 2;
BODRSTS at 0 range 3 .. 3;
SMRSTS at 0 range 4 .. 4;
SMS at 0 range 5 .. 5;
SMOS at 0 range 6 .. 6;
OSCSEL at 0 range 7 .. 7;
Reserved_8_12 at 0 range 8 .. 12;
LPDBCS0 at 0 range 13 .. 13;
LPDBCS1 at 0 range 14 .. 14;
Reserved_15_15 at 0 range 15 .. 15;
WKUPIS at 0 range 16 .. 31;
end record;
subtype WDT_CR_KEY_Field is Interfaces.SAM.Byte;
-- Control Register
type WDT_CR_Register is record
-- Write-only. Watchdog Restart
WDRSTT : Boolean := False;
-- unspecified
Reserved_1_23 : Interfaces.SAM.UInt23 := 16#0#;
-- Write-only. Password
KEY : WDT_CR_KEY_Field := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for WDT_CR_Register use record
WDRSTT at 0 range 0 .. 0;
Reserved_1_23 at 0 range 1 .. 23;
KEY at 0 range 24 .. 31;
end record;
subtype WDT_MR_WDV_Field is Interfaces.SAM.UInt12;
subtype WDT_MR_WDD_Field is Interfaces.SAM.UInt12;
-- Mode Register
type WDT_MR_Register is record
-- Watchdog Counter Value
WDV : WDT_MR_WDV_Field := 16#FFF#;
-- Watchdog Fault Interrupt Enable
WDFIEN : Boolean := False;
-- Watchdog Reset Enable
WDRSTEN : Boolean := True;
-- Watchdog Reset Processor
WDRPROC : Boolean := False;
-- Watchdog Disable
WDDIS : Boolean := False;
-- Watchdog Delta Value
WDD : WDT_MR_WDD_Field := 16#FFF#;
-- Watchdog Debug Halt
WDDBGHLT : Boolean := True;
-- Watchdog Idle Halt
WDIDLEHLT : Boolean := True;
-- unspecified
Reserved_30_31 : Interfaces.SAM.UInt2 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for WDT_MR_Register use record
WDV at 0 range 0 .. 11;
WDFIEN at 0 range 12 .. 12;
WDRSTEN at 0 range 13 .. 13;
WDRPROC at 0 range 14 .. 14;
WDDIS at 0 range 15 .. 15;
WDD at 0 range 16 .. 27;
WDDBGHLT at 0 range 28 .. 28;
WDIDLEHLT at 0 range 29 .. 29;
Reserved_30_31 at 0 range 30 .. 31;
end record;
-- Status Register
type WDT_SR_Register is record
-- Read-only. Watchdog Underflow
WDUNF : Boolean;
-- Read-only. Watchdog Error
WDERR : Boolean;
-- unspecified
Reserved_2_31 : Interfaces.SAM.UInt30;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for WDT_SR_Register use record
WDUNF at 0 range 0 .. 0;
WDERR at 0 range 1 .. 1;
Reserved_2_31 at 0 range 2 .. 31;
end record;
-----------------
-- Peripherals --
-----------------
-- General Purpose Backup Register
type GPBR_Peripheral is record
-- General Purpose Backup Register
GPBR : aliased GPBR_GPBR_Registers;
end record
with Volatile;
for GPBR_Peripheral use record
GPBR at 0 range 0 .. 255;
end record;
-- General Purpose Backup Register
GPBR_Periph : aliased GPBR_Peripheral
with Import, Address => System'To_Address (16#400E1490#);
-- Reset Controller
type RSTC_Peripheral is record
-- Control Register
CR : aliased RSTC_CR_Register;
-- Status Register
SR : aliased RSTC_SR_Register;
-- Mode Register
MR : aliased RSTC_MR_Register;
end record
with Volatile;
for RSTC_Peripheral use record
CR at 16#0# range 0 .. 31;
SR at 16#4# range 0 .. 31;
MR at 16#8# range 0 .. 31;
end record;
-- Reset Controller
RSTC_Periph : aliased RSTC_Peripheral
with Import, Address => System'To_Address (16#400E1400#);
-- Real-time Clock
type RTC_Peripheral is record
-- Control Register
CR : aliased RTC_CR_Register;
-- Mode Register
MR : aliased RTC_MR_Register;
-- Time Register
TIMR : aliased RTC_TIMR_Register;
-- Calendar Register
CALR : aliased RTC_CALR_Register;
-- Time Alarm Register
TIMALR : aliased RTC_TIMALR_Register;
-- Calendar Alarm Register
CALALR : aliased RTC_CALALR_Register;
-- Status Register
SR : aliased RTC_SR_Register;
-- Status Clear Command Register
SCCR : aliased RTC_SCCR_Register;
-- Interrupt Enable Register
IER : aliased RTC_IER_Register;
-- Interrupt Disable Register
IDR : aliased RTC_IDR_Register;
-- Interrupt Mask Register
IMR : aliased RTC_IMR_Register;
-- Valid Entry Register
VER : aliased RTC_VER_Register;
end record
with Volatile;
for RTC_Peripheral use record
CR at 16#0# range 0 .. 31;
MR at 16#4# range 0 .. 31;
TIMR at 16#8# range 0 .. 31;
CALR at 16#C# range 0 .. 31;
TIMALR at 16#10# range 0 .. 31;
CALALR at 16#14# range 0 .. 31;
SR at 16#18# range 0 .. 31;
SCCR at 16#1C# range 0 .. 31;
IER at 16#20# range 0 .. 31;
IDR at 16#24# range 0 .. 31;
IMR at 16#28# range 0 .. 31;
VER at 16#2C# range 0 .. 31;
end record;
-- Real-time Clock
RTC_Periph : aliased RTC_Peripheral
with Import, Address => System'To_Address (16#400E1460#);
-- Real-time Timer
type RTT_Peripheral is record
-- Mode Register
MR : aliased RTT_MR_Register;
-- Alarm Register
AR : aliased Interfaces.SAM.UInt32;
-- Value Register
VR : aliased Interfaces.SAM.UInt32;
-- Status Register
SR : aliased RTT_SR_Register;
end record
with Volatile;
for RTT_Peripheral use record
MR at 16#0# range 0 .. 31;
AR at 16#4# range 0 .. 31;
VR at 16#8# range 0 .. 31;
SR at 16#C# range 0 .. 31;
end record;
-- Real-time Timer
RTT_Periph : aliased RTT_Peripheral
with Import, Address => System'To_Address (16#400E1430#);
-- Supply Controller
type SUPC_Peripheral is record
-- Supply Controller Control Register
CR : aliased SUPC_CR_Register;
-- Supply Controller Supply Monitor Mode Register
SMMR : aliased SUPC_SMMR_Register;
-- Supply Controller Mode Register
MR : aliased SUPC_MR_Register;
-- Supply Controller Wake Up Mode Register
WUMR : aliased SUPC_WUMR_Register;
-- Supply Controller Wake Up Inputs Register
WUIR : aliased SUPC_WUIR_Register;
-- Supply Controller Status Register
SR : aliased SUPC_SR_Register;
end record
with Volatile;
for SUPC_Peripheral use record
CR at 16#0# range 0 .. 31;
SMMR at 16#4# range 0 .. 31;
MR at 16#8# range 0 .. 31;
WUMR at 16#C# range 0 .. 31;
WUIR at 16#10# range 0 .. 31;
SR at 16#14# range 0 .. 31;
end record;
-- Supply Controller
SUPC_Periph : aliased SUPC_Peripheral
with Import, Address => System'To_Address (16#400E1410#);
-- Watchdog Timer
type WDT_Peripheral is record
-- Control Register
CR : aliased WDT_CR_Register;
-- Mode Register
MR : aliased WDT_MR_Register;
-- Status Register
SR : aliased WDT_SR_Register;
end record
with Volatile;
for WDT_Peripheral use record
CR at 16#0# range 0 .. 31;
MR at 16#4# range 0 .. 31;
SR at 16#8# range 0 .. 31;
end record;
-- Watchdog Timer
WDT_Periph : aliased WDT_Peripheral
with Import, Address => System'To_Address (16#400E1450#);
end Interfaces.SAM.SYSC;
|
with Ada.Text_IO; use Ada.Text_IO;
procedure Test is
begin
for I in 1 .. 10 loop Put('A'); end loop; New_Line;
for I in 10 .. 1 loop Put('B'); end loop; New_Line;
for I in reverse 1 .. 10 loop Put('C'); end loop; New_Line;
for I in reverse 10 .. 1 loop Put('D'); end loop; New_Line;
end;
-- Local Variables:
-- compile-command: "gnatmake for1.adb && ./for1"
-- End:
|
package STM32.F4.EXTI is
pragma Preelaborate;
type Event_Number is range 0 .. 22;
package Events is
PVD: constant Event_Number := 16;
RTC_Alarm: constant Event_Number := 17;
USB_OTG_FS_Wakeup: constant Event_Number := 18;
Ethernet_Wakeup: constant Event_Number := 19;
USB_OTG_HS_Wakeup: constant Event_Number := 20;
RTC_Tamper: constant Event_Number := 21;
RTC_Timestamp: constant Event_Number := 21; -- alias for RTC_Tamper
RTC_Wakeup: constant Event_Number := 22;
end Events;
type Event_Array is array (Event_Number) of Boolean
with Pack, Size=>23;
type Event_Set_Register is record
MR: Event_Array;
Reserved_23: Integer range 0 .. 2**9-1;
end record with Size => 32;
for Event_Set_Register use record
MR at 0 range 0 .. 22;
Reserved_23 at 0 range 23 .. 31;
end record;
type EXTI_Registers is record
IMR: Event_Set_Register;
EMR: Event_Set_Register;
RTSR: Event_Set_Register;
FTSR: Event_Set_Register;
SWIER: Event_Set_Register;
PR: Event_Set_Register;
end record;
for EXTI_Registers use record
IMR at 16#00# range 0 .. 31;
EMR at 16#04# range 0 .. 31;
RTSR at 16#08# range 0 .. 31;
FTSR at 16#0C# range 0 .. 31;
SWIER at 16#10# range 0 .. 31;
PR at 16#14# range 0 .. 31;
end record;
end STM32.F4.EXTI;
|
package impact.d2.orbs.Joint.gear
--
--
--
is
--
-- #ifndef B2_GEAR_JOINT_H
-- #define B2_GEAR_JOINT_H
--
-- #include <Box2D/Dynamics/Joints/b2Joint.h>
--
-- class b2RevoluteJoint;
-- class b2PrismaticJoint;
--
-- /// Gear joint definition. This definition requires two existing
-- /// revolute or prismatic joints (any combination will work).
-- /// The provided joints must attach a dynamic body to a static body.
-- struct b2GearJointDef : public b2JointDef
-- {
-- b2GearJointDef()
-- {
-- type = e_gearJoint;
-- joint1 = NULL;
-- joint2 = NULL;
-- ratio = 1.0f;
-- }
--
-- /// The first revolute/prismatic joint attached to the gear joint.
-- b2Joint* joint1;
--
-- /// The second revolute/prismatic joint attached to the gear joint.
-- b2Joint* joint2;
--
-- /// The gear ratio.
-- /// @see b2GearJoint for explanation.
-- float32 ratio;
-- };
--
-- /// A gear joint is used to connect two joints together. Either joint
-- /// can be a revolute or prismatic joint. You specify a gear ratio
-- /// to bind the motions together:
-- /// coordinate1 + ratio * coordinate2 = constant
-- /// The ratio can be negative or positive. If one joint is a revolute joint
-- /// and the other joint is a prismatic joint, then the ratio will have units
-- /// of length or units of 1/length.
-- /// @warning The revolute and prismatic joints must be attached to
-- /// fixed bodies (which must be body1 on those joints).
-- class b2GearJoint : public b2Joint
-- {
-- public:
-- b2Vec2 GetAnchorA() const;
-- b2Vec2 GetAnchorB() const;
--
-- b2Vec2 GetReactionForce(float32 inv_dt) const;
-- float32 GetReactionTorque(float32 inv_dt) const;
--
-- /// Set/Get the gear ratio.
-- void SetRatio(float32 ratio);
-- float32 GetRatio() const;
--
-- protected:
--
-- friend class b2Joint;
-- b2GearJoint(const b2GearJointDef* data);
--
-- void InitVelocityConstraints(const b2TimeStep& step);
-- void SolveVelocityConstraints(const b2TimeStep& step);
-- bool SolvePositionConstraints(float32 baumgarte);
--
-- b2Body* m_ground1;
-- b2Body* m_ground2;
--
-- // One of these is NULL.
-- b2RevoluteJoint* m_revolute1;
-- b2PrismaticJoint* m_prismatic1;
--
-- // One of these is NULL.
-- b2RevoluteJoint* m_revolute2;
-- b2PrismaticJoint* m_prismatic2;
--
-- b2Vec2 m_groundAnchor1;
-- b2Vec2 m_groundAnchor2;
--
-- b2Vec2 m_localAnchor1;
-- b2Vec2 m_localAnchor2;
--
-- b2Jacobian m_J;
--
-- float32 m_constant;
-- float32 m_ratio;
--
-- // Effective mass
-- float32 m_mass;
--
-- // Impulse for accumulation/warm starting.
-- float32 m_impulse;
-- };
--
-- #endif
procedure dummy;
end impact.d2.orbs.Joint.gear;
|
type Octet is mod 2**8;
for Octet'Size use 8;
type Octet_String is array (Positive range <>) of Octet;
|
-- Motherlode
-- Copyright (c) 2020 Fabien Chouteau
with Render;
package HUD is
procedure Draw
(FB : in out Render.Frame_Buffer;
Money,
Fuel, Fuel_Max,
Cargo, Cargo_Max : Natural;
Depth, Cash_In : Integer);
end HUD;
|
-- Copyright 2016 Steven Stewart-Gallus
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-- implied. See the License for the specific language governing
-- permissions and limitations under the License.
with System;
with Interfaces.C; use Interfaces.C;
with Interfaces.C.Strings;
with Libc.Stdint;
with Pulse.Sample;
with Pulse.Channelmap;
with Pulse.Volume;
with Pulse.Def;
with Pulse.Context;
limited with Pulse.Format;
package Pulse.Introspect with
Spark_Mode => Off is
type pa_sink_port_info is record
name : Interfaces.C.Strings
.chars_ptr; -- /usr/include/pulse/introspect.h:202
description : Interfaces.C.Strings
.chars_ptr; -- /usr/include/pulse/introspect.h:203
priority : aliased Libc.Stdint
.uint32_t; -- /usr/include/pulse/introspect.h:204
available : aliased int; -- /usr/include/pulse/introspect.h:205
end record;
pragma Convention
(C_Pass_By_Copy,
pa_sink_port_info); -- /usr/include/pulse/introspect.h:201
type pa_sink_info is record
name : Interfaces.C.Strings
.chars_ptr; -- /usr/include/pulse/introspect.h:212
index : aliased Libc.Stdint
.uint32_t; -- /usr/include/pulse/introspect.h:213
description : Interfaces.C.Strings
.chars_ptr; -- /usr/include/pulse/introspect.h:214
sample_spec : aliased Pulse.Sample
.pa_sample_spec; -- /usr/include/pulse/introspect.h:215
channel_map : aliased Pulse.Channelmap
.pa_channel_map; -- /usr/include/pulse/introspect.h:216
owner_module : aliased Libc.Stdint
.uint32_t; -- /usr/include/pulse/introspect.h:217
volume : aliased Pulse.Volume
.pa_cvolume; -- /usr/include/pulse/introspect.h:218
mute : aliased int; -- /usr/include/pulse/introspect.h:219
monitor_source : aliased Libc.Stdint
.uint32_t; -- /usr/include/pulse/introspect.h:220
monitor_source_name : Interfaces.C.Strings
.chars_ptr; -- /usr/include/pulse/introspect.h:221
latency : aliased Pulse.Sample
.pa_usec_t; -- /usr/include/pulse/introspect.h:222
driver : Interfaces.C.Strings
.chars_ptr; -- /usr/include/pulse/introspect.h:223
flags : aliased Pulse.Def
.pa_sink_flags_t; -- /usr/include/pulse/introspect.h:224
proplist : System.Address; -- /usr/include/pulse/introspect.h:225
configured_latency : aliased Pulse.Sample
.pa_usec_t; -- /usr/include/pulse/introspect.h:226
base_volume : aliased Pulse.Volume
.pa_volume_t; -- /usr/include/pulse/introspect.h:227
state : aliased Pulse.Def
.pa_sink_state_t; -- /usr/include/pulse/introspect.h:228
n_volume_steps : aliased Libc.Stdint
.uint32_t; -- /usr/include/pulse/introspect.h:229
card : aliased Libc.Stdint
.uint32_t; -- /usr/include/pulse/introspect.h:230
n_ports : aliased Libc.Stdint
.uint32_t; -- /usr/include/pulse/introspect.h:231
ports : System.Address; -- /usr/include/pulse/introspect.h:232
active_port : access pa_sink_port_info; -- /usr/include/pulse/introspect.h:233
n_formats : aliased Libc.Stdint
.uint8_t; -- /usr/include/pulse/introspect.h:234
formats : System.Address; -- /usr/include/pulse/introspect.h:235
end record;
pragma Convention
(C_Pass_By_Copy,
pa_sink_info); -- /usr/include/pulse/introspect.h:211
type pa_sink_info_cb_t is access procedure
(arg1 : System.Address;
arg2 : System.Address;
arg3 : int;
arg4 : System.Address);
pragma Convention
(C,
pa_sink_info_cb_t); -- /usr/include/pulse/introspect.h:239
function pa_context_get_sink_info_by_name
(c : System.Address;
name : Interfaces.C.Strings.chars_ptr;
cb : pa_sink_info_cb_t;
userdata : System.Address)
return System.Address; -- /usr/include/pulse/introspect.h:242
pragma Import
(C,
pa_context_get_sink_info_by_name,
"pa_context_get_sink_info_by_name");
function pa_context_get_sink_info_by_index
(c : System.Address;
idx : Libc.Stdint.uint32_t;
cb : pa_sink_info_cb_t;
userdata : System.Address)
return System.Address; -- /usr/include/pulse/introspect.h:245
pragma Import
(C,
pa_context_get_sink_info_by_index,
"pa_context_get_sink_info_by_index");
function pa_context_get_sink_info_list
(c : System.Address;
cb : pa_sink_info_cb_t;
userdata : System.Address)
return System.Address; -- /usr/include/pulse/introspect.h:248
pragma Import
(C,
pa_context_get_sink_info_list,
"pa_context_get_sink_info_list");
function pa_context_set_sink_volume_by_index
(c : System.Address;
idx : Libc.Stdint.uint32_t;
volume : access constant Pulse.Volume.pa_cvolume;
cb : Pulse.Context.pa_context_success_cb_t;
userdata : System.Address)
return System.Address; -- /usr/include/pulse/introspect.h:251
pragma Import
(C,
pa_context_set_sink_volume_by_index,
"pa_context_set_sink_volume_by_index");
function pa_context_set_sink_volume_by_name
(c : System.Address;
name : Interfaces.C.Strings.chars_ptr;
volume : access constant Pulse.Volume.pa_cvolume;
cb : Pulse.Context.pa_context_success_cb_t;
userdata : System.Address)
return System.Address; -- /usr/include/pulse/introspect.h:254
pragma Import
(C,
pa_context_set_sink_volume_by_name,
"pa_context_set_sink_volume_by_name");
function pa_context_set_sink_mute_by_index
(c : System.Address;
idx : Libc.Stdint.uint32_t;
mute : int;
cb : Pulse.Context.pa_context_success_cb_t;
userdata : System.Address)
return System.Address; -- /usr/include/pulse/introspect.h:257
pragma Import
(C,
pa_context_set_sink_mute_by_index,
"pa_context_set_sink_mute_by_index");
function pa_context_set_sink_mute_by_name
(c : System.Address;
name : Interfaces.C.Strings.chars_ptr;
mute : int;
cb : Pulse.Context.pa_context_success_cb_t;
userdata : System.Address)
return System.Address; -- /usr/include/pulse/introspect.h:260
pragma Import
(C,
pa_context_set_sink_mute_by_name,
"pa_context_set_sink_mute_by_name");
function pa_context_suspend_sink_by_name
(c : System.Address;
sink_name : Interfaces.C.Strings.chars_ptr;
suspend : int;
cb : Pulse.Context.pa_context_success_cb_t;
userdata : System.Address)
return System.Address; -- /usr/include/pulse/introspect.h:263
pragma Import
(C,
pa_context_suspend_sink_by_name,
"pa_context_suspend_sink_by_name");
function pa_context_suspend_sink_by_index
(c : System.Address;
idx : Libc.Stdint.uint32_t;
suspend : int;
cb : Pulse.Context.pa_context_success_cb_t;
userdata : System.Address)
return System.Address; -- /usr/include/pulse/introspect.h:266
pragma Import
(C,
pa_context_suspend_sink_by_index,
"pa_context_suspend_sink_by_index");
function pa_context_set_sink_port_by_index
(c : System.Address;
idx : Libc.Stdint.uint32_t;
port : Interfaces.C.Strings.chars_ptr;
cb : Pulse.Context.pa_context_success_cb_t;
userdata : System.Address)
return System.Address; -- /usr/include/pulse/introspect.h:269
pragma Import
(C,
pa_context_set_sink_port_by_index,
"pa_context_set_sink_port_by_index");
function pa_context_set_sink_port_by_name
(c : System.Address;
name : Interfaces.C.Strings.chars_ptr;
port : Interfaces.C.Strings.chars_ptr;
cb : Pulse.Context.pa_context_success_cb_t;
userdata : System.Address)
return System.Address; -- /usr/include/pulse/introspect.h:272
pragma Import
(C,
pa_context_set_sink_port_by_name,
"pa_context_set_sink_port_by_name");
type pa_source_port_info is record
name : Interfaces.C.Strings
.chars_ptr; -- /usr/include/pulse/introspect.h:282
description : Interfaces.C.Strings
.chars_ptr; -- /usr/include/pulse/introspect.h:283
priority : aliased Libc.Stdint
.uint32_t; -- /usr/include/pulse/introspect.h:284
available : aliased int; -- /usr/include/pulse/introspect.h:285
end record;
pragma Convention
(C_Pass_By_Copy,
pa_source_port_info); -- /usr/include/pulse/introspect.h:281
type pa_source_info is record
name : Interfaces.C.Strings
.chars_ptr; -- /usr/include/pulse/introspect.h:292
index : aliased Libc.Stdint
.uint32_t; -- /usr/include/pulse/introspect.h:293
description : Interfaces.C.Strings
.chars_ptr; -- /usr/include/pulse/introspect.h:294
sample_spec : aliased Pulse.Sample
.pa_sample_spec; -- /usr/include/pulse/introspect.h:295
channel_map : aliased Pulse.Channelmap
.pa_channel_map; -- /usr/include/pulse/introspect.h:296
owner_module : aliased Libc.Stdint
.uint32_t; -- /usr/include/pulse/introspect.h:297
volume : aliased Pulse.Volume
.pa_cvolume; -- /usr/include/pulse/introspect.h:298
mute : aliased int; -- /usr/include/pulse/introspect.h:299
monitor_of_sink : aliased Libc.Stdint
.uint32_t; -- /usr/include/pulse/introspect.h:300
monitor_of_sink_name : Interfaces.C.Strings
.chars_ptr; -- /usr/include/pulse/introspect.h:301
latency : aliased Pulse.Sample
.pa_usec_t; -- /usr/include/pulse/introspect.h:302
driver : Interfaces.C.Strings
.chars_ptr; -- /usr/include/pulse/introspect.h:303
flags : aliased Pulse.Def
.pa_source_flags_t; -- /usr/include/pulse/introspect.h:304
proplist : System.Address; -- /usr/include/pulse/introspect.h:305
configured_latency : aliased Pulse.Sample
.pa_usec_t; -- /usr/include/pulse/introspect.h:306
base_volume : aliased Pulse.Volume
.pa_volume_t; -- /usr/include/pulse/introspect.h:307
state : aliased Pulse.Def
.pa_source_state_t; -- /usr/include/pulse/introspect.h:308
n_volume_steps : aliased Libc.Stdint
.uint32_t; -- /usr/include/pulse/introspect.h:309
card : aliased Libc.Stdint
.uint32_t; -- /usr/include/pulse/introspect.h:310
n_ports : aliased Libc.Stdint
.uint32_t; -- /usr/include/pulse/introspect.h:311
ports : System.Address; -- /usr/include/pulse/introspect.h:312
active_port : access pa_source_port_info; -- /usr/include/pulse/introspect.h:313
n_formats : aliased Libc.Stdint
.uint8_t; -- /usr/include/pulse/introspect.h:314
formats : System.Address; -- /usr/include/pulse/introspect.h:315
end record;
pragma Convention
(C_Pass_By_Copy,
pa_source_info); -- /usr/include/pulse/introspect.h:291
type pa_source_info_cb_t is access procedure
(arg1 : System.Address;
arg2 : System.Address;
arg3 : int;
arg4 : System.Address);
pragma Convention
(C,
pa_source_info_cb_t); -- /usr/include/pulse/introspect.h:319
function pa_context_get_source_info_by_name
(c : System.Address;
name : Interfaces.C.Strings.chars_ptr;
cb : pa_source_info_cb_t;
userdata : System.Address)
return System.Address; -- /usr/include/pulse/introspect.h:322
pragma Import
(C,
pa_context_get_source_info_by_name,
"pa_context_get_source_info_by_name");
function pa_context_get_source_info_by_index
(c : System.Address;
idx : Libc.Stdint.uint32_t;
cb : pa_source_info_cb_t;
userdata : System.Address)
return System.Address; -- /usr/include/pulse/introspect.h:325
pragma Import
(C,
pa_context_get_source_info_by_index,
"pa_context_get_source_info_by_index");
function pa_context_get_source_info_list
(c : System.Address;
cb : pa_source_info_cb_t;
userdata : System.Address)
return System.Address; -- /usr/include/pulse/introspect.h:328
pragma Import
(C,
pa_context_get_source_info_list,
"pa_context_get_source_info_list");
function pa_context_set_source_volume_by_index
(c : System.Address;
idx : Libc.Stdint.uint32_t;
volume : access constant Pulse.Volume.pa_cvolume;
cb : Pulse.Context.pa_context_success_cb_t;
userdata : System.Address)
return System.Address; -- /usr/include/pulse/introspect.h:331
pragma Import
(C,
pa_context_set_source_volume_by_index,
"pa_context_set_source_volume_by_index");
function pa_context_set_source_volume_by_name
(c : System.Address;
name : Interfaces.C.Strings.chars_ptr;
volume : access constant Pulse.Volume.pa_cvolume;
cb : Pulse.Context.pa_context_success_cb_t;
userdata : System.Address)
return System.Address; -- /usr/include/pulse/introspect.h:334
pragma Import
(C,
pa_context_set_source_volume_by_name,
"pa_context_set_source_volume_by_name");
function pa_context_set_source_mute_by_index
(c : System.Address;
idx : Libc.Stdint.uint32_t;
mute : int;
cb : Pulse.Context.pa_context_success_cb_t;
userdata : System.Address)
return System.Address; -- /usr/include/pulse/introspect.h:337
pragma Import
(C,
pa_context_set_source_mute_by_index,
"pa_context_set_source_mute_by_index");
function pa_context_set_source_mute_by_name
(c : System.Address;
name : Interfaces.C.Strings.chars_ptr;
mute : int;
cb : Pulse.Context.pa_context_success_cb_t;
userdata : System.Address)
return System.Address; -- /usr/include/pulse/introspect.h:340
pragma Import
(C,
pa_context_set_source_mute_by_name,
"pa_context_set_source_mute_by_name");
function pa_context_suspend_source_by_name
(c : System.Address;
source_name : Interfaces.C.Strings.chars_ptr;
suspend : int;
cb : Pulse.Context.pa_context_success_cb_t;
userdata : System.Address)
return System.Address; -- /usr/include/pulse/introspect.h:343
pragma Import
(C,
pa_context_suspend_source_by_name,
"pa_context_suspend_source_by_name");
function pa_context_suspend_source_by_index
(c : System.Address;
idx : Libc.Stdint.uint32_t;
suspend : int;
cb : Pulse.Context.pa_context_success_cb_t;
userdata : System.Address)
return System.Address; -- /usr/include/pulse/introspect.h:346
pragma Import
(C,
pa_context_suspend_source_by_index,
"pa_context_suspend_source_by_index");
function pa_context_set_source_port_by_index
(c : System.Address;
idx : Libc.Stdint.uint32_t;
port : Interfaces.C.Strings.chars_ptr;
cb : Pulse.Context.pa_context_success_cb_t;
userdata : System.Address)
return System.Address; -- /usr/include/pulse/introspect.h:349
pragma Import
(C,
pa_context_set_source_port_by_index,
"pa_context_set_source_port_by_index");
function pa_context_set_source_port_by_name
(c : System.Address;
name : Interfaces.C.Strings.chars_ptr;
port : Interfaces.C.Strings.chars_ptr;
cb : Pulse.Context.pa_context_success_cb_t;
userdata : System.Address)
return System.Address; -- /usr/include/pulse/introspect.h:352
pragma Import
(C,
pa_context_set_source_port_by_name,
"pa_context_set_source_port_by_name");
type pa_server_info is record
user_name : Interfaces.C.Strings
.chars_ptr; -- /usr/include/pulse/introspect.h:362
host_name : Interfaces.C.Strings
.chars_ptr; -- /usr/include/pulse/introspect.h:363
server_version : Interfaces.C.Strings
.chars_ptr; -- /usr/include/pulse/introspect.h:364
server_name : Interfaces.C.Strings
.chars_ptr; -- /usr/include/pulse/introspect.h:365
sample_spec : aliased Pulse.Sample
.pa_sample_spec; -- /usr/include/pulse/introspect.h:366
default_sink_name : Interfaces.C.Strings
.chars_ptr; -- /usr/include/pulse/introspect.h:367
default_source_name : Interfaces.C.Strings
.chars_ptr; -- /usr/include/pulse/introspect.h:368
cookie : aliased Libc.Stdint
.uint32_t; -- /usr/include/pulse/introspect.h:369
channel_map : aliased Pulse.Channelmap
.pa_channel_map; -- /usr/include/pulse/introspect.h:370
end record;
pragma Convention
(C_Pass_By_Copy,
pa_server_info); -- /usr/include/pulse/introspect.h:361
type pa_server_info_cb_t is access procedure
(arg1 : System.Address;
arg2 : System.Address;
arg3 : System.Address);
pragma Convention
(C,
pa_server_info_cb_t); -- /usr/include/pulse/introspect.h:374
function pa_context_get_server_info
(c : System.Address;
cb : pa_server_info_cb_t;
userdata : System.Address)
return System.Address; -- /usr/include/pulse/introspect.h:377
pragma Import (C, pa_context_get_server_info, "pa_context_get_server_info");
type pa_module_info is record
index : aliased Libc.Stdint
.uint32_t; -- /usr/include/pulse/introspect.h:387
name : Interfaces.C.Strings
.chars_ptr; -- /usr/include/pulse/introspect.h:388
argument : Interfaces.C.Strings
.chars_ptr; -- /usr/include/pulse/introspect.h:389
n_used : aliased Libc.Stdint
.uint32_t; -- /usr/include/pulse/introspect.h:390
auto_unload : aliased int; -- /usr/include/pulse/introspect.h:392
proplist : System.Address; -- /usr/include/pulse/introspect.h:394
end record;
pragma Convention
(C_Pass_By_Copy,
pa_module_info); -- /usr/include/pulse/introspect.h:386
type pa_module_info_cb_t is access procedure
(arg1 : System.Address;
arg2 : System.Address;
arg3 : int;
arg4 : System.Address);
pragma Convention
(C,
pa_module_info_cb_t); -- /usr/include/pulse/introspect.h:398
function pa_context_get_module_info
(c : System.Address;
idx : Libc.Stdint.uint32_t;
cb : pa_module_info_cb_t;
userdata : System.Address)
return System.Address; -- /usr/include/pulse/introspect.h:401
pragma Import (C, pa_context_get_module_info, "pa_context_get_module_info");
function pa_context_get_module_info_list
(c : System.Address;
cb : pa_module_info_cb_t;
userdata : System.Address)
return System.Address; -- /usr/include/pulse/introspect.h:404
pragma Import
(C,
pa_context_get_module_info_list,
"pa_context_get_module_info_list");
type pa_context_index_cb_t is access procedure
(arg1 : System.Address;
arg2 : Libc.Stdint.uint32_t;
arg3 : System.Address);
pragma Convention
(C,
pa_context_index_cb_t); -- /usr/include/pulse/introspect.h:407
function pa_context_load_module
(c : System.Address;
name : Interfaces.C.Strings.chars_ptr;
argument : Interfaces.C.Strings.chars_ptr;
cb : pa_context_index_cb_t;
userdata : System.Address)
return System.Address; -- /usr/include/pulse/introspect.h:410
pragma Import (C, pa_context_load_module, "pa_context_load_module");
function pa_context_unload_module
(c : System.Address;
idx : Libc.Stdint.uint32_t;
cb : Pulse.Context.pa_context_success_cb_t;
userdata : System.Address)
return System.Address; -- /usr/include/pulse/introspect.h:413
pragma Import (C, pa_context_unload_module, "pa_context_unload_module");
type pa_client_info is record
index : aliased Libc.Stdint
.uint32_t; -- /usr/include/pulse/introspect.h:423
name : Interfaces.C.Strings
.chars_ptr; -- /usr/include/pulse/introspect.h:424
owner_module : aliased Libc.Stdint
.uint32_t; -- /usr/include/pulse/introspect.h:425
driver : Interfaces.C.Strings
.chars_ptr; -- /usr/include/pulse/introspect.h:426
proplist : System.Address; -- /usr/include/pulse/introspect.h:427
end record;
pragma Convention
(C_Pass_By_Copy,
pa_client_info); -- /usr/include/pulse/introspect.h:422
type pa_client_info_cb_t is access procedure
(arg1 : System.Address;
arg2 : System.Address;
arg3 : int;
arg4 : System.Address);
pragma Convention
(C,
pa_client_info_cb_t); -- /usr/include/pulse/introspect.h:431
function pa_context_get_client_info
(c : System.Address;
idx : Libc.Stdint.uint32_t;
cb : pa_client_info_cb_t;
userdata : System.Address)
return System.Address; -- /usr/include/pulse/introspect.h:434
pragma Import (C, pa_context_get_client_info, "pa_context_get_client_info");
function pa_context_get_client_info_list
(c : System.Address;
cb : pa_client_info_cb_t;
userdata : System.Address)
return System.Address; -- /usr/include/pulse/introspect.h:437
pragma Import
(C,
pa_context_get_client_info_list,
"pa_context_get_client_info_list");
function pa_context_kill_client
(c : System.Address;
idx : Libc.Stdint.uint32_t;
cb : Pulse.Context.pa_context_success_cb_t;
userdata : System.Address)
return System.Address; -- /usr/include/pulse/introspect.h:440
pragma Import (C, pa_context_kill_client, "pa_context_kill_client");
type pa_card_profile_info is record
name : Interfaces.C.Strings
.chars_ptr; -- /usr/include/pulse/introspect.h:450
description : Interfaces.C.Strings
.chars_ptr; -- /usr/include/pulse/introspect.h:451
n_sinks : aliased Libc.Stdint
.uint32_t; -- /usr/include/pulse/introspect.h:452
n_sources : aliased Libc.Stdint
.uint32_t; -- /usr/include/pulse/introspect.h:453
priority : aliased Libc.Stdint
.uint32_t; -- /usr/include/pulse/introspect.h:454
end record;
pragma Convention
(C_Pass_By_Copy,
pa_card_profile_info); -- /usr/include/pulse/introspect.h:449
type pa_card_port_info is record
name : Interfaces.C.Strings
.chars_ptr; -- /usr/include/pulse/introspect.h:461
description : Interfaces.C.Strings
.chars_ptr; -- /usr/include/pulse/introspect.h:462
priority : aliased Libc.Stdint
.uint32_t; -- /usr/include/pulse/introspect.h:463
available : aliased int; -- /usr/include/pulse/introspect.h:464
direction : aliased int; -- /usr/include/pulse/introspect.h:465
n_profiles : aliased Libc.Stdint
.uint32_t; -- /usr/include/pulse/introspect.h:466
profiles : System.Address; -- /usr/include/pulse/introspect.h:467
proplist : System.Address; -- /usr/include/pulse/introspect.h:468
latency_offset : aliased Libc.Stdint
.int64_t; -- /usr/include/pulse/introspect.h:469
end record;
pragma Convention
(C_Pass_By_Copy,
pa_card_port_info); -- /usr/include/pulse/introspect.h:460
type pa_card_info is record
index : aliased Libc.Stdint
.uint32_t; -- /usr/include/pulse/introspect.h:476
name : Interfaces.C.Strings
.chars_ptr; -- /usr/include/pulse/introspect.h:477
owner_module : aliased Libc.Stdint
.uint32_t; -- /usr/include/pulse/introspect.h:478
driver : Interfaces.C.Strings
.chars_ptr; -- /usr/include/pulse/introspect.h:479
n_profiles : aliased Libc.Stdint
.uint32_t; -- /usr/include/pulse/introspect.h:480
profiles : access pa_card_profile_info; -- /usr/include/pulse/introspect.h:481
active_profile : access pa_card_profile_info; -- /usr/include/pulse/introspect.h:482
proplist : System.Address; -- /usr/include/pulse/introspect.h:483
n_ports : aliased Libc.Stdint
.uint32_t; -- /usr/include/pulse/introspect.h:484
ports : System.Address; -- /usr/include/pulse/introspect.h:485
end record;
pragma Convention
(C_Pass_By_Copy,
pa_card_info); -- /usr/include/pulse/introspect.h:475
type pa_card_info_cb_t is access procedure
(arg1 : System.Address;
arg2 : System.Address;
arg3 : int;
arg4 : System.Address);
pragma Convention
(C,
pa_card_info_cb_t); -- /usr/include/pulse/introspect.h:489
function pa_context_get_card_info_by_index
(c : System.Address;
idx : Libc.Stdint.uint32_t;
cb : pa_card_info_cb_t;
userdata : System.Address)
return System.Address; -- /usr/include/pulse/introspect.h:492
pragma Import
(C,
pa_context_get_card_info_by_index,
"pa_context_get_card_info_by_index");
function pa_context_get_card_info_by_name
(c : System.Address;
name : Interfaces.C.Strings.chars_ptr;
cb : pa_card_info_cb_t;
userdata : System.Address)
return System.Address; -- /usr/include/pulse/introspect.h:495
pragma Import
(C,
pa_context_get_card_info_by_name,
"pa_context_get_card_info_by_name");
function pa_context_get_card_info_list
(c : System.Address;
cb : pa_card_info_cb_t;
userdata : System.Address)
return System.Address; -- /usr/include/pulse/introspect.h:498
pragma Import
(C,
pa_context_get_card_info_list,
"pa_context_get_card_info_list");
function pa_context_set_card_profile_by_index
(c : System.Address;
idx : Libc.Stdint.uint32_t;
profile : Interfaces.C.Strings.chars_ptr;
cb : Pulse.Context.pa_context_success_cb_t;
userdata : System.Address)
return System.Address; -- /usr/include/pulse/introspect.h:501
pragma Import
(C,
pa_context_set_card_profile_by_index,
"pa_context_set_card_profile_by_index");
function pa_context_set_card_profile_by_name
(c : System.Address;
name : Interfaces.C.Strings.chars_ptr;
profile : Interfaces.C.Strings.chars_ptr;
cb : Pulse.Context.pa_context_success_cb_t;
userdata : System.Address)
return System.Address; -- /usr/include/pulse/introspect.h:504
pragma Import
(C,
pa_context_set_card_profile_by_name,
"pa_context_set_card_profile_by_name");
function pa_context_set_port_latency_offset
(c : System.Address;
card_name : Interfaces.C.Strings.chars_ptr;
port_name : Interfaces.C.Strings.chars_ptr;
offset : Libc.Stdint.int64_t;
cb : Pulse.Context.pa_context_success_cb_t;
userdata : System.Address)
return System.Address; -- /usr/include/pulse/introspect.h:507
pragma Import
(C,
pa_context_set_port_latency_offset,
"pa_context_set_port_latency_offset");
type pa_sink_input_info is record
index : aliased Libc.Stdint
.uint32_t; -- /usr/include/pulse/introspect.h:517
name : Interfaces.C.Strings
.chars_ptr; -- /usr/include/pulse/introspect.h:518
owner_module : aliased Libc.Stdint
.uint32_t; -- /usr/include/pulse/introspect.h:519
client : aliased Libc.Stdint
.uint32_t; -- /usr/include/pulse/introspect.h:520
sink : aliased Libc.Stdint
.uint32_t; -- /usr/include/pulse/introspect.h:521
sample_spec : aliased Pulse.Sample
.pa_sample_spec; -- /usr/include/pulse/introspect.h:522
channel_map : aliased Pulse.Channelmap
.pa_channel_map; -- /usr/include/pulse/introspect.h:523
volume : aliased Pulse.Volume
.pa_cvolume; -- /usr/include/pulse/introspect.h:524
buffer_usec : aliased Pulse.Sample
.pa_usec_t; -- /usr/include/pulse/introspect.h:525
sink_usec : aliased Pulse.Sample
.pa_usec_t; -- /usr/include/pulse/introspect.h:526
resample_method : Interfaces.C.Strings
.chars_ptr; -- /usr/include/pulse/introspect.h:527
driver : Interfaces.C.Strings
.chars_ptr; -- /usr/include/pulse/introspect.h:528
mute : aliased int; -- /usr/include/pulse/introspect.h:529
proplist : System.Address; -- /usr/include/pulse/introspect.h:530
corked : aliased int; -- /usr/include/pulse/introspect.h:531
has_volume : aliased int; -- /usr/include/pulse/introspect.h:532
volume_writable : aliased int; -- /usr/include/pulse/introspect.h:533
format : access Pulse.Format
.pa_format_info; -- /usr/include/pulse/introspect.h:534
end record;
pragma Convention
(C_Pass_By_Copy,
pa_sink_input_info); -- /usr/include/pulse/introspect.h:516
type pa_sink_input_info_cb_t is access procedure
(arg1 : System.Address;
arg2 : System.Address;
arg3 : int;
arg4 : System.Address);
pragma Convention
(C,
pa_sink_input_info_cb_t); -- /usr/include/pulse/introspect.h:538
function pa_context_get_sink_input_info
(c : System.Address;
idx : Libc.Stdint.uint32_t;
cb : pa_sink_input_info_cb_t;
userdata : System.Address)
return System.Address; -- /usr/include/pulse/introspect.h:541
pragma Import
(C,
pa_context_get_sink_input_info,
"pa_context_get_sink_input_info");
function pa_context_get_sink_input_info_list
(c : System.Address;
cb : pa_sink_input_info_cb_t;
userdata : System.Address)
return System.Address; -- /usr/include/pulse/introspect.h:544
pragma Import
(C,
pa_context_get_sink_input_info_list,
"pa_context_get_sink_input_info_list");
function pa_context_move_sink_input_by_name
(c : System.Address;
idx : Libc.Stdint.uint32_t;
sink_name : Interfaces.C.Strings.chars_ptr;
cb : Pulse.Context.pa_context_success_cb_t;
userdata : System.Address)
return System.Address; -- /usr/include/pulse/introspect.h:547
pragma Import
(C,
pa_context_move_sink_input_by_name,
"pa_context_move_sink_input_by_name");
function pa_context_move_sink_input_by_index
(c : System.Address;
idx : Libc.Stdint.uint32_t;
sink_idx : Libc.Stdint.uint32_t;
cb : Pulse.Context.pa_context_success_cb_t;
userdata : System.Address)
return System.Address; -- /usr/include/pulse/introspect.h:550
pragma Import
(C,
pa_context_move_sink_input_by_index,
"pa_context_move_sink_input_by_index");
function pa_context_set_sink_input_volume
(c : System.Address;
idx : Libc.Stdint.uint32_t;
volume : access constant Pulse.Volume.pa_cvolume;
cb : Pulse.Context.pa_context_success_cb_t;
userdata : System.Address)
return System.Address; -- /usr/include/pulse/introspect.h:553
pragma Import
(C,
pa_context_set_sink_input_volume,
"pa_context_set_sink_input_volume");
function pa_context_set_sink_input_mute
(c : System.Address;
idx : Libc.Stdint.uint32_t;
mute : int;
cb : Pulse.Context.pa_context_success_cb_t;
userdata : System.Address)
return System.Address; -- /usr/include/pulse/introspect.h:556
pragma Import
(C,
pa_context_set_sink_input_mute,
"pa_context_set_sink_input_mute");
function pa_context_kill_sink_input
(c : System.Address;
idx : Libc.Stdint.uint32_t;
cb : Pulse.Context.pa_context_success_cb_t;
userdata : System.Address)
return System.Address; -- /usr/include/pulse/introspect.h:559
pragma Import (C, pa_context_kill_sink_input, "pa_context_kill_sink_input");
type pa_source_output_info is record
index : aliased Libc.Stdint
.uint32_t; -- /usr/include/pulse/introspect.h:569
name : Interfaces.C.Strings
.chars_ptr; -- /usr/include/pulse/introspect.h:570
owner_module : aliased Libc.Stdint
.uint32_t; -- /usr/include/pulse/introspect.h:571
client : aliased Libc.Stdint
.uint32_t; -- /usr/include/pulse/introspect.h:572
source : aliased Libc.Stdint
.uint32_t; -- /usr/include/pulse/introspect.h:573
sample_spec : aliased Pulse.Sample
.pa_sample_spec; -- /usr/include/pulse/introspect.h:574
channel_map : aliased Pulse.Channelmap
.pa_channel_map; -- /usr/include/pulse/introspect.h:575
buffer_usec : aliased Pulse.Sample
.pa_usec_t; -- /usr/include/pulse/introspect.h:576
source_usec : aliased Pulse.Sample
.pa_usec_t; -- /usr/include/pulse/introspect.h:577
resample_method : Interfaces.C.Strings
.chars_ptr; -- /usr/include/pulse/introspect.h:578
driver : Interfaces.C.Strings
.chars_ptr; -- /usr/include/pulse/introspect.h:579
proplist : System.Address; -- /usr/include/pulse/introspect.h:580
corked : aliased int; -- /usr/include/pulse/introspect.h:581
volume : aliased Pulse.Volume
.pa_cvolume; -- /usr/include/pulse/introspect.h:582
mute : aliased int; -- /usr/include/pulse/introspect.h:583
has_volume : aliased int; -- /usr/include/pulse/introspect.h:584
volume_writable : aliased int; -- /usr/include/pulse/introspect.h:585
format : access Pulse.Format
.pa_format_info; -- /usr/include/pulse/introspect.h:586
end record;
pragma Convention
(C_Pass_By_Copy,
pa_source_output_info); -- /usr/include/pulse/introspect.h:568
type pa_source_output_info_cb_t is access procedure
(arg1 : System.Address;
arg2 : System.Address;
arg3 : int;
arg4 : System.Address);
pragma Convention
(C,
pa_source_output_info_cb_t); -- /usr/include/pulse/introspect.h:590
function pa_context_get_source_output_info
(c : System.Address;
idx : Libc.Stdint.uint32_t;
cb : pa_source_output_info_cb_t;
userdata : System.Address)
return System.Address; -- /usr/include/pulse/introspect.h:593
pragma Import
(C,
pa_context_get_source_output_info,
"pa_context_get_source_output_info");
function pa_context_get_source_output_info_list
(c : System.Address;
cb : pa_source_output_info_cb_t;
userdata : System.Address)
return System.Address; -- /usr/include/pulse/introspect.h:596
pragma Import
(C,
pa_context_get_source_output_info_list,
"pa_context_get_source_output_info_list");
function pa_context_move_source_output_by_name
(c : System.Address;
idx : Libc.Stdint.uint32_t;
source_name : Interfaces.C.Strings.chars_ptr;
cb : Pulse.Context.pa_context_success_cb_t;
userdata : System.Address)
return System.Address; -- /usr/include/pulse/introspect.h:599
pragma Import
(C,
pa_context_move_source_output_by_name,
"pa_context_move_source_output_by_name");
function pa_context_move_source_output_by_index
(c : System.Address;
idx : Libc.Stdint.uint32_t;
source_idx : Libc.Stdint.uint32_t;
cb : Pulse.Context.pa_context_success_cb_t;
userdata : System.Address)
return System.Address; -- /usr/include/pulse/introspect.h:602
pragma Import
(C,
pa_context_move_source_output_by_index,
"pa_context_move_source_output_by_index");
function pa_context_set_source_output_volume
(c : System.Address;
idx : Libc.Stdint.uint32_t;
volume : access constant Pulse.Volume.pa_cvolume;
cb : Pulse.Context.pa_context_success_cb_t;
userdata : System.Address)
return System.Address; -- /usr/include/pulse/introspect.h:605
pragma Import
(C,
pa_context_set_source_output_volume,
"pa_context_set_source_output_volume");
function pa_context_set_source_output_mute
(c : System.Address;
idx : Libc.Stdint.uint32_t;
mute : int;
cb : Pulse.Context.pa_context_success_cb_t;
userdata : System.Address)
return System.Address; -- /usr/include/pulse/introspect.h:608
pragma Import
(C,
pa_context_set_source_output_mute,
"pa_context_set_source_output_mute");
function pa_context_kill_source_output
(c : System.Address;
idx : Libc.Stdint.uint32_t;
cb : Pulse.Context.pa_context_success_cb_t;
userdata : System.Address)
return System.Address; -- /usr/include/pulse/introspect.h:611
pragma Import
(C,
pa_context_kill_source_output,
"pa_context_kill_source_output");
type pa_stat_info is record
memblock_total : aliased Libc.Stdint
.uint32_t; -- /usr/include/pulse/introspect.h:621
memblock_total_size : aliased Libc.Stdint
.uint32_t; -- /usr/include/pulse/introspect.h:622
memblock_allocated : aliased Libc.Stdint
.uint32_t; -- /usr/include/pulse/introspect.h:623
memblock_allocated_size : aliased Libc.Stdint
.uint32_t; -- /usr/include/pulse/introspect.h:624
scache_size : aliased Libc.Stdint
.uint32_t; -- /usr/include/pulse/introspect.h:625
end record;
pragma Convention
(C_Pass_By_Copy,
pa_stat_info); -- /usr/include/pulse/introspect.h:620
type pa_stat_info_cb_t is access procedure
(arg1 : System.Address;
arg2 : System.Address;
arg3 : System.Address);
pragma Convention
(C,
pa_stat_info_cb_t); -- /usr/include/pulse/introspect.h:629
function pa_context_stat
(c : System.Address;
cb : pa_stat_info_cb_t;
userdata : System.Address)
return System.Address; -- /usr/include/pulse/introspect.h:632
pragma Import (C, pa_context_stat, "pa_context_stat");
type pa_sample_info is record
index : aliased Libc.Stdint
.uint32_t; -- /usr/include/pulse/introspect.h:642
name : Interfaces.C.Strings
.chars_ptr; -- /usr/include/pulse/introspect.h:643
volume : aliased Pulse.Volume
.pa_cvolume; -- /usr/include/pulse/introspect.h:644
sample_spec : aliased Pulse.Sample
.pa_sample_spec; -- /usr/include/pulse/introspect.h:645
channel_map : aliased Pulse.Channelmap
.pa_channel_map; -- /usr/include/pulse/introspect.h:646
duration : aliased Pulse.Sample
.pa_usec_t; -- /usr/include/pulse/introspect.h:647
bytes : aliased Libc.Stdint
.uint32_t; -- /usr/include/pulse/introspect.h:648
lazy : aliased int; -- /usr/include/pulse/introspect.h:649
filename : Interfaces.C.Strings
.chars_ptr; -- /usr/include/pulse/introspect.h:650
proplist : System.Address; -- /usr/include/pulse/introspect.h:651
end record;
pragma Convention
(C_Pass_By_Copy,
pa_sample_info); -- /usr/include/pulse/introspect.h:641
type pa_sample_info_cb_t is access procedure
(arg1 : System.Address;
arg2 : System.Address;
arg3 : int;
arg4 : System.Address);
pragma Convention
(C,
pa_sample_info_cb_t); -- /usr/include/pulse/introspect.h:655
function pa_context_get_sample_info_by_name
(c : System.Address;
name : Interfaces.C.Strings.chars_ptr;
cb : pa_sample_info_cb_t;
userdata : System.Address)
return System.Address; -- /usr/include/pulse/introspect.h:658
pragma Import
(C,
pa_context_get_sample_info_by_name,
"pa_context_get_sample_info_by_name");
function pa_context_get_sample_info_by_index
(c : System.Address;
idx : Libc.Stdint.uint32_t;
cb : pa_sample_info_cb_t;
userdata : System.Address)
return System.Address; -- /usr/include/pulse/introspect.h:661
pragma Import
(C,
pa_context_get_sample_info_by_index,
"pa_context_get_sample_info_by_index");
function pa_context_get_sample_info_list
(c : System.Address;
cb : pa_sample_info_cb_t;
userdata : System.Address)
return System.Address; -- /usr/include/pulse/introspect.h:664
pragma Import
(C,
pa_context_get_sample_info_list,
"pa_context_get_sample_info_list");
type pa_autoload_type is (PA_AUTOLOAD_SINK, PA_AUTOLOAD_SOURCE);
pragma Convention
(C,
pa_autoload_type); -- /usr/include/pulse/introspect.h:673
subtype pa_autoload_type_t is pa_autoload_type;
type pa_autoload_info is record
index : aliased Libc.Stdint
.uint32_t; -- /usr/include/pulse/introspect.h:682
name : Interfaces.C.Strings
.chars_ptr; -- /usr/include/pulse/introspect.h:683
c_type : aliased pa_autoload_type_t; -- /usr/include/pulse/introspect.h:684
module : Interfaces.C.Strings
.chars_ptr; -- /usr/include/pulse/introspect.h:685
argument : Interfaces.C.Strings
.chars_ptr; -- /usr/include/pulse/introspect.h:686
end record;
pragma Convention
(C_Pass_By_Copy,
pa_autoload_info); -- /usr/include/pulse/introspect.h:681
type pa_autoload_info_cb_t is access procedure
(arg1 : System.Address;
arg2 : System.Address;
arg3 : int;
arg4 : System.Address);
pragma Convention
(C,
pa_autoload_info_cb_t); -- /usr/include/pulse/introspect.h:690
function pa_context_get_autoload_info_by_name
(c : System.Address;
name : Interfaces.C.Strings.chars_ptr;
c_type : pa_autoload_type_t;
cb : pa_autoload_info_cb_t;
userdata : System.Address)
return System.Address; -- /usr/include/pulse/introspect.h:693
pragma Import
(C,
pa_context_get_autoload_info_by_name,
"pa_context_get_autoload_info_by_name");
function pa_context_get_autoload_info_by_index
(c : System.Address;
idx : Libc.Stdint.uint32_t;
cb : pa_autoload_info_cb_t;
userdata : System.Address)
return System.Address; -- /usr/include/pulse/introspect.h:696
pragma Import
(C,
pa_context_get_autoload_info_by_index,
"pa_context_get_autoload_info_by_index");
function pa_context_get_autoload_info_list
(c : System.Address;
cb : pa_autoload_info_cb_t;
userdata : System.Address)
return System.Address; -- /usr/include/pulse/introspect.h:699
pragma Import
(C,
pa_context_get_autoload_info_list,
"pa_context_get_autoload_info_list");
function pa_context_add_autoload
(c : System.Address;
name : Interfaces.C.Strings.chars_ptr;
c_type : pa_autoload_type_t;
module : Interfaces.C.Strings.chars_ptr;
argument : Interfaces.C.Strings.chars_ptr;
arg6 : pa_context_index_cb_t;
userdata : System.Address)
return System.Address; -- /usr/include/pulse/introspect.h:702
pragma Import (C, pa_context_add_autoload, "pa_context_add_autoload");
function pa_context_remove_autoload_by_name
(c : System.Address;
name : Interfaces.C.Strings.chars_ptr;
c_type : pa_autoload_type_t;
cb : Pulse.Context.pa_context_success_cb_t;
userdata : System.Address)
return System.Address; -- /usr/include/pulse/introspect.h:705
pragma Import
(C,
pa_context_remove_autoload_by_name,
"pa_context_remove_autoload_by_name");
function pa_context_remove_autoload_by_index
(c : System.Address;
idx : Libc.Stdint.uint32_t;
cb : Pulse.Context.pa_context_success_cb_t;
userdata : System.Address)
return System.Address; -- /usr/include/pulse/introspect.h:708
pragma Import
(C,
pa_context_remove_autoload_by_index,
"pa_context_remove_autoload_by_index");
end Pulse.Introspect;
|
package body Padding with SPARK_Mode is
function Left_Pad (S : String; Pad_Char : Character; Len : Natural)
return String
-- (Len - S'Length) is the number of required padding chars. We create a
-- string of that length with only Pad_Chars, and then concatenate this
-- with S.
is ((1 .. Len - S'Length => Pad_Char) & S);
end Padding;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.