CombinedText
stringlengths 4
3.42M
|
|---|
pragma Style_Checks (Off);
-- This spec has been automatically generated from STM32G474xx.svd
pragma Restrictions (No_Elaboration_Code);
with HAL;
with System;
package STM32_SVD.GPIO is
pragma Preelaborate;
---------------
-- Registers --
---------------
-- MODER array element
subtype MODER_Element is HAL.UInt2;
-- MODER array
type MODER_Field_Array is array (0 .. 15) of MODER_Element
with Component_Size => 2, Size => 32;
-- GPIO port mode register
type MODER_Register
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- MODER as a value
Val : HAL.UInt32;
when True =>
-- MODER as an array
Arr : MODER_Field_Array;
end case;
end record
with Unchecked_Union, Size => 32, Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for MODER_Register use record
Val at 0 range 0 .. 31;
Arr at 0 range 0 .. 31;
end record;
-- OTYPER_OT array
type OTYPER_OT_Field_Array is array (0 .. 15) of Boolean
with Component_Size => 1, Size => 16;
-- Type definition for OTYPER_OT
type OTYPER_OT_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- OT as a value
Val : HAL.UInt16;
when True =>
-- OT as an array
Arr : OTYPER_OT_Field_Array;
end case;
end record
with Unchecked_Union, Size => 16;
for OTYPER_OT_Field use record
Val at 0 range 0 .. 15;
Arr at 0 range 0 .. 15;
end record;
-- GPIO port output type register
type OTYPER_Register is record
-- Port x configuration bits (y = 0..15)
OT : OTYPER_OT_Field := (As_Array => False, Val => 16#0#);
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for OTYPER_Register use record
OT at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
-- OSPEEDR array element
subtype OSPEEDR_Element is HAL.UInt2;
-- OSPEEDR array
type OSPEEDR_Field_Array is array (0 .. 15) of OSPEEDR_Element
with Component_Size => 2, Size => 32;
-- GPIO port output speed register
type OSPEEDR_Register
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- OSPEEDR as a value
Val : HAL.UInt32;
when True =>
-- OSPEEDR as an array
Arr : OSPEEDR_Field_Array;
end case;
end record
with Unchecked_Union, Size => 32, Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for OSPEEDR_Register use record
Val at 0 range 0 .. 31;
Arr at 0 range 0 .. 31;
end record;
-- PUPDR array element
subtype PUPDR_Element is HAL.UInt2;
-- PUPDR array
type PUPDR_Field_Array is array (0 .. 15) of PUPDR_Element
with Component_Size => 2, Size => 32;
-- GPIO port pull-up/pull-down register
type PUPDR_Register
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- PUPDR as a value
Val : HAL.UInt32;
when True =>
-- PUPDR as an array
Arr : PUPDR_Field_Array;
end case;
end record
with Unchecked_Union, Size => 32, Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for PUPDR_Register use record
Val at 0 range 0 .. 31;
Arr at 0 range 0 .. 31;
end record;
-- IDR array
type IDR_Field_Array is array (0 .. 15) of Boolean
with Component_Size => 1, Size => 16;
-- Type definition for IDR
type IDR_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- IDR as a value
Val : HAL.UInt16;
when True =>
-- IDR as an array
Arr : IDR_Field_Array;
end case;
end record
with Unchecked_Union, Size => 16;
for IDR_Field use record
Val at 0 range 0 .. 15;
Arr at 0 range 0 .. 15;
end record;
-- GPIO port input data register
type IDR_Register is record
-- Read-only. Port input data (y = 0..15)
IDR : IDR_Field;
-- unspecified
Reserved_16_31 : HAL.UInt16;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for IDR_Register use record
IDR at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
-- ODR array
type ODR_Field_Array is array (0 .. 15) of Boolean
with Component_Size => 1, Size => 16;
-- Type definition for ODR
type ODR_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- ODR as a value
Val : HAL.UInt16;
when True =>
-- ODR as an array
Arr : ODR_Field_Array;
end case;
end record
with Unchecked_Union, Size => 16;
for ODR_Field use record
Val at 0 range 0 .. 15;
Arr at 0 range 0 .. 15;
end record;
-- GPIO port output data register
type ODR_Register is record
-- Port output data (y = 0..15)
ODR : ODR_Field := (As_Array => False, Val => 16#0#);
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for ODR_Register use record
ODR at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
-- BSRR_BS array
type BSRR_BS_Field_Array is array (0 .. 15) of Boolean
with Component_Size => 1, Size => 16;
-- Type definition for BSRR_BS
type BSRR_BS_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- BS as a value
Val : HAL.UInt16;
when True =>
-- BS as an array
Arr : BSRR_BS_Field_Array;
end case;
end record
with Unchecked_Union, Size => 16;
for BSRR_BS_Field use record
Val at 0 range 0 .. 15;
Arr at 0 range 0 .. 15;
end record;
-- BSRR_BR array
type BSRR_BR_Field_Array is array (0 .. 15) of Boolean
with Component_Size => 1, Size => 16;
-- Type definition for BSRR_BR
type BSRR_BR_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- BR as a value
Val : HAL.UInt16;
when True =>
-- BR as an array
Arr : BSRR_BR_Field_Array;
end case;
end record
with Unchecked_Union, Size => 16;
for BSRR_BR_Field use record
Val at 0 range 0 .. 15;
Arr at 0 range 0 .. 15;
end record;
-- GPIO port bit set/reset register
type BSRR_Register is record
-- Write-only. Port x set bit y (y= 0..15)
BS : BSRR_BS_Field := (As_Array => False, Val => 16#0#);
-- Write-only. Port x set bit y (y= 0..15)
BR : BSRR_BR_Field := (As_Array => False, Val => 16#0#);
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for BSRR_Register use record
BS at 0 range 0 .. 15;
BR at 0 range 16 .. 31;
end record;
-- LCKR_LCK array
type LCKR_LCK_Field_Array is array (0 .. 15) of Boolean
with Component_Size => 1, Size => 16;
-- Type definition for LCKR_LCK
type LCKR_LCK_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- LCK as a value
Val : HAL.UInt16;
when True =>
-- LCK as an array
Arr : LCKR_LCK_Field_Array;
end case;
end record
with Unchecked_Union, Size => 16;
for LCKR_LCK_Field use record
Val at 0 range 0 .. 15;
Arr at 0 range 0 .. 15;
end record;
-- GPIO port configuration lock register
type LCKR_Register is record
-- Port x lock bit y (y= 0..15)
LCK : LCKR_LCK_Field := (As_Array => False, Val => 16#0#);
-- Port x lock bit y (y= 0..15)
LCKK : Boolean := False;
-- unspecified
Reserved_17_31 : HAL.UInt15 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for LCKR_Register use record
LCK at 0 range 0 .. 15;
LCKK at 0 range 16 .. 16;
Reserved_17_31 at 0 range 17 .. 31;
end record;
-- AFRL array element
subtype AFRL_Element is HAL.UInt4;
-- AFRL array
type AFRL_Field_Array is array (0 .. 7) of AFRL_Element
with Component_Size => 4, Size => 32;
-- GPIO alternate function low register
type AFRL_Register
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- AFRL as a value
Val : HAL.UInt32;
when True =>
-- AFRL as an array
Arr : AFRL_Field_Array;
end case;
end record
with Unchecked_Union, Size => 32, Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for AFRL_Register use record
Val at 0 range 0 .. 31;
Arr at 0 range 0 .. 31;
end record;
-- AFRH array element
subtype AFRH_Element is HAL.UInt4;
-- AFRH array
type AFRH_Field_Array is array (8 .. 15) of AFRH_Element
with Component_Size => 4, Size => 32;
-- GPIO alternate function high register
type AFRH_Register
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- AFRH as a value
Val : HAL.UInt32;
when True =>
-- AFRH as an array
Arr : AFRH_Field_Array;
end case;
end record
with Unchecked_Union, Size => 32, Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for AFRH_Register use record
Val at 0 range 0 .. 31;
Arr at 0 range 0 .. 31;
end record;
-- BRR_BR array
type BRR_BR_Field_Array is array (0 .. 15) of Boolean
with Component_Size => 1, Size => 16;
-- Type definition for BRR_BR
type BRR_BR_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- BR as a value
Val : HAL.UInt16;
when True =>
-- BR as an array
Arr : BRR_BR_Field_Array;
end case;
end record
with Unchecked_Union, Size => 16;
for BRR_BR_Field use record
Val at 0 range 0 .. 15;
Arr at 0 range 0 .. 15;
end record;
-- GPIO port bit reset register
type BRR_Register is record
-- Write-only. Port Reset bit
BR : BRR_BR_Field := (As_Array => False, Val => 16#0#);
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for BRR_Register use record
BR at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
-----------------
-- Peripherals --
-----------------
-- General-purpose I/Os
type GPIO_Peripheral is record
-- GPIO port mode register
MODER : aliased MODER_Register;
-- GPIO port output type register
OTYPER : aliased OTYPER_Register;
-- GPIO port output speed register
OSPEEDR : aliased OSPEEDR_Register;
-- GPIO port pull-up/pull-down register
PUPDR : aliased PUPDR_Register;
-- GPIO port input data register
IDR : aliased IDR_Register;
-- GPIO port output data register
ODR : aliased ODR_Register;
-- GPIO port bit set/reset register
BSRR : aliased BSRR_Register;
-- GPIO port configuration lock register
LCKR : aliased LCKR_Register;
-- GPIO alternate function low register
AFRL : aliased AFRL_Register;
-- GPIO alternate function high register
AFRH : aliased AFRH_Register;
-- GPIO port bit reset register
BRR : aliased BRR_Register;
end record
with Volatile;
for GPIO_Peripheral use record
MODER at 16#0# range 0 .. 31;
OTYPER at 16#4# range 0 .. 31;
OSPEEDR at 16#8# range 0 .. 31;
PUPDR at 16#C# range 0 .. 31;
IDR at 16#10# range 0 .. 31;
ODR at 16#14# range 0 .. 31;
BSRR at 16#18# range 0 .. 31;
LCKR at 16#1C# range 0 .. 31;
AFRL at 16#20# range 0 .. 31;
AFRH at 16#24# range 0 .. 31;
BRR at 16#28# range 0 .. 31;
end record;
-- General-purpose I/Os
GPIOA_Periph : aliased GPIO_Peripheral
with Import, Address => GPIOA_Base;
-- General-purpose I/Os
GPIOB_Periph : aliased GPIO_Peripheral
with Import, Address => GPIOB_Base;
-- General-purpose I/Os
GPIOC_Periph : aliased GPIO_Peripheral
with Import, Address => GPIOC_Base;
-- General-purpose I/Os
GPIOD_Periph : aliased GPIO_Peripheral
with Import, Address => GPIOD_Base;
-- General-purpose I/Os
GPIOE_Periph : aliased GPIO_Peripheral
with Import, Address => GPIOE_Base;
-- General-purpose I/Os
GPIOF_Periph : aliased GPIO_Peripheral
with Import, Address => GPIOF_Base;
-- General-purpose I/Os
GPIOG_Periph : aliased GPIO_Peripheral
with Import, Address => GPIOG_Base;
end STM32_SVD.GPIO;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUNTIME COMPONENTS --
-- --
-- S Y S T E M . E X P _ G E N --
-- --
-- S p e c --
-- --
-- $Revision$
-- --
-- Copyright (C) 1992,1993,1994,1995 Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 2, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING. If not, write --
-- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
-- MA 02111-1307, USA. --
-- --
-- As a special exception, if other files instantiate generics from this --
-- unit, or you link this unit with other files to produce an executable, --
-- this unit does not by itself cause the resulting executable to be --
-- covered by the GNU General Public License. This exception does not --
-- however invalidate any other reasons why the executable file might be --
-- covered by the GNU Public License. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- This package contains the generic functions which are instantiated with
-- predefined integer and real types to generate the runtime exponentiation
-- functions called by expanded code generated by Expand_Op_Expon. This
-- version of the package contains routines that are compiled with overflow
-- checks enabled, so they are called for exponentiation operations which
-- require overflow checking
package System.Exp_Gen is
pragma Pure (System.Exp_Gen);
-- Exponentiation for float types (checks on)
generic
type Type_Of_Base is digits <>;
function Exp_Float_Type
(Left : Type_Of_Base;
Right : Integer)
return Type_Of_Base;
-- Exponentiation for signed integer types (checks on)
generic
type Type_Of_Base is range <>;
function Exp_Integer_Type
(Left : Type_Of_Base;
Right : Natural)
return Type_Of_Base;
end System.Exp_Gen;
|
package CLIC
with Preelaborate
is
end CLIC;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- S Y S T E M --
-- --
-- S p e c --
-- (PikeOS 5 ARM Version) --
-- --
-- Copyright (C) 1992-2020, Free Software Foundation, Inc. --
-- --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow --
-- apply solely to the contents of the part following the private keyword. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- This is a Ravenscar version of this package for ARM PikeOS 5 targets
pragma Restrictions (No_Exception_Registration);
-- Disable exception name registration. This capability is not used because
-- it is only required by exception stream attributes which are not supported
-- in this run time.
pragma Profile (Jorvik);
-- This is a Ravenscar run time
package System is
pragma Pure;
-- Note that we take advantage of the implementation permission to make
-- this unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada
-- 2005, this is Pure in any case (AI-362).
pragma No_Elaboration_Code_All;
-- Allow the use of that restriction in units that WITH this unit
type Name is (SYSTEM_NAME_GNAT);
System_Name : constant Name := SYSTEM_NAME_GNAT;
-- System-Dependent Named Numbers
Min_Int : constant := -2 ** (Standard'Max_Integer_Size - 1);
Max_Int : constant := 2 ** (Standard'Max_Integer_Size - 1) - 1;
Max_Binary_Modulus : constant := 2 ** Standard'Max_Integer_Size;
Max_Nonbinary_Modulus : constant := 2 ** Integer'Size - 1;
Max_Base_Digits : constant := Long_Long_Float'Digits;
Max_Digits : constant := Long_Long_Float'Digits;
Max_Mantissa : constant := Standard'Max_Integer_Size - 1;
Fine_Delta : constant := 2.0 ** (-Max_Mantissa);
Tick : constant := 0.000_000_001; -- 1 ns
-- Storage-related Declarations
type Address is private;
pragma Preelaborable_Initialization (Address);
Null_Address : constant Address;
Storage_Unit : constant := 8;
Word_Size : constant := 32;
Memory_Size : constant := 2 ** 32;
-- Address comparison
function "<" (Left, Right : Address) return Boolean;
function "<=" (Left, Right : Address) return Boolean;
function ">" (Left, Right : Address) return Boolean;
function ">=" (Left, Right : Address) return Boolean;
function "=" (Left, Right : Address) return Boolean;
pragma Import (Intrinsic, "<");
pragma Import (Intrinsic, "<=");
pragma Import (Intrinsic, ">");
pragma Import (Intrinsic, ">=");
pragma Import (Intrinsic, "=");
-- Other System-Dependent Declarations
type Bit_Order is (High_Order_First, Low_Order_First);
Default_Bit_Order : constant Bit_Order := Low_Order_First;
pragma Warnings (Off, Default_Bit_Order); -- kill constant condition warning
-- Priority-related Declarations (RM D.1)
-- For simplicity there is a 1-1 correspondence between Ada and PikeOS
-- priorities. PikeOS priority 0 is reserved by the idle thread, so not
-- available to Ada.
-- PikeOS priorities are 0 .. 255
-- Priorities greather than 245 are reserved to the system software (PSSW)
-- This implementation reserves priorities 224-239 to interrupts
-- Priorities 240-245 are reserved to HM and PikeOS exception handlers
Max_Priority : constant Positive := 223;
Max_Interrupt_Priority : constant Positive := 239;
subtype Any_Priority is Integer range 1 .. Max_Interrupt_Priority;
subtype Priority is Any_Priority
range Any_Priority'First .. Max_Priority;
subtype Interrupt_Priority is Any_Priority
range Priority'Last + 1 .. Any_Priority'Last;
Default_Priority : constant Priority :=
(Priority'First + Priority'Last) / 2;
private
type Address is mod Memory_Size;
Null_Address : constant Address := 0;
--------------------------------------
-- System Implementation Parameters --
--------------------------------------
-- These parameters provide information about the target that is used
-- by the compiler. They are in the private part of System, where they
-- can be accessed using the special circuitry in the Targparm unit
-- whose source should be consulted for more detailed descriptions
-- of the individual switch values.
Atomic_Sync_Default : constant Boolean := False;
Backend_Divide_Checks : constant Boolean := False;
Backend_Overflow_Checks : constant Boolean := True;
Command_Line_Args : constant Boolean := False;
Configurable_Run_Time : constant Boolean := True;
Denorm : constant Boolean := True;
Duration_32_Bits : constant Boolean := False;
Exit_Status_Supported : constant Boolean := True;
Fractional_Fixed_Ops : constant Boolean := False;
Frontend_Layout : constant Boolean := False;
Machine_Overflows : constant Boolean := False;
Machine_Rounds : constant Boolean := True;
Preallocated_Stacks : constant Boolean := True;
Signed_Zeros : constant Boolean := True;
Stack_Check_Default : constant Boolean := False;
Stack_Check_Probes : constant Boolean := True;
Stack_Check_Limits : constant Boolean := False;
Support_Aggregates : constant Boolean := True;
Support_Composite_Assign : constant Boolean := True;
Support_Composite_Compare : constant Boolean := True;
Support_Long_Shifts : constant Boolean := True;
Always_Compatible_Rep : constant Boolean := True;
Suppress_Standard_Library : constant Boolean := False;
Use_Ada_Main_Program_Name : constant Boolean := False;
Frontend_Exceptions : constant Boolean := False;
ZCX_By_Default : constant Boolean := True;
-- The linker switches ordering comes from a project
-- generated with Codeo or pikeos-cloneproject.
pragma Linker_Options
("-u_p4_entry" & ASCII.NUL &
"-nostdlib" & ASCII.NUL &
"-T../ld/arm-pikeos5.ld" & ASCII.NUL &
"-lp4ext" & ASCII.NUL &
"-lgnat" & ASCII.NUL &
"-lvm" & ASCII.NUL &
"-lstand" & ASCII.NUL &
"-lp4" & ASCII.NUL &
"-lgcc");
end System;
|
-- Copyright (c) 2010 - 2018, Nordic Semiconductor ASA
--
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without modification,
-- are permitted provided that the following conditions are met:
--
-- 1. Redistributions of source code must retain the above copyright notice, this
-- list of conditions and the following disclaimer.
--
-- 2. Redistributions in binary form, except as embedded into a Nordic
-- Semiconductor ASA integrated circuit in a product or a software update for
-- such product, must reproduce the above copyright notice, this list of
-- conditions and the following disclaimer in the documentation and/or other
-- materials provided with the distribution.
--
-- 3. Neither the name of Nordic Semiconductor ASA nor the names of its
-- contributors may be used to endorse or promote products derived from this
-- software without specific prior written permission.
--
-- 4. This software, with or without modification, must only be used with a
-- Nordic Semiconductor ASA integrated circuit.
--
-- 5. Any software provided in binary form under this license must not be reverse
-- engineered, decompiled, modified and/or disassembled.
--
-- THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS
-- OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-- OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE
-- DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE
-- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
-- GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-- HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-- OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--
-- This spec has been automatically generated from nrf52.svd
pragma Restrictions (No_Elaboration_Code);
pragma Ada_2012;
pragma Style_Checks (Off);
with HAL;
with System;
package NRF_SVD.TWIS is
pragma Preelaborate;
---------------
-- Registers --
---------------
-- Shortcut between WRITE event and SUSPEND task
type SHORTS_WRITE_SUSPEND_Field is
(-- Disable shortcut
Disabled,
-- Enable shortcut
Enabled)
with Size => 1;
for SHORTS_WRITE_SUSPEND_Field use
(Disabled => 0,
Enabled => 1);
-- Shortcut between READ event and SUSPEND task
type SHORTS_READ_SUSPEND_Field is
(-- Disable shortcut
Disabled,
-- Enable shortcut
Enabled)
with Size => 1;
for SHORTS_READ_SUSPEND_Field use
(Disabled => 0,
Enabled => 1);
-- Shortcut register
type SHORTS_Register is record
-- unspecified
Reserved_0_12 : HAL.UInt13 := 16#0#;
-- Shortcut between WRITE event and SUSPEND task
WRITE_SUSPEND : SHORTS_WRITE_SUSPEND_Field := NRF_SVD.TWIS.Disabled;
-- Shortcut between READ event and SUSPEND task
READ_SUSPEND : SHORTS_READ_SUSPEND_Field := NRF_SVD.TWIS.Disabled;
-- unspecified
Reserved_15_31 : HAL.UInt17 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for SHORTS_Register use record
Reserved_0_12 at 0 range 0 .. 12;
WRITE_SUSPEND at 0 range 13 .. 13;
READ_SUSPEND at 0 range 14 .. 14;
Reserved_15_31 at 0 range 15 .. 31;
end record;
-- Enable or disable interrupt for STOPPED event
type INTEN_STOPPED_Field is
(-- Disable
Disabled,
-- Enable
Enabled)
with Size => 1;
for INTEN_STOPPED_Field use
(Disabled => 0,
Enabled => 1);
-- Enable or disable interrupt for ERROR event
type INTEN_ERROR_Field is
(-- Disable
Disabled,
-- Enable
Enabled)
with Size => 1;
for INTEN_ERROR_Field use
(Disabled => 0,
Enabled => 1);
-- Enable or disable interrupt for RXSTARTED event
type INTEN_RXSTARTED_Field is
(-- Disable
Disabled,
-- Enable
Enabled)
with Size => 1;
for INTEN_RXSTARTED_Field use
(Disabled => 0,
Enabled => 1);
-- Enable or disable interrupt for TXSTARTED event
type INTEN_TXSTARTED_Field is
(-- Disable
Disabled,
-- Enable
Enabled)
with Size => 1;
for INTEN_TXSTARTED_Field use
(Disabled => 0,
Enabled => 1);
-- Enable or disable interrupt for WRITE event
type INTEN_WRITE_Field is
(-- Disable
Disabled,
-- Enable
Enabled)
with Size => 1;
for INTEN_WRITE_Field use
(Disabled => 0,
Enabled => 1);
-- Enable or disable interrupt for READ event
type INTEN_READ_Field is
(-- Disable
Disabled,
-- Enable
Enabled)
with Size => 1;
for INTEN_READ_Field use
(Disabled => 0,
Enabled => 1);
-- Enable or disable interrupt
type INTEN_Register is record
-- unspecified
Reserved_0_0 : HAL.Bit := 16#0#;
-- Enable or disable interrupt for STOPPED event
STOPPED : INTEN_STOPPED_Field := NRF_SVD.TWIS.Disabled;
-- unspecified
Reserved_2_8 : HAL.UInt7 := 16#0#;
-- Enable or disable interrupt for ERROR event
ERROR : INTEN_ERROR_Field := NRF_SVD.TWIS.Disabled;
-- unspecified
Reserved_10_18 : HAL.UInt9 := 16#0#;
-- Enable or disable interrupt for RXSTARTED event
RXSTARTED : INTEN_RXSTARTED_Field := NRF_SVD.TWIS.Disabled;
-- Enable or disable interrupt for TXSTARTED event
TXSTARTED : INTEN_TXSTARTED_Field := NRF_SVD.TWIS.Disabled;
-- unspecified
Reserved_21_24 : HAL.UInt4 := 16#0#;
-- Enable or disable interrupt for WRITE event
WRITE : INTEN_WRITE_Field := NRF_SVD.TWIS.Disabled;
-- Enable or disable interrupt for READ event
READ : INTEN_READ_Field := NRF_SVD.TWIS.Disabled;
-- unspecified
Reserved_27_31 : HAL.UInt5 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for INTEN_Register use record
Reserved_0_0 at 0 range 0 .. 0;
STOPPED at 0 range 1 .. 1;
Reserved_2_8 at 0 range 2 .. 8;
ERROR at 0 range 9 .. 9;
Reserved_10_18 at 0 range 10 .. 18;
RXSTARTED at 0 range 19 .. 19;
TXSTARTED at 0 range 20 .. 20;
Reserved_21_24 at 0 range 21 .. 24;
WRITE at 0 range 25 .. 25;
READ at 0 range 26 .. 26;
Reserved_27_31 at 0 range 27 .. 31;
end record;
-- Write '1' to Enable interrupt for STOPPED event
type INTENSET_STOPPED_Field is
(-- Read: Disabled
Disabled,
-- Read: Enabled
Enabled)
with Size => 1;
for INTENSET_STOPPED_Field use
(Disabled => 0,
Enabled => 1);
-- Write '1' to Enable interrupt for STOPPED event
type INTENSET_STOPPED_Field_1 is
(-- Reset value for the field
Intenset_Stopped_Field_Reset,
-- Enable
Set)
with Size => 1;
for INTENSET_STOPPED_Field_1 use
(Intenset_Stopped_Field_Reset => 0,
Set => 1);
-- Write '1' to Enable interrupt for ERROR event
type INTENSET_ERROR_Field is
(-- Read: Disabled
Disabled,
-- Read: Enabled
Enabled)
with Size => 1;
for INTENSET_ERROR_Field use
(Disabled => 0,
Enabled => 1);
-- Write '1' to Enable interrupt for ERROR event
type INTENSET_ERROR_Field_1 is
(-- Reset value for the field
Intenset_Error_Field_Reset,
-- Enable
Set)
with Size => 1;
for INTENSET_ERROR_Field_1 use
(Intenset_Error_Field_Reset => 0,
Set => 1);
-- Write '1' to Enable interrupt for RXSTARTED event
type INTENSET_RXSTARTED_Field is
(-- Read: Disabled
Disabled,
-- Read: Enabled
Enabled)
with Size => 1;
for INTENSET_RXSTARTED_Field use
(Disabled => 0,
Enabled => 1);
-- Write '1' to Enable interrupt for RXSTARTED event
type INTENSET_RXSTARTED_Field_1 is
(-- Reset value for the field
Intenset_Rxstarted_Field_Reset,
-- Enable
Set)
with Size => 1;
for INTENSET_RXSTARTED_Field_1 use
(Intenset_Rxstarted_Field_Reset => 0,
Set => 1);
-- Write '1' to Enable interrupt for TXSTARTED event
type INTENSET_TXSTARTED_Field is
(-- Read: Disabled
Disabled,
-- Read: Enabled
Enabled)
with Size => 1;
for INTENSET_TXSTARTED_Field use
(Disabled => 0,
Enabled => 1);
-- Write '1' to Enable interrupt for TXSTARTED event
type INTENSET_TXSTARTED_Field_1 is
(-- Reset value for the field
Intenset_Txstarted_Field_Reset,
-- Enable
Set)
with Size => 1;
for INTENSET_TXSTARTED_Field_1 use
(Intenset_Txstarted_Field_Reset => 0,
Set => 1);
-- Write '1' to Enable interrupt for WRITE event
type INTENSET_WRITE_Field is
(-- Read: Disabled
Disabled,
-- Read: Enabled
Enabled)
with Size => 1;
for INTENSET_WRITE_Field use
(Disabled => 0,
Enabled => 1);
-- Write '1' to Enable interrupt for WRITE event
type INTENSET_WRITE_Field_1 is
(-- Reset value for the field
Intenset_Write_Field_Reset,
-- Enable
Set)
with Size => 1;
for INTENSET_WRITE_Field_1 use
(Intenset_Write_Field_Reset => 0,
Set => 1);
-- Write '1' to Enable interrupt for READ event
type INTENSET_READ_Field is
(-- Read: Disabled
Disabled,
-- Read: Enabled
Enabled)
with Size => 1;
for INTENSET_READ_Field use
(Disabled => 0,
Enabled => 1);
-- Write '1' to Enable interrupt for READ event
type INTENSET_READ_Field_1 is
(-- Reset value for the field
Intenset_Read_Field_Reset,
-- Enable
Set)
with Size => 1;
for INTENSET_READ_Field_1 use
(Intenset_Read_Field_Reset => 0,
Set => 1);
-- Enable interrupt
type INTENSET_Register is record
-- unspecified
Reserved_0_0 : HAL.Bit := 16#0#;
-- Write '1' to Enable interrupt for STOPPED event
STOPPED : INTENSET_STOPPED_Field_1 :=
Intenset_Stopped_Field_Reset;
-- unspecified
Reserved_2_8 : HAL.UInt7 := 16#0#;
-- Write '1' to Enable interrupt for ERROR event
ERROR : INTENSET_ERROR_Field_1 := Intenset_Error_Field_Reset;
-- unspecified
Reserved_10_18 : HAL.UInt9 := 16#0#;
-- Write '1' to Enable interrupt for RXSTARTED event
RXSTARTED : INTENSET_RXSTARTED_Field_1 :=
Intenset_Rxstarted_Field_Reset;
-- Write '1' to Enable interrupt for TXSTARTED event
TXSTARTED : INTENSET_TXSTARTED_Field_1 :=
Intenset_Txstarted_Field_Reset;
-- unspecified
Reserved_21_24 : HAL.UInt4 := 16#0#;
-- Write '1' to Enable interrupt for WRITE event
WRITE : INTENSET_WRITE_Field_1 := Intenset_Write_Field_Reset;
-- Write '1' to Enable interrupt for READ event
READ : INTENSET_READ_Field_1 := Intenset_Read_Field_Reset;
-- unspecified
Reserved_27_31 : HAL.UInt5 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for INTENSET_Register use record
Reserved_0_0 at 0 range 0 .. 0;
STOPPED at 0 range 1 .. 1;
Reserved_2_8 at 0 range 2 .. 8;
ERROR at 0 range 9 .. 9;
Reserved_10_18 at 0 range 10 .. 18;
RXSTARTED at 0 range 19 .. 19;
TXSTARTED at 0 range 20 .. 20;
Reserved_21_24 at 0 range 21 .. 24;
WRITE at 0 range 25 .. 25;
READ at 0 range 26 .. 26;
Reserved_27_31 at 0 range 27 .. 31;
end record;
-- Write '1' to Disable interrupt for STOPPED event
type INTENCLR_STOPPED_Field is
(-- Read: Disabled
Disabled,
-- Read: Enabled
Enabled)
with Size => 1;
for INTENCLR_STOPPED_Field use
(Disabled => 0,
Enabled => 1);
-- Write '1' to Disable interrupt for STOPPED event
type INTENCLR_STOPPED_Field_1 is
(-- Reset value for the field
Intenclr_Stopped_Field_Reset,
-- Disable
Clear)
with Size => 1;
for INTENCLR_STOPPED_Field_1 use
(Intenclr_Stopped_Field_Reset => 0,
Clear => 1);
-- Write '1' to Disable interrupt for ERROR event
type INTENCLR_ERROR_Field is
(-- Read: Disabled
Disabled,
-- Read: Enabled
Enabled)
with Size => 1;
for INTENCLR_ERROR_Field use
(Disabled => 0,
Enabled => 1);
-- Write '1' to Disable interrupt for ERROR event
type INTENCLR_ERROR_Field_1 is
(-- Reset value for the field
Intenclr_Error_Field_Reset,
-- Disable
Clear)
with Size => 1;
for INTENCLR_ERROR_Field_1 use
(Intenclr_Error_Field_Reset => 0,
Clear => 1);
-- Write '1' to Disable interrupt for RXSTARTED event
type INTENCLR_RXSTARTED_Field is
(-- Read: Disabled
Disabled,
-- Read: Enabled
Enabled)
with Size => 1;
for INTENCLR_RXSTARTED_Field use
(Disabled => 0,
Enabled => 1);
-- Write '1' to Disable interrupt for RXSTARTED event
type INTENCLR_RXSTARTED_Field_1 is
(-- Reset value for the field
Intenclr_Rxstarted_Field_Reset,
-- Disable
Clear)
with Size => 1;
for INTENCLR_RXSTARTED_Field_1 use
(Intenclr_Rxstarted_Field_Reset => 0,
Clear => 1);
-- Write '1' to Disable interrupt for TXSTARTED event
type INTENCLR_TXSTARTED_Field is
(-- Read: Disabled
Disabled,
-- Read: Enabled
Enabled)
with Size => 1;
for INTENCLR_TXSTARTED_Field use
(Disabled => 0,
Enabled => 1);
-- Write '1' to Disable interrupt for TXSTARTED event
type INTENCLR_TXSTARTED_Field_1 is
(-- Reset value for the field
Intenclr_Txstarted_Field_Reset,
-- Disable
Clear)
with Size => 1;
for INTENCLR_TXSTARTED_Field_1 use
(Intenclr_Txstarted_Field_Reset => 0,
Clear => 1);
-- Write '1' to Disable interrupt for WRITE event
type INTENCLR_WRITE_Field is
(-- Read: Disabled
Disabled,
-- Read: Enabled
Enabled)
with Size => 1;
for INTENCLR_WRITE_Field use
(Disabled => 0,
Enabled => 1);
-- Write '1' to Disable interrupt for WRITE event
type INTENCLR_WRITE_Field_1 is
(-- Reset value for the field
Intenclr_Write_Field_Reset,
-- Disable
Clear)
with Size => 1;
for INTENCLR_WRITE_Field_1 use
(Intenclr_Write_Field_Reset => 0,
Clear => 1);
-- Write '1' to Disable interrupt for READ event
type INTENCLR_READ_Field is
(-- Read: Disabled
Disabled,
-- Read: Enabled
Enabled)
with Size => 1;
for INTENCLR_READ_Field use
(Disabled => 0,
Enabled => 1);
-- Write '1' to Disable interrupt for READ event
type INTENCLR_READ_Field_1 is
(-- Reset value for the field
Intenclr_Read_Field_Reset,
-- Disable
Clear)
with Size => 1;
for INTENCLR_READ_Field_1 use
(Intenclr_Read_Field_Reset => 0,
Clear => 1);
-- Disable interrupt
type INTENCLR_Register is record
-- unspecified
Reserved_0_0 : HAL.Bit := 16#0#;
-- Write '1' to Disable interrupt for STOPPED event
STOPPED : INTENCLR_STOPPED_Field_1 :=
Intenclr_Stopped_Field_Reset;
-- unspecified
Reserved_2_8 : HAL.UInt7 := 16#0#;
-- Write '1' to Disable interrupt for ERROR event
ERROR : INTENCLR_ERROR_Field_1 := Intenclr_Error_Field_Reset;
-- unspecified
Reserved_10_18 : HAL.UInt9 := 16#0#;
-- Write '1' to Disable interrupt for RXSTARTED event
RXSTARTED : INTENCLR_RXSTARTED_Field_1 :=
Intenclr_Rxstarted_Field_Reset;
-- Write '1' to Disable interrupt for TXSTARTED event
TXSTARTED : INTENCLR_TXSTARTED_Field_1 :=
Intenclr_Txstarted_Field_Reset;
-- unspecified
Reserved_21_24 : HAL.UInt4 := 16#0#;
-- Write '1' to Disable interrupt for WRITE event
WRITE : INTENCLR_WRITE_Field_1 := Intenclr_Write_Field_Reset;
-- Write '1' to Disable interrupt for READ event
READ : INTENCLR_READ_Field_1 := Intenclr_Read_Field_Reset;
-- unspecified
Reserved_27_31 : HAL.UInt5 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for INTENCLR_Register use record
Reserved_0_0 at 0 range 0 .. 0;
STOPPED at 0 range 1 .. 1;
Reserved_2_8 at 0 range 2 .. 8;
ERROR at 0 range 9 .. 9;
Reserved_10_18 at 0 range 10 .. 18;
RXSTARTED at 0 range 19 .. 19;
TXSTARTED at 0 range 20 .. 20;
Reserved_21_24 at 0 range 21 .. 24;
WRITE at 0 range 25 .. 25;
READ at 0 range 26 .. 26;
Reserved_27_31 at 0 range 27 .. 31;
end record;
-- RX buffer overflow detected, and prevented
type ERRORSRC_OVERFLOW_Field is
(-- Error did not occur
Notdetected,
-- Error occurred
Detected)
with Size => 1;
for ERRORSRC_OVERFLOW_Field use
(Notdetected => 0,
Detected => 1);
-- NACK sent after receiving a data byte
type ERRORSRC_DNACK_Field is
(-- Error did not occur
Notreceived,
-- Error occurred
Received)
with Size => 1;
for ERRORSRC_DNACK_Field use
(Notreceived => 0,
Received => 1);
-- TX buffer over-read detected, and prevented
type ERRORSRC_OVERREAD_Field is
(-- Error did not occur
Notdetected,
-- Error occurred
Detected)
with Size => 1;
for ERRORSRC_OVERREAD_Field use
(Notdetected => 0,
Detected => 1);
-- Error source
type ERRORSRC_Register is record
-- RX buffer overflow detected, and prevented
OVERFLOW : ERRORSRC_OVERFLOW_Field := NRF_SVD.TWIS.Notdetected;
-- unspecified
Reserved_1_1 : HAL.Bit := 16#0#;
-- NACK sent after receiving a data byte
DNACK : ERRORSRC_DNACK_Field := NRF_SVD.TWIS.Notreceived;
-- TX buffer over-read detected, and prevented
OVERREAD : ERRORSRC_OVERREAD_Field := NRF_SVD.TWIS.Notdetected;
-- unspecified
Reserved_4_31 : HAL.UInt28 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for ERRORSRC_Register use record
OVERFLOW at 0 range 0 .. 0;
Reserved_1_1 at 0 range 1 .. 1;
DNACK at 0 range 2 .. 2;
OVERREAD at 0 range 3 .. 3;
Reserved_4_31 at 0 range 4 .. 31;
end record;
-- Status register indicating which address had a match
type MATCH_Register is record
-- Read-only. Which of the addresses in {ADDRESS} matched the incoming
-- address
MATCH : Boolean;
-- unspecified
Reserved_1_31 : HAL.UInt31;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for MATCH_Register use record
MATCH at 0 range 0 .. 0;
Reserved_1_31 at 0 range 1 .. 31;
end record;
-- Enable or disable TWIS
type ENABLE_ENABLE_Field is
(-- Disable TWIS
Disabled,
-- Enable TWIS
Enabled)
with Size => 4;
for ENABLE_ENABLE_Field use
(Disabled => 0,
Enabled => 9);
-- Enable TWIS
type ENABLE_Register is record
-- Enable or disable TWIS
ENABLE : ENABLE_ENABLE_Field := NRF_SVD.TWIS.Disabled;
-- unspecified
Reserved_4_31 : HAL.UInt28 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for ENABLE_Register use record
ENABLE at 0 range 0 .. 3;
Reserved_4_31 at 0 range 4 .. 31;
end record;
-----------------------------------
-- TWIS_PSEL cluster's Registers --
-----------------------------------
subtype SCL_PSEL_PIN_Field is HAL.UInt5;
-- Connection
type SCL_CONNECT_Field is
(-- Connect
Connected,
-- Disconnect
Disconnected)
with Size => 1;
for SCL_CONNECT_Field use
(Connected => 0,
Disconnected => 1);
-- Pin select for SCL signal
type SCL_PSEL_Register is record
-- Pin number
PIN : SCL_PSEL_PIN_Field := 16#1F#;
-- unspecified
Reserved_5_30 : HAL.UInt26 := 16#3FFFFFF#;
-- Connection
CONNECT : SCL_CONNECT_Field := NRF_SVD.TWIS.Disconnected;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for SCL_PSEL_Register use record
PIN at 0 range 0 .. 4;
Reserved_5_30 at 0 range 5 .. 30;
CONNECT at 0 range 31 .. 31;
end record;
subtype SDA_PSEL_PIN_Field is HAL.UInt5;
-- Connection
type SDA_CONNECT_Field is
(-- Connect
Connected,
-- Disconnect
Disconnected)
with Size => 1;
for SDA_CONNECT_Field use
(Connected => 0,
Disconnected => 1);
-- Pin select for SDA signal
type SDA_PSEL_Register is record
-- Pin number
PIN : SDA_PSEL_PIN_Field := 16#1F#;
-- unspecified
Reserved_5_30 : HAL.UInt26 := 16#3FFFFFF#;
-- Connection
CONNECT : SDA_CONNECT_Field := NRF_SVD.TWIS.Disconnected;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for SDA_PSEL_Register use record
PIN at 0 range 0 .. 4;
Reserved_5_30 at 0 range 5 .. 30;
CONNECT at 0 range 31 .. 31;
end record;
-- Unspecified
type TWIS_PSEL_Cluster is record
-- Pin select for SCL signal
SCL : aliased SCL_PSEL_Register;
-- Pin select for SDA signal
SDA : aliased SDA_PSEL_Register;
end record
with Size => 64;
for TWIS_PSEL_Cluster use record
SCL at 16#0# range 0 .. 31;
SDA at 16#4# range 0 .. 31;
end record;
----------------------------------
-- TWIS_RXD cluster's Registers --
----------------------------------
subtype MAXCNT_RXD_MAXCNT_Field is HAL.UInt8;
-- Maximum number of bytes in RXD buffer
type MAXCNT_RXD_Register is record
-- Maximum number of bytes in RXD buffer
MAXCNT : MAXCNT_RXD_MAXCNT_Field := 16#0#;
-- unspecified
Reserved_8_31 : HAL.UInt24 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for MAXCNT_RXD_Register use record
MAXCNT at 0 range 0 .. 7;
Reserved_8_31 at 0 range 8 .. 31;
end record;
subtype AMOUNT_RXD_AMOUNT_Field is HAL.UInt8;
-- Number of bytes transferred in the last RXD transaction
type AMOUNT_RXD_Register is record
-- Read-only. Number of bytes transferred in the last RXD transaction
AMOUNT : AMOUNT_RXD_AMOUNT_Field;
-- unspecified
Reserved_8_31 : HAL.UInt24;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for AMOUNT_RXD_Register use record
AMOUNT at 0 range 0 .. 7;
Reserved_8_31 at 0 range 8 .. 31;
end record;
-- RXD EasyDMA channel
type TWIS_RXD_Cluster is record
-- RXD Data pointer
PTR : aliased HAL.UInt32;
-- Maximum number of bytes in RXD buffer
MAXCNT : aliased MAXCNT_RXD_Register;
-- Number of bytes transferred in the last RXD transaction
AMOUNT : aliased AMOUNT_RXD_Register;
end record
with Size => 96;
for TWIS_RXD_Cluster use record
PTR at 16#0# range 0 .. 31;
MAXCNT at 16#4# range 0 .. 31;
AMOUNT at 16#8# range 0 .. 31;
end record;
----------------------------------
-- TWIS_TXD cluster's Registers --
----------------------------------
subtype MAXCNT_TXD_MAXCNT_Field is HAL.UInt8;
-- Maximum number of bytes in TXD buffer
type MAXCNT_TXD_Register is record
-- Maximum number of bytes in TXD buffer
MAXCNT : MAXCNT_TXD_MAXCNT_Field := 16#0#;
-- unspecified
Reserved_8_31 : HAL.UInt24 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for MAXCNT_TXD_Register use record
MAXCNT at 0 range 0 .. 7;
Reserved_8_31 at 0 range 8 .. 31;
end record;
subtype AMOUNT_TXD_AMOUNT_Field is HAL.UInt8;
-- Number of bytes transferred in the last TXD transaction
type AMOUNT_TXD_Register is record
-- Read-only. Number of bytes transferred in the last TXD transaction
AMOUNT : AMOUNT_TXD_AMOUNT_Field;
-- unspecified
Reserved_8_31 : HAL.UInt24;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for AMOUNT_TXD_Register use record
AMOUNT at 0 range 0 .. 7;
Reserved_8_31 at 0 range 8 .. 31;
end record;
-- TXD EasyDMA channel
type TWIS_TXD_Cluster is record
-- TXD Data pointer
PTR : aliased HAL.UInt32;
-- Maximum number of bytes in TXD buffer
MAXCNT : aliased MAXCNT_TXD_Register;
-- Number of bytes transferred in the last TXD transaction
AMOUNT : aliased AMOUNT_TXD_Register;
end record
with Size => 96;
for TWIS_TXD_Cluster use record
PTR at 16#0# range 0 .. 31;
MAXCNT at 16#4# range 0 .. 31;
AMOUNT at 16#8# range 0 .. 31;
end record;
subtype ADDRESS_ADDRESS_Field is HAL.UInt7;
-- Description collection[0]: TWI slave address 0
type ADDRESS_Register is record
-- TWI slave address
ADDRESS : ADDRESS_ADDRESS_Field := 16#0#;
-- unspecified
Reserved_7_31 : HAL.UInt25 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for ADDRESS_Register use record
ADDRESS at 0 range 0 .. 6;
Reserved_7_31 at 0 range 7 .. 31;
end record;
-- Description collection[0]: TWI slave address 0
type ADDRESS_Registers is array (0 .. 1) of ADDRESS_Register;
-- Enable or disable address matching on ADDRESS[0]
type CONFIG_ADDRESS0_Field is
(-- Disabled
Disabled,
-- Enabled
Enabled)
with Size => 1;
for CONFIG_ADDRESS0_Field use
(Disabled => 0,
Enabled => 1);
-- CONFIG_ADDRESS array
type CONFIG_ADDRESS_Field_Array is array (0 .. 1) of CONFIG_ADDRESS0_Field
with Component_Size => 1, Size => 2;
-- Type definition for CONFIG_ADDRESS
type CONFIG_ADDRESS_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- ADDRESS as a value
Val : HAL.UInt2;
when True =>
-- ADDRESS as an array
Arr : CONFIG_ADDRESS_Field_Array;
end case;
end record
with Unchecked_Union, Size => 2;
for CONFIG_ADDRESS_Field use record
Val at 0 range 0 .. 1;
Arr at 0 range 0 .. 1;
end record;
-- Configuration register for the address match mechanism
type CONFIG_Register is record
-- Enable or disable address matching on ADDRESS[0]
ADDRESS : CONFIG_ADDRESS_Field :=
(As_Array => False, Val => 16#1#);
-- unspecified
Reserved_2_31 : HAL.UInt30 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CONFIG_Register use record
ADDRESS at 0 range 0 .. 1;
Reserved_2_31 at 0 range 2 .. 31;
end record;
subtype ORC_ORC_Field is HAL.UInt8;
-- Over-read character. Character sent out in case of an over-read of the
-- transmit buffer.
type ORC_Register is record
-- Over-read character. Character sent out in case of an over-read of
-- the transmit buffer.
ORC : ORC_ORC_Field := 16#0#;
-- unspecified
Reserved_8_31 : HAL.UInt24 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for ORC_Register use record
ORC at 0 range 0 .. 7;
Reserved_8_31 at 0 range 8 .. 31;
end record;
-----------------------------------
-- TWIS_PSEL cluster's Registers --
-----------------------------------
----------------------------------
-- TWIS_RXD cluster's Registers --
----------------------------------
----------------------------------
-- TWIS_TXD cluster's Registers --
----------------------------------
-----------------
-- Peripherals --
-----------------
-- I2C compatible Two-Wire Slave Interface with EasyDMA 0
type TWIS_Peripheral is record
-- Stop TWI transaction
TASKS_STOP : aliased HAL.UInt32;
-- Suspend TWI transaction
TASKS_SUSPEND : aliased HAL.UInt32;
-- Resume TWI transaction
TASKS_RESUME : aliased HAL.UInt32;
-- Prepare the TWI slave to respond to a write command
TASKS_PREPARERX : aliased HAL.UInt32;
-- Prepare the TWI slave to respond to a read command
TASKS_PREPARETX : aliased HAL.UInt32;
-- TWI stopped
EVENTS_STOPPED : aliased HAL.UInt32;
-- TWI error
EVENTS_ERROR : aliased HAL.UInt32;
-- Receive sequence started
EVENTS_RXSTARTED : aliased HAL.UInt32;
-- Transmit sequence started
EVENTS_TXSTARTED : aliased HAL.UInt32;
-- Write command received
EVENTS_WRITE : aliased HAL.UInt32;
-- Read command received
EVENTS_READ : aliased HAL.UInt32;
-- Shortcut register
SHORTS : aliased SHORTS_Register;
-- Enable or disable interrupt
INTEN : aliased INTEN_Register;
-- Enable interrupt
INTENSET : aliased INTENSET_Register;
-- Disable interrupt
INTENCLR : aliased INTENCLR_Register;
-- Error source
ERRORSRC : aliased ERRORSRC_Register;
-- Status register indicating which address had a match
MATCH : aliased MATCH_Register;
-- Enable TWIS
ENABLE : aliased ENABLE_Register;
-- Unspecified
PSEL : aliased TWIS_PSEL_Cluster;
-- RXD EasyDMA channel
RXD : aliased TWIS_RXD_Cluster;
-- TXD EasyDMA channel
TXD : aliased TWIS_TXD_Cluster;
-- Description collection[0]: TWI slave address 0
ADDRESS : aliased ADDRESS_Registers;
-- Configuration register for the address match mechanism
CONFIG : aliased CONFIG_Register;
-- Over-read character. Character sent out in case of an over-read of
-- the transmit buffer.
ORC : aliased ORC_Register;
end record
with Volatile;
for TWIS_Peripheral use record
TASKS_STOP at 16#14# range 0 .. 31;
TASKS_SUSPEND at 16#1C# range 0 .. 31;
TASKS_RESUME at 16#20# range 0 .. 31;
TASKS_PREPARERX at 16#30# range 0 .. 31;
TASKS_PREPARETX at 16#34# range 0 .. 31;
EVENTS_STOPPED at 16#104# range 0 .. 31;
EVENTS_ERROR at 16#124# range 0 .. 31;
EVENTS_RXSTARTED at 16#14C# range 0 .. 31;
EVENTS_TXSTARTED at 16#150# range 0 .. 31;
EVENTS_WRITE at 16#164# range 0 .. 31;
EVENTS_READ at 16#168# range 0 .. 31;
SHORTS at 16#200# range 0 .. 31;
INTEN at 16#300# range 0 .. 31;
INTENSET at 16#304# range 0 .. 31;
INTENCLR at 16#308# range 0 .. 31;
ERRORSRC at 16#4D0# range 0 .. 31;
MATCH at 16#4D4# range 0 .. 31;
ENABLE at 16#500# range 0 .. 31;
PSEL at 16#508# range 0 .. 63;
RXD at 16#534# range 0 .. 95;
TXD at 16#544# range 0 .. 95;
ADDRESS at 16#588# range 0 .. 63;
CONFIG at 16#594# range 0 .. 31;
ORC at 16#5C0# range 0 .. 31;
end record;
-- I2C compatible Two-Wire Slave Interface with EasyDMA 0
TWIS0_Periph : aliased TWIS_Peripheral
with Import, Address => TWIS0_Base;
-- I2C compatible Two-Wire Slave Interface with EasyDMA 1
TWIS1_Periph : aliased TWIS_Peripheral
with Import, Address => TWIS1_Base;
end NRF_SVD.TWIS;
|
-----------------------------------------------------------------------
-- Ada Labs --
-- --
-- Copyright (C) 2008-2013, AdaCore --
-- --
-- Labs is free software; you can redistribute it and/or modify it --
-- under the terms of the GNU General Public License as published by --
-- the Free Software Foundation; either version 2 of the License, or --
-- (at your option) any later version. --
-- --
-- This program is distributed in the hope that it will be useful, --
-- but WITHOUT ANY WARRANTY; without even the implied warranty of --
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --
-- General Public License for more details. You should have received --
-- a copy of the GNU General Public License along with this program; --
-- if not, write to the Free Software Foundation, Inc., 59 Temple --
-- Place - Suite 330, Boston, MA 02111-1307, USA. --
-----------------------------------------------------------------------
with GNAT.Strings; use GNAT.Strings;
with GL_Gl_H; use GL_Gl_H;
with Interfaces.C; use Interfaces.C;
with Ada.Containers;
with Ada.Containers.Doubly_Linked_Lists;
with SDL_SDL_video_h; use SDL_SDL_video_h;
with Display.Basic; use Display.Basic;
private package Display.Kernel is
-- This kernel is managing two sets of data. The protected object
-- Data_Manager is responsible to manage a protected set of objects. It
-- contains an internal representation of the graphical context, and
-- buffers the sequence of commands that issued this representation since
-- the last flush performed by the graphical loop. The graphical loops
-- contains its own representation of the context (see Shapes in the body),
-- which is only updated once at each iteration.
type Id_Stack is array (Integer range <>) of Natural;
-- This type offers a thread-safe interface to the graphical data. Commands
-- are taken into account immediately by its internal state. However,
-- the graphical loop will only read those commands once per cycle.
type E_Pixel is record
R : GLubyte;
G : GLubyte;
B : GLubyte;
A : GLubyte;
end record;
pragma Convention (C, E_Pixel);
type Pixel_Array is array (int range <>) of E_Pixel;
pragma Convention (C, Pixel_Array);
type Pixel_Array_Access is access all Pixel_Array;
At_End : Boolean := False
with Atomic;
type OpenGL_Surface is record
Canvas : Canvas_ID;
surface : access SDL_Surface;
vidInfo : access SDL_VideoInfo;
w : Integer := 400;
h : Integer := 400;
bpp : Interfaces.C.int := 16;
flags : Interfaces.C.unsigned := SDL_OPENGL + SDL_HWSURFACE + SDL_RESIZABLE;
end record;
procedure UpdateProjection(Canvas : Canvas_ID);
procedure Swap_Buffers(S : in out OpenGL_Surface);
procedure Poll_Events(S : in out OpenGL_Surface);
procedure Reshape (S : in out OpenGL_Surface; W : Integer; H : Integer);
function Create_Window(Width:Integer; Height : Integer; Name : String) return OpenGL_Surface;
procedure Draw_Sphere (Radius:Float; Color: RGBA_T);
procedure DrawDisk (InnerRadius : Float; OuterRadius : Float; VSlices : Integer; HSlices : Integer; Color: RGBA_T);
function Is_Stopped return Boolean;
function Get_Internal_Cursor return Cursor_T;
end Display.Kernel;
|
------------------------------------------------------------------------------
-- --
-- Copyright (C) 2015-2017, AdaCore --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions are --
-- met: --
-- 1. Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- 2. Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in --
-- the documentation and/or other materials provided with the --
-- distribution. --
-- 3. Neither the name of the copyright holder nor the names of its --
-- contributors may be used to endorse or promote products derived --
-- from this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT --
-- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, --
-- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY --
-- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT --
-- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE --
-- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
with Ada.Unchecked_Conversion;
with HAL.UART; use HAL.UART;
with HAL.Bitmap; use HAL.Bitmap;
package body AdaFruit.Thermal_Printer is
function To_Char is new Ada.Unchecked_Conversion (Source => UInt8,
Target => Character);
function To_UInt8 is new Ada.Unchecked_Conversion (Source => Character,
Target => UInt8);
procedure Write (This : in out TP_Device; Cmd : String);
procedure Read (This : in out TP_Device; Str : out String);
-----------
-- Write --
-----------
procedure Write (This : in out TP_Device; Cmd : String) is
Status : UART_Status;
Data : UART_Data_8b (Cmd'Range);
begin
for Index in Cmd'Range loop
Data (Index) := To_UInt8 (Cmd (Index));
end loop;
This.Port.Transmit (Data, Status);
if Status /= Ok then
-- No error handling...
raise Program_Error;
end if;
-- This.Time.Delay_Microseconds ((11 * 1000000 / 19_2000) + Cmd'Length);
end Write;
----------
-- Read --
----------
procedure Read (This : in out TP_Device; Str : out String) is
Status : UART_Status;
Data : UART_Data_8b (Str'Range);
begin
This.Port.Receive (Data, Status);
if Status /= Ok then
-- No error handling...
raise Program_Error;
end if;
for Index in Str'Range loop
Str (Index) := To_Char (Data (Index));
end loop;
end Read;
----------------------
-- Set_Line_Spacing --
----------------------
procedure Set_Line_Spacing (This : in out TP_Device; Spacing : UInt8) is
begin
Write (This, ASCII.ESC & '3' & To_Char (Spacing));
end Set_Line_Spacing;
---------------
-- Set_Align --
---------------
procedure Set_Align (This : in out TP_Device; Align : Text_Align) is
Mode : Character;
begin
case Align is
when Left => Mode := '0';
when Center => Mode := '1';
when Right => Mode := '2';
end case;
Write (This, ASCII.ESC & 'a' & Mode);
end Set_Align;
----------------------
-- Set_Font_Enlarge --
----------------------
procedure Set_Font_Enlarge (This : in out TP_Device; Height, Width : Boolean) is
Data : UInt8 := 0;
begin
if Height then
Data := Data or 16#01#;
end if;
if Width then
Data := Data or 16#10#;
end if;
Write (This, ASCII.GS & '!' & To_Char (Data));
end Set_Font_Enlarge;
--------------
-- Set_Bold --
--------------
procedure Set_Bold (This : in out TP_Device; Bold : Boolean) is
begin
Write (This, ASCII.ESC & 'E' & To_Char (if Bold then 1 else 0));
end Set_Bold;
----------------------
-- Set_Double_Width --
----------------------
procedure Set_Double_Width (This : in out TP_Device; Double : Boolean) is
begin
if Double then
Write (This, ASCII.ESC & ASCII.SO);
else
Write (This, ASCII.ESC & ASCII.DC4);
end if;
end Set_Double_Width;
----------------
-- Set_UpDown --
----------------
procedure Set_UpDown (This : in out TP_Device; UpDown : Boolean) is
begin
Write (This, ASCII.ESC & '{' & To_Char (if UpDown then 1 else 0));
end Set_UpDown;
------------------
-- Set_Reversed --
------------------
procedure Set_Reversed (This : in out TP_Device; Reversed : Boolean) is
begin
Write (This, ASCII.GS & 'B' & To_Char (if Reversed then 1 else 0));
end Set_Reversed;
--------------------------
-- Set_Underline_Height --
--------------------------
procedure Set_Underline_Height (This : in out TP_Device; Height : Underline_Height) is
begin
Write (This, ASCII.ESC & '-' & To_Char (Height));
end Set_Underline_Height;
-----------------------
-- Set_Character_Set --
-----------------------
procedure Set_Character_Set (This : in out TP_Device; Set : Character_Set) is
begin
Write (This, ASCII.ESC & 't' & To_Char (Character_Set'Pos (Set)));
end Set_Character_Set;
----------
-- Feed --
----------
procedure Feed (This : in out TP_Device; Rows : UInt8) is
begin
Write (This, ASCII.ESC & 'd' & To_Char (Rows));
end Feed;
------------------
-- Print_Bitmap --
------------------
procedure Print_Bitmap (This : in out TP_Device;
BM : Thermal_Printer_Bitmap)
is
Nbr_Of_Rows : constant Natural := BM'Length (2);
Nbr_Of_Columns : constant Natural := BM'Length (1);
Str : String (1 .. Nbr_Of_Columns / 8);
begin
Write (This, ASCII.DC2 & 'v' &
To_Char (UInt8 (Nbr_Of_Rows rem 256)) &
To_Char (UInt8 (Nbr_Of_Rows / 256)));
for Row in 0 .. Nbr_Of_Rows - 1 loop
for Colum in 0 .. (Nbr_Of_Columns / 8) - 1 loop
declare
BM_Index : constant Natural := BM'First (1) + Colum * 8;
Str_Index : constant Natural := Str'First + Colum;
B : UInt8 := 0;
begin
for X in 0 .. 7 loop
B := B or (if BM (BM_Index + X,
BM'First (2) + Row)
then 2**X else 0);
end loop;
Str (Str_Index) := To_Char (B);
end;
end loop;
Write (This, Str);
This.Time.Delay_Microseconds (600 * Str'Length);
end loop;
end Print_Bitmap;
------------------
-- Print_Bitmap --
------------------
procedure Print_Bitmap (This : in out TP_Device;
BM : not null HAL.Bitmap.Any_Bitmap_Buffer)
is
Nbr_Of_Rows : constant Natural := BM.Height;
Nbr_Of_Columns : constant Natural := BM.Width;
Str : String (1 .. Nbr_Of_Columns / 8);
begin
Write (This, ASCII.DC2 & 'v' &
To_Char (UInt8 (Nbr_Of_Rows rem 256)) &
To_Char (UInt8 (Nbr_Of_Rows / 256)));
for Row in 0 .. Nbr_Of_Rows - 1 loop
for Colum in 0 .. (Nbr_Of_Columns / 8) - 1 loop
declare
B : UInt8 := 0;
Str_Index : constant Natural := Str'First + Colum;
begin
for X in 0 .. 7 loop
B := B or (if BM.Pixel (((Colum * 8) + X, Row)).Red < 127
then 2**X else 0);
end loop;
Str (Str_Index) := To_Char (B);
end;
end loop;
Write (This, Str);
This.Time.Delay_Microseconds (600 * Str'Length);
end loop;
end Print_Bitmap;
----------
-- Wake --
----------
procedure Wake (This : in out TP_Device) is
begin
Write (This, ASCII.ESC & '@');
end Wake;
-----------
-- Reset --
-----------
procedure Reset (This : in out TP_Device) is
begin
Write (This, "" & To_Char (16#FF#));
This.Time.Delay_Milliseconds (50);
Write (This, ASCII.ESC & '8' & ASCII.NUL & ASCII.NUL);
for X in 1 .. 10 loop
This.Time.Delay_Microseconds (10_000);
Write (This, "" & ASCII.NUL);
end loop;
end Reset;
-----------
-- Print --
-----------
procedure Print (This : in out TP_Device; Text : String) is
begin
Write (This, Text);
end Print;
----------------
-- Get_Status --
----------------
function Get_Status (This : in out TP_Device) return Printer_Status is
Ret : Printer_Status;
Status : String := "P1V72T30";
begin
Ret.Paper := False;
Ret.Voltage := 0;
Ret.Temperature := 0;
Write (This, ASCII.ESC & 'v');
Read (This, Status);
-- Parse status here
-- P<Paper>V<Voltage>T<Degree>
-- Example: P1V72T30 Mean:Paper Ready,Current voltage 7.2V,Printer degree:30
return Ret;
end Get_Status;
--------------------------
-- Set_Printer_Settings --
--------------------------
procedure Set_Printer_Settings (This : in out TP_Device; Settings : Printer_Settings) is
begin
Write (This, ASCII.ESC & '7'
& To_Char (Settings.Max_Printing_Dots)
& To_Char (if Settings.Heating_Time < 3
then 3 else Settings.Heating_Time)
& To_Char (Settings.Heating_Interval));
end Set_Printer_Settings;
-----------------
-- Set_Density --
-----------------
procedure Set_Density (This : in out TP_Device; Density, Breaktime : UInt8) is
begin
Write (This,
ASCII.DC2 & '#' & To_Char (Shift_Left (Breaktime, 5) or Density));
end Set_Density;
---------------------
-- Print_Test_Page --
---------------------
procedure Print_Test_Page (This : in out TP_Device) is
begin
Write (This, ASCII.DC2 & 'T');
end Print_Test_Page;
end AdaFruit.Thermal_Printer;
|
-----------------------------------------------------------------------
-- users-tests-helpers -- Helpers for user creation
-- Copyright (C) 2011, 2012, 2013, 2014, 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.Finalization;
with Security.Contexts;
with ASF.Requests.Mockup;
with AWA.Users.Models;
with AWA.Users.Services;
with AWA.Services.Contexts;
with AWA.Users.Principals;
package AWA.Tests.Helpers.Users is
type Test_User is new Ada.Finalization.Limited_Controlled with record
Context : AWA.Services.Contexts.Service_Context;
Manager : AWA.Users.Services.User_Service_Access := null;
User : AWA.Users.Models.User_Ref;
Email : AWA.Users.Models.Email_Ref;
Session : AWA.Users.Models.Session_Ref;
Principal : AWA.Users.Principals.Principal_Access;
end record;
-- Initialize the service context.
procedure Initialize (Principal : in out Test_User);
-- Create a test user associated with the given email address.
-- Get an open session for that user. If the user already exists, no error is reported.
procedure Create_User (Principal : in out Test_User;
Email : in String);
-- Create a test user for a new test and get an open session.
procedure Create_User (Principal : in out Test_User);
-- Find the access key associated with a user (if any).
procedure Find_Access_Key (Principal : in out Test_User;
Email : in String;
Key : in out AWA.Users.Models.Access_Key_Ref);
-- Login a user and create a session
procedure Login (Principal : in out Test_User);
-- Logout the user and closes the current session.
procedure Logout (Principal : in out Test_User);
-- Simulate a user login in the given service context.
procedure Login (Context : in out AWA.Services.Contexts.Service_Context'Class;
Sec_Context : in out Security.Contexts.Security_Context;
Email : in String);
-- Simulate a user login on the request. Upon successful login, a session that is
-- authentified is associated with the request object.
procedure Login (Email : in String;
Request : in out ASF.Requests.Mockup.Request);
-- Setup the context and security context to simulate an anonymous user.
procedure Anonymous (Context : in out AWA.Services.Contexts.Service_Context'Class;
Sec_Context : in out Security.Contexts.Security_Context);
-- Simulate the recovery password process for the given user.
procedure Recover_Password (Email : in String);
overriding
procedure Finalize (Principal : in out Test_User);
-- Cleanup and release the Principal that have been allocated from the Login session
-- but not released because the Logout is not called from the unit test.
procedure Tear_Down;
end AWA.Tests.Helpers.Users;
|
-- AC3207A.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 AN INSTANTIATION IS LEGAL IF A FORMAL PARAMETER
-- HAVING A LIMITED PRIVATE TYPE WITHOUT DISCRIMINANTS IS USED TO
-- DECLARE AN OBJECT IN A BLOCK THAT CONTAINS A SELECTIVE WAIT
-- WITH A TERMINATE ALTERNATIVE, AND THE ACTUAL PARAMETER'S BASE
-- TYPE IS A TASK TYPE OR A TYPE WITH A SUBCOMPONENT OF A TASK TYPE.
-- HISTORY:
-- DHH 09/16/88 CREATED ORIGINAL TEST.
WITH REPORT; USE REPORT;
PROCEDURE AC3207A IS
GENERIC
TYPE PRIV IS LIMITED PRIVATE;
PACKAGE GEN_P IS
TASK T1 IS
ENTRY E;
END T1;
END GEN_P;
TASK TYPE TASK_T IS
END TASK_T;
TYPE REC IS
RECORD
OBJ : TASK_T;
END RECORD;
PACKAGE BODY GEN_P IS
TASK BODY T1 IS
BEGIN
DECLARE
OBJ : PRIV;
BEGIN
SELECT
ACCEPT E;
OR
TERMINATE;
END SELECT;
END;
END T1;
END GEN_P;
TASK BODY TASK_T IS
BEGIN
NULL;
END;
PACKAGE P IS NEW GEN_P(TASK_T);
PACKAGE NEW_P IS NEW GEN_P(REC);
BEGIN
TEST ("AC3207A", "CHECK THAT AN INSTANTIATION IS LEGAL IF A " &
"FORMAL PARAMETER HAVING A LIMITED PRIVATE " &
"TYPE WITHOUT DISCRIMINANTS IS USED TO " &
"DECLARE AN OBJECT IN A BLOCK THAT CONTAINS " &
"A SELECTIVE WAIT WITH A TERMINATE " &
"ALTERNATIVE, AND THE ACTUAL PARAMETER'S BASE " &
"TYPE IS A TASK TYPE OR A TYPE WITH A " &
"SUBCOMPONENT OF A TASK TYPE");
P.T1.E;
NEW_P.T1.E;
RESULT;
END AC3207A;
|
------------------------------------------------------------------------------
-- --
-- Copyright (C) 2015-2017, AdaCore --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions are --
-- met: --
-- 1. Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- 2. Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in --
-- the documentation and/or other materials provided with the --
-- distribution. --
-- 3. Neither the name of the copyright holder nor the names of its --
-- contributors may be used to endorse or promote products derived --
-- from this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT --
-- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, --
-- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY --
-- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT --
-- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE --
-- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- This package provides a software implementation of the HAL.Bitmap drawing
-- primitives.
package Filesystem is
function Join
(Prefix, Suffix : String)
return String;
-- Like Ada.Directories.Compose, but also accepts a full path as Suffix.
-- For instance:
--
-- Join ("/a", "b") => "/a/b"
-- Join ("/a", "b/c") => "/a/b/c"
--
-- If sufifx is an absolute path, just return Suffix.
end Filesystem;
|
------------------------------------------------------------------------------
-- --
-- GNAT ncurses Binding --
-- --
-- Terminal_Interface.Curses.Forms.Field_Types.User.Choice --
-- --
-- B O D Y --
-- --
------------------------------------------------------------------------------
-- Copyright (c) 1998 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
-- "Software"), to deal in the Software without restriction, including --
-- without limitation the rights to use, copy, modify, merge, publish, --
-- distribute, distribute with modifications, sublicense, and/or sell --
-- copies of the Software, and to permit persons to whom the Software is --
-- furnished to do so, subject to the following conditions: --
-- --
-- The above copyright notice and this permission notice shall be included --
-- in all copies or substantial portions of the Software. --
-- --
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS --
-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF --
-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. --
-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, --
-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR --
-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR --
-- THE USE OR OTHER DEALINGS IN THE SOFTWARE. --
-- --
-- Except as contained in this notice, the name(s) of the above copyright --
-- holders shall not be used in advertising or otherwise to promote the --
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer <Juergen.Pfeifer@T-Online.de> 1996
-- Version Control:
-- $Revision: 1.4 $
-- Binding Version 00.93
------------------------------------------------------------------------------
with Ada.Unchecked_Conversion;
with Interfaces.C;
package body Terminal_Interface.Curses.Forms.Field_Types.User.Choice is
use type Interfaces.C.Int;
function To_Argument_Access is new Ada.Unchecked_Conversion
(System.Address, Argument_Access);
function Generic_Next (Fld : Field;
Usr : System.Address) return C_Int
is
Result : Boolean;
Udf : User_Defined_Field_Type_With_Choice_Access :=
User_Defined_Field_Type_With_Choice_Access
(To_Argument_Access (Usr).Typ);
begin
Result := Next (Fld, Udf.all);
return C_Int (Boolean'Pos (Result));
end Generic_Next;
function Generic_Prev (Fld : Field;
Usr : System.Address) return C_Int
is
Result : Boolean;
Udf : User_Defined_Field_Type_With_Choice_Access :=
User_Defined_Field_Type_With_Choice_Access
(To_Argument_Access (Usr).Typ);
begin
Result := Previous (Fld, Udf.all);
return C_Int (Boolean'Pos (Result));
end Generic_Prev;
-- -----------------------------------------------------------------------
--
function C_Generic_Choice return C_Field_Type
is
Res : Eti_Error;
T : C_Field_Type;
begin
if M_Generic_Choice = Null_Field_Type then
T := New_Fieldtype (Generic_Field_Check'Access,
Generic_Char_Check'Access);
if T = Null_Field_Type then
raise Form_Exception;
else
Res := Set_Fieldtype_Arg (T,
Make_Arg'Access,
Copy_Arg'Access,
Free_Arg'Access);
if Res /= E_Ok then
Eti_Exception (Res);
end if;
Res := Set_Fieldtype_Choice (T,
Generic_Next'Access,
Generic_Prev'Access);
if Res /= E_Ok then
Eti_Exception (Res);
end if;
end if;
M_Generic_Choice := T;
end if;
pragma Assert (M_Generic_Choice /= Null_Field_Type);
return M_Generic_Choice;
end C_Generic_Choice;
end Terminal_Interface.Curses.Forms.Field_Types.User.Choice;
|
-- Copyright 2013-2016 Free Software Foundation, Inc.
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
with Pck; use Pck;
procedure Foo is
type Small is range -128 .. 127;
SR : Small := 48;
type Small_Integer is range -2 ** 31 .. 2 ** 31 - 1;
SI : Small_Integer := 740804;
type Integer4_T is range -2 ** 31 .. 2 ** 31 - 1;
for Integer4_T'Size use 32;
IR : Integer4_T := 974;
begin
Do_Nothing (SR'Address); -- STOP
Do_Nothing (SI'Address);
Do_Nothing (IR'Address);
end Foo;
|
with Ada.Text_IO;
with Ada.Command_Line;
with Resources.Help;
with Resources.Man;
procedure Show_Help is
use Resources;
procedure Print (Name : in String) is
C : constant Content_Access := Man.Get_Content (Name);
H : access constant String;
begin
if C /= null then
Ada.Text_IO.Put (C.all);
return;
end if;
H := Help.Get_Content (Name);
if H /= null then
Ada.Text_IO.Put (H.all);
return;
end if;
Ada.Text_IO.Put_Line ("FAIL: No help for '" & Name & "'");
Ada.Command_Line.Set_Exit_Status (Ada.Command_Line.Failure);
end Print;
Count : constant Natural := Ada.Command_Line.Argument_Count;
begin
if Count = 0 then
Ada.Text_IO.Put_Line ("Help names:");
for Name of Help.Names loop
Ada.Text_IO.Put_Line (" " & Name.all);
end loop;
Ada.Text_IO.Put_Line ("Man pages:");
for Name of Man.Names loop
Ada.Text_IO.Put_Line (" " & Name.all);
end loop;
return;
end if;
for I in 1 .. Count loop
Print (Ada.Command_Line.Argument (I));
end loop;
end Show_Help;
|
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2012-2013, Vadim Godunko <vgodunko@gmail.com> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
-- This file is generated, don't edit it.
------------------------------------------------------------------------------
package AMF.Internals.Tables.OCL_Metamodel.Properties is
procedure Initialize;
private
procedure Initialize_1;
procedure Initialize_2;
procedure Initialize_3;
procedure Initialize_4;
procedure Initialize_5;
procedure Initialize_6;
procedure Initialize_7;
procedure Initialize_8;
procedure Initialize_9;
procedure Initialize_10;
procedure Initialize_11;
procedure Initialize_12;
procedure Initialize_13;
procedure Initialize_14;
procedure Initialize_15;
procedure Initialize_16;
procedure Initialize_17;
procedure Initialize_18;
procedure Initialize_19;
procedure Initialize_20;
procedure Initialize_21;
procedure Initialize_22;
procedure Initialize_23;
procedure Initialize_24;
procedure Initialize_25;
procedure Initialize_26;
procedure Initialize_27;
procedure Initialize_28;
procedure Initialize_29;
procedure Initialize_30;
procedure Initialize_31;
procedure Initialize_32;
procedure Initialize_33;
procedure Initialize_34;
procedure Initialize_35;
procedure Initialize_36;
procedure Initialize_37;
procedure Initialize_38;
procedure Initialize_39;
procedure Initialize_40;
procedure Initialize_41;
procedure Initialize_42;
procedure Initialize_43;
procedure Initialize_44;
procedure Initialize_45;
procedure Initialize_46;
procedure Initialize_47;
procedure Initialize_48;
procedure Initialize_49;
procedure Initialize_50;
procedure Initialize_51;
procedure Initialize_52;
procedure Initialize_53;
procedure Initialize_54;
procedure Initialize_55;
procedure Initialize_56;
procedure Initialize_57;
procedure Initialize_58;
procedure Initialize_59;
procedure Initialize_60;
procedure Initialize_61;
procedure Initialize_62;
procedure Initialize_63;
procedure Initialize_64;
procedure Initialize_65;
procedure Initialize_66;
procedure Initialize_67;
procedure Initialize_68;
procedure Initialize_69;
procedure Initialize_70;
procedure Initialize_71;
procedure Initialize_72;
procedure Initialize_73;
procedure Initialize_74;
procedure Initialize_75;
procedure Initialize_76;
procedure Initialize_77;
procedure Initialize_78;
procedure Initialize_79;
procedure Initialize_80;
procedure Initialize_81;
procedure Initialize_82;
procedure Initialize_83;
procedure Initialize_84;
procedure Initialize_85;
procedure Initialize_86;
procedure Initialize_87;
procedure Initialize_88;
procedure Initialize_89;
procedure Initialize_90;
procedure Initialize_91;
procedure Initialize_92;
procedure Initialize_93;
procedure Initialize_94;
procedure Initialize_95;
procedure Initialize_96;
procedure Initialize_97;
procedure Initialize_98;
procedure Initialize_99;
procedure Initialize_100;
procedure Initialize_101;
procedure Initialize_102;
procedure Initialize_103;
procedure Initialize_104;
procedure Initialize_105;
procedure Initialize_106;
procedure Initialize_107;
procedure Initialize_108;
procedure Initialize_109;
procedure Initialize_110;
procedure Initialize_111;
procedure Initialize_112;
procedure Initialize_113;
procedure Initialize_114;
procedure Initialize_115;
procedure Initialize_116;
procedure Initialize_117;
procedure Initialize_118;
procedure Initialize_119;
procedure Initialize_120;
procedure Initialize_121;
procedure Initialize_122;
procedure Initialize_123;
procedure Initialize_124;
procedure Initialize_125;
procedure Initialize_126;
procedure Initialize_127;
procedure Initialize_128;
procedure Initialize_129;
procedure Initialize_130;
procedure Initialize_131;
procedure Initialize_132;
procedure Initialize_133;
procedure Initialize_134;
procedure Initialize_135;
procedure Initialize_136;
procedure Initialize_137;
procedure Initialize_138;
procedure Initialize_139;
procedure Initialize_140;
procedure Initialize_141;
procedure Initialize_142;
procedure Initialize_143;
procedure Initialize_144;
procedure Initialize_145;
procedure Initialize_146;
procedure Initialize_147;
procedure Initialize_148;
procedure Initialize_149;
procedure Initialize_150;
procedure Initialize_151;
procedure Initialize_152;
procedure Initialize_153;
procedure Initialize_154;
procedure Initialize_155;
procedure Initialize_156;
procedure Initialize_157;
procedure Initialize_158;
procedure Initialize_159;
procedure Initialize_160;
procedure Initialize_161;
procedure Initialize_162;
procedure Initialize_163;
procedure Initialize_164;
procedure Initialize_165;
procedure Initialize_166;
procedure Initialize_167;
procedure Initialize_168;
procedure Initialize_169;
procedure Initialize_170;
procedure Initialize_171;
procedure Initialize_172;
procedure Initialize_173;
procedure Initialize_174;
procedure Initialize_175;
procedure Initialize_176;
procedure Initialize_177;
procedure Initialize_178;
end AMF.Internals.Tables.OCL_Metamodel.Properties;
|
package body AFRL.CMASI.AutomationRequest.SPARK_Boundary with SPARK_Mode => Off is
--------------------
-- Get_EntityList --
--------------------
function Get_EntityList
(Request : AutomationRequest) return Int64_Vect
is
L : constant Vect_Int64_Acc := Request.getEntityList;
begin
return R : Int64_Vect do
for E of L.all loop
Int64_Vects.Append (R, E);
end loop;
end return;
end Get_EntityList;
-------------------------
-- Get_OperatingRegion --
-------------------------
function Get_OperatingRegion
(Request : AutomationRequest) return Int64
renames getOperatingRegion;
------------------
-- Get_TaskList --
------------------
function Get_TaskList
(Request : AutomationRequest) return Int64_Vect
is
L : constant Vect_Int64_Acc := Request.getTaskList;
begin
return R : Int64_Vect do
for E of L.all loop
Int64_Vects.Append (R, E);
end loop;
end return;
end Get_TaskList;
end AFRL.CMASI.AutomationRequest.SPARK_Boundary;
|
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- S Y S T E M . P A R A M E T E R S --
-- --
-- S p e c --
-- --
-- Copyright (C) 1992-2014, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- --
-- --
-- --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- This is a generic bare board version the package, for small targets
-- This package defines some system dependent parameters for GNAT. These
-- are values that are referenced by the runtime library and are therefore
-- relevant to the target machine.
-- The parameters whose value is defined in the spec are not generally
-- expected to be changed. If they are changed, it will be necessary to
-- recompile the run-time library.
-- The parameters which are defined by functions can be changed by modifying
-- the body of System.Parameters in file s-parame.adb. A change to this body
-- requires only rebinding and relinking of the application.
-- Note: do not introduce any pragma Inline statements into this unit, since
-- otherwise the relinking and rebinding capability would be deactivated.
package System.Parameters is
pragma Pure;
---------------------------------------
-- Task And Stack Allocation Control --
---------------------------------------
type Task_Storage_Size is new Integer;
-- Type used in tasking units for task storage size
type Size_Type is new Task_Storage_Size;
-- Type used to provide task storage size to runtime
Unspecified_Size : constant Size_Type := Size_Type'First;
-- Value used to indicate that no size type is set
subtype Percentage is Size_Type range -1 .. 100;
Dynamic : constant Size_Type := -1;
-- The secondary stack ratio is a constant between 0 and 100 which
-- determines the percentage of the allocated task stack that is
-- used by the secondary stack (the rest being the primary stack).
-- The special value of minus one indicates that the secondary
-- stack is to be allocated from the heap instead.
Sec_Stack_Percentage : constant Percentage := 10;
-- This constant defines the handling of the secondary stack, see above
-- comment, so the 25 here means a 25% amount.
Sec_Stack_Dynamic : constant Boolean := Sec_Stack_Percentage = Dynamic;
-- Convenient Boolean for testing for dynamic secondary stack
Default_Stack_Size : constant Size_Type := 4 * 1024;
-- Default task stack size used if none is specified
Minimum_Stack_Size : constant Size_Type := 512;
-- Minimum task stack size permitted
function Adjust_Storage_Size (Size : Size_Type) return Size_Type;
-- Given the storage size stored in the TCB, return the Storage_Size
-- value required by the RM for the Storage_Size attribute. The
-- required adjustment is as follows:
--
-- when Size = Unspecified_Size, return Default_Stack_Size
-- otherwise return given Size
Stack_Grows_Down : constant Boolean := True;
-- This constant indicates whether the stack grows up (False) or
-- down (True) in memory as functions are called. It is used for
-- proper implementation of the stack overflow check.
----------------------------------------------
-- Characteristics of types in Interfaces.C --
----------------------------------------------
long_bits : constant := Long_Integer'Size;
-- Number of bits in type long and unsigned_long. The normal convention
-- is that this is the same as type Long_Integer, but this may not be true
-- of all targets.
ptr_bits : constant := Standard'Address_Size;
subtype C_Address is System.Address;
-- Number of bits in Interfaces.C pointers, normally a standard address
C_Malloc_Linkname : constant String := "__gnat_malloc";
-- Name of runtime function used to allocate such a pointer
----------------------------------------------
-- Behavior of Pragma Finalize_Storage_Only --
----------------------------------------------
-- Garbage_Collected is a Boolean constant whose value indicates the
-- effect of the pragma Finalize_Storage_Entry on a controlled type.
-- Garbage_Collected = False
-- The system releases all storage on program termination only,
-- but not other garbage collection occurs, so finalization calls
-- are ommitted only for outer level onjects can be omitted if
-- pragma Finalize_Storage_Only is used.
-- Garbage_Collected = True
-- The system provides full garbage collection, so it is never
-- necessary to release storage for controlled objects for which
-- a pragma Finalize_Storage_Only is used.
Garbage_Collected : constant Boolean := False;
-- The storage mode for this system (release on program exit)
---------------------
-- Tasking Profile --
---------------------
-- In the following sections, constant parameters are defined to
-- allow some optimizations and fine tuning within the tasking run time
-- based on restrictions on the tasking features.
----------------------
-- Locking Strategy --
----------------------
Single_Lock : constant Boolean := True;
-- Indicates whether a single lock should be used within the tasking
-- run-time to protect internal structures. If True, a single lock
-- will be used, meaning less locking/unlocking operations, but also
-- more global contention. In general, Single_Lock should be set to
-- True on single processor machines, and to False to multi-processor
-- systems, but this can vary from application to application and also
-- depends on the scheduling policy.
-------------------
-- Task Abortion --
-------------------
No_Abort : constant Boolean := True;
-- This constant indicates whether abort statements and asynchronous
-- transfer of control (ATC) are disallowed. If set to True, it is
-- assumed that neither construct is used, and the run time does not
-- need to defer/undefer abort and check for pending actions at
-- completion points. A value of True for No_Abort corresponds to:
-- pragma Restrictions (No_Abort_Statements);
-- pragma Restrictions (Max_Asynchronous_Select_Nesting => 0);
---------------------
-- Task Attributes --
---------------------
Max_Attribute_Count : constant := 0;
-- Number of task attributes stored in the task control block
--------------------
-- Runtime Traces --
--------------------
Runtime_Traces : constant Boolean := False;
-- This constant indicates whether the runtime outputs traces to a
-- predefined output or not (True means that traces are output).
-- See System.Traces for more details.
-----------------------
-- Task Image Length --
-----------------------
Max_Task_Image_Length : constant := 32;
-- This constant specifies the maximum length of a task's image
------------------------------
-- Exception Message Length --
------------------------------
Default_Exception_Msg_Max_Length : constant := 200;
-- This constant specifies the default number of characters to allow
-- in an exception message (200 is minimum required by RM 11.4.1(18)).
end System.Parameters;
|
-------------------------------------------------------------------------------
-- Copyright 2021, The Trendy Terminal Developers (see AUTHORS file)
-- 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 Trendy_Terminal.Maps is
use all type ASU.Unbounded_String;
function "+"(S : String) return ASU.Unbounded_String renames ASU.To_Unbounded_String;
package Key_Maps is new Ada.Containers.Ordered_Maps (
Key_Type => ASU.Unbounded_String,
Element_Type => Key,
"<" => ASU."<",
"=" => "=");
package Inverse_Key_Maps is new Ada.Containers.Ordered_Maps (
Key_Type => Key,
Element_Type => ASU.Unbounded_String,
"<" => "<",
"=" => ASU."=");
function Make_Key_Map return Key_Maps.Map is
KM : Key_Maps.Map;
begin
KM.Insert(CSI & (+"A"), Key_Up);
KM.Insert(CSI & (+"B"), Key_Down);
KM.Insert(CSI & (+"C"), Key_Right);
KM.Insert(CSI & (+"D"), Key_Left);
KM.Insert(CSI & (+"H"), Key_Home);
KM.Insert(CSI & (+"F"), Key_End);
KM.Insert(CSI & (+"1;5A"), Key_Ctrl_Up);
KM.Insert(CSI & (+"1;5B"), Key_Ctrl_Down);
KM.Insert(CSI & (+"1;5C"), Key_Ctrl_Right);
KM.Insert(CSI & (+"1;5D"), Key_Ctrl_Left);
KM.Insert(Characters.DEL & ASU.Null_Unbounded_String, Key_Backspace);
KM.Insert(Characters.SUB & ASU.Null_Unbounded_String, Key_Pause);
KM.Insert(CSI & (+"2~"), Key_Insert);
KM.Insert(CSI & (+"3~"), Key_Delete);
KM.Insert(CSI & (+"5~"), Key_Page_Up);
KM.Insert(CSI & (+"6~"), Key_Page_Down);
KM.Insert(Characters.ESC & (+"OP"), Key_F1);
KM.Insert(Characters.ESC & (+"OQ"), Key_F2);
KM.Insert(Characters.ESC & (+"OR"), Key_F3);
KM.Insert(Characters.ESC & (+"OS"), Key_F4);
KM.Insert(CSI & (+"15~"), Key_F5);
KM.Insert(CSI & (+"17~"), Key_F6);
KM.Insert(CSI & (+"18~"), Key_F7);
KM.Insert(CSI & (+"19~"), Key_F8);
KM.Insert(CSI & (+"20~"), Key_F9);
KM.Insert(CSI & (+"21~"), Key_F10);
KM.Insert(CSI & (+"23~"), Key_F11);
KM.Insert(CSI & (+"24~"), Key_F12);
KM.Insert(Characters.HT & (+""), Key_Tab);
KM.Insert(CSI & (+"Z"), Key_Shift_Tab);
KM.Insert(Characters.ETX & ASU.Null_Unbounded_String, Key_Ctrl_C);
KM.Insert(Characters.EOT & ASU.Null_Unbounded_String, Key_Ctrl_D);
return KM;
end Make_Key_Map;
function Make_Key_Lookup_Map return Inverse_Key_Maps.Map is
KM : Inverse_Key_Maps.Map;
begin
-- https://vt100.net/docs/vt510-rm/DECFNK.html
--
-- 0,1 none
-- 2 Shift
-- 3 Alt
-- 4 Alt + Shift
-- 5 Control
-- 6 Control + Shift
-- 7 Alt + Control
-- 8 Alt + Control + Shift
KM.Insert(Key_Up, CSI & (+"A"));
KM.Insert(Key_Down, CSI & (+"B"));
KM.Insert(Key_Right, CSI & (+"C"));
KM.Insert(Key_Left, CSI & (+"D"));
KM.Insert(Key_Home, CSI & (+"H"));
KM.Insert(Key_End, CSI & (+"F"));
KM.Insert(Key_Ctrl_Up, CSI & (+"1;5A"));
KM.Insert(Key_Ctrl_Down, CSI & (+"1;5B"));
KM.Insert(Key_Ctrl_Right, CSI & (+"1;5C"));
KM.Insert(Key_Ctrl_Left, CSI & (+"1;5D"));
KM.Insert(Key_Backspace, Characters.DEL & (+""));
KM.Insert(Key_Pause, Characters.SUB & (+""));
KM.Insert(Key_Insert, CSI & (+"2~"));
KM.Insert(Key_Delete, CSI & (+"3~"));
KM.Insert(Key_Page_Up, CSI & (+"5~"));
KM.Insert(Key_Page_Down, CSI & (+"6~"));
KM.Insert(Key_F1, Characters.ESC & (+"OP"));
KM.Insert(Key_F2, Characters.ESC & (+"OQ"));
KM.Insert(Key_F3, Characters.ESC & (+"OR"));
KM.Insert(Key_F4, Characters.ESC & (+"OS"));
KM.Insert(Key_F5, CSI & (+"15~"));
KM.Insert(Key_F6, CSI & (+"17~"));
KM.Insert(Key_F7, CSI & (+"18~"));
KM.Insert(Key_F8, CSI & (+"19~"));
KM.Insert(Key_F9, CSI & (+"20~"));
KM.Insert(Key_F10, CSI & (+"21~"));
KM.Insert(Key_F11, CSI & (+"23~"));
KM.Insert(Key_F12, CSI & (+"24~"));
KM.Insert(Key_Tab, Characters.HT & (+""));
KM.Insert(Key_Shift_Tab, CSI & (+"Z"));
KM.Insert(Key_Ctrl_C, Characters.ETX & (+""));
KM.Insert(Key_Ctrl_D, Characters.EOT & (+""));
return KM;
end Make_Key_Lookup_Map;
KM : constant Key_Maps.Map := Make_Key_Map;
MK : constant Inverse_Key_Maps.Map := Make_Key_Lookup_Map;
function Sequence_For (K : Key) return String is (ASU.To_String (MK(K)));
function Is_Key (Sequence : String) return Boolean is (KM.Contains (ASU.To_Unbounded_String (Sequence)));
function Key_For (Sequence : String) return Key is (KM (ASU.To_Unbounded_String (Sequence)));
end Trendy_Terminal.Maps;
|
with Ada.Text_IO;
procedure Euler21 is
function Dsum(N : Natural) return Natural is
Sum : Natural := 0;
begin
for X in 1 .. N / 2 loop
if N mod X = 0 then
Sum := Sum + X;
end if;
end loop;
return Sum;
end;
function Amicable(N : Natural) return Boolean is
D : Natural := Dsum(N);
begin
return D /= N and then Dsum(D) = N;
end;
Sum : Natural := 0;
begin
for X in 0 .. 9999 loop
if Amicable(X) then
Sum := Sum + X;
end if;
end loop;
Ada.Text_IO.Put_Line(Integer'Image(Sum));
end;
|
package body Encodings.Line_Endings.Generic_Add_CR is
procedure Convert(
This: in out Coder;
Source: in String_Type;
Source_Last: out Natural;
Target: out String_Type;
Target_Last: out Natural
) is
C: Character_Type;
begin
Source_Last := Source'First - 1;
Target_Last := Target'First - 1;
if This.State = Need_LF then
if Target_Last >= Target'Last then -- Wonder of anyone would supply zero-size string but precaution is must
return;
end if;
Target_Last := Target_Last + 1;
Target(Target_Last) := Line_Feed;
This.State := Initial;
end if;
while Source_Last < Source'Last and Target_Last < Target'Last loop
Source_Last := Source_Last + 1;
C := Source(Source_Last);
if C = Carriage_Return then
This.State := Have_CR;
elsif C = Line_Feed then
if This.State /= Have_CR then
Target_Last := Target_Last + 1;
Target(Target_Last) := Carriage_Return;
if(Target_Last >= Target'Last) then -- Buffer ends while outputtting CR-LF
This.State := Need_LF;
return;
end if;
This.State := Initial;
end if;
end if;
Target_Last := Target_Last + 1;
Target(Target_Last) := C;
end loop;
end Convert;
end Encodings.Line_Endings.Generic_Add_CR;
|
-- convert UCD/extracted/DerivedEastAsianWidth.txt
-- bin/ucd_eastasianwidth $UCD/extracted/DerivedEastAsianWidth.txt > ../source/strings/a-ueaswi.ads
with Ada.Command_Line; use Ada.Command_Line;
with Ada.Containers.Ordered_Maps;
with Ada.Integer_Text_IO; use Ada.Integer_Text_IO;
with Ada.Strings; use Ada.Strings;
with Ada.Strings.Bounded;
with Ada.Strings.Fixed; use Ada.Strings.Fixed;
with Ada.Strings.Maps.Constants; use Ada.Strings.Maps.Constants;
with Ada.Text_IO; use Ada.Text_IO;
procedure ucd_eastasianwidth is
function Value (S : String) return Wide_Wide_Character is
Img : constant String := "Hex_" & (1 .. 8 - S'Length => '0') & S;
begin
return Wide_Wide_Character'Value (Img);
end Value;
procedure Put_16 (Item : Integer) is
begin
if Item >= 16#10000# then
Put (Item, Width => 1, Base => 16);
else
declare
S : String (1 .. 8); -- "16#XXXX#"
begin
Put (S, Item, Base => 16);
S (1) := '1';
S (2) := '6';
S (3) := '#';
for I in reverse 4 .. 6 loop
if S (I) = '#' then
S (4 .. I) := (others => '0');
exit;
end if;
end loop;
Put (S);
end;
end if;
end Put_16;
package EAW_Property_Names is new Ada.Strings.Bounded.Generic_Bounded_Length (2);
use type EAW_Property_Names.Bounded_String;
package CP2EAW_Maps is
new Ada.Containers.Ordered_Maps (Wide_Wide_Character, EAW_Property_Names.Bounded_String);
use CP2EAW_Maps;
Table : aliased CP2EAW_Maps.Map;
type Bit is (In_XXXX, In_1XXXX, In_XXXXXXXX);
Num : array (Bit) of Natural;
begin
declare
File : Ada.Text_IO.File_Type;
begin
Open (File, In_File, Argument (1));
while not End_Of_File (File) loop
declare
Line : constant String := Get_Line (File);
P : Positive := Line'First;
Next : Natural;
Token_First : Positive;
Token_Last : Natural;
First, Last : Wide_Wide_Character;
EAW : EAW_Property_Names.Bounded_String;
begin
if Line'Length = 0 or else Line (P) = '#' then
null; -- comment
else
Find_Token (
Line (P .. Line'Last),
Hexadecimal_Digit_Set,
Inside,
Token_First,
Token_Last);
if Token_First /= P then
raise Data_Error with Line & " -- A";
end if;
First := Value (Line (Token_First .. Token_Last));
P := Token_Last + 1;
if Line (P) = '.' and then Line (P + 1) = '.' then
P := P + 2;
Find_Token (
Line (P .. Line'Last),
Hexadecimal_Digit_Set,
Inside,
Token_First,
Token_Last);
if Token_First /= P then
raise Data_Error with Line & " -- B";
end if;
Last := Value (Line (Token_First .. Token_Last));
P := Token_Last + 1;
else
Last := First;
end if;
Next := Index_Non_Blank (Line (P .. Line'Last));
if Next = 0 or else Line (Next) /= ';' then
raise Data_Error with Line & " -- C";
end if;
P := Next + 1; -- skip ';'
Next := Index_Non_Blank (Line (P .. Line'Last));
if Next = 0 then
raise Data_Error with Line & " -- D";
end if;
P := Next;
Find_Token (
Line (P .. Line'Last),
Letter_Set,
Inside,
Token_First,
Token_Last);
if Token_First /= P then
raise Data_Error with Line & " -- E";
end if;
EAW_Property_Names.Set_Bounded_String (
EAW,
Line (Token_First .. Token_Last));
if EAW /= "N" then
for I in First .. Last loop
Insert (Table, I, EAW);
end loop;
end if;
end if;
end;
end loop;
Close (File);
end;
declare
I : CP2EAW_Maps.Cursor := First (Table);
begin
for I in Num'Range loop
Num (I) := 0;
end loop;
while Has_Element (I) loop
declare
EAW : EAW_Property_Names.Bounded_String := Element (I);
L : CP2EAW_Maps.Cursor := I;
N : CP2EAW_Maps.Cursor := Next (I);
begin
while Has_Element (N)
and then Key (N) = Wide_Wide_Character'Succ (Key (L))
and then Element (N) = EAW
loop
L := N;
N := Next (N);
end loop;
if Key (L) <= Wide_Wide_Character'Val (16#FFFF#) then
Num (In_XXXX) := Num (In_XXXX)
+ Integer'(
Wide_Wide_Character'Pos (Key (L))
- Wide_Wide_Character'Pos (Key (I))
+ 1
+ (2 ** 13 - 1))
/ 2 ** 13;
elsif Key (L) <= Wide_Wide_Character'Val (16#1FFFF#) then
Num (In_1XXXX) := Num (In_1XXXX) + 1;
else
Num (In_XXXXXXXX) := Num (In_XXXXXXXX) + 1;
end if;
I := N;
end;
end loop;
end;
Put_Line ("pragma License (Unrestricted);");
Put_Line ("-- implementation unit, translated from DerivedEastAsianWidth.txt");
Put_Line ("package Ada.UCD.East_Asian_Width is");
Put_Line (" pragma Pure;");
New_Line;
Put_Line (" type Run_Length_13 is mod 2 ** 13;");
Put_Line (" type Run_Length_29 is mod 2 ** 29;");
New_Line;
Put_Line (" type Table_16_Item_Type is record");
Put_Line (" Start : UCS_2;");
Put_Line (" Length : Run_Length_13;");
Put_Line (" Width : East_Asian_Width_Type;");
Put_Line (" end record;");
Put_Line (" pragma Suppress_Initialization (Table_16_Item_Type);");
Put_Line (" for Table_16_Item_Type'Size use 32; -- 16 + 13 + 3");
Put_Line (" for Table_16_Item_Type use record");
Put_Line (" Start at 0 range 0 .. 15;");
Put_Line (" Length at 0 range 16 .. 28;");
Put_Line (" Width at 0 range 29 .. 31;");
Put_Line (" end record;");
New_Line;
Put_Line (" type Table_16_Type is array (Positive range <>) of Table_16_Item_Type;");
Put_Line (" pragma Suppress_Initialization (Table_16_Type);");
Put_Line (" for Table_16_Type'Component_Size use 32;");
New_Line;
Put_Line (" type Table_32_Item_Type is record");
Put_Line (" Start : UCS_4;");
Put_Line (" Length : Run_Length_29;");
Put_Line (" Width : East_Asian_Width_Type;");
Put_Line (" end record;");
Put_Line (" pragma Suppress_Initialization (Table_32_Item_Type);");
Put_Line (" for Table_32_Item_Type'Size use 64; -- 32 + 29 + 3");
Put_Line (" for Table_32_Item_Type use record");
Put_Line (" Start at 0 range 0 .. 31;");
Put_Line (" Length at 0 range 32 .. 60;");
Put_Line (" Width at 0 range 61 .. 63;");
Put_Line (" end record;");
New_Line;
Put_Line (" type Table_32_Type is array (Positive range <>) of Table_32_Item_Type;");
Put_Line (" pragma Suppress_Initialization (Table_32_Type);");
Put_Line (" for Table_32_Type'Component_Size use 64;");
New_Line;
Put (" subtype Table_XXXX_Type is Table_16_Type (1 .. ");
Put (Num (In_XXXX), Width => 1);
Put (");");
New_Line;
New_Line;
Put (" subtype Table_1XXXX_Type is Table_16_Type (");
Put (Num (In_XXXX) + 1, Width => 1);
Put (" .. ");
Put (Num (In_XXXX) + Num (In_1XXXX), Width => 1);
Put (");");
New_Line;
New_Line;
Put (" subtype Table_XXXXXXXX_Type is Table_32_Type (");
Put (Num (In_XXXX) + Num (In_1XXXX) + 1, Width => 1);
Put (" .. ");
Put (Num (In_XXXX) + Num (In_1XXXX) + Num (In_XXXXXXXX), Width => 1);
Put (");");
New_Line;
New_Line;
Put_Line (" Table_XXXX : constant Table_XXXX_Type := (");
declare
State : Bit := In_XXXX;
Offset : Integer := 0;
I : CP2EAW_Maps.Cursor := First (Table);
begin
while Has_Element (I) loop
declare
EAW : EAW_Property_Names.Bounded_String renames Table.Constant_Reference (I).Element.all;
L : CP2EAW_Maps.Cursor := I;
N : CP2EAW_Maps.Cursor := Next (I);
begin
while Has_Element (N)
and then Key (N) = Wide_Wide_Character'Succ (Key (L))
and then Element (N) = EAW
loop
L := N;
N := Next (N);
exit when State = In_XXXX
and then Wide_Wide_Character'Pos (Key (L))
- Wide_Wide_Character'Pos (Key (I))
+ 1 = 2 ** 13 - 1;
end loop;
Put (" (");
Put_16 (Wide_Wide_Character'Pos (Key (I)) - Offset);
Put (", ");
Put (
Integer'(Wide_Wide_Character'Pos (Key (L)))
- Integer'(Wide_Wide_Character'Pos (Key (I)))
+ 1,
Width => 1);
Put (", ");
Put (EAW_Property_Names.To_String (EAW));
Put (")");
if Has_Element (N) then
if State = In_XXXX
and then Key (N) > Wide_Wide_Character'Val (16#FFFF#)
then
State := In_1XXXX;
Offset := 16#10000#;
Put (");");
New_Line;
New_Line;
Put_Line (" Table_1XXXX : constant Table_1XXXX_Type := (");
elsif State = In_1XXXX
and then Key (N) > Wide_Wide_Character'Val (16#1FFFF#)
then
State := In_XXXXXXXX;
Offset := 0;
Put (");");
New_Line;
New_Line;
Put_Line (" Table_XXXXXXXX : constant Table_XXXXXXXX_Type := (");
else
Put (",");
New_Line;
end if;
else
Put (");");
New_Line;
end if;
I := N;
end;
end loop;
end;
New_Line;
Put_Line ("end Ada.UCD.East_Asian_Width;");
end ucd_eastasianwidth;
|
pragma Style_Checks (Off);
-- This spec has been automatically generated from STM32H743x.svd
pragma Restrictions (No_Elaboration_Code);
with HAL;
with System;
package STM32_SVD.CRS is
pragma Preelaborate;
---------------
-- Registers --
---------------
subtype CR_TRIM_Field is HAL.UInt6;
-- CRS control register
type CR_Register is record
-- SYNC event OK interrupt enable
SYNCOKIE : Boolean := False;
-- SYNC warning interrupt enable
SYNCWARNIE : Boolean := False;
-- Synchronization or trimming error interrupt enable
ERRIE : Boolean := False;
-- Expected SYNC interrupt enable
ESYNCIE : Boolean := False;
-- unspecified
Reserved_4_4 : HAL.Bit := 16#0#;
-- Frequency error counter enable This bit enables the oscillator clock
-- for the frequency error counter. When this bit is set, the CRS_CFGR
-- register is write-protected and cannot be modified.
CEN : Boolean := False;
-- Automatic trimming enable This bit enables the automatic hardware
-- adjustment of TRIM bits according to the measured frequency error
-- between two SYNC events. If this bit is set, the TRIM bits are
-- read-only. The TRIM value can be adjusted by hardware by one or two
-- steps at a time, depending on the measured frequency error value.
-- Refer to Section7.3.4: Frequency error evaluation and automatic
-- trimming for more details.
AUTOTRIMEN : Boolean := False;
-- Read-only. Generate software SYNC event This bit is set by software
-- in order to generate a software SYNC event. It is automatically
-- cleared by hardware.
SWSYNC : Boolean := False;
-- HSI48 oscillator smooth trimming These bits provide a
-- user-programmable trimming value to the HSI48 oscillator. They can be
-- programmed to adjust to variations in voltage and temperature that
-- influence the frequency of the HSI48. The default value is 32, which
-- corresponds to the middle of the trimming interval. The trimming step
-- is around 67 kHz between two consecutive TRIM steps. A higher TRIM
-- value corresponds to a higher output frequency. When the AUTOTRIMEN
-- bit is set, this field is controlled by hardware and is read-only.
TRIM : CR_TRIM_Field := 16#20#;
-- unspecified
Reserved_14_31 : HAL.UInt18 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CR_Register use record
SYNCOKIE at 0 range 0 .. 0;
SYNCWARNIE at 0 range 1 .. 1;
ERRIE at 0 range 2 .. 2;
ESYNCIE at 0 range 3 .. 3;
Reserved_4_4 at 0 range 4 .. 4;
CEN at 0 range 5 .. 5;
AUTOTRIMEN at 0 range 6 .. 6;
SWSYNC at 0 range 7 .. 7;
TRIM at 0 range 8 .. 13;
Reserved_14_31 at 0 range 14 .. 31;
end record;
subtype CFGR_RELOAD_Field is HAL.UInt16;
subtype CFGR_FELIM_Field is HAL.UInt8;
subtype CFGR_SYNCDIV_Field is HAL.UInt3;
subtype CFGR_SYNCSRC_Field is HAL.UInt2;
-- This register can be written only when the frequency error counter is
-- disabled (CEN bit is cleared in CRS_CR). When the counter is enabled,
-- this register is write-protected.
type CFGR_Register is record
-- Counter reload value RELOAD is the value to be loaded in the
-- frequency error counter with each SYNC event. Refer to Section7.3.3:
-- Frequency error measurement for more details about counter behavior.
RELOAD : CFGR_RELOAD_Field := 16#BB7F#;
-- Frequency error limit FELIM contains the value to be used to evaluate
-- the captured frequency error value latched in the FECAP[15:0] bits of
-- the CRS_ISR register. Refer to Section7.3.4: Frequency error
-- evaluation and automatic trimming for more details about FECAP
-- evaluation.
FELIM : CFGR_FELIM_Field := 16#22#;
-- SYNC divider These bits are set and cleared by software to control
-- the division factor of the SYNC signal.
SYNCDIV : CFGR_SYNCDIV_Field := 16#0#;
-- unspecified
Reserved_27_27 : HAL.Bit := 16#0#;
-- SYNC signal source selection These bits are set and cleared by
-- software to select the SYNC signal source. Note: When using USB LPM
-- (Link Power Management) and the device is in Sleep mode, the periodic
-- USB SOF will not be generated by the host. No SYNC signal will
-- therefore be provided to the CRS to calibrate the HSI48 on the run.
-- To guarantee the required clock precision after waking up from Sleep
-- mode, the LSE or reference clock on the GPIOs should be used as SYNC
-- signal.
SYNCSRC : CFGR_SYNCSRC_Field := 16#2#;
-- unspecified
Reserved_30_30 : HAL.Bit := 16#0#;
-- SYNC polarity selection This bit is set and cleared by software to
-- select the input polarity for the SYNC signal source.
SYNCPOL : Boolean := False;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CFGR_Register use record
RELOAD at 0 range 0 .. 15;
FELIM at 0 range 16 .. 23;
SYNCDIV at 0 range 24 .. 26;
Reserved_27_27 at 0 range 27 .. 27;
SYNCSRC at 0 range 28 .. 29;
Reserved_30_30 at 0 range 30 .. 30;
SYNCPOL at 0 range 31 .. 31;
end record;
subtype ISR_FECAP_Field is HAL.UInt16;
-- CRS interrupt and status register
type ISR_Register is record
-- Read-only. SYNC event OK flag This flag is set by hardware when the
-- measured frequency error is smaller than FELIM * 3. This means that
-- either no adjustment of the TRIM value is needed or that an
-- adjustment by one trimming step is enough to compensate the frequency
-- error. An interrupt is generated if the SYNCOKIE bit is set in the
-- CRS_CR register. It is cleared by software by setting the SYNCOKC bit
-- in the CRS_ICR register.
SYNCOKF : Boolean;
-- Read-only. SYNC warning flag This flag is set by hardware when the
-- measured frequency error is greater than or equal to FELIM * 3, but
-- smaller than FELIM * 128. This means that to compensate the frequency
-- error, the TRIM value must be adjusted by two steps or more. An
-- interrupt is generated if the SYNCWARNIE bit is set in the CRS_CR
-- register. It is cleared by software by setting the SYNCWARNC bit in
-- the CRS_ICR register.
SYNCWARNF : Boolean;
-- Read-only. Error flag This flag is set by hardware in case of any
-- synchronization or trimming error. It is the logical OR of the
-- TRIMOVF, SYNCMISS and SYNCERR bits. An interrupt is generated if the
-- ERRIE bit is set in the CRS_CR register. It is cleared by software in
-- reaction to setting the ERRC bit in the CRS_ICR register, which
-- clears the TRIMOVF, SYNCMISS and SYNCERR bits.
ERRF : Boolean;
-- Read-only. Expected SYNC flag This flag is set by hardware when the
-- frequency error counter reached a zero value. An interrupt is
-- generated if the ESYNCIE bit is set in the CRS_CR register. It is
-- cleared by software by setting the ESYNCC bit in the CRS_ICR
-- register.
ESYNCF : Boolean;
-- unspecified
Reserved_4_7 : HAL.UInt4;
-- Read-only. SYNC error This flag is set by hardware when the SYNC
-- pulse arrives before the ESYNC event and the measured frequency error
-- is greater than or equal to FELIM * 128. This means that the
-- frequency error is too big (internal frequency too low) to be
-- compensated by adjusting the TRIM value, and that some other action
-- should be taken. An interrupt is generated if the ERRIE bit is set in
-- the CRS_CR register. It is cleared by software by setting the ERRC
-- bit in the CRS_ICR register.
SYNCERR : Boolean;
-- Read-only. SYNC missed This flag is set by hardware when the
-- frequency error counter reached value FELIM * 128 and no SYNC was
-- detected, meaning either that a SYNC pulse was missed or that the
-- frequency error is too big (internal frequency too high) to be
-- compensated by adjusting the TRIM value, and that some other action
-- should be taken. At this point, the frequency error counter is
-- stopped (waiting for a next SYNC) and an interrupt is generated if
-- the ERRIE bit is set in the CRS_CR register. It is cleared by
-- software by setting the ERRC bit in the CRS_ICR register.
SYNCMISS : Boolean;
-- Read-only. Trimming overflow or underflow This flag is set by
-- hardware when the automatic trimming tries to over- or under-flow the
-- TRIM value. An interrupt is generated if the ERRIE bit is set in the
-- CRS_CR register. It is cleared by software by setting the ERRC bit in
-- the CRS_ICR register.
TRIMOVF : Boolean;
-- unspecified
Reserved_11_14 : HAL.UInt4;
-- Read-only. Frequency error direction FEDIR is the counting direction
-- of the frequency error counter latched in the time of the last SYNC
-- event. It shows whether the actual frequency is below or above the
-- target.
FEDIR : Boolean;
-- Read-only. Frequency error capture FECAP is the frequency error
-- counter value latched in the time of the last SYNC event. Refer to
-- Section7.3.4: Frequency error evaluation and automatic trimming for
-- more details about FECAP usage.
FECAP : ISR_FECAP_Field;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for ISR_Register use record
SYNCOKF at 0 range 0 .. 0;
SYNCWARNF at 0 range 1 .. 1;
ERRF at 0 range 2 .. 2;
ESYNCF at 0 range 3 .. 3;
Reserved_4_7 at 0 range 4 .. 7;
SYNCERR at 0 range 8 .. 8;
SYNCMISS at 0 range 9 .. 9;
TRIMOVF at 0 range 10 .. 10;
Reserved_11_14 at 0 range 11 .. 14;
FEDIR at 0 range 15 .. 15;
FECAP at 0 range 16 .. 31;
end record;
-- CRS interrupt flag clear register
type ICR_Register is record
-- SYNC event OK clear flag Writing 1 to this bit clears the SYNCOKF
-- flag in the CRS_ISR register.
SYNCOKC : Boolean := False;
-- SYNC warning clear flag Writing 1 to this bit clears the SYNCWARNF
-- flag in the CRS_ISR register.
SYNCWARNC : Boolean := False;
-- Error clear flag Writing 1 to this bit clears TRIMOVF, SYNCMISS and
-- SYNCERR bits and consequently also the ERRF flag in the CRS_ISR
-- register.
ERRC : Boolean := False;
-- Expected SYNC clear flag Writing 1 to this bit clears the ESYNCF flag
-- in the CRS_ISR register.
ESYNCC : 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 ICR_Register use record
SYNCOKC at 0 range 0 .. 0;
SYNCWARNC at 0 range 1 .. 1;
ERRC at 0 range 2 .. 2;
ESYNCC at 0 range 3 .. 3;
Reserved_4_31 at 0 range 4 .. 31;
end record;
-----------------
-- Peripherals --
-----------------
-- CRS
type CRS_Peripheral is record
-- CRS control register
CR : aliased CR_Register;
-- This register can be written only when the frequency error counter is
-- disabled (CEN bit is cleared in CRS_CR). When the counter is enabled,
-- this register is write-protected.
CFGR : aliased CFGR_Register;
-- CRS interrupt and status register
ISR : aliased ISR_Register;
-- CRS interrupt flag clear register
ICR : aliased ICR_Register;
end record
with Volatile;
for CRS_Peripheral use record
CR at 16#0# range 0 .. 31;
CFGR at 16#4# range 0 .. 31;
ISR at 16#8# range 0 .. 31;
ICR at 16#C# range 0 .. 31;
end record;
-- CRS
CRS_Periph : aliased CRS_Peripheral
with Import, Address => CRS_Base;
end STM32_SVD.CRS;
|
with Ada.Numerics.Discrete_Random;
procedure Generic_Shuffle (List : in out Array_Type) is
package Discrete_Random is new Ada.Numerics.Discrete_Random(Result_Subtype => Integer);
use Discrete_Random;
K : Integer;
G : Generator;
T : Element_Type;
begin
Reset (G);
for I in reverse List'Range loop
K := (Random(G) mod I) + 1;
T := List(I);
List(I) := List(K);
List(K) := T;
end loop;
end Generic_Shuffle;
|
-- This file is generated by SWIG. Please do not modify by hand.
--
with Interfaces;
with Interfaces.C;
with Interfaces.C.Pointers;
package xcb.xcb_ungrab_keyboard_request_t is
-- Item
--
type Item is record
major_opcode : aliased Interfaces.Unsigned_8;
pad0 : aliased Interfaces.Unsigned_8;
length : aliased Interfaces.Unsigned_16;
time : aliased xcb.xcb_timestamp_t;
end record;
-- Item_Array
--
type Item_Array is
array
(Interfaces.C
.size_t range <>) of aliased xcb.xcb_ungrab_keyboard_request_t
.Item;
-- Pointer
--
package C_Pointers is new Interfaces.C.Pointers
(Index => Interfaces.C.size_t,
Element => xcb.xcb_ungrab_keyboard_request_t.Item,
Element_Array => xcb.xcb_ungrab_keyboard_request_t.Item_Array,
Default_Terminator => (others => <>));
subtype Pointer is C_Pointers.Pointer;
-- Pointer_Array
--
type Pointer_Array is
array
(Interfaces.C
.size_t range <>) of aliased xcb.xcb_ungrab_keyboard_request_t
.Pointer;
-- Pointer_Pointer
--
package C_Pointer_Pointers is new Interfaces.C.Pointers
(Index => Interfaces.C.size_t,
Element => xcb.xcb_ungrab_keyboard_request_t.Pointer,
Element_Array => xcb.xcb_ungrab_keyboard_request_t.Pointer_Array,
Default_Terminator => null);
subtype Pointer_Pointer is C_Pointer_Pointers.Pointer;
end xcb.xcb_ungrab_keyboard_request_t;
|
with System.Machine_Code; use System.Machine_Code;
with STM32_SVD.Flash; use STM32_SVD.Flash;
with STM32_SVD; use STM32_SVD;
with System;
package body Flash is
procedure Init is
begin
null;
end Init;
procedure Unlock is
begin
Flash_Periph.KEYR := 16#4567_0123#;
Flash_Periph.KEYR := 16#CDEF_89AB#;
end Unlock;
procedure Lock is
begin
Flash_Periph.CR.PER := 0;
Flash_Periph.CR.PG := 0;
Flash_Periph.CR.LOCK := 1;
end Lock;
procedure Erase (Addr : Unsigned_32) is
begin
Flash_Periph.CR.PER := 1;
Flash_Periph.AR := UInt32 (Addr);
Flash_Periph.CR.STRT := 1;
Wait_Until_Ready;
Flash_Periph.CR.PER := 0;
end Erase;
procedure Enable_Write is
begin
Flash_Periph.CR.PG := 1;
end Enable_Write;
procedure Write (Addr : Unsigned_32; Value : Unsigned_16) is
begin
Asm ("strh r1, [r0]", Volatile => True);
Wait_Until_Ready;
end Write;
function Read (Addr : Unsigned_32) return Unsigned_16 is
V : Unsigned_16;
begin
Asm ("ldrh %1, [%0]",
Inputs => Unsigned_32'Asm_Input ("r", Addr),
Outputs => Unsigned_16'Asm_Output ("=r", V));
return V;
end Read;
procedure Wait_Until_Ready is
begin
while Flash_Periph.SR.BSY = 1 loop null; end loop;
while Flash_Periph.SR.EOP = 0 loop null; end loop;
Flash_Periph.SR.EOP := 1;
end Wait_Until_Ready;
end Flash;
|
------------------------------------------------------------------------------
-- --
-- GNAT ncurses Binding Samples --
-- --
-- ncurses --
-- --
-- B O D Y --
-- --
------------------------------------------------------------------------------
-- Copyright (c) 2000,2006 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
-- "Software"), to deal in the Software without restriction, including --
-- without limitation the rights to use, copy, modify, merge, publish, --
-- distribute, distribute with modifications, sublicense, and/or sell --
-- copies of the Software, and to permit persons to whom the Software is --
-- furnished to do so, subject to the following conditions: --
-- --
-- The above copyright notice and this permission notice shall be included --
-- in all copies or substantial portions of the Software. --
-- --
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS --
-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF --
-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. --
-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, --
-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR --
-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR --
-- THE USE OR OTHER DEALINGS IN THE SOFTWARE. --
-- --
-- Except as contained in this notice, the name(s) of the above copyright --
-- holders shall not be used in advertising or otherwise to promote the --
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
------------------------------------------------------------------------------
-- Author: Eugene V. Melaragno <aldomel@ix.netcom.com> 2000
-- Version Control
-- $Revision: 1.2 $
-- $Date: 2006/06/25 14:24:40 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Ada.Text_IO; use Ada.Text_IO;
with Ada.Strings.Bounded;
use Ada.Strings.Bounded;
with Interfaces.C; use Interfaces.C;
with Interfaces.C.Strings; use Interfaces.C.Strings;
with Terminal_Interface.Curses;
generic
Max : Natural;
-- type mystring is private;
-- type myint is
package ncurses2.genericPuts is
package BS is new
Ada.Strings.Bounded.Generic_Bounded_Length (Max);
use BS;
procedure myGet (Win : in Terminal_Interface.Curses.Window
:= Terminal_Interface.Curses.Standard_Window;
Str : out BS.Bounded_String;
Len : in Integer := -1);
procedure myPut (Str : out BS.Bounded_String;
i : Integer;
Base : in Number_Base := 10);
-- the default should be Ada.Text_IO.Integer_IO.Default_Base
-- but Default_Base is hidden in the generic so doesn't exist!
procedure myAdd (Str : BS.Bounded_String);
procedure Fill_String (Cp : in chars_ptr; Str : out BS.Bounded_String);
end ncurses2.genericPuts;
|
-- SPDX-License-Identifier: Apache-2.0
--
-- Copyright (c) 2016 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 Orka.SIMD.SSE.Singles;
with Orka.SIMD.SSE2.Doubles;
package Orka.SIMD.AVX.Doubles.Swizzle is
pragma Pure;
use SIMD.SSE2.Doubles;
use SIMD.SSE.Singles;
function Shuffle_Within_Lanes (Left, Right : m256d; Mask : Unsigned_32) return m256d
with Import, Convention => Intrinsic, External_Name => "__builtin_ia32_shufpd256";
-- Shuffle the 64-bit doubles in Left and Right per 128-bit lane
-- using the given Mask. The first and third doubles are retrieved
-- from Left. The second and fourth doubles are retrieved from Right:
--
-- Result (1) := if Mask (a) = 0 then Left (1) else Left (2)
-- Result (2) := if Mask (b) = 0 then Right (1) else Right (2)
-- Result (3) := if Mask (c) = 0 then Left (3) else Left (4)
-- Result (4) := if Mask (d) = 0 then Right (3) else Right (4)
--
-- The compiler needs access to the Mask at compile-time, thus construct it
-- as follows:
--
-- Mask_a_b_c_d : constant Unsigned_32 := a or b * 2 or c * 4 or d * 8;
--
-- or by simply writing 2#dcba#. a, b, c, and d must be either 0 or 1.
-- a and c select the doubles to use from Left, b and d from Right.
--
-- Warning: shuffling works per 128-bit lane. An element cannot be
-- shuffled to the other half.
function Unpack_High (Left, Right : m256d) return m256d
with Import, Convention => Intrinsic, External_Name => "__builtin_ia32_unpckhpd256";
-- Unpack and interleave the 64-bit doubles from the upper halves of
-- the 128-bit lanes of Left and Right as follows:
-- Left (2), Right (2), Left (4), Right (4)
function Unpack_Low (Left, Right : m256d) return m256d
with Import, Convention => Intrinsic, External_Name => "__builtin_ia32_unpcklpd256";
-- Unpack and interleave the 64-bit doubles from the lower halves of
-- the 128-bit lanes of Left and Right as follows:
-- Left (1), Right (1), Left (3), Right (3)
function Duplicate (Elements : m256d) return m256d
with Import, Convention => Intrinsic, External_Name => "__builtin_ia32_movddup256";
-- Duplicate first and third element as follows:
-- Elements (1), Elements (1), Elements (3), Elements (3)
function Duplicate_LH (Elements : m256d) return m256d
with Inline;
function Duplicate_HL (Elements : m256d) return m256d
with Inline;
procedure Transpose (Matrix : in out m256d_Array)
with Inline;
function Transpose (Matrix : m256d_Array) return m256d_Array
with Inline;
function Blend (Left, Right : m256d; Mask : Unsigned_32) return m256d
with Import, Convention => Intrinsic, External_Name => "__builtin_ia32_blendpd256";
-- Select elements from two sources (Left and Right) using a constant mask.
--
-- The compiler needs access to the Mask at compile-time, thus construct it
-- as follows:
--
-- Mask_a_b_c_d : constant Unsigned_32 := a or b * 2 or c * 4 or d * 8;
--
-- or by simply writing 2#dcba#. a, b, c, and d must be either 0 or 1.
function Blend (Left, Right, Mask : m256d) return m256d
with Import, Convention => Intrinsic, External_Name => "__builtin_ia32_blendvpd256";
-- Select elements from two sources (Left and Right) using a variable mask
function Cast (Elements : m256d) return m128d
with Import, Convention => Intrinsic, External_Name => "__builtin_ia32_pd_pd256";
function Convert (Elements : m256d) return m128
with Import, Convention => Intrinsic, External_Name => "__builtin_ia32_cvtpd2ps256";
function Convert (Elements : m128) return m256d
with Import, Convention => Intrinsic, External_Name => "__builtin_ia32_cvtps2pd256";
function Extract (Elements : m256d; Mask : Unsigned_32) return m128d
with Import, Convention => Intrinsic, External_Name => "__builtin_ia32_vextractf128_pd256";
-- Extract 128-bit from either the lower half (Mask = 0) or upper
-- half (Mask = 1)
function Insert (Left : m256d; Right : m128d; Mask : Unsigned_32) return m256d
with Import, Convention => Intrinsic, External_Name => "__builtin_ia32_vinsertf128_pd256";
-- Insert Right into the lower half (Mask = 0) or upper half (Mask = 1)
function Permute (Elements : m128d; Mask : Unsigned_32) return m128d
with Import, Convention => Intrinsic, External_Name => "__builtin_ia32_vpermilpd";
-- Shuffle the 64-bit doubles in Elements. Similar to Shuffle (Elements, Elements, Mask):
--
-- Result (1) := if Mask (a) = 0 then Elements (1) else Elements (2)
-- Result (2) := if Mask (b) = 0 then Elements (1) else Elements (2)
--
-- The compiler needs access to the Mask at compile-time, thus construct it
-- as follows:
--
-- Mask_a_b : constant Unsigned_32 := a or b * 2;
--
-- or by simply writing 2#ba#. a and b must be either 0 or 1.
function Permute_Within_Lanes (Elements : m256d; Mask : Unsigned_32) return m256d
with Import, Convention => Intrinsic, External_Name => "__builtin_ia32_vpermilpd256";
-- Shuffle elements within the two 128-bit lanes. Similar to
-- Shuffle_Within_Lanes (Elements, Elements, Mask):
--
-- Result (1) := if Mask (a) = 0 then Elements (1) else Elements (2)
-- Result (2) := if Mask (b) = 0 then Elements (1) else Elements (2)
-- Result (3) := if Mask (c) = 0 then Elements (3) else Elements (4)
-- Result (4) := if Mask (d) = 0 then Elements (3) else Elements (4)
--
-- The compiler needs access to the Mask at compile-time, thus construct it
-- as follows:
--
-- Mask_a_b_c_d : constant Unsigned_32 := a or b * 2 or c * 4 or d * 8;
--
-- or by simply writing 2#dcba#. a, b, c, and d must be either 0 or 1.
function Permute_Lanes (Left, Right : m256d; Mask : Unsigned_32) return m256d
with Import, Convention => Intrinsic, External_Name => "__builtin_ia32_vperm2f128_pd256";
-- Shuffle 128-bit lanes.
--
-- Bits 1-2 of Mask are used to control which of the four 128-bit lanes
-- to use for the lower half (128-bit) of the result. Bits 5-6 to select
-- a lane for the upper half of the result:
--
-- 0 => Left (1 .. 2)
-- 1 => Left (3 .. 4)
-- 2 => Right (1 .. 2)
-- 3 => Right (3 .. 4)
--
-- Bits 4 and 8 are used to zero the corresponding half (lower or upper).
--
-- The compiler needs access to the Mask at compile-time, thus construct it
-- as follows:
--
-- Mask_l_u_zl_zu : constant Unsigned_32 := l or u * 16 or zl * 8 or zu * 128;
--
-- u and l are numbers between 0 and 3 (see above). zu and zl are either 0 or 1
-- to zero a lane.
end Orka.SIMD.AVX.Doubles.Swizzle;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
-- --
-- S Y S T E M . T A S K I N G --
-- --
-- B o d y --
-- --
-- Copyright (C) 1992-2020, Free Software Foundation, Inc. --
-- --
-- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNARL was developed by the GNARL team at Florida State University. --
-- Extensive contributions were provided by Ada Core Technologies, Inc. --
-- --
------------------------------------------------------------------------------
with System.Task_Primitives.Operations;
with System.Storage_Elements;
package body System.Tasking is
package STPO renames System.Task_Primitives.Operations;
---------------------
-- Detect_Blocking --
---------------------
function Detect_Blocking return Boolean is
GL_Detect_Blocking : Integer;
pragma Import (C, GL_Detect_Blocking, "__gl_detect_blocking");
-- Global variable exported by the binder generated file. A value equal
-- to 1 indicates that pragma Detect_Blocking is active, while 0 is used
-- for the pragma not being present.
begin
return GL_Detect_Blocking = 1;
end Detect_Blocking;
-----------------------
-- Number_Of_Entries --
-----------------------
function Number_Of_Entries (Self_Id : Task_Id) return Entry_Index is
begin
return Entry_Index (Self_Id.Entry_Num);
end Number_Of_Entries;
----------
-- Self --
----------
function Self return Task_Id renames STPO.Self;
------------------
-- Storage_Size --
------------------
function Storage_Size (T : Task_Id) return System.Parameters.Size_Type is
begin
return
System.Parameters.Size_Type
(T.Common.Compiler_Data.Pri_Stack_Info.Size);
end Storage_Size;
---------------------
-- Initialize_ATCB --
---------------------
procedure Initialize_ATCB
(Self_ID : Task_Id;
Task_Entry_Point : Task_Procedure_Access;
Task_Arg : System.Address;
Parent : Task_Id;
Elaborated : Access_Boolean;
Base_Priority : System.Any_Priority;
Base_CPU : System.Multiprocessors.CPU_Range;
Domain : Dispatching_Domain_Access;
Task_Info : System.Task_Info.Task_Info_Type;
Stack_Size : System.Parameters.Size_Type;
T : Task_Id;
Success : out Boolean)
is
begin
T.Common.State := Unactivated;
-- Initialize T.Common.LL
STPO.Initialize_TCB (T, Success);
if not Success then
return;
end if;
-- Note that use of an aggregate here for this assignment
-- would be illegal, because Common_ATCB is limited because
-- Task_Primitives.Private_Data is limited.
T.Common.Parent := Parent;
T.Common.Base_Priority := Base_Priority;
T.Common.Base_CPU := Base_CPU;
-- The Domain defaults to that of the activator. But that can be null in
-- the case of foreign threads (see Register_Foreign_Thread), in which
-- case we default to the System_Domain.
if Domain /= null then
T.Common.Domain := Domain;
elsif Self_ID.Common.Domain /= null then
T.Common.Domain := Self_ID.Common.Domain;
else
T.Common.Domain := System_Domain;
end if;
pragma Assert (T.Common.Domain /= null);
T.Common.Current_Priority := 0;
T.Common.Protected_Action_Nesting := 0;
T.Common.Call := null;
T.Common.Task_Arg := Task_Arg;
T.Common.Task_Entry_Point := Task_Entry_Point;
T.Common.Activator := Self_ID;
T.Common.Wait_Count := 0;
T.Common.Elaborated := Elaborated;
T.Common.Activation_Failed := False;
T.Common.Task_Info := Task_Info;
T.Common.Global_Task_Lock_Nesting := 0;
T.Common.Fall_Back_Handler := null;
T.Common.Specific_Handler := null;
T.Common.Debug_Events := (others => False);
T.Common.Task_Image_Len := 0;
if T.Common.Parent = null then
-- For the environment task, the adjusted stack size is meaningless.
-- For example, an unspecified Stack_Size means that the stack size
-- is determined by the environment, or can grow dynamically. The
-- Stack_Checking algorithm therefore needs to use the requested
-- size, or 0 in case of an unknown size.
T.Common.Compiler_Data.Pri_Stack_Info.Size :=
Storage_Elements.Storage_Offset (Stack_Size);
else
T.Common.Compiler_Data.Pri_Stack_Info.Size :=
Storage_Elements.Storage_Offset
(Parameters.Adjust_Storage_Size (Stack_Size));
end if;
-- Link the task into the list of all tasks
T.Common.All_Tasks_Link := All_Tasks_List;
All_Tasks_List := T;
end Initialize_ATCB;
----------------
-- Initialize --
----------------
Main_Task_Image : constant String := "main_task";
-- Image of environment task
Main_Priority : Integer;
pragma Import (C, Main_Priority, "__gl_main_priority");
-- Priority for main task. Note that this is of type Integer, not Priority,
-- because we use the value -1 to indicate the default main priority, and
-- that is of course not in Priority'range.
Main_CPU : Integer;
pragma Import (C, Main_CPU, "__gl_main_cpu");
-- Affinity for main task. Note that this is of type Integer, not
-- CPU_Range, because we use the value -1 to indicate the unassigned
-- affinity, and that is of course not in CPU_Range'Range.
Initialized : Boolean := False;
-- Used to prevent multiple calls to Initialize
procedure Initialize is
T : Task_Id;
Base_Priority : Any_Priority;
Base_CPU : System.Multiprocessors.CPU_Range;
Success : Boolean;
use type System.Multiprocessors.CPU_Range;
begin
if Initialized then
return;
end if;
Initialized := True;
-- Initialize Environment Task
Base_Priority :=
(if Main_Priority = Unspecified_Priority
then Default_Priority
else Priority (Main_Priority));
Base_CPU :=
(if Main_CPU = Unspecified_CPU
then System.Multiprocessors.Not_A_Specific_CPU
else System.Multiprocessors.CPU_Range (Main_CPU));
-- At program start-up the environment task is allocated to the default
-- system dispatching domain.
-- Make sure that the processors which are not available are not taken
-- into account. Use Number_Of_CPUs to know the exact number of
-- processors in the system at execution time.
System_Domain :=
new Dispatching_Domain'
(Multiprocessors.CPU'First .. Multiprocessors.Number_Of_CPUs =>
True);
T := STPO.New_ATCB (0);
Initialize_ATCB
(Self_ID => null,
Task_Entry_Point => null,
Task_Arg => Null_Address,
Parent => Null_Task,
Elaborated => null,
Base_Priority => Base_Priority,
Base_CPU => Base_CPU,
Domain => System_Domain,
Task_Info => Task_Info.Unspecified_Task_Info,
Stack_Size => 0,
T => T,
Success => Success);
pragma Assert (Success);
STPO.Initialize (T);
STPO.Set_Priority (T, T.Common.Base_Priority);
T.Common.State := Runnable;
T.Common.Task_Image_Len := Main_Task_Image'Length;
T.Common.Task_Image (Main_Task_Image'Range) := Main_Task_Image;
Dispatching_Domain_Tasks :=
new Array_Allocated_Tasks'
(Multiprocessors.CPU'First .. Multiprocessors.Number_Of_CPUs => 0);
-- Signal that this task is being allocated to a processor
if Base_CPU /= System.Multiprocessors.Not_A_Specific_CPU then
-- Increase the number of tasks attached to the CPU to which this
-- task is allocated.
Dispatching_Domain_Tasks (Base_CPU) :=
Dispatching_Domain_Tasks (Base_CPU) + 1;
end if;
-- The full initialization of the environment task's Entry_Calls array
-- is deferred to Init_RTS because only the first element of the array
-- is used by the restricted Ravenscar runtime.
T.Entry_Calls (T.Entry_Calls'First).Self := T;
T.Entry_Calls (T.Entry_Calls'First).Level := T.Entry_Calls'First;
end Initialize;
end System.Tasking;
|
with numbers; use numbers;
with strings; use strings;
package address is
type pos_addr_t is tagged private;
null_pos_addr : constant pos_addr_t;
error_address_odd : exception;
function create (value : word) return pos_addr_t;
procedure set (pos_addr : in out pos_addr_t; value : word);
function get (pos_addr : pos_addr_t) return word;
function valid_value_for_pos_addr (value : word) return boolean;
procedure inc (pos_addr : in out pos_addr_t);
function inc (pos_addr : pos_addr_t) return pos_addr_t;
procedure dec (pos_addr : in out pos_addr_t);
function "<" (a, b : pos_addr_t) return boolean;
function "<=" (a, b : pos_addr_t) return boolean;
function ">" (a, b : pos_addr_t) return boolean;
function ">=" (a, b : pos_addr_t) return boolean;
function "-" (a, b : pos_addr_t) return pos_addr_t;
function "+" (a, b : pos_addr_t) return pos_addr_t;
function "*" (a, b : pos_addr_t) return pos_addr_t;
function "/" (a, b : pos_addr_t) return pos_addr_t;
function "+" (a: pos_addr_t; b : natural) return pos_addr_t;
function "+" (a: pos_addr_t; b : word) return pos_addr_t;
private
use type word;
type pos_addr_t is tagged record
addr : word;
end record;
null_pos_addr : constant pos_addr_t := (addr => 16#ffff#);
end address;
|
package Agar.Core.Config is
function Load return Boolean;
function Save return Boolean;
end Agar.Core.Config;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- S Y S T E M . W I D _ B O O L --
-- --
-- S p e c --
-- --
-- Copyright (C) 1992-2005, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 2, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING. If not, write --
-- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
-- Boston, MA 02110-1301, USA. --
-- --
-- As a special exception, if other files instantiate generics from this --
-- unit, or you link this unit with other files to produce an executable, --
-- this unit does not by itself cause the resulting executable to be --
-- covered by the GNU General Public License. This exception does not --
-- however invalidate any other reasons why the executable file might be --
-- covered by the GNU Public License. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- This package contains the routine used for Boolean'Width
package System.Wid_Bool is
pragma Pure;
function Width_Boolean (Lo, Hi : Boolean) return Natural;
-- Compute Width attribute for non-static type derived from Boolean.
-- The arguments are the low and high bounds for the type.
end System.Wid_Bool;
|
with Varsize3_Pkg1; use Varsize3_Pkg1;
package Varsize3_1 is
pragma Elaborate_Body;
Filter : constant Object := True;
end Varsize3_1;
|
-- C34014P.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 A DERIVED OPERATOR IS VISIBLE AND FURTHER DERIVABLE
-- UNDER APPROPRIATE CIRCUMSTANCES.
-- CHECK WHEN THE DERIVED OPERATOR IS IMPLICITLY DECLARED IN THE
-- VISIBLE PART OF A PACKAGE AND A HOMOGRAPHIC OPERATOR IS LATER
-- DECLARED EXPLICITLY IN THE PRIVATE PART.
-- HISTORY:
-- JRK 09/22/87 CREATED ORIGINAL TEST.
-- GJD 11/15/95 REMOVED ADA 83 INCOMPATIBILITIES.
-- PWN 04/11/96 Restored subtests in Ada95 legal format.
WITH REPORT; USE REPORT;
PROCEDURE C34014P IS
PACKAGE P IS
TYPE T IS RANGE -100 .. 100;
FUNCTION "+" (X : T) RETURN T;
END P;
USE P;
PACKAGE BODY P IS
FUNCTION "+" (X : T) RETURN T IS
BEGIN
RETURN X + T (IDENT_INT (1));
END "+";
END P;
BEGIN
TEST ("C34014P", "CHECK THAT A DERIVED OPERATOR IS VISIBLE " &
"AND FURTHER DERIVABLE UNDER APPROPRIATE " &
"CIRCUMSTANCES. CHECK WHEN THE DERIVED " &
"OPERATOR IS IMPLICITLY DECLARED IN THE " &
"VISIBLE PART OF A PACKAGE AND A HOMOGRAPHIC " &
"OPERATOR IS LATER DECLARED EXPLICITLY IN " &
"THE PRIVATE PART");
-----------------------------------------------------------------
COMMENT ("NEW OPERATOR DECLARED BY SUBPROGRAM DECLARATION");
DECLARE
PACKAGE Q IS
TYPE QT IS NEW T;
X : QT := +0;
PRIVATE
FUNCTION "+" (Y : QT) RETURN QT;
TYPE QR IS
RECORD
C : QT := +0;
END RECORD;
TYPE QS IS NEW QT;
END Q;
USE Q;
PACKAGE BODY Q IS
FUNCTION "+" (Y : QT) RETURN QT IS
BEGIN
RETURN Y + QT (IDENT_INT (2));
END "+";
PACKAGE R IS
Y : QR;
Z : QS := +0;
END R;
USE R;
BEGIN
IF X /= 1 THEN
FAILED ("OLD OPERATOR NOT VISIBLE - SUBPROG " &
"DECL - 1");
END IF;
IF Y.C /= 2 THEN
FAILED ("NEW OPERATOR NOT VISIBLE - SUBPROG " &
"DECL");
END IF;
IF Z /= 2 THEN
FAILED ("OLD OPERATOR NOT DERIVED - SUBPROG " &
"DECL - 1");
END IF;
END Q;
PACKAGE R IS
Y : QT := +0;
TYPE RT IS NEW QT;
Z : RT := +0;
END R;
USE R;
BEGIN
IF Y /= 1 THEN
FAILED ("OLD OPERATOR NOT VISIBLE - SUBPROG DECL - 2");
END IF;
IF Z /= 1 THEN
FAILED ("OLD OPERATOR NOT DERIVED - SUBPROG DECL - 2");
END IF;
END;
-----------------------------------------------------------------
COMMENT ("NEW OPERATOR DECLARED BY RENAMING");
DECLARE
PACKAGE Q IS
TYPE QT IS NEW T;
X : QT := +0;
PRIVATE
FUNCTION G (X : QT) RETURN QT;
FUNCTION "+" (Y : QT) RETURN QT RENAMES G;
TYPE QR IS
RECORD
C : QT := +0;
END RECORD;
TYPE QS IS NEW QT;
END Q;
USE Q;
PACKAGE BODY Q IS
FUNCTION G (X : QT) RETURN QT IS
BEGIN
RETURN X + QT (IDENT_INT (2));
END G;
PACKAGE R IS
Y : QR;
Z : QS := +0;
END R;
USE R;
BEGIN
IF X /= 1 THEN
FAILED ("OLD OPERATOR NOT VISIBLE - RENAMING - " &
"1");
END IF;
IF Y.C /= 2 THEN
FAILED ("NEW OPERATOR NOT VISIBLE - RENAMING");
END IF;
IF Z /= 2 THEN
FAILED ("OLD OPERATOR NOT DERIVED - RENAMING - " &
"1");
END IF;
END Q;
PACKAGE R IS
Y : QT := +0;
TYPE RT IS NEW QT;
Z : RT := +0;
END R;
USE R;
BEGIN
IF Y /= 1 THEN
FAILED ("OLD OPERATOR NOT VISIBLE - RENAMING - 2");
END IF;
IF Z /= 1 THEN
FAILED ("OLD OPERATOR NOT DERIVED - RENAMING - 2");
END IF;
END;
-----------------------------------------------------------------
COMMENT ("NEW OPERATOR DECLARED BY GENERIC INSTANTIATION");
DECLARE
GENERIC
TYPE T IS RANGE <>;
FUNCTION G (Y : T) RETURN T;
FUNCTION G (Y : T) RETURN T IS
BEGIN
RETURN Y + T (IDENT_INT (2));
END G;
PACKAGE Q IS
TYPE QT IS NEW T;
X : QT := +0;
PRIVATE
FUNCTION "+" IS NEW G (QT);
W : QT := +0;
TYPE QS IS NEW QT;
Z : QS := +0;
END Q;
USE Q;
PACKAGE BODY Q IS
BEGIN
IF X /= 1 THEN
FAILED ("OLD OPERATOR NOT VISIBLE - " &
"INSTANTIATION - 1");
END IF;
IF W /= 2 THEN
FAILED ("NEW OPERATOR NOT VISIBLE - " &
"INSTANTIATION");
END IF;
IF Z /= 2 THEN
FAILED ("OLD OPERATOR NOT DERIVED - " &
"INSTANTIATION - 1");
END IF;
END Q;
PACKAGE R IS
Y : QT := +0;
TYPE RT IS NEW QT;
Z : RT := +0;
END R;
USE R;
BEGIN
IF Y /= 1 THEN
FAILED ("OLD OPERATOR NOT VISIBLE - INSTANTIATION - " &
"2");
END IF;
IF Z /= 1 THEN
FAILED ("OLD OPERATOR NOT DERIVED - INSTANTIATION - " &
"2");
END IF;
END;
-----------------------------------------------------------------
RESULT;
END C34014P;
|
-----------------------------------------------------------------------
-- util-dates-iso8601 -- ISO8601 dates
-- Copyright (C) 2011, 2013, 2015, 2016, 2017, 2018, 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.
-----------------------------------------------------------------------
package body Util.Dates.ISO8601 is
-- ------------------------------
-- Parses an ISO8601 date and return it as a calendar time.
-- Raises Constraint_Error if the date format is not recognized.
-- ------------------------------
function Value (Date : in String) return Ada.Calendar.Time is
use Ada.Calendar;
use Ada.Calendar.Formatting;
use Ada.Calendar.Time_Zones;
Result : Date_Record;
Pos : Natural;
begin
if Date'Length < 4 then
raise Constraint_Error with "Invalid date";
end if;
Result.Hour := 0;
Result.Minute := 0;
Result.Second := 0;
Result.Sub_Second := 0.0;
Result.Time_Zone := 0;
Result.Year := Year_Number'Value (Date (Date'First .. Date'First + 3));
if Date'Length = 4 then
-- ISO8601 date: YYYY
Result.Month := 1;
Result.Month_Day := 1;
elsif Date'Length = 7 and Date (Date'First + 4) = '-' then
-- ISO8601 date: YYYY-MM
Result.Month := Month_Number'Value (Date (Date'First + 5 .. Date'Last));
Result.Month_Day := 1;
elsif Date'Length = 8 then
-- ISO8601 date: YYYYMMDD
Result.Month := Month_Number'Value (Date (Date'First + 4 .. Date'First + 5));
Result.Month_Day := Day_Number'Value (Date (Date'First + 6 .. Date'First + 7));
elsif Date'Length >= 9 and then Date (Date'First + 4) = '-'
and then Date (Date'First + 7) = '-'
then
-- ISO8601 date: YYYY-MM-DD
Result.Month := Month_Number'Value (Date (Date'First + 5 .. Date'First + 6));
Result.Month_Day := Day_Number'Value (Date (Date'First + 8 .. Date'First + 9));
-- ISO8601 date: YYYY-MM-DDTHH
if Date'Length > 12 then
if Date (Date'First + 10) /= 'T' then
raise Constraint_Error with "invalid date";
end if;
Result.Hour := Hour_Number'Value (Date (Date'First + 11 .. Date'First + 12));
Pos := Date'First + 13;
end if;
if Date'Length > 15 then
if Date (Date'First + 13) /= ':' then
raise Constraint_Error with "invalid date";
end if;
Result.Minute := Minute_Number'Value (Date (Date'First + 14 .. Date'First + 15));
Pos := Date'First + 16;
end if;
if Date'Length >= 17 then
if Date (Date'First + 16) /= ':' or else Date'Length <= 18 then
raise Constraint_Error with "invalid date";
end if;
Result.Second := Second_Number'Value (Date (Date'First + 17 .. Date'First + 18));
Pos := Date'First + 19;
if Pos <= Date'Last then
if Date (Pos) = '.' or Date (Pos) = ',' then
if Date'Length < 22 then
raise Constraint_Error with "invalid date";
end if;
declare
Value : constant Natural := Natural'Value (Date (Pos + 1 .. Pos + 3));
begin
Result.Sub_Second := Second_Duration (Duration (Value) / 1000.0);
end;
Pos := Pos + 4;
end if;
if Pos <= Date'Last then
-- ISO8601 timezone: Z
-- ISO8601 timezone: +hh or -hh
-- ISO8601 timezone: +hhmm or -hhmm
-- ISO8601 timezone: +hh:mm or -hh:mm
if Date (Pos) = 'Z' then
if Pos /= Date'Last then
raise Constraint_Error with "invalid date";
end if;
elsif Date (Pos) /= '-' and Date (Pos) /= '+' then
raise Constraint_Error with "invalid date";
elsif Pos + 2 = Date'Last then
Result.Time_Zone := 60 * Time_Offset'Value (Date (Pos + 1 .. Date'Last));
elsif Pos + 4 = Date'Last then
Result.Time_Zone := 60 * Time_Offset'Value (Date (Pos + 1 .. Pos + 2))
+ Time_Offset'Value (Date (Pos + 3 .. Date'Last));
elsif Pos + 5 = Date'Last and then Date (Pos + 3) = ':' then
Result.Time_Zone := 60 * Time_Offset'Value (Date (Pos + 1 .. Pos + 2))
+ Time_Offset'Value (Date (Pos + 4 .. Date'Last));
else
raise Constraint_Error with "invalid date";
end if;
end if;
end if;
end if;
else
raise Constraint_Error with "invalid date";
end if;
return Time_Of (Result);
end Value;
-- ------------------------------
-- Return the ISO8601 date.
-- ------------------------------
function Image (Date : in Ada.Calendar.Time) return String is
D : Date_Record;
begin
Split (D, Date);
return Image (D);
end Image;
function Image (Date : in Date_Record) return String is
To_Char : constant array (0 .. 9) of Character := "0123456789";
Result : String (1 .. 10) := "0000-00-00";
begin
Result (1) := To_Char (Date.Year / 1000);
Result (2) := To_Char (Date.Year / 100 mod 10);
Result (3) := To_Char (Date.Year / 10 mod 10);
Result (4) := To_Char (Date.Year mod 10);
Result (6) := To_Char (Date.Month / 10);
Result (7) := To_Char (Date.Month mod 10);
Result (9) := To_Char (Date.Month_Day / 10);
Result (10) := To_Char (Date.Month_Day mod 10);
return Result;
end Image;
function Image (Date : in Ada.Calendar.Time;
Precision : in Precision_Type) return String is
D : Date_Record;
begin
Split (D, Date);
return Image (D, Precision);
end Image;
function Image (Date : in Date_Record;
Precision : in Precision_Type) return String is
use type Ada.Calendar.Time_Zones.Time_Offset;
To_Char : constant array (0 .. 9) of Character := "0123456789";
Result : String (1 .. 29) := "0000-00-00T00:00:00.000-00:00";
N, Tz : Natural;
begin
Result (1) := To_Char (Date.Year / 1000);
Result (2) := To_Char (Date.Year / 100 mod 10);
Result (3) := To_Char (Date.Year / 10 mod 10);
Result (4) := To_Char (Date.Year mod 10);
if Precision = YEAR then
return Result (1 .. 4);
end if;
Result (6) := To_Char (Date.Month / 10);
Result (7) := To_Char (Date.Month mod 10);
if Precision = MONTH then
return Result (1 .. 7);
end if;
Result (9) := To_Char (Date.Month_Day / 10);
Result (10) := To_Char (Date.Month_Day mod 10);
if Precision = DAY then
return Result (1 .. 10);
end if;
Result (12) := To_Char (Date.Hour / 10);
Result (13) := To_Char (Date.Hour mod 10);
if Precision = HOUR then
return Result (1 .. 13);
end if;
Result (15) := To_Char (Date.Minute / 10);
Result (16) := To_Char (Date.Minute mod 10);
if Precision = MINUTE then
return Result (1 .. 16);
end if;
Result (18) := To_Char (Date.Second / 10);
Result (19) := To_Char (Date.Second mod 10);
if Precision = SECOND then
return Result (1 .. 19);
end if;
N := Natural (Date.Sub_Second * 1000.0);
Result (21) := To_Char (N / 100);
Result (22) := To_Char ((N mod 100) / 10);
Result (23) := To_Char (N mod 10);
if Date.Time_Zone < 0 then
Tz := Natural (-Date.Time_Zone);
else
Result (24) := '+';
Tz := Natural (Date.Time_Zone);
end if;
Result (25) := To_Char (Tz / 600);
Result (26) := To_Char ((Tz / 60) mod 10);
Tz := Tz mod 60;
Result (28) := To_Char (Tz / 10);
Result (29) := To_Char (Tz mod 10);
return Result;
end Image;
end Util.Dates.ISO8601;
|
------------------------------------------------------------------------------
-- --
-- Copyright (C) 2018, Universidad Politécnica de Madrid --
-- --
-- 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.
-- --
------------------------------------------------------------------------------
-- Temperature reading system - main procedure
with Temperature;
procedure Read_Temperature is
begin
Temperature.Start;
end Read_Temperature;
|
-- POK header
--
-- The following file is a part of the POK project. Any modification should
-- be made according to the POK licence. You CANNOT use this file or a part
-- of a file for your own project.
--
-- For more information on the POK licence, please see our LICENCE FILE
--
-- Please follow the coding guidelines described in doc/CODING_GUIDELINES
--
-- Copyright (c) 2007-2022 POK team
pragma No_Run_Time;
with Interfaces.C;
with APEX;
use APEX;
with APEX.Processes;
use APEX.Processes;
with APEX.Partitions;
use APEX.Partitions;
with APEX.Timing;
use APEX.Timing;
with APEX.Sampling_Ports;
use APEX.Sampling_Ports;
package Main is
procedure Send;
procedure Main;
pragma Export (C, Main, "main");
end Main;
|
-- General Profiler
-- Author: Emanuel Regnath (emanuel.regnath@tum.de)
--
-- Description: measures execution time between 'start' and 'stop'.
-- Stores maximum execution time.
--
-- Usage: enter loop, call 'start', execute code, call 'stop'.
-- call 'get_Max' outside of loop to retrieve longest execution time.
-- ToDo: Add middle stops
with Ada.Real_Time; use Ada.Real_Time;
package Profiler with SPARK_Mode is
type Profile_Tag is tagged private;
CFG_PROFILER_PROFILING : constant Boolean := True;
CFG_PROFILER_LOGGING : constant Boolean := True;
procedure enableProfiling;
procedure disableProfiling;
procedure init(Self : in out Profile_Tag; name : String);
procedure reset(Self : in out Profile_Tag);
procedure start(Self : in out Profile_Tag);
procedure stop(Self : in out Profile_Tag);
procedure log(Self : in Profile_Tag);
function get_Name(Self : in Profile_Tag) return String;
function get_Start(Self : in Profile_Tag) return Time;
function get_Stop(Self : in Profile_Tag) return Time;
-- elapsed time before stop or last measurement time after stop
function get_Elapsed(Self : in Profile_Tag) return Time_Span;
function get_Max(Self : in Profile_Tag) return Time_Span;
private
subtype Name_Length_Type is Integer range 0 .. 30;
subtype Name_Type is String(1 .. 30);
type Profile_Tag is tagged record
name : Name_Type := (others => ' ');
name_length : Name_Length_Type := 0;
max_duration : Time_Span := Milliseconds( 0 );
start_Time : Time := Time_First;
stop_Time : Time := Time_First;
end record;
type State_Type is record
isEnabled : Boolean := True;
end record;
G_state : State_Type;
procedure Read_From_Memory(Self : in out Profile_Tag);
procedure Write_To_Memory(Self : in out Profile_Tag);
end Profiler;
|
-- flyweight_example.adb
-- An example of using the Flyweight package
-- Copyright (c) 2016, James Humphry
--
-- 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.Text_IO;
use Ada.Text_IO;
with Ada.Strings.Hash;
with Basic_Refcounted_Flyweights;
-- with Basic_Untracked_Flyweights;
-- with Protected_Refcounted_Flyweights;
-- with Protected_Untracked_Flyweights;
procedure Flyweight_Example is
type String_Ptr is access String;
package String_Flyweights is
new Basic_Refcounted_Flyweights(Element => String,
Element_Access => String_Ptr,
Hash => Ada.Strings.Hash,
Capacity => 16);
-- By commenting out the definition above and uncommenting one of the
-- definitions below, this example can use one of the other versions of the
-- Flyweights with no other changes required. The gnatmem tool can be used
-- to demonstrate the difference between the reference-counted and untracked
-- versions.
-- package String_Flyweights is
-- new Basic_Untracked_Flyweights(Element => String,
-- Element_Access => String_Ptr,
-- Hash => Ada.Strings.Hash,
-- Capacity => 16);
-- package String_Flyweights is
-- new Protected_Refcounted_Flyweights(Element => String,
-- Element_Access => String_Ptr,
-- Hash => Ada.Strings.Hash,
-- Capacity => 16);
-- package String_Flyweights is
-- new Protected_Untracked_Flyweights(Element => String,
-- Element_Access => String_Ptr,
-- Hash => Ada.Strings.Hash,
-- Capacity => 16);
use String_Flyweights;
Resources : aliased Flyweight;
HelloWorld_Raw_Ptr : String_Ptr := new String'("Hello, World!");
HelloWorld_Ref : constant Element_Ref
:= Insert_Ref (F => Resources, E => HelloWorld_Raw_Ptr);
HelloWorld_Ptr : constant Element_Ptr
:= Insert_Ptr (F => Resources, E => HelloWorld_Raw_Ptr);
begin
Put_Line("An example of using the Flyweights package."); New_Line;
Put_Line("The string ""Hello, World!"" has been added to the Resources");
Put_Line("Retrieving string via reference HelloWorld: " & HelloWorld_Ref);
Put_Line("Retrieving string via pointer HelloWorld: " &
HelloWorld_Ptr.Get.all);
Put_Line("Adding the same string again...");
declare
HelloWorld2_Raw_Ptr : String_Ptr := new String'("Hello, World!");
HelloWorld2_Ref : constant Element_Ref
:= Insert_Ref (F => Resources, E => HelloWorld2_Raw_Ptr);
begin
Put_Line("Retrieving string via reference HelloWorld2: " & HelloWorld2_Ref);
Put("Check references point to same copy: ");
Put((if HelloWorld2_Ref.E = HelloWorld_Ref.E then "OK" else "ERROR"));
New_Line;
declare
HelloWorld3_Ptr : constant Element_Ptr
:= Make_Ptr (HelloWorld2_Ref);
begin
Put_Line("Make a pointer HelloWorld3 from ref HelloWorld2: " &
HelloWorld3_Ptr.P);
end;
end;
Put_Line("Now HelloWorld2 is out of scope.");
Put_Line("HelloWorld should still point to the string: " & HelloWorld_Ref);
end Flyweight_Example;
|
-- BinToAsc_Suite.Utils
-- Unit test utilities for BinToAsc
-- Copyright (c) 2015, James Humphry - see LICENSE file for details
with System.Storage_Elements;
with AUnit.Assertions; use AUnit.Assertions;
with String_To_Storage_Array, Storage_Array_To_String;
package body BinToAsc_Suite.Utils is
use RFC4648;
use type RFC4648.Codec_State;
use System.Storage_Elements;
function STSA (X : String) return Storage_Array
renames String_To_Storage_Array;
function SATS (X : Storage_Array) return String
renames Storage_Array_To_String;
--------------------
-- Check_Symmetry --
--------------------
procedure Check_Symmetry (T : in out Test_Cases.Test_Case'Class) is
pragma Unreferenced(T);
use type BToA.Bin;
use type BToA.Bin_Array_Index;
function Bin_To_String is
new BToA.To_String(Codec => Codec_To_String);
function String_To_Bin is
new BToA.To_Bin(Codec => Codec_To_Bin);
Binary_Input : BToA.Bin_Array(0..255);
begin
for I in Binary_Input'Range loop
Binary_Input(I) := BToA.Bin(I - Binary_Input'First);
end loop;
declare
Encoded_Data : constant String := Bin_To_String(Binary_Input);
Decoded_Data : constant BToA.Bin_Array := String_To_Bin(Encoded_Data);
begin
Assert(Decoded_Data'Length = 256,
"Encoder / Decoder pair changes the length of the data");
Assert((for all I in Decoded_Data'Range =>
Decoded_Data(I) = BToA.Bin(I-Decoded_Data'First)),
"Encoder / Decoder are not a symmetric pair");
end;
end Check_Symmetry;
------------------
-- Check_Length --
------------------
procedure Check_Length (T : in out Test_Cases.Test_Case'Class) is
pragma Unreferenced(T);
use type BToA.Bin;
use type BToA.Bin_Array_Index;
function Bin_To_String is
new BToA.To_String(Codec => Codec_To_String);
function String_To_Bin is
new BToA.To_Bin(Codec => Codec_To_Bin);
All_One : constant BToA.Bin_Array(0..31) := (others => BToA.Bin'Last);
All_Zero : constant BToA.Bin_Array(0..31) := (others => 0);
begin
for I in 1..32 loop
declare
Encoded_One : constant String
:= Bin_To_String(All_One(0..BToA.Bin_Array_Index(I-1)));
Decoded_One : constant BToA.Bin_Array := String_To_Bin(Encoded_One);
Encoded_Zero : constant String
:= Bin_To_String(All_Zero(0..BToA.Bin_Array_Index(I-1)));
Decoded_Zero : constant BToA.Bin_Array := String_To_Bin(Encoded_Zero);
begin
Assert(Decoded_One'Length = I,
"Encoder / Decoder pair changes the length " &
Integer'Image(I) &
" of the data for 'all ones' input");
Assert((for all I in Decoded_One'Range =>
Decoded_One(I) = BToA.Bin'Last),
"Encoder / Decoder are not a symmetric pair for length " &
Integer'Image(I) &
" for 'all ones' input");
Assert(Decoded_Zero'Length = I,
"Encoder / Decoder pair changes the length " &
Integer'Image(I) &
" of the data for 'all zeros' input");
Assert((for all I in Decoded_Zero'Range =>
Decoded_Zero(I) = 0),
"Encoder / Decoder are not a symmetric pair for length " &
Integer'Image(I) &
" for 'all zeros' input");
end;
end loop;
end Check_Length;
----------------------------------
-- Check_Test_Vectors_To_String --
----------------------------------
procedure Check_Test_Vectors_To_String (T : in out Test_Cases.Test_Case'Class) is
pragma Unreferenced (T);
function Bin_To_String is
new RFC4648.BToA.To_String(Codec => Codec_To_String);
begin
for T of Test_Vectors loop
declare
Unencoded : constant String := To_String(T.Unencoded);
Encoded : constant String := To_String(T.Encoded);
begin
Assert( Bin_To_String(STSA(Unencoded)) = Encoded,
"BinToAsc encoder not generating correct string output " &
"for binary test vectors.");
end;
end loop;
end Check_Test_Vectors_To_String;
-------------------------------
-- Check_Test_Vectors_To_Bin --
-------------------------------
procedure Check_Test_Vectors_To_Bin (T : in out Test_Cases.Test_Case'Class) is
pragma Unreferenced (T);
function String_To_Bin is
new RFC4648.BToA.To_Bin(Codec => Codec_To_Bin);
begin
for T of Test_Vectors loop
declare
Unencoded : constant String := To_String(T.Unencoded);
Encoded : constant String := To_String(T.Encoded);
begin
Assert( SATS(String_To_Bin(Encoded)) = Unencoded,
"BinToAsc decoder not generating correct binary output " &
"for string test vectors.");
end;
end loop;
end Check_Test_Vectors_To_Bin;
------------------------------------
-- Check_Test_Vectors_Incremental --
------------------------------------
procedure Check_Test_Vectors_Incremental_To_String (T : in out Test_Cases.Test_Case'Class) is
pragma Unreferenced (T);
BinToAsc_Encoder : Codec_To_String;
Result_String : String(1..Max_Buffer_Length);
Result_String_Length : Integer;
begin
for T of Test_Vectors loop
declare
Unencoded : constant String := To_String(T.Unencoded);
Encoded : constant String := To_String(T.Encoded);
Buffer_String : String(1..Max_Buffer_Length);
Buffer_String_Used : Integer;
begin
BinToAsc_Encoder.Reset;
Result_String := (others => 'z');
Result_String_Length := 0;
for C of Unencoded loop
BinToAsc_Encoder.Process(Input => STSA(C & ""),
Output => Buffer_String,
Output_Length => Buffer_String_Used);
if Buffer_String_Used > 0 then
Result_String(Result_String_Length + 1 .. Result_String_Length + Buffer_String_Used) :=
Buffer_String(1..Buffer_String_Used);
Result_String_Length := Result_String_Length + Buffer_String_Used;
end if;
end loop;
BinToAsc_Encoder.Complete(Output => Buffer_String,
Output_Length => Buffer_String_Used);
if Buffer_String_Used > 0 then
Result_String(Result_String_Length + 1 .. Result_String_Length + Buffer_String_Used) :=
Buffer_String(1..Buffer_String_Used);
Result_String_Length := Result_String_Length + Buffer_String_Used;
end if;
Assert(BinToAsc_Encoder.State = Complete,
"BinToAsc encoder not terminating correctly.");
Assert(Result_String(1..Result_String_Length) = Encoded,
"BinToAsc encoder on: " &
Unencoded &
" gives wrong result: " &
Result_String(1..Result_String_Length) &
" instead of: " &
Encoded);
end;
end loop;
end Check_Test_Vectors_Incremental_To_String;
-------------------------------------------
-- Check_Test_Vectors_Incremental_To_Bin --
-------------------------------------------
procedure Check_Test_Vectors_Incremental_To_Bin (T : in out Test_Cases.Test_Case'Class) is
pragma Unreferenced (T);
BinToAsc_Decoder : Codec_To_Bin;
Result_Bin : Storage_Array(1..Storage_Offset(Max_Buffer_Length));
Result_Bin_Length : Storage_Offset;
begin
for T of Test_Vectors loop
declare
Unencoded : constant String := To_String(T.Unencoded);
Encoded : constant String := To_String(T.Encoded);
Buffer_Bin : Storage_Array(1..Storage_Offset(Max_Buffer_Length));
Buffer_Bin_Used : Storage_Offset;
begin
BinToAsc_Decoder.Reset;
Result_Bin := (others => 0);
Result_Bin_Length := 0;
for C of Encoded loop
BinToAsc_Decoder.Process(Input => C & "",
Output => Buffer_Bin,
Output_Length => Buffer_Bin_Used);
if Buffer_Bin_Used > 0 then
Result_Bin(Result_Bin_Length + 1 .. Result_Bin_Length + Buffer_Bin_Used) :=
Buffer_Bin(1..Buffer_Bin_Used);
Result_Bin_Length := Result_Bin_Length + Buffer_Bin_Used;
end if;
end loop;
BinToAsc_Decoder.Complete(Output => Buffer_Bin,
Output_Length => Buffer_Bin_Used);
Assert (Buffer_Bin_Used = 0,
"BinToAsc decoder should not generate output on " &
"completion as the binary output can never be padded.");
Assert(BinToAsc_Decoder.State = Complete,
"BinToAsc decoder not terminating correctly.");
Assert(SATS(Result_Bin(1..Result_Bin_Length)) = Unencoded,
"BinToAsc decoder on: " &
Encoded &
" gives wrong result: " &
SATS(Result_Bin(1..Result_Bin_Length)) &
" instead of: " &
Unencoded);
end;
end loop;
end Check_Test_Vectors_Incremental_To_Bin;
------------------------------------------
-- Check_Test_Vectors_By_Char_To_String --
------------------------------------------
procedure Check_Test_Vectors_By_Char_To_String (T : in out Test_Cases.Test_Case'Class) is
pragma Unreferenced (T);
BinToAsc_Encoder : Codec_To_String;
Result_String : String(1..Max_Buffer_Length);
Result_String_Length : Integer;
begin
for T of Test_Vectors loop
declare
Unencoded : constant String := To_String(T.Unencoded);
Encoded : constant String := To_String(T.Encoded);
Buffer_String : String(1..Max_Buffer_Length);
Buffer_String_Used : Integer;
begin
BinToAsc_Encoder.Reset;
Result_String := (others => 'z');
Result_String_Length := 0;
for C of Unencoded loop
BinToAsc_Encoder.Process(Input => Storage_Element'Val(Character'Pos(C)),
Output => Buffer_String,
Output_Length => Buffer_String_Used);
if Buffer_String_Used > 0 then
Result_String(Result_String_Length + 1 .. Result_String_Length + Buffer_String_Used) :=
Buffer_String(1..Buffer_String_Used);
Result_String_Length := Result_String_Length + Buffer_String_Used;
end if;
end loop;
BinToAsc_Encoder.Complete(Output => Buffer_String,
Output_Length => Buffer_String_Used);
if Buffer_String_Used > 0 then
Result_String(Result_String_Length + 1 .. Result_String_Length + Buffer_String_Used) :=
Buffer_String(1..Buffer_String_Used);
Result_String_Length := Result_String_Length + Buffer_String_Used;
end if;
Assert(BinToAsc_Encoder.State = Complete,
"BinToAsc encoder not terminating correctly.");
Assert(Result_String(1..Result_String_Length) = Encoded,
"BinToAsc encoder on: " &
Unencoded &
" gives wrong result: " &
Result_String(1..Result_String_Length) &
" instead of: " &
Encoded);
end;
end loop;
end Check_Test_Vectors_By_Char_To_String;
---------------------------------------
-- Check_Test_Vectors_By_Char_To_Bin --
---------------------------------------
procedure Check_Test_Vectors_By_Char_To_Bin (T : in out Test_Cases.Test_Case'Class) is
pragma Unreferenced (T);
BinToAsc_Decoder : Codec_To_Bin;
Result_Bin : Storage_Array(1..Storage_Offset(Max_Buffer_Length));
Result_Bin_Length : Storage_Offset;
begin
for T of Test_Vectors loop
declare
Unencoded : constant String := To_String(T.Unencoded);
Encoded : constant String := To_String(T.Encoded);
Buffer_Bin : Storage_Array(1..Storage_Offset(Max_Buffer_Length));
Buffer_Bin_Used : Storage_Offset;
begin
BinToAsc_Decoder.Reset;
Result_Bin := (others => 0);
Result_Bin_Length := 0;
for C of Encoded loop
BinToAsc_Decoder.Process(Input => C,
Output => Buffer_Bin,
Output_Length => Buffer_Bin_Used);
if Buffer_Bin_Used > 0 then
Result_Bin(Result_Bin_Length + 1 .. Result_Bin_Length + Buffer_Bin_Used) :=
Buffer_Bin(1..Buffer_Bin_Used);
Result_Bin_Length := Result_Bin_Length + Buffer_Bin_Used;
end if;
end loop;
BinToAsc_Decoder.Complete(Output => Buffer_Bin,
Output_Length => Buffer_Bin_Used);
Assert (Buffer_Bin_Used = 0,
"BinToAsc decoder should not generate output on " &
"completion as the binary output can never be padded.");
Assert(BinToAsc_Decoder.State = Complete,
"BinToAsc decoder not terminating correctly.");
Assert(SATS(Result_Bin(1..Result_Bin_Length)) = Unencoded,
"BinToAsc decoder on: " &
Encoded &
" gives wrong result: " &
SATS(Result_Bin(1..Result_Bin_Length)) &
" instead of: " &
Unencoded);
end;
end loop;
end Check_Test_Vectors_By_Char_To_Bin;
end BinToAsc_Suite.Utils;
|
-----------------------------------------------------------------------
-- files.tests -- Unit tests for files
-- Copyright (C) 2009, 2010, 2011 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-----------------------------------------------------------------------
with Util.Tests;
with AWA.Tests;
package AWA.Users.Services.Tests is
procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite);
type Test is new AWA.Tests.Test with null record;
procedure Test_Create_User (T : in out Test);
procedure Test_Logout_User (T : in out Test);
procedure Test_Login_User (T : in out Test);
procedure Test_Reset_Password_User (T : in out Test);
procedure Test_Get_Module (T : in out Test);
end AWA.Users.Services.Tests;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- S Y S T E M . D I M . F L O A T _ M K S _ I O --
-- --
-- S p e c --
-- --
-- Copyright (C) 2018-2019, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- Provides output facilities for the Float MKS dimension system (see
-- System.Dim.Float_Mks and System.Dim.Float_IO).
with System.Dim.Float_Mks; use System.Dim.Float_Mks;
with System.Dim.Float_IO;
package System.Dim.Float_Mks_IO is new System.Dim.Float_IO (Mks_Type);
|
-----------------------------------------------------------------------
-- AUnit utils - Helper for writing unit tests
-- Copyright (C) 2009, 2010, 2011, 2012 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-----------------------------------------------------------------------
package body Util.Assertions is
-- ------------------------------
-- Check that the value matches what we expect.
-- ------------------------------
procedure Assert_Equals_T (T : in AUnit.Assertions.Test'Class;
Expect : in Value_Type;
Value : in Value_Type;
Message : in String := "Test failed";
Source : in String := GNAT.Source_Info.File;
Line : in Natural := GNAT.Source_Info.Line) is
pragma Unreferenced (T);
begin
AUnit.Assertions.Assert (Condition => Expect = Value,
Message => Message & ": expecting '"
& Value_Type'Image (Expect) & "'"
& " value was '"
& Value_Type'Image (Value) & "'",
Source => Source,
Line => Line);
end Assert_Equals_T;
end Util.Assertions;
|
pragma Style_Checks (Off);
with Interfaces.C; use Interfaces.C;
with Lzma.Base;
with Ada.Streams;
with System;
package lzma_lzma_h is
-- unsupported macro: LZMA_FILTER_LZMA1 LZMA_VLI_C(0x4000000000000001)
-- unsupported macro: LZMA_FILTER_LZMA2 LZMA_VLI_C(0x21)
-- unsupported macro: LZMA_DICT_SIZE_MIN UINT32_C(4096)
-- unsupported macro: LZMA_DICT_SIZE_DEFAULT (UINT32_C(1) << 23)
LZMA_LCLP_MIN : constant := 0; -- /usr/include/lzma/lzma.h:282
LZMA_LCLP_MAX : constant := 4; -- /usr/include/lzma/lzma.h:283
LZMA_LC_DEFAULT : constant := 3; -- /usr/include/lzma/lzma.h:284
LZMA_LP_DEFAULT : constant := 0; -- /usr/include/lzma/lzma.h:294
LZMA_PB_MIN : constant := 0; -- /usr/include/lzma/lzma.h:317
LZMA_PB_MAX : constant := 4; -- /usr/include/lzma/lzma.h:318
LZMA_PB_DEFAULT : constant := 2; -- /usr/include/lzma/lzma.h:319
--*
-- * \file lzma/lzma.h
-- * \brief LZMA1 and LZMA2 filters
--
-- * Author: Lasse Collin
-- *
-- * This file has been put into the public domain.
-- * You can do whatever you want with this file.
-- *
-- * See ../lzma.h for information about liblzma as a whole.
--
--*
-- * \brief LZMA1 Filter ID
-- *
-- * LZMA1 is the very same thing as what was called just LZMA in LZMA Utils,
-- * 7-Zip, and LZMA SDK. It's called LZMA1 here to prevent developers from
-- * accidentally using LZMA when they actually want LZMA2.
-- *
-- * LZMA1 shouldn't be used for new applications unless you _really_ know
-- * what you are doing. LZMA2 is almost always a better choice.
--
--*
-- * \brief LZMA2 Filter ID
-- *
-- * Usually you want this instead of LZMA1. Compared to LZMA1, LZMA2 adds
-- * support for LZMA_SYNC_FLUSH, uncompressed chunks (smaller expansion
-- * when trying to compress uncompressible data), possibility to change
-- * lc/lp/pb in the middle of encoding, and some other internal improvements.
--
--*
-- * \brief Match finders
-- *
-- * Match finder has major effect on both speed and compression ratio.
-- * Usually hash chains are faster than binary trees.
-- *
-- * If you will use LZMA_SYNC_FLUSH often, the hash chains may be a better
-- * choice, because binary trees get much higher compression ratio penalty
-- * with LZMA_SYNC_FLUSH.
-- *
-- * The memory usage formulas are only rough estimates, which are closest to
-- * reality when dict_size is a power of two. The formulas are more complex
-- * in reality, and can also change a little between liblzma versions. Use
-- * lzma_raw_encoder_memusage() to get more accurate estimate of memory usage.
--
--*<
-- * \brief Hash Chain with 2- and 3-byte hashing
-- *
-- * Minimum nice_len: 3
-- *
-- * Memory usage:
-- * - dict_size <= 16 MiB: dict_size * 7.5
-- * - dict_size > 16 MiB: dict_size * 5.5 + 64 MiB
--
--*<
-- * \brief Hash Chain with 2-, 3-, and 4-byte hashing
-- *
-- * Minimum nice_len: 4
-- *
-- * Memory usage:
-- * - dict_size <= 32 MiB: dict_size * 7.5
-- * - dict_size > 32 MiB: dict_size * 6.5
--
--*<
-- * \brief Binary Tree with 2-byte hashing
-- *
-- * Minimum nice_len: 2
-- *
-- * Memory usage: dict_size * 9.5
--
--*<
-- * \brief Binary Tree with 2- and 3-byte hashing
-- *
-- * Minimum nice_len: 3
-- *
-- * Memory usage:
-- * - dict_size <= 16 MiB: dict_size * 11.5
-- * - dict_size > 16 MiB: dict_size * 9.5 + 64 MiB
--
--*<
-- * \brief Binary Tree with 2-, 3-, and 4-byte hashing
-- *
-- * Minimum nice_len: 4
-- *
-- * Memory usage:
-- * - dict_size <= 32 MiB: dict_size * 11.5
-- * - dict_size > 32 MiB: dict_size * 10.5
--
subtype lzma_match_finder is unsigned;
LZMA_MF_HC3 : constant lzma_match_finder := 3;
LZMA_MF_HC4 : constant lzma_match_finder := 4;
LZMA_MF_BT2 : constant lzma_match_finder := 18;
LZMA_MF_BT3 : constant lzma_match_finder := 19;
LZMA_MF_BT4 : constant lzma_match_finder := 20; -- /usr/include/lzma/lzma.h:111
--*
-- * \brief Test if given match finder is supported
-- *
-- * Return true if the given match finder is supported by this liblzma build.
-- * Otherwise false is returned. It is safe to call this with a value that
-- * isn't listed in lzma_match_finder enumeration; the return value will be
-- * false.
-- *
-- * There is no way to list which match finders are available in this
-- * particular liblzma version and build. It would be useless, because
-- * a new match finder, which the application developer wasn't aware,
-- * could require giving additional options to the encoder that the older
-- * match finders don't need.
--
function lzma_mf_is_supported (match_finder : lzma_match_finder) return Lzma.Base.lzma_bool; -- /usr/include/lzma/lzma.h:128
pragma Import (C, lzma_mf_is_supported, "lzma_mf_is_supported");
--*
-- * \brief Compression modes
-- *
-- * This selects the function used to analyze the data produced by the match
-- * finder.
--
--*<
-- * \brief Fast compression
-- *
-- * Fast mode is usually at its best when combined with
-- * a hash chain match finder.
--
--*<
-- * \brief Normal compression
-- *
-- * This is usually notably slower than fast mode. Use this
-- * together with binary tree match finders to expose the
-- * full potential of the LZMA1 or LZMA2 encoder.
--
subtype lzma_mode is unsigned;
LZMA_MODE_FAST : constant lzma_mode := 1;
LZMA_MODE_NORMAL : constant lzma_mode := 2; -- /usr/include/lzma/lzma.h:155
--*
-- * \brief Test if given compression mode is supported
-- *
-- * Return true if the given compression mode is supported by this liblzma
-- * build. Otherwise false is returned. It is safe to call this with a value
-- * that isn't listed in lzma_mode enumeration; the return value will be false.
-- *
-- * There is no way to list which modes are available in this particular
-- * liblzma version and build. It would be useless, because a new compression
-- * mode, which the application developer wasn't aware, could require giving
-- * additional options to the encoder that the older modes don't need.
--
function lzma_mode_is_supported (mode : lzma_mode) return Lzma.Base.lzma_bool; -- /usr/include/lzma/lzma.h:170
pragma Import (C, lzma_mode_is_supported, "lzma_mode_is_supported");
--*
-- * \brief Options specific to the LZMA1 and LZMA2 filters
-- *
-- * Since LZMA1 and LZMA2 share most of the code, it's simplest to share
-- * the options structure too. For encoding, all but the reserved variables
-- * need to be initialized unless specifically mentioned otherwise.
-- * lzma_lzma_preset() can be used to get a good starting point.
-- *
-- * For raw decoding, both LZMA1 and LZMA2 need dict_size, preset_dict, and
-- * preset_dict_size (if preset_dict != NULL). LZMA1 needs also lc, lp, and pb.
--
--*
-- * \brief Dictionary size in bytes
-- *
-- * Dictionary size indicates how many bytes of the recently processed
-- * uncompressed data is kept in memory. One method to reduce size of
-- * the uncompressed data is to store distance-length pairs, which
-- * indicate what data to repeat from the dictionary buffer. Thus,
-- * the bigger the dictionary, the better the compression ratio
-- * usually is.
-- *
-- * Maximum size of the dictionary depends on multiple things:
-- * - Memory usage limit
-- * - Available address space (not a problem on 64-bit systems)
-- * - Selected match finder (encoder only)
-- *
-- * Currently the maximum dictionary size for encoding is 1.5 GiB
-- * (i.e. (UINT32_C(1) << 30) + (UINT32_C(1) << 29)) even on 64-bit
-- * systems for certain match finder implementation reasons. In the
-- * future, there may be match finders that support bigger
-- * dictionaries.
-- *
-- * Decoder already supports dictionaries up to 4 GiB - 1 B (i.e.
-- * UINT32_MAX), so increasing the maximum dictionary size of the
-- * encoder won't cause problems for old decoders.
-- *
-- * Because extremely small dictionaries sizes would have unneeded
-- * overhead in the decoder, the minimum dictionary size is 4096 bytes.
-- *
-- * \note When decoding, too big dictionary does no other harm
-- * than wasting memory.
--
type lzma_options_lzma is record
dict_size : aliased Interfaces.C.unsigned; -- /usr/include/lzma/lzma.h:217
preset_dict : access Ada.Streams.Stream_Element; -- /usr/include/lzma/lzma.h:240
preset_dict_size : aliased Interfaces.C.unsigned; -- /usr/include/lzma/lzma.h:254
lc : aliased Interfaces.C.unsigned; -- /usr/include/lzma/lzma.h:281
lp : aliased Interfaces.C.unsigned; -- /usr/include/lzma/lzma.h:293
pb : aliased Interfaces.C.unsigned; -- /usr/include/lzma/lzma.h:316
mode : aliased lzma_mode; -- /usr/include/lzma/lzma.h:322
nice_len : aliased Interfaces.C.unsigned; -- /usr/include/lzma/lzma.h:342
mf : aliased lzma_match_finder; -- /usr/include/lzma/lzma.h:345
depth : aliased Interfaces.C.unsigned; -- /usr/include/lzma/lzma.h:375
reserved_int1 : aliased Interfaces.C.unsigned; -- /usr/include/lzma/lzma.h:384
reserved_int2 : aliased Interfaces.C.unsigned; -- /usr/include/lzma/lzma.h:385
reserved_int3 : aliased Interfaces.C.unsigned; -- /usr/include/lzma/lzma.h:386
reserved_int4 : aliased Interfaces.C.unsigned; -- /usr/include/lzma/lzma.h:387
reserved_int5 : aliased Interfaces.C.unsigned; -- /usr/include/lzma/lzma.h:388
reserved_int6 : aliased Interfaces.C.unsigned; -- /usr/include/lzma/lzma.h:389
reserved_int7 : aliased Interfaces.C.unsigned; -- /usr/include/lzma/lzma.h:390
reserved_int8 : aliased Interfaces.C.unsigned; -- /usr/include/lzma/lzma.h:391
reserved_enum1 : aliased Lzma.Base.lzma_reserved_enum_type; -- /usr/include/lzma/lzma.h:392
reserved_enum2 : aliased Lzma.Base.lzma_reserved_enum_type; -- /usr/include/lzma/lzma.h:393
reserved_enum3 : aliased Lzma.Base.lzma_reserved_enum_type; -- /usr/include/lzma/lzma.h:394
reserved_enum4 : aliased Lzma.Base.lzma_reserved_enum_type; -- /usr/include/lzma/lzma.h:395
reserved_ptr1 : System.Address; -- /usr/include/lzma/lzma.h:396
reserved_ptr2 : System.Address; -- /usr/include/lzma/lzma.h:397
end record;
pragma Convention (C_Pass_By_Copy, lzma_options_lzma); -- /usr/include/lzma/lzma.h:399
-- skipped anonymous struct anon_13
--*
-- * \brief Pointer to an initial dictionary
-- *
-- * It is possible to initialize the LZ77 history window using
-- * a preset dictionary. It is useful when compressing many
-- * similar, relatively small chunks of data independently from
-- * each other. The preset dictionary should contain typical
-- * strings that occur in the files being compressed. The most
-- * probable strings should be near the end of the preset dictionary.
-- *
-- * This feature should be used only in special situations. For
-- * now, it works correctly only with raw encoding and decoding.
-- * Currently none of the container formats supported by
-- * liblzma allow preset dictionary when decoding, thus if
-- * you create a .xz or .lzma file with preset dictionary, it
-- * cannot be decoded with the regular decoder functions. In the
-- * future, the .xz format will likely get support for preset
-- * dictionary though.
--
--*
-- * \brief Size of the preset dictionary
-- *
-- * Specifies the size of the preset dictionary. If the size is
-- * bigger than dict_size, only the last dict_size bytes are
-- * processed.
-- *
-- * This variable is read only when preset_dict is not NULL.
-- * If preset_dict is not NULL but preset_dict_size is zero,
-- * no preset dictionary is used (identical to only setting
-- * preset_dict to NULL).
--
--*
-- * \brief Number of literal context bits
-- *
-- * How many of the highest bits of the previous uncompressed
-- * eight-bit byte (also known as `literal') are taken into
-- * account when predicting the bits of the next literal.
-- *
-- * E.g. in typical English text, an upper-case letter is
-- * often followed by a lower-case letter, and a lower-case
-- * letter is usually followed by another lower-case letter.
-- * In the US-ASCII character set, the highest three bits are 010
-- * for upper-case letters and 011 for lower-case letters.
-- * When lc is at least 3, the literal coding can take advantage of
-- * this property in the uncompressed data.
-- *
-- * There is a limit that applies to literal context bits and literal
-- * position bits together: lc + lp <= 4. Without this limit the
-- * decoding could become very slow, which could have security related
-- * results in some cases like email servers doing virus scanning.
-- * This limit also simplifies the internal implementation in liblzma.
-- *
-- * There may be LZMA1 streams that have lc + lp > 4 (maximum possible
-- * lc would be 8). It is not possible to decode such streams with
-- * liblzma.
--
--*
-- * \brief Number of literal position bits
-- *
-- * lp affects what kind of alignment in the uncompressed data is
-- * assumed when encoding literals. A literal is a single 8-bit byte.
-- * See pb below for more information about alignment.
--
--*
-- * \brief Number of position bits
-- *
-- * pb affects what kind of alignment in the uncompressed data is
-- * assumed in general. The default means four-byte alignment
-- * (2^ pb =2^2=4), which is often a good choice when there's
-- * no better guess.
-- *
-- * When the aligment is known, setting pb accordingly may reduce
-- * the file size a little. E.g. with text files having one-byte
-- * alignment (US-ASCII, ISO-8859-*, UTF-8), setting pb=0 can
-- * improve compression slightly. For UTF-16 text, pb=1 is a good
-- * choice. If the alignment is an odd number like 3 bytes, pb=0
-- * might be the best choice.
-- *
-- * Even though the assumed alignment can be adjusted with pb and
-- * lp, LZMA1 and LZMA2 still slightly favor 16-byte alignment.
-- * It might be worth taking into account when designing file formats
-- * that are likely to be often compressed with LZMA1 or LZMA2.
--
--* Compression mode
--*
-- * \brief Nice length of a match
-- *
-- * This determines how many bytes the encoder compares from the match
-- * candidates when looking for the best match. Once a match of at
-- * least nice_len bytes long is found, the encoder stops looking for
-- * better candidates and encodes the match. (Naturally, if the found
-- * match is actually longer than nice_len, the actual length is
-- * encoded; it's not truncated to nice_len.)
-- *
-- * Bigger values usually increase the compression ratio and
-- * compression time. For most files, 32 to 128 is a good value,
-- * which gives very good compression ratio at good speed.
-- *
-- * The exact minimum value depends on the match finder. The maximum
-- * is 273, which is the maximum length of a match that LZMA1 and
-- * LZMA2 can encode.
--
--* Match finder ID
--*
-- * \brief Maximum search depth in the match finder
-- *
-- * For every input byte, match finder searches through the hash chain
-- * or binary tree in a loop, each iteration going one step deeper in
-- * the chain or tree. The searching stops if
-- * - a match of at least nice_len bytes long is found;
-- * - all match candidates from the hash chain or binary tree have
-- * been checked; or
-- * - maximum search depth is reached.
-- *
-- * Maximum search depth is needed to prevent the match finder from
-- * wasting too much time in case there are lots of short match
-- * candidates. On the other hand, stopping the search before all
-- * candidates have been checked can reduce compression ratio.
-- *
-- * Setting depth to zero tells liblzma to use an automatic default
-- * value, that depends on the selected match finder and nice_len.
-- * The default is in the range [4, 200] or so (it may vary between
-- * liblzma versions).
-- *
-- * Using a bigger depth value than the default can increase
-- * compression ratio in some cases. There is no strict maximum value,
-- * but high values (thousands or millions) should be used with care:
-- * the encoder could remain fast enough with typical input, but
-- * malicious input could cause the match finder to slow down
-- * dramatically, possibly creating a denial of service attack.
--
-- * Reserved space to allow possible future extensions without
-- * breaking the ABI. You should not touch these, because the names
-- * of these variables may change. These are and will never be used
-- * with the currently supported options, so it is safe to leave these
-- * uninitialized.
--
--*
-- * \brief Set a compression preset to lzma_options_lzma structure
-- *
-- * 0 is the fastest and 9 is the slowest. These match the switches -0 .. -9
-- * of the xz command line tool. In addition, it is possible to bitwise-or
-- * flags to the preset. Currently only LZMA_PRESET_EXTREME is supported.
-- * The flags are defined in container.h, because the flags are used also
-- * with lzma_easy_encoder().
-- *
-- * The preset values are subject to changes between liblzma versions.
-- *
-- * This function is available only if LZMA1 or LZMA2 encoder has been enabled
-- * when building liblzma.
-- *
-- * \return On success, false is returned. If the preset is not
-- * supported, true is returned.
--
function lzma_lzma_preset (options : access lzma_options_lzma; preset : Interfaces.C.unsigned) return Lzma.Base.lzma_bool; -- /usr/include/lzma/lzma.h:419
pragma Import (C, lzma_lzma_preset, "lzma_lzma_preset");
end lzma_lzma_h;
|
-- Copyright (c) 2019 Maxim Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-- License-Filename: LICENSE
-------------------------------------------------------------
package Slim.Messages.rtcs is
type Rtcs_Message is new Message with private;
not overriding procedure Set_Format (Self : in out Rtcs_Message);
not overriding procedure Set_Time
(Self : in out Rtcs_Message;
Hours : Natural;
Minutes : Natural;
Seconds : Natural);
private
subtype Byte is Ada.Streams.Stream_Element;
type Rtcs_Message is new Base_Message
(Max_8 => 4,
Max_16 => 0,
Max_32 => 0,
Max_64 => 0)
with null record;
overriding function Read
(Data : not null access
League.Stream_Element_Vectors.Stream_Element_Vector)
return Rtcs_Message;
overriding procedure Write
(Self : Rtcs_Message;
Tag : out Message_Tag;
Data : out League.Stream_Element_Vectors.Stream_Element_Vector);
overriding procedure Visit
(Self : not null access Rtcs_Message;
Visiter : in out Slim.Message_Visiters.Visiter'Class);
end Slim.Messages.rtcs;
|
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- S C N G --
-- --
-- B o d y --
-- --
-- Copyright (C) 1992-2020, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING3. If not, go to --
-- http://www.gnu.org/licenses for a complete copy of the license. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with Atree; use Atree;
with Csets; use Csets;
with Hostparm; use Hostparm;
with Namet; use Namet;
with Opt; use Opt;
with Scans; use Scans;
with Sinput; use Sinput;
with Snames; use Snames;
with Stringt; use Stringt;
with Stylesw; use Stylesw;
with Uintp; use Uintp;
with Urealp; use Urealp;
with Widechar; use Widechar;
pragma Warnings (Off);
-- This package is used also by gnatcoll
with System.CRC32;
with System.UTF_32; use System.UTF_32;
with System.WCh_Con; use System.WCh_Con;
pragma Warnings (On);
package body Scng is
use ASCII;
-- Make control characters visible
Special_Characters : array (Character) of Boolean := (others => False);
-- For characters that are Special token, the value is True
Comment_Is_Token : Boolean := False;
-- True if comments are tokens
End_Of_Line_Is_Token : Boolean := False;
-- True if End_Of_Line is a token
-----------------------
-- Local Subprograms --
-----------------------
procedure Accumulate_Token_Checksum;
pragma Inline (Accumulate_Token_Checksum);
-- Called after each numeric literal and identifier/keyword. For keywords,
-- the token used is Tok_Identifier. This allows detection of additional
-- spaces added in sources when using the builder switch -m.
procedure Accumulate_Checksum (C : Character);
pragma Inline (Accumulate_Checksum);
-- This routine accumulates the checksum given character C. During the
-- scanning of a source file, this routine is called with every character
-- in the source, excluding blanks, and all control characters (except
-- that ESC is included in the checksum). Upper case letters not in string
-- literals are folded by the caller. See Sinput spec for the documentation
-- of the checksum algorithm. Note: checksum values are only used if we
-- generate code, so it is not necessary to worry about making the right
-- sequence of calls in any error situation.
procedure Accumulate_Checksum (C : Char_Code);
pragma Inline (Accumulate_Checksum);
-- This version is identical, except that the argument, C, is a character
-- code value instead of a character. This is used when wide characters
-- are scanned. We use the character code rather than the ASCII characters
-- so that the checksum is independent of wide character encoding method.
procedure Initialize_Checksum;
pragma Inline (Initialize_Checksum);
-- Initialize checksum value
-------------------------
-- Accumulate_Checksum --
-------------------------
procedure Accumulate_Checksum (C : Character) is
begin
System.CRC32.Update (System.CRC32.CRC32 (Checksum), C);
end Accumulate_Checksum;
procedure Accumulate_Checksum (C : Char_Code) is
begin
if C > 16#FFFF# then
Accumulate_Checksum (Character'Val (C / 2 ** 24));
Accumulate_Checksum (Character'Val ((C / 2 ** 16) mod 256));
Accumulate_Checksum (Character'Val ((C / 256) mod 256));
else
Accumulate_Checksum (Character'Val (C / 256));
end if;
Accumulate_Checksum (Character'Val (C mod 256));
end Accumulate_Checksum;
-------------------------------
-- Accumulate_Token_Checksum --
-------------------------------
procedure Accumulate_Token_Checksum is
begin
System.CRC32.Update
(System.CRC32.CRC32 (Checksum),
Character'Val (Token_Type'Pos (Token)));
end Accumulate_Token_Checksum;
-----------------------
-- Check_End_Of_Line --
-----------------------
procedure Check_End_Of_Line is
Len : constant Int :=
Int (Scan_Ptr) -
Int (Current_Line_Start) -
Wide_Char_Byte_Count;
-- Start of processing for Check_End_Of_Line
begin
if Style_Check then
Style.Check_Line_Terminator (Len);
end if;
-- Deal with checking maximum line length
if Style_Check and Style_Check_Max_Line_Length then
Style.Check_Line_Max_Length (Len);
-- If style checking is inactive, check maximum line length against
-- standard value.
elsif Len > Max_Line_Length then
Error_Msg
("this line is too long",
Current_Line_Start + Source_Ptr (Max_Line_Length));
end if;
-- Now one more checking circuit. Normally we are only enforcing a limit
-- of physical characters, with tabs counting as one character. But if
-- after tab expansion we would have a total line length that exceeded
-- 32766, that would really cause trouble, because column positions
-- would exceed the maximum we allow for a column count. Note: the limit
-- is 32766 rather than 32767, since we use a value of 32767 for special
-- purposes (see Sinput). Now we really do not want to go messing with
-- tabs in the normal case, so what we do is to check for a line that
-- has more than 4096 physical characters. Any shorter line could not
-- be a problem, even if it was all tabs.
if Len >= 4096 then
declare
Col : Natural;
Ptr : Source_Ptr;
begin
Col := 1;
Ptr := Current_Line_Start;
loop
exit when Ptr = Scan_Ptr;
if Source (Ptr) = ASCII.HT then
Col := (Col - 1 + 8) / 8 * 8 + 1;
else
Col := Col + 1;
end if;
if Col > 32766 then
Error_Msg
("this line is longer than 32766 characters",
Current_Line_Start);
raise Unrecoverable_Error;
end if;
Ptr := Ptr + 1;
end loop;
end;
end if;
-- Reset wide character byte count for next line
Wide_Char_Byte_Count := 0;
end Check_End_Of_Line;
----------------------------
-- Determine_Token_Casing --
----------------------------
function Determine_Token_Casing return Casing_Type is
begin
return Determine_Casing (Source (Token_Ptr .. Scan_Ptr - 1));
end Determine_Token_Casing;
-------------------------
-- Initialize_Checksum --
-------------------------
procedure Initialize_Checksum is
begin
System.CRC32.Initialize (System.CRC32.CRC32 (Checksum));
end Initialize_Checksum;
------------------------
-- Initialize_Scanner --
------------------------
procedure Initialize_Scanner (Index : Source_File_Index) is
begin
-- Establish reserved words
Scans.Initialize_Ada_Keywords;
-- Initialize scan control variables
Current_Source_File := Index;
Source := Source_Text (Current_Source_File);
Scan_Ptr := Source_First (Current_Source_File);
Token := No_Token;
Token_Ptr := Scan_Ptr;
Current_Line_Start := Scan_Ptr;
Token_Node := Empty;
Token_Name := No_Name;
Start_Column := Set_Start_Column;
First_Non_Blank_Location := Scan_Ptr;
Initialize_Checksum;
Wide_Char_Byte_Count := 0;
-- Do not call Scan, otherwise the License stuff does not work in Scn
end Initialize_Scanner;
------------------------------
-- Reset_Special_Characters --
------------------------------
procedure Reset_Special_Characters is
begin
Special_Characters := (others => False);
end Reset_Special_Characters;
----------
-- Scan --
----------
procedure Scan is
Start_Of_Comment : Source_Ptr;
-- Record start of comment position
Underline_Found : Boolean;
-- During scanning of an identifier, set to True if last character
-- scanned was an underline or other punctuation character. This
-- is used to flag the error of two underlines/punctuations in a
-- row or ending an identifier with a underline/punctuation. Here
-- punctuation means any UTF_32 character in the Unicode category
-- Punctuation,Connector.
Wptr : Source_Ptr;
-- Used to remember start of last wide character scanned
function Double_Char_Token (C : Character) return Boolean;
-- This function is used for double character tokens like := or <>. It
-- checks if the character following Source (Scan_Ptr) is C, and if so
-- bumps Scan_Ptr past the pair of characters and returns True. A space
-- between the two characters is also recognized with an appropriate
-- error message being issued. If C is not present, False is returned.
-- Note that Double_Char_Token can only be used for tokens defined in
-- the Ada syntax (it's use for error cases like && is not appropriate
-- since we do not want a junk message for a case like &-space-&).
procedure Error_Illegal_Character;
-- Give illegal character error, Scan_Ptr points to character. On
-- return, Scan_Ptr is bumped past the illegal character.
procedure Error_Illegal_Wide_Character;
-- Give illegal wide character message. On return, Scan_Ptr is bumped
-- past the illegal character, which may still leave us pointing to
-- junk, not much we can do if the escape sequence is messed up.
procedure Error_No_Double_Underline;
-- Signal error of two underline or punctuation characters in a row.
-- Called with Scan_Ptr pointing to second underline/punctuation char.
procedure Nlit;
-- This is the procedure for scanning out numeric literals. On entry,
-- Scan_Ptr points to the digit that starts the numeric literal (the
-- checksum for this character has not been accumulated yet). On return
-- Scan_Ptr points past the last character of the numeric literal, Token
-- and Token_Node are set appropriately, and the checksum is updated.
procedure Slit;
-- This is the procedure for scanning out string literals. On entry,
-- Scan_Ptr points to the opening string quote (the checksum for this
-- character has not been accumulated yet). On return Scan_Ptr points
-- past the closing quote of the string literal, Token and Token_Node
-- are set appropriately, and the checksum is updated.
procedure Skip_Other_Format_Characters;
-- Skips past any "other format" category characters at the current
-- cursor location (does not skip past spaces or any other characters).
function Start_Of_Wide_Character return Boolean;
-- Returns True if the scan pointer is pointing to the start of a wide
-- character sequence, does not modify the scan pointer in any case.
-----------------------
-- Double_Char_Token --
-----------------------
function Double_Char_Token (C : Character) return Boolean is
begin
if Source (Scan_Ptr + 1) = C then
Accumulate_Checksum (C);
Scan_Ptr := Scan_Ptr + 2;
return True;
elsif Source (Scan_Ptr + 1) = ' '
and then Source (Scan_Ptr + 2) = C
then
Scan_Ptr := Scan_Ptr + 1;
Error_Msg_S -- CODEFIX
("no space allowed here");
Scan_Ptr := Scan_Ptr + 2;
return True;
else
return False;
end if;
end Double_Char_Token;
-----------------------------
-- Error_Illegal_Character --
-----------------------------
procedure Error_Illegal_Character is
begin
Error_Msg_S ("illegal character");
Scan_Ptr := Scan_Ptr + 1;
end Error_Illegal_Character;
----------------------------------
-- Error_Illegal_Wide_Character --
----------------------------------
procedure Error_Illegal_Wide_Character is
begin
Scan_Ptr := Scan_Ptr + 1;
Error_Msg ("illegal wide character", Wptr);
end Error_Illegal_Wide_Character;
-------------------------------
-- Error_No_Double_Underline --
-------------------------------
procedure Error_No_Double_Underline is
begin
Underline_Found := False;
-- There are four cases, and we special case the messages
if Source (Scan_Ptr) = '_' then
if Source (Scan_Ptr - 1) = '_' then
Error_Msg_S -- CODEFIX
("two consecutive underlines not permitted");
else
Error_Msg_S ("underline cannot follow punctuation character");
end if;
else
if Source (Scan_Ptr - 1) = '_' then
Error_Msg_S ("punctuation character cannot follow underline");
else
Error_Msg_S
("two consecutive punctuation characters not permitted");
end if;
end if;
end Error_No_Double_Underline;
----------
-- Nlit --
----------
procedure Nlit is
C : Character;
-- Current source program character
Base_Char : Character;
-- Either # or : (character at start of based number)
Base : Int;
-- Value of base
UI_Base : Uint;
-- Value of base in Uint format
UI_Int_Value : Uint;
-- Value of integer scanned by Scan_Integer in Uint format
UI_Num_Value : Uint;
-- Value of integer in numeric value being scanned
Scale : Int;
-- Scale value for real literal
UI_Scale : Uint;
-- Scale in Uint format
Exponent_Is_Negative : Boolean;
-- Set true for negative exponent
Extended_Digit_Value : Int;
-- Extended digit value
Point_Scanned : Boolean;
-- Flag for decimal point scanned in numeric literal
-----------------------
-- Local Subprograms --
-----------------------
procedure Error_Digit_Expected;
-- Signal error of bad digit, Scan_Ptr points to the location at
-- which the digit was expected on input, and is unchanged on return.
procedure Scan_Integer;
-- Scan integer literal. On entry, Scan_Ptr points to a digit, on
-- exit Scan_Ptr points past the last character of the integer.
--
-- For each digit encountered, UI_Int_Value is multiplied by 10, and
-- the value of the digit added to the result. In addition, the value
-- in Scale is decremented by one for each actual digit scanned.
--------------------------
-- Error_Digit_Expected --
--------------------------
procedure Error_Digit_Expected is
begin
Error_Msg_S ("digit expected");
end Error_Digit_Expected;
------------------
-- Scan_Integer --
------------------
procedure Scan_Integer is
C : Character;
-- Next character scanned
begin
C := Source (Scan_Ptr);
-- Loop through digits (allowing underlines)
loop
Accumulate_Checksum (C);
UI_Int_Value :=
UI_Int_Value * 10 + (Character'Pos (C) - Character'Pos ('0'));
Scan_Ptr := Scan_Ptr + 1;
Scale := Scale - 1;
C := Source (Scan_Ptr);
-- Case of underline encountered
if C = '_' then
-- We do not accumulate the '_' in the checksum, so that
-- 1_234 is equivalent to 1234, and does not trigger
-- compilation for "minimal recompilation" (gnatmake -m).
loop
Scan_Ptr := Scan_Ptr + 1;
C := Source (Scan_Ptr);
exit when C /= '_';
Error_No_Double_Underline;
end loop;
if C not in '0' .. '9' then
Error_Digit_Expected;
exit;
end if;
else
exit when C not in '0' .. '9';
end if;
end loop;
end Scan_Integer;
-- Start of processing for Nlit
begin
Base := 10;
UI_Base := Uint_10;
UI_Int_Value := Uint_0;
Based_Literal_Uses_Colon := False;
Scale := 0;
Scan_Integer;
Point_Scanned := False;
UI_Num_Value := UI_Int_Value;
-- Various possibilities now for continuing the literal are period,
-- E/e (for exponent), or :/# (for based literal).
Scale := 0;
C := Source (Scan_Ptr);
if C = '.' then
-- Scan out point, but do not scan past .. which is a range
-- sequence, and must not be eaten up scanning a numeric literal.
while C = '.' and then Source (Scan_Ptr + 1) /= '.' loop
Accumulate_Checksum ('.');
if Point_Scanned then
Error_Msg_S ("duplicate point ignored");
end if;
Point_Scanned := True;
Scan_Ptr := Scan_Ptr + 1;
C := Source (Scan_Ptr);
if C not in '0' .. '9' then
Error_Msg
("real literal cannot end with point", Scan_Ptr - 1);
else
Scan_Integer;
UI_Num_Value := UI_Int_Value;
end if;
end loop;
-- Based literal case. The base is the value we already scanned.
-- In the case of colon, we insist that the following character
-- is indeed an extended digit or a period. This catches a number
-- of common errors, as well as catching the well known tricky
-- bug otherwise arising from "x : integer range 1 .. 10:= 6;"
elsif C = '#'
or else (C = ':' and then
(Source (Scan_Ptr + 1) = '.'
or else
Source (Scan_Ptr + 1) in '0' .. '9'
or else
Source (Scan_Ptr + 1) in 'A' .. 'Z'
or else
Source (Scan_Ptr + 1) in 'a' .. 'z'))
then
Accumulate_Checksum (C);
Base_Char := C;
UI_Base := UI_Int_Value;
if Base_Char = ':' then
Based_Literal_Uses_Colon := True;
end if;
if UI_Base < 2 or else UI_Base > 16 then
Error_Msg_SC ("base not 2-16");
UI_Base := Uint_16;
end if;
Base := UI_To_Int (UI_Base);
Scan_Ptr := Scan_Ptr + 1;
-- Scan out extended integer [. integer]
C := Source (Scan_Ptr);
UI_Int_Value := Uint_0;
Scale := 0;
loop
if C in '0' .. '9' then
Accumulate_Checksum (C);
Extended_Digit_Value :=
Int'(Character'Pos (C)) - Int'(Character'Pos ('0'));
elsif C in 'A' .. 'F' then
Accumulate_Checksum (Character'Val (Character'Pos (C) + 32));
Extended_Digit_Value :=
Int'(Character'Pos (C)) - Int'(Character'Pos ('A')) + 10;
elsif C in 'a' .. 'f' then
Accumulate_Checksum (C);
Extended_Digit_Value :=
Int'(Character'Pos (C)) - Int'(Character'Pos ('a')) + 10;
else
Error_Msg_S ("extended digit expected");
exit;
end if;
if Extended_Digit_Value >= Base then
Error_Msg_S ("digit '>= base");
end if;
UI_Int_Value := UI_Int_Value * UI_Base + Extended_Digit_Value;
Scale := Scale - 1;
Scan_Ptr := Scan_Ptr + 1;
C := Source (Scan_Ptr);
if C = '_' then
loop
Accumulate_Checksum ('_');
Scan_Ptr := Scan_Ptr + 1;
C := Source (Scan_Ptr);
exit when C /= '_';
Error_No_Double_Underline;
end loop;
elsif C = '.' then
Accumulate_Checksum ('.');
if Point_Scanned then
Error_Msg_S ("duplicate point ignored");
end if;
Scan_Ptr := Scan_Ptr + 1;
C := Source (Scan_Ptr);
Point_Scanned := True;
Scale := 0;
elsif C = Base_Char then
Accumulate_Checksum (C);
Scan_Ptr := Scan_Ptr + 1;
exit;
elsif C = '#' or else C = ':' then
Error_Msg_S ("based number delimiters must match");
Scan_Ptr := Scan_Ptr + 1;
exit;
elsif not Identifier_Char (C) then
if Base_Char = '#' then
Error_Msg_S -- CODEFIX
("missing '#");
else
Error_Msg_S -- CODEFIX
("missing ':");
end if;
exit;
end if;
end loop;
UI_Num_Value := UI_Int_Value;
end if;
-- Scan out exponent
if not Point_Scanned then
Scale := 0;
UI_Scale := Uint_0;
else
UI_Scale := UI_From_Int (Scale);
end if;
if Source (Scan_Ptr) = 'e' or else Source (Scan_Ptr) = 'E' then
Accumulate_Checksum ('e');
Scan_Ptr := Scan_Ptr + 1;
Exponent_Is_Negative := False;
if Source (Scan_Ptr) = '+' then
Accumulate_Checksum ('+');
Scan_Ptr := Scan_Ptr + 1;
elsif Source (Scan_Ptr) = '-' then
Accumulate_Checksum ('-');
if not Point_Scanned then
Error_Msg_S
("negative exponent not allowed for integer literal");
else
Exponent_Is_Negative := True;
end if;
Scan_Ptr := Scan_Ptr + 1;
end if;
UI_Int_Value := Uint_0;
if Source (Scan_Ptr) in '0' .. '9' then
Scan_Integer;
else
Error_Digit_Expected;
end if;
if Exponent_Is_Negative then
UI_Scale := UI_Scale - UI_Int_Value;
else
UI_Scale := UI_Scale + UI_Int_Value;
end if;
end if;
-- Case of real literal to be returned
if Point_Scanned then
Token := Tok_Real_Literal;
Real_Literal_Value :=
UR_From_Components (
Num => UI_Num_Value,
Den => -UI_Scale,
Rbase => Base);
-- Case of integer literal to be returned
else
Token := Tok_Integer_Literal;
if UI_Scale = 0 then
Int_Literal_Value := UI_Num_Value;
-- Avoid doing possibly expensive calculations in cases like
-- parsing 163E800_000# when semantics will not be done anyway.
-- This is especially useful when parsing garbled input.
elsif Operating_Mode /= Check_Syntax
and then (Serious_Errors_Detected = 0 or else Try_Semantics)
then
Int_Literal_Value := UI_Num_Value * UI_Base ** UI_Scale;
else
Int_Literal_Value := No_Uint;
end if;
end if;
Accumulate_Token_Checksum;
end Nlit;
----------
-- Slit --
----------
procedure Slit is
Delimiter : Character;
-- Delimiter (first character of string)
C : Character;
-- Current source program character
Code : Char_Code;
-- Current character code value
Err : Boolean;
-- Error flag for Scan_Wide call
String_Start : Source_Ptr;
-- Point to first character of string
procedure Error_Bad_String_Char;
-- Signal bad character in string/character literal. On entry
-- Scan_Ptr points to the improper character encountered during the
-- scan. Scan_Ptr is not modified, so it still points to the bad
-- character on return.
procedure Error_Unterminated_String;
-- Procedure called if a line terminator character is encountered
-- during scanning a string, meaning that the string is not properly
-- terminated.
procedure Set_String;
-- Procedure used to distinguish between string and operator symbol.
-- On entry the string has been scanned out, and its characters start
-- at Token_Ptr and end one character before Scan_Ptr. On exit Token
-- is set to Tok_String_Literal/Tok_Operator_Symbol as appropriate,
-- and Token_Node is appropriately initialized. In addition, in the
-- operator symbol case, Token_Name is appropriately set, and the
-- flags [Wide_]Wide_Character_Found are set appropriately.
---------------------------
-- Error_Bad_String_Char --
---------------------------
procedure Error_Bad_String_Char is
C : constant Character := Source (Scan_Ptr);
begin
if C = HT then
Error_Msg_S ("horizontal tab not allowed in string");
elsif C = VT or else C = FF then
Error_Msg_S ("format effector not allowed in string");
elsif C in Upper_Half_Character then
Error_Msg_S ("(Ada 83) upper half character not allowed");
else
Error_Msg_S ("control character not allowed in string");
end if;
end Error_Bad_String_Char;
-------------------------------
-- Error_Unterminated_String --
-------------------------------
procedure Error_Unterminated_String is
S : Source_Ptr;
begin
-- An interesting little refinement. Consider the following
-- examples:
-- A := "this is an unterminated string;
-- A := "this is an unterminated string &
-- P(A, "this is a parameter that didn't get terminated);
-- P("this is a parameter that didn't get terminated, A);
-- We fiddle a little to do slightly better placement in these
-- cases also if there is white space at the end of the line we
-- place the flag at the start of this white space, not at the
-- end. Note that we only have to test for blanks, since tabs
-- aren't allowed in strings in the first place and would have
-- caused an error message.
-- Two more cases that we treat specially are:
-- A := "this string uses the wrong terminator'
-- A := "this string uses the wrong terminator' &
-- In these cases we give a different error message as well
-- We actually reposition the scan pointer to the point where we
-- place the flag in these cases, since it seems a better bet on
-- the original intention.
while Source (Scan_Ptr - 1) = ' '
or else Source (Scan_Ptr - 1) = '&'
loop
Scan_Ptr := Scan_Ptr - 1;
Unstore_String_Char;
end loop;
-- Check for case of incorrect string terminator, but single quote
-- is not considered incorrect if the opening terminator misused
-- a single quote (error message already given).
if Delimiter /= '''
and then Source (Scan_Ptr - 1) = '''
then
Unstore_String_Char;
Error_Msg
("incorrect string terminator character", Scan_Ptr - 1);
return;
end if;
-- Backup over semicolon or right-paren/semicolon sequence
if Source (Scan_Ptr - 1) = ';' then
Scan_Ptr := Scan_Ptr - 1;
Unstore_String_Char;
if Source (Scan_Ptr - 1) = ')' then
Scan_Ptr := Scan_Ptr - 1;
Unstore_String_Char;
end if;
end if;
-- See if there is a comma in the string, if so, guess that
-- the first comma terminates the string.
S := String_Start;
while S < Scan_Ptr loop
if Source (S) = ',' then
while Scan_Ptr > S loop
Scan_Ptr := Scan_Ptr - 1;
Unstore_String_Char;
end loop;
exit;
end if;
S := S + 1;
end loop;
-- Now we have adjusted the scan pointer, give message
Error_Msg_S -- CODEFIX
("missing string quote");
end Error_Unterminated_String;
----------------
-- Set_String --
----------------
procedure Set_String is
Slen : constant Int := Int (Scan_Ptr - Token_Ptr - 2);
C1 : Character;
C2 : Character;
C3 : Character;
begin
-- Token_Name is currently set to Error_Name. The following
-- section of code resets Token_Name to the proper Name_Op_xx
-- value if the string is a valid operator symbol, otherwise it is
-- left set to Error_Name.
if Slen = 1 then
C1 := Source (Token_Ptr + 1);
case C1 is
when '=' =>
Token_Name := Name_Op_Eq;
when '>' =>
Token_Name := Name_Op_Gt;
when '<' =>
Token_Name := Name_Op_Lt;
when '+' =>
Token_Name := Name_Op_Add;
when '-' =>
Token_Name := Name_Op_Subtract;
when '&' =>
Token_Name := Name_Op_Concat;
when '*' =>
Token_Name := Name_Op_Multiply;
when '/' =>
Token_Name := Name_Op_Divide;
when others =>
null;
end case;
elsif Slen = 2 then
C1 := Source (Token_Ptr + 1);
C2 := Source (Token_Ptr + 2);
if C1 = '*' and then C2 = '*' then
Token_Name := Name_Op_Expon;
elsif C2 = '=' then
if C1 = '/' then
Token_Name := Name_Op_Ne;
elsif C1 = '<' then
Token_Name := Name_Op_Le;
elsif C1 = '>' then
Token_Name := Name_Op_Ge;
end if;
elsif (C1 = 'O' or else C1 = 'o') and then -- OR
(C2 = 'R' or else C2 = 'r')
then
Token_Name := Name_Op_Or;
end if;
elsif Slen = 3 then
C1 := Source (Token_Ptr + 1);
C2 := Source (Token_Ptr + 2);
C3 := Source (Token_Ptr + 3);
if (C1 = 'A' or else C1 = 'a') and then -- AND
(C2 = 'N' or else C2 = 'n') and then
(C3 = 'D' or else C3 = 'd')
then
Token_Name := Name_Op_And;
elsif (C1 = 'A' or else C1 = 'a') and then -- ABS
(C2 = 'B' or else C2 = 'b') and then
(C3 = 'S' or else C3 = 's')
then
Token_Name := Name_Op_Abs;
elsif (C1 = 'M' or else C1 = 'm') and then -- MOD
(C2 = 'O' or else C2 = 'o') and then
(C3 = 'D' or else C3 = 'd')
then
Token_Name := Name_Op_Mod;
elsif (C1 = 'N' or else C1 = 'n') and then -- NOT
(C2 = 'O' or else C2 = 'o') and then
(C3 = 'T' or else C3 = 't')
then
Token_Name := Name_Op_Not;
elsif (C1 = 'R' or else C1 = 'r') and then -- REM
(C2 = 'E' or else C2 = 'e') and then
(C3 = 'M' or else C3 = 'm')
then
Token_Name := Name_Op_Rem;
elsif (C1 = 'X' or else C1 = 'x') and then -- XOR
(C2 = 'O' or else C2 = 'o') and then
(C3 = 'R' or else C3 = 'r')
then
Token_Name := Name_Op_Xor;
end if;
end if;
-- If it is an operator symbol, then Token_Name is set. If it is
-- some other string value, then Token_Name still contains
-- Error_Name.
if Token_Name = Error_Name then
Token := Tok_String_Literal;
else
Token := Tok_Operator_Symbol;
end if;
end Set_String;
-- Start of processing for Slit
begin
-- On entry, Scan_Ptr points to the opening character of the string
-- which is either a percent, double quote, or apostrophe (single
-- quote). The latter case is an error detected by the character
-- literal circuit.
String_Start := Scan_Ptr;
Delimiter := Source (Scan_Ptr);
Accumulate_Checksum (Delimiter);
Start_String;
Wide_Character_Found := False;
Wide_Wide_Character_Found := False;
Scan_Ptr := Scan_Ptr + 1;
-- Loop to scan out characters of string literal
loop
C := Source (Scan_Ptr);
if C = Delimiter then
Accumulate_Checksum (C);
Scan_Ptr := Scan_Ptr + 1;
exit when Source (Scan_Ptr) /= Delimiter;
Code := Get_Char_Code (C);
Accumulate_Checksum (C);
Scan_Ptr := Scan_Ptr + 1;
else
if C = '"' and then Delimiter = '%' then
Error_Msg_S
("quote not allowed in percent delimited string");
Code := Get_Char_Code (C);
Scan_Ptr := Scan_Ptr + 1;
elsif Start_Of_Wide_Character then
Wptr := Scan_Ptr;
Scan_Wide (Source, Scan_Ptr, Code, Err);
if Err then
Error_Illegal_Wide_Character;
Code := Get_Char_Code (' ');
end if;
Accumulate_Checksum (Code);
-- In Ada 95 mode we allow any wide characters in a string
-- but in Ada 2005, the set of characters allowed has been
-- restricted to graphic characters.
if Ada_Version >= Ada_2005
and then Is_UTF_32_Non_Graphic (UTF_32 (Code))
then
Error_Msg
("(Ada 2005) non-graphic character not permitted " &
"in string literal", Wptr);
end if;
else
Accumulate_Checksum (C);
if C not in Graphic_Character then
if C in Line_Terminator then
Error_Unterminated_String;
exit;
elsif C in Upper_Half_Character then
if Ada_Version = Ada_83 then
Error_Bad_String_Char;
end if;
else
Error_Bad_String_Char;
end if;
end if;
Code := Get_Char_Code (C);
Scan_Ptr := Scan_Ptr + 1;
end if;
end if;
Store_String_Char (Code);
if not In_Character_Range (Code) then
if In_Wide_Character_Range (Code) then
Wide_Character_Found := True;
else
Wide_Wide_Character_Found := True;
end if;
end if;
end loop;
String_Literal_Id := End_String;
Set_String;
return;
end Slit;
----------------------------------
-- Skip_Other_Format_Characters --
----------------------------------
procedure Skip_Other_Format_Characters is
P : Source_Ptr;
Code : Char_Code;
Err : Boolean;
begin
while Start_Of_Wide_Character loop
P := Scan_Ptr;
Scan_Wide (Source, Scan_Ptr, Code, Err);
if not Is_UTF_32_Other (UTF_32 (Code)) then
Scan_Ptr := P;
return;
end if;
end loop;
end Skip_Other_Format_Characters;
-----------------------------
-- Start_Of_Wide_Character --
-----------------------------
function Start_Of_Wide_Character return Boolean is
C : constant Character := Source (Scan_Ptr);
begin
-- ESC encoding method with ESC present
if C = ESC
and then Wide_Character_Encoding_Method in WC_ESC_Encoding_Method
then
return True;
-- Upper half character with upper half encoding
elsif C in Upper_Half_Character and then Upper_Half_Encoding then
return True;
-- Brackets encoding
elsif C = '['
and then Source (Scan_Ptr + 1) = '"'
and then Identifier_Char (Source (Scan_Ptr + 2))
then
return True;
-- Not the start of a wide character
else
return False;
end if;
end Start_Of_Wide_Character;
-- Start of processing for Scan
begin
Prev_Token := Token;
Prev_Token_Ptr := Token_Ptr;
Token_Name := Error_Name;
-- The following loop runs more than once only if a format effector
-- (tab, vertical tab, form feed, line feed, carriage return) is
-- encountered and skipped, or some error situation, such as an
-- illegal character, is encountered.
<<Scan_Next_Character>>
loop
-- Skip past blanks, loop is opened up for speed
while Source (Scan_Ptr) = ' ' loop
if Source (Scan_Ptr + 1) /= ' ' then
Scan_Ptr := Scan_Ptr + 1;
exit;
end if;
if Source (Scan_Ptr + 2) /= ' ' then
Scan_Ptr := Scan_Ptr + 2;
exit;
end if;
if Source (Scan_Ptr + 3) /= ' ' then
Scan_Ptr := Scan_Ptr + 3;
exit;
end if;
if Source (Scan_Ptr + 4) /= ' ' then
Scan_Ptr := Scan_Ptr + 4;
exit;
end if;
if Source (Scan_Ptr + 5) /= ' ' then
Scan_Ptr := Scan_Ptr + 5;
exit;
end if;
if Source (Scan_Ptr + 6) /= ' ' then
Scan_Ptr := Scan_Ptr + 6;
exit;
end if;
if Source (Scan_Ptr + 7) /= ' ' then
Scan_Ptr := Scan_Ptr + 7;
exit;
end if;
Scan_Ptr := Scan_Ptr + 8;
end loop;
-- We are now at a non-blank character, which is the first character
-- of the token we will scan, and hence the value of Token_Ptr.
Token_Ptr := Scan_Ptr;
-- Here begins the main case statement which transfers control on the
-- basis of the non-blank character we have encountered.
case Source (Scan_Ptr) is
-- Line terminator characters
when CR | LF | FF | VT =>
goto Scan_Line_Terminator;
-- Horizontal tab, just skip past it
when HT =>
if Style_Check then
Style.Check_HT;
end if;
Scan_Ptr := Scan_Ptr + 1;
-- End of file character, treated as an end of file only if it is
-- the last character in the buffer, otherwise it is ignored.
when EOF =>
if Scan_Ptr = Source_Last (Current_Source_File) then
Check_End_Of_Line;
if Style_Check then
Style.Check_EOF;
end if;
Token := Tok_EOF;
return;
else
Scan_Ptr := Scan_Ptr + 1;
end if;
-- Ampersand
when '&' =>
Accumulate_Checksum ('&');
if Source (Scan_Ptr + 1) = '&' then
Error_Msg_S -- CODEFIX
("'&'& should be `AND THEN`");
Scan_Ptr := Scan_Ptr + 2;
Token := Tok_And;
return;
else
Scan_Ptr := Scan_Ptr + 1;
Token := Tok_Ampersand;
return;
end if;
when '@' =>
if Ada_Version < Ada_2020 then
Error_Msg ("target_name is an Ada 202x feature", Scan_Ptr);
Scan_Ptr := Scan_Ptr + 1;
else
-- AI12-0125-03 : @ is target_name
Accumulate_Checksum ('@');
Scan_Ptr := Scan_Ptr + 1;
Token := Tok_At_Sign;
return;
end if;
-- Asterisk (can be multiplication operator or double asterisk which
-- is the exponentiation compound delimiter).
when '*' =>
Accumulate_Checksum ('*');
if Source (Scan_Ptr + 1) = '*' then
Accumulate_Checksum ('*');
Scan_Ptr := Scan_Ptr + 2;
Token := Tok_Double_Asterisk;
return;
else
Scan_Ptr := Scan_Ptr + 1;
Token := Tok_Asterisk;
return;
end if;
-- Colon, which can either be an isolated colon, or part of an
-- assignment compound delimiter.
when ':' =>
Accumulate_Checksum (':');
if Double_Char_Token ('=') then
Token := Tok_Colon_Equal;
if Style_Check then
Style.Check_Colon_Equal;
end if;
return;
elsif Source (Scan_Ptr + 1) = '-'
and then Source (Scan_Ptr + 2) /= '-'
then
Token := Tok_Colon_Equal;
Error_Msg -- CODEFIX
(":- should be :=", Scan_Ptr);
Scan_Ptr := Scan_Ptr + 2;
return;
else
Scan_Ptr := Scan_Ptr + 1;
Token := Tok_Colon;
if Style_Check then
Style.Check_Colon;
end if;
return;
end if;
-- Left parenthesis
when '(' =>
Accumulate_Checksum ('(');
Scan_Ptr := Scan_Ptr + 1;
Token := Tok_Left_Paren;
if Style_Check then
Style.Check_Left_Paren;
end if;
return;
-- Left bracket
when '[' =>
-- [] under -gnatX is an aggregate notation and the special
-- wide character notation becomes unsupported since the two
-- are ambiguous.
if Extensions_Allowed then
Scan_Ptr := Scan_Ptr + 1;
Token := Tok_Left_Bracket;
return;
elsif Source (Scan_Ptr + 1) = '"' then
goto Scan_Wide_Character;
else
Error_Msg_S ("illegal character, replaced by ""(""");
Scan_Ptr := Scan_Ptr + 1;
Token := Tok_Left_Paren;
return;
end if;
-- Left brace
when '{' =>
Error_Msg_S ("illegal character, replaced by ""(""");
Scan_Ptr := Scan_Ptr + 1;
Token := Tok_Left_Paren;
return;
-- Comma
when ',' =>
Accumulate_Checksum (',');
Scan_Ptr := Scan_Ptr + 1;
Token := Tok_Comma;
if Style_Check then
Style.Check_Comma;
end if;
return;
-- Dot, which is either an isolated period, or part of a double dot
-- compound delimiter sequence. We also check for the case of a
-- digit following the period, to give a better error message.
when '.' =>
Accumulate_Checksum ('.');
if Double_Char_Token ('.') then
Token := Tok_Dot_Dot;
if Style_Check then
Style.Check_Dot_Dot;
end if;
return;
elsif Source (Scan_Ptr + 1) in '0' .. '9' then
Error_Msg_S ("numeric literal cannot start with point");
Scan_Ptr := Scan_Ptr + 1;
else
Scan_Ptr := Scan_Ptr + 1;
Token := Tok_Dot;
return;
end if;
-- Equal, which can either be an equality operator, or part of the
-- arrow (=>) compound delimiter.
when '=' =>
Accumulate_Checksum ('=');
if Double_Char_Token ('>') then
Token := Tok_Arrow;
if Style_Check then
Style.Check_Arrow (Inside_Depends);
end if;
return;
elsif Source (Scan_Ptr + 1) = '=' then
Error_Msg_S -- CODEFIX
("== should be =");
Scan_Ptr := Scan_Ptr + 1;
end if;
Scan_Ptr := Scan_Ptr + 1;
Token := Tok_Equal;
return;
-- Greater than, which can be a greater than operator, greater than
-- or equal operator, or first character of a right label bracket.
when '>' =>
Accumulate_Checksum ('>');
if Double_Char_Token ('=') then
Token := Tok_Greater_Equal;
return;
elsif Double_Char_Token ('>') then
Token := Tok_Greater_Greater;
return;
else
Scan_Ptr := Scan_Ptr + 1;
Token := Tok_Greater;
return;
end if;
-- Less than, which can be a less than operator, less than or equal
-- operator, or the first character of a left label bracket, or the
-- first character of a box (<>) compound delimiter.
when '<' =>
Accumulate_Checksum ('<');
if Double_Char_Token ('=') then
Token := Tok_Less_Equal;
return;
elsif Double_Char_Token ('>') then
Token := Tok_Box;
if Style_Check then
Style.Check_Box;
end if;
return;
elsif Double_Char_Token ('<') then
Token := Tok_Less_Less;
return;
else
Scan_Ptr := Scan_Ptr + 1;
Token := Tok_Less;
return;
end if;
-- Minus, which is either a subtraction operator, or the first
-- character of double minus starting a comment
when '-' => Minus_Case : begin
if Source (Scan_Ptr + 1) = '>' then
Error_Msg_S ("invalid token");
Scan_Ptr := Scan_Ptr + 2;
Token := Tok_Arrow;
return;
elsif Source (Scan_Ptr + 1) /= '-' then
Accumulate_Checksum ('-');
Scan_Ptr := Scan_Ptr + 1;
Token := Tok_Minus;
return;
-- Comment
else -- Source (Scan_Ptr + 1) = '-' then
if Style_Check then
Style.Check_Comment;
end if;
Scan_Ptr := Scan_Ptr + 2;
-- If we are in preprocessor mode with Replace_In_Comments set,
-- then we return the "--" as a token on its own.
if Replace_In_Comments then
Token := Tok_Comment;
return;
end if;
-- Otherwise scan out the comment
Start_Of_Comment := Scan_Ptr;
-- Loop to scan comment (this loop runs more than once only if
-- a horizontal tab or other non-graphic character is scanned)
loop
-- Scan to non graphic character (opened up for speed)
-- Note that we just eat left brackets, which means that
-- bracket notation cannot be used for end of line
-- characters in comments. This seems a reasonable choice,
-- since no one would ever use brackets notation in a real
-- program in this situation, and if we allow brackets
-- notation, we forbid some valid comments which contain a
-- brackets sequence that happens to match an end of line
-- character.
loop
exit when Source (Scan_Ptr) not in Graphic_Character;
Scan_Ptr := Scan_Ptr + 1;
exit when Source (Scan_Ptr) not in Graphic_Character;
Scan_Ptr := Scan_Ptr + 1;
exit when Source (Scan_Ptr) not in Graphic_Character;
Scan_Ptr := Scan_Ptr + 1;
exit when Source (Scan_Ptr) not in Graphic_Character;
Scan_Ptr := Scan_Ptr + 1;
exit when Source (Scan_Ptr) not in Graphic_Character;
Scan_Ptr := Scan_Ptr + 1;
end loop;
-- Keep going if horizontal tab
if Source (Scan_Ptr) = HT then
if Style_Check then
Style.Check_HT;
end if;
Scan_Ptr := Scan_Ptr + 1;
-- Terminate scan of comment if line terminator
elsif Source (Scan_Ptr) in Line_Terminator then
exit;
-- Terminate scan of comment if end of file encountered
-- (embedded EOF character or real last character in file)
elsif Source (Scan_Ptr) = EOF then
exit;
-- If we have a wide character, we have to scan it out,
-- because it might be a legitimate line terminator
elsif Start_Of_Wide_Character then
declare
Wptr : constant Source_Ptr := Scan_Ptr;
Code : Char_Code;
Err : Boolean;
begin
Scan_Wide (Source, Scan_Ptr, Code, Err);
-- If not well formed wide character, then just skip
-- past it and ignore it.
if Err then
Scan_Ptr := Wptr + 1;
-- If UTF_32 terminator, terminate comment scan
elsif Is_UTF_32_Line_Terminator (UTF_32 (Code)) then
Scan_Ptr := Wptr;
exit;
end if;
end;
-- Keep going if character in 80-FF range, or is ESC. These
-- characters are allowed in comments by RM-2.1(1), 2.7(2).
-- They are allowed even in Ada 83 mode according to the
-- approved AI. ESC was added to the AI in June 93.
elsif Source (Scan_Ptr) in Upper_Half_Character
or else Source (Scan_Ptr) = ESC
then
Scan_Ptr := Scan_Ptr + 1;
-- Otherwise we have an illegal comment character, ignore
-- this error in relaxed semantics mode.
else
if Relaxed_RM_Semantics then
Scan_Ptr := Scan_Ptr + 1;
else
Error_Illegal_Character;
end if;
end if;
end loop;
-- Note that, except when comments are tokens, we do NOT
-- execute a return here, instead we fall through to reexecute
-- the scan loop to look for a token.
if Comment_Is_Token then
Name_Len := Integer (Scan_Ptr - Start_Of_Comment);
Name_Buffer (1 .. Name_Len) :=
String (Source (Start_Of_Comment .. Scan_Ptr - 1));
Comment_Id := Name_Find;
Token := Tok_Comment;
return;
end if;
end if;
end Minus_Case;
-- Double quote or percent starting a string literal
when '"' | '%' =>
Slit;
Post_Scan;
return;
-- Apostrophe. This can either be the start of a character literal,
-- or an isolated apostrophe used in a qualified expression or an
-- attribute. In the following:
-- A := CHARACTER'('A');
-- the first apostrophe is treated as an isolated apostrophe, and the
-- second one is treated as the start of the character literal 'A'.
-- Note that RM-2.2(7) does not require a separator between "'" and
-- "(" in the above, so we cannot use lookahead to distinguish the
-- cases; we use look-back instead. Analysis of the grammar shows
-- that some tokens can be followed by an apostrophe, and some by a
-- character literal, but none by both. Some cannot be followed by
-- either, so it doesn't matter what we do in those cases, except to
-- get good error behavior.
when ''' => Char_Literal_Case : declare
Code : Char_Code;
Err : Boolean;
begin
Accumulate_Checksum (''');
Scan_Ptr := Scan_Ptr + 1;
-- Distinguish between apostrophe and character literal. It's an
-- apostrophe if the previous token is one of the following.
-- Reserved words are included for things like A.all'Address and
-- T'Digits'Img. Strings literals are included for things like
-- "abs"'Address. Other literals are included to give better error
-- behavior for illegal cases like 123'Img.
--
-- In Ada 2020, a target name (i.e. @) is a valid prefix of an
-- attribute, and functions like a name.
if Prev_Token = Tok_All
or else Prev_Token = Tok_At_Sign
or else Prev_Token = Tok_Delta
or else Prev_Token = Tok_Digits
or else Prev_Token = Tok_Identifier
or else Prev_Token = Tok_Project
or else Prev_Token = Tok_Right_Paren
or else Prev_Token = Tok_Right_Bracket
or else Prev_Token in Token_Class_Literal
then
Token := Tok_Apostrophe;
if Style_Check then
Style.Check_Apostrophe;
end if;
return;
-- Otherwise the apostrophe starts a character literal
else
-- Case of wide character literal
if Start_Of_Wide_Character then
Wptr := Scan_Ptr;
Scan_Wide (Source, Scan_Ptr, Code, Err);
Accumulate_Checksum (Code);
if Err then
Error_Illegal_Wide_Character;
Code := Character'Pos (' ');
-- In Ada 95 mode we allow any wide character in a character
-- literal, but in Ada 2005, the set of characters allowed
-- is restricted to graphic characters.
elsif Ada_Version >= Ada_2005
and then Is_UTF_32_Non_Graphic (UTF_32 (Code))
then
Error_Msg -- CODEFIX????
("(Ada 2005) non-graphic character not permitted " &
"in character literal", Wptr);
end if;
if Source (Scan_Ptr) /= ''' then
Error_Msg_S ("missing apostrophe");
else
Scan_Ptr := Scan_Ptr + 1;
end if;
-- If we do not find a closing quote in the expected place then
-- assume that we have a misguided attempt at a string literal.
-- However, if previous token is RANGE, then we return an
-- apostrophe instead since this gives better error recovery
elsif Source (Scan_Ptr + 1) /= ''' then
if Prev_Token = Tok_Range then
Token := Tok_Apostrophe;
return;
else
Scan_Ptr := Scan_Ptr - 1;
Error_Msg_S
("strings are delimited by double quote character");
Slit;
Post_Scan;
return;
end if;
-- Otherwise we have a (non-wide) character literal
else
Accumulate_Checksum (Source (Scan_Ptr));
if Source (Scan_Ptr) not in Graphic_Character then
if Source (Scan_Ptr) in Upper_Half_Character then
if Ada_Version = Ada_83 then
Error_Illegal_Character;
end if;
else
Error_Illegal_Character;
end if;
end if;
Code := Get_Char_Code (Source (Scan_Ptr));
Scan_Ptr := Scan_Ptr + 2;
end if;
-- Fall through here with Scan_Ptr updated past the closing
-- quote, and Code set to the Char_Code value for the literal
Accumulate_Checksum (''');
Token := Tok_Char_Literal;
Set_Character_Literal_Name (Code);
Token_Name := Name_Find;
Character_Code := Code;
Post_Scan;
return;
end if;
end Char_Literal_Case;
-- Right parenthesis
when ')' =>
Accumulate_Checksum (')');
Scan_Ptr := Scan_Ptr + 1;
Token := Tok_Right_Paren;
if Style_Check then
Style.Check_Right_Paren;
end if;
return;
-- Right bracket or right brace, treated as right paren but proper
-- aggregate delimiter in Ada 2020.
when ']' | '}' =>
if Ada_Version >= Ada_2020 then
Token := Tok_Right_Bracket;
else
Error_Msg_S ("illegal character, replaced by "")""");
Token := Tok_Right_Paren;
end if;
Scan_Ptr := Scan_Ptr + 1;
return;
-- Slash (can be division operator or first character of not equal)
when '/' =>
Accumulate_Checksum ('/');
if Double_Char_Token ('=') then
Token := Tok_Not_Equal;
return;
else
Scan_Ptr := Scan_Ptr + 1;
Token := Tok_Slash;
return;
end if;
-- Semicolon
when ';' =>
Accumulate_Checksum (';');
Scan_Ptr := Scan_Ptr + 1;
Token := Tok_Semicolon;
if Style_Check then
Style.Check_Semicolon;
end if;
return;
-- Vertical bar
when '|' => Vertical_Bar_Case : begin
Accumulate_Checksum ('|');
-- Special check for || to give nice message
if Source (Scan_Ptr + 1) = '|' then
Error_Msg_S -- CODEFIX
("""'|'|"" should be `OR ELSE`");
Scan_Ptr := Scan_Ptr + 2;
Token := Tok_Or;
return;
else
Scan_Ptr := Scan_Ptr + 1;
Token := Tok_Vertical_Bar;
if Style_Check then
Style.Check_Vertical_Bar;
end if;
Post_Scan;
return;
end if;
end Vertical_Bar_Case;
-- Exclamation, replacement character for vertical bar
when '!' => Exclamation_Case : begin
Accumulate_Checksum ('!');
if Source (Scan_Ptr + 1) = '=' then
Error_Msg_S -- CODEFIX
("'!= should be /=");
Scan_Ptr := Scan_Ptr + 2;
Token := Tok_Not_Equal;
return;
else
Scan_Ptr := Scan_Ptr + 1;
Token := Tok_Vertical_Bar;
Post_Scan;
return;
end if;
end Exclamation_Case;
-- Plus
when '+' => Plus_Case : begin
Accumulate_Checksum ('+');
Scan_Ptr := Scan_Ptr + 1;
Token := Tok_Plus;
return;
end Plus_Case;
-- Digits starting a numeric literal
when '0' .. '9' =>
-- First a bit of a scan ahead to see if we have a case of an
-- identifier starting with a digit (remembering exponent case).
declare
C : constant Character := Source (Scan_Ptr + 1);
begin
-- OK literal if digit followed by digit or underscore
if C in '0' .. '9' or else C = '_' then
null;
-- OK literal if digit not followed by identifier char
elsif not Identifier_Char (C) then
null;
-- OK literal if digit followed by e/E followed by digit/sign.
-- We also allow underscore after the E, which is an error, but
-- better handled by Nlit than deciding this is an identifier.
elsif (C = 'e' or else C = 'E')
and then (Source (Scan_Ptr + 2) in '0' .. '9'
or else Source (Scan_Ptr + 2) = '+'
or else Source (Scan_Ptr + 2) = '-'
or else Source (Scan_Ptr + 2) = '_')
then
null;
-- Here we have what really looks like an identifier that
-- starts with a digit, so give error msg.
else
Error_Msg_S ("identifier may not start with digit");
Name_Len := 1;
Underline_Found := False;
Name_Buffer (1) := Source (Scan_Ptr);
Accumulate_Checksum (Name_Buffer (1));
Scan_Ptr := Scan_Ptr + 1;
goto Scan_Identifier;
end if;
end;
-- Here we have an OK integer literal
Nlit;
-- Check for proper delimiter, ignoring other format characters
Skip_Other_Format_Characters;
if Identifier_Char (Source (Scan_Ptr)) then
Error_Msg_S
("delimiter required between literal and identifier");
end if;
Post_Scan;
return;
-- Lower case letters
when 'a' .. 'z' =>
Name_Len := 1;
Underline_Found := False;
Name_Buffer (1) := Source (Scan_Ptr);
Accumulate_Checksum (Name_Buffer (1));
Scan_Ptr := Scan_Ptr + 1;
goto Scan_Identifier;
-- Upper case letters
when 'A' .. 'Z' =>
Name_Len := 1;
Underline_Found := False;
Name_Buffer (1) :=
Character'Val (Character'Pos (Source (Scan_Ptr)) + 32);
Accumulate_Checksum (Name_Buffer (1));
Scan_Ptr := Scan_Ptr + 1;
goto Scan_Identifier;
-- Underline character
when '_' =>
if Special_Characters ('_') then
Token_Ptr := Scan_Ptr;
Scan_Ptr := Scan_Ptr + 1;
Token := Tok_Special;
Special_Character := '_';
return;
end if;
Error_Msg_S ("identifier cannot start with underline");
Name_Len := 1;
Name_Buffer (1) := '_';
Scan_Ptr := Scan_Ptr + 1;
Underline_Found := False;
goto Scan_Identifier;
-- Space (not possible, because we scanned past blanks)
when ' ' =>
raise Program_Error;
-- Characters in top half of ASCII 8-bit chart
when Upper_Half_Character =>
-- Wide character case
if Upper_Half_Encoding then
goto Scan_Wide_Character;
-- Otherwise we have OK Latin-1 character
else
-- Upper half characters may possibly be identifier letters
-- but can never be digits, so Identifier_Char can be used to
-- test for a valid start of identifier character.
if Identifier_Char (Source (Scan_Ptr)) then
Name_Len := 0;
Underline_Found := False;
goto Scan_Identifier;
else
Error_Illegal_Character;
end if;
end if;
when ESC =>
-- ESC character, possible start of identifier if wide characters
-- using ESC encoding are allowed in identifiers, which we can
-- tell by looking at the Identifier_Char flag for ESC, which is
-- only true if these conditions are met. In Ada 2005 mode, may
-- also be valid UTF_32 space or line terminator character.
if Identifier_Char (ESC) then
Name_Len := 0;
goto Scan_Wide_Character;
else
Error_Illegal_Character;
end if;
-- Invalid control characters
when ACK
| ASCII.SO
| BEL
| BS
| CAN
| DC1
| DC2
| DC3
| DC4
| DEL
| DLE
| EM
| ENQ
| EOT
| ETB
| ETX
| FS
| GS
| NAK
| NUL
| RS
| SI
| SOH
| STX
| SYN
| US
=>
Error_Illegal_Character;
-- Invalid graphic characters
-- Note that '@' is handled elsewhere, because following AI12-125
-- it denotes the target_name of an assignment.
when '#' | '$' | '?' | '`' | '\' | '^' | '~' =>
-- If Set_Special_Character has been called for this character,
-- set Scans.Special_Character and return a Special token.
if Special_Characters (Source (Scan_Ptr)) then
Token_Ptr := Scan_Ptr;
Token := Tok_Special;
Special_Character := Source (Scan_Ptr);
Scan_Ptr := Scan_Ptr + 1;
return;
-- Check for something looking like a preprocessor directive
elsif Source (Scan_Ptr) = '#'
and then (Source (Scan_Ptr + 1 .. Scan_Ptr + 2) = "if"
or else
Source (Scan_Ptr + 1 .. Scan_Ptr + 5) = "elsif"
or else
Source (Scan_Ptr + 1 .. Scan_Ptr + 4) = "else"
or else
Source (Scan_Ptr + 1 .. Scan_Ptr + 3) = "end")
then
Error_Msg_S
("preprocessor directive ignored, preprocessor not active");
-- Skip to end of line
loop
if Source (Scan_Ptr) in Graphic_Character
or else
Source (Scan_Ptr) = HT
then
Scan_Ptr := Scan_Ptr + 1;
-- Done if line terminator or EOF
elsif Source (Scan_Ptr) in Line_Terminator
or else
Source (Scan_Ptr) = EOF
then
exit;
-- If we have a wide character, we have to scan it out,
-- because it might be a legitimate line terminator
elsif Start_Of_Wide_Character then
declare
Wptr : constant Source_Ptr := Scan_Ptr;
Code : Char_Code;
Err : Boolean;
begin
Scan_Wide (Source, Scan_Ptr, Code, Err);
-- If not well formed wide character, then just skip
-- past it and ignore it.
if Err then
Scan_Ptr := Wptr + 1;
-- If UTF_32 terminator, terminate comment scan
elsif Is_UTF_32_Line_Terminator (UTF_32 (Code)) then
Scan_Ptr := Wptr;
exit;
end if;
end;
-- Else keep going (don't worry about bad comment chars
-- in this context, we just want to find the end of line.
else
Scan_Ptr := Scan_Ptr + 1;
end if;
end loop;
-- Otherwise, this is an illegal character
else
Error_Illegal_Character;
end if;
-- End switch on non-blank character
end case;
-- End loop past format effectors. The exit from this loop is by
-- executing a return statement following completion of token scan
-- (control never falls out of this loop to the code that follows).
end loop;
pragma Assert (False);
-- Wide_Character scanning routine. On entry we have encountered the
-- initial character of a wide character sequence.
<<Scan_Wide_Character>>
declare
Code : Char_Code;
Cat : Category;
Err : Boolean;
begin
Wptr := Scan_Ptr;
Scan_Wide (Source, Scan_Ptr, Code, Err);
-- If bad wide character, signal error and continue scan
if Err then
Error_Illegal_Wide_Character;
goto Scan_Next_Character;
end if;
Cat := Get_Category (UTF_32 (Code));
-- If OK letter, reset scan ptr and go scan identifier
if Is_UTF_32_Letter (Cat) then
Scan_Ptr := Wptr;
Name_Len := 0;
Underline_Found := False;
goto Scan_Identifier;
-- If OK wide space, ignore and keep scanning (we do not include
-- any ignored spaces in checksum)
elsif Is_UTF_32_Space (Cat) then
goto Scan_Next_Character;
-- If other format character, ignore and keep scanning (again we
-- do not include in the checksum) (this is for AI-0079).
elsif Is_UTF_32_Other (Cat) then
goto Scan_Next_Character;
-- If OK wide line terminator, terminate current line
elsif Is_UTF_32_Line_Terminator (UTF_32 (Code)) then
Scan_Ptr := Wptr;
goto Scan_Line_Terminator;
-- Punctuation is an error (at start of identifier)
elsif Is_UTF_32_Punctuation (Cat) then
Error_Msg ("identifier cannot start with punctuation", Wptr);
Scan_Ptr := Wptr;
Name_Len := 0;
Underline_Found := False;
goto Scan_Identifier;
-- Mark character is an error (at start of identifier)
elsif Is_UTF_32_Mark (Cat) then
Error_Msg ("identifier cannot start with mark character", Wptr);
Scan_Ptr := Wptr;
Name_Len := 0;
Underline_Found := False;
goto Scan_Identifier;
-- Extended digit character is an error. Could be bad start of
-- identifier or bad literal. Not worth doing too much to try to
-- distinguish these cases, but we will do a little bit.
elsif Is_UTF_32_Digit (Cat) then
Error_Msg
("identifier cannot start with digit character", Wptr);
Scan_Ptr := Wptr;
Name_Len := 0;
Underline_Found := False;
goto Scan_Identifier;
-- All other wide characters are illegal here
else
Error_Illegal_Wide_Character;
goto Scan_Next_Character;
end if;
end;
-- Routine to scan line terminator. On entry Scan_Ptr points to a
-- character which is one of FF,LR,CR,VT, or one of the wide characters
-- that is treated as a line terminator.
<<Scan_Line_Terminator>>
-- Check line too long
Check_End_Of_Line;
-- Set Token_Ptr, if End_Of_Line is a token, for the case when it is
-- a physical line.
if End_Of_Line_Is_Token then
Token_Ptr := Scan_Ptr;
end if;
declare
Physical : Boolean;
begin
Skip_Line_Terminators (Scan_Ptr, Physical);
-- If we are at start of physical line, update scan pointers to
-- reflect the start of the new line.
if Physical then
Current_Line_Start := Scan_Ptr;
Start_Column := Set_Start_Column;
First_Non_Blank_Location := Scan_Ptr;
-- If End_Of_Line is a token, we return it as it is a
-- physical line.
if End_Of_Line_Is_Token then
Token := Tok_End_Of_Line;
return;
end if;
end if;
end;
goto Scan_Next_Character;
-- Identifier scanning routine. On entry, some initial characters of
-- the identifier may have already been stored in Name_Buffer. If so,
-- Name_Len has the number of characters stored, otherwise Name_Len is
-- set to zero on entry. Underline_Found is also set False on entry.
<<Scan_Identifier>>
-- This loop scans as fast as possible past lower half letters and
-- digits, which we expect to be the most common characters.
loop
if Source (Scan_Ptr) in 'a' .. 'z'
or else Source (Scan_Ptr) in '0' .. '9'
then
Name_Buffer (Name_Len + 1) := Source (Scan_Ptr);
Accumulate_Checksum (Source (Scan_Ptr));
elsif Source (Scan_Ptr) in 'A' .. 'Z' then
Name_Buffer (Name_Len + 1) :=
Character'Val (Character'Pos (Source (Scan_Ptr)) + 32);
Accumulate_Checksum (Name_Buffer (Name_Len + 1));
else
exit;
end if;
Underline_Found := False;
Scan_Ptr := Scan_Ptr + 1;
Name_Len := Name_Len + 1;
end loop;
-- If we fall through, then we have encountered either an underline
-- character, or an extended identifier character (i.e. one from the
-- upper half), or a wide character, or an identifier terminator. The
-- initial test speeds us up in the most common case where we have
-- an identifier terminator. Note that ESC is an identifier character
-- only if a wide character encoding method that uses ESC encoding
-- is active, so if we find an ESC character we know that we have a
-- wide character.
if Identifier_Char (Source (Scan_Ptr))
or else (Source (Scan_Ptr) in Upper_Half_Character
and then Upper_Half_Encoding)
then
-- Case of underline
if Source (Scan_Ptr) = '_' then
Accumulate_Checksum ('_');
if Underline_Found then
Error_No_Double_Underline;
else
Underline_Found := True;
Name_Len := Name_Len + 1;
Name_Buffer (Name_Len) := '_';
end if;
Scan_Ptr := Scan_Ptr + 1;
goto Scan_Identifier;
-- Upper half character
elsif Source (Scan_Ptr) in Upper_Half_Character
and then not Upper_Half_Encoding
then
Accumulate_Checksum (Source (Scan_Ptr));
Store_Encoded_Character
(Get_Char_Code (Fold_Lower (Source (Scan_Ptr))));
Scan_Ptr := Scan_Ptr + 1;
Underline_Found := False;
goto Scan_Identifier;
-- Left bracket not followed by a quote terminates an identifier.
-- This is an error, but we don't want to give a junk error msg
-- about wide characters in this case.
elsif Source (Scan_Ptr) = '['
and then Source (Scan_Ptr + 1) /= '"'
then
null;
-- We know we have a wide character encoding here (the current
-- character is either ESC, left bracket, or an upper half
-- character depending on the encoding method).
else
-- Scan out the wide character and insert the appropriate
-- encoding into the name table entry for the identifier.
declare
Code : Char_Code;
Err : Boolean;
Chr : Character;
Cat : Category;
begin
Wptr := Scan_Ptr;
Scan_Wide (Source, Scan_Ptr, Code, Err);
-- If error, signal error
if Err then
Error_Illegal_Wide_Character;
-- If the character scanned is a normal identifier
-- character, then we treat it that way.
elsif In_Character_Range (Code)
and then Identifier_Char (Get_Character (Code))
then
Chr := Get_Character (Code);
Accumulate_Checksum (Chr);
Store_Encoded_Character
(Get_Char_Code (Fold_Lower (Chr)));
Underline_Found := False;
-- Here if not a normal identifier character
else
Cat := Get_Category (UTF_32 (Code));
-- Wide character in Unicode category "Other, Format"
-- is not accepted in an identifier. This is because it
-- it is considered a security risk (AI-0091).
-- However, it is OK for such a character to appear at
-- the end of an identifier.
if Is_UTF_32_Other (Cat) then
if not Identifier_Char (Source (Scan_Ptr)) then
goto Scan_Identifier_Complete;
else
Error_Msg
("identifier cannot contain other_format "
& "character", Wptr);
goto Scan_Identifier;
end if;
-- Wide character in category Separator,Space terminates
elsif Is_UTF_32_Space (Cat) then
goto Scan_Identifier_Complete;
end if;
-- Here if wide character is part of the identifier
-- Make sure we are allowing wide characters in
-- identifiers. Note that we allow wide character
-- notation for an OK identifier character. This in
-- particular allows bracket or other notation to be
-- used for upper half letters.
-- Wide characters are always allowed in Ada 2005
if Identifier_Character_Set /= 'w'
and then Ada_Version < Ada_2005
then
Error_Msg
("wide character not allowed in identifier", Wptr);
end if;
-- AI12-0004: An identifier shall only contain characters
-- that may be present in Normalization Form KC.
if not Is_UTF_32_NFKC (UTF_32 (Code)) then
Error_Msg
("invalid wide character in identifier", Wptr);
-- If OK letter, store it folding to upper case. Note
-- that we include the folded letter in the checksum.
elsif Is_UTF_32_Letter (Cat) then
Code :=
Char_Code (UTF_32_To_Upper_Case (UTF_32 (Code)));
Accumulate_Checksum (Code);
Store_Encoded_Character (Code);
Underline_Found := False;
-- If OK extended digit or mark, then store it
elsif Is_UTF_32_Digit (Cat)
or else Is_UTF_32_Mark (Cat)
then
Accumulate_Checksum (Code);
Store_Encoded_Character (Code);
Underline_Found := False;
-- Wide punctuation is also stored, but counts as an
-- underline character for error checking purposes.
elsif Is_UTF_32_Punctuation (Cat) then
Accumulate_Checksum (Code);
if Underline_Found then
declare
Cend : constant Source_Ptr := Scan_Ptr;
begin
Scan_Ptr := Wptr;
Error_No_Double_Underline;
Scan_Ptr := Cend;
end;
else
Store_Encoded_Character (Code);
Underline_Found := True;
end if;
-- Any other wide character is not acceptable
else
Error_Msg
("invalid wide character in identifier", Wptr);
end if;
end if;
goto Scan_Identifier;
end;
end if;
end if;
-- Scan of identifier is complete. The identifier is stored in
-- Name_Buffer, and Scan_Ptr points past the last character.
<<Scan_Identifier_Complete>>
Token_Name := Name_Find;
-- Check for identifier ending with underline or punctuation char
if Underline_Found then
Underline_Found := False;
if Source (Scan_Ptr - 1) = '_' then
Error_Msg
("identifier cannot end with underline", Scan_Ptr - 1);
else
Error_Msg
("identifier cannot end with punctuation character", Wptr);
end if;
end if;
-- We will assume it is an identifier, not a keyword, so that the
-- checksum is independent of the Ada version.
Token := Tok_Identifier;
-- Check if it is a keyword
if Is_Keyword_Name (Token_Name) then
Accumulate_Token_Checksum;
Token := Token_Type'Val (Get_Name_Table_Byte (Token_Name));
-- See Exp_Put_Image for documentation of Tagged_Seen
if Token = Tok_Tagged then
Tagged_Seen := True;
end if;
-- Keyword style checks
if Style_Check then
-- Deal with possible style check for non-lower case keyword,
-- but we don't treat ACCESS, DELTA, DIGITS, RANGE as keywords
-- for this purpose if they appear as attribute designators.
-- Actually we only check the first character for speed.
-- Ada 2005 (AI-284): Do not apply the style check in case of
-- "pragma Interface"
-- Ada 2005 (AI-340): Do not apply the style check in case of
-- MOD attribute.
if Source (Token_Ptr) <= 'Z'
and then (Prev_Token /= Tok_Apostrophe
or else
(Token /= Tok_Access and then
Token /= Tok_Delta and then
Token /= Tok_Digits and then
Token /= Tok_Mod and then
Token /= Tok_Range))
and then (Token /= Tok_Interface
or else
(Token = Tok_Interface
and then Prev_Token /= Tok_Pragma))
then
Style.Non_Lower_Case_Keyword;
end if;
-- Check THEN/ELSE style rules. These do not apply to AND THEN
-- or OR ELSE, and do not apply in if expressions.
if (Token = Tok_Then and then Prev_Token /= Tok_And)
or else
(Token = Tok_Else and then Prev_Token /= Tok_Or)
then
if Inside_If_Expression = 0 then
Style.Check_Separate_Stmt_Lines;
end if;
end if;
end if;
-- We must reset Token_Name since this is not an identifier and
-- if we leave Token_Name set, the parser gets confused because
-- it thinks it is dealing with an identifier instead of the
-- corresponding keyword.
Token_Name := No_Name;
return;
-- It is an identifier after all
else
Accumulate_Token_Checksum;
Post_Scan;
end if;
end Scan;
--------------------------
-- Set_Comment_As_Token --
--------------------------
procedure Set_Comment_As_Token (Value : Boolean) is
begin
Comment_Is_Token := Value;
end Set_Comment_As_Token;
------------------------------
-- Set_End_Of_Line_As_Token --
------------------------------
procedure Set_End_Of_Line_As_Token (Value : Boolean) is
begin
End_Of_Line_Is_Token := Value;
end Set_End_Of_Line_As_Token;
---------------------------
-- Set_Special_Character --
---------------------------
procedure Set_Special_Character (C : Character) is
begin
case C is
when '#' | '$' | '_' | '?' | '@' | '`' | '\' | '^' | '~' =>
Special_Characters (C) := True;
when others =>
null;
end case;
end Set_Special_Character;
----------------------
-- Set_Start_Column --
----------------------
-- Note: it seems at first glance a little expensive to compute this value
-- for every source line (since it is certainly not used for all source
-- lines). On the other hand, it doesn't take much more work to skip past
-- the initial white space on the line counting the columns than it would
-- to scan past the white space using the standard scanning circuits.
function Set_Start_Column return Column_Number is
Start_Column : Column_Number := 0;
begin
-- Outer loop scans past horizontal tab characters
Tabs_Loop : loop
-- Inner loop scans past blanks as fast as possible, bumping Scan_Ptr
-- past the blanks and adjusting Start_Column to account for them.
Blanks_Loop : loop
if Source (Scan_Ptr) = ' ' then
if Source (Scan_Ptr + 1) = ' ' then
if Source (Scan_Ptr + 2) = ' ' then
if Source (Scan_Ptr + 3) = ' ' then
if Source (Scan_Ptr + 4) = ' ' then
if Source (Scan_Ptr + 5) = ' ' then
if Source (Scan_Ptr + 6) = ' ' then
Scan_Ptr := Scan_Ptr + 7;
Start_Column := Start_Column + 7;
else
Scan_Ptr := Scan_Ptr + 6;
Start_Column := Start_Column + 6;
exit Blanks_Loop;
end if;
else
Scan_Ptr := Scan_Ptr + 5;
Start_Column := Start_Column + 5;
exit Blanks_Loop;
end if;
else
Scan_Ptr := Scan_Ptr + 4;
Start_Column := Start_Column + 4;
exit Blanks_Loop;
end if;
else
Scan_Ptr := Scan_Ptr + 3;
Start_Column := Start_Column + 3;
exit Blanks_Loop;
end if;
else
Scan_Ptr := Scan_Ptr + 2;
Start_Column := Start_Column + 2;
exit Blanks_Loop;
end if;
else
Scan_Ptr := Scan_Ptr + 1;
Start_Column := Start_Column + 1;
exit Blanks_Loop;
end if;
else
exit Blanks_Loop;
end if;
end loop Blanks_Loop;
-- Outer loop keeps going only if a horizontal tab follows
if Source (Scan_Ptr) = HT then
if Style_Check then
Style.Check_HT;
end if;
Scan_Ptr := Scan_Ptr + 1;
Start_Column := (Start_Column / 8) * 8 + 8;
else
exit Tabs_Loop;
end if;
end loop Tabs_Loop;
return Start_Column;
-- A constraint error can happen only if we have a compiler with checks on
-- and a line with a ludicrous number of tabs or spaces at the start. In
-- such a case, we really don't care if Start_Column is right or not.
exception
when Constraint_Error =>
return Start_Column;
end Set_Start_Column;
end Scng;
|
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- P R J . D E C T --
-- --
-- B o d y --
-- --
-- Copyright (C) 2001-2005, Free Software Foundation, Inc --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 2, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING. If not, write --
-- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
-- Boston, MA 02110-1301, USA. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with Err_Vars; use Err_Vars;
with Namet; use Namet;
with Opt; use Opt;
with Prj.Err; use Prj.Err;
with Prj.Strt; use Prj.Strt;
with Prj.Tree; use Prj.Tree;
with Snames;
with Prj.Attr; use Prj.Attr;
with Prj.Attr.PM; use Prj.Attr.PM;
with Uintp; use Uintp;
package body Prj.Dect is
type Zone is (In_Project, In_Package, In_Case_Construction);
-- Used to indicate if we are parsing a package (In_Package),
-- a case construction (In_Case_Construction) or none of those two
-- (In_Project).
procedure Parse_Attribute_Declaration
(In_Tree : Project_Node_Tree_Ref;
Attribute : out Project_Node_Id;
First_Attribute : Attribute_Node_Id;
Current_Project : Project_Node_Id;
Current_Package : Project_Node_Id;
Packages_To_Check : String_List_Access);
-- Parse an attribute declaration
procedure Parse_Case_Construction
(In_Tree : Project_Node_Tree_Ref;
Case_Construction : out Project_Node_Id;
First_Attribute : Attribute_Node_Id;
Current_Project : Project_Node_Id;
Current_Package : Project_Node_Id;
Packages_To_Check : String_List_Access);
-- Parse a case construction
procedure Parse_Declarative_Items
(In_Tree : Project_Node_Tree_Ref;
Declarations : out Project_Node_Id;
In_Zone : Zone;
First_Attribute : Attribute_Node_Id;
Current_Project : Project_Node_Id;
Current_Package : Project_Node_Id;
Packages_To_Check : String_List_Access);
-- Parse declarative items. Depending on In_Zone, some declarative
-- items may be forbiden.
procedure Parse_Package_Declaration
(In_Tree : Project_Node_Tree_Ref;
Package_Declaration : out Project_Node_Id;
Current_Project : Project_Node_Id;
Packages_To_Check : String_List_Access);
-- Parse a package declaration
procedure Parse_String_Type_Declaration
(In_Tree : Project_Node_Tree_Ref;
String_Type : out Project_Node_Id;
Current_Project : Project_Node_Id);
-- type <name> is ( <literal_string> { , <literal_string> } ) ;
procedure Parse_Variable_Declaration
(In_Tree : Project_Node_Tree_Ref;
Variable : out Project_Node_Id;
Current_Project : Project_Node_Id;
Current_Package : Project_Node_Id);
-- Parse a variable assignment
-- <variable_Name> := <expression>; OR
-- <variable_Name> : <string_type_Name> := <string_expression>;
-----------
-- Parse --
-----------
procedure Parse
(In_Tree : Project_Node_Tree_Ref;
Declarations : out Project_Node_Id;
Current_Project : Project_Node_Id;
Extends : Project_Node_Id;
Packages_To_Check : String_List_Access)
is
First_Declarative_Item : Project_Node_Id := Empty_Node;
begin
Declarations :=
Default_Project_Node
(Of_Kind => N_Project_Declaration, In_Tree => In_Tree);
Set_Location_Of (Declarations, In_Tree, To => Token_Ptr);
Set_Extended_Project_Of (Declarations, In_Tree, To => Extends);
Set_Project_Declaration_Of (Current_Project, In_Tree, Declarations);
Parse_Declarative_Items
(Declarations => First_Declarative_Item,
In_Tree => In_Tree,
In_Zone => In_Project,
First_Attribute => Prj.Attr.Attribute_First,
Current_Project => Current_Project,
Current_Package => Empty_Node,
Packages_To_Check => Packages_To_Check);
Set_First_Declarative_Item_Of
(Declarations, In_Tree, To => First_Declarative_Item);
end Parse;
---------------------------------
-- Parse_Attribute_Declaration --
---------------------------------
procedure Parse_Attribute_Declaration
(In_Tree : Project_Node_Tree_Ref;
Attribute : out Project_Node_Id;
First_Attribute : Attribute_Node_Id;
Current_Project : Project_Node_Id;
Current_Package : Project_Node_Id;
Packages_To_Check : String_List_Access)
is
Current_Attribute : Attribute_Node_Id := First_Attribute;
Full_Associative_Array : Boolean := False;
Attribute_Name : Name_Id := No_Name;
Optional_Index : Boolean := False;
Pkg_Id : Package_Node_Id := Empty_Package;
Warning : Boolean := False;
begin
Attribute :=
Default_Project_Node
(Of_Kind => N_Attribute_Declaration, In_Tree => In_Tree);
Set_Location_Of (Attribute, In_Tree, To => Token_Ptr);
Set_Previous_Line_Node (Attribute);
-- Scan past "for"
Scan (In_Tree);
-- Body may be an attribute name
if Token = Tok_Body then
Token := Tok_Identifier;
Token_Name := Snames.Name_Body;
end if;
Expect (Tok_Identifier, "identifier");
if Token = Tok_Identifier then
Attribute_Name := Token_Name;
Set_Name_Of (Attribute, In_Tree, To => Token_Name);
Set_Location_Of (Attribute, In_Tree, To => Token_Ptr);
-- Find the attribute
Current_Attribute :=
Attribute_Node_Id_Of (Token_Name, First_Attribute);
-- If the attribute cannot be found, create the attribute if inside
-- an unknown package.
if Current_Attribute = Empty_Attribute then
if Current_Package /= Empty_Node
and then Expression_Kind_Of (Current_Package, In_Tree) = Ignored
then
Pkg_Id := Package_Id_Of (Current_Package, In_Tree);
Add_Attribute (Pkg_Id, Token_Name, Current_Attribute);
Error_Msg_Name_1 := Token_Name;
Error_Msg ("?unknown attribute {", Token_Ptr);
else
-- If not a valid attribute name, issue an error, or a warning
-- if inside a package that does not need to be checked.
Warning := Current_Package /= Empty_Node and then
Packages_To_Check /= All_Packages;
if Warning then
-- Check that we are not in a package to check
Get_Name_String (Name_Of (Current_Package, In_Tree));
for Index in Packages_To_Check'Range loop
if Name_Buffer (1 .. Name_Len) =
Packages_To_Check (Index).all
then
Warning := False;
exit;
end if;
end loop;
end if;
Error_Msg_Name_1 := Token_Name;
Error_Msg_Warn := Warning;
Error_Msg ("<undefined attribute {", Token_Ptr);
end if;
-- Set, if appropriate the index case insensitivity flag
elsif Attribute_Kind_Of (Current_Attribute) in
Case_Insensitive_Associative_Array ..
Optional_Index_Case_Insensitive_Associative_Array
then
Set_Case_Insensitive (Attribute, In_Tree, To => True);
end if;
Scan (In_Tree); -- past the attribute name
end if;
-- Change obsolete names of attributes to the new names
if Current_Package /= Empty_Node
and then Expression_Kind_Of (Current_Package, In_Tree) /= Ignored
then
case Name_Of (Attribute, In_Tree) is
when Snames.Name_Specification =>
Set_Name_Of (Attribute, In_Tree, To => Snames.Name_Spec);
when Snames.Name_Specification_Suffix =>
Set_Name_Of (Attribute, In_Tree, To => Snames.Name_Spec_Suffix);
when Snames.Name_Implementation =>
Set_Name_Of (Attribute, In_Tree, To => Snames.Name_Body);
when Snames.Name_Implementation_Suffix =>
Set_Name_Of (Attribute, In_Tree, To => Snames.Name_Body_Suffix);
when others =>
null;
end case;
end if;
-- Associative array attributes
if Token = Tok_Left_Paren then
-- If the attribute is not an associative array attribute, report
-- an error. If this information is still unknown, set the kind
-- to Associative_Array.
if Current_Attribute /= Empty_Attribute
and then Attribute_Kind_Of (Current_Attribute) = Single
then
Error_Msg ("the attribute """ &
Get_Name_String
(Attribute_Name_Of (Current_Attribute)) &
""" cannot be an associative array",
Location_Of (Attribute, In_Tree));
elsif Attribute_Kind_Of (Current_Attribute) = Unknown then
Set_Attribute_Kind_Of (Current_Attribute, To => Associative_Array);
end if;
Scan (In_Tree); -- past the left parenthesis
Expect (Tok_String_Literal, "literal string");
if Token = Tok_String_Literal then
Set_Associative_Array_Index_Of (Attribute, In_Tree, Token_Name);
Scan (In_Tree); -- past the literal string index
if Token = Tok_At then
case Attribute_Kind_Of (Current_Attribute) is
when Optional_Index_Associative_Array |
Optional_Index_Case_Insensitive_Associative_Array =>
Scan (In_Tree);
Expect (Tok_Integer_Literal, "integer literal");
if Token = Tok_Integer_Literal then
-- Set the source index value from given literal
declare
Index : constant Int :=
UI_To_Int (Int_Literal_Value);
begin
if Index = 0 then
Error_Msg ("index cannot be zero", Token_Ptr);
else
Set_Source_Index_Of
(Attribute, In_Tree, To => Index);
end if;
end;
Scan (In_Tree);
end if;
when others =>
Error_Msg ("index not allowed here", Token_Ptr);
Scan (In_Tree);
if Token = Tok_Integer_Literal then
Scan (In_Tree);
end if;
end case;
end if;
end if;
Expect (Tok_Right_Paren, "`)`");
if Token = Tok_Right_Paren then
Scan (In_Tree); -- past the right parenthesis
end if;
else
-- If it is an associative array attribute and there are no left
-- parenthesis, then this is a full associative array declaration.
-- Flag it as such for later processing of its value.
if Current_Attribute /= Empty_Attribute
and then
Attribute_Kind_Of (Current_Attribute) /= Single
then
if Attribute_Kind_Of (Current_Attribute) = Unknown then
Set_Attribute_Kind_Of (Current_Attribute, To => Single);
else
Full_Associative_Array := True;
end if;
end if;
end if;
-- Set the expression kind of the attribute
if Current_Attribute /= Empty_Attribute then
Set_Expression_Kind_Of
(Attribute, In_Tree, To => Variable_Kind_Of (Current_Attribute));
Optional_Index := Optional_Index_Of (Current_Attribute);
end if;
Expect (Tok_Use, "USE");
if Token = Tok_Use then
Scan (In_Tree);
if Full_Associative_Array then
-- Expect <project>'<same_attribute_name>, or
-- <project>.<same_package_name>'<same_attribute_name>
declare
The_Project : Project_Node_Id := Empty_Node;
-- The node of the project where the associative array is
-- declared.
The_Package : Project_Node_Id := Empty_Node;
-- The node of the package where the associative array is
-- declared, if any.
Project_Name : Name_Id := No_Name;
-- The name of the project where the associative array is
-- declared.
Location : Source_Ptr := No_Location;
-- The location of the project name
begin
Expect (Tok_Identifier, "identifier");
if Token = Tok_Identifier then
Location := Token_Ptr;
-- Find the project node in the imported project or
-- in the project being extended.
The_Project := Imported_Or_Extended_Project_Of
(Current_Project, In_Tree, Token_Name);
if The_Project = Empty_Node then
Error_Msg ("unknown project", Location);
Scan (In_Tree); -- past the project name
else
Project_Name := Token_Name;
Scan (In_Tree); -- past the project name
-- If this is inside a package, a dot followed by the
-- name of the package must followed the project name.
if Current_Package /= Empty_Node then
Expect (Tok_Dot, "`.`");
if Token /= Tok_Dot then
The_Project := Empty_Node;
else
Scan (In_Tree); -- past the dot
Expect (Tok_Identifier, "identifier");
if Token /= Tok_Identifier then
The_Project := Empty_Node;
-- If it is not the same package name, issue error
elsif
Token_Name /= Name_Of (Current_Package, In_Tree)
then
The_Project := Empty_Node;
Error_Msg
("not the same package as " &
Get_Name_String
(Name_Of (Current_Package, In_Tree)),
Token_Ptr);
else
The_Package :=
First_Package_Of (The_Project, In_Tree);
-- Look for the package node
while The_Package /= Empty_Node
and then
Name_Of (The_Package, In_Tree) /= Token_Name
loop
The_Package :=
Next_Package_In_Project
(The_Package, In_Tree);
end loop;
-- If the package cannot be found in the
-- project, issue an error.
if The_Package = Empty_Node then
The_Project := Empty_Node;
Error_Msg_Name_2 := Project_Name;
Error_Msg_Name_1 := Token_Name;
Error_Msg
("package % not declared in project %",
Token_Ptr);
end if;
Scan (In_Tree); -- past the package name
end if;
end if;
end if;
end if;
end if;
if The_Project /= Empty_Node then
-- Looking for '<same attribute name>
Expect (Tok_Apostrophe, "`''`");
if Token /= Tok_Apostrophe then
The_Project := Empty_Node;
else
Scan (In_Tree); -- past the apostrophe
Expect (Tok_Identifier, "identifier");
if Token /= Tok_Identifier then
The_Project := Empty_Node;
else
-- If it is not the same attribute name, issue error
if Token_Name /= Attribute_Name then
The_Project := Empty_Node;
Error_Msg_Name_1 := Attribute_Name;
Error_Msg ("invalid name, should be %", Token_Ptr);
end if;
Scan (In_Tree); -- past the attribute name
end if;
end if;
end if;
if The_Project = Empty_Node then
-- If there were any problem, set the attribute id to null,
-- so that the node will not be recorded.
Current_Attribute := Empty_Attribute;
else
-- Set the appropriate field in the node.
-- Note that the index and the expression are nil. This
-- characterizes full associative array attribute
-- declarations.
Set_Associative_Project_Of (Attribute, In_Tree, The_Project);
Set_Associative_Package_Of (Attribute, In_Tree, The_Package);
end if;
end;
-- Other attribute declarations (not full associative array)
else
declare
Expression_Location : constant Source_Ptr := Token_Ptr;
-- The location of the first token of the expression
Expression : Project_Node_Id := Empty_Node;
-- The expression, value for the attribute declaration
begin
-- Get the expression value and set it in the attribute node
Parse_Expression
(In_Tree => In_Tree,
Expression => Expression,
Current_Project => Current_Project,
Current_Package => Current_Package,
Optional_Index => Optional_Index);
Set_Expression_Of (Attribute, In_Tree, To => Expression);
-- If the expression is legal, but not of the right kind
-- for the attribute, issue an error.
if Current_Attribute /= Empty_Attribute
and then Expression /= Empty_Node
and then Variable_Kind_Of (Current_Attribute) /=
Expression_Kind_Of (Expression, In_Tree)
then
if Variable_Kind_Of (Current_Attribute) = Undefined then
Set_Variable_Kind_Of
(Current_Attribute,
To => Expression_Kind_Of (Expression, In_Tree));
else
Error_Msg
("wrong expression kind for attribute """ &
Get_Name_String
(Attribute_Name_Of (Current_Attribute)) &
"""",
Expression_Location);
end if;
end if;
end;
end if;
end if;
-- If the attribute was not recognized, return an empty node.
-- It may be that it is not in a package to check, and the node will
-- not be added to the tree.
if Current_Attribute = Empty_Attribute then
Attribute := Empty_Node;
end if;
Set_End_Of_Line (Attribute);
Set_Previous_Line_Node (Attribute);
end Parse_Attribute_Declaration;
-----------------------------
-- Parse_Case_Construction --
-----------------------------
procedure Parse_Case_Construction
(In_Tree : Project_Node_Tree_Ref;
Case_Construction : out Project_Node_Id;
First_Attribute : Attribute_Node_Id;
Current_Project : Project_Node_Id;
Current_Package : Project_Node_Id;
Packages_To_Check : String_List_Access)
is
Current_Item : Project_Node_Id := Empty_Node;
Next_Item : Project_Node_Id := Empty_Node;
First_Case_Item : Boolean := True;
Variable_Location : Source_Ptr := No_Location;
String_Type : Project_Node_Id := Empty_Node;
Case_Variable : Project_Node_Id := Empty_Node;
First_Declarative_Item : Project_Node_Id := Empty_Node;
First_Choice : Project_Node_Id := Empty_Node;
When_Others : Boolean := False;
-- Set to True when there is a "when others =>" clause
begin
Case_Construction :=
Default_Project_Node
(Of_Kind => N_Case_Construction, In_Tree => In_Tree);
Set_Location_Of (Case_Construction, In_Tree, To => Token_Ptr);
-- Scan past "case"
Scan (In_Tree);
-- Get the switch variable
Expect (Tok_Identifier, "identifier");
if Token = Tok_Identifier then
Variable_Location := Token_Ptr;
Parse_Variable_Reference
(In_Tree => In_Tree,
Variable => Case_Variable,
Current_Project => Current_Project,
Current_Package => Current_Package);
Set_Case_Variable_Reference_Of
(Case_Construction, In_Tree, To => Case_Variable);
else
if Token /= Tok_Is then
Scan (In_Tree);
end if;
end if;
if Case_Variable /= Empty_Node then
String_Type := String_Type_Of (Case_Variable, In_Tree);
if String_Type = Empty_Node then
Error_Msg ("variable """ &
Get_Name_String (Name_Of (Case_Variable, In_Tree)) &
""" is not typed",
Variable_Location);
end if;
end if;
Expect (Tok_Is, "IS");
if Token = Tok_Is then
Set_End_Of_Line (Case_Construction);
Set_Previous_Line_Node (Case_Construction);
Set_Next_End_Node (Case_Construction);
-- Scan past "is"
Scan (In_Tree);
end if;
Start_New_Case_Construction (In_Tree, String_Type);
When_Loop :
while Token = Tok_When loop
if First_Case_Item then
Current_Item :=
Default_Project_Node
(Of_Kind => N_Case_Item, In_Tree => In_Tree);
Set_First_Case_Item_Of
(Case_Construction, In_Tree, To => Current_Item);
First_Case_Item := False;
else
Next_Item :=
Default_Project_Node
(Of_Kind => N_Case_Item, In_Tree => In_Tree);
Set_Next_Case_Item (Current_Item, In_Tree, To => Next_Item);
Current_Item := Next_Item;
end if;
Set_Location_Of (Current_Item, In_Tree, To => Token_Ptr);
-- Scan past "when"
Scan (In_Tree);
if Token = Tok_Others then
When_Others := True;
-- Scan past "others"
Scan (In_Tree);
Expect (Tok_Arrow, "`=>`");
Set_End_Of_Line (Current_Item);
Set_Previous_Line_Node (Current_Item);
-- Empty_Node in Field1 of a Case_Item indicates
-- the "when others =>" branch.
Set_First_Choice_Of (Current_Item, In_Tree, To => Empty_Node);
Parse_Declarative_Items
(In_Tree => In_Tree,
Declarations => First_Declarative_Item,
In_Zone => In_Case_Construction,
First_Attribute => First_Attribute,
Current_Project => Current_Project,
Current_Package => Current_Package,
Packages_To_Check => Packages_To_Check);
-- "when others =>" must be the last branch, so save the
-- Case_Item and exit
Set_First_Declarative_Item_Of
(Current_Item, In_Tree, To => First_Declarative_Item);
exit When_Loop;
else
Parse_Choice_List
(In_Tree => In_Tree,
First_Choice => First_Choice);
Set_First_Choice_Of (Current_Item, In_Tree, To => First_Choice);
Expect (Tok_Arrow, "`=>`");
Set_End_Of_Line (Current_Item);
Set_Previous_Line_Node (Current_Item);
Parse_Declarative_Items
(In_Tree => In_Tree,
Declarations => First_Declarative_Item,
In_Zone => In_Case_Construction,
First_Attribute => First_Attribute,
Current_Project => Current_Project,
Current_Package => Current_Package,
Packages_To_Check => Packages_To_Check);
Set_First_Declarative_Item_Of
(Current_Item, In_Tree, To => First_Declarative_Item);
end if;
end loop When_Loop;
End_Case_Construction
(Check_All_Labels => not When_Others and not Quiet_Output,
Case_Location => Location_Of (Case_Construction, In_Tree));
Expect (Tok_End, "`END CASE`");
Remove_Next_End_Node;
if Token = Tok_End then
-- Scan past "end"
Scan (In_Tree);
Expect (Tok_Case, "CASE");
end if;
-- Scan past "case"
Scan (In_Tree);
Expect (Tok_Semicolon, "`;`");
Set_Previous_End_Node (Case_Construction);
end Parse_Case_Construction;
-----------------------------
-- Parse_Declarative_Items --
-----------------------------
procedure Parse_Declarative_Items
(In_Tree : Project_Node_Tree_Ref;
Declarations : out Project_Node_Id;
In_Zone : Zone;
First_Attribute : Attribute_Node_Id;
Current_Project : Project_Node_Id;
Current_Package : Project_Node_Id;
Packages_To_Check : String_List_Access)
is
Current_Declarative_Item : Project_Node_Id := Empty_Node;
Next_Declarative_Item : Project_Node_Id := Empty_Node;
Current_Declaration : Project_Node_Id := Empty_Node;
Item_Location : Source_Ptr := No_Location;
begin
Declarations := Empty_Node;
loop
-- We are always positioned at the token that precedes
-- the first token of the declarative element.
-- Scan past it
Scan (In_Tree);
Item_Location := Token_Ptr;
case Token is
when Tok_Identifier =>
if In_Zone = In_Case_Construction then
Error_Msg ("a variable cannot be declared here",
Token_Ptr);
end if;
Parse_Variable_Declaration
(In_Tree,
Current_Declaration,
Current_Project => Current_Project,
Current_Package => Current_Package);
Set_End_Of_Line (Current_Declaration);
Set_Previous_Line_Node (Current_Declaration);
when Tok_For =>
Parse_Attribute_Declaration
(In_Tree => In_Tree,
Attribute => Current_Declaration,
First_Attribute => First_Attribute,
Current_Project => Current_Project,
Current_Package => Current_Package,
Packages_To_Check => Packages_To_Check);
Set_End_Of_Line (Current_Declaration);
Set_Previous_Line_Node (Current_Declaration);
when Tok_Null =>
Scan (In_Tree); -- past "null"
when Tok_Package =>
-- Package declaration
if In_Zone /= In_Project then
Error_Msg ("a package cannot be declared here", Token_Ptr);
end if;
Parse_Package_Declaration
(In_Tree => In_Tree,
Package_Declaration => Current_Declaration,
Current_Project => Current_Project,
Packages_To_Check => Packages_To_Check);
Set_Previous_End_Node (Current_Declaration);
when Tok_Type =>
-- Type String Declaration
if In_Zone /= In_Project then
Error_Msg ("a string type cannot be declared here",
Token_Ptr);
end if;
Parse_String_Type_Declaration
(In_Tree => In_Tree,
String_Type => Current_Declaration,
Current_Project => Current_Project);
Set_End_Of_Line (Current_Declaration);
Set_Previous_Line_Node (Current_Declaration);
when Tok_Case =>
-- Case construction
Parse_Case_Construction
(In_Tree => In_Tree,
Case_Construction => Current_Declaration,
First_Attribute => First_Attribute,
Current_Project => Current_Project,
Current_Package => Current_Package,
Packages_To_Check => Packages_To_Check);
Set_Previous_End_Node (Current_Declaration);
when others =>
exit;
-- We are leaving Parse_Declarative_Items positionned
-- at the first token after the list of declarative items.
-- It could be "end" (for a project, a package declaration or
-- a case construction) or "when" (for a case construction)
end case;
Expect (Tok_Semicolon, "`;` after declarative items");
-- Insert an N_Declarative_Item in the tree, but only if
-- Current_Declaration is not an empty node.
if Current_Declaration /= Empty_Node then
if Current_Declarative_Item = Empty_Node then
Current_Declarative_Item :=
Default_Project_Node
(Of_Kind => N_Declarative_Item, In_Tree => In_Tree);
Declarations := Current_Declarative_Item;
else
Next_Declarative_Item :=
Default_Project_Node
(Of_Kind => N_Declarative_Item, In_Tree => In_Tree);
Set_Next_Declarative_Item
(Current_Declarative_Item, In_Tree,
To => Next_Declarative_Item);
Current_Declarative_Item := Next_Declarative_Item;
end if;
Set_Current_Item_Node
(Current_Declarative_Item, In_Tree,
To => Current_Declaration);
Set_Location_Of
(Current_Declarative_Item, In_Tree, To => Item_Location);
end if;
end loop;
end Parse_Declarative_Items;
-------------------------------
-- Parse_Package_Declaration --
-------------------------------
procedure Parse_Package_Declaration
(In_Tree : Project_Node_Tree_Ref;
Package_Declaration : out Project_Node_Id;
Current_Project : Project_Node_Id;
Packages_To_Check : String_List_Access)
is
First_Attribute : Attribute_Node_Id := Empty_Attribute;
Current_Package : Package_Node_Id := Empty_Package;
First_Declarative_Item : Project_Node_Id := Empty_Node;
begin
Package_Declaration :=
Default_Project_Node
(Of_Kind => N_Package_Declaration, In_Tree => In_Tree);
Set_Location_Of (Package_Declaration, In_Tree, To => Token_Ptr);
-- Scan past "package"
Scan (In_Tree);
Expect (Tok_Identifier, "identifier");
if Token = Tok_Identifier then
Set_Name_Of (Package_Declaration, In_Tree, To => Token_Name);
Current_Package := Package_Node_Id_Of (Token_Name);
if Current_Package /= Empty_Package then
First_Attribute := First_Attribute_Of (Current_Package);
else
Error_Msg ("?""" &
Get_Name_String
(Name_Of (Package_Declaration, In_Tree)) &
""" is not a known package name",
Token_Ptr);
-- Set the package declaration to "ignored" so that it is not
-- processed by Prj.Proc.Process.
Set_Expression_Kind_Of (Package_Declaration, In_Tree, Ignored);
-- Add the unknown package in the list of packages
Add_Unknown_Package (Token_Name, Current_Package);
end if;
Set_Package_Id_Of
(Package_Declaration, In_Tree, To => Current_Package);
declare
Current : Project_Node_Id :=
First_Package_Of (Current_Project, In_Tree);
begin
while Current /= Empty_Node
and then Name_Of (Current, In_Tree) /= Token_Name
loop
Current := Next_Package_In_Project (Current, In_Tree);
end loop;
if Current /= Empty_Node then
Error_Msg
("package """ &
Get_Name_String (Name_Of (Package_Declaration, In_Tree)) &
""" is declared twice in the same project",
Token_Ptr);
else
-- Add the package to the project list
Set_Next_Package_In_Project
(Package_Declaration, In_Tree,
To => First_Package_Of (Current_Project, In_Tree));
Set_First_Package_Of
(Current_Project, In_Tree, To => Package_Declaration);
end if;
end;
-- Scan past the package name
Scan (In_Tree);
end if;
if Token = Tok_Renames then
-- Scan past "renames"
Scan (In_Tree);
Expect (Tok_Identifier, "identifier");
if Token = Tok_Identifier then
declare
Project_Name : constant Name_Id := Token_Name;
Clause : Project_Node_Id :=
First_With_Clause_Of (Current_Project, In_Tree);
The_Project : Project_Node_Id := Empty_Node;
Extended : constant Project_Node_Id :=
Extended_Project_Of
(Project_Declaration_Of
(Current_Project, In_Tree),
In_Tree);
begin
while Clause /= Empty_Node loop
-- Only non limited imported projects may be used in a
-- renames declaration.
The_Project :=
Non_Limited_Project_Node_Of (Clause, In_Tree);
exit when The_Project /= Empty_Node
and then Name_Of (The_Project, In_Tree) = Project_Name;
Clause := Next_With_Clause_Of (Clause, In_Tree);
end loop;
if Clause = Empty_Node then
-- As we have not found the project in the imports, we check
-- if it's the name of an eventual extended project.
if Extended /= Empty_Node
and then Name_Of (Extended, In_Tree) = Project_Name
then
Set_Project_Of_Renamed_Package_Of
(Package_Declaration, In_Tree, To => Extended);
else
Error_Msg_Name_1 := Project_Name;
Error_Msg
("% is not an imported or extended project", Token_Ptr);
end if;
else
Set_Project_Of_Renamed_Package_Of
(Package_Declaration, In_Tree, To => The_Project);
end if;
end;
Scan (In_Tree);
Expect (Tok_Dot, "`.`");
if Token = Tok_Dot then
Scan (In_Tree);
Expect (Tok_Identifier, "identifier");
if Token = Tok_Identifier then
if Name_Of (Package_Declaration, In_Tree) /= Token_Name then
Error_Msg ("not the same package name", Token_Ptr);
elsif
Project_Of_Renamed_Package_Of
(Package_Declaration, In_Tree) /= Empty_Node
then
declare
Current : Project_Node_Id :=
First_Package_Of
(Project_Of_Renamed_Package_Of
(Package_Declaration, In_Tree),
In_Tree);
begin
while Current /= Empty_Node
and then Name_Of (Current, In_Tree) /= Token_Name
loop
Current :=
Next_Package_In_Project (Current, In_Tree);
end loop;
if Current = Empty_Node then
Error_Msg
("""" &
Get_Name_String (Token_Name) &
""" is not a package declared by the project",
Token_Ptr);
end if;
end;
end if;
Scan (In_Tree);
end if;
end if;
end if;
Expect (Tok_Semicolon, "`;`");
Set_End_Of_Line (Package_Declaration);
Set_Previous_Line_Node (Package_Declaration);
elsif Token = Tok_Is then
Set_End_Of_Line (Package_Declaration);
Set_Previous_Line_Node (Package_Declaration);
Set_Next_End_Node (Package_Declaration);
Parse_Declarative_Items
(In_Tree => In_Tree,
Declarations => First_Declarative_Item,
In_Zone => In_Package,
First_Attribute => First_Attribute,
Current_Project => Current_Project,
Current_Package => Package_Declaration,
Packages_To_Check => Packages_To_Check);
Set_First_Declarative_Item_Of
(Package_Declaration, In_Tree, To => First_Declarative_Item);
Expect (Tok_End, "END");
if Token = Tok_End then
-- Scan past "end"
Scan (In_Tree);
end if;
-- We should have the name of the package after "end"
Expect (Tok_Identifier, "identifier");
if Token = Tok_Identifier
and then Name_Of (Package_Declaration, In_Tree) /= No_Name
and then Token_Name /= Name_Of (Package_Declaration, In_Tree)
then
Error_Msg_Name_1 := Name_Of (Package_Declaration, In_Tree);
Error_Msg ("expected {", Token_Ptr);
end if;
if Token /= Tok_Semicolon then
-- Scan past the package name
Scan (In_Tree);
end if;
Expect (Tok_Semicolon, "`;`");
Remove_Next_End_Node;
else
Error_Msg ("expected IS or RENAMES", Token_Ptr);
end if;
end Parse_Package_Declaration;
-----------------------------------
-- Parse_String_Type_Declaration --
-----------------------------------
procedure Parse_String_Type_Declaration
(In_Tree : Project_Node_Tree_Ref;
String_Type : out Project_Node_Id;
Current_Project : Project_Node_Id)
is
Current : Project_Node_Id := Empty_Node;
First_String : Project_Node_Id := Empty_Node;
begin
String_Type :=
Default_Project_Node
(Of_Kind => N_String_Type_Declaration, In_Tree => In_Tree);
Set_Location_Of (String_Type, In_Tree, To => Token_Ptr);
-- Scan past "type"
Scan (In_Tree);
Expect (Tok_Identifier, "identifier");
if Token = Tok_Identifier then
Set_Name_Of (String_Type, In_Tree, To => Token_Name);
Current := First_String_Type_Of (Current_Project, In_Tree);
while Current /= Empty_Node
and then
Name_Of (Current, In_Tree) /= Token_Name
loop
Current := Next_String_Type (Current, In_Tree);
end loop;
if Current /= Empty_Node then
Error_Msg ("duplicate string type name """ &
Get_Name_String (Token_Name) &
"""",
Token_Ptr);
else
Current := First_Variable_Of (Current_Project, In_Tree);
while Current /= Empty_Node
and then Name_Of (Current, In_Tree) /= Token_Name
loop
Current := Next_Variable (Current, In_Tree);
end loop;
if Current /= Empty_Node then
Error_Msg ("""" &
Get_Name_String (Token_Name) &
""" is already a variable name", Token_Ptr);
else
Set_Next_String_Type
(String_Type, In_Tree,
To => First_String_Type_Of (Current_Project, In_Tree));
Set_First_String_Type_Of
(Current_Project, In_Tree, To => String_Type);
end if;
end if;
-- Scan past the name
Scan (In_Tree);
end if;
Expect (Tok_Is, "IS");
if Token = Tok_Is then
Scan (In_Tree);
end if;
Expect (Tok_Left_Paren, "`(`");
if Token = Tok_Left_Paren then
Scan (In_Tree);
end if;
Parse_String_Type_List
(In_Tree => In_Tree, First_String => First_String);
Set_First_Literal_String (String_Type, In_Tree, To => First_String);
Expect (Tok_Right_Paren, "`)`");
if Token = Tok_Right_Paren then
Scan (In_Tree);
end if;
end Parse_String_Type_Declaration;
--------------------------------
-- Parse_Variable_Declaration --
--------------------------------
procedure Parse_Variable_Declaration
(In_Tree : Project_Node_Tree_Ref;
Variable : out Project_Node_Id;
Current_Project : Project_Node_Id;
Current_Package : Project_Node_Id)
is
Expression_Location : Source_Ptr;
String_Type_Name : Name_Id := No_Name;
Project_String_Type_Name : Name_Id := No_Name;
Type_Location : Source_Ptr := No_Location;
Project_Location : Source_Ptr := No_Location;
Expression : Project_Node_Id := Empty_Node;
Variable_Name : constant Name_Id := Token_Name;
OK : Boolean := True;
begin
Variable :=
Default_Project_Node
(Of_Kind => N_Variable_Declaration, In_Tree => In_Tree);
Set_Name_Of (Variable, In_Tree, To => Variable_Name);
Set_Location_Of (Variable, In_Tree, To => Token_Ptr);
-- Scan past the variable name
Scan (In_Tree);
if Token = Tok_Colon then
-- Typed string variable declaration
Scan (In_Tree);
Set_Kind_Of (Variable, In_Tree, N_Typed_Variable_Declaration);
Expect (Tok_Identifier, "identifier");
OK := Token = Tok_Identifier;
if OK then
String_Type_Name := Token_Name;
Type_Location := Token_Ptr;
Scan (In_Tree);
if Token = Tok_Dot then
Project_String_Type_Name := String_Type_Name;
Project_Location := Type_Location;
-- Scan past the dot
Scan (In_Tree);
Expect (Tok_Identifier, "identifier");
if Token = Tok_Identifier then
String_Type_Name := Token_Name;
Type_Location := Token_Ptr;
Scan (In_Tree);
else
OK := False;
end if;
end if;
if OK then
declare
Current : Project_Node_Id :=
First_String_Type_Of (Current_Project, In_Tree);
begin
if Project_String_Type_Name /= No_Name then
declare
The_Project_Name_And_Node : constant
Tree_Private_Part.Project_Name_And_Node :=
Tree_Private_Part.Projects_Htable.Get
(In_Tree.Projects_HT, Project_String_Type_Name);
use Tree_Private_Part;
begin
if The_Project_Name_And_Node =
Tree_Private_Part.No_Project_Name_And_Node
then
Error_Msg ("unknown project """ &
Get_Name_String
(Project_String_Type_Name) &
"""",
Project_Location);
Current := Empty_Node;
else
Current :=
First_String_Type_Of
(The_Project_Name_And_Node.Node, In_Tree);
end if;
end;
end if;
while Current /= Empty_Node
and then Name_Of (Current, In_Tree) /= String_Type_Name
loop
Current := Next_String_Type (Current, In_Tree);
end loop;
if Current = Empty_Node then
Error_Msg ("unknown string type """ &
Get_Name_String (String_Type_Name) &
"""",
Type_Location);
OK := False;
else
Set_String_Type_Of
(Variable, In_Tree, To => Current);
end if;
end;
end if;
end if;
end if;
Expect (Tok_Colon_Equal, "`:=`");
OK := OK and (Token = Tok_Colon_Equal);
if Token = Tok_Colon_Equal then
Scan (In_Tree);
end if;
-- Get the single string or string list value
Expression_Location := Token_Ptr;
Parse_Expression
(In_Tree => In_Tree,
Expression => Expression,
Current_Project => Current_Project,
Current_Package => Current_Package,
Optional_Index => False);
Set_Expression_Of (Variable, In_Tree, To => Expression);
if Expression /= Empty_Node then
-- A typed string must have a single string value, not a list
if Kind_Of (Variable, In_Tree) = N_Typed_Variable_Declaration
and then Expression_Kind_Of (Expression, In_Tree) = List
then
Error_Msg
("expression must be a single string", Expression_Location);
end if;
Set_Expression_Kind_Of
(Variable, In_Tree,
To => Expression_Kind_Of (Expression, In_Tree));
end if;
if OK then
declare
The_Variable : Project_Node_Id := Empty_Node;
begin
if Current_Package /= Empty_Node then
The_Variable := First_Variable_Of (Current_Package, In_Tree);
elsif Current_Project /= Empty_Node then
The_Variable := First_Variable_Of (Current_Project, In_Tree);
end if;
while The_Variable /= Empty_Node
and then Name_Of (The_Variable, In_Tree) /= Variable_Name
loop
The_Variable := Next_Variable (The_Variable, In_Tree);
end loop;
if The_Variable = Empty_Node then
if Current_Package /= Empty_Node then
Set_Next_Variable
(Variable, In_Tree,
To => First_Variable_Of (Current_Package, In_Tree));
Set_First_Variable_Of
(Current_Package, In_Tree, To => Variable);
elsif Current_Project /= Empty_Node then
Set_Next_Variable
(Variable, In_Tree,
To => First_Variable_Of (Current_Project, In_Tree));
Set_First_Variable_Of
(Current_Project, In_Tree, To => Variable);
end if;
else
if Expression_Kind_Of (Variable, In_Tree) /= Undefined then
if
Expression_Kind_Of (The_Variable, In_Tree) = Undefined
then
Set_Expression_Kind_Of
(The_Variable, In_Tree,
To => Expression_Kind_Of (Variable, In_Tree));
else
if Expression_Kind_Of (The_Variable, In_Tree) /=
Expression_Kind_Of (Variable, In_Tree)
then
Error_Msg ("wrong expression kind for variable """ &
Get_Name_String
(Name_Of (The_Variable, In_Tree)) &
"""",
Expression_Location);
end if;
end if;
end if;
end if;
end;
end if;
end Parse_Variable_Declaration;
end Prj.Dect;
|
with Giza.Context;
with Giza.Events; use Giza.Events;
with Giza.Widget.Text;
with Giza.Widget.Button;
use Giza.Widget;
with Screen_Interface; use Screen_Interface;
with Test_Main_Window;
package Timer_Callback is
Main_W : aliased Test_Main_Window.Main_Window;
My_Str : access String := new String'("Gtext");
Str_Button : access String := new String'("Button");
Str_Toggle : access String := new String'("Toggle");
My_Txt : aliased Text.Instance;
My_Button : aliased Button.Instance;
My_Toggle : aliased Button.Instance;
My_Backend : aliased Screen_Interface.GTKada_Backend;
My_Context : aliased Giza.Context.Instance;
function Callback return Boolean;
My_Timer : aliased Basic_Timer_Event :=
(Callback => Callback'Access);
end Timer_Callback;
|
pragma Style_Checks (Off);
-- This spec has been automatically generated from STM32G474xx.svd
pragma Restrictions (No_Elaboration_Code);
with HAL;
with System;
package STM32_SVD.SYSCFG is
pragma Preelaborate;
---------------
-- Registers --
---------------
subtype MEMRMP_MEM_MODE_Field is HAL.UInt3;
-- Remap Memory register
type MEMRMP_Register is record
-- Memory mapping selection
MEM_MODE : MEMRMP_MEM_MODE_Field := 16#0#;
-- unspecified
Reserved_3_7 : HAL.UInt5 := 16#0#;
-- User Flash Bank mode
FB_mode : Boolean := False;
-- unspecified
Reserved_9_31 : HAL.UInt23 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for MEMRMP_Register use record
MEM_MODE at 0 range 0 .. 2;
Reserved_3_7 at 0 range 3 .. 7;
FB_mode at 0 range 8 .. 8;
Reserved_9_31 at 0 range 9 .. 31;
end record;
subtype CFGR1_FPU_IE_Field is HAL.UInt6;
-- peripheral mode configuration register
type CFGR1_Register is record
-- unspecified
Reserved_0_7 : HAL.UInt8 := 16#1#;
-- BOOSTEN
BOOSTEN : Boolean := False;
-- GPIO analog switch control voltage selection
ANASWVDD : Boolean := False;
-- unspecified
Reserved_10_15 : HAL.UInt6 := 16#0#;
-- FM+ drive capability on PB6
I2C_PB6_FMP : Boolean := False;
-- FM+ drive capability on PB6
I2C_PB7_FMP : Boolean := False;
-- FM+ drive capability on PB6
I2C_PB8_FMP : Boolean := False;
-- FM+ drive capability on PB6
I2C_PB9_FMP : Boolean := False;
-- I2C1 FM+ drive capability enable
I2C1_FMP : Boolean := False;
-- I2C1 FM+ drive capability enable
I2C2_FMP : Boolean := False;
-- I2C1 FM+ drive capability enable
I2C3_FMP : Boolean := False;
-- I2C1 FM+ drive capability enable
I2C4_FMP : Boolean := False;
-- unspecified
Reserved_24_25 : HAL.UInt2 := 16#0#;
-- FPU Interrupts Enable
FPU_IE : CFGR1_FPU_IE_Field := 16#1F#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CFGR1_Register use record
Reserved_0_7 at 0 range 0 .. 7;
BOOSTEN at 0 range 8 .. 8;
ANASWVDD at 0 range 9 .. 9;
Reserved_10_15 at 0 range 10 .. 15;
I2C_PB6_FMP at 0 range 16 .. 16;
I2C_PB7_FMP at 0 range 17 .. 17;
I2C_PB8_FMP at 0 range 18 .. 18;
I2C_PB9_FMP at 0 range 19 .. 19;
I2C1_FMP at 0 range 20 .. 20;
I2C2_FMP at 0 range 21 .. 21;
I2C3_FMP at 0 range 22 .. 22;
I2C4_FMP at 0 range 23 .. 23;
Reserved_24_25 at 0 range 24 .. 25;
FPU_IE at 0 range 26 .. 31;
end record;
-- EXTICR1_EXTI array element
subtype EXTICR1_EXTI_Element is HAL.UInt4;
-- EXTICR1_EXTI array
type EXTICR1_EXTI_Field_Array is array (0 .. 3) of EXTICR1_EXTI_Element
with Component_Size => 4, Size => 16;
-- Type definition for EXTICR1_EXTI
type EXTICR1_EXTI_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- EXTI as a value
Val : HAL.UInt16;
when True =>
-- EXTI as an array
Arr : EXTICR1_EXTI_Field_Array;
end case;
end record
with Unchecked_Union, Size => 16;
for EXTICR1_EXTI_Field use record
Val at 0 range 0 .. 15;
Arr at 0 range 0 .. 15;
end record;
-- external interrupt configuration register 1
type EXTICR1_Register is record
-- EXTI x configuration (x = 0 to 3)
EXTI : EXTICR1_EXTI_Field :=
(As_Array => False, Val => 16#0#);
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for EXTICR1_Register use record
EXTI at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
-- EXTICR2_EXTI array element
subtype EXTICR2_EXTI_Element is HAL.UInt4;
-- EXTICR2_EXTI array
type EXTICR2_EXTI_Field_Array is array (4 .. 7) of EXTICR2_EXTI_Element
with Component_Size => 4, Size => 16;
-- Type definition for EXTICR2_EXTI
type EXTICR2_EXTI_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- EXTI as a value
Val : HAL.UInt16;
when True =>
-- EXTI as an array
Arr : EXTICR2_EXTI_Field_Array;
end case;
end record
with Unchecked_Union, Size => 16;
for EXTICR2_EXTI_Field use record
Val at 0 range 0 .. 15;
Arr at 0 range 0 .. 15;
end record;
-- external interrupt configuration register 2
type EXTICR2_Register is record
-- EXTI x configuration (x = 4 to 7)
EXTI : EXTICR2_EXTI_Field :=
(As_Array => False, Val => 16#0#);
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for EXTICR2_Register use record
EXTI at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
-- EXTICR3_EXTI array element
subtype EXTICR3_EXTI_Element is HAL.UInt4;
-- EXTICR3_EXTI array
type EXTICR3_EXTI_Field_Array is array (8 .. 11) of EXTICR3_EXTI_Element
with Component_Size => 4, Size => 16;
-- Type definition for EXTICR3_EXTI
type EXTICR3_EXTI_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- EXTI as a value
Val : HAL.UInt16;
when True =>
-- EXTI as an array
Arr : EXTICR3_EXTI_Field_Array;
end case;
end record
with Unchecked_Union, Size => 16;
for EXTICR3_EXTI_Field use record
Val at 0 range 0 .. 15;
Arr at 0 range 0 .. 15;
end record;
-- external interrupt configuration register 3
type EXTICR3_Register is record
-- EXTI x configuration (x = 8 to 11)
EXTI : EXTICR3_EXTI_Field :=
(As_Array => False, Val => 16#0#);
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for EXTICR3_Register use record
EXTI at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
-- EXTICR4_EXTI array element
subtype EXTICR4_EXTI_Element is HAL.UInt4;
-- EXTICR4_EXTI array
type EXTICR4_EXTI_Field_Array is array (12 .. 15) of EXTICR4_EXTI_Element
with Component_Size => 4, Size => 16;
-- Type definition for EXTICR4_EXTI
type EXTICR4_EXTI_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- EXTI as a value
Val : HAL.UInt16;
when True =>
-- EXTI as an array
Arr : EXTICR4_EXTI_Field_Array;
end case;
end record
with Unchecked_Union, Size => 16;
for EXTICR4_EXTI_Field use record
Val at 0 range 0 .. 15;
Arr at 0 range 0 .. 15;
end record;
-- external interrupt configuration register 4
type EXTICR4_Register is record
-- EXTI x configuration (x = 12 to 15)
EXTI : EXTICR4_EXTI_Field :=
(As_Array => False, Val => 16#0#);
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for EXTICR4_Register use record
EXTI at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
-- CCM SRAM control and status register
type SCSR_Register is record
-- CCM SRAM Erase
CCMER : Boolean := False;
-- Read-only. CCM SRAM busy by erase operation
CCMBSY : Boolean := False;
-- unspecified
Reserved_2_31 : HAL.UInt30 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for SCSR_Register use record
CCMER at 0 range 0 .. 0;
CCMBSY at 0 range 1 .. 1;
Reserved_2_31 at 0 range 2 .. 31;
end record;
-- configuration register 2
type CFGR2_Register is record
-- Core Lockup Lock
CLL : Boolean := False;
-- SRAM Parity Lock
SPL : Boolean := False;
-- PVD Lock
PVDL : Boolean := False;
-- ECC Lock
ECCL : Boolean := False;
-- unspecified
Reserved_4_7 : HAL.UInt4 := 16#0#;
-- SRAM Parity Flag
SPF : Boolean := False;
-- unspecified
Reserved_9_31 : HAL.UInt23 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CFGR2_Register use record
CLL at 0 range 0 .. 0;
SPL at 0 range 1 .. 1;
PVDL at 0 range 2 .. 2;
ECCL at 0 range 3 .. 3;
Reserved_4_7 at 0 range 4 .. 7;
SPF at 0 range 8 .. 8;
Reserved_9_31 at 0 range 9 .. 31;
end record;
-- SRAM Write protection register 1
type SWPR_Register is record
-- Write protection
Page0_WP : Boolean := False;
-- Write protection
Page1_WP : Boolean := False;
-- Write protection
Page2_WP : Boolean := False;
-- Write protection
Page3_WP : Boolean := False;
-- Write protection
Page4_WP : Boolean := False;
-- Write protection
Page5_WP : Boolean := False;
-- Write protection
Page6_WP : Boolean := False;
-- Write protection
Page7_WP : Boolean := False;
-- Write protection
Page8_WP : Boolean := False;
-- Write protection
Page9_WP : Boolean := False;
-- Write protection
Page10_WP : Boolean := False;
-- Write protection
Page11_WP : Boolean := False;
-- Write protection
Page12_WP : Boolean := False;
-- Write protection
Page13_WP : Boolean := False;
-- Write protection
Page14_WP : Boolean := False;
-- Write protection
Page15_WP : Boolean := False;
-- Write protection
Page16_WP : Boolean := False;
-- Write protection
Page17_WP : Boolean := False;
-- Write protection
Page18_WP : Boolean := False;
-- Write protection
Page19_WP : Boolean := False;
-- Write protection
Page20_WP : Boolean := False;
-- Write protection
Page21_WP : Boolean := False;
-- Write protection
Page22_WP : Boolean := False;
-- Write protection
Page23_WP : Boolean := False;
-- Write protection
Page24_WP : Boolean := False;
-- Write protection
Page25_WP : Boolean := False;
-- Write protection
Page26_WP : Boolean := False;
-- Write protection
Page27_WP : Boolean := False;
-- Write protection
Page28_WP : Boolean := False;
-- Write protection
Page29_WP : Boolean := False;
-- Write protection
Page30_WP : Boolean := False;
-- Write protection
Page31_WP : Boolean := False;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for SWPR_Register use record
Page0_WP at 0 range 0 .. 0;
Page1_WP at 0 range 1 .. 1;
Page2_WP at 0 range 2 .. 2;
Page3_WP at 0 range 3 .. 3;
Page4_WP at 0 range 4 .. 4;
Page5_WP at 0 range 5 .. 5;
Page6_WP at 0 range 6 .. 6;
Page7_WP at 0 range 7 .. 7;
Page8_WP at 0 range 8 .. 8;
Page9_WP at 0 range 9 .. 9;
Page10_WP at 0 range 10 .. 10;
Page11_WP at 0 range 11 .. 11;
Page12_WP at 0 range 12 .. 12;
Page13_WP at 0 range 13 .. 13;
Page14_WP at 0 range 14 .. 14;
Page15_WP at 0 range 15 .. 15;
Page16_WP at 0 range 16 .. 16;
Page17_WP at 0 range 17 .. 17;
Page18_WP at 0 range 18 .. 18;
Page19_WP at 0 range 19 .. 19;
Page20_WP at 0 range 20 .. 20;
Page21_WP at 0 range 21 .. 21;
Page22_WP at 0 range 22 .. 22;
Page23_WP at 0 range 23 .. 23;
Page24_WP at 0 range 24 .. 24;
Page25_WP at 0 range 25 .. 25;
Page26_WP at 0 range 26 .. 26;
Page27_WP at 0 range 27 .. 27;
Page28_WP at 0 range 28 .. 28;
Page29_WP at 0 range 29 .. 29;
Page30_WP at 0 range 30 .. 30;
Page31_WP at 0 range 31 .. 31;
end record;
subtype SKR_KEY_Field is HAL.UInt8;
-- SRAM2 Key Register
type SKR_Register is record
-- Write-only. SRAM2 Key for software erase
KEY : SKR_KEY_Field := 16#0#;
-- unspecified
Reserved_8_31 : HAL.UInt24 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for SKR_Register use record
KEY at 0 range 0 .. 7;
Reserved_8_31 at 0 range 8 .. 31;
end record;
-----------------
-- Peripherals --
-----------------
-- System configuration controller
type SYSCFG_Peripheral is record
-- Remap Memory register
MEMRMP : aliased MEMRMP_Register;
-- peripheral mode configuration register
CFGR1 : aliased CFGR1_Register;
-- external interrupt configuration register 1
EXTICR1 : aliased EXTICR1_Register;
-- external interrupt configuration register 2
EXTICR2 : aliased EXTICR2_Register;
-- external interrupt configuration register 3
EXTICR3 : aliased EXTICR3_Register;
-- external interrupt configuration register 4
EXTICR4 : aliased EXTICR4_Register;
-- CCM SRAM control and status register
SCSR : aliased SCSR_Register;
-- configuration register 2
CFGR2 : aliased CFGR2_Register;
-- SRAM Write protection register 1
SWPR : aliased SWPR_Register;
-- SRAM2 Key Register
SKR : aliased SKR_Register;
end record
with Volatile;
for SYSCFG_Peripheral use record
MEMRMP at 16#0# range 0 .. 31;
CFGR1 at 16#4# range 0 .. 31;
EXTICR1 at 16#8# range 0 .. 31;
EXTICR2 at 16#C# range 0 .. 31;
EXTICR3 at 16#10# range 0 .. 31;
EXTICR4 at 16#14# range 0 .. 31;
SCSR at 16#18# range 0 .. 31;
CFGR2 at 16#1C# range 0 .. 31;
SWPR at 16#20# range 0 .. 31;
SKR at 16#24# range 0 .. 31;
end record;
-- System configuration controller
SYSCFG_Periph : aliased SYSCFG_Peripheral
with Import, Address => SYSCFG_Base;
end STM32_SVD.SYSCFG;
|
------------------------------------------------------------------------------
-- --
-- GNAT ncurses Binding Samples --
-- --
-- Sample.Helpers --
-- --
-- B O D Y --
-- --
------------------------------------------------------------------------------
-- Copyright (c) 1998,2006 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
-- "Software"), to deal in the Software without restriction, including --
-- without limitation the rights to use, copy, modify, merge, publish, --
-- distribute, distribute with modifications, sublicense, and/or sell --
-- copies of the Software, and to permit persons to whom the Software is --
-- furnished to do so, subject to the following conditions: --
-- --
-- The above copyright notice and this permission notice shall be included --
-- in all copies or substantial portions of the Software. --
-- --
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS --
-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF --
-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. --
-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, --
-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR --
-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR --
-- THE USE OR OTHER DEALINGS IN THE SOFTWARE. --
-- --
-- Except as contained in this notice, the name(s) of the above copyright --
-- holders shall not be used in advertising or otherwise to promote the --
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control
-- $Revision: 1.11 $
-- $Date: 2006/06/25 14:30:22 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Terminal_Interface.Curses;
with Sample.Explanation; use Sample.Explanation;
-- This package contains some conveniant helper routines used throughout
-- this example.
--
package body Sample.Helpers is
procedure Window_Title (Win : in Window;
Title : in String)
is
Height : Line_Count;
Width : Column_Count;
Pos : Column_Position := 0;
begin
Get_Size (Win, Height, Width);
if Title'Length < Width then
Pos := (Width - Title'Length) / 2;
end if;
Add (Win, 0, Pos, Title);
end Window_Title;
procedure Not_Implemented is
begin
Explain ("NOTIMPL");
end Not_Implemented;
end Sample.Helpers;
|
-----------------------------------------------------------------------
-- util-encodes-ecc-tests - ECC function tests
-- Copyright (C) 2019 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-----------------------------------------------------------------------
with Interfaces;
with Util.Test_Caller;
package body Util.Encoders.ECC.Tests is
use Interfaces;
package Caller is new Util.Test_Caller (Test, "Encoders.ECC");
procedure Assert_Equals (T : in out Test;
Expect : in ECC_Code;
Code : in ECC_Code;
Message : in String);
procedure Test_ECC_Block (T : in out Test;
Data : in Ada.Streams.Stream_Element_Array;
Expect : in ECC_Code;
Title : in String);
procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite) is
begin
Caller.Add_Test (Suite, "Test Util.Encoders.ECC.Make+Check (256)",
Test_ECC_Block_256'Access);
Caller.Add_Test (Suite, "Test Util.Encoders.ECC.Make+Check (512)",
Test_ECC_Block_512'Access);
end Add_Tests;
procedure Assert_Equals (T : in out Test;
Expect : in ECC_Code;
Code : in ECC_Code;
Message : in String) is
begin
Util.Tests.Assert_Equals (T, Natural (Expect (0)), Natural (Code (0)),
"ECC(0): " & Message);
Util.Tests.Assert_Equals (T, Natural (Expect (1)), Natural (Code (1)),
"ECC(1): " & Message);
Util.Tests.Assert_Equals (T, Natural (Expect (2)), Natural (Code (2)),
"ECC(2): " & Message);
end Assert_Equals;
-- ------------------------------
-- Test ECC correction on 256 bytes block.
-- ------------------------------
procedure Test_ECC_Block (T : in out Test;
Data : in Ada.Streams.Stream_Element_Array;
Expect : in ECC_Code;
Title : in String) is
Data2 : Ada.Streams.Stream_Element_Array := Data;
Code1 : ECC_Code;
Code2 : ECC_Code;
Code3 : ECC_Code;
Result : ECC_Result;
begin
Make (Data, Code1);
Assert_Equals (T, Expect, Code1, Title);
for I in Data'Range loop
for J in 0 .. 7 loop
Data2 (I) := Data2 (I) xor Stream_Element (Shift_Left (Unsigned_8 (1), J));
Make (Data2, Code2);
Result := Correct (Data2, Expect);
T.Assert (Result = CORRECTABLE_ERROR, Title & ": not corrected"
& Natural'Image (Natural (I)) & " bit" & Natural'Image (J));
Make (Data2, Code3);
Assert_Equals (T, Expect, Code3, Title & ": bad ECC"
& Natural'Image (Natural (I)) & " bit" & Natural'Image (J));
T.Assert (Data = Data2, Title & ": invalid data block");
end loop;
end loop;
end Test_ECC_Block;
-- ------------------------------
-- Test ECC correction on 256 bytes block.
-- ------------------------------
procedure Test_ECC_Block_256 (T : in out Test) is
Data : Ada.Streams.Stream_Element_Array (0 .. 255) := (others => 0);
begin
Test_ECC_Block (T, Data, (16#ff#, 16#ff#, 16#ff#), "Zero block");
Data (45) := 16#20#;
Test_ECC_Block (T, Data, (16#59#, 16#a6#, 16#67#), "Zero block, @45=20");
Data (45) := 16#10#;
Test_ECC_Block (T, Data, (16#59#, 16#a6#, 16#6b#), "Zero block, @45=10");
Data (45) := 16#41#;
Test_ECC_Block (T, Data, (16#ff#, 16#ff#, 16#0f#), "Zero block, @45=41");
end Test_ECC_Block_256;
-- ------------------------------
-- Test ECC correction on 512 bytes block.
-- ------------------------------
procedure Test_ECC_Block_512 (T : in out Test) is
Data : Ada.Streams.Stream_Element_Array (0 .. 511) := (others => 0);
begin
Test_ECC_Block (T, Data, (16#ff#, 16#ff#, 16#ff#), "Zero block 512");
Data (45) := 16#20#;
Test_ECC_Block (T, Data, (16#59#, 16#a6#, 16#66#), "Zero block 512, @45=20");
Data (45) := 16#10#;
Test_ECC_Block (T, Data, (16#59#, 16#a6#, 16#6a#), "Zero block 512, @45=10");
Data (45) := 16#41#;
Test_ECC_Block (T, Data, (16#ff#, 16#ff#, 16#0f#), "Zero block 512, @45=41");
end Test_ECC_Block_512;
end Util.Encoders.ECC.Tests;
|
-- This spec has been automatically generated from out.svd
pragma Restrictions (No_Elaboration_Code);
pragma Ada_2012;
pragma Style_Checks (Off);
with System;
-- Watchdog Timer
package MSP430_SVD.WATCHDOG_TIMER is
pragma Preelaborate;
---------------
-- Registers --
---------------
-- WDTCTL_WDTIS array
type WDTCTL_WDTIS_Field_Array is array (0 .. 1) of MSP430_SVD.Bit
with Component_Size => 1, Size => 2;
-- Type definition for WDTCTL_WDTIS
type WDTCTL_WDTIS_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- WDTIS as a value
Val : MSP430_SVD.UInt2;
when True =>
-- WDTIS as an array
Arr : WDTCTL_WDTIS_Field_Array;
end case;
end record
with Unchecked_Union, Size => 2;
for WDTCTL_WDTIS_Field use record
Val at 0 range 0 .. 1;
Arr at 0 range 0 .. 1;
end record;
-- Watchdog Timer Control
type WDTCTL_Register is record
-- WDTIS0
WDTIS : WDTCTL_WDTIS_Field := (As_Array => False, Val => 16#0#);
-- WDTSSEL
WDTSSEL : MSP430_SVD.Bit := 16#0#;
-- WDTCNTCL
WDTCNTCL : MSP430_SVD.Bit := 16#0#;
-- WDTTMSEL
WDTTMSEL : MSP430_SVD.Bit := 16#0#;
-- WDTNMI
WDTNMI : MSP430_SVD.Bit := 16#0#;
-- WDTNMIES
WDTNMIES : MSP430_SVD.Bit := 16#0#;
-- WDTHOLD
WDTHOLD : MSP430_SVD.Bit := 16#0#;
-- unspecified
Reserved_8_15 : MSP430_SVD.Byte := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 16,
Bit_Order => System.Low_Order_First;
for WDTCTL_Register use record
WDTIS at 0 range 0 .. 1;
WDTSSEL at 0 range 2 .. 2;
WDTCNTCL at 0 range 3 .. 3;
WDTTMSEL at 0 range 4 .. 4;
WDTNMI at 0 range 5 .. 5;
WDTNMIES at 0 range 6 .. 6;
WDTHOLD at 0 range 7 .. 7;
Reserved_8_15 at 0 range 8 .. 15;
end record;
-----------------
-- Peripherals --
-----------------
-- Watchdog Timer
type WATCHDOG_TIMER_Peripheral is record
-- Watchdog Timer Control
WDTCTL : aliased WDTCTL_Register;
end record
with Volatile;
for WATCHDOG_TIMER_Peripheral use record
WDTCTL at 0 range 0 .. 15;
end record;
-- Watchdog Timer
WATCHDOG_TIMER_Periph : aliased WATCHDOG_TIMER_Peripheral
with Import, Address => WATCHDOG_TIMER_Base;
end MSP430_SVD.WATCHDOG_TIMER;
|
-- 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 NRF51_SVD.PPI is
pragma Preelaborate;
---------------
-- Registers --
---------------
---------------------------------------
-- PPI_TASKS_CHG cluster's Registers --
---------------------------------------
-- Channel group tasks.
type PPI_TASKS_CHG_Cluster is record
-- Enable channel group.
EN : aliased HAL.UInt32;
-- Disable channel group.
DIS : aliased HAL.UInt32;
end record
with Volatile, Size => 64;
for PPI_TASKS_CHG_Cluster use record
EN at 16#0# range 0 .. 31;
DIS at 16#4# range 0 .. 31;
end record;
-- Channel group tasks.
type PPI_TASKS_CHG_Clusters is array (0 .. 3) of PPI_TASKS_CHG_Cluster;
-- Enable PPI channel 0.
type CHEN_CH0_Field is
(
-- Channel disabled.
Disabled,
-- Channel enabled.
Enabled)
with Size => 1;
for CHEN_CH0_Field use
(Disabled => 0,
Enabled => 1);
-- CHEN_CH array
type CHEN_CH_Field_Array is array (0 .. 2) of CHEN_CH0_Field
with Component_Size => 1, Size => 3;
-- Type definition for CHEN_CH
type CHEN_CH_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- CH as a value
Val : HAL.UInt3;
when True =>
-- CH as an array
Arr : CHEN_CH_Field_Array;
end case;
end record
with Unchecked_Union, Size => 3;
for CHEN_CH_Field use record
Val at 0 range 0 .. 2;
Arr at 0 range 0 .. 2;
end record;
-- Enable PPI channel 3.
type CHEN_CH3_Field is
(
-- Channel disabled
Disabled,
-- Channel enabled
Enabled)
with Size => 1;
for CHEN_CH3_Field use
(Disabled => 0,
Enabled => 1);
-- Enable PPI channel 4.
type CHEN_CH4_Field is
(
-- Channel disabled.
Disabled,
-- Channel enabled.
Enabled)
with Size => 1;
for CHEN_CH4_Field use
(Disabled => 0,
Enabled => 1);
-- CHEN_CH array
type CHEN_CH_Field_Array_1 is array (4 .. 15) of CHEN_CH4_Field
with Component_Size => 1, Size => 12;
-- Type definition for CHEN_CH
type CHEN_CH_Field_1
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- CH as a value
Val : HAL.UInt12;
when True =>
-- CH as an array
Arr : CHEN_CH_Field_Array_1;
end case;
end record
with Unchecked_Union, Size => 12;
for CHEN_CH_Field_1 use record
Val at 0 range 0 .. 11;
Arr at 0 range 0 .. 11;
end record;
-- Enable PPI channel 20.
type CHEN_CH20_Field is
(
-- Channel disabled.
Disabled,
-- Channel enabled.
Enabled)
with Size => 1;
for CHEN_CH20_Field use
(Disabled => 0,
Enabled => 1);
-- CHEN_CH array
type CHEN_CH_Field_Array_2 is array (20 .. 31) of CHEN_CH20_Field
with Component_Size => 1, Size => 12;
-- Type definition for CHEN_CH
type CHEN_CH_Field_2
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- CH as a value
Val : HAL.UInt12;
when True =>
-- CH as an array
Arr : CHEN_CH_Field_Array_2;
end case;
end record
with Unchecked_Union, Size => 12;
for CHEN_CH_Field_2 use record
Val at 0 range 0 .. 11;
Arr at 0 range 0 .. 11;
end record;
-- Channel enable.
type CHEN_Register is record
-- Enable PPI channel 0.
CH : CHEN_CH_Field := (As_Array => False, Val => 16#0#);
-- Enable PPI channel 3.
CH3 : CHEN_CH3_Field := NRF51_SVD.PPI.Disabled;
-- Enable PPI channel 4.
CH_1 : CHEN_CH_Field_1 := (As_Array => False, Val => 16#0#);
-- unspecified
Reserved_16_19 : HAL.UInt4 := 16#0#;
-- Enable PPI channel 20.
CH_2 : CHEN_CH_Field_2 := (As_Array => False, Val => 16#0#);
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CHEN_Register use record
CH at 0 range 0 .. 2;
CH3 at 0 range 3 .. 3;
CH_1 at 0 range 4 .. 15;
Reserved_16_19 at 0 range 16 .. 19;
CH_2 at 0 range 20 .. 31;
end record;
-- Enable PPI channel 0.
type CHENSET_CH0_Field is
(
-- Channel disabled.
Disabled,
-- Channel enabled.
Enabled)
with Size => 1;
for CHENSET_CH0_Field use
(Disabled => 0,
Enabled => 1);
-- Enable PPI channel 0.
type CHENSET_CH0_Field_1 is
(
-- Reset value for the field
Chenset_Ch0_Field_Reset,
-- Enable channel on write.
Set)
with Size => 1;
for CHENSET_CH0_Field_1 use
(Chenset_Ch0_Field_Reset => 0,
Set => 1);
-- CHENSET_CH array
type CHENSET_CH_Field_Array is array (0 .. 15) of CHENSET_CH0_Field_1
with Component_Size => 1, Size => 16;
-- Type definition for CHENSET_CH
type CHENSET_CH_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- CH as a value
Val : HAL.UInt16;
when True =>
-- CH as an array
Arr : CHENSET_CH_Field_Array;
end case;
end record
with Unchecked_Union, Size => 16;
for CHENSET_CH_Field use record
Val at 0 range 0 .. 15;
Arr at 0 range 0 .. 15;
end record;
-- Enable PPI channel 20.
type CHENSET_CH20_Field is
(
-- Channel disabled.
Disabled,
-- Channel enabled.
Enabled)
with Size => 1;
for CHENSET_CH20_Field use
(Disabled => 0,
Enabled => 1);
-- Enable PPI channel 20.
type CHENSET_CH20_Field_1 is
(
-- Reset value for the field
Chenset_Ch20_Field_Reset,
-- Enable channel on write.
Set)
with Size => 1;
for CHENSET_CH20_Field_1 use
(Chenset_Ch20_Field_Reset => 0,
Set => 1);
-- CHENSET_CH array
type CHENSET_CH_Field_Array_1 is array (20 .. 31) of CHENSET_CH20_Field_1
with Component_Size => 1, Size => 12;
-- Type definition for CHENSET_CH
type CHENSET_CH_Field_1
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- CH as a value
Val : HAL.UInt12;
when True =>
-- CH as an array
Arr : CHENSET_CH_Field_Array_1;
end case;
end record
with Unchecked_Union, Size => 12;
for CHENSET_CH_Field_1 use record
Val at 0 range 0 .. 11;
Arr at 0 range 0 .. 11;
end record;
-- Channel enable set.
type CHENSET_Register is record
-- Enable PPI channel 0.
CH : CHENSET_CH_Field := (As_Array => False, Val => 16#0#);
-- unspecified
Reserved_16_19 : HAL.UInt4 := 16#0#;
-- Enable PPI channel 20.
CH_1 : CHENSET_CH_Field_1 :=
(As_Array => False, Val => 16#0#);
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CHENSET_Register use record
CH at 0 range 0 .. 15;
Reserved_16_19 at 0 range 16 .. 19;
CH_1 at 0 range 20 .. 31;
end record;
-- Disable PPI channel 0.
type CHENCLR_CH0_Field is
(
-- Channel disabled.
Disabled,
-- Channel enabled.
Enabled)
with Size => 1;
for CHENCLR_CH0_Field use
(Disabled => 0,
Enabled => 1);
-- Disable PPI channel 0.
type CHENCLR_CH0_Field_1 is
(
-- Reset value for the field
Chenclr_Ch0_Field_Reset,
-- Disable channel on write.
Clear)
with Size => 1;
for CHENCLR_CH0_Field_1 use
(Chenclr_Ch0_Field_Reset => 0,
Clear => 1);
-- CHENCLR_CH array
type CHENCLR_CH_Field_Array is array (0 .. 15) of CHENCLR_CH0_Field_1
with Component_Size => 1, Size => 16;
-- Type definition for CHENCLR_CH
type CHENCLR_CH_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- CH as a value
Val : HAL.UInt16;
when True =>
-- CH as an array
Arr : CHENCLR_CH_Field_Array;
end case;
end record
with Unchecked_Union, Size => 16;
for CHENCLR_CH_Field use record
Val at 0 range 0 .. 15;
Arr at 0 range 0 .. 15;
end record;
-- Disable PPI channel 20.
type CHENCLR_CH20_Field is
(
-- Channel disabled.
Disabled,
-- Channel enabled.
Enabled)
with Size => 1;
for CHENCLR_CH20_Field use
(Disabled => 0,
Enabled => 1);
-- Disable PPI channel 20.
type CHENCLR_CH20_Field_1 is
(
-- Reset value for the field
Chenclr_Ch20_Field_Reset,
-- Disable channel on write.
Clear)
with Size => 1;
for CHENCLR_CH20_Field_1 use
(Chenclr_Ch20_Field_Reset => 0,
Clear => 1);
-- CHENCLR_CH array
type CHENCLR_CH_Field_Array_1 is array (20 .. 31) of CHENCLR_CH20_Field_1
with Component_Size => 1, Size => 12;
-- Type definition for CHENCLR_CH
type CHENCLR_CH_Field_1
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- CH as a value
Val : HAL.UInt12;
when True =>
-- CH as an array
Arr : CHENCLR_CH_Field_Array_1;
end case;
end record
with Unchecked_Union, Size => 12;
for CHENCLR_CH_Field_1 use record
Val at 0 range 0 .. 11;
Arr at 0 range 0 .. 11;
end record;
-- Channel enable clear.
type CHENCLR_Register is record
-- Disable PPI channel 0.
CH : CHENCLR_CH_Field := (As_Array => False, Val => 16#0#);
-- unspecified
Reserved_16_19 : HAL.UInt4 := 16#0#;
-- Disable PPI channel 20.
CH_1 : CHENCLR_CH_Field_1 :=
(As_Array => False, Val => 16#0#);
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CHENCLR_Register use record
CH at 0 range 0 .. 15;
Reserved_16_19 at 0 range 16 .. 19;
CH_1 at 0 range 20 .. 31;
end record;
--------------------------------
-- PPI_CH cluster's Registers --
--------------------------------
-- PPI Channel.
type PPI_CH_Cluster is record
-- Channel event end-point.
EEP : aliased HAL.UInt32;
-- Channel task end-point.
TEP : aliased HAL.UInt32;
end record
with Volatile, Size => 64;
for PPI_CH_Cluster use record
EEP at 16#0# range 0 .. 31;
TEP at 16#4# range 0 .. 31;
end record;
-- PPI Channel.
type PPI_CH_Clusters is array (0 .. 15) of PPI_CH_Cluster;
-- Include CH0 in channel group.
type CHG_CH0_Field is
(
-- Channel excluded.
Excluded,
-- Channel included.
Included)
with Size => 1;
for CHG_CH0_Field use
(Excluded => 0,
Included => 1);
-- CHG_CH array
type CHG_CH_Field_Array is array (0 .. 15) of CHG_CH0_Field
with Component_Size => 1, Size => 16;
-- Type definition for CHG_CH
type CHG_CH_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- CH as a value
Val : HAL.UInt16;
when True =>
-- CH as an array
Arr : CHG_CH_Field_Array;
end case;
end record
with Unchecked_Union, Size => 16;
for CHG_CH_Field use record
Val at 0 range 0 .. 15;
Arr at 0 range 0 .. 15;
end record;
-- Include CH20 in channel group.
type CHG_CH20_Field is
(
-- Channel excluded.
Excluded,
-- Channel included.
Included)
with Size => 1;
for CHG_CH20_Field use
(Excluded => 0,
Included => 1);
-- CHG_CH array
type CHG_CH_Field_Array_1 is array (20 .. 31) of CHG_CH20_Field
with Component_Size => 1, Size => 12;
-- Type definition for CHG_CH
type CHG_CH_Field_1
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- CH as a value
Val : HAL.UInt12;
when True =>
-- CH as an array
Arr : CHG_CH_Field_Array_1;
end case;
end record
with Unchecked_Union, Size => 12;
for CHG_CH_Field_1 use record
Val at 0 range 0 .. 11;
Arr at 0 range 0 .. 11;
end record;
-- Channel group configuration.
type CHG_Register is record
-- Include CH0 in channel group.
CH : CHG_CH_Field := (As_Array => False, Val => 16#0#);
-- unspecified
Reserved_16_19 : HAL.UInt4 := 16#0#;
-- Include CH20 in channel group.
CH_1 : CHG_CH_Field_1 := (As_Array => False, Val => 16#0#);
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CHG_Register use record
CH at 0 range 0 .. 15;
Reserved_16_19 at 0 range 16 .. 19;
CH_1 at 0 range 20 .. 31;
end record;
-- Channel group configuration.
type CHG_Registers is array (0 .. 3) of CHG_Register
with Volatile;
-----------------
-- Peripherals --
-----------------
-- PPI controller.
type PPI_Peripheral is record
-- Channel group tasks.
TASKS_CHG : aliased PPI_TASKS_CHG_Clusters;
-- Channel enable.
CHEN : aliased CHEN_Register;
-- Channel enable set.
CHENSET : aliased CHENSET_Register;
-- Channel enable clear.
CHENCLR : aliased CHENCLR_Register;
-- PPI Channel.
CH : aliased PPI_CH_Clusters;
-- Channel group configuration.
CHG : aliased CHG_Registers;
end record
with Volatile;
for PPI_Peripheral use record
TASKS_CHG at 16#0# range 0 .. 255;
CHEN at 16#500# range 0 .. 31;
CHENSET at 16#504# range 0 .. 31;
CHENCLR at 16#508# range 0 .. 31;
CH at 16#510# range 0 .. 1023;
CHG at 16#800# range 0 .. 127;
end record;
-- PPI controller.
PPI_Periph : aliased PPI_Peripheral
with Import, Address => System'To_Address (16#4001F000#);
end NRF51_SVD.PPI;
|
------------------------------------------------------------------------------
-- --
-- GNAT LIBRARY COMPONENTS --
-- --
-- G N A T . S E C U R E _ H A S H E S . S H A 2 _ 3 2 --
-- --
-- B o d y --
-- --
-- Copyright (C) 2009-2020, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
package body GNAT.Secure_Hashes.SHA2_32 is
use Interfaces;
------------
-- Sigma0 --
------------
function Sigma0 (X : Word) return Word is
begin
return Rotate_Right (X, 2)
xor Rotate_Right (X, 13)
xor Rotate_Right (X, 22);
end Sigma0;
------------
-- Sigma1 --
------------
function Sigma1 (X : Word) return Word is
begin
return Rotate_Right (X, 6)
xor Rotate_Right (X, 11)
xor Rotate_Right (X, 25);
end Sigma1;
--------
-- S0 --
--------
function S0 (X : Word) return Word is
begin
return Rotate_Right (X, 7)
xor Rotate_Right (X, 18)
xor Shift_Right (X, 3);
end S0;
--------
-- S1 --
--------
function S1 (X : Word) return Word is
begin
return Rotate_Right (X, 17)
xor Rotate_Right (X, 19)
xor Shift_Right (X, 10);
end S1;
end GNAT.Secure_Hashes.SHA2_32;
|
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Web Framework --
-- --
-- Tools Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2015, Vadim Godunko <vgodunko@gmail.com> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with Asis.Definitions;
package body Properties.Definitions.Derived_Type is
---------------
-- Alignment --
---------------
function Alignment
(Engine : access Engines.Contexts.Context;
Element : Asis.Definition;
Name : Engines.Integer_Property) return Integer
is
Parent : constant Asis.Subtype_Indication :=
Asis.Definitions.Parent_Subtype_Indication (Element);
begin
return Engine.Integer.Get_Property (Parent, Name);
end Alignment;
------------
-- Bounds --
------------
function Bounds
(Engine : access Engines.Contexts.Context;
Element : Asis.Definition;
Name : Engines.Text_Property)
return League.Strings.Universal_String
is
Parent : constant Asis.Subtype_Indication :=
Asis.Definitions.Parent_Subtype_Indication (Element);
begin
return Engine.Text.Get_Property (Parent, Name);
end Bounds;
function Code
(Engine : access Engines.Contexts.Context;
Element : Asis.Definition;
Name : Engines.Text_Property)
return League.Strings.Universal_String
is
Is_Simple : constant Boolean := Engine.Boolean.Get_Property
(Element, Engines.Is_Simple_Type);
Parent : constant Asis.Subtype_Indication :=
Asis.Definitions.Parent_Subtype_Indication (Element);
Result : League.Strings.Universal_String;
begin
if Is_Simple then
return League.Strings.Empty_Universal_String;
end if;
Result.Append (Engine.Text.Get_Property (Parent, Name));
Result.Append (";");
return Result;
end Code;
function Is_Simple_Type
(Engine : access Engines.Contexts.Context;
Element : Asis.Definition;
Name : Engines.Boolean_Property) return Boolean
is
Parent : constant Asis.Subtype_Indication :=
Asis.Definitions.Parent_Subtype_Indication (Element);
begin
return Engine.Boolean.Get_Property (Parent, Name);
end Is_Simple_Type;
end Properties.Definitions.Derived_Type;
|
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE boost_serialization>
<boost_serialization signature="serialization::archive" version="15">
<syndb class_id="0" tracking_level="0" version="0">
<userIPLatency>-1</userIPLatency>
<userIPName/>
<cdfg class_id="1" tracking_level="1" version="0" object_id="_0">
<name>Loop_Row_DCT_Loop_pr</name>
<ret_bitwidth>0</ret_bitwidth>
<ports class_id="2" tracking_level="0" version="0">
<count>9</count>
<item_version>0</item_version>
<item class_id="3" tracking_level="1" version="0" object_id="_1">
<Value class_id="4" tracking_level="0" version="0">
<Obj class_id="5" tracking_level="0" version="0">
<type>1</type>
<id>1</id>
<name>buf_2d_in_0</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo class_id="6" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName>RAM</coreName>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<direction>0</direction>
<if_type>1</if_type>
<array_size>8</array_size>
<bit_vecs class_id="7" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_2">
<Value>
<Obj>
<type>1</type>
<id>2</id>
<name>buf_2d_in_1</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName>RAM</coreName>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<direction>0</direction>
<if_type>1</if_type>
<array_size>8</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_3">
<Value>
<Obj>
<type>1</type>
<id>3</id>
<name>buf_2d_in_2</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName>RAM</coreName>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<direction>0</direction>
<if_type>1</if_type>
<array_size>8</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_4">
<Value>
<Obj>
<type>1</type>
<id>4</id>
<name>buf_2d_in_3</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName>RAM</coreName>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<direction>0</direction>
<if_type>1</if_type>
<array_size>8</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_5">
<Value>
<Obj>
<type>1</type>
<id>5</id>
<name>buf_2d_in_4</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName>RAM</coreName>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<direction>0</direction>
<if_type>1</if_type>
<array_size>8</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_6">
<Value>
<Obj>
<type>1</type>
<id>6</id>
<name>buf_2d_in_5</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName>RAM</coreName>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<direction>0</direction>
<if_type>1</if_type>
<array_size>8</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_7">
<Value>
<Obj>
<type>1</type>
<id>7</id>
<name>buf_2d_in_6</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName>RAM</coreName>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<direction>0</direction>
<if_type>1</if_type>
<array_size>8</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_8">
<Value>
<Obj>
<type>1</type>
<id>8</id>
<name>buf_2d_in_7</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName>RAM</coreName>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<direction>0</direction>
<if_type>1</if_type>
<array_size>8</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_9">
<Value>
<Obj>
<type>1</type>
<id>9</id>
<name>row_outbuf_i</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>dst</originalName>
<rtlName/>
<coreName>RAM</coreName>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<direction>1</direction>
<if_type>1</if_type>
<array_size>64</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
</ports>
<nodes class_id="8" tracking_level="0" version="0">
<count>87</count>
<item_version>0</item_version>
<item class_id="9" tracking_level="1" version="0" object_id="_10">
<Value>
<Obj>
<type>0</type>
<id>18</id>
<name>_ln76</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>76</lineNumber>
<contextFuncName>dct_2d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item class_id="10" tracking_level="0" version="0">
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second class_id="11" tracking_level="0" version="0">
<count>2</count>
<item_version>0</item_version>
<item class_id="12" tracking_level="0" version="0">
<first class_id="13" tracking_level="0" version="0">
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>76</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>119</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.73</m_delay>
<m_topoIndex>1</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_11">
<Value>
<Obj>
<type>0</type>
<id>20</id>
<name>i_0_i</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>i</originalName>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>4</bitwidth>
</Value>
<oprand_edges>
<count>4</count>
<item_version>0</item_version>
<item>122</item>
<item>123</item>
<item>124</item>
<item>125</item>
</oprand_edges>
<opcode>phi</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>2</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_12">
<Value>
<Obj>
<type>0</type>
<id>21</id>
<name>icmp_ln76</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>76</lineNumber>
<contextFuncName>dct_2d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>76</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>icmp_ln76_fu_313_p2</rtlName>
<coreName/>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>126</item>
<item>128</item>
</oprand_edges>
<opcode>icmp</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.72</m_delay>
<m_topoIndex>3</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_13">
<Value>
<Obj>
<type>0</type>
<id>23</id>
<name>i</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>76</lineNumber>
<contextFuncName>dct_2d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>76</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>i</originalName>
<rtlName>i_fu_319_p2</rtlName>
<coreName/>
</Obj>
<bitwidth>4</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>129</item>
<item>131</item>
</oprand_edges>
<opcode>add</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.80</m_delay>
<m_topoIndex>4</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_14">
<Value>
<Obj>
<type>0</type>
<id>24</id>
<name>_ln76</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>76</lineNumber>
<contextFuncName>dct_2d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>76</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>132</item>
<item>133</item>
<item>134</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>5</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_15">
<Value>
<Obj>
<type>0</type>
<id>27</id>
<name>zext_ln48</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>48</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>48</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>zext_ln48_fu_325_p1</rtlName>
<coreName/>
</Obj>
<bitwidth>64</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>135</item>
</oprand_edges>
<opcode>zext</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>6</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_16">
<Value>
<Obj>
<type>0</type>
<id>28</id>
<name>tmp</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>63</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>63</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>tmp_fu_337_p3</rtlName>
<coreName/>
</Obj>
<bitwidth>7</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>137</item>
<item>138</item>
<item>140</item>
</oprand_edges>
<opcode>bitconcatenate</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>7</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_17">
<Value>
<Obj>
<type>0</type>
<id>29</id>
<name>zext_ln48_1</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>48</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>48</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>zext_ln48_1_fu_345_p1</rtlName>
<coreName/>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>141</item>
</oprand_edges>
<opcode>zext</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>8</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_18">
<Value>
<Obj>
<type>0</type>
<id>30</id>
<name>buf_2d_in_0_addr</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>3</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>142</item>
<item>144</item>
<item>145</item>
</oprand_edges>
<opcode>getelementptr</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>9</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_19">
<Value>
<Obj>
<type>0</type>
<id>31</id>
<name>buf_2d_in_1_addr</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>3</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>146</item>
<item>147</item>
<item>148</item>
</oprand_edges>
<opcode>getelementptr</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>10</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_20">
<Value>
<Obj>
<type>0</type>
<id>32</id>
<name>buf_2d_in_2_addr</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>3</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>149</item>
<item>150</item>
<item>151</item>
</oprand_edges>
<opcode>getelementptr</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>11</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_21">
<Value>
<Obj>
<type>0</type>
<id>33</id>
<name>buf_2d_in_3_addr</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>3</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>152</item>
<item>153</item>
<item>154</item>
</oprand_edges>
<opcode>getelementptr</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>12</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_22">
<Value>
<Obj>
<type>0</type>
<id>34</id>
<name>buf_2d_in_4_addr</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>3</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>155</item>
<item>156</item>
<item>157</item>
</oprand_edges>
<opcode>getelementptr</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>13</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_23">
<Value>
<Obj>
<type>0</type>
<id>35</id>
<name>buf_2d_in_5_addr</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>3</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>158</item>
<item>159</item>
<item>160</item>
</oprand_edges>
<opcode>getelementptr</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>14</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_24">
<Value>
<Obj>
<type>0</type>
<id>36</id>
<name>buf_2d_in_6_addr</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>3</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>161</item>
<item>162</item>
<item>163</item>
</oprand_edges>
<opcode>getelementptr</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>15</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_25">
<Value>
<Obj>
<type>0</type>
<id>37</id>
<name>buf_2d_in_7_addr</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>3</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>164</item>
<item>165</item>
<item>166</item>
</oprand_edges>
<opcode>getelementptr</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>16</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_26">
<Value>
<Obj>
<type>0</type>
<id>38</id>
<name>_ln55</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>55</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>55</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>167</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.73</m_delay>
<m_topoIndex>17</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_27">
<Value>
<Obj>
<type>0</type>
<id>40</id>
<name>k_0_i</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>k</originalName>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>4</bitwidth>
</Value>
<oprand_edges>
<count>4</count>
<item_version>0</item_version>
<item>168</item>
<item>169</item>
<item>170</item>
<item>171</item>
</oprand_edges>
<opcode>phi</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>19</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_28">
<Value>
<Obj>
<type>0</type>
<id>41</id>
<name>icmp_ln55</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>55</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>55</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>icmp_ln55_fu_349_p2</rtlName>
<coreName/>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>172</item>
<item>173</item>
</oprand_edges>
<opcode>icmp</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.72</m_delay>
<m_topoIndex>20</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_29">
<Value>
<Obj>
<type>0</type>
<id>43</id>
<name>k</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>55</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>55</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>k</originalName>
<rtlName>k_fu_355_p2</rtlName>
<coreName/>
</Obj>
<bitwidth>4</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>174</item>
<item>175</item>
</oprand_edges>
<opcode>add</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.80</m_delay>
<m_topoIndex>21</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_30">
<Value>
<Obj>
<type>0</type>
<id>44</id>
<name>_ln55</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>55</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>55</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>176</item>
<item>177</item>
<item>178</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>22</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_31">
<Value>
<Obj>
<type>0</type>
<id>49</id>
<name>zext_ln60</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>60</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>60</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>zext_ln60_fu_361_p1</rtlName>
<coreName/>
</Obj>
<bitwidth>64</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>179</item>
</oprand_edges>
<opcode>zext</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>23</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_32">
<Value>
<Obj>
<type>0</type>
<id>50</id>
<name>zext_ln63</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>63</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>63</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>zext_ln63_fu_373_p1</rtlName>
<coreName/>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>180</item>
</oprand_edges>
<opcode>zext</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>24</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_33">
<Value>
<Obj>
<type>0</type>
<id>51</id>
<name>add_ln63_8</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>63</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>63</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>add_ln63_8_fu_377_p2</rtlName>
<coreName/>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>181</item>
<item>182</item>
</oprand_edges>
<opcode>add</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.85</m_delay>
<m_topoIndex>25</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_34">
<Value>
<Obj>
<type>0</type>
<id>52</id>
<name>zext_ln63_1</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>63</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>63</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>zext_ln63_1_fu_414_p1</rtlName>
<coreName/>
</Obj>
<bitwidth>64</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>183</item>
</oprand_edges>
<opcode>zext</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>63</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_35">
<Value>
<Obj>
<type>0</type>
<id>53</id>
<name>row_outbuf_i_addr</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>63</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>63</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>6</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>184</item>
<item>185</item>
<item>186</item>
</oprand_edges>
<opcode>getelementptr</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>64</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_36">
<Value>
<Obj>
<type>0</type>
<id>54</id>
<name>dct_coeff_table_0_ad</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>60</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>60</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>3</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>187</item>
<item>188</item>
<item>189</item>
</oprand_edges>
<opcode>getelementptr</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>26</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_37">
<Value>
<Obj>
<type>0</type>
<id>55</id>
<name>dct_coeff_table_0_lo</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>60</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>60</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>14</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>190</item>
</oprand_edges>
<opcode>load</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>1.29</m_delay>
<m_topoIndex>27</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_38">
<Value>
<Obj>
<type>0</type>
<id>56</id>
<name>zext_ln61</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>grp_fu_497_p00</rtlName>
<coreName/>
</Obj>
<bitwidth>29</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>191</item>
</oprand_edges>
<opcode>zext</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>65</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_39">
<Value>
<Obj>
<type>0</type>
<id>57</id>
<name>buf_2d_in_0_load</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>192</item>
</oprand_edges>
<opcode>load</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.73</m_delay>
<m_topoIndex>46</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_40">
<Value>
<Obj>
<type>0</type>
<id>58</id>
<name>sext_ln61</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>29</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>193</item>
</oprand_edges>
<opcode>sext</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>66</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_41">
<Value>
<Obj>
<type>0</type>
<id>59</id>
<name>mul_ln61</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>dct_mac_muladd_14ns_16s_29s_29_1_1_U14</rtlName>
<coreName/>
</Obj>
<bitwidth>29</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>194</item>
<item>195</item>
</oprand_edges>
<opcode>mul</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.63</m_delay>
<m_topoIndex>67</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_42">
<Value>
<Obj>
<type>0</type>
<id>60</id>
<name>dct_coeff_table_1_ad</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>60</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>60</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>3</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>196</item>
<item>197</item>
<item>198</item>
</oprand_edges>
<opcode>getelementptr</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>28</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_43">
<Value>
<Obj>
<type>0</type>
<id>61</id>
<name>dct_coeff_table_1_lo</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>60</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>60</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>15</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>199</item>
</oprand_edges>
<opcode>load</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>1.29</m_delay>
<m_topoIndex>29</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_44">
<Value>
<Obj>
<type>0</type>
<id>62</id>
<name>sext_ln61_1</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>29</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>200</item>
</oprand_edges>
<opcode>sext</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>47</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_45">
<Value>
<Obj>
<type>0</type>
<id>63</id>
<name>buf_2d_in_1_load</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>201</item>
</oprand_edges>
<opcode>load</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.73</m_delay>
<m_topoIndex>30</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_46">
<Value>
<Obj>
<type>0</type>
<id>64</id>
<name>sext_ln61_2</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>29</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>202</item>
</oprand_edges>
<opcode>sext</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>48</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_47">
<Value>
<Obj>
<type>0</type>
<id>65</id>
<name>mul_ln61_1</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>dct_mul_mul_15s_16s_29_1_1_U10</rtlName>
<coreName/>
</Obj>
<bitwidth>29</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>203</item>
<item>204</item>
</oprand_edges>
<opcode>mul</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>2.84</m_delay>
<m_topoIndex>49</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_48">
<Value>
<Obj>
<type>0</type>
<id>66</id>
<name>dct_coeff_table_2_ad</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>60</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>60</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>3</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>205</item>
<item>206</item>
<item>207</item>
</oprand_edges>
<opcode>getelementptr</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>31</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_49">
<Value>
<Obj>
<type>0</type>
<id>67</id>
<name>dct_coeff_table_2_lo</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>60</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>60</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>15</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>208</item>
</oprand_edges>
<opcode>load</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>1.29</m_delay>
<m_topoIndex>32</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_50">
<Value>
<Obj>
<type>0</type>
<id>68</id>
<name>sext_ln61_3</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>29</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>209</item>
</oprand_edges>
<opcode>sext</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>68</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_51">
<Value>
<Obj>
<type>0</type>
<id>69</id>
<name>buf_2d_in_2_load</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>210</item>
</oprand_edges>
<opcode>load</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.73</m_delay>
<m_topoIndex>50</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_52">
<Value>
<Obj>
<type>0</type>
<id>70</id>
<name>sext_ln61_4</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>29</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>211</item>
</oprand_edges>
<opcode>sext</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>69</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_53">
<Value>
<Obj>
<type>0</type>
<id>71</id>
<name>mul_ln61_2</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>dct_mac_muladd_15s_16s_29s_29_1_1_U15</rtlName>
<coreName/>
</Obj>
<bitwidth>29</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>212</item>
<item>213</item>
</oprand_edges>
<opcode>mul</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.63</m_delay>
<m_topoIndex>70</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_54">
<Value>
<Obj>
<type>0</type>
<id>72</id>
<name>dct_coeff_table_3_ad</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>60</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>60</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>3</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>214</item>
<item>215</item>
<item>216</item>
</oprand_edges>
<opcode>getelementptr</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>33</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_55">
<Value>
<Obj>
<type>0</type>
<id>73</id>
<name>dct_coeff_table_3_lo</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>60</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>60</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>15</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>217</item>
</oprand_edges>
<opcode>load</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>1.29</m_delay>
<m_topoIndex>34</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_56">
<Value>
<Obj>
<type>0</type>
<id>74</id>
<name>sext_ln61_5</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>29</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>218</item>
</oprand_edges>
<opcode>sext</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>51</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_57">
<Value>
<Obj>
<type>0</type>
<id>75</id>
<name>buf_2d_in_3_load</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>219</item>
</oprand_edges>
<opcode>load</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.73</m_delay>
<m_topoIndex>35</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_58">
<Value>
<Obj>
<type>0</type>
<id>76</id>
<name>sext_ln61_6</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>29</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>220</item>
</oprand_edges>
<opcode>sext</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>52</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_59">
<Value>
<Obj>
<type>0</type>
<id>77</id>
<name>mul_ln61_3</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>dct_mul_mul_15s_16s_29_1_1_U11</rtlName>
<coreName/>
</Obj>
<bitwidth>29</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>221</item>
<item>222</item>
</oprand_edges>
<opcode>mul</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>2.84</m_delay>
<m_topoIndex>53</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_60">
<Value>
<Obj>
<type>0</type>
<id>78</id>
<name>dct_coeff_table_4_ad</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>60</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>60</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>3</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>223</item>
<item>224</item>
<item>225</item>
</oprand_edges>
<opcode>getelementptr</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>36</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_61">
<Value>
<Obj>
<type>0</type>
<id>79</id>
<name>dct_coeff_table_4_lo</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>60</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>60</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>15</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>226</item>
</oprand_edges>
<opcode>load</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>1.29</m_delay>
<m_topoIndex>37</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_62">
<Value>
<Obj>
<type>0</type>
<id>80</id>
<name>sext_ln61_7</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>29</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>227</item>
</oprand_edges>
<opcode>sext</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>71</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_63">
<Value>
<Obj>
<type>0</type>
<id>81</id>
<name>buf_2d_in_4_load</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>228</item>
</oprand_edges>
<opcode>load</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.73</m_delay>
<m_topoIndex>54</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_64">
<Value>
<Obj>
<type>0</type>
<id>82</id>
<name>sext_ln61_8</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>29</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>229</item>
</oprand_edges>
<opcode>sext</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>72</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_65">
<Value>
<Obj>
<type>0</type>
<id>83</id>
<name>mul_ln61_4</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>dct_mac_muladd_15s_16s_29s_29_1_1_U16</rtlName>
<coreName/>
</Obj>
<bitwidth>29</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>230</item>
<item>231</item>
</oprand_edges>
<opcode>mul</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.63</m_delay>
<m_topoIndex>73</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_66">
<Value>
<Obj>
<type>0</type>
<id>84</id>
<name>dct_coeff_table_5_ad</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>60</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>60</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>3</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>232</item>
<item>233</item>
<item>234</item>
</oprand_edges>
<opcode>getelementptr</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>38</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_67">
<Value>
<Obj>
<type>0</type>
<id>85</id>
<name>dct_coeff_table_5_lo</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>60</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>60</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>15</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>235</item>
</oprand_edges>
<opcode>load</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>1.29</m_delay>
<m_topoIndex>39</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_68">
<Value>
<Obj>
<type>0</type>
<id>86</id>
<name>sext_ln61_9</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>29</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>236</item>
</oprand_edges>
<opcode>sext</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>55</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_69">
<Value>
<Obj>
<type>0</type>
<id>87</id>
<name>buf_2d_in_5_load</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>237</item>
</oprand_edges>
<opcode>load</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.73</m_delay>
<m_topoIndex>40</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_70">
<Value>
<Obj>
<type>0</type>
<id>88</id>
<name>sext_ln61_10</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>29</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>238</item>
</oprand_edges>
<opcode>sext</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>56</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_71">
<Value>
<Obj>
<type>0</type>
<id>89</id>
<name>mul_ln61_5</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>dct_mul_mul_15s_16s_29_1_1_U12</rtlName>
<coreName/>
</Obj>
<bitwidth>29</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>239</item>
<item>240</item>
</oprand_edges>
<opcode>mul</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>2.84</m_delay>
<m_topoIndex>57</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_72">
<Value>
<Obj>
<type>0</type>
<id>90</id>
<name>dct_coeff_table_6_ad</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>60</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>60</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>3</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>241</item>
<item>242</item>
<item>243</item>
</oprand_edges>
<opcode>getelementptr</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>41</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_73">
<Value>
<Obj>
<type>0</type>
<id>91</id>
<name>dct_coeff_table_6_lo</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>60</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>60</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>15</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>244</item>
</oprand_edges>
<opcode>load</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>1.29</m_delay>
<m_topoIndex>42</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_74">
<Value>
<Obj>
<type>0</type>
<id>92</id>
<name>sext_ln61_11</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>29</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>245</item>
</oprand_edges>
<opcode>sext</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>74</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_75">
<Value>
<Obj>
<type>0</type>
<id>93</id>
<name>buf_2d_in_6_load</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>246</item>
</oprand_edges>
<opcode>load</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.73</m_delay>
<m_topoIndex>58</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_76">
<Value>
<Obj>
<type>0</type>
<id>94</id>
<name>sext_ln61_12</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>29</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>247</item>
</oprand_edges>
<opcode>sext</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>75</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_77">
<Value>
<Obj>
<type>0</type>
<id>95</id>
<name>mul_ln61_6</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>dct_mac_muladd_15s_16s_29s_29_1_1_U17</rtlName>
<coreName/>
</Obj>
<bitwidth>29</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>248</item>
<item>249</item>
</oprand_edges>
<opcode>mul</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.63</m_delay>
<m_topoIndex>76</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_78">
<Value>
<Obj>
<type>0</type>
<id>96</id>
<name>dct_coeff_table_7_ad</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>60</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>60</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>3</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>250</item>
<item>251</item>
<item>252</item>
</oprand_edges>
<opcode>getelementptr</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>43</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_79">
<Value>
<Obj>
<type>0</type>
<id>97</id>
<name>dct_coeff_table_7_lo</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>60</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>60</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>15</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>253</item>
</oprand_edges>
<opcode>load</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>1.29</m_delay>
<m_topoIndex>44</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_80">
<Value>
<Obj>
<type>0</type>
<id>98</id>
<name>sext_ln61_13</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>29</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>254</item>
</oprand_edges>
<opcode>sext</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>59</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_81">
<Value>
<Obj>
<type>0</type>
<id>99</id>
<name>buf_2d_in_7_load</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>255</item>
</oprand_edges>
<opcode>load</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.73</m_delay>
<m_topoIndex>45</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_82">
<Value>
<Obj>
<type>0</type>
<id>100</id>
<name>sext_ln61_14</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>29</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>256</item>
</oprand_edges>
<opcode>sext</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>60</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_83">
<Value>
<Obj>
<type>0</type>
<id>101</id>
<name>mul_ln61_7</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>dct_mac_muladd_15s_16s_14ns_29_1_1_U13</rtlName>
<coreName/>
</Obj>
<bitwidth>29</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>257</item>
<item>258</item>
</oprand_edges>
<opcode>mul</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.63</m_delay>
<m_topoIndex>61</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_84">
<Value>
<Obj>
<type>0</type>
<id>102</id>
<name>add_ln63</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>63</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>63</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>dct_mac_muladd_14ns_16s_29s_29_1_1_U14</rtlName>
<coreName/>
</Obj>
<bitwidth>29</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>259</item>
<item>260</item>
</oprand_edges>
<opcode>add</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>2.20</m_delay>
<m_topoIndex>77</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_85">
<Value>
<Obj>
<type>0</type>
<id>103</id>
<name>add_ln63_1</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>63</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>63</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>dct_mac_muladd_15s_16s_29s_29_1_1_U15</rtlName>
<coreName/>
</Obj>
<bitwidth>29</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>261</item>
<item>262</item>
</oprand_edges>
<opcode>add</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>2.20</m_delay>
<m_topoIndex>78</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_86">
<Value>
<Obj>
<type>0</type>
<id>104</id>
<name>add_ln63_2</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>63</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>63</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>add_ln63_2_fu_446_p2</rtlName>
<coreName/>
</Obj>
<bitwidth>29</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>263</item>
<item>264</item>
</oprand_edges>
<opcode>add</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>1.13</m_delay>
<m_topoIndex>79</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_87">
<Value>
<Obj>
<type>0</type>
<id>105</id>
<name>add_ln63_3</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>63</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>63</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>dct_mac_muladd_15s_16s_29s_29_1_1_U16</rtlName>
<coreName/>
</Obj>
<bitwidth>29</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>265</item>
<item>266</item>
</oprand_edges>
<opcode>add</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>2.20</m_delay>
<m_topoIndex>80</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_88">
<Value>
<Obj>
<type>0</type>
<id>106</id>
<name>add_ln63_4</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>63</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>63</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>dct_mac_muladd_15s_16s_14ns_29_1_1_U13</rtlName>
<coreName/>
</Obj>
<bitwidth>29</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>267</item>
<item>269</item>
</oprand_edges>
<opcode>add</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>2.20</m_delay>
<m_topoIndex>62</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_89">
<Value>
<Obj>
<type>0</type>
<id>107</id>
<name>add_ln63_5</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>63</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>63</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>dct_mac_muladd_15s_16s_29s_29_1_1_U17</rtlName>
<coreName/>
</Obj>
<bitwidth>29</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>270</item>
<item>271</item>
</oprand_edges>
<opcode>add</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>2.20</m_delay>
<m_topoIndex>81</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_90">
<Value>
<Obj>
<type>0</type>
<id>108</id>
<name>add_ln63_6</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>63</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>63</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>add_ln63_6_fu_450_p2</rtlName>
<coreName/>
</Obj>
<bitwidth>29</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>272</item>
<item>273</item>
</oprand_edges>
<opcode>add</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>82</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_91">
<Value>
<Obj>
<type>0</type>
<id>109</id>
<name>add_ln63_7</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>63</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>63</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>add_ln63_7_fu_454_p2</rtlName>
<coreName/>
</Obj>
<bitwidth>29</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>274</item>
<item>275</item>
</oprand_edges>
<opcode>add</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.89</m_delay>
<m_topoIndex>83</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_92">
<Value>
<Obj>
<type>0</type>
<id>110</id>
<name>trunc_ln</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>63</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>63</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>row_outbuf_i_d0</rtlName>
<coreName/>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<oprand_edges>
<count>4</count>
<item_version>0</item_version>
<item>277</item>
<item>278</item>
<item>280</item>
<item>282</item>
</oprand_edges>
<opcode>partselect</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>84</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_93">
<Value>
<Obj>
<type>0</type>
<id>111</id>
<name>row_outbuf_i_addr_write_ln63</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>63</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>63</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>283</item>
<item>284</item>
</oprand_edges>
<opcode>store</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>1.29</m_delay>
<m_topoIndex>85</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_94">
<Value>
<Obj>
<type>0</type>
<id>113</id>
<name>_ln55</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>55</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct</second>
</first>
<second>130</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>55</second>
</item>
<item>
<first>
<first>dct.cpp</first>
<second>dct_2d</second>
</first>
<second>77</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>285</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>86</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_95">
<Value>
<Obj>
<type>0</type>
<id>115</id>
<name>_ln0</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>120</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>87</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_96">
<Value>
<Obj>
<type>0</type>
<id>117</id>
<name>_ln0</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>0</count>
<item_version>0</item_version>
</oprand_edges>
<opcode>ret</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>18</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
</nodes>
<consts class_id="15" tracking_level="0" version="0">
<count>8</count>
<item_version>0</item_version>
<item class_id="16" tracking_level="1" version="0" object_id="_97">
<Value>
<Obj>
<type>2</type>
<id>121</id>
<name>empty</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>4</bitwidth>
</Value>
<const_type>0</const_type>
<content>0</content>
</item>
<item class_id_reference="16" object_id="_98">
<Value>
<Obj>
<type>2</type>
<id>127</id>
<name>empty</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>4</bitwidth>
</Value>
<const_type>0</const_type>
<content>8</content>
</item>
<item class_id_reference="16" object_id="_99">
<Value>
<Obj>
<type>2</type>
<id>130</id>
<name>empty</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>4</bitwidth>
</Value>
<const_type>0</const_type>
<content>1</content>
</item>
<item class_id_reference="16" object_id="_100">
<Value>
<Obj>
<type>2</type>
<id>139</id>
<name>empty</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>3</bitwidth>
</Value>
<const_type>0</const_type>
<content>0</content>
</item>
<item class_id_reference="16" object_id="_101">
<Value>
<Obj>
<type>2</type>
<id>143</id>
<name>empty</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>64</bitwidth>
</Value>
<const_type>0</const_type>
<content>0</content>
</item>
<item class_id_reference="16" object_id="_102">
<Value>
<Obj>
<type>2</type>
<id>268</id>
<name>empty</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>29</bitwidth>
</Value>
<const_type>0</const_type>
<content>4096</content>
</item>
<item class_id_reference="16" object_id="_103">
<Value>
<Obj>
<type>2</type>
<id>279</id>
<name>empty</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<const_type>0</const_type>
<content>13</content>
</item>
<item class_id_reference="16" object_id="_104">
<Value>
<Obj>
<type>2</type>
<id>281</id>
<name>empty</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<const_type>0</const_type>
<content>28</content>
</item>
</consts>
<blocks class_id="17" tracking_level="0" version="0">
<count>7</count>
<item_version>0</item_version>
<item class_id="18" tracking_level="1" version="0" object_id="_105">
<Obj>
<type>3</type>
<id>19</id>
<name>newFuncRoot</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<node_objs>
<count>1</count>
<item_version>0</item_version>
<item>18</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_106">
<Obj>
<type>3</type>
<id>25</id>
<name>dct_1d.exit</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<node_objs>
<count>4</count>
<item_version>0</item_version>
<item>20</item>
<item>21</item>
<item>23</item>
<item>24</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_107">
<Obj>
<type>3</type>
<id>39</id>
<name/>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<node_objs>
<count>12</count>
<item_version>0</item_version>
<item>27</item>
<item>28</item>
<item>29</item>
<item>30</item>
<item>31</item>
<item>32</item>
<item>33</item>
<item>34</item>
<item>35</item>
<item>36</item>
<item>37</item>
<item>38</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_108">
<Obj>
<type>3</type>
<id>45</id>
<name/>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<node_objs>
<count>4</count>
<item_version>0</item_version>
<item>40</item>
<item>41</item>
<item>43</item>
<item>44</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_109">
<Obj>
<type>3</type>
<id>114</id>
<name>DCT_Outer_Loop</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<node_objs>
<count>64</count>
<item_version>0</item_version>
<item>49</item>
<item>50</item>
<item>51</item>
<item>52</item>
<item>53</item>
<item>54</item>
<item>55</item>
<item>56</item>
<item>57</item>
<item>58</item>
<item>59</item>
<item>60</item>
<item>61</item>
<item>62</item>
<item>63</item>
<item>64</item>
<item>65</item>
<item>66</item>
<item>67</item>
<item>68</item>
<item>69</item>
<item>70</item>
<item>71</item>
<item>72</item>
<item>73</item>
<item>74</item>
<item>75</item>
<item>76</item>
<item>77</item>
<item>78</item>
<item>79</item>
<item>80</item>
<item>81</item>
<item>82</item>
<item>83</item>
<item>84</item>
<item>85</item>
<item>86</item>
<item>87</item>
<item>88</item>
<item>89</item>
<item>90</item>
<item>91</item>
<item>92</item>
<item>93</item>
<item>94</item>
<item>95</item>
<item>96</item>
<item>97</item>
<item>98</item>
<item>99</item>
<item>100</item>
<item>101</item>
<item>102</item>
<item>103</item>
<item>104</item>
<item>105</item>
<item>106</item>
<item>107</item>
<item>108</item>
<item>109</item>
<item>110</item>
<item>111</item>
<item>113</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_110">
<Obj>
<type>3</type>
<id>116</id>
<name>dct_1d.exit.loopexit</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<node_objs>
<count>1</count>
<item_version>0</item_version>
<item>115</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_111">
<Obj>
<type>3</type>
<id>118</id>
<name>.preheader2.i.exitStub</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<node_objs>
<count>1</count>
<item_version>0</item_version>
<item>117</item>
</node_objs>
</item>
</blocks>
<edges class_id="19" tracking_level="0" version="0">
<count>163</count>
<item_version>0</item_version>
<item class_id="20" tracking_level="1" version="0" object_id="_112">
<id>119</id>
<edge_type>2</edge_type>
<source_obj>25</source_obj>
<sink_obj>18</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_113">
<id>120</id>
<edge_type>2</edge_type>
<source_obj>25</source_obj>
<sink_obj>115</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_114">
<id>122</id>
<edge_type>1</edge_type>
<source_obj>121</source_obj>
<sink_obj>20</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_115">
<id>123</id>
<edge_type>2</edge_type>
<source_obj>19</source_obj>
<sink_obj>20</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_116">
<id>124</id>
<edge_type>1</edge_type>
<source_obj>23</source_obj>
<sink_obj>20</sink_obj>
<is_back_edge>1</is_back_edge>
</item>
<item class_id_reference="20" object_id="_117">
<id>125</id>
<edge_type>2</edge_type>
<source_obj>116</source_obj>
<sink_obj>20</sink_obj>
<is_back_edge>1</is_back_edge>
</item>
<item class_id_reference="20" object_id="_118">
<id>126</id>
<edge_type>1</edge_type>
<source_obj>20</source_obj>
<sink_obj>21</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_119">
<id>128</id>
<edge_type>1</edge_type>
<source_obj>127</source_obj>
<sink_obj>21</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_120">
<id>129</id>
<edge_type>1</edge_type>
<source_obj>20</source_obj>
<sink_obj>23</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_121">
<id>131</id>
<edge_type>1</edge_type>
<source_obj>130</source_obj>
<sink_obj>23</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_122">
<id>132</id>
<edge_type>1</edge_type>
<source_obj>21</source_obj>
<sink_obj>24</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_123">
<id>133</id>
<edge_type>2</edge_type>
<source_obj>39</source_obj>
<sink_obj>24</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_124">
<id>134</id>
<edge_type>2</edge_type>
<source_obj>118</source_obj>
<sink_obj>24</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_125">
<id>135</id>
<edge_type>1</edge_type>
<source_obj>20</source_obj>
<sink_obj>27</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_126">
<id>138</id>
<edge_type>1</edge_type>
<source_obj>20</source_obj>
<sink_obj>28</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_127">
<id>140</id>
<edge_type>1</edge_type>
<source_obj>139</source_obj>
<sink_obj>28</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_128">
<id>141</id>
<edge_type>1</edge_type>
<source_obj>28</source_obj>
<sink_obj>29</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_129">
<id>142</id>
<edge_type>1</edge_type>
<source_obj>1</source_obj>
<sink_obj>30</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_130">
<id>144</id>
<edge_type>1</edge_type>
<source_obj>143</source_obj>
<sink_obj>30</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_131">
<id>145</id>
<edge_type>1</edge_type>
<source_obj>27</source_obj>
<sink_obj>30</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_132">
<id>146</id>
<edge_type>1</edge_type>
<source_obj>2</source_obj>
<sink_obj>31</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_133">
<id>147</id>
<edge_type>1</edge_type>
<source_obj>143</source_obj>
<sink_obj>31</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_134">
<id>148</id>
<edge_type>1</edge_type>
<source_obj>27</source_obj>
<sink_obj>31</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_135">
<id>149</id>
<edge_type>1</edge_type>
<source_obj>3</source_obj>
<sink_obj>32</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_136">
<id>150</id>
<edge_type>1</edge_type>
<source_obj>143</source_obj>
<sink_obj>32</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_137">
<id>151</id>
<edge_type>1</edge_type>
<source_obj>27</source_obj>
<sink_obj>32</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_138">
<id>152</id>
<edge_type>1</edge_type>
<source_obj>4</source_obj>
<sink_obj>33</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_139">
<id>153</id>
<edge_type>1</edge_type>
<source_obj>143</source_obj>
<sink_obj>33</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_140">
<id>154</id>
<edge_type>1</edge_type>
<source_obj>27</source_obj>
<sink_obj>33</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_141">
<id>155</id>
<edge_type>1</edge_type>
<source_obj>5</source_obj>
<sink_obj>34</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_142">
<id>156</id>
<edge_type>1</edge_type>
<source_obj>143</source_obj>
<sink_obj>34</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_143">
<id>157</id>
<edge_type>1</edge_type>
<source_obj>27</source_obj>
<sink_obj>34</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_144">
<id>158</id>
<edge_type>1</edge_type>
<source_obj>6</source_obj>
<sink_obj>35</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_145">
<id>159</id>
<edge_type>1</edge_type>
<source_obj>143</source_obj>
<sink_obj>35</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_146">
<id>160</id>
<edge_type>1</edge_type>
<source_obj>27</source_obj>
<sink_obj>35</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_147">
<id>161</id>
<edge_type>1</edge_type>
<source_obj>7</source_obj>
<sink_obj>36</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_148">
<id>162</id>
<edge_type>1</edge_type>
<source_obj>143</source_obj>
<sink_obj>36</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_149">
<id>163</id>
<edge_type>1</edge_type>
<source_obj>27</source_obj>
<sink_obj>36</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_150">
<id>164</id>
<edge_type>1</edge_type>
<source_obj>8</source_obj>
<sink_obj>37</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_151">
<id>165</id>
<edge_type>1</edge_type>
<source_obj>143</source_obj>
<sink_obj>37</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_152">
<id>166</id>
<edge_type>1</edge_type>
<source_obj>27</source_obj>
<sink_obj>37</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_153">
<id>167</id>
<edge_type>2</edge_type>
<source_obj>45</source_obj>
<sink_obj>38</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_154">
<id>168</id>
<edge_type>1</edge_type>
<source_obj>121</source_obj>
<sink_obj>40</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_155">
<id>169</id>
<edge_type>2</edge_type>
<source_obj>39</source_obj>
<sink_obj>40</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_156">
<id>170</id>
<edge_type>1</edge_type>
<source_obj>43</source_obj>
<sink_obj>40</sink_obj>
<is_back_edge>1</is_back_edge>
</item>
<item class_id_reference="20" object_id="_157">
<id>171</id>
<edge_type>2</edge_type>
<source_obj>114</source_obj>
<sink_obj>40</sink_obj>
<is_back_edge>1</is_back_edge>
</item>
<item class_id_reference="20" object_id="_158">
<id>172</id>
<edge_type>1</edge_type>
<source_obj>40</source_obj>
<sink_obj>41</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_159">
<id>173</id>
<edge_type>1</edge_type>
<source_obj>127</source_obj>
<sink_obj>41</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_160">
<id>174</id>
<edge_type>1</edge_type>
<source_obj>40</source_obj>
<sink_obj>43</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_161">
<id>175</id>
<edge_type>1</edge_type>
<source_obj>130</source_obj>
<sink_obj>43</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_162">
<id>176</id>
<edge_type>1</edge_type>
<source_obj>41</source_obj>
<sink_obj>44</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_163">
<id>177</id>
<edge_type>2</edge_type>
<source_obj>114</source_obj>
<sink_obj>44</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_164">
<id>178</id>
<edge_type>2</edge_type>
<source_obj>116</source_obj>
<sink_obj>44</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_165">
<id>179</id>
<edge_type>1</edge_type>
<source_obj>40</source_obj>
<sink_obj>49</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_166">
<id>180</id>
<edge_type>1</edge_type>
<source_obj>40</source_obj>
<sink_obj>50</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_167">
<id>181</id>
<edge_type>1</edge_type>
<source_obj>29</source_obj>
<sink_obj>51</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_168">
<id>182</id>
<edge_type>1</edge_type>
<source_obj>50</source_obj>
<sink_obj>51</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_169">
<id>183</id>
<edge_type>1</edge_type>
<source_obj>51</source_obj>
<sink_obj>52</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_170">
<id>184</id>
<edge_type>1</edge_type>
<source_obj>9</source_obj>
<sink_obj>53</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_171">
<id>185</id>
<edge_type>1</edge_type>
<source_obj>143</source_obj>
<sink_obj>53</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_172">
<id>186</id>
<edge_type>1</edge_type>
<source_obj>52</source_obj>
<sink_obj>53</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_173">
<id>187</id>
<edge_type>1</edge_type>
<source_obj>10</source_obj>
<sink_obj>54</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_174">
<id>188</id>
<edge_type>1</edge_type>
<source_obj>143</source_obj>
<sink_obj>54</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_175">
<id>189</id>
<edge_type>1</edge_type>
<source_obj>49</source_obj>
<sink_obj>54</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_176">
<id>190</id>
<edge_type>1</edge_type>
<source_obj>54</source_obj>
<sink_obj>55</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_177">
<id>191</id>
<edge_type>1</edge_type>
<source_obj>55</source_obj>
<sink_obj>56</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_178">
<id>192</id>
<edge_type>1</edge_type>
<source_obj>30</source_obj>
<sink_obj>57</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_179">
<id>193</id>
<edge_type>1</edge_type>
<source_obj>57</source_obj>
<sink_obj>58</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_180">
<id>194</id>
<edge_type>1</edge_type>
<source_obj>56</source_obj>
<sink_obj>59</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_181">
<id>195</id>
<edge_type>1</edge_type>
<source_obj>58</source_obj>
<sink_obj>59</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_182">
<id>196</id>
<edge_type>1</edge_type>
<source_obj>11</source_obj>
<sink_obj>60</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_183">
<id>197</id>
<edge_type>1</edge_type>
<source_obj>143</source_obj>
<sink_obj>60</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_184">
<id>198</id>
<edge_type>1</edge_type>
<source_obj>49</source_obj>
<sink_obj>60</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_185">
<id>199</id>
<edge_type>1</edge_type>
<source_obj>60</source_obj>
<sink_obj>61</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_186">
<id>200</id>
<edge_type>1</edge_type>
<source_obj>61</source_obj>
<sink_obj>62</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_187">
<id>201</id>
<edge_type>1</edge_type>
<source_obj>31</source_obj>
<sink_obj>63</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_188">
<id>202</id>
<edge_type>1</edge_type>
<source_obj>63</source_obj>
<sink_obj>64</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_189">
<id>203</id>
<edge_type>1</edge_type>
<source_obj>62</source_obj>
<sink_obj>65</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_190">
<id>204</id>
<edge_type>1</edge_type>
<source_obj>64</source_obj>
<sink_obj>65</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_191">
<id>205</id>
<edge_type>1</edge_type>
<source_obj>12</source_obj>
<sink_obj>66</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_192">
<id>206</id>
<edge_type>1</edge_type>
<source_obj>143</source_obj>
<sink_obj>66</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_193">
<id>207</id>
<edge_type>1</edge_type>
<source_obj>49</source_obj>
<sink_obj>66</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_194">
<id>208</id>
<edge_type>1</edge_type>
<source_obj>66</source_obj>
<sink_obj>67</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_195">
<id>209</id>
<edge_type>1</edge_type>
<source_obj>67</source_obj>
<sink_obj>68</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_196">
<id>210</id>
<edge_type>1</edge_type>
<source_obj>32</source_obj>
<sink_obj>69</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_197">
<id>211</id>
<edge_type>1</edge_type>
<source_obj>69</source_obj>
<sink_obj>70</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_198">
<id>212</id>
<edge_type>1</edge_type>
<source_obj>68</source_obj>
<sink_obj>71</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_199">
<id>213</id>
<edge_type>1</edge_type>
<source_obj>70</source_obj>
<sink_obj>71</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_200">
<id>214</id>
<edge_type>1</edge_type>
<source_obj>13</source_obj>
<sink_obj>72</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_201">
<id>215</id>
<edge_type>1</edge_type>
<source_obj>143</source_obj>
<sink_obj>72</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_202">
<id>216</id>
<edge_type>1</edge_type>
<source_obj>49</source_obj>
<sink_obj>72</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_203">
<id>217</id>
<edge_type>1</edge_type>
<source_obj>72</source_obj>
<sink_obj>73</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_204">
<id>218</id>
<edge_type>1</edge_type>
<source_obj>73</source_obj>
<sink_obj>74</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_205">
<id>219</id>
<edge_type>1</edge_type>
<source_obj>33</source_obj>
<sink_obj>75</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_206">
<id>220</id>
<edge_type>1</edge_type>
<source_obj>75</source_obj>
<sink_obj>76</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_207">
<id>221</id>
<edge_type>1</edge_type>
<source_obj>74</source_obj>
<sink_obj>77</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_208">
<id>222</id>
<edge_type>1</edge_type>
<source_obj>76</source_obj>
<sink_obj>77</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_209">
<id>223</id>
<edge_type>1</edge_type>
<source_obj>14</source_obj>
<sink_obj>78</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_210">
<id>224</id>
<edge_type>1</edge_type>
<source_obj>143</source_obj>
<sink_obj>78</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_211">
<id>225</id>
<edge_type>1</edge_type>
<source_obj>49</source_obj>
<sink_obj>78</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_212">
<id>226</id>
<edge_type>1</edge_type>
<source_obj>78</source_obj>
<sink_obj>79</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_213">
<id>227</id>
<edge_type>1</edge_type>
<source_obj>79</source_obj>
<sink_obj>80</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_214">
<id>228</id>
<edge_type>1</edge_type>
<source_obj>34</source_obj>
<sink_obj>81</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_215">
<id>229</id>
<edge_type>1</edge_type>
<source_obj>81</source_obj>
<sink_obj>82</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_216">
<id>230</id>
<edge_type>1</edge_type>
<source_obj>80</source_obj>
<sink_obj>83</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_217">
<id>231</id>
<edge_type>1</edge_type>
<source_obj>82</source_obj>
<sink_obj>83</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_218">
<id>232</id>
<edge_type>1</edge_type>
<source_obj>15</source_obj>
<sink_obj>84</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_219">
<id>233</id>
<edge_type>1</edge_type>
<source_obj>143</source_obj>
<sink_obj>84</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_220">
<id>234</id>
<edge_type>1</edge_type>
<source_obj>49</source_obj>
<sink_obj>84</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_221">
<id>235</id>
<edge_type>1</edge_type>
<source_obj>84</source_obj>
<sink_obj>85</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_222">
<id>236</id>
<edge_type>1</edge_type>
<source_obj>85</source_obj>
<sink_obj>86</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_223">
<id>237</id>
<edge_type>1</edge_type>
<source_obj>35</source_obj>
<sink_obj>87</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_224">
<id>238</id>
<edge_type>1</edge_type>
<source_obj>87</source_obj>
<sink_obj>88</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_225">
<id>239</id>
<edge_type>1</edge_type>
<source_obj>86</source_obj>
<sink_obj>89</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_226">
<id>240</id>
<edge_type>1</edge_type>
<source_obj>88</source_obj>
<sink_obj>89</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_227">
<id>241</id>
<edge_type>1</edge_type>
<source_obj>16</source_obj>
<sink_obj>90</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_228">
<id>242</id>
<edge_type>1</edge_type>
<source_obj>143</source_obj>
<sink_obj>90</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_229">
<id>243</id>
<edge_type>1</edge_type>
<source_obj>49</source_obj>
<sink_obj>90</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_230">
<id>244</id>
<edge_type>1</edge_type>
<source_obj>90</source_obj>
<sink_obj>91</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_231">
<id>245</id>
<edge_type>1</edge_type>
<source_obj>91</source_obj>
<sink_obj>92</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_232">
<id>246</id>
<edge_type>1</edge_type>
<source_obj>36</source_obj>
<sink_obj>93</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_233">
<id>247</id>
<edge_type>1</edge_type>
<source_obj>93</source_obj>
<sink_obj>94</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_234">
<id>248</id>
<edge_type>1</edge_type>
<source_obj>92</source_obj>
<sink_obj>95</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_235">
<id>249</id>
<edge_type>1</edge_type>
<source_obj>94</source_obj>
<sink_obj>95</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_236">
<id>250</id>
<edge_type>1</edge_type>
<source_obj>17</source_obj>
<sink_obj>96</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_237">
<id>251</id>
<edge_type>1</edge_type>
<source_obj>143</source_obj>
<sink_obj>96</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_238">
<id>252</id>
<edge_type>1</edge_type>
<source_obj>49</source_obj>
<sink_obj>96</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_239">
<id>253</id>
<edge_type>1</edge_type>
<source_obj>96</source_obj>
<sink_obj>97</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_240">
<id>254</id>
<edge_type>1</edge_type>
<source_obj>97</source_obj>
<sink_obj>98</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_241">
<id>255</id>
<edge_type>1</edge_type>
<source_obj>37</source_obj>
<sink_obj>99</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_242">
<id>256</id>
<edge_type>1</edge_type>
<source_obj>99</source_obj>
<sink_obj>100</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_243">
<id>257</id>
<edge_type>1</edge_type>
<source_obj>98</source_obj>
<sink_obj>101</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_244">
<id>258</id>
<edge_type>1</edge_type>
<source_obj>100</source_obj>
<sink_obj>101</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_245">
<id>259</id>
<edge_type>1</edge_type>
<source_obj>65</source_obj>
<sink_obj>102</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_246">
<id>260</id>
<edge_type>1</edge_type>
<source_obj>59</source_obj>
<sink_obj>102</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_247">
<id>261</id>
<edge_type>1</edge_type>
<source_obj>77</source_obj>
<sink_obj>103</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_248">
<id>262</id>
<edge_type>1</edge_type>
<source_obj>71</source_obj>
<sink_obj>103</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_249">
<id>263</id>
<edge_type>1</edge_type>
<source_obj>102</source_obj>
<sink_obj>104</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_250">
<id>264</id>
<edge_type>1</edge_type>
<source_obj>103</source_obj>
<sink_obj>104</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_251">
<id>265</id>
<edge_type>1</edge_type>
<source_obj>89</source_obj>
<sink_obj>105</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_252">
<id>266</id>
<edge_type>1</edge_type>
<source_obj>83</source_obj>
<sink_obj>105</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_253">
<id>267</id>
<edge_type>1</edge_type>
<source_obj>101</source_obj>
<sink_obj>106</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_254">
<id>269</id>
<edge_type>1</edge_type>
<source_obj>268</source_obj>
<sink_obj>106</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_255">
<id>270</id>
<edge_type>1</edge_type>
<source_obj>95</source_obj>
<sink_obj>107</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_256">
<id>271</id>
<edge_type>1</edge_type>
<source_obj>106</source_obj>
<sink_obj>107</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_257">
<id>272</id>
<edge_type>1</edge_type>
<source_obj>105</source_obj>
<sink_obj>108</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_258">
<id>273</id>
<edge_type>1</edge_type>
<source_obj>107</source_obj>
<sink_obj>108</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_259">
<id>274</id>
<edge_type>1</edge_type>
<source_obj>104</source_obj>
<sink_obj>109</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_260">
<id>275</id>
<edge_type>1</edge_type>
<source_obj>108</source_obj>
<sink_obj>109</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_261">
<id>278</id>
<edge_type>1</edge_type>
<source_obj>109</source_obj>
<sink_obj>110</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_262">
<id>280</id>
<edge_type>1</edge_type>
<source_obj>279</source_obj>
<sink_obj>110</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_263">
<id>282</id>
<edge_type>1</edge_type>
<source_obj>281</source_obj>
<sink_obj>110</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_264">
<id>283</id>
<edge_type>1</edge_type>
<source_obj>110</source_obj>
<sink_obj>111</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_265">
<id>284</id>
<edge_type>1</edge_type>
<source_obj>53</source_obj>
<sink_obj>111</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_266">
<id>285</id>
<edge_type>2</edge_type>
<source_obj>45</source_obj>
<sink_obj>113</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_267">
<id>321</id>
<edge_type>2</edge_type>
<source_obj>19</source_obj>
<sink_obj>25</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_268">
<id>322</id>
<edge_type>2</edge_type>
<source_obj>25</source_obj>
<sink_obj>118</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_269">
<id>323</id>
<edge_type>2</edge_type>
<source_obj>25</source_obj>
<sink_obj>39</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_270">
<id>324</id>
<edge_type>2</edge_type>
<source_obj>39</source_obj>
<sink_obj>45</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_271">
<id>325</id>
<edge_type>2</edge_type>
<source_obj>45</source_obj>
<sink_obj>116</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_272">
<id>326</id>
<edge_type>2</edge_type>
<source_obj>45</source_obj>
<sink_obj>114</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_273">
<id>327</id>
<edge_type>2</edge_type>
<source_obj>114</source_obj>
<sink_obj>45</sink_obj>
<is_back_edge>1</is_back_edge>
</item>
<item class_id_reference="20" object_id="_274">
<id>328</id>
<edge_type>2</edge_type>
<source_obj>116</source_obj>
<sink_obj>25</sink_obj>
<is_back_edge>1</is_back_edge>
</item>
</edges>
</cdfg>
<cdfg_regions class_id="21" tracking_level="0" version="0">
<count>7</count>
<item_version>0</item_version>
<item class_id="22" tracking_level="1" version="0" object_id="_275">
<mId>1</mId>
<mTag>Loop_Row_DCT_Loop_pr</mTag>
<mType>0</mType>
<sub_regions>
<count>3</count>
<item_version>0</item_version>
<item>2</item>
<item>3</item>
<item>7</item>
</sub_regions>
<basic_blocks>
<count>0</count>
<item_version>0</item_version>
</basic_blocks>
<mII>-1</mII>
<mDepth>-1</mDepth>
<mMinTripCount>-1</mMinTripCount>
<mMaxTripCount>-1</mMaxTripCount>
<mMinLatency>97</mMinLatency>
<mMaxLatency>97</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"/>
</item>
<item class_id_reference="22" object_id="_276">
<mId>2</mId>
<mTag>Entry</mTag>
<mType>0</mType>
<sub_regions>
<count>0</count>
<item_version>0</item_version>
</sub_regions>
<basic_blocks>
<count>1</count>
<item_version>0</item_version>
<item>19</item>
</basic_blocks>
<mII>-1</mII>
<mDepth>-1</mDepth>
<mMinTripCount>-1</mMinTripCount>
<mMaxTripCount>-1</mMaxTripCount>
<mMinLatency>0</mMinLatency>
<mMaxLatency>0</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"/>
</item>
<item class_id_reference="22" object_id="_277">
<mId>3</mId>
<mTag>Row_DCT_Loop</mTag>
<mType>1</mType>
<sub_regions>
<count>3</count>
<item_version>0</item_version>
<item>4</item>
<item>5</item>
<item>6</item>
</sub_regions>
<basic_blocks>
<count>0</count>
<item_version>0</item_version>
</basic_blocks>
<mII>-1</mII>
<mDepth>-1</mDepth>
<mMinTripCount>8</mMinTripCount>
<mMaxTripCount>8</mMaxTripCount>
<mMinLatency>96</mMinLatency>
<mMaxLatency>96</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"/>
</item>
<item class_id_reference="22" object_id="_278">
<mId>4</mId>
<mTag>Region 1</mTag>
<mType>0</mType>
<sub_regions>
<count>0</count>
<item_version>0</item_version>
</sub_regions>
<basic_blocks>
<count>2</count>
<item_version>0</item_version>
<item>25</item>
<item>39</item>
</basic_blocks>
<mII>-1</mII>
<mDepth>-1</mDepth>
<mMinTripCount>-1</mMinTripCount>
<mMaxTripCount>-1</mMaxTripCount>
<mMinLatency>0</mMinLatency>
<mMaxLatency>0</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"/>
</item>
<item class_id_reference="22" object_id="_279">
<mId>5</mId>
<mTag>DCT_Outer_Loop</mTag>
<mType>1</mType>
<sub_regions>
<count>0</count>
<item_version>0</item_version>
</sub_regions>
<basic_blocks>
<count>2</count>
<item_version>0</item_version>
<item>45</item>
<item>114</item>
</basic_blocks>
<mII>1</mII>
<mDepth>3</mDepth>
<mMinTripCount>8</mMinTripCount>
<mMaxTripCount>8</mMaxTripCount>
<mMinLatency>9</mMinLatency>
<mMaxLatency>9</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"/>
</item>
<item class_id_reference="22" object_id="_280">
<mId>6</mId>
<mTag>Region 2</mTag>
<mType>0</mType>
<sub_regions>
<count>0</count>
<item_version>0</item_version>
</sub_regions>
<basic_blocks>
<count>1</count>
<item_version>0</item_version>
<item>116</item>
</basic_blocks>
<mII>-1</mII>
<mDepth>-1</mDepth>
<mMinTripCount>-1</mMinTripCount>
<mMaxTripCount>-1</mMaxTripCount>
<mMinLatency>0</mMinLatency>
<mMaxLatency>0</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"/>
</item>
<item class_id_reference="22" object_id="_281">
<mId>7</mId>
<mTag>Return</mTag>
<mType>0</mType>
<sub_regions>
<count>0</count>
<item_version>0</item_version>
</sub_regions>
<basic_blocks>
<count>1</count>
<item_version>0</item_version>
<item>118</item>
</basic_blocks>
<mII>-1</mII>
<mDepth>-1</mDepth>
<mMinTripCount>-1</mMinTripCount>
<mMaxTripCount>-1</mMaxTripCount>
<mMinLatency>0</mMinLatency>
<mMaxLatency>0</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"/>
</item>
</cdfg_regions>
<fsm class_id="24" tracking_level="1" version="0" object_id="_282">
<states class_id="25" tracking_level="0" version="0">
<count>6</count>
<item_version>0</item_version>
<item class_id="26" tracking_level="1" version="0" object_id="_283">
<id>1</id>
<operations class_id="27" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="28" tracking_level="1" version="0" object_id="_284">
<id>18</id>
<stage>1</stage>
<latency>1</latency>
</item>
</operations>
</item>
<item class_id_reference="26" object_id="_285">
<id>2</id>
<operations>
<count>19</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_286">
<id>20</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_287">
<id>21</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_288">
<id>22</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_289">
<id>23</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_290">
<id>24</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_291">
<id>26</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_292">
<id>27</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_293">
<id>28</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_294">
<id>29</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_295">
<id>30</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_296">
<id>31</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_297">
<id>32</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_298">
<id>33</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_299">
<id>34</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_300">
<id>35</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_301">
<id>36</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_302">
<id>37</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_303">
<id>38</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_304">
<id>117</id>
<stage>1</stage>
<latency>1</latency>
</item>
</operations>
</item>
<item class_id_reference="26" object_id="_305">
<id>3</id>
<operations>
<count>28</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_306">
<id>40</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_307">
<id>41</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_308">
<id>42</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_309">
<id>43</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_310">
<id>44</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_311">
<id>49</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_312">
<id>50</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_313">
<id>51</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_314">
<id>54</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_315">
<id>55</id>
<stage>2</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_316">
<id>60</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_317">
<id>61</id>
<stage>2</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_318">
<id>63</id>
<stage>2</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_319">
<id>66</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_320">
<id>67</id>
<stage>2</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_321">
<id>72</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_322">
<id>73</id>
<stage>2</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_323">
<id>75</id>
<stage>2</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_324">
<id>78</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_325">
<id>79</id>
<stage>2</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_326">
<id>84</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_327">
<id>85</id>
<stage>2</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_328">
<id>87</id>
<stage>2</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_329">
<id>90</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_330">
<id>91</id>
<stage>2</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_331">
<id>96</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_332">
<id>97</id>
<stage>2</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_333">
<id>99</id>
<stage>2</stage>
<latency>2</latency>
</item>
</operations>
</item>
<item class_id_reference="26" object_id="_334">
<id>4</id>
<operations>
<count>29</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_335">
<id>55</id>
<stage>1</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_336">
<id>57</id>
<stage>2</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_337">
<id>61</id>
<stage>1</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_338">
<id>62</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_339">
<id>63</id>
<stage>1</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_340">
<id>64</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_341">
<id>65</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_342">
<id>67</id>
<stage>1</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_343">
<id>69</id>
<stage>2</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_344">
<id>73</id>
<stage>1</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_345">
<id>74</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_346">
<id>75</id>
<stage>1</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_347">
<id>76</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_348">
<id>77</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_349">
<id>79</id>
<stage>1</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_350">
<id>81</id>
<stage>2</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_351">
<id>85</id>
<stage>1</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_352">
<id>86</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_353">
<id>87</id>
<stage>1</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_354">
<id>88</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_355">
<id>89</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_356">
<id>91</id>
<stage>1</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_357">
<id>93</id>
<stage>2</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_358">
<id>97</id>
<stage>1</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_359">
<id>98</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_360">
<id>99</id>
<stage>1</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_361">
<id>100</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_362">
<id>101</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_363">
<id>106</id>
<stage>1</stage>
<latency>1</latency>
</item>
</operations>
</item>
<item class_id_reference="26" object_id="_364">
<id>5</id>
<operations>
<count>32</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_365">
<id>46</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_366">
<id>47</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_367">
<id>48</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_368">
<id>52</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_369">
<id>53</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_370">
<id>56</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_371">
<id>57</id>
<stage>1</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_372">
<id>58</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_373">
<id>59</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_374">
<id>68</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_375">
<id>69</id>
<stage>1</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_376">
<id>70</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_377">
<id>71</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_378">
<id>80</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_379">
<id>81</id>
<stage>1</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_380">
<id>82</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_381">
<id>83</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_382">
<id>92</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_383">
<id>93</id>
<stage>1</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_384">
<id>94</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_385">
<id>95</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_386">
<id>102</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_387">
<id>103</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_388">
<id>104</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_389">
<id>105</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_390">
<id>107</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_391">
<id>108</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_392">
<id>109</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_393">
<id>110</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_394">
<id>111</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_395">
<id>112</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_396">
<id>113</id>
<stage>1</stage>
<latency>1</latency>
</item>
</operations>
</item>
<item class_id_reference="26" object_id="_397">
<id>6</id>
<operations>
<count>1</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_398">
<id>115</id>
<stage>1</stage>
<latency>1</latency>
</item>
</operations>
</item>
</states>
<transitions class_id="29" tracking_level="0" version="0">
<count>7</count>
<item_version>0</item_version>
<item class_id="30" tracking_level="1" version="0" object_id="_399">
<inState>1</inState>
<outState>2</outState>
<condition class_id="31" tracking_level="0" version="0">
<id>-1</id>
<sop class_id="32" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="33" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</item>
</sop>
</condition>
</item>
<item class_id_reference="30" object_id="_400">
<inState>2</inState>
<outState>3</outState>
<condition>
<id>-1</id>
<sop>
<count>1</count>
<item_version>0</item_version>
<item>
<count>1</count>
<item_version>0</item_version>
<item class_id="34" tracking_level="0" version="0">
<first class_id="35" tracking_level="0" version="0">
<first>21</first>
<second>0</second>
</first>
<second>1</second>
</item>
</item>
</sop>
</condition>
</item>
<item class_id_reference="30" object_id="_401">
<inState>6</inState>
<outState>2</outState>
<condition>
<id>-1</id>
<sop>
<count>1</count>
<item_version>0</item_version>
<item>
<count>0</count>
<item_version>0</item_version>
</item>
</sop>
</condition>
</item>
<item class_id_reference="30" object_id="_402">
<inState>4</inState>
<outState>5</outState>
<condition>
<id>-1</id>
<sop>
<count>1</count>
<item_version>0</item_version>
<item>
<count>0</count>
<item_version>0</item_version>
</item>
</sop>
</condition>
</item>
<item class_id_reference="30" object_id="_403">
<inState>5</inState>
<outState>3</outState>
<condition>
<id>-1</id>
<sop>
<count>1</count>
<item_version>0</item_version>
<item>
<count>0</count>
<item_version>0</item_version>
</item>
</sop>
</condition>
</item>
<item class_id_reference="30" object_id="_404">
<inState>3</inState>
<outState>6</outState>
<condition>
<id>-1</id>
<sop>
<count>1</count>
<item_version>0</item_version>
<item>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>41</first>
<second>0</second>
</first>
<second>0</second>
</item>
</item>
</sop>
</condition>
</item>
<item class_id_reference="30" object_id="_405">
<inState>3</inState>
<outState>4</outState>
<condition>
<id>-1</id>
<sop>
<count>1</count>
<item_version>0</item_version>
<item>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>41</first>
<second>0</second>
</first>
<second>1</second>
</item>
</item>
</sop>
</condition>
</item>
</transitions>
</fsm>
<res class_id="36" tracking_level="1" version="0" object_id="_406">
<dp_component_resource class_id="37" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</dp_component_resource>
<dp_expression_resource>
<count>11</count>
<item_version>0</item_version>
<item class_id="38" tracking_level="0" version="0">
<first>add_ln63_2_fu_446_p2 ( + ) </first>
<second class_id="39" tracking_level="0" version="0">
<count>4</count>
<item_version>0</item_version>
<item class_id="40" tracking_level="0" version="0">
<first>(0P0)</first>
<second>29</second>
</item>
<item>
<first>(1P1)</first>
<second>29</second>
</item>
<item>
<first>FF</first>
<second>0</second>
</item>
<item>
<first>LUT</first>
<second>36</second>
</item>
</second>
</item>
<item>
<first>add_ln63_6_fu_450_p2 ( + ) </first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0P0)</first>
<second>29</second>
</item>
<item>
<first>(1P1)</first>
<second>29</second>
</item>
<item>
<first>FF</first>
<second>0</second>
</item>
<item>
<first>LUT</first>
<second>29</second>
</item>
</second>
</item>
<item>
<first>add_ln63_7_fu_454_p2 ( + ) </first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0P0)</first>
<second>29</second>
</item>
<item>
<first>(1P1)</first>
<second>29</second>
</item>
<item>
<first>FF</first>
<second>0</second>
</item>
<item>
<first>LUT</first>
<second>29</second>
</item>
</second>
</item>
<item>
<first>add_ln63_8_fu_377_p2 ( + ) </first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0P0)</first>
<second>8</second>
</item>
<item>
<first>(1P1)</first>
<second>8</second>
</item>
<item>
<first>FF</first>
<second>0</second>
</item>
<item>
<first>LUT</first>
<second>15</second>
</item>
</second>
</item>
<item>
<first>ap_block_state1 ( or ) </first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0P0)</first>
<second>1</second>
</item>
<item>
<first>(1P1)</first>
<second>1</second>
</item>
<item>
<first>FF</first>
<second>0</second>
</item>
<item>
<first>LUT</first>
<second>2</second>
</item>
</second>
</item>
<item>
<first>ap_enable_pp0 ( xor ) </first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0P0)</first>
<second>1</second>
</item>
<item>
<first>(1P1)</first>
<second>2</second>
</item>
<item>
<first>FF</first>
<second>0</second>
</item>
<item>
<first>LUT</first>
<second>2</second>
</item>
</second>
</item>
<item>
<first>ap_enable_reg_pp0_iter1 ( xor ) </first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0P0)</first>
<second>2</second>
</item>
<item>
<first>(1P1)</first>
<second>1</second>
</item>
<item>
<first>FF</first>
<second>0</second>
</item>
<item>
<first>LUT</first>
<second>2</second>
</item>
</second>
</item>
<item>
<first>i_fu_319_p2 ( + ) </first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0P0)</first>
<second>4</second>
</item>
<item>
<first>(1P1)</first>
<second>1</second>
</item>
<item>
<first>FF</first>
<second>0</second>
</item>
<item>
<first>LUT</first>
<second>12</second>
</item>
</second>
</item>
<item>
<first>icmp_ln55_fu_349_p2 ( icmp ) </first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0P0)</first>
<second>4</second>
</item>
<item>
<first>(1P1)</first>
<second>5</second>
</item>
<item>
<first>FF</first>
<second>0</second>
</item>
<item>
<first>LUT</first>
<second>11</second>
</item>
</second>
</item>
<item>
<first>icmp_ln76_fu_313_p2 ( icmp ) </first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0P0)</first>
<second>4</second>
</item>
<item>
<first>(1P1)</first>
<second>5</second>
</item>
<item>
<first>FF</first>
<second>0</second>
</item>
<item>
<first>LUT</first>
<second>11</second>
</item>
</second>
</item>
<item>
<first>k_fu_355_p2 ( + ) </first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0P0)</first>
<second>4</second>
</item>
<item>
<first>(1P1)</first>
<second>1</second>
</item>
<item>
<first>FF</first>
<second>0</second>
</item>
<item>
<first>LUT</first>
<second>12</second>
</item>
</second>
</item>
</dp_expression_resource>
<dp_fifo_resource>
<count>0</count>
<item_version>0</item_version>
</dp_fifo_resource>
<dp_memory_resource>
<count>8</count>
<item_version>0</item_version>
<item>
<first>dct_coeff_table_0_U</first>
<second>
<count>7</count>
<item_version>0</item_version>
<item>
<first>(0Words)</first>
<second>8</second>
</item>
<item>
<first>(1Bits)</first>
<second>14</second>
</item>
<item>
<first>(2Banks)</first>
<second>1</second>
</item>
<item>
<first>(3W*Bits*Banks)</first>
<second>112</second>
</item>
<item>
<first>BRAM</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>14</second>
</item>
<item>
<first>LUT</first>
<second>2</second>
</item>
</second>
</item>
<item>
<first>dct_coeff_table_1_U</first>
<second>
<count>7</count>
<item_version>0</item_version>
<item>
<first>(0Words)</first>
<second>8</second>
</item>
<item>
<first>(1Bits)</first>
<second>15</second>
</item>
<item>
<first>(2Banks)</first>
<second>1</second>
</item>
<item>
<first>(3W*Bits*Banks)</first>
<second>120</second>
</item>
<item>
<first>BRAM</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>15</second>
</item>
<item>
<first>LUT</first>
<second>2</second>
</item>
</second>
</item>
<item>
<first>dct_coeff_table_2_U</first>
<second>
<count>7</count>
<item_version>0</item_version>
<item>
<first>(0Words)</first>
<second>8</second>
</item>
<item>
<first>(1Bits)</first>
<second>15</second>
</item>
<item>
<first>(2Banks)</first>
<second>1</second>
</item>
<item>
<first>(3W*Bits*Banks)</first>
<second>120</second>
</item>
<item>
<first>BRAM</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>15</second>
</item>
<item>
<first>LUT</first>
<second>2</second>
</item>
</second>
</item>
<item>
<first>dct_coeff_table_3_U</first>
<second>
<count>7</count>
<item_version>0</item_version>
<item>
<first>(0Words)</first>
<second>8</second>
</item>
<item>
<first>(1Bits)</first>
<second>15</second>
</item>
<item>
<first>(2Banks)</first>
<second>1</second>
</item>
<item>
<first>(3W*Bits*Banks)</first>
<second>120</second>
</item>
<item>
<first>BRAM</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>15</second>
</item>
<item>
<first>LUT</first>
<second>2</second>
</item>
</second>
</item>
<item>
<first>dct_coeff_table_4_U</first>
<second>
<count>7</count>
<item_version>0</item_version>
<item>
<first>(0Words)</first>
<second>8</second>
</item>
<item>
<first>(1Bits)</first>
<second>15</second>
</item>
<item>
<first>(2Banks)</first>
<second>1</second>
</item>
<item>
<first>(3W*Bits*Banks)</first>
<second>120</second>
</item>
<item>
<first>BRAM</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>15</second>
</item>
<item>
<first>LUT</first>
<second>2</second>
</item>
</second>
</item>
<item>
<first>dct_coeff_table_5_U</first>
<second>
<count>7</count>
<item_version>0</item_version>
<item>
<first>(0Words)</first>
<second>8</second>
</item>
<item>
<first>(1Bits)</first>
<second>15</second>
</item>
<item>
<first>(2Banks)</first>
<second>1</second>
</item>
<item>
<first>(3W*Bits*Banks)</first>
<second>120</second>
</item>
<item>
<first>BRAM</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>15</second>
</item>
<item>
<first>LUT</first>
<second>2</second>
</item>
</second>
</item>
<item>
<first>dct_coeff_table_6_U</first>
<second>
<count>7</count>
<item_version>0</item_version>
<item>
<first>(0Words)</first>
<second>8</second>
</item>
<item>
<first>(1Bits)</first>
<second>15</second>
</item>
<item>
<first>(2Banks)</first>
<second>1</second>
</item>
<item>
<first>(3W*Bits*Banks)</first>
<second>120</second>
</item>
<item>
<first>BRAM</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>15</second>
</item>
<item>
<first>LUT</first>
<second>2</second>
</item>
</second>
</item>
<item>
<first>dct_coeff_table_7_U</first>
<second>
<count>7</count>
<item_version>0</item_version>
<item>
<first>(0Words)</first>
<second>8</second>
</item>
<item>
<first>(1Bits)</first>
<second>15</second>
</item>
<item>
<first>(2Banks)</first>
<second>1</second>
</item>
<item>
<first>(3W*Bits*Banks)</first>
<second>120</second>
</item>
<item>
<first>BRAM</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>15</second>
</item>
<item>
<first>LUT</first>
<second>2</second>
</item>
</second>
</item>
</dp_memory_resource>
<dp_multiplexer_resource>
<count>6</count>
<item_version>0</item_version>
<item>
<first>ap_NS_fsm</first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0Size)</first>
<second>5</second>
</item>
<item>
<first>(1Bits)</first>
<second>1</second>
</item>
<item>
<first>(2Count)</first>
<second>5</second>
</item>
<item>
<first>LUT</first>
<second>27</second>
</item>
</second>
</item>
<item>
<first>ap_done</first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0Size)</first>
<second>2</second>
</item>
<item>
<first>(1Bits)</first>
<second>1</second>
</item>
<item>
<first>(2Count)</first>
<second>2</second>
</item>
<item>
<first>LUT</first>
<second>9</second>
</item>
</second>
</item>
<item>
<first>ap_enable_reg_pp0_iter1</first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0Size)</first>
<second>2</second>
</item>
<item>
<first>(1Bits)</first>
<second>1</second>
</item>
<item>
<first>(2Count)</first>
<second>2</second>
</item>
<item>
<first>LUT</first>
<second>9</second>
</item>
</second>
</item>
<item>
<first>ap_enable_reg_pp0_iter2</first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0Size)</first>
<second>2</second>
</item>
<item>
<first>(1Bits)</first>
<second>1</second>
</item>
<item>
<first>(2Count)</first>
<second>2</second>
</item>
<item>
<first>LUT</first>
<second>9</second>
</item>
</second>
</item>
<item>
<first>i_0_i_reg_291</first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0Size)</first>
<second>2</second>
</item>
<item>
<first>(1Bits)</first>
<second>4</second>
</item>
<item>
<first>(2Count)</first>
<second>8</second>
</item>
<item>
<first>LUT</first>
<second>9</second>
</item>
</second>
</item>
<item>
<first>k_0_i_reg_302</first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0Size)</first>
<second>2</second>
</item>
<item>
<first>(1Bits)</first>
<second>4</second>
</item>
<item>
<first>(2Count)</first>
<second>8</second>
</item>
<item>
<first>LUT</first>
<second>9</second>
</item>
</second>
</item>
</dp_multiplexer_resource>
<dp_register_resource>
<count>29</count>
<item_version>0</item_version>
<item>
<first>add_ln63_4_reg_672</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>29</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>29</second>
</item>
</second>
</item>
<item>
<first>add_ln63_8_reg_592</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>8</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>8</second>
</item>
</second>
</item>
<item>
<first>add_ln63_8_reg_592_pp0_iter1_reg</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>8</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>8</second>
</item>
</second>
</item>
<item>
<first>ap_CS_fsm</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>4</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>4</second>
</item>
</second>
</item>
<item>
<first>ap_done_reg</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>1</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>1</second>
</item>
</second>
</item>
<item>
<first>ap_enable_reg_pp0_iter0</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>1</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>1</second>
</item>
</second>
</item>
<item>
<first>ap_enable_reg_pp0_iter1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>1</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>1</second>
</item>
</second>
</item>
<item>
<first>ap_enable_reg_pp0_iter2</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>1</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>1</second>
</item>
</second>
</item>
<item>
<first>buf_2d_in_0_addr_reg_543</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>3</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>3</second>
</item>
</second>
</item>
<item>
<first>buf_2d_in_1_addr_reg_548</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>3</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>3</second>
</item>
</second>
</item>
<item>
<first>buf_2d_in_2_addr_reg_553</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>3</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>3</second>
</item>
</second>
</item>
<item>
<first>buf_2d_in_3_addr_reg_558</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>3</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>3</second>
</item>
</second>
</item>
<item>
<first>buf_2d_in_4_addr_reg_563</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>3</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>3</second>
</item>
</second>
</item>
<item>
<first>buf_2d_in_5_addr_reg_568</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>3</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>3</second>
</item>
</second>
</item>
<item>
<first>buf_2d_in_6_addr_reg_573</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>3</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>3</second>
</item>
</second>
</item>
<item>
<first>buf_2d_in_7_addr_reg_578</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>3</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>3</second>
</item>
</second>
</item>
<item>
<first>dct_coeff_table_0_lo_reg_637</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>14</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>14</second>
</item>
</second>
</item>
<item>
<first>dct_coeff_table_2_lo_reg_647</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>15</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>15</second>
</item>
</second>
</item>
<item>
<first>dct_coeff_table_4_lo_reg_657</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>15</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>15</second>
</item>
</second>
</item>
<item>
<first>dct_coeff_table_6_lo_reg_667</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>15</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>15</second>
</item>
</second>
</item>
<item>
<first>i_0_i_reg_291</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>4</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>4</second>
</item>
</second>
</item>
<item>
<first>i_reg_533</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>4</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>4</second>
</item>
</second>
</item>
<item>
<first>icmp_ln55_reg_583</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>1</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>1</second>
</item>
</second>
</item>
<item>
<first>icmp_ln55_reg_583_pp0_iter1_reg</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>1</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>1</second>
</item>
</second>
</item>
<item>
<first>k_0_i_reg_302</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>4</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>4</second>
</item>
</second>
</item>
<item>
<first>mul_ln61_1_reg_642</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>29</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>29</second>
</item>
</second>
</item>
<item>
<first>mul_ln61_3_reg_652</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>29</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>29</second>
</item>
</second>
</item>
<item>
<first>mul_ln61_5_reg_662</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>29</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>29</second>
</item>
</second>
</item>
<item>
<first>zext_ln48_1_reg_538</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>8</second>
</item>
<item>
<first>(Consts)</first>
<second>4</second>
</item>
<item>
<first>FF</first>
<second>4</second>
</item>
</second>
</item>
</dp_register_resource>
<dp_dsp_resource>
<count>8</count>
<item_version>0</item_version>
<item>
<first>dct_mac_muladd_14ns_16s_29s_29_1_1_U14</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>DSP48E</first>
<second>1</second>
</item>
</second>
</item>
<item>
<first>dct_mac_muladd_15s_16s_14ns_29_1_1_U13</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>DSP48E</first>
<second>1</second>
</item>
</second>
</item>
<item>
<first>dct_mac_muladd_15s_16s_29s_29_1_1_U15</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>DSP48E</first>
<second>1</second>
</item>
</second>
</item>
<item>
<first>dct_mac_muladd_15s_16s_29s_29_1_1_U16</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>DSP48E</first>
<second>1</second>
</item>
</second>
</item>
<item>
<first>dct_mac_muladd_15s_16s_29s_29_1_1_U17</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>DSP48E</first>
<second>1</second>
</item>
</second>
</item>
<item>
<first>dct_mul_mul_15s_16s_29_1_1_U10</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>DSP48E</first>
<second>1</second>
</item>
</second>
</item>
<item>
<first>dct_mul_mul_15s_16s_29_1_1_U11</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>DSP48E</first>
<second>1</second>
</item>
</second>
</item>
<item>
<first>dct_mul_mul_15s_16s_29_1_1_U12</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>DSP48E</first>
<second>1</second>
</item>
</second>
</item>
</dp_dsp_resource>
<dp_component_map class_id="41" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</dp_component_map>
<dp_expression_map>
<count>8</count>
<item_version>0</item_version>
<item class_id="42" tracking_level="0" version="0">
<first>add_ln63_2_fu_446_p2 ( + ) </first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>104</item>
</second>
</item>
<item>
<first>add_ln63_6_fu_450_p2 ( + ) </first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>108</item>
</second>
</item>
<item>
<first>add_ln63_7_fu_454_p2 ( + ) </first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>109</item>
</second>
</item>
<item>
<first>add_ln63_8_fu_377_p2 ( + ) </first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>51</item>
</second>
</item>
<item>
<first>i_fu_319_p2 ( + ) </first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>23</item>
</second>
</item>
<item>
<first>icmp_ln55_fu_349_p2 ( icmp ) </first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>41</item>
</second>
</item>
<item>
<first>icmp_ln76_fu_313_p2 ( icmp ) </first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>21</item>
</second>
</item>
<item>
<first>k_fu_355_p2 ( + ) </first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>43</item>
</second>
</item>
</dp_expression_map>
<dp_fifo_map>
<count>0</count>
<item_version>0</item_version>
</dp_fifo_map>
<dp_memory_map>
<count>8</count>
<item_version>0</item_version>
<item>
<first>dct_coeff_table_0_U</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>82</item>
</second>
</item>
<item>
<first>dct_coeff_table_1_U</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>89</item>
</second>
</item>
<item>
<first>dct_coeff_table_2_U</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>96</item>
</second>
</item>
<item>
<first>dct_coeff_table_3_U</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>103</item>
</second>
</item>
<item>
<first>dct_coeff_table_4_U</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>110</item>
</second>
</item>
<item>
<first>dct_coeff_table_5_U</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>117</item>
</second>
</item>
<item>
<first>dct_coeff_table_6_U</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>124</item>
</second>
</item>
<item>
<first>dct_coeff_table_7_U</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>131</item>
</second>
</item>
</dp_memory_map>
</res>
<node_label_latency class_id="43" tracking_level="0" version="0">
<count>87</count>
<item_version>0</item_version>
<item class_id="44" tracking_level="0" version="0">
<first>18</first>
<second class_id="45" tracking_level="0" version="0">
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>20</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>21</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>23</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>24</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>27</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>28</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>29</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>30</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>31</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>32</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>33</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>34</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>35</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>36</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>37</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>38</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>40</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>41</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>43</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>44</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>49</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>50</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>51</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>52</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>53</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>54</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>55</first>
<second>
<first>2</first>
<second>1</second>
</second>
</item>
<item>
<first>56</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>57</first>
<second>
<first>3</first>
<second>1</second>
</second>
</item>
<item>
<first>58</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>59</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>60</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>61</first>
<second>
<first>2</first>
<second>1</second>
</second>
</item>
<item>
<first>62</first>
<second>
<first>3</first>
<second>0</second>
</second>
</item>
<item>
<first>63</first>
<second>
<first>2</first>
<second>1</second>
</second>
</item>
<item>
<first>64</first>
<second>
<first>3</first>
<second>0</second>
</second>
</item>
<item>
<first>65</first>
<second>
<first>3</first>
<second>0</second>
</second>
</item>
<item>
<first>66</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>67</first>
<second>
<first>2</first>
<second>1</second>
</second>
</item>
<item>
<first>68</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>69</first>
<second>
<first>3</first>
<second>1</second>
</second>
</item>
<item>
<first>70</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>71</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>72</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>73</first>
<second>
<first>2</first>
<second>1</second>
</second>
</item>
<item>
<first>74</first>
<second>
<first>3</first>
<second>0</second>
</second>
</item>
<item>
<first>75</first>
<second>
<first>2</first>
<second>1</second>
</second>
</item>
<item>
<first>76</first>
<second>
<first>3</first>
<second>0</second>
</second>
</item>
<item>
<first>77</first>
<second>
<first>3</first>
<second>0</second>
</second>
</item>
<item>
<first>78</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>79</first>
<second>
<first>2</first>
<second>1</second>
</second>
</item>
<item>
<first>80</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>81</first>
<second>
<first>3</first>
<second>1</second>
</second>
</item>
<item>
<first>82</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>83</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>84</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>85</first>
<second>
<first>2</first>
<second>1</second>
</second>
</item>
<item>
<first>86</first>
<second>
<first>3</first>
<second>0</second>
</second>
</item>
<item>
<first>87</first>
<second>
<first>2</first>
<second>1</second>
</second>
</item>
<item>
<first>88</first>
<second>
<first>3</first>
<second>0</second>
</second>
</item>
<item>
<first>89</first>
<second>
<first>3</first>
<second>0</second>
</second>
</item>
<item>
<first>90</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>91</first>
<second>
<first>2</first>
<second>1</second>
</second>
</item>
<item>
<first>92</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>93</first>
<second>
<first>3</first>
<second>1</second>
</second>
</item>
<item>
<first>94</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>95</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>96</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>97</first>
<second>
<first>2</first>
<second>1</second>
</second>
</item>
<item>
<first>98</first>
<second>
<first>3</first>
<second>0</second>
</second>
</item>
<item>
<first>99</first>
<second>
<first>2</first>
<second>1</second>
</second>
</item>
<item>
<first>100</first>
<second>
<first>3</first>
<second>0</second>
</second>
</item>
<item>
<first>101</first>
<second>
<first>3</first>
<second>0</second>
</second>
</item>
<item>
<first>102</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>103</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>104</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>105</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>106</first>
<second>
<first>3</first>
<second>0</second>
</second>
</item>
<item>
<first>107</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>108</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>109</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>110</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>111</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>113</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>115</first>
<second>
<first>5</first>
<second>0</second>
</second>
</item>
<item>
<first>117</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
</node_label_latency>
<bblk_ent_exit class_id="46" tracking_level="0" version="0">
<count>7</count>
<item_version>0</item_version>
<item class_id="47" tracking_level="0" version="0">
<first>19</first>
<second class_id="48" tracking_level="0" version="0">
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>25</first>
<second>
<first>1</first>
<second>1</second>
</second>
</item>
<item>
<first>39</first>
<second>
<first>1</first>
<second>1</second>
</second>
</item>
<item>
<first>45</first>
<second>
<first>2</first>
<second>2</second>
</second>
</item>
<item>
<first>114</first>
<second>
<first>2</first>
<second>4</second>
</second>
</item>
<item>
<first>116</first>
<second>
<first>3</first>
<second>3</second>
</second>
</item>
<item>
<first>118</first>
<second>
<first>1</first>
<second>1</second>
</second>
</item>
</bblk_ent_exit>
<regions class_id="49" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="50" tracking_level="1" version="0" object_id="_407">
<region_name>DCT_Outer_Loop</region_name>
<basic_blocks>
<count>2</count>
<item_version>0</item_version>
<item>45</item>
<item>114</item>
</basic_blocks>
<nodes>
<count>0</count>
<item_version>0</item_version>
</nodes>
<anchor_node>-1</anchor_node>
<region_type>8</region_type>
<interval>1</interval>
<pipe_depth>3</pipe_depth>
</item>
</regions>
<dp_fu_nodes class_id="51" tracking_level="0" version="0">
<count>75</count>
<item_version>0</item_version>
<item class_id="52" tracking_level="0" version="0">
<first>78</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>30</item>
</second>
</item>
<item>
<first>85</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>31</item>
</second>
</item>
<item>
<first>92</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>32</item>
</second>
</item>
<item>
<first>99</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>33</item>
</second>
</item>
<item>
<first>106</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>34</item>
</second>
</item>
<item>
<first>113</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>35</item>
</second>
</item>
<item>
<first>120</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>36</item>
</second>
</item>
<item>
<first>127</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>37</item>
</second>
</item>
<item>
<first>134</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>54</item>
</second>
</item>
<item>
<first>141</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>55</item>
<item>55</item>
</second>
</item>
<item>
<first>147</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>60</item>
</second>
</item>
<item>
<first>154</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>61</item>
<item>61</item>
</second>
</item>
<item>
<first>160</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>63</item>
<item>63</item>
</second>
</item>
<item>
<first>165</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>66</item>
</second>
</item>
<item>
<first>172</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>67</item>
<item>67</item>
</second>
</item>
<item>
<first>178</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>72</item>
</second>
</item>
<item>
<first>185</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>73</item>
<item>73</item>
</second>
</item>
<item>
<first>191</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>75</item>
<item>75</item>
</second>
</item>
<item>
<first>196</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>78</item>
</second>
</item>
<item>
<first>203</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>79</item>
<item>79</item>
</second>
</item>
<item>
<first>209</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>84</item>
</second>
</item>
<item>
<first>216</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>85</item>
<item>85</item>
</second>
</item>
<item>
<first>222</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>87</item>
<item>87</item>
</second>
</item>
<item>
<first>227</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>90</item>
</second>
</item>
<item>
<first>234</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>91</item>
<item>91</item>
</second>
</item>
<item>
<first>240</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>96</item>
</second>
</item>
<item>
<first>247</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>97</item>
<item>97</item>
</second>
</item>
<item>
<first>253</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>99</item>
<item>99</item>
</second>
</item>
<item>
<first>258</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>57</item>
<item>57</item>
</second>
</item>
<item>
<first>263</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>69</item>
<item>69</item>
</second>
</item>
<item>
<first>268</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>81</item>
<item>81</item>
</second>
</item>
<item>
<first>273</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>93</item>
<item>93</item>
</second>
</item>
<item>
<first>278</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>53</item>
</second>
</item>
<item>
<first>285</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>111</item>
</second>
</item>
<item>
<first>295</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>20</item>
</second>
</item>
<item>
<first>306</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>40</item>
</second>
</item>
<item>
<first>313</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>21</item>
</second>
</item>
<item>
<first>319</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>23</item>
</second>
</item>
<item>
<first>325</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>27</item>
</second>
</item>
<item>
<first>337</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>28</item>
</second>
</item>
<item>
<first>345</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>29</item>
</second>
</item>
<item>
<first>349</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>41</item>
</second>
</item>
<item>
<first>355</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>43</item>
</second>
</item>
<item>
<first>361</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>49</item>
</second>
</item>
<item>
<first>373</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>50</item>
</second>
</item>
<item>
<first>377</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>51</item>
</second>
</item>
<item>
<first>382</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>62</item>
</second>
</item>
<item>
<first>386</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>64</item>
</second>
</item>
<item>
<first>390</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>74</item>
</second>
</item>
<item>
<first>394</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>76</item>
</second>
</item>
<item>
<first>398</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>86</item>
</second>
</item>
<item>
<first>402</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>88</item>
</second>
</item>
<item>
<first>406</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>98</item>
</second>
</item>
<item>
<first>410</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>100</item>
</second>
</item>
<item>
<first>414</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>52</item>
</second>
</item>
<item>
<first>418</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>56</item>
</second>
</item>
<item>
<first>421</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>58</item>
</second>
</item>
<item>
<first>425</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>68</item>
</second>
</item>
<item>
<first>428</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>70</item>
</second>
</item>
<item>
<first>432</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>80</item>
</second>
</item>
<item>
<first>435</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>82</item>
</second>
</item>
<item>
<first>439</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>92</item>
</second>
</item>
<item>
<first>442</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>94</item>
</second>
</item>
<item>
<first>446</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>104</item>
</second>
</item>
<item>
<first>450</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>108</item>
</second>
</item>
<item>
<first>454</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>109</item>
</second>
</item>
<item>
<first>460</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>110</item>
</second>
</item>
<item>
<first>471</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>65</item>
</second>
</item>
<item>
<first>477</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>77</item>
</second>
</item>
<item>
<first>483</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>89</item>
</second>
</item>
<item>
<first>489</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>101</item>
<item>106</item>
</second>
</item>
<item>
<first>497</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>59</item>
<item>102</item>
</second>
</item>
<item>
<first>505</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>71</item>
<item>103</item>
</second>
</item>
<item>
<first>513</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>83</item>
<item>105</item>
</second>
</item>
<item>
<first>521</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>95</item>
<item>107</item>
</second>
</item>
</dp_fu_nodes>
<dp_fu_nodes_expression class_id="54" tracking_level="0" version="0">
<count>58</count>
<item_version>0</item_version>
<item class_id="55" tracking_level="0" version="0">
<first>add_ln63_2_fu_446</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>104</item>
</second>
</item>
<item>
<first>add_ln63_6_fu_450</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>108</item>
</second>
</item>
<item>
<first>add_ln63_7_fu_454</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>109</item>
</second>
</item>
<item>
<first>add_ln63_8_fu_377</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>51</item>
</second>
</item>
<item>
<first>buf_2d_in_0_addr_gep_fu_78</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>30</item>
</second>
</item>
<item>
<first>buf_2d_in_1_addr_gep_fu_85</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>31</item>
</second>
</item>
<item>
<first>buf_2d_in_2_addr_gep_fu_92</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>32</item>
</second>
</item>
<item>
<first>buf_2d_in_3_addr_gep_fu_99</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>33</item>
</second>
</item>
<item>
<first>buf_2d_in_4_addr_gep_fu_106</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>34</item>
</second>
</item>
<item>
<first>buf_2d_in_5_addr_gep_fu_113</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>35</item>
</second>
</item>
<item>
<first>buf_2d_in_6_addr_gep_fu_120</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>36</item>
</second>
</item>
<item>
<first>buf_2d_in_7_addr_gep_fu_127</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>37</item>
</second>
</item>
<item>
<first>dct_coeff_table_0_ad_gep_fu_134</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>54</item>
</second>
</item>
<item>
<first>dct_coeff_table_1_ad_gep_fu_147</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>60</item>
</second>
</item>
<item>
<first>dct_coeff_table_2_ad_gep_fu_165</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>66</item>
</second>
</item>
<item>
<first>dct_coeff_table_3_ad_gep_fu_178</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>72</item>
</second>
</item>
<item>
<first>dct_coeff_table_4_ad_gep_fu_196</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>78</item>
</second>
</item>
<item>
<first>dct_coeff_table_5_ad_gep_fu_209</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>84</item>
</second>
</item>
<item>
<first>dct_coeff_table_6_ad_gep_fu_227</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>90</item>
</second>
</item>
<item>
<first>dct_coeff_table_7_ad_gep_fu_240</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>96</item>
</second>
</item>
<item>
<first>grp_fu_489</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>101</item>
<item>106</item>
</second>
</item>
<item>
<first>grp_fu_497</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>59</item>
<item>102</item>
</second>
</item>
<item>
<first>grp_fu_505</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>71</item>
<item>103</item>
</second>
</item>
<item>
<first>grp_fu_513</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>83</item>
<item>105</item>
</second>
</item>
<item>
<first>grp_fu_521</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>95</item>
<item>107</item>
</second>
</item>
<item>
<first>i_0_i_phi_fu_295</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>20</item>
</second>
</item>
<item>
<first>i_fu_319</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>23</item>
</second>
</item>
<item>
<first>icmp_ln55_fu_349</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>41</item>
</second>
</item>
<item>
<first>icmp_ln76_fu_313</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>21</item>
</second>
</item>
<item>
<first>k_0_i_phi_fu_306</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>40</item>
</second>
</item>
<item>
<first>k_fu_355</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>43</item>
</second>
</item>
<item>
<first>mul_ln61_1_fu_471</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>65</item>
</second>
</item>
<item>
<first>mul_ln61_3_fu_477</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>77</item>
</second>
</item>
<item>
<first>mul_ln61_5_fu_483</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>89</item>
</second>
</item>
<item>
<first>row_outbuf_i_addr_gep_fu_278</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>53</item>
</second>
</item>
<item>
<first>sext_ln61_10_fu_402</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>88</item>
</second>
</item>
<item>
<first>sext_ln61_11_fu_439</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>92</item>
</second>
</item>
<item>
<first>sext_ln61_12_fu_442</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>94</item>
</second>
</item>
<item>
<first>sext_ln61_13_fu_406</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>98</item>
</second>
</item>
<item>
<first>sext_ln61_14_fu_410</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>100</item>
</second>
</item>
<item>
<first>sext_ln61_1_fu_382</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>62</item>
</second>
</item>
<item>
<first>sext_ln61_2_fu_386</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>64</item>
</second>
</item>
<item>
<first>sext_ln61_3_fu_425</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>68</item>
</second>
</item>
<item>
<first>sext_ln61_4_fu_428</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>70</item>
</second>
</item>
<item>
<first>sext_ln61_5_fu_390</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>74</item>
</second>
</item>
<item>
<first>sext_ln61_6_fu_394</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>76</item>
</second>
</item>
<item>
<first>sext_ln61_7_fu_432</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>80</item>
</second>
</item>
<item>
<first>sext_ln61_8_fu_435</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>82</item>
</second>
</item>
<item>
<first>sext_ln61_9_fu_398</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>86</item>
</second>
</item>
<item>
<first>sext_ln61_fu_421</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>58</item>
</second>
</item>
<item>
<first>tmp_fu_337</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>28</item>
</second>
</item>
<item>
<first>trunc_ln_fu_460</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>110</item>
</second>
</item>
<item>
<first>zext_ln48_1_fu_345</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>29</item>
</second>
</item>
<item>
<first>zext_ln48_fu_325</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>27</item>
</second>
</item>
<item>
<first>zext_ln60_fu_361</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>49</item>
</second>
</item>
<item>
<first>zext_ln61_fu_418</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>56</item>
</second>
</item>
<item>
<first>zext_ln63_1_fu_414</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>52</item>
</second>
</item>
<item>
<first>zext_ln63_fu_373</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>50</item>
</second>
</item>
</dp_fu_nodes_expression>
<dp_fu_nodes_module>
<count>0</count>
<item_version>0</item_version>
</dp_fu_nodes_module>
<dp_fu_nodes_io>
<count>0</count>
<item_version>0</item_version>
</dp_fu_nodes_io>
<return_ports>
<count>0</count>
<item_version>0</item_version>
</return_ports>
<dp_mem_port_nodes class_id="56" tracking_level="0" version="0">
<count>17</count>
<item_version>0</item_version>
<item class_id="57" tracking_level="0" version="0">
<first class_id="58" tracking_level="0" version="0">
<first>buf_2d_in_0</first>
<second>0</second>
</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>57</item>
<item>57</item>
</second>
</item>
<item>
<first>
<first>buf_2d_in_1</first>
<second>0</second>
</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>63</item>
<item>63</item>
</second>
</item>
<item>
<first>
<first>buf_2d_in_2</first>
<second>0</second>
</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>69</item>
<item>69</item>
</second>
</item>
<item>
<first>
<first>buf_2d_in_3</first>
<second>0</second>
</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>75</item>
<item>75</item>
</second>
</item>
<item>
<first>
<first>buf_2d_in_4</first>
<second>0</second>
</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>81</item>
<item>81</item>
</second>
</item>
<item>
<first>
<first>buf_2d_in_5</first>
<second>0</second>
</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>87</item>
<item>87</item>
</second>
</item>
<item>
<first>
<first>buf_2d_in_6</first>
<second>0</second>
</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>93</item>
<item>93</item>
</second>
</item>
<item>
<first>
<first>buf_2d_in_7</first>
<second>0</second>
</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>99</item>
<item>99</item>
</second>
</item>
<item>
<first>
<first>dct_coeff_table_0</first>
<second>0</second>
</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>55</item>
<item>55</item>
</second>
</item>
<item>
<first>
<first>dct_coeff_table_1</first>
<second>0</second>
</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>61</item>
<item>61</item>
</second>
</item>
<item>
<first>
<first>dct_coeff_table_2</first>
<second>0</second>
</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>67</item>
<item>67</item>
</second>
</item>
<item>
<first>
<first>dct_coeff_table_3</first>
<second>0</second>
</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>73</item>
<item>73</item>
</second>
</item>
<item>
<first>
<first>dct_coeff_table_4</first>
<second>0</second>
</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>79</item>
<item>79</item>
</second>
</item>
<item>
<first>
<first>dct_coeff_table_5</first>
<second>0</second>
</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>85</item>
<item>85</item>
</second>
</item>
<item>
<first>
<first>dct_coeff_table_6</first>
<second>0</second>
</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>91</item>
<item>91</item>
</second>
</item>
<item>
<first>
<first>dct_coeff_table_7</first>
<second>0</second>
</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>97</item>
<item>97</item>
</second>
</item>
<item>
<first>
<first>row_outbuf_i</first>
<second>0</second>
</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>111</item>
</second>
</item>
</dp_mem_port_nodes>
<dp_reg_nodes>
<count>32</count>
<item_version>0</item_version>
<item>
<first>291</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>20</item>
</second>
</item>
<item>
<first>302</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>40</item>
</second>
</item>
<item>
<first>529</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>21</item>
</second>
</item>
<item>
<first>533</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>23</item>
</second>
</item>
<item>
<first>538</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>29</item>
</second>
</item>
<item>
<first>543</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>30</item>
</second>
</item>
<item>
<first>548</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>31</item>
</second>
</item>
<item>
<first>553</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>32</item>
</second>
</item>
<item>
<first>558</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>33</item>
</second>
</item>
<item>
<first>563</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>34</item>
</second>
</item>
<item>
<first>568</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>35</item>
</second>
</item>
<item>
<first>573</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>36</item>
</second>
</item>
<item>
<first>578</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>37</item>
</second>
</item>
<item>
<first>583</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>41</item>
</second>
</item>
<item>
<first>587</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>43</item>
</second>
</item>
<item>
<first>592</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>51</item>
</second>
</item>
<item>
<first>597</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>54</item>
</second>
</item>
<item>
<first>602</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>60</item>
</second>
</item>
<item>
<first>607</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>66</item>
</second>
</item>
<item>
<first>612</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>72</item>
</second>
</item>
<item>
<first>617</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>78</item>
</second>
</item>
<item>
<first>622</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>84</item>
</second>
</item>
<item>
<first>627</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>90</item>
</second>
</item>
<item>
<first>632</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>96</item>
</second>
</item>
<item>
<first>637</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>55</item>
</second>
</item>
<item>
<first>642</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>65</item>
</second>
</item>
<item>
<first>647</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>67</item>
</second>
</item>
<item>
<first>652</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>77</item>
</second>
</item>
<item>
<first>657</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>79</item>
</second>
</item>
<item>
<first>662</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>89</item>
</second>
</item>
<item>
<first>667</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>91</item>
</second>
</item>
<item>
<first>672</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>106</item>
</second>
</item>
</dp_reg_nodes>
<dp_regname_nodes>
<count>32</count>
<item_version>0</item_version>
<item>
<first>add_ln63_4_reg_672</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>106</item>
</second>
</item>
<item>
<first>add_ln63_8_reg_592</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>51</item>
</second>
</item>
<item>
<first>buf_2d_in_0_addr_reg_543</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>30</item>
</second>
</item>
<item>
<first>buf_2d_in_1_addr_reg_548</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>31</item>
</second>
</item>
<item>
<first>buf_2d_in_2_addr_reg_553</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>32</item>
</second>
</item>
<item>
<first>buf_2d_in_3_addr_reg_558</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>33</item>
</second>
</item>
<item>
<first>buf_2d_in_4_addr_reg_563</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>34</item>
</second>
</item>
<item>
<first>buf_2d_in_5_addr_reg_568</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>35</item>
</second>
</item>
<item>
<first>buf_2d_in_6_addr_reg_573</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>36</item>
</second>
</item>
<item>
<first>buf_2d_in_7_addr_reg_578</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>37</item>
</second>
</item>
<item>
<first>dct_coeff_table_0_ad_reg_597</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>54</item>
</second>
</item>
<item>
<first>dct_coeff_table_0_lo_reg_637</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>55</item>
</second>
</item>
<item>
<first>dct_coeff_table_1_ad_reg_602</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>60</item>
</second>
</item>
<item>
<first>dct_coeff_table_2_ad_reg_607</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>66</item>
</second>
</item>
<item>
<first>dct_coeff_table_2_lo_reg_647</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>67</item>
</second>
</item>
<item>
<first>dct_coeff_table_3_ad_reg_612</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>72</item>
</second>
</item>
<item>
<first>dct_coeff_table_4_ad_reg_617</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>78</item>
</second>
</item>
<item>
<first>dct_coeff_table_4_lo_reg_657</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>79</item>
</second>
</item>
<item>
<first>dct_coeff_table_5_ad_reg_622</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>84</item>
</second>
</item>
<item>
<first>dct_coeff_table_6_ad_reg_627</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>90</item>
</second>
</item>
<item>
<first>dct_coeff_table_6_lo_reg_667</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>91</item>
</second>
</item>
<item>
<first>dct_coeff_table_7_ad_reg_632</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>96</item>
</second>
</item>
<item>
<first>i_0_i_reg_291</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>20</item>
</second>
</item>
<item>
<first>i_reg_533</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>23</item>
</second>
</item>
<item>
<first>icmp_ln55_reg_583</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>41</item>
</second>
</item>
<item>
<first>icmp_ln76_reg_529</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>21</item>
</second>
</item>
<item>
<first>k_0_i_reg_302</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>40</item>
</second>
</item>
<item>
<first>k_reg_587</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>43</item>
</second>
</item>
<item>
<first>mul_ln61_1_reg_642</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>65</item>
</second>
</item>
<item>
<first>mul_ln61_3_reg_652</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>77</item>
</second>
</item>
<item>
<first>mul_ln61_5_reg_662</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>89</item>
</second>
</item>
<item>
<first>zext_ln48_1_reg_538</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>29</item>
</second>
</item>
</dp_regname_nodes>
<dp_reg_phi>
<count>2</count>
<item_version>0</item_version>
<item>
<first>291</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>20</item>
</second>
</item>
<item>
<first>302</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>40</item>
</second>
</item>
</dp_reg_phi>
<dp_regname_phi>
<count>2</count>
<item_version>0</item_version>
<item>
<first>i_0_i_reg_291</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>20</item>
</second>
</item>
<item>
<first>k_0_i_reg_302</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>40</item>
</second>
</item>
</dp_regname_phi>
<dp_port_io_nodes class_id="59" tracking_level="0" version="0">
<count>9</count>
<item_version>0</item_version>
<item class_id="60" tracking_level="0" version="0">
<first>buf_2d_in_0(p0)</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>load</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>57</item>
<item>57</item>
</second>
</item>
</second>
</item>
<item>
<first>buf_2d_in_1(p0)</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>load</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>63</item>
<item>63</item>
</second>
</item>
</second>
</item>
<item>
<first>buf_2d_in_2(p0)</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>load</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>69</item>
<item>69</item>
</second>
</item>
</second>
</item>
<item>
<first>buf_2d_in_3(p0)</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>load</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>75</item>
<item>75</item>
</second>
</item>
</second>
</item>
<item>
<first>buf_2d_in_4(p0)</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>load</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>81</item>
<item>81</item>
</second>
</item>
</second>
</item>
<item>
<first>buf_2d_in_5(p0)</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>load</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>87</item>
<item>87</item>
</second>
</item>
</second>
</item>
<item>
<first>buf_2d_in_6(p0)</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>load</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>93</item>
<item>93</item>
</second>
</item>
</second>
</item>
<item>
<first>buf_2d_in_7(p0)</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>load</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>99</item>
<item>99</item>
</second>
</item>
</second>
</item>
<item>
<first>row_outbuf_i(p0)</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>store</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>111</item>
</second>
</item>
</second>
</item>
</dp_port_io_nodes>
<port2core class_id="61" tracking_level="0" version="0">
<count>9</count>
<item_version>0</item_version>
<item class_id="62" tracking_level="0" version="0">
<first>1</first>
<second>RAM</second>
</item>
<item>
<first>2</first>
<second>RAM</second>
</item>
<item>
<first>3</first>
<second>RAM</second>
</item>
<item>
<first>4</first>
<second>RAM</second>
</item>
<item>
<first>5</first>
<second>RAM</second>
</item>
<item>
<first>6</first>
<second>RAM</second>
</item>
<item>
<first>7</first>
<second>RAM</second>
</item>
<item>
<first>8</first>
<second>RAM</second>
</item>
<item>
<first>9</first>
<second>RAM</second>
</item>
</port2core>
<node2core>
<count>0</count>
<item_version>0</item_version>
</node2core>
</syndb>
</boost_serialization>
|
with -- ARM_Output,
-- ARM_Contents,
-- Ada.Text_IO,
Ada.Exceptions,
Ada.Strings.Maps.Constants,
Ada.Strings.Fixed,
Ada.Unchecked_Deallocation;
package body ARM_HTML is
--
-- Ada reference manual formatter (ARM_Form).
--
-- This package defines the HTML output object.
-- Output objects are responsible for implementing the details of
-- a particular format.
--
-- ---------------------------------------
-- Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-- 2008, 2009, 2011, 2012, 2013, 2016
-- AXE Consultants. All rights reserved.
-- P.O. Box 1512, Madison WI 53701
-- E-Mail: randy@rrsoftware.com
--
-- ARM_Form is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License version 3
-- as published by the Free Software Foundation.
--
-- AXE CONSULTANTS MAKES THIS TOOL AND SOURCE CODE AVAILABLE ON AN "AS IS"
-- BASIS AND MAKES NO WARRANTY, EXPRESS OR IMPLIED, AS TO THE ACCURACY,
-- CAPABILITY, EFFICIENCY, MERCHANTABILITY, OR FUNCTIONING OF THIS TOOL.
-- IN NO EVENT WILL AXE CONSULTANTS BE LIABLE FOR ANY GENERAL,
-- CONSEQUENTIAL, INDIRECT, INCIDENTAL, EXEMPLARY, OR SPECIAL DAMAGES,
-- EVEN IF AXE CONSULTANTS HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-- DAMAGES.
--
-- A copy of the GNU General Public License is available in the file
-- gpl-3-0.txt in the standard distribution of the ARM_Form tool.
-- Otherwise, see <http://www.gnu.org/licenses/>.
--
-- If the GPLv3 license is not satisfactory for your needs, a commercial
-- use license is available for this tool. Contact Randy at AXE Consultants
-- for more information.
--
-- ---------------------------------------
--
-- Edit History:
--
-- 4/19/00 - RLB - Created base package.
-- 4/21/00 - RLB - Added line break and hard space routines.
-- 4/24/00 - RLB - Added DR references and Insert/Delete text formats.
-- 4/25/00 - RLB - Added size to format.
-- 4/26/00 - RLB - Added paragraph formats.
-- 4/29/00 - RLB - Added more paragraph formats.
-- 5/10/00 - RLB - Added even more formats.
-- - RLB - Added End_Hang_Item.
-- 5/12/00 - RLB - Added No_Prefix to Start_Paragraph.
-- 5/13/00 - RLB - Added Special_Character.
-- 5/16/00 - RLB - Added additional special characters.
-- 5/17/00 - RLB - Added New_Page.
-- 5/22/00 - RLB - Added Includes_Changes to Create.
-- 5/23/00 - RLB - Added multi-column formats and New_Column.
-- - Added Tab_Info and Tab_Stops.
-- 5/24/00 - RLB - Added Location to Text_Format.
-- - RLB - Added No_Breaks and Keep_with_Next to Start_Paragraph.
-- 5/25/00 - RLB - Added Big_Files to Create. Added Justification.
-- - RLB - Added Separator_Lines and TOC routines.
-- - RLB - Added "Legal" to the footer, pointing at the title page.
-- 5/26/00 - RLB - Added table operations.
-- 5/28/00 - RLB - Added index references.
-- 6/ 2/00 - RLB - Added Soft_Line_Break.
-- 8/ 2/00 - RLB - Added Soft_Hyphen_Break and left and right quote
-- characters.
-- - RLB - Added additional styles.
-- 8/ 7/00 - RLB - Added Leading flag to Start_Paragraph, removed "Leading"
-- styles.
-- 8/11/00 - RLB - Added Hanging_in_Bulleted styles.
-- 8/16/00 - RLB - Added Code_Indented_Nested_Bulleted.
-- 8/17/00 - RLB - Replaced "Leading" by "Space_After".
-- - RLB - Added Nested_Enumerated.
-- 8/22/00 - RLB - Added Revised_Clause_Header.
-- 9/ 8/00 - RLB - Removed soft hyphen, as this does not work on either
-- browser I tried.
-- 9/26/00 - RLB - Added Syntax_Summary style.
-- 9/27/00 - RLB - Added tab emulation when in the fixed font.
-- 9/28/00 - RLB - Added some style sheets.
-- - RLB - Updated to use absolute positioning for paragraph
-- numbers (this looks much better than floating).
-- 7/18/01 - RLB - Added "Indented" style to supported styles for
-- multi-column.
-- - RLB - Implemented single "Big-File" support.
-- 7/18/02 - RLB - Removed Document parameter from Create, replaced by
-- three strings and For_ISO boolean.
-- - RLB - Added AI_Reference.
-- - RLB - Added Change_Version_Type and uses.
-- 1/15/03 - RLB - Removed space from DIV.paranum, as it doesn't validate
-- with it.
-- 4/10/03 - RLB - Updated to add access to search pages (not generated
-- here; make them by hand, it only needs to be done once).
-- - RLB - Updated to insure that changes are separated by a space.
-- 4/11/03 - RLB - Changed some formats to meet WC3 validation requirements.
-- 9/09/04 - RLB - Removed unused junk noted by Stephen Leake.
-- 9/10/04 - RLB - Added "Both" to possible changes to handle
-- replacement of changed text.
-- 9/14/04 - RLB - Moved Change_Version_Type to ARM_Contents.
-- - RLB - Changed to use left/right quotes whether or not Unicode
-- is being used. (These work on IE, but not on old
-- Netscape.)
-- 9/16/04 - RLB - Added a charset meta in the header, so that browsers
-- can't misinterpret these documents.
-- 11/03/04 - RLB - Added Nested_X2_Bulleted.
-- 11/15/04 - RLB - Added Indented_Nested_Bulleted.
-- 12/15/04 - RLB - Added wider columns.
-- 1/24/05 - RLB - Added Inner_Indented.
-- 2/ 1/05 - RLB - Added Turkish chars to allow an AARM note.
-- 3/15/05 - RLB - Turned on Unicode characters at Pascal's insistence.
-- 3/17/05 - RLB - Removed ceiling and floor characters because they don't
-- work on Windows.
-- 4/ 7/05 - RLB - Added "Related Documents" link, so users can go between
-- the RM and AARM (and also so that they see the ARA
-- sponsor ads).
-- 5/27/05 - RLB - Added arbitrary Unicode characters.
-- 1/11/06 - RLB - Eliminated dispatching Create in favor of tailored
-- versions.
-- 1/12/06 - RLB - Added a number of parameters to Create.
-- 1/16/06 - RLB - Reduced space around button bars.
-- 1/18/06 - RLB - Added additional styles.
-- 1/19/06 - RLB - Added code so that only styles that are used are
-- included in the result (this decreases the minimum
-- file size by a lot).
-- 1/21/06 - RLB - Specified leading for Swiss example styles, because
-- they are too close otherwise.
-- 1/28/06 - RLB - Changed so that button highlights are removed correctly.
-- - RLB - Added tab emulation settings.
-- 2/ 8/06 - RLB - Added additional parameters to the table command.
-- 2/10/06 - RLB - Added even more additional parameters to the
-- table command.
-- - RLB - Added picture command.
-- 2/19/06 - RLB - Added Number_Paragraphs flag and large letter count.
-- 3/01/06 - RLB - Fixed bug in Text_Format when changing fonts.
-- 3/03/06 - RLB - Moved paragraph numbers down slightly; this looks a lot
-- better on Firefox, and better even on IE.
-- - RLB - Added Optimize_for_Firefox flag, and associated style
-- changes.
-- - RLB - Added code so that spaces after an opening tag
-- and before a closing tag are converted to non-breaking.
-- 3/28/06 - RLB - Removed unnecessary space from headers.
-- 3/30/06 - RLB - Added a bit of space around inline pictures.
-- 9/21/06 - RLB - Added Body_Font.
-- 9/22/06 - RLB - Added Subsubclause.
-- 9/23/06 - RLB - Fixed bug in borderless tables.
-- 9/25/06 - RLB - Handled optional renaming of TOC.
-- - RLB - Added Last_Column_Width to Start_Table.
-- - RLB - Fixed broken enumerated style.
-- 10/13/06 - RLB - Added specifiable colors.
-- - RLB - Added Local_Link_Start and Local_Link_End to allow
-- formatting in the linked text.
-- 11/10/06 - RLB - Fixed nesting of text formatting *again*. (AARM 13.11
-- failed WC 3 validation.)
-- 2/ 9/07 - RLB - Changed comments on AI_Reference.
-- 2/14/07 - RLB - Revised to separate style and indent information
-- for paragraphs.
-- 2/15/07 - RLB - Redid enumeration and bullet indenting to make the
-- formats work consistently on Firefox and IE.
-- 2/19/07 - RLB - Added Title style.
-- 12/14/07 - RLB - Added code to support multi-column text without
-- requiring New_Column calls.
-- 12/18/07 - RLB - Added Plain_Annex.
-- 12/19/07 - RLB - Added DOS_Filename flag.
-- - RLB - Added limited colors to Text_Format.
-- 1/02/08 - RLB - Made DOS filenames into all CAPS.
-- 5/ 7/09 - RLB - Added code to prevent making links to dead clauses.
-- 10/18/11 - RLB - Changed to GPLv3 license.
-- 10/25/11 - RLB - Added old insertion version to Revised_Clause_Header.
-- 2/15/12 - RLB - Removed horizontal rules from page breaks in HTML;
-- they never are necessary and cause weird looks for
-- breaks put in solely to make the "final" version look
-- good in PDF form.
-- 5/18/12 - RLB - Added anchors to each paragraph number as suggested
-- on comp.lang.ada.
-- 8/31/12 - RLB - Added Output_Path.
-- 10/18/12 - RLB - Added additional hanging styles.
-- 11/26/12 - RLB - Added subdivision names to Clause_Header and
-- Revised_Clause_Header.
-- 12/17/12 - RLB - Added AI12 references. Defined a change color for
-- "version 4" (Ada 202x).
-- 3/26/13 - RLB - Added Script_HTML.
-- 2/ 8/16 - RLB - Added styles for the Ada-Auth.org header.
-- - Defined change colors for versions 5 and 6. (Actually
-- "borrowed" the color for version 2, so the new colors
-- are for version 2 and 6. Can't use dark blue, as links
-- are that color.)
-- 3/ 3/16 - RLB - The color change is hell on the RR manuals. Redid
-- it to switch the colors only if version 5 is in use.
-- 4/20/16 - RLB - Slightly increased the base indent as a lot of
-- paragraph numbers are overlapping.
-- - Added Force_New_Revision_Colors.
LINE_LENGTH : constant := 78;
-- Maximum intended line length.
SWISS_FONT_CODE : constant String := "<font face=""Arial, Helvetica"">";
SMALL_SWISS_FONT_CODE : constant String := "<font face=""Arial, Helvetica"" size=-1>";
TINY_SWISS_FONT_CODE : constant String := "<font face=""Arial, Helvetica"" size=-2>";
LEADING_PERCENT : constant := 70;
-- Leading is 70% of normal height.
TRAILING_PERCENT : constant := 150;
-- Leading is 150% of normal height.
INDENT_EMS_FOR_PARANUMS : constant := 18;
-- Indent *all* text (for HTML 4) this amount to leave (some) room for
-- the paragraph numbers. In 0.1 EMs.
OPTIMIZE_FOR_FIREFOX : constant Boolean := True;
-- If True, we'll optimize for Firefox; otherwise, we'll optimize for
-- IE 6. Note that IE generally shows the Firefox code better than
-- Firefox shows the IE code, so we generally recommend setting to
-- True unless IE must be perfect. (Modern versions of IE are more
-- like Firefox, so it's unlikely that setting this to False should
-- be needed.)
type Tag_Kind is (DIV, UL, DL);
type Format_Info_Type is record
Defined: Boolean := False;
Tag : Tag_Kind;
Size : Integer; -- In relative "units" (based on the normal size). A unit is 125%/80% of normal.
Font : ARM_Output.Font_Family_Type;
Indent : Natural; -- In "units". (A unit is = 2EM of the full sized font).
Right_Indent : Natural; -- In "units". (A unit is = 2EM of the full sized font).
Hang_Outdent : Natural; -- In "units". (A unit is = 2EM of the full sized font).
-- This is the amount that the hanging text hangs out. Normal
-- text starts at Hang_Outdent + Indent "units".
Before : Integer; -- Vertical space before in 0.1 EM.
After : Natural; -- Vertical space after in 0.1 EM.
end record;
-- In the following, "Default" means the Body_Font.
Paragraph_Info : array
(ARM_Output.Paragraph_Style_Type, ARM_Output.Paragraph_Indent_Type) of
Format_Info_Type;
-- Defined below in the body of the package.
-- Are the various styles used??
Paragraph_Used : array (ARM_Output.Paragraph_Style_Type,
ARM_Output.Paragraph_Indent_Type) of Boolean;
Revision_Used : array (ARM_Contents.Change_Version_Type) of Boolean;
Paranum_Used : Boolean;
procedure Free is new Ada.Unchecked_Deallocation (Column_Text_Item_Type, Column_Text_Ptr);
function Make_Clause_Anchor_Name (Output_Object : in HTML_Output_Type;
Clause_Number : in String) return String is
-- Internal routine.
-- Returns the Clause anchor name for the current output object and
-- Clause_Number.
Clause_Name : String(1..10);
Clause_Name_Len : Natural;
begin
if Clause_Number'Length >= 7 and then
Clause_Number(Clause_Number'First .. Clause_Number'First + 5) =
"Annex " then
Clause_Name(1) := Clause_Number(Clause_Number'First + 6);
-- We only want the letter.
Clause_Name_Len := 1;
else
Clause_Name_Len := Clause_Number'Length;
Clause_Name(1..Clause_Name_Len) := Clause_Number;
for I in 1 .. Clause_Name_Len loop
if Clause_Name(I) = '.' then
Clause_Name(I) := '-';
end if;
end loop;
end if;
if Output_Object.DOS_Filenames and (not Output_Object.Big_Files) then
-- If the section number is a single character, then
-- prefix it with '-':
if Clause_Name_Len = 1 then
Clause_Name(2) := Clause_Name(1);
Clause_Name(1) := '-';
Clause_Name_Len := 2;
elsif Clause_Name_Len = 2 then
null;
else
if Clause_Name(2) = '-' then
Clause_Name(2..Clause_Name_Len+1) :=
Clause_Name(1..Clause_Name_Len);
Clause_Name(1) := '-';
Clause_Name_Len := Clause_Name_Len + 1;
end if;
-- OK, the section name is exactly two characters.
-- Figure out the Clause name.
if Clause_Name_Len < 4 or else
Clause_Name(3) /= '-' or else
Clause_Name(4) not in '0'..'9' or else
(Clause_Name_Len >= 5 and then
Clause_Name(5) /= '-' and then Clause_Name(5) not in '0'..'9') or else
(Clause_Name_Len >= 6 and then
Clause_Name(5) /= '-' and then Clause_Name(6) /= '-') then
-- The clause number is 1 or 2 digits following a '-',
-- and is either the end of the string or followed by a '-'.
Ada.Exceptions.Raise_Exception (Program_Error'Identity,
"Weird clause number:" & Clause_Number);
elsif Clause_Name_Len = 4 or else Clause_Name(5) = '-' then
-- Clause is a single digit.
Clause_Name(3..Clause_Name_Len-1) :=
Clause_Name(4..Clause_Name_Len);
Clause_Name_Len := Clause_Name_Len - 1;
elsif Clause_Name(4) = '1' then
-- Clause is 10..19
Clause_Name(3) := Character'Val(
Character'Pos(Clause_Name(5))-Character'Pos('0')+Character'Pos('A'));
Clause_Name(4..Clause_Name_Len-2) :=
Clause_Name(6..Clause_Name_Len);
Clause_Name_Len := Clause_Name_Len - 2;
elsif Clause_Name(4) = '2' then
-- Clause is 20..29
Clause_Name(3) := Character'Val(
Character'Pos(Clause_Name(5))-Character'Pos('0')+Character'Pos('A')+10);
Clause_Name(4..Clause_Name_Len-2) :=
Clause_Name(6..Clause_Name_Len);
Clause_Name_Len := Clause_Name_Len - 2;
elsif Clause_Name(4) = '3' then
-- Clause is 30..39
if Clause_Name(5) > '5' then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"MS-DOS filename: Clause too large=" & Clause_Number);
end if;
Clause_Name(3) := Character'Val(
Character'Pos(Clause_Name(5))-Character'Pos('0')+Character'Pos('A')+20);
Clause_Name(4..Clause_Name_Len-2) :=
Clause_Name(6..Clause_Name_Len);
Clause_Name_Len := Clause_Name_Len - 2;
else
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"MS-DOS filename: Clause too large=" & Clause_Number);
end if;
-- OK, the section number is exactly two characters, and the
-- clause number is exactly one. Figure out the subclause
-- name:
if Clause_Name_Len = 3 then
null; -- We're done, no subclause.
elsif Clause_Name_Len < 5 or else
Clause_Name(4) /= '-' or else
Clause_Name(5) not in '0'..'9' or else
(Clause_Name_Len >= 6 and then
Clause_Name(6) /= '-' and then Clause_Name(6) not in '0'..'9') or else
(Clause_Name_Len >= 7 and then
Clause_Name(6) /= '-' and then Clause_Name(7) /= '-') then
-- The subclause number is 1 or 2 digits following a '-',
-- and is either the end of the string or followed by a '-'.
Ada.Exceptions.Raise_Exception (Program_Error'Identity,
"Weird subclause number:" & Clause_Number);
elsif Clause_Name_Len = 5 or else Clause_Name(6) = '-' then
-- SubClause is a single digit.
Clause_Name(4..Clause_Name_Len-1) :=
Clause_Name(5..Clause_Name_Len);
Clause_Name_Len := Clause_Name_Len - 1;
elsif Clause_Name(5) = '1' then
-- SubClause is 10..19
Clause_Name(4) := Character'Val(
Character'Pos(Clause_Name(6))-Character'Pos('0')+Character'Pos('A'));
Clause_Name(5..Clause_Name_Len-2) :=
Clause_Name(7..Clause_Name_Len);
Clause_Name_Len := Clause_Name_Len - 2;
elsif Clause_Name(5) = '2' then
-- SubClause is 20..29
Clause_Name(4) := Character'Val(
Character'Pos(Clause_Name(6))-Character'Pos('0')+Character'Pos('A')+10);
Clause_Name(5..Clause_Name_Len-2) :=
Clause_Name(7..Clause_Name_Len);
Clause_Name_Len := Clause_Name_Len - 2;
elsif Clause_Name(5) = '3' then
-- SubClause is 30..39
if Clause_Name(6) > '5' then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"MS-DOS filename: Subclause too large=" & Clause_Number);
end if;
Clause_Name(4) := Character'Val(
Character'Pos(Clause_Name(6))-Character'Pos('0')+Character'Pos('A')+20);
Clause_Name(5..Clause_Name_Len-2) :=
Clause_Name(7..Clause_Name_Len);
Clause_Name_Len := Clause_Name_Len - 2;
else
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"MS-DOS filename: Subclause too large=" & Clause_Number);
end if;
-- OK, the section number is exactly two characters, and the
-- clause number is one, and the subclause number is one or zero.
-- Figure out the subsubclause name:
if Clause_Name_Len < 5 then
null; -- We're done, no subsubclause.
elsif Clause_Name_Len < 6 or else
Clause_Name(5) /= '-' or else
Clause_Name(6) not in '0'..'9' or else
(Clause_Name_Len >= 7 and then
Clause_Name(7) not in '0'..'9') or else
(Clause_Name_Len >= 8) then
-- The subsubclause number is 1 or 2 digits following a '-',
-- and is the end of the string
Ada.Exceptions.Raise_Exception (Program_Error'Identity,
"Weird subclause number:" & Clause_Number);
elsif Clause_Name_Len = 6 then
-- SubSubClause is a single digit.
Clause_Name(5) := Clause_Name(6);
Clause_Name_Len := 5;
elsif Clause_Name(6) = '1' then
-- SubSubClause is 10..19
Clause_Name(5) := Character'Val(
Character'Pos(Clause_Name(7))-Character'Pos('0')+Character'Pos('A'));
Clause_Name_Len := 5;
elsif Clause_Name(5) = '2' then
-- SubSubClause is 20..29
Clause_Name(5) := Character'Val(
Character'Pos(Clause_Name(7))-Character'Pos('0')+Character'Pos('A')+10);
Clause_Name_Len := 5;
elsif Clause_Name(5) = '3' then
-- SubSubClause is 30..39
if Clause_Name(6) > '5' then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"MS-DOS filename: Subsubclause too large=" & Clause_Number);
end if;
Clause_Name(5) := Character'Val(
Character'Pos(Clause_Name(7))-Character'Pos('0')+Character'Pos('A')+20);
Clause_Name_Len := 5;
else
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"MS-DOS filename: Subsubclause too large=" & Clause_Number);
end if;
end if;
end if;
return Clause_Name(1..Clause_Name_Len);
end Make_Clause_Anchor_Name;
function Make_Clause_File_Name (Output_Object : in HTML_Output_Type;
Clause_Number : in String) return String is
-- Internal routine.
-- Returns the Clause file name for the current output object and
-- Clause_Number. This does not include any path or extension.
begin
if Output_Object.Big_Files then -- One big file.
return Ada.Strings.Fixed.Trim (Output_Object.File_Prefix, Ada.Strings.Right);
else -- Clause files.
if Output_Object.DOS_Filenames then
return Ada.Strings.Fixed.Trim (Output_Object.File_Prefix, Ada.Strings.Right) &
Make_Clause_Anchor_Name (Output_Object, Clause_Number);
else
return Ada.Strings.Fixed.Trim (Output_Object.File_Prefix, Ada.Strings.Right) &
"-" & Make_Clause_Anchor_Name (Output_Object, Clause_Number);
end if;
end if;
end Make_Clause_File_Name;
function Make_Clause_Link_Name (Output_Object : in HTML_Output_Type;
Clause_Number : in String) return String is
-- Internal routine.
-- Returns the link name for a link to the given clause.
begin
if Output_Object.Big_Files then -- One big file.
-- Note this is a self-reference, so the file name is not needed.
return "#" & Make_Clause_Anchor_Name (Output_Object, Clause_Number);
else -- Clause files.
if Output_Object.DOS_Filenames then
return Make_Clause_File_Name (Output_Object, Clause_Number) & ".HTM";
else
return Make_Clause_File_Name (Output_Object, Clause_Number) & ".html";
end if;
end if;
end Make_Clause_Link_Name;
procedure Put_EMs (Fyle : in Ada.Text_IO.File_Type;
Value : in Natural) is
-- Put an EMs Value (Value is in 0.1 EM).
begin
if Value <= 9 then
Ada.Text_IO.Put (Fyle, '0');
elsif Value <= 99 then
Ada.Text_IO.Put (Fyle, Character'Val(Character'Pos('0') + (Value / 10)));
else
Ada.Text_IO.Put (Fyle, Natural'Image (Value / 10));
end if;
Ada.Text_IO.Put (Fyle, '.');
Ada.Text_IO.Put (Fyle, Character'Val(Character'Pos('0') + (Value Mod 10)));
Ada.Text_IO.Put (Fyle, "em");
end Put_EMs;
procedure Make_Navigation_Bar (Output_Object : in out HTML_Output_Type;
Is_Top : in Boolean) is
-- Internal routine.
-- Generate a properly formatted navigation bar.
Clause : constant String :=
Ada.Strings.Unbounded.To_String(Output_Object.Current_Clause);
begin
if Output_Object.Use_Buttons then
if Is_Top and then Output_Object.HTML_Kind > HTML_3 then
Ada.Text_IO.Put (Output_Object.Output_File, "<div style=""margin-top: 0.6em; margin-bottom: 0.0em"">");
elsif (not Is_Top) and then Output_Object.HTML_Kind > HTML_3 then
Ada.Text_IO.Put (Output_Object.Output_File, "<div style=""margin-top: 0.0em; margin-bottom: 0.6em"">");
else
Ada.Text_IO.Put (Output_Object.Output_File, "<P>");
end if;
Ada.Text_IO.Put (Output_Object.Output_File, "<A HREF=""");
if Output_Object.Big_Files then
Ada.Text_IO.Put (Output_Object.Output_File, "#TOC");
elsif Output_Object.DOS_Filenames then
Ada.Text_IO.Put (Output_Object.Output_File,
Ada.Strings.Fixed.Trim (Output_Object.File_Prefix, Ada.Strings.Right) &
"-TOC.HTM");
else
Ada.Text_IO.Put (Output_Object.Output_File,
Ada.Strings.Fixed.Trim (Output_Object.File_Prefix, Ada.Strings.Right) &
"-TOC.html");
end if;
if Output_Object.DOS_Filenames then
Ada.Text_IO.Put_Line (Output_Object.Output_File, """><IMG SRC=""CONT.GIF"" ALT=""Contents"" BORDER=0></A> ");
-- Border=0 prevents the link highlight from being applied.
else
Ada.Text_IO.Put_Line (Output_Object.Output_File, """><IMG SRC=""cont.gif"" ALT=""Contents"" BORDER=0></A> ");
-- Border=0 prevents the link highlight from being applied.
end if;
if Ada.Strings.Unbounded.Length(Output_Object.Index_URL) /= 0 then
Ada.Text_IO.Put (Output_Object.Output_File, " <A HREF=""");
Ada.Text_IO.Put (Output_Object.Output_File,
Ada.Strings.Unbounded.To_String(Output_Object.Index_URL));
if Output_Object.DOS_Filenames then
Ada.Text_IO.Put_Line (Output_Object.Output_File, """><IMG SRC=""INDEX.GIF"" ALT=""Index"" BORDER=0></A> ");
else
Ada.Text_IO.Put_Line (Output_Object.Output_File, """><IMG SRC=""index.gif"" ALT=""Index"" BORDER=0></A> ");
end if;
else -- Link to the section named "Index".
begin
-- Note: We do the following in one big glup so that if
-- Not_Found_Error is raised, nothing is output.
if Output_Object.DOS_Filenames then
Ada.Text_IO.Put_Line (Output_Object.Output_File, " <A HREF=""" &
Make_Clause_Link_Name (Output_Object,
ARM_Contents.Lookup_Clause_Number ("Index" & (6 .. ARM_Contents.Title_Type'Last => ' '))) &
"""><IMG SRC=""INDEX.GIF"" ALT=""Index"" BORDER=0></A> ");
else
Ada.Text_IO.Put_Line (Output_Object.Output_File, " <A HREF=""" &
Make_Clause_Link_Name (Output_Object,
ARM_Contents.Lookup_Clause_Number ("Index" & (6 .. ARM_Contents.Title_Type'Last => ' '))) &
"""><IMG SRC=""index.gif"" ALT=""Index"" BORDER=0></A> ");
end if;
exception
when ARM_Contents.Not_Found_Error =>
null; -- No section named "Index".
end;
end if;
if Ada.Strings.Unbounded.Length(Output_Object.Ref_URL) /= 0 then
Ada.Text_IO.Put (Output_Object.Output_File, " <A HREF=""");
Ada.Text_IO.Put (Output_Object.Output_File,
Ada.Strings.Unbounded.To_String(Output_Object.Ref_URL));
if Output_Object.DOS_Filenames then
Ada.Text_IO.Put_Line (Output_Object.Output_File, """><IMG SRC=""LIB.GIF"" ALT=""References"" BORDER=0></A> ");
else
Ada.Text_IO.Put_Line (Output_Object.Output_File, """><IMG SRC=""lib.gif"" ALT=""References"" BORDER=0></A> ");
end if;
else -- Link to the section named "References".
begin
-- Note: We do the following in one big glup so that if
-- Not_Found_Error is raised, nothing is output.
if Output_Object.DOS_Filenames then
Ada.Text_IO.Put_Line (Output_Object.Output_File, " <A HREF=""" &
Make_Clause_Link_Name (Output_Object,
ARM_Contents.Lookup_Clause_Number ("References" & (11 .. ARM_Contents.Title_Type'Last => ' '))) &
"""><IMG SRC=""LIB.GIF"" ALT=""References"" BORDER=0></A> ");
else
Ada.Text_IO.Put_Line (Output_Object.Output_File, " <A HREF=""" &
Make_Clause_Link_Name (Output_Object,
ARM_Contents.Lookup_Clause_Number ("References" & (11 .. ARM_Contents.Title_Type'Last => ' '))) &
"""><IMG SRC=""lib.gif"" ALT=""References"" BORDER=0></A> ");
end if;
exception
when ARM_Contents.Not_Found_Error =>
null; -- No section named "References".
end;
end if;
if Ada.Strings.Unbounded.Length(Output_Object.Srch_URL) /= 0 then
Ada.Text_IO.Put (Output_Object.Output_File, " <A HREF=""");
Ada.Text_IO.Put (Output_Object.Output_File,
Ada.Strings.Unbounded.To_String(Output_Object.Srch_URL));
if Output_Object.DOS_Filenames then
Ada.Text_IO.Put_Line (Output_Object.Output_File, """><IMG SRC=""FIND.GIF"" ALT=""Search"" BORDER=0></A> ");
else
Ada.Text_IO.Put_Line (Output_Object.Output_File, """><IMG SRC=""find.gif"" ALT=""Search"" BORDER=0></A> ");
end if;
else -- Link to the section named "References".
begin
-- Note: We do the following in one big glup so that if
-- Not_Found_Error is raised, nothing is output.
if Output_Object.DOS_Filenames then
Ada.Text_IO.Put_Line (Output_Object.Output_File, " <A HREF=""" &
Make_Clause_Link_Name (Output_Object,
ARM_Contents.Lookup_Clause_Number ("Search" & (7 .. ARM_Contents.Title_Type'Last => ' '))) &
"""><IMG SRC=""FIND.GIF"" ALT=""Search"" BORDER=0></A> ");
else
Ada.Text_IO.Put_Line (Output_Object.Output_File, " <A HREF=""" &
Make_Clause_Link_Name (Output_Object,
ARM_Contents.Lookup_Clause_Number ("Search" & (7 .. ARM_Contents.Title_Type'Last => ' '))) &
"""><IMG SRC=""find.gif"" ALT=""Search"" BORDER=0></A> ");
end if;
exception
when ARM_Contents.Not_Found_Error =>
null; -- No section named "Index".
end;
end if;
if Clause /= "" then
begin
-- Note: We do the following in one big glup so that if
-- Not_Found_Error is raised, nothing is output.
Ada.Text_IO.Put (Output_Object.Output_File, " <A HREF=""" &
Make_Clause_Link_Name (Output_Object,
ARM_Contents.Previous_Clause(Clause)));
if Output_Object.DOS_Filenames then
Ada.Text_IO.Put_Line (Output_Object.Output_File, """><IMG SRC=""PREV.GIF"" ALT=""Previous"" BORDER=0></A> ");
else
Ada.Text_IO.Put_Line (Output_Object.Output_File, """><IMG SRC=""prev.gif"" ALT=""Previous"" BORDER=0></A> ");
end if;
exception
when ARM_Contents.Not_Found_Error =>
null; -- Probably the first section.
end;
begin
-- Note: We do the following in one big glup so that if
-- Not_Found_Error is raised, nothing is output.
Ada.Text_IO.Put (Output_Object.Output_File, " <A HREF=""" &
Make_Clause_Link_Name (Output_Object,
ARM_Contents.Next_Clause(Clause)));
if Output_Object.DOS_Filenames then
Ada.Text_IO.Put_Line (Output_Object.Output_File, """><IMG SRC=""NEXT.GIF"" ALT=""Next"" BORDER=0></A> ");
else
Ada.Text_IO.Put_Line (Output_Object.Output_File, """><IMG SRC=""next.gif"" ALT=""Next"" BORDER=0></A> ");
end if;
exception
when ARM_Contents.Not_Found_Error =>
null; -- Probably the last section.
end;
end if;
if Output_Object.HTML_Kind > HTML_3 then
Ada.Text_IO.Put_Line (Output_Object.Output_File, "</div>");
else
Ada.Text_IO.Put_Line (Output_Object.Output_File, "</P>");
end if;
else -- Use text navigation
Ada.Text_IO.Put (Output_Object.Output_File, "<P><A HREF=""");
if Output_Object.Big_Files then
Ada.Text_IO.Put (Output_Object.Output_File, "#TOC");
elsif Output_Object.DOS_Filenames then
Ada.Text_IO.Put (Output_Object.Output_File,
Ada.Strings.Fixed.Trim (Output_Object.File_Prefix, Ada.Strings.Right) &
"-TOC.HTM");
else
Ada.Text_IO.Put (Output_Object.Output_File,
Ada.Strings.Fixed.Trim (Output_Object.File_Prefix, Ada.Strings.Right) &
"-TOC.html");
end if;
Ada.Text_IO.Put (Output_Object.Output_File, """>Contents</A>");
if Ada.Strings.Unbounded.Length(Output_Object.Index_URL) /= 0 then
Ada.Text_IO.Put (Output_Object.Output_File, " ");
Ada.Text_IO.Put (Output_Object.Output_File, "<A HREF=""");
Ada.Text_IO.Put (Output_Object.Output_File,
Ada.Strings.Unbounded.To_String(Output_Object.Index_URL));
Ada.Text_IO.Put (Output_Object.Output_File, """>Index</A>");
else -- Link to the section named "Index".
begin
-- Note: We do the following in one big glup so that if
-- Not_Found_Error is raised, nothing is output.
Ada.Text_IO.Put_Line (Output_Object.Output_File, " <A HREF=""" &
Make_Clause_Link_Name (Output_Object,
ARM_Contents.Lookup_Clause_Number ("Index" & (6 .. ARM_Contents.Title_Type'Last => ' '))) &
""">Index</A>");
exception
when ARM_Contents.Not_Found_Error =>
null; -- No section named "Index".
end;
end if;
if Ada.Strings.Unbounded.Length(Output_Object.Srch_URL) /= 0 then
Ada.Text_IO.Put (Output_Object.Output_File, " ");
Ada.Text_IO.Put (Output_Object.Output_File, "<A HREF=""");
Ada.Text_IO.Put (Output_Object.Output_File,
Ada.Strings.Unbounded.To_String(Output_Object.Srch_URL));
Ada.Text_IO.Put (Output_Object.Output_File, """>Search</A>");
else -- Link to the section named "Search".
begin
-- Note: We do the following in one big glup so that if
-- Not_Found_Error is raised, nothing is output.
Ada.Text_IO.Put_Line (Output_Object.Output_File, " <A HREF=""" &
Make_Clause_Link_Name (Output_Object,
ARM_Contents.Lookup_Clause_Number ("Search" & (7 .. ARM_Contents.Title_Type'Last => ' '))) &
""">Search</A>");
exception
when ARM_Contents.Not_Found_Error =>
null; -- No section named "Search".
end;
end if;
if Ada.Strings.Unbounded.Length(Output_Object.Ref_URL) /= 0 then
Ada.Text_IO.Put (Output_Object.Output_File, " ");
Ada.Text_IO.Put (Output_Object.Output_File, "<A HREF=""");
Ada.Text_IO.Put (Output_Object.Output_File,
Ada.Strings.Unbounded.To_String(Output_Object.Ref_URL));
Ada.Text_IO.Put (Output_Object.Output_File, """>Reference Documents</A>");
else -- Link to the section named "References".
begin
-- Note: We do the following in one big glup so that if
-- Not_Found_Error is raised, nothing is output.
Ada.Text_IO.Put_Line (Output_Object.Output_File, " <A HREF=""" &
Make_Clause_Link_Name (Output_Object,
ARM_Contents.Lookup_Clause_Number ("References" & (11 .. ARM_Contents.Title_Type'Last => ' '))) &
""">Reference Documents</A>");
exception
when ARM_Contents.Not_Found_Error =>
null; -- No section named "References".
end;
end if;
if Clause /= "" then
begin
-- Note: We do the following in one big glup so that if
-- Not_Found_Error is raised, nothing is output.
Ada.Text_IO.Put (Output_Object.Output_File, " <A HREF=""" &
Make_Clause_Link_Name (Output_Object,
ARM_Contents.Previous_Clause(Clause)));
Ada.Text_IO.Put (Output_Object.Output_File, """>Previous</A>");
exception
when ARM_Contents.Not_Found_Error =>
null; -- Probably the first section.
end;
begin
-- Note: We do the following in one big glup so that if
-- Not_Found_Error is raised, nothing is output.
Ada.Text_IO.Put (Output_Object.Output_File, " <A HREF=""" &
Make_Clause_Link_Name (Output_Object,
ARM_Contents.Next_Clause(Clause)));
Ada.Text_IO.Put (Output_Object.Output_File, """>Next</A>");
exception
when ARM_Contents.Not_Found_Error =>
null; -- Probably the last section.
end;
end if;
Ada.Text_IO.Put_Line (Output_Object.Output_File, "</P>");
end if;
end Make_Navigation_Bar;
type Special_Style_Kinds is (None,
Hanging_Term,
Hanging_Body,
Bulleted_Item,
Bulleted_No_Prefix);
procedure Make_Style (Output_Object : in out HTML_Output_Type;
Name : in String;
Style : in ARM_Output.Paragraph_Style_Type;
Indent : in ARM_Output.Paragraph_Indent_Type;
Kind : Special_Style_Kinds := None;
Enumerated_Adjustment : in Boolean := False) is
-- Internal routine.
-- Generate the style needed.
function Units_to_EMs (Value : in Natural) return Natural is
-- Convert Value from indentation units to EMs. (0.1 EMs, really).
Normal : Boolean;
begin
if Output_Object.HTML_Kind = HTML_4_Only then
case Paragraph_Info(Style, Indent).Font is
when ARM_Output.Default =>
Normal := ARM_Output."=" (Output_Object.Body_Font, ARM_Output.Roman);
when ARM_Output.Roman =>
Normal := True;
when ARM_Output.Fixed | ARM_Output.Swiss => -- Start at 90% (otherwise they are huge!)
Normal := False;
end case;
if Normal then
case Paragraph_Info(Style, Indent).Size is
when 0 => return Value * 20;
when 1 => return Value * 16; -- 20/1.25.
when 2 => return Value * 13; -- 20/1.56.
when 3 => return Value * 10; -- 20/1.93.
when -1 => return Value * 25; -- 20/0.80.
when -2 => return Value * 31; -- 20/0.64.
when -3 => return Value * 40; -- 20/0.50.
when others => return Value; -- Out of range.
end case;
else -- Start at 90% (otherwise they are huge!)
case Paragraph_Info(Style, Indent).Size is
when 0 => return Value * 22; -- 20/0.90
when 1 => return Value * 18; -- 20/1.13.
when 2 => return Value * 14; -- 20/1.40.
when 3 => return Value * 11; -- 20/1.75.
when -1 => return Value * 28; -- 20/0.72.
when -2 => return Value * 34; -- 20/0.58.
when -3 => return Value * 44; -- 20/0.45.
when others => return Value; -- Out of range.
end case;
end if;
elsif ARM_Output."=" (Paragraph_Info(Style, Indent).Font, ARM_Output.Fixed) then
-- Special case, see below.
case Paragraph_Info(Style, Indent).Size is
when 0 => return Value * 20;
when 1 => return Value * 16; -- 20/1.25.
when 2 => return Value * 13; -- 20/1.56.
when 3 => return Value * 10; -- 20/1.93.
when -1 => return Value * 25; -- 20/0.80.
when -2 => return Value * 31; -- 20/0.64.
when -3 => return Value * 40; -- 20/0.50.
when others => return Value; -- Out of range.
end case;
else
return Value * 20; -- No font sizes here.
end if;
end Units_to_EMs;
begin
if not Paragraph_Used (Style, Indent) then
return; -- Not used, so don't generate.
end if;
if Kind = Hanging_Term and then Output_Object.HTML_Kind = HTML_4_Only then
-- Special case for better hanging.
Ada.Text_IO.Put (Output_Object.Output_File, " DIV.");
Ada.Text_IO.Put (Output_Object.Output_File, Name & "-Term {");
if OPTIMIZE_FOR_FIREFOX then
-- Tested on Firefox 1.5.
Ada.Text_IO.Put (Output_Object.Output_File, "float: left; ");
-- This does not work on IE: it adds extra spaces, and leaves
-- it effective after a <BR>. We could probably work around
-- those, but then Firefox would look like crap again.
else
Ada.Text_IO.Put (Output_Object.Output_File, "position: absolute; top: auto; left: 0.6em; ");
-- This does not work on Firefox: the text is too high by
-- about half a line and thus doesn't line up properly.
end if;
elsif Kind = Hanging_Body and then Output_Object.HTML_Kind = HTML_4_Only then
Ada.Text_IO.Put (Output_Object.Output_File, " DIV.");
Ada.Text_IO.Put (Output_Object.Output_File, Name & "-Body {");
elsif (Kind = Bulleted_Item or else Kind = Bulleted_No_Prefix) and then
Output_Object.HTML_Kind = HTML_4_Only then
Ada.Text_IO.Put (Output_Object.Output_File, " DIV.");
Ada.Text_IO.Put (Output_Object.Output_File, Name & " {");
else
case Paragraph_Info(Style, Indent).Tag is
when DIV =>
Ada.Text_IO.Put (Output_Object.Output_File, " DIV.");
when UL =>
Ada.Text_IO.Put (Output_Object.Output_File, " UL.");
when DL =>
Ada.Text_IO.Put (Output_Object.Output_File, " DL.");
end case;
Ada.Text_IO.Put (Output_Object.Output_File, Name & " {");
end if;
case Paragraph_Info(Style, Indent).Font is
when ARM_Output.Default =>
if ARM_Output."=" (Output_Object.Body_Font, ARM_Output.Roman) then
Ada.Text_IO.Put (Output_Object.Output_File, "font-family: ""Times New Roman"", Times, serif");
else
Ada.Text_IO.Put (Output_Object.Output_File, "font-family: Arial, Helvetica, sans-serif");
end if;
when ARM_Output.Roman => Ada.Text_IO.Put (Output_Object.Output_File, "font-family: ""Times New Roman"", Times, serif");
when ARM_Output.Swiss => Ada.Text_IO.Put (Output_Object.Output_File, "font-family: Arial, Helvetica, sans-serif");
when ARM_Output.Fixed => Ada.Text_IO.Put (Output_Object.Output_File, "font-family: ""Courier New"", monospace");
end case;
if Output_Object.HTML_Kind = HTML_4_Only then
-- The font size is set by the outer item.
declare
Normal : Boolean;
begin
case Paragraph_Info(Style, Indent).Font is
when ARM_Output.Default =>
Normal := ARM_Output."=" (Output_Object.Body_Font, ARM_Output.Roman);
when ARM_Output.Roman =>
Normal := True;
when ARM_Output.Fixed | ARM_Output.Swiss => -- Start at 90% (otherwise they are huge!)
Normal := False;
end case;
if Normal then
case Paragraph_Info(Style, Indent).Size is
when 0 => null; -- Default.
when 1 => Ada.Text_IO.Put (Output_Object.Output_File, "; font-size: 125%");
when 2 => Ada.Text_IO.Put (Output_Object.Output_File, "; font-size: 156%");
when 3 => Ada.Text_IO.Put (Output_Object.Output_File, "; font-size: 195%");
when -1 => Ada.Text_IO.Put (Output_Object.Output_File, "; font-size: 80%");
when -2 => Ada.Text_IO.Put (Output_Object.Output_File, "; font-size: 64%");
when -3 => Ada.Text_IO.Put (Output_Object.Output_File, "; font-size: 50%");
when others => null; -- Out of range.
end case;
else -- Start at 90% (otherwise they are huge!)
-- Note: This size adjustment is for sections of text, not for in-line text.
case Paragraph_Info(Style, Indent).Size is
when 0 => Ada.Text_IO.Put (Output_Object.Output_File, "; font-size: 90%");
when 1 => Ada.Text_IO.Put (Output_Object.Output_File, "; font-size: 113%");
when 2 => Ada.Text_IO.Put (Output_Object.Output_File, "; font-size: 140%");
when 3 => Ada.Text_IO.Put (Output_Object.Output_File, "; font-size: 175%");
when -1 => Ada.Text_IO.Put (Output_Object.Output_File, "; font-size: 72%");
when -2 => Ada.Text_IO.Put (Output_Object.Output_File, "; font-size: 58%");
when -3 => Ada.Text_IO.Put (Output_Object.Output_File, "; font-size: 45%");
when others => null; -- Out of range.
end case;
end if;
end;
-- Set the leading, because otherwise the lines are too close on IE.
Ada.Text_IO.Put (Output_Object.Output_File, "; line-height: 122%");
elsif ARM_Output."=" (Paragraph_Info(Style, Indent).Font, ARM_Output.Fixed) then
-- Special case because the font otherwise gets too small and
-- loses bold-facing.
case Paragraph_Info(Style, Indent).Size is
when 0 => null; -- Default.
when 1 => Ada.Text_IO.Put (Output_Object.Output_File, "; font-size: 125%");
when 2 => Ada.Text_IO.Put (Output_Object.Output_File, "; font-size: 156%");
when 3 => Ada.Text_IO.Put (Output_Object.Output_File, "; font-size: 195%");
when -1 => Ada.Text_IO.Put (Output_Object.Output_File, "; font-size: 80%");
when -2 => Ada.Text_IO.Put (Output_Object.Output_File, "; font-size: 64%");
when -3 => Ada.Text_IO.Put (Output_Object.Output_File, "; font-size: 50%");
when others => null; -- Out of range.
end case;
-- else the size will be set explicitly for HTML_4_Compatible.
end if;
if Kind = Hanging_Body then
if Output_Object.Number_Paragraphs then
Ada.Text_IO.Put (Output_Object.Output_File, "; margin-left: ");
Put_Ems (Output_Object.Output_File,
Units_to_EMs(Paragraph_Info(Style, Indent).Indent +
Paragraph_Info(Style, Indent).Hang_Outdent) +
INDENT_EMS_FOR_PARANUMS);
else
if Paragraph_Info(Style, Indent).Indent + Paragraph_Info(Style, Indent).Hang_Outdent /= 0 then
Ada.Text_IO.Put (Output_Object.Output_File, "; margin-left: ");
Put_Ems (Output_Object.Output_File,
Units_to_EMs(Paragraph_Info(Style, Indent).Indent +
Paragraph_Info(Style, Indent).Hang_Outdent));
end if;
end if;
elsif Enumerated_Adjustment then
-- Adjust the left margin to indent the prefix slightly (1/4 of a unit):
declare
Org_Margin : Natural :=
Units_to_EMs(Paragraph_Info(Style, Indent).Indent);
Prefix_Indent : Natural :=
Units_to_EMs(1) / 4;
begin
Ada.Text_IO.Put (Output_Object.Output_File, "; margin-left: ");
if Output_Object.Number_Paragraphs then
Put_Ems (Output_Object.Output_File, Org_Margin + Prefix_Indent +
INDENT_EMS_FOR_PARANUMS);
else
Put_Ems (Output_Object.Output_File, Org_Margin + Prefix_Indent);
end if;
end;
else
if Output_Object.Number_Paragraphs then
Ada.Text_IO.Put (Output_Object.Output_File, "; margin-left: ");
Put_Ems (Output_Object.Output_File, Units_to_EMs(Paragraph_Info(Style, Indent).Indent) +
INDENT_EMS_FOR_PARANUMS);
else
if Paragraph_Info(Style, Indent).Indent /= 0 then
Ada.Text_IO.Put (Output_Object.Output_File, "; margin-left: ");
Put_Ems (Output_Object.Output_File, Units_to_EMs(Paragraph_Info(Style, Indent).Indent));
end if;
end if;
end if;
if Kind = Hanging_Term and then Output_Object.HTML_Kind = HTML_4_Only then
-- We let the body provide the necessary right margin. If we don't
-- do this, the following item can end up with an inappropriate indent.
null;
--Ada.Text_IO.Put (Output_Object.Output_File, "; margin-bottom: 0em");
elsif Paragraph_Info(Style, Indent).Right_Indent /= 0 then
Ada.Text_IO.Put (Output_Object.Output_File, "; margin-right: ");
Put_Ems (Output_Object.Output_File, Units_to_EMs(Paragraph_Info(Style, Indent).Right_Indent));
end if;
if Paragraph_Info(Style, Indent).Before /= 0 then
Ada.Text_IO.Put (Output_Object.Output_File, "; margin-top: ");
Put_Ems (Output_Object.Output_File, Paragraph_Info(Style, Indent).Before);
elsif Paragraph_Info(Style, Indent).Tag /= DIV then
-- The default is non-zero.
Ada.Text_IO.Put (Output_Object.Output_File, "; margin-top: 0em");
end if;
if Kind = Hanging_Term and then Output_Object.HTML_Kind = HTML_4_Only then
-- We let the body provide the necessary space below. If we don't
-- do this, the next line can end up with an inappropriate indent.
Ada.Text_IO.Put (Output_Object.Output_File, "; margin-bottom: 0em");
elsif Paragraph_Info(Style, Indent).After /= 0 then
Ada.Text_IO.Put (Output_Object.Output_File, "; margin-bottom: ");
Put_Ems (Output_Object.Output_File, Paragraph_Info(Style, Indent).After);
end if;
if Kind = Bulleted_Item and then Output_Object.HTML_Kind = HTML_4_Only then
-- Set the list item and "disc" format:
Ada.Text_IO.Put (Output_Object.Output_File, "; display: list-item; list-style-type: disc");
end if;
-- Done, close it.
Ada.Text_IO.Put_Line (Output_Object.Output_File, "}");
end Make_Style;
procedure Make_Hung_Text_Style
(Output_Object : in out HTML_Output_Type;
Name : in String;
Style : in ARM_Output.Paragraph_Style_Type;
Indent : in ARM_Output.Paragraph_Indent_Type) is
-- Internal routine.
-- Generate the style needed.
begin
if Output_Object.HTML_Kind = HTML_4_Only then
if ARM_Output."=" (Style, ARM_Output.Enumerated) or else
ARM_Output."=" (Style, ARM_Output.Small_Enumerated) then
Make_Style (Output_Object, Name, Style, Indent,
Kind => Hanging_Term,
Enumerated_Adjustment => True);
else
Make_Style (Output_Object, Name, Style, Indent,
Kind => Hanging_Term);
end if;
else -- HTML_4_Compatible
Ada.Text_IO.Put (Output_Object.Output_File, " DD." & Name & " {");
Ada.Text_IO.Put (Output_Object.Output_File, "margin-left: ");
case Paragraph_Info(Style, Indent).Size is
when 0 => Put_Ems (Output_Object.Output_File, Paragraph_Info(Style, Indent).Hang_Outdent * 20);
when 1 => Put_Ems (Output_Object.Output_File, Paragraph_Info(Style, Indent).Hang_Outdent * 16); -- 20/1.25.
when 2 => Put_Ems (Output_Object.Output_File, Paragraph_Info(Style, Indent).Hang_Outdent * 13); -- 20/1.56.
when -1 => Put_Ems (Output_Object.Output_File, Paragraph_Info(Style, Indent).Hang_Outdent * 25); -- 20/0.80.
when -2 => Put_Ems (Output_Object.Output_File, Paragraph_Info(Style, Indent).Hang_Outdent * 31); -- 20/0.64.
when -3 => Put_Ems (Output_Object.Output_File, Paragraph_Info(Style, Indent).Hang_Outdent * 40); -- 20/0.50.
when others => null; -- Out of range.
end case;
-- Done, close it.
Ada.Text_IO.Put_Line (Output_Object.Output_File, "}");
end if;
end Make_Hung_Text_Style;
function Paragraph_Name
(Style : in ARM_Output.Paragraph_Style_Type;
Indent : in ARM_Output.Paragraph_Indent_Type) return String is
-- Internal routine.
-- Create the name for the Style and Indent.
-- These had better be unique, and all possibilities (including impossible
-- ones) had better have names.
use type ARM_Output.Paragraph_Indent_Type;
begin
case Style is
when ARM_Output.Normal =>
if Indent = 0 then
return "Normal";
else
-- This was: Indent 1: "SyntaxIndented"; Indent 2:
-- "CodeIndented"; Indent 3: "Indented"; Indent 4: "InnerIndented".
return "Indented" & Character'Val(Character'Pos('0') + Indent);
end if;
when ARM_Output.Wide_Above =>
if Indent = 0 then
return "WideAbove";
else
return "Indented" & Character'Val(Character'Pos('0') + Indent) & "WideAbove";
end if;
when ARM_Output.Small =>
if Indent = 0 then
return "Small";
elsif Indent = 1 then
return "Notes";
elsif Indent = 2 then
return "Annotations";
else
-- This was: Indent 3: "SmallSyntaxIndented"; Indent 4:
-- "SmallCodeIndented"; Indent 5: "SmallIndented"; Indent 6: "SmallInnerIndented".
return "SmallIndented" & Character'Val(Character'Pos('0') + Indent);
end if;
when ARM_Output.Small_Wide_Above =>
if Indent = 0 then
return "SmallWideAbove";
elsif Indent = 2 then
return "AnnotationsWideAbove";
else
return "SmallIndented" & Character'Val(Character'Pos('0') + Indent) & "WideAbove";
end if;
when ARM_Output.Header =>
if Indent = 0 then
return "Header";
else
return "Indented" & Character'Val(Character'Pos('0') + Indent) & "Header";
end if;
when ARM_Output.Small_Header =>
if Indent = 0 then
return "SmallHeader";
elsif Indent = 1 then
return "NotesHeader";
else
return "SmallIndented" & Character'Val(Character'Pos('0') + Indent) & "Header";
end if;
when ARM_Output.Index =>
if Indent = 0 then
return "Index";
else -- Should be not used.
return "IndexIndented" & Character'Val(Character'Pos('0') + Indent);
end if;
when ARM_Output.Syntax_Summary =>
if Indent = 1 then
return "SyntaxSummary";
else -- Should be not used.
return "SynSumInd" & Character'Val(Character'Pos('0') + Indent);
end if;
when ARM_Output.Title =>
if Indent = 0 then
return "Title";
else -- Should be not used.
return "TitleIndented" & Character'Val(Character'Pos('0') + Indent);
end if;
when ARM_Output.Examples =>
if Indent = 1 then
return "Examples";
else
return "Indented" & Character'Val(Character'Pos('0') + Indent) & "Examples";
end if;
when ARM_Output.Small_Examples =>
if Indent = 3 then
return "SmallExamples";
else
return "SmallIndented" & Character'Val(Character'Pos('0') + Indent) & "Examples";
end if;
when ARM_Output.Swiss_Examples =>
if Indent = 1 then
return "SwissExamples";
else
return "Indented" & Character'Val(Character'Pos('0') + Indent) & "SwissExamples";
end if;
when ARM_Output.Small_Swiss_Examples =>
if Indent = 3 then
return "SmallSwissExamples";
else
return "SmallIndented" & Character'Val(Character'Pos('0') + Indent) & "SwissExamples";
end if;
when ARM_Output.Bulleted =>
if Indent = 1 then
return "Bulleted";
else
return "Indented" & Character'Val(Character'Pos('0') + Indent) & "Bulleted";
end if;
when ARM_Output.Small_Bulleted =>
if Indent = 3 then
return "SmallBulleted";
else
return "Indented" & Character'Val(Character'Pos('0') + Indent) & "SmallBulleted";
end if;
when ARM_Output.Nested_Bulleted =>
if Indent = 1 then
return "NestedBulleted";
else
return "Indented" & Character'Val(Character'Pos('0') + Indent) & "NestedBulleted";
end if;
when ARM_Output.Small_Nested_Bulleted =>
if Indent = 3 then
return "SmallNestedBulleted";
else
return "Indented" & Character'Val(Character'Pos('0') + Indent) & "SmallNestedBulleted";
end if;
when ARM_Output.Enumerated =>
if Indent = 1 then
return "Enumerated";
else
return "Indented" & Character'Val(Character'Pos('0') + Indent) & "Enumerated";
end if;
when ARM_Output.Small_Enumerated =>
if Indent = 3 then
return "SmallEnumerated";
else
return "Indented" & Character'Val(Character'Pos('0') + Indent) & "SmallEnumerated";
end if;
when ARM_Output.Giant_Hanging =>
if Indent = 4 then
return "GiantHanging";
else
return "Indented" & Character'Val(Character'Pos('0') + Indent) & "GiantHanging";
end if;
when ARM_Output.Small_Giant_Hanging =>
if Indent = 6 then
return "SmallGiantHanging";
else
return "Indented" & Character'Val(Character'Pos('0') + Indent) & "SmallGiantHanging";
end if;
when ARM_Output.Wide_Hanging =>
if Indent = 3 then
return "WideHanging";
else
return "Indented" & Character'Val(Character'Pos('0') + Indent) & "WideHanging";
end if;
when ARM_Output.Small_Wide_Hanging =>
if Indent = 5 then
return "SmallWideHanging";
else
return "Indented" & Character'Val(Character'Pos('0') + Indent) & "SmallWideHanging";
end if;
when ARM_Output.Medium_Hanging =>
if Indent = 2 then
return "MediumHanging";
else
return "Indented" & Character'Val(Character'Pos('0') + Indent) & "MediumHanging";
end if;
when ARM_Output.Small_Medium_Hanging =>
if Indent = 4 then
return "SmallMediumHanging";
else
return "Indented" & Character'Val(Character'Pos('0') + Indent) & "SmallMediumHanging";
end if;
when ARM_Output.Narrow_Hanging =>
if Indent = 1 then
return "NarrowHanging";
else
return "Indented" & Character'Val(Character'Pos('0') + Indent) & "NarrowHanging";
end if;
when ARM_Output.Small_Narrow_Hanging =>
if Indent = 3 then
return "SmallNarrowHanging";
else
return "Indented" & Character'Val(Character'Pos('0') + Indent) & "SmallNarrowHanging";
end if;
when ARM_Output.Hanging_in_Bulleted =>
if Indent = 3 then
return "Hanging_in_Bulleted";
else
return "Indented" & Character'Val(Character'Pos('0') + Indent) & "Hanging_in_Bulleted";
end if;
when ARM_Output.Small_Hanging_in_Bulleted =>
if Indent = 5 then
return "SmallHanging_in_Bulleted";
else
return "Indented" & Character'Val(Character'Pos('0') + Indent) & "SmallHanging_in_Bulleted";
end if;
end case;
end Paragraph_Name;
procedure Make_Paragraph_Styles
(Output_Object : in out HTML_Output_Type) is
-- Internal routine.
-- Generate all of the paragraph and related styles.
begin
-- Basic element styles:
if Paranum_Used then
if Output_Object.HTML_Kind = HTML_4_Compatible then
if OPTIMIZE_FOR_FIREFOX then
Ada.Text_IO.Put_Line (Output_Object.Output_File, " DIV.paranum {float: left; font-family: Arial, Helvetica, sans-serif; width: 2.8em; " &
"margin-left: -0.4em; margin-right: -3.0em; margin-top: 0.2em}");
-- Uses floating items. These usually don't work on IE (it
-- adds extra spaces for no reason). However, with the
-- indents, this seems to work properly on IE, too.
else
-- Absolute positioning (CSS2) works better on IE, but
-- Firefox tends to draw these too high.
Ada.Text_IO.Put_Line (Output_Object.Output_File, " DIV.paranum {position: absolute; font-family: Arial, Helvetica, sans-serif; left: 0.5em; top: auto; margin-top: 0.2em}");
end if;
-- If these are completely ignored, the paragraph number will
-- end up on a line by itself. That's fine.
else
if OPTIMIZE_FOR_FIREFOX then
Ada.Text_IO.Put_Line (Output_Object.Output_File, " DIV.paranum {float: left; font-family: Arial, Helvetica, sans-serif; font-size: 64%; width: 2.8em; " &
"margin-left: -0.4em; margin-right: -3.0em; margin-top: 0.2em}");
-- Uses floating elements; see above.
else
Ada.Text_IO.Put_Line (Output_Object.Output_File, " DIV.paranum {position: absolute; font-family: Arial, Helvetica, sans-serif; font-size: 64%; " &
"left: 0.5em; top: auto; margin-top: 0.2em}");
-- Uses absolute positioning; see above.
end if;
end if;
end if;
Ada.Text_IO.Put_Line (Output_Object.Output_File, " TT {font-family: ""Courier New"", monospace}");
Ada.Text_IO.Put_Line (Output_Object.Output_File, " DT {display: compact}"); -- CSS2. This doesn't seem to work on IE 4.01, but it is harmless.
-- Revision styles:
if Revision_Used ('0') then
Ada.Text_IO.Put_Line (Output_Object.Output_File, " SPAN.insert0 {text-decoration: underline; color: black}");
Ada.Text_IO.Put_Line (Output_Object.Output_File, " SPAN.delete0 {text-decoration: line-through; color: black }");
--Ada.Text_IO.Put_Line (Output_Object.Output_File, " SPAN.both0 {text-decoration: underline, line-through; color: black }");
-- Both doesn't seem to work, so forget it.
-- else not used, don't generate it.
end if;
if Revision_Used ('1') then
Ada.Text_IO.Put_Line (Output_Object.Output_File, " SPAN.insert1 {text-decoration: underline; color: rgb(0,51,51) }"); -- (Very) dark turquoise.
Ada.Text_IO.Put_Line (Output_Object.Output_File, " SPAN.delete1 {text-decoration: line-through; color: rgb(0,51,51) }");
--Ada.Text_IO.Put_Line (Output_Object.Output_File, " SPAN.both1 {text-decoration: underline, line-through; color: rgb(0,51,51) }");
-- Both doesn't seem to work, so forget it.
-- else not used, don't generate it.
end if;
if Revision_Used ('2') then
if Revision_Used ('5') or else Output_Object.Force_New_Revision_Colors then
-- Ugly color here, nice color for #5
Ada.Text_IO.Put_Line (Output_Object.Output_File, " SPAN.insert2 {text-decoration: underline; color: rgb(102,0,153) }"); -- Violet.
Ada.Text_IO.Put_Line (Output_Object.Output_File, " SPAN.delete2 {text-decoration: line-through; color: rgb(102,0,153) }");
--Ada.Text_IO.Put_Line (Output_Object.Output_File, " SPAN.both2 {text-decoration: underline, line-through; color: rgb(102,0,153) }");
-- Both doesn't seem to work, so forget it.
else -- Use the nice green here.
Ada.Text_IO.Put_Line (Output_Object.Output_File, " SPAN.insert2 {text-decoration: underline; color: rgb(0,102,0) }"); -- Dark green.
Ada.Text_IO.Put_Line (Output_Object.Output_File, " SPAN.delete2 {text-decoration: line-through; color: rgb(0,102,0) }");
--Ada.Text_IO.Put_Line (Output_Object.Output_File, " SPAN.both2 {text-decoration: underline, line-through; color: rgb(0,102,0) }");
-- Both doesn't seem to work, so forget it.
end if;
-- else not used, don't generate it.
end if;
if Revision_Used ('3') then
Ada.Text_IO.Put_Line (Output_Object.Output_File, " SPAN.insert3 {text-decoration: underline; color: rgb(102,51,0) }"); -- Dark brown.
Ada.Text_IO.Put_Line (Output_Object.Output_File, " SPAN.delete3 {text-decoration: line-through; color: rgb(102,51,0) }");
--Ada.Text_IO.Put_Line (Output_Object.Output_File, " SPAN.both3 {text-decoration: underline, line-through; color: rgb(102,51,0) }");
-- Both doesn't seem to work, so forget it.
-- else not used, don't generate it.
end if;
if Revision_Used ('4') then
Ada.Text_IO.Put_Line (Output_Object.Output_File, " SPAN.insert4 {text-decoration: underline; color: rgb(153,0,0) }"); -- Dark red.
Ada.Text_IO.Put_Line (Output_Object.Output_File, " SPAN.delete4 {text-decoration: line-through; color: rgb(153,0,0) }");
--Ada.Text_IO.Put_Line (Output_Object.Output_File, " SPAN.both4 {text-decoration: underline, line-through; color: rgb(153,0,0) }");
-- Both doesn't seem to work, so forget it.
-- else not used, don't generate it.
end if;
if Revision_Used ('5') then
Ada.Text_IO.Put_Line (Output_Object.Output_File, " SPAN.insert5 {text-decoration: underline; color: rgb(0,102,0) }"); -- Dark green.
Ada.Text_IO.Put_Line (Output_Object.Output_File, " SPAN.delete5 {text-decoration: line-through; color: rgb(0,102,0) }");
--Ada.Text_IO.Put_Line (Output_Object.Output_File, " SPAN.both5 {text-decoration: underline, line-through; color: rgb(0,102,0) }");
-- Both doesn't seem to work, so forget it.
-- else not used, don't generate it.
end if;
if Revision_Used ('6') then
Ada.Text_IO.Put_Line (Output_Object.Output_File, " SPAN.insert6 {text-decoration: underline; color: rgb(0,102,153) }"); -- Turquiose.
Ada.Text_IO.Put_Line (Output_Object.Output_File, " SPAN.delete6 {text-decoration: line-through; color: rgb(0,102,153) }");
--Ada.Text_IO.Put_Line (Output_Object.Output_File, " SPAN.both6 {text-decoration: underline, line-through; color: rgb(0,102,153) }");
-- Both doesn't seem to work, so forget it.
-- else not used, don't generate it.
end if;
-- Link styles:
-- We don't need these (they're given in the BODY command), but I've
-- kept them in case we want to change these in the future.
--Ada.Text_IO.Put_Line (Output_Object.Output_File, " A:link {color: rgb(0,0,255)}");
--Ada.Text_IO.Put_Line (Output_Object.Output_File, " A:visited {color: rgb(128,0,128)}");
-- The following styles are for the Ada-Auth.Org header. It would be nice
-- if we could skip them if they're not needed, but we don't have the
-- information needed to do that.
Ada.Text_IO.Put_Line (Output_Object.Output_File, " A.Bar:link {font-family: Arial, Helvetica, sans-serif; font-style: normal; text-decoration: none; color: rgb(204,204,51)}");
Ada.Text_IO.Put_Line (Output_Object.Output_File, " A.Bar:visited {font-family: Arial, Helvetica, sans-serif; font-style: normal; text-decoration: none; color: rgb(204,204,51)}");
-- Paragraph styles:
for S in ARM_Output.Unprefixed_Style_Subtype loop
for I in ARM_Output.Paragraph_Indent_Type loop
Make_Style (Output_Object, Paragraph_Name (S, I), S, I);
end loop;
end loop;
for S in ARM_Output.Bullet_Prefixed_Style_Subtype loop
-- These styles do not allow Indent 0.
for I in 1 .. ARM_Output.Paragraph_Indent_Type'Last loop
if Output_Object.HTML_Kind = HTML_4_Only then
Make_Style (Output_Object, Paragraph_Name (S, I) & "-NoPrefix", S, I,
Kind => Bulleted_No_Prefix);
Make_Style (Output_Object, Paragraph_Name (S, I), S, I,
Kind => Bulleted_Item);
else
Make_Style (Output_Object, Paragraph_Name (S, I), S, I);
end if;
end loop;
end loop;
for S in ARM_Output.Text_Prefixed_Style_Subtype loop
-- These styles do not allow Indent 0.
for I in 1 .. ARM_Output.Paragraph_Indent_Type'Last loop
if Paragraph_Used (S, I) then
Make_Style (Output_Object, Paragraph_Name (S, I), S, I, Kind => Hanging_Body);
Make_Hung_Text_Style (Output_Object, Paragraph_Name (S, I), S, I);
-- else not used.
end if;
end loop;
end loop;
end Make_Paragraph_Styles;
MAGIC_STYLE_MARKER : constant String := "&%$# STYLES GO HERE #$%&";
procedure Start_HTML_File (Output_Object : in out HTML_Output_Type;
File_Name : in String;
Title : in String;
Clause : in String) is
-- Internal routine.
-- Create an HTML file, and generate the needed text to start an HTML
-- file. The file name is just the name portion, not the path or
-- extension. Clause is the properly formatted Clause number for
-- this file, if known.
begin
--Ada.Text_IO.Put_Line ("--Creating " & File_Name & ".html");
if Output_Object.HTML_Kind > HTML_3 then
Ada.Text_IO.Create (Output_Object.Output_File, Ada.Text_IO.Out_File,
Ada.Strings.Unbounded.To_String (Output_Object.Output_Path) &
File_Name & ".$$$");
elsif Output_Object.DOS_Filenames then
Ada.Text_IO.Create (Output_Object.Output_File, Ada.Text_IO.Out_File,
Ada.Strings.Unbounded.To_String (Output_Object.Output_Path) &
File_Name & ".HTM");
else
Ada.Text_IO.Create (Output_Object.Output_File, Ada.Text_IO.Out_File,
Ada.Strings.Unbounded.To_String (Output_Object.Output_Path) &
File_Name & ".html");
end if;
-- Save the current clause:
Output_Object.Current_Clause :=
Ada.Strings.Unbounded.To_Unbounded_String(Clause);
-- File introduction:
if Output_Object.HTML_Kind > HTML_3 then
Ada.Text_IO.Put_Line (Output_Object.Output_File, "<!DOCTYPE HTML PUBLIC ""-//W3C//DTD HTML 4.01 Transitional//EN""");
Ada.Text_IO.Put_Line (Output_Object.Output_File, """http://www.w3.org/TR/html4/loose.dtd"">"); -- HTML 4.01 (with depreciated features)
else
Ada.Text_IO.Put_Line (Output_Object.Output_File, "<!DOCTYPE HTML PUBLIC ""-//W3C//DTD HTML 3.2//EN"">"); -- HTML 3.2
end if;
-- so the result can be used on version 3 browsers.)
Ada.Text_IO.Put_Line (Output_Object.Output_File, "<HTML>");
-- Header information:
Ada.Text_IO.Put_Line (Output_Object.Output_File, "<HEAD>");
Ada.Text_IO.Put_Line (Output_Object.Output_File, " <TITLE>" & Title & "</TITLE>");
Ada.Text_IO.Put_Line (Output_Object.Output_File, " <META http-equiv=""Content-Type"" content=""text/html; charset=iso-8859-1"">");
Ada.Text_IO.Put_Line (Output_Object.Output_File, " <META NAME=""Author"" CONTENT=""JTC1/SC22/WG9/ARG, by Randall Brukardt, ARG Editor"">");
Ada.Text_IO.Put_Line (Output_Object.Output_File, " <META NAME=""GENERATOR"" CONTENT=""Arm_Form.Exe, Ada Reference Manual generator"">");
if Output_Object.HTML_Kind = HTML_4_Only then
-- The style sheet.
Ada.Text_IO.Put_Line (Output_Object.Output_File, " <STYLE type=""text/css"">");
-- Element styles:
Ada.Text_IO.Put_Line (Output_Object.Output_File, " H4.centered {text-align: center}");
Ada.Text_IO.Put_Line (Output_Object.Output_File, " SPAN.swiss {font-family: Arial, Helvetica, sans-serif; font-size: 92%}");
Ada.Text_IO.Put_Line (Output_Object.Output_File, " SPAN.roman {font-family: ""Times New Roman"", Times, serif}");
-- Paragraph styles:
--Paragraph_Used := (others => (others => True)); -- Force showing all, we don't know what is used.
--Revision_Used := (others => True);
--Paranum_Used := True;
--Make_Paragraph_Styles (Output_Object);
-- Dummy line to be replaced after the file is created.
Ada.Text_IO.Put_Line (Output_Object.Output_File, MAGIC_STYLE_MARKER);
Paragraph_Used := (others => (others => False));
Revision_Used := (others => False);
Paranum_Used := False;
Ada.Text_IO.Put_Line (Output_Object.Output_File, " </STYLE>");
elsif Output_Object.HTML_Kind = HTML_4_Compatible then
-- The style sheet.
Ada.Text_IO.Put_Line (Output_Object.Output_File, " <STYLE type=""text/css"">");
-- Paragraph styles:
--Paragraph_Used := (others => (others => True)); -- Force showing all, we don't know what is used.
--Revision_Used := (others => True);
--Paranum_Used := True;
--Make_Paragraph_Styles (Output_Object);
-- Dummy line to be replaced after the file is created.
Ada.Text_IO.Put_Line (Output_Object.Output_File, MAGIC_STYLE_MARKER);
Paragraph_Used := (others => (others => False));
Revision_Used := (others => False);
Paranum_Used := False;
Ada.Text_IO.Put_Line (Output_Object.Output_File, " </STYLE>");
end if;
if Ada.Strings.Unbounded.Length(Output_Object.Script_HTML) /= 0 then
Ada.Text_IO.Put_Line (Output_Object.Output_File,
Ada.Strings.Unbounded.To_String(Output_Object.Script_HTML));
end if;
Ada.Text_IO.Put_Line (Output_Object.Output_File, "</HEAD>");
Ada.Text_IO.Put_Line (Output_Object.Output_File,
"<BODY TEXT=""" & Output_Object.Text_Color &
""" BGCOLOR=""" & Output_Object.Background_Color &
""" LINK=""" & Output_Object.Link_Color &
""" VLINK=""" & Output_Object.VLink_Color &
""" ALINK=""" & Output_Object.ALink_Color & """>");
if Ada.Strings.Unbounded.Length(Output_Object.Header_HTML) /= 0 then
Ada.Text_IO.Put_Line (Output_Object.Output_File,
Ada.Strings.Unbounded.To_String(Output_Object.Header_HTML));
end if;
if Output_Object.Nav_on_Top then
Make_Navigation_Bar (Output_Object, Is_Top => True);
-- else no navigation bar
end if;
if Output_Object.Nav_on_Top or else
Ada.Strings.Unbounded.Length(Output_Object.Header_HTML) /= 0 then
Ada.Text_IO.Put_Line (Output_Object.Output_File, "<HR>"); -- Horizontal line (rule).
-- else nothing on top at all.
end if;
end Start_HTML_File;
procedure End_HTML_File (Output_Object : in out HTML_Output_Type) is
-- Internal routine.
-- Generate the needed text to end an HTML file. Also closes the file.
begin
Ada.Text_IO.New_Line (Output_Object.Output_File); -- Blank line to set off paragraphs.
if Output_Object.Nav_on_Bottom or else
Ada.Strings.Unbounded.Length(Output_Object.Footer_HTML) /= 0 then
Ada.Text_IO.Put_Line (Output_Object.Output_File, "<HR>"); -- Horizontal line (rule).
-- else nothing on top at all.
end if;
if Output_Object.Nav_on_Bottom then
Make_Navigation_Bar (Output_Object, Is_Top => False);
-- else no navigation bar.
end if;
if Ada.Strings.Unbounded.Length(Output_Object.Footer_HTML) /= 0 then
Ada.Text_IO.Put_Line (Output_Object.Output_File,
Ada.Strings.Unbounded.To_String(Output_Object.Footer_HTML));
end if;
Ada.Text_IO.Put_Line (Output_Object.Output_File, "</BODY>");
Ada.Text_IO.Put_Line (Output_Object.Output_File, "</HTML>");
if Output_Object.HTML_Kind <= HTML_3 then
Ada.Text_IO.Close (Output_Object.Output_File);
else -- Close and reread the file to add JUST the styles used by the
-- file; this decreases the minimum size of the files (by as
-- much as 7K as of this writing [1/2006]), which matters when
-- there are hundreds.
-- We also check spaces before end tags and after opening tags;
-- these should be . (See 9.1 in HTML 4.0: "In order to
-- avoid problems with SGML line break rules and inconsistencies
-- among extant implementations, authors should not rely on user
-- agents to render white space immediately after a start tag or
-- immediately before an end tag.") We haven't seen a problem
-- with this, but why ask for trouble?
-- Note that we assume that all occurrences of "<" and ">" in
-- the literal text are written as "<" and ">"; violations
-- might cause the conversion of spaces to non-breaking spaces,
-- which should not cause problems in general. We also assume that
-- all end tags are on one line (they are all very short), so
-- any ">" is the end of a start tag unless there is a "</" preceding it.
declare
Original_Name : constant String := Ada.Text_IO.Name (Output_Object.Output_File);
Reading_File : Ada.Text_IO.File_Type;
Real_Name : constant String :=
Ada.Strings.Fixed.Head (Original_Name, Original_Name'Length-3);
Buffer : String (1..1000);
Len : Natural;
Body_Seen : Boolean := False;
Loc : Natural;
begin
Ada.Text_IO.Close (Output_Object.Output_File);
Ada.Text_IO.Open (Reading_File, Ada.Text_IO.In_File,
Original_Name);
if Output_Object.DOS_Filenames then
Ada.Text_IO.Create (Output_Object.Output_File, Ada.Text_IO.Out_File,
Real_Name & "HTM");
else
Ada.Text_IO.Create (Output_Object.Output_File, Ada.Text_IO.Out_File,
Real_Name & "html");
end if;
begin
loop
Ada.Text_IO.Get_Line (Reading_File, Buffer, Len);
if Buffer(1..Len) = MAGIC_STYLE_MARKER then
-- Output only the styles used here.
Make_Paragraph_Styles (Output_Object);
elsif not Body_Seen then
if Ada.Strings.Fixed.Index (Buffer(1..Len), "<BODY") /= 0 then
Body_Seen := True;
end if;
Ada.Text_IO.Put_Line (Output_Object.Output_File, Buffer(1..Len));
else
-- Replace spaces before end tags:
loop
Loc := Ada.Strings.Fixed.Index (Buffer(1..Len), " </");
exit when Loc = 0;
Buffer(Loc+6..Len+5) := Buffer(Loc+1..Len);
Buffer(Loc..Loc+5) := " ";
Len := Len+5;
end loop;
-- Replace spaces after start tags:
Loc := 1;
while Loc < Len loop
if Buffer(Loc..Loc+1) = "> " then
-- Candidate; check that this isn't an end tag.
for I in reverse 1..Loc-1 loop
if Buffer(I) = '/' then
-- End tag, nothing to do.
Loc := Loc + 2;
exit;
elsif Buffer(I) = '<' or else I = 1 then
-- Start tag (including reaching the
-- start of the line), replace.
Buffer(Loc+7..Len+5) := Buffer(Loc+2..Len);
Buffer(Loc+1..Loc+6) := " ";
Len := Len+5;
Loc := Loc + 7;
-- If these is the *last* character on the
-- line, we have to "unbreak" the line, else we'd get an extra space.
if Loc > Len then
Ada.Text_IO.Put (Output_Object.Output_File, Buffer(1..Len));
goto Skip_Write;
end if;
exit;
-- else continue.
end if;
end loop;
else
Loc := Loc + 1;
end if;
end loop;
Ada.Text_IO.Put_Line (Output_Object.Output_File, Buffer(1..Len));
<<Skip_Write>> null;
end if;
end loop;
exception
when Ada.Text_IO.End_Error => null; -- Done copying.
end;
Ada.Text_IO.Close (Output_Object.Output_File);
Ada.Text_IO.Delete (Reading_File); -- This was temporary.
end;
end if;
end End_HTML_File;
procedure Create (Output_Object : in out HTML_Output_Type;
Big_Files : in Boolean;
File_Prefix : in String;
Output_Path : in String;
DOS_Filenames : in Boolean;
HTML_Kind : in HTML_Type;
Use_Unicode : in Boolean;
Number_Paragraphs : in Boolean;
Ref_URL : in String;
Srch_URL : in String;
Index_URL : in String;
Use_Buttons : Boolean;
Nav_On_Top : Boolean;
Nav_On_Bottom : Boolean;
Tab_Emulation : Tab_Emulation_Type;
Script_HTML : String;
Header_HTML : String;
Footer_HTML : String;
Title : in String := "";
Body_Font : ARM_Output.Font_Family_Type;
Force_New_Revision_Colors : Boolean;
Text_Color : Color_String;
Background_Color : Color_String;
Link_Color : Color_String;
VLink_Color : Color_String;
ALink_Color : Color_String) is
-- Create an Output_Object for a document.
-- Generate a few large output files if
-- Big_Files is True; otherwise generate smaller output files.
-- The prefix of the output file names is File_Prefix - this
-- should be no more than 5 characters allowed in file names.
-- The files will be written into Output_Path.
-- If DOS_Filename is true, use 8.3 file names;
-- in that case, File_Prefix must be less than 4 characters in length;
-- and no clause or subclause number may exceed 35 if Big_Files is False.
-- The title of the document is Title.
-- HTML_Kind determines the kind of HTML generated; HTML_3 works on
-- every browser but has little control over formatting;
-- HTML_4_Compatible has better control, but tries to make the results
-- look good on older browsers; HTML_4_Only uses maximum formatting,
-- but makes no attempt to look good on browsers older than IE 5.0 and
-- Firefox 1.0.
-- If Use_Unicode is true, Unicode characters available on US versions
-- of Windows 2000 are used when appropriate; otherwise, Unicode
-- characters are only used when explicitly requested with
-- Unicode_Character (other characters are replaced with reasonable
-- equivalents). [Note: It's known that IE on Windows 95/98/ME cannot
-- display Unicode characters.] Use_Unicode has no effect if HTML_Kind
-- is set to HTML_3.
-- Number_Paragraphs means that paragraph numbers will be used;
-- otherwise, the Number parameter to Start_Paragraph must be "".
-- Ref_URL, Srch_URL, and Index_URL are the URLs (possibly relative)
-- for the "References", "Search", and "Index" buttons/labels,
-- respectively. If null, these buttons/labels link to sections named
-- "References", "Search", and "Index"; if these do not exist, the
-- buttons/labels are omitted.
-- If Use_Buttons is true, button images are used, otherwise text labels
-- are used for the navigation bar.
-- If Nav_On_Top is true, the navigation bar will appear in the header
-- of each page. If Nav_On_Bottom is true, the navigation bar will
-- appear in the footer of each page.
-- Tab_Emulation determines how tabs are emulated.
-- Script_HTML gives self-contained HTML that will appear immediately
-- before the </HEAD> of every page. This usually will contain
-- Javascript scripts or CSS styles. The original intent was to allow
-- adding the Google Analytics script to each page.
-- Header_HTML gives self-contained HTML that will appear before the
-- navigation bar in the header. Footer_HTML gives self-contained HTML
-- that will appear after the navigation bar in the footer.
-- Body_Font selects the default font for the document body.
-- Text_Color specifies the default text color; Background_Color
-- specifies the default background color; Link_Color specifies the
-- default color of normal links; VLink_Color specifies the
-- default color of visited links; and ALink_Color specifies the
-- default color of active (in the act of clinking) links.
begin
if Output_Object.Is_Valid then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Already valid object");
end if;
Output_Object.Is_Valid := True;
Ada.Strings.Fixed.Move (Target => Output_Object.File_Prefix,
Source => File_Prefix);
Output_Object.Title := Ada.Strings.Unbounded.To_Unbounded_String (Title);
Output_Object.Big_Files := Big_Files;
Output_Object.Output_Path := Ada.Strings.Unbounded.To_Unbounded_String(Output_Path);
Output_Object.DOS_Filenames := DOS_Filenames;
Output_Object.HTML_Kind := HTML_Kind;
Output_Object.Use_Unicode := Use_Unicode;
Output_Object.Number_Paragraphs := Number_Paragraphs;
Output_Object.Ref_URL := Ada.Strings.Unbounded.To_Unbounded_String(Ref_URL);
Output_Object.Srch_URL := Ada.Strings.Unbounded.To_Unbounded_String(Srch_URL);
Output_Object.Index_URL := Ada.Strings.Unbounded.To_Unbounded_String(Index_URL);
Output_Object.Use_Buttons := Use_Buttons;
Output_Object.Nav_on_Top := Nav_on_Top;
Output_Object.Nav_on_Bottom := Nav_on_Bottom;
Output_Object.Tab_Emulation := Tab_Emulation;
Output_Object.Script_HTML := Ada.Strings.Unbounded.To_Unbounded_String(Script_HTML);
Output_Object.Header_HTML := Ada.Strings.Unbounded.To_Unbounded_String(Header_HTML);
Output_Object.Footer_HTML := Ada.Strings.Unbounded.To_Unbounded_String(Footer_HTML);
Output_Object.Body_Font := Body_Font;
Output_Object.Force_New_Revision_Colors := Force_New_Revision_Colors;
Output_Object.Text_Color := Text_Color;
Output_Object.Background_Color := Background_Color;
Output_Object.Link_Color := Link_Color;
Output_Object.VLink_Color := VLink_Color;
Output_Object.ALink_Color := ALink_Color;
if DOS_Filenames then
if File_Prefix'Length > 3 then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"HTML File Prefix too long - MS-DOS mode");
end if;
else
if File_Prefix'Length > 5 then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"HTML File Prefix too long");
end if;
end if;
if Output_Object.Big_Files then
Start_HTML_File (Output_Object,
Ada.Strings.Fixed.Trim (Output_Object.File_Prefix, Ada.Strings.Right),
Ada.Strings.Unbounded.To_String (Output_Object.Title),
Clause => "");
-- Insert an anchor for the title page:
Ada.Text_IO.Put_Line (Output_Object.Output_File, "<A NAME=""TTL""></A>");
end if;
end Create;
procedure Close (Output_Object : in out HTML_Output_Type) is
-- Close an Output_Object. No further output to the object is
-- allowed after this call.
begin
if not Output_Object.Is_Valid then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Not valid object");
end if;
if Ada.Text_IO.Is_Open (Output_Object.Output_File) then
End_HTML_File (Output_Object);
end if;
Output_Object.Is_Valid := False;
end Close;
procedure Section (Output_Object : in out HTML_Output_Type;
Section_Title : in String;
Section_Name : in String) is
-- Start a new section. The title is Section_Title (this is
-- intended for humans). The name is Section_Name (this is
-- intended to be suitable to be a portion of a file name).
begin
if not Output_Object.Is_Valid then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Not valid object");
end if;
if Output_Object.Is_In_Paragraph then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Section in paragraph");
end if;
-- We don't generate a file here for HTML. We generate a file for each
-- clause.
if Section_Name'Length > 3 then
Output_Object.Section_Name := Section_Name (Section_Name'First .. Section_Name'First + 2);
else
Output_Object.Section_Name := (others => '-');
Output_Object.Section_Name (1 .. Section_Name'Length) := Section_Name;
end if;
end Section;
procedure Set_Columns (Output_Object : in out HTML_Output_Type;
Number_of_Columns : in ARM_Output.Column_Count) is
-- Set the number of columns.
-- Raises Not_Valid_Error if in a paragraph.
begin
if not Output_Object.Is_Valid then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Not valid object");
end if;
if Output_Object.Is_In_Paragraph then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"In paragraph");
end if;
if Number_of_Columns >= 4 then
-- We have special processing for 4 or more columns. Note that we
-- assume do not contain any nested paragraph formats.
Output_Object.Current_Column := 1;
Output_Object.Current_Item := 1;
elsif Output_Object.Column_Count >= 4 and then Number_of_Columns = 1 then
-- Finished processing columns, output the columns as a table.
if Output_Object.Current_Column = 1 then
-- No New_Column calls; break this into columns ourselves.
-- Current_Item represents the total number of items + 2
-- (there is a double count for the end of the paragraph).
declare
Col_Count : Natural := Output_Object.Current_Item - 2;
Where : Column_Text_Ptr;
begin
Col_Count := (Col_Count + Output_Object.Column_Count - 1) /
Output_Object.Column_Count;
Ada.Text_IO.Put_Line(" @@ Calc columns for" & Natural'Image(Output_Object.Column_Count) &
" columns;" & Natural'Image(Output_Object.Current_Item - 1) & " total items;" &
Natural'Image(Col_Count) & " per column.");
-- Split the item list into the appropriate columns.
-- Note that this list is stored in reverse order.
for I in reverse 2 .. Output_Object.Column_Count loop
--Ada.Text_IO.Put_Line(" @@ For column" & Natural'Image(I) & " split at item" &
--Natural'Image(Col_Count*(I-1)));
Where := Output_Object.Column_Text(1);
exit when Where = null; -- No columns to look at.
if Where.Item <= Col_Count*(I-1) then
-- This column is empty.
null;
else
Output_Object.Column_Text(I) := Where;
while Where.Next /= null and then
Where.Next.Item > Col_Count*(I-1) loop
Where.Item := Where.Item - Col_Count*(I-1);
Where := Where.Next;
end loop;
if Where = null then
Output_Object.Column_Text(1) := null;
else
Output_Object.Column_Text(1) := Where.Next;
Where.Next := null;
--Ada.Text_IO.Put_Line(" split item=" & Natural'Image(Where.Item));
Where.Item := Where.Item - Col_Count*(I-1);
end if;
end if;
end loop;
end;
--else there were explicit New_Column calls; no need to
--do anything here.
end if;
if Output_Object.HTML_Kind = HTML_3 then
Ada.Text_IO.Put_Line (Output_Object.Output_File, "<UL><UL><TABLE Width=""70%"">"); -- Table with no border or caption, takes up 70% of the screen.
else
Ada.Text_IO.Put_Line (Output_Object.Output_File,
"<div class=""" & Paragraph_Name (ARM_Output.Normal, 2) & """><table width=""70%"">"); -- Table with no border or caption, takes up 70% of the screen.
Paragraph_Used(ARM_Output.Normal, 2) := True;
end if;
-- And start the first row:
Ada.Text_IO.Put (Output_Object.Output_File, "<TR><TD align=""left"">");
for Item in 1 .. 5000 loop
for Col in 1 .. Output_Object.Column_Count loop
declare
Find : Column_Text_Ptr := Output_Object.Column_Text(Col);
Temp : Column_Text_Ptr;
begin
-- We're going to free this item after outputting it.
if Find = null then
null;
elsif Find.Next = null then
if Find.Item /= Item then
Find := null;
else
Output_Object.Column_Text(Col) := null;
end if;
else
while Find.Next /= null and then Find.Next.Item /= Item loop
Find := Find.Next;
end loop;
Temp := Find;
Find := Find.Next;
Temp.Next := null;
end if;
if Find /= null then
Ada.Text_IO.Put (Output_Object.Output_File,
Find.Text (1 .. Find.Length));
-- This should always be the last item:
if Find.Next /= null then
Ada.Text_IO.Put_Line ("** Column Item invariant failure!");
end if;
Free (Find);
else -- No item, make a blank.
Ada.Text_IO.Put (Output_Object.Output_File,
" ");
end if;
end;
Ada.Text_IO.Put (Output_Object.Output_File, "<TD align=""left"">");
end loop;
if Output_Object.Column_Text = Column_Text_Ptrs_Type'(others => null) then
-- We've output everything.
Ada.Text_IO.New_Line (Output_Object.Output_File);
if Output_Object.HTML_Kind = HTML_3 then
Ada.Text_IO.Put_Line (Output_Object.Output_File, "</TABLE></UL></UL>");
else
Ada.Text_IO.Put_Line (Output_Object.Output_File, "</table></div>");
end if;
exit;
end if;
-- End the row:
Ada.Text_IO.New_Line (Output_Object.Output_File);
Ada.Text_IO.Put (Output_Object.Output_File, "<TR><TD align=""left"">");
end loop;
Output_Object.Current_Column := 0;
Output_Object.Current_Item := 0;
-- else Two and Three column formats are displayed without any columns.
-- This is mainly used for the syntax cross-reference and index, and
-- these definitely look better without columns.
end if;
Output_Object.Column_Count := Number_of_Columns;
end Set_Columns;
procedure Check_Clause_File (Output_Object : in out HTML_Output_Type) is
-- Check that a Clause file has been made for this clause; if not,
-- create one.
begin
if not Ada.Text_IO.Is_Open (Output_Object.Output_File) then
if (not Output_Object.Big_Files) and then
Output_Object.DOS_Filenames and then
Output_Object.Section_Name(1) = '-' then
Start_HTML_File (Output_Object,
Ada.Strings.Fixed.Trim (Output_Object.File_Prefix, Ada.Strings.Right) &
Make_Clause_Anchor_Name (Output_Object, Output_Object.Section_Name(2..3)), "", Clause => "");
else
Start_HTML_File (Output_Object,
Ada.Strings.Fixed.Trim (Output_Object.File_Prefix, Ada.Strings.Right) &
"-" & Output_Object.Section_Name, "", Clause => "");
end if;
end if;
end Check_Clause_File;
procedure Put_Compatibility_Font_Info (Output_Object : in out HTML_Output_Type;
Style : in ARM_Output.Paragraph_Style_Type;
Indent : in ARM_Output.Paragraph_Indent_Type) is
-- Internal:
-- Output the font information for HTML 4.0 compatibility mode.
begin
if Output_Object.HTML_Kind = HTML_4_Compatible then
case Paragraph_Info(Style, Indent).Font is
when ARM_Output.Default =>
if ARM_Output."=" (Output_Object.Body_Font, ARM_Output.Swiss) then
Ada.Text_IO.Put (Output_Object.Output_File, SWISS_FONT_CODE);
Output_Object.Char_Count := Output_Object.Char_Count + SWISS_FONT_CODE'Length;
-- else nothing for Roman.
end if;
when ARM_Output.Roman =>
null;
when ARM_Output.Swiss =>
Ada.Text_IO.Put (Output_Object.Output_File, SWISS_FONT_CODE);
Output_Object.Char_Count := Output_Object.Char_Count + SWISS_FONT_CODE'Length;
when ARM_Output.Fixed =>
Ada.Text_IO.Put (Output_Object.Output_File, "<TT>");
Output_Object.Char_Count := Output_Object.Char_Count + 4;
end case;
if ARM_Output."=" (Paragraph_Info(Style, Indent).Font, ARM_Output.Fixed) then
null; -- No font change here.
else
case Paragraph_Info(Style, Indent).Size is
when 0 => null;
when 1 =>
Ada.Text_IO.Put (Output_Object.Output_File, "<font size=""+1"">");
Output_Object.Char_Count := Output_Object.Char_Count + 16;
when 2 =>
Ada.Text_IO.Put (Output_Object.Output_File, "<font size=""+2"">");
Output_Object.Char_Count := Output_Object.Char_Count + 16;
when 3 =>
Ada.Text_IO.Put (Output_Object.Output_File, "<font size=""+3"">");
Output_Object.Char_Count := Output_Object.Char_Count + 16;
when -1 =>
Ada.Text_IO.Put (Output_Object.Output_File, "<font size=""-1"">");
Output_Object.Char_Count := Output_Object.Char_Count + 16;
when -2 =>
Ada.Text_IO.Put (Output_Object.Output_File, "<font size=""-2"">");
Output_Object.Char_Count := Output_Object.Char_Count + 16;
when -3 =>
Ada.Text_IO.Put (Output_Object.Output_File, "<font size=""-3"">");
Output_Object.Char_Count := Output_Object.Char_Count + 16;
when others => null; -- Not supported.
end case;
end if;
end if;
end Put_Compatibility_Font_Info;
procedure Put_End_Compatibility_Font_Info (Output_Object : in out HTML_Output_Type;
Style : in ARM_Output.Paragraph_Style_Type;
Indent : in ARM_Output.Paragraph_Indent_Type) is
-- Internal:
-- Output the font information for HTML 4.0 compatibility mode.
begin
if Output_Object.HTML_Kind = HTML_4_Compatible then
if ARM_Output."=" (Paragraph_Info(Style, Indent).Font, ARM_Output.Fixed) then
null; -- No font change here.
else
case Paragraph_Info(Style, Indent).Size is
when 0 => null;
when 1 =>
Ada.Text_IO.Put (Output_Object.Output_File, "</font>");
when 2 =>
Ada.Text_IO.Put (Output_Object.Output_File, "</font>");
when -1 =>
Ada.Text_IO.Put (Output_Object.Output_File, "</font>");
when -2 =>
Ada.Text_IO.Put (Output_Object.Output_File, "</font>");
when -3 =>
Ada.Text_IO.Put (Output_Object.Output_File, "</font>");
when others => null; -- Not supported.
end case;
end if;
case Paragraph_Info(Style, Indent).Font is
when ARM_Output.Default =>
if ARM_Output."=" (Output_Object.Body_Font, ARM_Output.Swiss) then
Ada.Text_IO.Put (Output_Object.Output_File, "</font>");
-- else nothing for Roman.
end if;
when ARM_Output.Roman =>
null;
when ARM_Output.Swiss =>
Ada.Text_IO.Put (Output_Object.Output_File, "</font>");
when ARM_Output.Fixed =>
Ada.Text_IO.Put (Output_Object.Output_File, "</tt>");
end case;
end if;
end Put_End_Compatibility_Font_Info;
procedure Start_Paragraph (Output_Object : in out HTML_Output_Type;
Style : in ARM_Output.Paragraph_Style_Type;
Indent : in ARM_Output.Paragraph_Indent_Type;
Number : in String;
No_Prefix : in Boolean := False;
Tab_Stops : in ARM_Output.Tab_Info := ARM_Output.NO_TABS;
No_Breaks : in Boolean := False;
Keep_with_Next : in Boolean := False;
Space_After : in ARM_Output.Space_After_Type
:= ARM_Output.Normal;
Justification : in ARM_Output.Justification_Type
:= ARM_Output.Default) is
-- Start a new paragraph. The style and indent of the paragraph is as
-- specified. The (AA)RM paragraph number (which might include update
-- and version numbers as well: [12.1/1]) is Number. If the format is
-- a type with a prefix (bullets, hangining items), the prefix is
-- omitted if No_Prefix is true. Tab_Stops defines the tab stops for
-- the paragraph. If No_Breaks is True, we will try to avoid page breaks
-- in the paragraph. If Keep_with_Next is true, we will try to avoid
-- separating this paragraph and the next one. (These may have no
-- effect in formats that don't have page breaks). Space_After
-- specifies the amount of space following the paragraph. Justification
-- specifies the text justification for the paragraph. Not_Valid_Error
-- is raised if Tab_Stops /= NO_TABS for a hanging or bulleted format.
procedure Put_Style (Name : in String;
Include_Compatibility : in Boolean := True;
Use_DIV : in Boolean := False) is
-- Output a style for HTML 4.0; if Include_Compatibility is True,
-- include compatibility font information as well.
-- If Use_DIV is true, ignore the contents of the
-- style data and use a DIV.
begin
if Use_DIV then
Ada.Text_IO.Put (Output_Object.Output_File, "<div");
Output_Object.Char_Count := 4;
else
case Paragraph_Info(Style, Indent).Tag is
when DIV =>
Ada.Text_IO.Put (Output_Object.Output_File, "<div");
Output_Object.Char_Count := 4;
when UL =>
Ada.Text_IO.Put (Output_Object.Output_File, "<ul");
Output_Object.Char_Count := 3;
when DL =>
Ada.Text_IO.Put (Output_Object.Output_File, "<dl");
Output_Object.Char_Count := 3;
end case;
end if;
Ada.Text_IO.Put (Output_Object.Output_File, " class=""" & Name & """");
Output_Object.Char_Count := Output_Object.Char_Count + 8 + Name'Length + 1;
case Justification is
when ARM_Output.Default | ARM_Output.Left | ARM_Output.Justified =>
null;
when ARM_Output.Center =>
Ada.Text_IO.Put (Output_Object.Output_File, " style=""text-align: center""");
Output_Object.Char_Count := Output_Object.Char_Count + 27;
when ARM_Output.Right =>
Ada.Text_IO.Put (Output_Object.Output_File, " style=""text-align: right""");
Output_Object.Char_Count := Output_Object.Char_Count + 26;
end case;
case Space_After is
when ARM_Output.Normal =>
null;
when ARM_Output.Narrow =>
Ada.Text_IO.Put (Output_Object.Output_File, " style=""margin-bottom: ");
Output_Object.Char_Count := Output_Object.Char_Count + 24;
Put_EMs(Output_Object.Output_File, (Paragraph_Info(Style, Indent).After * LEADING_PERCENT) / 100);
Ada.Text_IO.Put (Output_Object.Output_File, """");
Output_Object.Char_Count := Output_Object.Char_Count + 6;
when ARM_Output.Wide =>
Ada.Text_IO.Put (Output_Object.Output_File, " style=""margin-bottom: ");
Output_Object.Char_Count := Output_Object.Char_Count + 24;
Put_EMs(Output_Object.Output_File, (Paragraph_Info(Style, Indent).After * TRAILING_PERCENT) / 100);
Ada.Text_IO.Put (Output_Object.Output_File, """");
Output_Object.Char_Count := Output_Object.Char_Count + 6;
end case;
Ada.Text_IO.Put (Output_Object.Output_File, ">");
Output_Object.Char_Count := Output_Object.Char_Count + 1;
if Output_Object.HTML_Kind = HTML_4_Compatible and then Include_Compatibility then
Put_Compatibility_Font_Info (Output_Object, Style, Indent);
end if;
end Put_Style;
function Paranum_Anchor (Number : in String) return String is
-- Create the string for an anchor from a paragraph number.
-- Note that anchors cannot use "/", so we strip the
-- slash part. "." is allowed (as well as "-", "_", and ":", but
-- nothing else). We don't need the slash part (the version number),
-- as paragraph numbers are unique without it, and the version
-- is specified by the enclosing document (given by the rest of
-- the page).
Where : constant Natural := Ada.Strings.Fixed.Index (Number, "/");
begin
if Where = 0 then
return Number;
else
return Number(Number'First..Where-1);
end if;
end Paranum_Anchor;
begin
if not Output_Object.Is_Valid then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Not valid object");
end if;
if Output_Object.Is_In_Paragraph then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Already in paragraph");
end if;
if not Output_Object.Number_Paragraphs and then
Number /= "" then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Paragraph number when none used");
end if;
if not Paragraph_Info(Style, Indent).Defined then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Undefined style " & ARM_Output.Paragraph_Style_Type'Image(Style) &
" and indent" & ARM_Output.Paragraph_Indent_Type'Image(Indent));
end if;
Output_Object.Is_In_Paragraph := True;
Output_Object.Had_Prefix := not No_Prefix;
Output_Object.Char_Count := 0;
Output_Object.Disp_Char_Count := 0;
Output_Object.Disp_Large_Char_Count := 0;
Output_Object.Any_Nonspace := False;
Output_Object.Last_Was_Space := True; -- Start of line
Output_Object.Conditional_Space := False;
Output_Object.Saw_Hang_End := False;
Output_Object.In_Local_Link := False;
Check_Clause_File (Output_Object);
-- Note: We only support Justification for the Normal and Wide styles.
if Output_Object.Column_Count >= 4 then
-- Formatting is deferred; only a few formats are supported.
if Tab_Stops.Number /= 0 then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Tabs in 4+ column text");
end if;
case Style is
when ARM_Output.Normal =>
null;
when others =>
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Unsupported format in 4+ column text - " & ARM_Output.Paragraph_Style_Type'Image(Style));
end case;
if Number /= "" then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"No paragraph numbers in 4+ column text");
end if;
return; -- Nothing more to do here.
end if;
-- Set up tabs:
case Style is
when ARM_Output.Normal | ARM_Output.Wide_Above |
ARM_Output.Small | ARM_Output.Small_Wide_Above |
ARM_Output.Header | ARM_Output.Small_Header |
ARM_Output.Index | ARM_Output.Syntax_Summary |
ARM_Output.Title |
ARM_Output.Examples | ARM_Output.Small_Examples |
ARM_Output.Swiss_Examples | ARM_Output.Small_Swiss_Examples =>
Output_Object.Tab_Stops := Tab_Stops;
-- No tabs in HTML; we'll emulate them for fixed fonts.
-- We'll expand proportional stops here (text characters
-- are larger than the variable ones these are set up for).
Output_Object.Can_Emulate_Tabs :=
ARM_Output."=" (Paragraph_Info(Style, Indent).Font, ARM_Output.Fixed);
for I in 1 .. Tab_Stops.Number loop
if ARM_Output."=" (Tab_Stops.Stops(I).Kind,
ARM_Output.Left_Proportional) then
if ARM_Output."=" (Paragraph_Info(Style, Indent).Font, ARM_Output.Fixed) then
Output_Object.Tab_Stops.Stops(I).Stop :=
(Tab_Stops.Stops(I).Stop * 13 / 12);
else -- Proportional characters are smaller.
Output_Object.Tab_Stops.Stops(I).Stop :=
(Tab_Stops.Stops(I).Stop * 5 / 4);
end if;
else
Output_Object.Tab_Stops.Stops(I).Stop :=
Tab_Stops.Stops(I).Stop;
end if;
end loop;
when ARM_Output.Bulleted | ARM_Output.Nested_Bulleted |
ARM_Output.Small_Bulleted | ARM_Output.Small_Nested_Bulleted |
ARM_Output.Giant_Hanging | ARM_Output.Wide_Hanging |
ARM_Output.Medium_Hanging | ARM_Output.Narrow_Hanging |
ARM_Output.Hanging_in_Bulleted |
ARM_Output.Small_Giant_Hanging | ARM_Output.Small_Wide_Hanging |
ARM_Output.Small_Medium_Hanging | ARM_Output.Small_Narrow_Hanging |
ARM_Output.Small_Hanging_in_Bulleted |
ARM_Output.Enumerated | ARM_Output.Small_Enumerated =>
if Tab_Stops.Number /= 0 then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Tabs in hanging/bulleted paragraph");
end if;
Output_Object.Can_Emulate_Tabs := False;
end case;
if Output_Object.HTML_Kind = HTML_3 then
-- Note: We can't control the space below the paragraphs here, so
-- Space_After is ignored.
-- Make any indents:
for I in 1 .. Indent loop
Ada.Text_IO.Put (Output_Object.Output_File, "<UL>");
Output_Object.Char_Count := Output_Object.Char_Count + 4;
end loop;
case Style is
when ARM_Output.Normal | ARM_Output.Wide_Above |
ARM_Output.Header =>
if ARM_Output."=" (Indent, 0) then
case Justification is
when ARM_Output.Default | ARM_Output.Left | ARM_Output.Justified =>
Ada.Text_IO.Put (Output_Object.Output_File, "<P>");
Output_Object.Char_Count := 3;
when ARM_Output.Center =>
Ada.Text_IO.Put (Output_Object.Output_File, "<P ALIGN=CENTER>");
Output_Object.Char_Count := 16;
when ARM_Output.Right =>
Ada.Text_IO.Put (Output_Object.Output_File, "<P ALIGN=RIGHT>");
Output_Object.Char_Count := 15;
end case;
else
null; -- Formatting is hard in HTML 3!
end if;
when ARM_Output.Small | ARM_Output.Small_Wide_Above |
ARM_Output.Small_Header =>
Ada.Text_IO.Put (Output_Object.Output_File, "<FONT SIZE=-1>");
Output_Object.Char_Count := Output_Object.Char_Count + 14;
when ARM_Output.Index =>
-- Note: We don't put this in a smaller font.
if ARM_Output."=" (Indent, 0) then
Ada.Text_IO.Put (Output_Object.Output_File, "<P>");
Output_Object.Char_Count := 3;
else
null; -- Formatting is hard in HTML 3!
end if;
when ARM_Output.Syntax_Summary =>
-- Note: We don't put this in a smaller font.
null;
when ARM_Output.Title =>
Ada.Text_IO.Put (Output_Object.Output_File, "<FONT SIZE=+3>");
Output_Object.Char_Count := Output_Object.Char_Count + 14;
when ARM_Output.Examples =>
Ada.Text_IO.Put (Output_Object.Output_File, "<TT>");
Output_Object.Char_Count := Output_Object.Char_Count + 4;
when ARM_Output.Small_Examples =>
Ada.Text_IO.Put (Output_Object.Output_File, "<TT><FONT SIZE=-1>");
Output_Object.Char_Count := Output_Object.Char_Count + 18;
when ARM_Output.Swiss_Examples =>
Ada.Text_IO.Put (Output_Object.Output_File, SWISS_FONT_CODE);
Output_Object.Char_Count := Output_Object.Char_Count + SWISS_FONT_CODE'Length;
when ARM_Output.Small_Swiss_Examples =>
Ada.Text_IO.Put (Output_Object.Output_File, SMALL_SWISS_FONT_CODE);
Output_Object.Char_Count := Output_Object.Char_Count + SMALL_SWISS_FONT_CODE'Length;
when ARM_Output.Bulleted | ARM_Output.Nested_Bulleted =>
if No_Prefix then
null;
else
Ada.Text_IO.Put (Output_Object.Output_File, "<LI TYPE=DISC>");
Output_Object.Char_Count := Output_Object.Char_Count + 14;
end if;
when ARM_Output.Small_Bulleted | ARM_Output.Small_Nested_Bulleted =>
if No_Prefix then
Ada.Text_IO.Put (Output_Object.Output_File, "<FONT SIZE=-1>");
Output_Object.Char_Count := Output_Object.Char_Count + 14;
else
Ada.Text_IO.Put (Output_Object.Output_File, "<LI TYPE=DISC><FONT SIZE=-1>");
Output_Object.Char_Count := Output_Object.Char_Count + 28;
end if;
when ARM_Output.Giant_Hanging | ARM_Output.Wide_Hanging |
ARM_Output.Medium_Hanging | ARM_Output.Narrow_Hanging |
ARM_Output.Hanging_in_Bulleted |
ARM_Output.Enumerated =>
if No_Prefix then
Ada.Text_IO.Put (Output_Object.Output_File, "<DL><DD>");
Output_Object.Char_Count := Output_Object.Char_Count + 8;
Output_Object.Saw_Hang_End := True;
else -- Has prefix.
Ada.Text_IO.Put (Output_Object.Output_File, "<DL><DT>");
Output_Object.Char_Count := Output_Object.Char_Count + 8;
Output_Object.Saw_Hang_End := False;
end if;
when ARM_Output.Small_Giant_Hanging | ARM_Output.Small_Wide_Hanging |
ARM_Output.Small_Medium_Hanging | ARM_Output.Small_Narrow_Hanging |
ARM_Output.Small_Hanging_in_Bulleted |
ARM_Output.Small_Enumerated =>
if No_Prefix then
Ada.Text_IO.Put (Output_Object.Output_File, "<DL><DD><FONT SIZE=-1>");
Output_Object.Char_Count := Output_Object.Char_Count + 22;
Output_Object.Saw_Hang_End := True;
else -- Has prefix.
Ada.Text_IO.Put (Output_Object.Output_File, "<DL><DT><FONT SIZE=-1>");
Output_Object.Char_Count := Output_Object.Char_Count + 22;
Output_Object.Saw_Hang_End := False;
end if;
end case;
Output_Object.Paragraph_Style := Style;
Output_Object.Paragraph_Indent := Indent;
Output_Object.Font := ARM_Output.Default;
Output_Object.Is_Bold := False;
Output_Object.Is_Italic := False;
Output_Object.Size := 0;
Output_Object.Color := ARM_Output.Default;
Output_Object.Change := ARM_Output.None;
Output_Object.Version := '0';
Output_Object.Added_Version := '0';
if Number /= "" then -- Has paragraph number.
Ada.Text_IO.Put (Output_Object.Output_File, "<A NAME=""p");
Ada.Text_IO.Put (Output_Object.Output_File, Paranum_Anchor(Number));
Ada.Text_IO.Put (Output_Object.Output_File, """>");
Ada.Text_IO.Put (Output_Object.Output_File, TINY_SWISS_FONT_CODE);
Ada.Text_IO.Put (Output_Object.Output_File, Number);
Ada.Text_IO.Put (Output_Object.Output_File, Number);
Ada.Text_IO.Put (Output_Object.Output_File, "</FONT></A> ");
Output_Object.Char_Count := Output_Object.Char_Count + TINY_SWISS_FONT_CODE'Length + Number'Length + 8;
Output_Object.Disp_Char_Count := Output_Object.Disp_Char_Count + ((Number'Length+1)/2) + 1;
-- Note: Count these as half characters, as the font is so small.
--Output_Object.Disp_Large_Char_Count := <unchanged>;
end if;
elsif Output_Object.HTML_Kind = HTML_4_Compatible then
if Number /= "" then -- Has paragraph number.
Paranum_Used := True;
Ada.Text_IO.Put (Output_Object.Output_File, "<div class=""paranum"">");
Ada.Text_IO.Put (Output_Object.Output_File, "<a name=""p");
Ada.Text_IO.Put (Output_Object.Output_File, Paranum_Anchor(Number));
Ada.Text_IO.Put (Output_Object.Output_File, """><font size=-2>");
Ada.Text_IO.Put (Output_Object.Output_File, Number);
Ada.Text_IO.Put (Output_Object.Output_File, "</font></a>");
Ada.Text_IO.Put_Line (Output_Object.Output_File, "</div>");
Output_Object.Char_Count := 0;
Output_Object.Disp_Char_Count := 0;
Output_Object.Disp_Large_Char_Count := 0;
Output_Object.Any_Nonspace := False;
Output_Object.Last_Was_Space := True; -- Start of line
Output_Object.Conditional_Space := False; -- Don't need it here.
end if;
case Style is
when ARM_Output.Normal | ARM_Output.Wide_Above |
ARM_Output.Header |
ARM_Output.Small | ARM_Output.Small_Wide_Above |
ARM_Output.Small_Header |
ARM_Output.Index | ARM_Output.Syntax_Summary |
ARM_Output.Title |
ARM_Output.Examples | ARM_Output.Swiss_Examples |
ARM_Output.Small_Examples | ARM_Output.Small_Swiss_Examples =>
Put_Style (Paragraph_Name (Style, Indent));
when ARM_Output.Bulleted | ARM_Output.Nested_Bulleted |
ARM_Output.Small_Bulleted | ARM_Output.Small_Nested_Bulleted =>
Put_Style (Paragraph_Name (Style, Indent), Include_Compatibility => False);
if No_Prefix then
null;
else
Ada.Text_IO.Put (Output_Object.Output_File, "<li type=disc>");
Output_Object.Char_Count := Output_Object.Char_Count + 14;
end if;
Put_Compatibility_Font_Info (Output_Object, Style, Indent);
when ARM_Output.Giant_Hanging | ARM_Output.Wide_Hanging |
ARM_Output.Medium_Hanging | ARM_Output.Narrow_Hanging |
ARM_Output.Hanging_in_Bulleted |
ARM_Output.Enumerated |
ARM_Output.Small_Giant_Hanging | ARM_Output.Small_Wide_Hanging |
ARM_Output.Small_Medium_Hanging | ARM_Output.Small_Narrow_Hanging |
ARM_Output.Small_Hanging_in_Bulleted |
ARM_Output.Small_Enumerated =>
declare
PName : constant String :=
Paragraph_Name (Style, Indent);
begin
Put_Style (PName, Include_Compatibility => False);
if No_Prefix then
Ada.Text_IO.Put (Output_Object.Output_File, "<dd class="" & PName & "">");
Output_Object.Char_Count := Output_Object.Char_Count + 13 + PName'Length;
Output_Object.Saw_Hang_End := True;
else -- Has prefix.
Ada.Text_IO.Put (Output_Object.Output_File, "<dt>");
Output_Object.Char_Count := Output_Object.Char_Count + 4;
Output_Object.Saw_Hang_End := False;
end if;
Put_Compatibility_Font_Info (Output_Object, Style, Indent);
end;
end case;
Output_Object.Paragraph_Style := Style;
Output_Object.Paragraph_Indent := Indent;
Output_Object.Font := ARM_Output.Default;
Output_Object.Is_Bold := False;
Output_Object.Is_Italic := False;
Output_Object.Size := 0;
Output_Object.Color := ARM_Output.Default;
Output_Object.Change := ARM_Output.None;
Output_Object.Version := '0';
Output_Object.Added_Version := '0';
if Number /= "" then -- Has paragraph number.
if Paragraph_Info(Style, Indent).Indent = 0 and then
((not No_Prefix) or else
Style in ARM_Output.Unprefixed_Style_Subtype) then
-- No indent, either a prefix or a style that doesn't
-- have a prefix.
-- We may have to make a space for the paragraph number,
-- as absolute positioned or floating items can overlap
-- others.
for I in 1 .. (Number'Length+2)-(INDENT_EMS_FOR_PARANUMS/5) loop
-- We assume that each space is roughly equal to
-- 0.5em (that should be conservative).
Ada.Text_IO.Put (Output_Object.Output_File, " ");
Output_Object.Char_Count := Output_Object.Char_Count + 1;
Output_Object.Disp_Char_Count := Output_Object.Disp_Char_Count + 1;
--Output_Object.Disp_Large_Char_Count := <unchanged>;
end loop;
-- else is indented, so we don't need to make space.
end if;
end if;
else -- HTML_4_Only.
if Number /= "" then -- Has paragraph number.
Paranum_Used := True;
Ada.Text_IO.Put (Output_Object.Output_File, "<div class=""paranum"">");
Ada.Text_IO.Put (Output_Object.Output_File, "<a name=""p");
Ada.Text_IO.Put (Output_Object.Output_File, Paranum_Anchor(Number));
Ada.Text_IO.Put (Output_Object.Output_File, """>");
Ada.Text_IO.Put (Output_Object.Output_File, Number);
Ada.Text_IO.Put (Output_Object.Output_File, "</a>");
Ada.Text_IO.Put_Line (Output_Object.Output_File, "</div>");
Output_Object.Char_Count := 0;
Output_Object.Disp_Char_Count := 0;
Output_Object.Disp_Large_Char_Count := 0;
Output_Object.Any_Nonspace := False;
Output_Object.Last_Was_Space := True; -- Start of line
Output_Object.Conditional_Space := False; -- Don't need it here.
end if;
case Style is
when ARM_Output.Normal | ARM_Output.Wide_Above |
ARM_Output.Header |
ARM_Output.Small | ARM_Output.Small_Wide_Above |
ARM_Output.Small_Header |
ARM_Output.Index | ARM_Output.Syntax_Summary |
ARM_Output.Title |
ARM_Output.Examples | ARM_Output.Swiss_Examples |
ARM_Output.Small_Examples | ARM_Output.Small_Swiss_Examples =>
Put_Style (Paragraph_Name (Style, Indent));
when ARM_Output.Bulleted | ARM_Output.Nested_Bulleted |
ARM_Output.Small_Bulleted | ARM_Output.Small_Nested_Bulleted =>
-- We use formatted DIVs here, as otherwise the indenting
-- varies wildly between Firefox and IE (and does not
-- match similar enumerated lists).
if No_Prefix then
Put_Style (Paragraph_Name (Style, Indent) & "-NoPrefix", Use_DIV => True);
else
Put_Style (Paragraph_Name (Style, Indent), Use_DIV => True);
end if;
when ARM_Output.Giant_Hanging | ARM_Output.Wide_Hanging |
ARM_Output.Medium_Hanging | ARM_Output.Narrow_Hanging |
ARM_Output.Hanging_in_Bulleted |
ARM_Output.Enumerated |
ARM_Output.Small_Giant_Hanging | ARM_Output.Small_Wide_Hanging |
ARM_Output.Small_Medium_Hanging | ARM_Output.Small_Narrow_Hanging |
ARM_Output.Small_Hanging_in_Bulleted |
ARM_Output.Small_Enumerated =>
if No_Prefix then
Put_Style (Paragraph_Name (Style, Indent) & "-Body", Use_DIV => True);
Output_Object.Saw_Hang_End := True;
else -- Has prefix.
Put_Style (Paragraph_Name (Style, Indent) & "-Term", Use_DIV => True);
Output_Object.Saw_Hang_End := False;
end if;
end case;
Output_Object.Paragraph_Style := Style;
Output_Object.Paragraph_Indent := Indent;
Output_Object.Font := ARM_Output.Default;
Output_Object.Is_Bold := False;
Output_Object.Is_Italic := False;
Output_Object.Size := 0;
Output_Object.Color := ARM_Output.Default;
Output_Object.Change := ARM_Output.None;
Output_Object.Version := '0';
Output_Object.Added_Version := '0';
if Number /= "" then -- Has paragraph number.
if Paragraph_Info(Style, Indent).Indent = 0 and then
((not No_Prefix) or else
Style in ARM_Output.Unprefixed_Style_Subtype) then
-- No indent, either a prefix or a style that doesn't
-- have a prefix.
-- We may have to make a space for the paragraph number,
-- as absolute positioned or floating items can overlap
-- others.
for I in 1 .. (Number'Length+2)-((INDENT_EMS_FOR_PARANUMS+5)*3/10) loop
-- We assume that each space is roughly equal to
-- 0.33em (that should be conservative). We also assume
-- that the normal left edge space is 1.0em (this is
-- true on IE 5&6). Paragraph numbers are positioned
-- at 0.5ems, so the additional difference is +5.
Ada.Text_IO.Put (Output_Object.Output_File, " ");
Output_Object.Char_Count := Output_Object.Char_Count + 1;
Output_Object.Disp_Char_Count := Output_Object.Disp_Char_Count + 1;
--Output_Object.Disp_Large_Char_Count := <unchanged>;
end loop;
-- else is indented, so we don't need to make space.
end if;
end if;
end if;
Paragraph_Used(Style, Indent) := True;
-- Note: No_Breaks and Keep_with_Next have no effect here, because
-- HTML doesn't have page breaks.
end Start_Paragraph;
procedure End_Paragraph (Output_Object : in out HTML_Output_Type) is
-- End a paragraph.
procedure Put_End_Style (Style : in ARM_Output.Paragraph_Style_Type;
Indent : in ARM_Output.Paragraph_Indent_Type;
Include_Compatibility : in Boolean := True) is
-- Output a end style for HTML 4.0; if Include_Compatibility is True,
-- include compatibility font information as well.
begin
if Output_Object.HTML_Kind = HTML_4_Compatible and then Include_Compatibility then
Put_End_Compatibility_Font_Info (Output_Object, Style, Indent);
end if;
case Paragraph_Info(Style, Indent).Tag is
when DIV =>
Ada.Text_IO.Put (Output_Object.Output_File, "</div>");
when UL =>
Ada.Text_IO.Put (Output_Object.Output_File, "</ul>");
when DL =>
Ada.Text_IO.Put (Output_Object.Output_File, "</dl>");
end case;
end Put_End_Style;
begin
if not Output_Object.Is_Valid then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Not valid object");
end if;
if not Output_Object.Is_In_Paragraph then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Not in paragraph");
end if;
Output_Object.Is_In_Paragraph := False;
if Output_Object.In_Local_Link then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Unclosed Local_Link");
Output_Object.In_Local_Link := False;
end if;
if Output_Object.Column_Count >= 4 then
-- Formatting is deferred; only a few formats are supported.
if Output_Object.Column_Text (Output_Object.Current_Column) /= null and then
Output_Object.Column_Text (Output_Object.Current_Column).Item = Output_Object.Current_Item then
Output_Object.Column_Text (Output_Object.Current_Column).End_Para := True;
end if;
Output_Object.Current_Item := Output_Object.Current_Item + 2; -- Skip an item.
Output_Object.Char_Count := 0;
Output_Object.Disp_Char_Count := 0;
Output_Object.Disp_Large_Char_Count := 0;
Output_Object.Any_Nonspace := False;
Output_Object.Last_Was_Space := True; -- Start of line.
Output_Object.Conditional_Space := False; -- Don't need it here.
return; -- Nothing else to do here.
end if;
if Output_Object.HTML_Kind = HTML_3 then
case Output_Object.Paragraph_Style is
when ARM_Output.Normal | ARM_Output.Wide_Above | ARM_Output.Header |
ARM_Output.Index =>
if ARM_Output."=" (Output_Object.Paragraph_Indent, 0) then
Ada.Text_IO.Put (Output_Object.Output_File, "</P>");
-- else let the indent nesting handling it.
end if;
when ARM_Output.Syntax_Summary =>
null;
when ARM_Output.Small | ARM_Output.Small_Wide_Above |
ARM_Output.Small_Header =>
Ada.Text_IO.Put (Output_Object.Output_File, "</FONT>");
when ARM_Output.Title =>
Ada.Text_IO.Put (Output_Object.Output_File, "</FONT>");
when ARM_Output.Examples =>
Ada.Text_IO.Put (Output_Object.Output_File, "</TT>");
when ARM_Output.Small_Examples =>
Ada.Text_IO.Put (Output_Object.Output_File, "</FONT>");
when ARM_Output.Swiss_Examples =>
Ada.Text_IO.Put (Output_Object.Output_File, "</FONT>");
when ARM_Output.Small_Swiss_Examples =>
Ada.Text_IO.Put (Output_Object.Output_File, "</FONT>");
when ARM_Output.Bulleted | ARM_Output.Nested_Bulleted =>
if Output_Object.Had_Prefix then
Ada.Text_IO.Put (Output_Object.Output_File, "</LI>");
-- else nothing to do.
end if;
when ARM_Output.Small_Bulleted | ARM_Output.Small_Nested_Bulleted =>
if Output_Object.Had_Prefix then
Ada.Text_IO.Put (Output_Object.Output_File, "</FONT></LI>");
else
Ada.Text_IO.Put (Output_Object.Output_File, "</FONT>");
end if;
when ARM_Output.Giant_Hanging | ARM_Output.Wide_Hanging |
ARM_Output.Medium_Hanging | ARM_Output.Narrow_Hanging |
ARM_Output.Hanging_in_Bulleted |
ARM_Output.Enumerated =>
Ada.Text_IO.Put (Output_Object.Output_File, "</DL>");
when ARM_Output.Small_Giant_Hanging | ARM_Output.Small_Wide_Hanging |
ARM_Output.Small_Medium_Hanging | ARM_Output.Small_Narrow_Hanging |
ARM_Output.Small_Hanging_in_Bulleted |
ARM_Output.Small_Enumerated =>
Ada.Text_IO.Put (Output_Object.Output_File, "</FONT></DL>");
end case;
-- Reverse any indents:
for I in reverse 1 .. Output_Object.Paragraph_Indent loop
Ada.Text_IO.Put (Output_Object.Output_File, "</UL>");
end loop;
Ada.Text_IO.New_Line (Output_Object.Output_File, 2);
elsif Output_Object.HTML_Kind = HTML_4_Only then
case Output_Object.Paragraph_Style is
when ARM_Output.Normal | ARM_Output.Wide_Above |
ARM_Output.Header |
ARM_Output.Small | ARM_Output.Small_Wide_Above |
ARM_Output.Small_Header |
ARM_Output.Index | ARM_Output.Syntax_Summary |
ARM_Output.Title |
ARM_Output.Examples | ARM_Output.Swiss_Examples |
ARM_Output.Small_Examples | ARM_Output.Small_Swiss_Examples =>
Put_End_Style (Output_Object.Paragraph_Style,
Output_Object.Paragraph_Indent);
when ARM_Output.Bulleted | ARM_Output.Nested_Bulleted |
ARM_Output.Small_Bulleted | ARM_Output.Small_Nested_Bulleted =>
-- We've overridden the style class here.
Ada.Text_IO.Put (Output_Object.Output_File, "</div>");
when ARM_Output.Giant_Hanging | ARM_Output.Wide_Hanging |
ARM_Output.Medium_Hanging | ARM_Output.Narrow_Hanging |
ARM_Output.Hanging_in_Bulleted |
ARM_Output.Enumerated |
ARM_Output.Small_Giant_Hanging | ARM_Output.Small_Wide_Hanging |
ARM_Output.Small_Medium_Hanging | ARM_Output.Small_Narrow_Hanging |
ARM_Output.Small_Hanging_in_Bulleted |
ARM_Output.Small_Enumerated =>
-- We've overridden the style class here.
Ada.Text_IO.Put (Output_Object.Output_File, "</div>");
end case;
Ada.Text_IO.New_Line (Output_Object.Output_File);
else -- if Output_Object.HTML_Kind = HTML_4_Compatible
case Output_Object.Paragraph_Style is
when ARM_Output.Normal | ARM_Output.Wide_Above |
ARM_Output.Header |
ARM_Output.Small | ARM_Output.Small_Wide_Above |
ARM_Output.Small_Header |
ARM_Output.Index | ARM_Output.Syntax_Summary |
ARM_Output.Title |
ARM_Output.Examples | ARM_Output.Swiss_Examples |
ARM_Output.Small_Examples | ARM_Output.Small_Swiss_Examples =>
Put_End_Style (Output_Object.Paragraph_Style,
Output_Object.Paragraph_Indent);
when ARM_Output.Bulleted | ARM_Output.Nested_Bulleted |
ARM_Output.Small_Bulleted | ARM_Output.Small_Nested_Bulleted =>
Put_End_Compatibility_Font_Info (Output_Object,
Output_Object.Paragraph_Style,
Output_Object.Paragraph_Indent);
if Output_Object.Had_Prefix then
Ada.Text_IO.Put (Output_Object.Output_File, "</li>");
-- else null;
end if;
Put_End_Style (Output_Object.Paragraph_Style,
Output_Object.Paragraph_Indent,
Include_Compatibility => False);
when ARM_Output.Giant_Hanging | ARM_Output.Wide_Hanging |
ARM_Output.Medium_Hanging | ARM_Output.Narrow_Hanging |
ARM_Output.Hanging_in_Bulleted |
ARM_Output.Enumerated |
ARM_Output.Small_Giant_Hanging | ARM_Output.Small_Wide_Hanging |
ARM_Output.Small_Medium_Hanging | ARM_Output.Small_Narrow_Hanging |
ARM_Output.Small_Hanging_in_Bulleted |
ARM_Output.Small_Enumerated =>
Put_End_Style (Output_Object.Paragraph_Style,
Output_Object.Paragraph_Indent);
end case;
Ada.Text_IO.New_Line (Output_Object.Output_File);
end if;
Output_Object.Char_Count := 0;
Output_Object.Disp_Char_Count := 0;
Output_Object.Disp_Large_Char_Count := 0;
Output_Object.Any_Nonspace := False;
Output_Object.Last_Was_Space := True; -- Start of line.
Output_Object.Conditional_Space := False; -- Don't need it here.
end End_Paragraph;
procedure Category_Header (Output_Object : in out HTML_Output_Type;
Header_Text : String) is
-- Output a Category header (that is, "Legality Rules",
-- "Dynamic Semantics", etc.)
-- (Note: We did not use a enumeration here to insure that these
-- headers are spelled the same in all output versions).
-- Raises Not_Valid_Error if in a paragraph.
begin
if not Output_Object.Is_Valid then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Not valid object");
end if;
if Output_Object.Is_In_Paragraph then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Header in paragraph");
end if;
Ada.Text_IO.New_Line (Output_Object.Output_File);
if Output_Object.HTML_Kind = HTML_4_Only then
Ada.Text_IO.Put_Line (Output_Object.Output_File, "<H4 Class=""centered"">" & Header_Text & "</H4>");
else
Ada.Text_IO.Put_Line (Output_Object.Output_File, "<H4 ALIGN=CENTER>" & Header_Text & "</H4>");
end if;
Output_Object.Char_Count := 0;
Output_Object.Disp_Char_Count := 0;
Output_Object.Disp_Large_Char_Count := 0;
Output_Object.Any_Nonspace := False;
Output_Object.Last_Was_Space := True; -- Start of line.
Output_Object.Conditional_Space := False; -- Don't need it here.
end Category_Header;
procedure Clause_Header (Output_Object : in out HTML_Output_Type;
Header_Text : in String;
Level : in ARM_Contents.Level_Type;
Clause_Number : in String;
Top_Level_Subdivision_Name : in ARM_Output.Top_Level_Subdivision_Name_Kind;
No_Page_Break : in Boolean := False) is
-- Output a Clause header. The level of the header is specified
-- in Level. The Clause Number is as specified; the top-level (and
-- other) subdivision names are as specified. These should appear in
-- the table of contents.
-- For hyperlinked formats, this should generate a link target.
-- If No_Page_Break is True, suppress any page breaks.
-- Raises Not_Valid_Error if in a paragraph.
begin
if not Output_Object.Is_Valid then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Not valid object");
end if;
if Output_Object.Is_In_Paragraph then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Header in paragraph");
end if;
if not Output_Object.Big_Files then
if Ada.Text_IO.Is_Open (Output_Object.Output_File) then
End_HTML_File (Output_Object);
end if;
-- Special for table of contents:
if Clause_Number = "" and then
(Header_Text = "Table of Contents" or else -- Ada 95 format
Header_Text = "Contents") then -- ISO 2004 format.
Start_HTML_File (Output_Object,
Ada.Strings.Fixed.Trim (Output_Object.File_Prefix, Ada.Strings.Right) &
"-TOC", Header_Text, "");
if Header_Text = "Table of Contents" then -- Ada 95 format
Ada.Text_IO.Put_Line (Output_Object.Output_File, "<H1>Table of Contents</H1>");
else
Ada.Text_IO.Put_Line (Output_Object.Output_File, "<H1>Contents</H1>");
end if;
Output_Object.Char_Count := 0;
Output_Object.Disp_Char_Count := 0;
Output_Object.Disp_Large_Char_Count := 0;
Output_Object.Any_Nonspace := False;
Output_Object.Last_Was_Space := True; -- Start of line.
Output_Object.Conditional_Space := False; -- Don't need it here.
return;
end if;
Start_HTML_File (Output_Object,
Make_Clause_File_Name (Output_Object, Clause_Number),
Header_Text, Clause_Number);
else -- Big Files:
if Clause_Number = "" and then
(Header_Text = "Table of Contents" or else -- Ada 95 format
Header_Text = "Contents") then -- ISO 2004 format.
-- Insert an anchor:
Ada.Text_IO.Put_Line (Output_Object.Output_File, "<A NAME=""TOC""></A>");
if Header_Text = "Table of Contents" then -- Ada 95 format
Ada.Text_IO.Put_Line (Output_Object.Output_File, "<H1>Table of Contents</H1>");
else
Ada.Text_IO.Put_Line (Output_Object.Output_File, "<H1>Contents</H1>");
end if;
Output_Object.Char_Count := 0;
Output_Object.Disp_Char_Count := 0;
Output_Object.Disp_Large_Char_Count := 0;
Output_Object.Any_Nonspace := False;
Output_Object.Last_Was_Space := True; -- Start of line.
Output_Object.Conditional_Space := False; -- Don't need it here.
return;
end if;
-- Insert an anchor:
Ada.Text_IO.Put (Output_Object.Output_File, "<A NAME=""");
Ada.Text_IO.Put (Output_Object.Output_File,
Make_Clause_Anchor_Name (Output_Object, Clause_Number));
Ada.Text_IO.Put_Line (Output_Object.Output_File, """></A>");
end if;
case Level is
when ARM_Contents.Plain_Annex =>
Ada.Text_IO.Put_Line (Output_Object.Output_File, "<H1>" & Clause_Number &
"<BR>"); -- Note: Clause_Number includes "Annex"
Ada.Text_IO.Put_Line (Output_Object.Output_File, Header_Text & "</H1>");
when ARM_Contents.Normative_Annex =>
Ada.Text_IO.Put_Line (Output_Object.Output_File, "<H1>" & Clause_Number & "</H1>");
-- Note: Clause_Number includes "Annex"
Ada.Text_IO.Put_Line (Output_Object.Output_File, "<H2>(normative)</H2>");
Ada.Text_IO.Put_Line (Output_Object.Output_File, "<H1>" & Header_Text & "</H1>");
when ARM_Contents.Informative_Annex =>
Ada.Text_IO.Put_Line (Output_Object.Output_File, "<H1>" & Clause_Number & "</H1>");
-- Note: Clause_Number includes "Annex"
Ada.Text_IO.Put_Line (Output_Object.Output_File, "<H2>(informative)</H2>");
Ada.Text_IO.Put_Line (Output_Object.Output_File, "<H1>" & Header_Text & "</H1>");
when ARM_Contents.Unnumbered_Section =>
if Header_Text /= "" then
Ada.Text_IO.Put_Line (Output_Object.Output_File, "<H1>" &
Header_Text & "</H1>");
end if;
when ARM_Contents.Section =>
case Top_Level_Subdivision_Name is
when ARM_Output.Chapter =>
Ada.Text_IO.Put_Line (Output_Object.Output_File, "<H1>Chapter " &
Clause_Number & ": " & Header_Text & "</H1>");
when ARM_Output.Section =>
Ada.Text_IO.Put_Line (Output_Object.Output_File, "<H1>Section " &
Clause_Number & ": " & Header_Text & "</H1>");
when ARM_Output.Clause =>
Ada.Text_IO.Put_Line (Output_Object.Output_File, "<H1>" &
Clause_Number & " " & Header_Text & "</H1>");
end case;
when ARM_Contents.Clause | ARM_Contents.Subclause |
ARM_Contents.Subsubclause =>
Ada.Text_IO.Put_Line (Output_Object.Output_File, "<H1>" &
Clause_Number & ' ' & Header_Text & "</H1>");
when ARM_Contents.Dead_Clause =>
raise Program_Error; -- No headers for dead clauses.
end case;
Output_Object.Char_Count := 0;
Output_Object.Disp_Char_Count := 0;
Output_Object.Disp_Large_Char_Count := 0;
Output_Object.Any_Nonspace := False;
Output_Object.Last_Was_Space := True; -- Start of line.
Output_Object.Conditional_Space := False; -- Don't need it here.
-- No page breaks in HTML, so we don't need to look at No_Page_Break.
end Clause_Header;
procedure Revised_Clause_Header
(Output_Object : in out HTML_Output_Type;
New_Header_Text : in String;
Old_Header_Text : in String;
Level : in ARM_Contents.Level_Type;
Clause_Number : in String;
Version : in ARM_Contents.Change_Version_Type;
Old_Version : in ARM_Contents.Change_Version_Type;
Top_Level_Subdivision_Name : in ARM_Output.Top_Level_Subdivision_Name_Kind;
No_Page_Break : in Boolean := False) is
-- Output a revised clause header. Both the original and new text will
-- be output. The level of the header is specified in Level. The Clause
-- Number is as specified; the top-level (and other) subdivision names
-- are as specified. These should appear in the table of contents.
-- For hyperlinked formats, this should generate a link target.
-- Version is the insertion version of the new text; Old_Version is
-- the insertion version of the old text.
-- If No_Page_Break is True, suppress any page breaks.
-- Raises Not_Valid_Error if in a paragraph.
function Header_Text return String is
begin
if Output_Object.HTML_Kind = HTML_3 then
if Old_Version = '0' then -- Old text is original text
return "<U>" & New_Header_Text & "</U><S>" & Old_Header_Text & "</S>";
else
return "<U>" & New_Header_Text & "</U><S><U>" & Old_Header_Text & "</U></S>";
end if;
elsif Old_Version = '0' then -- Old text is original text
Revision_Used(Version) := True;
return "<span class=""insert" & Version & """>" & New_Header_Text &
"</span><span class=""delete" & Version & """>" & Old_Header_Text & "</span>";
else
Revision_Used(Version) := True;
Revision_Used(Old_Version) := True;
return "<span class=""insert" & Version & """>" & New_Header_Text &
"</span><span class=""delete" & Version & """><span class=""insert" & Old_Version & """>" &
Old_Header_Text & "</span></span>";
end if;
end Header_Text;
begin
if not Output_Object.Is_Valid then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Not valid object");
end if;
if Output_Object.Is_In_Paragraph then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Header in paragraph");
end if;
if not Output_Object.Big_Files then
if Ada.Text_IO.Is_Open (Output_Object.Output_File) then
End_HTML_File (Output_Object);
end if;
Start_HTML_File (Output_Object,
Make_Clause_File_Name (Output_Object, Clause_Number),
New_Header_Text, Clause_Number);
else -- Big Files:
-- Insert an anchor:
Ada.Text_IO.Put (Output_Object.Output_File, "<A NAME=""");
Ada.Text_IO.Put (Output_Object.Output_File,
Make_Clause_Anchor_Name (Output_Object, Clause_Number));
Ada.Text_IO.Put_Line (Output_Object.Output_File, """></A>");
end if;
case Level is
when ARM_Contents.Plain_Annex =>
Ada.Text_IO.Put_Line (Output_Object.Output_File, "<H1>" & Clause_Number &
"<BR>"); -- Note: Clause_Number includes "Annex"
Ada.Text_IO.Put_Line (Output_Object.Output_File, Header_Text & "</H1>");
when ARM_Contents.Normative_Annex =>
Ada.Text_IO.Put_Line (Output_Object.Output_File, "<H1>" & Clause_Number & "</H1>");
-- Note: Clause_Number includes "Annex"
Ada.Text_IO.Put_Line (Output_Object.Output_File, "<H2>(normative)</H2>");
Ada.Text_IO.Put_Line (Output_Object.Output_File, "<H1>" & Header_Text & "</H1>");
when ARM_Contents.Informative_Annex =>
Ada.Text_IO.Put_Line (Output_Object.Output_File, "<H1>" & Clause_Number & "</H1>");
-- Note: Clause_Number includes "Annex"
Ada.Text_IO.Put_Line (Output_Object.Output_File, "<H2>(informative)</H2>");
Ada.Text_IO.Put_Line (Output_Object.Output_File, "<H1>" & Header_Text & "</H1>");
when ARM_Contents.Unnumbered_Section =>
if Header_Text /= "" then
Ada.Text_IO.Put_Line (Output_Object.Output_File, "<H1>" &
Header_Text & "</H1>");
end if;
when ARM_Contents.Section =>
case Top_Level_Subdivision_Name is
when ARM_Output.Chapter =>
Ada.Text_IO.Put_Line (Output_Object.Output_File, "<H1>Chapter " &
Clause_Number & ": " & Header_Text & "</H1>");
when ARM_Output.Section =>
Ada.Text_IO.Put_Line (Output_Object.Output_File, "<H1>Section " &
Clause_Number & ": " & Header_Text & "</H1>");
when ARM_Output.Clause =>
Ada.Text_IO.Put_Line (Output_Object.Output_File, "<H1>" &
Clause_Number & " " & Header_Text & "</H1>");
end case;
when ARM_Contents.Clause | ARM_Contents.Subclause |
ARM_Contents.Subsubclause =>
Ada.Text_IO.Put_Line (Output_Object.Output_File, "<H1>" &
Clause_Number & ' ' & Header_Text & "</H1>");
when ARM_Contents.Dead_Clause =>
raise Program_Error; -- No headers for dead clauses.
end case;
Output_Object.Char_Count := 0;
Output_Object.Disp_Char_Count := 0;
Output_Object.Disp_Large_Char_Count := 0;
Output_Object.Any_Nonspace := False;
Output_Object.Last_Was_Space := True; -- Start of line.
Output_Object.Conditional_Space := False; -- Don't need it here.
-- No page breaks in HTML, so we don't need to look at No_Page_Break.
end Revised_Clause_Header;
procedure TOC_Marker (Output_Object : in out HTML_Output_Type;
For_Start : in Boolean) is
-- Mark the start (if For_Start is True) or end (if For_Start is
-- False) of the table of contents data. Output objects that
-- auto-generate the table of contents can use this to do needed
-- actions.
begin
if not Output_Object.Is_Valid then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Not valid object");
end if;
null; -- We don't care about this.
end TOC_Marker;
procedure New_Page (Output_Object : in out HTML_Output_Type;
Kind : ARM_Output.Page_Kind_Type := ARM_Output.Any_Page) is
-- Output a page break.
-- Note that this has no effect on non-printing formats.
-- Any_Page breaks to the top of the next page (whatever it is);
-- Odd_Page_Only breaks to the top of the odd-numbered page;
-- Soft_Page allows a page break but does not force one (use in
-- "No_Breaks" paragraphs.)
-- Raises Not_Valid_Error if in a paragraph if Kind = Any_Page or
-- Odd_Page, and if not in a paragraph if Kind = Soft_Page.
begin
if not Output_Object.Is_Valid then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Not valid object");
end if;
case Kind is
when ARM_Output.Any_Page | ARM_Output.Odd_Page_Only =>
if Output_Object.Is_In_Paragraph then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Page in paragraph");
end if;
-- No real page breaks supported.
--Ada.Text_IO.Put_Line (Output_Object.Output_File, "<P><BR><BR></P>");
--Ada.Text_IO.Put_Line (Output_Object.Output_File, "<HR>"); -- Horizontal line.
--Ada.Text_IO.Put_Line (Output_Object.Output_File, "<P><BR></P>");
-- This horizontal rule looks awful when inserted solely to
-- make PDF formats look good; and it doesn't make much sense
-- any other time, either. (Why would we want to start a page
-- with this?) So it's been removed completely; and we have no
-- other page breaks in HTML.
when ARM_Output.Soft_Page =>
if not Output_Object.Is_In_Paragraph then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Soft page not in paragraph");
end if;
null; -- No page breaks in HTML.
end case;
end New_Page;
procedure Separator_Line (Output_Object : in out HTML_Output_Type;
Is_Thin : Boolean := True) is
-- Output a separator line. It is thin if "Is_Thin" is true.
-- Raises Not_Valid_Error if in a paragraph.
begin
if not Output_Object.Is_Valid then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Not valid object");
end if;
if Output_Object.Is_In_Paragraph then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Separator in paragraph");
end if;
Ada.Text_IO.New_Line (Output_Object.Output_File);
if Is_Thin then
Ada.Text_IO.Put_Line (Output_Object.Output_File, "<HR SIZE=1>"); -- Horizontal line.
else
Ada.Text_IO.Put_Line (Output_Object.Output_File, "<HR SIZE=2>"); -- Horizontal line.
end if;
Ada.Text_IO.New_Line (Output_Object.Output_File);
end Separator_Line;
procedure Start_Table (Output_Object : in out HTML_Output_Type;
Columns : in ARM_Output.Column_Count;
First_Column_Width : in ARM_Output.Column_Count;
Last_Column_Width : in ARM_Output.Column_Count;
Alignment : in ARM_Output.Column_Text_Alignment;
No_Page_Break : in Boolean;
Has_Border : in Boolean;
Small_Text_Size : in Boolean;
Header_Kind : in ARM_Output.Header_Kind_Type) is
-- Starts a table. The number of columns is Columns; the first
-- column has First_Column_Width times the normal column width, and
-- the last column has Last_Column_Width times the normal column width.
-- Alignment is the horizontal text alignment within the columns.
-- No_Page_Break should be True to keep the table intact on a single
-- page; False to allow it to be split across pages.
-- Has_Border should be true if a border is desired, false otherwise.
-- Small_Text_Size means that the contents will have the AARM size;
-- otherwise it will have the normal size.
-- Header_Kind determines whether the table has headers.
-- This command starts a paragraph; the entire table is a single
-- paragraph. Text will be considered part of the caption until the
-- next table marker call.
-- Raises Not_Valid_Error if in a paragraph.
use type ARM_Output.Header_Kind_Type;
use type ARM_Output.Column_Text_Alignment;
begin
-- No_Page_Break, First_Column_Width, and Last_Column_Width not used,
-- the latter two because column width is calculated based on the
-- contents.
if not Output_Object.Is_Valid then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Not valid object");
end if;
if Output_Object.Is_In_Paragraph then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Table in paragraph");
end if;
if Output_Object.HTML_Kind /= HTML_3 then
Ada.Text_IO.Put (Output_Object.Output_File, "<div class=""" &
Paragraph_Name(ARM_Output.Normal, 1) & """>");
Paragraph_Used(ARM_Output.Normal, 1) := True;
end if;
if Has_Border then
Ada.Text_IO.Put (Output_Object.Output_File, "<TABLE frame=""border"" rules=""all"" border=""2"" cellpadding=""4"">");
else
Ada.Text_IO.Put (Output_Object.Output_File, "<TABLE frame=""void"" rules=""none"" border=""0"" cellpadding=""2"">");
end if;
if Header_Kind = ARM_Output.Both_Caption_and_Header then
Ada.Text_IO.Put (Output_Object.Output_File, "<CAPTION>");
Output_Object.Char_Count := 9;
Output_Object.In_Header := True;
elsif Header_Kind = ARM_Output.Header_Only then
if Alignment = ARM_Output.Center_All then
Ada.Text_IO.Put (Output_Object.Output_File, "<TR><TH align=""center"">");
Output_Object.Char_Count := 24;
else
Ada.Text_IO.Put (Output_Object.Output_File, "<TR><TH align=""left"">");
Output_Object.Char_Count := 22;
end if;
Output_Object.In_Header := True;
else -- Header_Kind = ARM_Output.No_Headers then
if Alignment = ARM_Output.Center_All then
Ada.Text_IO.Put (Output_Object.Output_File, "<TR><TD align=""center"">");
Output_Object.Char_Count := 24;
else
Ada.Text_IO.Put (Output_Object.Output_File, "<TR><TD align=""left"">");
Output_Object.Char_Count := 22;
end if;
Output_Object.In_Header := False;
end if;
Output_Object.Disp_Char_Count := 0;
Output_Object.Disp_Large_Char_Count := 0;
Output_Object.Any_Nonspace := False;
Output_Object.Last_Was_Space := True; -- Start of line.
Output_Object.Conditional_Space := False; -- Don't need it here.
Output_Object.Is_In_Paragraph := True;
Output_Object.Is_In_Table := True;
Output_Object.Table_Column_Alignment := Alignment;
Output_Object.Table_Has_Small_Text := Small_Text_Size;
if Output_Object.Table_Has_Small_Text then
if Output_Object.HTML_Kind = HTML_4_Only then
Ada.Text_IO.Put (Output_Object.Output_File, "<SPAN STYLE=""font-size: 80%"">");
Output_Object.Char_Count := Output_Object.Char_Count + 29;
else
Ada.Text_IO.Put (Output_Object.Output_File, "<FONT SIZE=""-1"">");
Output_Object.Char_Count := Output_Object.Char_Count + 16;
end if;
end if;
end Start_Table;
procedure Table_Marker (Output_Object : in out HTML_Output_Type;
Marker : in ARM_Output.Table_Marker_Type) is
-- Marks the end of an entity in a table.
-- If Marker is End_Caption, the table caption ends and the
-- future text is part of the table header.
-- If Marker is End_Header, the table header ends and the
-- future text is part of the table body.
-- If Marker is End_Row, a row in the table is completed, and another
-- row started.
-- If Marker is End_Row_Next_Is_Last, a row in the table is completed,
-- and another row started. That row is the last row in the table.
-- If Marker is End_Item, an item in the table header or body is ended,
-- and another started.
-- If Marker is End_Table, the entire table is finished.
-- Raises Not_Valid_Error if not in a table.
use type ARM_Output.Column_Text_Alignment;
begin
if not Output_Object.Is_Valid then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Not valid object");
end if;
if (not Output_Object.Is_In_Paragraph) or (not Output_Object.Is_In_Table) then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Table marker not in table");
end if;
-- Close the small fonts (we always need to do this):
if Output_Object.Table_Has_Small_Text then
if Output_Object.HTML_Kind = HTML_4_Only then
Ada.Text_IO.Put (Output_Object.Output_File, "</SPAN>");
Output_Object.Char_Count := Output_Object.Char_Count + 7;
else
Ada.Text_IO.Put (Output_Object.Output_File, "</FONT>");
Output_Object.Char_Count := Output_Object.Char_Count + 7;
end if;
end if;
case Marker is
when ARM_Output.End_Item =>
-- Note: This isn't the first item on a row.
if Output_Object.In_Header then
if Output_Object.Table_Column_Alignment = ARM_Output.Left_All then
Ada.Text_IO.Put (Output_Object.Output_File, "<TH align=""left"">");
Output_Object.Char_Count := Output_Object.Char_Count + 18;
else
Ada.Text_IO.Put (Output_Object.Output_File, "<TH align=""center"">");
Output_Object.Char_Count := Output_Object.Char_Count + 20;
end if;
else
if Output_Object.Table_Column_Alignment = ARM_Output.Left_All then
Ada.Text_IO.Put (Output_Object.Output_File, "<TD align=""left"">");
Output_Object.Char_Count := Output_Object.Char_Count + 18;
else
Ada.Text_IO.Put (Output_Object.Output_File, "<TD align=""center"">");
Output_Object.Char_Count := Output_Object.Char_Count + 20;
end if;
end if;
when ARM_Output.End_Caption =>
Ada.Text_IO.Put_Line (Output_Object.Output_File, "</CAPTION>");
if Output_Object.Table_Column_Alignment = ARM_Output.Center_All then
Ada.Text_IO.Put (Output_Object.Output_File, "<TR><TH align=""center"">");
Output_Object.Char_Count := 24;
else
Ada.Text_IO.Put (Output_Object.Output_File, "<TR><TH align=""left"">");
Output_Object.Char_Count := 22;
end if;
Output_Object.Disp_Char_Count := 0;
Output_Object.Disp_Large_Char_Count := 0;
Output_Object.Any_Nonspace := False;
Output_Object.Last_Was_Space := True; -- Start of line.
Output_Object.Conditional_Space := False; -- Don't need it here.
when ARM_Output.End_Header =>
Ada.Text_IO.New_Line (Output_Object.Output_File);
if Output_Object.Table_Column_Alignment = ARM_Output.Center_All then
Ada.Text_IO.Put (Output_Object.Output_File, "<TR><TD align=""center"">");
Output_Object.Char_Count := 24;
else
Ada.Text_IO.Put (Output_Object.Output_File, "<TR><TD align=""left"">");
Output_Object.Char_Count := 22;
end if;
Output_Object.Disp_Char_Count := 0;
Output_Object.Disp_Large_Char_Count := 0;
Output_Object.Any_Nonspace := False;
Output_Object.Last_Was_Space := True; -- Start of line.
Output_Object.Conditional_Space := False; -- Don't need it here.
Output_Object.In_Header := False;
when ARM_Output.End_Row | ARM_Output.End_Row_Next_Is_Last =>
Ada.Text_IO.New_Line (Output_Object.Output_File);
if Output_Object.Table_Column_Alignment = ARM_Output.Center_All then
Ada.Text_IO.Put (Output_Object.Output_File, "<TR><TD align=""center"">");
Output_Object.Char_Count := 24;
else
Ada.Text_IO.Put (Output_Object.Output_File, "<TR><TD align=""left"">");
Output_Object.Char_Count := 22;
end if;
Output_Object.Disp_Char_Count := 0;
Output_Object.Disp_Large_Char_Count := 0;
Output_Object.Any_Nonspace := False;
Output_Object.Last_Was_Space := True; -- Start of line.
Output_Object.Conditional_Space := False; -- Don't need it here.
when ARM_Output.End_Table =>
Ada.Text_IO.New_Line (Output_Object.Output_File);
if Output_Object.HTML_Kind /= HTML_3 then
Ada.Text_IO.Put_Line (Output_Object.Output_File, "</table></div>");
else
Ada.Text_IO.Put_Line (Output_Object.Output_File, "</TABLE>");
end if;
Output_Object.Is_In_Paragraph := False;
Output_Object.Is_In_Table := False;
end case;
if Output_Object.Table_Has_Small_Text and then ARM_Output."/=" (Marker,
ARM_Output.End_Table) then
if Output_Object.HTML_Kind = HTML_4_Only then
Ada.Text_IO.Put (Output_Object.Output_File, "<SPAN STYLE=""font-size: 80%"">");
Output_Object.Char_Count := Output_Object.Char_Count + 29;
else
Ada.Text_IO.Put (Output_Object.Output_File, "<FONT SIZE=""-1"">");
Output_Object.Char_Count := Output_Object.Char_Count + 16;
end if;
end if;
end Table_Marker;
-- Text output: These are only allowed after a Start_Paragraph and
-- before any End_Paragraph. Raises Not_Valid_Error if not allowed.
Special_Set : constant Ada.Strings.Maps.Character_Set :=
Ada.Strings.Maps."or" (Ada.Strings.Maps.To_Set (Ada.Strings.Maps.Character_Range'(Low => Character'Val(127), High => Character'Val(255))),
Ada.Strings.Maps."or" (Ada.Strings.Maps.To_Set ('<'),
Ada.Strings.Maps."or" (Ada.Strings.Maps.To_Set ('>'),
Ada.Strings.Maps."or" (Ada.Strings.Maps.To_Set ('"'),
Ada.Strings.Maps.To_Set ('&')))));
No_Conditional_Set : constant Ada.Strings.Maps.Character_Set :=
Ada.Strings.Maps."or" (Ada.Strings.Maps.To_Set (' '),
Ada.Strings.Maps."or" (Ada.Strings.Maps.To_Set ('.'),
Ada.Strings.Maps."or" (Ada.Strings.Maps.To_Set (','),
Ada.Strings.Maps."or" (Ada.Strings.Maps.To_Set (':'),
Ada.Strings.Maps."or" (Ada.Strings.Maps.To_Set (';'),
Ada.Strings.Maps."or" (Ada.Strings.Maps.To_Set ('!'),
Ada.Strings.Maps."or" (Ada.Strings.Maps.To_Set ('('),
Ada.Strings.Maps.To_Set (')'))))))));
Large_Char_Set : constant Ada.Strings.Maps.Character_Set :=
Ada.Strings.Maps."or" (Ada.Strings.Maps.Constants.Upper_Set,
Ada.Strings.Maps."or" (Ada.Strings.Maps.To_Set (Ada.Strings.Maps.Character_Range'(Low => '0', High => '9')),
Ada.Strings.Maps."or" (Ada.Strings.Maps.To_Set ('m'),
Ada.Strings.Maps."or" (Ada.Strings.Maps.To_Set ('w'),
Ada.Strings.Maps."or" (Ada.Strings.Maps.To_Set ('<'),
Ada.Strings.Maps."or" (Ada.Strings.Maps.To_Set ('>'),
Ada.Strings.Maps."or" (Ada.Strings.Maps.To_Set ('&'),
Ada.Strings.Maps."or" (Ada.Strings.Maps.To_Set ('%'),
Ada.Strings.Maps."or" (Ada.Strings.Maps.To_Set ('@'),
Ada.Strings.Maps."or" (Ada.Strings.Maps.To_Set ('$'),
Ada.Strings.Maps."or" (Ada.Strings.Maps.To_Set ('*'),
Ada.Strings.Maps."or" (Ada.Strings.Maps.To_Set ('+'),
Ada.Strings.Maps."or" (Ada.Strings.Maps.To_Set ('='),
Ada.Strings.Maps."or" (Ada.Strings.Maps.To_Set ('?'),
Ada.Strings.Maps."or" (Ada.Strings.Maps.To_Set ('/'),
Ada.Strings.Maps."or" (Ada.Strings.Maps.To_Set ('\'),
Ada.Strings.Maps.To_Set ('#')))))))))))))))));
procedure Output_Text (Output_Object : in out HTML_Output_Type;
Text : in String) is
-- Output the text to the current output place.
begin
if Output_Object.Column_Count >= 4 then
if (Output_Object.Column_Text(Output_Object.Current_Column) = null) or else
-- No items stored.
(Output_Object.Column_Text(Output_Object.Current_Column).Item /=
Output_Object.Current_Item) then
-- Start a new item.
Output_Object.Column_Text(Output_Object.Current_Column) :=
new Column_Text_Item_Type'(Text => (others => ' '),
Length => 0, Item => Output_Object.Current_Item,
End_Para => False, Next => Output_Object.Column_Text(Output_Object.Current_Column));
end if;
if Output_Object.Column_Text(Output_Object.Current_Column).Length +
Text'Length > Output_Object.Column_Text(Output_Object.Current_Column).Text'Length then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Column item full, but more text! - " &
Output_Object.Column_Text(Output_Object.Current_Column).Text(1..Output_Object.Column_Text(Output_Object.Current_Column).Length) & Text);
else
Output_Object.Column_Text(Output_Object.Current_Column).Text(
Output_Object.Column_Text(Output_Object.Current_Column).Length+1..
Output_Object.Column_Text(Output_Object.Current_Column).Length+Text'Length) :=
Text;
Output_Object.Column_Text(Output_Object.Current_Column).Length :=
Output_Object.Column_Text(Output_Object.Current_Column).Length + Text'Length;
end if;
else -- Normal, use Text_IO.
Ada.Text_IO.Put (Output_Object.Output_File, Text);
Output_Object.Char_Count := Output_Object.Char_Count + Text'Length;
end if;
end Output_Text;
procedure Ordinary_Text (Output_Object : in out HTML_Output_Type;
Text : in String) is
-- Output ordinary text.
-- The text must end at a word break, never in the middle of a word.
begin
if not Output_Object.Is_Valid then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Not valid object");
end if;
if not Output_Object.Is_In_Paragraph then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Not in paragraph");
end if;
if Text'Length = 0 then
return; -- Nothing to do.
end if;
if Ada.Strings.Fixed.Count (Text, Special_Set) = 0 then
if Output_Object.Char_Count + Text'Length >= LINE_LENGTH - 10 then
-- We can only break on a space.
for I in Text'range loop
Ordinary_Character (Output_Object, Text(I));
end loop;
else
if Output_Object.Conditional_Space then
Output_Object.Conditional_Space := False;
if Ada.Strings.Maps.Is_In (Text(Text'First), No_Conditional_Set) then
null; -- Don't need the conditional space.
else
Output_Text (Output_Object, " ");
Output_Object.Disp_Char_Count := Output_Object.Disp_Char_Count + 1;
--Output_Object.Disp_Large_Char_Count := <unchanged>;
end if;
end if;
Output_Text (Output_Object, Text);
Output_Object.Disp_Char_Count := Output_Object.Disp_Char_Count + Text'Length;
Output_Object.Disp_Large_Char_Count :=
Output_Object.Disp_Large_Char_Count +
Ada.Strings.Fixed.Count (Text, Large_Char_Set);
Output_Object.Any_Nonspace := True;
Output_Object.Last_was_Space := Text(Text'Last) = ' ';
end if;
else
for I in Text'range loop
Ordinary_Character (Output_Object, Text(I));
end loop;
end if;
end Ordinary_Text;
procedure Ordinary_Character (Output_Object : in out HTML_Output_Type;
Char : in Character) is
-- Output an ordinary character.
-- Spaces will be used to break lines as needed.
begin
if not Output_Object.Is_Valid then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Not valid object");
end if;
if not Output_Object.Is_In_Paragraph then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Not in paragraph");
end if;
if Output_Object.Conditional_Space then
Output_Object.Conditional_Space := False;
if Ada.Strings.Maps.Is_In (Char, No_Conditional_Set) then
null; -- Don't need the conditional space.
else
Output_Text (Output_Object, " ");
Output_Object.Disp_Char_Count := Output_Object.Disp_Char_Count + 1;
--Output_Object.Disp_Large_Char_Count := <unchanged>;
end if;
end if;
Output_Object.Last_was_Space := False;
if Char = ' ' then
if Output_Object.Char_Count >= LINE_LENGTH - 10 and then
Output_Object.Column_Count < 4 then
if Output_Object.HTML_Kind > HTML_3 then
-- Note: We leave the space here so that later code can tell
-- the difference between a line broken on a space, and a
-- line broken for because it's convinient.
Ada.Text_IO.Put_Line (Output_Object.Output_File, " ");
else -- No later code.
Ada.Text_IO.New_Line (Output_Object.Output_File);
end if;
Output_Object.Char_Count := 0;
Output_Object.Last_was_Space := True;
else
Output_Text (Output_Object, " ");
Output_Object.Disp_Char_Count := Output_Object.Disp_Char_Count + 1;
--Output_Object.Disp_Large_Char_Count := <unchanged>;
end if;
-- Output_Object.Any_Nonspace := <unchanged>;
Output_Object.Last_was_Space := True;
elsif Char = '<' then
Output_Text (Output_Object, "<");
Output_Object.Disp_Char_Count := Output_Object.Disp_Char_Count + 1;
Output_Object.Disp_Large_Char_Count := Output_Object.Disp_Large_Char_Count + 1;
Output_Object.Any_Nonspace := True;
elsif Char = '>' then
Output_Text (Output_Object, ">");
Output_Object.Disp_Char_Count := Output_Object.Disp_Char_Count + 1;
Output_Object.Disp_Large_Char_Count := Output_Object.Disp_Large_Char_Count + 1;
Output_Object.Any_Nonspace := True;
elsif Char = '"' then
Output_Text (Output_Object, """);
Output_Object.Disp_Char_Count := Output_Object.Disp_Char_Count + 1;
-- No change in Disp_Large_Char_Count.
Output_Object.Any_Nonspace := True;
elsif Char = '&' then
Output_Text (Output_Object, "&");
Output_Object.Disp_Char_Count := Output_Object.Disp_Char_Count + 1;
Output_Object.Disp_Large_Char_Count := Output_Object.Disp_Large_Char_Count + 1;
Output_Object.Any_Nonspace := True;
elsif Char >= Character'Val(126) then -- All higher Latin-1 characters.
case Character'Pos(Char) is
when 160 =>
Output_Text (Output_Object, " ");
when 161 =>
Output_Text (Output_Object, "¡");
when 162 =>
Output_Text (Output_Object, "¢");
when 163 =>
Output_Text (Output_Object, "£");
when 164 =>
Output_Text (Output_Object, "¤");
when 165 =>
Output_Text (Output_Object, "¥");
when 166 =>
Output_Text (Output_Object, "¦");
when 167 =>
Output_Text (Output_Object, "§");
when 168 =>
Output_Text (Output_Object, "¨");
when 169 =>
Output_Text (Output_Object, "©");
when 170 =>
Output_Text (Output_Object, "ª");
when 171 =>
Output_Text (Output_Object, "«");
when 172 =>
Output_Text (Output_Object, "¬");
when 173 =>
Output_Text (Output_Object, "­");
when 174 =>
Output_Text (Output_Object, "®");
when 175 =>
Output_Text (Output_Object, "¯");
when 176 =>
Output_Text (Output_Object, "°");
when 177 =>
Output_Text (Output_Object, "±");
when 178 =>
Output_Text (Output_Object, "²");
when 179 =>
Output_Text (Output_Object, "³");
when 180 =>
Output_Text (Output_Object, "´");
when 181 =>
Output_Text (Output_Object, "µ");
when 182 =>
Output_Text (Output_Object, "¶");
when 183 =>
Output_Text (Output_Object, "·");
when 184 =>
Output_Text (Output_Object, "¸");
when 185 =>
Output_Text (Output_Object, "¹");
when 186 =>
Output_Text (Output_Object, "º");
when 187 =>
Output_Text (Output_Object, "»");
when 188 =>
Output_Text (Output_Object, "¼");
when 189 =>
Output_Text (Output_Object, "½");
when 190 =>
Output_Text (Output_Object, "¾");
when 191 =>
Output_Text (Output_Object, "¿");
when 192 =>
Output_Text (Output_Object, "À");
when 193 =>
Output_Text (Output_Object, "Á");
when 194 =>
Output_Text (Output_Object, "Â");
when 195 =>
Output_Text (Output_Object, "Ã");
when 196 =>
Output_Text (Output_Object, "Ä");
when 197 =>
Output_Text (Output_Object, "Å");
when 198 =>
Output_Text (Output_Object, "Æ");
when 199 =>
Output_Text (Output_Object, "Ç");
when 200 =>
Output_Text (Output_Object, "È");
when 201 =>
Output_Text (Output_Object, "É");
when 202 =>
Output_Text (Output_Object, "Ê");
when 203 =>
Output_Text (Output_Object, "Ë");
when 204 =>
Output_Text (Output_Object, "Ì");
when 205 =>
Output_Text (Output_Object, "Í");
when 206 =>
Output_Text (Output_Object, "Î");
when 207 =>
Output_Text (Output_Object, "Ï");
when 208 =>
Output_Text (Output_Object, "Ð");
when 209 =>
Output_Text (Output_Object, "Ñ");
when 210 =>
Output_Text (Output_Object, "Ò");
when 211 =>
Output_Text (Output_Object, "Ó");
when 212 =>
Output_Text (Output_Object, "Ô");
when 213 =>
Output_Text (Output_Object, "Õ");
when 214 =>
Output_Text (Output_Object, "Ö");
when 215 =>
Output_Text (Output_Object, "×");
when 216 =>
Output_Text (Output_Object, "Ø");
when 217 =>
Output_Text (Output_Object, "Ù");
when 218 =>
Output_Text (Output_Object, "Ú");
when 219 =>
Output_Text (Output_Object, "Û");
when 220 =>
Output_Text (Output_Object, "Ü");
when 221 =>
Output_Text (Output_Object, "Ý");
when 222 =>
Output_Text (Output_Object, "Þ");
when 223 =>
Output_Text (Output_Object, "ß");
when 224 =>
Output_Text (Output_Object, "à");
when 225 =>
Output_Text (Output_Object, "á");
when 226 =>
Output_Text (Output_Object, "â");
when 227 =>
Output_Text (Output_Object, "ã");
when 228 =>
Output_Text (Output_Object, "ä");
when 229 =>
Output_Text (Output_Object, "å");
when 230 =>
Output_Text (Output_Object, "æ");
when 231 =>
Output_Text (Output_Object, "ç");
when 232 =>
Output_Text (Output_Object, "è");
when 233 =>
Output_Text (Output_Object, "é");
when 234 =>
Output_Text (Output_Object, "ê");
when 235 =>
Output_Text (Output_Object, "ë");
when 236 =>
Output_Text (Output_Object, "ì");
when 237 =>
Output_Text (Output_Object, "í");
when 238 =>
Output_Text (Output_Object, "î");
when 239 =>
Output_Text (Output_Object, "ï");
when 240 =>
Output_Text (Output_Object, "ð");
when 241 =>
Output_Text (Output_Object, "ñ");
when 242 =>
Output_Text (Output_Object, "ò");
when 243 =>
Output_Text (Output_Object, "ó");
when 244 =>
Output_Text (Output_Object, "ô");
when 245 =>
Output_Text (Output_Object, "õ");
when 246 =>
Output_Text (Output_Object, "ö");
when 247 =>
Output_Text (Output_Object, "÷");
when 248 =>
Output_Text (Output_Object, "ø");
when 249 =>
Output_Text (Output_Object, "ù");
when 250 =>
Output_Text (Output_Object, "ú");
when 251 =>
Output_Text (Output_Object, "û");
when 252 =>
Output_Text (Output_Object, "ü");
when 253 =>
Output_Text (Output_Object, "ý");
when 254 =>
Output_Text (Output_Object, "þ");
when 255 =>
Output_Text (Output_Object, "ÿ");
when others =>
declare
Code : constant String :=
Natural'Image(Character'Pos(Char));
begin
Output_Text (Output_Object, "&#" & Code(2..4) & ';');
end;
end case;
Output_Object.Disp_Char_Count := Output_Object.Disp_Char_Count + 1;
if Ada.Strings.Maps.Is_In (Char, Large_Char_Set) then
Output_Object.Disp_Large_Char_Count :=
Output_Object.Disp_Large_Char_Count + 1;
-- else not a large character.
end if;
Output_Object.Any_Nonspace := True;
else
Output_Text (Output_Object, Char & "");
Output_Object.Disp_Char_Count := Output_Object.Disp_Char_Count + 1;
if Ada.Strings.Maps.Is_In (Char, Large_Char_Set) then
Output_Object.Disp_Large_Char_Count :=
Output_Object.Disp_Large_Char_Count + 1;
-- else not a large character.
end if;
Output_Object.Any_Nonspace := True;
end if;
end Ordinary_Character;
procedure Hard_Space (Output_Object : in out HTML_Output_Type) is
-- Output a hard space. No line break should happen at a hard space.
begin
if not Output_Object.Is_Valid then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Not valid object");
end if;
if not Output_Object.Is_In_Paragraph then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Not in paragraph");
end if;
Output_Text (Output_Object, " ");
Output_Object.Disp_Char_Count := Output_Object.Disp_Char_Count + 1;
-- Output_Object.Disp_Large_Char_Count := <unchanged>;
-- Output_Object.Any_Nonspace := <unchanged>;
Output_Object.Last_was_Space := True;
Output_Object.Conditional_Space := False; -- Never need a conditional space here.
end Hard_Space;
procedure Line_Break (Output_Object : in out HTML_Output_Type) is
-- Output a line break. This does not start a new paragraph.
-- This corresponds to a "<BR>" in HTML.
begin
if not Output_Object.Is_Valid then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Not valid object");
end if;
if not Output_Object.Is_In_Paragraph then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Not in paragraph");
end if;
if Output_Object.Column_Count >= 4 then
-- Output is deferred; mark the end of an item.
if Output_Object.Column_Text (Output_Object.Current_Column) /= null and then
Output_Object.Column_Text (Output_Object.Current_Column).Item = Output_Object.Current_Item then
Output_Object.Column_Text (Output_Object.Current_Column).End_Para := False;
end if;
Output_Object.Current_Item := Output_Object.Current_Item + 1;
Output_Object.Char_Count := 0;
Output_Object.Disp_Char_Count := 0;
Output_Object.Disp_Large_Char_Count := 0;
Output_Object.Any_Nonspace := False;
Output_Object.Last_Was_Space := True; -- Start of line.
Output_Object.Conditional_Space := False; -- Don't need it here.
else -- Normal.
Ada.Text_IO.Put_Line (Output_Object.Output_File, "<BR>");
Output_Object.Char_Count := 0;
Output_Object.Disp_Char_Count := 0;
Output_Object.Disp_Large_Char_Count := 0;
Output_Object.Any_Nonspace := False;
Output_Object.Last_Was_Space := True; -- Start of line.
Output_Object.Conditional_Space := False; -- Don't need it here.
end if;
end Line_Break;
procedure Index_Line_Break (Output_Object : in out HTML_Output_Type;
Clear_Keep_with_Next : in Boolean) is
-- Output a line break for the index. This does not start a new
-- paragraph in terms of spacing. This corresponds to a "<BR>"
-- in HTML. If Clear_Keep_with_Next is true, insure that the next
-- line does not require the following line to stay with it.
-- Raises Not_Valid_Error if the paragraph is not in the index format.
begin
if ARM_Output."/=" (Output_Object.Paragraph_Style, ARM_Output.Index) then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Not index format");
end if;
Line_Break (Output_Object);
end Index_Line_Break;
procedure Soft_Line_Break (Output_Object : in out HTML_Output_Type) is
-- Output a soft line break. This is a place (in the middle of a
-- "word") that we allow a line break. It is usually used after
-- underscores in long non-terminals.
begin
if not Output_Object.Is_Valid then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Not valid object");
end if;
if not Output_Object.Is_In_Paragraph then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Not in paragraph");
end if;
if Output_Object.HTML_Kind > HTML_3 and then Output_Object.Use_Unicode then
Output_Text (Output_Object, "​");
-- else no Soft break in HTML 3.2.
end if;
end Soft_Line_Break;
procedure Soft_Hyphen_Break (Output_Object : in out HTML_Output_Type) is
-- Output a soft line break, with a hyphen. This is a place (in the middle of
-- a "word") that we allow a line break. If the line break is used,
-- a hyphen will be added to the text.
begin
if not Output_Object.Is_Valid then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Not valid object");
end if;
if not Output_Object.Is_In_Paragraph then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Not in paragraph");
end if;
null; -- Soft hyphens exist, but don't work on either Internet Exploder 4
-- or Netcrash 3. That is, they are always displayed. (They should
-- only be displayed at the location of a line break).
--Output_Text (Output_Object, "­"); -- A Latin-1 char.
end Soft_Hyphen_Break;
procedure Tab (Output_Object : in out HTML_Output_Type) is
-- Output a tab, inserting space up to the next tab stop.
-- Raises Not_Valid_Error if the paragraph was created with
-- Tab_Stops = ARM_Output.NO_TABS.
begin
-- HTML does not have tabs. Emulation is not successful on proportional
-- fonts, so we let the user select how to do it.
if not Output_Object.Is_Valid then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Not valid object");
end if;
if not Output_Object.Is_In_Paragraph then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Not in paragraph");
end if;
if ARM_Output."="(Output_Object.Tab_Stops, ARM_Output.NO_TABS) then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Tab, but none set");
end if;
Output_Object.Conditional_Space := False; -- Never need a conditional space here.
Output_Object.Last_was_Space := True; -- Treat this as a space.
if Output_Object.Tab_Emulation = Single_Space then
-- Don't emulate these, just use a single space.
Output_Text (Output_Object, " ");
Output_Object.Disp_Char_Count := Output_Object.Disp_Char_Count + 1;
-- Output_Object.Disp_Large_Char_Count := <unchanged>;
elsif Output_Object.Tab_Emulation = Quad_Space then
-- Don't emulate these, just use a single space.
Output_Text (Output_Object, " ");
Output_Object.Disp_Char_Count := Output_Object.Disp_Char_Count + 4;
-- Output_Object.Disp_Large_Char_Count := <unchanged>;
elsif Output_Object.Tab_Emulation = Emulate_Fixed_Only or else
Output_Object.Tab_Emulation = Emulate_Fixed_Only_Quad then
if Output_Object.Can_Emulate_Tabs or else
(not Output_Object.Any_Nonspace) then -- Always can emulate if they're first on a line.
Output_Text (Output_Object, " ");
Output_Object.Disp_Char_Count := Output_Object.Disp_Char_Count + 1;
-- Output_Object.Disp_Large_Char_Count := <unchanged>;
for I in 1 .. Output_Object.Tab_Stops.Number loop
if Output_Object.Tab_Stops.Stops(I).Stop >= Output_Object.Disp_Char_Count then
for J in Output_Object.Disp_Char_Count+1 .. Output_Object.Tab_Stops.Stops(I).Stop loop
Output_Text (Output_Object, " ");
Output_Object.Disp_Char_Count := Output_Object.Disp_Char_Count + 1;
-- Output_Object.Disp_Large_Char_Count := <unchanged>;
end loop;
exit;
end if;
end loop; -- If we drop out without finding a tab, we just use the single
-- space already written.
elsif Output_Object.Tab_Emulation = Emulate_Fixed_Only then
-- Put in a space.
Output_Text (Output_Object, " ");
Output_Object.Disp_Char_Count := Output_Object.Disp_Char_Count + 1;
if ARM_Output."=" (Output_Object.Paragraph_Style, ARM_Output.Syntax_Summary) and then
Output_Object.Column_Count > 1 then
-- Special case (hack!) to make Syntax cross-reference look better:
Output_Text (Output_Object, " ");
Output_Object.Disp_Char_Count := Output_Object.Disp_Char_Count + 2;
end if;
-- Output_Object.Disp_Large_Char_Count := <unchanged>;
elsif Output_Object.Tab_Emulation = Emulate_Fixed_Only_Quad then
-- Put in four hard spaces.
Output_Text (Output_Object, " ");
Output_Object.Disp_Char_Count := Output_Object.Disp_Char_Count + 4;
-- Output_Object.Disp_Large_Char_Count := <unchanged>;
end if;
else -- Emulate all.
Output_Text (Output_Object, " ");
Output_Object.Disp_Char_Count := Output_Object.Disp_Char_Count + 1;
for I in 1 .. Output_Object.Tab_Stops.Number loop
if Output_Object.Tab_Stops.Stops(I).Stop >= Output_Object.Disp_Char_Count then
for J in Output_Object.Disp_Char_Count+1 .. Output_Object.Tab_Stops.Stops(I).Stop loop
Output_Text (Output_Object, " ");
Output_Object.Disp_Char_Count := Output_Object.Disp_Char_Count + 1;
end loop;
exit;
end if;
end loop; -- If we drop out without finding a tab, we just use the
-- single space already written.
-- Output_Object.Disp_Large_Char_Count := <unchanged>;
end if;
end Tab;
procedure Special_Character (Output_Object : in out HTML_Output_Type;
Char : in ARM_Output.Special_Character_Type) is
-- Output an special character.
begin
if not Output_Object.Is_Valid then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Not valid object");
end if;
if not Output_Object.Is_In_Paragraph then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Not in paragraph");
end if;
if Output_Object.Conditional_Space then
Output_Object.Conditional_Space := False;
Output_Text (Output_Object, " ");
Output_Object.Disp_Char_Count := Output_Object.Disp_Char_Count + 1;
-- Output_Object.Disp_Large_Char_Count := <unchanged>;
end if;
case Char is
when ARM_Output.EM_Dash =>
if Output_Object.HTML_Kind > HTML_3 and Output_Object.Use_Unicode then
Output_Text (Output_Object, "—");
Output_Object.Disp_Char_Count := Output_Object.Disp_Char_Count + 1;
Output_Object.Disp_Large_Char_Count := Output_Object.Disp_Large_Char_Count + 1;
else
Output_Text (Output_Object, "--");
Output_Object.Disp_Char_Count := Output_Object.Disp_Char_Count + 2;
Output_Object.Disp_Large_Char_Count := Output_Object.Disp_Large_Char_Count + 2;
end if;
when ARM_Output.EN_Dash =>
if Output_Object.HTML_Kind > HTML_3 and Output_Object.Use_Unicode then
Output_Text (Output_Object, "–");
Output_Object.Disp_Char_Count := Output_Object.Disp_Char_Count + 1;
Output_Object.Disp_Large_Char_Count := Output_Object.Disp_Large_Char_Count + 1;
else
Output_Text (Output_Object, "-");
Output_Object.Disp_Char_Count := Output_Object.Disp_Char_Count + 1;
--Output_Object.Disp_Large_Char_Count := <unchanged>;
end if;
when ARM_Output.GEQ =>
if Output_Object.HTML_Kind > HTML_3 and Output_Object.Use_Unicode then
Output_Text (Output_Object, "≥");
Output_Object.Disp_Char_Count := Output_Object.Disp_Char_Count + 1;
Output_Object.Disp_Large_Char_Count := Output_Object.Disp_Large_Char_Count + 1;
else
Output_Text (Output_Object, ">=");
Output_Object.Disp_Char_Count := Output_Object.Disp_Char_Count + 2;
Output_Object.Disp_Large_Char_Count := Output_Object.Disp_Large_Char_Count + 2;
end if;
when ARM_Output.LEQ =>
if Output_Object.HTML_Kind > HTML_3 and Output_Object.Use_Unicode then
Output_Text (Output_Object, "≤");
Output_Object.Disp_Char_Count := Output_Object.Disp_Char_Count + 1;
Output_Object.Disp_Large_Char_Count := Output_Object.Disp_Large_Char_Count + 1;
else
Output_Text (Output_Object, "<=");
Output_Object.Disp_Char_Count := Output_Object.Disp_Char_Count + 2;
Output_Object.Disp_Large_Char_Count := Output_Object.Disp_Large_Char_Count + 2;
end if;
when ARM_Output.NEQ =>
if Output_Object.HTML_Kind > HTML_3 and Output_Object.Use_Unicode then
Output_Text (Output_Object, "≠");
Output_Object.Disp_Char_Count := Output_Object.Disp_Char_Count + 1;
Output_Object.Disp_Large_Char_Count := Output_Object.Disp_Large_Char_Count + 1;
else
Output_Text (Output_Object, "/=");
Output_Object.Disp_Char_Count := Output_Object.Disp_Char_Count + 2;
Output_Object.Disp_Large_Char_Count := Output_Object.Disp_Large_Char_Count + 2;
end if;
when ARM_Output.PI =>
if Output_Object.HTML_Kind > HTML_3 and Output_Object.Use_Unicode then
Output_Text (Output_Object, "π");
Output_Object.Disp_Char_Count := Output_Object.Disp_Char_Count + 1;
Output_Object.Disp_Large_Char_Count := Output_Object.Disp_Large_Char_Count + 1;
else
Output_Text (Output_Object, "PI");
Output_Object.Disp_Char_Count := Output_Object.Disp_Char_Count + 2;
Output_Object.Disp_Large_Char_Count := Output_Object.Disp_Large_Char_Count + 2;
end if;
when ARM_Output.Left_Ceiling =>
if FALSE and (Output_Object.HTML_Kind > HTML_3 and Output_Object.Use_Unicode) then
-- This character doesn't display on US Windows 2000/XP.
Output_Text (Output_Object, "⌈");
Output_Object.Disp_Char_Count := Output_Object.Disp_Char_Count + 1;
Output_Object.Disp_Large_Char_Count := Output_Object.Disp_Large_Char_Count + 1;
else
Output_Text (Output_Object, "<I>Ceiling</I>(");
Output_Object.Disp_Char_Count := Output_Object.Disp_Char_Count + 8;
Output_Object.Disp_Large_Char_Count := Output_Object.Disp_Large_Char_Count + 1;
end if;
when ARM_Output.Right_Ceiling =>
if FALSE and (Output_Object.HTML_Kind > HTML_3 and Output_Object.Use_Unicode) then
-- This character doesn't display on US Windows 2000/XP.
Output_Text (Output_Object, "⌉");
Output_Object.Disp_Char_Count := Output_Object.Disp_Char_Count + 1;
Output_Object.Disp_Large_Char_Count := Output_Object.Disp_Large_Char_Count + 1;
else
Output_Text (Output_Object, ")");
Output_Object.Disp_Char_Count := Output_Object.Disp_Char_Count + 1;
--Output_Object.Disp_Large_Char_Count := <unchanged>;
end if;
when ARM_Output.Left_Floor =>
if FALSE and (Output_Object.HTML_Kind > HTML_3 and Output_Object.Use_Unicode) then
-- This character doesn't display on US Windows 2000/XP.
Output_Text (Output_Object, "⌊");
Output_Object.Disp_Char_Count := Output_Object.Disp_Char_Count + 1;
Output_Object.Disp_Large_Char_Count := Output_Object.Disp_Large_Char_Count + 1;
else
Output_Text (Output_Object, "<I>Floor</I>(");
Output_Object.Disp_Char_Count := Output_Object.Disp_Char_Count + 6;
Output_Object.Disp_Large_Char_Count := Output_Object.Disp_Large_Char_Count + 1;
end if;
when ARM_Output.Right_Floor =>
if FALSE and (Output_Object.HTML_Kind > HTML_3 and Output_Object.Use_Unicode) then
-- This character doesn't display on US Windows 2000/XP.
Output_Text (Output_Object, "⌋");
Output_Object.Disp_Char_Count := Output_Object.Disp_Char_Count + 1;
Output_Object.Disp_Large_Char_Count := Output_Object.Disp_Large_Char_Count + 1;
else
Output_Text (Output_Object, ")");
Output_Object.Disp_Char_Count := Output_Object.Disp_Char_Count + 1;
--Output_Object.Disp_Large_Char_Count := <unchanged>;
end if;
when ARM_Output.Thin_Space =>
if FALSE and (Output_Object.HTML_Kind > HTML_3 and Output_Object.Use_Unicode) then
-- This character doesn't display on US Windows 2000/XP.
Output_Text (Output_Object, " ");
Output_Object.Disp_Char_Count := Output_Object.Disp_Char_Count + 1;
else
Output_Text (Output_Object, " ");
Output_Object.Disp_Char_Count := Output_Object.Disp_Char_Count + 1;
end if;
--Output_Object.Disp_Large_Char_Count := <unchanged>;
when ARM_Output.Left_Quote =>
if Output_Object.HTML_Kind > HTML_3 then
Output_Text (Output_Object, "‘");
Output_Object.Disp_Char_Count := Output_Object.Disp_Char_Count + 1;
else
Output_Text (Output_Object, "`");
Output_Object.Disp_Char_Count := Output_Object.Disp_Char_Count + 1;
end if;
--Output_Object.Disp_Large_Char_Count := <unchanged>;
when ARM_Output.Right_Quote =>
if Output_Object.HTML_Kind > HTML_3 then
Output_Text (Output_Object, "’");
Output_Object.Disp_Char_Count := Output_Object.Disp_Char_Count + 1;
else
Output_Text (Output_Object, "'");
Output_Object.Disp_Char_Count := Output_Object.Disp_Char_Count + 1;
end if;
--Output_Object.Disp_Large_Char_Count := <unchanged>;
when ARM_Output.Left_Double_Quote =>
if Output_Object.HTML_Kind > HTML_3 then
Output_Text (Output_Object, "“");
Output_Object.Disp_Char_Count := Output_Object.Disp_Char_Count + 1;
else
Output_Text (Output_Object, """");
Output_Object.Disp_Char_Count := Output_Object.Disp_Char_Count + 1;
end if;
--Output_Object.Disp_Large_Char_Count := <unchanged>;
when ARM_Output.Right_Double_Quote =>
if Output_Object.HTML_Kind > HTML_3 then
Output_Text (Output_Object, "”");
Output_Object.Disp_Char_Count := Output_Object.Disp_Char_Count + 1;
else
Output_Text (Output_Object, """");
Output_Object.Disp_Char_Count := Output_Object.Disp_Char_Count + 1;
end if;
--Output_Object.Disp_Large_Char_Count := <unchanged>;
when ARM_Output.Small_Dotless_I =>
if Output_Object.HTML_Kind > HTML_3 then --and Output_Object.Use_Unicode then -- We'll use it if it might be supported.
Output_Text (Output_Object, "ı");
Output_Object.Disp_Char_Count := Output_Object.Disp_Char_Count + 1;
else
Output_Text (Output_Object, "i");
Output_Object.Disp_Char_Count := Output_Object.Disp_Char_Count + 1;
end if;
--Output_Object.Disp_Large_Char_Count := <unchanged>;
when ARM_Output.Capital_Dotted_I =>
if Output_Object.HTML_Kind > HTML_3 then --and Output_Object.Use_Unicode then -- We'll use it if it might be supported.
Output_Text (Output_Object, "İ");
Output_Object.Disp_Char_Count := Output_Object.Disp_Char_Count + 1;
else
Output_Text (Output_Object, "I");
Output_Object.Disp_Char_Count := Output_Object.Disp_Char_Count + 1;
end if;
Output_Object.Disp_Large_Char_Count := Output_Object.Disp_Large_Char_Count + 1;
end case;
Output_Object.Any_Nonspace := True;
Output_Object.Last_was_Space := False;
end Special_Character;
procedure Unicode_Character (Output_Object : in out HTML_Output_Type;
Char : in ARM_Output.Unicode_Type) is
-- Output a Unicode character, with code position Char.
Char_Code : constant String := ARM_Output.Unicode_Type'Image(Char);
begin
if not Output_Object.Is_Valid then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Not valid object");
end if;
if not Output_Object.Is_In_Paragraph then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Not in paragraph");
end if;
if Output_Object.HTML_Kind = HTML_3 then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Unicode not available for HTML 3");
end if;
if Output_Object.Conditional_Space then
Output_Object.Conditional_Space := False;
Output_Text (Output_Object, " ");
Output_Object.Disp_Char_Count := Output_Object.Disp_Char_Count + 1;
--Output_Object.Disp_Large_Char_Count := <unchanged>;
end if;
-- We don't check if this is valid, we just use it. So be sparing!
Output_Text (Output_Object, "&#" & Char_Code(2..Char_Code'Length) & ';');
Output_Object.Disp_Char_Count := Output_Object.Disp_Char_Count + 1;
Output_Object.Disp_Large_Char_Count := Output_Object.Disp_Large_Char_Count + 1; -- Assume it is large.
Output_Object.Any_Nonspace := True;
Output_Object.Last_was_Space := False;
end Unicode_Character;
procedure End_Hang_Item (Output_Object : in out HTML_Output_Type) is
-- Marks the end of a hanging item. Call only once per paragraph.
-- Raises Not_Valid_Error if the paragraph style is not in
-- Text_Prefixed_Style_Subtype, or if this has already been
-- called for the current paragraph, or if the paragraph was started
-- with No_Prefix = True.
begin
if not Output_Object.Is_Valid then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Not valid object");
end if;
if not Output_Object.Is_In_Paragraph then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Not in paragraph");
end if;
if Output_Object.Paragraph_Style not in
ARM_Output.Text_Prefixed_Style_Subtype then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Not a hanging paragraph - " & ARM_Output.Paragraph_Style_Type'Image(Output_Object.Paragraph_Style));
end if;
if Output_Object.Saw_Hang_End then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Already saw the end of the hanging part");
end if;
Output_Object.Saw_Hang_End := True;
if Output_Object.HTML_Kind = HTML_3 then
case Output_Object.Paragraph_Style is
-- Part of a definition list.
when ARM_Output.Small_Giant_Hanging | ARM_Output.Small_Wide_Hanging |
ARM_Output.Small_Medium_Hanging | ARM_Output.Small_Narrow_Hanging |
ARM_Output.Small_Hanging_in_Bulleted |
ARM_Output.Small_Enumerated =>
Ada.Text_IO.Put_Line (Output_Object.Output_File, "</FONT><DD><FONT SIZE=-1>");
when others =>
Ada.Text_IO.Put_Line (Output_Object.Output_File, "<DD>");
end case;
elsif Output_Object.HTML_Kind = HTML_4_Only then
declare
Saved_Format : ARM_Output.Format_Type;
begin
-- Save original format:
Saved_Format :=
(Bold => Output_Object.Is_Bold,
Italic => Output_Object.Is_Italic,
Font => Output_Object.Font,
Size => Output_Object.Size,
Color => Output_Object.Color,
Change => Output_Object.Change,
Version => Output_Object.Version,
Added_Version => Output_Object.Added_Version,
Location => Output_Object.Location);
-- Close any open formatting (can't leave it open across a DIV):
Text_Format (Output_Object,
Format => (Bold => False,
Italic => False,
Font => ARM_Output.Default,
Size => 0,
Color => ARM_Output.Default,
Change => ARM_Output.None,
Version => '0',
Added_Version => '0',
Location => ARM_Output.Normal));
-- This has to be a hanging style, so we ignore other cases:
Ada.Text_IO.Put (Output_Object.Output_File, "</div><div class=""" &
Paragraph_Name (Output_Object.Paragraph_Style, Output_Object.Paragraph_Indent) & "-Body"">");
-- If the prefix is too long, add a <BR>. A "unit" is 2.0 ems;
-- a large character is 0.65 ems; and a small character is 0.4 ems.
-- That should be quite conservative.
--Ada.Text_IO.Put_Line("Break hang check: large chars=" & Natural'Image(Output_Object.Disp_Large_Char_Count) &
--" small chars=" & Natural'Image(Output_Object.Disp_Char_Count - Output_Object.Disp_Large_Char_Count) &
--" Hang_Outdent=" & Natural'Image(Paragraph_Info(Output_Object.Paragraph_Format).Hang_Outdent));
if (Output_Object.Disp_Large_Char_Count*13) +
((Output_Object.Disp_Char_Count-Output_Object.Disp_Large_Char_Count)*8) >
Paragraph_Info(Output_Object.Paragraph_Style, Output_Object.Paragraph_Indent).Hang_Outdent*40 then
Ada.Text_IO.Put_Line (Output_Object.Output_File, "<br clear=""left"">");
-- We use "clear=left" so that the next line always
-- starts at the left margin. This shouldn't be necessary,
-- but I've seen cases where it was.
else
Ada.Text_IO.New_Line (Output_Object.Output_File);
end if;
-- Reopen any formatting (using the previously saved values):
Text_Format (Output_Object, Format => Saved_Format);
end;
else -- HTML 4 Compatibility
-- We have to close and reopen the font info here, so that we
-- properly nest these operations to pass the WC3 validator.
Put_End_Compatibility_Font_Info (Output_Object,
Output_Object.Paragraph_Style,
Output_Object.Paragraph_Indent);
-- This has to be a hanging style, so we ignore other cases:
Ada.Text_IO.Put (Output_Object.Output_File, "<dd class=""" &
Paragraph_Name (Output_Object.Paragraph_Style, Output_Object.Paragraph_Indent) & """>");
Put_Compatibility_Font_Info (Output_Object,
Output_Object.Paragraph_Style,
Output_Object.Paragraph_Indent);
end if;
Paragraph_Used(Output_Object.Paragraph_Style, Output_Object.Paragraph_Indent) := True;
Output_Object.Char_Count := 0;
Output_Object.Disp_Char_Count := 0;
Output_Object.Disp_Large_Char_Count := 0;
Output_Object.Any_Nonspace := False;
Output_Object.Last_Was_Space := True; -- Start of line.
Output_Object.Conditional_Space := False; -- Don't need it here.
end End_Hang_Item;
procedure New_Column (Output_Object : in out HTML_Output_Type) is
-- Output a column break.
-- Raises Not_Valid_Error if in a paragraph, or if the number of
-- columns is 1.
begin
if not Output_Object.Is_Valid then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Not valid object");
end if;
if Output_Object.Is_In_Paragraph then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"New Column in paragraph");
end if;
if Output_Object.Column_Count <= 1 then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Not in a multi-column area");
end if;
if Output_Object.Column_Count >= 4 then
Output_Object.Current_Column := Output_Object.Current_Column + 1;
Output_Object.Current_Item := 1;
-- else ignore it, no columns will be used.
end if;
end New_Column;
procedure Text_Format (Output_Object : in out HTML_Output_Type;
Format : in ARM_Output.Format_Type) is
-- Change the text format so that all of the properties are as specified.
-- Note: Changes to these properties ought be stack-like; that is,
-- Bold on, Italic on, Italic off, Bold off is OK; Bold on, Italic on,
-- Bold off, Italic off should be avoided (as separate commands).
use type ARM_Output.Change_Type;
use type ARM_Output.Location_Type;
use type ARM_Output.Size_Type;
use type ARM_Output.Color_Type;
function Change_Needs_Close_or_Open return Boolean is
-- Returns True if "Change" needs to open or close something, based
-- on the current values of Output_Object.
begin
return (Format.Change /= Output_Object.Change or else
Format.Version /= Output_Object.Version or else
Format.Added_Version /= Output_Object.Added_Version);
end Change_Needs_Close_or_Open;
function Font_Needs_Close_or_Open return Boolean is
-- Returns True if "Font" needs to close something, based
-- on the current values of Output_Object and the new value.
-- Note that this depends on whether the Change needs to open
-- or close something; if it does, we need to close and reopen
-- the font even if it is not changing.
begin
return (ARM_Output."/=" (Format.Font, Output_Object.Font) or else
Change_Needs_Close_or_Open);
end Font_Needs_Close_or_Open;
function Location_Needs_Close_or_Open return Boolean is
-- Returns True if "Location" needs to close something, based
-- on the current values of Output_Object and the new value.
-- Note that this depends on whether the Change or Font needs
-- to open or close something; if they do, we need to close and
-- reopen the location even if it is not changing.
begin
return Format.Location /= Output_Object.Location or else
Change_Needs_Close_or_Open or else Font_Needs_Close_or_Open;
end Location_Needs_Close_or_Open;
function Color_Needs_Close_or_Open return Boolean is
-- Returns True if "Color" needs to close something, based
-- on the current values of Output_Object, and the new value.
-- Note that this depends on whether the Change, Font,
-- or Location needs to open or close something; if they do,
-- we need to close the size even if it is not changing.
begin
return (Format.Color /= Output_Object.Color or else
Change_Needs_Close_or_Open or else Font_Needs_Close_or_Open or else
Location_Needs_Close_or_Open);
end Color_Needs_Close_or_Open;
function Size_Needs_Close_or_Open return Boolean is
-- Returns True if "Size" needs to close something, based
-- on the current values of Output_Object, and the new value.
-- Note that this depends on whether the Change, Color, Font,
-- or Location needs to open or close something; if they do,
-- we need to close the size even if it is not changing.
begin
return (Format.Size /= Output_Object.Size or else
Change_Needs_Close_or_Open or else Font_Needs_Close_or_Open or else
Location_Needs_Close_or_Open or else Color_Needs_Close_or_Open);
end Size_Needs_Close_or_Open;
function Italic_Needs_Close_or_Open return Boolean is
-- Returns True if "Italic" needs to close something, based
-- on the current values of Output_Object, and the new value.
-- Note that this depends on whether the Change, Font, Color,
-- Location, or Size needs to open or close something; if they do,
-- we need to close the italics even if it is not changing.
begin
return (Format.Italic /= Output_Object.Is_Italic or else
Change_Needs_Close_or_Open or else Font_Needs_Close_or_Open or else
Location_Needs_Close_or_Open or else Size_Needs_Close_or_Open or else
Color_Needs_Close_or_Open);
end Italic_Needs_Close_or_Open;
begin
if not Output_Object.Is_Valid then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Not valid object");
end if;
if not Output_Object.Is_In_Paragraph then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Not in paragraph");
end if;
-- We do these in this order so that the changes are stacked properly.
-- Note that we have to open and close stuff that is not changing
-- in order to get proper nesting in all cases.
if Output_Object.Is_Bold and then
((not Format.Bold) or else
Italic_Needs_Close_or_Open) then
-- The latter so that nesting is preserved; we'll reopen
-- the boldfacing on the other side if needed. Otherwise, when
-- Bold remains on, we'd leave the markup open but close some outer
-- item. That's wrong (even though many browsers can handle it).
Output_Text (Output_Object, "</B>");
Output_Object.Is_Bold := False;
end if;
if Output_Object.Is_Italic and then
((not Format.Italic) or else
Size_Needs_Close_or_Open) then
-- The latter so that nesting is preserved; we'll reopen
-- the italics on the other side in that case.
Output_Text (Output_Object, "</I>");
Output_Object.Is_Italic := False;
end if;
if Format.Size /= Output_Object.Size or else
Color_Needs_Close_or_Open then
-- The latter so that nesting is preserved; we'll reopen
-- the size on the other side in that case.
if Output_Object.Size /= 0 then
if Output_Object.HTML_Kind = HTML_4_Only then
Output_Text (Output_Object, "</SPAN>");
else
Output_Text (Output_Object, "</FONT>");
end if;
Output_Object.Size := 0; -- That's the size now.
end if;
end if;
if Format.Color /= Output_Object.Color or else
Location_Needs_Close_or_Open then
-- The latter so that nesting is preserved; we'll reopen
-- the size on the other side in that case.
if Output_Object.Color /= ARM_Output.Default then
if Output_Object.HTML_Kind = HTML_4_Only then
Output_Text (Output_Object, "</SPAN>");
else
Output_Text (Output_Object, "</FONT>");
end if;
Output_Object.Color := ARM_Output.Default; -- That's the color now.
end if;
end if;
if Format.Location /= Output_Object.Location or else
Change_Needs_Close_or_Open then
-- The latter so that nesting is preserved; we'll reopen
-- the location on the other side in that case.
case Output_Object.Location is
when ARM_Output.Superscript =>
if Output_Object.HTML_Kind = HTML_4_Only then
Output_Text (Output_Object, "</SPAN></SUP>");
else
Output_Text (Output_Object, "</FONT></SUP>");
end if;
when ARM_Output.Subscript =>
if Output_Object.HTML_Kind = HTML_4_Only then
Output_Text (Output_Object, "</SPAN></SUB>");
else
Output_Text (Output_Object, "</FONT></SUB>");
end if;
when ARM_Output.Normal =>
null;
end case;
Output_Object.Location := ARM_Output.Normal; -- That's the location now.
end if;
if ARM_Output."/=" (Format.Font, Output_Object.Font) or else
Change_Needs_Close_or_Open then
-- The latter so that nesting is preserved; we'll reopen
-- the font on the other side in that case.
case Output_Object.Font is
when ARM_Output.Default => null;
when ARM_Output.Fixed =>
Output_Text (Output_Object, "</TT>");
when ARM_Output.Roman =>
if Output_Object.HTML_Kind = HTML_4_Only then
Output_Text (Output_Object, "</SPAN>");
else
null; -- Default, currently.
--Output_Text (Output_Object, "</FONT>");
end if;
when ARM_Output.Swiss =>
if Output_Object.HTML_Kind = HTML_4_Only then
Output_Text (Output_Object, "</SPAN>");
else
Output_Text (Output_Object, "</FONT>");
end if;
end case;
Output_Object.Font := ARM_Output.Default; -- We're now in the default state.
end if;
if Format.Change /= Output_Object.Change or else
Format.Version /= Output_Object.Version or else
Format.Added_Version /= Output_Object.Added_Version then
case Output_Object.Change is
when ARM_Output.Insertion =>
if Output_Object.HTML_Kind = HTML_3 then
Output_Text (Output_Object, "</U>");
else
--Output_Text (Output_Object, "</ins>");
Output_Text (Output_Object, "</span>");
end if;
-- Note: We need to follow these with a space so that
-- we don't get words running together for indexing
-- purposes (Google, Ada Indexer). That's only a concern
-- for deletions directly following insertions (at least in
-- the absence of nesting), so we only add the extra space
-- after insertions. RTF needs insertions and deletions
-- without spaces to work properly, thus the source does not
-- have them.
-- If the last character of the displayed text is a space,
-- we don't need this, and don't generate it. We do
-- generate it for punctuation, as we want a space following
-- that in general.
-- If the next visible character is not in some sort of
-- change section, we'd prefer to not generate
-- the space, but there is no obvious way to determine that
-- (we don't know when the command ends here).
-- We can, however, generate a conditional space that is
-- not generated if the next visible character is a space
-- or punctuation (we don't usually want a space *before*
-- punctuation).
if Output_Object.Last_was_Space then
null;
else
Output_Object.Conditional_Space := True;
end if;
when ARM_Output.Deletion =>
if Output_Object.HTML_Kind = HTML_3 then
Output_Text (Output_Object, "</S>");
else
--Output_Text (Output_Object, "</del>");
Output_Text (Output_Object, "</span>");
end if;
when ARM_Output.Both =>
if Output_Object.HTML_Kind = HTML_3 then
Output_Text (Output_Object, "</S></U>");
else
--Output_Text (Output_Object, "</del></ins>");
--Output_Text (Output_Object, "</span>");
-- CSS2 doesn't allow multiple decorations in a single definition, so we have
-- to nest them. But that might not be right, either (it works on IE).
Output_Text (Output_Object, "</span></span>");
end if;
if Output_Object.Last_was_Space then -- See above for reasons for this.
null;
else
Output_Object.Conditional_Space := True;
end if;
when ARM_Output.None =>
null;
end case;
case Format.Change is
when ARM_Output.Insertion =>
if Output_Object.HTML_Kind = HTML_3 then
Output_Text (Output_Object, "<U>");
else
--Output_Text (Output_Object, "<ins>");
Output_Text (Output_Object, "<span class=""insert" & Format.Version & """>");
Revision_Used(Format.Version) := True;
end if;
when ARM_Output.Deletion =>
if Output_Object.HTML_Kind = HTML_3 then
Output_Text (Output_Object, "<S>");
else
--Output_Text (Output_Object, "<del>");
Output_Text (Output_Object, "<span class=""delete" & Format.Version & """>");
Revision_Used(Format.Version) := True;
end if;
when ARM_Output.Both =>
if Output_Object.HTML_Kind = HTML_3 then
Output_Text (Output_Object, "<U><S>");
else
--Output_Text (Output_Object, "<ins><del>");
--Output_Text (Output_Object, "<span class=""both" & Format.Version & """>");
-- CSS2 doesn't allow multiple decorations in a single definition, so we have
-- to nest them. But that might not be right, either (it works on IE).
Output_Text (Output_Object, "<span class=""insert" & Format.Added_Version & """>");
Output_Text (Output_Object, "<span class=""delete" & Format.Version & """>");
Revision_Used(Format.Added_Version) := True;
Revision_Used(Format.Version) := True;
end if;
when ARM_Output.None =>
null;
end case;
Output_Object.Change := Format.Change;
Output_Object.Version := Format.Version;
Output_Object.Added_Version := Format.Added_Version;
end if;
if ARM_Output."/=" (Format.Font, Output_Object.Font) then
case Format.Font is
when ARM_Output.Default => null;
when ARM_Output.Fixed =>
Output_Text (Output_Object, "<TT>");
when ARM_Output.Roman =>
if Output_Object.HTML_Kind = HTML_4_Only then
Output_Text (Output_Object, "<SPAN Class=""roman"">");
else
null; -- Default, currently.
--Output_Text (Output_Object, "<FONT xxx>");
end if;
when ARM_Output.Swiss =>
if Output_Object.HTML_Kind = HTML_4_Only then
Output_Text (Output_Object, "<SPAN Class=""swiss"">");
else
Output_Text (Output_Object, SWISS_FONT_CODE);
end if;
end case;
Output_Object.Font := Format.Font;
end if;
if Format.Location /= Output_Object.Location then
-- Note: Location needs to be changed before size, as they
-- typically are changed together, and <SUP> and <SUB> reset the
-- size.
case Format.Location is
when ARM_Output.Superscript =>
if Output_Object.HTML_Kind = HTML_4_Only then
Output_Text (Output_Object, "<SUP><SPAN STYLE=""font-size: 140%"">");
-- This is a bit larger than +1; the text is usually too small.
else
Output_Text (Output_Object, "<SUP><FONT SIZE=""+1"">");
end if;
when ARM_Output.Subscript =>
if Output_Object.HTML_Kind = HTML_4_Only then
Output_Text (Output_Object, "<SUB><SPAN STYLE=""font-size: 140%"">");
-- This is a bit larger than +1; the text is usually too small.
else
Output_Text (Output_Object, "<SUB><FONT SIZE=""+1"">");
end if;
when ARM_Output.Normal =>
null;
end case;
Output_Object.Location := Format.Location;
end if;
if Format.Color /= Output_Object.Color then
if Output_Object.HTML_Kind = HTML_4_Only then
case Format.Color is
when ARM_Output.Default => null;
when ARM_Output.Black =>
Output_Text (Output_Object, "<SPAN STYLE=""color: rgb(0,0,0)"">");
when ARM_Output.Red =>
Output_Text (Output_Object, "<SPAN STYLE=""color: rgb(153,0,0)"">");
when ARM_Output.Green =>
Output_Text (Output_Object, "<SPAN STYLE=""color: rgb(0,153,0)"">");
when ARM_Output.Blue =>
Output_Text (Output_Object, "<SPAN STYLE=""color: rgb(0,0,153)"">");
end case;
else
case Format.Color is
when ARM_Output.Default => null;
when ARM_Output.Black =>
Output_Text (Output_Object, "<FONT COLOR=""#000000"">");
when ARM_Output.Red =>
Output_Text (Output_Object, "<FONT COLOR=""#990000"">");
when ARM_Output.Green =>
Output_Text (Output_Object, "<FONT COLOR=""#009900"">");
when ARM_Output.Blue =>
Output_Text (Output_Object, "<FONT COLOR=""#000099"">");
end case;
end if;
Output_Object.Color := Format.Color;
end if;
if Format.Size /= Output_Object.Size then
if Output_Object.HTML_Kind = HTML_4_Only then
case Format.Size is
when 0 => null; -- Do nothing.
when 1 => Output_Text (Output_Object, "<SPAN STYLE=""font-size: 125%"">");
when 2 => Output_Text (Output_Object, "<SPAN STYLE=""font-size: 156%"">");
when 3 => Output_Text (Output_Object, "<SPAN STYLE=""font-size: 194%"">");
when 4 => Output_Text (Output_Object, "<SPAN STYLE=""font-size: 244%"">");
when 5 => Output_Text (Output_Object, "<SPAN STYLE=""font-size: 305%"">");
when -1 => Output_Text (Output_Object, "<SPAN STYLE=""font-size: 80%"">");
when -2 => Output_Text (Output_Object, "<SPAN STYLE=""font-size: 64%"">");
when -3 => Output_Text (Output_Object, "<SPAN STYLE=""font-size: 51%"">");
when -4 => Output_Text (Output_Object, "<SPAN STYLE=""font-size: 41%"">");
when -5 => Output_Text (Output_Object, "<SPAN STYLE=""font-size: 33%"">");
when others =>
-- Too much change:
if Format.Size > 0 then
Output_Text (Output_Object, "<SPAN STYLE=""font-size: 305%"">");
else
Output_Text (Output_Object, "<SPAN STYLE=""font-size: 33%"">");
end if;
end case;
else
-- HTML sizes are 1..7, with a default of 3. So we limit the changes.
if Format.Size > 0 then
if Format.Size > 5 then
Output_Text (Output_Object, "<FONT SIZE=""+5"">");
else
Output_Text (Output_Object, "<FONT SIZE=""+" &
Character'Val(Format.Size + Character'Pos('0')) & """>");
end if;
elsif Format.Size < 0 then
if Format.Size < -4 then
Output_Text (Output_Object, "<FONT SIZE=""-4"">");
else
Output_Text (Output_Object, "<FONT SIZE=""-" &
Character'Val(abs Format.Size + Character'Pos('0')) & """>");
end if;
-- else Format.Size=0, nothing to do.
end if;
end if;
Output_Object.Size := Format.Size;
end if;
if Format.Italic and (not Output_Object.Is_Italic) then
Output_Text (Output_Object, "<I>");
Output_Object.Is_Italic := True;
end if;
if Format.Bold and (not Output_Object.Is_Bold) then
Output_Text (Output_Object, "<B>");
Output_Object.Is_Bold := True;
end if;
end Text_Format;
procedure Clause_Reference (Output_Object : in out HTML_Output_Type;
Text : in String;
Clause_Number : in String) is
-- Generate a reference to a clause in the standard. The text of
-- the reference is "Text", and the number of the clause is
-- Clause_Number. For hyperlinked formats, this should generate
-- a link; for other formats, the text alone is generated.
begin
if not Output_Object.Is_Valid then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Not valid object");
end if;
if not Output_Object.Is_In_Paragraph then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Not in paragraph");
end if;
if Clause_Number = "X.X" then
-- Link to a dead clause, just output the text (presumably this
-- is deleted).
Ordinary_Text (Output_Object, Text);
else
Output_Text (Output_Object, "<A HREF=""");
declare
Name : constant String :=
Make_Clause_Link_Name (Output_Object, Clause_Number);
begin
Output_Text (Output_Object, Name);
end;
Output_Text (Output_Object, """>");
Ordinary_Text (Output_Object, Text);
Output_Text (Output_Object, "</A>");
end if;
end Clause_Reference;
procedure Index_Target (Output_Object : in out HTML_Output_Type;
Index_Key : in Natural) is
-- Generate a index target. This marks the location where an index
-- reference occurs. Index_Key names the index item involved.
-- For hyperlinked formats, this should generate a link target;
-- for other formats, nothing is generated.
begin
if not Output_Object.Is_Valid then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Not valid object");
end if;
if not Output_Object.Is_In_Paragraph then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Not in paragraph");
end if;
-- Insert an anchor:
Output_Text (Output_Object, "<A NAME=""I");
declare
Key_Name : constant String := Natural'Image(Index_Key);
begin
Output_Text (Output_Object, Key_Name(2..Key_Name'Last));
end;
Output_Text (Output_Object, """></A>");
end Index_Target;
procedure Index_Reference (Output_Object : in out HTML_Output_Type;
Text : in String;
Index_Key : in Natural;
Clause_Number : in String) is
-- Generate a reference to an index target in the standard. The text
-- of the reference is "Text", and Index_Key and Clause_Number denotes
-- the target. For hyperlinked formats, this should generate
-- a link; for other formats, the text alone is generated.
begin
if not Output_Object.Is_Valid then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Not valid object");
end if;
if not Output_Object.Is_In_Paragraph then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Not in paragraph");
end if;
Output_Text (Output_Object, "<A HREF=""");
if Output_Object.Big_Files then
null; -- No file name needed, this is a self-reference.
else
if Output_Object.DOS_Filenames then
Output_Text (Output_Object,
Make_Clause_File_Name (Output_Object, Clause_Number)
& ".HTM");
else
Output_Text (Output_Object,
Make_Clause_File_Name (Output_Object, Clause_Number)
& ".html");
end if;
end if;
Output_Text (Output_Object, "#I");
declare
Key_Name : constant String := Natural'Image(Index_Key);
begin
Output_Text (Output_Object, Key_Name(2..Key_Name'Last));
end;
Output_Text (Output_Object, """>");
Ordinary_Text (Output_Object, Text);
Output_Text (Output_Object, "</A>");
end Index_Reference;
procedure DR_Reference (Output_Object : in out HTML_Output_Type;
Text : in String;
DR_Number : in String) is
-- Generate a reference to an DR from the standard. The text
-- of the reference is "Text", and DR_Number denotes
-- the target. For hyperlinked formats, this should generate
-- a link; for other formats, the text alone is generated.
begin
if not Output_Object.Is_Valid then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Not valid object");
end if;
if not Output_Object.Is_In_Paragraph then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Not in paragraph");
end if;
declare
Num : Integer := Integer'Value(DR_Number(DR_Number'Last-3 .. DR_Number'Last));
begin
Output_Text (Output_Object, "<A HREF=""");
if Num <= 93 then -- In Defect Reports 1. -- %%%% Update if changed.
Output_Text (Output_Object, "defect1.html");
else -- In Defect Reports 2.
Output_Text (Output_Object, "defect2.html");
end if;
Output_Text (Output_Object, "#");
Output_Text (Output_Object, DR_Number);
end;
Output_Text (Output_Object, """>");
Ordinary_Text (Output_Object, Text);
Output_Text (Output_Object, "</A>");
end DR_Reference;
function Folded_AI95_Number (AI_String : in String) return String is
-- Internal routine.
-- Calculate the "folded" AI number from the full version.
-- AI_String should be in the form "AIzz-00xxx-yy", where -yy, 00,
-- and zz are optional, and 'zz' = 95 if given.
Result : String(1..5);
Hyphen_1 : Natural := Ada.Strings.Fixed.Index (AI_String, "-");
Hyphen_2 : Natural;
begin
if Hyphen_1 = 0 or else AI_String'Last < Hyphen_1+3 then
Result := "00001";
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Bad AI reference " & AI_String);
elsif Hyphen_1 = AI_String'First+4 and then
AI_String(AI_String'First..Hyphen_1-1) /= "AI95" then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Unknown AI reference " & AI_String);
Result := "00001";
elsif Hyphen_1 = AI_String'First+2 and then
AI_String(AI_String'First..Hyphen_1-1) /= "AI" then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Unknown short AI reference " & AI_String);
Result := "00001";
else
Hyphen_2 := Ada.Strings.Fixed.Index (AI_String(Hyphen_1+1..AI_String'Last), "-");
if Hyphen_2 = 0 then
if AI_String'Last = Hyphen_1+5 then
Result := AI_String(Hyphen_1+1 .. Hyphen_1+5);
elsif AI_String'Last = Hyphen_1+4 then
Result(2..5) := AI_String(Hyphen_1+1 .. Hyphen_1+4);
Result(1) := '0';
elsif AI_String'Last = Hyphen_1+3 then
Result(3..5) := AI_String(Hyphen_1+1 .. Hyphen_1+3);
Result(1) := '0';
Result(2) := '0';
else
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"AI reference too wrong length " & AI_String);
Result := "00001";
end if;
else
if (Hyphen_2-1) - (Hyphen_1+1) = 5-1 then
Result := AI_String (Hyphen_1+1 .. Hyphen_2-1);
elsif (Hyphen_2-1) - (Hyphen_1+1) = 4-1 then
Result(2..5) := AI_String (Hyphen_1+1 .. Hyphen_2-1);
Result(1) := '0';
elsif (Hyphen_2-1) - (Hyphen_1+1) = 3-1 then
Result(3..5) := AI_String (Hyphen_1+1 .. Hyphen_2-1);
Result(1) := '0';
Result(2) := '0';
else
Result := "00001";
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Bad AI reference (hyphen dist) " & AI_String);
end if;
if AI_String'Last < Hyphen_2+1 or else
AI_String'Last > Hyphen_2+2 then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Bad AI alternative reference " & AI_String);
elsif AI_String'Last = Hyphen_2+1 then
Result(1) := Character'Pred(AI_String(Hyphen_2+1));
elsif AI_String'Last = Hyphen_2+2 and then AI_String(Hyphen_2+1) = '0' then
Result(1) := Character'Pred(AI_String(Hyphen_2+2));
elsif AI_String'Last = Hyphen_2+2 and then AI_String(Hyphen_2+1) = '1' then
if AI_String(Hyphen_2+2) = '0' then
Result(1) := '9';
else
Result(1) := Character'Val(Character'Pos(AI_String(Hyphen_2+2)) - Character'Pos('1') + Character'Pos('A'));
end if;
elsif AI_String'Last = Hyphen_2+2 and then AI_String(Hyphen_2+1) = '2' then
Result(1) := Character'Val(Character'Pos(AI_String(Hyphen_2+2)) - Character'Pos('1') + Character'Pos('A') + 10);
else
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Bad AI alternative reference " & AI_String);
end if;
end if;
end if;
return Result;
end Folded_AI95_Number;
procedure AI_Reference (Output_Object : in out HTML_Output_Type;
Text : in String;
AI_Number : in String) is
-- Generate a reference to an AI from the standard. The text
-- of the reference is "Text", and AI_Number denotes
-- the target (in unfolded format). For hyperlinked formats, this should
-- generate a link; for other formats, the text alone is generated.
--
-- We assume AI number is of the form:
-- ZZZZ-nnnn-m whre ZZZZ=AI05, AI12, or SI99, nnnn is a four digit number,
-- and -m is an optional number (-1 is used if it is omitted); or
-- AIzz-nnnnn-mm where AIzz=AI95 or AI (meaning AI95);
-- nnnnn is a five digit number, and -mm is an optional two digit number.
-- We raise Not_Valid_Error otherwise.
begin
if not Output_Object.Is_Valid then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Not valid object");
end if;
if not Output_Object.Is_In_Paragraph then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Not in paragraph");
end if;
if AI_Number'Length > 5 and then
AI_Number(AI_Number'First..AI_Number'First+4) = "AI12-" then
-- AI12:
if AI_Number'Length >= 9 then
if AI_Number(AI_Number'First+5) not in '0'..'9' or else
AI_Number(AI_Number'First+6) not in '0'..'9' or else
AI_Number(AI_Number'First+7) not in '0'..'9' or else
AI_Number(AI_Number'First+8) not in '0'..'9' then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Bad number in AI12 number: " & AI_Number);
end if;
end if;
if AI_Number'Length = 9 then
Output_Text (Output_Object, "<A HREF=""http://www.ada-auth.org/cgi-bin/cvsweb.cgi/AI12s/");
Output_Text (Output_Object, AI_Number & "-1");
elsif AI_Number'Length = 11 then
if AI_Number(AI_Number'Last-1) /= '-' or else
AI_Number(AI_Number'Last) not in '0'..'9' then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Bad sequence number in AI12 number: " & AI_Number);
end if;
Output_Text (Output_Object, "<A HREF=""http://www.ada-auth.org/cgi-bin/cvsweb.cgi/AI12s/");
Output_Text (Output_Object, AI_Number);
else
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Bad AI12 number: " & AI_Number);
end if;
elsif AI_Number'Length > 5 and then
AI_Number(AI_Number'First..AI_Number'First+4) = "AI05-" then
-- AI05:
if AI_Number'Length >= 9 then
if AI_Number(AI_Number'First+5) not in '0'..'9' or else
AI_Number(AI_Number'First+6) not in '0'..'9' or else
AI_Number(AI_Number'First+7) not in '0'..'9' or else
AI_Number(AI_Number'First+8) not in '0'..'9' then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Bad number in AI05 number: " & AI_Number);
end if;
end if;
if AI_Number'Length = 9 then
Output_Text (Output_Object, "<A HREF=""http://www.ada-auth.org/cgi-bin/cvsweb.cgi/AI05s/");
Output_Text (Output_Object, AI_Number & "-1");
elsif AI_Number'Length = 11 then
if AI_Number(AI_Number'Last-1) /= '-' or else
AI_Number(AI_Number'Last) not in '0'..'9' then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Bad sequence number in AI05 number: " & AI_Number);
end if;
Output_Text (Output_Object, "<A HREF=""http://www.ada-auth.org/cgi-bin/cvsweb.cgi/AI05s/");
Output_Text (Output_Object, AI_Number);
else
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Bad AI05 number: " & AI_Number);
end if;
elsif AI_Number'Length > 5 and then
AI_Number(AI_Number'First..AI_Number'First+4) = "SI99-" then
if AI_Number'Length >= 9 then
if AI_Number(AI_Number'First+5) not in '0'..'9' or else
AI_Number(AI_Number'First+6) not in '0'..'9' or else
AI_Number(AI_Number'First+7) not in '0'..'9' or else
AI_Number(AI_Number'First+8) not in '0'..'9' then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Bad number in SI99 number: " & AI_Number);
end if;
end if;
if AI_Number'Length = 9 then
Output_Text (Output_Object, "<A HREF=""http://www.ada-auth.org/cgi-bin/cvsweb.cgi/SI99s/");
Output_Text (Output_Object, AI_Number & "-1");
elsif AI_Number'Length = 11 then
if AI_Number(AI_Number'Last-1) /= '-' or else
AI_Number(AI_Number'Last) not in '0'..'9' then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Bad sequence number in SI99 number: " & AI_Number);
end if;
Output_Text (Output_Object, "<A HREF=""http://www.ada-auth.org/cgi-bin/cvsweb.cgi/SI99s/");
Output_Text (Output_Object, AI_Number);
else
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Bad SI99 number: " & AI_Number);
end if;
else -- Must be AI95:
declare
Folded : constant String :=
Folded_AI95_Number(AI_Number); -- We don't want to have written anything if we raise an exception.
begin
Output_Text (Output_Object, "<A HREF=""http://www.ada-auth.org/cgi-bin/cvsweb.cgi/AIs/AI-");
Output_Text (Output_Object, Folded);
end;
end if;
Output_Text (Output_Object, ".TXT"">");
Ordinary_Text (Output_Object, Text);
Output_Text (Output_Object, "</A>");
end AI_Reference;
procedure Local_Target (Output_Object : in out HTML_Output_Type;
Text : in String;
Target : in String) is
-- Generate a local target. This marks the potential target of local
-- links identified by "Target". Text is the text of the target.
-- For hyperlinked formats, this should generate a link target;
-- for other formats, only the text is generated.
begin
if not Output_Object.Is_Valid then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Not valid object");
end if;
if not Output_Object.Is_In_Paragraph then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Not in paragraph");
end if;
-- Insert an anchor:
Output_Text (Output_Object, "<A NAME=""");
Output_Text (Output_Object, Target);
Output_Text (Output_Object, """>");
Ordinary_Text (Output_Object, Text);
Output_Text (Output_Object, "</A>");
end Local_Target;
procedure Local_Link (Output_Object : in out HTML_Output_Type;
Text : in String;
Target : in String;
Clause_Number : in String) is
-- Generate a local link to the target and clause given.
-- Text is the text of the link.
-- For hyperlinked formats, this should generate a link;
-- for other formats, only the text is generated.
begin
if not Output_Object.Is_Valid then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Not valid object");
end if;
if not Output_Object.Is_In_Paragraph then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Not in paragraph");
end if;
-- Insert an anchor:
Output_Text (Output_Object, "<A HREF=""");
if Output_Object.Big_Files then
null; -- No file name needed, this is a self-reference.
else
if Output_Object.DOS_Filenames then
Output_Text (Output_Object,
Make_Clause_File_Name (Output_Object, Clause_Number)
& ".HTM");
else
Output_Text (Output_Object,
Make_Clause_File_Name (Output_Object, Clause_Number)
& ".html");
end if;
end if;
Output_Text (Output_Object, "#" & Target);
Output_Text (Output_Object, """>");
Ordinary_Text (Output_Object, Text);
Output_Text (Output_Object, "</A>");
end Local_Link;
procedure Local_Link_Start (Output_Object : in out HTML_Output_Type;
Target : in String;
Clause_Number : in String) is
-- Generate a local link to the target and clause given.
-- The link will surround text until Local_Link_End is called.
-- Local_Link_End must be called before this routine can be used again.
-- For hyperlinked formats, this should generate a link;
-- for other formats, only the text is generated.
begin
if not Output_Object.Is_Valid then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Not valid object");
end if;
if not Output_Object.Is_In_Paragraph then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Not in paragraph");
end if;
if Output_Object.In_Local_Link then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Already in a local link");
end if;
Output_Object.In_Local_Link := True;
-- Insert an anchor:
Output_Text (Output_Object, "<A HREF=""");
if Output_Object.Big_Files then
null; -- No file name needed, this is a self-reference.
else
if Output_Object.DOS_Filenames then
Output_Text (Output_Object,
Make_Clause_File_Name (Output_Object, Clause_Number)
& ".HTM");
else
Output_Text (Output_Object,
Make_Clause_File_Name (Output_Object, Clause_Number)
& ".html");
end if;
end if;
Output_Text (Output_Object, "#" & Target);
Output_Text (Output_Object, """>");
end Local_Link_Start;
procedure Local_Link_End (Output_Object : in out HTML_Output_Type;
Target : in String;
Clause_Number : in String) is
-- End a local link for the target and clause given.
-- This must be in the same paragraph as the Local_Link_Start.
-- For hyperlinked formats, this should generate a link;
-- for other formats, only the text is generated.
begin
if not Output_Object.Is_Valid then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Not valid object");
end if;
if not Output_Object.Is_In_Paragraph then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Not in paragraph");
end if;
if not Output_Object.In_Local_Link then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Not in a local link");
end if;
Output_Text (Output_Object, "</A>");
Output_Object.In_Local_Link := False;
end Local_Link_End;
procedure URL_Link (Output_Object : in out HTML_Output_Type;
Text : in String;
URL : in String) is
-- Generate a link to the URL given.
-- Text is the text of the link.
-- For hyperlinked formats, this should generate a link;
-- for other formats, only the text is generated.
begin
if not Output_Object.Is_Valid then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Not valid object");
end if;
if not Output_Object.Is_In_Paragraph then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Not in paragraph");
end if;
-- Insert an anchor:
Output_Text (Output_Object, "<A HREF=""");
Output_Text (Output_Object, URL);
Output_Text (Output_Object, """>");
Ordinary_Text (Output_Object, Text);
Output_Text (Output_Object, "</A>");
end URL_Link;
procedure Picture (Output_Object : in out HTML_Output_Type;
Name : in String;
Descr : in String;
Alignment : in ARM_Output.Picture_Alignment;
Height, Width : in Natural;
Border : in ARM_Output.Border_Kind) is
-- Generate a picture.
-- Name is the (simple) file name of the picture; Descr is a
-- descriptive name for the picture (it will appear in some web
-- browsers).
-- We assume that it is a .PNG or .JPG and that it will be present
-- in the same directory as the output files.
-- Alignment specifies the picture alignment.
-- Height and Width specify the picture size in pixels.
-- Border specifies the kind of border.
procedure Make_Img (Extra_Attribs : in String) is
H : constant String := Natural'Image(Height);
W : constant String := Natural'Image(Width);
begin
Output_Text (Output_Object, "<IMG src=""" & Name & """");
Output_Text (Output_Object, " height=""" & H(2..H'Last) &
""" width=""" & W(2..W'Last) & """");
if Extra_Attribs /= "" then
Output_Text (Output_Object, Extra_Attribs);
end if;
Output_Text (Output_Object, " alt=""" & Descr & """");
case Border is
when ARM_Output.None =>
Output_Text (Output_Object, " border=""0"">");
when ARM_Output.Thin =>
Output_Text (Output_Object, " border=""1"">");
when ARM_Output.Thick =>
Output_Text (Output_Object, " border=""2"">");
end case;
end Make_Img;
begin
if not Output_Object.Is_Valid then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Not valid object");
end if;
case Alignment is
when ARM_Output.Inline =>
if not Output_Object.Is_In_Paragraph then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Not in paragraph");
end if;
if Output_Object.HTML_Kind = HTML_3 then
Make_Img ("");
else
Make_Img (" style=""margin-left: 0.3em; margin-right: 0.3em""");
end if;
when ARM_Output.Float_Left =>
if not Output_Object.Is_In_Paragraph then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Not in paragraph");
end if;
if Output_Object.HTML_Kind = HTML_3 then
Make_Img (" align=""left""");
else
Make_Img (" align=""left"" style=""margin-right: 0.3em""");
-- Space on right only; left should align with containing
-- margin.
end if;
when ARM_Output.Float_Right =>
if not Output_Object.Is_In_Paragraph then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"Not in paragraph");
end if;
if Output_Object.HTML_Kind = HTML_3 then
Make_Img (" align=""right""");
else
Make_Img (" align=""right"" style=""margin-left: 0.3em""");
-- Space on right only; left should align with containing
-- margin.
end if;
when ARM_Output.Alone_Left =>
if Output_Object.Is_In_Paragraph then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"In paragraph");
end if;
if Output_Object.HTML_Kind = HTML_4_Only then
Output_Text (Output_Object, "<DIV Style=""text-align: left; margin-bottom: ");
Put_EMs(Output_Object.Output_File, (Paragraph_Info(ARM_Output.Normal, 0).After * LEADING_PERCENT) / 100);
Output_Text (Output_Object, """>");
else
Output_Text (Output_Object, "<P>");
end if;
Make_Img("");
if Output_Object.HTML_Kind = HTML_4_Only then
Output_Text (Output_Object, "</DIV>");
else
Output_Text (Output_Object, "</P>");
end if;
Ada.Text_IO.New_Line (Output_Object.Output_File);
Output_Object.Char_Count := 0;
Output_Object.Disp_Char_Count := 0;
Output_Object.Disp_Large_Char_Count := 0;
Output_Object.Any_Nonspace := False;
Output_Object.Last_Was_Space := True; -- Start of line.
Output_Object.Conditional_Space := False; -- Don't need it here.
when ARM_Output.Alone_Right =>
if Output_Object.Is_In_Paragraph then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"In paragraph");
end if;
if Output_Object.HTML_Kind = HTML_4_Only then
Output_Text (Output_Object, "<DIV Style=""text-align: right; margin-bottom: ");
Put_EMs(Output_Object.Output_File, (Paragraph_Info(ARM_Output.Normal, 0).After * LEADING_PERCENT) / 100);
Output_Text (Output_Object, """>");
else
Output_Text (Output_Object, "<RIGHT>");
end if;
Make_Img("");
if Output_Object.HTML_Kind = HTML_4_Only then
Output_Text (Output_Object, "</DIV>");
else
Output_Text (Output_Object, "</RIGHT>");
end if;
Ada.Text_IO.New_Line (Output_Object.Output_File);
Output_Object.Char_Count := 0;
Output_Object.Disp_Char_Count := 0;
Output_Object.Disp_Large_Char_Count := 0;
Output_Object.Any_Nonspace := False;
Output_Object.Last_Was_Space := True; -- Start of line.
Output_Object.Conditional_Space := False; -- Don't need it here.
when ARM_Output.Alone_Center =>
if Output_Object.Is_In_Paragraph then
Ada.Exceptions.Raise_Exception (ARM_Output.Not_Valid_Error'Identity,
"In paragraph");
end if;
if Output_Object.HTML_Kind = HTML_4_Only then
Output_Text (Output_Object, "<DIV Style=""text-align: center; margin-bottom: ");
Put_EMs(Output_Object.Output_File, (Paragraph_Info(ARM_Output.Normal, 0).After * LEADING_PERCENT) / 100);
Output_Text (Output_Object, """>");
else
Output_Text (Output_Object, "<CENTER>");
end if;
Make_Img("");
if Output_Object.HTML_Kind = HTML_4_Only then
Output_Text (Output_Object, "</DIV>");
else
Output_Text (Output_Object, "</CENTER>");
end if;
Ada.Text_IO.New_Line (Output_Object.Output_File);
Output_Object.Char_Count := 0;
Output_Object.Disp_Char_Count := 0;
Output_Object.Disp_Large_Char_Count := 0;
Output_Object.Any_Nonspace := False;
Output_Object.Last_Was_Space := True; -- Start of line.
Output_Object.Conditional_Space := False; -- Don't need it here.
end case;
end Picture;
begin
-- Define the styles:
-- Normal:
for I in ARM_Output.Paragraph_Indent_Type loop
Paragraph_Info(ARM_Output.Normal, I) :=
(Defined => True,
Tag => DIV,
Size => 0, -- 18
Font => ARM_Output.Default,
Indent => Natural(I),
Right_Indent => 0,
Hang_Outdent => 0,
Before => 0,
After => 6); -- 120
end loop;
-- Wide_Above:
for I in ARM_Output.Paragraph_Indent_Type loop
Paragraph_Info(ARM_Output.Wide_Above, I) :=
(Defined => True,
Tag => DIV,
Size => 0, -- 18
Font => ARM_Output.Default,
Indent => Natural(I),
Right_Indent => 0,
Hang_Outdent => 0,
Before => 6,
After => 6);
end loop;
-- Header:
for I in ARM_Output.Paragraph_Indent_Type loop
Paragraph_Info(ARM_Output.Header, I) :=
(Defined => True,
Tag => DIV,
Size => 0, -- 18
Font => ARM_Output.Default,
Indent => Natural(I),
Right_Indent => 0,
Hang_Outdent => 0,
Before => 0,
After => 0);
end loop;
-- Small:
for I in ARM_Output.Paragraph_Indent_Type loop
Paragraph_Info(ARM_Output.Small, I) :=
(Defined => True,
Tag => DIV,
Size => -1, -- 15
Font => ARM_Output.Default,
Indent => Natural(I),
Right_Indent => 0,
Hang_Outdent => 0,
Before => 0,
After => 6); -- 120
end loop;
-- Small_Wide_Above:
for I in ARM_Output.Paragraph_Indent_Type loop
Paragraph_Info(ARM_Output.Small_Wide_Above, I) :=
(Defined => True,
Tag => DIV,
Size => -1, -- 15
Font => ARM_Output.Default,
Indent => Natural(I),
Right_Indent => 0,
Hang_Outdent => 0,
Before => 6,
After => 6);
end loop;
-- Small Header:
for I in ARM_Output.Paragraph_Indent_Type loop
Paragraph_Info(ARM_Output.Small_Header, I) :=
(Defined => True,
Tag => DIV,
Size => -1, -- 15
Font => ARM_Output.Default,
Indent => Natural(I),
Right_Indent => 0,
Hang_Outdent => 0,
Before => 0,
After => 0);
end loop;
-- Examples:
for I in ARM_Output.Paragraph_Indent_Type loop
Paragraph_Info(ARM_Output.Examples, I) :=
(Defined => True,
Tag => DIV,
Size => 0, -- 18
Font => ARM_Output.Fixed,
Indent => Natural(I),
Right_Indent => 0,
Hang_Outdent => 0,
Before => 0,
After => 6); -- 120
end loop;
-- Small Examples:
for I in ARM_Output.Paragraph_Indent_Type loop
Paragraph_Info(ARM_Output.Small_Examples, I) :=
(Defined => True,
Tag => DIV,
Size => -1, -- 15
Font => ARM_Output.Fixed,
Indent => Natural(I),
Right_Indent => 0,
Hang_Outdent => 0,
Before => 0,
After => 6); -- 120
end loop;
-- Swiss Examples:
for I in ARM_Output.Paragraph_Indent_Type loop
Paragraph_Info(ARM_Output.Swiss_Examples, I) :=
(Defined => True,
Tag => DIV,
Size => 0, -- 18
Font => ARM_Output.Swiss,
Indent => Natural(I),
Right_Indent => 0,
Hang_Outdent => 0,
Before => 0,
After => 6); -- 120
end loop;
-- Small Swiss Examples:
for I in ARM_Output.Paragraph_Indent_Type loop
Paragraph_Info(ARM_Output.Small_Swiss_Examples, I) :=
(Defined => True,
Tag => DIV,
Size => -1, -- 15
Font => ARM_Output.Swiss,
Indent => Natural(I),
Right_Indent => 0,
Hang_Outdent => 0,
Before => 0,
After => 6); -- 120
end loop;
-- Bulleted:
-- Note: Indent = 0 is not allowed.
for I in 1 .. ARM_Output.Paragraph_Indent_Type'Last loop
Paragraph_Info(ARM_Output.Bulleted, I) :=
(Defined => True,
Tag => UL,
Size => 0, -- 18
Font => ARM_Output.Default,
Indent => Natural(I),
Right_Indent => 1,
Hang_Outdent => 0,
Before => 0,
After => 5);
end loop;
-- Nested Bulleted:
-- Note: Indent = 0 is not allowed.
for I in 1 .. ARM_Output.Paragraph_Indent_Type'Last loop
Paragraph_Info(ARM_Output.Nested_Bulleted, I) :=
(Defined => True,
Tag => UL,
Size => 0, -- 18
Font => ARM_Output.Default,
Indent => Natural(I),
Right_Indent => 1,
Hang_Outdent => 0,
Before => 0,
After => 5);
end loop;
-- Small Bulleted:
-- Note: Indent = 0 is not allowed.
for I in 1 .. ARM_Output.Paragraph_Indent_Type'Last loop
Paragraph_Info(ARM_Output.Small_Bulleted, I) :=
(Defined => True,
Tag => UL,
Size => -1, -- 15
Font => ARM_Output.Default,
Indent => Natural(I),
Right_Indent => 1,
Hang_Outdent => 0,
Before => 0,
After => 5);
end loop;
-- Small Nested Bulleted:
-- Note: Indent = 0 is not allowed.
for I in 1 .. ARM_Output.Paragraph_Indent_Type'Last loop
Paragraph_Info(ARM_Output.Small_Nested_Bulleted, I) :=
(Defined => True,
Tag => UL,
Size => -1, -- 15
Font => ARM_Output.Default,
Indent => Natural(I),
Right_Indent => 1,
Hang_Outdent => 0,
Before => 0,
After => 5);
end loop;
-- Enumerated:
-- Note: Indent = 0 is not allowed.
for I in 1 .. ARM_Output.Paragraph_Indent_Type'Last loop
Paragraph_Info(ARM_Output.Enumerated, I) :=
(Defined => True,
Tag => DL,
Size => 0, -- 18
Font => ARM_Output.Default,
Indent => Natural(I)-1,
Right_Indent => 1,
Hang_Outdent => 1,
Before => 0,
After => 5);
end loop;
-- Small Enumerated:
-- Note: Indent = 0 is not allowed.
for I in 1 .. ARM_Output.Paragraph_Indent_Type'Last loop
Paragraph_Info(ARM_Output.Small_Enumerated, I) :=
(Defined => True,
Tag => DL,
Size => -1, -- 15
Font => ARM_Output.Default,
Indent => Natural(I)-1,
Right_Indent => 1,
Hang_Outdent => 1,
Before => 0,
After => 5);
end loop;
-- Giant Hanging
-- Note: Indent < 4 is not allowed.
for I in 4 .. ARM_Output.Paragraph_Indent_Type'Last loop
Paragraph_Info(ARM_Output.Giant_Hanging, I) :=
(Defined => True,
Tag => DL,
Size => 0, -- 18
Font => ARM_Output.Default,
Indent => Natural(I)-4,
Right_Indent => 0,
Hang_Outdent => 4,
Before => 0,
After => 6);
end loop;
-- Small Giant Hanging:
-- Note: Indent < 4 is not allowed.
for I in 4 .. ARM_Output.Paragraph_Indent_Type'Last loop
Paragraph_Info(ARM_Output.Small_Giant_Hanging, I) :=
(Defined => True,
Tag => DL,
Size => -1, -- 15
Font => ARM_Output.Default,
Indent => Natural(I)-4,
Right_Indent => 0,
Hang_Outdent => 4,
Before => 0,
After => 6);
end loop;
-- Wide Hanging
-- Note: Indent < 3 is not allowed.
for I in 3 .. ARM_Output.Paragraph_Indent_Type'Last loop
Paragraph_Info(ARM_Output.Wide_Hanging, I) :=
(Defined => True,
Tag => DL,
Size => 0, -- 18
Font => ARM_Output.Default,
Indent => Natural(I)-3,
Right_Indent => 0,
Hang_Outdent => 3,
Before => 0,
After => 6);
end loop;
-- Small Wide Hanging:
-- Note: Indent < 3 is not allowed.
for I in 3 .. ARM_Output.Paragraph_Indent_Type'Last loop
Paragraph_Info(ARM_Output.Small_Wide_Hanging, I) :=
(Defined => True,
Tag => DL,
Size => -1, -- 15
Font => ARM_Output.Default,
Indent => Natural(I)-3,
Right_Indent => 0,
Hang_Outdent => 3,
Before => 0,
After => 6);
end loop;
-- Medium Hanging
-- Note: Indent < 2 is not allowed.
for I in 2 .. ARM_Output.Paragraph_Indent_Type'Last loop
Paragraph_Info(ARM_Output.Medium_Hanging, I) :=
(Defined => True,
Tag => DL,
Size => 0, -- 18
Font => ARM_Output.Default,
Indent => Natural(I)-2,
Right_Indent => 0,
Hang_Outdent => 2,
Before => 0,
After => 6);
end loop;
-- Small Medium Hanging:
-- Note: Indent < 2 is not allowed.
for I in 2 .. ARM_Output.Paragraph_Indent_Type'Last loop
Paragraph_Info(ARM_Output.Small_Medium_Hanging, I) :=
(Defined => True,
Tag => DL,
Size => -1, -- 15
Font => ARM_Output.Default,
Indent => Natural(I)-2,
Right_Indent => 0,
Hang_Outdent => 2,
Before => 0,
After => 6);
end loop;
-- Narrow Hanging
-- Note: Indent < 1 is not allowed.
for I in 1 .. ARM_Output.Paragraph_Indent_Type'Last loop
Paragraph_Info(ARM_Output.Narrow_Hanging, I) :=
(Defined => True,
Tag => DL,
Size => 0, -- 18
Font => ARM_Output.Default,
Indent => Natural(I)-1,
Right_Indent => 0,
Hang_Outdent => 1,
Before => 0,
After => 6);
end loop;
-- Small Narrow Hanging:
-- Note: Indent < 1 is not allowed.
for I in 1 .. ARM_Output.Paragraph_Indent_Type'Last loop
Paragraph_Info(ARM_Output.Small_Narrow_Hanging, I) :=
(Defined => True,
Tag => DL,
Size => -1, -- 15
Font => ARM_Output.Default,
Indent => Natural(I)-1,
Right_Indent => 0,
Hang_Outdent => 1,
Before => 0,
After => 6);
end loop;
-- Hanging in Bulleted
-- Note: Indent < 2 is not allowed.
for I in 2 .. ARM_Output.Paragraph_Indent_Type'Last loop
Paragraph_Info(ARM_Output.Hanging_in_Bulleted, I) :=
(Defined => True,
Tag => DL,
Size => 0, -- 18
Font => ARM_Output.Default,
Indent => Natural(I)-2,
Right_Indent => 1,
Hang_Outdent => 2,
Before => 0,
After => 5);
end loop;
-- Small Hanging in Bulleted
-- Note: Indent < 2 is not allowed.
for I in 2 .. ARM_Output.Paragraph_Indent_Type'Last loop
Paragraph_Info(ARM_Output.Small_Hanging_in_Bulleted, I) :=
(Defined => True,
Tag => DL,
Size => -1, -- 15
Font => ARM_Output.Default,
Indent => Natural(I)-2,
Right_Indent => 1,
Hang_Outdent => 2,
Before => 0,
After => 5);
end loop;
-- Index. Only define the form that we'll use.
Paragraph_Info(ARM_Output.Index, 0) :=
(Defined => True,
Tag => DIV,
Size => 0,
Font => ARM_Output.Default,
Indent => 0,
Right_Indent => 0,
Hang_Outdent => 0,
Before => 0,
After => 0);
-- Syntax Summary. Only define the form that we'll use.
Paragraph_Info(ARM_Output.Syntax_Summary, 1) :=
(Defined => True,
Tag => DIV,
Size => -1,
Font => ARM_Output.Default,
Indent => 1,
Right_Indent => 0,
Hang_Outdent => 0,
Before => 0,
After => 4);
-- Title. Only define the form that we'll use.
Paragraph_Info(ARM_Output.Title, 0) :=
(Defined => True,
Tag => DIV,
Size => 3, -- 36
Font => ARM_Output.Default,
Indent => 0,
Right_Indent => 0,
Hang_Outdent => 0,
Before => 6,
After => 6);
end ARM_HTML;
|
------------------------------------------------------------------------------
-- --
-- GNU ADA RUNTIME LIBRARY (GNARL) COMPONENTS --
-- --
-- S Y S T E M . S T R I N G _ O P S --
-- --
-- S p e c --
-- --
-- $Revision$
-- --
-- Copyright (C) 1992-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. --
-- --
-- As a special exception, if other files instantiate generics from this --
-- unit, or you link this unit with other files to produce an executable, --
-- this unit does not by itself cause the resulting executable to be --
-- covered by the GNU General Public License. This exception does not --
-- however invalidate any other reasons why the executable file might be --
-- covered by the GNU Public License. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- This package contains functions for runtime operations on strings
package System.String_Ops is
pragma Pure (String_Ops);
function Str_Concat (X, Y : String) return String;
-- Concatenate two strings and return resulting string
function Str_Concat_SC (X : String; Y : Character) return String;
-- Concatenate string and character
function Str_Concat_CS (X : Character; Y : String) return String;
-- Concatenate character and string
function Str_Concat_CC (X, Y : Character) return String;
-- Concatenate two characters
function Str_Equal (A, B : String) return Boolean;
-- Compare two strings for equality
procedure Str_Normalize (A : in out String);
-- Initialize String object if pragma Normalize_Scalars is in effect.
procedure Wide_Str_Normalize (A : in out Wide_String);
-- Ditto for Wide_String.
pragma Inline (Str_Normalize);
pragma Inline (Wide_Str_Normalize);
end System.String_Ops;
|
with Ada.Text_IO; use Ada.Text_IO;
with Ada.Command_Line;
with Ada.Assertions;
with GNAT.Exception_Actions;
procedure Fuzzme is
Length : Integer := 3;
Input : String (1 .. Length);
Fd : File_Type;
Filename : aliased String := Ada.Command_Line.Argument(1);
procedure FuzzTest (Input : String) is
Zero : Integer := 0;
One : Integer := 1;
Answer : Integer := 0;
begin
if Input (Input'First .. Input'First) = "b" then
if Input (Input'First + 1 .. Input'First + 1) = "u" then
if Input (Input'First + 2 .. Input'First + 2) = "g" then
raise Ada.Assertions.Assertion_Error;
-- Answer := One / Zero;
end if;
end if;
end if;
end FuzzTest;
begin
Open (File => Fd,
Mode => In_File,
Name => Filename);
Get_Line (Fd, Input, Length);
FuzzTest(Input);
exception
when Occurence : others =>
GNAT.Exception_Actions.Core_Dump (Occurence);
end Fuzzme;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
-- --
-- S Y S T E M . T A S K I N G . A S Y N C _ D E L A Y S . --
-- E N Q U E U E _ C A L E N D A R --
-- --
-- S p e c --
-- --
-- Copyright (C) 1998-2005 Free Software Foundation, Inc. --
-- --
-- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 2, or (at your option) any later ver- --
-- sion. GNARL is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNARL; see file COPYING. If not, write --
-- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
-- Boston, MA 02110-1301, USA. --
-- --
-- As a special exception, if other files instantiate generics from this --
-- unit, or you link this unit with other files to produce an executable, --
-- this unit does not by itself cause the resulting executable to be --
-- covered by the GNU General Public License. This exception does not --
-- however invalidate any other reasons why the executable file might be --
-- covered by the GNU Public License. --
-- --
-- GNARL was developed by the GNARL team at Florida State University. --
-- Extensive contributions were provided by Ada Core Technologies, Inc. --
-- --
------------------------------------------------------------------------------
-- Note: the compiler generates direct calls to this interface, via Rtsfind.
-- Any changes to this interface may require corresponding compiler changes.
-- See comments in package System.Tasking.Async_Delays
with Ada.Calendar;
function System.Tasking.Async_Delays.Enqueue_Calendar
(T : Ada.Calendar.Time;
D : Delay_Block_Access)
return Boolean;
|
------------------------------------------------------------------------------
-- --
-- Copyright (C) 2015-2016, AdaCore --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions are --
-- met: --
-- 1. Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- 2. Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in --
-- the documentation and/or other materials provided with the --
-- distribution. --
-- 3. Neither the name of the copyright holder nor the names of its --
-- contributors may be used to endorse or promote products derived --
-- from this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT --
-- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, --
-- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY --
-- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT --
-- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE --
-- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
with HT16K33; use HT16K33;
with HAL; use HAL;
package AdaFruit.Trellis is
type Trellis_Device is new HT16K33_Device with private;
type Trellis_Coord is new UInt2;
procedure Set_LED (This : in out Trellis_Device;
X, Y : Trellis_Coord;
Enable : Boolean := True);
-- This procedure only changes the internal buffer, use the Update_LEDs
-- procedure to actually update the LEDs state on the device.
function Key (This : in out Trellis_Device;
X, Y : Trellis_Coord) return Boolean;
-- This function only reads the internal buffer, use the Update_Keys
-- procedure to synchronize keys state from the device.
private
type Trellis_Device is new HT16K33_Device with null record;
end AdaFruit.Trellis;
|
----------------------------------------------------------------
-- ZLib for Ada thick binding. --
-- --
-- Copyright (C) 2002-2003 Dmitriy Anisimkov --
-- --
-- Open source license information is in the zlib.ads file. --
----------------------------------------------------------------
-- $Id: zlib-thin.adb,v 1.6 2003/01/21 15:26:37 vagul Exp $
package body ZLib.Thin is
ZLIB_VERSION : constant Chars_Ptr :=
Interfaces.C.Strings.New_String ("1.1.4");
Z_Stream_Size : constant Int := Z_Stream'Size / System.Storage_Unit;
--------------
-- Avail_In --
--------------
function Avail_In (Strm : in Z_Stream) return UInt is
begin
return Strm.Avail_In;
end Avail_In;
---------------
-- Avail_Out --
---------------
function Avail_Out (Strm : in Z_Stream) return UInt is
begin
return Strm.Avail_Out;
end Avail_Out;
------------------
-- Deflate_Init --
------------------
function Deflate_Init
(strm : in Z_Streamp;
level : in Int := Z_DEFAULT_COMPRESSION)
return Int is
begin
return deflateInit (strm, level, ZLIB_VERSION, Z_Stream_Size);
end Deflate_Init;
function Deflate_Init
(strm : Z_Streamp;
level : Int;
method : Int;
windowBits : Int;
memLevel : Int;
strategy : Int)
return Int is
begin
return deflateInit2
(strm,
level,
method,
windowBits,
memLevel,
strategy,
ZLIB_VERSION,
Z_Stream_Size);
end Deflate_Init;
------------------
-- Inflate_Init --
------------------
function Inflate_Init (strm : Z_Streamp) return Int is
begin
return inflateInit (strm, ZLIB_VERSION, Z_Stream_Size);
end Inflate_Init;
function Inflate_Init (strm : Z_Streamp; windowBits : Int) return Int is
begin
return inflateInit2 (strm, windowBits, ZLIB_VERSION, Z_Stream_Size);
end Inflate_Init;
function Last_Error_Message (Strm : in Z_Stream) return String is
use Interfaces.C.Strings;
begin
if Strm.msg = Null_Ptr then
return "";
else
return Value (Strm.msg);
end if;
end Last_Error_Message;
-------------
-- Need_In --
-------------
function Need_In (strm : Z_Stream) return Boolean is
begin
return strm.Avail_In = 0;
end Need_In;
--------------
-- Need_Out --
--------------
function Need_Out (strm : Z_Stream) return Boolean is
begin
return strm.Avail_Out = 0;
end Need_Out;
------------
-- Set_In --
------------
procedure Set_In
(Strm : in out Z_Stream;
Buffer : in Byte_Access;
Size : in UInt) is
begin
Strm.Next_In := Buffer;
Strm.Avail_In := Size;
end Set_In;
procedure Set_In
(Strm : in out Z_Stream;
Buffer : in Voidp;
Size : in UInt) is
begin
Set_In (Strm, Bytes.To_Pointer (Buffer), Size);
end Set_In;
------------------
-- Set_Mem_Func --
------------------
procedure Set_Mem_Func
(Strm : in out Z_Stream;
Opaque : in Voidp;
Alloc : in alloc_func;
Free : in free_func) is
begin
Strm.opaque := Opaque;
Strm.zalloc := Alloc;
Strm.zfree := Free;
end Set_Mem_Func;
-------------
-- Set_Out --
-------------
procedure Set_Out
(Strm : in out Z_Stream;
Buffer : in Byte_Access;
Size : in UInt) is
begin
Strm.Next_Out := Buffer;
Strm.Avail_Out := Size;
end Set_Out;
procedure Set_Out
(Strm : in out Z_Stream;
Buffer : in Voidp;
Size : in UInt) is
begin
Set_Out (Strm, Bytes.To_Pointer (Buffer), Size);
end Set_Out;
--------------
-- Total_In --
--------------
function Total_In (Strm : in Z_Stream) return ULong is
begin
return Strm.Total_In;
end Total_In;
---------------
-- Total_Out --
---------------
function Total_Out (Strm : in Z_Stream) return ULong is
begin
return Strm.Total_Out;
end Total_Out;
end ZLib.Thin;
|
------------------------------------------------------------------------------
-- --
-- Copyright (C) 2016, AdaCore --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions are --
-- met: --
-- 1. Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- 2. Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in --
-- the documentation and/or other materials provided with the --
-- distribution. --
-- 3. Neither the name of the copyright holder nor the names of its --
-- contributors may be used to endorse or promote products derived --
-- from this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT --
-- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, --
-- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY --
-- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT --
-- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE --
-- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
with System;
with Interfaces;
package Bluetooth_Low_Energy.Packets is
type BLE_Packet is private;
function Memory_Address (This : BLE_Packet) return System.Address;
-- Return memory address of the radio data to be transmitted
procedure Set_Header (This : in out BLE_Packet;
Header : UInt8);
procedure Push (This : in out BLE_Packet;
Data : UInt8);
procedure Push (This : in out BLE_Packet;
Data : Interfaces.Integer_8);
procedure Push (This : in out BLE_Packet;
Data : UInt16);
procedure Push (This : in out BLE_Packet;
Data : UInt32);
procedure Push (This : in out BLE_Packet;
Data : UInt8_Array);
procedure Push_UUID (This : in out BLE_Packet;
UUID : BLE_UUID);
private
BLE_PACKET_MIC_SIZE : constant := 4;
-- Size of Message integrity check (MIC) field
BLE_PACKET_MAX_PAYLOAD : constant := 37;
-- Maximum size of BLE payload (without header, MIC or CRC)
type BLE_Data is array (1 .. BLE_PACKET_MAX_PAYLOAD + BLE_PACKET_MIC_SIZE)
of UInt8 with Pack;
-- BLE Payload plus optional MIC field
type BLE_Packet is record
Header : UInt8;
Packet_Length : UInt8 := 0;
Data : BLE_Data;
end record with Pack;
end Bluetooth_Low_Energy.Packets;
|
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- G N A T . W I D E _ W I D E _ S T R I N G _ S P L I T --
-- --
-- S p e c --
-- --
-- Copyright (C) 2002-2019, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- Useful wide_string-manipulation routines: given a set of separators, split
-- a wide_string wherever the separators appear, and provide direct access
-- to the resulting slices. See GNAT.Array_Split for full documentation.
with Ada.Strings.Wide_Wide_Maps; use Ada.Strings;
with GNAT.Array_Split;
package GNAT.Wide_Wide_String_Split is new GNAT.Array_Split
(Element => Wide_Wide_Character,
Element_Sequence => Wide_Wide_String,
Element_Set => Wide_Wide_Maps.Wide_Wide_Character_Set,
To_Set => Wide_Wide_Maps.To_Set,
Is_In => Wide_Wide_Maps.Is_In);
|
-- This package is intended to set up and tear down the test environment.
-- Once created by GNATtest, this package will never be overwritten
-- automatically. Contents of this package can be modified in any way
-- except for sections surrounded by a 'read only' marker.
package body Tcl.Commands.Test_Data.Tests.Argv_Pointer.Test_Data is
procedure Set_Up(Gnattest_T: in out Test) is
pragma Unreferenced(Gnattest_T);
begin
null;
end Set_Up;
procedure Tear_Down(Gnattest_T: in out Test) is
pragma Unreferenced(Gnattest_T);
begin
null;
end Tear_Down;
procedure User_Set_Up(Gnattest_T: in out New_Test) is
pragma Unreferenced(Gnattest_T);
begin
null;
end User_Set_Up;
procedure User_Tear_Down(Gnattest_T: in out New_Test) is
pragma Unreferenced(Gnattest_T);
begin
null;
end User_Tear_Down;
end Tcl.Commands.Test_Data.Tests.Argv_Pointer.Test_Data;
|
------------------------------------------------------------------------------
-- A d a r u n - t i m e s p e c i f i c a t i o n --
-- ASIS implementation for Gela project, a portable Ada compiler --
-- http://gela.ada-ru.org --
-- - - - - - - - - - - - - - - - --
-- Read copyright and license at the end of ada.ads file --
------------------------------------------------------------------------------
-- $Revision: 209 $ $Date: 2013-11-30 21:03:24 +0200 (Сб., 30 нояб. 2013) $
with Ada.Strings.Wide_Unbounded;
package Ada.Wide_Text_IO.Unbounded_IO is
procedure Put
(File : in File_Type;
Item : in Strings.Wide_Unbounded.Wide_Unbounded_String);
procedure Put
(Item : in Strings.Wide_Unbounded.Wide_Unbounded_String);
procedure Put_Line
(File : in File_Type;
Item : in Strings.Wide_Unbounded.Wide_Unbounded_String);
procedure Put_Line
(Item : in Strings.Wide_Unbounded.Wide_Unbounded_String);
function Get_Line
(File : in File_Type)
return Strings.Wide_Unbounded.Wide_Unbounded_String;
function Get_Line
return Strings.Wide_Unbounded.Wide_Unbounded_String;
procedure Get_Line
(File : in File_Type;
Item : out Strings.Wide_Unbounded.Wide_Unbounded_String);
procedure Get_Line
(Item : out Strings.Wide_Unbounded.Wide_Unbounded_String);
end Ada.Wide_Text_IO.Unbounded_IO;
|
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE boost_serialization>
<boost_serialization signature="serialization::archive" version="14">
<syndb class_id="0" tracking_level="0" version="0">
<userIPLatency>-1</userIPLatency>
<userIPName/>
<cdfg class_id="1" tracking_level="1" version="0" object_id="_0">
<name>linebuffer_Loop_1_pr</name>
<ret_bitwidth>0</ret_bitwidth>
<ports class_id="2" tracking_level="0" version="0">
<count>3</count>
<item_version>0</item_version>
<item class_id="3" tracking_level="1" version="0" object_id="_1">
<Value class_id="4" tracking_level="0" version="0">
<Obj class_id="5" tracking_level="0" version="0">
<type>1</type>
<id>1</id>
<name>in_axi_stream_V_value_V</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo class_id="6" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>stream&lt;AxiPackedStencil&lt;unsigned int, 1, 1, 1, 1&gt; &gt;.V.value.V</originalName>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<direction>0</direction>
<if_type>0</if_type>
<array_size>0</array_size>
<bit_vecs class_id="7" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_2">
<Value>
<Obj>
<type>1</type>
<id>2</id>
<name>in_axi_stream_V_last_V</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>stream&lt;AxiPackedStencil&lt;unsigned int, 1, 1, 1, 1&gt; &gt;.V.last.V</originalName>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<direction>0</direction>
<if_type>0</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_3">
<Value>
<Obj>
<type>1</type>
<id>3</id>
<name>in_stream_V_value_V</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName>FIFO_SRL</coreName>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<direction>1</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
</ports>
<nodes class_id="8" tracking_level="0" version="0">
<count>10</count>
<item_version>0</item_version>
<item class_id="9" tracking_level="1" version="0" object_id="_4">
<Value>
<Obj>
<type>0</type>
<id>6</id>
<name/>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>24</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_5">
<Value>
<Obj>
<type>0</type>
<id>8</id>
<name>indvar_flatten</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>21</bitwidth>
</Value>
<oprand_edges>
<count>4</count>
<item_version>0</item_version>
<item>36</item>
<item>37</item>
<item>38</item>
<item>39</item>
</oprand_edges>
<opcode>phi</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_6">
<Value>
<Obj>
<type>0</type>
<id>9</id>
<name>exitcond_flatten</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName>exitcond_flatten_fu_74_p2</rtlName>
<coreName/>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>40</item>
<item>42</item>
</oprand_edges>
<opcode>icmp</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_7">
<Value>
<Obj>
<type>0</type>
<id>10</id>
<name>indvar_flatten_next</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName>indvar_flatten_next_fu_80_p2</rtlName>
<coreName/>
</Obj>
<bitwidth>21</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>43</item>
<item>45</item>
</oprand_edges>
<opcode>add</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_8">
<Value>
<Obj>
<type>0</type>
<id>11</id>
<name/>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>46</item>
<item>47</item>
<item>48</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_9">
<Value>
<Obj>
<type>0</type>
<id>16</id>
<name>empty_16</name>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>554</lineNumber>
<contextFuncName>linebuffer&lt;1920, 1080, 1, 1, 1, 1, 1, 1, 3, 3, 1, 1, unsigned int&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item class_id="11" tracking_level="0" version="0">
<first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</first>
<second class_id="12" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="13" tracking_level="0" version="0">
<first class_id="14" tracking_level="0" version="0">
<first>../../../lib_files/Linebuffer.h</first>
<second>linebuffer&lt;1920, 1080, 1, 1, 1, 1, 1, 1, 3, 3, 1, 1, unsigned int&gt;</second>
</first>
<second>554</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>33</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>26</item>
<item>27</item>
<item>28</item>
</oprand_edges>
<opcode>read</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_10">
<Value>
<Obj>
<type>0</type>
<id>17</id>
<name>tmp_value_V</name>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>554</lineNumber>
<contextFuncName>linebuffer&lt;1920, 1080, 1, 1, 1, 1, 1, 1, 3, 3, 1, 1, unsigned int&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>linebuffer&lt;1920, 1080, 1, 1, 1, 1, 1, 1, 3, 3, 1, 1, unsigned int&gt;</second>
</first>
<second>554</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>tmp.value.V</originalName>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>29</item>
</oprand_edges>
<opcode>extractvalue</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_11">
<Value>
<Obj>
<type>0</type>
<id>18</id>
<name/>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>554</lineNumber>
<contextFuncName>linebuffer&lt;1920, 1080, 1, 1, 1, 1, 1, 1, 3, 3, 1, 1, unsigned int&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>linebuffer&lt;1920, 1080, 1, 1, 1, 1, 1, 1, 3, 3, 1, 1, unsigned int&gt;</second>
</first>
<second>554</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>31</item>
<item>32</item>
<item>33</item>
</oprand_edges>
<opcode>write</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_12">
<Value>
<Obj>
<type>0</type>
<id>20</id>
<name/>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>552</lineNumber>
<contextFuncName>linebuffer&lt;1920, 1080, 1, 1, 1, 1, 1, 1, 3, 3, 1, 1, unsigned int&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>linebuffer&lt;1920, 1080, 1, 1, 1, 1, 1, 1, 3, 3, 1, 1, unsigned int&gt;</second>
</first>
<second>552</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>34</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_13">
<Value>
<Obj>
<type>0</type>
<id>22</id>
<name/>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>0</count>
<item_version>0</item_version>
</oprand_edges>
<opcode>ret</opcode>
<m_Display>0</m_Display>
</item>
</nodes>
<consts class_id="15" tracking_level="0" version="0">
<count>3</count>
<item_version>0</item_version>
<item class_id="16" tracking_level="1" version="0" object_id="_14">
<Value>
<Obj>
<type>2</type>
<id>35</id>
<name>empty</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>21</bitwidth>
</Value>
<const_type>0</const_type>
<content>0</content>
</item>
<item class_id_reference="16" object_id="_15">
<Value>
<Obj>
<type>2</type>
<id>41</id>
<name>empty</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>21</bitwidth>
</Value>
<const_type>0</const_type>
<content>2073600</content>
</item>
<item class_id_reference="16" object_id="_16">
<Value>
<Obj>
<type>2</type>
<id>44</id>
<name>empty</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>21</bitwidth>
</Value>
<const_type>0</const_type>
<content>1</content>
</item>
</consts>
<blocks class_id="17" tracking_level="0" version="0">
<count>4</count>
<item_version>0</item_version>
<item class_id="18" tracking_level="1" version="0" object_id="_17">
<Obj>
<type>3</type>
<id>7</id>
<name>newFuncRoot</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<node_objs>
<count>1</count>
<item_version>0</item_version>
<item>6</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_18">
<Obj>
<type>3</type>
<id>12</id>
<name>.preheader.i</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<node_objs>
<count>4</count>
<item_version>0</item_version>
<item>8</item>
<item>9</item>
<item>10</item>
<item>11</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_19">
<Obj>
<type>3</type>
<id>21</id>
<name>.preheader4.i</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<node_objs>
<count>4</count>
<item_version>0</item_version>
<item>16</item>
<item>17</item>
<item>18</item>
<item>20</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_20">
<Obj>
<type>3</type>
<id>23</id>
<name>.critedge.exitStub</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<node_objs>
<count>1</count>
<item_version>0</item_version>
<item>22</item>
</node_objs>
</item>
</blocks>
<edges class_id="19" tracking_level="0" version="0">
<count>22</count>
<item_version>0</item_version>
<item class_id="20" tracking_level="1" version="0" object_id="_21">
<id>24</id>
<edge_type>2</edge_type>
<source_obj>12</source_obj>
<sink_obj>6</sink_obj>
</item>
<item class_id_reference="20" object_id="_22">
<id>27</id>
<edge_type>1</edge_type>
<source_obj>1</source_obj>
<sink_obj>16</sink_obj>
</item>
<item class_id_reference="20" object_id="_23">
<id>28</id>
<edge_type>1</edge_type>
<source_obj>2</source_obj>
<sink_obj>16</sink_obj>
</item>
<item class_id_reference="20" object_id="_24">
<id>29</id>
<edge_type>1</edge_type>
<source_obj>16</source_obj>
<sink_obj>17</sink_obj>
</item>
<item class_id_reference="20" object_id="_25">
<id>32</id>
<edge_type>1</edge_type>
<source_obj>3</source_obj>
<sink_obj>18</sink_obj>
</item>
<item class_id_reference="20" object_id="_26">
<id>33</id>
<edge_type>1</edge_type>
<source_obj>17</source_obj>
<sink_obj>18</sink_obj>
</item>
<item class_id_reference="20" object_id="_27">
<id>34</id>
<edge_type>2</edge_type>
<source_obj>12</source_obj>
<sink_obj>20</sink_obj>
</item>
<item class_id_reference="20" object_id="_28">
<id>36</id>
<edge_type>1</edge_type>
<source_obj>35</source_obj>
<sink_obj>8</sink_obj>
</item>
<item class_id_reference="20" object_id="_29">
<id>37</id>
<edge_type>2</edge_type>
<source_obj>7</source_obj>
<sink_obj>8</sink_obj>
</item>
<item class_id_reference="20" object_id="_30">
<id>38</id>
<edge_type>1</edge_type>
<source_obj>10</source_obj>
<sink_obj>8</sink_obj>
</item>
<item class_id_reference="20" object_id="_31">
<id>39</id>
<edge_type>2</edge_type>
<source_obj>21</source_obj>
<sink_obj>8</sink_obj>
</item>
<item class_id_reference="20" object_id="_32">
<id>40</id>
<edge_type>1</edge_type>
<source_obj>8</source_obj>
<sink_obj>9</sink_obj>
</item>
<item class_id_reference="20" object_id="_33">
<id>42</id>
<edge_type>1</edge_type>
<source_obj>41</source_obj>
<sink_obj>9</sink_obj>
</item>
<item class_id_reference="20" object_id="_34">
<id>43</id>
<edge_type>1</edge_type>
<source_obj>8</source_obj>
<sink_obj>10</sink_obj>
</item>
<item class_id_reference="20" object_id="_35">
<id>45</id>
<edge_type>1</edge_type>
<source_obj>44</source_obj>
<sink_obj>10</sink_obj>
</item>
<item class_id_reference="20" object_id="_36">
<id>46</id>
<edge_type>1</edge_type>
<source_obj>9</source_obj>
<sink_obj>11</sink_obj>
</item>
<item class_id_reference="20" object_id="_37">
<id>47</id>
<edge_type>2</edge_type>
<source_obj>21</source_obj>
<sink_obj>11</sink_obj>
</item>
<item class_id_reference="20" object_id="_38">
<id>48</id>
<edge_type>2</edge_type>
<source_obj>23</source_obj>
<sink_obj>11</sink_obj>
</item>
<item class_id_reference="20" object_id="_39">
<id>108</id>
<edge_type>2</edge_type>
<source_obj>7</source_obj>
<sink_obj>12</sink_obj>
</item>
<item class_id_reference="20" object_id="_40">
<id>109</id>
<edge_type>2</edge_type>
<source_obj>12</source_obj>
<sink_obj>23</sink_obj>
</item>
<item class_id_reference="20" object_id="_41">
<id>110</id>
<edge_type>2</edge_type>
<source_obj>12</source_obj>
<sink_obj>21</sink_obj>
</item>
<item class_id_reference="20" object_id="_42">
<id>111</id>
<edge_type>2</edge_type>
<source_obj>21</source_obj>
<sink_obj>12</sink_obj>
</item>
</edges>
</cdfg>
<cdfg_regions class_id="21" tracking_level="0" version="0">
<count>4</count>
<item_version>0</item_version>
<item class_id="22" tracking_level="1" version="0" object_id="_43">
<mId>1</mId>
<mTag>linebuffer_Loop_1_pr</mTag>
<mType>0</mType>
<sub_regions>
<count>3</count>
<item_version>0</item_version>
<item>2</item>
<item>3</item>
<item>4</item>
</sub_regions>
<basic_blocks>
<count>0</count>
<item_version>0</item_version>
</basic_blocks>
<mII>-1</mII>
<mDepth>-1</mDepth>
<mMinTripCount>-1</mMinTripCount>
<mMaxTripCount>-1</mMaxTripCount>
<mMinLatency>2073602</mMinLatency>
<mMaxLatency>-1</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"/>
</item>
<item class_id_reference="22" object_id="_44">
<mId>2</mId>
<mTag>Entry</mTag>
<mType>0</mType>
<sub_regions>
<count>0</count>
<item_version>0</item_version>
</sub_regions>
<basic_blocks>
<count>1</count>
<item_version>0</item_version>
<item>7</item>
</basic_blocks>
<mII>-1</mII>
<mDepth>-1</mDepth>
<mMinTripCount>-1</mMinTripCount>
<mMaxTripCount>-1</mMaxTripCount>
<mMinLatency>0</mMinLatency>
<mMaxLatency>-1</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"/>
</item>
<item class_id_reference="22" object_id="_45">
<mId>3</mId>
<mTag>Loop 1</mTag>
<mType>1</mType>
<sub_regions>
<count>0</count>
<item_version>0</item_version>
</sub_regions>
<basic_blocks>
<count>2</count>
<item_version>0</item_version>
<item>12</item>
<item>21</item>
</basic_blocks>
<mII>1</mII>
<mDepth>2</mDepth>
<mMinTripCount>2073600</mMinTripCount>
<mMaxTripCount>2073600</mMaxTripCount>
<mMinLatency>2073600</mMinLatency>
<mMaxLatency>-1</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"/>
</item>
<item class_id_reference="22" object_id="_46">
<mId>4</mId>
<mTag>Return</mTag>
<mType>0</mType>
<sub_regions>
<count>0</count>
<item_version>0</item_version>
</sub_regions>
<basic_blocks>
<count>1</count>
<item_version>0</item_version>
<item>23</item>
</basic_blocks>
<mII>-1</mII>
<mDepth>-1</mDepth>
<mMinTripCount>-1</mMinTripCount>
<mMaxTripCount>-1</mMaxTripCount>
<mMinLatency>0</mMinLatency>
<mMaxLatency>-1</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"/>
</item>
</cdfg_regions>
<fsm class_id="24" tracking_level="1" version="0" object_id="_47">
<states class_id="25" tracking_level="0" version="0">
<count>4</count>
<item_version>0</item_version>
<item class_id="26" tracking_level="1" version="0" object_id="_48">
<id>1</id>
<operations class_id="27" tracking_level="0" version="0">
<count>3</count>
<item_version>0</item_version>
<item class_id="28" tracking_level="1" version="0" object_id="_49">
<id>4</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_50">
<id>5</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_51">
<id>6</id>
<stage>1</stage>
<latency>1</latency>
</item>
</operations>
</item>
<item class_id_reference="26" object_id="_52">
<id>2</id>
<operations>
<count>6</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_53">
<id>8</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_54">
<id>9</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_55">
<id>10</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_56">
<id>11</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_57">
<id>16</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_58">
<id>17</id>
<stage>1</stage>
<latency>1</latency>
</item>
</operations>
</item>
<item class_id_reference="26" object_id="_59">
<id>3</id>
<operations>
<count>6</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_60">
<id>13</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_61">
<id>14</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_62">
<id>15</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_63">
<id>18</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_64">
<id>19</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_65">
<id>20</id>
<stage>1</stage>
<latency>1</latency>
</item>
</operations>
</item>
<item class_id_reference="26" object_id="_66">
<id>4</id>
<operations>
<count>1</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_67">
<id>22</id>
<stage>1</stage>
<latency>1</latency>
</item>
</operations>
</item>
</states>
<transitions class_id="29" tracking_level="0" version="0">
<count>4</count>
<item_version>0</item_version>
<item class_id="30" tracking_level="1" version="0" object_id="_68">
<inState>1</inState>
<outState>2</outState>
<condition class_id="31" tracking_level="0" version="0">
<id>12</id>
<sop class_id="32" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="33" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</item>
</sop>
</condition>
</item>
<item class_id_reference="30" object_id="_69">
<inState>3</inState>
<outState>2</outState>
<condition>
<id>20</id>
<sop>
<count>1</count>
<item_version>0</item_version>
<item>
<count>0</count>
<item_version>0</item_version>
</item>
</sop>
</condition>
</item>
<item class_id_reference="30" object_id="_70">
<inState>2</inState>
<outState>4</outState>
<condition>
<id>19</id>
<sop>
<count>1</count>
<item_version>0</item_version>
<item>
<count>1</count>
<item_version>0</item_version>
<item class_id="34" tracking_level="0" version="0">
<first class_id="35" tracking_level="0" version="0">
<first>9</first>
<second>0</second>
</first>
<second>0</second>
</item>
</item>
</sop>
</condition>
</item>
<item class_id_reference="30" object_id="_71">
<inState>2</inState>
<outState>3</outState>
<condition>
<id>21</id>
<sop>
<count>1</count>
<item_version>0</item_version>
<item>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>9</first>
<second>0</second>
</first>
<second>1</second>
</item>
</item>
</sop>
</condition>
</item>
</transitions>
</fsm>
<res class_id="36" tracking_level="1" version="0" object_id="_72">
<dp_component_resource class_id="37" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</dp_component_resource>
<dp_expression_resource>
<count>9</count>
<item_version>0</item_version>
<item class_id="38" tracking_level="0" version="0">
<first>ap_block_pp0_stage0_flag00001001 ( or ) </first>
<second class_id="39" tracking_level="0" version="0">
<count>4</count>
<item_version>0</item_version>
<item class_id="40" tracking_level="0" version="0">
<first>(0P0)</first>
<second>1</second>
</item>
<item>
<first>(1P1)</first>
<second>1</second>
</item>
<item>
<first>FF</first>
<second>0</second>
</item>
<item>
<first>LUT</first>
<second>2</second>
</item>
</second>
</item>
<item>
<first>ap_block_state1 ( or ) </first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0P0)</first>
<second>1</second>
</item>
<item>
<first>(1P1)</first>
<second>1</second>
</item>
<item>
<first>FF</first>
<second>0</second>
</item>
<item>
<first>LUT</first>
<second>2</second>
</item>
</second>
</item>
<item>
<first>ap_block_state2_pp0_stage0_iter0 ( and ) </first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0P0)</first>
<second>1</second>
</item>
<item>
<first>(1P1)</first>
<second>1</second>
</item>
<item>
<first>FF</first>
<second>0</second>
</item>
<item>
<first>LUT</first>
<second>2</second>
</item>
</second>
</item>
<item>
<first>ap_block_state3_pp0_stage0_iter1 ( and ) </first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0P0)</first>
<second>1</second>
</item>
<item>
<first>(1P1)</first>
<second>1</second>
</item>
<item>
<first>FF</first>
<second>0</second>
</item>
<item>
<first>LUT</first>
<second>2</second>
</item>
</second>
</item>
<item>
<first>ap_enable_pp0 ( xor ) </first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0P0)</first>
<second>1</second>
</item>
<item>
<first>(1P1)</first>
<second>2</second>
</item>
<item>
<first>FF</first>
<second>0</second>
</item>
<item>
<first>LUT</first>
<second>2</second>
</item>
</second>
</item>
<item>
<first>ap_enable_reg_pp0_iter1 ( xor ) </first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0P0)</first>
<second>1</second>
</item>
<item>
<first>(1P1)</first>
<second>2</second>
</item>
<item>
<first>FF</first>
<second>0</second>
</item>
<item>
<first>LUT</first>
<second>2</second>
</item>
</second>
</item>
<item>
<first>exitcond_flatten_fu_74_p2 ( icmp ) </first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0P0)</first>
<second>21</second>
</item>
<item>
<first>(1P1)</first>
<second>16</second>
</item>
<item>
<first>FF</first>
<second>0</second>
</item>
<item>
<first>LUT</first>
<second>13</second>
</item>
</second>
</item>
<item>
<first>indvar_flatten_next_fu_80_p2 ( + ) </first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0P0)</first>
<second>21</second>
</item>
<item>
<first>(1P1)</first>
<second>1</second>
</item>
<item>
<first>FF</first>
<second>68</second>
</item>
<item>
<first>LUT</first>
<second>26</second>
</item>
</second>
</item>
<item>
<first>start_write ( and ) </first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0P0)</first>
<second>1</second>
</item>
<item>
<first>(1P1)</first>
<second>1</second>
</item>
<item>
<first>FF</first>
<second>0</second>
</item>
<item>
<first>LUT</first>
<second>2</second>
</item>
</second>
</item>
</dp_expression_resource>
<dp_fifo_resource>
<count>0</count>
<item_version>0</item_version>
</dp_fifo_resource>
<dp_memory_resource>
<count>0</count>
<item_version>0</item_version>
</dp_memory_resource>
<dp_multiplexer_resource>
<count>8</count>
<item_version>0</item_version>
<item>
<first>ap_NS_fsm</first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0Size)</first>
<second>4</second>
</item>
<item>
<first>(1Bits)</first>
<second>1</second>
</item>
<item>
<first>(2Count)</first>
<second>4</second>
</item>
<item>
<first>LUT</first>
<second>21</second>
</item>
</second>
</item>
<item>
<first>ap_done</first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0Size)</first>
<second>2</second>
</item>
<item>
<first>(1Bits)</first>
<second>1</second>
</item>
<item>
<first>(2Count)</first>
<second>2</second>
</item>
<item>
<first>LUT</first>
<second>9</second>
</item>
</second>
</item>
<item>
<first>ap_enable_reg_pp0_iter1</first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0Size)</first>
<second>3</second>
</item>
<item>
<first>(1Bits)</first>
<second>1</second>
</item>
<item>
<first>(2Count)</first>
<second>3</second>
</item>
<item>
<first>LUT</first>
<second>15</second>
</item>
</second>
</item>
<item>
<first>in_axi_stream_V_last_V_blk_n</first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0Size)</first>
<second>2</second>
</item>
<item>
<first>(1Bits)</first>
<second>1</second>
</item>
<item>
<first>(2Count)</first>
<second>2</second>
</item>
<item>
<first>LUT</first>
<second>9</second>
</item>
</second>
</item>
<item>
<first>in_axi_stream_V_value_V_blk_n</first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0Size)</first>
<second>2</second>
</item>
<item>
<first>(1Bits)</first>
<second>1</second>
</item>
<item>
<first>(2Count)</first>
<second>2</second>
</item>
<item>
<first>LUT</first>
<second>9</second>
</item>
</second>
</item>
<item>
<first>in_stream_V_value_V_blk_n</first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0Size)</first>
<second>2</second>
</item>
<item>
<first>(1Bits)</first>
<second>1</second>
</item>
<item>
<first>(2Count)</first>
<second>2</second>
</item>
<item>
<first>LUT</first>
<second>9</second>
</item>
</second>
</item>
<item>
<first>indvar_flatten_reg_63</first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0Size)</first>
<second>2</second>
</item>
<item>
<first>(1Bits)</first>
<second>21</second>
</item>
<item>
<first>(2Count)</first>
<second>42</second>
</item>
<item>
<first>LUT</first>
<second>9</second>
</item>
</second>
</item>
<item>
<first>real_start</first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0Size)</first>
<second>2</second>
</item>
<item>
<first>(1Bits)</first>
<second>1</second>
</item>
<item>
<first>(2Count)</first>
<second>2</second>
</item>
<item>
<first>LUT</first>
<second>9</second>
</item>
</second>
</item>
</dp_multiplexer_resource>
<dp_register_resource>
<count>10</count>
<item_version>0</item_version>
<item>
<first>ap_CS_fsm</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>3</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>3</second>
</item>
</second>
</item>
<item>
<first>ap_done_reg</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>1</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>1</second>
</item>
</second>
</item>
<item>
<first>ap_enable_reg_pp0_iter0</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>1</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>1</second>
</item>
</second>
</item>
<item>
<first>ap_enable_reg_pp0_iter1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>1</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>1</second>
</item>
</second>
</item>
<item>
<first>exitcond_flatten_reg_90</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>1</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>1</second>
</item>
</second>
</item>
<item>
<first>indvar_flatten_reg_63</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>21</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>21</second>
</item>
</second>
</item>
<item>
<first>real_start_status_reg</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>1</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>1</second>
</item>
</second>
</item>
<item>
<first>start_control_reg</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>1</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>1</second>
</item>
</second>
</item>
<item>
<first>start_once_reg</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>1</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>1</second>
</item>
</second>
</item>
<item>
<first>tmp_value_V_reg_99</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>32</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>32</second>
</item>
</second>
</item>
</dp_register_resource>
<dp_component_map class_id="41" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</dp_component_map>
<dp_expression_map>
<count>2</count>
<item_version>0</item_version>
<item class_id="42" tracking_level="0" version="0">
<first>exitcond_flatten_fu_74_p2 ( icmp ) </first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>9</item>
</second>
</item>
<item>
<first>indvar_flatten_next_fu_80_p2 ( + ) </first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>10</item>
</second>
</item>
</dp_expression_map>
<dp_fifo_map>
<count>0</count>
<item_version>0</item_version>
</dp_fifo_map>
<dp_memory_map>
<count>0</count>
<item_version>0</item_version>
</dp_memory_map>
</res>
<node_label_latency class_id="43" tracking_level="0" version="0">
<count>10</count>
<item_version>0</item_version>
<item class_id="44" tracking_level="0" version="0">
<first>6</first>
<second class_id="45" tracking_level="0" version="0">
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>8</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>9</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>10</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>11</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>16</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>17</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>18</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>20</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>22</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
</node_label_latency>
<bblk_ent_exit class_id="46" tracking_level="0" version="0">
<count>4</count>
<item_version>0</item_version>
<item class_id="47" tracking_level="0" version="0">
<first>7</first>
<second class_id="48" tracking_level="0" version="0">
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>12</first>
<second>
<first>1</first>
<second>1</second>
</second>
</item>
<item>
<first>21</first>
<second>
<first>1</first>
<second>2</second>
</second>
</item>
<item>
<first>23</first>
<second>
<first>2</first>
<second>2</second>
</second>
</item>
</bblk_ent_exit>
<regions class_id="49" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="50" tracking_level="1" version="0" object_id="_73">
<region_name>Loop 1</region_name>
<basic_blocks>
<count>2</count>
<item_version>0</item_version>
<item>12</item>
<item>21</item>
</basic_blocks>
<nodes>
<count>0</count>
<item_version>0</item_version>
</nodes>
<anchor_node>-1</anchor_node>
<region_type>8</region_type>
<interval>1</interval>
<pipe_depth>2</pipe_depth>
</item>
</regions>
<dp_fu_nodes class_id="51" tracking_level="0" version="0">
<count>6</count>
<item_version>0</item_version>
<item class_id="52" tracking_level="0" version="0">
<first>48</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>16</item>
</second>
</item>
<item>
<first>56</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>18</item>
</second>
</item>
<item>
<first>67</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>8</item>
</second>
</item>
<item>
<first>74</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>9</item>
</second>
</item>
<item>
<first>80</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>10</item>
</second>
</item>
<item>
<first>86</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>17</item>
</second>
</item>
</dp_fu_nodes>
<dp_fu_nodes_expression class_id="54" tracking_level="0" version="0">
<count>4</count>
<item_version>0</item_version>
<item class_id="55" tracking_level="0" version="0">
<first>exitcond_flatten_fu_74</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>9</item>
</second>
</item>
<item>
<first>indvar_flatten_next_fu_80</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>10</item>
</second>
</item>
<item>
<first>indvar_flatten_phi_fu_67</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>8</item>
</second>
</item>
<item>
<first>tmp_value_V_fu_86</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>17</item>
</second>
</item>
</dp_fu_nodes_expression>
<dp_fu_nodes_module>
<count>0</count>
<item_version>0</item_version>
</dp_fu_nodes_module>
<dp_fu_nodes_io>
<count>2</count>
<item_version>0</item_version>
<item>
<first>StgValue_17_write_fu_56</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>18</item>
</second>
</item>
<item>
<first>empty_16_read_fu_48</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>16</item>
</second>
</item>
</dp_fu_nodes_io>
<return_ports>
<count>0</count>
<item_version>0</item_version>
</return_ports>
<dp_mem_port_nodes class_id="56" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</dp_mem_port_nodes>
<dp_reg_nodes>
<count>4</count>
<item_version>0</item_version>
<item>
<first>63</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>8</item>
</second>
</item>
<item>
<first>90</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>9</item>
</second>
</item>
<item>
<first>94</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>10</item>
</second>
</item>
<item>
<first>99</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>17</item>
</second>
</item>
</dp_reg_nodes>
<dp_regname_nodes>
<count>4</count>
<item_version>0</item_version>
<item>
<first>exitcond_flatten_reg_90</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>9</item>
</second>
</item>
<item>
<first>indvar_flatten_next_reg_94</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>10</item>
</second>
</item>
<item>
<first>indvar_flatten_reg_63</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>8</item>
</second>
</item>
<item>
<first>tmp_value_V_reg_99</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>17</item>
</second>
</item>
</dp_regname_nodes>
<dp_reg_phi>
<count>1</count>
<item_version>0</item_version>
<item>
<first>63</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>8</item>
</second>
</item>
</dp_reg_phi>
<dp_regname_phi>
<count>1</count>
<item_version>0</item_version>
<item>
<first>indvar_flatten_reg_63</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>8</item>
</second>
</item>
</dp_regname_phi>
<dp_port_io_nodes class_id="57" tracking_level="0" version="0">
<count>3</count>
<item_version>0</item_version>
<item class_id="58" tracking_level="0" version="0">
<first>in_axi_stream_V_last_V</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>read</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>16</item>
</second>
</item>
</second>
</item>
<item>
<first>in_axi_stream_V_value_V</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>read</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>16</item>
</second>
</item>
</second>
</item>
<item>
<first>in_stream_V_value_V</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>write</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>18</item>
</second>
</item>
</second>
</item>
</dp_port_io_nodes>
<port2core class_id="59" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="60" tracking_level="0" version="0">
<first>3</first>
<second>FIFO_SRL</second>
</item>
</port2core>
<node2core>
<count>0</count>
<item_version>0</item_version>
</node2core>
</syndb>
</boost_serialization>
|
with AdaCar.Parametros;
package body AdaCar.Entrada_Salida is
-----------------------
-- Entrada_Salida_PO --
-----------------------
protected Entrada_Salida_PO
with Priority => Parametros.Techo_Entrada_Salida_PO
is
procedure Init_System;
function Lectura_Digital(Canal: Canal_DI) return Estado_Digital;
procedure Salida_Digital(Canal: Canal_DO; Valor: Estado_Digital);
procedure Comienza_Analogico (Canal : Canal_AI);
function Lectura_Analogico (Canal : Canal_AI) return Unidades_AI;
end Entrada_Salida_PO;
-----------------
-- Init_System --
-----------------
procedure Init_System is
begin
Entrada_Salida_PO.Init_System;
end Init_System;
---------------------
-- Lectura_Digital --
---------------------
function Lectura_Digital (Canal : Canal_DI) return Estado_Digital is
begin
return Entrada_Salida_PO.Lectura_Digital(Canal);
end Lectura_Digital;
--------------------
-- Salida_Digital --
--------------------
procedure Salida_Digital (Canal : Canal_DO; Valor : Estado_Digital) is
begin
Entrada_Salida_PO.Salida_Digital(Canal,Valor);
end Salida_Digital;
-------------------------
-- Configura_Analogico --
-------------------------
procedure Comienza_Analogico (Canal : Canal_AI) is
begin
Entrada_Salida_PO.Comienza_Analogico(Canal);
end Comienza_Analogico;
-----------------------
-- Lectura_Analogico --
-----------------------
function Lectura_Analogico (Canal : Canal_AI) return Unidades_AI is
begin
return Entrada_Salida_PO.Lectura_Analogico(Canal);
end Lectura_Analogico;
-----------------------
-- Entrada_Salida_PO --
-----------------------
protected body Entrada_Salida_PO is
procedure Init_System is
begin
Digital.Configure_Pin(Pin_D2,Input);
Digital.Configure_Pin(Pin_D3,Input);
Digital.Configure_Pin(Pin_D4,Input);
Digital.Configure_Pin(Pin_D5,Input);
Digital.Configure_Pin(Pin_D6,Input);
Digital.Configure_Pin(Pin_D7,Input);
Digital.Configure_Pin(Pin_D8,Output);
Digital.Configure_Pin(Pin_D9,Output);
Digital.Configure_Pin(Pin_D10,Output);
Digital.Configure_Pin(Pin_D11,Output);
Digital.Configure_Pin(Pin_D12,Output);
Digital.Configure_Pin(Pin_D13,Output);
Digital.Set_Signal(Pin_D8,LOW);
Digital.Set_Signal(Pin_D9,LOW);
Digital.Set_Signal(Pin_D10,LOW);
Digital.Set_Signal(Pin_D11,LOW);
Digital.Set_Signal(Pin_D12,LOW);
Digital.Set_Signal(Pin_D13,LOW);
Analog.Configure_Pin(Pin_A0);
Analog.Configure_Pin(Pin_A1);
Analog.Configure_Pin(Pin_A2);
end Init_System;
function Lectura_Digital(Canal: Canal_DI) return Estado_Digital is
Valor: Signal_Mode;
begin
Valor:= Digital.Read_Signal(Canal);
case Valor is
when LOW =>
return Estado_Digital'(0);
when HIGH =>
return Estado_Digital'(1);
end case;
end Lectura_Digital;
procedure Salida_Digital(Canal: Canal_DO; Valor: Estado_Digital) is
begin
case Valor is
when 0 =>
Digital.Set_Signal(Canal,LOW);
when 1 =>
Digital.Set_Signal(Canal,HIGH);
end case;
end Salida_Digital;
procedure Comienza_Analogico (Canal : Canal_AI) is
begin
Analog.Start_Adquisition(Canal);
end Comienza_Analogico;
function Lectura_Analogico (Canal : Canal_AI) return Unidades_AI is
begin
return Unidades_AI(Analog.Get_Value(Canal));
end Lectura_Analogico;
end Entrada_Salida_PO;
end AdaCar.Entrada_Salida;
|
pragma License (Unrestricted);
private with System.Storage_Elements;
package Ada.Tags is
pragma Preelaborate;
type Tag is private;
pragma Preelaborable_Initialization (Tag);
No_Tag : constant Tag;
function Expanded_Name (T : Tag) return String;
function Wide_Expanded_Name (T : Tag) return Wide_String;
function Wide_Wide_Expanded_Name (T : Tag) return Wide_Wide_String;
function External_Tag (T : Tag) return String;
function Internal_Tag (External : String) return Tag;
function Descendant_Tag (External : String; Ancestor : Tag) return Tag;
function Is_Descendant_At_Same_Level (Descendant, Ancestor : Tag)
return Boolean;
function Parent_Tag (T : Tag) return Tag;
type Tag_Array is array (Positive range <>) of Tag;
function Interface_Ancestor_Tags (T : Tag) return Tag_Array;
function Is_Abstract (T : Tag) return Boolean; -- Ada 2012
Tag_Error : exception;
private
subtype Fixed_String is String (Positive);
type Object_Specific_Data_Array is array (Positive range <>) of Positive;
pragma Suppress_Initialization (Object_Specific_Data_Array);
-- required types by compiler (a-tags.ads)
type Prim_Ptr is access procedure;
for Prim_Ptr'Storage_Size use 0;
type Address_Array is array (Positive range <>) of Prim_Ptr;
pragma Suppress_Initialization (Address_Array);
subtype Dispatch_Table is Address_Array (1 .. 1); -- GDB knows
-- full declarations
type Tag is access all Dispatch_Table;
for Tag'Storage_Size use 0;
No_Tag : constant Tag := null;
-- required types by compiler (a-tags.ads)
type Cstring_Ptr is access all Fixed_String;
for Cstring_Ptr'Storage_Size use 0;
type Offset_To_Top_Function_Ptr is access function (
Object : System.Address)
return System.Storage_Elements.Storage_Offset;
type Interface_Data_Element is record
Iface_Tag : Tag;
Static_Offset_To_Top : Boolean;
Offset_To_Top_Value : System.Storage_Elements.Storage_Offset;
Offset_To_Top_Func : Offset_To_Top_Function_Ptr;
Secondary_DT : Tag;
end record;
pragma Suppress_Initialization (Interface_Data_Element);
type Interfaces_Array is array (Natural range <>) of Interface_Data_Element;
pragma Suppress_Initialization (Interfaces_Array);
type Interface_Data (Nb_Ifaces : Positive) is record
Ifaces_Table : Interfaces_Array (1 .. Nb_Ifaces);
end record;
pragma Suppress_Initialization (Interface_Data);
type Interface_Data_Ptr is access all Interface_Data; -- not req
for Interface_Data_Ptr'Storage_Size use 0;
type Prim_Op_Kind is (
POK_Function,
POK_Procedure,
POK_Protected_Entry,
POK_Protected_Function,
POK_Protected_Procedure,
POK_Task_Entry,
POK_Task_Function,
POK_Task_Procedure);
pragma Discard_Names (Prim_Op_Kind);
type Select_Specific_Data_Element is record -- not req
Index : Positive;
Kind : Prim_Op_Kind;
end record;
pragma Suppress_Initialization (Select_Specific_Data_Element);
type Select_Specific_Data_Array is
array (Positive range <>) of Select_Specific_Data_Element; -- not req
pragma Suppress_Initialization (Select_Specific_Data_Array);
type Select_Specific_Data (Nb_Prim : Positive) is record
SSD_Table : Select_Specific_Data_Array (1 .. Nb_Prim);
end record;
pragma Suppress_Initialization (Select_Specific_Data);
type Select_Specific_Data_Ptr is access all Select_Specific_Data; -- not req
for Select_Specific_Data_Ptr'Storage_Size use 0;
type Interface_Tag is access all Dispatch_Table; -- GDB knows
for Interface_Tag'Storage_Size use 0;
type Tag_Ptr is access all Tag;
for Tag_Ptr'Storage_Size use 0;
type Offset_To_Top_Ptr is access all System.Storage_Elements.Storage_Offset;
for Offset_To_Top_Ptr'Storage_Size use 0;
type Tag_Table is array (Natural range <>) of Tag;
pragma Suppress_Initialization (Tag_Table);
type Size_Ptr is access function (A : System.Address)
return Long_Long_Integer;
type Type_Specific_Data (Idepth : Natural) is record -- GDB knows
Access_Level : Natural;
Alignment : Natural;
Expanded_Name : Cstring_Ptr;
External_Tag : Cstring_Ptr;
HT_Link : Tag_Ptr;
Transportable : Boolean;
Type_Is_Abstract : Boolean;
Needs_Finalization : Boolean;
Size_Func : Size_Ptr;
Interfaces_Table : Interface_Data_Ptr;
SSD : Select_Specific_Data_Ptr;
Tags_Table : Tag_Table (0 .. Idepth);
end record;
pragma Suppress_Initialization (Type_Specific_Data);
type Type_Specific_Data_Ptr is access all Type_Specific_Data;
for Type_Specific_Data_Ptr'Storage_Size use 0;
type Signature_Kind is (
Unknown,
Primary_DT,
Secondary_DT);
pragma Discard_Names (Signature_Kind);
type Tagged_Kind is (
TK_Abstract_Limited_Tagged,
TK_Abstract_Tagged,
TK_Limited_Tagged,
TK_Protected,
TK_Tagged,
TK_Task);
pragma Discard_Names (Tagged_Kind);
type Dispatch_Table_Wrapper (Num_Prims : Natural) is record
Signature : Signature_Kind;
Tag_Kind : Tagged_Kind;
Predef_Prims : System.Address;
Offset_To_Top : System.Storage_Elements.Storage_Offset;
TSD : System.Address; -- or OSD, if Signature = Secondary_DT
Prims_Ptr : aliased Address_Array (1 .. Num_Prims);
end record;
pragma Suppress_Initialization (Dispatch_Table_Wrapper);
type Dispatch_Table_Ptr is access all Dispatch_Table_Wrapper; -- not req
for Dispatch_Table_Ptr'Storage_Size use 0;
type No_Dispatch_Table_Wrapper is record
NDT_TSD : System.Address;
NDT_Prims_Ptr : Natural;
end record;
pragma Suppress_Initialization (No_Dispatch_Table_Wrapper);
DT_Predef_Prims_Size : constant :=
Standard'Address_Size / Standard'Storage_Unit; -- not req
DT_Offset_To_Top_Size : constant :=
Standard'Address_Size / Standard'Storage_Unit; -- not req
DT_Typeinfo_Ptr_Size : constant :=
Standard'Address_Size / Standard'Storage_Unit;
DT_Offset_To_Top_Offset : constant :=
DT_Typeinfo_Ptr_Size + DT_Offset_To_Top_Size;
DT_Predef_Prims_Offset : constant :=
DT_Typeinfo_Ptr_Size + DT_Offset_To_Top_Size + DT_Predef_Prims_Size;
type Object_Specific_Data (OSD_Num_Prims : Positive) is record
OSD_Table : Object_Specific_Data_Array (1 .. OSD_Num_Prims);
end record;
pragma Suppress_Initialization (Object_Specific_Data);
Max_Predef_Prims : constant := 15;
type Predef_Prims_Table_Ptr is access Address_Array (1 .. Max_Predef_Prims);
for Predef_Prims_Table_Ptr'Storage_Size use 0;
type Addr_Ptr is access System.Address;
for Addr_Ptr'Storage_Size use 0;
-- Note: All type tags have TSD but not always have DT.
-- TAGGED_RECORD'Tag has a primary DT with TSD.
-- INTERFACE'Tag has a NDT with TSD.
-- On the other hand, all object tags have DT but not always have TSD.
-- Base_Address (Object) is TAGGED_RECORD'Tag.
-- INTERFACE'Class (Object) has a secondary DT with OSD.
-- required by compiler (a-tags.ads)
-- for INTERFACE'Class (Object)'Access (exp_attr.adb)
-- for accessibility checks of new access INTERFACE'Class (exp_ch4.adb)
-- for accessibility checks of return access INTERFACE'Class (exp_ch6.adb)
-- for Unchecked_Deallocation of access INTERFACE'Class (exp_intr.adb)
function Base_Address (Object : System.Address) return System.Address;
-- optionally required by compiler (a-tags.ads)
-- for Duplicated_Tag_Check (exp_disp.adb)
-- procedure Check_TSD (TSD : Type_Specific_Data_Ptr);
-- required by compiler (a-tags.ads)
-- for downcast to INTERFACE'Class (exp_ch3.adb)
-- for new INTERFACE'Class'(...) (exp_ch4.adb)
-- for non-statically upcast to INTERFACE'Class (exp_disp.adb)
-- for assignment to INTERFACE'Class (exp_util.adb)
function Displace (Object : System.Address; T : Tag)
return System.Address;
-- required by compiler (a-tags.ads)
-- for elaborating dispatch tables of derived types (exp_atag.adb)
function DT (T : Tag) return Dispatch_Table_Ptr;
-- required by compiler (a-tags.ads)
-- for requeue statements using synchronized interface (exp_ch9.adb)
-- for implicit primitives of synchronized interface (exp_disp.adb)
function Get_Entry_Index (T : Tag; Position : Positive) return Positive;
-- required by compiler (a-tags.ads)
-- for select statements using synchronized interface (exp_sel.adb)
function Get_Offset_Index (Object_T : Tag; Position : Positive)
return Positive;
-- required by compiler (a-tags.ads)
-- for select statements using synchronized interface (exp_atag.adb)
-- for implicit primitives of synchronized interface (exp_disp.adb)
function Get_Prim_Op_Kind (T : Tag; Position : Positive)
return Prim_Op_Kind;
-- required by compiler (a-tags.ads)
-- for select statements using synchronized interface (exp_sel.adb)
function Get_Tagged_Kind (Object_T : Tag) return Tagged_Kind;
-- required by compiler (a-tags.ads)
-- for Object in INTERFACE'Class (exp_ch4.adb)
-- for Generic_Dispatching_Constructor (exp_intr.adb)
function IW_Membership (Object : System.Address; T : Tag) return Boolean;
-- required by compiler (a-tags.ads)
-- for deferencing access values associated to Checked_Pool (exp_ch4.adb)
-- for Unchecked_Deallocation of access TAGGED'Class (exp_util.adb)
function Needs_Finalization (Object_T : Tag) return Boolean;
-- optionally required by compiler (a-tags.ads)
-- for implicit primitives derived from plural parent types (exp_disp.adb)
-- function Offset_To_Top (Object : System.Address)
-- return System.Storage_Elements.Storage_Offset;
-- required by compiler (a-tags.ads)
-- for types implementing interfaces (exp_ch3.adb)
procedure Register_Interface_Offset (
Object : System.Address;
Interface_T : Tag;
Is_Static : Boolean;
Offset_Value : System.Storage_Elements.Storage_Offset;
Offset_Func : Offset_To_Top_Function_Ptr);
-- optionally required by compiler (a-tags.ads)
-- for finalizers (exp_ch7.adb)
-- for elaborating dispatch tables (exp_disp.adb)
-- [gcc-5] generates _finalize_spec/body without _elabs/_elabb
-- and gnatbind generates wrong code, if Register_Tag is null.
-- procedure Register_Tag (T : Tag) is null; -- unimplemented
-- required by compiler (a-tags.ads)
-- for Generic_Dispatching_Constructor (exp_intr.adb)
function Secondary_Tag (T, Iface : Tag) return Tag;
-- required by compiler (a-tags.ads)
-- for variable-sized types implementing interfaces (exp_ch3.adb)
-- procedure Set_Dynamic_Offset_To_Top (
-- Object : System.Address;
-- Interface_T : Tag;
-- Offset_Value : System.Storage_Elements.Storage_Offset;
-- Offset_Func : Offset_To_Top_Function_Ptr);
-- required by compiler (a-tags.ads)
-- for elaborating dispatch tables of synchronized interface (exp_disp.adb)
procedure Set_Entry_Index (
T : Tag;
Position : Positive;
Value : Positive);
procedure Set_Prim_Op_Kind (
T : Tag;
Position : Positive;
Value : Prim_Op_Kind);
-- required by compiler (a-tags.ads)
-- for Generic_Dispatching_Constructor (exp_intr.adb)
function Type_Is_Abstract (T : Tag) return Boolean
renames Is_Abstract;
-- optionally required by compiler (a-tags.ads)
-- for finalizers (exp_ch7.adb, exp_util.adb)
-- procedure Unregister_Tag (T : Tag) is null; -- unimplemented
-- interface delegation
function Nop (Object : System.Address; Interface_Tag : Tag)
return System.Address is (System.Null_Address);
type Get_Delegation_Handler is access function (
Object : System.Address;
Interface_Tag : Tag)
return System.Address;
pragma Favor_Top_Level (Get_Delegation_Handler);
Get_Delegation : not null Get_Delegation_Handler := Nop'Access;
pragma Atomic (Get_Delegation);
end Ada.Tags;
|
with
Ahven,
float_Math.Geometry.d2;
package body math_Tests.Geometry_2d
is
use Ahven,
float_Math;
function almost_Equal (Left, Right : in Real) return Boolean
is
Tolerance : constant := 0.000_001;
begin
return abs (Left - Right) <= Tolerance;
end almost_Equal;
procedure Polygon_is_convex_Test
is
use float_Math.Geometry.d2;
the_Poly : Polygon := (vertex_Count => 4,
vertices => ((-1.0, -1.0),
( 1.0, -1.0),
( 1.0, 1.0),
(-1.0, 1.0)));
begin
assert (is_Convex (the_Poly),
"T1 => " & Image (the_Poly) & " should be convex ... failed !");
the_Poly.Vertices (3) := (0.0, 0.0);
assert (is_Convex (the_Poly),
"T2 => " & Image (the_Poly) & " should be convex ... failed !");
the_Poly.Vertices (3) := (0.0, 0.1);
assert (is_Convex (the_Poly),
"T3 => " & Image (the_Poly) & " should be convex ... failed !");
the_Poly.Vertices (3) := (0.0, -0.1);
assert (not is_Convex (the_Poly),
"T4 => " & Image (the_Poly) & " should not be convex ... failed !");
end Polygon_is_convex_Test;
procedure triangle_Area_Test
is
use float_Math.Geometry.d2;
the_Tri : Triangle := (vertices => (( 0.0, 0.0),
( 1.0, 0.0),
( 1.0, 1.0)));
begin
assert (almost_Equal (Area (the_Tri), 0.5),
"T1 => & Image (the_Tri) & area should be 0.5 ... failed ! " & Image (Area (the_Tri), 12));
the_Tri := (vertices => ((-0.11073643, -0.179634809),
(-0.0553682148, 0.410182595),
(-0.0276841074, 0.705091298)));
assert (Area (the_Tri) >= 0.0,
"T2 => & Image (the_Tri) & area should be positive ... failed !");
the_Tri := (vertices => ((-1.0, -1.0),
( 1.0, -1.0),
( 1.0, -0.999999)));
assert (Area (the_Tri) > 0.0,
"T3 => & Image (the_Tri) & area should be positive ... failed !");
the_Tri := (vertices => ((-0.11073643, -0.179634809),
(-0.0276841074, 0.705091298),
(-0.0553682148, 0.410182595)));
assert (Area (the_Tri) >= 0.0,
"T4 => & Image (the_Tri) & area should be positive ... failed !");
-- tbd: Add tests for degenerate triangles.
end triangle_Area_Test;
overriding
procedure Initialize (T : in out Test) is
begin
T.set_Name ("Geometry (2D) Tests");
Framework.add_test_Routine (T, Polygon_is_convex_Test'Access, "Polygon is convex Test");
Framework.add_test_Routine (T, triangle_Area_Test 'Access, "Triangle area Test");
end Initialize;
end math_Tests.Geometry_2d;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- A D A . E X C E P T I O N S . T R A C E B A C K --
-- --
-- B o d y --
-- --
-- Copyright (C) 1999-2019, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
package body Ada.Exceptions.Traceback is
----------------
-- Tracebacks --
----------------
function Tracebacks (E : Exception_Occurrence) return Tracebacks_Array is
begin
return Tracebacks_Array (E.Tracebacks (1 .. E.Num_Tracebacks));
end Tracebacks;
end Ada.Exceptions.Traceback;
|
-- Swaggy Jenkins
-- Jenkins API clients generated from Swagger / Open API specification
-- ------------ EDIT NOTE ------------
-- This file was generated with openapi-generator. You can modify it to implement
-- the server. After you modify this file, you should add the following line
-- to the .openapi-generator-ignore file:
--
-- src/.ads
--
-- Then, you can drop this edit note comment.
-- ------------ EDIT NOTE ------------
package is
end ;
|
pragma Ada_2005;
pragma Style_Checks (Off);
pragma Warnings (Off);
with Interfaces.C; use Interfaces.C;
with glib;
with glib.Values;
with System;
with glib;
with System;
with GLIB; -- with GStreamer.GST_Low_Level.glibconfig_h;
package GStreamer.GST_Low_Level.gstreamer_0_10_gst_interfaces_xoverlay_h is
-- unsupported macro: GST_TYPE_X_OVERLAY (gst_x_overlay_get_type ())
-- arg-macro: function GST_X_OVERLAY (obj)
-- return GST_IMPLEMENTS_INTERFACE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_X_OVERLAY, GstXOverlay);
-- arg-macro: function GST_X_OVERLAY_CLASS (klass)
-- return G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_X_OVERLAY, GstXOverlayClass);
-- arg-macro: function GST_IS_X_OVERLAY (obj)
-- return GST_IMPLEMENTS_INTERFACE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_X_OVERLAY);
-- arg-macro: function GST_IS_X_OVERLAY_CLASS (klass)
-- return G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_X_OVERLAY);
-- arg-macro: function GST_X_OVERLAY_GET_CLASS (inst)
-- return G_TYPE_INSTANCE_GET_INTERFACE ((inst), GST_TYPE_X_OVERLAY, GstXOverlayClass);
-- GStreamer X-based Overlay
-- * Copyright (C) 2003 Ronald Bultje <rbultje@ronald.bitfreak.net>
-- * Copyright (C) 2003 Julien Moutte <julien@moutte.net>
-- *
-- * x-overlay.h: X-based overlay interface design
-- *
-- * This library is free software; you can redistribute it and/or
-- * modify it under the terms of the GNU Library General Public
-- * License as published by the Free Software Foundation; either
-- * version 2 of the License, or (at your option) any later version.
-- *
-- * This library is distributed in the hope that it will be useful,
-- * but WITHOUT ANY WARRANTY; without even the implied warranty of
-- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- * Library General Public License for more details.
-- *
-- * You should have received a copy of the GNU Library General Public
-- * License along with this library; if not, write to the
-- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-- * Boston, MA 02111-1307, USA.
--
--*
-- * GstXOverlay:
-- *
-- * Opaque #GstXOverlay data structure.
--
-- skipped empty struct u_GstXOverlay
-- skipped empty struct GstXOverlay
type GstXOverlayClass;
type u_GstXOverlayClass_u_gst_reserved_array is array (0 .. 0) of System.Address;
--subtype GstXOverlayClass is u_GstXOverlayClass; -- gst/interfaces/xoverlay.h:50
--*
-- * GstXOverlayClass:
-- * @klass: parent interface type.
-- * @set_xwindow_id: (deprecated) virtual method to configure the XWindow handle
-- * @expose: virtual method to handle expose events
-- * @handle_events: virtual method to handle events
-- * @set_render_rectangle: virtual method to set the render rectangle (since 0.10.29)
-- * @set_window_handle: virtual method to configure the window handle
-- *
-- * #GstXOverlay interface
--
type GstXOverlayClass is record
klass : aliased GStreamer.GST_Low_Level.glib_2_0_gobject_gtype_h.GTypeInterface; -- gst/interfaces/xoverlay.h:64
set_xwindow_id : access procedure (arg1 : System.Address; arg2 : GLIB.gulong); -- gst/interfaces/xoverlay.h:69
expose : access procedure (arg1 : System.Address); -- gst/interfaces/xoverlay.h:77
handle_events : access procedure (arg1 : System.Address; arg2 : GLIB.gboolean); -- gst/interfaces/xoverlay.h:80
set_render_rectangle : access procedure
(arg1 : System.Address;
arg2 : GLIB.gint;
arg3 : GLIB.gint;
arg4 : GLIB.gint;
arg5 : GLIB.gint); -- gst/interfaces/xoverlay.h:84
set_window_handle : access procedure (arg1 : System.Address; arg2 : access GLIB.guint); -- gst/interfaces/xoverlay.h:87
u_gst_reserved : u_GstXOverlayClass_u_gst_reserved_array; -- gst/interfaces/xoverlay.h:89
end record;
pragma Convention (C_Pass_By_Copy, GstXOverlayClass); -- gst/interfaces/xoverlay.h:63
-- virtual functions
--< private >
function gst_x_overlay_get_type return GLIB.GType; -- gst/interfaces/xoverlay.h:92
pragma Import (C, gst_x_overlay_get_type, "gst_x_overlay_get_type");
-- virtual class function wrappers
procedure gst_x_overlay_set_xwindow_id (overlay : System.Address; xwindow_id : GLIB.gulong); -- gst/interfaces/xoverlay.h:96
pragma Import (C, gst_x_overlay_set_xwindow_id, "gst_x_overlay_set_xwindow_id");
function gst_x_overlay_set_render_rectangle
(overlay : System.Address;
x : GLIB.gint;
y : GLIB.gint;
width : GLIB.gint;
height : GLIB.gint) return GLIB.gboolean; -- gst/interfaces/xoverlay.h:100
pragma Import (C, gst_x_overlay_set_render_rectangle, "gst_x_overlay_set_render_rectangle");
procedure gst_x_overlay_expose (overlay : System.Address); -- gst/interfaces/xoverlay.h:104
pragma Import (C, gst_x_overlay_expose, "gst_x_overlay_expose");
procedure gst_x_overlay_handle_events (overlay : System.Address; handle_events : GLIB.gboolean); -- gst/interfaces/xoverlay.h:106
pragma Import (C, gst_x_overlay_handle_events, "gst_x_overlay_handle_events");
procedure gst_x_overlay_set_window_handle (overlay : System.Address; handle : access GLIB.guint); -- gst/interfaces/xoverlay.h:109
pragma Import (C, gst_x_overlay_set_window_handle, "gst_x_overlay_set_window_handle");
-- public methods to dispatch bus messages
procedure gst_x_overlay_got_xwindow_id (overlay : System.Address; xwindow_id : GLIB.gulong); -- gst/interfaces/xoverlay.h:114
pragma Import (C, gst_x_overlay_got_xwindow_id, "gst_x_overlay_got_xwindow_id");
procedure gst_x_overlay_got_window_handle (overlay : System.Address; handle : access GLIB.guint); -- gst/interfaces/xoverlay.h:117
pragma Import (C, gst_x_overlay_got_window_handle, "gst_x_overlay_got_window_handle");
procedure gst_x_overlay_prepare_xwindow_id (overlay : System.Address); -- gst/interfaces/xoverlay.h:120
pragma Import (C, gst_x_overlay_prepare_xwindow_id, "gst_x_overlay_prepare_xwindow_id");
end GStreamer.GST_Low_Level.gstreamer_0_10_gst_interfaces_xoverlay_h;
|
package body Opt25_Pkg2 is
function Default_Stack return Stack is
begin
return Default_Stack_Var;
end Default_Stack;
end Opt25_Pkg2;
|
-----------------------------------------------------------------------
-- Util.Streams -- Stream utilities
-- Copyright (C) 2010, 2011 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-----------------------------------------------------------------------
package body Util.Streams is
use Ada.Streams;
-- ------------------------------
-- Copy the input stream to the output stream until the end of the input stream
-- is reached.
-- ------------------------------
procedure Copy (From : in out Input_Stream'Class;
Into : in out Output_Stream'Class) is
Buffer : Stream_Element_Array (0 .. 4_096);
Last : Stream_Element_Offset;
begin
loop
From.Read (Buffer, Last);
if Last > Buffer'First then
Into.Write (Buffer (Buffer'First .. Last));
end if;
exit when Last < Buffer'Last;
end loop;
end Copy;
end Util.Streams;
|
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2011-2012, Vadim Godunko <vgodunko@gmail.com> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
-- This file is generated, don't edit it.
------------------------------------------------------------------------------
-- A literal specification identifies a literal constant being modeled.
------------------------------------------------------------------------------
with AMF.UML.Value_Specifications;
package AMF.UML.Literal_Specifications is
pragma Preelaborate;
type UML_Literal_Specification is limited interface
and AMF.UML.Value_Specifications.UML_Value_Specification;
type UML_Literal_Specification_Access is
access all UML_Literal_Specification'Class;
for UML_Literal_Specification_Access'Storage_Size use 0;
end AMF.UML.Literal_Specifications;
|
-- This file is generated by SWIG. Please do not modify by hand.
--
with Interfaces.C;
with Interfaces.C;
with Interfaces.C.Pointers;
package xcb.xcb_query_text_extents_cookie_t is
-- Item
--
type Item is record
sequence : aliased Interfaces.C.unsigned;
end record;
-- Item_Array
--
type Item_Array is
array
(Interfaces.C
.size_t range <>) of aliased xcb.xcb_query_text_extents_cookie_t
.Item;
-- Pointer
--
package C_Pointers is new Interfaces.C.Pointers
(Index => Interfaces.C.size_t,
Element => xcb.xcb_query_text_extents_cookie_t.Item,
Element_Array => xcb.xcb_query_text_extents_cookie_t.Item_Array,
Default_Terminator => (others => <>));
subtype Pointer is C_Pointers.Pointer;
-- Pointer_Array
--
type Pointer_Array is
array
(Interfaces.C
.size_t range <>) of aliased xcb.xcb_query_text_extents_cookie_t
.Pointer;
-- Pointer_Pointer
--
package C_Pointer_Pointers is new Interfaces.C.Pointers
(Index => Interfaces.C.size_t,
Element => xcb.xcb_query_text_extents_cookie_t.Pointer,
Element_Array => xcb.xcb_query_text_extents_cookie_t.Pointer_Array,
Default_Terminator => null);
subtype Pointer_Pointer is C_Pointer_Pointers.Pointer;
end xcb.xcb_query_text_extents_cookie_t;
|
------------------------------------------------------------------------------
-- --
-- GNAT LIBRARY COMPONENTS --
-- --
-- ADA.CONTAINERS.FUNCTIONAL_MAPS --
-- --
-- B o d y --
-- --
-- Copyright (C) 2016-2019, Free Software Foundation, Inc. --
-- --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow --
-- apply solely to the contents of the part following the private keyword. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
------------------------------------------------------------------------------
pragma Ada_2012;
package body Ada.Containers.Functional_Maps with SPARK_Mode => Off is
use Key_Containers;
use Element_Containers;
---------
-- "=" --
---------
function "=" (Left : Map; Right : Map) return Boolean is
(Left.Keys <= Right.Keys and Right <= Left);
----------
-- "<=" --
----------
function "<=" (Left : Map; Right : Map) return Boolean is
I2 : Count_Type;
begin
for I1 in 1 .. Length (Left.Keys) loop
I2 := Find (Right.Keys, Get (Left.Keys, I1));
if I2 = 0
or else Get (Right.Elements, I2) /= Get (Left.Elements, I1)
then
return False;
end if;
end loop;
return True;
end "<=";
---------
-- Add --
---------
function Add
(Container : Map;
New_Key : Key_Type;
New_Item : Element_Type) return Map
is
begin
return
(Keys =>
Add (Container.Keys, Length (Container.Keys) + 1, New_Key),
Elements =>
Add
(Container.Elements, Length (Container.Elements) + 1, New_Item));
end Add;
---------------------------
-- Elements_Equal_Except --
---------------------------
function Elements_Equal_Except
(Left : Map;
Right : Map;
New_Key : Key_Type) return Boolean
is
begin
for I in 1 .. Length (Left.Keys) loop
declare
K : constant Key_Type := Get (Left.Keys, I);
begin
if not Equivalent_Keys (K, New_Key)
and then
(Find (Right.Keys, K) = 0
or else Get (Right.Elements, Find (Right.Keys, K)) /=
Get (Left.Elements, I))
then
return False;
end if;
end;
end loop;
return True;
end Elements_Equal_Except;
function Elements_Equal_Except
(Left : Map;
Right : Map;
X : Key_Type;
Y : Key_Type) return Boolean
is
begin
for I in 1 .. Length (Left.Keys) loop
declare
K : constant Key_Type := Get (Left.Keys, I);
begin
if not Equivalent_Keys (K, X)
and then not Equivalent_Keys (K, Y)
and then
(Find (Right.Keys, K) = 0
or else Get (Right.Elements, Find (Right.Keys, K)) /=
Get (Left.Elements, I))
then
return False;
end if;
end;
end loop;
return True;
end Elements_Equal_Except;
---------
-- Get --
---------
function Get (Container : Map; Key : Key_Type) return Element_Type is
begin
return Get (Container.Elements, Find (Container.Keys, Key));
end Get;
-------------
-- Has_Key --
-------------
function Has_Key (Container : Map; Key : Key_Type) return Boolean is
begin
return Find (Container.Keys, Key) > 0;
end Has_Key;
-----------------
-- Has_Witness --
-----------------
function Has_Witness
(Container : Map;
Witness : Count_Type) return Boolean
is
(Witness in 1 .. Length (Container.Keys));
--------------
-- Is_Empty --
--------------
function Is_Empty (Container : Map) return Boolean is
begin
return Length (Container.Keys) = 0;
end Is_Empty;
-------------------
-- Keys_Included --
-------------------
function Keys_Included (Left : Map; Right : Map) return Boolean is
begin
for I in 1 .. Length (Left.Keys) loop
declare
K : constant Key_Type := Get (Left.Keys, I);
begin
if Find (Right.Keys, K) = 0 then
return False;
end if;
end;
end loop;
return True;
end Keys_Included;
--------------------------
-- Keys_Included_Except --
--------------------------
function Keys_Included_Except
(Left : Map;
Right : Map;
New_Key : Key_Type) return Boolean
is
begin
for I in 1 .. Length (Left.Keys) loop
declare
K : constant Key_Type := Get (Left.Keys, I);
begin
if not Equivalent_Keys (K, New_Key)
and then Find (Right.Keys, K) = 0
then
return False;
end if;
end;
end loop;
return True;
end Keys_Included_Except;
function Keys_Included_Except
(Left : Map;
Right : Map;
X : Key_Type;
Y : Key_Type) return Boolean
is
begin
for I in 1 .. Length (Left.Keys) loop
declare
K : constant Key_Type := Get (Left.Keys, I);
begin
if not Equivalent_Keys (K, X)
and then not Equivalent_Keys (K, Y)
and then Find (Right.Keys, K) = 0
then
return False;
end if;
end;
end loop;
return True;
end Keys_Included_Except;
------------
-- Length --
------------
function Length (Container : Map) return Count_Type is
begin
return Length (Container.Elements);
end Length;
---------------
-- Same_Keys --
---------------
function Same_Keys (Left : Map; Right : Map) return Boolean is
(Keys_Included (Left, Right)
and Keys_Included (Left => Right, Right => Left));
---------
-- Set --
---------
function Set
(Container : Map;
Key : Key_Type;
New_Item : Element_Type) return Map
is
(Keys => Container.Keys,
Elements =>
Set (Container.Elements, Find (Container.Keys, Key), New_Item));
-----------
-- W_Get --
-----------
function W_Get
(Container : Map;
Witness : Count_Type) return Element_Type
is
(Get (Container.Elements, Witness));
-------------
-- Witness --
-------------
function Witness (Container : Map; Key : Key_Type) return Count_Type is
(Find (Container.Keys, Key));
end Ada.Containers.Functional_Maps;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
-- --
-- S Y S T E M . B B . P A R A M E T E R S --
-- --
-- S p e c --
-- --
-- Copyright (C) 1999-2002 Universidad Politecnica de Madrid --
-- Copyright (C) 2003-2005 The European Space Agency --
-- Copyright (C) 2003-2021, AdaCore --
-- --
-- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNARL is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNARL was developed by the GNARL team at Florida State University. --
-- Extensive contributions were provided by Ada Core Technologies, Inc. --
-- --
-- The port of GNARL to bare board targets was initially developed by the --
-- Real-Time Systems Group at the Technical University of Madrid. --
-- --
------------------------------------------------------------------------------
-- This package defines basic parameters used by the low level tasking system
-- This is the Xilinx Ultrascale+ MPSoC Cortex-R5 version of this package
pragma Restrictions (No_Elaboration_Code);
package System.BB.Parameters is
pragma Pure;
--------------------
-- Hardware clock --
--------------------
LPD_APB_CLK_Frequency : constant := 100_000_000;
-- 100MHz input frequency
TTC_Prescaler : constant := 2;
Ticks_Per_Second : constant :=
LPD_APB_CLK_Frequency / (2 ** (TTC_Prescaler + 1));
-- Frequency of the TTC counter: 12.50 MHz
----------------
-- Interrupts --
----------------
-- These definitions are in this package in order to isolate target
-- dependencies.
subtype Interrupt_Range is Natural range 0 .. 191;
-- Number of interrupts supported by the zynqmp.
Trap_Vectors : constant := 7;
-- ARM in general has these traps:
-- 0 (at 16#0000#) Reset
-- 1 (at 16#0004#) Undefined Instruction (synchronous)
-- 2 (at 16#0008#) Supervisor Call (synchronous)
-- 3 (at 16#000C#) Abort - Prefetch (synchronous)
-- 4 (at 16#0010#) Abort - Data (asynchronous)
-- 5 (at 16#0014#) IRQ Trap (asynchronous)
-- 6 (at 16#0018#) FIQ Trap (asynchronous)
Interrupt_Unmask_Priority : constant System.Interrupt_Priority :=
System.Interrupt_Priority'Last;
-- The priority under which we unmask interrupts.
-- Useful when we use FIQ to simulate priorities on ARM.
-----------------------------
-- GIC peripheral location --
-----------------------------
GICD_Base_Address : constant := 16#F900_0000#;
GICC_Base_Address : constant := 16#F900_1000#;
------------
-- Stacks --
------------
Interrupt_Stack_Size : constant := 8192;
-- Size of each of the interrupt stacks. Each processor has its own
-- interrupt stack. In case interrupts are nested, the same stack is used.
Interrupt_Sec_Stack_Size : constant := 128;
-- Size of the secondary stack for interrupt handlers
----------
-- CPUS --
----------
Max_Number_Of_CPUs : constant := 4;
-- Maximum number of CPUs avaialble on the target.
-- Note: the actual number of CPUs can be lower than this number, in
-- which case the runtime will adjust the CPUs according to the actual
-- CPU count.
-- The actual number of CPUs can be also bigger, in which case the runtime
-- will not use the additional CPUs.
Multiprocessor : constant Boolean := Max_Number_Of_CPUs /= 1;
-- Are we on a multiprocessor board?
end System.BB.Parameters;
|
-- Copyright 2008-2021 Free Software Foundation, Inc.
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
with Ident;
procedure Assign is
Q: array (1..5) of Integer := (2, 3, 5, 7, 11);
begin
Q(1) := Ident (Q(3)); -- START
end Assign;
|
with
gel.Window.sdl,
gel.Applet.gui_world,
gel.Forge,
gel.Sprite,
gel.hinge_Joint,
physics.Model,
openGL.Model.box.colored,
openGL.Palette,
float_math.Algebra.linear.d3,
ada.Text_IO,
ada.Exceptions;
pragma unreferenced (gel.Window.sdl);
procedure launch_hinged_Box
--
-- Shows variously hinged boxes.
--
is
package Math renames float_Math;
use openGL,
openGL.Model.box,
opengl.Palette,
ada.Text_IO;
the_Applet : constant gel.Applet.gui_World.view := gel.Forge.new_gui_Applet ("hinged Box", 1536, 864);
X : float_math.Real := 0.0;
begin
the_Applet.gui_Camera.Site_is ((0.0, 4.0, 30.0)); -- Position the camera.
the_Applet.enable_simple_Dolly (1); -- Enable user camera control via keyboard.
the_Applet.Renderer.Background_is (Blue);
-- Add sprites and joints.
--
declare
use float_Math;
box_Size : constant gel.Math.Vector_3 := (1.0, 1.0, 1.0);
-- Box
--
the_box_Model : constant openGL.Model.box.colored.view
:= openGL.Model.box.colored.new_Box (Size => box_Size,
Faces => (Front => (colors => (others => (Red, Opaque))),
Rear => (colors => (others => (Blue, Opaque))),
Upper => (colors => (others => (Violet, Opaque))),
Lower => (colors => (others => (Yellow, Opaque))),
Left => (colors => (others => (Cyan, Opaque))),
Right => (colors => (others => (Magenta, Opaque)))));
the_static_box_physics_Model : constant physics.Model.view
:= physics.Model.forge.new_physics_Model (shape_Info => (Kind => physics.Model.cube,
half_Extents => box_Size));
the_dynamic_box_physics_Model : constant physics.Model.view
:= physics.Model.forge.new_physics_Model (shape_Info => (Kind => physics.Model.cube,
half_Extents => box_Size / 2.0),
Mass => 1.0);
the_Box_1 : constant gel.Sprite.view
:= gel.Sprite.forge.new_Sprite ("demo.Box.static.1",
the_Applet.gui_World.all'Access,
math.Origin_3d,
the_box_Model.all'Access,
the_static_box_physics_Model,
owns_Graphics => False,
owns_Physics => True);
the_Box_2 : constant gel.Sprite.view
:= gel.Sprite.forge.new_Sprite ("demo.Box.dynamic.2",
the_Applet.gui_World.all'Access,
math.Origin_3d,
the_box_Model.all'Access,
the_dynamic_box_physics_Model,
owns_Graphics => False,
owns_Physics => False);
the_Box_3 : constant gel.Sprite.view
:= gel.Sprite.forge.new_Sprite ("demo.Box.dynamic.3",
the_Applet.gui_World.all'Access,
math.Origin_3d,
the_box_Model.all'Access,
the_dynamic_box_physics_Model,
owns_Graphics => True,
owns_Physics => True);
the_Joint_1 : constant gel.hinge_Joint.view := new gel.hinge_Joint.item;
the_Joint_2 : constant gel.hinge_Joint.view := new gel.hinge_Joint.item;
begin
the_Applet.gui_World.Gravity_is ((0.0, -10.0, 0.0));
the_Applet.gui_World.add (the_Box_1);
the_Applet.gui_World.add (the_Box_2);
the_Applet.gui_World.add (the_Box_3);
the_Box_1.Site_is (( 0.0, 0.0, 0.0));
the_Box_2.Site_is (( -1.0, 2.0, 0.0));
the_Box_3.Site_is (( 10.0, 10.0, 0.0));
-- the_Box_3.Site_is (( 10.0, 10.0, 0.0));
declare
use math.Algebra.linear.d3;
Frame_1 : constant math.Matrix_4x4 := math.Identity_4x4;
Frame_2 : math.Matrix_4x4 := math.Identity_4x4;
Frame_3 : math.Matrix_4x4 := math.Identity_4x4;
y_Rot : math.Matrix_3x3 := y_Rotation_from (to_Radians (180.0));
begin
set_Translation (Frame_2, (2.0, 2.0, 0.0));
set_Translation (Frame_3, (8.0, 8.0, 0.0));
-- set_Translation (Frame_3, (8.0, 8.0, 0.0));
-- set_Translation (Frame_B, y_Rot * math.Vector_3'( -2.0, 0.0, 0.0));
--
-- set_Rotation (Frame_A, x_Rotation_from (to_Radians (0.0)));
-- set_Rotation (Frame_B, y_Rot);
the_Joint_1.define (the_Applet.gui_World.Space,
the_Box_3,
Frame_3);
the_Joint_2.define (the_Applet.gui_World.Space,
the_Box_1, the_Box_2,
Frame_1, Frame_2,
low_Limit => to_Radians (-360.0),
high_Limit => to_Radians ( 360.0),
collide_Conected => False);
-- TODO:
-- the_Joint_2.define (the_Applet.gui_World.Space,
-- the_Box_1, the_Box_2,
-- pivot_Axis => (0.0, 0.0, 0.0));
-- the_Joint.low_Bound_is (Pitch, 0.0);
-- the_Joint.low_Bound_is (Yaw, 0.0);
-- the_Joint.low_Bound_is (Roll, 0.0);
--
-- the_Joint.high_Bound_is (Pitch, 0.0);
-- the_Joint.high_Bound_is (Yaw, 0.0);
-- the_Joint.high_Bound_is (Roll, 0.0);
end;
the_Applet.gui_World.add (the_Joint_1.all'Access); -- Add joint to the world.
the_Applet.gui_World.add (the_Joint_2.all'Access); -- Add joint to the world.
end;
while the_Applet.is_open
loop
the_Applet.freshen; -- Handle any new events and update the screen.
end loop;
the_Applet.destroy;
exception
when E : others =>
new_Line;
put_Line ("Unhandled exception in main thread !");
put_Line (ada.Exceptions.exception_Information (E));
new_Line;
end launch_hinged_Box;
|
-- Copyright (c) 2019 Maxim Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-- License-Filename: LICENSE
-------------------------------------------------------------
with Program.Lexical_Elements;
with Program.Elements.Expressions;
with Program.Elements.Constraints;
with Program.Elements.Delta_Constraints;
with Program.Element_Visitors;
package Program.Nodes.Delta_Constraints is
pragma Preelaborate;
type Delta_Constraint is
new Program.Nodes.Node
and Program.Elements.Delta_Constraints.Delta_Constraint
and Program.Elements.Delta_Constraints.Delta_Constraint_Text
with private;
function Create
(Delta_Token : not null Program.Lexical_Elements
.Lexical_Element_Access;
Delta_Expression : not null Program.Elements.Expressions
.Expression_Access;
Range_Token : Program.Lexical_Elements.Lexical_Element_Access;
Real_Range_Constraint : Program.Elements.Constraints.Constraint_Access)
return Delta_Constraint;
type Implicit_Delta_Constraint is
new Program.Nodes.Node
and Program.Elements.Delta_Constraints.Delta_Constraint
with private;
function Create
(Delta_Expression : not null Program.Elements.Expressions
.Expression_Access;
Real_Range_Constraint : Program.Elements.Constraints.Constraint_Access;
Is_Part_Of_Implicit : Boolean := False;
Is_Part_Of_Inherited : Boolean := False;
Is_Part_Of_Instance : Boolean := False)
return Implicit_Delta_Constraint
with Pre =>
Is_Part_Of_Implicit or Is_Part_Of_Inherited or Is_Part_Of_Instance;
private
type Base_Delta_Constraint is
abstract new Program.Nodes.Node
and Program.Elements.Delta_Constraints.Delta_Constraint
with record
Delta_Expression : not null Program.Elements.Expressions
.Expression_Access;
Real_Range_Constraint : Program.Elements.Constraints.Constraint_Access;
end record;
procedure Initialize (Self : aliased in out Base_Delta_Constraint'Class);
overriding procedure Visit
(Self : not null access Base_Delta_Constraint;
Visitor : in out Program.Element_Visitors.Element_Visitor'Class);
overriding function Delta_Expression
(Self : Base_Delta_Constraint)
return not null Program.Elements.Expressions.Expression_Access;
overriding function Real_Range_Constraint
(Self : Base_Delta_Constraint)
return Program.Elements.Constraints.Constraint_Access;
overriding function Is_Delta_Constraint_Element
(Self : Base_Delta_Constraint)
return Boolean;
overriding function Is_Constraint_Element
(Self : Base_Delta_Constraint)
return Boolean;
overriding function Is_Definition_Element
(Self : Base_Delta_Constraint)
return Boolean;
type Delta_Constraint is
new Base_Delta_Constraint
and Program.Elements.Delta_Constraints.Delta_Constraint_Text
with record
Delta_Token : not null Program.Lexical_Elements.Lexical_Element_Access;
Range_Token : Program.Lexical_Elements.Lexical_Element_Access;
end record;
overriding function To_Delta_Constraint_Text
(Self : aliased in out Delta_Constraint)
return Program.Elements.Delta_Constraints.Delta_Constraint_Text_Access;
overriding function Delta_Token
(Self : Delta_Constraint)
return not null Program.Lexical_Elements.Lexical_Element_Access;
overriding function Range_Token
(Self : Delta_Constraint)
return Program.Lexical_Elements.Lexical_Element_Access;
type Implicit_Delta_Constraint is
new Base_Delta_Constraint
with record
Is_Part_Of_Implicit : Boolean;
Is_Part_Of_Inherited : Boolean;
Is_Part_Of_Instance : Boolean;
end record;
overriding function To_Delta_Constraint_Text
(Self : aliased in out Implicit_Delta_Constraint)
return Program.Elements.Delta_Constraints.Delta_Constraint_Text_Access;
overriding function Is_Part_Of_Implicit
(Self : Implicit_Delta_Constraint)
return Boolean;
overriding function Is_Part_Of_Inherited
(Self : Implicit_Delta_Constraint)
return Boolean;
overriding function Is_Part_Of_Instance
(Self : Implicit_Delta_Constraint)
return Boolean;
end Program.Nodes.Delta_Constraints;
|
-----------------------------------------------------------------------
-- helios-schemas -- Helios schemas
-- Copyright (C) 2017, 2019 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-----------------------------------------------------------------------
with Ada.Strings.Fixed;
package body Helios.Schemas is
function Allocate_Index (From : in Definition_Type_Access) return Value_Index;
Root : aliased Definition_Type (Len => 0);
Current_Index : Monitor_Index := 0;
function Allocate_Index (From : in Definition_Type_Access) return Value_Index is
begin
if From.Kind = V_NONE and From.Parent = Root'Access then
From.Index := From.Index + 1;
return From.Index;
else
return Allocate_Index (From.Parent);
end if;
end Allocate_Index;
-- ------------------------------
-- Returns true if the node has some definition children.
-- ------------------------------
function Has_Children (Node : in Definition_Type_Access) return Boolean is
begin
return Node.Child /= null;
end Has_Children;
-- ------------------------------
-- Returns true if the node has other nodes that contain values.
-- ------------------------------
function Has_Snapshots (Node : in Definition_Type_Access) return Boolean is
begin
return Node.Child /= null and then Node.Child.Child = null;
end Has_Snapshots;
-- ------------------------------
-- Returns true if the name is allowed by the filter configuration.
-- The filter string is a comma separated list of allowed names.
-- The special value "*" allows any name.
-- ------------------------------
function Is_Filter_Enable (Name : in String;
Filter : in String) return Boolean is
Pos : Natural;
begin
if Filter = "*" then
return True;
end if;
Pos := Ada.Strings.Fixed.Index (Filter, Name);
if Pos = 0 then
return False;
end if;
return True;
end Is_Filter_Enable;
-- ------------------------------
-- Add a new definition node to the definition.
-- ------------------------------
function Create_Definition (Into : in Definition_Type_Access;
Name : in String;
Filter : in String := "*";
Kind : in Value_Type := V_INTEGER)
return Definition_Type_Access is
Result : Definition_Type_Access;
begin
if not Is_Filter_Enable (Name, Filter) then
return null;
end if;
Result := new Definition_Type (Len => Name'Length);
Result.Kind := Kind;
if Kind = V_NONE then
Current_Index := Current_Index + 1;
Result.Monitor := Current_Index;
else
Result.Monitor := Into.Monitor;
Result.Index := Allocate_Index (Into);
end if;
Result.Name := Name;
Result.Parent := Into;
if Into /= null then
Result.Next := Into.Child;
Into.Child := Result;
else
Result.Parent := Root'Access;
Result.Next := Root.Child;
Root.Child := Result;
end if;
return Result;
end Create_Definition;
-- ------------------------------
-- Add a definition to the agent.
-- ------------------------------
procedure Add_Definition (Into : in Definition_Type_Access;
Def : in Definition_Type_Access) is
begin
Def.Index := Allocate_Index (Into);
Def.Monitor := Into.Monitor;
Def.Parent := Into;
Def.Next := Into.Child;
Into.Child := Def;
end Add_Definition;
-- ------------------------------
-- Find a child definition with the given name.
-- Returns null if there is no such definition.
-- ------------------------------
function Find_Definition (From : in Definition_Type_Access;
Name : in String) return Definition_Type_Access is
Node : Definition_Type_Access := From;
begin
while Node /= null loop
if Node.Name = Name then
return Node;
end if;
Node := Node.Next;
end loop;
return null;
end Find_Definition;
end Helios.Schemas;
|
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- SQL Database Access --
-- --
-- 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 Interfaces.C;
with League.Strings.Internals;
with Matreshka.Internals.SQL_Drivers.SQLite3.Queries;
with Matreshka.Internals.Strings.C;
package body Matreshka.Internals.SQL_Drivers.SQLite3.Databases is
use type Interfaces.C.int;
procedure Call
(Self : not null access SQLite3_Database'Class;
Code : Interfaces.C.int);
-- Process return code, constructs error message when code is error.
----------
-- Call --
----------
procedure Call
(Self : not null access SQLite3_Database'Class;
Code : Interfaces.C.int) is
begin
-- Clear previous error state.
Self.Success := True;
Self.Error.Clear;
case Code is
when SQLITE_OK =>
null;
when others =>
Self.Success := False;
Self.Error :=
Matreshka.Internals.Strings.C.To_Valid_Universal_String
(sqlite3_errmsg16 (Self.Handle));
end case;
end Call;
-----------
-- Close --
-----------
overriding procedure Close (Self : not null access SQLite3_Database) is
begin
Self.Invalidate_Queries;
if Self.Handle /= null then
Self.Call (sqlite3_close (Self.Handle));
Self.Handle := null;
end if;
end Close;
------------
-- Commit --
------------
overriding procedure Commit (Self : not null access SQLite3_Database) is
begin
if Self.Handle /= null then
declare
Query : Matreshka.Internals.SQL_Drivers.Query_Access := Self.Query;
begin
if not Query.Prepare
(League.Strings.To_Universal_String ("COMMIT"))
then
Self.Success := False;
Self.Error := Query.Error_Message;
elsif not Query.Execute then
Self.Success := False;
Self.Error := Query.Error_Message;
end if;
Matreshka.Internals.SQL_Drivers.Dereference (Query);
end;
end if;
end Commit;
---------------------
-- Database_Handle --
---------------------
function Database_Handle
(Self : not null access constant SQLite3_Database'Class)
return sqlite3_Access is
begin
return Self.Handle;
end Database_Handle;
-------------------
-- Error_Message --
-------------------
overriding function Error_Message
(Self : not null access SQLite3_Database)
return League.Strings.Universal_String is
begin
return Self.Error;
end Error_Message;
--------------
-- Finalize --
--------------
overriding procedure Finalize (Self : not null access SQLite3_Database) is
begin
if Self.Handle /= null then
Self.Close;
end if;
end Finalize;
----------
-- Open --
----------
overriding function Open
(Self : not null access SQLite3_Database;
Options : SQL.Options.SQL_Options) return Boolean
is
File_Name : constant League.Strings.Universal_String
:= Options.Get (League.Strings.To_Universal_String ("filename"));
begin
if Self.Handle = null then
Self.Call
(sqlite3_open16
(League.Strings.Internals.Internal (File_Name).Value,
Self.Handle'Unchecked_Access));
else
Self.Success := False;
end if;
return Self.Success;
end Open;
-----------
-- Query --
-----------
overriding function Query
(Self : not null access SQLite3_Database) return not null Query_Access is
begin
return Aux : constant not null Query_Access
:= new Queries.SQLite3_Query
do
Queries.Initialize
(Queries.SQLite3_Query'Class (Aux.all)'Access, Self);
end return;
end Query;
end Matreshka.Internals.SQL_Drivers.SQLite3.Databases;
|
-- Abstract :
--
-- Output Ada source code to recreate Grammar.
--
-- Copyright (C) 2018 Free Software Foundation, Inc.
--
-- This library is free software; you can redistribute it and/or modify it
-- under terms of the GNU General Public License as published by the Free
-- Software Foundation; either version 3, or (at your option) any later
-- version. This library is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-
-- TABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-- As a special exception under Section 7 of GPL version 3, you are granted
-- additional permissions described in the GCC Runtime Library Exception,
-- version 3.1, as published by the Free Software Foundation.
pragma License (Modified_GPL);
with Ada.Text_IO; use Ada.Text_IO;
with WisiToken.Generate;
with WisiToken.Productions;
procedure WisiToken.BNF.Generate_Grammar
(Grammar : in WisiToken.Productions.Prod_Arrays.Vector;
Action_Names : in WisiToken.Names_Array_Array)
is
use all type Ada.Containers.Count_Type;
use Ada.Strings.Unbounded;
use WisiToken.Generate;
use WisiToken.Productions;
Text : Unbounded_String;
Need_Comma : Boolean := False;
begin
Indent_Line ("Grammar.Set_First (" & Trimmed_Image (Grammar.First_Index) & ");");
Indent_Line ("Grammar.Set_Last (" & Trimmed_Image (Grammar.Last_Index) & ");");
for Prod of Grammar loop
Indent_Line ("declare");
Indent_Line (" Prod : Instance;");
Indent_Line ("begin");
Indent := Indent + 3;
Indent_Line ("Prod.LHS := " & Trimmed_Image (Prod.LHS) & ";");
Indent_Line ("Prod.RHSs.Set_First (0);");
Indent_Line ("Prod.RHSs.Set_Last (" & Trimmed_Image (Prod.RHSs.Last_Index) & ");");
for RHS_Index in Prod.RHSs.First_Index .. Prod.RHSs.Last_Index loop
declare
RHS : Right_Hand_Side renames Prod.RHSs (RHS_Index);
begin
Indent_Line ("declare");
Indent_Line (" RHS : Right_Hand_Side;");
Indent_Line ("begin");
Indent := Indent + 3;
if RHS.Tokens.Length > 0 then
Indent_Line ("RHS.Tokens.Set_First (1);");
Indent_Line ("RHS.Tokens.Set_Last (" & Trimmed_Image (Prod.RHSs (RHS_Index).Tokens.Last_Index) & ");");
if RHS.Tokens.Length = 1 then
Indent_Line ("To_Vector ((1 => " & Trimmed_Image (RHS.Tokens (1)) & "), RHS.Tokens);");
else
Need_Comma := False;
Text := +"To_Vector ((";
for ID of RHS.Tokens loop
if Need_Comma then
Text := Text & ", ";
else
Need_Comma := True;
end if;
Text := Text & Trimmed_Image (ID);
end loop;
Text := Text & "), RHS.Tokens);";
Indent_Wrap (-Text);
end if;
end if;
if Action_Names (Prod.LHS) /= null and then Action_Names (Prod.LHS)(RHS_Index) /= null then
Indent_Line ("RHS.Action := " & Action_Names (Prod.LHS)(RHS_Index).all & "'Access;");
end if;
Indent_Line ("Prod.RHSs (" & Trimmed_Image (RHS_Index) & ") := RHS;");
Indent := Indent - 3;
Indent_Line ("end;");
end;
end loop;
Indent_Line ("Grammar (" & Trimmed_Image (Prod.LHS) & ") := Prod;");
Indent := Indent - 3;
Indent_Line ("end;");
end loop;
end WisiToken.BNF.Generate_Grammar;
|
-- This file is covered by the Internet Software Consortium (ISC) License
-- Reference: ../License.txt
with Ada.Numerics.Discrete_Random;
with GNAT.String_Split;
with PortScan.Buildcycle.Pkgsrc;
with PortScan.Buildcycle.Ports;
with Replicant.Platform;
with Signals;
with Unix;
package body PortScan.Ops is
package GSS renames GNAT.String_Split;
package CYC renames PortScan.Buildcycle;
package FPC renames PortScan.Buildcycle.Ports;
package NPS renames PortScan.Buildcycle.Pkgsrc;
package REP renames Replicant;
package SIG renames Signals;
--------------------------
-- initialize_display --
--------------------------
procedure initialize_display (num_builders : builders) is
begin
if PM.configuration.avec_ncurses then
curses_support := DPY.launch_monitor (num_builders);
end if;
end initialize_display;
-------------------------
-- parallel_bulk_run --
-------------------------
procedure parallel_bulk_run (num_builders : builders; logs : dim_handlers)
is
subtype cycle_count is Natural range 1 .. 9;
subtype refresh_count is Natural range 1 .. 4;
subtype www_count is Natural range 1 .. 3;
subtype alert_count is Natural range 1 .. 200;
instructions : dim_instruction := (others => port_match_failed);
builder_states : dim_builder_state := (others => idle);
cntcycle : cycle_count := cycle_count'First;
cntrefresh : refresh_count := refresh_count'First;
cntalert : alert_count := alert_count'First;
cntwww : www_count := www_count'First;
run_complete : Boolean := False;
available : Positive := Integer (num_builders);
target : port_id;
all_idle : Boolean;
cntskip : Natural;
sumdata : DPY.summary_rec;
task type build (builder : builders);
task body build
is
type Rand_Draw is range 1 .. 20;
package Rand20 is new Ada.Numerics.Discrete_Random (Rand_Draw);
seed : Rand20.Generator;
build_result : Boolean;
opts : REP.slave_options;
begin
if builder <= num_builders then
if not curses_support then
TIO.Put_Line (CYC.elapsed_now & " => [" &
JT.zeropad (Integer (builder), 2) &
"] Builder launched");
end if;
loop
exit when builder_states (builder) = shutdown;
if builder_states (builder) = tasked then
builder_states (builder) := busy;
opts.need_procfs :=
all_ports (instructions (builder)).use_procfs;
opts.need_linprocfs :=
all_ports (instructions (builder)).use_linprocfs;
REP.launch_slave (id => builder, opts => opts);
case software_framework is
when ports_collection =>
build_result :=
FPC.build_package (builder, instructions (builder));
when pkgsrc =>
if not REP.Platform.standalone_pkg8_install (builder)
then
build_result := False;
else
build_result := NPS.build_package
(builder, instructions (builder));
end if;
end case;
REP.destroy_slave (id => builder, opts => opts);
if build_result then
builder_states (builder) := done_success;
else
builder_states (builder) := done_failure;
end if;
else
-- idle or done-(failure|success), just wait a bit
delay 0.1;
end if;
end loop;
if not curses_support then
TIO.Put_Line (CYC.elapsed_now & " => [" &
JT.zeropad (Integer (builder), 2) &
"] Shutting down");
end if;
end if;
end build;
builder_01 : build (builder => 1);
builder_02 : build (builder => 2);
builder_03 : build (builder => 3);
builder_04 : build (builder => 4);
builder_05 : build (builder => 5);
builder_06 : build (builder => 6);
builder_07 : build (builder => 7);
builder_08 : build (builder => 8);
builder_09 : build (builder => 9);
builder_10 : build (builder => 10);
builder_11 : build (builder => 11);
builder_12 : build (builder => 12);
builder_13 : build (builder => 13);
builder_14 : build (builder => 14);
builder_15 : build (builder => 15);
builder_16 : build (builder => 16);
builder_17 : build (builder => 17);
builder_18 : build (builder => 18);
builder_19 : build (builder => 19);
builder_20 : build (builder => 20);
builder_21 : build (builder => 21);
builder_22 : build (builder => 22);
builder_23 : build (builder => 23);
builder_24 : build (builder => 24);
builder_25 : build (builder => 25);
builder_26 : build (builder => 26);
builder_27 : build (builder => 27);
builder_28 : build (builder => 28);
builder_29 : build (builder => 29);
builder_30 : build (builder => 30);
builder_31 : build (builder => 31);
builder_32 : build (builder => 32);
builder_33 : build (builder => 33);
builder_34 : build (builder => 34);
builder_35 : build (builder => 35);
builder_36 : build (builder => 36);
builder_37 : build (builder => 37);
builder_38 : build (builder => 38);
builder_39 : build (builder => 39);
builder_40 : build (builder => 40);
builder_41 : build (builder => 41);
builder_42 : build (builder => 42);
builder_43 : build (builder => 43);
builder_44 : build (builder => 44);
builder_45 : build (builder => 45);
builder_46 : build (builder => 46);
builder_47 : build (builder => 47);
builder_48 : build (builder => 48);
builder_49 : build (builder => 49);
builder_50 : build (builder => 50);
builder_51 : build (builder => 51);
builder_52 : build (builder => 52);
builder_53 : build (builder => 53);
builder_54 : build (builder => 54);
builder_55 : build (builder => 55);
builder_56 : build (builder => 56);
builder_57 : build (builder => 57);
builder_58 : build (builder => 58);
builder_59 : build (builder => 59);
builder_60 : build (builder => 60);
builder_61 : build (builder => 61);
builder_62 : build (builder => 62);
builder_63 : build (builder => 63);
builder_64 : build (builder => 64);
-- Expansion of cpu_range from 32 to 64 means 128 possible builders
builder_65 : build (builder => 65);
builder_66 : build (builder => 66);
builder_67 : build (builder => 67);
builder_68 : build (builder => 68);
builder_69 : build (builder => 69);
builder_70 : build (builder => 70);
builder_71 : build (builder => 71);
builder_72 : build (builder => 72);
builder_73 : build (builder => 73);
builder_74 : build (builder => 74);
builder_75 : build (builder => 75);
builder_76 : build (builder => 76);
builder_77 : build (builder => 77);
builder_78 : build (builder => 78);
builder_79 : build (builder => 79);
builder_80 : build (builder => 80);
builder_81 : build (builder => 81);
builder_82 : build (builder => 82);
builder_83 : build (builder => 83);
builder_84 : build (builder => 84);
builder_85 : build (builder => 85);
builder_86 : build (builder => 86);
builder_87 : build (builder => 87);
builder_88 : build (builder => 88);
builder_89 : build (builder => 89);
builder_90 : build (builder => 90);
builder_91 : build (builder => 91);
builder_92 : build (builder => 92);
builder_93 : build (builder => 93);
builder_94 : build (builder => 94);
builder_95 : build (builder => 95);
builder_96 : build (builder => 96);
builder_97 : build (builder => 97);
builder_98 : build (builder => 98);
builder_99 : build (builder => 99);
builder_100 : build (builder => 100);
builder_101 : build (builder => 101);
builder_102 : build (builder => 102);
builder_103 : build (builder => 103);
builder_104 : build (builder => 104);
builder_105 : build (builder => 105);
builder_106 : build (builder => 106);
builder_107 : build (builder => 107);
builder_108 : build (builder => 108);
builder_109 : build (builder => 109);
builder_110 : build (builder => 110);
builder_111 : build (builder => 111);
builder_112 : build (builder => 112);
builder_113 : build (builder => 113);
builder_114 : build (builder => 114);
builder_115 : build (builder => 115);
builder_116 : build (builder => 116);
builder_117 : build (builder => 117);
builder_118 : build (builder => 118);
builder_119 : build (builder => 119);
builder_120 : build (builder => 120);
builder_121 : build (builder => 121);
builder_122 : build (builder => 122);
builder_123 : build (builder => 123);
builder_124 : build (builder => 124);
builder_125 : build (builder => 125);
builder_126 : build (builder => 126);
builder_127 : build (builder => 127);
builder_128 : build (builder => 128);
begin
loop
all_idle := True;
for slave in 1 .. num_builders loop
declare
begin
case builder_states (slave) is
when busy | tasked =>
all_idle := False;
when shutdown =>
null;
when idle =>
if run_complete then
builder_states (slave) := shutdown;
else
target := top_buildable_port;
if target = port_match_failed then
if SIG.graceful_shutdown_requested or else
nothing_left (num_builders)
then
run_complete := True;
builder_states (slave) := shutdown;
DPY.insert_history (assemble_HR (slave, 0,
DPY.action_shutdown));
else
if shutdown_recommended (available) then
builder_states (slave) := shutdown;
DPY.insert_history (assemble_HR (slave, 0,
DPY.action_shutdown));
available := available - 1;
end if;
end if;
else
lock_package (target);
instructions (slave) := target;
builder_states (slave) := tasked;
TIO.Put_Line (logs (total), CYC.elapsed_now & " [" &
JT.zeropad (Integer (slave), 2) & "] => " &
port_name (instructions (slave)));
if not curses_support then
TIO.Put_Line (CYC.elapsed_now & " => [" &
JT.zeropad (Integer (slave), 2) &
"] Kickoff " &
port_name (instructions (slave)));
end if;
end if;
end if;
when done_success | done_failure =>
all_idle := False;
if builder_states (slave) = done_success then
if curses_support then
DPY.insert_history
(assemble_HR (slave, instructions (slave),
DPY.action_success));
else
TIO.Put_Line (CYC.elapsed_now & " => [" &
JT.zeropad (Integer (slave), 2) &
"] " & CYC.elapsed_build (slave) &
" Success " &
port_name (instructions (slave)));
end if;
record_history_built (elapsed => CYC.elapsed_now,
slave_id => slave,
origin => port_name (instructions (slave)),
duration => CYC.elapsed_build (slave));
run_package_hook (pkg_success, instructions (slave));
cascade_successful_build (instructions (slave));
bld_counter (success) := bld_counter (success) + 1;
TIO.Put_Line (logs (success), CYC.elapsed_now & " " &
port_name (instructions (slave)));
TIO.Put_Line (logs (total), CYC.elapsed_now & " " &
port_name (instructions (slave)) &
" success");
else
TIO.Put_Line (logs (total), CYC.elapsed_now & " " &
port_name (instructions (slave)) &
" FAILED!");
cascade_failed_build (instructions (slave), cntskip, logs);
bld_counter (skipped) := bld_counter (skipped) + cntskip;
bld_counter (failure) := bld_counter (failure) + 1;
TIO.Put_Line (logs (total), CYC.elapsed_now & " " &
port_name (instructions (slave)) &
" failure skips:" & JT.int2str (cntskip));
TIO.Put_Line (logs (failure), CYC.elapsed_now & " " &
port_name (instructions (slave)) &
" (skipped" & cntskip'Img & ")");
if curses_support then
DPY.insert_history
(assemble_HR (slave, instructions (slave),
DPY.action_failure));
else
TIO.Put_Line (CYC.elapsed_now & " => [" &
JT.zeropad (Integer (slave), 2) &
"] " & CYC.elapsed_build (slave) &
" Failure " &
port_name (instructions (slave)));
end if;
case software_framework is
when ports_collection =>
record_history_failed
(elapsed => CYC.elapsed_now,
slave_id => slave,
origin => port_name (instructions (slave)),
duration => CYC.elapsed_build (slave),
die_phase => FPC.last_build_phase (slave),
skips => cntskip);
when pkgsrc =>
record_history_failed
(elapsed => CYC.elapsed_now,
slave_id => slave,
origin => port_name (instructions (slave)),
duration => CYC.elapsed_build (slave),
die_phase => NPS.last_build_phase (slave),
skips => cntskip);
end case;
run_package_hook (pkg_failure, instructions (slave));
end if;
instructions (slave) := port_match_failed;
if run_complete then
builder_states (slave) := shutdown;
DPY.insert_history (assemble_HR (slave, 0,
DPY.action_shutdown));
else
builder_states (slave) := idle;
end if;
end case;
exception
when earthquake : others => TIO.Put_Line
(logs (total), CYC.elapsed_now & " UNHANDLED EXCEPTION: " &
EX.Exception_Information (earthquake));
end;
end loop;
exit when run_complete and all_idle;
if cntcycle = cycle_count'Last then
cntcycle := cycle_count'First;
TIO.Flush (logs (success));
TIO.Flush (logs (failure));
TIO.Flush (logs (skipped));
TIO.Flush (logs (total));
if curses_support then
if cntrefresh = refresh_count'Last then
cntrefresh := refresh_count'First;
DPY.set_full_redraw_next_update;
else
cntrefresh := cntrefresh + 1;
end if;
sumdata.Initially := bld_counter (total);
sumdata.Built := bld_counter (success);
sumdata.Failed := bld_counter (failure);
sumdata.Ignored := bld_counter (ignored);
sumdata.Skipped := bld_counter (skipped);
sumdata.elapsed := CYC.elapsed_now;
sumdata.swap := get_swap_status;
sumdata.load := REP.Platform.get_instant_load;
sumdata.pkg_hour := hourly_build_rate;
sumdata.impulse := impulse_rate;
DPY.summarize (sumdata);
for b in builders'First .. num_builders loop
case software_framework is
when ports_collection =>
if builder_states (b) = shutdown then
DPY.update_builder (FPC.builder_status (b, True, False));
elsif builder_states (b) = idle then
DPY.update_builder (FPC.builder_status (b, False, True));
else
CYC.set_log_lines (b);
DPY.update_builder (FPC.builder_status (b));
end if;
when pkgsrc =>
if builder_states (b) = shutdown then
DPY.update_builder (NPS.builder_status (b, True, False));
elsif builder_states (b) = idle then
DPY.update_builder (NPS.builder_status (b, False, True));
else
CYC.set_log_lines (b);
DPY.update_builder (NPS.builder_status (b));
end if;
end case;
end loop;
DPY.refresh_builder_window;
DPY.refresh_history_window;
else
-- text mode support, periodic status reports
if cntalert = alert_count'Last then
cntalert := alert_count'First;
declare
Remaining : constant Integer := bld_counter (total) -
bld_counter (success) - bld_counter (failure) -
bld_counter (ignored) - bld_counter (skipped);
begin
TIO.Put_Line (CYC.elapsed_now & " => " &
" Left:" & Remaining'Img &
" Succ:" & bld_counter (success)'Img &
" Fail:" & bld_counter (failure)'Img &
" Skip:" & bld_counter (skipped)'Img &
" Ign:" & bld_counter (ignored)'Img);
end;
else
cntalert := cntalert + 1;
end if;
-- Update log lines every 4 seconds for the watchdog
if cntrefresh = refresh_count'Last then
cntrefresh := refresh_count'First;
for b in builders'First .. num_builders loop
if builder_states (b) /= shutdown and then
builder_states (b) /= idle
then
CYC.set_log_lines (b);
end if;
end loop;
else
cntrefresh := cntrefresh + 1;
end if;
end if;
-- Generate latest history file every 3 seconds.
-- With a poll period of 6 seconds, we need twice that frequency to avoid aliasing
-- Note that in text mode, the logs are updated every 4 seconds, so in this mode
-- the log lines will often be identical for a cycle.
if cntwww = www_count'Last then
cntwww := www_count'First;
write_history_json;
write_summary_json (active => True,
states => builder_states,
num_builders => num_builders,
num_history_files => history.segment);
else
cntwww := cntwww + 1;
end if;
else
cntcycle := cntcycle + 1;
end if;
delay 0.10;
end loop;
if PM.configuration.avec_ncurses and then curses_support
then
DPY.terminate_monitor;
end if;
write_history_json;
write_summary_json (active => False,
states => builder_states,
num_builders => num_builders,
num_history_files => history.segment);
run_hook (run_end, "PORTS_BUILT=" & JT.int2str (bld_counter (success)) &
" PORTS_FAILED=" & JT.int2str (bld_counter (failure)) &
" PORTS_IGNORED=" & JT.int2str (bld_counter (ignored)) &
" PORTS_SKIPPED=" & JT.int2str (bld_counter (skipped)));
end parallel_bulk_run;
--------------------
-- lock_package --
--------------------
procedure lock_package (id : port_id) is
begin
if id /= port_match_failed then
all_ports (id).work_locked := True;
end if;
end lock_package;
----------------------------
-- cascade_failed_build --
----------------------------
procedure cascade_failed_build (id : port_id; numskipped : out Natural;
logs : dim_handlers)
is
purged : PortScan.port_id;
culprit : constant String := port_name (id);
begin
numskipped := 0;
loop
purged := skip_next_reverse_dependency (id);
exit when purged = port_match_failed;
if skip_verified (purged) then
numskipped := numskipped + 1;
TIO.Put_Line (logs (total), " Skipped: " &
port_name (purged));
TIO.Put_Line (logs (skipped),
port_name (purged) & " by " & culprit);
DPY.insert_history (assemble_HR (1, purged, DPY.action_skipped));
record_history_skipped (elapsed => CYC.elapsed_now,
origin => port_name (purged),
reason => culprit);
run_package_hook (pkg_skipped, purged);
end if;
end loop;
unlist_port (id);
end cascade_failed_build;
--------------------------------
-- cascade_successful_build --
--------------------------------
procedure cascade_successful_build (id : port_id)
is
procedure cycle (cursor : block_crate.Cursor);
procedure cycle (cursor : block_crate.Cursor)
is
target : constant port_index := block_crate.Element (cursor);
begin
if all_ports (target).blocked_by.Contains (Key => id) then
all_ports (target).blocked_by.Delete (Key => id);
else
raise seek_failure
with port_name (target) & " was expected to be blocked by " &
port_name (id);
end if;
end cycle;
begin
all_ports (id).blocks.Iterate (cycle'Access);
delete_rank (id);
end cascade_successful_build;
--------------------------
-- top_buildable_port --
--------------------------
function top_buildable_port return port_id
is
list_len : constant Integer := Integer (rank_queue.Length);
cursor : ranking_crate.Cursor;
QR : queue_record;
result : port_id := port_match_failed;
begin
if list_len = 0 then
return result;
end if;
cursor := rank_queue.First;
for k in 1 .. list_len loop
QR := ranking_crate.Element (Position => cursor);
if not all_ports (QR.ap_index).work_locked and then
all_ports (QR.ap_index).blocked_by.Is_Empty
then
result := QR.ap_index;
exit;
end if;
cursor := ranking_crate.Next (Position => cursor);
end loop;
if SIG.graceful_shutdown_requested then
return port_match_failed;
end if;
return result;
end top_buildable_port;
----------------------------
-- shutdown_recommended --
----------------------------
function shutdown_recommended (active_builders : Positive) return Boolean
is
list_len : constant Natural := Integer (rank_queue.Length);
list_max : constant Positive := 2 * active_builders;
num_wait : Natural := 0;
cursor : ranking_crate.Cursor;
QR : queue_record;
begin
if list_len = 0 or else list_len >= list_max then
return False;
end if;
cursor := rank_queue.First;
for k in 1 .. list_len loop
QR := ranking_crate.Element (Position => cursor);
if not all_ports (QR.ap_index).work_locked then
num_wait := num_wait + 1;
if num_wait >= active_builders then
return False;
end if;
end if;
cursor := ranking_crate.Next (Position => cursor);
end loop;
return True;
end shutdown_recommended;
--------------------
-- nothing_left --
--------------------
function nothing_left (num_builders : builders) return Boolean
is
list_len : constant Integer := Integer (rank_queue.Length);
begin
return list_len = 0;
end nothing_left;
------------------
-- rank_arrow --
------------------
function rank_arrow (id : port_id) return ranking_crate.Cursor
is
rscore : constant port_index := all_ports (id).reverse_score;
seek_target : constant queue_record := (ap_index => id,
reverse_score => rscore);
begin
return rank_queue.Find (seek_target);
end rank_arrow;
-------------------
-- delete_rank --
-------------------
procedure delete_rank (id : port_id)
is
rank_cursor : ranking_crate.Cursor := rank_arrow (id);
use type ranking_crate.Cursor;
begin
if rank_cursor /= ranking_crate.No_Element then
rank_queue.Delete (Position => rank_cursor);
end if;
end delete_rank;
--------------------
-- still_ranked --
--------------------
function still_ranked (id : port_id) return Boolean
is
rank_cursor : ranking_crate.Cursor := rank_arrow (id);
use type ranking_crate.Cursor;
begin
return rank_cursor /= ranking_crate.No_Element;
end still_ranked;
------------------------
-- integrity_intact --
------------------------
function integrity_intact return Boolean
is
procedure check_dep (cursor : block_crate.Cursor);
procedure check_rank (cursor : ranking_crate.Cursor);
intact : Boolean := True;
procedure check_dep (cursor : block_crate.Cursor)
is
did : constant port_index := block_crate.Element (cursor);
begin
if not still_ranked (did) then
intact := False;
end if;
end check_dep;
procedure check_rank (cursor : ranking_crate.Cursor)
is
QR : constant queue_record := ranking_crate.Element (cursor);
begin
if intact then
all_ports (QR.ap_index).blocked_by.Iterate (check_dep'Access);
end if;
end check_rank;
begin
rank_queue.Iterate (check_rank'Access);
return intact;
end integrity_intact;
---------------------
-- skip_verified --
---------------------
function skip_verified (id : port_id) return Boolean is
begin
if id = port_match_failed then
return False;
end if;
return not all_ports (id).unlist_failed;
end skip_verified;
--------------------
-- queue_length --
--------------------
function queue_length return Integer is
begin
return Integer (rank_queue.Length);
end queue_length;
-------------------
-- unlist_port --
-------------------
procedure unlist_port (id : port_id) is
begin
if id = port_match_failed then
return;
end if;
if still_ranked (id) then
delete_rank (id);
else
-- don't raise exception. Since we don't prune all_reverse as
-- we go, there's no guarantee the reverse dependency hasn't already
-- been removed (e.g. when it is a common reverse dep)
all_ports (id).unlist_failed := True;
end if;
end unlist_port;
------------------------------------
-- skip_next_reverse_dependency --
------------------------------------
function skip_next_reverse_dependency (pinnacle : port_id) return port_id
is
rev_cursor : block_crate.Cursor;
next_dep : port_index;
begin
if all_ports (pinnacle).all_reverse.Is_Empty then
return port_match_failed;
end if;
rev_cursor := all_ports (pinnacle).all_reverse.First;
next_dep := block_crate.Element (rev_cursor);
unlist_port (id => next_dep);
all_ports (pinnacle).all_reverse.Delete (rev_cursor);
return next_dep;
end skip_next_reverse_dependency;
---------------------
-- ignore_reason --
---------------------
function ignore_reason (id : port_id) return String is
begin
if id = port_match_failed or else
id > last_port
then
return "Invalid port ID";
end if;
return JT.USS (all_ports (id).ignore_reason);
end ignore_reason;
-------------------------
-- next_ignored_port --
-------------------------
function next_ignored_port return port_id
is
list_len : constant Integer := Integer (rank_queue.Length);
cursor : ranking_crate.Cursor;
QR : queue_record;
result : port_id := port_match_failed;
begin
if list_len = 0 then
return result;
end if;
cursor := rank_queue.First;
for k in 1 .. list_len loop
QR := ranking_crate.Element (Position => cursor);
if all_ports (QR.ap_index).ignored then
result := QR.ap_index;
DPY.insert_history (assemble_HR (1, QR.ap_index,
DPY.action_ignored));
run_package_hook (pkg_ignored, QR.ap_index);
exit;
end if;
cursor := ranking_crate.Next (Position => cursor);
end loop;
return result;
end next_ignored_port;
-----------------
-- port_name --
-----------------
function port_name (id : port_id) return String is
begin
if id = port_match_failed or else
id > last_port
then
return "Invalid port ID";
end if;
return get_catport (all_ports (id));
end port_name;
-----------------------
-- get_swap_status --
-----------------------
function get_swap_status return Float
is
type memtype is mod 2**64;
command : String := REP.Platform.swapinfo_command;
status : Integer;
comres : JT.Text;
blocks_total : memtype := 0;
blocks_used : memtype := 0;
begin
comres := Unix.piped_command (command, status);
if status /= 0 then
return 200.0; -- [ERROR] Signal to set swap display to "N/A"
end if;
-- Throw first line away, e.g "Device 1K-blocks Used Avail ..."
-- Distinguishes platforms though:
-- Net/Free/Dragon start with "Device"
-- Linux starts with "NAME"
-- Solaris starts with "swapfile"
-- On FreeBSD (DragonFly too?), when multiple swap used, ignore line starting "Total"
declare
command_result : String := JT.USS (comres);
markers : JT.Line_Markers;
line_present : Boolean;
begin
JT.initialize_markers (command_result, markers);
-- Throw first line away (valid for all platforms
line_present := JT.next_line_present (command_result, markers);
if line_present then
declare
line : String := JT.extract_line (command_result, markers);
begin
null;
end;
else
return 200.0; -- [ERROR] Signal to set swap display to "N/A"
end if;
loop
exit when not JT.next_line_present (command_result, markers);
declare
line : constant String :=
JT.strip_excessive_spaces (JT.extract_line (command_result, markers));
begin
if JT.specific_field (line, 1) /= "Total" then
blocks_total := blocks_total + memtype'Value (JT.specific_field (line, 2));
blocks_used := blocks_used + memtype'Value (JT.specific_field (line, 3));
end if;
exception
when Constraint_Error =>
return 200.0; -- [ERROR] Signal to set swap display to "N/A"
end;
end loop;
end;
if blocks_total = 0 then
return 200.0; -- Signal to set swap display to "N/A"
else
return 100.0 * Float (blocks_used) / Float (blocks_total);
end if;
end get_swap_status;
-------------------------
-- hourly_build_rate --
-------------------------
function hourly_build_rate return Natural
is
pkg_that_count : constant Natural := bld_counter (success) +
bld_counter (failure);
begin
return CYC.get_packages_per_hour (pkg_that_count, start_time);
end hourly_build_rate;
--------------------
-- impulse_rate --
--------------------
function impulse_rate return Natural
is
pkg_that_count : constant Natural := bld_counter (success) +
bld_counter (failure);
pkg_diff : Natural;
result : Natural;
begin
if impulse_counter = impulse_range'Last then
impulse_counter := impulse_range'First;
else
impulse_counter := impulse_counter + 1;
end if;
if impulse_data (impulse_counter).virgin then
impulse_data (impulse_counter).hack := CAL.Clock;
impulse_data (impulse_counter).packages := pkg_that_count;
impulse_data (impulse_counter).virgin := False;
return CYC.get_packages_per_hour (pkg_that_count, start_time);
end if;
pkg_diff := pkg_that_count - impulse_data (impulse_counter).packages;
result := CYC.get_packages_per_hour
(packages_done => pkg_diff,
from_when => impulse_data (impulse_counter).hack);
impulse_data (impulse_counter).hack := CAL.Clock;
impulse_data (impulse_counter).packages := pkg_that_count;
return result;
exception
when others => return 0;
end impulse_rate;
-------------------
-- assemble_HR --
-------------------
function assemble_HR (slave : builders; pid : port_id;
action : DPY.history_action)
return DPY.history_rec
is
HR : DPY.history_rec;
HOLast : constant Natural := DPY.history_origin'Last;
catport : String := port_name (pid);
hyphens : constant DPY.history_elapsed := "--:--:--";
begin
HR.id := slave;
HR.slavid := JT.zeropad (Integer (slave), 2);
HR.established := True;
HR.action := action;
HR.origin := (others => ' ');
HR.run_elapsed := CYC.elapsed_now;
if action = DPY.action_shutdown then
HR.pkg_elapsed := hyphens;
else
if action = DPY.action_skipped or else
action = DPY.action_ignored
then
HR.pkg_elapsed := hyphens;
else
HR.pkg_elapsed := CYC.elapsed_build (slave);
end if;
if catport'Last > HOLast then
HR.origin (1 .. HOLast - 1) := catport (1 .. HOLast - 1);
HR.origin (HOLast) := LAT.Asterisk;
else
HR.origin (1 .. catport'Last) := catport;
end if;
end if;
return HR;
end assemble_HR;
------------------------
-- initialize_hooks --
------------------------
procedure initialize_hooks is
begin
for hook in hook_type'Range loop
declare
script : constant String := JT.USS (hook_location (hook));
begin
active_hook (hook) := AD.Exists (script) and then
REP.Platform.file_is_executable (script);
end;
end loop;
end initialize_hooks;
----------------------
-- run_start_hook --
----------------------
procedure run_start_hook is
begin
run_hook (run_start, "PORTS_QUEUED=" & JT.int2str (queue_length) & " ");
end run_start_hook;
----------------
-- run_hook --
----------------
procedure run_hook (hook : hook_type; envvar_list : String)
is
function nvpair (name : String; value : JT.Text) return String;
function nvpair (name : String; value : JT.Text) return String is
begin
return name & LAT.Equals_Sign & LAT.Quotation &
JT.USS (value) & LAT.Quotation & LAT.Space;
end nvpair;
common_env : constant String :=
nvpair ("PROFILE", PM.configuration.profile) &
nvpair ("DIR_PACKAGES", PM.configuration.dir_packages) &
nvpair ("DIR_REPOSITORY", PM.configuration.dir_repository) &
nvpair ("DIR_PORTS", PM.configuration.dir_portsdir) &
nvpair ("DIR_OPTIONS", PM.configuration.dir_options) &
nvpair ("DIR_DISTFILES", PM.configuration.dir_distfiles) &
nvpair ("DIR_LOGS", PM.configuration.dir_logs) &
nvpair ("DIR_BUILDBASE", PM.configuration.dir_buildbase);
-- The follow command works on every platform
command : constant String := "/usr/bin/env -i " & common_env &
envvar_list & " " & JT.USS (hook_location (hook));
begin
if not active_hook (hook) then
return;
end if;
if Unix.external_command (command) then
null;
end if;
end run_hook;
------------------------
-- run_package_hook --
------------------------
procedure run_package_hook (hook : hook_type; id : port_id)
is
pn : constant String := port_name (id);
tail : String := " ORIGIN=" & JT.part_1 (pn, "@") &
" FLAVOR=" & JT.part_2 (pn, "@") &
" PKGNAME=" & package_name (id) & " ";
begin
case hook is
when pkg_success => run_hook (hook, "RESULT=success" & tail);
when pkg_failure => run_hook (hook, "RESULT=failure" & tail);
when pkg_ignored => run_hook (hook, "RESULT=ignored" & tail);
when pkg_skipped => run_hook (hook, "RESULT=skipped" & tail);
when others => null;
end case;
end run_package_hook;
----------------------------
-- run_hook_after_build --
----------------------------
procedure run_hook_after_build (built : Boolean; id : port_id) is
begin
if built then
run_package_hook (pkg_success, id);
else
run_package_hook (pkg_failure, id);
end if;
end run_hook_after_build;
--------------------
-- package_name --
--------------------
function package_name (id : port_id) return String is
begin
if id = port_match_failed or else
id > last_port
then
return "Invalid port ID";
end if;
declare
fullname : constant String := JT.USS (all_ports (id).package_name);
begin
return fullname (1 .. fullname'Length - 4);
end;
end package_name;
-----------------------------
-- initialize_web_report --
-----------------------------
procedure initialize_web_report (num_builders : builders) is
idle_slaves : constant dim_builder_state := (others => idle);
reportdir : constant String := JT.USS (PM.configuration.dir_logs) & "/Report";
sharedir : constant String := host_localbase & "/share/synth";
begin
AD.Create_Path (reportdir);
AD.Copy_File (sharedir & "/synth.png", reportdir & "/synth.png");
AD.Copy_File (sharedir & "/favicon.png", reportdir & "/favicon.png");
AD.Copy_File (sharedir & "/progress.js", reportdir & "/progress.js");
AD.Copy_File (sharedir & "/progress.css", reportdir & "/progress.css");
AD.Copy_File (sharedir & "/progress.html", reportdir & "/index.html");
write_summary_json (active => True,
states => idle_slaves,
num_builders => num_builders,
num_history_files => 0);
end initialize_web_report;
-----------------------------------------
-- delete_existing_web_history_files --
-----------------------------------------
procedure delete_existing_web_history_files
is
search : AD.Search_Type;
dirent : AD.Directory_Entry_Type;
pattern : constant String := "*_history.json";
filter : constant AD.Filter_Type := (AD.Ordinary_File => True, others => False);
reportdir : constant String := JT.USS (PM.configuration.dir_logs) & "/Report";
begin
if not AD.Exists (reportdir) then
return;
end if;
AD.Start_Search (Search => search,
Directory => reportdir,
Pattern => pattern,
Filter => filter);
while AD.More_Entries (search) loop
AD.Get_Next_Entry (search, dirent);
AD.Delete_File (reportdir & "/" & AD.Simple_Name (dirent));
end loop;
exception
when AD.Name_Error => null;
end delete_existing_web_history_files;
-----------------------
-- nv (2 versions) --
-----------------------
function nv (name, value : String) return String is
begin
return ASCII.Quotation & name & ASCII.Quotation & ASCII.Colon &
ASCII.Quotation & value & ASCII.Quotation;
end nv;
function nv (name : String; value : Integer) return String is
begin
return ASCII.Quotation & name & ASCII.Quotation & ASCII.Colon & JT.int2str (value);
end nv;
--------------------------
-- write_summary_json --
--------------------------
procedure write_summary_json
(active : Boolean;
states : dim_builder_state;
num_builders : builders;
num_history_files : Natural)
is
function TF (value : Boolean) return Natural;
function TF (value : Boolean) return Natural is
begin
if value then
return 1;
else
return 0;
end if;
end TF;
jsonfile : TIO.File_Type;
filename : constant String := JT.USS (PM.configuration.dir_logs) & "/Report/summary.json";
leftover : constant Integer := bld_counter (total) - bld_counter (success) -
bld_counter (failure) - bld_counter (ignored) - bld_counter (skipped);
slave : DPY.builder_rec;
begin
-- Try to defend malicious symlink: https://en.wikipedia.org/wiki/Symlink_race
if AD.Exists (filename) then
AD.Delete_File (filename);
end if;
TIO.Create (File => jsonfile,
Mode => TIO.Out_File,
Name => filename);
TIO.Put (jsonfile, "{" & ASCII.LF &
" " & nv ("profile", JT.USS (PM.configuration.profile)) & ASCII.LF);
TIO.Put
(jsonfile,
" ," & nv ("kickoff", timestamp (start_time, True)) & ASCII.LF &
" ," & nv ("kfiles", num_history_files) & ASCII.LF &
" ," & nv ("active", TF (active)) & ASCII.LF &
" ," & ASCII.Quotation & "stats" & ASCII.Quotation & ASCII.Colon & "{" & ASCII.LF);
TIO.Put
(jsonfile,
" " & nv ("queued", bld_counter (total)) & ASCII.LF &
" ," & nv ("built", bld_counter (success)) & ASCII.LF &
" ," & nv ("failed", bld_counter (failure)) & ASCII.LF &
" ," & nv ("ignored", bld_counter (ignored)) & ASCII.LF &
" ," & nv ("skipped", bld_counter (skipped)) & ASCII.LF &
" ," & nv ("remains", leftover) & ASCII.LF &
" ," & nv ("elapsed", CYC.elapsed_now) & ASCII.LF &
" ," & nv ("pkghour", hourly_build_rate) & ASCII.LF &
" ," & nv ("impulse", impulse_rate) & ASCII.LF &
" ," & nv ("swapinfo", DPY.fmtpc (get_swap_status, True)) & ASCII.LF &
" ," & nv ("load", DPY.fmtload (REP.Platform.get_instant_load)) & ASCII.LF &
" }" & ASCII.LF &
" ," & ASCII.Quotation & "builders" & ASCII.Quotation & ASCII.Colon & "[" & ASCII.LF);
for b in builders'First .. num_builders loop
case software_framework is
when ports_collection =>
if states (b) = shutdown then
slave := FPC.builder_status (b, True, False);
elsif states (b) = idle then
slave := FPC.builder_status (b, False, True);
else
slave := FPC.builder_status (b);
end if;
when pkgsrc =>
if states (b) = shutdown then
slave := NPS.builder_status (b, True, False);
elsif states (b) = idle then
slave := NPS.builder_status (b, False, True);
else
slave := NPS.builder_status (b);
end if;
end case;
if b = builders'First then
TIO.Put (jsonfile, " {" & ASCII.LF);
else
TIO.Put (jsonfile, " ,{" & ASCII.LF);
end if;
TIO.Put
(jsonfile,
" " & nv ("ID", slave.slavid) & ASCII.LF &
" ," & nv ("elapsed", JT.trim (slave.Elapsed)) & ASCII.LF &
" ," & nv ("phase", JT.trim (slave.phase)) & ASCII.LF &
" ," & nv ("origin", JT.trim (slave.origin)) & ASCII.LF &
" ," & nv ("lines", JT.trim (slave.LLines)) & ASCII.LF &
" }" & ASCII.LF);
end loop;
TIO.Put (jsonfile, " ]" & ASCII.LF & "}" & ASCII.LF);
TIO.Close (jsonfile);
exception
when others =>
if TIO.Is_Open (jsonfile) then
TIO.Close (jsonfile);
end if;
end write_summary_json;
----------------------------
-- write_history_json --
----------------------------
procedure write_history_json
is
jsonfile : TIO.File_Type;
filename : constant String := JT.USS (PM.configuration.dir_logs) &
"/Report/" & JT.zeropad (history.segment, 2) & "_history.json";
begin
if history.segment_count = 0 then
return;
end if;
if history.last_written = history.last_index then
return;
end if;
TIO.Create (File => jsonfile,
Mode => TIO.Out_File,
Name => filename);
TIO.Put (jsonfile, history.content (1 .. history.last_index));
TIO.Put (jsonfile, "]");
TIO.Close (jsonfile);
history.last_written := history.last_index;
exception
when others =>
if TIO.Is_Open (jsonfile) then
TIO.Close (jsonfile);
end if;
end write_history_json;
----------------------------
-- assimulate_substring --
----------------------------
procedure assimulate_substring
(history : in out progress_history;
substring : String)
is
first : constant Positive := history.last_index + 1;
last : constant Positive := history.last_index + substring'Length;
begin
-- silently fail (this shouldn't be practically possible)
if last < kfile_content'Last then
history.content (first .. last) := substring;
end if;
history.last_index := last;
end assimulate_substring;
----------------------------
-- record_history_built --
----------------------------
procedure handle_first_history_entry is
begin
if history.segment_count = 1 then
assimulate_substring (history, "[" & ASCII.LF & " {" & ASCII.LF);
else
assimulate_substring (history, " ,{" & ASCII.LF);
end if;
end handle_first_history_entry;
----------------------------
-- record_history_built --
----------------------------
procedure record_history_built
(elapsed : String;
slave_id : builders;
origin : String;
duration : String)
is
ID : constant String := JT.zeropad (Integer (slave_id), 2);
begin
history.log_entry := history.log_entry + 1;
history.segment_count := history.segment_count + 1;
handle_first_history_entry;
assimulate_substring (history, " " & nv ("entry", history.log_entry) & ASCII.LF);
assimulate_substring (history, " ," & nv ("elapsed", elapsed) & ASCII.LF);
assimulate_substring (history, " ," & nv ("ID", ID) & ASCII.LF);
assimulate_substring (history, " ," & nv ("result", "built") & ASCII.LF);
assimulate_substring (history, " ," & nv ("origin", origin) & ASCII.LF);
assimulate_substring (history, " ," & nv ("info", "") & ASCII.LF);
assimulate_substring (history, " ," & nv ("duration", duration) & ASCII.LF);
assimulate_substring (history, " }" & ASCII.LF);
check_history_segment_capacity;
end record_history_built;
-----------------------------
-- record_history_failed --
-----------------------------
procedure record_history_failed
(elapsed : String;
slave_id : builders;
origin : String;
duration : String;
die_phase : String;
skips : Natural)
is
info : constant String := die_phase & ":" & JT.int2str (skips);
ID : constant String := JT.zeropad (Integer (slave_id), 2);
begin
history.log_entry := history.log_entry + 1;
history.segment_count := history.segment_count + 1;
handle_first_history_entry;
assimulate_substring (history, " " & nv ("entry", history.log_entry) & ASCII.LF);
assimulate_substring (history, " ," & nv ("elapsed", elapsed) & ASCII.LF);
assimulate_substring (history, " ," & nv ("ID", ID) & ASCII.LF);
assimulate_substring (history, " ," & nv ("result", "failed") & ASCII.LF);
assimulate_substring (history, " ," & nv ("origin", origin) & ASCII.LF);
assimulate_substring (history, " ," & nv ("info", info) & ASCII.LF);
assimulate_substring (history, " ," & nv ("duration", duration) & ASCII.LF);
assimulate_substring (history, " }" & ASCII.LF);
check_history_segment_capacity;
end record_history_failed;
------------------------------
-- record_history_ignored --
------------------------------
procedure record_history_ignored
(elapsed : String;
origin : String;
reason : String;
skips : Natural)
is
cleantxt : constant String := JT.strip_control (reason);
info : constant String :=
JT.replace_char
(JT.replace_char (cleantxt, ASCII.Quotation, " "), ASCII.Back_Slash, "\")
& ":|:" & JT.int2str (skips);
begin
history.log_entry := history.log_entry + 1;
history.segment_count := history.segment_count + 1;
handle_first_history_entry;
assimulate_substring (history, " " & nv ("entry", history.log_entry) & ASCII.LF);
assimulate_substring (history, " ," & nv ("elapsed", elapsed) & ASCII.LF);
assimulate_substring (history, " ," & nv ("ID", "--") & ASCII.LF);
assimulate_substring (history, " ," & nv ("result", "ignored") & ASCII.LF);
assimulate_substring (history, " ," & nv ("origin", origin) & ASCII.LF);
assimulate_substring (history, " ," & nv ("info", info) & ASCII.LF);
assimulate_substring (history, " ," & nv ("duration", "--:--:--") & ASCII.LF);
assimulate_substring (history, " }" & ASCII.LF);
check_history_segment_capacity;
end record_history_ignored;
------------------------------
-- record_history_skipped --
------------------------------
procedure record_history_skipped
(elapsed : String;
origin : String;
reason : String)
is
begin
history.log_entry := history.log_entry + 1;
history.segment_count := history.segment_count + 1;
handle_first_history_entry;
assimulate_substring (history, " " & nv ("entry", history.log_entry) & ASCII.LF);
assimulate_substring (history, " ," & nv ("elapsed", elapsed) & ASCII.LF);
assimulate_substring (history, " ," & nv ("ID", "--") & ASCII.LF);
assimulate_substring (history, " ," & nv ("result", "skipped") & ASCII.LF);
assimulate_substring (history, " ," & nv ("origin", origin) & ASCII.LF);
assimulate_substring (history, " ," & nv ("info", reason) & ASCII.LF);
assimulate_substring (history, " ," & nv ("duration", "--:--:--") & ASCII.LF);
assimulate_substring (history, " }" & ASCII.LF);
check_history_segment_capacity;
end record_history_skipped;
--------------------------------------
-- check_history_segment_capacity --
--------------------------------------
procedure check_history_segment_capacity is
begin
if history.segment_count = 1 then
history.segment := history.segment + 1;
return;
end if;
if history.segment_count < kfile_units_limit then
return;
end if;
write_history_json;
history.last_index := 0;
history.last_written := 0;
history.segment_count := 0;
end check_history_segment_capacity;
end PortScan.Ops;
|
------------------------------------------------------------------------------
-- --
-- Copyright (C) 2018, AdaCore --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions are --
-- met: --
-- 1. Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- 2. Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in --
-- the documentation and/or other materials provided with the --
-- distribution. --
-- 3. Neither the name of the copyright holder nor the names of its --
-- contributors may be used to endorse or promote products derived --
-- from this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT --
-- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, --
-- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY --
-- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT --
-- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE --
-- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
package body FE310.PWM is
-----------
-- Count --
-----------
function Count (This : PWM_Device) return Count_Value
is (This.Periph.COUNT.CNT);
---------------
-- Set_Count --
---------------
procedure Set_Count (This : in out PWM_Device;
Value : Count_Value)
is
begin
This.Periph.COUNT.CNT := Value;
end Set_Count;
----------------------
-- Enable_Continous --
----------------------
procedure Enable_Continous (This : in out PWM_Device) is
begin
This.Periph.CONFIG.ENALWAYS := True;
end Enable_Continous;
---------------------
-- Enable_One_Shot --
---------------------
procedure Enable_One_Shot (This : in out PWM_Device) is
begin
This.Periph.CONFIG.ENONESHOT := True;
end Enable_One_Shot;
-------------
-- Disable --
-------------
procedure Disable (This : in out PWM_Device) is
begin
This.Periph.CONFIG.ENONESHOT := False;
This.Periph.CONFIG.ENALWAYS := False;
end Disable;
--------------------
-- Scaled_Counter --
--------------------
function Scaled_Counter
(This : PWM_Device)
return Scaled_Value
is (This.Periph.SCALE_COUNT.CNT);
---------------
-- Configure --
---------------
procedure Configure
(This : in out PWM_Device;
Scale : FE310_SVD.PWM.CONFIG_SCALE_Field;
Sticky : Boolean;
Reset_To_Zero : Boolean;
Deglitch : Boolean)
is
begin
This.Periph.CONFIG.SCALE := Scale;
This.Periph.CONFIG.STICKY := Sticky;
This.Periph.CONFIG.ZEROCMP := Reset_To_Zero;
This.Periph.CONFIG.DEGLITCH := Deglitch;
end Configure;
---------------
-- Configure --
---------------
procedure Configure
(This : in out PWM_Device;
ID : Comparator_ID;
Compare_Center : Boolean;
Compare_Gang : Boolean)
is
begin
This.Periph.CONFIG.CMP_CENTER.Arr (ID) := Compare_Center;
This.Periph.CONFIG.CMP_GANG.Arr (ID) := Compare_Gang;
end Configure;
-----------------
-- Set_Compare --
-----------------
procedure Set_Compare
(This : in out PWM_Device;
ID : Comparator_ID;
Value : Compare_Value)
is
begin
case ID is
when 0 => This.Periph.COMPARE0.COMPARE := Value;
when 1 => This.Periph.COMPARE1.COMPARE := Value;
when 2 => This.Periph.COMPARE2.COMPARE := Value;
when 3 => This.Periph.COMPARE3.COMPARE := Value;
end case;
end Set_Compare;
-------------
-- Compare --
-------------
function Compare
(This : PWM_Device;
ID : Comparator_ID)
return Compare_Value
is (case ID is
when 0 => This.Periph.COMPARE0.COMPARE,
when 1 => This.Periph.COMPARE1.COMPARE,
when 2 => This.Periph.COMPARE2.COMPARE,
when 3 => This.Periph.COMPARE3.COMPARE);
-----------------------
-- Interrupt_Pending --
-----------------------
function Interrupt_Pending
(This : PWM_Device;
ID : Comparator_ID)
return Boolean
is (This.Periph.CONFIG.CMP_IP.Arr (ID));
end FE310.PWM;
|
-- Copyright (c) 2019 Maxim Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-- License-Filename: LICENSE
-------------------------------------------------------------
with Slim.Fonts;
with Slim.Menu_Models;
limited with Slim.Players.Displays;
package Slim.Menu_Views is
type Menu_View is tagged private;
procedure Initialize
(Self : in out Menu_View'Class;
Menu : Slim.Menu_Models.Menu_Model_Access;
Font : Slim.Fonts.Font_Access);
procedure Up (Self : in out Menu_View'Class);
procedure Down (Self : in out Menu_View'Class);
procedure Enter (Self : in out Menu_View'Class);
procedure Back (Self : in out Menu_View'Class);
procedure Play (Self : in out Menu_View'Class);
procedure Draw
(Self : in out Menu_View'Class;
Display : in out Slim.Players.Displays.Display);
private
type Menu_View is tagged record
Font : Slim.Fonts.Font_Access;
Menu : Slim.Menu_Models.Menu_Model_Access;
Current_Menu : Slim.Menu_Models.Menu_Path;
end record;
end Slim.Menu_Views;
|
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE boost_serialization>
<boost_serialization signature="serialization::archive" version="17">
<syndb class_id="0" tracking_level="0" version="0">
<userIPLatency>-1</userIPLatency>
<userIPName/>
<cdfg class_id="1" tracking_level="1" version="0" object_id="_0">
<name>broadcaster_and_mac_request</name>
<module_structure>Pipeline</module_structure>
<ret_bitwidth>0</ret_bitwidth>
<ports class_id="2" tracking_level="0" version="0">
<count>9</count>
<item_version>0</item_version>
<item class_id="3" tracking_level="1" version="0" object_id="_1">
<Value class_id="4" tracking_level="0" version="0">
<Obj class_id="5" tracking_level="0" version="0">
<type>1</type>
<id>1</id>
<name>dataIn_V_data_V</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<contextNormFuncName/>
<inlineStackInfo class_id="6" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<control/>
<opType/>
<implIndex/>
<coreName/>
<isStorage>0</isStorage>
<storageDepth>0</storageDepth>
<coreId>0</coreId>
<rtlModuleName/>
</Obj>
<bitwidth>512</bitwidth>
</Value>
<direction>0</direction>
<if_type>0</if_type>
<array_size>0</array_size>
<bit_vecs class_id="7" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_2">
<Value>
<Obj>
<type>1</type>
<id>2</id>
<name>dataIn_V_keep_V</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<contextNormFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<control/>
<opType/>
<implIndex/>
<coreName/>
<isStorage>0</isStorage>
<storageDepth>0</storageDepth>
<coreId>0</coreId>
<rtlModuleName/>
</Obj>
<bitwidth>64</bitwidth>
</Value>
<direction>0</direction>
<if_type>0</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_3">
<Value>
<Obj>
<type>1</type>
<id>3</id>
<name>dataIn_V_strb_V</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<contextNormFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<control/>
<opType/>
<implIndex/>
<coreName/>
<isStorage>0</isStorage>
<storageDepth>0</storageDepth>
<coreId>0</coreId>
<rtlModuleName/>
</Obj>
<bitwidth>64</bitwidth>
</Value>
<direction>0</direction>
<if_type>0</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_4">
<Value>
<Obj>
<type>1</type>
<id>4</id>
<name>dataIn_V_last_V</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<contextNormFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<control/>
<opType/>
<implIndex/>
<coreName/>
<isStorage>0</isStorage>
<storageDepth>0</storageDepth>
<coreId>176</coreId>
<rtlModuleName/>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<direction>0</direction>
<if_type>0</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_5">
<Value>
<Obj>
<type>1</type>
<id>5</id>
<name>arpTableRequest_V</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<contextNormFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<control/>
<opType/>
<implIndex/>
<coreName/>
<isStorage>0</isStorage>
<storageDepth>0</storageDepth>
<coreId>0</coreId>
<rtlModuleName/>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<direction>1</direction>
<if_type>0</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_6">
<Value>
<Obj>
<type>1</type>
<id>6</id>
<name>regSubNetMask</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<contextNormFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<control/>
<opType/>
<implIndex/>
<coreName/>
<isStorage>0</isStorage>
<storageDepth>0</storageDepth>
<coreId>2836791600</coreId>
<rtlModuleName/>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<direction>0</direction>
<if_type>0</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_7">
<Value>
<Obj>
<type>1</type>
<id>7</id>
<name>regDefaultGateway</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<contextNormFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<control/>
<opType/>
<implIndex/>
<coreName/>
<isStorage>0</isStorage>
<storageDepth>0</storageDepth>
<coreId>2836758608</coreId>
<rtlModuleName/>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<direction>0</direction>
<if_type>0</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_8">
<Value>
<Obj>
<type>1</type>
<id>9</id>
<name>ip_header_out</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<contextNormFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<control/>
<opType/>
<implIndex/>
<coreName>FIFO</coreName>
<isStorage>0</isStorage>
<storageDepth>0</storageDepth>
<coreId>30</coreId>
<rtlModuleName/>
</Obj>
<bitwidth>1024</bitwidth>
</Value>
<direction>1</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_9">
<Value>
<Obj>
<type>1</type>
<id>10</id>
<name>no_ip_header_out</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<contextNormFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<control/>
<opType/>
<implIndex/>
<coreName>FIFO</coreName>
<isStorage>0</isStorage>
<storageDepth>0</storageDepth>
<coreId>1768713801</coreId>
<rtlModuleName/>
</Obj>
<bitwidth>1024</bitwidth>
</Value>
<direction>1</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
</ports>
<nodes class_id="8" tracking_level="0" version="0">
<count>41</count>
<item_version>0</item_version>
<item class_id="9" tracking_level="1" version="0" object_id="_10">
<Value>
<Obj>
<type>0</type>
<id>22</id>
<name>bmr_fsm_state_load</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<contextNormFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<control/>
<opType/>
<implIndex/>
<coreName/>
<isStorage>0</isStorage>
<storageDepth>0</storageDepth>
<coreId>236</coreId>
<rtlModuleName/>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>78</item>
</oprand_edges>
<opcode>load</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>1</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_11">
<Value>
<Obj>
<type>0</type>
<id>23</id>
<name>tmp</name>
<fileName>/tools/Xilinx/Vitis_HLS/2021.1/common/technology/autopilot/ap_axi_sdata.h</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>267</lineNumber>
<contextFuncName>empty</contextFuncName>
<contextNormFuncName>empty</contextNormFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item class_id="11" tracking_level="0" version="0">
<first>/home/ubuntu/xup_vitis_network_example/NetLayers/100G-fpga-network-stack-core/synthesis_results_HMB</first>
<second class_id="12" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="13" tracking_level="0" version="0">
<first class_id="14" tracking_level="0" version="0">
<first>/tools/Xilinx/Vitis_HLS/2021.1/common/technology/autopilot/ap_axi_sdata.h</first>
<second>empty</second>
</first>
<second>267</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>tmp</originalName>
<rtlName/>
<control>auto</control>
<opType>adapter</opType>
<implIndex>axi4stream</implIndex>
<coreName>axis</coreName>
<isStorage>0</isStorage>
<storageDepth>0</storageDepth>
<coreId>123</coreId>
<rtlModuleName/>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<oprand_edges>
<count>6</count>
<item_version>0</item_version>
<item>80</item>
<item>81</item>
<item>82</item>
<item>83</item>
<item>84</item>
<item>86</item>
</oprand_edges>
<opcode>nbreadreq</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>2</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_12">
<Value>
<Obj>
<type>0</type>
<id>24</id>
<name>br_ln52</name>
<fileName>/home/ubuntu/xup_vitis_network_example/NetLayers/100G-fpga-network-stack-core/synthesis_results_HMB/..//hls/ethernet_inserter/ethernet_header_inserter.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>52</lineNumber>
<contextFuncName>broadcaster_and_mac_request</contextFuncName>
<contextNormFuncName>broadcaster_and_mac_request</contextNormFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ubuntu/xup_vitis_network_example/NetLayers/100G-fpga-network-stack-core/synthesis_results_HMB</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>/home/ubuntu/xup_vitis_network_example/NetLayers/100G-fpga-network-stack-core/synthesis_results_HMB/..//hls/ethernet_inserter/ethernet_header_inserter.cpp</first>
<second>broadcaster_and_mac_request</second>
</first>
<second>52</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<control/>
<opType/>
<implIndex/>
<coreName/>
<isStorage>0</isStorage>
<storageDepth>0</storageDepth>
<coreId>0</coreId>
<rtlModuleName/>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>87</item>
<item>88</item>
<item>89</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>3</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_13">
<Value>
<Obj>
<type>0</type>
<id>26</id>
<name>br_ln54</name>
<fileName>/home/ubuntu/xup_vitis_network_example/NetLayers/100G-fpga-network-stack-core/synthesis_results_HMB/..//hls/ethernet_inserter/ethernet_header_inserter.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>54</lineNumber>
<contextFuncName>broadcaster_and_mac_request</contextFuncName>
<contextNormFuncName>broadcaster_and_mac_request</contextNormFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ubuntu/xup_vitis_network_example/NetLayers/100G-fpga-network-stack-core/synthesis_results_HMB</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>/home/ubuntu/xup_vitis_network_example/NetLayers/100G-fpga-network-stack-core/synthesis_results_HMB/..//hls/ethernet_inserter/ethernet_header_inserter.cpp</first>
<second>broadcaster_and_mac_request</second>
</first>
<second>54</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<control/>
<opType/>
<implIndex/>
<coreName/>
<isStorage>0</isStorage>
<storageDepth>0</storageDepth>
<coreId>0</coreId>
<rtlModuleName/>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>90</item>
<item>91</item>
<item>92</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>4</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_14">
<Value>
<Obj>
<type>0</type>
<id>28</id>
<name>empty</name>
<fileName>/tools/Xilinx/Vitis_HLS/2021.1/common/technology/autopilot/ap_axi_sdata.h</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>283</lineNumber>
<contextFuncName>read</contextFuncName>
<contextNormFuncName>read</contextNormFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ubuntu/xup_vitis_network_example/NetLayers/100G-fpga-network-stack-core/synthesis_results_HMB</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>/tools/Xilinx/Vitis_HLS/2021.1/common/technology/autopilot/ap_axi_sdata.h</first>
<second>read</second>
</first>
<second>283</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<control>auto</control>
<opType>adapter</opType>
<implIndex>axi4stream</implIndex>
<coreName>axis</coreName>
<isStorage>0</isStorage>
<storageDepth>0</storageDepth>
<coreId>123</coreId>
<rtlModuleName/>
</Obj>
<bitwidth>641</bitwidth>
</Value>
<oprand_edges>
<count>6</count>
<item_version>0</item_version>
<item>94</item>
<item>95</item>
<item>96</item>
<item>97</item>
<item>98</item>
<item>386</item>
</oprand_edges>
<opcode>read</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>5</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_15">
<Value>
<Obj>
<type>0</type>
<id>29</id>
<name>tmp_26</name>
<fileName>/tools/Xilinx/Vitis_HLS/2021.1/common/technology/autopilot/ap_axi_sdata.h</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>283</lineNumber>
<contextFuncName>read</contextFuncName>
<contextNormFuncName>read</contextNormFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ubuntu/xup_vitis_network_example/NetLayers/100G-fpga-network-stack-core/synthesis_results_HMB</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>/tools/Xilinx/Vitis_HLS/2021.1/common/technology/autopilot/ap_axi_sdata.h</first>
<second>read</second>
</first>
<second>283</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>tmp</originalName>
<rtlName/>
<control/>
<opType/>
<implIndex/>
<coreName/>
<isStorage>0</isStorage>
<storageDepth>0</storageDepth>
<coreId>2837336048</coreId>
<rtlModuleName/>
</Obj>
<bitwidth>512</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>99</item>
</oprand_edges>
<opcode>extractvalue</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>6</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_16">
<Value>
<Obj>
<type>0</type>
<id>30</id>
<name>tmp_24</name>
<fileName>/tools/Xilinx/Vitis_HLS/2021.1/common/technology/autopilot/ap_axi_sdata.h</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>283</lineNumber>
<contextFuncName>read</contextFuncName>
<contextNormFuncName>read</contextNormFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ubuntu/xup_vitis_network_example/NetLayers/100G-fpga-network-stack-core/synthesis_results_HMB</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>/tools/Xilinx/Vitis_HLS/2021.1/common/technology/autopilot/ap_axi_sdata.h</first>
<second>read</second>
</first>
<second>283</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>tmp</originalName>
<rtlName/>
<control/>
<opType/>
<implIndex/>
<coreName/>
<isStorage>0</isStorage>
<storageDepth>0</storageDepth>
<coreId>2837287168</coreId>
<rtlModuleName/>
</Obj>
<bitwidth>64</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>100</item>
</oprand_edges>
<opcode>extractvalue</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>7</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_17">
<Value>
<Obj>
<type>0</type>
<id>31</id>
<name>tmp_27</name>
<fileName>/tools/Xilinx/Vitis_HLS/2021.1/common/technology/autopilot/ap_axi_sdata.h</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>283</lineNumber>
<contextFuncName>read</contextFuncName>
<contextNormFuncName>read</contextNormFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ubuntu/xup_vitis_network_example/NetLayers/100G-fpga-network-stack-core/synthesis_results_HMB</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>/tools/Xilinx/Vitis_HLS/2021.1/common/technology/autopilot/ap_axi_sdata.h</first>
<second>read</second>
</first>
<second>283</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>tmp</originalName>
<rtlName/>
<control/>
<opType/>
<implIndex/>
<coreName/>
<isStorage>0</isStorage>
<storageDepth>0</storageDepth>
<coreId>0</coreId>
<rtlModuleName/>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>101</item>
</oprand_edges>
<opcode>extractvalue</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>8</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_18">
<Value>
<Obj>
<type>0</type>
<id>32</id>
<name>dst_ip_addr_V</name>
<fileName>/tools/Xilinx/Vitis_HLS/2021.1/common/technology/autopilot/ap_int_ref.h</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>674</lineNumber>
<contextFuncName>get</contextFuncName>
<contextNormFuncName>get</contextNormFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ubuntu/xup_vitis_network_example/NetLayers/100G-fpga-network-stack-core/synthesis_results_HMB</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>/tools/Xilinx/Vitis_HLS/2021.1/common/technology/autopilot/ap_int_ref.h</first>
<second>get</second>
</first>
<second>674</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>dst_ip_addr.V</originalName>
<rtlName>dst_ip_addr_V_reg_222</rtlName>
<control/>
<opType/>
<implIndex/>
<coreName/>
<isStorage>0</isStorage>
<storageDepth>0</storageDepth>
<coreId>0</coreId>
<rtlModuleName/>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<oprand_edges>
<count>4</count>
<item_version>0</item_version>
<item>103</item>
<item>104</item>
<item>106</item>
<item>108</item>
</oprand_edges>
<opcode>partselect</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>9</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_19">
<Value>
<Obj>
<type>0</type>
<id>33</id>
<name>rhs_V</name>
<fileName>/tools/Xilinx/Vitis_HLS/2021.1/common/technology/autopilot/ap_int_base.h</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>1527</lineNumber>
<contextFuncName>operator&amp;&lt;32, false, 32, false&gt;</contextFuncName>
<contextNormFuncName>operator_32_false_32_false_s</contextNormFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ubuntu/xup_vitis_network_example/NetLayers/100G-fpga-network-stack-core/synthesis_results_HMB</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>/tools/Xilinx/Vitis_HLS/2021.1/common/technology/autopilot/ap_int_base.h</first>
<second>operator&amp;&lt;32, false, 32, false&gt;</second>
</first>
<second>1527</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>rhs.V</originalName>
<rtlName/>
<control/>
<opType/>
<implIndex/>
<coreName/>
<isStorage>0</isStorage>
<storageDepth>0</storageDepth>
<coreId>2837118592</coreId>
<rtlModuleName/>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>110</item>
<item>111</item>
</oprand_edges>
<opcode>read</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>10</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_20">
<Value>
<Obj>
<type>0</type>
<id>34</id>
<name>lhs_V_1</name>
<fileName>/tools/Xilinx/Vitis_HLS/2021.1/common/technology/autopilot/ap_int_base.h</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>1527</lineNumber>
<contextFuncName>operator&amp;&lt;32, false, 32, false&gt;</contextFuncName>
<contextNormFuncName>operator_32_false_32_false_s</contextNormFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ubuntu/xup_vitis_network_example/NetLayers/100G-fpga-network-stack-core/synthesis_results_HMB</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>/tools/Xilinx/Vitis_HLS/2021.1/common/technology/autopilot/ap_int_base.h</first>
<second>operator&amp;&lt;32, false, 32, false&gt;</second>
</first>
<second>1527</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>lhs.V</originalName>
<rtlName/>
<control/>
<opType/>
<implIndex/>
<coreName/>
<isStorage>0</isStorage>
<storageDepth>0</storageDepth>
<coreId>2836991920</coreId>
<rtlModuleName/>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>112</item>
<item>113</item>
</oprand_edges>
<opcode>read</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>11</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_21">
<Value>
<Obj>
<type>0</type>
<id>35</id>
<name>xor_ln1049</name>
<fileName>/tools/Xilinx/Vitis_HLS/2021.1/common/technology/autopilot/ap_int_base.h</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>1049</lineNumber>
<contextFuncName>operator==&lt;32, false&gt;</contextFuncName>
<contextNormFuncName>operator_eq_32_false</contextNormFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ubuntu/xup_vitis_network_example/NetLayers/100G-fpga-network-stack-core/synthesis_results_HMB</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>/tools/Xilinx/Vitis_HLS/2021.1/common/technology/autopilot/ap_int_base.h</first>
<second>operator==&lt;32, false&gt;</second>
</first>
<second>1049</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>xor_ln1049_fu_151_p2</rtlName>
<control>auto</control>
<opType>xor</opType>
<implIndex>auto</implIndex>
<coreName>LogicGate</coreName>
<isStorage>0</isStorage>
<storageDepth>0</storageDepth>
<coreId>74</coreId>
<rtlModuleName/>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>114</item>
<item>115</item>
</oprand_edges>
<opcode>xor</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>12</m_topoIndex>
<m_clusterGroupNumber>1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_22">
<Value>
<Obj>
<type>0</type>
<id>36</id>
<name>and_ln1049</name>
<fileName>/tools/Xilinx/Vitis_HLS/2021.1/common/technology/autopilot/ap_int_base.h</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>1049</lineNumber>
<contextFuncName>operator==&lt;32, false&gt;</contextFuncName>
<contextNormFuncName>operator_eq_32_false</contextNormFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ubuntu/xup_vitis_network_example/NetLayers/100G-fpga-network-stack-core/synthesis_results_HMB</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>/tools/Xilinx/Vitis_HLS/2021.1/common/technology/autopilot/ap_int_base.h</first>
<second>operator==&lt;32, false&gt;</second>
</first>
<second>1049</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>and_ln1049_fu_157_p2</rtlName>
<control>auto</control>
<opType>and</opType>
<implIndex>auto</implIndex>
<coreName>LogicGate</coreName>
<isStorage>0</isStorage>
<storageDepth>0</storageDepth>
<coreId>74</coreId>
<rtlModuleName/>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>116</item>
<item>117</item>
</oprand_edges>
<opcode>and</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>13</m_topoIndex>
<m_clusterGroupNumber>1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_23">
<Value>
<Obj>
<type>0</type>
<id>37</id>
<name>icmp_ln1049</name>
<fileName>/tools/Xilinx/Vitis_HLS/2021.1/common/technology/autopilot/ap_int_base.h</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>1049</lineNumber>
<contextFuncName>operator==&lt;32, false&gt;</contextFuncName>
<contextNormFuncName>operator_eq_32_false</contextNormFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ubuntu/xup_vitis_network_example/NetLayers/100G-fpga-network-stack-core/synthesis_results_HMB</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>/tools/Xilinx/Vitis_HLS/2021.1/common/technology/autopilot/ap_int_base.h</first>
<second>operator==&lt;32, false&gt;</second>
</first>
<second>1049</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>icmp_ln1049_fu_163_p2</rtlName>
<control>auto</control>
<opType>icmp</opType>
<implIndex>auto</implIndex>
<coreName>Cmp</coreName>
<isStorage>0</isStorage>
<storageDepth>0</storageDepth>
<coreId>9</coreId>
<rtlModuleName/>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>118</item>
<item>120</item>
</oprand_edges>
<opcode>icmp</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.85</m_delay>
<m_topoIndex>14</m_topoIndex>
<m_clusterGroupNumber>1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_24">
<Value>
<Obj>
<type>0</type>
<id>38</id>
<name>br_ln58</name>
<fileName>/home/ubuntu/xup_vitis_network_example/NetLayers/100G-fpga-network-stack-core/synthesis_results_HMB/..//hls/ethernet_inserter/ethernet_header_inserter.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>58</lineNumber>
<contextFuncName>broadcaster_and_mac_request</contextFuncName>
<contextNormFuncName>broadcaster_and_mac_request</contextNormFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ubuntu/xup_vitis_network_example/NetLayers/100G-fpga-network-stack-core/synthesis_results_HMB</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>/home/ubuntu/xup_vitis_network_example/NetLayers/100G-fpga-network-stack-core/synthesis_results_HMB/..//hls/ethernet_inserter/ethernet_header_inserter.cpp</first>
<second>broadcaster_and_mac_request</second>
</first>
<second>58</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<control/>
<opType/>
<implIndex/>
<coreName/>
<isStorage>0</isStorage>
<storageDepth>0</storageDepth>
<coreId>1330007625</coreId>
<rtlModuleName/>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>121</item>
<item>122</item>
<item>123</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>15</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_25">
<Value>
<Obj>
<type>0</type>
<id>40</id>
<name>arpTableRequest_V_write_ln174</name>
<fileName>/tools/Xilinx/Vitis_HLS/2021.1/common/technology/autopilot/hls_stream_39.h</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>174</lineNumber>
<contextFuncName>write</contextFuncName>
<contextNormFuncName>write</contextNormFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ubuntu/xup_vitis_network_example/NetLayers/100G-fpga-network-stack-core/synthesis_results_HMB</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>/tools/Xilinx/Vitis_HLS/2021.1/common/technology/autopilot/hls_stream_39.h</first>
<second>write</second>
</first>
<second>174</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<control>auto</control>
<opType>adapter</opType>
<implIndex>axi4stream</implIndex>
<coreName>axis</coreName>
<isStorage>0</isStorage>
<storageDepth>0</storageDepth>
<coreId>123</coreId>
<rtlModuleName/>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>129</item>
<item>130</item>
<item>131</item>
</oprand_edges>
<opcode>write</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>31</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_26">
<Value>
<Obj>
<type>0</type>
<id>41</id>
<name>br_ln0</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<contextNormFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<control/>
<opType/>
<implIndex/>
<coreName/>
<isStorage>0</isStorage>
<storageDepth>0</storageDepth>
<coreId>2837012736</coreId>
<rtlModuleName/>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>132</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>39</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_27">
<Value>
<Obj>
<type>0</type>
<id>43</id>
<name>arpTableRequest_V_write_ln174</name>
<fileName>/tools/Xilinx/Vitis_HLS/2021.1/common/technology/autopilot/hls_stream_39.h</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>174</lineNumber>
<contextFuncName>write</contextFuncName>
<contextNormFuncName>write</contextNormFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ubuntu/xup_vitis_network_example/NetLayers/100G-fpga-network-stack-core/synthesis_results_HMB</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>/tools/Xilinx/Vitis_HLS/2021.1/common/technology/autopilot/hls_stream_39.h</first>
<second>write</second>
</first>
<second>174</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<control>auto</control>
<opType>adapter</opType>
<implIndex>axi4stream</implIndex>
<coreName>axis</coreName>
<isStorage>0</isStorage>
<storageDepth>0</storageDepth>
<coreId>123</coreId>
<rtlModuleName/>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>125</item>
<item>126</item>
<item>127</item>
</oprand_edges>
<opcode>write</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>32</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_28">
<Value>
<Obj>
<type>0</type>
<id>44</id>
<name>br_ln59</name>
<fileName>/home/ubuntu/xup_vitis_network_example/NetLayers/100G-fpga-network-stack-core/synthesis_results_HMB/..//hls/ethernet_inserter/ethernet_header_inserter.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>59</lineNumber>
<contextFuncName>broadcaster_and_mac_request</contextFuncName>
<contextNormFuncName>broadcaster_and_mac_request</contextNormFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ubuntu/xup_vitis_network_example/NetLayers/100G-fpga-network-stack-core/synthesis_results_HMB</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>/home/ubuntu/xup_vitis_network_example/NetLayers/100G-fpga-network-stack-core/synthesis_results_HMB/..//hls/ethernet_inserter/ethernet_header_inserter.cpp</first>
<second>broadcaster_and_mac_request</second>
</first>
<second>59</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<control/>
<opType/>
<implIndex/>
<coreName/>
<isStorage>0</isStorage>
<storageDepth>0</storageDepth>
<coreId>608</coreId>
<rtlModuleName/>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>128</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>40</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_29">
<Value>
<Obj>
<type>0</type>
<id>46</id>
<name>tmp_52_i</name>
<fileName>/tools/Xilinx/Vitis_HLS/2021.1/common/technology/autopilot/hls_stream_39.h</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>174</lineNumber>
<contextFuncName>write</contextFuncName>
<contextNormFuncName>write</contextNormFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ubuntu/xup_vitis_network_example/NetLayers/100G-fpga-network-stack-core/synthesis_results_HMB</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>/tools/Xilinx/Vitis_HLS/2021.1/common/technology/autopilot/hls_stream_39.h</first>
<second>write</second>
</first>
<second>174</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>tmp_52_i_fu_181_p4</rtlName>
<control/>
<opType/>
<implIndex/>
<coreName/>
<isStorage>0</isStorage>
<storageDepth>0</storageDepth>
<coreId>2837121488</coreId>
<rtlModuleName/>
</Obj>
<bitwidth>577</bitwidth>
</Value>
<oprand_edges>
<count>4</count>
<item_version>0</item_version>
<item>134</item>
<item>135</item>
<item>136</item>
<item>137</item>
</oprand_edges>
<opcode>bitconcatenate</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>33</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_30">
<Value>
<Obj>
<type>0</type>
<id>47</id>
<name>zext_ln174_1</name>
<fileName>/tools/Xilinx/Vitis_HLS/2021.1/common/technology/autopilot/hls_stream_39.h</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>174</lineNumber>
<contextFuncName>write</contextFuncName>
<contextNormFuncName>write</contextNormFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ubuntu/xup_vitis_network_example/NetLayers/100G-fpga-network-stack-core/synthesis_results_HMB</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>/tools/Xilinx/Vitis_HLS/2021.1/common/technology/autopilot/hls_stream_39.h</first>
<second>write</second>
</first>
<second>174</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>ip_header_out_din</rtlName>
<control/>
<opType/>
<implIndex/>
<coreName/>
<isStorage>0</isStorage>
<storageDepth>0</storageDepth>
<coreId>2837121600</coreId>
<rtlModuleName/>
</Obj>
<bitwidth>1024</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>138</item>
</oprand_edges>
<opcode>zext</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>34</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_31">
<Value>
<Obj>
<type>0</type>
<id>48</id>
<name>ip_header_out_write_ln174</name>
<fileName>/tools/Xilinx/Vitis_HLS/2021.1/common/technology/autopilot/hls_stream_39.h</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>174</lineNumber>
<contextFuncName>write</contextFuncName>
<contextNormFuncName>write</contextNormFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ubuntu/xup_vitis_network_example/NetLayers/100G-fpga-network-stack-core/synthesis_results_HMB</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>/tools/Xilinx/Vitis_HLS/2021.1/common/technology/autopilot/hls_stream_39.h</first>
<second>write</second>
</first>
<second>174</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<control>auto</control>
<opType>fifo</opType>
<implIndex>memory</implIndex>
<coreName>FIFO</coreName>
<isStorage>0</isStorage>
<storageDepth>0</storageDepth>
<coreId>78</coreId>
<rtlModuleName/>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>140</item>
<item>141</item>
<item>142</item>
</oprand_edges>
<opcode>write</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>1.45</m_delay>
<m_topoIndex>35</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_32">
<Value>
<Obj>
<type>0</type>
<id>49</id>
<name>br_ln67</name>
<fileName>/home/ubuntu/xup_vitis_network_example/NetLayers/100G-fpga-network-stack-core/synthesis_results_HMB/..//hls/ethernet_inserter/ethernet_header_inserter.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>67</lineNumber>
<contextFuncName>broadcaster_and_mac_request</contextFuncName>
<contextNormFuncName>broadcaster_and_mac_request</contextNormFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ubuntu/xup_vitis_network_example/NetLayers/100G-fpga-network-stack-core/synthesis_results_HMB</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>/home/ubuntu/xup_vitis_network_example/NetLayers/100G-fpga-network-stack-core/synthesis_results_HMB/..//hls/ethernet_inserter/ethernet_header_inserter.cpp</first>
<second>broadcaster_and_mac_request</second>
</first>
<second>67</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<control/>
<opType/>
<implIndex/>
<coreName/>
<isStorage>0</isStorage>
<storageDepth>0</storageDepth>
<coreId>0</coreId>
<rtlModuleName/>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>143</item>
<item>144</item>
<item>145</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>16</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_33">
<Value>
<Obj>
<type>0</type>
<id>51</id>
<name>bmr_fsm_state_write_ln0</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<contextNormFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<control/>
<opType/>
<implIndex/>
<coreName/>
<isStorage>0</isStorage>
<storageDepth>0</storageDepth>
<coreId>2837011592</coreId>
<rtlModuleName/>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>147</item>
<item>148</item>
<item>388</item>
</oprand_edges>
<opcode>store</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.38</m_delay>
<m_topoIndex>17</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_34">
<Value>
<Obj>
<type>0</type>
<id>52</id>
<name>br_ln68</name>
<fileName>/home/ubuntu/xup_vitis_network_example/NetLayers/100G-fpga-network-stack-core/synthesis_results_HMB/..//hls/ethernet_inserter/ethernet_header_inserter.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>68</lineNumber>
<contextFuncName>broadcaster_and_mac_request</contextFuncName>
<contextNormFuncName>broadcaster_and_mac_request</contextNormFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ubuntu/xup_vitis_network_example/NetLayers/100G-fpga-network-stack-core/synthesis_results_HMB</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>/home/ubuntu/xup_vitis_network_example/NetLayers/100G-fpga-network-stack-core/synthesis_results_HMB/..//hls/ethernet_inserter/ethernet_header_inserter.cpp</first>
<second>broadcaster_and_mac_request</second>
</first>
<second>68</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<control/>
<opType/>
<implIndex/>
<coreName/>
<isStorage>0</isStorage>
<storageDepth>0</storageDepth>
<coreId>236</coreId>
<rtlModuleName/>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>149</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>18</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_35">
<Value>
<Obj>
<type>0</type>
<id>54</id>
<name>br_ln69</name>
<fileName>/home/ubuntu/xup_vitis_network_example/NetLayers/100G-fpga-network-stack-core/synthesis_results_HMB/..//hls/ethernet_inserter/ethernet_header_inserter.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>69</lineNumber>
<contextFuncName>broadcaster_and_mac_request</contextFuncName>
<contextNormFuncName>broadcaster_and_mac_request</contextNormFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ubuntu/xup_vitis_network_example/NetLayers/100G-fpga-network-stack-core/synthesis_results_HMB</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>/home/ubuntu/xup_vitis_network_example/NetLayers/100G-fpga-network-stack-core/synthesis_results_HMB/..//hls/ethernet_inserter/ethernet_header_inserter.cpp</first>
<second>broadcaster_and_mac_request</second>
</first>
<second>69</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<control/>
<opType/>
<implIndex/>
<coreName/>
<isStorage>0</isStorage>
<storageDepth>0</storageDepth>
<coreId>2837296832</coreId>
<rtlModuleName/>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>150</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>19</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_36">
<Value>
<Obj>
<type>0</type>
<id>56</id>
<name>br_ln70</name>
<fileName>/home/ubuntu/xup_vitis_network_example/NetLayers/100G-fpga-network-stack-core/synthesis_results_HMB/..//hls/ethernet_inserter/ethernet_header_inserter.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>70</lineNumber>
<contextFuncName>broadcaster_and_mac_request</contextFuncName>
<contextNormFuncName>broadcaster_and_mac_request</contextNormFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ubuntu/xup_vitis_network_example/NetLayers/100G-fpga-network-stack-core/synthesis_results_HMB</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>/home/ubuntu/xup_vitis_network_example/NetLayers/100G-fpga-network-stack-core/synthesis_results_HMB/..//hls/ethernet_inserter/ethernet_header_inserter.cpp</first>
<second>broadcaster_and_mac_request</second>
</first>
<second>70</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<control/>
<opType/>
<implIndex/>
<coreName/>
<isStorage>0</isStorage>
<storageDepth>0</storageDepth>
<coreId>784</coreId>
<rtlModuleName/>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>151</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>20</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_37">
<Value>
<Obj>
<type>0</type>
<id>58</id>
<name>br_ln72</name>
<fileName>/home/ubuntu/xup_vitis_network_example/NetLayers/100G-fpga-network-stack-core/synthesis_results_HMB/..//hls/ethernet_inserter/ethernet_header_inserter.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>72</lineNumber>
<contextFuncName>broadcaster_and_mac_request</contextFuncName>
<contextNormFuncName>broadcaster_and_mac_request</contextNormFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ubuntu/xup_vitis_network_example/NetLayers/100G-fpga-network-stack-core/synthesis_results_HMB</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>/home/ubuntu/xup_vitis_network_example/NetLayers/100G-fpga-network-stack-core/synthesis_results_HMB/..//hls/ethernet_inserter/ethernet_header_inserter.cpp</first>
<second>broadcaster_and_mac_request</second>
</first>
<second>72</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<control/>
<opType/>
<implIndex/>
<coreName/>
<isStorage>0</isStorage>
<storageDepth>0</storageDepth>
<coreId>1668445551</coreId>
<rtlModuleName/>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>152</item>
<item>153</item>
<item>154</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>21</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_38">
<Value>
<Obj>
<type>0</type>
<id>60</id>
<name>empty_26</name>
<fileName>/tools/Xilinx/Vitis_HLS/2021.1/common/technology/autopilot/ap_axi_sdata.h</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>283</lineNumber>
<contextFuncName>read</contextFuncName>
<contextNormFuncName>read</contextNormFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ubuntu/xup_vitis_network_example/NetLayers/100G-fpga-network-stack-core/synthesis_results_HMB</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>/tools/Xilinx/Vitis_HLS/2021.1/common/technology/autopilot/ap_axi_sdata.h</first>
<second>read</second>
</first>
<second>283</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<control>auto</control>
<opType>adapter</opType>
<implIndex>axi4stream</implIndex>
<coreName>axis</coreName>
<isStorage>0</isStorage>
<storageDepth>0</storageDepth>
<coreId>123</coreId>
<rtlModuleName/>
</Obj>
<bitwidth>641</bitwidth>
</Value>
<oprand_edges>
<count>6</count>
<item_version>0</item_version>
<item>155</item>
<item>156</item>
<item>157</item>
<item>158</item>
<item>159</item>
<item>385</item>
</oprand_edges>
<opcode>read</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>22</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_39">
<Value>
<Obj>
<type>0</type>
<id>61</id>
<name>tmp_20</name>
<fileName>/tools/Xilinx/Vitis_HLS/2021.1/common/technology/autopilot/ap_axi_sdata.h</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>283</lineNumber>
<contextFuncName>read</contextFuncName>
<contextNormFuncName>read</contextNormFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ubuntu/xup_vitis_network_example/NetLayers/100G-fpga-network-stack-core/synthesis_results_HMB</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>/tools/Xilinx/Vitis_HLS/2021.1/common/technology/autopilot/ap_axi_sdata.h</first>
<second>read</second>
</first>
<second>283</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>tmp</originalName>
<rtlName/>
<control/>
<opType/>
<implIndex/>
<coreName/>
<isStorage>0</isStorage>
<storageDepth>0</storageDepth>
<coreId>796485487</coreId>
<rtlModuleName/>
</Obj>
<bitwidth>512</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>160</item>
</oprand_edges>
<opcode>extractvalue</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>23</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_40">
<Value>
<Obj>
<type>0</type>
<id>62</id>
<name>tmp_21</name>
<fileName>/tools/Xilinx/Vitis_HLS/2021.1/common/technology/autopilot/ap_axi_sdata.h</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>283</lineNumber>
<contextFuncName>read</contextFuncName>
<contextNormFuncName>read</contextNormFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ubuntu/xup_vitis_network_example/NetLayers/100G-fpga-network-stack-core/synthesis_results_HMB</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>/tools/Xilinx/Vitis_HLS/2021.1/common/technology/autopilot/ap_axi_sdata.h</first>
<second>read</second>
</first>
<second>283</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>tmp</originalName>
<rtlName/>
<control/>
<opType/>
<implIndex/>
<coreName/>
<isStorage>0</isStorage>
<storageDepth>0</storageDepth>
<coreId>2019647353</coreId>
<rtlModuleName/>
</Obj>
<bitwidth>64</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>161</item>
</oprand_edges>
<opcode>extractvalue</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>24</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_41">
<Value>
<Obj>
<type>0</type>
<id>63</id>
<name>tmp_28</name>
<fileName>/tools/Xilinx/Vitis_HLS/2021.1/common/technology/autopilot/ap_axi_sdata.h</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>283</lineNumber>
<contextFuncName>read</contextFuncName>
<contextNormFuncName>read</contextNormFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ubuntu/xup_vitis_network_example/NetLayers/100G-fpga-network-stack-core/synthesis_results_HMB</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>/tools/Xilinx/Vitis_HLS/2021.1/common/technology/autopilot/ap_axi_sdata.h</first>
<second>read</second>
</first>
<second>283</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>tmp</originalName>
<rtlName/>
<control/>
<opType/>
<implIndex/>
<coreName/>
<isStorage>0</isStorage>
<storageDepth>0</storageDepth>
<coreId>1667592992</coreId>
<rtlModuleName/>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>162</item>
</oprand_edges>
<opcode>extractvalue</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>25</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_42">
<Value>
<Obj>
<type>0</type>
<id>64</id>
<name>tmp_47_i</name>
<fileName>/tools/Xilinx/Vitis_HLS/2021.1/common/technology/autopilot/hls_stream_39.h</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>174</lineNumber>
<contextFuncName>write</contextFuncName>
<contextNormFuncName>write</contextNormFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ubuntu/xup_vitis_network_example/NetLayers/100G-fpga-network-stack-core/synthesis_results_HMB</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>/tools/Xilinx/Vitis_HLS/2021.1/common/technology/autopilot/hls_stream_39.h</first>
<second>write</second>
</first>
<second>174</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>tmp_47_i_fu_195_p4</rtlName>
<control/>
<opType/>
<implIndex/>
<coreName/>
<isStorage>0</isStorage>
<storageDepth>0</storageDepth>
<coreId>574453865</coreId>
<rtlModuleName/>
</Obj>
<bitwidth>577</bitwidth>
</Value>
<oprand_edges>
<count>4</count>
<item_version>0</item_version>
<item>163</item>
<item>164</item>
<item>165</item>
<item>166</item>
</oprand_edges>
<opcode>bitconcatenate</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>36</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_43">
<Value>
<Obj>
<type>0</type>
<id>65</id>
<name>zext_ln174</name>
<fileName>/tools/Xilinx/Vitis_HLS/2021.1/common/technology/autopilot/hls_stream_39.h</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>174</lineNumber>
<contextFuncName>write</contextFuncName>
<contextNormFuncName>write</contextNormFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ubuntu/xup_vitis_network_example/NetLayers/100G-fpga-network-stack-core/synthesis_results_HMB</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>/tools/Xilinx/Vitis_HLS/2021.1/common/technology/autopilot/hls_stream_39.h</first>
<second>write</second>
</first>
<second>174</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>no_ip_header_out_din</rtlName>
<control/>
<opType/>
<implIndex/>
<coreName/>
<isStorage>0</isStorage>
<storageDepth>0</storageDepth>
<coreId>796159744</coreId>
<rtlModuleName/>
</Obj>
<bitwidth>1024</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>167</item>
</oprand_edges>
<opcode>zext</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>37</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_44">
<Value>
<Obj>
<type>0</type>
<id>66</id>
<name>no_ip_header_out_write_ln174</name>
<fileName>/tools/Xilinx/Vitis_HLS/2021.1/common/technology/autopilot/hls_stream_39.h</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>174</lineNumber>
<contextFuncName>write</contextFuncName>
<contextNormFuncName>write</contextNormFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ubuntu/xup_vitis_network_example/NetLayers/100G-fpga-network-stack-core/synthesis_results_HMB</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>/tools/Xilinx/Vitis_HLS/2021.1/common/technology/autopilot/hls_stream_39.h</first>
<second>write</second>
</first>
<second>174</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<control>auto</control>
<opType>fifo</opType>
<implIndex>memory</implIndex>
<coreName>FIFO</coreName>
<isStorage>0</isStorage>
<storageDepth>0</storageDepth>
<coreId>78</coreId>
<rtlModuleName/>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>168</item>
<item>169</item>
<item>170</item>
</oprand_edges>
<opcode>write</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>1.45</m_delay>
<m_topoIndex>38</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_45">
<Value>
<Obj>
<type>0</type>
<id>67</id>
<name>br_ln78</name>
<fileName>/home/ubuntu/xup_vitis_network_example/NetLayers/100G-fpga-network-stack-core/synthesis_results_HMB/..//hls/ethernet_inserter/ethernet_header_inserter.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>78</lineNumber>
<contextFuncName>broadcaster_and_mac_request</contextFuncName>
<contextNormFuncName>broadcaster_and_mac_request</contextNormFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ubuntu/xup_vitis_network_example/NetLayers/100G-fpga-network-stack-core/synthesis_results_HMB</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>/home/ubuntu/xup_vitis_network_example/NetLayers/100G-fpga-network-stack-core/synthesis_results_HMB/..//hls/ethernet_inserter/ethernet_header_inserter.cpp</first>
<second>broadcaster_and_mac_request</second>
</first>
<second>78</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<control/>
<opType/>
<implIndex/>
<coreName/>
<isStorage>0</isStorage>
<storageDepth>0</storageDepth>
<coreId>673201011</coreId>
<rtlModuleName/>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>171</item>
<item>172</item>
<item>173</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>26</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_46">
<Value>
<Obj>
<type>0</type>
<id>69</id>
<name>bmr_fsm_state_write_ln0</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<contextNormFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<control/>
<opType/>
<implIndex/>
<coreName/>
<isStorage>0</isStorage>
<storageDepth>0</storageDepth>
<coreId>2837331304</coreId>
<rtlModuleName/>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>175</item>
<item>176</item>
<item>387</item>
</oprand_edges>
<opcode>store</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.38</m_delay>
<m_topoIndex>27</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_47">
<Value>
<Obj>
<type>0</type>
<id>70</id>
<name>br_ln79</name>
<fileName>/home/ubuntu/xup_vitis_network_example/NetLayers/100G-fpga-network-stack-core/synthesis_results_HMB/..//hls/ethernet_inserter/ethernet_header_inserter.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>79</lineNumber>
<contextFuncName>broadcaster_and_mac_request</contextFuncName>
<contextNormFuncName>broadcaster_and_mac_request</contextNormFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ubuntu/xup_vitis_network_example/NetLayers/100G-fpga-network-stack-core/synthesis_results_HMB</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>/home/ubuntu/xup_vitis_network_example/NetLayers/100G-fpga-network-stack-core/synthesis_results_HMB/..//hls/ethernet_inserter/ethernet_header_inserter.cpp</first>
<second>broadcaster_and_mac_request</second>
</first>
<second>79</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<control/>
<opType/>
<implIndex/>
<coreName/>
<isStorage>0</isStorage>
<storageDepth>0</storageDepth>
<coreId>2837332016</coreId>
<rtlModuleName/>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>177</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>28</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_48">
<Value>
<Obj>
<type>0</type>
<id>72</id>
<name>br_ln80</name>
<fileName>/home/ubuntu/xup_vitis_network_example/NetLayers/100G-fpga-network-stack-core/synthesis_results_HMB/..//hls/ethernet_inserter/ethernet_header_inserter.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>80</lineNumber>
<contextFuncName>broadcaster_and_mac_request</contextFuncName>
<contextNormFuncName>broadcaster_and_mac_request</contextNormFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ubuntu/xup_vitis_network_example/NetLayers/100G-fpga-network-stack-core/synthesis_results_HMB</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>/home/ubuntu/xup_vitis_network_example/NetLayers/100G-fpga-network-stack-core/synthesis_results_HMB/..//hls/ethernet_inserter/ethernet_header_inserter.cpp</first>
<second>broadcaster_and_mac_request</second>
</first>
<second>80</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<control/>
<opType/>
<implIndex/>
<coreName/>
<isStorage>0</isStorage>
<storageDepth>0</storageDepth>
<coreId>0</coreId>
<rtlModuleName/>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>178</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>29</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_49">
<Value>
<Obj>
<type>0</type>
<id>74</id>
<name>br_ln81</name>
<fileName>/home/ubuntu/xup_vitis_network_example/NetLayers/100G-fpga-network-stack-core/synthesis_results_HMB/..//hls/ethernet_inserter/ethernet_header_inserter.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>81</lineNumber>
<contextFuncName>broadcaster_and_mac_request</contextFuncName>
<contextNormFuncName>broadcaster_and_mac_request</contextNormFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ubuntu/xup_vitis_network_example/NetLayers/100G-fpga-network-stack-core/synthesis_results_HMB</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>/home/ubuntu/xup_vitis_network_example/NetLayers/100G-fpga-network-stack-core/synthesis_results_HMB/..//hls/ethernet_inserter/ethernet_header_inserter.cpp</first>
<second>broadcaster_and_mac_request</second>
</first>
<second>81</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<control/>
<opType/>
<implIndex/>
<coreName/>
<isStorage>0</isStorage>
<storageDepth>0</storageDepth>
<coreId>0</coreId>
<rtlModuleName/>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>179</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>30</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_50">
<Value>
<Obj>
<type>0</type>
<id>76</id>
<name>_ln0</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<contextNormFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<control/>
<opType/>
<implIndex/>
<coreName/>
<isStorage>0</isStorage>
<storageDepth>0</storageDepth>
<coreId>2837300464</coreId>
<rtlModuleName/>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>0</count>
<item_version>0</item_version>
</oprand_edges>
<opcode>ret</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>41</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
</nodes>
<consts class_id="15" tracking_level="0" version="0">
<count>6</count>
<item_version>0</item_version>
<item class_id="16" tracking_level="1" version="0" object_id="_51">
<Value>
<Obj>
<type>2</type>
<id>85</id>
<name>empty</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<contextNormFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<control/>
<opType/>
<implIndex/>
<coreName/>
<isStorage>0</isStorage>
<storageDepth>0</storageDepth>
<coreId>0</coreId>
<rtlModuleName/>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<const_type>0</const_type>
<content>1</content>
</item>
<item class_id_reference="16" object_id="_52">
<Value>
<Obj>
<type>2</type>
<id>105</id>
<name>empty</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<contextNormFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<control/>
<opType/>
<implIndex/>
<coreName/>
<isStorage>0</isStorage>
<storageDepth>0</storageDepth>
<coreId>349</coreId>
<rtlModuleName/>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<const_type>0</const_type>
<content>128</content>
</item>
<item class_id_reference="16" object_id="_53">
<Value>
<Obj>
<type>2</type>
<id>107</id>
<name>empty</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<contextNormFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<control/>
<opType/>
<implIndex/>
<coreName/>
<isStorage>0</isStorage>
<storageDepth>0</storageDepth>
<coreId>0</coreId>
<rtlModuleName/>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<const_type>0</const_type>
<content>159</content>
</item>
<item class_id_reference="16" object_id="_54">
<Value>
<Obj>
<type>2</type>
<id>119</id>
<name>empty</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<contextNormFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<control/>
<opType/>
<implIndex/>
<coreName/>
<isStorage>0</isStorage>
<storageDepth>0</storageDepth>
<coreId>176</coreId>
<rtlModuleName/>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<const_type>0</const_type>
<content>0</content>
</item>
<item class_id_reference="16" object_id="_55">
<Value>
<Obj>
<type>2</type>
<id>146</id>
<name>empty</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<contextNormFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<control/>
<opType/>
<implIndex/>
<coreName/>
<isStorage>0</isStorage>
<storageDepth>0</storageDepth>
<coreId>1397508187</coreId>
<rtlModuleName/>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<const_type>0</const_type>
<content>1</content>
</item>
<item class_id_reference="16" object_id="_56">
<Value>
<Obj>
<type>2</type>
<id>174</id>
<name>empty</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<contextNormFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<control/>
<opType/>
<implIndex/>
<coreName/>
<isStorage>0</isStorage>
<storageDepth>0</storageDepth>
<coreId>2837309024</coreId>
<rtlModuleName/>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<const_type>0</const_type>
<content>0</content>
</item>
</consts>
<blocks class_id="17" tracking_level="0" version="0">
<count>15</count>
<item_version>0</item_version>
<item class_id="18" tracking_level="1" version="0" object_id="_57">
<Obj>
<type>3</type>
<id>25</id>
<name>entry</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<contextNormFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<control/>
<opType/>
<implIndex/>
<coreName/>
<isStorage>0</isStorage>
<storageDepth>0</storageDepth>
<coreId>774849101</coreId>
<rtlModuleName/>
</Obj>
<node_objs>
<count>3</count>
<item_version>0</item_version>
<item>22</item>
<item>23</item>
<item>24</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_58">
<Obj>
<type>3</type>
<id>27</id>
<name/>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<contextNormFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<control/>
<opType/>
<implIndex/>
<coreName/>
<isStorage>0</isStorage>
<storageDepth>0</storageDepth>
<coreId>774849101</coreId>
<rtlModuleName/>
</Obj>
<node_objs>
<count>1</count>
<item_version>0</item_version>
<item>26</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_59">
<Obj>
<type>3</type>
<id>39</id>
<name/>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<contextNormFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<control/>
<opType/>
<implIndex/>
<coreName/>
<isStorage>0</isStorage>
<storageDepth>0</storageDepth>
<coreId>774849101</coreId>
<rtlModuleName/>
</Obj>
<node_objs>
<count>11</count>
<item_version>0</item_version>
<item>28</item>
<item>29</item>
<item>30</item>
<item>31</item>
<item>32</item>
<item>33</item>
<item>34</item>
<item>35</item>
<item>36</item>
<item>37</item>
<item>38</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_60">
<Obj>
<type>3</type>
<id>42</id>
<name/>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<contextNormFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<control/>
<opType/>
<implIndex/>
<coreName/>
<isStorage>0</isStorage>
<storageDepth>0</storageDepth>
<coreId>774849101</coreId>
<rtlModuleName/>
</Obj>
<node_objs>
<count>2</count>
<item_version>0</item_version>
<item>40</item>
<item>41</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_61">
<Obj>
<type>3</type>
<id>45</id>
<name/>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<contextNormFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<control/>
<opType/>
<implIndex/>
<coreName/>
<isStorage>0</isStorage>
<storageDepth>0</storageDepth>
<coreId>0</coreId>
<rtlModuleName/>
</Obj>
<node_objs>
<count>2</count>
<item_version>0</item_version>
<item>43</item>
<item>44</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_62">
<Obj>
<type>3</type>
<id>50</id>
<name/>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<contextNormFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<control/>
<opType/>
<implIndex/>
<coreName/>
<isStorage>0</isStorage>
<storageDepth>0</storageDepth>
<coreId>0</coreId>
<rtlModuleName/>
</Obj>
<node_objs>
<count>4</count>
<item_version>0</item_version>
<item>46</item>
<item>47</item>
<item>48</item>
<item>49</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_63">
<Obj>
<type>3</type>
<id>53</id>
<name/>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<contextNormFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<control/>
<opType/>
<implIndex/>
<coreName/>
<isStorage>0</isStorage>
<storageDepth>0</storageDepth>
<coreId>1330007625</coreId>
<rtlModuleName/>
</Obj>
<node_objs>
<count>2</count>
<item_version>0</item_version>
<item>51</item>
<item>52</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_64">
<Obj>
<type>3</type>
<id>55</id>
<name>._crit_edge1.i</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<contextNormFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<control/>
<opType/>
<implIndex/>
<coreName/>
<isStorage>0</isStorage>
<storageDepth>0</storageDepth>
<coreId>2837280384</coreId>
<rtlModuleName/>
</Obj>
<node_objs>
<count>1</count>
<item_version>0</item_version>
<item>54</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_65">
<Obj>
<type>3</type>
<id>57</id>
<name>._crit_edge.i</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<contextNormFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<control/>
<opType/>
<implIndex/>
<coreName/>
<isStorage>0</isStorage>
<storageDepth>0</storageDepth>
<coreId>2837298376</coreId>
<rtlModuleName/>
</Obj>
<node_objs>
<count>1</count>
<item_version>0</item_version>
<item>56</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_66">
<Obj>
<type>3</type>
<id>59</id>
<name/>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<contextNormFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<control/>
<opType/>
<implIndex/>
<coreName/>
<isStorage>0</isStorage>
<storageDepth>0</storageDepth>
<coreId>2837109616</coreId>
<rtlModuleName/>
</Obj>
<node_objs>
<count>1</count>
<item_version>0</item_version>
<item>58</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_67">
<Obj>
<type>3</type>
<id>68</id>
<name/>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<contextNormFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<control/>
<opType/>
<implIndex/>
<coreName/>
<isStorage>0</isStorage>
<storageDepth>0</storageDepth>
<coreId>2836758608</coreId>
<rtlModuleName/>
</Obj>
<node_objs>
<count>8</count>
<item_version>0</item_version>
<item>60</item>
<item>61</item>
<item>62</item>
<item>63</item>
<item>64</item>
<item>65</item>
<item>66</item>
<item>67</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_68">
<Obj>
<type>3</type>
<id>71</id>
<name/>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<contextNormFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<control/>
<opType/>
<implIndex/>
<coreName/>
<isStorage>0</isStorage>
<storageDepth>0</storageDepth>
<coreId>264</coreId>
<rtlModuleName/>
</Obj>
<node_objs>
<count>2</count>
<item_version>0</item_version>
<item>69</item>
<item>70</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_69">
<Obj>
<type>3</type>
<id>73</id>
<name>._crit_edge3.i</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<contextNormFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<control/>
<opType/>
<implIndex/>
<coreName/>
<isStorage>0</isStorage>
<storageDepth>0</storageDepth>
<coreId>2837333168</coreId>
<rtlModuleName/>
</Obj>
<node_objs>
<count>1</count>
<item_version>0</item_version>
<item>72</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_70">
<Obj>
<type>3</type>
<id>75</id>
<name>._crit_edge2.i</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<contextNormFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<control/>
<opType/>
<implIndex/>
<coreName/>
<isStorage>0</isStorage>
<storageDepth>0</storageDepth>
<coreId>48</coreId>
<rtlModuleName/>
</Obj>
<node_objs>
<count>1</count>
<item_version>0</item_version>
<item>74</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_71">
<Obj>
<type>3</type>
<id>77</id>
<name>broadcaster_and_mac_request.exit</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<contextNormFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<control/>
<opType/>
<implIndex/>
<coreName/>
<isStorage>0</isStorage>
<storageDepth>0</storageDepth>
<coreId>2837302832</coreId>
<rtlModuleName/>
</Obj>
<node_objs>
<count>1</count>
<item_version>0</item_version>
<item>76</item>
</node_objs>
</item>
</blocks>
<edges class_id="19" tracking_level="0" version="0">
<count>101</count>
<item_version>0</item_version>
<item class_id="20" tracking_level="1" version="0" object_id="_72">
<id>78</id>
<edge_type>1</edge_type>
<source_obj>8</source_obj>
<sink_obj>22</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_73">
<id>81</id>
<edge_type>1</edge_type>
<source_obj>1</source_obj>
<sink_obj>23</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_74">
<id>82</id>
<edge_type>1</edge_type>
<source_obj>2</source_obj>
<sink_obj>23</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_75">
<id>83</id>
<edge_type>1</edge_type>
<source_obj>3</source_obj>
<sink_obj>23</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_76">
<id>84</id>
<edge_type>1</edge_type>
<source_obj>4</source_obj>
<sink_obj>23</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_77">
<id>86</id>
<edge_type>1</edge_type>
<source_obj>85</source_obj>
<sink_obj>23</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_78">
<id>87</id>
<edge_type>1</edge_type>
<source_obj>22</source_obj>
<sink_obj>24</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_79">
<id>88</id>
<edge_type>2</edge_type>
<source_obj>27</source_obj>
<sink_obj>24</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_80">
<id>89</id>
<edge_type>2</edge_type>
<source_obj>59</source_obj>
<sink_obj>24</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_81">
<id>90</id>
<edge_type>1</edge_type>
<source_obj>23</source_obj>
<sink_obj>26</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_82">
<id>91</id>
<edge_type>2</edge_type>
<source_obj>57</source_obj>
<sink_obj>26</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_83">
<id>92</id>
<edge_type>2</edge_type>
<source_obj>39</source_obj>
<sink_obj>26</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_84">
<id>95</id>
<edge_type>1</edge_type>
<source_obj>1</source_obj>
<sink_obj>28</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_85">
<id>96</id>
<edge_type>1</edge_type>
<source_obj>2</source_obj>
<sink_obj>28</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_86">
<id>97</id>
<edge_type>1</edge_type>
<source_obj>3</source_obj>
<sink_obj>28</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_87">
<id>98</id>
<edge_type>1</edge_type>
<source_obj>4</source_obj>
<sink_obj>28</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_88">
<id>99</id>
<edge_type>1</edge_type>
<source_obj>28</source_obj>
<sink_obj>29</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_89">
<id>100</id>
<edge_type>1</edge_type>
<source_obj>28</source_obj>
<sink_obj>30</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_90">
<id>101</id>
<edge_type>1</edge_type>
<source_obj>28</source_obj>
<sink_obj>31</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_91">
<id>104</id>
<edge_type>1</edge_type>
<source_obj>29</source_obj>
<sink_obj>32</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_92">
<id>106</id>
<edge_type>1</edge_type>
<source_obj>105</source_obj>
<sink_obj>32</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_93">
<id>108</id>
<edge_type>1</edge_type>
<source_obj>107</source_obj>
<sink_obj>32</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_94">
<id>111</id>
<edge_type>1</edge_type>
<source_obj>6</source_obj>
<sink_obj>33</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_95">
<id>113</id>
<edge_type>1</edge_type>
<source_obj>7</source_obj>
<sink_obj>34</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_96">
<id>114</id>
<edge_type>1</edge_type>
<source_obj>34</source_obj>
<sink_obj>35</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_97">
<id>115</id>
<edge_type>1</edge_type>
<source_obj>32</source_obj>
<sink_obj>35</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_98">
<id>116</id>
<edge_type>1</edge_type>
<source_obj>33</source_obj>
<sink_obj>36</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_99">
<id>117</id>
<edge_type>1</edge_type>
<source_obj>35</source_obj>
<sink_obj>36</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_100">
<id>118</id>
<edge_type>1</edge_type>
<source_obj>36</source_obj>
<sink_obj>37</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_101">
<id>120</id>
<edge_type>1</edge_type>
<source_obj>119</source_obj>
<sink_obj>37</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_102">
<id>121</id>
<edge_type>1</edge_type>
<source_obj>37</source_obj>
<sink_obj>38</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_103">
<id>122</id>
<edge_type>2</edge_type>
<source_obj>42</source_obj>
<sink_obj>38</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_104">
<id>123</id>
<edge_type>2</edge_type>
<source_obj>45</source_obj>
<sink_obj>38</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_105">
<id>126</id>
<edge_type>1</edge_type>
<source_obj>5</source_obj>
<sink_obj>43</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_106">
<id>127</id>
<edge_type>1</edge_type>
<source_obj>32</source_obj>
<sink_obj>43</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_107">
<id>128</id>
<edge_type>2</edge_type>
<source_obj>50</source_obj>
<sink_obj>44</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_108">
<id>130</id>
<edge_type>1</edge_type>
<source_obj>5</source_obj>
<sink_obj>40</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_109">
<id>131</id>
<edge_type>1</edge_type>
<source_obj>34</source_obj>
<sink_obj>40</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_110">
<id>132</id>
<edge_type>2</edge_type>
<source_obj>50</source_obj>
<sink_obj>41</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_111">
<id>135</id>
<edge_type>1</edge_type>
<source_obj>31</source_obj>
<sink_obj>46</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_112">
<id>136</id>
<edge_type>1</edge_type>
<source_obj>30</source_obj>
<sink_obj>46</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_113">
<id>137</id>
<edge_type>1</edge_type>
<source_obj>29</source_obj>
<sink_obj>46</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_114">
<id>138</id>
<edge_type>1</edge_type>
<source_obj>46</source_obj>
<sink_obj>47</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_115">
<id>141</id>
<edge_type>1</edge_type>
<source_obj>9</source_obj>
<sink_obj>48</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_116">
<id>142</id>
<edge_type>1</edge_type>
<source_obj>47</source_obj>
<sink_obj>48</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_117">
<id>143</id>
<edge_type>1</edge_type>
<source_obj>31</source_obj>
<sink_obj>49</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_118">
<id>144</id>
<edge_type>2</edge_type>
<source_obj>53</source_obj>
<sink_obj>49</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_119">
<id>145</id>
<edge_type>2</edge_type>
<source_obj>55</source_obj>
<sink_obj>49</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_120">
<id>147</id>
<edge_type>1</edge_type>
<source_obj>146</source_obj>
<sink_obj>51</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_121">
<id>148</id>
<edge_type>1</edge_type>
<source_obj>8</source_obj>
<sink_obj>51</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_122">
<id>149</id>
<edge_type>2</edge_type>
<source_obj>55</source_obj>
<sink_obj>52</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_123">
<id>150</id>
<edge_type>2</edge_type>
<source_obj>57</source_obj>
<sink_obj>54</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_124">
<id>151</id>
<edge_type>2</edge_type>
<source_obj>77</source_obj>
<sink_obj>56</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_125">
<id>152</id>
<edge_type>1</edge_type>
<source_obj>23</source_obj>
<sink_obj>58</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_126">
<id>153</id>
<edge_type>2</edge_type>
<source_obj>75</source_obj>
<sink_obj>58</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_127">
<id>154</id>
<edge_type>2</edge_type>
<source_obj>68</source_obj>
<sink_obj>58</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_128">
<id>156</id>
<edge_type>1</edge_type>
<source_obj>1</source_obj>
<sink_obj>60</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_129">
<id>157</id>
<edge_type>1</edge_type>
<source_obj>2</source_obj>
<sink_obj>60</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_130">
<id>158</id>
<edge_type>1</edge_type>
<source_obj>3</source_obj>
<sink_obj>60</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_131">
<id>159</id>
<edge_type>1</edge_type>
<source_obj>4</source_obj>
<sink_obj>60</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_132">
<id>160</id>
<edge_type>1</edge_type>
<source_obj>60</source_obj>
<sink_obj>61</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_133">
<id>161</id>
<edge_type>1</edge_type>
<source_obj>60</source_obj>
<sink_obj>62</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_134">
<id>162</id>
<edge_type>1</edge_type>
<source_obj>60</source_obj>
<sink_obj>63</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_135">
<id>164</id>
<edge_type>1</edge_type>
<source_obj>63</source_obj>
<sink_obj>64</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_136">
<id>165</id>
<edge_type>1</edge_type>
<source_obj>62</source_obj>
<sink_obj>64</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_137">
<id>166</id>
<edge_type>1</edge_type>
<source_obj>61</source_obj>
<sink_obj>64</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_138">
<id>167</id>
<edge_type>1</edge_type>
<source_obj>64</source_obj>
<sink_obj>65</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_139">
<id>169</id>
<edge_type>1</edge_type>
<source_obj>10</source_obj>
<sink_obj>66</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_140">
<id>170</id>
<edge_type>1</edge_type>
<source_obj>65</source_obj>
<sink_obj>66</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_141">
<id>171</id>
<edge_type>1</edge_type>
<source_obj>63</source_obj>
<sink_obj>67</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_142">
<id>172</id>
<edge_type>2</edge_type>
<source_obj>73</source_obj>
<sink_obj>67</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_143">
<id>173</id>
<edge_type>2</edge_type>
<source_obj>71</source_obj>
<sink_obj>67</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_144">
<id>175</id>
<edge_type>1</edge_type>
<source_obj>174</source_obj>
<sink_obj>69</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_145">
<id>176</id>
<edge_type>1</edge_type>
<source_obj>8</source_obj>
<sink_obj>69</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_146">
<id>177</id>
<edge_type>2</edge_type>
<source_obj>73</source_obj>
<sink_obj>70</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_147">
<id>178</id>
<edge_type>2</edge_type>
<source_obj>75</source_obj>
<sink_obj>72</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_148">
<id>179</id>
<edge_type>2</edge_type>
<source_obj>77</source_obj>
<sink_obj>74</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_149">
<id>365</id>
<edge_type>2</edge_type>
<source_obj>25</source_obj>
<sink_obj>59</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_150">
<id>366</id>
<edge_type>2</edge_type>
<source_obj>25</source_obj>
<sink_obj>27</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_151">
<id>367</id>
<edge_type>2</edge_type>
<source_obj>27</source_obj>
<sink_obj>39</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_152">
<id>368</id>
<edge_type>2</edge_type>
<source_obj>27</source_obj>
<sink_obj>57</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_153">
<id>369</id>
<edge_type>2</edge_type>
<source_obj>39</source_obj>
<sink_obj>45</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_154">
<id>370</id>
<edge_type>2</edge_type>
<source_obj>39</source_obj>
<sink_obj>42</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_155">
<id>371</id>
<edge_type>2</edge_type>
<source_obj>42</source_obj>
<sink_obj>50</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_156">
<id>372</id>
<edge_type>2</edge_type>
<source_obj>45</source_obj>
<sink_obj>50</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_157">
<id>373</id>
<edge_type>2</edge_type>
<source_obj>50</source_obj>
<sink_obj>55</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_158">
<id>374</id>
<edge_type>2</edge_type>
<source_obj>50</source_obj>
<sink_obj>53</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_159">
<id>375</id>
<edge_type>2</edge_type>
<source_obj>53</source_obj>
<sink_obj>55</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_160">
<id>376</id>
<edge_type>2</edge_type>
<source_obj>55</source_obj>
<sink_obj>57</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_161">
<id>377</id>
<edge_type>2</edge_type>
<source_obj>57</source_obj>
<sink_obj>77</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_162">
<id>378</id>
<edge_type>2</edge_type>
<source_obj>59</source_obj>
<sink_obj>68</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_163">
<id>379</id>
<edge_type>2</edge_type>
<source_obj>59</source_obj>
<sink_obj>75</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_164">
<id>380</id>
<edge_type>2</edge_type>
<source_obj>68</source_obj>
<sink_obj>71</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_165">
<id>381</id>
<edge_type>2</edge_type>
<source_obj>68</source_obj>
<sink_obj>73</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_166">
<id>382</id>
<edge_type>2</edge_type>
<source_obj>71</source_obj>
<sink_obj>73</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_167">
<id>383</id>
<edge_type>2</edge_type>
<source_obj>73</source_obj>
<sink_obj>75</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_168">
<id>384</id>
<edge_type>2</edge_type>
<source_obj>75</source_obj>
<sink_obj>77</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_169">
<id>385</id>
<edge_type>4</edge_type>
<source_obj>23</source_obj>
<sink_obj>60</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_170">
<id>386</id>
<edge_type>4</edge_type>
<source_obj>23</source_obj>
<sink_obj>28</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_171">
<id>387</id>
<edge_type>4</edge_type>
<source_obj>22</source_obj>
<sink_obj>69</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_172">
<id>388</id>
<edge_type>4</edge_type>
<source_obj>22</source_obj>
<sink_obj>51</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
</edges>
</cdfg>
<cdfg_regions class_id="21" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="22" tracking_level="1" version="0" object_id="_173">
<mId>1</mId>
<mTag>broadcaster_and_mac_request</mTag>
<mNormTag>broadcaster_and_mac_request</mNormTag>
<mType>0</mType>
<sub_regions>
<count>0</count>
<item_version>0</item_version>
</sub_regions>
<basic_blocks>
<count>15</count>
<item_version>0</item_version>
<item>25</item>
<item>27</item>
<item>39</item>
<item>42</item>
<item>45</item>
<item>50</item>
<item>53</item>
<item>55</item>
<item>57</item>
<item>59</item>
<item>68</item>
<item>71</item>
<item>73</item>
<item>75</item>
<item>77</item>
</basic_blocks>
<mII>1</mII>
<mDepth>3</mDepth>
<mMinTripCount>-1</mMinTripCount>
<mMaxTripCount>-1</mMaxTripCount>
<mMinLatency>2</mMinLatency>
<mMaxLatency>2</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"/>
</item>
</cdfg_regions>
<fsm class_id="24" tracking_level="1" version="0" object_id="_174">
<states class_id="25" tracking_level="0" version="0">
<count>3</count>
<item_version>0</item_version>
<item class_id="26" tracking_level="1" version="0" object_id="_175">
<id>1</id>
<operations class_id="27" tracking_level="0" version="0">
<count>41</count>
<item_version>0</item_version>
<item class_id="28" tracking_level="1" version="0" object_id="_176">
<id>11</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_177">
<id>12</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_178">
<id>13</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_179">
<id>14</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_180">
<id>15</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_181">
<id>16</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_182">
<id>17</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_183">
<id>18</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_184">
<id>19</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_185">
<id>20</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_186">
<id>21</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_187">
<id>22</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_188">
<id>23</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_189">
<id>24</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_190">
<id>26</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_191">
<id>28</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_192">
<id>29</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_193">
<id>30</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_194">
<id>31</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_195">
<id>32</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_196">
<id>33</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_197">
<id>34</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_198">
<id>35</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_199">
<id>36</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_200">
<id>37</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_201">
<id>38</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_202">
<id>49</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_203">
<id>51</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_204">
<id>52</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_205">
<id>54</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_206">
<id>56</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_207">
<id>58</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_208">
<id>60</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_209">
<id>61</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_210">
<id>62</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_211">
<id>63</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_212">
<id>67</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_213">
<id>69</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_214">
<id>70</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_215">
<id>72</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_216">
<id>74</id>
<stage>1</stage>
<latency>1</latency>
</item>
</operations>
</item>
<item class_id_reference="26" object_id="_217">
<id>2</id>
<operations>
<count>8</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_218">
<id>40</id>
<stage>2</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_219">
<id>43</id>
<stage>2</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_220">
<id>46</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_221">
<id>47</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_222">
<id>48</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_223">
<id>64</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_224">
<id>65</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_225">
<id>66</id>
<stage>1</stage>
<latency>1</latency>
</item>
</operations>
</item>
<item class_id_reference="26" object_id="_226">
<id>3</id>
<operations>
<count>5</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_227">
<id>40</id>
<stage>1</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_228">
<id>41</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_229">
<id>43</id>
<stage>1</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_230">
<id>44</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_231">
<id>76</id>
<stage>1</stage>
<latency>1</latency>
</item>
</operations>
</item>
</states>
<transitions class_id="29" tracking_level="0" version="0">
<count>2</count>
<item_version>0</item_version>
<item class_id="30" tracking_level="1" version="0" object_id="_232">
<inState>1</inState>
<outState>2</outState>
<condition class_id="31" tracking_level="0" version="0">
<id>-1</id>
<sop class_id="32" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="33" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</item>
</sop>
</condition>
</item>
<item class_id_reference="30" object_id="_233">
<inState>2</inState>
<outState>3</outState>
<condition>
<id>-1</id>
<sop>
<count>1</count>
<item_version>0</item_version>
<item>
<count>0</count>
<item_version>0</item_version>
</item>
</sop>
</condition>
</item>
</transitions>
</fsm>
<res class_id="34" tracking_level="1" version="0" object_id="_234">
<dp_component_resource class_id="35" tracking_level="0" version="0">
<count>5</count>
<item_version>0</item_version>
<item class_id="36" tracking_level="0" version="0">
<first>regslice_both_arpTableRequest_V_U (ethernet_header_inserter_regslice_both)</first>
<second class_id="37" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</second>
</item>
<item>
<first>regslice_both_dataIn_V_data_V_U (ethernet_header_inserter_regslice_both)</first>
<second>
<count>0</count>
<item_version>0</item_version>
</second>
</item>
<item>
<first>regslice_both_dataIn_V_keep_V_U (ethernet_header_inserter_regslice_both)</first>
<second>
<count>0</count>
<item_version>0</item_version>
</second>
</item>
<item>
<first>regslice_both_dataIn_V_last_V_U (ethernet_header_inserter_regslice_both)</first>
<second>
<count>0</count>
<item_version>0</item_version>
</second>
</item>
<item>
<first>regslice_both_dataIn_V_strb_V_U (ethernet_header_inserter_regslice_both)</first>
<second>
<count>0</count>
<item_version>0</item_version>
</second>
</item>
</dp_component_resource>
<dp_expression_resource>
<count>22</count>
<item_version>0</item_version>
<item>
<first>and_ln1049_fu_157_p2 ( and ) </first>
<second>
<count>4</count>
<item_version>0</item_version>
<item class_id="38" tracking_level="0" version="0">
<first>(0P0)</first>
<second>32</second>
</item>
<item>
<first>(1P1)</first>
<second>32</second>
</item>
<item>
<first>FF</first>
<second>0</second>
</item>
<item>
<first>LUT</first>
<second>32</second>
</item>
</second>
</item>
<item>
<first>ap_block_pp0_stage0_01001 ( or ) </first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0P0)</first>
<second>1</second>
</item>
<item>
<first>(1P1)</first>
<second>1</second>
</item>
<item>
<first>FF</first>
<second>0</second>
</item>
<item>
<first>LUT</first>
<second>2</second>
</item>
</second>
</item>
<item>
<first>ap_block_pp0_stage0_11001 ( or ) </first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0P0)</first>
<second>1</second>
</item>
<item>
<first>(1P1)</first>
<second>1</second>
</item>
<item>
<first>FF</first>
<second>0</second>
</item>
<item>
<first>LUT</first>
<second>2</second>
</item>
</second>
</item>
<item>
<first>ap_block_state1_pp0_stage0_iter0 ( or ) </first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0P0)</first>
<second>1</second>
</item>
<item>
<first>(1P1)</first>
<second>1</second>
</item>
<item>
<first>FF</first>
<second>0</second>
</item>
<item>
<first>LUT</first>
<second>2</second>
</item>
</second>
</item>
<item>
<first>ap_block_state2_io ( or ) </first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0P0)</first>
<second>1</second>
</item>
<item>
<first>(1P1)</first>
<second>1</second>
</item>
<item>
<first>FF</first>
<second>0</second>
</item>
<item>
<first>LUT</first>
<second>2</second>
</item>
</second>
</item>
<item>
<first>ap_block_state2_pp0_stage0_iter1 ( or ) </first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0P0)</first>
<second>1</second>
</item>
<item>
<first>(1P1)</first>
<second>1</second>
</item>
<item>
<first>FF</first>
<second>0</second>
</item>
<item>
<first>LUT</first>
<second>2</second>
</item>
</second>
</item>
<item>
<first>ap_block_state3_io ( or ) </first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0P0)</first>
<second>1</second>
</item>
<item>
<first>(1P1)</first>
<second>1</second>
</item>
<item>
<first>FF</first>
<second>0</second>
</item>
<item>
<first>LUT</first>
<second>2</second>
</item>
</second>
</item>
<item>
<first>ap_block_state3_pp0_stage0_iter2 ( or ) </first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0P0)</first>
<second>1</second>
</item>
<item>
<first>(1P1)</first>
<second>1</second>
</item>
<item>
<first>FF</first>
<second>0</second>
</item>
<item>
<first>LUT</first>
<second>2</second>
</item>
</second>
</item>
<item>
<first>ap_condition_241 ( and ) </first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0P0)</first>
<second>1</second>
</item>
<item>
<first>(1P1)</first>
<second>1</second>
</item>
<item>
<first>FF</first>
<second>0</second>
</item>
<item>
<first>LUT</first>
<second>2</second>
</item>
</second>
</item>
<item>
<first>ap_condition_391 ( and ) </first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0P0)</first>
<second>1</second>
</item>
<item>
<first>(1P1)</first>
<second>1</second>
</item>
<item>
<first>FF</first>
<second>0</second>
</item>
<item>
<first>LUT</first>
<second>2</second>
</item>
</second>
</item>
<item>
<first>ap_enable_pp0 ( xor ) </first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0P0)</first>
<second>1</second>
</item>
<item>
<first>(1P1)</first>
<second>2</second>
</item>
<item>
<first>FF</first>
<second>0</second>
</item>
<item>
<first>LUT</first>
<second>2</second>
</item>
</second>
</item>
<item>
<first>ap_predicate_op19_read_state1 ( and ) </first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0P0)</first>
<second>1</second>
</item>
<item>
<first>(1P1)</first>
<second>1</second>
</item>
<item>
<first>FF</first>
<second>0</second>
</item>
<item>
<first>LUT</first>
<second>2</second>
</item>
</second>
</item>
<item>
<first>ap_predicate_op36_read_state1 ( and ) </first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0P0)</first>
<second>1</second>
</item>
<item>
<first>(1P1)</first>
<second>1</second>
</item>
<item>
<first>FF</first>
<second>0</second>
</item>
<item>
<first>LUT</first>
<second>2</second>
</item>
</second>
</item>
<item>
<first>ap_predicate_op45_write_state2 ( and ) </first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0P0)</first>
<second>1</second>
</item>
<item>
<first>(1P1)</first>
<second>1</second>
</item>
<item>
<first>FF</first>
<second>0</second>
</item>
<item>
<first>LUT</first>
<second>2</second>
</item>
</second>
</item>
<item>
<first>ap_predicate_op46_write_state2 ( and ) </first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0P0)</first>
<second>1</second>
</item>
<item>
<first>(1P1)</first>
<second>1</second>
</item>
<item>
<first>FF</first>
<second>0</second>
</item>
<item>
<first>LUT</first>
<second>2</second>
</item>
</second>
</item>
<item>
<first>ap_predicate_op49_write_state2 ( and ) </first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0P0)</first>
<second>1</second>
</item>
<item>
<first>(1P1)</first>
<second>1</second>
</item>
<item>
<first>FF</first>
<second>0</second>
</item>
<item>
<first>LUT</first>
<second>2</second>
</item>
</second>
</item>
<item>
<first>ap_predicate_op52_write_state2 ( and ) </first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0P0)</first>
<second>1</second>
</item>
<item>
<first>(1P1)</first>
<second>1</second>
</item>
<item>
<first>FF</first>
<second>0</second>
</item>
<item>
<first>LUT</first>
<second>2</second>
</item>
</second>
</item>
<item>
<first>ap_predicate_op53_write_state3 ( and ) </first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0P0)</first>
<second>1</second>
</item>
<item>
<first>(1P1)</first>
<second>1</second>
</item>
<item>
<first>FF</first>
<second>0</second>
</item>
<item>
<first>LUT</first>
<second>2</second>
</item>
</second>
</item>
<item>
<first>ap_predicate_op55_write_state3 ( and ) </first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0P0)</first>
<second>1</second>
</item>
<item>
<first>(1P1)</first>
<second>1</second>
</item>
<item>
<first>FF</first>
<second>0</second>
</item>
<item>
<first>LUT</first>
<second>2</second>
</item>
</second>
</item>
<item>
<first>icmp_ln1049_fu_163_p2 ( icmp ) </first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0P0)</first>
<second>32</second>
</item>
<item>
<first>(1P1)</first>
<second>1</second>
</item>
<item>
<first>FF</first>
<second>0</second>
</item>
<item>
<first>LUT</first>
<second>20</second>
</item>
</second>
</item>
<item>
<first>tmp_nbreadreq_fu_58_p6 ( and ) </first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(0P0)</first>
<second>1</second>
</item>
<item>
<first>FF</first>
<second>0</second>
</item>
<item>
<first>LUT</first>
<second>2</second>
</item>
</second>
</item>
<item>
<first>xor_ln1049_fu_151_p2 ( xor ) </first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0P0)</first>
<second>32</second>
</item>
<item>
<first>(1P1)</first>
<second>32</second>
</item>
<item>
<first>FF</first>
<second>0</second>
</item>
<item>
<first>LUT</first>
<second>32</second>
</item>
</second>
</item>
</dp_expression_resource>
<dp_fifo_resource>
<count>0</count>
<item_version>0</item_version>
</dp_fifo_resource>
<dp_memory_resource>
<count>0</count>
<item_version>0</item_version>
</dp_memory_resource>
<dp_multiplexer_resource>
<count>7</count>
<item_version>0</item_version>
<item>
<first>ap_done</first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0Size)</first>
<second>2</second>
</item>
<item>
<first>(1Bits)</first>
<second>1</second>
</item>
<item>
<first>(2Count)</first>
<second>2</second>
</item>
<item>
<first>LUT</first>
<second>9</second>
</item>
</second>
</item>
<item>
<first>arpTableRequest_V_TDATA_blk_n</first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0Size)</first>
<second>2</second>
</item>
<item>
<first>(1Bits)</first>
<second>1</second>
</item>
<item>
<first>(2Count)</first>
<second>2</second>
</item>
<item>
<first>LUT</first>
<second>9</second>
</item>
</second>
</item>
<item>
<first>arpTableRequest_V_TDATA_int_regslice</first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0Size)</first>
<second>3</second>
</item>
<item>
<first>(1Bits)</first>
<second>32</second>
</item>
<item>
<first>(2Count)</first>
<second>96</second>
</item>
<item>
<first>LUT</first>
<second>14</second>
</item>
</second>
</item>
<item>
<first>dataIn_TDATA_blk_n</first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0Size)</first>
<second>2</second>
</item>
<item>
<first>(1Bits)</first>
<second>1</second>
</item>
<item>
<first>(2Count)</first>
<second>2</second>
</item>
<item>
<first>LUT</first>
<second>9</second>
</item>
</second>
</item>
<item>
<first>ip_header_out_blk_n</first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0Size)</first>
<second>2</second>
</item>
<item>
<first>(1Bits)</first>
<second>1</second>
</item>
<item>
<first>(2Count)</first>
<second>2</second>
</item>
<item>
<first>LUT</first>
<second>9</second>
</item>
</second>
</item>
<item>
<first>no_ip_header_out_blk_n</first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0Size)</first>
<second>2</second>
</item>
<item>
<first>(1Bits)</first>
<second>1</second>
</item>
<item>
<first>(2Count)</first>
<second>2</second>
</item>
<item>
<first>LUT</first>
<second>9</second>
</item>
</second>
</item>
<item>
<first>real_start</first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0Size)</first>
<second>2</second>
</item>
<item>
<first>(1Bits)</first>
<second>1</second>
</item>
<item>
<first>(2Count)</first>
<second>2</second>
</item>
<item>
<first>LUT</first>
<second>9</second>
</item>
</second>
</item>
</dp_multiplexer_resource>
<dp_register_resource>
<count>18</count>
<item_version>0</item_version>
<item>
<first>ap_CS_fsm</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>1</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>1</second>
</item>
</second>
</item>
<item>
<first>ap_done_reg</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>1</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>1</second>
</item>
</second>
</item>
<item>
<first>ap_enable_reg_pp0_iter1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>1</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>1</second>
</item>
</second>
</item>
<item>
<first>ap_enable_reg_pp0_iter2</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>1</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>1</second>
</item>
</second>
</item>
<item>
<first>bmr_fsm_state</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>1</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>1</second>
</item>
</second>
</item>
<item>
<first>bmr_fsm_state_load_reg_209</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>1</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>1</second>
</item>
</second>
</item>
<item>
<first>bmr_fsm_state_load_reg_209_pp0_iter1_reg</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>1</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>1</second>
</item>
</second>
</item>
<item>
<first>dst_ip_addr_V_reg_222</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>32</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>32</second>
</item>
</second>
</item>
<item>
<first>icmp_ln1049_reg_232</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>1</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>1</second>
</item>
</second>
</item>
<item>
<first>icmp_ln1049_reg_232_pp0_iter1_reg</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>1</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>1</second>
</item>
</second>
</item>
<item>
<first>lhs_V_1_reg_227</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>32</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>32</second>
</item>
</second>
</item>
<item>
<first>reg_129</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>512</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>512</second>
</item>
</second>
</item>
<item>
<first>reg_133</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>64</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>64</second>
</item>
</second>
</item>
<item>
<first>start_once_reg</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>1</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>1</second>
</item>
</second>
</item>
<item>
<first>tmp_27_reg_217</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>1</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>1</second>
</item>
</second>
</item>
<item>
<first>tmp_28_reg_236</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>1</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>1</second>
</item>
</second>
</item>
<item>
<first>tmp_reg_213</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>1</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>1</second>
</item>
</second>
</item>
<item>
<first>tmp_reg_213_pp0_iter1_reg</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>1</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>1</second>
</item>
</second>
</item>
</dp_register_resource>
<dp_dsp_resource>
<count>5</count>
<item_version>0</item_version>
<item>
<first>regslice_both_arpTableRequest_V_U</first>
<second>
<count>0</count>
<item_version>0</item_version>
</second>
</item>
<item>
<first>regslice_both_dataIn_V_data_V_U</first>
<second>
<count>0</count>
<item_version>0</item_version>
</second>
</item>
<item>
<first>regslice_both_dataIn_V_keep_V_U</first>
<second>
<count>0</count>
<item_version>0</item_version>
</second>
</item>
<item>
<first>regslice_both_dataIn_V_last_V_U</first>
<second>
<count>0</count>
<item_version>0</item_version>
</second>
</item>
<item>
<first>regslice_both_dataIn_V_strb_V_U</first>
<second>
<count>0</count>
<item_version>0</item_version>
</second>
</item>
</dp_dsp_resource>
<dp_component_map class_id="39" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</dp_component_map>
<dp_expression_map>
<count>3</count>
<item_version>0</item_version>
<item class_id="40" tracking_level="0" version="0">
<first>and_ln1049_fu_157_p2 ( and ) </first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>36</item>
</second>
</item>
<item>
<first>icmp_ln1049_fu_163_p2 ( icmp ) </first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>37</item>
</second>
</item>
<item>
<first>xor_ln1049_fu_151_p2 ( xor ) </first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>35</item>
</second>
</item>
</dp_expression_map>
<dp_fifo_map>
<count>0</count>
<item_version>0</item_version>
</dp_fifo_map>
<dp_memory_map>
<count>0</count>
<item_version>0</item_version>
</dp_memory_map>
</res>
<node_label_latency class_id="41" tracking_level="0" version="0">
<count>41</count>
<item_version>0</item_version>
<item class_id="42" tracking_level="0" version="0">
<first>22</first>
<second class_id="43" tracking_level="0" version="0">
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>23</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>24</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>26</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>28</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>29</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>30</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>31</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>32</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>33</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>34</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>35</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>36</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>37</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>38</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>40</first>
<second>
<first>1</first>
<second>1</second>
</second>
</item>
<item>
<first>41</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>43</first>
<second>
<first>1</first>
<second>1</second>
</second>
</item>
<item>
<first>44</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>46</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>47</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>48</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>49</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>51</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>52</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>54</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>56</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>58</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>60</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>61</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>62</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>63</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>64</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>65</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>66</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>67</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>69</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>70</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>72</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>74</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>76</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
</node_label_latency>
<bblk_ent_exit class_id="44" tracking_level="0" version="0">
<count>15</count>
<item_version>0</item_version>
<item class_id="45" tracking_level="0" version="0">
<first>25</first>
<second class_id="46" tracking_level="0" version="0">
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>27</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>39</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>42</first>
<second>
<first>0</first>
<second>2</second>
</second>
</item>
<item>
<first>45</first>
<second>
<first>0</first>
<second>2</second>
</second>
</item>
<item>
<first>50</first>
<second>
<first>0</first>
<second>1</second>
</second>
</item>
<item>
<first>53</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>55</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>57</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>59</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>68</first>
<second>
<first>0</first>
<second>1</second>
</second>
</item>
<item>
<first>71</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>73</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>75</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>77</first>
<second>
<first>2</first>
<second>2</second>
</second>
</item>
</bblk_ent_exit>
<regions class_id="47" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="48" tracking_level="1" version="0" object_id="_235">
<region_name>broadcaster_and_mac_request</region_name>
<basic_blocks>
<count>15</count>
<item_version>0</item_version>
<item>25</item>
<item>27</item>
<item>39</item>
<item>42</item>
<item>45</item>
<item>50</item>
<item>53</item>
<item>55</item>
<item>57</item>
<item>59</item>
<item>68</item>
<item>71</item>
<item>73</item>
<item>75</item>
<item>77</item>
</basic_blocks>
<nodes>
<count>0</count>
<item_version>0</item_version>
</nodes>
<anchor_node>-1</anchor_node>
<region_type>8</region_type>
<interval>1</interval>
<pipe_depth>3</pipe_depth>
<mDBIIViolationVec class_id="49" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</mDBIIViolationVec>
</item>
</regions>
<dp_fu_nodes class_id="50" tracking_level="0" version="0">
<count>21</count>
<item_version>0</item_version>
<item class_id="51" tracking_level="0" version="0">
<first>58</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>23</item>
</second>
</item>
<item>
<first>72</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>28</item>
<item>60</item>
</second>
</item>
<item>
<first>84</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>33</item>
</second>
</item>
<item>
<first>90</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>34</item>
</second>
</item>
<item>
<first>96</first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>40</item>
<item>40</item>
<item>43</item>
<item>43</item>
</second>
</item>
<item>
<first>103</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>48</item>
</second>
</item>
<item>
<first>110</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>66</item>
</second>
</item>
<item>
<first>117</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>29</item>
<item>61</item>
</second>
</item>
<item>
<first>121</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>30</item>
<item>62</item>
</second>
</item>
<item>
<first>125</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>31</item>
<item>63</item>
</second>
</item>
<item>
<first>137</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>22</item>
</second>
</item>
<item>
<first>141</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>32</item>
</second>
</item>
<item>
<first>151</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>35</item>
</second>
</item>
<item>
<first>157</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>36</item>
</second>
</item>
<item>
<first>163</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>37</item>
</second>
</item>
<item>
<first>169</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>51</item>
</second>
</item>
<item>
<first>175</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>69</item>
</second>
</item>
<item>
<first>181</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>46</item>
</second>
</item>
<item>
<first>190</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>47</item>
</second>
</item>
<item>
<first>195</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>64</item>
</second>
</item>
<item>
<first>204</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>65</item>
</second>
</item>
</dp_fu_nodes>
<dp_fu_nodes_expression class_id="53" tracking_level="0" version="0">
<count>11</count>
<item_version>0</item_version>
<item class_id="54" tracking_level="0" version="0">
<first>and_ln1049_fu_157</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>36</item>
</second>
</item>
<item>
<first>dst_ip_addr_V_fu_141</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>32</item>
</second>
</item>
<item>
<first>grp_fu_117</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>29</item>
<item>61</item>
</second>
</item>
<item>
<first>grp_fu_121</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>30</item>
<item>62</item>
</second>
</item>
<item>
<first>grp_fu_125</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>31</item>
<item>63</item>
</second>
</item>
<item>
<first>icmp_ln1049_fu_163</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>37</item>
</second>
</item>
<item>
<first>tmp_47_i_fu_195</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>64</item>
</second>
</item>
<item>
<first>tmp_52_i_fu_181</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>46</item>
</second>
</item>
<item>
<first>xor_ln1049_fu_151</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>35</item>
</second>
</item>
<item>
<first>zext_ln174_1_fu_190</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>47</item>
</second>
</item>
<item>
<first>zext_ln174_fu_204</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>65</item>
</second>
</item>
</dp_fu_nodes_expression>
<dp_fu_nodes_module>
<count>0</count>
<item_version>0</item_version>
</dp_fu_nodes_module>
<dp_fu_nodes_io>
<count>10</count>
<item_version>0</item_version>
<item>
<first>bmr_fsm_state_load_load_fu_137</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>22</item>
</second>
</item>
<item>
<first>grp_read_fu_72</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>28</item>
<item>60</item>
</second>
</item>
<item>
<first>grp_write_fu_96</first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>40</item>
<item>40</item>
<item>43</item>
<item>43</item>
</second>
</item>
<item>
<first>lhs_V_1_read_fu_90</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>34</item>
</second>
</item>
<item>
<first>rhs_V_read_fu_84</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>33</item>
</second>
</item>
<item>
<first>store_ln0_store_fu_169</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>51</item>
</second>
</item>
<item>
<first>store_ln0_store_fu_175</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>69</item>
</second>
</item>
<item>
<first>tmp_nbreadreq_fu_58</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>23</item>
</second>
</item>
<item>
<first>write_ln174_write_fu_103</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>48</item>
</second>
</item>
<item>
<first>write_ln174_write_fu_110</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>66</item>
</second>
</item>
</dp_fu_nodes_io>
<return_ports>
<count>0</count>
<item_version>0</item_version>
</return_ports>
<dp_mem_port_nodes class_id="55" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</dp_mem_port_nodes>
<dp_reg_nodes>
<count>9</count>
<item_version>0</item_version>
<item>
<first>129</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>29</item>
<item>61</item>
</second>
</item>
<item>
<first>133</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>30</item>
<item>62</item>
</second>
</item>
<item>
<first>209</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>22</item>
</second>
</item>
<item>
<first>213</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>23</item>
</second>
</item>
<item>
<first>217</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>31</item>
</second>
</item>
<item>
<first>222</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>32</item>
</second>
</item>
<item>
<first>227</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>34</item>
</second>
</item>
<item>
<first>232</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>37</item>
</second>
</item>
<item>
<first>236</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>63</item>
</second>
</item>
</dp_reg_nodes>
<dp_regname_nodes>
<count>9</count>
<item_version>0</item_version>
<item>
<first>bmr_fsm_state_load_reg_209</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>22</item>
</second>
</item>
<item>
<first>dst_ip_addr_V_reg_222</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>32</item>
</second>
</item>
<item>
<first>icmp_ln1049_reg_232</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>37</item>
</second>
</item>
<item>
<first>lhs_V_1_reg_227</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>34</item>
</second>
</item>
<item>
<first>reg_129</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>29</item>
<item>61</item>
</second>
</item>
<item>
<first>reg_133</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>30</item>
<item>62</item>
</second>
</item>
<item>
<first>tmp_27_reg_217</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>31</item>
</second>
</item>
<item>
<first>tmp_28_reg_236</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>63</item>
</second>
</item>
<item>
<first>tmp_reg_213</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>23</item>
</second>
</item>
</dp_regname_nodes>
<dp_reg_phi>
<count>0</count>
<item_version>0</item_version>
</dp_reg_phi>
<dp_regname_phi>
<count>0</count>
<item_version>0</item_version>
</dp_regname_phi>
<dp_port_io_nodes class_id="56" tracking_level="0" version="0">
<count>9</count>
<item_version>0</item_version>
<item class_id="57" tracking_level="0" version="0">
<first>arpTableRequest_V</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>write</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>43</item>
<item>40</item>
</second>
</item>
</second>
</item>
<item>
<first>dataIn_V_data_V</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>nbreadreq</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>23</item>
</second>
</item>
<item>
<first>read</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>28</item>
<item>60</item>
</second>
</item>
</second>
</item>
<item>
<first>dataIn_V_keep_V</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>nbreadreq</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>23</item>
</second>
</item>
<item>
<first>read</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>28</item>
<item>60</item>
</second>
</item>
</second>
</item>
<item>
<first>dataIn_V_last_V</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>nbreadreq</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>23</item>
</second>
</item>
<item>
<first>read</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>28</item>
<item>60</item>
</second>
</item>
</second>
</item>
<item>
<first>dataIn_V_strb_V</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>nbreadreq</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>23</item>
</second>
</item>
<item>
<first>read</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>28</item>
<item>60</item>
</second>
</item>
</second>
</item>
<item>
<first>ip_header_out</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>write</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>48</item>
</second>
</item>
</second>
</item>
<item>
<first>no_ip_header_out</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>write</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>66</item>
</second>
</item>
</second>
</item>
<item>
<first>regDefaultGateway</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>read</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>34</item>
</second>
</item>
</second>
</item>
<item>
<first>regSubNetMask</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>read</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>33</item>
</second>
</item>
</second>
</item>
</dp_port_io_nodes>
<port2core>
<count>2</count>
<item_version>0</item_version>
<item>
<first>9</first>
<second>
<first>1151</first>
<second>7</second>
</second>
</item>
<item>
<first>10</first>
<second>
<first>1151</first>
<second>7</second>
</second>
</item>
</port2core>
<node2core>
<count>10</count>
<item_version>0</item_version>
<item>
<first>23</first>
<second>
<first>888</first>
<second>111</second>
</second>
</item>
<item>
<first>28</first>
<second>
<first>888</first>
<second>111</second>
</second>
</item>
<item>
<first>35</first>
<second>
<first>25</first>
<second>0</second>
</second>
</item>
<item>
<first>36</first>
<second>
<first>23</first>
<second>0</second>
</second>
</item>
<item>
<first>37</first>
<second>
<first>45</first>
<second>0</second>
</second>
</item>
<item>
<first>40</first>
<second>
<first>888</first>
<second>111</second>
</second>
</item>
<item>
<first>43</first>
<second>
<first>888</first>
<second>111</second>
</second>
</item>
<item>
<first>48</first>
<second>
<first>1151</first>
<second>7</second>
</second>
</item>
<item>
<first>60</first>
<second>
<first>888</first>
<second>111</second>
</second>
</item>
<item>
<first>66</first>
<second>
<first>1151</first>
<second>7</second>
</second>
</item>
</node2core>
</syndb>
</boost_serialization>
|
-- Copyright (c) 2021, Karsten Lueth (kl@kloc-consulting.de)
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions are met:
--
-- 1. Redistributions of source code must retain the above copyright notice,
-- this list of conditions and the following disclaimer.
--
-- 2. Redistributions in binary form must reproduce the above copyright notice,
-- this list of conditions and the following disclaimer in the documentation
-- and/or other materials provided with the distribution.
--
-- 3. Neither the name of the copyright holder nor the names of its
-- contributors may be used to endorse or promote products derived from
-- this software without specific prior written permission.
--
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
-- OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-- WHETHER IN CONTRACT, STRICT LIABILITY,
-- OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
-- USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--
--
-- Initial contribution by: Lancaster University
-- https://github.com/lancaster-university/microbit-dal
-- class MicroBitLightSensor
with MicroBit.IOs; use MicroBit.IOs;
with nRF.Device;
with nRF.GPIO; use nRF.GPIO;
with MicroBit.Time;
package body Light_Sensor is
Row_Pts : constant array (1..3) of nRF.GPIO.GPIO_Point :=
(nRF.Device.P13, nRF.Device.P14, nRF.Device.P15);
Light_Sensor_Min : constant Integer := 100;
Light_Sensor_Max : constant Integer := 200;
---------------------
-- Disable_Rows --
---------------------
procedure Disable_Rows is
Conf : GPIO_Configuration;
Pt : GPIO_Point;
begin
Conf.Mode := Mode_Out;
Conf.Resistors := No_Pull;
Conf.Input_Buffer := Input_Buffer_Connect;
Conf.Sense := Sense_Disabled;
for Index in Row_Pts'First .. Row_Pts'Last loop
Pt := Row_Pts (Index);
Pt.Configure_IO (Conf);
Pt.Clear;
end loop;
end Disable_Rows;
--------------
-- Limit --
--------------
function Limit(Value, Min, Max: Integer) return Integer is
begin
if Value < Min then
return Min;
elsif Value > Max then
return Max;
else
return Value;
end if;
end Limit;
------------------
-- Normalize --
------------------
function Normalize
(Value: Integer;
In_Min, In_Max : Integer;
Out_Min, Out_Max : Integer) return Integer is
begin
return Out_Min +
( (((Value - In_Min) * (Out_Max - Out_min)) /
(In_Max - In_Min)));
end Normalize;
--------------------------
-- Read_Analog_Value --
--------------------------
function Read_Analog_Value return Luminosity is
Raw : MicroBit.IOs.Analog_Value;
Inverted : Integer;
Normalized : Integer;
Col_Pin : constant Pin_Id := 3; -- Col 1
begin
MicroBit.IOs.Set (Col_Pin, True);
MicroBit.Time.Delay_Ms(1);
Raw := MicroBit.IOs.Analog (Col_Pin);
MicroBit.IOs.Set (Col_Pin, True);
Inverted := Limit (Integer (Raw), Light_Sensor_Min, Light_Sensor_Max);
Inverted := (Light_Sensor_Max - Inverted) + Light_Sensor_Min;
Normalized := Normalize (Value => Inverted,
In_Min => Light_Sensor_Min,
In_Max => Light_Sensor_Max,
Out_Min => Integer (Luminosity'First),
Out_Max => Integer (Luminosity'Last));
MicroBit.IOs.Set (Col_Pin, False);
return Luminosity (Normalized);
end Read_Analog_Value;
-------------
-- Read --
-------------
function Read return Luminosity is
begin
Disable_Rows;
MicroBit.Time.Delay_Ms(5);
return Read_Analog_Value;
end Read;
end Light_Sensor;
|
-----------------------------------------------------------------------
-- util-concurrent-fifos -- Concurrent Fifo Queues
-- Copyright (C) 2012, 2017, 2020 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-----------------------------------------------------------------------
with Ada.Finalization;
-- The `Util.Concurrent.Fifos` generic defines a queue of objects which
-- can be shared by multiple threads. First, the queue size is configured
-- by using the `Set_Size` procedure. Then, a thread can insert elements
-- in the queue by using the `Enqueue` procedure. The thread will block
-- if the queue is full. Another thread can use the `Dequeue` procedure
-- to fetch the oldest element from the queue. The thread will block
-- until an element is inserted if the queue is empty.
generic
type Element_Type is private;
-- The default queue size.
Default_Size : in Positive;
-- After a dequeue, clear the element stored in the queue.
Clear_On_Dequeue : in Boolean := False;
package Util.Concurrent.Fifos is
FOREVER : constant Duration := -1.0;
-- Exception raised if the enqueue or dequeue timeout exceeded.
Timeout : exception;
-- Fifo of objects
type Fifo is new Ada.Finalization.Limited_Controlled with private;
-- Put the element in the queue.
procedure Enqueue (Into : in out Fifo;
Item : in Element_Type;
Wait : in Duration := FOREVER);
-- Get an element from the queue.
-- Wait until one element gets available.
procedure Dequeue (From : in out Fifo;
Item : out Element_Type;
Wait : in Duration := FOREVER);
-- Wait for the fifo to become empty.
procedure Wait_Empty (From : in out Fifo);
-- Get the number of elements in the queue.
function Get_Count (From : in Fifo) return Natural;
-- Set the queue size.
procedure Set_Size (Into : in out Fifo;
Capacity : in Positive);
-- Initializes the queue.
overriding
procedure Initialize (Object : in out Fifo);
-- Release the queue elements.
overriding
procedure Finalize (Object : in out Fifo);
private
-- To store the queue elements, we use an array which is allocated dynamically
-- by the `Set_Size` protected operation. The generated code is smaller
-- compared to the use of Ada vectors container.
type Element_Array is array (Natural range <>) of Element_Type;
type Element_Array_Access is access all Element_Array;
Null_Element_Array : constant Element_Array_Access := null;
-- Queue of objects.
protected type Protected_Fifo is
-- Put the element in the queue.
-- If the queue is full, wait until some room is available.
entry Enqueue (Item : in Element_Type);
-- Get an element from the queue.
-- Wait until one element gets available.
entry Dequeue (Item : out Element_Type);
-- Wait for the queue to become empty.
entry Wait_Empty;
-- Get the number of elements in the queue.
function Get_Count return Natural;
-- Set the queue size.
procedure Set_Size (Capacity : in Natural);
private
First : Positive := 1;
Last : Positive := 1;
Count : Natural := 0;
Elements : Element_Array_Access := Null_Element_Array;
end Protected_Fifo;
type Fifo is new Ada.Finalization.Limited_Controlled with record
Buffer : Protected_Fifo;
end record;
end Util.Concurrent.Fifos;
|
package Tail_Call_P is
type T is new Natural;
type Index is (First, Second);
type A is array (Index) of T;
My_Array : A := (0, 0);
procedure Insert (Into : A; Element : T; Value : T);
end Tail_Call_P;
|
-- Copyright 2011-2014 Free Software Foundation, Inc.
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
package Pck is
task Dummy_Task is
entry Start;
end Dummy_Task;
end Pck;
|
package body agar.gui.widget.notebook is
package cbinds is
procedure set_padding
(notebook : notebook_access_t;
padding : c.int);
pragma import (c, set_padding, "AG_NotebookSetPadding");
procedure set_spacing
(notebook : notebook_access_t;
spacing : c.int);
pragma import (c, set_spacing, "AG_NotebookSetSpacing");
procedure set_tab_visibility
(notebook : notebook_access_t;
flag : c.int);
pragma import (c, set_tab_visibility, "AG_NotebookSetTabVisibility");
procedure add_tab
(notebook : notebook_access_t;
name : cs.chars_ptr;
box_type : agar.gui.widget.box.type_t);
pragma import (c, add_tab, "AG_NotebookAddTab");
end cbinds;
procedure set_padding
(notebook : notebook_access_t;
padding : natural) is
begin
cbinds.set_padding
(notebook => notebook,
padding => c.int (padding));
end set_padding;
procedure set_spacing
(notebook : notebook_access_t;
spacing : natural) is
begin
cbinds.set_spacing
(notebook => notebook,
spacing => c.int (spacing));
end set_spacing;
procedure set_tab_visibility
(notebook : notebook_access_t;
flag : boolean := false)
is
c_flag : c.int := 0;
begin
if flag then c_flag := 1; end if;
cbinds.set_tab_visibility
(notebook => notebook,
flag => c_flag);
end set_tab_visibility;
procedure add_tab
(notebook : notebook_access_t;
name : string;
box_type : agar.gui.widget.box.type_t)
is
c_name : aliased c.char_array := c.to_c (name);
begin
cbinds.add_tab
(notebook => notebook,
name => cs.to_chars_ptr (c_name'unchecked_access),
box_type => box_type);
end add_tab;
function widget (notebook : notebook_access_t) return widget_access_t is
begin
return notebook.widget'access;
end widget;
end agar.gui.widget.notebook;
|
-- { dg-do compile }
-- { dg-options "-O3" }
-- { dg-options "-O3 -msse" { target i?86-*-* x86_64-*-* } }
package body Loop_Optimization7 is
function Conv (A : Arr) return Arr is
Result : Arr;
begin
for I in A'Range loop
Result (I) := Conv (A (I));
end loop;
return Result;
end;
end Loop_Optimization7;
|
with Ada.Text_IO;
with Sax.Readers;
with Input_Sources.Strings;
with Unicode.CES.Utf8;
with DOM.Readers;
with DOM.Core.Documents;
with DOM.Core.Nodes;
with DOM.Core.Attrs;
procedure Extract_Students is
Sample_String : String :=
"<Students>" &
"<Student Name=""April"" Gender=""F"" DateOfBirth=""1989-01-02"" />" &
"<Student Name=""Bob"" Gender=""M"" DateOfBirth=""1990-03-04"" />" &
"<Student Name=""Chad"" Gender=""M"" DateOfBirth=""1991-05-06"" />" &
"<Student Name=""Dave"" Gender=""M"" DateOfBirth=""1992-07-08"">" &
"<Pet Type=""dog"" Name=""Rover"" />" &
"</Student>" &
"<Student DateOfBirth=""1993-09-10"" Gender=""F"" Name=""Émily"" />" &
"</Students>";
Input : Input_Sources.Strings.String_Input;
Reader : DOM.Readers.Tree_Reader;
Document : DOM.Core.Document;
List : DOM.Core.Node_List;
begin
Input_Sources.Strings.Open (Sample_String, Unicode.CES.Utf8.Utf8_Encoding, Input);
DOM.Readers.Parse (Reader, Input);
Input_Sources.Strings.Close (Input);
Document := DOM.Readers.Get_Tree (Reader);
List := DOM.Core.Documents.Get_Elements_By_Tag_Name (Document, "Student");
for I in 0 .. DOM.Core.Nodes.Length (List) - 1 loop
Ada.Text_IO.Put_Line
(DOM.Core.Attrs.Value
(DOM.Core.Nodes.Get_Named_Item
(DOM.Core.Nodes.Attributes
(DOM.Core.Nodes.Item (List, I)), "Name")
)
);
end loop;
DOM.Readers.Free (Reader);
end Extract_Students;
|
package Problem_64 is
procedure Solve;
end Problem_64;
|
------------------------------------------------------------------------------
-- G E L A X A S I S --
-- ASIS implementation for Gela project, a portable Ada compiler --
-- http://gela.ada-ru.org --
-- - - - - - - - - - - - - - - - --
-- Read copyright and license at the end of this file --
------------------------------------------------------------------------------
-- $Revision: 209 $ $Date: 2013-11-30 21:03:24 +0200 (Сб., 30 нояб. 2013) $
with Ada.Strings.Fixed;
with Ada.Strings.Maps.Constants;
package body XASIS.Integers is
type Small is mod 2**16;
type Digit is mod 2**8;
function X (Char : Character) return Digit;
function X (Char : Character) return Small;
function X (First, Second : Character) return Small;
function X (Item : Digit) return Character;
pragma Inline (X);
type Buffer is array (Positive range <>) of Character;
procedure Add
(Left : in Buffer;
Right : in Buffer;
Result : out Buffer;
Last : out Positive;
Mult : in Digit := 1);
procedure Add
(Left : in Buffer;
Right : in Buffer;
Result : out Buffer;
Last : out Positive;
Mult : in Digit := 1;
Carry : out Digit);
procedure Subtract
(Left : in Buffer;
Right : in Buffer;
Result : out Buffer;
Last : out Positive;
Mult : in Digit := 1);
procedure Subtract
(Left : in Buffer;
Right : in Buffer;
Result : out Buffer;
Last : out Positive;
Mult : in Digit := 1;
Carry : out Digit);
procedure Multiply
(Left : in Buffer;
Right : in Buffer;
Result : out Buffer;
Last : out Positive);
procedure Normalize_For_Devide
(Left : in out Buffer;
Right : in out Buffer;
Mult : out Digit);
procedure Devide
(Left : in out Buffer;
Right : in Buffer;
Result : out Digit);
procedure Devide
(Left : in Value;
Right : in Value;
Result : out Value;
Rest : in Boolean := False);
procedure Initialize
(Text : in String;
Result : out Buffer;
Last : out Positive;
Base : in Digit := 10);
function Signed_Add
(Left_Text : Buffer;
Right_Text : Buffer)
return Value;
function Less
(Left_Text : Buffer;
Right_Text : Buffer)
return Boolean;
function To_Small (Text : Buffer) return Small;
procedure Change_Sign (Sign : in out Character);
procedure Fast_Devide
(Left : in Buffer;
Right : in Digit;
Result : out Buffer;
Last : out Natural;
Rest : out Digit);
function Get_Last (Text : Buffer) return Positive;
function Get_Sign (Left, Right : Character) return Character;
function To_Value (Text : Buffer) return Value;
generic
with function Op (Left, Right : Digit) return Digit;
function Logic (Left, Right : Value) return Value;
Buffer_Overflow : exception;
function Simple_Literal
(Text : String;
Base : Positive := 10)
return Value;
---------
-- "*" --
---------
function "*" (Left, Right : Value) return Value is
Left_Text : constant Buffer := Buffer (To_String (Left));
Right_Text : constant Buffer := Buffer (To_String (Right));
Result_Last : Positive := 1;
Result_Text : Buffer (1 .. Left_Text'Length + Right_Text'Length - 1);
begin
Result_Text (1) := Get_Sign (Left_Text (1), Right_Text (1));
Multiply
(Left => Left_Text (2 .. Left_Text'Last),
Right => Right_Text (2 .. Right_Text'Last),
Result => Result_Text (2 .. Result_Text'Last),
Last => Result_Last);
return To_Value (Result_Text (1 .. Result_Last));
end "*";
----------
-- "**" --
----------
function "**" (Left, Right : Value) return Value is
Right_Text : constant Buffer := Buffer (To_String (Right));
Power : Small := To_Small (Right_Text (2 .. Right_Text'Last));
Last : constant Positive :=
((Length (Left) - 1) * Natural (Power)) + 1;
Mult_Last : Positive := Length (Left);
Result_Last : Positive := 2;
Result_Text : Buffer (1 .. Positive'Max (Last, 2));
Temp_Text : Buffer (1 .. Last);
Mult_Text : Buffer (1 .. Positive'Max (Last, Mult_Last));
begin
if Right_Text (1) = '-' then
raise XASIS_Error;
end if;
if (Power and 1) /= 0 and then Element (Left, 1) = '-' then
Result_Text (1) := '-';
else
Result_Text (1) := '+';
end if;
Mult_Text (1 .. Mult_Last) := Buffer (To_String (Left));
Result_Text (2) := X (1);
while Power > 0 loop
if (Power and 1) /= 0 then
Temp_Text (2 .. Result_Last) := Result_Text (2 .. Result_Last);
Multiply
(Left => Temp_Text (2 .. Result_Last),
Right => Mult_Text (2 .. Mult_Last),
Result => Result_Text (2 .. Result_Text'Last),
Last => Result_Last);
Power := Power - 1;
else
Temp_Text (2 .. Mult_Last) := Mult_Text (2 .. Mult_Last);
Multiply
(Left => Temp_Text (2 .. Mult_Last),
Right => Temp_Text (2 .. Mult_Last),
Result => Mult_Text (2 .. Mult_Text'Last),
Last => Mult_Last);
Power := Power / 2;
end if;
end loop;
return To_Value (Result_Text (1 .. Result_Last));
end "**";
---------
-- "+" --
---------
function "+" (Left, Right : Value) return Value is
Left_Text : constant Buffer := Buffer (To_String (Left));
Right_Text : constant Buffer := Buffer (To_String (Right));
begin
return Signed_Add (Left_Text, Right_Text);
end "+";
---------
-- "-" --
---------
function "-" (Left : Value) return Value is
Left_Text : Buffer := Buffer (To_String (Left));
begin
Change_Sign (Left_Text (1));
return To_Value (Left_Text);
end "-";
---------
-- "-" --
---------
function "-" (Left, Right : Value) return Value is
Left_Text : constant Buffer := Buffer (To_String (Left));
Right_Text : Buffer := Buffer (To_String (Right));
begin
Change_Sign (Right_Text (1));
return Signed_Add (Left_Text, Right_Text);
end "-";
---------
-- "/" --
---------
function "/" (Left, Right : Value) return Value is
Result : Value;
begin
Devide (Left, Right, Result);
return Result;
end "/";
---------
-- "<" --
---------
function "<" (Left, Right : Value) return Boolean is
Left_Text : constant Buffer := Buffer (To_String (Left));
Right_Text : constant Buffer := Buffer (To_String (Right));
begin
if Left_Text (1) = '+' and Right_Text (1) = '+' then
return Less (Left_Text (2 .. Left_Text'Last),
Right_Text (2 .. Right_Text'Last));
elsif Left_Text (1) = '+' and Right_Text (1) = '-' then
return False;
elsif Left_Text (1) = '-' and Right_Text (1) = '+' then
return True;
else
return Less (Right_Text (2 .. Right_Text'Last),
Left_Text (2 .. Left_Text'Last));
end if;
end "<";
----------
-- "<=" --
----------
function "<=" (Left, Right : Value) return Boolean is
begin
return Left = Right or else Left < Right;
end "<=";
---------
-- "=" --
---------
function "=" (Left, Right : Value) return Boolean is
use type U.Unbounded_String;
begin
return U.Unbounded_String (Left) = U.Unbounded_String (Right);
end "=";
---------
-- ">" --
---------
function ">" (Left, Right : Value) return Boolean is
begin
return not (Left <= Right);
end ">";
----------
-- ">=" --
----------
function ">=" (Left, Right : Value) return Boolean is
begin
return not (Left < Right);
end ">=";
-----------
-- "abs" --
-----------
function "abs" (Left : Value) return Value is
Sign : constant Character := Element (Left, 1);
begin
if Sign = '-' then
return Overwrite (Left, 1, (1 => '+'));
else
return Left;
end if;
end "abs";
-----------
-- Logic --
-----------
function Logic (Left, Right : Value) return Value is
Left_Text : constant Buffer := Buffer (To_String (Left));
Right_Text : constant Buffer := Buffer (To_String (Right));
Temp : Digit;
Length : constant Positive :=
Positive'Max (Left_Text'Last, Right_Text'Last);
Result_Last : Positive := 1;
Result_Text : Buffer (1 .. Length);
begin
Result_Text (1) := '+';
if Left_Text (1) /= '+' or Right_Text (1) /= '+' then
raise XASIS_Error;
end if;
for J in 2 .. Length loop
if J in Right_Text'Range then
Temp := X (Right_Text (J));
else
Temp := 0;
end if;
if J in Left_Text'Range then
Temp := Op (X (Left_Text (J)), Temp);
else
Temp := Op (0, Temp);
end if;
Result_Text (J) := X (Temp);
end loop;
Result_Last := Get_Last (Result_Text);
return To_Value (Result_Text (1 .. Result_Last));
end Logic;
-----------
-- "and" --
-----------
function And_Logic is new Logic ("and");
function "and" (Left, Right : Value) return Value
renames And_Logic;
-----------
-- "mod" --
-----------
function "mod" (Left, Right : Value) return Value is
Result : Value;
begin
Devide (Left, Right, Result, True);
if Element (Left, 1) = Element (Right, 1) or Result = Zero then
return Result;
else
return Result + Right;
end if;
end "mod";
-----------
-- "not" --
-----------
function "not" (Left : Value) return Value is
Left_Text : Buffer := Buffer (To_String (Left));
Left_Last : Positive := 1;
begin
if Left_Text (1) /= '+' then
raise XASIS_Error;
end if;
for I in 2 .. Left_Text'Last loop
Left_Text (I) := X (not X (Left_Text (I)));
end loop;
Left_Last := Get_Last (Left_Text);
return To_Value (Left_Text (1 .. Left_Last));
end "not";
----------
-- "or" --
----------
function Or_Logic is new Logic ("or");
function "or" (Left, Right : Value) return Value
renames Or_Logic;
-----------
-- "rem" --
-----------
function "rem" (Left, Right : Value) return Value is
Result : Value;
begin
Devide (Left, Right, Result, True);
return Result;
end "rem";
-----------
-- "xor" --
-----------
function Xor_Logic is new Logic ("xor");
function "xor" (Left, Right : Value) return Value
renames Xor_Logic;
---------
-- Add --
---------
procedure Add
(Left : in Buffer;
Right : in Buffer;
Result : out Buffer;
Last : out Positive;
Mult : in Digit := 1)
is
Carry : Digit;
begin
Add (Left, Right, Result, Last, Mult, Carry);
if Carry /= 0 then
Last := Last + 1;
if Last > Result'Last then
raise Buffer_Overflow;
end if;
Result (Last) := X (Carry);
end if;
end Add;
---------
-- Add --
---------
procedure Add
(Left : in Buffer;
Right : in Buffer;
Result : out Buffer;
Last : out Positive;
Mult : in Digit := 1;
Carry : out Digit)
is
Temp : Small;
Max : constant Natural := Positive'Max (Left'Length, Right'Length);
begin
if Max > Result'Length then
raise Buffer_Overflow;
end if;
Carry := 0;
for I in 0 .. Max - 1 loop
if I < Right'Length then
Temp := X (Right (Right'First + I)) * Small (Mult);
else
Temp := 0;
end if;
if I < Left'Length then
Temp := X (Left (Left'First + I)) + Temp;
end if;
Temp := Temp + Small (Carry);
Result (Result'First + I) := X (Digit (Temp mod Digit'Modulus));
Carry := Digit (Temp / Digit'Modulus);
end loop;
Last := Result'First + Max - 1;
end Add;
-----------------
-- Change_Sign --
-----------------
procedure Change_Sign (Sign : in out Character) is
begin
if Sign = '+' then
Sign := '-';
else
Sign := '+';
end if;
end Change_Sign;
------------
-- Devide --
------------
procedure Devide
(Left : in out Buffer;
Right : in Buffer;
Result : out Digit)
is
function Get_Digit (Left, Right : Buffer) return Digit;
function Get_Digit (Left, Right : Buffer) return Digit is
Temp : Small;
Result : Small;
begin
if Left (Left'Last) = Right (Right'Last) then
Result := 255;
else
Result := X (Left (Left'Last), Left (Left'Last - 1));
Result := Result / X (Right (Right'Last));
end if;
loop
Temp := X (Left (Left'Last), Left (Left'Last - 1));
Temp := Temp - Result * X (Right (Right'Last));
exit when Temp >= 256;
Temp := Temp * 256 + X (Left (Left'Last - 2));
exit when Result * X (Right (Right'Last - 1)) <= Temp;
Result := Result - 1;
end loop;
return Digit (Result);
end Get_Digit;
Carry : Digit;
Last : Positive;
begin
Result := Get_Digit (Left, Right);
Subtract
(Left => Left,
Right => Right,
Result => Left,
Last => Last,
Mult => Result,
Carry => Carry);
if Carry /= 0 then
Result := Result - 1;
Add
(Left => Left,
Right => Right,
Result => Left,
Last => Last,
Carry => Carry);
end if;
end Devide;
------------
-- Devide --
------------
procedure Devide
(Left : in Value;
Right : in Value;
Result : out Value;
Rest : in Boolean := False)
is
Left_Length : constant Integer :=
Integer'Max (Length (Left), Length (Right) + 1);
Left_Text : Buffer (1 .. Left_Length) := (others => X (0));
Right_Text : Buffer := Buffer (To_String (Right));
Index : Natural := Left_Text'Length - Right_Text'Length + 1;
Result_Text : Buffer (1 .. Left_Text'Length - Right_Text'Length + 1);
Last : Positive;
Temp : Digit;
Mult : Digit;
begin
Left_Text (1 .. Length (Left)) := Buffer (To_String (Left));
if Right_Text'Length = 1 then
raise Buffer_Overflow;
elsif Right_Text'Length = 2 then
declare
Result_Text : Buffer (Left_Text'Range);
begin
Fast_Devide
(Left => Left_Text (2 .. Left_Text'Last),
Right => X (Right_Text (2)),
Result => Result_Text (2 .. Result_Text'Last),
Last => Last,
Rest => Temp);
if Rest then
Result_Text (1) := Left_Text (1);
Result_Text (2) := X (Temp);
Result := To_Value (Result_Text (1 .. 2));
else
Result_Text (1) := Get_Sign (Left_Text (1), Right_Text (1));
Result := To_Value (Result_Text (1 .. Last));
end if;
return;
end;
end if;
Normalize_For_Devide
(Left => Left_Text (2 .. Left_Text'Last),
Right => Right_Text (2 .. Right_Text'Last),
Mult => Mult);
while Index >= 2 loop
Devide
(Left => Left_Text (Index .. Index + Right_Text'Length - 1),
Right => Right_Text (2 .. Right_Text'Last),
Result => Temp);
Result_Text (Index) := X (Temp);
Index := Index - 1;
end loop;
if Rest then
Fast_Devide
(Left => Left_Text (2 .. Right_Text'Length + 1),
Right => Mult,
Result => Left_Text (2 .. Right_Text'Length + 1),
Last => Last,
Rest => Temp);
Result := To_Value (Left_Text (1 .. Last));
else
Result_Text (1) := Get_Sign (Left_Text (1), Right_Text (1));
Last := Get_Last (Result_Text);
Result := To_Value (Result_Text (1 .. Last));
end if;
end Devide;
-----------------
-- Fast_Devide --
-----------------
procedure Fast_Devide
(Left : in Buffer;
Right : in Digit;
Result : out Buffer;
Last : out Natural;
Rest : out Digit)
is
Temp : Small := 0;
begin
for I in reverse Left'Range loop
Temp := Temp * 256 + X (Left (I));
Result (I) := X (Digit (Temp / Small (Right)));
Temp := Temp mod Small (Right);
end loop;
Rest := Digit (Temp);
Last := Get_Last (Result);
end Fast_Devide;
--------------
-- Get_Last --
--------------
function Get_Last (Text : Buffer) return Positive is
begin
for I in reverse Text'Range loop
if Text (I) /= X (0) then
return I;
end if;
end loop;
return Text'First - 1;
end Get_Last;
--------------
-- Get_Sign --
--------------
function Get_Sign (Left, Right : Character) return Character is
begin
if Left = Right then
return '+';
else
return '-';
end if;
end Get_Sign;
-----------
-- Image --
-----------
function Image (Left : Value) return String is
Text : Buffer := Buffer (To_String (Left));
Text_Last : Natural := Text'Last;
Result_Text : String (1 .. Text'Length * 3);
First : Positive := Result_Text'Last + 1;
Rest : Digit;
begin
if Text_Last = 1 then
return "0";
end if;
while Text_Last >= 2 loop
Fast_Devide
(Left => Text (2 .. Text_Last),
Right => 10,
Result => Text (2 .. Text_Last),
Last => Text_Last,
Rest => Rest);
First := First - 1;
Result_Text (First) := X (Rest + Character'Pos ('0'));
end loop;
if Text (1) = '-' then
First := First - 1;
Result_Text (First) := '-';
end if;
return Result_Text (First .. Result_Text'Last);
end Image;
----------------
-- Initialize --
----------------
procedure Initialize
(Text : in String;
Result : out Buffer;
Last : out Positive;
Base : in Digit := 10)
is
Left : Buffer (Result'First .. Result'First);
Temp : Character;
Stop : Natural := Result'First - 1;
Skip : Boolean := False;
begin
for I in Text'Range loop
Temp := Text (I);
case Temp is
when '0' .. '9' =>
Left (Result'First) := X (X (Temp) - Character'Pos ('0'));
when 'a' .. 'f' =>
Left (Result'First) := X (X (Temp) - Character'Pos ('a') + 10);
when 'A' .. 'F' =>
Left (Result'First) := X (X (Temp) - Character'Pos ('A') + 10);
when '_' | '.' | '#' =>
Skip := True;
when others =>
raise XASIS_Error;
end case;
if Skip then
Skip := False;
else
Add (Left, Result (Result'First .. Stop), Result, Stop, Base);
end if;
end loop;
Last := Stop;
end Initialize;
----------
-- Less --
----------
function Less
(Left_Text : Buffer;
Right_Text : Buffer)
return Boolean is
begin
if Left_Text'Length = Right_Text'Length then
for I in reverse Left_Text'Range loop
if Left_Text (I) < Right_Text (I) then
return True;
elsif Left_Text (I) > Right_Text (I) then
return False;
end if;
end loop;
return False;
elsif Left_Text'Length > Right_Text'Length then
if Left_Text (Left_Text'Last) = X (0) then
raise XASIS_Error;
end if;
return False;
else
if Right_Text (Right_Text'Last) = X (0) then
raise XASIS_Error;
end if;
return True;
end if;
end Less;
--------------------
-- Simple_Literal --
--------------------
function Simple_Literal
(Text : String;
Base : Positive := 10)
return Value
is
Result_Text : Buffer (1 .. Text'Length / 2 + 2);
Result_Last : Positive;
I : constant Positive := Text'First;
begin
if Text (I) = '-' or Text (I) = '+' then
Result_Text (1) := Text (I);
Initialize (Text (Text'First + 1 .. Text'Last),
Result_Text (2 .. Result_Text'Last), Result_Last, Digit (Base));
elsif Text (I) = ' ' then
Result_Text (1) := '+';
Initialize (Text (Text'First + 1 .. Text'Last),
Result_Text (2 .. Result_Text'Last), Result_Last, Digit (Base));
else
Result_Text (1) := '+';
Initialize (Text,
Result_Text (2 .. Result_Text'Last), Result_Last, Digit (Base));
end if;
return To_Value (Result_Text (1 .. Result_Last));
end Simple_Literal;
-------------
-- Literal --
-------------
function Literal (Text : String) return Value is
use Ada.Strings.Fixed;
use Ada.Strings.Maps.Constants;
Base : Positive := 10;
Sharp : Natural := Index (Text, "#");
E : Natural := Index (Text, "E", Mapping => Upper_Case_Map);
Result : Value;
Exp : Value;
begin
if Sharp /= 0 then
Base := Positive'Value (Text (Text'First .. Sharp - 1));
else
Sharp := Text'First - 1;
end if;
if E /= 0 then
Exp := Simple_Literal (Text (E + 1 .. Text'Last));
else
E := Text'Last + 1;
Exp := Zero;
end if;
Result := Simple_Literal (Text (Sharp + 1 .. E - 1), Base);
if Exp /= Zero then
Exp := To_Value ('+' & X (Digit (Base))) ** Exp;
Result := Result * Exp;
end if;
return Result;
end Literal;
--------------
-- Multiply --
--------------
procedure Multiply
(Left : in Buffer;
Right : in Buffer;
Result : out Buffer;
Last : out Positive)
is
Temp : Digit;
Length : Natural := Result'First - 1;
Mult : Buffer (Result'Range);
begin
for I in Left'Range loop
Temp := X (Left (I));
Mult (I .. I + Right'Length - 1) := Right;
Mult (Mult'First .. I - 1) := (others => X (0));
Add
(Left => Result (Result'First .. Length),
Right => Mult (Mult'First .. I + Right'Length - 1),
Result => Result,
Last => Length,
Mult => Temp);
end loop;
Last := Length;
end Multiply;
--------------------------
-- Normalize_For_Devide --
--------------------------
procedure Normalize_For_Devide
(Left : in out Buffer;
Right : in out Buffer;
Mult : out Digit)
is
Zero : constant Buffer (Left'First .. Left'First - 1) :=
(others => X (0));
Last : Positive;
begin
Mult := Digit (Small'(256) / (X (Right (Right'Last)) + 1));
if Mult = 1 then
Left (Left'Last) := X (0);
else
Add
(Left => Zero,
Right => Left,
Result => Left,
Last => Last,
Mult => Mult);
Add
(Left => Zero,
Right => Right,
Result => Right,
Last => Last,
Mult => Mult);
end if;
end Normalize_For_Devide;
----------------
-- Signed_Add --
----------------
function Signed_Add
(Left_Text : Buffer;
Right_Text : Buffer)
return Value
is
Length : constant Positive :=
Positive'Max (Left_Text'Last, Right_Text'Last) + 1;
Result_Last : Positive := 1;
Result_Text : Buffer (1 .. Length);
begin
if Left_Text (1) = Right_Text (1) then
Result_Text (1) := Left_Text (1);
Add
(Left => Left_Text (2 .. Left_Text'Last),
Right => Right_Text (2 .. Right_Text'Last),
Result => Result_Text (2 .. Result_Text'Last),
Last => Result_Last);
else
if Less (Left_Text (2 .. Left_Text'Last),
Right_Text (2 .. Right_Text'Last))
then
Result_Text (1) := Right_Text (1);
Subtract
(Left => Right_Text (2 .. Right_Text'Last),
Right => Left_Text (2 .. Left_Text'Last),
Result => Result_Text (2 .. Result_Text'Last),
Last => Result_Last);
else
Result_Text (1) := Left_Text (1);
Subtract
(Left => Left_Text (2 .. Left_Text'Last),
Right => Right_Text (2 .. Right_Text'Last),
Result => Result_Text (2 .. Result_Text'Last),
Last => Result_Last);
end if;
end if;
return To_Value (Result_Text (1 .. Result_Last));
end Signed_Add;
--------------
-- Subtract --
--------------
procedure Subtract
(Left : in Buffer;
Right : in Buffer;
Result : out Buffer;
Last : out Positive;
Mult : in Digit := 1)
is
Carry : Digit;
begin
Subtract (Left, Right, Result, Last, Mult, Carry);
if Carry /= 0 then
Last := Last + 1;
if Last > Result'Last then
raise Buffer_Overflow;
end if;
Result (Last) := X (-Carry);
end if;
end Subtract;
--------------
-- Subtract --
--------------
procedure Subtract
(Left : in Buffer;
Right : in Buffer;
Result : out Buffer;
Last : out Positive;
Mult : in Digit := 1;
Carry : out Digit)
is
Temp : Small;
Max : constant Positive := Positive'Max (Left'Length, Right'Length);
begin
if Max > Result'Length then
raise Buffer_Overflow;
end if;
Carry := 0;
for I in 0 .. Max - 1 loop
if I < Right'Length then
Temp := X (Right (Right'First + I)) * Small (Mult);
else
Temp := 0;
end if;
if I < Left'Length then
Temp := X (Left (Left'First + I)) - Temp;
else
Temp := - Temp;
end if;
Temp := Temp - Small (Carry);
Result (Result'First + I) := X (Digit (Temp mod Digit'Modulus));
Carry := -Digit (Temp / Digit'Modulus);
end loop;
Last := Result'First + Max - 1;
end Subtract;
---------------
-- To_Value --
---------------
function To_Value (Text : Buffer) return Value is
Last : constant Positive := Get_Last (Text);
begin
if Text'First >= Last then
return Zero;
else
return To_Unbounded_String (String (Text (Text'First .. Last)));
end if;
end To_Value;
--------------
-- To_Small --
--------------
function To_Small (Text : Buffer) return Small is
Result : Small := 0;
begin
for I in reverse Text'Range loop
Result := Result * 256 + X (Text (I));
end loop;
return Result;
end To_Small;
-------
-- X --
-------
function X (Char : Character) return Digit is
begin
return Character'Pos (Char);
end X;
-------
-- X --
-------
function X (Char : Character) return Small is
begin
return Character'Pos (Char);
end X;
-------
-- X --
-------
function X (First, Second : Character) return Small is
begin
return Character'Pos (First) * 256 + Character'Pos (Second);
end X;
-------
-- X --
-------
function X (Item : Digit) return Character is
begin
return Character'Val (Item);
end X;
end XASIS.Integers;
------------------------------------------------------------------------------
-- 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.
------------------------------------------------------------------------------
|
-- dates.adb
--
-- A program to read dates from the keyboard in the form
-- day_no month_no e.g. 30 8
-- and output the next day's date in the form
-- day_no month e.g. 31 AUG
-- Assume it is not a leap year.
-- The program loops until a zero day number is entered.
--
-- version 2.0 8-Mar-07
with Ada.Text_Io, Ada.Integer_Text_Io;
procedure Dates is
package Int_Io renames Ada.Integer_Text_Io;
use Ada.Text_Io;
-------------------------------------------------------------------
-- your type and var declarations here
-------------------------------------------------------------------
type Month_Type is (Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec);
subtype Day_Num_Type is Integer range 1 .. 31;
subtype Year_Type is Integer;
type Date_Type is record
Day_No : Day_Num_Type;
Month : Month_Type;
Year : Year_Type;
end record;
Today, Next_Day : Date_Type;
Temp : Natural;
function Days_In ( Month : Month_Type; YearNo : Year_Type ) return Integer is
Non_Leap_Year_Days_In : constant array(Month_Type) of Integer := (
Jan => 31,
Feb => 28,
Mar => 31,
Apr => 30,
May => 31,
Jun => 30,
Jul => 31,
Aug => 31,
Sep => 30,
Oct => 31,
Nov => 30,
Dec => 31
);
begin
if (Month = Feb and YearNo mod 4 = 0 and (YearNo mod 100 /= 0 or YearNo mod 400 = 0)) then
return 29;
else
return Non_Leap_Year_Days_In(Month);
end if;
end Days_In;
-- calculate the day after D
function Tomorrow ( D : Date_Type ) return Date_Type is
Day_No : Integer;
Month_No : Integer;
Tommorrow_Date : Date_Type;
begin
Tommorrow_Date := D;
Day_No := Tommorrow_Date.Day_No + 1;
-- loop month
while Day_No > Days_In(Tommorrow_Date.Month, Tommorrow_Date.Year) loop
Day_No := Day_No - Days_In(Tommorrow_Date.Month, Tommorrow_Date.Year);
Month_No := Month_Type'Pos(Tommorrow_Date.Month) + 1;
if Month_No >= 12 then
Month_No := 0;
end if;
Tommorrow_Date.Month := Month_Type'Val(Month_No);
end loop;
Tommorrow_Date.Day_No := Day_No;
return Tommorrow_Date;
end Tomorrow;
-- display D
procedure Print ( D : in Date_Type ) is
begin
Put_Line(D.Day_No'Img & " " & D.Month'Img & " " & D.Year'Img);
end Print;
begin
loop
Put("Enter date as dd mm yyyy (0 0 0 to stop):");
Int_Io.Get(Temp); -- read day
Skip_Line;
exit when Temp = 0;
Today.Day_No := Temp;
Int_Io.Get(Temp); -- read month as an integer
Skip_Line;
exit when Temp = 0;
Today.Month := Month_Type'Val(Temp - 1);
Int_Io.Get(Temp); -- read year as an integer
Skip_Line;
exit when Temp = 0;
Today.Year := Temp;
Put("Today is: ");
Print(Today);
-- compute tomorrow's date
Next_Day := Tomorrow(Today);
-- print
Put("Tommorow is: ");
Print(Next_Day);
end loop;
end Dates;
|
-- Copyright (c) 2019-2020 Maxim Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-- License-Filename: LICENSE
-------------------------------------------------------------
with Ada.Calendar.Formatting;
with Ada.Calendar;
with Ada.Containers;
with Ada.Directories;
with Ada.Wide_Wide_Text_IO;
with GNAT.SHA1;
with GNAT.Sockets;
with League.Application;
with League.Base_Codecs;
with League.Holders;
with League.Settings;
with League.Stream_Element_Vectors;
with League.String_Vectors;
with League.Strings;
with Torrent.Contexts;
with Torrent.Metainfo_Files;
with Torrent.Connections;
with Torrent.Logs;
with Torrent.Shutdown;
procedure Torrent.Run is
function "+"
(Text : Wide_Wide_String) return League.Strings.Universal_String
renames League.Strings.To_Universal_String;
procedure Parse_Command_Line;
procedure Print_Help;
procedure Increment_Total (Ignore : Ada.Directories.Directory_Entry_Type);
procedure Each_Torrents
(Dir : League.Strings.Universal_String;
Proc : not null access procedure
(Item : Ada.Directories.Directory_Entry_Type));
Cmd : constant League.String_Vectors.Universal_String_Vector :=
League.Application.Arguments;
Log_Option : constant Wide_Wide_String := "--log=";
Out_Option : constant Wide_Wide_String := "--output=";
Dir_Option : constant Wide_Wide_String := "--torrent-dir=";
Port_Option : constant Wide_Wide_String := "--port=";
Help_Option : constant Wide_Wide_String := "--help";
Port : Positive := 33411;
Path : League.Strings.Universal_String := +"result";
Input_Path : League.Strings.Universal_String := +"torrents";
Total : Ada.Containers.Count_Type := 0;
procedure Set_Peer_Id (Value : out SHA1);
-----------------
-- Set_Peer_Id --
-----------------
procedure Set_Peer_Id (Value : out SHA1) is
Settings : League.Settings.Settings;
Context : GNAT.SHA1.Context;
Element : League.Strings.Universal_String;
Vector : League.Stream_Element_Vectors.Stream_Element_Vector;
Key : constant League.Strings.Universal_String := +"torrent/peer_id";
Now : constant String := Ada.Calendar.Formatting.Image
(Ada.Calendar.Clock);
begin
if Settings.Contains (Key) then
Element := League.Holders.Element (Settings.Value (Key));
Vector := League.Base_Codecs.From_Base_64 (Element);
Value := Vector.To_Stream_Element_Array;
else
GNAT.SHA1.Update (Context, Path.To_UTF_8_String);
GNAT.SHA1.Update (Context, Now);
GNAT.SHA1.Update (Context, GNAT.Sockets.Host_Name);
Value := GNAT.SHA1.Digest (Context);
Vector.Append (Value);
Element := League.Base_Codecs.To_Base_64 (Vector);
Settings.Set_Value (Key, League.Holders.To_Holder (Element));
end if;
end Set_Peer_Id;
---------------------
-- Increment_Total --
---------------------
procedure Increment_Total (Ignore : Ada.Directories.Directory_Entry_Type) is
use type Ada.Containers.Count_Type;
begin
Total := Total + 1;
end Increment_Total;
-------------------
-- Each_Torrents --
-------------------
procedure Each_Torrents
(Dir : League.Strings.Universal_String;
Proc : not null access procedure
(Item : Ada.Directories.Directory_Entry_Type))
is
begin
Ada.Directories.Search
(Directory => Dir.To_UTF_8_String,
Pattern => "*.torrent",
Filter => (Ada.Directories.Ordinary_File => True, others => False),
Process => Proc);
end Each_Torrents;
------------------------
-- Parse_Command_Line --
------------------------
procedure Parse_Command_Line is
Arg : League.Strings.Universal_String;
begin
for J in 1 .. Cmd.Length loop
Arg := Cmd.Element (J);
if Arg.Starts_With (Port_Option) then
Port := Positive'Wide_Wide_Value
(Arg.Tail_From (Port_Option'Length + 1).To_Wide_Wide_String);
elsif Arg.Starts_With (Out_Option) then
Path := Arg.Tail_From (Out_Option'Length + 1);
elsif Arg.Starts_With (Dir_Option) then
Input_Path := Arg.Tail_From (Dir_Option'Length + 1);
elsif Arg.Starts_With (Help_Option) then
Print_Help;
elsif Arg.Starts_With (Log_Option) then
Torrent.Logs.Initialize
(Arg.Tail_From (Log_Option'Length + 1));
end if;
end loop;
end Parse_Command_Line;
----------------
-- Print_Help --
----------------
procedure Print_Help is
begin
Ada.Wide_Wide_Text_IO.Put_Line ("Usage: torrent-run <options>");
Ada.Wide_Wide_Text_IO.Put_Line ("Options are");
Ada.Wide_Wide_Text_IO.Put_Line
(" " & Port_Option & "int - a port to listen");
Ada.Wide_Wide_Text_IO.Put_Line
(" " & Out_Option & "path - a directory to save downloaded files");
Ada.Wide_Wide_Text_IO.Put_Line
(" " & Dir_Option & "path - a directory with torrent files");
Ada.Wide_Wide_Text_IO.Put_Line
(" " & Log_Option & "path - a trace file, if you need it");
end Print_Help;
begin
if Cmd.Is_Empty then
Print_Help;
return;
end if;
League.Application.Set_Application_Name (+"Torrent Client");
League.Application.Set_Application_Version (+"0.1");
League.Application.Set_Organization_Name (+"Matreshka Project");
League.Application.Set_Organization_Domain (+"forge.ada-ru.org");
Parse_Command_Line;
Each_Torrents (Input_Path, Increment_Total'Access);
declare
procedure Add (Item : Ada.Directories.Directory_Entry_Type);
Recycle : aliased Torrent.Connections.Queues.Queue;
Context : Torrent.Contexts.Context
(Capacity => Total,
Port => Port,
Recycle => Recycle'Unchecked_Access);
---------
-- Add --
---------
procedure Add (Item : Ada.Directories.Directory_Entry_Type) is
Meta : constant Torrent.Metainfo_Files.Metainfo_File_Access :=
new Torrent.Metainfo_Files.Metainfo_File;
begin
Meta.Read
(League.Strings.From_UTF_8_String
(Ada.Directories.Full_Name (Item)));
Context.Add_Metainfo_File (Meta);
end Add;
Peer_Id : Torrent.SHA1;
Next_Update : Ada.Calendar.Time;
begin
Set_Peer_Id (Peer_Id);
Context.Initialize (Peer_Id, Path);
Each_Torrents (Input_Path, Add'Access);
Context.Start (Next_Update);
loop
select
Torrent.Shutdown.Signal.Wait_SIGINT;
Ada.Wide_Wide_Text_IO.Put_Line ("Ctrl+C!");
exit;
or
delay until Next_Update;
Context.Update (Next_Update);
end select;
end loop;
Context.Stop;
end;
end Torrent.Run;
|
-- Copyright 2008-2014 Free Software Foundation, Inc.
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
package Pck is
type Parameter is record
One : Integer;
Two : Integer;
Three : Integer;
end record;
function Ident (P : Parameter) return Parameter;
procedure Do_Nothing (P : in out Parameter);
end Pck;
|
-- Copyright 2008-2020 Free Software Foundation, Inc.
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
with Pck; use Pck;
procedure Foo is
begin
String_Var (String_Var'First) := 'h'; -- START
end Foo;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.