CombinedText
stringlengths
4
3.42M
-- This spec has been automatically generated from STM32F7x9.svd pragma Restrictions (No_Elaboration_Code); pragma Ada_2012; pragma Style_Checks (Off); with HAL; with System; package STM32_SVD.MDIOS is pragma Preelaborate; --------------- -- Registers -- --------------- subtype MDIOS_CR_PORT_ADDRESS_Field is HAL.UInt5; -- MDIOS configuration register type MDIOS_CR_Register is record -- Peripheral enable EN : Boolean := False; -- Register write interrupt enable WRIE : Boolean := False; -- Register Read Interrupt Enable RDIE : Boolean := False; -- Error interrupt enable EIE : Boolean := False; -- unspecified Reserved_4_6 : HAL.UInt3 := 16#0#; -- Disable Preamble Check DPC : Boolean := False; -- Slaves's address PORT_ADDRESS : MDIOS_CR_PORT_ADDRESS_Field := 16#0#; -- unspecified Reserved_13_31 : HAL.UInt19 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MDIOS_CR_Register use record EN at 0 range 0 .. 0; WRIE at 0 range 1 .. 1; RDIE at 0 range 2 .. 2; EIE at 0 range 3 .. 3; Reserved_4_6 at 0 range 4 .. 6; DPC at 0 range 7 .. 7; PORT_ADDRESS at 0 range 8 .. 12; Reserved_13_31 at 0 range 13 .. 31; end record; -- MDIOS status register type MDIOS_SR_Register is record -- Read-only. Preamble error flag PERF : Boolean; -- Read-only. Start error flag SERF : Boolean; -- Read-only. Turnaround error flag TERF : Boolean; -- unspecified Reserved_3_31 : HAL.UInt29; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MDIOS_SR_Register use record PERF at 0 range 0 .. 0; SERF at 0 range 1 .. 1; TERF at 0 range 2 .. 2; Reserved_3_31 at 0 range 3 .. 31; end record; -- MDIOS clear flag register type MDIOS_CLRFR_Register is record -- Clear the preamble error flag CPERF : Boolean := False; -- Clear the start error flag CSERF : Boolean := False; -- Clear the turnaround error flag CTERF : Boolean := False; -- unspecified Reserved_3_31 : HAL.UInt29 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MDIOS_CLRFR_Register use record CPERF at 0 range 0 .. 0; CSERF at 0 range 1 .. 1; CTERF at 0 range 2 .. 2; Reserved_3_31 at 0 range 3 .. 31; end record; subtype MDIOS_DINR0_DIN0_Field is HAL.UInt16; -- MDIOS input data register 0 type MDIOS_DINR0_Register is record -- Read-only. Input data received from MDIO Master during write frames DIN0 : MDIOS_DINR0_DIN0_Field; -- unspecified Reserved_16_31 : HAL.UInt16; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MDIOS_DINR0_Register use record DIN0 at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype MDIOS_DINR1_DIN1_Field is HAL.UInt16; -- MDIOS input data register 1 type MDIOS_DINR1_Register is record -- Read-only. Input data received from MDIO Master during write frames DIN1 : MDIOS_DINR1_DIN1_Field; -- unspecified Reserved_16_31 : HAL.UInt16; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MDIOS_DINR1_Register use record DIN1 at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype MDIOS_DINR2_DIN2_Field is HAL.UInt16; -- MDIOS input data register 2 type MDIOS_DINR2_Register is record -- Read-only. Input data received from MDIO Master during write frames DIN2 : MDIOS_DINR2_DIN2_Field; -- unspecified Reserved_16_31 : HAL.UInt16; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MDIOS_DINR2_Register use record DIN2 at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype MDIOS_DINR3_DIN3_Field is HAL.UInt16; -- MDIOS input data register 3 type MDIOS_DINR3_Register is record -- Read-only. Input data received from MDIO Master during write frames DIN3 : MDIOS_DINR3_DIN3_Field; -- unspecified Reserved_16_31 : HAL.UInt16; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MDIOS_DINR3_Register use record DIN3 at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype MDIOS_DINR4_DIN4_Field is HAL.UInt16; -- MDIOS input data register 4 type MDIOS_DINR4_Register is record -- Read-only. Input data received from MDIO Master during write frames DIN4 : MDIOS_DINR4_DIN4_Field; -- unspecified Reserved_16_31 : HAL.UInt16; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MDIOS_DINR4_Register use record DIN4 at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype MDIOS_DINR5_DIN5_Field is HAL.UInt16; -- MDIOS input data register 5 type MDIOS_DINR5_Register is record -- Read-only. Input data received from MDIO Master during write frames DIN5 : MDIOS_DINR5_DIN5_Field; -- unspecified Reserved_16_31 : HAL.UInt16; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MDIOS_DINR5_Register use record DIN5 at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype MDIOS_DINR6_DIN6_Field is HAL.UInt16; -- MDIOS input data register 6 type MDIOS_DINR6_Register is record -- Read-only. Input data received from MDIO Master during write frames DIN6 : MDIOS_DINR6_DIN6_Field; -- unspecified Reserved_16_31 : HAL.UInt16; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MDIOS_DINR6_Register use record DIN6 at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype MDIOS_DINR7_DIN7_Field is HAL.UInt16; -- MDIOS input data register 7 type MDIOS_DINR7_Register is record -- Read-only. Input data received from MDIO Master during write frames DIN7 : MDIOS_DINR7_DIN7_Field; -- unspecified Reserved_16_31 : HAL.UInt16; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MDIOS_DINR7_Register use record DIN7 at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype MDIOS_DINR8_DIN8_Field is HAL.UInt16; -- MDIOS input data register 8 type MDIOS_DINR8_Register is record -- Read-only. Input data received from MDIO Master during write frames DIN8 : MDIOS_DINR8_DIN8_Field; -- unspecified Reserved_16_31 : HAL.UInt16; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MDIOS_DINR8_Register use record DIN8 at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype MDIOS_DINR9_DIN9_Field is HAL.UInt16; -- MDIOS input data register 9 type MDIOS_DINR9_Register is record -- Read-only. Input data received from MDIO Master during write frames DIN9 : MDIOS_DINR9_DIN9_Field; -- unspecified Reserved_16_31 : HAL.UInt16; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MDIOS_DINR9_Register use record DIN9 at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype MDIOS_DINR10_DIN10_Field is HAL.UInt16; -- MDIOS input data register 10 type MDIOS_DINR10_Register is record -- Read-only. Input data received from MDIO Master during write frames DIN10 : MDIOS_DINR10_DIN10_Field; -- unspecified Reserved_16_31 : HAL.UInt16; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MDIOS_DINR10_Register use record DIN10 at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype MDIOS_DINR11_DIN11_Field is HAL.UInt16; -- MDIOS input data register 11 type MDIOS_DINR11_Register is record -- Read-only. Input data received from MDIO Master during write frames DIN11 : MDIOS_DINR11_DIN11_Field; -- unspecified Reserved_16_31 : HAL.UInt16; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MDIOS_DINR11_Register use record DIN11 at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype MDIOS_DINR12_DIN12_Field is HAL.UInt16; -- MDIOS input data register 12 type MDIOS_DINR12_Register is record -- Read-only. Input data received from MDIO Master during write frames DIN12 : MDIOS_DINR12_DIN12_Field; -- unspecified Reserved_16_31 : HAL.UInt16; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MDIOS_DINR12_Register use record DIN12 at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype MDIOS_DINR13_DIN13_Field is HAL.UInt16; -- MDIOS input data register 13 type MDIOS_DINR13_Register is record -- Read-only. Input data received from MDIO Master during write frames DIN13 : MDIOS_DINR13_DIN13_Field; -- unspecified Reserved_16_31 : HAL.UInt16; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MDIOS_DINR13_Register use record DIN13 at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype MDIOS_DINR14_DIN14_Field is HAL.UInt16; -- MDIOS input data register 14 type MDIOS_DINR14_Register is record -- Read-only. Input data received from MDIO Master during write frames DIN14 : MDIOS_DINR14_DIN14_Field; -- unspecified Reserved_16_31 : HAL.UInt16; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MDIOS_DINR14_Register use record DIN14 at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype MDIOS_DINR15_DIN15_Field is HAL.UInt16; -- MDIOS input data register 15 type MDIOS_DINR15_Register is record -- Read-only. Input data received from MDIO Master during write frames DIN15 : MDIOS_DINR15_DIN15_Field; -- unspecified Reserved_16_31 : HAL.UInt16; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MDIOS_DINR15_Register use record DIN15 at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype MDIOS_DINR16_DIN16_Field is HAL.UInt16; -- MDIOS input data register 16 type MDIOS_DINR16_Register is record -- Read-only. Input data received from MDIO Master during write frames DIN16 : MDIOS_DINR16_DIN16_Field; -- unspecified Reserved_16_31 : HAL.UInt16; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MDIOS_DINR16_Register use record DIN16 at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype MDIOS_DINR17_DIN17_Field is HAL.UInt16; -- MDIOS input data register 17 type MDIOS_DINR17_Register is record -- Read-only. Input data received from MDIO Master during write frames DIN17 : MDIOS_DINR17_DIN17_Field; -- unspecified Reserved_16_31 : HAL.UInt16; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MDIOS_DINR17_Register use record DIN17 at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype MDIOS_DINR18_DIN18_Field is HAL.UInt16; -- MDIOS input data register 18 type MDIOS_DINR18_Register is record -- Read-only. Input data received from MDIO Master during write frames DIN18 : MDIOS_DINR18_DIN18_Field; -- unspecified Reserved_16_31 : HAL.UInt16; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MDIOS_DINR18_Register use record DIN18 at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype MDIOS_DINR19_DIN19_Field is HAL.UInt16; -- MDIOS input data register 19 type MDIOS_DINR19_Register is record -- Read-only. Input data received from MDIO Master during write frames DIN19 : MDIOS_DINR19_DIN19_Field; -- unspecified Reserved_16_31 : HAL.UInt16; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MDIOS_DINR19_Register use record DIN19 at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype MDIOS_DINR20_DIN20_Field is HAL.UInt16; -- MDIOS input data register 20 type MDIOS_DINR20_Register is record -- Read-only. Input data received from MDIO Master during write frames DIN20 : MDIOS_DINR20_DIN20_Field; -- unspecified Reserved_16_31 : HAL.UInt16; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MDIOS_DINR20_Register use record DIN20 at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype MDIOS_DINR21_DIN21_Field is HAL.UInt16; -- MDIOS input data register 21 type MDIOS_DINR21_Register is record -- Read-only. Input data received from MDIO Master during write frames DIN21 : MDIOS_DINR21_DIN21_Field; -- unspecified Reserved_16_31 : HAL.UInt16; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MDIOS_DINR21_Register use record DIN21 at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype MDIOS_DINR22_DIN22_Field is HAL.UInt16; -- MDIOS input data register 22 type MDIOS_DINR22_Register is record -- Read-only. Input data received from MDIO Master during write frames DIN22 : MDIOS_DINR22_DIN22_Field; -- unspecified Reserved_16_31 : HAL.UInt16; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MDIOS_DINR22_Register use record DIN22 at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype MDIOS_DINR23_DIN23_Field is HAL.UInt16; -- MDIOS input data register 23 type MDIOS_DINR23_Register is record -- Read-only. Input data received from MDIO Master during write frames DIN23 : MDIOS_DINR23_DIN23_Field; -- unspecified Reserved_16_31 : HAL.UInt16; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MDIOS_DINR23_Register use record DIN23 at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype MDIOS_DINR24_DIN24_Field is HAL.UInt16; -- MDIOS input data register 24 type MDIOS_DINR24_Register is record -- Read-only. Input data received from MDIO Master during write frames DIN24 : MDIOS_DINR24_DIN24_Field; -- unspecified Reserved_16_31 : HAL.UInt16; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MDIOS_DINR24_Register use record DIN24 at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype MDIOS_DINR25_DIN25_Field is HAL.UInt16; -- MDIOS input data register 25 type MDIOS_DINR25_Register is record -- Read-only. Input data received from MDIO Master during write frames DIN25 : MDIOS_DINR25_DIN25_Field; -- unspecified Reserved_16_31 : HAL.UInt16; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MDIOS_DINR25_Register use record DIN25 at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype MDIOS_DINR26_DIN26_Field is HAL.UInt16; -- MDIOS input data register 26 type MDIOS_DINR26_Register is record -- Read-only. Input data received from MDIO Master during write frames DIN26 : MDIOS_DINR26_DIN26_Field; -- unspecified Reserved_16_31 : HAL.UInt16; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MDIOS_DINR26_Register use record DIN26 at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype MDIOS_DINR27_DIN27_Field is HAL.UInt16; -- MDIOS input data register 27 type MDIOS_DINR27_Register is record -- Read-only. Input data received from MDIO Master during write frames DIN27 : MDIOS_DINR27_DIN27_Field; -- unspecified Reserved_16_31 : HAL.UInt16; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MDIOS_DINR27_Register use record DIN27 at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype MDIOS_DINR28_DIN28_Field is HAL.UInt16; -- MDIOS input data register 28 type MDIOS_DINR28_Register is record -- Read-only. Input data received from MDIO Master during write frames DIN28 : MDIOS_DINR28_DIN28_Field; -- unspecified Reserved_16_31 : HAL.UInt16; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MDIOS_DINR28_Register use record DIN28 at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype MDIOS_DINR29_DIN29_Field is HAL.UInt16; -- MDIOS input data register 29 type MDIOS_DINR29_Register is record -- Read-only. Input data received from MDIO Master during write frames DIN29 : MDIOS_DINR29_DIN29_Field; -- unspecified Reserved_16_31 : HAL.UInt16; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MDIOS_DINR29_Register use record DIN29 at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype MDIOS_DINR30_DIN30_Field is HAL.UInt16; -- MDIOS input data register 30 type MDIOS_DINR30_Register is record -- Read-only. Input data received from MDIO Master during write frames DIN30 : MDIOS_DINR30_DIN30_Field; -- unspecified Reserved_16_31 : HAL.UInt16; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MDIOS_DINR30_Register use record DIN30 at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype MDIOS_DINR31_DIN31_Field is HAL.UInt16; -- MDIOS input data register 31 type MDIOS_DINR31_Register is record -- Read-only. Input data received from MDIO Master during write frames DIN31 : MDIOS_DINR31_DIN31_Field; -- unspecified Reserved_16_31 : HAL.UInt16; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MDIOS_DINR31_Register use record DIN31 at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype MDIOS_DOUTR0_DOUT0_Field is HAL.UInt16; -- MDIOS output data register 0 type MDIOS_DOUTR0_Register is record -- Output data sent to MDIO Master during read frames DOUT0 : MDIOS_DOUTR0_DOUT0_Field := 16#0#; -- unspecified Reserved_16_31 : HAL.UInt16 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MDIOS_DOUTR0_Register use record DOUT0 at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype MDIOS_DOUTR1_DOUT1_Field is HAL.UInt16; -- MDIOS output data register 1 type MDIOS_DOUTR1_Register is record -- Output data sent to MDIO Master during read frames DOUT1 : MDIOS_DOUTR1_DOUT1_Field := 16#0#; -- unspecified Reserved_16_31 : HAL.UInt16 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MDIOS_DOUTR1_Register use record DOUT1 at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype MDIOS_DOUTR2_DOUT2_Field is HAL.UInt16; -- MDIOS output data register 2 type MDIOS_DOUTR2_Register is record -- Output data sent to MDIO Master during read frames DOUT2 : MDIOS_DOUTR2_DOUT2_Field := 16#0#; -- unspecified Reserved_16_31 : HAL.UInt16 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MDIOS_DOUTR2_Register use record DOUT2 at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype MDIOS_DOUTR3_DOUT3_Field is HAL.UInt16; -- MDIOS output data register 3 type MDIOS_DOUTR3_Register is record -- Output data sent to MDIO Master during read frames DOUT3 : MDIOS_DOUTR3_DOUT3_Field := 16#0#; -- unspecified Reserved_16_31 : HAL.UInt16 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MDIOS_DOUTR3_Register use record DOUT3 at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype MDIOS_DOUTR4_DOUT4_Field is HAL.UInt16; -- MDIOS output data register 4 type MDIOS_DOUTR4_Register is record -- Output data sent to MDIO Master during read frames DOUT4 : MDIOS_DOUTR4_DOUT4_Field := 16#0#; -- unspecified Reserved_16_31 : HAL.UInt16 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MDIOS_DOUTR4_Register use record DOUT4 at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype MDIOS_DOUTR5_DOUT5_Field is HAL.UInt16; -- MDIOS output data register 5 type MDIOS_DOUTR5_Register is record -- Output data sent to MDIO Master during read frames DOUT5 : MDIOS_DOUTR5_DOUT5_Field := 16#0#; -- unspecified Reserved_16_31 : HAL.UInt16 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MDIOS_DOUTR5_Register use record DOUT5 at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype MDIOS_DOUTR6_DOUT6_Field is HAL.UInt16; -- MDIOS output data register 6 type MDIOS_DOUTR6_Register is record -- Output data sent to MDIO Master during read frames DOUT6 : MDIOS_DOUTR6_DOUT6_Field := 16#0#; -- unspecified Reserved_16_31 : HAL.UInt16 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MDIOS_DOUTR6_Register use record DOUT6 at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype MDIOS_DOUTR7_DOUT7_Field is HAL.UInt16; -- MDIOS output data register 7 type MDIOS_DOUTR7_Register is record -- Output data sent to MDIO Master during read frames DOUT7 : MDIOS_DOUTR7_DOUT7_Field := 16#0#; -- unspecified Reserved_16_31 : HAL.UInt16 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MDIOS_DOUTR7_Register use record DOUT7 at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype MDIOS_DOUTR8_DOUT8_Field is HAL.UInt16; -- MDIOS output data register 8 type MDIOS_DOUTR8_Register is record -- Output data sent to MDIO Master during read frames DOUT8 : MDIOS_DOUTR8_DOUT8_Field := 16#0#; -- unspecified Reserved_16_31 : HAL.UInt16 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MDIOS_DOUTR8_Register use record DOUT8 at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype MDIOS_DOUTR9_DOUT9_Field is HAL.UInt16; -- MDIOS output data register 9 type MDIOS_DOUTR9_Register is record -- Output data sent to MDIO Master during read frames DOUT9 : MDIOS_DOUTR9_DOUT9_Field := 16#0#; -- unspecified Reserved_16_31 : HAL.UInt16 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MDIOS_DOUTR9_Register use record DOUT9 at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype MDIOS_DOUTR10_DOUT10_Field is HAL.UInt16; -- MDIOS output data register 10 type MDIOS_DOUTR10_Register is record -- Output data sent to MDIO Master during read frames DOUT10 : MDIOS_DOUTR10_DOUT10_Field := 16#0#; -- unspecified Reserved_16_31 : HAL.UInt16 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MDIOS_DOUTR10_Register use record DOUT10 at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype MDIOS_DOUTR11_DOUT11_Field is HAL.UInt16; -- MDIOS output data register 11 type MDIOS_DOUTR11_Register is record -- Output data sent to MDIO Master during read frames DOUT11 : MDIOS_DOUTR11_DOUT11_Field := 16#0#; -- unspecified Reserved_16_31 : HAL.UInt16 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MDIOS_DOUTR11_Register use record DOUT11 at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype MDIOS_DOUTR12_DOUT12_Field is HAL.UInt16; -- MDIOS output data register 12 type MDIOS_DOUTR12_Register is record -- Output data sent to MDIO Master during read frames DOUT12 : MDIOS_DOUTR12_DOUT12_Field := 16#0#; -- unspecified Reserved_16_31 : HAL.UInt16 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MDIOS_DOUTR12_Register use record DOUT12 at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype MDIOS_DOUTR13_DOUT13_Field is HAL.UInt16; -- MDIOS output data register 13 type MDIOS_DOUTR13_Register is record -- Output data sent to MDIO Master during read frames DOUT13 : MDIOS_DOUTR13_DOUT13_Field := 16#0#; -- unspecified Reserved_16_31 : HAL.UInt16 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MDIOS_DOUTR13_Register use record DOUT13 at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype MDIOS_DOUTR14_DOUT14_Field is HAL.UInt16; -- MDIOS output data register 14 type MDIOS_DOUTR14_Register is record -- Output data sent to MDIO Master during read frames DOUT14 : MDIOS_DOUTR14_DOUT14_Field := 16#0#; -- unspecified Reserved_16_31 : HAL.UInt16 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MDIOS_DOUTR14_Register use record DOUT14 at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype MDIOS_DOUTR15_DOUT15_Field is HAL.UInt16; -- MDIOS output data register 15 type MDIOS_DOUTR15_Register is record -- Output data sent to MDIO Master during read frames DOUT15 : MDIOS_DOUTR15_DOUT15_Field := 16#0#; -- unspecified Reserved_16_31 : HAL.UInt16 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MDIOS_DOUTR15_Register use record DOUT15 at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype MDIOS_DOUTR16_DOUT16_Field is HAL.UInt16; -- MDIOS output data register 16 type MDIOS_DOUTR16_Register is record -- Output data sent to MDIO Master during read frames DOUT16 : MDIOS_DOUTR16_DOUT16_Field := 16#0#; -- unspecified Reserved_16_31 : HAL.UInt16 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MDIOS_DOUTR16_Register use record DOUT16 at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype MDIOS_DOUTR17_DOUT17_Field is HAL.UInt16; -- MDIOS output data register 17 type MDIOS_DOUTR17_Register is record -- Output data sent to MDIO Master during read frames DOUT17 : MDIOS_DOUTR17_DOUT17_Field := 16#0#; -- unspecified Reserved_16_31 : HAL.UInt16 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MDIOS_DOUTR17_Register use record DOUT17 at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype MDIOS_DOUTR18_DOUT18_Field is HAL.UInt16; -- MDIOS output data register 18 type MDIOS_DOUTR18_Register is record -- Output data sent to MDIO Master during read frames DOUT18 : MDIOS_DOUTR18_DOUT18_Field := 16#0#; -- unspecified Reserved_16_31 : HAL.UInt16 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MDIOS_DOUTR18_Register use record DOUT18 at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype MDIOS_DOUTR19_DOUT19_Field is HAL.UInt16; -- MDIOS output data register 19 type MDIOS_DOUTR19_Register is record -- Output data sent to MDIO Master during read frames DOUT19 : MDIOS_DOUTR19_DOUT19_Field := 16#0#; -- unspecified Reserved_16_31 : HAL.UInt16 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MDIOS_DOUTR19_Register use record DOUT19 at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype MDIOS_DOUTR20_DOUT20_Field is HAL.UInt16; -- MDIOS output data register 20 type MDIOS_DOUTR20_Register is record -- Output data sent to MDIO Master during read frames DOUT20 : MDIOS_DOUTR20_DOUT20_Field := 16#0#; -- unspecified Reserved_16_31 : HAL.UInt16 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MDIOS_DOUTR20_Register use record DOUT20 at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype MDIOS_DOUTR21_DOUT21_Field is HAL.UInt16; -- MDIOS output data register 21 type MDIOS_DOUTR21_Register is record -- Output data sent to MDIO Master during read frames DOUT21 : MDIOS_DOUTR21_DOUT21_Field := 16#0#; -- unspecified Reserved_16_31 : HAL.UInt16 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MDIOS_DOUTR21_Register use record DOUT21 at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype MDIOS_DOUTR22_DOUT22_Field is HAL.UInt16; -- MDIOS output data register 22 type MDIOS_DOUTR22_Register is record -- Output data sent to MDIO Master during read frames DOUT22 : MDIOS_DOUTR22_DOUT22_Field := 16#0#; -- unspecified Reserved_16_31 : HAL.UInt16 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MDIOS_DOUTR22_Register use record DOUT22 at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype MDIOS_DOUTR23_DOUT23_Field is HAL.UInt16; -- MDIOS output data register 23 type MDIOS_DOUTR23_Register is record -- Output data sent to MDIO Master during read frames DOUT23 : MDIOS_DOUTR23_DOUT23_Field := 16#0#; -- unspecified Reserved_16_31 : HAL.UInt16 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MDIOS_DOUTR23_Register use record DOUT23 at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype MDIOS_DOUTR24_DOUT24_Field is HAL.UInt16; -- MDIOS output data register 24 type MDIOS_DOUTR24_Register is record -- Output data sent to MDIO Master during read frames DOUT24 : MDIOS_DOUTR24_DOUT24_Field := 16#0#; -- unspecified Reserved_16_31 : HAL.UInt16 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MDIOS_DOUTR24_Register use record DOUT24 at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype MDIOS_DOUTR25_DOUT25_Field is HAL.UInt16; -- MDIOS output data register 25 type MDIOS_DOUTR25_Register is record -- Output data sent to MDIO Master during read frames DOUT25 : MDIOS_DOUTR25_DOUT25_Field := 16#0#; -- unspecified Reserved_16_31 : HAL.UInt16 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MDIOS_DOUTR25_Register use record DOUT25 at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype MDIOS_DOUTR26_DOUT26_Field is HAL.UInt16; -- MDIOS output data register 26 type MDIOS_DOUTR26_Register is record -- Output data sent to MDIO Master during read frames DOUT26 : MDIOS_DOUTR26_DOUT26_Field := 16#0#; -- unspecified Reserved_16_31 : HAL.UInt16 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MDIOS_DOUTR26_Register use record DOUT26 at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype MDIOS_DOUTR27_DOUT27_Field is HAL.UInt16; -- MDIOS output data register 27 type MDIOS_DOUTR27_Register is record -- Output data sent to MDIO Master during read frames DOUT27 : MDIOS_DOUTR27_DOUT27_Field := 16#0#; -- unspecified Reserved_16_31 : HAL.UInt16 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MDIOS_DOUTR27_Register use record DOUT27 at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype MDIOS_DOUTR28_DOUT28_Field is HAL.UInt16; -- MDIOS output data register 28 type MDIOS_DOUTR28_Register is record -- Output data sent to MDIO Master during read frames DOUT28 : MDIOS_DOUTR28_DOUT28_Field := 16#0#; -- unspecified Reserved_16_31 : HAL.UInt16 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MDIOS_DOUTR28_Register use record DOUT28 at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype MDIOS_DOUTR29_DOUT29_Field is HAL.UInt16; -- MDIOS output data register 29 type MDIOS_DOUTR29_Register is record -- Output data sent to MDIO Master during read frames DOUT29 : MDIOS_DOUTR29_DOUT29_Field := 16#0#; -- unspecified Reserved_16_31 : HAL.UInt16 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MDIOS_DOUTR29_Register use record DOUT29 at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype MDIOS_DOUTR30_DOUT30_Field is HAL.UInt16; -- MDIOS output data register 30 type MDIOS_DOUTR30_Register is record -- Output data sent to MDIO Master during read frames DOUT30 : MDIOS_DOUTR30_DOUT30_Field := 16#0#; -- unspecified Reserved_16_31 : HAL.UInt16 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MDIOS_DOUTR30_Register use record DOUT30 at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype MDIOS_DOUTR31_DOUT31_Field is HAL.UInt16; -- MDIOS output data register 31 type MDIOS_DOUTR31_Register is record -- Output data sent to MDIO Master during read frames DOUT31 : MDIOS_DOUTR31_DOUT31_Field := 16#0#; -- unspecified Reserved_16_31 : HAL.UInt16 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MDIOS_DOUTR31_Register use record DOUT31 at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; ----------------- -- Peripherals -- ----------------- -- Management data input/output slave type MDIOS_Peripheral is record -- MDIOS configuration register MDIOS_CR : aliased MDIOS_CR_Register; -- MDIOS write flag register MDIOS_WRFR : aliased HAL.UInt32; -- MDIOS clear write flag register MDIOS_CWRFR : aliased HAL.UInt32; -- MDIOS read flag register MDIOS_RDFR : aliased HAL.UInt32; -- MDIOS clear read flag register MDIOS_CRDFR : aliased HAL.UInt32; -- MDIOS status register MDIOS_SR : aliased MDIOS_SR_Register; -- MDIOS clear flag register MDIOS_CLRFR : aliased MDIOS_CLRFR_Register; -- MDIOS input data register 0 MDIOS_DINR0 : aliased MDIOS_DINR0_Register; -- MDIOS input data register 1 MDIOS_DINR1 : aliased MDIOS_DINR1_Register; -- MDIOS input data register 2 MDIOS_DINR2 : aliased MDIOS_DINR2_Register; -- MDIOS input data register 3 MDIOS_DINR3 : aliased MDIOS_DINR3_Register; -- MDIOS input data register 4 MDIOS_DINR4 : aliased MDIOS_DINR4_Register; -- MDIOS input data register 5 MDIOS_DINR5 : aliased MDIOS_DINR5_Register; -- MDIOS input data register 6 MDIOS_DINR6 : aliased MDIOS_DINR6_Register; -- MDIOS input data register 7 MDIOS_DINR7 : aliased MDIOS_DINR7_Register; -- MDIOS input data register 8 MDIOS_DINR8 : aliased MDIOS_DINR8_Register; -- MDIOS input data register 9 MDIOS_DINR9 : aliased MDIOS_DINR9_Register; -- MDIOS input data register 10 MDIOS_DINR10 : aliased MDIOS_DINR10_Register; -- MDIOS input data register 11 MDIOS_DINR11 : aliased MDIOS_DINR11_Register; -- MDIOS input data register 12 MDIOS_DINR12 : aliased MDIOS_DINR12_Register; -- MDIOS input data register 13 MDIOS_DINR13 : aliased MDIOS_DINR13_Register; -- MDIOS input data register 14 MDIOS_DINR14 : aliased MDIOS_DINR14_Register; -- MDIOS input data register 15 MDIOS_DINR15 : aliased MDIOS_DINR15_Register; -- MDIOS input data register 16 MDIOS_DINR16 : aliased MDIOS_DINR16_Register; -- MDIOS input data register 17 MDIOS_DINR17 : aliased MDIOS_DINR17_Register; -- MDIOS input data register 18 MDIOS_DINR18 : aliased MDIOS_DINR18_Register; -- MDIOS input data register 19 MDIOS_DINR19 : aliased MDIOS_DINR19_Register; -- MDIOS input data register 20 MDIOS_DINR20 : aliased MDIOS_DINR20_Register; -- MDIOS input data register 21 MDIOS_DINR21 : aliased MDIOS_DINR21_Register; -- MDIOS input data register 22 MDIOS_DINR22 : aliased MDIOS_DINR22_Register; -- MDIOS input data register 23 MDIOS_DINR23 : aliased MDIOS_DINR23_Register; -- MDIOS input data register 24 MDIOS_DINR24 : aliased MDIOS_DINR24_Register; -- MDIOS input data register 25 MDIOS_DINR25 : aliased MDIOS_DINR25_Register; -- MDIOS input data register 26 MDIOS_DINR26 : aliased MDIOS_DINR26_Register; -- MDIOS input data register 27 MDIOS_DINR27 : aliased MDIOS_DINR27_Register; -- MDIOS input data register 28 MDIOS_DINR28 : aliased MDIOS_DINR28_Register; -- MDIOS input data register 29 MDIOS_DINR29 : aliased MDIOS_DINR29_Register; -- MDIOS input data register 30 MDIOS_DINR30 : aliased MDIOS_DINR30_Register; -- MDIOS input data register 31 MDIOS_DINR31 : aliased MDIOS_DINR31_Register; -- MDIOS output data register 0 MDIOS_DOUTR0 : aliased MDIOS_DOUTR0_Register; -- MDIOS output data register 1 MDIOS_DOUTR1 : aliased MDIOS_DOUTR1_Register; -- MDIOS output data register 2 MDIOS_DOUTR2 : aliased MDIOS_DOUTR2_Register; -- MDIOS output data register 3 MDIOS_DOUTR3 : aliased MDIOS_DOUTR3_Register; -- MDIOS output data register 4 MDIOS_DOUTR4 : aliased MDIOS_DOUTR4_Register; -- MDIOS output data register 5 MDIOS_DOUTR5 : aliased MDIOS_DOUTR5_Register; -- MDIOS output data register 6 MDIOS_DOUTR6 : aliased MDIOS_DOUTR6_Register; -- MDIOS output data register 7 MDIOS_DOUTR7 : aliased MDIOS_DOUTR7_Register; -- MDIOS output data register 8 MDIOS_DOUTR8 : aliased MDIOS_DOUTR8_Register; -- MDIOS output data register 9 MDIOS_DOUTR9 : aliased MDIOS_DOUTR9_Register; -- MDIOS output data register 10 MDIOS_DOUTR10 : aliased MDIOS_DOUTR10_Register; -- MDIOS output data register 11 MDIOS_DOUTR11 : aliased MDIOS_DOUTR11_Register; -- MDIOS output data register 12 MDIOS_DOUTR12 : aliased MDIOS_DOUTR12_Register; -- MDIOS output data register 13 MDIOS_DOUTR13 : aliased MDIOS_DOUTR13_Register; -- MDIOS output data register 14 MDIOS_DOUTR14 : aliased MDIOS_DOUTR14_Register; -- MDIOS output data register 15 MDIOS_DOUTR15 : aliased MDIOS_DOUTR15_Register; -- MDIOS output data register 16 MDIOS_DOUTR16 : aliased MDIOS_DOUTR16_Register; -- MDIOS output data register 17 MDIOS_DOUTR17 : aliased MDIOS_DOUTR17_Register; -- MDIOS output data register 18 MDIOS_DOUTR18 : aliased MDIOS_DOUTR18_Register; -- MDIOS output data register 19 MDIOS_DOUTR19 : aliased MDIOS_DOUTR19_Register; -- MDIOS output data register 20 MDIOS_DOUTR20 : aliased MDIOS_DOUTR20_Register; -- MDIOS output data register 21 MDIOS_DOUTR21 : aliased MDIOS_DOUTR21_Register; -- MDIOS output data register 22 MDIOS_DOUTR22 : aliased MDIOS_DOUTR22_Register; -- MDIOS output data register 23 MDIOS_DOUTR23 : aliased MDIOS_DOUTR23_Register; -- MDIOS output data register 24 MDIOS_DOUTR24 : aliased MDIOS_DOUTR24_Register; -- MDIOS output data register 25 MDIOS_DOUTR25 : aliased MDIOS_DOUTR25_Register; -- MDIOS output data register 26 MDIOS_DOUTR26 : aliased MDIOS_DOUTR26_Register; -- MDIOS output data register 27 MDIOS_DOUTR27 : aliased MDIOS_DOUTR27_Register; -- MDIOS output data register 28 MDIOS_DOUTR28 : aliased MDIOS_DOUTR28_Register; -- MDIOS output data register 29 MDIOS_DOUTR29 : aliased MDIOS_DOUTR29_Register; -- MDIOS output data register 30 MDIOS_DOUTR30 : aliased MDIOS_DOUTR30_Register; -- MDIOS output data register 31 MDIOS_DOUTR31 : aliased MDIOS_DOUTR31_Register; end record with Volatile; for MDIOS_Peripheral use record MDIOS_CR at 16#0# range 0 .. 31; MDIOS_WRFR at 16#4# range 0 .. 31; MDIOS_CWRFR at 16#8# range 0 .. 31; MDIOS_RDFR at 16#C# range 0 .. 31; MDIOS_CRDFR at 16#10# range 0 .. 31; MDIOS_SR at 16#14# range 0 .. 31; MDIOS_CLRFR at 16#18# range 0 .. 31; MDIOS_DINR0 at 16#1C# range 0 .. 31; MDIOS_DINR1 at 16#20# range 0 .. 31; MDIOS_DINR2 at 16#24# range 0 .. 31; MDIOS_DINR3 at 16#28# range 0 .. 31; MDIOS_DINR4 at 16#2C# range 0 .. 31; MDIOS_DINR5 at 16#30# range 0 .. 31; MDIOS_DINR6 at 16#34# range 0 .. 31; MDIOS_DINR7 at 16#38# range 0 .. 31; MDIOS_DINR8 at 16#3C# range 0 .. 31; MDIOS_DINR9 at 16#40# range 0 .. 31; MDIOS_DINR10 at 16#44# range 0 .. 31; MDIOS_DINR11 at 16#48# range 0 .. 31; MDIOS_DINR12 at 16#4C# range 0 .. 31; MDIOS_DINR13 at 16#50# range 0 .. 31; MDIOS_DINR14 at 16#54# range 0 .. 31; MDIOS_DINR15 at 16#58# range 0 .. 31; MDIOS_DINR16 at 16#5C# range 0 .. 31; MDIOS_DINR17 at 16#60# range 0 .. 31; MDIOS_DINR18 at 16#64# range 0 .. 31; MDIOS_DINR19 at 16#68# range 0 .. 31; MDIOS_DINR20 at 16#6C# range 0 .. 31; MDIOS_DINR21 at 16#70# range 0 .. 31; MDIOS_DINR22 at 16#74# range 0 .. 31; MDIOS_DINR23 at 16#78# range 0 .. 31; MDIOS_DINR24 at 16#7C# range 0 .. 31; MDIOS_DINR25 at 16#80# range 0 .. 31; MDIOS_DINR26 at 16#84# range 0 .. 31; MDIOS_DINR27 at 16#88# range 0 .. 31; MDIOS_DINR28 at 16#8C# range 0 .. 31; MDIOS_DINR29 at 16#90# range 0 .. 31; MDIOS_DINR30 at 16#94# range 0 .. 31; MDIOS_DINR31 at 16#98# range 0 .. 31; MDIOS_DOUTR0 at 16#9C# range 0 .. 31; MDIOS_DOUTR1 at 16#A0# range 0 .. 31; MDIOS_DOUTR2 at 16#A4# range 0 .. 31; MDIOS_DOUTR3 at 16#A8# range 0 .. 31; MDIOS_DOUTR4 at 16#AC# range 0 .. 31; MDIOS_DOUTR5 at 16#B0# range 0 .. 31; MDIOS_DOUTR6 at 16#B4# range 0 .. 31; MDIOS_DOUTR7 at 16#B8# range 0 .. 31; MDIOS_DOUTR8 at 16#BC# range 0 .. 31; MDIOS_DOUTR9 at 16#C0# range 0 .. 31; MDIOS_DOUTR10 at 16#C4# range 0 .. 31; MDIOS_DOUTR11 at 16#C8# range 0 .. 31; MDIOS_DOUTR12 at 16#CC# range 0 .. 31; MDIOS_DOUTR13 at 16#D0# range 0 .. 31; MDIOS_DOUTR14 at 16#D4# range 0 .. 31; MDIOS_DOUTR15 at 16#D8# range 0 .. 31; MDIOS_DOUTR16 at 16#DC# range 0 .. 31; MDIOS_DOUTR17 at 16#E0# range 0 .. 31; MDIOS_DOUTR18 at 16#E4# range 0 .. 31; MDIOS_DOUTR19 at 16#E8# range 0 .. 31; MDIOS_DOUTR20 at 16#EC# range 0 .. 31; MDIOS_DOUTR21 at 16#F0# range 0 .. 31; MDIOS_DOUTR22 at 16#F4# range 0 .. 31; MDIOS_DOUTR23 at 16#F8# range 0 .. 31; MDIOS_DOUTR24 at 16#FC# range 0 .. 31; MDIOS_DOUTR25 at 16#100# range 0 .. 31; MDIOS_DOUTR26 at 16#104# range 0 .. 31; MDIOS_DOUTR27 at 16#108# range 0 .. 31; MDIOS_DOUTR28 at 16#10C# range 0 .. 31; MDIOS_DOUTR29 at 16#110# range 0 .. 31; MDIOS_DOUTR30 at 16#114# range 0 .. 31; MDIOS_DOUTR31 at 16#118# range 0 .. 31; end record; -- Management data input/output slave MDIOS_Periph : aliased MDIOS_Peripheral with Import, Address => System'To_Address (16#40017800#); end STM32_SVD.MDIOS;
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- G N A T . T R A C E B A C K -- -- -- -- S p e c -- -- -- -- $Revision$ -- -- -- Copyright (C) 1999-2001 Ada Core Technologies, 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 is maintained by Ada Core Technologies Inc (http://www.gnat.com). -- -- -- ------------------------------------------------------------------------------ -- Run-time non-symbolic traceback support -- This package provides a method for generating a traceback of the -- current execution location. The traceback shows the locations of -- calls in the call chain, up to either the top or a designated -- number of levels. -- The traceback information is in the form of absolute code locations. -- These code locations may be converted to corresponding source locations -- using the external addr2line utility, or from within GDB. -- To analyze the code locations later using addr2line or gdb, the necessary -- units must be compiled with the debugging switch -g in the usual manner. -- Note that it is not necessary to compile with -g to use Call_Chain. In -- other words, the following sequence of steps can be used: -- Compile without -g -- Run the program, and call Call_Chain -- Recompile with -g -- Use addr2line to interpret the absolute call locations -- This capability is currently supported on the following targets: -- All x86 ports -- AiX PowerPC -- HP-UX -- Irix -- Solaris sparc -- Tru64 -- VxWorks PowerPC -- VxWorks Alpha with System; package GNAT.Traceback is pragma Elaborate_Body; subtype Code_Loc is System.Address; -- Code location used in building tracebacks type Tracebacks_Array is array (Positive range <>) of Code_Loc; -- Traceback array used to hold a generated traceback list. ---------------- -- Call_Chain -- ---------------- procedure Call_Chain (Traceback : out Tracebacks_Array; Len : out Natural); -- Store up to Traceback'Length tracebacks corresponding to the current -- call chain. The first entry stored corresponds to the deepest level -- of subprogram calls. Len shows the number of traceback entries stored. -- It will be equal to Traceback'Length unless the entire traceback is -- shorter, in which case positions in Traceback past the Len position -- are undefined on return. end GNAT.Traceback;
-- 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.SPI is pragma Preelaborate; --------------- -- Registers -- --------------- -- Write '1' to Enable interrupt for READY event type INTENSET_READY_Field is (-- Read: Disabled Disabled, -- Read: Enabled Enabled) with Size => 1; for INTENSET_READY_Field use (Disabled => 0, Enabled => 1); -- Write '1' to Enable interrupt for READY event type INTENSET_READY_Field_1 is (-- Reset value for the field Intenset_Ready_Field_Reset, -- Enable Set) with Size => 1; for INTENSET_READY_Field_1 use (Intenset_Ready_Field_Reset => 0, Set => 1); -- Enable interrupt type INTENSET_Register is record -- unspecified Reserved_0_1 : HAL.UInt2 := 16#0#; -- Write '1' to Enable interrupt for READY event READY : INTENSET_READY_Field_1 := Intenset_Ready_Field_Reset; -- unspecified Reserved_3_31 : HAL.UInt29 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for INTENSET_Register use record Reserved_0_1 at 0 range 0 .. 1; READY at 0 range 2 .. 2; Reserved_3_31 at 0 range 3 .. 31; end record; -- Write '1' to Disable interrupt for READY event type INTENCLR_READY_Field is (-- Read: Disabled Disabled, -- Read: Enabled Enabled) with Size => 1; for INTENCLR_READY_Field use (Disabled => 0, Enabled => 1); -- Write '1' to Disable interrupt for READY event type INTENCLR_READY_Field_1 is (-- Reset value for the field Intenclr_Ready_Field_Reset, -- Disable Clear) with Size => 1; for INTENCLR_READY_Field_1 use (Intenclr_Ready_Field_Reset => 0, Clear => 1); -- Disable interrupt type INTENCLR_Register is record -- unspecified Reserved_0_1 : HAL.UInt2 := 16#0#; -- Write '1' to Disable interrupt for READY event READY : INTENCLR_READY_Field_1 := Intenclr_Ready_Field_Reset; -- unspecified Reserved_3_31 : HAL.UInt29 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for INTENCLR_Register use record Reserved_0_1 at 0 range 0 .. 1; READY at 0 range 2 .. 2; Reserved_3_31 at 0 range 3 .. 31; end record; -- Enable or disable SPI type ENABLE_ENABLE_Field is (-- Disable SPI Disabled, -- Enable SPI Enabled) with Size => 4; for ENABLE_ENABLE_Field use (Disabled => 0, Enabled => 1); -- Enable SPI type ENABLE_Register is record -- Enable or disable SPI ENABLE : ENABLE_ENABLE_Field := NRF_SVD.SPI.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; subtype RXD_RXD_Field is HAL.UInt8; -- RXD register type RXD_Register is record -- Read-only. *** Reading this field has side effects on other resources -- ***. RX data received. Double buffered RXD : RXD_RXD_Field; -- unspecified Reserved_8_31 : HAL.UInt24; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for RXD_Register use record RXD at 0 range 0 .. 7; Reserved_8_31 at 0 range 8 .. 31; end record; subtype TXD_TXD_Field is HAL.UInt8; -- TXD register type TXD_Register is record -- TX data to send. Double buffered TXD : TXD_TXD_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 TXD_Register use record TXD at 0 range 0 .. 7; Reserved_8_31 at 0 range 8 .. 31; end record; -- Bit order type CONFIG_ORDER_Field is (-- Most significant bit shifted out first Msbfirst, -- Least significant bit shifted out first Lsbfirst) with Size => 1; for CONFIG_ORDER_Field use (Msbfirst => 0, Lsbfirst => 1); -- Serial clock (SCK) phase type CONFIG_CPHA_Field is (-- Sample on leading edge of clock, shift serial data on trailing edge Leading, -- Sample on trailing edge of clock, shift serial data on leading edge Trailing) with Size => 1; for CONFIG_CPHA_Field use (Leading => 0, Trailing => 1); -- Serial clock (SCK) polarity type CONFIG_CPOL_Field is (-- Active high Activehigh, -- Active low Activelow) with Size => 1; for CONFIG_CPOL_Field use (Activehigh => 0, Activelow => 1); -- Configuration register type CONFIG_Register is record -- Bit order ORDER : CONFIG_ORDER_Field := NRF_SVD.SPI.Msbfirst; -- Serial clock (SCK) phase CPHA : CONFIG_CPHA_Field := NRF_SVD.SPI.Leading; -- Serial clock (SCK) polarity CPOL : CONFIG_CPOL_Field := NRF_SVD.SPI.Activehigh; -- unspecified Reserved_3_31 : HAL.UInt29 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for CONFIG_Register use record ORDER at 0 range 0 .. 0; CPHA at 0 range 1 .. 1; CPOL at 0 range 2 .. 2; Reserved_3_31 at 0 range 3 .. 31; end record; ----------------- -- Peripherals -- ----------------- -- Serial Peripheral Interface 0 type SPI_Peripheral is record -- TXD byte sent and RXD byte received EVENTS_READY : aliased HAL.UInt32; -- Enable interrupt INTENSET : aliased INTENSET_Register; -- Disable interrupt INTENCLR : aliased INTENCLR_Register; -- Enable SPI ENABLE : aliased ENABLE_Register; -- Pin select for SCK. PSELSCK : aliased HAL.UInt32; -- Pin select for MISO. PSELMISO : aliased HAL.UInt32; -- Pin select for MOSI. PSELMOSI : aliased HAL.UInt32; -- RXD register RXD : aliased RXD_Register; -- TXD register TXD : aliased TXD_Register; -- SPI frequency FREQUENCY : aliased HAL.UInt32; -- Configuration register CONFIG : aliased CONFIG_Register; end record with Volatile; for SPI_Peripheral use record EVENTS_READY at 16#108# range 0 .. 31; INTENSET at 16#304# range 0 .. 31; INTENCLR at 16#308# range 0 .. 31; ENABLE at 16#500# range 0 .. 31; PSELSCK at 16#508# range 0 .. 31; PSELMISO at 16#50C# range 0 .. 31; PSELMOSI at 16#510# range 0 .. 31; RXD at 16#518# range 0 .. 31; TXD at 16#51C# range 0 .. 31; FREQUENCY at 16#524# range 0 .. 31; CONFIG at 16#554# range 0 .. 31; end record; -- Serial Peripheral Interface 0 SPI0_Periph : aliased SPI_Peripheral with Import, Address => SPI0_Base; -- Serial Peripheral Interface 1 SPI1_Periph : aliased SPI_Peripheral with Import, Address => SPI1_Base; -- Serial Peripheral Interface 2 SPI2_Periph : aliased SPI_Peripheral with Import, Address => SPI2_Base; end NRF_SVD.SPI;
-- 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; package Orka.SIMD.SSE4_1.Singles.Arithmetic is pragma Pure; use Orka.SIMD.SSE.Singles; function Dot (Left, Right : m128; Mask : Unsigned_32) return m128 with Import, Convention => Intrinsic, External_Name => "__builtin_ia32_dpps"; end Orka.SIMD.SSE4_1.Singles.Arithmetic;
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- S Y S T E M . D O U B L E _ R E A L . P R O D U C T -- -- -- -- B o d y -- -- -- -- Copyright (C) 2021, 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 the default version of the separate package body with Interfaces; use Interfaces; separate (System.Double_Real) package body Product is procedure Split (N : Num; Hi : out Num; Lo : out Num); -- Compute high part and low part of N ----------- -- Split -- ----------- -- We use a bit manipulation algorithm instead of Veltkamp's splitting -- because it is faster and has the property that the magnitude of the -- high part is never larger than that of the input number, which will -- avoid spurious overflows in the Two_Prod algorithm. -- See the recent paper by Claude-Pierre Jeannerod, Jean-Michel Muller -- and Paul Zimmermann: On various ways to split a floating-point number -- ARITH 2018 - 25th IEEE Symposium on Computer Arithmetic, Jun 2018, -- Amherst (MA), United States, pages 53-60. procedure Split (N : Num; Hi : out Num; Lo : out Num) is X : Num; begin -- Spill the input into the appropriate (maybe larger) bit container, -- mask out the low bits and reload the modified value. case Num'Machine_Mantissa is when 24 => declare Rep32 : aliased Interfaces.Unsigned_32; Temp : Num := N with Address => Rep32'Address; pragma Annotate (CodePeer, Modified, Rep32); begin -- Mask out the low 12 bits Rep32 := Rep32 and 16#FFFFF000#; X := Temp; end; when 53 => declare Rep64 : aliased Interfaces.Unsigned_64; Temp : Num := N with Address => Rep64'Address; pragma Annotate (CodePeer, Modified, Rep64); begin -- Mask out the low 27 bits Rep64 := Rep64 and 16#FFFFFFFFF8000000#; X := Temp; end; when 64 => declare Rep80 : aliased array (1 .. 2) of Interfaces.Unsigned_64; Temp : Num := N with Address => Rep80'Address; pragma Annotate (CodePeer, Modified, Rep80); begin -- Mask out the low 32 bits if System.Default_Bit_Order = High_Order_First then Rep80 (1) := Rep80 (1) and 16#FFFFFFFFFFFF0000#; Rep80 (2) := Rep80 (2) and 16#0000FFFFFFFFFFFF#; else Rep80 (1) := Rep80 (1) and 16#FFFFFFFF00000000#; end if; X := Temp; end; when others => raise Program_Error; end case; -- Deal with denormalized numbers if X = 0.0 then Hi := N; Lo := 0.0; else Hi := X; Lo := N - X; end if; end Split; -------------- -- Two_Prod -- -------------- function Two_Prod (A, B : Num) return Double_T is P : constant Num := A * B; Ahi, Alo, Bhi, Blo, E : Num; begin if Is_Infinity (P) or else Is_Zero (P) then return (P, 0.0); else Split (A, Ahi, Alo); Split (B, Bhi, Blo); E := ((Ahi * Bhi - P) + Ahi * Blo + Alo * Bhi) + Alo * Blo; return (P, E); end if; end Two_Prod; ------------- -- Two_Sqr -- ------------- function Two_Sqr (A : Num) return Double_T is Q : constant Num := A * A; Hi, Lo, E : Num; begin if Is_Infinity (Q) or else Is_Zero (Q) then return (Q, 0.0); else Split (A, Hi, Lo); E := ((Hi * Hi - Q) + 2.0 * Hi * Lo) + Lo * Lo; return (Q, E); end if; end Two_Sqr; end Product;
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- E X P _ C O D E -- -- -- -- B o d y -- -- -- -- $Revision$ -- -- -- Copyright (C) 1996-2001 Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 2, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- -- for more details. You should have received a copy of the GNU General -- -- Public License distributed with GNAT; see file COPYING. If not, write -- -- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, -- -- MA 02111-1307, USA. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ with Atree; use Atree; with Einfo; use Einfo; with Errout; use Errout; with Fname; use Fname; with Lib; use Lib; with Namet; use Namet; with Nlists; use Nlists; with Nmake; use Nmake; with Opt; use Opt; with Rtsfind; use Rtsfind; with Sem_Eval; use Sem_Eval; with Sem_Util; use Sem_Util; with Sinfo; use Sinfo; with Stringt; use Stringt; with Tbuild; use Tbuild; package body Exp_Code is ----------------------- -- Local_Subprograms -- ----------------------- function Asm_Constraint (Operand_Var : Node_Id) return Node_Id; -- Common processing for Asm_Input_Constraint and Asm_Output_Constraint. -- Obtains the constraint argument from the global operand variable -- Operand_Var, which must be non-Empty. function Asm_Operand (Operand_Var : Node_Id) return Node_Id; -- Common processing for Asm_Input_Value and Asm_Output_Variable. Obtains -- the value/variable argument from Operand_Var, the global operand -- variable. Returns Empty if no operand available. function Get_String_Node (S : Node_Id) return Node_Id; -- Given S, a static expression node of type String, returns the -- string literal node. This is needed to deal with the use of constants -- for these expressions, which is perfectly permissible. procedure Next_Asm_Operand (Operand_Var : in out Node_Id); -- Common processing for Next_Asm_Input and Next_Asm_Output, updates -- the value of the global operand variable Operand_Var appropriately. procedure Setup_Asm_IO_Args (Arg : Node_Id; Operand_Var : out Node_Id); -- Common processing for Setup_Asm_Inputs and Setup_Asm_Outputs. Arg -- is the actual parameter from the call, and Operand_Var is the global -- operand variable to be initialized to the first operand. ---------------------- -- Global Variables -- ---------------------- Current_Input_Operand : Node_Id := Empty; -- Points to current Asm_Input_Operand attribute reference. Initialized -- by Setup_Asm_Inputs, updated by Next_Asm_Input, and referenced by -- Asm_Input_Constraint and Asm_Input_Value. Current_Output_Operand : Node_Id := Empty; -- Points to current Asm_Output_Operand attribute reference. Initialized -- by Setup_Asm_Outputs, updated by Next_Asm_Output, and referenced by -- Asm_Output_Constraint and Asm_Output_Variable. -------------------- -- Asm_Constraint -- -------------------- function Asm_Constraint (Operand_Var : Node_Id) return Node_Id is begin pragma Assert (Present (Operand_Var)); return Get_String_Node (First (Expressions (Operand_Var))); end Asm_Constraint; -------------------------- -- Asm_Input_Constraint -- -------------------------- -- Note: error checking on Asm_Input attribute done in Sem_Attr function Asm_Input_Constraint return Node_Id is begin return Get_String_Node (Asm_Constraint (Current_Input_Operand)); end Asm_Input_Constraint; --------------------- -- Asm_Input_Value -- --------------------- -- Note: error checking on Asm_Input attribute done in Sem_Attr function Asm_Input_Value return Node_Id is begin return Asm_Operand (Current_Input_Operand); end Asm_Input_Value; ----------------- -- Asm_Operand -- ----------------- function Asm_Operand (Operand_Var : Node_Id) return Node_Id is begin if No (Operand_Var) then return Empty; else return Next (First (Expressions (Operand_Var))); end if; end Asm_Operand; --------------------------- -- Asm_Output_Constraint -- --------------------------- -- Note: error checking on Asm_Output attribute done in Sem_Attr function Asm_Output_Constraint return Node_Id is begin return Asm_Constraint (Current_Output_Operand); end Asm_Output_Constraint; ------------------------- -- Asm_Output_Variable -- ------------------------- -- Note: error checking on Asm_Output attribute done in Sem_Attr function Asm_Output_Variable return Node_Id is begin return Asm_Operand (Current_Output_Operand); end Asm_Output_Variable; ------------------ -- Asm_Template -- ------------------ function Asm_Template (N : Node_Id) return Node_Id is Call : constant Node_Id := Expression (Expression (N)); Temp : constant Node_Id := First_Actual (Call); begin -- Require static expression for template. We also allow a string -- literal (this is useful for Ada 83 mode where string expressions -- are never static). if Is_OK_Static_Expression (Temp) or else (Ada_83 and then Nkind (Temp) = N_String_Literal) then return Get_String_Node (Temp); else Error_Msg_N ("asm template argument is not static", Temp); return Empty; end if; end Asm_Template; ---------------------- -- Clobber_Get_Next -- ---------------------- Clobber_Node : Node_Id; -- String literal node for clobber string. Initialized by Clobber_Setup, -- and not modified by Clobber_Get_Next. Empty if clobber string was in -- error (resulting in no clobber arguments being returned). Clobber_Ptr : Nat; -- Pointer to current character of string. Initialized to 1 by the call -- to Clobber_Setup, and then updated by Clobber_Get_Next. function Clobber_Get_Next return Address is Str : constant String_Id := Strval (Clobber_Node); Len : constant Nat := String_Length (Str); C : Character; begin if No (Clobber_Node) then return Null_Address; end if; -- Skip spaces and commas before next register name loop -- Return null string if no more names if Clobber_Ptr > Len then return Null_Address; end if; C := Get_Character (Get_String_Char (Str, Clobber_Ptr)); exit when C /= ',' and then C /= ' '; Clobber_Ptr := Clobber_Ptr + 1; end loop; -- Acquire next register name Name_Len := 0; loop Name_Len := Name_Len + 1; Name_Buffer (Name_Len) := C; Clobber_Ptr := Clobber_Ptr + 1; exit when Clobber_Ptr > Len; C := Get_Character (Get_String_Char (Str, Clobber_Ptr)); exit when C = ',' or else C = ' '; end loop; Name_Buffer (Name_Len + 1) := ASCII.NUL; return Name_Buffer'Address; end Clobber_Get_Next; ------------------- -- Clobber_Setup -- ------------------- procedure Clobber_Setup (N : Node_Id) is Call : constant Node_Id := Expression (Expression (N)); Clob : constant Node_Id := Next_Actual ( Next_Actual ( Next_Actual ( First_Actual (Call)))); begin if not Is_OK_Static_Expression (Clob) then Error_Msg_N ("asm clobber argument is not static", Clob); Clobber_Node := Empty; else Clobber_Node := Get_String_Node (Clob); Clobber_Ptr := 1; end if; end Clobber_Setup; --------------------- -- Expand_Asm_Call -- --------------------- procedure Expand_Asm_Call (N : Node_Id) is Loc : constant Source_Ptr := Sloc (N); procedure Check_IO_Operand (N : Node_Id); -- Check for incorrect input or output operand procedure Check_IO_Operand (N : Node_Id) is Err : Node_Id := N; begin -- The only identifier allows is No_xxput_Operands. Since we -- know the type is right, it is sufficient to see if the -- referenced entity is in a runtime routine. if Nkind (N) = N_Identifier and then Is_Predefined_File_Name (Unit_File_Name (Get_Source_Unit (Entity (N)))) then return; -- An attribute reference is fine, again the analysis reasonably -- guarantees that the attribute must be subtype'Asm_??put. elsif Nkind (N) = N_Attribute_Reference then return; -- The only other allowed form is an array aggregate in which -- all the entries are positional and are attribute references. elsif Nkind (N) = N_Aggregate then if Present (Component_Associations (N)) then Err := First (Component_Associations (N)); elsif Present (Expressions (N)) then Err := First (Expressions (N)); while Present (Err) loop exit when Nkind (Err) /= N_Attribute_Reference; Next (Err); end loop; if No (Err) then return; end if; end if; end if; -- If we fall through, Err is pointing to the bad node Error_Msg_N ("Asm operand has wrong form", Err); end Check_IO_Operand; -- Start of processing for Expand_Asm_Call begin -- Check that the input and output operands have the right -- form, as required by the documentation of the Asm feature: -- OUTPUT_OPERAND_LIST ::= -- No_Output_Operands -- | OUTPUT_OPERAND_ATTRIBUTE -- | (OUTPUT_OPERAND_ATTRIBUTE @{,OUTPUT_OPERAND_ATTRIBUTE@}) -- OUTPUT_OPERAND_ATTRIBUTE ::= -- SUBTYPE_MARK'Asm_Output (static_string_EXPRESSION, NAME) -- INPUT_OPERAND_LIST ::= -- No_Input_Operands -- | INPUT_OPERAND_ATTRIBUTE -- | (INPUT_OPERAND_ATTRIBUTE @{,INPUT_OPERAND_ATTRIBUTE@}) -- INPUT_OPERAND_ATTRIBUTE ::= -- SUBTYPE_MARK'Asm_Input (static_string_EXPRESSION, EXPRESSION) declare Arg_Output : constant Node_Id := Next_Actual (First_Actual (N)); Arg_Input : constant Node_Id := Next_Actual (Arg_Output); begin Check_IO_Operand (Arg_Output); Check_IO_Operand (Arg_Input); end; -- If we have the function call case, we are inside a code statement, -- and the tree is already in the necessary form for gigi. if Nkind (N) = N_Function_Call then null; -- For the procedure case, we convert the call into a code statement else pragma Assert (Nkind (N) = N_Procedure_Call_Statement); -- Note: strictly we should change the procedure call to a function -- call in the qualified expression, but since we are not going to -- reanalyze (see below), and the interface subprograms in this -- package don't care, we can leave it as a procedure call. Rewrite (N, Make_Code_Statement (Loc, Expression => Make_Qualified_Expression (Loc, Subtype_Mark => New_Occurrence_Of (RTE (RE_Asm_Insn), Loc), Expression => Relocate_Node (N)))); -- There is no need to reanalyze this node, it is completely analyzed -- already, at least sufficiently for the purposes of the abstract -- procedural interface defined in this package. Set_Analyzed (N); end if; end Expand_Asm_Call; --------------------- -- Get_String_Node -- --------------------- function Get_String_Node (S : Node_Id) return Node_Id is begin if Nkind (S) = N_String_Literal then return S; else pragma Assert (Ekind (Entity (S)) = E_Constant); return Get_String_Node (Constant_Value (Entity (S))); end if; end Get_String_Node; --------------------- -- Is_Asm_Volatile -- --------------------- function Is_Asm_Volatile (N : Node_Id) return Boolean is Call : constant Node_Id := Expression (Expression (N)); Vol : constant Node_Id := Next_Actual ( Next_Actual ( Next_Actual ( Next_Actual ( First_Actual (Call))))); begin if not Is_OK_Static_Expression (Vol) then Error_Msg_N ("asm volatile argument is not static", Vol); return False; else return Is_True (Expr_Value (Vol)); end if; end Is_Asm_Volatile; -------------------- -- Next_Asm_Input -- -------------------- procedure Next_Asm_Input is begin Next_Asm_Operand (Current_Input_Operand); end Next_Asm_Input; ---------------------- -- Next_Asm_Operand -- ---------------------- procedure Next_Asm_Operand (Operand_Var : in out Node_Id) is begin pragma Assert (Present (Operand_Var)); if Nkind (Parent (Operand_Var)) = N_Aggregate then Operand_Var := Next (Operand_Var); else Operand_Var := Empty; end if; end Next_Asm_Operand; --------------------- -- Next_Asm_Output -- --------------------- procedure Next_Asm_Output is begin Next_Asm_Operand (Current_Output_Operand); end Next_Asm_Output; ---------------------- -- Setup_Asm_Inputs -- ---------------------- procedure Setup_Asm_Inputs (N : Node_Id) is Call : constant Node_Id := Expression (Expression (N)); begin Setup_Asm_IO_Args (Next_Actual (Next_Actual (First_Actual (Call))), Current_Input_Operand); end Setup_Asm_Inputs; ----------------------- -- Setup_Asm_IO_Args -- ----------------------- procedure Setup_Asm_IO_Args (Arg : Node_Id; Operand_Var : out Node_Id) is begin -- Case of single argument if Nkind (Arg) = N_Attribute_Reference then Operand_Var := Arg; -- Case of list of arguments elsif Nkind (Arg) = N_Aggregate then if Expressions (Arg) = No_List then Operand_Var := Empty; else Operand_Var := First (Expressions (Arg)); end if; -- Otherwise must be default (no operands) case else Operand_Var := Empty; end if; end Setup_Asm_IO_Args; ----------------------- -- Setup_Asm_Outputs -- ----------------------- procedure Setup_Asm_Outputs (N : Node_Id) is Call : constant Node_Id := Expression (Expression (N)); begin Setup_Asm_IO_Args (Next_Actual (First_Actual (Call)), Current_Output_Operand); end Setup_Asm_Outputs; end Exp_Code;
package Pinprint is end Pinprint;
-- -- Jan & Uwe R. Zimmer, Australia, 2013 -- with Ada.Containers.Vectors; use Ada.Containers; with Ada.Real_Time; use Ada.Real_Time; with Ada.Task_Identification; use Ada.Task_Identification; with Ada.Unchecked_Deallocation; use Ada; with Barrier_Type; use Barrier_Type; with Generic_Protected; pragma Elaborate_All (Generic_Protected); with Generic_Realtime_Buffer; pragma Elaborate_All (Generic_Realtime_Buffer); with Vectors_3D; use Vectors_3D; with Rotations; use Rotations; pragma Elaborate_All (Rotations); with Swarm_Configuration; use Swarm_Configuration; with Swarm_Structures_Base; use Swarm_Structures_Base; with Vehicle_Message_Type; use Vehicle_Message_Type; with Vehicle_Task_Type; use Vehicle_Task_Type; package Swarm_Structures is pragma Elaborate_Body; No_Of_Buffered_Incoming_Messages : constant Positive := 10; No_Of_Buffered_Outgoing_Messages : constant Positive := 2; type Distance_Entries is record Index : Swarm_Element_Index; Distance : Distances; Position_Diff : Positions; Velocity_Diff : Velocities; end record; pragma Warnings ("H"); -- "<" hides a default operator in package Standard function "<" (L, R : Distance_Entries) return Boolean; pragma Warnings ("h"); package Distance_Vectors is new Vectors (Swarm_Element_Index, Distance_Entries); package Sort_Distances is new Distance_Vectors.Generic_Sorting; type Buffer_Size_Outgoing is mod No_Of_Buffered_Outgoing_Messages; type Buffer_Size_Incoming is mod No_Of_Buffered_Incoming_Messages; package Buffers_Outgoing is new Generic_Realtime_Buffer (Inter_Vehicle_Messages, Buffer_Size_Outgoing); package Buffers_Incoming is new Generic_Realtime_Buffer (Inter_Vehicle_Messages, Buffer_Size_Incoming); use Buffers_Outgoing; use Buffers_Incoming; protected type Vehicle_Comms is procedure Send (Message : Inter_Vehicle_Messages); entry Receive (Message : out Inter_Vehicle_Messages); procedure Push_Message (Message : Inter_Vehicle_Messages); procedure Fetch_Message (Message : out Inter_Vehicle_Messages); function Has_Incoming_Messages return Boolean; function Has_Outgoing_Messages return Boolean; private Sent_Messages : Buffers_Outgoing.Realtime_Buffer; Received_Messages : Buffers_Incoming.Realtime_Buffer; end Vehicle_Comms; protected type Vehicle_Controls is procedure Set_Steering (V : Vector_3D); procedure Set_Throttle (T : Throttle_T); function Read_Steering return Vector_3D; function Read_Throttle return Throttle_T; private Steering_Direction : Vector_3D := Zero_Vector_3D; Throttle : Throttle_T := Idle_Throttle; end Vehicle_Controls; type Globes_Touched_A is array (Energy_Globes_Defaults'Range) of Boolean; No_Globes_Touched : constant Globes_Touched_A := (others => False); package Protected_Time is new Generic_Protected (Time, Time_First); type Charge_Info is record Level : Vehicle_Charges; pragma Atomic (Level); Charge_Time : Protected_Time.Monitor_Ptr; Charge_No : Natural; pragma Atomic (Charge_No); Globes_Touched : Globes_Touched_A := No_Globes_Touched; end record; type Neighbours_P is access all Distance_Vectors.Vector; type Vehicle_Comms_P is access all Vehicle_Comms; type Vehicle_Controls_P is access all Vehicle_Controls; type Vehicle_Task_P is access all Vehicle_Task; package Protected_Rotation is new Generic_Protected (Quaternion_Rotation, Zero_Rotation); type Swarm_Element_State is record Position : Protected_Point_3D.Monitor_Ptr; Rotation : Protected_Rotation.Monitor_Ptr; Velocity : Protected_Vector_3D.Monitor_Ptr; Acceleration : Protected_Vector_3D.Monitor_Ptr; Charge : Charge_Info; Neighbours : Neighbours_P; Controls : Vehicle_Controls_P; Comms : Vehicle_Comms_P; Process : Vehicle_Task_P; Process_abort : Barrier_Ptr; Process_Id : Task_Id; Vehicle_Id : Positive; Last_Update : Time; end record; package Swarm_Vectors is new Vectors (Swarm_Element_Index, Swarm_Element_State); procedure Free_Neighbours is new Unchecked_Deallocation (Object => Distance_Vectors.Vector, Name => Neighbours_P); procedure Free_Controls is new Unchecked_Deallocation (Object => Vehicle_Controls, Name => Vehicle_Controls_P); procedure Free_Comms is new Unchecked_Deallocation (Object => Vehicle_Comms, Name => Vehicle_Comms_P); procedure Free_Process is new Unchecked_Deallocation (Object => Vehicle_Task, Name => Vehicle_Task_P); protected Simulator_Tick is entry Wait_For_Next_Tick; procedure Tick; private Trigger : Boolean := False; end Simulator_Tick; end Swarm_Structures;
----------------------------------------------------------------------- -- util-properties-json -- read json files into properties -- Copyright (C) 2013, 2018 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- -- == Reading JSON property files == -- The `Util.Properties.JSON` package provides operations to read a JSON -- content and put the result in a property manager. The JSON content is flattened -- into a set of name/value pairs. The JSON structure is reflected in the name. -- Example: -- -- { "id": "1", id -> 1 -- "info": { "name": "search", info.name -> search -- "count", "12", info.count -> 12 -- "data": { "value": "empty" }}, info.data.value -> empty -- "count": 1 info.count -> 1 -- } -- -- To get the value of a JSON property, the user can use the flatten name. For example: -- -- Value : constant String := Props.Get ("info.data.value"); -- -- The default separator to construct a flatten name is the dot (`.`) but this can be -- changed easily when loading the JSON file by specifying the desired separator: -- -- Util.Properties.JSON.Read_JSON (Props, "config.json", "|"); -- -- Then, the property will be fetch by using: -- -- Value : constant String := Props.Get ("info|data|value"); -- package Util.Properties.JSON is -- Parse the JSON content and put the flattened content in the property manager. procedure Parse_JSON (Manager : in out Util.Properties.Manager'Class; Content : in String; Flatten_Separator : in String := "."); -- Read the JSON file into the property manager. -- The JSON content is flatten into Flatten the JSON content and add the properties. procedure Read_JSON (Manager : in out Util.Properties.Manager'Class; Path : in String; Flatten_Separator : in String := "."); end Util.Properties.JSON;
----------------------------------------------------------------------- -- util-http-rest -- REST API support -- Copyright (C) 2012, 2013 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Serialize.IO; with Util.Http.Clients; with Util.Serialize.Mappers.Record_Mapper; -- The <b>Util.Http.Rest</b> package defines a REST client type which helps in writing -- REST client APIs. A REST client is similar to an HTTP client but it provides additional -- operations that are useful in REST APIs. package Util.Http.Rest is -- ----------------------- -- REST client -- ----------------------- type Client is new Util.Http.Clients.Client with private; -- Execute an HTTP GET operation using the <b>Http</b> client on the given <b>URI</b>. -- Upon successful reception of the response, parse the JSON result and populate the -- serialization context associated with the parser. procedure Get (Http : in out Client; URI : in String; Parser : in out Util.Serialize.IO.Parser'Class); -- Execute an HTTP GET operation on the given <b>URI</b> and parse the JSON response -- into the target object refered to by <b>Into</b> by using the mapping described -- in <b>Mapping</b>. generic -- Package that maps the element into a record. with package Element_Mapper is new Util.Serialize.Mappers.Record_Mapper (<>); procedure Rest_Get (URI : in String; Mapping : in Util.Serialize.Mappers.Mapper_Access; Path : in String := ""; Into : in Element_Mapper.Element_Type_Access); private type Client is new Util.Http.Clients.Client with record Status : Natural := 0; end record; end Util.Http.Rest;
-- This file is generated by SWIG. Please do not modify by hand. -- with Interfaces; with Interfaces.C; with Interfaces.C.Pointers; package xcb.xcb_glx_get_mapiv_request_t is -- Item -- type Item is record major_opcode : aliased Interfaces.Unsigned_8; minor_opcode : aliased Interfaces.Unsigned_8; length : aliased Interfaces.Unsigned_16; context_tag : aliased xcb.xcb_glx_context_tag_t; target : aliased Interfaces.Unsigned_32; query : aliased Interfaces.Unsigned_32; end record; -- Item_Array -- type Item_Array is array (Interfaces.C .size_t range <>) of aliased xcb.xcb_glx_get_mapiv_request_t .Item; -- Pointer -- package C_Pointers is new Interfaces.C.Pointers (Index => Interfaces.C.size_t, Element => xcb.xcb_glx_get_mapiv_request_t.Item, Element_Array => xcb.xcb_glx_get_mapiv_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_glx_get_mapiv_request_t .Pointer; -- Pointer_Pointer -- package C_Pointer_Pointers is new Interfaces.C.Pointers (Index => Interfaces.C.size_t, Element => xcb.xcb_glx_get_mapiv_request_t.Pointer, Element_Array => xcb.xcb_glx_get_mapiv_request_t.Pointer_Array, Default_Terminator => null); subtype Pointer_Pointer is C_Pointer_Pointers.Pointer; end xcb.xcb_glx_get_mapiv_request_t;
------------------------------------------------------------------------------ -- -- -- ATRE COMPONENTS -- -- -- -- A T R E . A S I S _ U T I L I T I E S -- -- -- -- S p e c -- -- -- -- Copyright (C) 2006, AdaCore -- -- -- -- ATRE 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. ATRE is distributed in the hope that it will be useful, but -- -- WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABI- -- -- LITY 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, -- -- -- -- ATRE is maintained by ACT Europe (http://www.act-europe.fr). -- -- -- ------------------------------------------------------------------------------ -- This package contains various ASIS-based routines for ATRE with GNAT.OS_Lib; use GNAT.OS_Lib; with Asis; use Asis; with Asis.Data_Decomposition; with ATRE.Common; use ATRE.Common; package ATRE.Asis_Utilities is function Detect_Type_Class (RC : Asis.Data_Decomposition.Record_Component; Size : ASIS_Natural) return Type_Classes; -- Detects the type class for the component. Returns Unknown in case if -- in is impossible to define a specific class because of any reason. procedure Detect_Component_Range (RC : Asis.Data_Decomposition.Record_Component; RC_Type : Type_Classes; Component_L : out String_Access; Component_R : out String_Access; Success : out Boolean); -- Tries to compute the component ranges according to the component -- definition (but not to the component base type). If this is possible, -- sets Success ON and Component_L and Component_R are set to the (string -- images of the left and right bounds of the component range. Otherwise -- Success is set OFF, and Component_L and Component_R are undefined. end ATRE.Asis_Utilities;
------------------------------------------------------------------------------- -- This file is part of libsparkcrypto. -- -- Copyright (C) 2010, Alexander Senier -- Copyright (C) 2010, secunet Security Networks AG -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions are met: -- -- * Redistributions of source code must retain the above copyright notice, -- this list of conditions and the following disclaimer. -- -- * Redistributions in binary form must reproduce the above copyright -- notice, this list of conditions and the following disclaimer in the -- documentation and/or other materials provided with the distribution. -- -- * Neither the name of the nor the names of its contributors may be used -- to endorse or promote products derived from this software without -- specific prior written permission. -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS -- BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -- POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------------------- with Interfaces; with LSC.Internal.Byteorder32; with LSC.Internal.SHA256.Tables; with LSC.Internal.Pad32; with LSC.Internal.Debug; pragma Unreferenced (LSC.Internal.Debug); package body LSC.Internal.SHA256 is function Init_Data_Length return Data_Length; function Init_Data_Length return Data_Length is begin return Data_Length'(0, 0); end Init_Data_Length; ---------------------------------------------------------------------------- procedure Add (Item : in out Data_Length; Value : in Types.Word32) with Depends => (Item =>+ Value), Inline; procedure Add (Item : in out Data_Length; Value : in Types.Word32) is begin if Item.LSW > Types.Word32'Last - Value then Item.MSW := Item.MSW + 1; end if; Item.LSW := Item.LSW + Value; end Add; ---------------------------------------------------------------------------- function Ch (x : Types.Word32; y : Types.Word32; z : Types.Word32) return Types.Word32 with Post => Ch'Result = ((x and y) xor ((not x) and z)), Inline; function Ch (x : Types.Word32; y : Types.Word32; z : Types.Word32) return Types.Word32 is begin return (x and y) xor ((not x) and z); end Ch; ---------------------------------------------------------------------------- function Maj (x : Types.Word32; y : Types.Word32; z : Types.Word32) return Types.Word32 with Post => Maj'Result = ((x and y) xor (x and z) xor (y and z)), Inline; function Maj (x : Types.Word32; y : Types.Word32; z : Types.Word32) return Types.Word32 is begin return (x and y) xor (x and z) xor (y and z); end Maj; ---------------------------------------------------------------------------- function Cap_Sigma_0_256 (x : Types.Word32) return Types.Word32 is begin return Interfaces.Rotate_Right (x, 2) xor Interfaces.Rotate_Right (x, 13) xor Interfaces.Rotate_Right (x, 22); end Cap_Sigma_0_256; pragma Inline (Cap_Sigma_0_256); ---------------------------------------------------------------------------- function Cap_Sigma_1_256 (x : Types.Word32) return Types.Word32 is begin return Interfaces.Rotate_Right (x, 6) xor Interfaces.Rotate_Right (x, 11) xor Interfaces.Rotate_Right (x, 25); end Cap_Sigma_1_256; pragma Inline (Cap_Sigma_1_256); ---------------------------------------------------------------------------- function Sigma_0_256 (x : Types.Word32) return Types.Word32 is begin return Interfaces.Rotate_Right (x, 7) xor Interfaces.Rotate_Right (x, 18) xor Interfaces.Shift_Right (x, 3); end Sigma_0_256; pragma Inline (Sigma_0_256); ---------------------------------------------------------------------------- function Sigma_1_256 (x : Types.Word32) return Types.Word32 is begin return Interfaces.Rotate_Right (x, 17) xor Interfaces.Rotate_Right (x, 19) xor Interfaces.Shift_Right (x, 10); end Sigma_1_256; pragma Inline (Sigma_1_256); ---------------------------------------------------------------------------- function SHA256_Context_Init return Context_Type is begin return Context_Type' (Length => Init_Data_Length, H => SHA256_Hash_Type'(0 => 16#6a09e667#, 1 => 16#bb67ae85#, 2 => 16#3c6ef372#, 3 => 16#a54ff53a#, 4 => 16#510e527f#, 5 => 16#9b05688c#, 6 => 16#1f83d9ab#, 7 => 16#5be0cd19#), W => Null_Schedule); end SHA256_Context_Init; ---------------------------------------------------------------------------- procedure Context_Update_Internal (Context : in out Context_Type; Block : in Block_Type) with Depends => (Context =>+ Block); procedure Context_Update_Internal (Context : in out Context_Type; Block : in Block_Type) is a, b, c, d, e, f, g, h : Types.Word32; procedure SHA256_Op (r : in Schedule_Index; a0 : in Types.Word32; a1 : in Types.Word32; a2 : in Types.Word32; a3 : in out Types.Word32; a4 : in Types.Word32; a5 : in Types.Word32; a6 : in Types.Word32; a7 : in out Types.Word32) with Global => Context, Depends => (a3 =>+ (a4, a5, a6, a7, r, Context), a7 => (a0, a1, a2, a4, a5, a6, a7, r, Context)); procedure SHA256_Op (r : in Schedule_Index; a0 : in Types.Word32; a1 : in Types.Word32; a2 : in Types.Word32; a3 : in out Types.Word32; a4 : in Types.Word32; a5 : in Types.Word32; a6 : in Types.Word32; a7 : in out Types.Word32) is T1, T2 : Types.Word32; begin T1 := a7 + Cap_Sigma_1_256 (a4) + Ch (a4, a5, a6) + Tables.K (r) + Context.W (r); T2 := Cap_Sigma_0_256 (a0) + Maj (a0, a1, a2); a3 := a3 + T1; a7 := T1 + T2; end SHA256_Op; begin pragma Debug (Debug.Put_Line ("BLOCK UPDATE:")); -- Print out initial state of H pragma Debug (Debug.Put_Line ("SHA-256 initial hash values:")); pragma Debug (Debug.Print_Word32_Array (Context.H, 2, Types.Index'Last, True)); ------------------------------------------- -- Section 6.3.2 SHA-256 Hash Computations ------------------------------------------- -- 1. Prepare the message schedule, Context.W(t): for t in Schedule_Index range 0 .. 15 loop Context.W (t) := Byteorder32.Native_To_BE (Block (t)); end loop; for t in Schedule_Index range 16 .. 63 loop Context.W (t) := Sigma_1_256 (Context.W (t - 2)) + Context.W (t - 7) + Sigma_0_256 (Context.W (t - 15)) + Context.W (t - 16); end loop; pragma Debug (Debug.Put_Line ("Message block:")); pragma Debug (Debug.Print_Word32_Array (Context.W, 2, 8, True)); -- 2. Initialize the eight working variables a, b, c, d, e, f, g, and -- h with the (i-1)st hash value: a := Context.H (0); b := Context.H (1); c := Context.H (2); d := Context.H (3); e := Context.H (4); f := Context.H (5); g := Context.H (6); h := Context.H (7); -- 3. For t = 0 to 63: SHA256_Op (0, a, b, c, d, e, f, g, h); SHA256_Op (1, h, a, b, c, d, e, f, g); SHA256_Op (2, g, h, a, b, c, d, e, f); SHA256_Op (3, f, g, h, a, b, c, d, e); SHA256_Op (4, e, f, g, h, a, b, c, d); SHA256_Op (5, d, e, f, g, h, a, b, c); SHA256_Op (6, c, d, e, f, g, h, a, b); SHA256_Op (7, b, c, d, e, f, g, h, a); SHA256_Op (8, a, b, c, d, e, f, g, h); SHA256_Op (9, h, a, b, c, d, e, f, g); SHA256_Op (10, g, h, a, b, c, d, e, f); SHA256_Op (11, f, g, h, a, b, c, d, e); SHA256_Op (12, e, f, g, h, a, b, c, d); SHA256_Op (13, d, e, f, g, h, a, b, c); SHA256_Op (14, c, d, e, f, g, h, a, b); SHA256_Op (15, b, c, d, e, f, g, h, a); SHA256_Op (16, a, b, c, d, e, f, g, h); SHA256_Op (17, h, a, b, c, d, e, f, g); SHA256_Op (18, g, h, a, b, c, d, e, f); SHA256_Op (19, f, g, h, a, b, c, d, e); SHA256_Op (20, e, f, g, h, a, b, c, d); SHA256_Op (21, d, e, f, g, h, a, b, c); SHA256_Op (22, c, d, e, f, g, h, a, b); SHA256_Op (23, b, c, d, e, f, g, h, a); SHA256_Op (24, a, b, c, d, e, f, g, h); SHA256_Op (25, h, a, b, c, d, e, f, g); SHA256_Op (26, g, h, a, b, c, d, e, f); SHA256_Op (27, f, g, h, a, b, c, d, e); SHA256_Op (28, e, f, g, h, a, b, c, d); SHA256_Op (29, d, e, f, g, h, a, b, c); SHA256_Op (30, c, d, e, f, g, h, a, b); SHA256_Op (31, b, c, d, e, f, g, h, a); SHA256_Op (32, a, b, c, d, e, f, g, h); SHA256_Op (33, h, a, b, c, d, e, f, g); SHA256_Op (34, g, h, a, b, c, d, e, f); SHA256_Op (35, f, g, h, a, b, c, d, e); SHA256_Op (36, e, f, g, h, a, b, c, d); SHA256_Op (37, d, e, f, g, h, a, b, c); SHA256_Op (38, c, d, e, f, g, h, a, b); SHA256_Op (39, b, c, d, e, f, g, h, a); SHA256_Op (40, a, b, c, d, e, f, g, h); SHA256_Op (41, h, a, b, c, d, e, f, g); SHA256_Op (42, g, h, a, b, c, d, e, f); SHA256_Op (43, f, g, h, a, b, c, d, e); SHA256_Op (44, e, f, g, h, a, b, c, d); SHA256_Op (45, d, e, f, g, h, a, b, c); SHA256_Op (46, c, d, e, f, g, h, a, b); SHA256_Op (47, b, c, d, e, f, g, h, a); SHA256_Op (48, a, b, c, d, e, f, g, h); SHA256_Op (49, h, a, b, c, d, e, f, g); SHA256_Op (50, g, h, a, b, c, d, e, f); SHA256_Op (51, f, g, h, a, b, c, d, e); SHA256_Op (52, e, f, g, h, a, b, c, d); SHA256_Op (53, d, e, f, g, h, a, b, c); SHA256_Op (54, c, d, e, f, g, h, a, b); SHA256_Op (55, b, c, d, e, f, g, h, a); SHA256_Op (56, a, b, c, d, e, f, g, h); SHA256_Op (57, h, a, b, c, d, e, f, g); SHA256_Op (58, g, h, a, b, c, d, e, f); SHA256_Op (59, f, g, h, a, b, c, d, e); SHA256_Op (60, e, f, g, h, a, b, c, d); SHA256_Op (61, d, e, f, g, h, a, b, c); SHA256_Op (62, c, d, e, f, g, h, a, b); SHA256_Op (63, b, c, d, e, f, g, h, a); -- 4. Compute the i-th intermediate hash value H-i: Context.H := SHA256_Hash_Type' (0 => a + Context.H (0), 1 => b + Context.H (1), 2 => c + Context.H (2), 3 => d + Context.H (3), 4 => e + Context.H (4), 5 => f + Context.H (5), 6 => g + Context.H (6), 7 => h + Context.H (7)); pragma Debug (Debug.Put_Line ("SHA-256 final hash values:")); pragma Debug (Debug.Print_Word32_Array (Context.H, 2, Types.Index'Last, True)); end Context_Update_Internal; ---------------------------------------------------------------------------- procedure Context_Update (Context : in out Context_Type; Block : in Block_Type) is begin Context_Update_Internal (Context, Block); Add (Context.Length, 512); end Context_Update; ---------------------------------------------------------------------------- procedure Context_Finalize (Context : in out Context_Type; Block : in Block_Type; Length : in Block_Length_Type) is Final_Block : Block_Type; begin pragma Debug (Debug.Put_Line ("FINAL BLOCK:")); Final_Block := Block; -- Add length of last block to data length. Add (Context.Length, Length); -- Set trailing '1' marker and zero out rest of the block. Pad32.Block_Terminate (Block => Final_Block, Length => Types.Word64 (Length)); -- Terminator and length values won't fit into current block. if Length >= 448 then Context_Update_Internal (Context => Context, Block => Final_Block); Final_Block := Null_Block; end if; -- Set length in final block. Final_Block (Block_Type'Last - 1) := Byteorder32.BE_To_Native (Context.Length.MSW); Final_Block (Block_Type'Last) := Byteorder32.BE_To_Native (Context.Length.LSW); Context_Update_Internal (Context => Context, Block => Final_Block); end Context_Finalize; ---------------------------------------------------------------------------- function SHA256_Get_Hash (Context : Context_Type) return SHA256_Hash_Type is begin return SHA256_Hash_Type'(0 => Byteorder32.BE_To_Native (Context.H (0)), 1 => Byteorder32.BE_To_Native (Context.H (1)), 2 => Byteorder32.BE_To_Native (Context.H (2)), 3 => Byteorder32.BE_To_Native (Context.H (3)), 4 => Byteorder32.BE_To_Native (Context.H (4)), 5 => Byteorder32.BE_To_Native (Context.H (5)), 6 => Byteorder32.BE_To_Native (Context.H (6)), 7 => Byteorder32.BE_To_Native (Context.H (7))); end SHA256_Get_Hash; ---------------------------------------------------------------------------- procedure Hash_Context (Message : in Message_Type; Length : in Message_Index; Ctx : in out Context_Type) is Dummy : constant Block_Type := Null_Block; Last_Length : Block_Length_Type; Last_Block : Message_Index; begin Last_Length := Types.Word32 (Length mod Block_Size); Last_Block := Message'First + Length / Block_Size; -- handle all blocks, but the last. if Last_Block > Message'First then for I in Message_Index range Message'First .. Last_Block - 1 loop pragma Loop_Invariant (Last_Block - 1 <= Message'Last and (if Last_Length /= 0 then Last_Block <= Message'Last) and I < Last_Block); Context_Update (Ctx, Message (I)); end loop; end if; if Last_Length = 0 then Context_Finalize (Ctx, Dummy, 0); else Context_Finalize (Ctx, Message (Last_Block), Last_Length); end if; end Hash_Context; ---------------------------------------------------------------------------- function Hash (Message : Message_Type; Length : Message_Index) return SHA256_Hash_Type is Ctx : Context_Type; begin Ctx := SHA256_Context_Init; Hash_Context (Message, Length, Ctx); return SHA256_Get_Hash (Ctx); end Hash; end LSC.Internal.SHA256;
-- Copyright 2008 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 String_Access is access String; String_P : String_Access := new String'("Hello"); begin Do_Nothing (String_P'Address); -- STOP end Foo;
-- SPDX-FileCopyrightText: 2019 Max Reznik <reznikmm@gmail.com> -- -- SPDX-License-Identifier: MIT ------------------------------------------------------------- with Program.Elements.Constraints; with Program.Elements.Expressions; with Program.Lexical_Elements; package Program.Elements.Simple_Expression_Ranges is pragma Pure (Program.Elements.Simple_Expression_Ranges); type Simple_Expression_Range is limited interface and Program.Elements.Constraints.Constraint; type Simple_Expression_Range_Access is access all Simple_Expression_Range'Class with Storage_Size => 0; not overriding function Lower_Bound (Self : Simple_Expression_Range) return not null Program.Elements.Expressions.Expression_Access is abstract; not overriding function Upper_Bound (Self : Simple_Expression_Range) return not null Program.Elements.Expressions.Expression_Access is abstract; type Simple_Expression_Range_Text is limited interface; type Simple_Expression_Range_Text_Access is access all Simple_Expression_Range_Text'Class with Storage_Size => 0; not overriding function To_Simple_Expression_Range_Text (Self : in out Simple_Expression_Range) return Simple_Expression_Range_Text_Access is abstract; not overriding function Double_Dot_Token (Self : Simple_Expression_Range_Text) return not null Program.Lexical_Elements.Lexical_Element_Access is abstract; end Program.Elements.Simple_Expression_Ranges;
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- A D A . W I D E _ T E X T _ I O . E D I T I N G -- -- -- -- S p e c -- -- -- -- Copyright (C) 1992-2009, 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. -- -- -- ------------------------------------------------------------------------------ package Ada.Wide_Text_IO.Editing is type Picture is private; function Valid (Pic_String : String; Blank_When_Zero : Boolean := False) return Boolean; function To_Picture (Pic_String : String; Blank_When_Zero : Boolean := False) return Picture; function Pic_String (Pic : Picture) return String; function Blank_When_Zero (Pic : Picture) return Boolean; Max_Picture_Length : constant := 64; Picture_Error : exception; Default_Currency : constant Wide_String := "$"; Default_Fill : constant Wide_Character := ' '; Default_Separator : constant Wide_Character := ','; Default_Radix_Mark : constant Wide_Character := '.'; generic type Num is delta <> digits <>; Default_Currency : Wide_String := Wide_Text_IO.Editing.Default_Currency; Default_Fill : Wide_Character := Wide_Text_IO.Editing.Default_Fill; Default_Separator : Wide_Character := Wide_Text_IO.Editing.Default_Separator; Default_Radix_Mark : Wide_Character := Wide_Text_IO.Editing.Default_Radix_Mark; package Decimal_Output is function Length (Pic : Picture; Currency : Wide_String := Default_Currency) return Natural; function Valid (Item : Num; Pic : Picture; Currency : Wide_String := Default_Currency) return Boolean; function Image (Item : Num; Pic : Picture; Currency : Wide_String := Default_Currency; Fill : Wide_Character := Default_Fill; Separator : Wide_Character := Default_Separator; Radix_Mark : Wide_Character := Default_Radix_Mark) return Wide_String; procedure Put (File : File_Type; Item : Num; Pic : Picture; Currency : Wide_String := Default_Currency; Fill : Wide_Character := Default_Fill; Separator : Wide_Character := Default_Separator; Radix_Mark : Wide_Character := Default_Radix_Mark); procedure Put (Item : Num; Pic : Picture; Currency : Wide_String := Default_Currency; Fill : Wide_Character := Default_Fill; Separator : Wide_Character := Default_Separator; Radix_Mark : Wide_Character := Default_Radix_Mark); procedure Put (To : out Wide_String; Item : Num; Pic : Picture; Currency : Wide_String := Default_Currency; Fill : Wide_Character := Default_Fill; Separator : Wide_Character := Default_Separator; Radix_Mark : Wide_Character := Default_Radix_Mark); end Decimal_Output; private MAX_PICSIZE : constant := 50; MAX_MONEYSIZE : constant := 10; Invalid_Position : constant := -1; subtype Pic_Index is Natural range 0 .. MAX_PICSIZE; type Picture_Record (Length : Pic_Index := 0) is record Expanded : String (1 .. Length); end record; type Format_Record is record Picture : Picture_Record; -- Read only Blank_When_Zero : Boolean; -- Read/write Original_BWZ : Boolean; -- The following components get written Star_Fill : Boolean := False; Radix_Position : Integer := Invalid_Position; Sign_Position, Second_Sign : Integer := Invalid_Position; Start_Float, End_Float : Integer := Invalid_Position; Start_Currency, End_Currency : Integer := Invalid_Position; Max_Leading_Digits : Integer := 0; Max_Trailing_Digits : Integer := 0; Max_Currency_Digits : Integer := 0; Floater : Wide_Character := '!'; -- Initialized to illegal value end record; type Picture is record Contents : Format_Record; end record; type Number_Attributes is record Negative : Boolean := False; Has_Fraction : Boolean := False; Start_Of_Int, End_Of_Int, Start_Of_Fraction, End_Of_Fraction : Integer := Invalid_Position; -- invalid value end record; function Parse_Number_String (Str : String) return Number_Attributes; -- Assumed format is 'IMAGE or Fixed_IO.Put format (depends on no -- trailing blanks...) procedure Precalculate (Pic : in out Format_Record); -- Precalculates fields from the user supplied data function Format_Number (Pic : Format_Record; Number : String; Currency_Symbol : Wide_String; Fill_Character : Wide_Character; Separator_Character : Wide_Character; Radix_Point : Wide_Character) return Wide_String; -- Formats number according to Pic function Expand (Picture : String) return String; end Ada.Wide_Text_IO.Editing;
------------------------------------------------------------------------------ -- G E L A 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 Asis.Elements; with Asis.Gela.Iterator; with Asis.Gela.Overloads; with Asis.Gela.Visibility; with Asis.Gela.Implicit.Decl; with Asis.Gela.Resolver.Polish; with Asis.Gela.Private_Operations; package body Asis.Gela.Resolver is type State_Information is record Point : Visibility.Point; Stack : Private_Operations.Package_Data_Stack; end record; procedure Pre_Operation (Element : in out Asis.Element; Control : in out Traverse_Control; State : in out State_Information); procedure Post_Operation (Element : in out Asis.Element; Control : in out Traverse_Control; State : in out State_Information); package Iterator is new Asis.Gela.Iterator (State_Information); type Polish_State is null record; procedure Pre_Operation (Element : in out Asis.Element; Control : in out Traverse_Control; State : in out Polish_State); procedure Post_Operation (Element : in out Asis.Element; Control : in out Traverse_Control; State : in out Polish_State); package Polish_Iterator is new Asis.Gela.Iterator (Polish_State); -------------------------- -- Polish_Subexpression -- -------------------------- procedure Polish_Subexpression (Element : Asis.Expression) is State : Polish_State; Control : Traverse_Control := Continue; begin Polish_Iterator.Walk_Element (Element, Control, State); end Polish_Subexpression; -------------------- -- Post_Operation -- -------------------- procedure Post_Operation (Element : in out Asis.Element; Control : in out Traverse_Control; State : in out State_Information) is use Asis.Elements; Inner : Visibility.Point := State.Point; begin Visibility.Leave_Construction (Element, State.Point); Implicit.Decl.Process (Element, State.Point, Inner); if not Is_Part_Of_Instance (Element.all) then Overloads.Resolve (Element); end if; case Declaration_Kind (Element) is when A_Type_Declaration => if Declaration_Kind (Enclosing_Element (Element)) = Asis.A_Package_Declaration then Private_Operations.Check_Type (Element => Element, Data => Private_Operations.Top (State.Stack), Point => State.Point); end if; when A_Package_Declaration => Private_Operations.Pop (State.Stack); when others => null; end case; end Post_Operation; -------------------- -- Post_Operation -- -------------------- procedure Post_Operation (Element : in out Asis.Element; Control : in out Traverse_Control; State : in out Polish_State) is begin Polish.Each_Element (Element); end Post_Operation; ------------------- -- Pre_Operation -- ------------------- procedure Pre_Operation (Element : in out Asis.Element; Control : in out Traverse_Control; State : in out State_Information) is use Asis.Elements; use Asis.Gela.Private_Operations; Expr : constant Expression_Kinds := Expression_Kind (Element); begin Visibility.Enter_Construction (Element, State.Point); if (Expr = An_Identifier or Expr = An_Operator_Symbol or Expr = A_Character_Literal) and not Is_Part_Of_Implicit (Element) and not Is_Part_Of_Instance (Element) then Visibility.Try_To_Resolve (Element, State.Point); end if; case Declaration_Kind (Element) is when A_Package_Declaration => Private_Operations.Push (State.Stack, Private_Operations.Create (Element)); when A_Package_Body_Declaration => Private_Operations.On_Package_Body (Element, State.Point); when others => null; end case; end Pre_Operation; ------------------- -- Pre_Operation -- ------------------- procedure Pre_Operation (Element : in out Asis.Element; Control : in out Traverse_Control; State : in out Polish_State) is begin null; end Pre_Operation; ---------------------- -- Process_Instance -- ---------------------- procedure Process_Instance (Decl : Asis.Declaration; Point : Visibility.Point) is State : State_Information; Control : Traverse_Control := Continue; Instance : Asis.Declaration := Decl; begin State.Point := Point; Iterator.Walk_Element_And_Free (Instance, Control, State); pragma Assert (Is_Equal (Decl, Instance)); end Process_Instance; --------- -- Run -- --------- procedure Run (Unit : Asis.Compilation_Unit) is State : State_Information; Control : Traverse_Control := Continue; Decl : Asis.Element; P_State : Polish_State; begin State.Point := Visibility.Enter_Unit (Unit); declare List : constant Asis.Element_List := Context_Clause_Elements (Unit.all); begin for I in List'Range loop Iterator.Walk_Element (List (I), Control, State); end loop; end; Decl := Unit_Declaration (Unit.all); Iterator.Walk_Element_And_Free (Decl, Control, State); pragma Assert (Is_Equal (Decl, Unit_Declaration (Unit.all))); Polish_Iterator.Walk_Element (Decl, Control, P_State); end Run; end Asis.Gela.Resolver; ------------------------------------------------------------------------------ -- 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. ------------------------------------------------------------------------------
-- MIT License -- -- Copyright (c) 2021 Glen Cornell <glen.m.cornell@gmail.com> -- -- Permission is hereby granted, free of charge, to any person obtaining a copy -- of this software and associated documentation files (the "Software"), to deal -- in the Software without restriction, including without limitation the rights -- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -- copies of the Software, and to permit persons to whom the Software is -- furnished to do so, subject to the following conditions: -- -- The above copyright notice and this permission notice shall be included in all -- copies or substantial portions of the Software. -- -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -- SOFTWARE. with Ada.Text_Io; with Sockets.Can.Broadcast_Manager; with Sockets.Can_Frame; with Interfaces; with Create_Can_Frame; procedure Bcm_Simple_Writer is If_Name : constant String := "vcan0"; Unused_C : Character; Bcm : Sockets.Can.Broadcast_Manager.Broadcast_Manager_Type; Frame_1 : constant Sockets.Can_Frame.Can_Frame := Create_Can_Frame (Can_Id => 16#10#, Data => (16#11#, 16#22#, 16#33#)); Frame_2 : Sockets.Can_Frame.Can_Frame := Create_Can_Frame (Can_Id => 16#20#, Data => (1 => 16#AA#)); Frame_3 : constant Sockets.Can_Frame.Can_Frame := Create_Can_Frame (Can_Id => 16#30#, Data => (16#DE#, 16#AD#, 16#BE#, 16#EF#)); task type T is entry Start; entry Stop; end T; task body T is use type Interfaces.Unsigned_8; I : Interfaces.Unsigned_8 := 255; Terminated : Boolean := False; begin accept Start; while not Terminated loop I := I + 1; Frame_2.Data(Frame_2.Data'First) := I; Bcm.Send_Once (Frame_2); select accept Stop do Terminated := True; end Stop; or delay 0.1; end select; end loop; end T; Updater : T; begin Bcm.Create (If_Name); Bcm.Send_Periodic (Frame_1, 0.5); Bcm.Send_Once (Frame_2); Bcm.Send_Once (Frame_3); Updater.Start; Ada.Text_Io.Put_Line ("Press any key to stop"); Ada.Text_Io.Get (Unused_C); Updater.Stop; end Bcm_Simple_Writer;
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS -- -- -- -- S Y S T E M . B I T _ O P S -- -- -- -- S p e c -- -- -- -- Copyright (C) 1992-2013, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- 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. -- -- -- ------------------------------------------------------------------------------ -- Operations on packed bit strings pragma Compiler_Unit_Warning; with System; package System.Bit_Ops is -- Note: in all the following routines, the System.Address parameters -- represent the address of the first byte of an array used to represent -- a packed array (of type System.Unsigned_Types.Packed_Bytes{1,2,4}) -- The length in bits is passed as a separate parameter. Note that all -- addresses must be of byte aligned arrays. procedure Bit_And (Left : System.Address; Llen : Natural; Right : System.Address; Rlen : Natural; Result : System.Address); -- Bitwise "and" of given bit string with result being placed in Result. -- The and operation is allowed to destroy unused bits in the last byte, -- i.e. to leave them set in an undefined manner. Note that Left, Right -- and Result always have the same length in bits (Len). function Bit_Eq (Left : System.Address; Llen : Natural; Right : System.Address; Rlen : Natural) return Boolean; -- Left and Right are the addresses of two bit packed arrays with Llen -- and Rlen being the respective length in bits. The routine compares the -- two bit strings for equality, being careful not to include the unused -- bits in the final byte. Note that the result is always False if Rlen -- is not equal to Llen. procedure Bit_Not (Opnd : System.Address; Len : Natural; Result : System.Address); -- Bitwise "not" of given bit string with result being placed in Result. -- The not operation is allowed to destroy unused bits in the last byte, -- i.e. to leave them set in an undefined manner. Note that Result and -- Opnd always have the same length in bits (Len). procedure Bit_Or (Left : System.Address; Llen : Natural; Right : System.Address; Rlen : Natural; Result : System.Address); -- Bitwise "or" of given bit string with result being placed in Result. -- The or operation is allowed to destroy unused bits in the last byte, -- i.e. to leave them set in an undefined manner. Note that Left, Right -- and Result always have the same length in bits (Len). procedure Bit_Xor (Left : System.Address; Llen : Natural; Right : System.Address; Rlen : Natural; Result : System.Address); -- Bitwise "xor" of given bit string with result being placed in Result. -- The xor operation is allowed to destroy unused bits in the last byte, -- i.e. to leave them set in an undefined manner. Note that Left, Right -- and Result always have the same length in bits (Len). end System.Bit_Ops;
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- B I N D U S G -- -- -- -- S p e c -- -- -- -- Copyright (C) 1992-2020, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- -- for more details. You should have received a copy of the GNU General -- -- Public License distributed with GNAT; see file COPYING3. If not, go to -- -- http://www.gnu.org/licenses for a complete copy of the license. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- Procedure to generate screen of usage information if no file name present package Bindusg is procedure Display; -- Display binder usage if not already displayed end Bindusg;
------------------------------------------------------------------------------ -- -- -- GNAT LIBRARY COMPONENTS -- -- -- -- G N A T . S H A 1 -- -- -- -- B o d y -- -- -- -- Copyright (C) 2009, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- This package does not require a body, since it is a package renaming. We -- provide a dummy file containing a No_Body pragma so that previous versions -- of the body (which did exist) will not interfere. pragma No_Body;
-- reference: -- http://thomas.baudel.name/Visualisation/VisuTri/inplacestablesort.html package body Ada.Containers.Array_Sorting is use type System.Long_Long_Integer_Types.Word_Integer; subtype Word_Integer is System.Long_Long_Integer_Types.Word_Integer; subtype Word_Natural is System.Long_Long_Integer_Types.Word_Natural; subtype Word_Positive is System.Long_Long_Integer_Types.Word_Positive; function GCD (X, Y : Word_Positive) return Word_Positive; function GCD (X, Y : Word_Positive) return Word_Positive is X2 : Word_Natural := X; Y2 : Word_Natural := Y; begin if X2 < Y2 then declare T : constant Word_Natural := X2; begin X2 := Y2; Y2 := T; end; end if; while Y2 /= 0 loop pragma Assert (X2 >= Y2); declare R : constant Word_Natural := X2 rem Y2; begin X2 := Y2; Y2 := R; end; end loop; return X2; end GCD; -- implementation function Is_Sorted ( First, Last : System.Long_Long_Integer_Types.Word_Integer; Params : System.Address; LT : not null access function ( Left, Right : System.Long_Long_Integer_Types.Word_Integer; Params : System.Address) return Boolean) return Boolean is begin if First < Last then for I in First .. Last - 1 loop if LT (I + 1, I, Params) then return False; end if; end loop; end if; return True; end Is_Sorted; procedure Insertion_Sort ( First, Last : System.Long_Long_Integer_Types.Word_Integer; Params : System.Address; LT : not null access function ( Left, Right : System.Long_Long_Integer_Types.Word_Integer; Params : System.Address) return Boolean; Swap : not null access procedure ( I, J : System.Long_Long_Integer_Types.Word_Integer; Params : System.Address)) is begin for I in First + 1 .. Last loop for J in reverse First .. I - 1 loop exit when not LT (J + 1, J, Params); Swap (J, J + 1, Params); end loop; end loop; end Insertion_Sort; procedure In_Place_Merge_Sort ( First, Last : System.Long_Long_Integer_Types.Word_Integer; Params : System.Address; LT : not null access function ( Left, Right : System.Long_Long_Integer_Types.Word_Integer; Params : System.Address) return Boolean; Swap : not null access procedure ( I, J : System.Long_Long_Integer_Types.Word_Integer; Params : System.Address)) is begin if First < Last then declare Before : constant Word_Integer := First + (Last - First) / 2 + 1; begin In_Place_Merge_Sort (First, Before - 1, Params, LT, Swap); In_Place_Merge_Sort (Before, Last, Params, LT, Swap); In_Place_Merge (First, Before, Last, Params, LT, Swap); end; end if; end In_Place_Merge_Sort; procedure In_Place_Merge ( First, Before, Last : System.Long_Long_Integer_Types.Word_Integer; Params : System.Address; LT : not null access function ( Left, Right : System.Long_Long_Integer_Types.Word_Integer; Params : System.Address) return Boolean; Swap : not null access procedure ( I, J : System.Long_Long_Integer_Types.Word_Integer; Params : System.Address)) is First_Cut, Second_Cut, New_Before, L, H, M : Word_Integer; begin if First < Before and then Before <= Last then if First + 1 = Last then if LT (Last, First, Params) then Swap (First, Last, Params); end if; else if Before - First > Last - Before then -- >= Last - Before + 1 First_Cut := First + (Before - First) / 2; L := Before; H := Last; loop M := L + (H + 1 - L) / 2; if LT (M, First_Cut, Params) then L := M; exit when L >= H; else H := M - 1; -- not includes equiv. exit when H < Before; end if; end loop; Second_Cut := H; else Second_Cut := Before + (Last - Before) / 2; L := First; H := Before - 1; loop M := L + (H - L) / 2; if LT (Second_Cut, M, Params) then H := M; exit when L >= H; else L := M + 1; -- not includes equiv. exit when L >= Before; end if; end loop; First_Cut := L; end if; -- swap with Reverse_Rotate or Juggling_Rotate Juggling_Rotate (First_Cut, Before, Second_Cut, Params, Swap); -- merge New_Before := First_Cut + (Second_Cut - Before) + 1; In_Place_Merge ( First, First_Cut, New_Before - 1, Params, LT => LT, Swap => Swap); In_Place_Merge ( New_Before, Second_Cut + 1, Last, Params, LT => LT, Swap => Swap); end if; end if; end In_Place_Merge; procedure In_Place_Reverse ( First, Last : System.Long_Long_Integer_Types.Word_Integer; Params : System.Address; Swap : not null access procedure ( I, J : System.Long_Long_Integer_Types.Word_Integer; Params : System.Address)) is I : Word_Integer := First; J : Word_Integer := Last; begin while I < J loop Swap (I, J, Params); I := I + 1; J := J - 1; end loop; end In_Place_Reverse; procedure Reverse_Rotate ( First, Before, Last : System.Long_Long_Integer_Types.Word_Integer; Params : System.Address; Swap : not null access procedure ( I, J : System.Long_Long_Integer_Types.Word_Integer; Params : System.Address)) is begin if First < Before and then Before <= Last then In_Place_Reverse (First, Before - 1, Params, Swap); In_Place_Reverse (Before, Last, Params, Swap); In_Place_Reverse (First, Last, Params, Swap); end if; end Reverse_Rotate; procedure Juggling_Rotate ( First, Before, Last : System.Long_Long_Integer_Types.Word_Integer; Params : System.Address; Swap : not null access procedure ( I, J : System.Long_Long_Integer_Types.Word_Integer; Params : System.Address)) is Left_Length : constant Word_Integer := Before - First; Length : constant Word_Integer := Last - First + 1; begin if Left_Length > 0 and then Length > Left_Length then declare Cycles : constant Word_Positive := GCD (Length, Left_Length); P : Word_Integer := First; begin loop declare Q : Word_Integer; begin if P > Last - Left_Length then Q := P - (Length - Left_Length); else Q := P + Left_Length; end if; exit when Q = First; for I in 0 .. Cycles - 1 loop Swap (P + I, Q + I, Params); end loop; P := Q; end; end loop; end; end if; end Juggling_Rotate; end Ada.Containers.Array_Sorting;
-------------------------------------------------------------------------------------------------------------------- -- Copyright (c) 2014-2015 Luke A. Guest -- -- This software is provided 'as-is', without any express or implied -- warranty. In no event will the authors be held liable for any damages -- arising from the use of this software. -- -- Permission is granted to anyone to use this software for any purpose, -- including commercial applications, and to alter it and redistribute it -- freely, subject to the following restrictions: -- -- 1. The origin of this software must not be misrepresented; you must not -- claim that you wrote the original software. If you use this software -- in a product, an acknowledgment in the product documentation would be -- appreciated but is not required. -- -- 2. Altered source versions must be plainly marked as such, and must not be -- misrepresented as being the original software. -- -- 3. This notice may not be removed or altered from any source -- distribution. -------------------------------------------------------------------------------------------------------------------- -- Colour_Test_Cases -- -- Tests to check whether the memory layout of the pixel formats is correct. -------------------------------------------------------------------------------------------------------------------- with AUnit; use AUnit; with AUnit.Simple_Test_Cases; with SDL.Video.Palettes; package Colour_Test_Cases is type Colour_Test_Case is new AUnit.Simple_Test_Cases.Test_Case with null record; overriding function Name (Test : Colour_Test_Case) return Message_String; overriding procedure Run_Test (Test : in out Colour_Test_Case); private C_Test : constant SDL.Video.Palettes.Colour with Import => True, Convention => C, External_Name => "test_colour"; end Colour_Test_Cases;
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- G N A T . H E A P _ S O R T -- -- -- -- S p e c -- -- -- -- Copyright (C) 1995-2010, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- 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. -- -- -- ------------------------------------------------------------------------------ -- Sort utility (Using Heapsort Algorithm) -- This package provides a heapsort routine that works with access to -- subprogram parameters, so that it can be used with different types with -- shared sorting code. -- This heapsort algorithm uses approximately N*log(N) compares in the -- worst case and is in place with no additional storage required. See -- the body for exact details of the algorithm used. -- See also GNAT.Heap_Sort_G which is a generic version that will be faster -- since the overhead of the indirect calls is avoided, at the expense of -- generic code duplication and less convenient interface. -- Note: GNAT.Heap_Sort replaces and obsoletes GNAT.Heap_Sort_A, which is -- retained in the GNAT library for backwards compatibility. package GNAT.Heap_Sort is pragma Pure; -- The data to be sorted is assumed to be indexed by integer values -- from 1 to N, where N is the number of items to be sorted. type Xchg_Procedure is access procedure (Op1, Op2 : Natural); -- A pointer to a procedure that exchanges the two data items whose -- index values are Op1 and Op2. type Lt_Function is access function (Op1, Op2 : Natural) return Boolean; -- A pointer to a function that compares two items and returns True if -- the item with index value Op1 is less than the item with Index value -- Op2, and False if the Op1 item is greater than the Op2 item. If -- the items are equal, then it does not matter if True or False is -- returned (but it is slightly more efficient to return False). procedure Sort (N : Natural; Xchg : Xchg_Procedure; Lt : Lt_Function); -- This procedures sorts items in the range from 1 to N into ascending -- order making calls to Lt to do required comparisons, and calls to -- Xchg to exchange items. The sort is not stable, that is the order -- of equal items in the input data set is not preserved. end GNAT.Heap_Sort;
-------------------------------------------------------------------------------------------------------------------- -- Copyright (c) 2013-2020, Luke A. Guest -- -- This software is provided 'as-is', without any express or implied -- warranty. In no event will the authors be held liable for any damages -- arising from the use of this software. -- -- Permission is granted to anyone to use this software for any purpose, -- including commercial applications, and to alter it and redistribute it -- freely, subject to the following restrictions: -- -- 1. The origin of this software must not be misrepresented; you must not -- claim that you wrote the original software. If you use this software -- in a product, an acknowledgment in the product documentation would be -- appreciated but is not required. -- -- 2. Altered source versions must be plainly marked as such, and must not be -- misrepresented as being the original software. -- -- 3. This notice may not be removed or altered from any source -- distribution. -------------------------------------------------------------------------------------------------------------------- -- Pixel_Format_Test_Cases -------------------------------------------------------------------------------------------------------------------- with Ada.Unchecked_Conversion; with Ada.Strings.Fixed; use Ada.Strings.Fixed; use Ada.Strings; with Interfaces.C; with SDL.Video.Pixel_Formats; use SDL.Video.Pixel_Formats; with AUnit.Assertions; use AUnit.Assertions; with Ada.Text_Io; -- use Ada.Text_Io; package body Pixel_Format_Test_Cases is overriding function Name (Test : Pixel_Format_Test_Case) return Message_String is begin return Format ("Pixel format test"); end Name; use type C.int; function To_int is new Ada.Unchecked_Conversion (Source => Pixel_Format_Names, Target => C.int); package int_IO is new Ada.Text_IO.Integer_Io (C.int); use int_IO; function To_Binary (Num : in C.int) return String is Result : String (1 .. 100); begin Put (Result, Num, 2); return Trim (Result, Left); end To_Binary; overriding procedure Run_Test (Test : in out Pixel_Format_Test_Case) is begin declare Ada_Value : constant String := To_Binary (To_int (Pixel_Format_Unknown)); C_Value : constant String := To_Binary (C_Unknown); Error : constant String := "Pixel_Format_Unknown (" & Ada_Value & ") /= C_Index_Unknown (" & C_Value & ")"; begin -- Put_Line (Error); Assert (To_int (Pixel_Format_Unknown) = C_Unknown, Error); end; declare Ada_Value : constant String := To_Binary (To_int (Pixel_Format_Index_1_LSB)); C_Value : constant String := To_Binary (C_Index_1_LSB); Error : constant String := "Pixel_Format_Index_1_LSB (" & Ada_Value & ") /= C_Index_1_LSB (" & C_Value & ")"; begin -- Put_Line (Error); Assert (To_int (Pixel_Format_Index_1_LSB) = C_Index_1_LSB, Error); end; declare Ada_Value : constant String := To_Binary (To_int (Pixel_Format_Index_1_MSB)); C_Value : constant String := To_Binary (C_Index_1_MSB); Error : constant String := "Pixel_Format_Index_1_MSB (" & Ada_Value & ") /= C_Index_1_MSB (" & C_Value & ")"; begin -- Put_Line (Error); Assert (To_int (Pixel_Format_Index_1_MSB) = C_Index_1_MSB, Error); end; declare Ada_Value : constant String := To_Binary (To_int (Pixel_Format_Index_4_LSB)); C_Value : constant String := To_Binary (C_Index_4_LSB); Error : constant String := "Pixel_Format_Index_4_LSB (" & Ada_Value & ") /= C_Index_4_LSB (" & C_Value & ")"; begin -- Put_Line (Error); Assert (To_int (Pixel_Format_Index_4_LSB) = C_Index_4_LSB, Error); end; -- Put (To => Ada_Value, Item => To_int (Pixel_Format_Index_4_MSB), Base => 16); -- Put (To => C_Value, Item => C_Index_4_MSB, Base => 16); declare Ada_Value : constant String := To_Binary (To_int (Pixel_Format_Index_4_MSB)); C_Value : constant String := To_Binary (C_Index_4_MSB); Error : constant String := "Pixel_Format_Index_4_MSB (" & Ada_Value & ") /= C_Index_4_MSB (" & C_Value & ")"; begin -- Put_Line (Error); Assert (To_int (Pixel_Format_Index_4_MSB) = C_Index_4_MSB, Error); end; declare Ada_Value : constant String := To_Binary (To_int (Pixel_Format_Index_8)); C_Value : constant String := To_Binary (C_Index_8); Error : constant String := "Pixel_Format_Index_8 (" & Ada_Value & ") /= C_Index_8 (" & C_Value & ")"; begin -- Put_Line (Error); Assert (To_int (Pixel_Format_Index_8) = C_Index_8, Error); end; declare Ada_Value : constant String := To_Binary (To_int (Pixel_Format_RGB_332)); C_Value : constant String := To_Binary (C_RGB_332); Error : constant String := "Pixel_Format_RGB_332 (" & Ada_Value & ") /= C_RGB_332 (" & C_Value & ")"; begin -- Put_Line (Error); Assert (To_int (Pixel_Format_RGB_332) = C_RGB_332, Error); end; declare Ada_Value : constant String := To_Binary (To_int (Pixel_Format_RGB_444)); C_Value : constant String := To_Binary (C_RGB_444); Error : constant String := "Pixel_Format_RGB_444 (" & Ada_Value & ") /= C_RGB_444 (" & C_Value & ")"; begin -- Put_Line (Error); Assert (To_int (Pixel_Format_RGB_444) = C_RGB_444, Error); end; declare Ada_Value : constant String := To_Binary (To_int (Pixel_Format_RGB_555)); C_Value : constant String := To_Binary (C_RGB_555); Error : constant String := "Pixel_Format_RGB_555 (" & Ada_Value & ") /= C_RGB_555 (" & C_Value & ")"; begin -- Put_Line (Error); Assert (To_int (Pixel_Format_RGB_555) = C_RGB_555, Error); end; declare Ada_Value : constant String := To_Binary (To_int (Pixel_Format_BGR_555)); C_Value : constant String := To_Binary (C_BGR_555); Error : constant String := "Pixel_Format_BGR_555 (" & Ada_Value & ") /= C_BGR_555 (" & C_Value & ")"; begin -- Put_Line (Error); Assert (To_int (Pixel_Format_BGR_555) = C_BGR_555, Error); end; declare Ada_Value : constant String := To_Binary (To_int (Pixel_Format_ARGB_4444)); C_Value : constant String := To_Binary (C_ARGB_4444); Error : constant String := "Pixel_Format_ARGB_4444 (" & Ada_Value & ") /= C_ARGB_4444 (" & C_Value & ")"; begin -- Put_Line (Error); Assert (To_int (Pixel_Format_ARGB_4444) = C_ARGB_4444, Error); end; declare Ada_Value : constant String := To_Binary (To_int (Pixel_Format_RGBA_4444)); C_Value : constant String := To_Binary (C_RGBA_4444); Error : constant String := "Pixel_Format_RGBA_4444 (" & Ada_Value & ") /= C_RGBA_4444 (" & C_Value & ")"; begin -- Put_Line (Error); Assert (To_int (Pixel_Format_RGBA_4444) = C_RGBA_4444, Error); end; declare Ada_Value : constant String := To_Binary (To_int (Pixel_Format_ABGR_4444)); C_Value : constant String := To_Binary (C_ABGR_4444); Error : constant String := "Pixel_Format_ABGR_4444 (" & Ada_Value & ") /= C_ABGR_4444 (" & C_Value & ")"; begin -- Put_Line (Error); Assert (To_int (Pixel_Format_ABGR_4444) = C_ABGR_4444, Error); end; declare Ada_Value : constant String := To_Binary (To_int (Pixel_Format_BGRA_4444)); C_Value : constant String := To_Binary (C_BGRA_4444); Error : constant String := "Pixel_Format_BGRA_4444 (" & Ada_Value & ") /= C_BGRA_4444 (" & C_Value & ")"; begin -- Put_Line (Error); Assert (To_int (Pixel_Format_BGRA_4444) = C_BGRA_4444, Error); end; declare Ada_Value : constant String := To_Binary (To_int (Pixel_Format_ARGB_1555)); C_Value : constant String := To_Binary (C_ARGB_1555); Error : constant String := "Pixel_Format_ARGB_1555 (" & Ada_Value & ") /= C_ARGB_1555 (" & C_Value & ")"; begin -- Put_Line (Error); Assert (To_int (Pixel_Format_ARGB_1555) = C_ARGB_1555, Error); end; declare Ada_Value : constant String := To_Binary (To_int (Pixel_Format_RGBA_5551)); C_Value : constant String := To_Binary (C_RGBA_5551); Error : constant String := "Pixel_Format_RGBA_5551 (" & Ada_Value & ") /= C_RGBA_5551 (" & C_Value & ")"; begin -- Put_Line (Error); Assert (To_int (Pixel_Format_RGBA_5551) = C_RGBA_5551, Error); end; declare Ada_Value : constant String := To_Binary (To_int (Pixel_Format_ABGR_1555)); C_Value : constant String := To_Binary (C_ABGR_1555); Error : constant String := "Pixel_Format_ABGR_1555 (" & Ada_Value & ") /= C_ABGR_1555 (" & C_Value & ")"; begin -- Put_Line (Error); Assert (To_int (Pixel_Format_ABGR_1555) = C_ABGR_1555, Error); end; declare Ada_Value : constant String := To_Binary (To_int (Pixel_Format_BGRA_5551)); C_Value : constant String := To_Binary (C_BGRA_5551); Error : constant String := "Pixel_Format_BGRA_5551 (" & Ada_Value & ") /= C_BGRA_5551 (" & C_Value & ")"; begin -- Put_Line (Error); Assert (To_int (Pixel_Format_BGRA_5551) = C_BGRA_5551, Error); end; declare Ada_Value : constant String := To_Binary (To_int (Pixel_Format_RGB_565)); C_Value : constant String := To_Binary (C_RGB_565); Error : constant String := "Pixel_Format_RGB_565 (" & Ada_Value & ") /= C_RGB_565 (" & C_Value & ")"; begin -- Put_Line (Error); Assert (To_int (Pixel_Format_RGB_565) = C_RGB_565, Error); end; declare Ada_Value : constant String := To_Binary (To_int (Pixel_Format_BGR_565)); C_Value : constant String := To_Binary (C_BGR_565); Error : constant String := "Pixel_Format_BGR_565 (" & Ada_Value & ") /= C_BGR_565 (" & C_Value & ")"; begin -- Put_Line (Error); Assert (To_int (Pixel_Format_BGR_565) = C_BGR_565, Error); end; declare Ada_Value : constant String := To_Binary (To_int (Pixel_Format_RGB_24)); C_Value : constant String := To_Binary (C_RGB_24); Error : constant String := "Pixel_Format_RGB_24 (" & Ada_Value & ") /= C_RGB_24 (" & C_Value & ")"; begin -- Put_Line (Error); Assert (To_int (Pixel_Format_RGB_24) = C_RGB_24, Error); end; declare Ada_Value : constant String := To_Binary (To_int (Pixel_Format_BGR_24)); C_Value : constant String := To_Binary (C_BGR_24); Error : constant String := "Pixel_Format_BGR_24 (" & Ada_Value & ") /= C_BGR_24 (" & C_Value & ")"; begin -- Put_Line (Error); Assert (To_int (Pixel_Format_BGR_24) = C_BGR_24, Error); end; declare Ada_Value : constant String := To_Binary (To_int (Pixel_Format_RGB_888)); C_Value : constant String := To_Binary (C_RGB_888); Error : constant String := "Pixel_Format_RGB_888 (" & Ada_Value & ") /= C_RGB_888 (" & C_Value & ")"; begin -- Put_Line (Error); Assert (To_int (Pixel_Format_RGB_888) = C_RGB_888, Error); end; declare Ada_Value : constant String := To_Binary (To_int (Pixel_Format_RGBX_8888)); C_Value : constant String := To_Binary (C_RGBX_8888); Error : constant String := "Pixel_Format_RGBX_8888 (" & Ada_Value & ") /= C_RGBX_8888 (" & C_Value & ")"; begin -- Put_Line (Error); Assert (To_int (Pixel_Format_RGBX_8888) = C_RGBX_8888, Error); end; declare Ada_Value : constant String := To_Binary (To_int (Pixel_Format_BGR_888)); C_Value : constant String := To_Binary (C_BGR_888); Error : constant String := "Pixel_Format_BGR_888 (" & Ada_Value & ") /= C_BGR_888 (" & C_Value & ")"; begin -- Put_Line (Error); Assert (To_int (Pixel_Format_BGR_888) = C_BGR_888, Error); end; declare Ada_Value : constant String := To_Binary (To_int (Pixel_Format_BGRX_8888)); C_Value : constant String := To_Binary (C_BGRX_8888); Error : constant String := "Pixel_Format_BGRX_8888 (" & Ada_Value & ") /= C_BGRX_8888 (" & C_Value & ")"; begin -- Put_Line (Error); Assert (To_int (Pixel_Format_BGRX_8888) = C_BGRX_8888, Error); end; declare Ada_Value : constant String := To_Binary (To_int (Pixel_Format_ARGB_8888)); C_Value : constant String := To_Binary (C_ARGB_8888); Error : constant String := "Pixel_Format_ARGB_8888 (" & Ada_Value & ") /= C_ARGB_8888 (" & C_Value & ")"; begin -- Put_Line (Error); Assert (To_int (Pixel_Format_ARGB_8888) /= C_ARGB_8888, Error); end; declare Ada_Value : constant String := To_Binary (To_int (Pixel_Format_RGBA_8888)); C_Value : constant String := To_Binary (C_RGBA_8888); Error : constant String := "Pixel_Format_RGBA_8888 (" & Ada_Value & ") /= C_RGBA_8888 (" & C_Value & ")"; begin -- Put_Line (Error); Assert (To_int (Pixel_Format_RGBA_8888) = C_RGBA_8888, Error); end; declare Ada_Value : constant String := To_Binary (To_int (Pixel_Format_ABGR_8888)); C_Value : constant String := To_Binary (C_ABGR_8888); Error : constant String := "Pixel_Format_ABGR_8888 (" & Ada_Value & ") /= C_ABGR_8888 (" & C_Value & ")"; begin -- Put_Line (Error); Assert (To_int (Pixel_Format_ABGR_8888) = C_ABGR_8888, Error); end; declare Ada_Value : constant String := To_Binary (To_int (Pixel_Format_BGRA_8888)); C_Value : constant String := To_Binary (C_BGRA_8888); Error : constant String := "Pixel_Format_BGRA_8888 (" & Ada_Value & ") /= C_BGRA_8888 (" & C_Value & ")"; begin -- Put_Line (Error); Assert (To_int (Pixel_Format_BGRA_8888) = C_BGRA_8888, Error); end; declare Ada_Value : constant String := To_Binary (To_int (Pixel_Format_ARGB_2101010)); C_Value : constant String := To_Binary (C_ARGB_2101010); Error : constant String := "Pixel_Format_ARGB_2101010 (" & Ada_Value & ") /= C_ARGB_2101010 (" & C_Value & ")"; begin -- Put_Line (Error); Assert (To_int (Pixel_Format_ARGB_2101010) = C_ARGB_2101010, Error); end; declare Ada_Value : constant String := To_Binary (To_int (Pixel_Format_YV_12)); C_Value : constant String := To_Binary (C_YV_12); Error : constant String := "Pixel_Format_YV_12 (" & Ada_Value & ") /= C_YV_12 (" & C_Value & ")"; begin -- Put_Line (Error); Assert (To_int (Pixel_Format_YV_12) = C_YV_12, Error); end; declare Ada_Value : constant String := To_Binary (To_int (Pixel_Format_IYUV)); C_Value : constant String := To_Binary (C_IYUV); Error : constant String := "Pixel_Format_IYUV (" & Ada_Value & ") /= C_IYUV (" & C_Value & ")"; begin -- Put_Line (Error); Assert (To_int (Pixel_Format_IYUV) = C_IYUV, Error); end; declare Ada_Value : constant String := To_Binary (To_int (Pixel_Format_YUY_2)); C_Value : constant String := To_Binary (C_YUY_2); Error : constant String := "Pixel_Format_YUY_2 (" & Ada_Value & ") /= C_YUY_2 (" & C_Value & ")"; begin -- Put_Line (Error); Assert (To_int (Pixel_Format_YUY_2) = C_YUY_2, Error); end; declare Ada_Value : constant String := To_Binary (To_int (Pixel_Format_UYVY)); C_Value : constant String := To_Binary (C_UYVY); Error : constant String := "Pixel_Format_UYVY (" & Ada_Value & ") /= C_UYVY (" & C_Value & ")"; begin -- Put_Line (Error); Assert (To_int (Pixel_Format_UYVY) = C_UYVY, Error); end; declare Ada_Value : constant String := To_Binary (To_int (Pixel_Format_YVYU)); C_Value : constant String := To_Binary (C_YVYU); Error : constant String := "Pixel_Format_YVYU (" & Ada_Value & ") /= C_YVYU (" & C_Value & ")"; begin -- Put_Line (Error); Assert (To_int (Pixel_Format_YVYU) = C_YVYU, Error); end; end Run_Test; end Pixel_Format_Test_Cases;
package Memory.Transform.Shift is type Shift_Type is new Transform_Type with private; type Shift_Pointer is access all Shift_Type'Class; function Create_Shift return Shift_Pointer; function Random_Shift(next : access Memory_Type'Class; generator : Distribution_Type; max_cost : Cost_Type) return Memory_Pointer; overriding function Clone(mem : Shift_Type) return Memory_Pointer; overriding procedure Permute(mem : in out Shift_Type; generator : in Distribution_Type; max_cost : in Cost_Type); overriding function Is_Empty(mem : Shift_Type) return Boolean; overriding function Get_Name(mem : Shift_Type) return String; private type Shift_Type is new Transform_Type with null record; overriding function Apply(mem : Shift_Type; address : Address_Type; dir : Boolean) return Address_Type; overriding function Get_Alignment(mem : Shift_Type) return Positive; overriding function Get_Transform_Length(mem : Shift_Type) return Natural; end Memory.Transform.Shift;
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- V X A D D R 2 L I N E -- -- -- -- B o d y -- -- -- -- Copyright (C) 2002-2014, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- -- for more details. You should have received a copy of the GNU General -- -- Public License distributed with GNAT; see file COPYING3. If not, go to -- -- http://www.gnu.org/licenses for a complete copy of the license. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- This program is meant to be used with vxworks to compute symbolic -- backtraces on the host from non-symbolic backtraces obtained on the target. -- The basic idea is to automate the computation of the necessary address -- adjustments prior to calling addr2line when the application has only been -- partially linked on the host. -- Variants for various targets are supported, and the command line should -- be like : -- <target>-addr2line [-a <target_arch>] <exe_file> <ref_address> -- <backtrace addresses> -- Where: -- <target_arch> : -- selects the target architecture. In the absence of this parameter the -- default variant is chosen based on the Detect_Arch result. Generally, -- this parameter will only be used if vxaddr2line is recompiled manually. -- Otherwise, the command name will always be of the form: -- <target>-vxaddr2line -- where there is no ambiguity on the target's architecture. -- <exe_file> : -- The name of the partially linked binary file for the application. -- <ref_address> : -- Runtime address (on the target) of a reference symbol you choose. This -- name must match the value of the Ref_Symbol variable declared below. -- A symbol with a small offset from the beginning of the text segment is -- better, so "adainit" is a good choice. -- <backtrace addresses> : -- The call chain addresses you obtained at run time on the target and -- for which you want a symbolic association. -- TO ADD A NEW ARCHITECTURE add an appropriate value to Architecture type -- (in a format <host>_<target>), and then an appropriate value to Config_List -- array with Ada.Text_IO; use Ada.Text_IO; with Ada.Command_Line; use Ada.Command_Line; with Ada.Strings.Fixed; use Ada.Strings.Fixed; with Interfaces; use Interfaces; with GNAT.OS_Lib; use GNAT.OS_Lib; with GNAT.Directory_Operations; use GNAT.Directory_Operations; with GNAT.Expect; use GNAT.Expect; with GNAT.Regpat; use GNAT.Regpat; procedure VxAddr2Line is package Unsigned_32_IO is new Modular_IO (Unsigned_32); -- Instantiate Modular_IO to have Put Ref_Symbol : constant String := "adainit"; -- This is the name of the reference symbol whose runtime address must -- be provided as the <ref_address> argument. -- All supported architectures type Architecture is (DEC_ALPHA, LINUX_E500V2, LINUX_I586, LINUX_POWERPC, WINDOWS_E500V2, WINDOWS_I586, WINDOWS_M68K, WINDOWS_POWERPC, SOLARIS_E500V2, SOLARIS_I586, SOLARIS_POWERPC); type Arch_Record is record Addr2line_Binary : String_Access; -- Name of the addr2line utility to use Nm_Binary : String_Access; -- Name of the host nm utility, which will be used to find out the -- offset of the reference symbol in the text segment of the partially -- linked executable. Addr_Digits_To_Skip : Integer; -- When addresses such as 0xfffffc0001dfed50 are provided, for instance -- on ALPHA, indicate the number of leading digits that can be ignored, -- which will avoid computational overflows. Typically only useful when -- 64bit addresses are provided. Bt_Offset_From_Call : Unsigned_32; -- Offset from a backtrace address to the address of the corresponding -- call instruction. This should always be 0, except on platforms where -- the backtrace addresses actually correspond to return and not call -- points. In such cases, a negative value is most likely. end record; -- Configuration for each of the architectures Arch_List : array (Architecture'Range) of Arch_Record := (DEC_ALPHA => (Addr2line_Binary => null, Nm_Binary => null, Addr_Digits_To_Skip => 8, Bt_Offset_From_Call => 0), LINUX_E500V2 => (Addr2line_Binary => null, Nm_Binary => null, Addr_Digits_To_Skip => 0, Bt_Offset_From_Call => -4), LINUX_I586 => (Addr2line_Binary => null, Nm_Binary => null, Addr_Digits_To_Skip => 0, Bt_Offset_From_Call => -2), LINUX_POWERPC => (Addr2line_Binary => null, Nm_Binary => null, Addr_Digits_To_Skip => 0, Bt_Offset_From_Call => -4), SOLARIS_E500V2 => (Addr2line_Binary => null, Nm_Binary => null, Addr_Digits_To_Skip => 0, Bt_Offset_From_Call => -4), SOLARIS_I586 => (Addr2line_Binary => null, Nm_Binary => null, Addr_Digits_To_Skip => 0, Bt_Offset_From_Call => -2), SOLARIS_POWERPC => (Addr2line_Binary => null, Nm_Binary => null, Addr_Digits_To_Skip => 0, Bt_Offset_From_Call => -4), WINDOWS_E500V2 => (Addr2line_Binary => null, Nm_Binary => null, Addr_Digits_To_Skip => 0, Bt_Offset_From_Call => -4), WINDOWS_I586 => (Addr2line_Binary => null, Nm_Binary => null, Addr_Digits_To_Skip => 0, Bt_Offset_From_Call => -2), WINDOWS_M68K => (Addr2line_Binary => null, Nm_Binary => null, Addr_Digits_To_Skip => 0, Bt_Offset_From_Call => -4), WINDOWS_POWERPC => (Addr2line_Binary => null, Nm_Binary => null, Addr_Digits_To_Skip => 0, Bt_Offset_From_Call => -4) ); -- Current architecture Cur_Arch : Architecture; -- State of architecture detection Detect_Success : Boolean := False; ----------------------- -- Local subprograms -- ----------------------- procedure Error (Msg : String); pragma No_Return (Error); -- Prints the message and then terminates the program procedure Usage; -- Displays the short help message and then terminates the program function Get_Reference_Offset return Unsigned_32; -- Computes the static offset of the reference symbol by calling nm function Get_Value_From_Hex_Arg (Arg : Natural) return Unsigned_32; -- Threats the argument number Arg as a C-style hexadecimal literal -- and returns its integer value function Hex_Image (Value : Unsigned_32) return String_Access; -- Returns access to a string that contains hexadecimal image of Value -- Separate functions that provide build-time customization: procedure Detect_Arch; -- Saves in Cur_Arch the current architecture, based on the name of -- vxaddr2line instance and properties of the host. Detect_Success is False -- if detection fails ----------------- -- Detect_Arch -- ----------------- procedure Detect_Arch is Name : constant String := Base_Name (Command_Name); Proc : constant String := Name (Name'First .. Index (Name, "-") - 1); Target : constant String := Name (Name'First .. Index (Name, "vxaddr2line") - 1); begin Detect_Success := False; if Proc = "" then return; end if; if Proc = "alpha" then Cur_Arch := DEC_ALPHA; else -- Let's detect the host. -- ??? A naive implementation that can't distinguish between Unixes if Directory_Separator = '/' then Cur_Arch := Architecture'Value ("solaris_" & Proc); else Cur_Arch := Architecture'Value ("windows_" & Proc); end if; end if; if Arch_List (Cur_Arch).Addr2line_Binary = null then Arch_List (Cur_Arch).Addr2line_Binary := new String' (Target & "addr2line"); end if; if Arch_List (Cur_Arch).Nm_Binary = null then Arch_List (Cur_Arch).Nm_Binary := new String' (Target & "nm"); end if; Detect_Success := True; exception when others => return; end Detect_Arch; ----------- -- Error -- ----------- procedure Error (Msg : String) is begin Put_Line (Msg); OS_Exit (1); raise Program_Error; end Error; -------------------------- -- Get_Reference_Offset -- -------------------------- function Get_Reference_Offset return Unsigned_32 is Nm_Cmd : constant String_Access := Locate_Exec_On_Path (Arch_List (Cur_Arch).Nm_Binary.all); Nm_Args : constant Argument_List := (new String'("-P"), new String'(Argument (1))); Forever : aliased String := "^@@@@"; Reference : aliased String := Ref_Symbol & "\s+\S\s+([\da-fA-F]+)"; Pd : Process_Descriptor; Result : Expect_Match; begin -- If Nm is not found, abort if Nm_Cmd = null then Error ("Couldn't find " & Arch_List (Cur_Arch).Nm_Binary.all); end if; Non_Blocking_Spawn (Pd, Nm_Cmd.all, Nm_Args, Buffer_Size => 0, Err_To_Out => True); -- Expect a string containing the reference symbol Expect (Pd, Result, Regexp_Array'(1 => Reference'Unchecked_Access), Timeout => -1); -- If we are here, the pattern was matched successfully declare Match_String : constant String := Expect_Out_Match (Pd); Matches : Match_Array (0 .. 1); Value : Unsigned_32; begin Match (Reference, Match_String, Matches); Value := Unsigned_32'Value ("16#" & Match_String (Matches (1).First .. Matches (1).Last) & "#"); -- Expect a string that will never be emitted, so that the -- process can be correctly terminated (with Process_Died) Expect (Pd, Result, Regexp_Array'(1 => Forever'Unchecked_Access), Timeout => -1); exception when Process_Died => return Value; end; -- We cannot get here raise Program_Error; exception when Invalid_Process => Error ("Could not spawn a process " & Nm_Cmd.all); when others => -- The process died without matching the reference symbol or the -- format wasn't recognized. Error ("Unexpected output from " & Nm_Cmd.all); end Get_Reference_Offset; ---------------------------- -- Get_Value_From_Hex_Arg -- ---------------------------- function Get_Value_From_Hex_Arg (Arg : Natural) return Unsigned_32 is Cur_Arg : constant String := Argument (Arg); Offset : Natural; begin -- Skip "0x" prefix if present if Cur_Arg'Length > 2 and then Cur_Arg (1 .. 2) = "0x" then Offset := 3; else Offset := 1; end if; -- Add architecture-specific offset Offset := Offset + Arch_List (Cur_Arch).Addr_Digits_To_Skip; -- Convert to value return Unsigned_32'Value ("16#" & Cur_Arg (Offset .. Cur_Arg'Last) & "#"); exception when Constraint_Error => Error ("Can't parse backtrace address '" & Cur_Arg & "'"); raise; end Get_Value_From_Hex_Arg; --------------- -- Hex_Image -- --------------- function Hex_Image (Value : Unsigned_32) return String_Access is Result : String (1 .. 20); Start_Pos : Natural; begin Unsigned_32_IO.Put (Result, Value, 16); Start_Pos := Index (Result, "16#") + 3; return new String'(Result (Start_Pos .. Result'Last - 1)); end Hex_Image; ----------- -- Usage -- ----------- procedure Usage is begin Put_Line ("Usage : " & Base_Name (Command_Name) & " <executable> <" & Ref_Symbol & " offset on target> <addr1> ..."); OS_Exit (1); end Usage; Ref_Static_Offset, Ref_Runtime_Address, Bt_Address : Unsigned_32; Addr2line_Cmd : String_Access; Addr2line_Args : Argument_List (1 .. 501); -- We expect that there won't be more than 500 backtrace frames Addr2line_Args_Count : Natural; Success : Boolean; -- Start of processing for VxAddr2Line begin Detect_Arch; -- There should be at least two arguments if Argument_Count < 2 then Usage; end if; -- Enforce HARD LIMIT There should be at most 501 arguments. Why 501??? if Argument_Count > 501 then Error ("Too many backtrace frames"); end if; -- Do we have a valid architecture? if not Detect_Success then Put_Line ("Couldn't detect the architecture"); return; end if; Addr2line_Cmd := Locate_Exec_On_Path (Arch_List (Cur_Arch).Addr2line_Binary.all); -- If Addr2line is not found, abort if Addr2line_Cmd = null then Error ("Couldn't find " & Arch_List (Cur_Arch).Addr2line_Binary.all); end if; -- The first argument specifies the image file. Check if it exists if not Is_Regular_File (Argument (1)) then Error ("Couldn't find the executable " & Argument (1)); end if; -- The second argument specifies the reference symbol runtime address. -- Let's parse and store it Ref_Runtime_Address := Get_Value_From_Hex_Arg (2); -- Run nm command to get the reference symbol static offset Ref_Static_Offset := Get_Reference_Offset; -- Build addr2line parameters. First, the standard part Addr2line_Args (1) := new String'("--exe=" & Argument (1)); Addr2line_Args_Count := 1; -- Now, append to this the adjusted backtraces in arguments 4 and further for J in 3 .. Argument_Count loop -- Basically, for each address in the runtime backtrace ... -- o We compute its offset relatively to the runtime address of the -- reference symbol, -- and then ... -- o We add this offset to the static one for the reference symbol in -- the executable to find the executable offset corresponding to the -- backtrace address. Bt_Address := Get_Value_From_Hex_Arg (J); Bt_Address := Bt_Address - Ref_Runtime_Address + Ref_Static_Offset + Arch_List (Cur_Arch).Bt_Offset_From_Call; Addr2line_Args_Count := Addr2line_Args_Count + 1; Addr2line_Args (Addr2line_Args_Count) := Hex_Image (Bt_Address); end loop; -- Run the resulting command Spawn (Addr2line_Cmd.all, Addr2line_Args (1 .. Addr2line_Args_Count), Success); if not Success then Error ("Couldn't spawn " & Addr2line_Cmd.all); end if; exception when others => -- Mask all exceptions return; end VxAddr2Line;
----------------------------------------------------------------------- -- druss -- Tool to control Snaga, the bbox -- Copyright (C) 2017 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- package Druss is end Druss;
-- Copyright (c) 2021 Bartek thindil Jasicki <thindil@laeran.pl> -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. with Ada.Strings.Unbounded; package body Tk.TtkButton is -- ****if* TtkButton/TtkButton.Options_To_String -- FUNCTION -- Convert Ada structure to Tcl command -- PARAMETERS -- Options - Ada Ttk_Button_Options to convert -- RESULT -- String with Tcl command options -- HISTORY -- 8.6.0 - Added -- SOURCE function Options_To_String(Options: Ttk_Button_Options) return String is -- **** use Ada.Strings.Unbounded; Options_String: Unbounded_String := Null_Unbounded_String; begin Option_Image (Name => "class", Value => Options.Class, Options_String => Options_String); Option_Image (Name => "command", Value => Options.Command, Options_String => Options_String); Option_Image (Name => "compound", Value => Options.Compound, Options_String => Options_String); Option_Image (Name => "cursor", Value => Options.Cursor, Options_String => Options_String); Option_Image (Name => "default", Value => Options.Default, Options_String => Options_String); Option_Image (Name => "image", Value => Options.Image, Options_String => Options_String); Option_Image (Name => "state", Value => Options.State, Options_String => Options_String); Option_Image (Name => "style", Value => Options.Style, Options_String => Options_String); Option_Image (Name => "takefocus", Value => Options.Take_Focus, Options_String => Options_String); Option_Image (Name => "text", Value => Options.Text, Options_String => Options_String); Option_Image (Name => "textvariable", Value => Options.Text_Variable, Options_String => Options_String); Option_Image (Name => "underline", Value => Options.Underline, Options_String => Options_String); Option_Image (Name => "width", Value => Options.Width, Options_String => Options_String); return To_String(Source => Options_String); end Options_To_String; function Create (Path_Name: Tk_Path_String; Options: Ttk_Button_Options; Interpreter: Tcl_Interpreter := Get_Interpreter) return Ttk_Button is begin Tcl_Eval (Tcl_Script => "ttk::button " & Path_Name & " " & Options_To_String(Options => Options), Interpreter => Interpreter); return Get_Widget(Path_Name => Path_Name, Interpreter => Interpreter); end Create; procedure Create (Button: out Ttk_Button; Path_Name: Tk_Path_String; Options: Ttk_Button_Options; Interpreter: Tcl_Interpreter := Get_Interpreter) is begin Button := Create (Path_Name => Path_Name, Options => Options, Interpreter => Interpreter); end Create; function Get_Options(Button: Ttk_Button) return Ttk_Button_Options is begin return Options: Ttk_Button_Options := Default_Ttk_Button_Options do Options.Class := Option_Value(Widgt => Button, Name => "class"); Options.Command := Option_Value(Widgt => Button, Name => "command"); Options.Compound := Option_Value(Ttk_Widgt => Button, Name => "compound"); Options.Cursor := Option_Value(Widgt => Button, Name => "cursor"); Options.Default := Option_Value(Widgt => Button, Name => "default"); Options.Image := Option_Value(Ttk_Widgt => Button, Name => "image"); Options.State := Option_Value(Ttk_Widgt => Button, Name => "state"); Options.Style := Option_Value(Widgt => Button, Name => "style"); Options.Take_Focus := Option_Value(Widgt => Button, Name => "takefocus"); Options.Text := Option_Value(Widgt => Button, Name => "text"); Options.Text_Variable := Option_Value(Widgt => Button, Name => "textvariable"); Options.Underline := Option_Value(Widgt => Button, Name => "underline"); Options.Width := Option_Value(Widgt => Button, Name => "width"); end return; end Get_Options; procedure Configure(Button: Ttk_Button; Options: Ttk_Button_Options) is begin Execute_Widget_Command (Widgt => Button, Command_Name => "configure", Options => Options_To_String(Options => Options)); end Configure; procedure Invoke(Button: Ttk_Button) is begin Execute_Widget_Command(Widgt => Button, Command_Name => "invoke"); end Invoke; function Invoke(Button: Ttk_Button) return String is begin Invoke(Button => Button); return Tcl_Get_Result(Interpreter => Tk_Interp(Widgt => Button)); end Invoke; function Generic_Scalar_Invoke_Button (Button: Ttk_Button) return Result_Type is begin return Result_Type'Value(Invoke(Button => Button)); end Generic_Scalar_Invoke_Button; function Generic_Float_Invoke_Button (Button: Ttk_Button) return Result_Type is begin return Result_Type'Value(Invoke(Button => Button)); end Generic_Float_Invoke_Button; end Tk.TtkButton;
package sensor is function HCSR04_Distance return Float; end sensor;
------------------------------------------------------------------------------ -- -- -- Copyright (c) 2016 Vitalij Bondarenko <vibondare@gmail.com> -- -- -- ------------------------------------------------------------------------------ -- -- -- The MIT License (MIT) -- -- -- -- Permission is hereby granted, free of charge, to any person obtaining a -- -- copy of this software and associated documentation files (the -- -- "Software"), to deal in the Software without restriction, including -- -- without limitation the rights to use, copy, modify, merge, publish, -- -- distribute, sublicense, and/or sell copies of the Software, and to -- -- permit persons to whom the Software is furnished to do so, subject to -- -- the following conditions: -- -- -- -- The above copyright notice and this permission notice shall be included -- -- in all copies or substantial portions of the Software. -- -- -- -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -- -- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -- -- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -- -- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -- -- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -- -- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -- -- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -- ------------------------------------------------------------------------------ with Formatted_Output.Float_Output; package Formatted_Output_Float is new Formatted_Output.Float_Output (Float);
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS -- -- -- -- SYSTEM.INTERRUPT_MANAGEMENT.OPERATIONS -- -- -- -- B o d y -- -- -- -- Copyright (C) 1992-2005, Free Software Foundation, Inc. -- -- -- -- GNARL is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 2, or (at your option) any later ver- -- -- sion. GNARL is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- -- for more details. You should have received a copy of the GNU General -- -- Public License distributed with GNARL; see file COPYING. If not, write -- -- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, -- -- Boston, MA 02110-1301, USA. -- -- -- -- As a special exception, if other files instantiate generics from this -- -- unit, or you link this unit with other files to produce an executable, -- -- this unit does not by itself cause the resulting executable to be -- -- covered by the GNU General Public License. This exception does not -- -- however invalidate any other reasons why the executable file might be -- -- covered by the GNU Public License. -- -- -- -- GNARL was developed by the GNARL team at Florida State University. -- -- Extensive contributions were provided by Ada Core Technologies, Inc. -- -- -- ------------------------------------------------------------------------------ -- This is a NO tasking version of this package package body System.Interrupt_Management.Operations is -- Turn off warnings since many unused formals pragma Warnings (Off); ---------------------------- -- Thread_Block_Interrupt -- ---------------------------- procedure Thread_Block_Interrupt (Interrupt : Interrupt_ID) is begin null; end Thread_Block_Interrupt; ------------------------------ -- Thread_Unblock_Interrupt -- ------------------------------ procedure Thread_Unblock_Interrupt (Interrupt : Interrupt_ID) is begin null; end Thread_Unblock_Interrupt; ------------------------ -- Set_Interrupt_Mask -- ------------------------ procedure Set_Interrupt_Mask (Mask : access Interrupt_Mask) is begin null; end Set_Interrupt_Mask; procedure Set_Interrupt_Mask (Mask : access Interrupt_Mask; OMask : access Interrupt_Mask) is begin null; end Set_Interrupt_Mask; ------------------------ -- Get_Interrupt_Mask -- ------------------------ procedure Get_Interrupt_Mask (Mask : access Interrupt_Mask) is begin null; end Get_Interrupt_Mask; -------------------- -- Interrupt_Wait -- -------------------- function Interrupt_Wait (Mask : access Interrupt_Mask) return Interrupt_ID is begin return 0; end Interrupt_Wait; ---------------------------- -- Install_Default_Action -- ---------------------------- procedure Install_Default_Action (Interrupt : Interrupt_ID) is begin null; end Install_Default_Action; --------------------------- -- Install_Ignore_Action -- --------------------------- procedure Install_Ignore_Action (Interrupt : Interrupt_ID) is begin null; end Install_Ignore_Action; ------------------------- -- Fill_Interrupt_Mask -- ------------------------- procedure Fill_Interrupt_Mask (Mask : access Interrupt_Mask) is begin null; end Fill_Interrupt_Mask; -------------------------- -- Empty_Interrupt_Mask -- -------------------------- procedure Empty_Interrupt_Mask (Mask : access Interrupt_Mask) is begin null; end Empty_Interrupt_Mask; ----------------------- -- Add_To_Sigal_Mask -- ----------------------- procedure Add_To_Interrupt_Mask (Mask : access Interrupt_Mask; Interrupt : Interrupt_ID) is begin null; end Add_To_Interrupt_Mask; -------------------------------- -- Delete_From_Interrupt_Mask -- -------------------------------- procedure Delete_From_Interrupt_Mask (Mask : access Interrupt_Mask; Interrupt : Interrupt_ID) is begin null; end Delete_From_Interrupt_Mask; --------------- -- Is_Member -- --------------- function Is_Member (Mask : access Interrupt_Mask; Interrupt : Interrupt_ID) return Boolean is begin return False; end Is_Member; ------------------------- -- Copy_Interrupt_Mask -- ------------------------- procedure Copy_Interrupt_Mask (X : out Interrupt_Mask; Y : Interrupt_Mask) is begin X := Y; end Copy_Interrupt_Mask; ------------------------- -- Interrupt_Self_Process -- ------------------------- procedure Interrupt_Self_Process (Interrupt : Interrupt_ID) is begin null; end Interrupt_Self_Process; -------------------------- -- Setup_Interrupt_Mask -- -------------------------- procedure Setup_Interrupt_Mask is begin null; end Setup_Interrupt_Mask; end System.Interrupt_Management.Operations;
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- G N A T . A L T I V E C . C O N V E R S I O N S -- -- -- -- B o d y -- -- -- -- Copyright (C) 2005-2009, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ with Ada.Unchecked_Conversion; with System; use System; package body GNAT.Altivec.Conversions is -- All the vector/view conversions operate similarly: bare unchecked -- conversion on big endian targets, and elements permutation on little -- endian targets. We call "Mirroring" the elements permutation process. -- We would like to provide a generic version of the conversion routines -- and just have a set of "renaming as body" declarations to satisfy the -- public interface. This unfortunately prevents inlining, which we must -- preserve at least for the hard binding. -- We instead provide a generic version of facilities needed by all the -- conversion routines and use them repeatedly. generic type Vitem_Type is private; type Varray_Index_Type is range <>; type Varray_Type is array (Varray_Index_Type) of Vitem_Type; type Vector_Type is private; type View_Type is private; package Generic_Conversions is subtype Varray is Varray_Type; -- This provides an easy common way to refer to the type parameter -- in contexts where a specific instance of this package is "use"d. procedure Mirror (A : Varray_Type; Into : out Varray_Type); pragma Inline (Mirror); -- Mirror the elements of A into INTO, not touching the per-element -- internal ordering. -- A procedure with an out parameter is a bit heavier to use than a -- function but reduces the amount of temporary creations around the -- call. Instances are typically not front-end inlined. They can still -- be back-end inlined on request with the proper command-line option. -- Below are Unchecked Conversion routines for various purposes, -- relying on internal knowledge about the bits layout in the different -- types (all 128 value bits blocks). -- View<->Vector straight bitwise conversions on BE targets function UNC_To_Vector is new Ada.Unchecked_Conversion (View_Type, Vector_Type); function UNC_To_View is new Ada.Unchecked_Conversion (Vector_Type, View_Type); -- Varray->Vector/View for returning mirrored results on LE targets function UNC_To_Vector is new Ada.Unchecked_Conversion (Varray_Type, Vector_Type); function UNC_To_View is new Ada.Unchecked_Conversion (Varray_Type, View_Type); -- Vector/View->Varray for to-be-permuted source on LE targets function UNC_To_Varray is new Ada.Unchecked_Conversion (Vector_Type, Varray_Type); function UNC_To_Varray is new Ada.Unchecked_Conversion (View_Type, Varray_Type); end Generic_Conversions; package body Generic_Conversions is procedure Mirror (A : Varray_Type; Into : out Varray_Type) is begin for J in A'Range loop Into (J) := A (A'Last - J + A'First); end loop; end Mirror; end Generic_Conversions; -- Now we declare the instances and implement the interface function -- bodies simply calling the instantiated routines. --------------------- -- Char components -- --------------------- package SC_Conversions is new Generic_Conversions (signed_char, Vchar_Range, Varray_signed_char, VSC, VSC_View); function To_Vector (S : VSC_View) return VSC is use SC_Conversions; begin if Default_Bit_Order = High_Order_First then return UNC_To_Vector (S); else declare M : Varray; begin Mirror (UNC_To_Varray (S), Into => M); return UNC_To_Vector (M); end; end if; end To_Vector; function To_View (S : VSC) return VSC_View is use SC_Conversions; begin if Default_Bit_Order = High_Order_First then return UNC_To_View (S); else declare M : Varray; begin Mirror (UNC_To_Varray (S), Into => M); return UNC_To_View (M); end; end if; end To_View; -- package UC_Conversions is new Generic_Conversions (unsigned_char, Vchar_Range, Varray_unsigned_char, VUC, VUC_View); function To_Vector (S : VUC_View) return VUC is use UC_Conversions; begin if Default_Bit_Order = High_Order_First then return UNC_To_Vector (S); else declare M : Varray; begin Mirror (UNC_To_Varray (S), Into => M); return UNC_To_Vector (M); end; end if; end To_Vector; function To_View (S : VUC) return VUC_View is use UC_Conversions; begin if Default_Bit_Order = High_Order_First then return UNC_To_View (S); else declare M : Varray; begin Mirror (UNC_To_Varray (S), Into => M); return UNC_To_View (M); end; end if; end To_View; -- package BC_Conversions is new Generic_Conversions (bool_char, Vchar_Range, Varray_bool_char, VBC, VBC_View); function To_Vector (S : VBC_View) return VBC is use BC_Conversions; begin if Default_Bit_Order = High_Order_First then return UNC_To_Vector (S); else declare M : Varray; begin Mirror (UNC_To_Varray (S), Into => M); return UNC_To_Vector (M); end; end if; end To_Vector; function To_View (S : VBC) return VBC_View is use BC_Conversions; begin if Default_Bit_Order = High_Order_First then return UNC_To_View (S); else declare M : Varray; begin Mirror (UNC_To_Varray (S), Into => M); return UNC_To_View (M); end; end if; end To_View; ---------------------- -- Short components -- ---------------------- package SS_Conversions is new Generic_Conversions (signed_short, Vshort_Range, Varray_signed_short, VSS, VSS_View); function To_Vector (S : VSS_View) return VSS is use SS_Conversions; begin if Default_Bit_Order = High_Order_First then return UNC_To_Vector (S); else declare M : Varray; begin Mirror (UNC_To_Varray (S), Into => M); return UNC_To_Vector (M); end; end if; end To_Vector; function To_View (S : VSS) return VSS_View is use SS_Conversions; begin if Default_Bit_Order = High_Order_First then return UNC_To_View (S); else declare M : Varray; begin Mirror (UNC_To_Varray (S), Into => M); return UNC_To_View (M); end; end if; end To_View; -- package US_Conversions is new Generic_Conversions (unsigned_short, Vshort_Range, Varray_unsigned_short, VUS, VUS_View); function To_Vector (S : VUS_View) return VUS is use US_Conversions; begin if Default_Bit_Order = High_Order_First then return UNC_To_Vector (S); else declare M : Varray; begin Mirror (UNC_To_Varray (S), Into => M); return UNC_To_Vector (M); end; end if; end To_Vector; function To_View (S : VUS) return VUS_View is use US_Conversions; begin if Default_Bit_Order = High_Order_First then return UNC_To_View (S); else declare M : Varray; begin Mirror (UNC_To_Varray (S), Into => M); return UNC_To_View (M); end; end if; end To_View; -- package BS_Conversions is new Generic_Conversions (bool_short, Vshort_Range, Varray_bool_short, VBS, VBS_View); function To_Vector (S : VBS_View) return VBS is use BS_Conversions; begin if Default_Bit_Order = High_Order_First then return UNC_To_Vector (S); else declare M : Varray; begin Mirror (UNC_To_Varray (S), Into => M); return UNC_To_Vector (M); end; end if; end To_Vector; function To_View (S : VBS) return VBS_View is use BS_Conversions; begin if Default_Bit_Order = High_Order_First then return UNC_To_View (S); else declare M : Varray; begin Mirror (UNC_To_Varray (S), Into => M); return UNC_To_View (M); end; end if; end To_View; -------------------- -- Int components -- -------------------- package SI_Conversions is new Generic_Conversions (signed_int, Vint_Range, Varray_signed_int, VSI, VSI_View); function To_Vector (S : VSI_View) return VSI is use SI_Conversions; begin if Default_Bit_Order = High_Order_First then return UNC_To_Vector (S); else declare M : Varray; begin Mirror (UNC_To_Varray (S), Into => M); return UNC_To_Vector (M); end; end if; end To_Vector; function To_View (S : VSI) return VSI_View is use SI_Conversions; begin if Default_Bit_Order = High_Order_First then return UNC_To_View (S); else declare M : Varray; begin Mirror (UNC_To_Varray (S), Into => M); return UNC_To_View (M); end; end if; end To_View; -- package UI_Conversions is new Generic_Conversions (unsigned_int, Vint_Range, Varray_unsigned_int, VUI, VUI_View); function To_Vector (S : VUI_View) return VUI is use UI_Conversions; begin if Default_Bit_Order = High_Order_First then return UNC_To_Vector (S); else declare M : Varray; begin Mirror (UNC_To_Varray (S), Into => M); return UNC_To_Vector (M); end; end if; end To_Vector; function To_View (S : VUI) return VUI_View is use UI_Conversions; begin if Default_Bit_Order = High_Order_First then return UNC_To_View (S); else declare M : Varray; begin Mirror (UNC_To_Varray (S), Into => M); return UNC_To_View (M); end; end if; end To_View; -- package BI_Conversions is new Generic_Conversions (bool_int, Vint_Range, Varray_bool_int, VBI, VBI_View); function To_Vector (S : VBI_View) return VBI is use BI_Conversions; begin if Default_Bit_Order = High_Order_First then return UNC_To_Vector (S); else declare M : Varray; begin Mirror (UNC_To_Varray (S), Into => M); return UNC_To_Vector (M); end; end if; end To_Vector; function To_View (S : VBI) return VBI_View is use BI_Conversions; begin if Default_Bit_Order = High_Order_First then return UNC_To_View (S); else declare M : Varray; begin Mirror (UNC_To_Varray (S), Into => M); return UNC_To_View (M); end; end if; end To_View; ---------------------- -- Float components -- ---------------------- package F_Conversions is new Generic_Conversions (C_float, Vfloat_Range, Varray_float, VF, VF_View); function To_Vector (S : VF_View) return VF is use F_Conversions; begin if Default_Bit_Order = High_Order_First then return UNC_To_Vector (S); else declare M : Varray; begin Mirror (UNC_To_Varray (S), Into => M); return UNC_To_Vector (M); end; end if; end To_Vector; function To_View (S : VF) return VF_View is use F_Conversions; begin if Default_Bit_Order = High_Order_First then return UNC_To_View (S); else declare M : Varray; begin Mirror (UNC_To_Varray (S), Into => M); return UNC_To_View (M); end; end if; end To_View; ---------------------- -- Pixel components -- ---------------------- package P_Conversions is new Generic_Conversions (pixel, Vpixel_Range, Varray_pixel, VP, VP_View); function To_Vector (S : VP_View) return VP is use P_Conversions; begin if Default_Bit_Order = High_Order_First then return UNC_To_Vector (S); else declare M : Varray; begin Mirror (UNC_To_Varray (S), Into => M); return UNC_To_Vector (M); end; end if; end To_Vector; function To_View (S : VP) return VP_View is use P_Conversions; begin if Default_Bit_Order = High_Order_First then return UNC_To_View (S); else declare M : Varray; begin Mirror (UNC_To_Varray (S), Into => M); return UNC_To_View (M); end; end if; end To_View; end GNAT.Altivec.Conversions;
-- -- Jan & Uwe R. Zimmer, Australia, July 2011 -- with GLOBE_3D; package Spaceship_P is procedure Create (Object : in out GLOBE_3D.p_Object_3D; Object_Scale : GLOBE_3D.Real; Centre : GLOBE_3D.Point_3D); end Spaceship_P;
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- G N A T . C T R L _ C -- -- -- -- B o d y -- -- -- -- Copyright (C) 2002-2015, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ package body GNAT.Ctrl_C is type C_Handler_Type is access procedure; pragma Convention (C, C_Handler_Type); Ada_Handler : Handler_Type; procedure C_Handler; pragma Convention (C, C_Handler); --------------- -- C_Handler -- --------------- procedure C_Handler is begin Ada_Handler.all; end C_Handler; --------------------- -- Install_Handler -- --------------------- procedure Install_Handler (Handler : Handler_Type) is procedure Internal (Handler : C_Handler_Type); pragma Import (C, Internal, "__gnat_install_int_handler"); begin Ada_Handler := Handler; Internal (C_Handler'Access); end Install_Handler; end GNAT.Ctrl_C;
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- S Y S T E M . A D D R E S S _ O P E R A T I O N S -- -- -- -- B o d y -- -- -- -- Copyright (C) 2004-2019, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ pragma Compiler_Unit_Warning; with Ada.Unchecked_Conversion; package body System.Address_Operations is type IA is mod 2 ** Address'Size; -- The type used to provide the actual desired operations function I is new Ada.Unchecked_Conversion (Address, IA); function A is new Ada.Unchecked_Conversion (IA, Address); -- The operations are implemented by unchecked conversion to type IA, -- followed by doing the intrinsic operation on the IA values, followed -- by converting the result back to type Address. ---------- -- AddA -- ---------- function AddA (Left, Right : Address) return Address is begin return A (I (Left) + I (Right)); end AddA; ---------- -- AndA -- ---------- function AndA (Left, Right : Address) return Address is begin return A (I (Left) and I (Right)); end AndA; ---------- -- DivA -- ---------- function DivA (Left, Right : Address) return Address is begin return A (I (Left) / I (Right)); end DivA; ---------- -- ModA -- ---------- function ModA (Left, Right : Address) return Address is begin return A (I (Left) mod I (Right)); end ModA; --------- -- MulA -- --------- function MulA (Left, Right : Address) return Address is begin return A (I (Left) * I (Right)); end MulA; --------- -- OrA -- --------- function OrA (Left, Right : Address) return Address is begin return A (I (Left) or I (Right)); end OrA; ---------- -- SubA -- ---------- function SubA (Left, Right : Address) return Address is begin return A (I (Left) - I (Right)); end SubA; end System.Address_Operations;
------------------------------------------------------------------------------ -- 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.Numerics.Generic_Complex_Types; generic with package Complex_Types is new Ada.Numerics.Generic_Complex_Types (<>); package Ada.Wide_Wide_Text_IO.Complex_IO is use Complex_Types; Default_Fore : Field := 2; Default_Aft : Field := Real'Digits - 1; Default_Exp : Field := 3; procedure Get (File : in File_Type; Item : out Complex; Width : in Field := 0); procedure Get (Item : out Complex; Width : in Field := 0); procedure Put (File : in File_Type; Item : in Complex; Fore : in Field := Default_Fore; Aft : in Field := Default_Aft; Exp : in Field := Default_Exp); procedure Put (Item : in Complex; Fore : in Field := Default_Fore; Aft : in Field := Default_Aft; Exp : in Field := Default_Exp); procedure Get (From : in Wide_Wide_String; Item : out Complex; Last : out Positive); procedure Put (To : out Wide_Wide_String; Item : in Complex; Aft : in Field := Default_Aft; Exp : in Field := Default_Exp); end Ada.Wide_Wide_Text_IO.Complex_IO;
-- FCNDECL.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. --* -- -- PACKAGE THAT MAY BE MODIFIED TO DECLARE FUNCTIONS THAT RETURN -- VALUES USABLE FOR INITIALIZATION OF CONSTANTS IN PACKAGE SPPRT13. WITH SYSTEM; PACKAGE FCNDECL IS -- INSERT FUNCTION DECLARATIONS AS NEEDED. type Mem is array (1 .. 100) of Long_Long_Integer; Var0: Mem; Var1: Mem; Var2: Mem; Var_Addr : constant System.Address := Var0'address; Var_Addr1: constant System.Address := Var1'address; Var_Addr2: constant System.Address := Var2'address; Ent0: Mem; Ent1: Mem; Ent2: Mem; Entry_Addr : constant System.Address := Ent0'address; Entry_Addr1: constant System.Address := Ent0'address; Entry_Addr2: constant System.Address := Ent0'address; END FCNDECL;
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- S Y S T E M . A U X _ D E C -- -- -- -- B o d y -- -- -- -- Copyright (C) 2005,2009 Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/Or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ package body System.Aux_DEC is end System.Aux_DEC;
-- Copyright (c) 1990 Regents of the University of California. -- All rights reserved. -- -- This software was developed by John Self of the Arcadia project -- at the University of California, Irvine. -- -- Redistribution and use in source and binary forms are permitted -- provided that the above copyright notice and this paragraph are -- duplicated in all such forms and that any documentation, -- advertising materials, and other materials related to such -- distribution and use acknowledge that the software was developed -- by the University of California, Irvine. The name of the -- University may not be used to endorse or promote products derived -- from this software without specific prior written permission. -- THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR -- IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED -- WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. -- TITLE command line interface -- AUTHOR: John Self (UCI) -- DESCRIPTION command line interface body for use with the Alsys system. -- NOTES this file is system dependent -- $Header: /co/ua/self/arcadia/aflex/ada/src/RCS/command_lineB.a,v 1.3 90/01/12 15:19:44 self Exp Locker: self $ with TSTRING; use TSTRING; with SYSTEM_ENVIRONMENT; package body COMMAND_LINE_INTERFACE is procedure INITIALIZE_COMMAND_LINE is begin ARGC := SYSTEM_ENVIRONMENT.Arg_Count; for I in 0 .. SYSTEM_ENVIRONMENT.Arg_Count - 1 loop ARGV(I) := VSTR(SYSTEM_ENVIRONMENT.Arg_Value(i)); end loop; end INITIALIZE_COMMAND_LINE; end COMMAND_LINE_INTERFACE;
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.SAI is pragma Preelaborate; --------------- -- Registers -- --------------- subtype GCR_SYNCIN_Field is HAL.UInt2; subtype GCR_SYNCOUT_Field is HAL.UInt2; -- Global configuration register type GCR_Register is record -- Synchronization inputs SYNCIN : GCR_SYNCIN_Field := 16#0#; -- unspecified Reserved_2_3 : HAL.UInt2 := 16#0#; -- Synchronization outputs These bits are set and cleared by software. SYNCOUT : GCR_SYNCOUT_Field := 16#0#; -- unspecified Reserved_6_31 : HAL.UInt26 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for GCR_Register use record SYNCIN at 0 range 0 .. 1; Reserved_2_3 at 0 range 2 .. 3; SYNCOUT at 0 range 4 .. 5; Reserved_6_31 at 0 range 6 .. 31; end record; subtype ACR1_MODE_Field is HAL.UInt2; subtype ACR1_PRTCFG_Field is HAL.UInt2; subtype ACR1_DS_Field is HAL.UInt3; subtype ACR1_SYNCEN_Field is HAL.UInt2; subtype ACR1_MCKDIV_Field is HAL.UInt6; -- Configuration register 1 type ACR1_Register is record -- SAIx audio block mode immediately MODE : ACR1_MODE_Field := 16#0#; -- Protocol configuration. These bits are set and cleared by software. -- These bits have to be configured when the audio block is disabled. PRTCFG : ACR1_PRTCFG_Field := 16#0#; -- unspecified Reserved_4_4 : HAL.Bit := 16#0#; -- Data size. These bits are set and cleared by software. These bits are -- ignored when the SPDIF protocols are selected (bit PRTCFG[1:0]), -- because the frame and the data size are fixed in such case. When the -- companding mode is selected through COMP[1:0] bits, DS[1:0] are -- ignored since the data size is fixed to 8 bits by the algorithm. -- These bits must be configured when the audio block is disabled. DS : ACR1_DS_Field := 16#2#; -- Least significant bit first. This bit is set and cleared by software. -- It must be configured when the audio block is disabled. This bit has -- no meaning in AC97 audio protocol since AC97 data are always -- transferred with the MSB first. This bit has no meaning in SPDIF -- audio protocol since in SPDIF data are always transferred with LSB -- first. LSBFIRST : Boolean := False; -- Clock strobing edge. This bit is set and cleared by software. It must -- be configured when the audio block is disabled. This bit has no -- meaning in SPDIF audio protocol. CKSTR : Boolean := False; -- Synchronization enable. These bits are set and cleared by software. -- They must be configured when the audio sub-block is disabled. Note: -- The audio sub-block should be configured as asynchronous when SPDIF -- mode is enabled. SYNCEN : ACR1_SYNCEN_Field := 16#0#; -- Mono mode. This bit is set and cleared by software. It is meaningful -- only when the number of slots is equal to 2. When the mono mode is -- selected, slot 0 data are duplicated on slot 1 when the audio block -- operates as a transmitter. In reception mode, the slot1 is discarded -- and only the data received from slot 0 are stored. Refer to Section: -- Mono/stereo mode for more details. MONO : Boolean := False; -- Output drive. This bit is set and cleared by software. Note: This bit -- has to be set before enabling the audio block and after the audio -- block configuration. OUTDRIV : Boolean := False; -- unspecified Reserved_14_15 : HAL.UInt2 := 16#0#; -- Audio block enable where x is A or B. This bit is set by software. To -- switch off the audio block, the application software must program -- this bit to 0 and poll the bit till it reads back 0, meaning that the -- block is completely disabled. Before setting this bit to 1, check -- that it is set to 0, otherwise the enable command will not be taken -- into account. This bit allows to control the state of SAIx audio -- block. If it is disabled when an audio frame transfer is ongoing, the -- ongoing transfer completes and the cell is fully disabled at the end -- of this audio frame transfer. Note: When SAIx block is configured in -- master mode, the clock must be present on the input of SAIx before -- setting SAIXEN bit. SAIEN : Boolean := False; -- DMA enable. This bit is set and cleared by software. Note: Since the -- audio block defaults to operate as a transmitter after reset, the -- MODE[1:0] bits must be configured before setting DMAEN to avoid a DMA -- request in receiver mode. DMAEN : Boolean := False; -- unspecified Reserved_18_18 : HAL.Bit := 16#0#; -- No divider NOMCK : Boolean := False; -- Master clock divider. These bits are set and cleared by software. -- These bits are meaningless when the audio block operates in slave -- mode. They have to be configured when the audio block is disabled. -- Others: the master clock frequency is calculated accordingly to the -- following formula: MCKDIV : ACR1_MCKDIV_Field := 16#0#; -- Oversampling ratio for master clock OSR : Boolean := False; -- unspecified Reserved_27_31 : HAL.UInt5 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for ACR1_Register use record MODE at 0 range 0 .. 1; PRTCFG at 0 range 2 .. 3; Reserved_4_4 at 0 range 4 .. 4; DS at 0 range 5 .. 7; LSBFIRST at 0 range 8 .. 8; CKSTR at 0 range 9 .. 9; SYNCEN at 0 range 10 .. 11; MONO at 0 range 12 .. 12; OUTDRIV at 0 range 13 .. 13; Reserved_14_15 at 0 range 14 .. 15; SAIEN at 0 range 16 .. 16; DMAEN at 0 range 17 .. 17; Reserved_18_18 at 0 range 18 .. 18; NOMCK at 0 range 19 .. 19; MCKDIV at 0 range 20 .. 25; OSR at 0 range 26 .. 26; Reserved_27_31 at 0 range 27 .. 31; end record; subtype ACR2_FTH_Field is HAL.UInt3; subtype ACR2_MUTECNT_Field is HAL.UInt6; subtype ACR2_COMP_Field is HAL.UInt2; -- Configuration register 2 type ACR2_Register is record -- FIFO threshold. This bit is set and cleared by software. FTH : ACR2_FTH_Field := 16#0#; -- Write-only. FIFO flush. This bit is set by software. It is always -- read as 0. This bit should be configured when the SAI is disabled. FFLUSH : Boolean := False; -- Tristate management on data line. This bit is set and cleared by -- software. It is meaningful only if the audio block is configured as a -- transmitter. This bit is not used when the audio block is configured -- in SPDIF mode. It should be configured when SAI is disabled. Refer to -- Section: Output data line management on an inactive slot for more -- details. TRIS : Boolean := False; -- Mute. This bit is set and cleared by software. It is meaningful only -- when the audio block operates as a transmitter. The MUTE value is -- linked to value of MUTEVAL if the number of slots is lower or equal -- to 2, or equal to 0 if it is greater than 2. Refer to Section: Mute -- mode for more details. Note: This bit is meaningless and should not -- be used for SPDIF audio blocks. MUTE : Boolean := False; -- Mute value. This bit is set and cleared by software.It must be -- written before enabling the audio block: SAIXEN. This bit is -- meaningful only when the audio block operates as a transmitter, the -- number of slots is lower or equal to 2 and the MUTE bit is set. If -- more slots are declared, the bit value sent during the transmission -- in mute mode is equal to 0, whatever the value of MUTEVAL. if the -- number of slot is lower or equal to 2 and MUTEVAL = 1, the MUTE value -- transmitted for each slot is the one sent during the previous frame. -- Refer to Section: Mute mode for more details. Note: This bit is -- meaningless and should not be used for SPDIF audio blocks. MUTEVAL : Boolean := False; -- Mute counter. These bits are set and cleared by software. They are -- used only in reception mode. The value set in these bits is compared -- to the number of consecutive mute frames detected in reception. When -- the number of mute frames is equal to this value, the flag MUTEDET -- will be set and an interrupt will be generated if bit MUTEDETIE is -- set. Refer to Section: Mute mode for more details. MUTECNT : ACR2_MUTECNT_Field := 16#0#; -- Complement bit. This bit is set and cleared by software. It defines -- the type of complement to be used for companding mode Note: This bit -- has effect only when the companding mode is -Law algorithm or A-Law -- algorithm. CPL : Boolean := False; -- Companding mode. These bits are set and cleared by software. The -Law -- and the A-Law log are a part of the CCITT G.711 recommendation, the -- type of complement that will be used depends on CPL bit. The data -- expansion or data compression are determined by the state of bit -- MODE[0]. The data compression is applied if the audio block is -- configured as a transmitter. The data expansion is automatically -- applied when the audio block is configured as a receiver. Refer to -- Section: Companding mode for more details. Note: Companding mode is -- applicable only when TDM is selected. COMP : ACR2_COMP_Field := 16#0#; -- unspecified Reserved_16_31 : HAL.UInt16 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for ACR2_Register use record FTH at 0 range 0 .. 2; FFLUSH at 0 range 3 .. 3; TRIS at 0 range 4 .. 4; MUTE at 0 range 5 .. 5; MUTEVAL at 0 range 6 .. 6; MUTECNT at 0 range 7 .. 12; CPL at 0 range 13 .. 13; COMP at 0 range 14 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype AFRCR_FRL_Field is HAL.UInt8; subtype AFRCR_FSALL_Field is HAL.UInt7; -- This register has no meaning in AC97 and SPDIF audio protocol type AFRCR_Register is record -- Frame length. These bits are set and cleared by software. They define -- the audio frame length expressed in number of SCK clock cycles: the -- number of bits in the frame is equal to FRL[7:0] + 1. The minimum -- number of bits to transfer in an audio frame must be equal to 8, -- otherwise the audio block will behaves in an unexpected way. This is -- the case when the data size is 8 bits and only one slot 0 is defined -- in NBSLOT[4:0] of SAI_xSLOTR register (NBSLOT[3:0] = 0000). In master -- mode, if the master clock (available on MCLK_x pin) is used, the -- frame length should be aligned with a number equal to a power of 2, -- ranging from 8 to 256. When the master clock is not used (NODIV = 1), -- it is recommended to program the frame length to an value ranging -- from 8 to 256. These bits are meaningless and are not used in AC97 or -- SPDIF audio block configuration. FRL : AFRCR_FRL_Field := 16#7#; -- Frame synchronization active level length. These bits are set and -- cleared by software. They specify the length in number of bit clock -- (SCK) + 1 (FSALL[6:0] + 1) of the active level of the FS signal in -- the audio frame These bits are meaningless and are not used in AC97 -- or SPDIF audio block configuration. They must be configured when the -- audio block is disabled. FSALL : AFRCR_FSALL_Field := 16#0#; -- unspecified Reserved_15_15 : HAL.Bit := 16#0#; -- Read-only. Frame synchronization definition. This bit is set and -- cleared by software. When the bit is set, the number of slots defined -- in the SAI_xSLOTR register has to be even. It means that half of this -- number of slots will be dedicated to the left channel and the other -- slots for the right channel (e.g: this bit has to be set for I2S or -- MSB/LSB-justified protocols...). This bit is meaningless and is not -- used in AC97 or SPDIF audio block configuration. It must be -- configured when the audio block is disabled. FSDEF : Boolean := False; -- Frame synchronization polarity. This bit is set and cleared by -- software. It is used to configure the level of the start of frame on -- the FS signal. It is meaningless and is not used in AC97 or SPDIF -- audio block configuration. This bit must be configured when the audio -- block is disabled. FSPOL : Boolean := False; -- Frame synchronization offset. This bit is set and cleared by -- software. It is meaningless and is not used in AC97 or SPDIF audio -- block configuration. This bit must be configured when the audio block -- is disabled. FSOFF : Boolean := False; -- unspecified Reserved_19_31 : HAL.UInt13 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for AFRCR_Register use record FRL at 0 range 0 .. 7; FSALL at 0 range 8 .. 14; Reserved_15_15 at 0 range 15 .. 15; FSDEF at 0 range 16 .. 16; FSPOL at 0 range 17 .. 17; FSOFF at 0 range 18 .. 18; Reserved_19_31 at 0 range 19 .. 31; end record; subtype ASLOTR_FBOFF_Field is HAL.UInt5; subtype ASLOTR_SLOTSZ_Field is HAL.UInt2; subtype ASLOTR_NBSLOT_Field is HAL.UInt4; subtype ASLOTR_SLOTEN_Field is HAL.UInt16; -- This register has no meaning in AC97 and SPDIF audio protocol type ASLOTR_Register is record -- First bit offset These bits are set and cleared by software. The -- value set in this bitfield defines the position of the first data -- transfer bit in the slot. It represents an offset value. In -- transmission mode, the bits outside the data field are forced to 0. -- In reception mode, the extra received bits are discarded. These bits -- must be set when the audio block is disabled. They are ignored in -- AC97 or SPDIF mode. FBOFF : ASLOTR_FBOFF_Field := 16#0#; -- unspecified Reserved_5_5 : HAL.Bit := 16#0#; -- Slot size This bits is set and cleared by software. The slot size -- must be higher or equal to the data size. If this condition is not -- respected, the behavior of the SAI will be undetermined. Refer to -- Section: Output data line management on an inactive slot for -- information on how to drive SD line. These bits must be set when the -- audio block is disabled. They are ignored in AC97 or SPDIF mode. SLOTSZ : ASLOTR_SLOTSZ_Field := 16#0#; -- Number of slots in an audio frame. These bits are set and cleared by -- software. The value set in this bitfield represents the number of -- slots + 1 in the audio frame (including the number of inactive -- slots). The maximum number of slots is 16. The number of slots should -- be even if FSDEF bit in the SAI_xFRCR register is set. The number of -- slots must be configured when the audio block is disabled. They are -- ignored in AC97 or SPDIF mode. NBSLOT : ASLOTR_NBSLOT_Field := 16#0#; -- unspecified Reserved_12_15 : HAL.UInt4 := 16#0#; -- Slot enable. These bits are set and cleared by software. Each SLOTEN -- bit corresponds to a slot position from 0 to 15 (maximum 16 slots). -- The slot must be enabled when the audio block is disabled. They are -- ignored in AC97 or SPDIF mode. SLOTEN : ASLOTR_SLOTEN_Field := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for ASLOTR_Register use record FBOFF at 0 range 0 .. 4; Reserved_5_5 at 0 range 5 .. 5; SLOTSZ at 0 range 6 .. 7; NBSLOT at 0 range 8 .. 11; Reserved_12_15 at 0 range 12 .. 15; SLOTEN at 0 range 16 .. 31; end record; -- Interrupt mask register 2 type AIM_Register is record -- Overrun/underrun interrupt enable. This bit is set and cleared by -- software. When this bit is set, an interrupt is generated if the -- OVRUDR bit in the SAI_xSR register is set. OVRUDRIE : Boolean := False; -- Mute detection interrupt enable. This bit is set and cleared by -- software. When this bit is set, an interrupt is generated if the -- MUTEDET bit in the SAI_xSR register is set. This bit has a meaning -- only if the audio block is configured in receiver mode. MUTEDETIE : Boolean := False; -- Wrong clock configuration interrupt enable. This bit is set and -- cleared by software. This bit is taken into account only if the audio -- block is configured as a master (MODE[1] = 0) and NODIV = 0. It -- generates an interrupt if the WCKCFG flag in the SAI_xSR register is -- set. Note: This bit is used only in TDM mode and is meaningless in -- other modes. WCKCFGIE : Boolean := False; -- FIFO request interrupt enable. This bit is set and cleared by -- software. When this bit is set, an interrupt is generated if the FREQ -- bit in the SAI_xSR register is set. Since the audio block defaults to -- operate as a transmitter after reset, the MODE bit must be configured -- before setting FREQIE to avoid a parasitic interruption in receiver -- mode, FREQIE : Boolean := False; -- Codec not ready interrupt enable (AC97). This bit is set and cleared -- by software. When the interrupt is enabled, the audio block detects -- in the slot 0 (tag0) of the AC97 frame if the Codec connected to this -- line is ready or not. If it is not ready, the CNRDY flag in the -- SAI_xSR register is set and an interruption i generated. This bit has -- a meaning only if the AC97 mode is selected through PRTCFG[1:0] bits -- and the audio block is operates as a receiver. CNRDYIE : Boolean := False; -- Anticipated frame synchronization detection interrupt enable. This -- bit is set and cleared by software. When this bit is set, an -- interrupt will be generated if the AFSDET bit in the SAI_xSR register -- is set. This bit is meaningless in AC97, SPDIF mode or when the audio -- block operates as a master. AFSDETIE : Boolean := False; -- Late frame synchronization detection interrupt enable. This bit is -- set and cleared by software. When this bit is set, an interrupt will -- be generated if the LFSDET bit is set in the SAI_xSR register. This -- bit is meaningless in AC97, SPDIF mode or when the audio block -- operates as a master. LFSDETIE : Boolean := False; -- unspecified Reserved_7_31 : HAL.UInt25 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for AIM_Register use record OVRUDRIE at 0 range 0 .. 0; MUTEDETIE at 0 range 1 .. 1; WCKCFGIE at 0 range 2 .. 2; FREQIE at 0 range 3 .. 3; CNRDYIE at 0 range 4 .. 4; AFSDETIE at 0 range 5 .. 5; LFSDETIE at 0 range 6 .. 6; Reserved_7_31 at 0 range 7 .. 31; end record; subtype ASR_FLVL_Field is HAL.UInt3; -- Status register type ASR_Register is record -- Read-only. Overrun / underrun. This bit is read only. The overrun and -- underrun conditions can occur only when the audio block is configured -- as a receiver and a transmitter, respectively. It can generate an -- interrupt if OVRUDRIE bit is set in SAI_xIM register. This flag is -- cleared when the software sets COVRUDR bit in SAI_xCLRFR register. OVRUDR : Boolean; -- Read-only. Mute detection. This bit is read only. This flag is set if -- consecutive 0 values are received in each slot of a given audio frame -- and for a consecutive number of audio frames (set in the MUTECNT bit -- in the SAI_xCR2 register). It can generate an interrupt if MUTEDETIE -- bit is set in SAI_xIM register. This flag is cleared when the -- software sets bit CMUTEDET in the SAI_xCLRFR register. MUTEDET : Boolean; -- Read-only. Wrong clock configuration flag. This bit is read only. -- This bit is used only when the audio block operates in master mode -- (MODE[1] = 0) and NODIV = 0. It can generate an interrupt if WCKCFGIE -- bit is set in SAI_xIM register. This flag is cleared when the -- software sets CWCKCFG bit in SAI_xCLRFR register. WCKCFG : Boolean; -- Read-only. FIFO request. This bit is read only. The request depends -- on the audio block configuration: If the block is configured in -- transmission mode, the FIFO request is related to a write request -- operation in the SAI_xDR. If the block configured in reception, the -- FIFO request related to a read request operation from the SAI_xDR. -- This flag can generate an interrupt if FREQIE bit is set in SAI_xIM -- register. FREQ : Boolean; -- Read-only. Codec not ready. This bit is read only. This bit is used -- only when the AC97 audio protocol is selected in the SAI_xCR1 -- register and configured in receiver mode. It can generate an -- interrupt if CNRDYIE bit is set in SAI_xIM register. This flag is -- cleared when the software sets CCNRDY bit in SAI_xCLRFR register. CNRDY : Boolean; -- Read-only. Anticipated frame synchronization detection. This bit is -- read only. This flag can be set only if the audio block is configured -- in slave mode. It is not used in AC97or SPDIF mode. It can generate -- an interrupt if AFSDETIE bit is set in SAI_xIM register. This flag is -- cleared when the software sets CAFSDET bit in SAI_xCLRFR register. AFSDET : Boolean; -- Read-only. Late frame synchronization detection. This bit is read -- only. This flag can be set only if the audio block is configured in -- slave mode. It is not used in AC97 or SPDIF mode. It can generate an -- interrupt if LFSDETIE bit is set in the SAI_xIM register. This flag -- is cleared when the software sets bit CLFSDET in SAI_xCLRFR register LFSDET : Boolean; -- unspecified Reserved_7_15 : HAL.UInt9; -- Read-only. FIFO level threshold. This bit is read only. The FIFO -- level threshold flag is managed only by hardware and its setting -- depends on SAI block configuration (transmitter or receiver mode). If -- the SAI block is configured as transmitter: If SAI block is -- configured as receiver: FLVL : ASR_FLVL_Field; -- unspecified Reserved_19_31 : HAL.UInt13; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for ASR_Register use record OVRUDR at 0 range 0 .. 0; MUTEDET at 0 range 1 .. 1; WCKCFG at 0 range 2 .. 2; FREQ at 0 range 3 .. 3; CNRDY at 0 range 4 .. 4; AFSDET at 0 range 5 .. 5; LFSDET at 0 range 6 .. 6; Reserved_7_15 at 0 range 7 .. 15; FLVL at 0 range 16 .. 18; Reserved_19_31 at 0 range 19 .. 31; end record; -- Clear flag register type ACLRFR_Register is record -- Write-only. Clear overrun / underrun. This bit is write only. -- Programming this bit to 1 clears the OVRUDR flag in the SAI_xSR -- register. Reading this bit always returns the value 0. COVRUDR : Boolean := False; -- Write-only. Mute detection flag. This bit is write only. Programming -- this bit to 1 clears the MUTEDET flag in the SAI_xSR register. -- Reading this bit always returns the value 0. CMUTEDET : Boolean := False; -- Write-only. Clear wrong clock configuration flag. This bit is write -- only. Programming this bit to 1 clears the WCKCFG flag in the SAI_xSR -- register. This bit is used only when the audio block is set as master -- (MODE[1] = 0) and NODIV = 0 in the SAI_xCR1 register. Reading this -- bit always returns the value 0. CWCKCFG : Boolean := False; -- unspecified Reserved_3_3 : HAL.Bit := 16#0#; -- Write-only. Clear Codec not ready flag. This bit is write only. -- Programming this bit to 1 clears the CNRDY flag in the SAI_xSR -- register. This bit is used only when the AC97 audio protocol is -- selected in the SAI_xCR1 register. Reading this bit always returns -- the value 0. CCNRDY : Boolean := False; -- Write-only. Clear anticipated frame synchronization detection flag. -- This bit is write only. Programming this bit to 1 clears the AFSDET -- flag in the SAI_xSR register. It is not used in AC97or SPDIF mode. -- Reading this bit always returns the value 0. CAFSDET : Boolean := False; -- Write-only. Clear late frame synchronization detection flag. This bit -- is write only. Programming this bit to 1 clears the LFSDET flag in -- the SAI_xSR register. This bit is not used in AC97or SPDIF mode -- Reading this bit always returns the value 0. CLFSDET : Boolean := False; -- unspecified Reserved_7_31 : HAL.UInt25 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for ACLRFR_Register use record COVRUDR at 0 range 0 .. 0; CMUTEDET at 0 range 1 .. 1; CWCKCFG at 0 range 2 .. 2; Reserved_3_3 at 0 range 3 .. 3; CCNRDY at 0 range 4 .. 4; CAFSDET at 0 range 5 .. 5; CLFSDET at 0 range 6 .. 6; Reserved_7_31 at 0 range 7 .. 31; end record; subtype BCR1_MODE_Field is HAL.UInt2; subtype BCR1_PRTCFG_Field is HAL.UInt2; subtype BCR1_DS_Field is HAL.UInt3; subtype BCR1_SYNCEN_Field is HAL.UInt2; subtype BCR1_MCKDIV_Field is HAL.UInt6; -- Configuration register 1 type BCR1_Register is record -- SAIx audio block mode immediately MODE : BCR1_MODE_Field := 16#0#; -- Protocol configuration. These bits are set and cleared by software. -- These bits have to be configured when the audio block is disabled. PRTCFG : BCR1_PRTCFG_Field := 16#0#; -- unspecified Reserved_4_4 : HAL.Bit := 16#0#; -- Data size. These bits are set and cleared by software. These bits are -- ignored when the SPDIF protocols are selected (bit PRTCFG[1:0]), -- because the frame and the data size are fixed in such case. When the -- companding mode is selected through COMP[1:0] bits, DS[1:0] are -- ignored since the data size is fixed to 8 bits by the algorithm. -- These bits must be configured when the audio block is disabled. DS : BCR1_DS_Field := 16#2#; -- Least significant bit first. This bit is set and cleared by software. -- It must be configured when the audio block is disabled. This bit has -- no meaning in AC97 audio protocol since AC97 data are always -- transferred with the MSB first. This bit has no meaning in SPDIF -- audio protocol since in SPDIF data are always transferred with LSB -- first. LSBFIRST : Boolean := False; -- Clock strobing edge. This bit is set and cleared by software. It must -- be configured when the audio block is disabled. This bit has no -- meaning in SPDIF audio protocol. CKSTR : Boolean := False; -- Synchronization enable. These bits are set and cleared by software. -- They must be configured when the audio sub-block is disabled. Note: -- The audio sub-block should be configured as asynchronous when SPDIF -- mode is enabled. SYNCEN : BCR1_SYNCEN_Field := 16#0#; -- Mono mode. This bit is set and cleared by software. It is meaningful -- only when the number of slots is equal to 2. When the mono mode is -- selected, slot 0 data are duplicated on slot 1 when the audio block -- operates as a transmitter. In reception mode, the slot1 is discarded -- and only the data received from slot 0 are stored. Refer to Section: -- Mono/stereo mode for more details. MONO : Boolean := False; -- Output drive. This bit is set and cleared by software. Note: This bit -- has to be set before enabling the audio block and after the audio -- block configuration. OUTDRIV : Boolean := False; -- unspecified Reserved_14_15 : HAL.UInt2 := 16#0#; -- Audio block enable where x is A or B. This bit is set by software. To -- switch off the audio block, the application software must program -- this bit to 0 and poll the bit till it reads back 0, meaning that the -- block is completely disabled. Before setting this bit to 1, check -- that it is set to 0, otherwise the enable command will not be taken -- into account. This bit allows to control the state of SAIx audio -- block. If it is disabled when an audio frame transfer is ongoing, the -- ongoing transfer completes and the cell is fully disabled at the end -- of this audio frame transfer. Note: When SAIx block is configured in -- master mode, the clock must be present on the input of SAIx before -- setting SAIXEN bit. SAIEN : Boolean := False; -- DMA enable. This bit is set and cleared by software. Note: Since the -- audio block defaults to operate as a transmitter after reset, the -- MODE[1:0] bits must be configured before setting DMAEN to avoid a DMA -- request in receiver mode. DMAEN : Boolean := False; -- unspecified Reserved_18_18 : HAL.Bit := 16#0#; -- No divider NOMCK : Boolean := False; -- Master clock divider. These bits are set and cleared by software. -- These bits are meaningless when the audio block operates in slave -- mode. They have to be configured when the audio block is disabled. -- Others: the master clock frequency is calculated accordingly to the -- following formula: MCKDIV : BCR1_MCKDIV_Field := 16#0#; -- Oversampling ratio for master clock OSR : Boolean := False; -- unspecified Reserved_27_31 : HAL.UInt5 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for BCR1_Register use record MODE at 0 range 0 .. 1; PRTCFG at 0 range 2 .. 3; Reserved_4_4 at 0 range 4 .. 4; DS at 0 range 5 .. 7; LSBFIRST at 0 range 8 .. 8; CKSTR at 0 range 9 .. 9; SYNCEN at 0 range 10 .. 11; MONO at 0 range 12 .. 12; OUTDRIV at 0 range 13 .. 13; Reserved_14_15 at 0 range 14 .. 15; SAIEN at 0 range 16 .. 16; DMAEN at 0 range 17 .. 17; Reserved_18_18 at 0 range 18 .. 18; NOMCK at 0 range 19 .. 19; MCKDIV at 0 range 20 .. 25; OSR at 0 range 26 .. 26; Reserved_27_31 at 0 range 27 .. 31; end record; subtype BCR2_FTH_Field is HAL.UInt3; subtype BCR2_MUTECNT_Field is HAL.UInt6; subtype BCR2_COMP_Field is HAL.UInt2; -- Configuration register 2 type BCR2_Register is record -- FIFO threshold. This bit is set and cleared by software. FTH : BCR2_FTH_Field := 16#0#; -- Write-only. FIFO flush. This bit is set by software. It is always -- read as 0. This bit should be configured when the SAI is disabled. FFLUSH : Boolean := False; -- Tristate management on data line. This bit is set and cleared by -- software. It is meaningful only if the audio block is configured as a -- transmitter. This bit is not used when the audio block is configured -- in SPDIF mode. It should be configured when SAI is disabled. Refer to -- Section: Output data line management on an inactive slot for more -- details. TRIS : Boolean := False; -- Mute. This bit is set and cleared by software. It is meaningful only -- when the audio block operates as a transmitter. The MUTE value is -- linked to value of MUTEVAL if the number of slots is lower or equal -- to 2, or equal to 0 if it is greater than 2. Refer to Section: Mute -- mode for more details. Note: This bit is meaningless and should not -- be used for SPDIF audio blocks. MUTE : Boolean := False; -- Mute value. This bit is set and cleared by software.It must be -- written before enabling the audio block: SAIXEN. This bit is -- meaningful only when the audio block operates as a transmitter, the -- number of slots is lower or equal to 2 and the MUTE bit is set. If -- more slots are declared, the bit value sent during the transmission -- in mute mode is equal to 0, whatever the value of MUTEVAL. if the -- number of slot is lower or equal to 2 and MUTEVAL = 1, the MUTE value -- transmitted for each slot is the one sent during the previous frame. -- Refer to Section: Mute mode for more details. Note: This bit is -- meaningless and should not be used for SPDIF audio blocks. MUTEVAL : Boolean := False; -- Mute counter. These bits are set and cleared by software. They are -- used only in reception mode. The value set in these bits is compared -- to the number of consecutive mute frames detected in reception. When -- the number of mute frames is equal to this value, the flag MUTEDET -- will be set and an interrupt will be generated if bit MUTEDETIE is -- set. Refer to Section: Mute mode for more details. MUTECNT : BCR2_MUTECNT_Field := 16#0#; -- Complement bit. This bit is set and cleared by software. It defines -- the type of complement to be used for companding mode Note: This bit -- has effect only when the companding mode is -Law algorithm or A-Law -- algorithm. CPL : Boolean := False; -- Companding mode. These bits are set and cleared by software. The -Law -- and the A-Law log are a part of the CCITT G.711 recommendation, the -- type of complement that will be used depends on CPL bit. The data -- expansion or data compression are determined by the state of bit -- MODE[0]. The data compression is applied if the audio block is -- configured as a transmitter. The data expansion is automatically -- applied when the audio block is configured as a receiver. Refer to -- Section: Companding mode for more details. Note: Companding mode is -- applicable only when TDM is selected. COMP : BCR2_COMP_Field := 16#0#; -- unspecified Reserved_16_31 : HAL.UInt16 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for BCR2_Register use record FTH at 0 range 0 .. 2; FFLUSH at 0 range 3 .. 3; TRIS at 0 range 4 .. 4; MUTE at 0 range 5 .. 5; MUTEVAL at 0 range 6 .. 6; MUTECNT at 0 range 7 .. 12; CPL at 0 range 13 .. 13; COMP at 0 range 14 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype BFRCR_FRL_Field is HAL.UInt8; subtype BFRCR_FSALL_Field is HAL.UInt7; -- This register has no meaning in AC97 and SPDIF audio protocol type BFRCR_Register is record -- Frame length. These bits are set and cleared by software. They define -- the audio frame length expressed in number of SCK clock cycles: the -- number of bits in the frame is equal to FRL[7:0] + 1. The minimum -- number of bits to transfer in an audio frame must be equal to 8, -- otherwise the audio block will behaves in an unexpected way. This is -- the case when the data size is 8 bits and only one slot 0 is defined -- in NBSLOT[4:0] of SAI_xSLOTR register (NBSLOT[3:0] = 0000). In master -- mode, if the master clock (available on MCLK_x pin) is used, the -- frame length should be aligned with a number equal to a power of 2, -- ranging from 8 to 256. When the master clock is not used (NODIV = 1), -- it is recommended to program the frame length to an value ranging -- from 8 to 256. These bits are meaningless and are not used in AC97 or -- SPDIF audio block configuration. FRL : BFRCR_FRL_Field := 16#7#; -- Frame synchronization active level length. These bits are set and -- cleared by software. They specify the length in number of bit clock -- (SCK) + 1 (FSALL[6:0] + 1) of the active level of the FS signal in -- the audio frame These bits are meaningless and are not used in AC97 -- or SPDIF audio block configuration. They must be configured when the -- audio block is disabled. FSALL : BFRCR_FSALL_Field := 16#0#; -- unspecified Reserved_15_15 : HAL.Bit := 16#0#; -- Read-only. Frame synchronization definition. This bit is set and -- cleared by software. When the bit is set, the number of slots defined -- in the SAI_xSLOTR register has to be even. It means that half of this -- number of slots will be dedicated to the left channel and the other -- slots for the right channel (e.g: this bit has to be set for I2S or -- MSB/LSB-justified protocols...). This bit is meaningless and is not -- used in AC97 or SPDIF audio block configuration. It must be -- configured when the audio block is disabled. FSDEF : Boolean := False; -- Frame synchronization polarity. This bit is set and cleared by -- software. It is used to configure the level of the start of frame on -- the FS signal. It is meaningless and is not used in AC97 or SPDIF -- audio block configuration. This bit must be configured when the audio -- block is disabled. FSPOL : Boolean := False; -- Frame synchronization offset. This bit is set and cleared by -- software. It is meaningless and is not used in AC97 or SPDIF audio -- block configuration. This bit must be configured when the audio block -- is disabled. FSOFF : Boolean := False; -- unspecified Reserved_19_31 : HAL.UInt13 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for BFRCR_Register use record FRL at 0 range 0 .. 7; FSALL at 0 range 8 .. 14; Reserved_15_15 at 0 range 15 .. 15; FSDEF at 0 range 16 .. 16; FSPOL at 0 range 17 .. 17; FSOFF at 0 range 18 .. 18; Reserved_19_31 at 0 range 19 .. 31; end record; subtype BSLOTR_FBOFF_Field is HAL.UInt5; subtype BSLOTR_SLOTSZ_Field is HAL.UInt2; subtype BSLOTR_NBSLOT_Field is HAL.UInt4; subtype BSLOTR_SLOTEN_Field is HAL.UInt16; -- This register has no meaning in AC97 and SPDIF audio protocol type BSLOTR_Register is record -- First bit offset These bits are set and cleared by software. The -- value set in this bitfield defines the position of the first data -- transfer bit in the slot. It represents an offset value. In -- transmission mode, the bits outside the data field are forced to 0. -- In reception mode, the extra received bits are discarded. These bits -- must be set when the audio block is disabled. They are ignored in -- AC97 or SPDIF mode. FBOFF : BSLOTR_FBOFF_Field := 16#0#; -- unspecified Reserved_5_5 : HAL.Bit := 16#0#; -- Slot size This bits is set and cleared by software. The slot size -- must be higher or equal to the data size. If this condition is not -- respected, the behavior of the SAI will be undetermined. Refer to -- Section: Output data line management on an inactive slot for -- information on how to drive SD line. These bits must be set when the -- audio block is disabled. They are ignored in AC97 or SPDIF mode. SLOTSZ : BSLOTR_SLOTSZ_Field := 16#0#; -- Number of slots in an audio frame. These bits are set and cleared by -- software. The value set in this bitfield represents the number of -- slots + 1 in the audio frame (including the number of inactive -- slots). The maximum number of slots is 16. The number of slots should -- be even if FSDEF bit in the SAI_xFRCR register is set. The number of -- slots must be configured when the audio block is disabled. They are -- ignored in AC97 or SPDIF mode. NBSLOT : BSLOTR_NBSLOT_Field := 16#0#; -- unspecified Reserved_12_15 : HAL.UInt4 := 16#0#; -- Slot enable. These bits are set and cleared by software. Each SLOTEN -- bit corresponds to a slot position from 0 to 15 (maximum 16 slots). -- The slot must be enabled when the audio block is disabled. They are -- ignored in AC97 or SPDIF mode. SLOTEN : BSLOTR_SLOTEN_Field := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for BSLOTR_Register use record FBOFF at 0 range 0 .. 4; Reserved_5_5 at 0 range 5 .. 5; SLOTSZ at 0 range 6 .. 7; NBSLOT at 0 range 8 .. 11; Reserved_12_15 at 0 range 12 .. 15; SLOTEN at 0 range 16 .. 31; end record; -- Interrupt mask register 2 type BIM_Register is record -- Overrun/underrun interrupt enable. This bit is set and cleared by -- software. When this bit is set, an interrupt is generated if the -- OVRUDR bit in the SAI_xSR register is set. OVRUDRIE : Boolean := False; -- Mute detection interrupt enable. This bit is set and cleared by -- software. When this bit is set, an interrupt is generated if the -- MUTEDET bit in the SAI_xSR register is set. This bit has a meaning -- only if the audio block is configured in receiver mode. MUTEDETIE : Boolean := False; -- Wrong clock configuration interrupt enable. This bit is set and -- cleared by software. This bit is taken into account only if the audio -- block is configured as a master (MODE[1] = 0) and NODIV = 0. It -- generates an interrupt if the WCKCFG flag in the SAI_xSR register is -- set. Note: This bit is used only in TDM mode and is meaningless in -- other modes. WCKCFGIE : Boolean := False; -- FIFO request interrupt enable. This bit is set and cleared by -- software. When this bit is set, an interrupt is generated if the FREQ -- bit in the SAI_xSR register is set. Since the audio block defaults to -- operate as a transmitter after reset, the MODE bit must be configured -- before setting FREQIE to avoid a parasitic interruption in receiver -- mode, FREQIE : Boolean := False; -- Codec not ready interrupt enable (AC97). This bit is set and cleared -- by software. When the interrupt is enabled, the audio block detects -- in the slot 0 (tag0) of the AC97 frame if the Codec connected to this -- line is ready or not. If it is not ready, the CNRDY flag in the -- SAI_xSR register is set and an interruption i generated. This bit has -- a meaning only if the AC97 mode is selected through PRTCFG[1:0] bits -- and the audio block is operates as a receiver. CNRDYIE : Boolean := False; -- Anticipated frame synchronization detection interrupt enable. This -- bit is set and cleared by software. When this bit is set, an -- interrupt will be generated if the AFSDET bit in the SAI_xSR register -- is set. This bit is meaningless in AC97, SPDIF mode or when the audio -- block operates as a master. AFSDETIE : Boolean := False; -- Late frame synchronization detection interrupt enable. This bit is -- set and cleared by software. When this bit is set, an interrupt will -- be generated if the LFSDET bit is set in the SAI_xSR register. This -- bit is meaningless in AC97, SPDIF mode or when the audio block -- operates as a master. LFSDETIE : Boolean := False; -- unspecified Reserved_7_31 : HAL.UInt25 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for BIM_Register use record OVRUDRIE at 0 range 0 .. 0; MUTEDETIE at 0 range 1 .. 1; WCKCFGIE at 0 range 2 .. 2; FREQIE at 0 range 3 .. 3; CNRDYIE at 0 range 4 .. 4; AFSDETIE at 0 range 5 .. 5; LFSDETIE at 0 range 6 .. 6; Reserved_7_31 at 0 range 7 .. 31; end record; subtype BSR_FLVL_Field is HAL.UInt3; -- Status register type BSR_Register is record -- Read-only. Overrun / underrun. This bit is read only. The overrun and -- underrun conditions can occur only when the audio block is configured -- as a receiver and a transmitter, respectively. It can generate an -- interrupt if OVRUDRIE bit is set in SAI_xIM register. This flag is -- cleared when the software sets COVRUDR bit in SAI_xCLRFR register. OVRUDR : Boolean; -- Read-only. Mute detection. This bit is read only. This flag is set if -- consecutive 0 values are received in each slot of a given audio frame -- and for a consecutive number of audio frames (set in the MUTECNT bit -- in the SAI_xCR2 register). It can generate an interrupt if MUTEDETIE -- bit is set in SAI_xIM register. This flag is cleared when the -- software sets bit CMUTEDET in the SAI_xCLRFR register. MUTEDET : Boolean; -- Read-only. Wrong clock configuration flag. This bit is read only. -- This bit is used only when the audio block operates in master mode -- (MODE[1] = 0) and NODIV = 0. It can generate an interrupt if WCKCFGIE -- bit is set in SAI_xIM register. This flag is cleared when the -- software sets CWCKCFG bit in SAI_xCLRFR register. WCKCFG : Boolean; -- Read-only. FIFO request. This bit is read only. The request depends -- on the audio block configuration: If the block is configured in -- transmission mode, the FIFO request is related to a write request -- operation in the SAI_xDR. If the block configured in reception, the -- FIFO request related to a read request operation from the SAI_xDR. -- This flag can generate an interrupt if FREQIE bit is set in SAI_xIM -- register. FREQ : Boolean; -- Read-only. Codec not ready. This bit is read only. This bit is used -- only when the AC97 audio protocol is selected in the SAI_xCR1 -- register and configured in receiver mode. It can generate an -- interrupt if CNRDYIE bit is set in SAI_xIM register. This flag is -- cleared when the software sets CCNRDY bit in SAI_xCLRFR register. CNRDY : Boolean; -- Read-only. Anticipated frame synchronization detection. This bit is -- read only. This flag can be set only if the audio block is configured -- in slave mode. It is not used in AC97or SPDIF mode. It can generate -- an interrupt if AFSDETIE bit is set in SAI_xIM register. This flag is -- cleared when the software sets CAFSDET bit in SAI_xCLRFR register. AFSDET : Boolean; -- Read-only. Late frame synchronization detection. This bit is read -- only. This flag can be set only if the audio block is configured in -- slave mode. It is not used in AC97 or SPDIF mode. It can generate an -- interrupt if LFSDETIE bit is set in the SAI_xIM register. This flag -- is cleared when the software sets bit CLFSDET in SAI_xCLRFR register LFSDET : Boolean; -- unspecified Reserved_7_15 : HAL.UInt9; -- Read-only. FIFO level threshold. This bit is read only. The FIFO -- level threshold flag is managed only by hardware and its setting -- depends on SAI block configuration (transmitter or receiver mode). If -- the SAI block is configured as transmitter: If SAI block is -- configured as receiver: FLVL : BSR_FLVL_Field; -- unspecified Reserved_19_31 : HAL.UInt13; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for BSR_Register use record OVRUDR at 0 range 0 .. 0; MUTEDET at 0 range 1 .. 1; WCKCFG at 0 range 2 .. 2; FREQ at 0 range 3 .. 3; CNRDY at 0 range 4 .. 4; AFSDET at 0 range 5 .. 5; LFSDET at 0 range 6 .. 6; Reserved_7_15 at 0 range 7 .. 15; FLVL at 0 range 16 .. 18; Reserved_19_31 at 0 range 19 .. 31; end record; -- Clear flag register type BCLRFR_Register is record -- Write-only. Clear overrun / underrun. This bit is write only. -- Programming this bit to 1 clears the OVRUDR flag in the SAI_xSR -- register. Reading this bit always returns the value 0. COVRUDR : Boolean := False; -- Write-only. Mute detection flag. This bit is write only. Programming -- this bit to 1 clears the MUTEDET flag in the SAI_xSR register. -- Reading this bit always returns the value 0. CMUTEDET : Boolean := False; -- Write-only. Clear wrong clock configuration flag. This bit is write -- only. Programming this bit to 1 clears the WCKCFG flag in the SAI_xSR -- register. This bit is used only when the audio block is set as master -- (MODE[1] = 0) and NODIV = 0 in the SAI_xCR1 register. Reading this -- bit always returns the value 0. CWCKCFG : Boolean := False; -- unspecified Reserved_3_3 : HAL.Bit := 16#0#; -- Write-only. Clear Codec not ready flag. This bit is write only. -- Programming this bit to 1 clears the CNRDY flag in the SAI_xSR -- register. This bit is used only when the AC97 audio protocol is -- selected in the SAI_xCR1 register. Reading this bit always returns -- the value 0. CCNRDY : Boolean := False; -- Write-only. Clear anticipated frame synchronization detection flag. -- This bit is write only. Programming this bit to 1 clears the AFSDET -- flag in the SAI_xSR register. It is not used in AC97or SPDIF mode. -- Reading this bit always returns the value 0. CAFSDET : Boolean := False; -- Write-only. Clear late frame synchronization detection flag. This bit -- is write only. Programming this bit to 1 clears the LFSDET flag in -- the SAI_xSR register. This bit is not used in AC97or SPDIF mode -- Reading this bit always returns the value 0. CLFSDET : Boolean := False; -- unspecified Reserved_7_31 : HAL.UInt25 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for BCLRFR_Register use record COVRUDR at 0 range 0 .. 0; CMUTEDET at 0 range 1 .. 1; CWCKCFG at 0 range 2 .. 2; Reserved_3_3 at 0 range 3 .. 3; CCNRDY at 0 range 4 .. 4; CAFSDET at 0 range 5 .. 5; CLFSDET at 0 range 6 .. 6; Reserved_7_31 at 0 range 7 .. 31; end record; subtype PDMCR_MICNBR_Field is HAL.UInt2; -- PDMCR_CKEN array type PDMCR_CKEN_Field_Array is array (1 .. 4) of Boolean with Component_Size => 1, Size => 4; -- Type definition for PDMCR_CKEN type PDMCR_CKEN_Field (As_Array : Boolean := False) is record case As_Array is when False => -- CKEN as a value Val : HAL.UInt4; when True => -- CKEN as an array Arr : PDMCR_CKEN_Field_Array; end case; end record with Unchecked_Union, Size => 4; for PDMCR_CKEN_Field use record Val at 0 range 0 .. 3; Arr at 0 range 0 .. 3; end record; -- PDM control register type PDMCR_Register is record -- PDM enable PDMEN : Boolean := False; -- unspecified Reserved_1_3 : HAL.UInt3 := 16#0#; -- Number of microphones MICNBR : PDMCR_MICNBR_Field := 16#0#; -- unspecified Reserved_6_7 : HAL.UInt2 := 16#0#; -- Clock enable of bitstream clock number 1 CKEN : PDMCR_CKEN_Field := (As_Array => False, Val => 16#0#); -- unspecified Reserved_12_31 : HAL.UInt20 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for PDMCR_Register use record PDMEN at 0 range 0 .. 0; Reserved_1_3 at 0 range 1 .. 3; MICNBR at 0 range 4 .. 5; Reserved_6_7 at 0 range 6 .. 7; CKEN at 0 range 8 .. 11; Reserved_12_31 at 0 range 12 .. 31; end record; subtype PDMDLY_DLYM1L_Field is HAL.UInt3; subtype PDMDLY_DLYM1R_Field is HAL.UInt3; subtype PDMDLY_DLYM2L_Field is HAL.UInt3; subtype PDMDLY_DLYM2R_Field is HAL.UInt3; subtype PDMDLY_DLYM3L_Field is HAL.UInt3; subtype PDMDLY_DLYM3R_Field is HAL.UInt3; subtype PDMDLY_DLYM4L_Field is HAL.UInt3; subtype PDMDLY_DLYM4R_Field is HAL.UInt3; -- PDM delay register type PDMDLY_Register is record -- Delay line adjust for first microphone of pair 1 DLYM1L : PDMDLY_DLYM1L_Field := 16#0#; -- unspecified Reserved_3_3 : HAL.Bit := 16#0#; -- Delay line adjust for second microphone of pair 1 DLYM1R : PDMDLY_DLYM1R_Field := 16#0#; -- unspecified Reserved_7_7 : HAL.Bit := 16#0#; -- Delay line for first microphone of pair 2 DLYM2L : PDMDLY_DLYM2L_Field := 16#0#; -- unspecified Reserved_11_11 : HAL.Bit := 16#0#; -- Delay line for second microphone of pair 2 DLYM2R : PDMDLY_DLYM2R_Field := 16#0#; -- unspecified Reserved_15_15 : HAL.Bit := 16#0#; -- Delay line for first microphone of pair 3 DLYM3L : PDMDLY_DLYM3L_Field := 16#0#; -- unspecified Reserved_19_19 : HAL.Bit := 16#0#; -- Delay line for second microphone of pair 3 DLYM3R : PDMDLY_DLYM3R_Field := 16#0#; -- unspecified Reserved_23_23 : HAL.Bit := 16#0#; -- Delay line for first microphone of pair 4 DLYM4L : PDMDLY_DLYM4L_Field := 16#0#; -- unspecified Reserved_27_27 : HAL.Bit := 16#0#; -- Delay line for second microphone of pair 4 DLYM4R : PDMDLY_DLYM4R_Field := 16#0#; -- unspecified Reserved_31_31 : HAL.Bit := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for PDMDLY_Register use record DLYM1L at 0 range 0 .. 2; Reserved_3_3 at 0 range 3 .. 3; DLYM1R at 0 range 4 .. 6; Reserved_7_7 at 0 range 7 .. 7; DLYM2L at 0 range 8 .. 10; Reserved_11_11 at 0 range 11 .. 11; DLYM2R at 0 range 12 .. 14; Reserved_15_15 at 0 range 15 .. 15; DLYM3L at 0 range 16 .. 18; Reserved_19_19 at 0 range 19 .. 19; DLYM3R at 0 range 20 .. 22; Reserved_23_23 at 0 range 23 .. 23; DLYM4L at 0 range 24 .. 26; Reserved_27_27 at 0 range 27 .. 27; DLYM4R at 0 range 28 .. 30; Reserved_31_31 at 0 range 31 .. 31; end record; ----------------- -- Peripherals -- ----------------- -- SAI type SAI_Peripheral is record -- Global configuration register GCR : aliased GCR_Register; -- Configuration register 1 ACR1 : aliased ACR1_Register; -- Configuration register 2 ACR2 : aliased ACR2_Register; -- This register has no meaning in AC97 and SPDIF audio protocol AFRCR : aliased AFRCR_Register; -- This register has no meaning in AC97 and SPDIF audio protocol ASLOTR : aliased ASLOTR_Register; -- Interrupt mask register 2 AIM : aliased AIM_Register; -- Status register ASR : aliased ASR_Register; -- Clear flag register ACLRFR : aliased ACLRFR_Register; -- Data register ADR : aliased HAL.UInt32; -- Configuration register 1 BCR1 : aliased BCR1_Register; -- Configuration register 2 BCR2 : aliased BCR2_Register; -- This register has no meaning in AC97 and SPDIF audio protocol BFRCR : aliased BFRCR_Register; -- This register has no meaning in AC97 and SPDIF audio protocol BSLOTR : aliased BSLOTR_Register; -- Interrupt mask register 2 BIM : aliased BIM_Register; -- Status register BSR : aliased BSR_Register; -- Clear flag register BCLRFR : aliased BCLRFR_Register; -- Data register BDR : aliased HAL.UInt32; -- PDM control register PDMCR : aliased PDMCR_Register; -- PDM delay register PDMDLY : aliased PDMDLY_Register; end record with Volatile; for SAI_Peripheral use record GCR at 16#0# range 0 .. 31; ACR1 at 16#4# range 0 .. 31; ACR2 at 16#8# range 0 .. 31; AFRCR at 16#C# range 0 .. 31; ASLOTR at 16#10# range 0 .. 31; AIM at 16#14# range 0 .. 31; ASR at 16#18# range 0 .. 31; ACLRFR at 16#1C# range 0 .. 31; ADR at 16#20# range 0 .. 31; BCR1 at 16#24# range 0 .. 31; BCR2 at 16#28# range 0 .. 31; BFRCR at 16#2C# range 0 .. 31; BSLOTR at 16#30# range 0 .. 31; BIM at 16#34# range 0 .. 31; BSR at 16#38# range 0 .. 31; BCLRFR at 16#3C# range 0 .. 31; BDR at 16#40# range 0 .. 31; PDMCR at 16#44# range 0 .. 31; PDMDLY at 16#48# range 0 .. 31; end record; -- SAI SAI1_Periph : aliased SAI_Peripheral with Import, Address => SAI1_Base; -- SAI SAI2_Periph : aliased SAI_Peripheral with Import, Address => SAI2_Base; -- SAI SAI3_Periph : aliased SAI_Peripheral with Import, Address => SAI3_Base; -- SAI SAI4_Periph : aliased SAI_Peripheral with Import, Address => SAI4_Base; end STM32_SVD.SAI;
-- This spec has been automatically generated from STM32F40x.svd pragma Restrictions (No_Elaboration_Code); pragma Ada_2012; with HAL; with System; package STM32_SVD.FLASH is pragma Preelaborate; --------------- -- Registers -- --------------- ------------------ -- ACR_Register -- ------------------ subtype ACR_LATENCY_Field is HAL.UInt3; -- Flash access control register type ACR_Register is record -- Latency LATENCY : ACR_LATENCY_Field := 16#0#; -- unspecified Reserved_3_7 : HAL.UInt5 := 16#0#; -- Prefetch enable PRFTEN : Boolean := False; -- Instruction cache enable ICEN : Boolean := False; -- Data cache enable DCEN : Boolean := False; -- Write-only. Instruction cache reset ICRST : Boolean := False; -- Data cache reset DCRST : Boolean := False; -- unspecified Reserved_13_31 : HAL.UInt19 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for ACR_Register use record LATENCY at 0 range 0 .. 2; Reserved_3_7 at 0 range 3 .. 7; PRFTEN at 0 range 8 .. 8; ICEN at 0 range 9 .. 9; DCEN at 0 range 10 .. 10; ICRST at 0 range 11 .. 11; DCRST at 0 range 12 .. 12; Reserved_13_31 at 0 range 13 .. 31; end record; ----------------- -- SR_Register -- ----------------- -- Status register type SR_Register is record -- End of operation EOP : Boolean := False; -- Operation error OPERR : Boolean := False; -- unspecified Reserved_2_3 : HAL.UInt2 := 16#0#; -- Write protection error WRPERR : Boolean := False; -- Programming alignment error PGAERR : Boolean := False; -- Programming parallelism error PGPERR : Boolean := False; -- Programming sequence error PGSERR : Boolean := False; -- unspecified Reserved_8_15 : HAL.Byte := 16#0#; -- Read-only. Busy BSY : Boolean := False; -- unspecified Reserved_17_31 : HAL.UInt15 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for SR_Register use record EOP at 0 range 0 .. 0; OPERR at 0 range 1 .. 1; Reserved_2_3 at 0 range 2 .. 3; WRPERR at 0 range 4 .. 4; PGAERR at 0 range 5 .. 5; PGPERR at 0 range 6 .. 6; PGSERR at 0 range 7 .. 7; Reserved_8_15 at 0 range 8 .. 15; BSY at 0 range 16 .. 16; Reserved_17_31 at 0 range 17 .. 31; end record; ----------------- -- CR_Register -- ----------------- subtype CR_SNB_Field is HAL.UInt4; subtype CR_PSIZE_Field is HAL.UInt2; -- Control register type CR_Register is record -- Programming PG : Boolean := False; -- Sector Erase SER : Boolean := False; -- Mass Erase MER : Boolean := False; -- Sector number SNB : CR_SNB_Field := 16#0#; -- unspecified Reserved_7_7 : HAL.Bit := 16#0#; -- Program size PSIZE : CR_PSIZE_Field := 16#0#; -- unspecified Reserved_10_15 : HAL.UInt6 := 16#0#; -- Start STRT : Boolean := False; -- unspecified Reserved_17_23 : HAL.UInt7 := 16#0#; -- End of operation interrupt enable EOPIE : Boolean := False; -- Error interrupt enable ERRIE : Boolean := False; -- unspecified Reserved_26_30 : HAL.UInt5 := 16#0#; -- Lock LOCK : Boolean := True; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for CR_Register use record PG at 0 range 0 .. 0; SER at 0 range 1 .. 1; MER at 0 range 2 .. 2; SNB at 0 range 3 .. 6; Reserved_7_7 at 0 range 7 .. 7; PSIZE at 0 range 8 .. 9; Reserved_10_15 at 0 range 10 .. 15; STRT at 0 range 16 .. 16; Reserved_17_23 at 0 range 17 .. 23; EOPIE at 0 range 24 .. 24; ERRIE at 0 range 25 .. 25; Reserved_26_30 at 0 range 26 .. 30; LOCK at 0 range 31 .. 31; end record; -------------------- -- OPTCR_Register -- -------------------- subtype OPTCR_BOR_LEV_Field is HAL.UInt2; subtype OPTCR_RDP_Field is HAL.Byte; subtype OPTCR_nWRP_Field is HAL.UInt12; -- Flash option control register type OPTCR_Register is record -- Option lock OPTLOCK : Boolean := False; -- Option start OPTSTRT : Boolean := False; -- BOR reset Level BOR_LEV : OPTCR_BOR_LEV_Field := 16#1#; -- unspecified Reserved_4_4 : HAL.Bit := 16#1#; -- WDG_SW User option bytes WDG_SW : Boolean := False; -- nRST_STOP User option bytes nRST_STOP : Boolean := False; -- nRST_STDBY User option bytes nRST_STDBY : Boolean := False; -- Read protect RDP : OPTCR_RDP_Field := 16#0#; -- Not write protect nWRP : OPTCR_nWRP_Field := 16#0#; -- unspecified Reserved_28_31 : HAL.UInt4 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for OPTCR_Register use record OPTLOCK at 0 range 0 .. 0; OPTSTRT at 0 range 1 .. 1; BOR_LEV at 0 range 2 .. 3; Reserved_4_4 at 0 range 4 .. 4; WDG_SW at 0 range 5 .. 5; nRST_STOP at 0 range 6 .. 6; nRST_STDBY at 0 range 7 .. 7; RDP at 0 range 8 .. 15; nWRP at 0 range 16 .. 27; Reserved_28_31 at 0 range 28 .. 31; end record; ----------------- -- Peripherals -- ----------------- -- FLASH type FLASH_Peripheral is record -- Flash access control register ACR : ACR_Register; -- Flash key register KEYR : HAL.Word; -- Flash option key register OPTKEYR : HAL.Word; -- Status register SR : SR_Register; -- Control register CR : CR_Register; -- Flash option control register OPTCR : OPTCR_Register; end record with Volatile; for FLASH_Peripheral use record ACR at 0 range 0 .. 31; KEYR at 4 range 0 .. 31; OPTKEYR at 8 range 0 .. 31; SR at 12 range 0 .. 31; CR at 16 range 0 .. 31; OPTCR at 20 range 0 .. 31; end record; -- FLASH FLASH_Periph : aliased FLASH_Peripheral with Import, Address => FLASH_Base; end STM32_SVD.FLASH;
------------------------------------------------------------------------------ -- -- -- GNAT LIBRARY COMPONENTS -- -- -- -- G N A T . E X P E C T . T T Y -- -- -- -- S p e c -- -- -- -- Copyright (C) 2000-2020, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ with GNAT.TTY; with System; with System.OS_Constants; package GNAT.Expect.TTY is pragma Linker_Options (System.OS_Constants.PTY_Library); ------------------ -- TTY_Process -- ------------------ type TTY_Process_Descriptor is new Process_Descriptor with private; -- Similar to Process_Descriptor, with the parent set up as a full terminal -- (Unix sense, see tty(4)). procedure Pseudo_Descriptor (Descriptor : out TTY_Process_Descriptor'Class; TTY : GNAT.TTY.TTY_Handle; Buffer_Size : Natural := 4096); -- Given a terminal descriptor (TTY), create a pseudo process descriptor -- to be used with GNAT.Expect. -- -- Note that it is invalid to call Close, Interrupt, Send_Signal on the -- resulting descriptor. To deallocate memory associated with Process, -- call Close_Pseudo_Descriptor instead. procedure Close_Pseudo_Descriptor (Descriptor : in out TTY_Process_Descriptor); -- Free memory and ressources associated with Descriptor. Will *not* -- close the associated TTY, it is the caller's responsibility to call -- GNAT.TTY.Close_TTY. procedure Interrupt (Pid : Integer); -- Interrupt a process given its pid. -- This is equivalent to sending a ctrl-c event, or kill -SIGINT. procedure Terminate_Process (Pid : Integer); -- Terminate abruptly a process given its pid. -- This is equivalent to kill -SIGKILL under unix, or TerminateProcess -- under Windows. overriding procedure Send (Descriptor : in out TTY_Process_Descriptor; Str : String; Add_LF : Boolean := True; Empty_Buffer : Boolean := False); -- See parent -- What does that comment mean??? what is "parent" here procedure Set_Use_Pipes (Descriptor : in out TTY_Process_Descriptor; Use_Pipes : Boolean); -- Tell Expect.TTY whether to use Pipes or Console (on windows). Needs to -- be set before spawning the process. Default is to use Pipes. procedure Set_Size (Descriptor : in out TTY_Process_Descriptor'Class; Rows : Natural; Columns : Natural); -- Sets up the size of the terminal as reported to the spawned process function Is_Process_Running (Descriptor : in out TTY_Process_Descriptor) return Boolean; -- Returns True if the process is still alive private -- All declarations in the private part must be fully commented ??? overriding procedure Close (Descriptor : in out TTY_Process_Descriptor; Status : out Integer); overriding procedure Close (Descriptor : in out TTY_Process_Descriptor); overriding procedure Interrupt (Descriptor : in out TTY_Process_Descriptor); -- When we use pseudo-terminals, we do not need to use signals to -- interrupt the debugger, we can simply send the appropriate character. -- This provides a better support for remote debugging for instance. procedure Set_Up_Communications (Pid : in out TTY_Process_Descriptor; Err_To_Out : Boolean; Pipe1 : not null access Pipe_Type; Pipe2 : not null access Pipe_Type; Pipe3 : not null access Pipe_Type); procedure Set_Up_Parent_Communications (Pid : in out TTY_Process_Descriptor; Pipe1 : in out Pipe_Type; Pipe2 : in out Pipe_Type; Pipe3 : in out Pipe_Type); procedure Set_Up_Child_Communications (Pid : in out TTY_Process_Descriptor; Pipe1 : in out Pipe_Type; Pipe2 : in out Pipe_Type; Pipe3 : in out Pipe_Type; Cmd : String; Args : System.Address); procedure Close_Input (Descriptor : in out TTY_Process_Descriptor); Still_Active : constant Integer := -1; type TTY_Process_Descriptor is new Process_Descriptor with record Process : System.Address := System.Null_Address; -- Underlying structure used in C Exit_Status : Integer := Still_Active; -- Holds the exit status of the process Use_Pipes : Boolean := True; end record; end GNAT.Expect.TTY;
with GNAT.Spitbol; with AWS.Status; use AWS.Status; with Gprslaves.DB.JSON; with GNATCOLL.JSON; with AWS.Messages; with Gprslaves.DB; use Gprslaves.DB; package body GPR_Tools.Gprslaves.Nameserver.Server is Store : Gprslaves.DB.Table; -------------- -- Register -- -------------- procedure Register (Server : DB.Info_Struct) is begin Store.Register (Server.Host, Server.Keys); end Register; function Find (Keys : GNAT.Spitbol.Table_VString.Table) return DB.Host_Info_Vectors.Vector is begin return Store.Find (Keys); end Find; function Request (Request : AWS.Status.Data) return AWS.Response.Data is Hosts : Host_Info_Vectors.Vector; begin case AWS.Status.Method (Request) is when AWS.Status.PUT => Register (Gprslaves.DB.JSON.Get (GNATCOLL.JSON.Read (AWS.Status.Binary_Data (Request)))); return AWS.Response.Build ("", "OK"); when AWS.Status.GET => Hosts := Find (DB.JSON.Get (GNATCOLL.JSON.Read (AWS.Status.Binary_Data (Request)))); return AWS.Response.Build ("", String'(GNATCOLL.JSON.Write (DB.JSON.Create (Hosts)))); when others => null; return AWS.Response.Build ("", "FAIL", Status_Code => AWS.Messages.S400); end case; exception when others => return AWS.Response.Build ("", "FAIL", Status_Code => AWS.Messages.S400); end Request; end GPR_Tools.Gprslaves.Nameserver.Server;
with Swaps; use Swaps; with Ada.Text_IO; package body Sorts is procedure Display_List (List : in Integer_List) is package IO renames Ada.Text_IO; procedure Put_String(S : String) renames Ada.Text_IO.Put; begin IO.Put ("("); for I in List'First .. List'Last loop if i /= List'First and then List (I) < 0 then Put_String (" "); end if; Ada.Text_IO.Put (Integer'Image (List (I))); if I /= List'Last then Ada.Text_IO.Put(","); end if; end loop; Ada.Text_IO.Put (")"); Ada.Text_IO.New_Line; end Display_List; procedure Sort (List : in out Integer_List) is Idx_Min : Integer; begin for Current_Idx in List'First .. List'Last - 1 loop Idx_Min := Current_Idx; for Scan_Idx in Current_Idx + 1 .. List'Last loop if List (Scan_Idx) < List (Idx_Min) then Idx_Min := Scan_Idx; end if; end loop; if Current_Idx /= Idx_Min then Swap (List (Current_Idx), List (Idx_Min)); end if; end loop; end Sort; end Sorts;
pragma Warnings (Off); pragma Style_Checks (Off); with Ada.Exceptions; use Ada.Exceptions; with Ada.Strings.Fixed; use Ada.Strings, Ada.Strings.Fixed; with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; -- with Ada.Characters.Handling; use Ada.Characters.Handling; with Ada.Unchecked_Conversion; with UnZip.Streams; with Float_portable_binary_transfer; pragma Elaborate_All (Float_portable_binary_transfer); with GLOBE_3D.Textures; with GL.IO; package body GLOBE_3D.IO is ------------------------------------------------ -- Common, internal definitions, routines, .. . -- ------------------------------------------------ stop_type : constant Character := Character'Val (26); -- Ctrl - Z to stop typing a binary file signature_obj : constant String := "GLOBE_3D 3D Binary Object File (" & object_extension & "). " & "Format version : 2 - Apr - 2008." & stop_type; signature_bsp : constant String := "GLOBE_3D Binary Space Partition File (" & BSP_extension & "). " & "Format version : 2 - Apr - 2008." & stop_type; subtype U8 is GL.Ubyte; type U16 is mod 2 ** 16; for U16'Size use 16; type U32 is mod 2 ** 32; for U32'Size use 32; type I16 is range -2 ** 15 .. 2 ** 15 - 1; for I16'Size use 16; type I32 is range -2 ** 31 .. 2 ** 31 - 1; for I32'Size use 32; f_scaling : constant := 2.0**24; package FFBT is new Float_portable_binary_transfer (GL.C_Float, I32, I16, True, f_scaling); use FFBT; d_scaling : constant := 2.0**27; -- 53/2=26.5 package DFBT is new Float_portable_binary_transfer (GL.Double, I32, I16, True, d_scaling); use DFBT; function Cvt is new Ada.Unchecked_Conversion (I16, U16); function Cvt is new Ada.Unchecked_Conversion (I32, U32); function Cvt is new Ada.Unchecked_Conversion (U16, I16); function Cvt is new Ada.Unchecked_Conversion (U32, I32); generic type Number is mod <>; procedure Read_Intel_x86_number (sb : in out GL.IO.Input_buffer; n : out Number); procedure Read_Intel_x86_number (sb : in out GL.IO.Input_buffer; n : out Number) is b : U8; m : Number := 1; bytes : constant Integer := Number'Size / 8; begin n := 0; for i in 1 .. bytes loop GL.IO.Get_Byte (sb, b); n := n + m * Number (b); m := m * 256; end loop; end Read_Intel_x86_number; procedure Read_Double ( sb : in out GL.IO.Input_buffer; n : out GL.Double ) is procedure Read_Intel is new Read_Intel_x86_number (U16); procedure Read_Intel is new Read_Intel_x86_number (U32); m1, m2 : U32; e : U16; begin Read_Intel (sb, m1); Read_Intel (sb, m2); Read_Intel (sb, e); Merge (Cvt (m1), Cvt (m2), Cvt (e), n); -- Double is stored in two parts due to the absence of -- 64 - bit integers on certain compilers (e.g. OA 8.2) end Read_Double; generic s : Ada.Streams.Stream_IO.Stream_Access; type Number is mod <>; procedure Write_Intel_x86_number (n : in Number); procedure Write_Intel_x86_number (n : in Number) is m : Number := n; bytes : constant Integer := Number'Size/8; begin for i in 1 .. bytes loop U8'Write (s, U8 (m mod 256)); m := m / 256; end loop; end Write_Intel_x86_number; procedure Write_Double ( s : Ada.Streams.Stream_IO.Stream_Access; n : in GL.Double) is procedure Write_Intel is new Write_Intel_x86_number (s, U16); procedure Write_Intel is new Write_Intel_x86_number (s, U32); m1, m2 : I32; e : I16; begin Split (n, m1, m2, e); -- Double is stored in two parts due to the absence of -- 64 - bit integers on certain compilers (e.g. OA 8.2) Write_Intel (Cvt (m1)); Write_Intel (Cvt (m2)); Write_Intel (Cvt (e)); end Write_Double; procedure Write_String ( s : in Ada.Streams.Stream_IO.Stream_Access; str : in String ) is tstr : constant String := Trim (str, Right); begin U8'Write (s, tstr'Length); String'Write (s, tstr); end Write_String; procedure Read_String ( sb : in out GL.IO.Input_buffer; str : out String ) is l8 : U8; l : Natural; begin GL.IO.Get_Byte (sb, l8); l := Natural (l8); if l > str'Length then raise Constraint_Error; end if; for i in str'First .. str'First + l - 1 loop GL.IO.Get_Byte (sb, l8); str (i) := Character'Val (l8); end loop; str (str'First + l .. str'Last) := (others => ' '); end Read_String; ------------------- -- Object_3D I/O -- ------------------- procedure Read ( s : in Ada.Streams.Stream_IO.Stream_Access; o : out p_Object_3D ) is buf : GL.IO.Input_buffer; procedure Read_Intel is new Read_Intel_x86_number (U16); procedure Read_Intel is new Read_Intel_x86_number (U32); procedure Read_Float (n : out GL.C_Float) is m : U32; e : U16; begin Read_Intel (buf, m); Read_Intel (buf, e); Merge (Cvt (m), Cvt (e), n); end Read_Float; procedure Read_Material_Float_vector (mfv : out GL.Material_Float_vector) is begin for i in mfv'Range loop Read_Float (mfv (i)); end loop; end Read_Material_Float_vector; procedure Read_Point_3D (p : out Point_3D) is begin for i in p'Range loop Read_Double (buf, p (i)); end loop; end Read_Point_3D; procedure Read_Map_idx_pair_array (m : out Map_idx_pair_array) is begin for i in m'Range loop Read_Double (buf, m (i).U); Read_Double (buf, m (i).V); end loop; end Read_Map_idx_pair_array; v8 : U8; v32, mp32, mf32 : U32; procedure Read_face (face : out Face_type; face_invar : in out Face_invariant_type) is begin -- 1/ Points for i in face.p'Range loop Read_Intel (buf, v32); face.p (i) := Integer (v32); end loop; -- 2/ Portal connection : object name is stored; -- access must be found later Read_String (buf, face_invar.connect_name); -- 3/ Skin GL.IO.Get_Byte (buf, v8); face.skin := Skin_Type'Val (v8); -- 4/ Mirror GL.IO.Get_Byte (buf, v8); face.mirror := Boolean'Val (v8); -- 5/ Alpha Read_Double (buf, face.alpha); -- 6/ Colour case face.skin is when colour_only | coloured_texture => Read_Double (buf, face.colour.red); Read_Double (buf, face.colour.green); Read_Double (buf, face.colour.blue); when others => null; end case; -- 7/ Material case face.skin is when material_only | material_texture => Read_Material_Float_vector (face.material.ambient); Read_Material_Float_vector (face.material.diffuse); Read_Material_Float_vector (face.material.specular); Read_Material_Float_vector (face.material.emission); Read_Float (face.material.shininess); when others => null; end case; -- 8/ Texture : texture name is stored; -- id must be found later Read_String (buf, face_invar.texture_name); GL.IO.Get_Byte (buf, v8); face.whole_texture := Boolean'Val (v8); GL.IO.Get_Byte (buf, v8); face.repeat_U := Positive'Val (v8); GL.IO.Get_Byte (buf, v8); face.repeat_V := Positive'Val (v8); if not face.whole_texture then Read_Map_idx_pair_array (face.texture_edge_map); end if; end Read_face; test_signature : String (signature_obj'Range); ID : Ident; begin String'Read (s, test_signature); if test_signature /= signature_obj then raise Bad_data_format; end if; GL.IO.Attach_Stream (b => buf, stm => s); Read_String (buf, ID); -- Read the object's dimensions, create object, read its contents Read_Intel (buf, mp32); Read_Intel (buf, mf32); o := new Object_3D (Integer (mp32), Integer (mf32)); o.ID := ID; for p in o.Point'Range loop Read_Point_3D (o.Point (p)); end loop; for f in o.face'Range loop Read_face (o.face (f), o.face_invariant (f)); end loop; Read_Point_3D (o.Centre); for i in Matrix_33'Range (1) loop for j in Matrix_33'Range (2) loop Read_Double (buf, o.rotation (i, j)); end loop; end loop; -- !! sub - objects : skipped !! -- Main operation done! end Read; procedure Write ( s : in Ada.Streams.Stream_IO.Stream_Access; o : in Object_3D ) is procedure Write_Intel is new Write_Intel_x86_number (s, U16); procedure Write_Intel is new Write_Intel_x86_number (s, U32); procedure Write_Float (n : in GL.C_Float) is m : I32; e : I16; begin Split (n, m, e); Write_Intel (Cvt (m)); Write_Intel (Cvt (e)); end Write_Float; procedure Write_Material_Float_vector (mfv : in GL.Material_Float_vector) is begin for i in mfv'Range loop Write_Float (mfv (i)); end loop; end Write_Material_Float_vector; procedure Write_Point_3D (p : in Point_3D) is begin for i in p'Range loop Write_Double (s, p (i)); end loop; end Write_Point_3D; procedure Write_Map_idx_pair_array (m : in Map_idx_pair_array) is begin for i in m'Range loop Write_Double (s, m (i).U); Write_Double (s, m (i).V); end loop; end Write_Map_idx_pair_array; procedure Write_face (face : Face_type; face_invar : Face_invariant_type) is begin -- 1/ Points for i in face.p'Range loop Write_Intel (U32 (face.p (i))); end loop; -- 2/ Portal connection : object name is stored if face.connecting = null then Write_String (s, empty); else Write_String (s, face.connecting.ID); end if; -- 3/ Skin U8'Write (s, Skin_Type'Pos (face.skin)); -- 4/ Mirror U8'Write (s, Boolean'Pos (face.mirror)); -- 5/ Alpha Write_Double (s, face.alpha); -- 6/ Colour case face.skin is when colour_only | coloured_texture => Write_Double (s, face.colour.red); Write_Double (s, face.colour.green); Write_Double (s, face.colour.blue); when others => null; end case; -- 7/ Material case face.skin is when material_only | material_texture => Write_Material_Float_vector (face.material.ambient); Write_Material_Float_vector (face.material.diffuse); Write_Material_Float_vector (face.material.specular); Write_Material_Float_vector (face.material.emission); Write_Float (face.material.shininess); when others => null; end case; -- 8/ Texture : texture name is stored if face.texture = null_image then -- Maybe a texture name has been given with Texture_name_hint, -- but was not yet attached to a GL ID number through Rebuild_Links Write_String (s, face_invar.texture_name); else -- Usual way : We can get the texture name associated to the -- GL ID number; name is stored by GLOBE_3D.Textures. Write_String (s, Textures.Texture_name (face.texture, False)); end if; U8'Write (s, Boolean'Pos (face.whole_texture)); U8'Write (s, Positive'Pos (face.repeat_U)); U8'Write (s, Positive'Pos (face.repeat_V)); if not face.whole_texture then Write_Map_idx_pair_array (face.texture_edge_map); end if; end Write_face; begin String'Write (s, signature_obj); Write_String (s, o.ID); Write_Intel (U32 (o.Max_points)); Write_Intel (U32 (o.Max_faces)); for p in o.Point'Range loop Write_Point_3D (o.Point (p)); end loop; for f in o.face'Range loop Write_face (o.face (f), o.face_invariant (f)); end loop; Write_Point_3D (o.Centre); for i in Matrix_33'Range (1) loop for j in Matrix_33'Range (2) loop Write_Double (s, o.rotation (i, j)); end loop; end loop; -- !! sub - objects : skipped !! -- Main operation done! end Write; generic type Anything is private; extension : String; animal : String; with procedure Read ( s : in Ada.Streams.Stream_IO.Stream_Access; a : out Anything ); procedure Load_generic (name_in_resource : String; a : out Anything); procedure Load_generic (name_in_resource : String; a : out Anything) is name_ext : constant String := name_in_resource & extension; procedure Try (zif : in out Zip.Zip_info; name : String) is use UnZip.Streams; fobj : Zipped_File_Type; begin -- Try Load_if_needed (zif, name); Open (fobj, zif, name_ext); Read (Stream (fobj), a); Close (fobj); exception when Zip.File_name_not_found => raise; when e:others => Raise_Exception ( Exception_Identity (e), Exception_Message (e) & " on " & animal & " : " & name_ext ); end Try; begin begin Try (zif_level, To_String (level_data_name)); exception when Zip.File_name_not_found | Zip.Zip_file_open_Error => -- Not found in level - specific pack Try (zif_global, To_String (global_data_name)); end; exception when Zip.File_name_not_found | Zip.Zip_file_open_Error => -- Never found - neither in level, nor in global pack Raise_Exception ( Missing_object'Identity, animal & " not found in any data resource pack : " & name_in_resource ); end Load_generic; procedure Load_Internal is new Load_generic ( Anything => p_Object_3D, extension => object_extension, animal => "object", Read => Read ); procedure Load (name_in_resource : String; o : out p_Object_3D) renames Load_Internal; procedure Load_file (file_name : String; o : out p_Object_3D) is use Ada.Streams.Stream_IO; f : File_Type; begin Open (f, in_file, file_name); Read (Stream (f), o); Close (f); end Load_file; procedure Save_file (file_name : String; o : in Object_3D'Class) is use Ada.Streams.Stream_IO; f : File_Type; begin Create (f, out_file, file_name); Write (Stream (f), Object_3D (o)); -- ^ endian - proof and floating - point hardware neutral; -- using stream attribute would be machine - specific. Close (f); end Save_file; procedure Save_file (o : in Object_3D'Class) is begin Save_file (Trim (o.ID, Right) & object_extension, o); end Save_file; ------------- -- BSP I/O -- ------------- -- Write a BSP tree to a stream procedure Write ( s : in Ada.Streams.Stream_IO.Stream_Access; tree : in BSP.p_BSP_node ) is procedure Write_Intel is new Write_Intel_x86_number (s, U32); use BSP; n : Natural := 0; procedure Numbering (node : p_BSP_node) is begin if node /= null then n := n + 1; node.node_id := n; Numbering (node.front_child); Numbering (node.back_child); end if; end Numbering; procedure Save_node (node : p_BSP_node) is begin if node /= null then Write_Intel (U32 (node.node_id)); if node.front_child = null then Write_Intel (U32' (0)); if node.front_leaf = null then Write_String (s, empty); else Write_String (s, node.front_leaf.ID); end if; else Write_Intel (U32 (node.front_child.node_id)); end if; if node.back_child = null then Write_Intel (U32' (0)); if node.back_leaf = null then Write_String (s, empty); else Write_String (s, node.back_leaf.ID); end if; else Write_Intel (U32 (node.back_child.node_id)); end if; for i in node.normal'Range loop Write_Double (s, node.normal (i)); end loop; Write_Double (s, node.distance); -- Save_node (node.front_child); Save_node (node.back_child); end if; end Save_node; begin Numbering (tree); -- fill the node_id's String'Write (s, signature_bsp); -- header Write_Intel (U32 (n)); -- give the number of nodes first Save_node (tree); end Write; -- Write a BSP tree to a file procedure Save_file (file_name : String; tree : in BSP.p_BSP_node) is use Ada.Streams.Stream_IO; f : File_Type; begin if Index (file_name, ".")=0 then Create (f, out_file, file_name & BSP_extension); else Create (f, out_file, file_name); end if; Write (Stream (f), tree); Close (f); end Save_file; procedure Load ( name_in_resource : in String; referred : in Map_of_Visuals; tree : out BSP.p_BSP_node ) is function Find_object (ID : Ident; tolerant : Boolean) return p_Object_3D is begin if ID = empty then return null; else return p_Object_3D ( Visuals_Mapping.Element ( Container => Visuals_Mapping.Map (referred), Key => Ada.Strings.Unbounded.To_Unbounded_String (ID) ) ); end if; exception when Constraint_Error => -- GNAT gives also the message: -- no element available because key not in map if tolerant then return null; else Raise_Exception ( Missing_object_in_BSP'Identity, "Object not found : [" & Trim (ID, Right) & ']' ); end if; end Find_object; procedure Read ( s : in Ada.Streams.Stream_IO.Stream_Access; tree : out BSP.p_BSP_node ) is use BSP; buf : GL.IO.Input_buffer; procedure Read_Intel is new Read_Intel_x86_number (U32); test_signature : String (signature_bsp'Range); n, j, k : U32; ID : Ident; tol : constant Boolean := False; begin String'Read (s, test_signature); if test_signature /= signature_bsp then raise Bad_data_format; end if; GL.IO.Attach_Stream (b => buf, stm => s); Read_Intel (buf, n); if n < 1 then tree := null; return; end if; declare -- We put all the new - born nodes into a farm with numbered boxes, -- because only the numbers are stored in the BSP file. -- Once the nodes are linked together through accesses (pointers), -- we can forget the farm and let the tree float .. . farm : array (0 .. n) of p_BSP_Node; begin farm (0) := null; for i in 1 .. n loop farm (i) := new BSP_Node; end loop; for i in 1 .. n loop Read_Intel (buf, j); -- node_id farm (j).node_id := Integer (j); Read_Intel (buf, k); farm (j).front_child := farm (k); if k = 0 then -- it is a front leaf - > associate object Read_String (buf, ID); farm (j).front_leaf := Find_object (ID, tol); end if; Read_Intel (buf, k); farm (j).back_child := farm (k); if k = 0 then -- it is a back leaf - > associate object Read_String (buf, ID); farm (j).back_leaf := Find_object (ID, tol); end if; -- The node's geometric information (a plane): for ii in farm (j).normal'Range loop Read_Double (buf, farm (j).normal (ii)); end loop; Read_Double (buf, farm (j).distance); end loop; tree := farm (1); end; end Read; procedure Load_Internal is new Load_generic ( Anything => BSP.p_BSP_node, extension => BSP_extension, animal => "BSP tree", Read => Read ); begin Load_Internal (name_in_resource, tree); end Load; end GLOBE_3D.IO;
-- Copyright 2019-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/>. package body Pack is procedure Do_Nothing (S : String) is begin null; end Do_Nothing; end Pack;
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- S T R I N G T -- -- -- -- S p e c -- -- -- -- Copyright (C) 1992-2020, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ with Namet; use Namet; with System; with Types; use Types; package Stringt is pragma Elaborate_Body; -- This is to make sure Null_String_Id is properly initialized -- This package contains routines for handling the strings table which is -- used to store string constants encountered in the source, and also those -- additional string constants generated by compile time concatenation and -- other similar processing. -- WARNING: There is a C version of this package. Any changes to this -- source file must be properly reflected in the C header file stringt.h -- A string constant in this table consists of a series of Char_Code values, -- so that 16-bit character codes can be properly handled if this feature -- is implemented in the scanner. -- There is no guarantee that hashing is used in the implementation, although -- it may be. This means that the caller cannot count on having the same Id -- value for two identical strings stored separately and also cannot count on -- the two such Id values being different. Null_String_Id : String_Id; -- Gets set to a null string with length zero -------------------------------------- -- String Table Access Subprograms -- -------------------------------------- procedure Initialize; -- Initializes the strings table for a new compilation. procedure Lock; -- Lock internal tables before calling back end procedure Unlock; -- Unlock internal tables, in case back end needs to modify them procedure Mark; -- Take a snapshot of the internal tables. Used in conjunction with Release -- when computing temporary string values that need not be preserved. procedure Release; -- Restore the internal tables to the situation when Mark was last called. -- If Release is called with no prior call to Mark, the entire string table -- is cleared to its initial (empty) setting. procedure Start_String; -- Sets up for storing a new string in the table. To store a string, a -- call is first made to Start_String, then successive calls are -- made to Store_String_Character to store the characters of the string. -- Finally, a call to End_String terminates the entry and returns it Id. procedure Start_String (S : String_Id); -- Like Start_String with no parameter, except that the contents of the -- new string is initialized to be a copy of the given string. A test is -- made to see if S is the last created string, and if so it is shared, -- rather than copied, this can be particularly helpful for the case of -- a continued concatenation of string constants. procedure Store_String_Char (C : Char_Code); procedure Store_String_Char (C : Character); -- Store next character of string, see description above for Start_String procedure Store_String_Chars (S : String); procedure Store_String_Chars (S : String_Id); -- Store character codes of given string in sequence procedure Store_String_Int (N : Int); -- Stored decimal representation of integer with possible leading minus procedure Unstore_String_Char; -- Undoes effect of previous Store_String_Char call, used in some error -- situations of unterminated string constants. function End_String return String_Id; -- Terminates current string and returns its Id function String_Length (Id : String_Id) return Nat; -- Returns length of previously stored string function Get_String_Char (Id : String_Id; Index : Int) return Char_Code; pragma Inline (Get_String_Char); -- Obtains the specified character from a stored string. The lower bound -- of stored strings is always 1, so the range is 1 .. String_Length (Id). function String_Equal (L, R : String_Id) return Boolean; -- Determines if two string literals represent the same string function String_To_Name (S : String_Id) return Name_Id; -- Convert String_Id to Name_Id procedure Append (Buf : in out Bounded_String; S : String_Id); -- Append characters of given string to Buf. Error if any characters are -- out of Character range. Does not attempt to do any encoding of -- characters. function To_String (S : String_Id) return String; -- Return S as a String procedure String_To_Name_Buffer (S : String_Id); -- Place characters of given string in Name_Buffer, setting Name_Len. -- Error if any characters are out of Character range. Does not attempt -- to do any encoding of any characters. function String_Chars_Address return System.Address; -- Return address of String_Chars table (used by Back_End call to Gigi) function String_From_Name_Buffer (Buf : Bounded_String := Global_Name_Buffer) return String_Id; -- Given a name stored in Buf, returns a string of the corresponding value. function Strings_Address return System.Address; -- Return address of Strings table (used by Back_End call to Gigi) procedure Write_Char_Code (Code : Char_Code); -- Procedure to write a character code value, used for debugging purposes -- for writing character codes. If the character code is in the range -- 16#20# .. 16#7E#, then the single graphic character corresponding to -- the code is output. For any other codes in the range 16#00# .. 16#FF#, -- the code is output as ["hh"] where hh is the two digit hex value for -- the code. Codes greater than 16#FF# are output as ["hhhh"] where hhhh -- is the four digit hex representation of the code value (high order -- byte first). Hex letters are always in lower case. procedure Write_String_Table_Entry (Id : String_Id); -- Writes a string value with enclosing quotes to the current file using -- routines in package Output. Does not write an end of line character. -- This procedure is used for debug output purposes, and also for output -- of strings specified by pragma Linker Option to the ali file. 7-bit -- ASCII graphics (except for double quote) are output literally. -- The double quote appears as two successive double quotes. -- All other codes, are output as described for Write_Char_Code. For -- example, the string created by folding "A" & ASCII.HT & "Hello" will -- print as "A["09"]Hello". A No_String value prints simply as "no string" -- without surrounding quote marks. private pragma Inline (End_String); pragma Inline (String_Length); end Stringt;
-- -- The author disclaims copyright to this source code. In place of -- a legal notice, here is a blessing: -- -- May you do good and not evil. -- May you find forgiveness for yourself and forgive others. -- May you share freely, not taking more than you give. -- --------------------------------------------------------------------------- -- -- This module implements routines use to construct the yy_action[] table. -- -- The state of the yy_action table under construction is an instance of -- the following structure. -- -- The yy_action table maps the pair (state_number, lookahead) into an -- action_number. The table is an array of integers pairs. The state_number -- determines an initial offset into the yy_action array. The lookahead -- value is then added to this initial offset to get an index X into the -- yy_action array. If the aAction[X].lookahead equals the value of the -- of the lookahead input, then the value of the action_number output is -- aAction[X].action. If the lookaheads do not match then the -- default action for the state_number is returned. -- -- All actions associated with a single state_number are first entered -- into aLookahead[] using multiple calls to acttab_action(). Then the -- actions for that single state_number are placed into the aAction[] -- array with a single call to acttab_insert(). The acttab_insert() call -- also resets the aLookahead[] array in preparation for the next -- state number. -- limited with States; with Rules; with Symbols; package Actions is type Action_Kind is (Shift, C_Accept, Reduce, Error, SS_Conflict, -- A shift/shift conflict SR_Conflict, -- Was a reduce, but part of a conflict RR_Conflict, -- Was a reduce, but part of a conflict SH_Resolved, -- Was a shift. Precedence resolved conflict RD_Resolved, -- Was reduce. Precedence resolved conflict Not_Used, -- Deleted by compression Shift_Reduce -- Shift first, then reduce ); type Action_Record; type Action_Access is access all Action_Record; type State_Rule_Kind is (Is_State, Is_Rule); type X_Union (Typ : State_Rule_Kind := Is_State) is record case Typ is when Is_State => State : access States.State_Record; -- The look-ahead symbol when Is_Rule => Rule : access Rules.Rule_Record; -- The new state, if a shift end case; end record; pragma Unchecked_Union (X_Union); -- Every shift or reduce operation is stored as one of the following type Action_Record is record Symbol : access Symbols.Symbol_Record; Kind : Action_Kind; X : X_Union; -- The rule, if a reduce Symbol_Link : access Symbols.Symbol_Record; -- Shift_Reduce optimization to this symbol -- Next : access Action_Record; -- Next action for this state Collide : access Action_Record; -- Next action with the same hash end record; function Action_Cmp (Left, Right : in Action_Record) return Boolean; -- Compare two actions for sorting purposes. Return negative, zero, or -- positive if the first action is less than, equal to, or greater than -- the first -- Return True when Left is 'less than' Right. -- function Action_Sort (Action : in Action_Access) return Action_Access; -- -- Sort parser actions -- -- function Action_New return Action_Access; -- -- Allocate a new parser action -- procedure Action_Add (Action : in out Action_Access; -- Kind : in Action_Kind; -- Symbol : in Symbols.Symbol_Access; -- State : in States.State_Access; -- Rule : in Rules.Rule_Access); -- See Action_lists.Append function Resolve_Conflict (Left : in out Action_Record; Right : in out Action_Record) return Integer; -- Resolve a conflict between the two given actions. If the -- conflict can't be resolved, return non-zero. -- -- NO LONGER TRUE: -- To resolve a conflict, first look to see if either action -- is on an error rule. In that case, take the action which -- is not associated with the error rule. If neither or both -- actions are associated with an error rule, then try to -- use precedence to resolve the conflict. -- -- If either action is a SHIFT, then it must be apx. This -- function won't work if apx->type==REDUCE and apy->type==SHIFT. end Actions;
------------------------------------------------------------------------------ -- -- -- GNAT EXAMPLE -- -- -- -- Copyright (C) 2013, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 2, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- -- for more details. You should have received a copy of the GNU General -- -- Public License distributed with GNAT; see file COPYING. If not, write -- -- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, -- -- Boston, MA 02110-1301, USA. -- -- -- -- As a special exception, if other files instantiate generics from this -- -- unit, or you link this unit with other files to produce an executable, -- -- this unit does not by itself cause the resulting executable to be -- -- covered by the GNU General Public License. This exception does not -- -- however invalidate any other reasons why the executable file might be -- -- covered by the GNU Public License. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ with System.Machine_Code; use System.Machine_Code; with Interfaces; use Interfaces; with Ada.Text_IO; use Ada.Text_IO; with Ppc; use Ppc; with Ppc6xx; use Ppc6xx; with Commands; use Commands; pragma Warnings (Off); with System.BB.Board_Parameters; use System.BB.Board_Parameters; with System.Machine_Reset; pragma Warnings (On); package body Mpc83xx is -- Memory map: -- 0000_0000 - 00ff_ffff ( 16 MB): Ram (RWX) -- IMMRBAR ( 1 MB): IO (RW,UC) -- 0010_0000 - 001f_ffff (128 KB): SIL0 (RWX) SIL0_Addr : constant := 16#0100_0000#; -- At 16MB -- Memory map Ram_Base : constant := 16#0000_0000#; procedure Enable_MMU is begin Put_Line ("configure mmu"); -- Initialize I and D bats -- Ram Base: RWX Asm ("mtspr %0,%1", Inputs => (Unsigned_32'Asm_Input ("i", Ibat0u), Unsigned_32'Asm_Input ("r", Ram_Base or BL_16MB or Vs_Mask)), Volatile => True); Asm ("mtspr %0,%1", Inputs => (Unsigned_32'Asm_Input ("i", Ibat0l), Unsigned_32'Asm_Input ("r", Ram_Base or WIMG_CE or Pp_RO)), Volatile => True); Asm ("mtspr %0,%1", Inputs => (Unsigned_32'Asm_Input ("i", Dbat0u), Unsigned_32'Asm_Input ("r", Ram_Base or BL_32MB or Vs_Mask)), Volatile => True); Asm ("mtspr %0,%1", Inputs => (Unsigned_32'Asm_Input ("i", Dbat0l), Unsigned_32'Asm_Input ("r", Ram_Base or WIMG_WB or Pp_RW)), Volatile => True); -- IMMRBAR: RW Asm ("mtspr %0,%1", Inputs => (Unsigned_32'Asm_Input ("i", Dbat2u), Unsigned_32'Asm_Input ("r", IMMRBAR or BL_1MB or Vs_Mask)), Volatile => True); Asm ("mtspr %0,%1", Inputs => (Unsigned_32'Asm_Input ("i", Dbat2l), Unsigned_32'Asm_Input ("r", IMMRBAR or WIMG_UC or Pp_RW)), Volatile => True); -- SIL4 Asm ("mtspr %0,%1", Inputs => (Unsigned_32'Asm_Input ("i", Ibat3u), Unsigned_32'Asm_Input ("r", 0 or BL_128KB or Vp_Mask)), Volatile => True); Asm ("mtspr %0,%1", Inputs => (Unsigned_32'Asm_Input ("i", Ibat3l), Unsigned_32'Asm_Input ("r", SIL0_Addr or WIMG_CE or Pp_RO)), Volatile => True); Asm ("mtspr %0,%1", Inputs => (Unsigned_32'Asm_Input ("i", Dbat3u), Unsigned_32'Asm_Input ("r", 0 or BL_128KB or Vp_Mask)), Volatile => True); Asm ("mtspr %0,%1", Inputs => (Unsigned_32'Asm_Input ("i", Dbat3l), Unsigned_32'Asm_Input ("r", SIL0_Addr or WIMG_WB or Pp_RW)), Volatile => True); Put_Line ("Clear SR"); -- Clear SR Asm ("mtsr 0,%0", Inputs => (Unsigned_32'Asm_Input ("r", 0)), Volatile => True); Asm ("mtsr 1,%0", Inputs => (Unsigned_32'Asm_Input ("r", 0)), Volatile => True); Asm ("mtsr 2,%0", Inputs => (Unsigned_32'Asm_Input ("r", 0)), Volatile => True); Asm ("mtsr 3,%0", Inputs => (Unsigned_32'Asm_Input ("r", 0)), Volatile => True); Asm ("mtsr 4,%0", Inputs => (Unsigned_32'Asm_Input ("r", 0)), Volatile => True); Asm ("mtsr 5,%0", Inputs => (Unsigned_32'Asm_Input ("r", 0)), Volatile => True); Asm ("mtsr 6,%0", Inputs => (Unsigned_32'Asm_Input ("r", 0)), Volatile => True); Asm ("mtsr 7,%0", Inputs => (Unsigned_32'Asm_Input ("r", 0)), Volatile => True); Asm ("mtsr 8,%0", Inputs => (Unsigned_32'Asm_Input ("r", 0)), Volatile => True); Asm ("mtsr 9,%0", Inputs => (Unsigned_32'Asm_Input ("r", 0)), Volatile => True); Asm ("mtsr 10,%0", Inputs => (Unsigned_32'Asm_Input ("r", 0)), Volatile => True); Asm ("mtsr 11,%0", Inputs => (Unsigned_32'Asm_Input ("r", 0)), Volatile => True); Asm ("mtsr 12,%0", Inputs => (Unsigned_32'Asm_Input ("r", 0)), Volatile => True); Asm ("mtsr 13,%0", Inputs => (Unsigned_32'Asm_Input ("r", 0)), Volatile => True); Asm ("mtsr 14,%0", Inputs => (Unsigned_32'Asm_Input ("r", 0)), Volatile => True); Asm ("mtsr 15,%0", Inputs => (Unsigned_32'Asm_Input ("r", 0)), Volatile => True); Put_Line ("Enable MMU"); -- Enable MMU declare Msr : Unsigned_32; begin Msr := Get_Msr; Msr := Msr or MSR_IR or MSR_DR; Asm ("mtmsr %0", Inputs => Unsigned_32'Asm_Input ("r", Msr), Volatile => True); Asm ("isync", Volatile => True); end; end Enable_MMU; Commands : aliased Command_List := (1, (1 => (new String'("mmu - Switch MMU on"), Enable_MMU'Access)), null); begin Register_Commands (Commands'Access); end Mpc83xx;
pragma Ada_2012; pragma Style_Checks (Off); pragma Warnings ("U"); with Interfaces.C; use Interfaces.C; with sys_ustdint_h; package vl53l1_platform_h is -- skipped anonymous struct anon_anon_1 type VL53L1_Dev_t is record dummy : aliased sys_ustdint_h.uint32_t; -- ../platform/vl53l1_platform.h:19 end record with Convention => C_Pass_By_Copy; -- ../platform/vl53l1_platform.h:20 type VL53L1_DEV is access all VL53L1_Dev_t; -- ../platform/vl53l1_platform.h:22 function VL53L1_WriteMulti (dev : VL53L1_DEV; index : sys_ustdint_h.uint16_t; pdata : access sys_ustdint_h.uint8_t; count : sys_ustdint_h.uint32_t) return sys_ustdint_h.int8_t -- ../platform/vl53l1_platform.h:27 with Import => True, Convention => C, External_Name => "VL53L1_WriteMulti"; function VL53L1_ReadMulti (dev : VL53L1_DEV; index : sys_ustdint_h.uint16_t; pdata : access sys_ustdint_h.uint8_t; count : sys_ustdint_h.uint32_t) return sys_ustdint_h.int8_t -- ../platform/vl53l1_platform.h:35 with Import => True, Convention => C, External_Name => "VL53L1_ReadMulti"; function VL53L1_WrByte (dev : VL53L1_DEV; index : sys_ustdint_h.uint16_t; data : sys_ustdint_h.uint8_t) return sys_ustdint_h.int8_t -- ../platform/vl53l1_platform.h:43 with Import => True, Convention => C, External_Name => "VL53L1_WrByte"; function VL53L1_WrWord (dev : VL53L1_DEV; index : sys_ustdint_h.uint16_t; data : sys_ustdint_h.uint16_t) return sys_ustdint_h.int8_t -- ../platform/vl53l1_platform.h:50 with Import => True, Convention => C, External_Name => "VL53L1_WrWord"; function VL53L1_WrDWord (dev : VL53L1_DEV; index : sys_ustdint_h.uint16_t; data : sys_ustdint_h.uint32_t) return sys_ustdint_h.int8_t -- ../platform/vl53l1_platform.h:57 with Import => True, Convention => C, External_Name => "VL53L1_WrDWord"; function VL53L1_RdByte (dev : VL53L1_DEV; index : sys_ustdint_h.uint16_t; pdata : access sys_ustdint_h.uint8_t) return sys_ustdint_h.int8_t -- ../platform/vl53l1_platform.h:64 with Import => True, Convention => C, External_Name => "VL53L1_RdByte"; function VL53L1_RdWord (dev : VL53L1_DEV; index : sys_ustdint_h.uint16_t; pdata : access sys_ustdint_h.uint16_t) return sys_ustdint_h.int8_t -- ../platform/vl53l1_platform.h:71 with Import => True, Convention => C, External_Name => "VL53L1_RdWord"; function VL53L1_RdDWord (dev : VL53L1_DEV; index : sys_ustdint_h.uint16_t; pdata : access sys_ustdint_h.uint32_t) return sys_ustdint_h.int8_t -- ../platform/vl53l1_platform.h:78 with Import => True, Convention => C, External_Name => "VL53L1_RdDWord"; function VL53L1_WaitMs (dev : VL53L1_DEV; wait_ms : sys_ustdint_h.int32_t) return sys_ustdint_h.int8_t -- ../platform/vl53l1_platform.h:85 with Import => True, Convention => C, External_Name => "VL53L1_WaitMs"; end vl53l1_platform_h;
with Ada.Text_IO; procedure Euler17 is Word_Lengths : array(Natural range <>) of Natural := ( String'("")'Length, String'("one")'Length, String'("two")'Length, String'("three")'Length, String'("four")'Length, String'("five")'Length, String'("six")'Length, String'("seven")'Length, String'("eight")'Length, String'("nine")'Length, String'("ten")'Length, String'("eleven")'Length, String'("twelve")'Length, String'("thirteen")'Length, String'("fourteen")'Length, String'("fifteen")'Length, String'("sixteen")'Length, String'("seventeen")'Length, String'("eighteen")'Length, String'("nineteen")'Length); Word_Ty_Lengths : array(Natural range <>) of Natural := (String'("")'Length, String'("")'Length, String'("twenty")'Length, String'("thirty")'Length, String'("forty")'Length, String'("fifty")'Length, String'("sixty")'Length, String'("seventy")'Length, String'("eighty")'Length, String'("ninety")'Length); function Word_Length(N : Natural) return Natural is Sum : Natural; begin if N <= 19 then return Word_Lengths(N); elsif N <= 99 then return Word_Ty_Lengths(N / 10) + Word_Lengths(N mod 10); elsif N = 1000 then return String'("onethousand")'Length; else Sum := Word_Lengths(N / 100) + String'("hundred")'Length; if N mod 100 > 0 then Sum := Sum + String'("and")'Length + Word_Length(N mod 100); end if; return Sum; end if; end; Sum : Natural := 0; begin for X in 1 .. 1000 loop Sum := Sum + Word_Length(X); end loop; Ada.Text_IO.Put_Line(Integer'Image(Sum)); end;
-- This spec has been automatically generated from STM32WL5x_CM0P.svd pragma Restrictions (No_Elaboration_Code); pragma Ada_2012; pragma Style_Checks (Off); with HAL; with System; package STM32_SVD.DMA is pragma Preelaborate; --------------- -- Registers -- --------------- -- interrupt status register type ISR_Register is record -- Read-only. global interrupt flag for channel 1 GIF1 : Boolean; -- Read-only. transfer complete (TC) flag for channel 1 TCIF1 : Boolean; -- Read-only. half transfer (HT) flag for channel 1 HTIF1 : Boolean; -- Read-only. transfer error (TE) flag for channel 1 TEIF1 : Boolean; -- Read-only. global interrupt flag for channel 2 GIF2 : Boolean; -- Read-only. transfer complete (TC) flag for channel 2 TCIF2 : Boolean; -- Read-only. half transfer (HT) flag for channel 2 HTIF2 : Boolean; -- Read-only. transfer error (TE) flag for channel 2 TEIF2 : Boolean; -- Read-only. global interrupt flag for channel 3 GIF3 : Boolean; -- Read-only. transfer complete (TC) flag for channel 3 TCIF3 : Boolean; -- Read-only. half transfer (HT) flag for channel 3 HTIF3 : Boolean; -- Read-only. transfer error (TE) flag for channel 3 TEIF3 : Boolean; -- Read-only. global interrupt flag for channel 4 GIF4 : Boolean; -- Read-only. transfer complete (TC) flag for channel 4 TCIF4 : Boolean; -- Read-only. half transfer (HT) flag for channel 4 HTIF4 : Boolean; -- Read-only. transfer error (TE) flag for channel 4 TEIF4 : Boolean; -- Read-only. global interrupt flag for channel 5 GIF5 : Boolean; -- Read-only. transfer complete (TC) flag for channel 5 TCIF5 : Boolean; -- Read-only. half transfer (HT) flag for channel 5 HTIF5 : Boolean; -- Read-only. transfer error (TE) flag for channel 5 TEIF5 : Boolean; -- Read-only. global interrupt flag for channel 6 GIF6 : Boolean; -- Read-only. transfer complete (TC) flag for channel 6 TCIF6 : Boolean; -- Read-only. half transfer (HT) flag for channel 6 HTIF6 : Boolean; -- Read-only. transfer error (TE) flag for channel 6 TEIF6 : Boolean; -- Read-only. global interrupt flag for channel 7 GIF7 : Boolean; -- Read-only. transfer complete (TC) flag for channel 7 TCIF7 : Boolean; -- Read-only. half transfer (HT) flag for channel 7 HTIF7 : Boolean; -- Read-only. transfer error (TE) flag for channel 7 TEIF7 : Boolean; -- unspecified Reserved_28_31 : HAL.UInt4; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for ISR_Register use record GIF1 at 0 range 0 .. 0; TCIF1 at 0 range 1 .. 1; HTIF1 at 0 range 2 .. 2; TEIF1 at 0 range 3 .. 3; GIF2 at 0 range 4 .. 4; TCIF2 at 0 range 5 .. 5; HTIF2 at 0 range 6 .. 6; TEIF2 at 0 range 7 .. 7; GIF3 at 0 range 8 .. 8; TCIF3 at 0 range 9 .. 9; HTIF3 at 0 range 10 .. 10; TEIF3 at 0 range 11 .. 11; GIF4 at 0 range 12 .. 12; TCIF4 at 0 range 13 .. 13; HTIF4 at 0 range 14 .. 14; TEIF4 at 0 range 15 .. 15; GIF5 at 0 range 16 .. 16; TCIF5 at 0 range 17 .. 17; HTIF5 at 0 range 18 .. 18; TEIF5 at 0 range 19 .. 19; GIF6 at 0 range 20 .. 20; TCIF6 at 0 range 21 .. 21; HTIF6 at 0 range 22 .. 22; TEIF6 at 0 range 23 .. 23; GIF7 at 0 range 24 .. 24; TCIF7 at 0 range 25 .. 25; HTIF7 at 0 range 26 .. 26; TEIF7 at 0 range 27 .. 27; Reserved_28_31 at 0 range 28 .. 31; end record; -- interrupt flag clear register type IFCR_Register is record -- Write-only. global interrupt flag clear for channel 1 GIF1 : Boolean := False; -- Write-only. transfer complete flag clear for channel 1 TCIF1 : Boolean := False; -- Write-only. half transfer flag clear for channel 1 HTIF1 : Boolean := False; -- Write-only. transfer error flag clear for channel 1 TEIF1 : Boolean := False; -- Write-only. global interrupt flag clear for channel 2 GIF2 : Boolean := False; -- Write-only. transfer complete flag clear for channel 2 TCIF2 : Boolean := False; -- Write-only. half transfer flag clear for channel 2 HTIF2 : Boolean := False; -- Write-only. transfer error flag clear for channel 2 TEIF2 : Boolean := False; -- Write-only. global interrupt flag clear for channel 3 GIF3 : Boolean := False; -- Write-only. transfer complete flag clear for channel 3 TCIF3 : Boolean := False; -- Write-only. half transfer flag clear for channel 3 HTIF3 : Boolean := False; -- Write-only. transfer error flag clear for channel 3 TEIF3 : Boolean := False; -- Write-only. global interrupt flag clear for channel 4 GIF4 : Boolean := False; -- Write-only. transfer complete flag clear for channel 4 TCIF4 : Boolean := False; -- Write-only. half transfer flag clear for channel 4 HTIF4 : Boolean := False; -- Write-only. transfer error flag clear for channel 4 TEIF4 : Boolean := False; -- Write-only. global interrupt flag clear for channel 5 GIF5 : Boolean := False; -- Write-only. transfer complete flag clear for channel 5 TCIF5 : Boolean := False; -- Write-only. half transfer flag clear for channel 5 HTIF5 : Boolean := False; -- Write-only. transfer error flag clear for channel 5 TEIF5 : Boolean := False; -- Write-only. global interrupt flag clear for channel 6 GIF6 : Boolean := False; -- Write-only. transfer complete flag clear for channel 6 TCIF6 : Boolean := False; -- Write-only. half transfer flag clear for channel 6 HTIF6 : Boolean := False; -- Write-only. transfer error flag clear for channel 6 TEIF6 : Boolean := False; -- Write-only. global interrupt flag clear for channel 7 GIF7 : Boolean := False; -- Write-only. transfer complete flag clear for channel 7 TCIF7 : Boolean := False; -- Write-only. half transfer flag clear for channel 7 HTIF7 : Boolean := False; -- Write-only. transfer error flag clear for channel 7 TEIF7 : Boolean := False; -- unspecified Reserved_28_31 : HAL.UInt4 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for IFCR_Register use record GIF1 at 0 range 0 .. 0; TCIF1 at 0 range 1 .. 1; HTIF1 at 0 range 2 .. 2; TEIF1 at 0 range 3 .. 3; GIF2 at 0 range 4 .. 4; TCIF2 at 0 range 5 .. 5; HTIF2 at 0 range 6 .. 6; TEIF2 at 0 range 7 .. 7; GIF3 at 0 range 8 .. 8; TCIF3 at 0 range 9 .. 9; HTIF3 at 0 range 10 .. 10; TEIF3 at 0 range 11 .. 11; GIF4 at 0 range 12 .. 12; TCIF4 at 0 range 13 .. 13; HTIF4 at 0 range 14 .. 14; TEIF4 at 0 range 15 .. 15; GIF5 at 0 range 16 .. 16; TCIF5 at 0 range 17 .. 17; HTIF5 at 0 range 18 .. 18; TEIF5 at 0 range 19 .. 19; GIF6 at 0 range 20 .. 20; TCIF6 at 0 range 21 .. 21; HTIF6 at 0 range 22 .. 22; TEIF6 at 0 range 23 .. 23; GIF7 at 0 range 24 .. 24; TCIF7 at 0 range 25 .. 25; HTIF7 at 0 range 26 .. 26; TEIF7 at 0 range 27 .. 27; Reserved_28_31 at 0 range 28 .. 31; end record; subtype CCR_PSIZE_Field is HAL.UInt2; subtype CCR_MSIZE_Field is HAL.UInt2; subtype CCR_PL_Field is HAL.UInt2; -- channel x configuration register type CCR_Register is record -- channel enable EN : Boolean := False; -- transfer complete interrupt enable TCIE : Boolean := False; -- half transfer interrupt enable HTIE : Boolean := False; -- transfer error interrupt enable TEIE : Boolean := False; -- data transfer direction DIR : Boolean := False; -- circular mode CIRC : Boolean := False; -- peripheral increment mode PINC : Boolean := False; -- memory increment mode MINC : Boolean := False; -- peripheral size PSIZE : CCR_PSIZE_Field := 16#0#; -- memory size MSIZE : CCR_MSIZE_Field := 16#0#; -- priority level PL : CCR_PL_Field := 16#0#; -- memory-to-memory mode MEM2MEM : Boolean := False; -- unspecified Reserved_15_16 : HAL.UInt2 := 16#0#; -- ecure mode SECM : Boolean := False; -- ecurity of the DMA transfer from the source SSEC : Boolean := False; -- ecurity of the DMA transfer to the destination DSEC : Boolean := False; -- rivileged mode PRIV : Boolean := False; -- unspecified Reserved_21_31 : HAL.UInt11 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for CCR_Register use record EN at 0 range 0 .. 0; TCIE at 0 range 1 .. 1; HTIE at 0 range 2 .. 2; TEIE at 0 range 3 .. 3; DIR at 0 range 4 .. 4; CIRC at 0 range 5 .. 5; PINC at 0 range 6 .. 6; MINC at 0 range 7 .. 7; PSIZE at 0 range 8 .. 9; MSIZE at 0 range 10 .. 11; PL at 0 range 12 .. 13; MEM2MEM at 0 range 14 .. 14; Reserved_15_16 at 0 range 15 .. 16; SECM at 0 range 17 .. 17; SSEC at 0 range 18 .. 18; DSEC at 0 range 19 .. 19; PRIV at 0 range 20 .. 20; Reserved_21_31 at 0 range 21 .. 31; end record; subtype CNDTR_NDT_Field is HAL.UInt18; -- channel x number of data to transfer register type CNDTR_Register is record -- number of data to transfer (0 to 218 - 1) NDT : CNDTR_NDT_Field := 16#0#; -- unspecified Reserved_18_31 : HAL.UInt14 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for CNDTR_Register use record NDT at 0 range 0 .. 17; Reserved_18_31 at 0 range 18 .. 31; end record; ----------------- -- Peripherals -- ----------------- -- Direct memory access controller type DMA_Peripheral is record -- interrupt status register ISR : aliased ISR_Register; -- interrupt flag clear register IFCR : aliased IFCR_Register; -- channel x configuration register CCR1 : aliased CCR_Register; -- channel x number of data to transfer register CNDTR1 : aliased CNDTR_Register; -- channel x peripheral address register CPAR1 : aliased HAL.UInt32; -- channel x memory address register CMAR1 : aliased HAL.UInt32; -- channel x configuration register CCR2 : aliased CCR_Register; -- channel x number of data to transfer register CNDTR2 : aliased CNDTR_Register; -- channel x peripheral address register CPAR2 : aliased HAL.UInt32; -- channel x memory address register CMAR2 : aliased HAL.UInt32; -- channel x configuration register CCR3 : aliased CCR_Register; -- channel x number of data to transfer register CNDTR3 : aliased CNDTR_Register; -- channel x peripheral address register CPAR3 : aliased HAL.UInt32; -- channel x memory address register CMAR3 : aliased HAL.UInt32; -- channel x configuration register CCR4 : aliased CCR_Register; -- channel x number of data to transfer register CNDTR4 : aliased CNDTR_Register; -- channel x peripheral address register CPAR4 : aliased HAL.UInt32; -- channel x memory address register CMAR4 : aliased HAL.UInt32; -- channel x configuration register CCR5 : aliased CCR_Register; -- channel x number of data to transfer register CNDTR5 : aliased CNDTR_Register; -- channel x peripheral address register CPAR5 : aliased HAL.UInt32; -- channel x memory address register CMAR5 : aliased HAL.UInt32; -- channel x configuration register CCR6 : aliased CCR_Register; -- channel x number of data to transfer register CNDTR6 : aliased CNDTR_Register; -- channel x peripheral address register CPAR6 : aliased HAL.UInt32; -- channel x memory address register CMAR6 : aliased HAL.UInt32; -- channel x configuration register CCR7 : aliased CCR_Register; -- channel x number of data to transfer register CNDTR7 : aliased CNDTR_Register; -- channel x peripheral address register CPAR7 : aliased HAL.UInt32; -- channel x memory address register CMAR7 : aliased HAL.UInt32; end record with Volatile; for DMA_Peripheral use record ISR at 16#0# range 0 .. 31; IFCR at 16#4# range 0 .. 31; CCR1 at 16#8# range 0 .. 31; CNDTR1 at 16#C# range 0 .. 31; CPAR1 at 16#10# range 0 .. 31; CMAR1 at 16#14# range 0 .. 31; CCR2 at 16#1C# range 0 .. 31; CNDTR2 at 16#20# range 0 .. 31; CPAR2 at 16#24# range 0 .. 31; CMAR2 at 16#28# range 0 .. 31; CCR3 at 16#30# range 0 .. 31; CNDTR3 at 16#34# range 0 .. 31; CPAR3 at 16#38# range 0 .. 31; CMAR3 at 16#3C# range 0 .. 31; CCR4 at 16#44# range 0 .. 31; CNDTR4 at 16#48# range 0 .. 31; CPAR4 at 16#4C# range 0 .. 31; CMAR4 at 16#50# range 0 .. 31; CCR5 at 16#58# range 0 .. 31; CNDTR5 at 16#5C# range 0 .. 31; CPAR5 at 16#60# range 0 .. 31; CMAR5 at 16#64# range 0 .. 31; CCR6 at 16#6C# range 0 .. 31; CNDTR6 at 16#70# range 0 .. 31; CPAR6 at 16#74# range 0 .. 31; CMAR6 at 16#78# range 0 .. 31; CCR7 at 16#80# range 0 .. 31; CNDTR7 at 16#84# range 0 .. 31; CPAR7 at 16#88# range 0 .. 31; CMAR7 at 16#8C# range 0 .. 31; end record; -- Direct memory access controller DMA1_Periph : aliased DMA_Peripheral with Import, Address => DMA1_Base; -- Direct memory access controller DMA2_Periph : aliased DMA_Peripheral with Import, Address => DMA2_Base; end STM32_SVD.DMA;
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS -- -- -- -- S Y S T E M . T R A C E S . S E N D -- -- -- -- B o d y -- -- -- -- Copyright (C) 2001-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. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- This version is for VxWorks targets. -- Trace information is sent to WindView using the wvEvent function. -- Note that wvEvent is from the VxWorks API. -- When adding a new event, just give an Id to then event, and then modify -- the WindView events database. -- Refer to WindView User's Guide for more details on how to add new events -- to the events database. ---------------- -- Send_Trace -- ---------------- -- This procedure formats the string, maps the event Id to an Id -- recognized by WindView, and send the event using wvEvent separate (System.Traces.Format) procedure Send_Trace (Id : Trace_T; Info : String) is procedure Wv_Event (Id : Integer; Buffer : System.Address; Size : Integer); pragma Import (C, Wv_Event, "wvEvent"); Info_Trace : String_Trace; Id_Event : Integer; begin Info_Trace := Format_Trace (Info); case Id is when M_Accept_Complete => Id_Event := 30000; when M_Select_Else => Id_Event := 30001; when M_RDV_Complete => Id_Event := 30002; when M_Call_Complete => Id_Event := 30003; when M_Delay => Id_Event := 30004; when E_Kill => Id_Event := 30005; when E_Missed => Id_Event := 30006; when E_Timeout => Id_Event := 30007; when W_Call => Id_Event := 30010; when W_Accept => Id_Event := 30011; when W_Select => Id_Event := 30012; when W_Completion => Id_Event := 30013; when W_Delay => Id_Event := 30014; when WT_Select => Id_Event := 30015; when WT_Call => Id_Event := 30016; when WT_Completion => Id_Event := 30017; when WU_Delay => Id_Event := 30018; when PO_Call => Id_Event := 30020; when POT_Call => Id_Event := 30021; when PO_Run => Id_Event := 30022; when PO_Lock => Id_Event := 30023; when PO_Unlock => Id_Event := 30024; when PO_Done => Id_Event := 30025; when T_Create => Id_Event := 30030; when T_Activate => Id_Event := 30031; when T_Abort => Id_Event := 30032; when T_Terminate => Id_Event := 30033; -- Unrecognized events are given the special Id_Event value 29999 when others => Id_Event := 29999; end case; Wv_Event (Id_Event, Info_Trace'Address, Max_Size); end Send_Trace;
-- This file is covered by the Internet Software Consortium (ISC) License -- Reference: ../License.txt with Definitions; use Definitions; with Port_Specification; private with HelperText; private with Ada.Containers.Hashed_Maps; package Specification_Parser is package PSP renames Port_Specification; -- Parse the port specification file and extract the data into the specification record. procedure parse_specification_file (dossier : String; spec : out PSP.Portspecs; success : out Boolean; opsys_focus : supported_opsys; arch_focus : supported_arch; stop_at_targets : Boolean; extraction_dir : String := ""); private package HT renames HelperText; package CON renames Ada.Containers; type spec_array is (not_array, def, sdesc, sites, distfile, spkgs, vopts, ext_head, ext_tail, option_on, broken, var_opsys, var_arch, extra_rundep, opt_descr, opt_group, b_deps, r_deps, br_deps, c_uses); type spec_singlet is (not_singlet, namebase, version, revision, epoch, keywords, variants, contacts, dl_groups, dist_subdir, df_index, opt_avail, opt_standard, exc_opsys, inc_opsys, exc_arch, ext_only, ext_zip, ext_7z, ext_lha, ext_dirty, distname, skip_build, single_job, destdir_env, build_wrksrc, makefile, destdirname, make_args, make_env, build_target, cflags, cxxflags, cppflags, ldflags, homepage, skip_install, opt_level, patchfiles, uses, sub_list, sub_files, config_args, config_env, build_deps, buildrun_deps, run_deps, cmake_args, qmake_args, info, install_tgt, patch_wrksrc, patch_strip, patchfiles_strip, extra_patches, must_configure, configure_wrksrc, configure_script, gnu_cfg_prefix, configure_target, config_outsource, deprecated, expiration, install_wrksrc, plist_sub, prefix, licenses, users, groups, catchall, shift_install, diode, lic_scheme, lic_file, lic_name, skip_ccache, test_target, mandirs, invalid_rpath, debugging, broken_ssl, test_args, gnome_comp, rc_scripts, ug_subpackage, broken_mysql, broken_pgsql, og_radio, og_restrict, og_unlimited, ext_deb, test_env, generated, xorg_comp, sdl_comp, phpext, job_limit, so_version, lic_terms, lic_awk, lic_source, repsucks, killdog, cgo_conf, cgo_build, cgo_inst, cgo_cargs, cgo_bargs, cgo_iargs, cgo_feat); type spec_target is (not_target, target_title, target_body, bad_target); type type_category is (cat_none, cat_array, cat_singlet, cat_target, cat_option, cat_file); missing_definition : exception; bad_modifier : exception; expansion_too_long : exception; mistabbed : exception; mistabbed_40 : exception; integer_expected : exception; extra_spaces : exception; duplicate_key : exception; generic_format : exception; missing_file : exception; -- This looks for the pattern ${something}. If not found, the original value is returned. -- Otherwise it looks up "something". If that's not a definition, the missing_definition -- exception is thrown, otherwise it's expanded. If the $something contains a modifier -- (column followed by code) and that modifier is unknown or misused, the bad_modifier -- exception is thrown. Upon cycle, repeat until no more patterns found, then return -- final expanded value. If the length of the expanded value exceeds 512 bytes, the -- expansion_too_long exception is thrown. function expand_value (specification : PSP.Portspecs; value : String) return String; -- If the line represents a recognized array type, indicate which one, -- otherwise return "not_array" function determine_array (line : String) return spec_array; -- If the line represents a recognized singlet type, indicate which one, -- otherwise return "not_singlet" function determine_singlet (line : String) return spec_singlet; -- Returns "not_helper_format" if it's not in option format -- Returns "not_supported_helper" if it's not a recognized (supported) helper -- Otherwise it returns the detected spec_option function determine_option (line : String) return PSP.spec_option; -- Returns empty string if it's not a recognized option, otherwise it returns -- The option name. If 5-tabs detected, return previous name (given). function extract_option_name (spec : PSP.Portspecs; line : String; last_name : HT.Text) return String; -- If the line represents the makefile target definition or it's following body, -- return which one, otherwise return "not_target". -- Exception: if formatted as a target def. which is not recognized, return "bad_target" function determine_target (spec : PSP.Portspecs; line : String; last_seen : type_category) return spec_target; -- Returns true if the given line indicates a package containing a file follows function is_file_capsule (line : String) return Boolean; -- Given a string validated as a file capsule, return the size of the file function retrieve_file_size (capsule_label : String) return Natural; -- Given a string validated as a file capsule, return the relative path for extracted file function retrieve_file_name (capsule_label : String) return String; -- Returns everything following the tab(s) until end of line. If last tab doesn't align -- text with column 24, the mistabbed exception is thrown. function retrieve_single_value (spec : PSP.Portspecs; line : String) return String; -- Returns everything following the tab(s) until end of line. If last tab doesn't align -- text with column 40, the mistabbed exception is thrown. function retrieve_single_option_value (spec : PSP.Portspecs; line : String) return String; -- Calls retrieve_single_value and tries to convert to a natural number. function retrieve_single_integer (spec : PSP.Portspecs; line : String) return Natural; -- Returns the key for array item definition lines. function retrieve_key (line : String; previous_index : HT.Text) return HT.Text; -- Line may contain spaces, and each space is considered a single item on a list. -- This iterates through the value with space delimiters. procedure build_list (spec : in out PSP.Portspecs; field : PSP.spec_field; line : String); -- Same as build_list but for options. -- Handles all valid options (since only one isn't a list) procedure build_list (spec : in out PSP.Portspecs; field : PSP.spec_option; option : String; line : String); -- essentially a singlet, but the varname is used a key for a name-value pair -- Spaces are allowed only if quoted (single value) procedure build_nvpair (spec : in out PSP.Portspecs; line : String); -- Line may contain spaces and they are considered part of an entire string procedure build_string (spec : in out PSP.Portspecs; field : PSP.spec_field; line : String); -- For boolean variables, ensure "yes" was defined and pass to specification record. procedure set_boolean (spec : in out PSP.Portspecs; field : PSP.spec_field; line : String); -- Pass integer variables to specification record procedure set_natural (spec : in out PSP.Portspecs; field : PSP.spec_field; line : String); -- Line may contain spaces, and each space is considered a single item on a list. -- This iterates through the value with space delimiters to build a group list. procedure build_group_list (spec : in out PSP.Portspecs; field : PSP.spec_field; key : String; value : String); -- Return true if all final validity checks pass function late_validity_check_error (spec : PSP.Portspecs) return String; -- Returns new filename if it matches dynamic pkg-message filename or an extra -- patch, otherwise return blank function tranform_filename (filename : String; match_opsys : String; match_arch : String) return String; -- Returns True if conditional variable value is a valid name pair. Validity is determined -- by obtaining a singlet value that is within the accepted valued, and having no -- non-quoted spaces in the string. function valid_conditional_variable (candidate : String) return Boolean; -- Look for ${pattern} that match known definitions and replace with the payload if -- found. Don't do anything if ${pattern} matches no known definition. -- It works with modifiers too. If the skip_transform value is false, there will -- not be any transformation. The logic is that that is done only on the final buildsheet -- which already has had the transformation done on it, so avoid a lot of calculations that -- result in no change. function transform_target_line (spec : PSP.Portspecs; line : String; skip_transform : Boolean) return String; -- loads raven.versions.mk and returns result of "make -V <varname>" function extract_version (varname : String) return String; -- loads raven.information.mk and returns result of "make -V <varname>" function extract_information (varname : String) return String; -- Throws missing_file exception if the indicated patch file or sub file does not exist procedure verify_extra_file_exists (spec : PSP.Portspecs; specfile : String; line : String; is_option : Boolean; sub_file : Boolean); -- Handle GITHUB_PRIVATE special case procedure transform_download_sites (site : in out HT.Text); end Specification_Parser;
-- SPDX-FileCopyrightText: 2019-2021 Max Reznik <reznikmm@gmail.com> -- -- SPDX-License-Identifier: MIT ------------------------------------------------------------- with Program.Complete_Contexts.Assignment_Statements; with Program.Complete_Contexts.Call_Statements; with Program.Complete_Contexts.Case_Statements; with Program.Element_Filters; with Program.Element_Vectors; with Program.Elements.Assignment_Statements; with Program.Elements.Call_Statements; with Program.Elements.Component_Declarations; with Program.Elements.Defining_Identifiers; with Program.Elements.Defining_Names; with Program.Elements.Discriminant_Specifications; with Program.Elements.Enumeration_Literal_Specifications; with Program.Elements.Exception_Handlers; with Program.Elements.Function_Declarations; with Program.Elements.Identifiers; with Program.Elements.Incomplete_Type_Definitions; with Program.Elements.Object_Access_Types; with Program.Elements.Object_Declarations; with Program.Elements.Package_Declarations; with Program.Elements.Parameter_Specifications; with Program.Elements.Procedure_Body_Declarations; with Program.Elements.Procedure_Declarations; with Program.Elements.Record_Definitions; with Program.Elements.Record_Types; with Program.Elements.Use_Clauses; with Program.Elements.With_Clauses; with Program.Elements.Variant_Parts; with Program.Elements.Variants; with Program.Elements; with Program.Interpretations; with Program.Lexical_Elements; with Program.Node_Symbols; with Program.Resolvers.Basic; with Program.Resolvers.Name_In_Region; with Program.Safe_Element_Visitors; with Program.Symbols; with Program.Type_Resolvers; with Program.Elements.Case_Statements; package body Program.Resolvers is package Visitors is type Snapshot_Registry is limited interface; type Snapshot_Registry_Access is access all Snapshot_Registry'Class with Storage_Size => 0; not overriding procedure Put_Public_View (Self : in out Snapshot_Registry; Name : Program.Symbols.Symbol; Value : Program.Visibility.Snapshot_Access) is abstract; not overriding procedure Push (Self : in out Snapshot_Registry; Name : Program.Symbols.Symbol) is abstract; not overriding procedure Pop (Self : in out Snapshot_Registry) is abstract; type Visitor (Env : not null Program.Visibility.Context_Access; Unit : not null Program.Elements.Element_Access; Clause : Program.Element_Vectors.Element_Vector_Access; Setter : not null Program.Cross_Reference_Updaters.Cross_Reference_Updater_Access) is new Program.Resolvers.Basic.Visitor (Env, Setter) with record -- is new Program.Safe_Element_Visitors.Safe_Element_Visitor with record Snapshot_Registry : Snapshot_Registry_Access; Discriminant : Program.Visibility.View; end record; overriding procedure Assignment_Statement (Self : in out Visitor; Element : not null Program.Elements.Assignment_Statements .Assignment_Statement_Access); overriding procedure Call_Statement (Self : in out Visitor; Element : not null Program.Elements.Call_Statements .Call_Statement_Access); overriding procedure Case_Statement (Self : in out Visitor; Element : not null Program.Elements.Case_Statements .Case_Statement_Access); overriding procedure Component_Declaration (Self : in out Visitor; Element : not null Program.Elements.Component_Declarations .Component_Declaration_Access); overriding procedure Discriminant_Specification (Self : in out Visitor; Element : not null Program.Elements.Discriminant_Specifications .Discriminant_Specification_Access); overriding procedure Enumeration_Literal_Specification (Self : in out Visitor; Element : not null Program.Elements.Enumeration_Literal_Specifications .Enumeration_Literal_Specification_Access); overriding procedure Exception_Handler (Self : in out Visitor; Element : not null Program.Elements.Exception_Handlers .Exception_Handler_Access); overriding procedure Function_Declaration (Self : in out Visitor; Element : not null Program.Elements.Function_Declarations .Function_Declaration_Access); overriding procedure Incomplete_Type_Definition (Self : in out Visitor; Element : not null Program.Elements.Incomplete_Type_Definitions .Incomplete_Type_Definition_Access); overriding procedure Object_Access_Type (Self : in out Visitor; Element : not null Program.Elements.Object_Access_Types .Object_Access_Type_Access); overriding procedure Object_Declaration (Self : in out Visitor; Element : not null Program.Elements.Object_Declarations .Object_Declaration_Access); overriding procedure Package_Declaration (Self : in out Visitor; Element : not null Program.Elements.Package_Declarations .Package_Declaration_Access); overriding procedure Parameter_Specification (Self : in out Visitor; Element : not null Program.Elements.Parameter_Specifications .Parameter_Specification_Access); overriding procedure Procedure_Body_Declaration (Self : in out Visitor; Element : not null Program.Elements.Procedure_Body_Declarations .Procedure_Body_Declaration_Access); overriding procedure Procedure_Declaration (Self : in out Visitor; Element : not null Program.Elements.Procedure_Declarations .Procedure_Declaration_Access); overriding procedure Record_Definition (Self : in out Visitor; Element : not null Program.Elements.Record_Definitions .Record_Definition_Access); overriding procedure Record_Type (Self : in out Visitor; Element : not null Program.Elements.Record_Types.Record_Type_Access); overriding procedure Variant (Self : in out Visitor; Element : not null Program.Elements.Variants.Variant_Access); overriding procedure Variant_Part (Self : in out Visitor; Element : not null Program.Elements.Variant_Parts .Variant_Part_Access); end Visitors; package Environment_Level is type Visitor (Unit_Name_Resolver : not null Program.Simple_Resolvers.Simple_Resolver_Access; Setter : not null Program.Cross_Reference_Updaters.Cross_Reference_Updater_Access) is new Program.Safe_Element_Visitors.Safe_Element_Visitor with null record; overriding procedure Package_Declaration (Self : in out Visitor; Element : not null Program.Elements.Package_Declarations .Package_Declaration_Access); overriding procedure Procedure_Body_Declaration (Self : in out Visitor; Element : not null Program.Elements.Procedure_Body_Declarations .Procedure_Body_Declaration_Access); overriding procedure Use_Clause (Self : in out Visitor; Element : not null Program.Elements.Use_Clauses.Use_Clause_Access); overriding procedure With_Clause (Self : in out Visitor; Element : not null Program.Elements.With_Clauses.With_Clause_Access); end Environment_Level; package body Environment_Level is ------------------------- -- Package_Declaration -- ------------------------- overriding procedure Package_Declaration (Self : in out Visitor; Element : not null Program.Elements.Package_Declarations .Package_Declaration_Access) is begin -- Find parent name and resolve it null; end Package_Declaration; -------------------------------- -- Procedure_Body_Declaration -- -------------------------------- overriding procedure Procedure_Body_Declaration (Self : in out Visitor; Element : not null Program.Elements.Procedure_Body_Declarations .Procedure_Body_Declaration_Access) is begin null; -- FIXME: Find parent name and resolve it end Procedure_Body_Declaration; ---------------- -- Use_Clause -- ---------------- overriding procedure Use_Clause (Self : in out Visitor; Element : not null Program.Elements.Use_Clauses.Use_Clause_Access) is begin pragma Assert (not Element.Has_Type); for Name in Element.Clause_Names.Each_Element loop Self.Unit_Name_Resolver.Resolve (Name.Element.To_Expression, Self.Setter); end loop; end Use_Clause; ----------------- -- With_Clause -- ----------------- overriding procedure With_Clause (Self : in out Visitor; Element : not null Program.Elements.With_Clauses.With_Clause_Access) is begin pragma Assert (not Element.Has_Limited); for Name in Element.Clause_Names.Each_Element loop Self.Unit_Name_Resolver.Resolve (Name.Element.To_Expression, Self.Setter); end loop; end With_Clause; end Environment_Level; package Global_Snapshots is type Library_Environment_Access is access all Program.Library_Environments.Library_Environment'Class with Storage_Size => 0; type Snapshot_Registry (Lists : not null Program.Symbol_Lists.Symbol_List_Table_Access; Lib : not null Library_Environment_Access) is new Visitors.Snapshot_Registry with record Parent : Program.Symbol_Lists.Symbol_List; end record; overriding procedure Put_Public_View (Self : in out Snapshot_Registry; Name : Program.Symbols.Symbol; Value : Program.Visibility.Snapshot_Access); overriding procedure Push (Self : in out Snapshot_Registry; Name : Program.Symbols.Symbol); overriding procedure Pop (Self : in out Snapshot_Registry); end Global_Snapshots; package body Global_Snapshots is overriding procedure Put_Public_View (Self : in out Snapshot_Registry; Name : Program.Symbols.Symbol; Value : Program.Visibility.Snapshot_Access) is List : Program.Symbol_Lists.Symbol_List; begin Self.Lists.Find_Or_Create (Self.Parent, Name, List); Self.Lib.Put_Public_View (List, Value); end Put_Public_View; overriding procedure Push (Self : in out Snapshot_Registry; Name : Program.Symbols.Symbol) is Next : Program.Symbol_Lists.Symbol_List; begin Self.Lists.Find_Or_Create (Self.Parent, Name, Next); Self.Parent := Next; end Push; overriding procedure Pop (Self : in out Snapshot_Registry) is begin Self.Parent := Self.Lists.Prefix (Self.Parent); end Pop; end Global_Snapshots; ------------------- -- Resolve_Names -- ------------------- procedure Resolve_Names (Unit : not null Program.Compilation_Units.Compilation_Unit_Access; Unit_Name_Resolver : not null Program.Simple_Resolvers.Simple_Resolver_Access; Lists : in out Program.Symbol_Lists.Symbol_List_Table'Class; Context : not null Program.Visibility.Context_Access; Library : in out Program.Library_Environments.Library_Environment; Setter : not null Program.Cross_Reference_Updaters.Cross_Reference_Updater_Access) is procedure Create_Context (Unit_Name : Program.Symbol_Lists.Symbol_List); -------------------- -- Create_Context -- -------------------- procedure Create_Context (Unit_Name : Program.Symbol_Lists.Symbol_List) is Parent : constant Program.Symbol_Lists.Symbol_List := Lists.Prefix (Unit_Name); begin if Unit.Is_Library_Unit_Declaration then Context.Restore_Snapshot (Library.Public_View (Parent)); else null; -- FIXME end if; end Create_Context; Global : aliased Global_Snapshots.Snapshot_Registry (Lists'Unchecked_Access, Library'Unchecked_Access); Unit_Name : Program.Symbol_Lists.Symbol_List; Element : constant Program.Elements.Element_Access := Unit.Unit_Declaration; Visitor : Visitors.Visitor (Context, Element, Unit.Context_Clause_Elements, Setter); EL : Environment_Level.Visitor (Unit_Name_Resolver, Setter); begin EL.Visit (Element); for Clause in Unit.Context_Clause_Elements.Each_Element loop EL.Visit (Clause.Element); end loop; Program.Node_Symbols.Unit_Full_Name (Lists, Unit, Unit_Name); Create_Context (Unit_Name); Global.Parent := Lists.Prefix (Unit_Name); Visitor.Snapshot_Registry := Global'Unchecked_Access; Element.Visit (Visitor); end Resolve_Names; -------------- -- Visitors -- -------------- package body Visitors is procedure Append_Unit_Use_Clauses (Self : in out Visitor'Class; Element : Program.Elements.Element_Access); ----------------------------- -- Append_Unit_Use_Clauses -- ----------------------------- procedure Append_Unit_Use_Clauses (Self : in out Visitor'Class; Element : Program.Elements.Element_Access) is use type Program.Elements.Element_Access; Clause : Program.Elements.Use_Clauses.Use_Clause_Access; begin if Self.Unit /= Element then -- Return if nested element return; end if; for Item in Self.Clause.Each_Element (Program.Element_Filters.Is_Use_Clause'Access) loop Clause := Item.Element.To_Use_Clause; for Name in Clause.Clause_Names.Each_Element loop declare View : constant Program.Visibility.View := Self.Env.Get_Name_View (Name.Element); begin if Clause.Has_Type then raise Program_Error; else Self.Env.Add_Use_Package (View); end if; end; end loop; end loop; end Append_Unit_Use_Clauses; -------------------------- -- Assignment_Statement -- -------------------------- overriding procedure Assignment_Statement (Self : in out Visitor; Element : not null Program.Elements.Assignment_Statements .Assignment_Statement_Access) is Sets : aliased Program.Interpretations.Context (Self.Env); begin Program.Complete_Contexts.Assignment_Statements.Assignment_Statement (Sets'Unchecked_Access, Self.Setter, Element); end Assignment_Statement; -------------------- -- Call_Statement -- -------------------- overriding procedure Call_Statement (Self : in out Visitor; Element : not null Program.Elements.Call_Statements .Call_Statement_Access) is Sets : aliased Program.Interpretations.Context (Self.Env); begin Program.Complete_Contexts.Call_Statements.Call_Statement (Sets'Unchecked_Access, Self.Setter, Element); end Call_Statement; -------------------- -- Case_Statement -- -------------------- overriding procedure Case_Statement (Self : in out Visitor; Element : not null Program.Elements.Case_Statements .Case_Statement_Access) is Sets : aliased Program.Interpretations.Context (Self.Env); begin Program.Complete_Contexts.Case_Statements.Case_Statement (Sets'Unchecked_Access, Self.Setter, Element); end Case_Statement; --------------------------- -- Component_Declaration -- --------------------------- overriding procedure Component_Declaration (Self : in out Visitor; Element : not null Program.Elements.Component_Declarations .Component_Declaration_Access) is Sets : aliased Program.Interpretations.Context (Self.Env); Has_Default : constant Boolean := Element.Default_Expression.Assigned; Type_View : Program.Visibility.View; Names : constant Program.Elements.Defining_Identifiers .Defining_Identifier_Vector_Access := Element.Names; begin for Name in Names.Each_Element loop declare Symbol : constant Program.Symbols.Symbol := Program.Node_Symbols.Get_Symbol (Name.Element); begin Self.Env.Create_Component (Symbol, Name.Element.To_Defining_Name, Has_Default); Program.Type_Resolvers.Resolve_Type_Definition (Element.Object_Subtype.Subtype_Indication, Self.Env, Self.Setter, Sets'Unchecked_Access, Type_View); Self.Env.Leave_Declarative_Region; Self.Env.Set_Object_Type (Type_View); end; end loop; end Component_Declaration; -------------------------------- -- Discriminant_Specification -- -------------------------------- overriding procedure Discriminant_Specification (Self : in out Visitor; Element : not null Program.Elements.Discriminant_Specifications .Discriminant_Specification_Access) is Sets : aliased Program.Interpretations.Context (Self.Env); Has_Default : constant Boolean := Element.Default_Expression.Assigned; Type_View : Program.Visibility.View; Names : constant Program.Elements.Defining_Identifiers .Defining_Identifier_Vector_Access := Element.Names; begin for Name in Names.Each_Element loop declare Symbol : constant Program.Symbols.Symbol := Program.Node_Symbols.Get_Symbol (Name.Element); begin Self.Env.Create_Component (Symbol, Name.Element.To_Defining_Name, Has_Default); Program.Type_Resolvers.Resolve_Type_Definition (Element.Object_Subtype.To_Element, Self.Env, Self.Setter, Sets'Unchecked_Access, Type_View); Self.Env.Leave_Declarative_Region; Self.Env.Set_Object_Type (Type_View); end; end loop; end Discriminant_Specification; --------------------------------------- -- Enumeration_Literal_Specification -- --------------------------------------- overriding procedure Enumeration_Literal_Specification (Self : in out Visitor; Element : not null Program.Elements.Enumeration_Literal_Specifications .Enumeration_Literal_Specification_Access) is Symbol : constant Program.Symbols.Symbol := Program.Node_Symbols.Get_Symbol (Element.Name); begin if Program.Symbols.Is_Character_Literal (Symbol) then Self.Env.Create_Character_Literal (Symbol, Element.Name, Self.Type_View); else Self.Env.Create_Enumeration_Literal (Symbol, Element.Name, Self.Type_View); end if; end Enumeration_Literal_Specification; -------------------------------- -- Incomplete_Type_Definition -- -------------------------------- overriding procedure Incomplete_Type_Definition (Self : in out Visitor; Element : not null Program.Elements.Incomplete_Type_Definitions .Incomplete_Type_Definition_Access) is pragma Unreferenced (Element); begin Self.Env.Create_Incomplete_Type (Symbol => Program.Node_Symbols.Get_Symbol (Self.Type_Name), Name => Self.Type_Name); Self.Type_View := Self.Env.Latest_View; if Self.Discriminants.Assigned and then Self.Discriminants.Is_Known_Discriminant_Part then declare List : constant Program.Elements.Discriminant_Specifications .Discriminant_Specification_Vector_Access := Self.Discriminants.To_Known_Discriminant_Part.Discriminants; begin for J in List.Each_Element loop J.Element.Visit (Self); end loop; end; end if; Self.Env.Leave_Declarative_Region; end Incomplete_Type_Definition; ------------------------ -- Object_Access_Type -- ------------------------ overriding procedure Object_Access_Type (Self : in out Visitor; Element : not null Program.Elements.Object_Access_Types .Object_Access_Type_Access) is Sets : aliased Program.Interpretations.Context (Self.Env); Type_View : Program.Visibility.View; begin Program.Type_Resolvers.Resolve_Type (Element.Subtype_Indication.Subtype_Mark, Self.Env, Self.Setter, Sets'Unchecked_Access, Type_View); Self.Env.Create_Object_Access_Type (Symbol => Program.Node_Symbols.Get_Symbol (Self.Type_Name), Name => Self.Type_Name, Designated => Type_View); end Object_Access_Type; ------------------------ -- Object_Declaration -- ------------------------ overriding procedure Object_Declaration (Self : in out Visitor; Element : not null Program.Elements.Object_Declarations .Object_Declaration_Access) is Type_View : Program.Visibility.View; Sets : aliased Program.Interpretations.Context (Self.Env); Names : constant Program.Elements.Defining_Identifiers .Defining_Identifier_Vector_Access := Element.Names; begin for Name in Names.Each_Element loop declare Symbol : constant Program.Symbols.Symbol := Program.Node_Symbols.Get_Symbol (Name.Element); begin Self.Env.Create_Variable (Symbol, Name.Element.To_Defining_Name); Program.Type_Resolvers.Resolve_Type_Definition (Element.Object_Subtype.To_Element, Self.Env, Self.Setter, Sets'Unchecked_Access, Type_View); if Element.Initialization_Expression.Assigned then Program.Complete_Contexts.Resolve_To_Expected_Type (Element => Program.Elements.Element_Access (Element.Initialization_Expression), Sets => Sets'Unchecked_Access, Setter => Self.Setter, Expect => Program.Visibility.First_Subtype (Type_View)); end if; Self.Env.Leave_Declarative_Region; Self.Env.Set_Object_Type (Type_View); end; end loop; end Object_Declaration; ------------------------- -- Package_Declaration -- ------------------------- overriding procedure Package_Declaration (Self : in out Visitor; Element : not null Program.Elements.Package_Declarations.Package_Declaration_Access) is Name : constant Program.Elements.Defining_Names.Defining_Name_Access := Element.Name; Symbol : constant Program.Symbols.Symbol := Program.Node_Symbols.Get_Symbol (Name); begin Self.Env.Create_Package (Symbol => Symbol, Name => Name); Self.Append_Unit_Use_Clauses (Element.all'Access); for Cursor in Element.Visible_Declarations.Each_Element loop Cursor.Element.Visit (Self); end loop; Self.Snapshot_Registry.Put_Public_View (Symbol, Self.Env.Create_Snapshot); if not Element.Private_Declarations.Is_Empty then raise Program_Error; end if; Self.Env.Leave_Declarative_Region; end Package_Declaration; ----------------------------- -- Parameter_Specification -- ----------------------------- overriding procedure Parameter_Specification (Self : in out Visitor; Element : not null Program.Elements.Parameter_Specifications .Parameter_Specification_Access) is Sets : aliased Program.Interpretations.Context (Self.Env); Modes : constant array (Boolean, Boolean) of Program.Visibility.Parameter_Mode := (False => (False => Program.Visibility.In_Mode, True => Program.Visibility.Out_Mode), True => (False => Program.Visibility.In_Mode, True => Program.Visibility.In_Out_Mode)); Mode : constant Program.Visibility.Parameter_Mode := Modes (Element.Has_In, Element.Has_Out); Has_Default : constant Boolean := Element.Default_Expression.Assigned; Type_View : Program.Visibility.View; Names : constant Program.Elements.Defining_Identifiers .Defining_Identifier_Vector_Access := Element.Names; begin for Name in Names.Each_Element loop declare Symbol : constant Program.Symbols.Symbol := Program.Node_Symbols.Get_Symbol (Name.Element); begin Self.Env.Create_Parameter (Symbol, Name.Element.To_Defining_Name, Mode, Has_Default); Program.Type_Resolvers.Resolve_Type_Definition (Element.Parameter_Subtype, Self.Env, Self.Setter, Sets'Unchecked_Access, Type_View); Self.Env.Leave_Declarative_Region; Self.Env.Set_Object_Type (Type_View); end; end loop; end Parameter_Specification; -------------------------------- -- Procedure_Body_Declaration -- -------------------------------- overriding procedure Procedure_Body_Declaration (Self : in out Visitor; Element : not null Program.Elements.Procedure_Body_Declarations .Procedure_Body_Declaration_Access) is Name : constant Program.Elements.Defining_Names.Defining_Name_Access := Element.Name; Symbol : constant Program.Symbols.Symbol := Program.Node_Symbols.Get_Symbol (Name); begin Self.Env.Create_Procedure (Symbol => Symbol, Name => Name); Self.Append_Unit_Use_Clauses (Element.all'Access); for Cursor in Element.Parameters.Each_Element loop Cursor.Element.Visit (Self); end loop; for Cursor in Element.Declarations.Each_Element loop Cursor.Element.Visit (Self); end loop; for Cursor in Element.Statements.Each_Element loop Cursor.Element.Visit (Self); end loop; for Cursor in Element.Exception_Handlers.Each_Element loop Cursor.Element.Visit (Self); end loop; Self.Env.Leave_Declarative_Region; end Procedure_Body_Declaration; overriding procedure Exception_Handler (Self : in out Visitor; Element : not null Program.Elements.Exception_Handlers .Exception_Handler_Access) is use all type Program.Visibility.View_Kind; Sets : aliased Program.Interpretations.Context (Self.Env); View : Program.Visibility.View; begin for J in Element.Choices.Each_Element loop if J.Element.Is_Expression then Program.Type_Resolvers.Resolve_Type (Element => J.Element.To_Expression, Context => Self.Env, Setter => Self.Setter, Sets => Sets'Unchecked_Access, Value => View); pragma Assert (View.Kind = Exception_View); end if; end loop; end Exception_Handler; overriding procedure Function_Declaration (Self : in out Visitor; Element : not null Program.Elements.Function_Declarations .Function_Declaration_Access) is Name : constant Program.Elements.Defining_Names.Defining_Name_Access := Element.Name; Symbol : constant Program.Symbols.Symbol := Program.Node_Symbols.Get_Symbol (Name); Type_View : Program.Visibility.View; Sets : aliased Program.Interpretations.Context (Self.Env); begin Self.Env.Create_Function (Symbol => Symbol, Name => Name); Self.Append_Unit_Use_Clauses (Element.all'Access); for Cursor in Element.Parameters.Each_Element loop Cursor.Element.Visit (Self); end loop; for Aspect in Element.Aspects.Each_Element loop Aspect.Element.Visit (Self); end loop; Program.Type_Resolvers.Resolve_Type_Definition (Element.Result_Subtype, Self.Env, Self.Setter, Sets'Unchecked_Access, Type_View); Self.Env.Set_Result_Type (Type_View); Self.Env.Leave_Declarative_Region; end Function_Declaration; --------------------------- -- Procedure_Declaration -- --------------------------- overriding procedure Procedure_Declaration (Self : in out Visitor; Element : not null Program.Elements.Procedure_Declarations .Procedure_Declaration_Access) is Name : constant Program.Elements.Defining_Names.Defining_Name_Access := Element.Name; Symbol : constant Program.Symbols.Symbol := Program.Node_Symbols.Get_Symbol (Name); begin Self.Env.Create_Procedure (Symbol => Symbol, Name => Name); Self.Append_Unit_Use_Clauses (Element.all'Access); for Cursor in Element.Parameters.Each_Element loop Cursor.Element.Visit (Self); end loop; for Aspect in Element.Aspects.Each_Element loop Aspect.Element.Visit (Self); end loop; Self.Env.Leave_Declarative_Region; end Procedure_Declaration; overriding procedure Record_Definition (Self : in out Visitor; Element : not null Program.Elements.Record_Definitions .Record_Definition_Access) is begin Self.Env.Create_Record_Type (Symbol => Program.Node_Symbols.Get_Symbol (Self.Type_Name), Name => Self.Type_Name); Self.Type_View := Self.Env.Latest_View; if Self.Discriminants.Assigned and then Self.Discriminants.Is_Known_Discriminant_Part then declare List : constant Program.Elements.Discriminant_Specifications .Discriminant_Specification_Vector_Access := Self.Discriminants.To_Known_Discriminant_Part.Discriminants; begin for J in List.Each_Element loop J.Element.Visit (Self); end loop; end; end if; for J in Element.Components.Each_Element loop J.Element.Visit (Self); end loop; Self.Env.Leave_Declarative_Region; end Record_Definition; overriding procedure Record_Type (Self : in out Visitor; Element : not null Program.Elements.Record_Types.Record_Type_Access) is begin Self.Visit_Each_Child (Element); end Record_Type; overriding procedure Variant (Self : in out Visitor; Element : not null Program.Elements.Variants.Variant_Access) is Sets : aliased Program.Interpretations.Context (Self.Env); begin for J in Element.Choices.Each_Element loop Program.Complete_Contexts.Resolve_To_Expected_Type (Element => J.Element, Sets => Sets'Unchecked_Access, Setter => Self.Setter, Expect => Program.Visibility.Subtype_Mark (Self.Discriminant)); end loop; Self.Visit_Each_Child (Element); end Variant; overriding procedure Variant_Part (Self : in out Visitor; Element : not null Program.Elements.Variant_Parts .Variant_Part_Access) is begin Program.Resolvers.Name_In_Region.Resolve_Name (Region => Self.Type_View, Name => Element.Discriminant.To_Expression, Setter => Self.Setter); Self.Discriminant := Self.Env.Get_Name_View (Element.Discriminant.To_Element); Self.Visit_Each_Child (Element); end Variant_Part; end Visitors; end Program.Resolvers;
----------------------------------------------------------------------- -- awa-images -- Image module -- Copyright (C) 2012 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- package AWA.Images is end AWA.Images;
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <!DOCTYPE boost_serialization> <boost_serialization signature="serialization::archive" version="14"> <syndb class_id="0" tracking_level="0" version="0"> <userIPLatency>-1</userIPLatency> <userIPName></userIPName> <cdfg class_id="1" tracking_level="1" version="0" object_id="_0"> <name>BlackBoxJam</name> <ret_bitwidth>0</ret_bitwidth> <ports class_id="2" tracking_level="0" version="0"> <count>10</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>hostmem</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo class_id="6" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>64</bitwidth> </Value> <direction>2</direction> <if_type>4</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_V</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>in.V</originalName> <rtlName></rtlName> <coreName></coreName> </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>out_V</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>out.V</originalName> <rtlName></rtlName> <coreName></coreName> </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>doInit</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>doInit</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>1</bitwidth> </Value> <direction>0</direction> <if_type>0</if_type> <array_size>0</array_size> <bit_vecs> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> <item class_id_reference="3" object_id="_5"> <Value> <Obj> <type>1</type> <id>5</id> <name>targetLayer</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>targetLayer</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <direction>0</direction> <if_type>0</if_type> <array_size>0</array_size> <bit_vecs> <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>targetMem</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>targetMem</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <direction>0</direction> <if_type>0</if_type> <array_size>0</array_size> <bit_vecs> <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>targetInd</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>targetInd</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <direction>0</direction> <if_type>0</if_type> <array_size>0</array_size> <bit_vecs> <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>targetThresh</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>targetThresh</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <direction>0</direction> <if_type>0</if_type> <array_size>0</array_size> <bit_vecs> <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>val_V</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>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="_10"> <Value> <Obj> <type>1</type> <id>10</id> <name>numReps</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>numReps</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <direction>0</direction> <if_type>0</if_type> <array_size>0</array_size> <bit_vecs> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> </ports> <nodes class_id="8" tracking_level="0" version="0"> <count>16</count> <item_version>0</item_version> <item class_id="9" tracking_level="1" version="0" object_id="_11"> <Value> <Obj> <type>0</type> <id>299</id> <name>numReps_read</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>numReps</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>340</item> <item>341</item> </oprand_edges> <opcode>read</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_12"> <Value> <Obj> <type>0</type> <id>300</id> <name>val_V_read</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>64</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>343</item> <item>344</item> </oprand_edges> <opcode>read</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_13"> <Value> <Obj> <type>0</type> <id>301</id> <name>targetInd_read</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>targetInd</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>345</item> <item>346</item> </oprand_edges> <opcode>read</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_14"> <Value> <Obj> <type>0</type> <id>302</id> <name>targetMem_read</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>targetMem</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>347</item> <item>348</item> </oprand_edges> <opcode>read</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_15"> <Value> <Obj> <type>0</type> <id>303</id> <name>targetLayer_read</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>targetLayer</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>349</item> <item>350</item> </oprand_edges> <opcode>read</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_16"> <Value> <Obj> <type>0</type> <id>304</id> <name>doInit_read</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>doInit</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>1</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>352</item> <item>353</item> </oprand_edges> <opcode>read</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_17"> <Value> <Obj> <type>0</type> <id>305</id> <name>out_V_read</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>out.V</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>64</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>354</item> <item>355</item> </oprand_edges> <opcode>read</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_18"> <Value> <Obj> <type>0</type> <id>306</id> <name>in_V_read</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>in.V</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>64</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>356</item> <item>357</item> </oprand_edges> <opcode>read</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_19"> <Value> <Obj> <type>0</type> <id>307</id> <name>out_V3</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>61</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>359</item> <item>360</item> <item>362</item> <item>364</item> </oprand_edges> <opcode>partselect</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_20"> <Value> <Obj> <type>0</type> <id>308</id> <name>in_V1</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>61</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>365</item> <item>366</item> <item>367</item> <item>368</item> </oprand_edges> <opcode>partselect</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_21"> <Value> <Obj> <type>0</type> <id>329</id> <name></name> <fileName>/home/jf2715/BNN-PYNQ/bnn/src//network/lfcW1A1/hw/top.cpp</fileName> <fileDirectory>/home/jf2715/BNN-PYNQ/bnn/src/network/output/hls-syn</fileDirectory> <lineNumber>174</lineNumber> <contextFuncName>BlackBoxJam</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item class_id="11" tracking_level="0" version="0"> <first>/home/jf2715/BNN-PYNQ/bnn/src/network/output/hls-syn</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>/home/jf2715/BNN-PYNQ/bnn/src//network/lfcW1A1/hw/top.cpp</first> <second>BlackBoxJam</second> </first> <second>174</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>369</item> <item>370</item> <item>371</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_22"> <Value> <Obj> <type>0</type> <id>331</id> <name></name> <fileName>/home/jf2715/BNN-PYNQ/bnn/src//network/lfcW1A1/hw/top.cpp</fileName> <fileDirectory>/home/jf2715/BNN-PYNQ/bnn/src/network/output/hls-syn</fileDirectory> <lineNumber>177</lineNumber> <contextFuncName>BlackBoxJam</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/jf2715/BNN-PYNQ/bnn/src/network/output/hls-syn</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>/home/jf2715/BNN-PYNQ/bnn/src//network/lfcW1A1/hw/top.cpp</first> <second>BlackBoxJam</second> </first> <second>177</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>293</count> <item_version>0</item_version> <item>380</item> <item>381</item> <item>382</item> <item>383</item> <item>384</item> <item>674</item> <item>675</item> <item>676</item> <item>677</item> <item>678</item> <item>679</item> <item>680</item> <item>681</item> <item>682</item> <item>683</item> <item>684</item> <item>685</item> <item>686</item> <item>687</item> <item>688</item> <item>689</item> <item>690</item> <item>691</item> <item>692</item> <item>693</item> <item>694</item> <item>695</item> <item>696</item> <item>697</item> <item>698</item> <item>699</item> <item>700</item> <item>701</item> <item>702</item> <item>703</item> <item>704</item> <item>705</item> <item>706</item> <item>707</item> <item>708</item> <item>709</item> <item>710</item> <item>711</item> <item>712</item> <item>713</item> <item>714</item> <item>715</item> <item>716</item> <item>717</item> <item>718</item> <item>719</item> <item>720</item> <item>721</item> <item>722</item> <item>723</item> <item>724</item> <item>725</item> <item>726</item> <item>727</item> <item>728</item> <item>729</item> <item>730</item> <item>731</item> <item>732</item> <item>733</item> <item>734</item> <item>735</item> <item>736</item> <item>737</item> <item>738</item> <item>739</item> <item>740</item> <item>741</item> <item>742</item> <item>743</item> <item>744</item> <item>745</item> <item>746</item> <item>747</item> <item>748</item> <item>749</item> <item>750</item> <item>751</item> <item>752</item> <item>753</item> <item>754</item> <item>755</item> <item>756</item> <item>757</item> <item>758</item> <item>759</item> <item>760</item> <item>761</item> <item>762</item> <item>763</item> <item>764</item> <item>765</item> <item>766</item> <item>767</item> <item>768</item> <item>769</item> <item>770</item> <item>771</item> <item>772</item> <item>773</item> <item>774</item> <item>775</item> <item>776</item> <item>777</item> <item>778</item> <item>779</item> <item>780</item> <item>781</item> <item>782</item> <item>783</item> <item>784</item> <item>785</item> <item>786</item> <item>787</item> <item>788</item> <item>789</item> <item>790</item> <item>791</item> <item>792</item> <item>793</item> <item>794</item> <item>795</item> <item>796</item> <item>797</item> <item>798</item> <item>799</item> <item>800</item> <item>801</item> <item>802</item> <item>803</item> <item>804</item> <item>805</item> <item>806</item> <item>807</item> <item>808</item> <item>809</item> <item>810</item> <item>811</item> <item>812</item> <item>813</item> <item>814</item> <item>815</item> <item>816</item> <item>817</item> <item>818</item> <item>819</item> <item>820</item> <item>821</item> <item>822</item> <item>823</item> <item>824</item> <item>825</item> <item>826</item> <item>827</item> <item>828</item> <item>829</item> <item>830</item> <item>831</item> <item>832</item> <item>833</item> <item>834</item> <item>835</item> <item>836</item> <item>837</item> <item>838</item> <item>839</item> <item>840</item> <item>841</item> <item>842</item> <item>843</item> <item>844</item> <item>845</item> <item>846</item> <item>847</item> <item>848</item> <item>849</item> <item>850</item> <item>851</item> <item>852</item> <item>853</item> <item>854</item> <item>855</item> <item>856</item> <item>857</item> <item>858</item> <item>859</item> <item>860</item> <item>861</item> <item>862</item> <item>863</item> <item>864</item> <item>865</item> <item>866</item> <item>867</item> <item>868</item> <item>869</item> <item>870</item> <item>871</item> <item>872</item> <item>873</item> <item>874</item> <item>875</item> <item>876</item> <item>877</item> <item>878</item> <item>879</item> <item>880</item> <item>881</item> <item>882</item> <item>883</item> <item>884</item> <item>885</item> <item>886</item> <item>887</item> <item>888</item> <item>889</item> <item>890</item> <item>891</item> <item>892</item> <item>893</item> <item>894</item> <item>895</item> <item>896</item> <item>897</item> <item>898</item> <item>899</item> <item>900</item> <item>901</item> <item>902</item> <item>903</item> <item>904</item> <item>905</item> <item>906</item> <item>907</item> <item>908</item> <item>909</item> <item>910</item> <item>911</item> <item>912</item> <item>913</item> <item>914</item> <item>915</item> <item>916</item> <item>917</item> <item>918</item> <item>919</item> <item>920</item> <item>921</item> <item>922</item> <item>923</item> <item>924</item> <item>925</item> <item>926</item> <item>927</item> <item>928</item> <item>929</item> <item>930</item> <item>931</item> <item>932</item> <item>933</item> <item>934</item> <item>935</item> <item>936</item> <item>937</item> <item>938</item> <item>939</item> <item>940</item> <item>941</item> <item>942</item> <item>943</item> <item>944</item> <item>945</item> <item>946</item> <item>947</item> <item>948</item> <item>949</item> <item>950</item> <item>951</item> <item>952</item> <item>953</item> <item>954</item> <item>955</item> <item>956</item> <item>957</item> <item>958</item> <item>959</item> <item>960</item> <item>961</item> </oprand_edges> <opcode>call</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_23"> <Value> <Obj> <type>0</type> <id>332</id> <name></name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>385</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_24"> <Value> <Obj> <type>0</type> <id>334</id> <name></name> <fileName>/home/jf2715/BNN-PYNQ/bnn/src//network/lfcW1A1/hw/top.cpp</fileName> <fileDirectory>/home/jf2715/BNN-PYNQ/bnn/src/network/output/hls-syn</fileDirectory> <lineNumber>175</lineNumber> <contextFuncName>BlackBoxJam</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/jf2715/BNN-PYNQ/bnn/src/network/output/hls-syn</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>/home/jf2715/BNN-PYNQ/bnn/src//network/lfcW1A1/hw/top.cpp</first> <second>BlackBoxJam</second> </first> <second>175</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>293</count> <item_version>0</item_version> <item>373</item> <item>374</item> <item>375</item> <item>376</item> <item>377</item> <item>386</item> <item>387</item> <item>388</item> <item>389</item> <item>390</item> <item>391</item> <item>392</item> <item>393</item> <item>394</item> <item>395</item> <item>396</item> <item>397</item> <item>398</item> <item>399</item> <item>400</item> <item>401</item> <item>402</item> <item>403</item> <item>404</item> <item>405</item> <item>406</item> <item>407</item> <item>408</item> <item>409</item> <item>410</item> <item>411</item> <item>412</item> <item>413</item> <item>414</item> <item>415</item> <item>416</item> <item>417</item> <item>418</item> <item>419</item> <item>420</item> <item>421</item> <item>422</item> <item>423</item> <item>424</item> <item>425</item> <item>426</item> <item>427</item> <item>428</item> <item>429</item> <item>430</item> <item>431</item> <item>432</item> <item>433</item> <item>434</item> <item>435</item> <item>436</item> <item>437</item> <item>438</item> <item>439</item> <item>440</item> <item>441</item> <item>442</item> <item>443</item> <item>444</item> <item>445</item> <item>446</item> <item>447</item> <item>448</item> <item>449</item> <item>450</item> <item>451</item> <item>452</item> <item>453</item> <item>454</item> <item>455</item> <item>456</item> <item>457</item> <item>458</item> <item>459</item> <item>460</item> <item>461</item> <item>462</item> <item>463</item> <item>464</item> <item>465</item> <item>466</item> <item>467</item> <item>468</item> <item>469</item> <item>470</item> <item>471</item> <item>472</item> <item>473</item> <item>474</item> <item>475</item> <item>476</item> <item>477</item> <item>478</item> <item>479</item> <item>480</item> <item>481</item> <item>482</item> <item>483</item> <item>484</item> <item>485</item> <item>486</item> <item>487</item> <item>488</item> <item>489</item> <item>490</item> <item>491</item> <item>492</item> <item>493</item> <item>494</item> <item>495</item> <item>496</item> <item>497</item> <item>498</item> <item>499</item> <item>500</item> <item>501</item> <item>502</item> <item>503</item> <item>504</item> <item>505</item> <item>506</item> <item>507</item> <item>508</item> <item>509</item> <item>510</item> <item>511</item> <item>512</item> <item>513</item> <item>514</item> <item>515</item> <item>516</item> <item>517</item> <item>518</item> <item>519</item> <item>520</item> <item>521</item> <item>522</item> <item>523</item> <item>524</item> <item>525</item> <item>526</item> <item>527</item> <item>528</item> <item>529</item> <item>530</item> <item>531</item> <item>532</item> <item>533</item> <item>534</item> <item>535</item> <item>536</item> <item>537</item> <item>538</item> <item>539</item> <item>540</item> <item>541</item> <item>542</item> <item>543</item> <item>544</item> <item>545</item> <item>546</item> <item>547</item> <item>548</item> <item>549</item> <item>550</item> <item>551</item> <item>552</item> <item>553</item> <item>554</item> <item>555</item> <item>556</item> <item>557</item> <item>558</item> <item>559</item> <item>560</item> <item>561</item> <item>562</item> <item>563</item> <item>564</item> <item>565</item> <item>566</item> <item>567</item> <item>568</item> <item>569</item> <item>570</item> <item>571</item> <item>572</item> <item>573</item> <item>574</item> <item>575</item> <item>576</item> <item>577</item> <item>578</item> <item>579</item> <item>580</item> <item>581</item> <item>582</item> <item>583</item> <item>584</item> <item>585</item> <item>586</item> <item>587</item> <item>588</item> <item>589</item> <item>590</item> <item>591</item> <item>592</item> <item>593</item> <item>594</item> <item>595</item> <item>596</item> <item>597</item> <item>598</item> <item>599</item> <item>600</item> <item>601</item> <item>602</item> <item>603</item> <item>604</item> <item>605</item> <item>606</item> <item>607</item> <item>608</item> <item>609</item> <item>610</item> <item>611</item> <item>612</item> <item>613</item> <item>614</item> <item>615</item> <item>616</item> <item>617</item> <item>618</item> <item>619</item> <item>620</item> <item>621</item> <item>622</item> <item>623</item> <item>624</item> <item>625</item> <item>626</item> <item>627</item> <item>628</item> <item>629</item> <item>630</item> <item>631</item> <item>632</item> <item>633</item> <item>634</item> <item>635</item> <item>636</item> <item>637</item> <item>638</item> <item>639</item> <item>640</item> <item>641</item> <item>642</item> <item>643</item> <item>644</item> <item>645</item> <item>646</item> <item>647</item> <item>648</item> <item>649</item> <item>650</item> <item>651</item> <item>652</item> <item>653</item> <item>654</item> <item>655</item> <item>656</item> <item>657</item> <item>658</item> <item>659</item> <item>660</item> <item>661</item> <item>662</item> <item>663</item> <item>664</item> <item>665</item> <item>666</item> <item>667</item> <item>668</item> <item>669</item> <item>670</item> <item>671</item> <item>672</item> <item>673</item> </oprand_edges> <opcode>call</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_25"> <Value> <Obj> <type>0</type> <id>335</id> <name></name> <fileName>/home/jf2715/BNN-PYNQ/bnn/src//network/lfcW1A1/hw/top.cpp</fileName> <fileDirectory>/home/jf2715/BNN-PYNQ/bnn/src/network/output/hls-syn</fileDirectory> <lineNumber>176</lineNumber> <contextFuncName>BlackBoxJam</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/jf2715/BNN-PYNQ/bnn/src/network/output/hls-syn</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>/home/jf2715/BNN-PYNQ/bnn/src//network/lfcW1A1/hw/top.cpp</first> <second>BlackBoxJam</second> </first> <second>176</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>378</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_26"> <Value> <Obj> <type>0</type> <id>337</id> <name></name> <fileName>/home/jf2715/BNN-PYNQ/bnn/src//network/lfcW1A1/hw/top.cpp</fileName> <fileDirectory>/home/jf2715/BNN-PYNQ/bnn/src/network/output/hls-syn</fileDirectory> <lineNumber>179</lineNumber> <contextFuncName>BlackBoxJam</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/jf2715/BNN-PYNQ/bnn/src/network/output/hls-syn</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>/home/jf2715/BNN-PYNQ/bnn/src//network/lfcW1A1/hw/top.cpp</first> <second>BlackBoxJam</second> </first> <second>179</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>0</count> <item_version>0</item_version> </oprand_edges> <opcode>ret</opcode> <m_Display>0</m_Display> </item> </nodes> <consts class_id="15" tracking_level="0" version="0"> <count>4</count> <item_version>0</item_version> <item class_id="16" tracking_level="1" version="0" object_id="_27"> <Value> <Obj> <type>2</type> <id>361</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <const_type>0</const_type> <content>3</content> </item> <item class_id_reference="16" object_id="_28"> <Value> <Obj> <type>2</type> <id>363</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <const_type>0</const_type> <content>63</content> </item> <item class_id_reference="16" object_id="_29"> <Value> <Obj> <type>2</type> <id>372</id> <name>DoMemInit</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <const_type>6</const_type> <content>&lt;constant:DoMemInit&gt;</content> </item> <item class_id_reference="16" object_id="_30"> <Value> <Obj> <type>2</type> <id>379</id> <name>DoCompute</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <const_type>6</const_type> <content>&lt;constant:DoCompute&gt;</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="_31"> <Obj> <type>3</type> <id>330</id> <name></name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>11</count> <item_version>0</item_version> <item>299</item> <item>300</item> <item>301</item> <item>302</item> <item>303</item> <item>304</item> <item>305</item> <item>306</item> <item>307</item> <item>308</item> <item>329</item> </node_objs> </item> <item class_id_reference="18" object_id="_32"> <Obj> <type>3</type> <id>333</id> <name></name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>2</count> <item_version>0</item_version> <item>331</item> <item>332</item> </node_objs> </item> <item class_id_reference="18" object_id="_33"> <Obj> <type>3</type> <id>336</id> <name></name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>2</count> <item_version>0</item_version> <item>334</item> <item>335</item> </node_objs> </item> <item class_id_reference="18" object_id="_34"> <Obj> <type>3</type> <id>338</id> <name></name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>1</count> <item_version>0</item_version> <item>337</item> </node_objs> </item> </blocks> <edges class_id="19" tracking_level="0" version="0"> <count>609</count> <item_version>0</item_version> <item class_id="20" tracking_level="1" version="0" object_id="_35"> <id>341</id> <edge_type>1</edge_type> <source_obj>10</source_obj> <sink_obj>299</sink_obj> </item> <item class_id_reference="20" object_id="_36"> <id>344</id> <edge_type>1</edge_type> <source_obj>9</source_obj> <sink_obj>300</sink_obj> </item> <item class_id_reference="20" object_id="_37"> <id>346</id> <edge_type>1</edge_type> <source_obj>7</source_obj> <sink_obj>301</sink_obj> </item> <item class_id_reference="20" object_id="_38"> <id>348</id> <edge_type>1</edge_type> <source_obj>6</source_obj> <sink_obj>302</sink_obj> </item> <item class_id_reference="20" object_id="_39"> <id>350</id> <edge_type>1</edge_type> <source_obj>5</source_obj> <sink_obj>303</sink_obj> </item> <item class_id_reference="20" object_id="_40"> <id>353</id> <edge_type>1</edge_type> <source_obj>4</source_obj> <sink_obj>304</sink_obj> </item> <item class_id_reference="20" object_id="_41"> <id>355</id> <edge_type>1</edge_type> <source_obj>3</source_obj> <sink_obj>305</sink_obj> </item> <item class_id_reference="20" object_id="_42"> <id>357</id> <edge_type>1</edge_type> <source_obj>2</source_obj> <sink_obj>306</sink_obj> </item> <item class_id_reference="20" object_id="_43"> <id>360</id> <edge_type>1</edge_type> <source_obj>305</source_obj> <sink_obj>307</sink_obj> </item> <item class_id_reference="20" object_id="_44"> <id>362</id> <edge_type>1</edge_type> <source_obj>361</source_obj> <sink_obj>307</sink_obj> </item> <item class_id_reference="20" object_id="_45"> <id>364</id> <edge_type>1</edge_type> <source_obj>363</source_obj> <sink_obj>307</sink_obj> </item> <item class_id_reference="20" object_id="_46"> <id>366</id> <edge_type>1</edge_type> <source_obj>306</source_obj> <sink_obj>308</sink_obj> </item> <item class_id_reference="20" object_id="_47"> <id>367</id> <edge_type>1</edge_type> <source_obj>361</source_obj> <sink_obj>308</sink_obj> </item> <item class_id_reference="20" object_id="_48"> <id>368</id> <edge_type>1</edge_type> <source_obj>363</source_obj> <sink_obj>308</sink_obj> </item> <item class_id_reference="20" object_id="_49"> <id>369</id> <edge_type>1</edge_type> <source_obj>304</source_obj> <sink_obj>329</sink_obj> </item> <item class_id_reference="20" object_id="_50"> <id>370</id> <edge_type>2</edge_type> <source_obj>333</source_obj> <sink_obj>329</sink_obj> </item> <item class_id_reference="20" object_id="_51"> <id>371</id> <edge_type>2</edge_type> <source_obj>336</source_obj> <sink_obj>329</sink_obj> </item> <item class_id_reference="20" object_id="_52"> <id>373</id> <edge_type>1</edge_type> <source_obj>372</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_53"> <id>374</id> <edge_type>1</edge_type> <source_obj>303</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_54"> <id>375</id> <edge_type>1</edge_type> <source_obj>302</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_55"> <id>376</id> <edge_type>1</edge_type> <source_obj>301</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_56"> <id>377</id> <edge_type>1</edge_type> <source_obj>300</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_57"> <id>378</id> <edge_type>2</edge_type> <source_obj>338</source_obj> <sink_obj>335</sink_obj> </item> <item class_id_reference="20" object_id="_58"> <id>380</id> <edge_type>1</edge_type> <source_obj>379</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_59"> <id>381</id> <edge_type>1</edge_type> <source_obj>1</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_60"> <id>382</id> <edge_type>1</edge_type> <source_obj>308</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_61"> <id>383</id> <edge_type>1</edge_type> <source_obj>307</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_62"> <id>384</id> <edge_type>1</edge_type> <source_obj>299</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_63"> <id>385</id> <edge_type>2</edge_type> <source_obj>338</source_obj> <sink_obj>332</sink_obj> </item> <item class_id_reference="20" object_id="_64"> <id>386</id> <edge_type>1</edge_type> <source_obj>11</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_65"> <id>387</id> <edge_type>1</edge_type> <source_obj>12</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_66"> <id>388</id> <edge_type>1</edge_type> <source_obj>13</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_67"> <id>389</id> <edge_type>1</edge_type> <source_obj>14</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_68"> <id>390</id> <edge_type>1</edge_type> <source_obj>15</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_69"> <id>391</id> <edge_type>1</edge_type> <source_obj>16</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_70"> <id>392</id> <edge_type>1</edge_type> <source_obj>17</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_71"> <id>393</id> <edge_type>1</edge_type> <source_obj>18</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_72"> <id>394</id> <edge_type>1</edge_type> <source_obj>19</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_73"> <id>395</id> <edge_type>1</edge_type> <source_obj>20</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_74"> <id>396</id> <edge_type>1</edge_type> <source_obj>21</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_75"> <id>397</id> <edge_type>1</edge_type> <source_obj>22</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_76"> <id>398</id> <edge_type>1</edge_type> <source_obj>23</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_77"> <id>399</id> <edge_type>1</edge_type> <source_obj>24</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_78"> <id>400</id> <edge_type>1</edge_type> <source_obj>25</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_79"> <id>401</id> <edge_type>1</edge_type> <source_obj>26</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_80"> <id>402</id> <edge_type>1</edge_type> <source_obj>27</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_81"> <id>403</id> <edge_type>1</edge_type> <source_obj>28</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_82"> <id>404</id> <edge_type>1</edge_type> <source_obj>29</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_83"> <id>405</id> <edge_type>1</edge_type> <source_obj>30</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_84"> <id>406</id> <edge_type>1</edge_type> <source_obj>31</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_85"> <id>407</id> <edge_type>1</edge_type> <source_obj>32</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_86"> <id>408</id> <edge_type>1</edge_type> <source_obj>33</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_87"> <id>409</id> <edge_type>1</edge_type> <source_obj>34</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_88"> <id>410</id> <edge_type>1</edge_type> <source_obj>35</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_89"> <id>411</id> <edge_type>1</edge_type> <source_obj>36</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_90"> <id>412</id> <edge_type>1</edge_type> <source_obj>37</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_91"> <id>413</id> <edge_type>1</edge_type> <source_obj>38</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_92"> <id>414</id> <edge_type>1</edge_type> <source_obj>39</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_93"> <id>415</id> <edge_type>1</edge_type> <source_obj>40</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_94"> <id>416</id> <edge_type>1</edge_type> <source_obj>41</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_95"> <id>417</id> <edge_type>1</edge_type> <source_obj>42</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_96"> <id>418</id> <edge_type>1</edge_type> <source_obj>43</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_97"> <id>419</id> <edge_type>1</edge_type> <source_obj>44</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_98"> <id>420</id> <edge_type>1</edge_type> <source_obj>45</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_99"> <id>421</id> <edge_type>1</edge_type> <source_obj>46</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_100"> <id>422</id> <edge_type>1</edge_type> <source_obj>47</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_101"> <id>423</id> <edge_type>1</edge_type> <source_obj>48</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_102"> <id>424</id> <edge_type>1</edge_type> <source_obj>49</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_103"> <id>425</id> <edge_type>1</edge_type> <source_obj>50</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_104"> <id>426</id> <edge_type>1</edge_type> <source_obj>51</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_105"> <id>427</id> <edge_type>1</edge_type> <source_obj>52</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_106"> <id>428</id> <edge_type>1</edge_type> <source_obj>53</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_107"> <id>429</id> <edge_type>1</edge_type> <source_obj>54</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_108"> <id>430</id> <edge_type>1</edge_type> <source_obj>55</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_109"> <id>431</id> <edge_type>1</edge_type> <source_obj>56</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_110"> <id>432</id> <edge_type>1</edge_type> <source_obj>57</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_111"> <id>433</id> <edge_type>1</edge_type> <source_obj>58</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_112"> <id>434</id> <edge_type>1</edge_type> <source_obj>59</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_113"> <id>435</id> <edge_type>1</edge_type> <source_obj>60</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_114"> <id>436</id> <edge_type>1</edge_type> <source_obj>61</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_115"> <id>437</id> <edge_type>1</edge_type> <source_obj>62</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_116"> <id>438</id> <edge_type>1</edge_type> <source_obj>63</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_117"> <id>439</id> <edge_type>1</edge_type> <source_obj>64</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_118"> <id>440</id> <edge_type>1</edge_type> <source_obj>65</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_119"> <id>441</id> <edge_type>1</edge_type> <source_obj>66</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_120"> <id>442</id> <edge_type>1</edge_type> <source_obj>67</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_121"> <id>443</id> <edge_type>1</edge_type> <source_obj>68</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_122"> <id>444</id> <edge_type>1</edge_type> <source_obj>69</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_123"> <id>445</id> <edge_type>1</edge_type> <source_obj>70</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_124"> <id>446</id> <edge_type>1</edge_type> <source_obj>71</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_125"> <id>447</id> <edge_type>1</edge_type> <source_obj>72</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_126"> <id>448</id> <edge_type>1</edge_type> <source_obj>73</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_127"> <id>449</id> <edge_type>1</edge_type> <source_obj>74</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_128"> <id>450</id> <edge_type>1</edge_type> <source_obj>75</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_129"> <id>451</id> <edge_type>1</edge_type> <source_obj>76</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_130"> <id>452</id> <edge_type>1</edge_type> <source_obj>77</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_131"> <id>453</id> <edge_type>1</edge_type> <source_obj>78</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_132"> <id>454</id> <edge_type>1</edge_type> <source_obj>79</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_133"> <id>455</id> <edge_type>1</edge_type> <source_obj>80</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_134"> <id>456</id> <edge_type>1</edge_type> <source_obj>81</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_135"> <id>457</id> <edge_type>1</edge_type> <source_obj>82</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_136"> <id>458</id> <edge_type>1</edge_type> <source_obj>83</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_137"> <id>459</id> <edge_type>1</edge_type> <source_obj>84</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_138"> <id>460</id> <edge_type>1</edge_type> <source_obj>85</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_139"> <id>461</id> <edge_type>1</edge_type> <source_obj>86</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_140"> <id>462</id> <edge_type>1</edge_type> <source_obj>87</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_141"> <id>463</id> <edge_type>1</edge_type> <source_obj>88</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_142"> <id>464</id> <edge_type>1</edge_type> <source_obj>89</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_143"> <id>465</id> <edge_type>1</edge_type> <source_obj>90</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_144"> <id>466</id> <edge_type>1</edge_type> <source_obj>91</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_145"> <id>467</id> <edge_type>1</edge_type> <source_obj>92</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_146"> <id>468</id> <edge_type>1</edge_type> <source_obj>93</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_147"> <id>469</id> <edge_type>1</edge_type> <source_obj>94</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_148"> <id>470</id> <edge_type>1</edge_type> <source_obj>95</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_149"> <id>471</id> <edge_type>1</edge_type> <source_obj>96</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_150"> <id>472</id> <edge_type>1</edge_type> <source_obj>97</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_151"> <id>473</id> <edge_type>1</edge_type> <source_obj>98</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_152"> <id>474</id> <edge_type>1</edge_type> <source_obj>99</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_153"> <id>475</id> <edge_type>1</edge_type> <source_obj>100</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_154"> <id>476</id> <edge_type>1</edge_type> <source_obj>101</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_155"> <id>477</id> <edge_type>1</edge_type> <source_obj>102</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_156"> <id>478</id> <edge_type>1</edge_type> <source_obj>103</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_157"> <id>479</id> <edge_type>1</edge_type> <source_obj>104</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_158"> <id>480</id> <edge_type>1</edge_type> <source_obj>105</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_159"> <id>481</id> <edge_type>1</edge_type> <source_obj>106</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_160"> <id>482</id> <edge_type>1</edge_type> <source_obj>107</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_161"> <id>483</id> <edge_type>1</edge_type> <source_obj>108</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_162"> <id>484</id> <edge_type>1</edge_type> <source_obj>109</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_163"> <id>485</id> <edge_type>1</edge_type> <source_obj>110</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_164"> <id>486</id> <edge_type>1</edge_type> <source_obj>111</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_165"> <id>487</id> <edge_type>1</edge_type> <source_obj>112</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_166"> <id>488</id> <edge_type>1</edge_type> <source_obj>113</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_167"> <id>489</id> <edge_type>1</edge_type> <source_obj>114</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_168"> <id>490</id> <edge_type>1</edge_type> <source_obj>115</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_169"> <id>491</id> <edge_type>1</edge_type> <source_obj>116</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_170"> <id>492</id> <edge_type>1</edge_type> <source_obj>117</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_171"> <id>493</id> <edge_type>1</edge_type> <source_obj>118</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_172"> <id>494</id> <edge_type>1</edge_type> <source_obj>119</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_173"> <id>495</id> <edge_type>1</edge_type> <source_obj>120</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_174"> <id>496</id> <edge_type>1</edge_type> <source_obj>121</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_175"> <id>497</id> <edge_type>1</edge_type> <source_obj>122</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_176"> <id>498</id> <edge_type>1</edge_type> <source_obj>123</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_177"> <id>499</id> <edge_type>1</edge_type> <source_obj>124</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_178"> <id>500</id> <edge_type>1</edge_type> <source_obj>125</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_179"> <id>501</id> <edge_type>1</edge_type> <source_obj>126</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_180"> <id>502</id> <edge_type>1</edge_type> <source_obj>127</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_181"> <id>503</id> <edge_type>1</edge_type> <source_obj>128</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_182"> <id>504</id> <edge_type>1</edge_type> <source_obj>129</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_183"> <id>505</id> <edge_type>1</edge_type> <source_obj>130</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_184"> <id>506</id> <edge_type>1</edge_type> <source_obj>131</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_185"> <id>507</id> <edge_type>1</edge_type> <source_obj>132</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_186"> <id>508</id> <edge_type>1</edge_type> <source_obj>133</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_187"> <id>509</id> <edge_type>1</edge_type> <source_obj>134</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_188"> <id>510</id> <edge_type>1</edge_type> <source_obj>135</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_189"> <id>511</id> <edge_type>1</edge_type> <source_obj>136</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_190"> <id>512</id> <edge_type>1</edge_type> <source_obj>137</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_191"> <id>513</id> <edge_type>1</edge_type> <source_obj>138</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_192"> <id>514</id> <edge_type>1</edge_type> <source_obj>139</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_193"> <id>515</id> <edge_type>1</edge_type> <source_obj>140</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_194"> <id>516</id> <edge_type>1</edge_type> <source_obj>141</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_195"> <id>517</id> <edge_type>1</edge_type> <source_obj>142</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_196"> <id>518</id> <edge_type>1</edge_type> <source_obj>143</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_197"> <id>519</id> <edge_type>1</edge_type> <source_obj>144</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_198"> <id>520</id> <edge_type>1</edge_type> <source_obj>145</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_199"> <id>521</id> <edge_type>1</edge_type> <source_obj>146</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_200"> <id>522</id> <edge_type>1</edge_type> <source_obj>147</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_201"> <id>523</id> <edge_type>1</edge_type> <source_obj>148</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_202"> <id>524</id> <edge_type>1</edge_type> <source_obj>149</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_203"> <id>525</id> <edge_type>1</edge_type> <source_obj>150</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_204"> <id>526</id> <edge_type>1</edge_type> <source_obj>151</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_205"> <id>527</id> <edge_type>1</edge_type> <source_obj>152</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_206"> <id>528</id> <edge_type>1</edge_type> <source_obj>153</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_207"> <id>529</id> <edge_type>1</edge_type> <source_obj>154</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_208"> <id>530</id> <edge_type>1</edge_type> <source_obj>155</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_209"> <id>531</id> <edge_type>1</edge_type> <source_obj>156</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_210"> <id>532</id> <edge_type>1</edge_type> <source_obj>157</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_211"> <id>533</id> <edge_type>1</edge_type> <source_obj>158</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_212"> <id>534</id> <edge_type>1</edge_type> <source_obj>159</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_213"> <id>535</id> <edge_type>1</edge_type> <source_obj>160</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_214"> <id>536</id> <edge_type>1</edge_type> <source_obj>161</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_215"> <id>537</id> <edge_type>1</edge_type> <source_obj>162</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_216"> <id>538</id> <edge_type>1</edge_type> <source_obj>163</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_217"> <id>539</id> <edge_type>1</edge_type> <source_obj>164</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_218"> <id>540</id> <edge_type>1</edge_type> <source_obj>165</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_219"> <id>541</id> <edge_type>1</edge_type> <source_obj>166</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_220"> <id>542</id> <edge_type>1</edge_type> <source_obj>167</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_221"> <id>543</id> <edge_type>1</edge_type> <source_obj>168</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_222"> <id>544</id> <edge_type>1</edge_type> <source_obj>169</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_223"> <id>545</id> <edge_type>1</edge_type> <source_obj>170</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_224"> <id>546</id> <edge_type>1</edge_type> <source_obj>171</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_225"> <id>547</id> <edge_type>1</edge_type> <source_obj>172</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_226"> <id>548</id> <edge_type>1</edge_type> <source_obj>173</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_227"> <id>549</id> <edge_type>1</edge_type> <source_obj>174</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_228"> <id>550</id> <edge_type>1</edge_type> <source_obj>175</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_229"> <id>551</id> <edge_type>1</edge_type> <source_obj>176</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_230"> <id>552</id> <edge_type>1</edge_type> <source_obj>177</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_231"> <id>553</id> <edge_type>1</edge_type> <source_obj>178</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_232"> <id>554</id> <edge_type>1</edge_type> <source_obj>179</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_233"> <id>555</id> <edge_type>1</edge_type> <source_obj>180</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_234"> <id>556</id> <edge_type>1</edge_type> <source_obj>181</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_235"> <id>557</id> <edge_type>1</edge_type> <source_obj>182</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_236"> <id>558</id> <edge_type>1</edge_type> <source_obj>183</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_237"> <id>559</id> <edge_type>1</edge_type> <source_obj>184</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_238"> <id>560</id> <edge_type>1</edge_type> <source_obj>185</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_239"> <id>561</id> <edge_type>1</edge_type> <source_obj>186</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_240"> <id>562</id> <edge_type>1</edge_type> <source_obj>187</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_241"> <id>563</id> <edge_type>1</edge_type> <source_obj>188</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_242"> <id>564</id> <edge_type>1</edge_type> <source_obj>189</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_243"> <id>565</id> <edge_type>1</edge_type> <source_obj>190</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_244"> <id>566</id> <edge_type>1</edge_type> <source_obj>191</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_245"> <id>567</id> <edge_type>1</edge_type> <source_obj>192</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_246"> <id>568</id> <edge_type>1</edge_type> <source_obj>193</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_247"> <id>569</id> <edge_type>1</edge_type> <source_obj>194</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_248"> <id>570</id> <edge_type>1</edge_type> <source_obj>195</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_249"> <id>571</id> <edge_type>1</edge_type> <source_obj>196</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_250"> <id>572</id> <edge_type>1</edge_type> <source_obj>197</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_251"> <id>573</id> <edge_type>1</edge_type> <source_obj>198</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_252"> <id>574</id> <edge_type>1</edge_type> <source_obj>199</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_253"> <id>575</id> <edge_type>1</edge_type> <source_obj>200</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_254"> <id>576</id> <edge_type>1</edge_type> <source_obj>201</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_255"> <id>577</id> <edge_type>1</edge_type> <source_obj>202</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_256"> <id>578</id> <edge_type>1</edge_type> <source_obj>203</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_257"> <id>579</id> <edge_type>1</edge_type> <source_obj>204</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_258"> <id>580</id> <edge_type>1</edge_type> <source_obj>205</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_259"> <id>581</id> <edge_type>1</edge_type> <source_obj>206</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_260"> <id>582</id> <edge_type>1</edge_type> <source_obj>207</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_261"> <id>583</id> <edge_type>1</edge_type> <source_obj>208</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_262"> <id>584</id> <edge_type>1</edge_type> <source_obj>209</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_263"> <id>585</id> <edge_type>1</edge_type> <source_obj>210</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_264"> <id>586</id> <edge_type>1</edge_type> <source_obj>211</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_265"> <id>587</id> <edge_type>1</edge_type> <source_obj>212</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_266"> <id>588</id> <edge_type>1</edge_type> <source_obj>213</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_267"> <id>589</id> <edge_type>1</edge_type> <source_obj>214</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_268"> <id>590</id> <edge_type>1</edge_type> <source_obj>215</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_269"> <id>591</id> <edge_type>1</edge_type> <source_obj>216</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_270"> <id>592</id> <edge_type>1</edge_type> <source_obj>217</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_271"> <id>593</id> <edge_type>1</edge_type> <source_obj>218</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_272"> <id>594</id> <edge_type>1</edge_type> <source_obj>219</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_273"> <id>595</id> <edge_type>1</edge_type> <source_obj>220</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_274"> <id>596</id> <edge_type>1</edge_type> <source_obj>221</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_275"> <id>597</id> <edge_type>1</edge_type> <source_obj>222</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_276"> <id>598</id> <edge_type>1</edge_type> <source_obj>223</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_277"> <id>599</id> <edge_type>1</edge_type> <source_obj>224</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_278"> <id>600</id> <edge_type>1</edge_type> <source_obj>225</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_279"> <id>601</id> <edge_type>1</edge_type> <source_obj>226</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_280"> <id>602</id> <edge_type>1</edge_type> <source_obj>227</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_281"> <id>603</id> <edge_type>1</edge_type> <source_obj>228</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_282"> <id>604</id> <edge_type>1</edge_type> <source_obj>229</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_283"> <id>605</id> <edge_type>1</edge_type> <source_obj>230</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_284"> <id>606</id> <edge_type>1</edge_type> <source_obj>231</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_285"> <id>607</id> <edge_type>1</edge_type> <source_obj>232</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_286"> <id>608</id> <edge_type>1</edge_type> <source_obj>233</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_287"> <id>609</id> <edge_type>1</edge_type> <source_obj>234</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_288"> <id>610</id> <edge_type>1</edge_type> <source_obj>235</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_289"> <id>611</id> <edge_type>1</edge_type> <source_obj>236</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_290"> <id>612</id> <edge_type>1</edge_type> <source_obj>237</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_291"> <id>613</id> <edge_type>1</edge_type> <source_obj>238</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_292"> <id>614</id> <edge_type>1</edge_type> <source_obj>239</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_293"> <id>615</id> <edge_type>1</edge_type> <source_obj>240</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_294"> <id>616</id> <edge_type>1</edge_type> <source_obj>241</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_295"> <id>617</id> <edge_type>1</edge_type> <source_obj>242</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_296"> <id>618</id> <edge_type>1</edge_type> <source_obj>243</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_297"> <id>619</id> <edge_type>1</edge_type> <source_obj>244</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_298"> <id>620</id> <edge_type>1</edge_type> <source_obj>245</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_299"> <id>621</id> <edge_type>1</edge_type> <source_obj>246</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_300"> <id>622</id> <edge_type>1</edge_type> <source_obj>247</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_301"> <id>623</id> <edge_type>1</edge_type> <source_obj>248</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_302"> <id>624</id> <edge_type>1</edge_type> <source_obj>249</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_303"> <id>625</id> <edge_type>1</edge_type> <source_obj>250</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_304"> <id>626</id> <edge_type>1</edge_type> <source_obj>251</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_305"> <id>627</id> <edge_type>1</edge_type> <source_obj>252</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_306"> <id>628</id> <edge_type>1</edge_type> <source_obj>253</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_307"> <id>629</id> <edge_type>1</edge_type> <source_obj>254</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_308"> <id>630</id> <edge_type>1</edge_type> <source_obj>255</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_309"> <id>631</id> <edge_type>1</edge_type> <source_obj>256</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_310"> <id>632</id> <edge_type>1</edge_type> <source_obj>257</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_311"> <id>633</id> <edge_type>1</edge_type> <source_obj>258</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_312"> <id>634</id> <edge_type>1</edge_type> <source_obj>259</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_313"> <id>635</id> <edge_type>1</edge_type> <source_obj>260</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_314"> <id>636</id> <edge_type>1</edge_type> <source_obj>261</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_315"> <id>637</id> <edge_type>1</edge_type> <source_obj>262</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_316"> <id>638</id> <edge_type>1</edge_type> <source_obj>263</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_317"> <id>639</id> <edge_type>1</edge_type> <source_obj>264</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_318"> <id>640</id> <edge_type>1</edge_type> <source_obj>265</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_319"> <id>641</id> <edge_type>1</edge_type> <source_obj>266</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_320"> <id>642</id> <edge_type>1</edge_type> <source_obj>267</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_321"> <id>643</id> <edge_type>1</edge_type> <source_obj>268</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_322"> <id>644</id> <edge_type>1</edge_type> <source_obj>269</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_323"> <id>645</id> <edge_type>1</edge_type> <source_obj>270</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_324"> <id>646</id> <edge_type>1</edge_type> <source_obj>271</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_325"> <id>647</id> <edge_type>1</edge_type> <source_obj>272</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_326"> <id>648</id> <edge_type>1</edge_type> <source_obj>273</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_327"> <id>649</id> <edge_type>1</edge_type> <source_obj>274</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_328"> <id>650</id> <edge_type>1</edge_type> <source_obj>275</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_329"> <id>651</id> <edge_type>1</edge_type> <source_obj>276</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_330"> <id>652</id> <edge_type>1</edge_type> <source_obj>277</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_331"> <id>653</id> <edge_type>1</edge_type> <source_obj>278</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_332"> <id>654</id> <edge_type>1</edge_type> <source_obj>279</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_333"> <id>655</id> <edge_type>1</edge_type> <source_obj>280</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_334"> <id>656</id> <edge_type>1</edge_type> <source_obj>281</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_335"> <id>657</id> <edge_type>1</edge_type> <source_obj>282</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_336"> <id>658</id> <edge_type>1</edge_type> <source_obj>283</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_337"> <id>659</id> <edge_type>1</edge_type> <source_obj>284</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_338"> <id>660</id> <edge_type>1</edge_type> <source_obj>285</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_339"> <id>661</id> <edge_type>1</edge_type> <source_obj>286</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_340"> <id>662</id> <edge_type>1</edge_type> <source_obj>287</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_341"> <id>663</id> <edge_type>1</edge_type> <source_obj>288</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_342"> <id>664</id> <edge_type>1</edge_type> <source_obj>289</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_343"> <id>665</id> <edge_type>1</edge_type> <source_obj>290</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_344"> <id>666</id> <edge_type>1</edge_type> <source_obj>291</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_345"> <id>667</id> <edge_type>1</edge_type> <source_obj>292</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_346"> <id>668</id> <edge_type>1</edge_type> <source_obj>293</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_347"> <id>669</id> <edge_type>1</edge_type> <source_obj>294</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_348"> <id>670</id> <edge_type>1</edge_type> <source_obj>295</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_349"> <id>671</id> <edge_type>1</edge_type> <source_obj>296</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_350"> <id>672</id> <edge_type>1</edge_type> <source_obj>297</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_351"> <id>673</id> <edge_type>1</edge_type> <source_obj>298</source_obj> <sink_obj>334</sink_obj> </item> <item class_id_reference="20" object_id="_352"> <id>674</id> <edge_type>1</edge_type> <source_obj>11</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_353"> <id>675</id> <edge_type>1</edge_type> <source_obj>12</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_354"> <id>676</id> <edge_type>1</edge_type> <source_obj>13</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_355"> <id>677</id> <edge_type>1</edge_type> <source_obj>14</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_356"> <id>678</id> <edge_type>1</edge_type> <source_obj>15</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_357"> <id>679</id> <edge_type>1</edge_type> <source_obj>16</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_358"> <id>680</id> <edge_type>1</edge_type> <source_obj>17</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_359"> <id>681</id> <edge_type>1</edge_type> <source_obj>18</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_360"> <id>682</id> <edge_type>1</edge_type> <source_obj>19</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_361"> <id>683</id> <edge_type>1</edge_type> <source_obj>20</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_362"> <id>684</id> <edge_type>1</edge_type> <source_obj>21</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_363"> <id>685</id> <edge_type>1</edge_type> <source_obj>22</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_364"> <id>686</id> <edge_type>1</edge_type> <source_obj>23</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_365"> <id>687</id> <edge_type>1</edge_type> <source_obj>24</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_366"> <id>688</id> <edge_type>1</edge_type> <source_obj>25</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_367"> <id>689</id> <edge_type>1</edge_type> <source_obj>26</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_368"> <id>690</id> <edge_type>1</edge_type> <source_obj>27</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_369"> <id>691</id> <edge_type>1</edge_type> <source_obj>28</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_370"> <id>692</id> <edge_type>1</edge_type> <source_obj>29</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_371"> <id>693</id> <edge_type>1</edge_type> <source_obj>30</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_372"> <id>694</id> <edge_type>1</edge_type> <source_obj>31</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_373"> <id>695</id> <edge_type>1</edge_type> <source_obj>32</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_374"> <id>696</id> <edge_type>1</edge_type> <source_obj>33</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_375"> <id>697</id> <edge_type>1</edge_type> <source_obj>34</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_376"> <id>698</id> <edge_type>1</edge_type> <source_obj>35</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_377"> <id>699</id> <edge_type>1</edge_type> <source_obj>36</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_378"> <id>700</id> <edge_type>1</edge_type> <source_obj>37</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_379"> <id>701</id> <edge_type>1</edge_type> <source_obj>38</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_380"> <id>702</id> <edge_type>1</edge_type> <source_obj>39</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_381"> <id>703</id> <edge_type>1</edge_type> <source_obj>40</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_382"> <id>704</id> <edge_type>1</edge_type> <source_obj>41</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_383"> <id>705</id> <edge_type>1</edge_type> <source_obj>42</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_384"> <id>706</id> <edge_type>1</edge_type> <source_obj>43</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_385"> <id>707</id> <edge_type>1</edge_type> <source_obj>44</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_386"> <id>708</id> <edge_type>1</edge_type> <source_obj>45</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_387"> <id>709</id> <edge_type>1</edge_type> <source_obj>46</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_388"> <id>710</id> <edge_type>1</edge_type> <source_obj>47</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_389"> <id>711</id> <edge_type>1</edge_type> <source_obj>48</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_390"> <id>712</id> <edge_type>1</edge_type> <source_obj>49</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_391"> <id>713</id> <edge_type>1</edge_type> <source_obj>50</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_392"> <id>714</id> <edge_type>1</edge_type> <source_obj>51</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_393"> <id>715</id> <edge_type>1</edge_type> <source_obj>52</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_394"> <id>716</id> <edge_type>1</edge_type> <source_obj>53</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_395"> <id>717</id> <edge_type>1</edge_type> <source_obj>54</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_396"> <id>718</id> <edge_type>1</edge_type> <source_obj>55</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_397"> <id>719</id> <edge_type>1</edge_type> <source_obj>56</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_398"> <id>720</id> <edge_type>1</edge_type> <source_obj>57</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_399"> <id>721</id> <edge_type>1</edge_type> <source_obj>58</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_400"> <id>722</id> <edge_type>1</edge_type> <source_obj>59</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_401"> <id>723</id> <edge_type>1</edge_type> <source_obj>60</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_402"> <id>724</id> <edge_type>1</edge_type> <source_obj>61</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_403"> <id>725</id> <edge_type>1</edge_type> <source_obj>62</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_404"> <id>726</id> <edge_type>1</edge_type> <source_obj>63</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_405"> <id>727</id> <edge_type>1</edge_type> <source_obj>64</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_406"> <id>728</id> <edge_type>1</edge_type> <source_obj>65</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_407"> <id>729</id> <edge_type>1</edge_type> <source_obj>66</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_408"> <id>730</id> <edge_type>1</edge_type> <source_obj>67</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_409"> <id>731</id> <edge_type>1</edge_type> <source_obj>68</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_410"> <id>732</id> <edge_type>1</edge_type> <source_obj>69</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_411"> <id>733</id> <edge_type>1</edge_type> <source_obj>70</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_412"> <id>734</id> <edge_type>1</edge_type> <source_obj>71</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_413"> <id>735</id> <edge_type>1</edge_type> <source_obj>72</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_414"> <id>736</id> <edge_type>1</edge_type> <source_obj>73</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_415"> <id>737</id> <edge_type>1</edge_type> <source_obj>74</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_416"> <id>738</id> <edge_type>1</edge_type> <source_obj>75</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_417"> <id>739</id> <edge_type>1</edge_type> <source_obj>76</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_418"> <id>740</id> <edge_type>1</edge_type> <source_obj>77</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_419"> <id>741</id> <edge_type>1</edge_type> <source_obj>78</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_420"> <id>742</id> <edge_type>1</edge_type> <source_obj>79</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_421"> <id>743</id> <edge_type>1</edge_type> <source_obj>80</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_422"> <id>744</id> <edge_type>1</edge_type> <source_obj>81</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_423"> <id>745</id> <edge_type>1</edge_type> <source_obj>82</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_424"> <id>746</id> <edge_type>1</edge_type> <source_obj>83</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_425"> <id>747</id> <edge_type>1</edge_type> <source_obj>84</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_426"> <id>748</id> <edge_type>1</edge_type> <source_obj>85</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_427"> <id>749</id> <edge_type>1</edge_type> <source_obj>86</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_428"> <id>750</id> <edge_type>1</edge_type> <source_obj>87</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_429"> <id>751</id> <edge_type>1</edge_type> <source_obj>88</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_430"> <id>752</id> <edge_type>1</edge_type> <source_obj>89</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_431"> <id>753</id> <edge_type>1</edge_type> <source_obj>90</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_432"> <id>754</id> <edge_type>1</edge_type> <source_obj>91</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_433"> <id>755</id> <edge_type>1</edge_type> <source_obj>92</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_434"> <id>756</id> <edge_type>1</edge_type> <source_obj>93</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_435"> <id>757</id> <edge_type>1</edge_type> <source_obj>94</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_436"> <id>758</id> <edge_type>1</edge_type> <source_obj>95</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_437"> <id>759</id> <edge_type>1</edge_type> <source_obj>96</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_438"> <id>760</id> <edge_type>1</edge_type> <source_obj>97</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_439"> <id>761</id> <edge_type>1</edge_type> <source_obj>98</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_440"> <id>762</id> <edge_type>1</edge_type> <source_obj>99</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_441"> <id>763</id> <edge_type>1</edge_type> <source_obj>100</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_442"> <id>764</id> <edge_type>1</edge_type> <source_obj>101</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_443"> <id>765</id> <edge_type>1</edge_type> <source_obj>102</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_444"> <id>766</id> <edge_type>1</edge_type> <source_obj>103</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_445"> <id>767</id> <edge_type>1</edge_type> <source_obj>104</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_446"> <id>768</id> <edge_type>1</edge_type> <source_obj>105</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_447"> <id>769</id> <edge_type>1</edge_type> <source_obj>106</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_448"> <id>770</id> <edge_type>1</edge_type> <source_obj>107</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_449"> <id>771</id> <edge_type>1</edge_type> <source_obj>108</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_450"> <id>772</id> <edge_type>1</edge_type> <source_obj>109</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_451"> <id>773</id> <edge_type>1</edge_type> <source_obj>110</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_452"> <id>774</id> <edge_type>1</edge_type> <source_obj>111</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_453"> <id>775</id> <edge_type>1</edge_type> <source_obj>112</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_454"> <id>776</id> <edge_type>1</edge_type> <source_obj>113</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_455"> <id>777</id> <edge_type>1</edge_type> <source_obj>114</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_456"> <id>778</id> <edge_type>1</edge_type> <source_obj>115</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_457"> <id>779</id> <edge_type>1</edge_type> <source_obj>116</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_458"> <id>780</id> <edge_type>1</edge_type> <source_obj>117</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_459"> <id>781</id> <edge_type>1</edge_type> <source_obj>118</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_460"> <id>782</id> <edge_type>1</edge_type> <source_obj>119</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_461"> <id>783</id> <edge_type>1</edge_type> <source_obj>120</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_462"> <id>784</id> <edge_type>1</edge_type> <source_obj>121</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_463"> <id>785</id> <edge_type>1</edge_type> <source_obj>122</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_464"> <id>786</id> <edge_type>1</edge_type> <source_obj>123</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_465"> <id>787</id> <edge_type>1</edge_type> <source_obj>124</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_466"> <id>788</id> <edge_type>1</edge_type> <source_obj>125</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_467"> <id>789</id> <edge_type>1</edge_type> <source_obj>126</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_468"> <id>790</id> <edge_type>1</edge_type> <source_obj>127</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_469"> <id>791</id> <edge_type>1</edge_type> <source_obj>128</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_470"> <id>792</id> <edge_type>1</edge_type> <source_obj>129</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_471"> <id>793</id> <edge_type>1</edge_type> <source_obj>130</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_472"> <id>794</id> <edge_type>1</edge_type> <source_obj>131</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_473"> <id>795</id> <edge_type>1</edge_type> <source_obj>132</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_474"> <id>796</id> <edge_type>1</edge_type> <source_obj>133</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_475"> <id>797</id> <edge_type>1</edge_type> <source_obj>134</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_476"> <id>798</id> <edge_type>1</edge_type> <source_obj>135</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_477"> <id>799</id> <edge_type>1</edge_type> <source_obj>136</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_478"> <id>800</id> <edge_type>1</edge_type> <source_obj>137</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_479"> <id>801</id> <edge_type>1</edge_type> <source_obj>138</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_480"> <id>802</id> <edge_type>1</edge_type> <source_obj>139</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_481"> <id>803</id> <edge_type>1</edge_type> <source_obj>140</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_482"> <id>804</id> <edge_type>1</edge_type> <source_obj>141</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_483"> <id>805</id> <edge_type>1</edge_type> <source_obj>142</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_484"> <id>806</id> <edge_type>1</edge_type> <source_obj>143</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_485"> <id>807</id> <edge_type>1</edge_type> <source_obj>144</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_486"> <id>808</id> <edge_type>1</edge_type> <source_obj>145</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_487"> <id>809</id> <edge_type>1</edge_type> <source_obj>146</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_488"> <id>810</id> <edge_type>1</edge_type> <source_obj>147</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_489"> <id>811</id> <edge_type>1</edge_type> <source_obj>148</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_490"> <id>812</id> <edge_type>1</edge_type> <source_obj>149</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_491"> <id>813</id> <edge_type>1</edge_type> <source_obj>150</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_492"> <id>814</id> <edge_type>1</edge_type> <source_obj>151</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_493"> <id>815</id> <edge_type>1</edge_type> <source_obj>152</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_494"> <id>816</id> <edge_type>1</edge_type> <source_obj>153</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_495"> <id>817</id> <edge_type>1</edge_type> <source_obj>154</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_496"> <id>818</id> <edge_type>1</edge_type> <source_obj>155</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_497"> <id>819</id> <edge_type>1</edge_type> <source_obj>156</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_498"> <id>820</id> <edge_type>1</edge_type> <source_obj>157</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_499"> <id>821</id> <edge_type>1</edge_type> <source_obj>158</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_500"> <id>822</id> <edge_type>1</edge_type> <source_obj>159</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_501"> <id>823</id> <edge_type>1</edge_type> <source_obj>160</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_502"> <id>824</id> <edge_type>1</edge_type> <source_obj>161</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_503"> <id>825</id> <edge_type>1</edge_type> <source_obj>162</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_504"> <id>826</id> <edge_type>1</edge_type> <source_obj>163</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_505"> <id>827</id> <edge_type>1</edge_type> <source_obj>164</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_506"> <id>828</id> <edge_type>1</edge_type> <source_obj>165</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_507"> <id>829</id> <edge_type>1</edge_type> <source_obj>166</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_508"> <id>830</id> <edge_type>1</edge_type> <source_obj>167</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_509"> <id>831</id> <edge_type>1</edge_type> <source_obj>168</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_510"> <id>832</id> <edge_type>1</edge_type> <source_obj>169</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_511"> <id>833</id> <edge_type>1</edge_type> <source_obj>170</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_512"> <id>834</id> <edge_type>1</edge_type> <source_obj>171</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_513"> <id>835</id> <edge_type>1</edge_type> <source_obj>172</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_514"> <id>836</id> <edge_type>1</edge_type> <source_obj>173</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_515"> <id>837</id> <edge_type>1</edge_type> <source_obj>174</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_516"> <id>838</id> <edge_type>1</edge_type> <source_obj>175</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_517"> <id>839</id> <edge_type>1</edge_type> <source_obj>176</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_518"> <id>840</id> <edge_type>1</edge_type> <source_obj>177</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_519"> <id>841</id> <edge_type>1</edge_type> <source_obj>178</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_520"> <id>842</id> <edge_type>1</edge_type> <source_obj>179</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_521"> <id>843</id> <edge_type>1</edge_type> <source_obj>180</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_522"> <id>844</id> <edge_type>1</edge_type> <source_obj>181</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_523"> <id>845</id> <edge_type>1</edge_type> <source_obj>182</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_524"> <id>846</id> <edge_type>1</edge_type> <source_obj>183</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_525"> <id>847</id> <edge_type>1</edge_type> <source_obj>184</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_526"> <id>848</id> <edge_type>1</edge_type> <source_obj>185</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_527"> <id>849</id> <edge_type>1</edge_type> <source_obj>186</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_528"> <id>850</id> <edge_type>1</edge_type> <source_obj>187</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_529"> <id>851</id> <edge_type>1</edge_type> <source_obj>188</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_530"> <id>852</id> <edge_type>1</edge_type> <source_obj>189</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_531"> <id>853</id> <edge_type>1</edge_type> <source_obj>190</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_532"> <id>854</id> <edge_type>1</edge_type> <source_obj>191</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_533"> <id>855</id> <edge_type>1</edge_type> <source_obj>192</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_534"> <id>856</id> <edge_type>1</edge_type> <source_obj>193</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_535"> <id>857</id> <edge_type>1</edge_type> <source_obj>194</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_536"> <id>858</id> <edge_type>1</edge_type> <source_obj>195</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_537"> <id>859</id> <edge_type>1</edge_type> <source_obj>196</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_538"> <id>860</id> <edge_type>1</edge_type> <source_obj>197</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_539"> <id>861</id> <edge_type>1</edge_type> <source_obj>198</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_540"> <id>862</id> <edge_type>1</edge_type> <source_obj>199</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_541"> <id>863</id> <edge_type>1</edge_type> <source_obj>200</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_542"> <id>864</id> <edge_type>1</edge_type> <source_obj>201</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_543"> <id>865</id> <edge_type>1</edge_type> <source_obj>202</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_544"> <id>866</id> <edge_type>1</edge_type> <source_obj>203</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_545"> <id>867</id> <edge_type>1</edge_type> <source_obj>204</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_546"> <id>868</id> <edge_type>1</edge_type> <source_obj>205</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_547"> <id>869</id> <edge_type>1</edge_type> <source_obj>206</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_548"> <id>870</id> <edge_type>1</edge_type> <source_obj>207</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_549"> <id>871</id> <edge_type>1</edge_type> <source_obj>208</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_550"> <id>872</id> <edge_type>1</edge_type> <source_obj>209</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_551"> <id>873</id> <edge_type>1</edge_type> <source_obj>210</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_552"> <id>874</id> <edge_type>1</edge_type> <source_obj>211</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_553"> <id>875</id> <edge_type>1</edge_type> <source_obj>212</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_554"> <id>876</id> <edge_type>1</edge_type> <source_obj>213</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_555"> <id>877</id> <edge_type>1</edge_type> <source_obj>214</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_556"> <id>878</id> <edge_type>1</edge_type> <source_obj>215</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_557"> <id>879</id> <edge_type>1</edge_type> <source_obj>216</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_558"> <id>880</id> <edge_type>1</edge_type> <source_obj>217</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_559"> <id>881</id> <edge_type>1</edge_type> <source_obj>218</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_560"> <id>882</id> <edge_type>1</edge_type> <source_obj>219</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_561"> <id>883</id> <edge_type>1</edge_type> <source_obj>220</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_562"> <id>884</id> <edge_type>1</edge_type> <source_obj>221</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_563"> <id>885</id> <edge_type>1</edge_type> <source_obj>222</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_564"> <id>886</id> <edge_type>1</edge_type> <source_obj>223</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_565"> <id>887</id> <edge_type>1</edge_type> <source_obj>224</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_566"> <id>888</id> <edge_type>1</edge_type> <source_obj>225</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_567"> <id>889</id> <edge_type>1</edge_type> <source_obj>226</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_568"> <id>890</id> <edge_type>1</edge_type> <source_obj>227</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_569"> <id>891</id> <edge_type>1</edge_type> <source_obj>228</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_570"> <id>892</id> <edge_type>1</edge_type> <source_obj>229</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_571"> <id>893</id> <edge_type>1</edge_type> <source_obj>230</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_572"> <id>894</id> <edge_type>1</edge_type> <source_obj>231</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_573"> <id>895</id> <edge_type>1</edge_type> <source_obj>232</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_574"> <id>896</id> <edge_type>1</edge_type> <source_obj>233</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_575"> <id>897</id> <edge_type>1</edge_type> <source_obj>234</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_576"> <id>898</id> <edge_type>1</edge_type> <source_obj>235</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_577"> <id>899</id> <edge_type>1</edge_type> <source_obj>236</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_578"> <id>900</id> <edge_type>1</edge_type> <source_obj>237</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_579"> <id>901</id> <edge_type>1</edge_type> <source_obj>238</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_580"> <id>902</id> <edge_type>1</edge_type> <source_obj>239</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_581"> <id>903</id> <edge_type>1</edge_type> <source_obj>240</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_582"> <id>904</id> <edge_type>1</edge_type> <source_obj>241</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_583"> <id>905</id> <edge_type>1</edge_type> <source_obj>242</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_584"> <id>906</id> <edge_type>1</edge_type> <source_obj>243</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_585"> <id>907</id> <edge_type>1</edge_type> <source_obj>244</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_586"> <id>908</id> <edge_type>1</edge_type> <source_obj>245</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_587"> <id>909</id> <edge_type>1</edge_type> <source_obj>246</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_588"> <id>910</id> <edge_type>1</edge_type> <source_obj>247</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_589"> <id>911</id> <edge_type>1</edge_type> <source_obj>248</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_590"> <id>912</id> <edge_type>1</edge_type> <source_obj>249</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_591"> <id>913</id> <edge_type>1</edge_type> <source_obj>250</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_592"> <id>914</id> <edge_type>1</edge_type> <source_obj>251</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_593"> <id>915</id> <edge_type>1</edge_type> <source_obj>252</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_594"> <id>916</id> <edge_type>1</edge_type> <source_obj>253</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_595"> <id>917</id> <edge_type>1</edge_type> <source_obj>254</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_596"> <id>918</id> <edge_type>1</edge_type> <source_obj>255</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_597"> <id>919</id> <edge_type>1</edge_type> <source_obj>256</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_598"> <id>920</id> <edge_type>1</edge_type> <source_obj>257</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_599"> <id>921</id> <edge_type>1</edge_type> <source_obj>258</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_600"> <id>922</id> <edge_type>1</edge_type> <source_obj>259</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_601"> <id>923</id> <edge_type>1</edge_type> <source_obj>260</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_602"> <id>924</id> <edge_type>1</edge_type> <source_obj>261</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_603"> <id>925</id> <edge_type>1</edge_type> <source_obj>262</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_604"> <id>926</id> <edge_type>1</edge_type> <source_obj>263</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_605"> <id>927</id> <edge_type>1</edge_type> <source_obj>264</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_606"> <id>928</id> <edge_type>1</edge_type> <source_obj>265</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_607"> <id>929</id> <edge_type>1</edge_type> <source_obj>266</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_608"> <id>930</id> <edge_type>1</edge_type> <source_obj>267</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_609"> <id>931</id> <edge_type>1</edge_type> <source_obj>268</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_610"> <id>932</id> <edge_type>1</edge_type> <source_obj>269</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_611"> <id>933</id> <edge_type>1</edge_type> <source_obj>270</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_612"> <id>934</id> <edge_type>1</edge_type> <source_obj>271</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_613"> <id>935</id> <edge_type>1</edge_type> <source_obj>272</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_614"> <id>936</id> <edge_type>1</edge_type> <source_obj>273</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_615"> <id>937</id> <edge_type>1</edge_type> <source_obj>274</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_616"> <id>938</id> <edge_type>1</edge_type> <source_obj>275</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_617"> <id>939</id> <edge_type>1</edge_type> <source_obj>276</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_618"> <id>940</id> <edge_type>1</edge_type> <source_obj>277</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_619"> <id>941</id> <edge_type>1</edge_type> <source_obj>278</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_620"> <id>942</id> <edge_type>1</edge_type> <source_obj>279</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_621"> <id>943</id> <edge_type>1</edge_type> <source_obj>280</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_622"> <id>944</id> <edge_type>1</edge_type> <source_obj>281</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_623"> <id>945</id> <edge_type>1</edge_type> <source_obj>282</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_624"> <id>946</id> <edge_type>1</edge_type> <source_obj>283</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_625"> <id>947</id> <edge_type>1</edge_type> <source_obj>284</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_626"> <id>948</id> <edge_type>1</edge_type> <source_obj>285</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_627"> <id>949</id> <edge_type>1</edge_type> <source_obj>286</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_628"> <id>950</id> <edge_type>1</edge_type> <source_obj>287</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_629"> <id>951</id> <edge_type>1</edge_type> <source_obj>288</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_630"> <id>952</id> <edge_type>1</edge_type> <source_obj>289</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_631"> <id>953</id> <edge_type>1</edge_type> <source_obj>290</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_632"> <id>954</id> <edge_type>1</edge_type> <source_obj>291</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_633"> <id>955</id> <edge_type>1</edge_type> <source_obj>292</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_634"> <id>956</id> <edge_type>1</edge_type> <source_obj>293</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_635"> <id>957</id> <edge_type>1</edge_type> <source_obj>294</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_636"> <id>958</id> <edge_type>1</edge_type> <source_obj>295</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_637"> <id>959</id> <edge_type>1</edge_type> <source_obj>296</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_638"> <id>960</id> <edge_type>1</edge_type> <source_obj>297</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_639"> <id>961</id> <edge_type>1</edge_type> <source_obj>298</source_obj> <sink_obj>331</sink_obj> </item> <item class_id_reference="20" object_id="_640"> <id>1180</id> <edge_type>2</edge_type> <source_obj>330</source_obj> <sink_obj>336</sink_obj> </item> <item class_id_reference="20" object_id="_641"> <id>1181</id> <edge_type>2</edge_type> <source_obj>330</source_obj> <sink_obj>333</sink_obj> </item> <item class_id_reference="20" object_id="_642"> <id>1182</id> <edge_type>2</edge_type> <source_obj>333</source_obj> <sink_obj>338</sink_obj> </item> <item class_id_reference="20" object_id="_643"> <id>1183</id> <edge_type>2</edge_type> <source_obj>336</source_obj> <sink_obj>338</sink_obj> </item> </edges> </cdfg> <cdfg_regions class_id="21" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="22" tracking_level="1" version="0" object_id="_644"> <mId>1</mId> <mTag>BlackBoxJam</mTag> <mType>0</mType> <sub_regions> <count>0</count> <item_version>0</item_version> </sub_regions> <basic_blocks> <count>4</count> <item_version>0</item_version> <item>330</item> <item>333</item> <item>336</item> <item>338</item> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>-1</mMinTripCount> <mMaxTripCount>-1</mMaxTripCount> <mMinLatency>-1</mMinLatency> <mMaxLatency>-1</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> </cdfg_regions> <fsm class_id="-1"></fsm> <res class_id="-1"></res> <node_label_latency class_id="26" tracking_level="0" version="0"> <count>16</count> <item_version>0</item_version> <item class_id="27" tracking_level="0" version="0"> <first>299</first> <second class_id="28" tracking_level="0" version="0"> <first>0</first> <second>0</second> </second> </item> <item> <first>300</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>301</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>302</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>303</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>304</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>305</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>306</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>307</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>308</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>329</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>331</first> <second> <first>0</first> <second>1</second> </second> </item> <item> <first>332</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>334</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>335</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>337</first> <second> <first>1</first> <second>0</second> </second> </item> </node_label_latency> <bblk_ent_exit class_id="29" tracking_level="0" version="0"> <count>4</count> <item_version>0</item_version> <item class_id="30" tracking_level="0" version="0"> <first>330</first> <second class_id="31" tracking_level="0" version="0"> <first>0</first> <second>0</second> </second> </item> <item> <first>333</first> <second> <first>0</first> <second>1</second> </second> </item> <item> <first>336</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>338</first> <second> <first>1</first> <second>1</second> </second> </item> </bblk_ent_exit> <regions class_id="32" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </regions> <dp_fu_nodes class_id="33" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </dp_fu_nodes> <dp_fu_nodes_expression class_id="34" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </dp_fu_nodes_expression> <dp_fu_nodes_module> <count>0</count> <item_version>0</item_version> </dp_fu_nodes_module> <dp_fu_nodes_io> <count>0</count> <item_version>0</item_version> </dp_fu_nodes_io> <return_ports> <count>0</count> <item_version>0</item_version> </return_ports> <dp_mem_port_nodes class_id="35" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </dp_mem_port_nodes> <dp_reg_nodes> <count>0</count> <item_version>0</item_version> </dp_reg_nodes> <dp_regname_nodes> <count>0</count> <item_version>0</item_version> </dp_regname_nodes> <dp_reg_phi> <count>0</count> <item_version>0</item_version> </dp_reg_phi> <dp_regname_phi> <count>0</count> <item_version>0</item_version> </dp_regname_phi> <dp_port_io_nodes class_id="36" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </dp_port_io_nodes> <port2core class_id="37" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </port2core> <node2core> <count>0</count> <item_version>0</item_version> </node2core> </syndb> </boost_serialization>
-- Abstract : -- -- Subprograms common to more than one parser, higher-level than in wisitoken.ads -- -- Copyright (C) 2018 - 2019 Free Software Foundation, Inc. -- -- This library is free software; you can redistribute it and/or modify it -- under terms of the GNU General Public License as published by the Free -- Software Foundation; either version 3, or (at your option) any later -- version. This library is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- -- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. -- As a special exception under Section 7 of GPL version 3, you are granted -- additional permissions described in the GCC Runtime Library Exception, -- version 3.1, as published by the Free Software Foundation. pragma License (Modified_GPL); with Ada.Finalization; with WisiToken.Lexer; with WisiToken.Syntax_Trees; package WisiToken.Parse is type Base_Parser is abstract new Ada.Finalization.Limited_Controlled with record Trace : access WisiToken.Trace'Class; Lexer : WisiToken.Lexer.Handle; User_Data : WisiToken.Syntax_Trees.User_Data_Access; Terminals : aliased WisiToken.Base_Token_Arrays.Vector; Line_Begin_Token : aliased WisiToken.Line_Begin_Token_Vectors.Vector; -- Line_Begin_Token (I) is the index into Terminals of the first -- grammar token on line I. Line_Begin_Token.First_Index is the first -- line containing a grammar token (after leading comments). However, -- if the only token on line I is a non_grammar token (ie a comment, -- or a newline for a blank line), Line_Begin_Token (I) is the last -- grammar token on the previous non-blank line. If Line (I) is a -- non-first line in a multi-line token, Line_Begin_Token (I) is -- Invalid_Token_Index. end record; -- Common to all parsers. Finalize should free any allocated objects. function Next_Grammar_Token (Parser : in out Base_Parser) return Token_ID; -- Get next token from Lexer, call User_Data.Lexer_To_Augmented. If -- it is a grammar token, store in Terminals and return its id. -- Otherwise, repeat. -- -- Propagates Fatal_Error from Lexer. procedure Lex_All (Parser : in out Base_Parser); -- Clear Terminals, Line_Begin_Token; reset User_Data. Then call -- Next_Grammar_Token repeatedly until EOF_ID is returned. -- -- The user must first call Lexer.Reset_* to set the input text. procedure Parse (Parser : aliased in out Base_Parser) is abstract; -- Call Lex_All, then execute parse algorithm to parse the tokens, -- storing the result in Parser for Execute_Actions. -- -- If a parse error is encountered, raises Syntax_Error. -- Parser.Lexer_Errors and Parser contain information about the -- errors. -- -- For other errors, raises Parse_Error with an appropriate error -- message. function Tree (Parser : in Base_Parser) return Syntax_Trees.Tree is abstract; -- Return the syntax tree resulting from the parse. function Any_Errors (Parser : in Base_Parser) return Boolean is abstract; procedure Put_Errors (Parser : in Base_Parser) is abstract; -- Output error messages to Ada.Text_IO.Current_Error. procedure Execute_Actions (Parser : in out Base_Parser) is abstract; -- Execute all actions in Parser.Tree. end WisiToken.Parse;
with HAL; use HAL; with STM32; use STM32; with STM32.GPIO; use STM32.GPIO; with STM32.Device; use STM32.Device; package body Serial_IO is protected body Serial_Port_Controller is procedure Init (Baud_Rate : Baud_Rates) is Tx_Pin : constant GPIO_Point := PB6; Rx_Pin : constant GPIO_Point := PB7; Device_Pins : constant GPIO_Points := Rx_Pin & Tx_Pin; Configuration : GPIO_Port_Configuration; begin -- configure UART 1 Enable_Clock (USART_1); Disable (USART_1); Set_Baud_Rate (USART_1, Baud_Rate); Set_Mode (USART_1, Tx_Rx_Mode); Set_Stop_Bits (USART_1, Stopbits_1); Set_Word_Length (USART_1, Word_Length_8); Set_Parity (USART_1, No_Parity); Set_Flow_Control (USART_1, No_Flow_Control); Enable (USART_1); -- configure pins Enable_Clock (Device_Pins); Configuration.Mode := Mode_AF; Configuration.Speed := Speed_50MHz; Configuration.Output_Type := Push_Pull; Configuration.Resistors := Pull_Up; Configure_IO (Device_Pins, Configuration); Configure_Alternate_Function (Device_Pins, GPIO_AF_USART1_7); -- enable interrupt Enable_Interrupts (USART_1, Received_Data_Not_Empty); Enable_Interrupts (USART_1, Transmission_Complete); Initialized := True; end Init; function Available return Boolean is begin return not Input.Is_Empty; end Available; procedure Read (Result : out Unsigned_8) is begin Result := Input.Read; end Read; -- doesn't work, because in protected functions I can't modify variables -- function Read return Unsigned_8 is -- begin -- return Input.Read; -- end; procedure Write (Data : Unsigned_8) is begin if Output.Is_Empty then -- if the output FIFO is empty, start transfer Transmit (USART_1, UInt9 (Data)); else -- else add to the FIFO: TODO: possible race condition? output.Write (Data); end if; end Write; procedure Interrupt_Handler is Received_Char : Unsigned_8; begin -- check for data arrival if Status (USART_1, Read_Data_Register_Not_Empty) and Interrupt_Enabled (USART_1, Received_Data_Not_Empty) then Received_Char := Unsigned_8 (Current_Input (USART_1) and 255); Input.Write (Received_Char); end if; -- check for transmission ready if Status (USART_1, Transmission_Complete_Indicated) and Interrupt_Enabled (USART_1, Transmission_Complete) then if not Output.Is_Empty then Transmit (USART_1, UInt9 (Output.Read)); end if; Clear_Status (USART_1, Transmission_Complete_Indicated); end if; end Interrupt_Handler; end Serial_Port_Controller; end Serial_IO;
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Ada Modeling Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2011-2012, Vadim Godunko <vgodunko@gmail.com> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with Ada.Containers.Hashed_Maps; with League.Strings.Hash; package body AMF.Internals.Factories is package Universal_String_Factory_Maps is new Ada.Containers.Hashed_Maps (League.Strings.Universal_String, Factory_Constructor, League.Strings.Hash, League.Strings."="); URI_Registry : Universal_String_Factory_Maps.Map; Packages : AMF.CMOF.Packages.Collections.Set_Of_CMOF_Package; Module_Registry : array (AMF.Internals.AMF_Metamodel) of Module_Factory_Access; Last_Module : AMF_Metamodel := 0; -------------------- -- Create_Factory -- -------------------- function Create_Factory (URI : League.Strings.Universal_String; Extent : AMF_Extent) return AMF.Factories.Factory_Access is Position : constant Universal_String_Factory_Maps.Cursor := URI_Registry.Find (URI); begin if Universal_String_Factory_Maps.Has_Element (Position) then return Universal_String_Factory_Maps.Element (Position) (Extent); else return null; end if; end Create_Factory; ----------------- -- Get_Factory -- ----------------- function Get_Factory (Metamodel : AMF.Internals.AMF_Metamodel) return Module_Factory_Access is begin return Module_Registry (Metamodel); end Get_Factory; ------------------ -- Get_Packages -- ------------------ function Get_Packages return AMF.CMOF.Packages.Collections.Set_Of_CMOF_Package is begin return Packages; end Get_Packages; -------------- -- Register -- -------------- procedure Register (The_Package : not null AMF.CMOF.Packages.CMOF_Package_Access; Constructor : not null Factory_Constructor) is begin URI_Registry.Insert (The_Package.Get_URI.Value, Constructor); Packages.Add (The_Package); end Register; -------------- -- Register -- -------------- procedure Register (Factory : not null Module_Factory_Access; Module : out AMF_Metamodel) is begin Module := Last_Module; Last_Module := Last_Module + 1; Module_Registry (Module) := Factory; end Register; end AMF.Internals.Factories;
function Spiral (N : Positive) return Array_Type is Result : Array_Type (1..N, 1..N); Left : Positive := 1; Right : Positive := N; Top : Positive := 1; Bottom : Positive := N; Index : Natural := 0; begin while Left < Right loop for I in Left..Right - 1 loop Result (Top, I) := Index; Index := Index + 1; end loop; for J in Top..Bottom - 1 loop Result (J, Right) := Index; Index := Index + 1; end loop; for I in reverse Left + 1..Right loop Result (Bottom, I) := Index; Index := Index + 1; end loop; for J in reverse Top + 1..Bottom loop Result (J, Left) := Index; Index := Index + 1; end loop; Left := Left + 1; Right := Right - 1; Top := Top + 1; Bottom := Bottom - 1; end loop; Result (Top, Left) := Index; return Result; end Spiral;
with Ada.Unchecked_Conversion; package Tkmrpc.Response.Ike.Isa_Skip_Create_First.Convert is function To_Response is new Ada.Unchecked_Conversion ( Source => Isa_Skip_Create_First.Response_Type, Target => Response.Data_Type); function From_Response is new Ada.Unchecked_Conversion ( Source => Response.Data_Type, Target => Isa_Skip_Create_First.Response_Type); end Tkmrpc.Response.Ike.Isa_Skip_Create_First.Convert;
-- SPDX-FileCopyrightText: 2019 Max Reznik <reznikmm@gmail.com> -- -- SPDX-License-Identifier: MIT ------------------------------------------------------------- with Program.Elements.Declarations; with Program.Elements.Defining_Identifiers; with Program.Lexical_Elements; with Program.Elements.Expressions; package Program.Elements.Generalized_Iterator_Specifications is pragma Pure (Program.Elements.Generalized_Iterator_Specifications); type Generalized_Iterator_Specification is limited interface and Program.Elements.Declarations.Declaration; type Generalized_Iterator_Specification_Access is access all Generalized_Iterator_Specification'Class with Storage_Size => 0; not overriding function Name (Self : Generalized_Iterator_Specification) return not null Program.Elements.Defining_Identifiers .Defining_Identifier_Access is abstract; not overriding function Iterator_Name (Self : Generalized_Iterator_Specification) return not null Program.Elements.Expressions.Expression_Access is abstract; not overriding function Has_Reverse (Self : Generalized_Iterator_Specification) return Boolean is abstract; type Generalized_Iterator_Specification_Text is limited interface; type Generalized_Iterator_Specification_Text_Access is access all Generalized_Iterator_Specification_Text'Class with Storage_Size => 0; not overriding function To_Generalized_Iterator_Specification_Text (Self : in out Generalized_Iterator_Specification) return Generalized_Iterator_Specification_Text_Access is abstract; not overriding function In_Token (Self : Generalized_Iterator_Specification_Text) return not null Program.Lexical_Elements.Lexical_Element_Access is abstract; not overriding function Reverse_Token (Self : Generalized_Iterator_Specification_Text) return Program.Lexical_Elements.Lexical_Element_Access is abstract; end Program.Elements.Generalized_Iterator_Specifications;
------------------------------------------------------------------------------ -- 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 Asis.Expressions; with Asis.Definitions; with XASIS.Static.Discrete; package body XASIS.Static.Float is use Asis; use XASIS.Integers; use XASIS.Fractions; use Asis.Expressions; package F renames XASIS.Fractions; function B (Data : Boolean) return Value renames Discrete.B; -------------- -- Evaluate -- -------------- function Evaluate (Object : Type_Class; Kind : Asis.Operator_Kinds; Args : Asis.Association_List) return Value is begin case Kind is when A_Unary_Plus_Operator => return Evaluate (Actual_Parameter (Args (1))); when A_Unary_Minus_Operator | An_Abs_Operator => declare Item : Value renames Evaluate (Actual_Parameter (Args (1))); begin if not Is_Float (Item) then return Undefined; elsif Kind = A_Unary_Minus_Operator then return V (-Item.Fraction); else return V (abs Item.Fraction); end if; end; when others => declare Left : Value renames Evaluate (Actual_Parameter (Args (1))); Right : Value renames Evaluate (Actual_Parameter (Args (2))); begin if Is_Float (Left) and Is_Float (Right) then case Kind is when A_Plus_Operator => return V (Left.Fraction + Right.Fraction); when A_Minus_Operator => return V (Left.Fraction - Right.Fraction); when A_Multiply_Operator => return V (Left.Fraction * Right.Fraction); when A_Divide_Operator => Check_Zero (Right); return V (Left.Fraction / Right.Fraction); when An_Equal_Operator => return B (Left.Fraction = Right.Fraction); when A_Not_Equal_Operator => return B (Left.Fraction /= Right.Fraction); when A_Less_Than_Operator => return B (Left.Fraction < Right.Fraction); when A_Less_Than_Or_Equal_Operator => return B (Left.Fraction <= Right.Fraction); when A_Greater_Than_Operator => return B (Left.Fraction > Right.Fraction); when A_Greater_Than_Or_Equal_Operator => return B (Left.Fraction >= Right.Fraction); when others => null; end case; elsif Is_Float (Left) and Discrete.Is_Discrete (Right) then case Kind is when A_Multiply_Operator => return V (Left.Fraction * Int (Right.Pos)); when A_Divide_Operator => Check_Zero (Right); return V (Left.Fraction / Int (Right.Pos)); when An_Exponentiate_Operator => return V (Left.Fraction ** Right.Pos); when others => null; end case; elsif Discrete.Is_Discrete (Left) and Is_Float (Right) then case Kind is when A_Multiply_Operator => return V (Int (Left.Pos) * Right.Fraction); when others => null; end case; else return Undefined; end if; end; end case; Raise_Error (Internal_Error); return Undefined; end Evaluate; -------------- -- Evaluate -- -------------- function Evaluate (Object : Type_Class; Kind : Asis.Attribute_Kinds; Args : Asis.Association_List) return Value is begin case Kind is when An_Adjacent_Attribute | A_Copy_Sign_Attribute | A_Max_Attribute | A_Min_Attribute | A_Remainder_Attribute => declare L : Value renames Evaluate (Actual_Parameter (Args (1))); R : Value renames Evaluate (Actual_Parameter (Args (2))); begin if Is_Float (L) and Is_Float (R) then case Kind is when An_Adjacent_Attribute => if L.Fraction = R.Fraction then return L; else return Undefined; end if; when A_Copy_Sign_Attribute => if L.Fraction = F.Zero then return L; elsif L.Fraction < F.Zero xor R.Fraction < F.Zero then return V (-L.Fraction); else return L; end if; when A_Max_Attribute => if L.Fraction < R.Fraction then return R; else return L; end if; when A_Min_Attribute => if L.Fraction > R.Fraction then return R; else return L; end if; when A_Remainder_Attribute => declare D : constant F.Fraction := L.Fraction / R.Fraction; N : I.Value := Truncate (D); A : constant F.Fraction := Int (I.Two) * abs (Int (N) - D); begin if A = F.One then if N mod I.Two = I.One then if N > I.Zero then N := N + I.One; else N := N - I.One; end if; end if; elsif A > F.One then if N > I.Zero then N := N + I.One; else N := N - I.One; end if; end if; return V (L.Fraction - Int (N) * R.Fraction); end; when others => null; end case; else return Undefined; end if; end; when A_Ceiling_Attribute | A_Floor_Attribute | A_Rounding_Attribute | A_Truncation_Attribute | An_Unbiased_Rounding_Attribute => declare X : Value renames Evaluate (Actual_Parameter (Args (1))); begin if not Is_Float (X) then return Undefined; end if; case Kind is when A_Ceiling_Attribute => declare T : constant F.Fraction := Int (Truncate (X.Fraction)); begin if X.Fraction = T then return X; elsif X.Fraction > F.Zero then return V (T + F.One); else return V (T); end if; end; when A_Floor_Attribute => declare T : constant F.Fraction := Int (Truncate (X.Fraction)); begin if X.Fraction = T then return X; elsif X.Fraction < F.Zero then return V (T - F.One); else return V (T); end if; end; when A_Rounding_Attribute => declare R : constant F.Fraction := X.Fraction; L : constant I.Value := Truncate (R); U : I.Value; begin if X.Fraction >= F.Zero then U := L + I.One; else U := L - I.One; end if; if abs (Int (L) - R) < abs (Int (U) - R) then return V (Int (L)); else return V (Int (U)); end if; end; when A_Truncation_Attribute => return V (Int (Truncate (X.Fraction))); when An_Unbiased_Rounding_Attribute => declare R : constant F.Fraction := X.Fraction; L : constant I.Value := Truncate (R); U : I.Value; begin if X.Fraction >= F.Zero then U := L + I.One; else U := L - I.One; end if; if abs (Int (L) - R) = abs (Int (U) - R) then if L mod I.Two = I.Zero then return V (Int (L)); else return V (Int (U)); end if; elsif abs (Int (L) - R) < abs (Int (U) - R) then return V (Int (L)); else return V (Int (U)); end if; end; when others => null; end case; end; when A_Compose_Attribute -- depend on unknown S'Machine_Radix | An_Exponent_Attribute | A_Fraction_Attribute | A_Leading_Part_Attribute | A_Machine_Attribute | A_Machine_Rounding_Attribute | A_Model_Attribute | A_Pred_Attribute | A_Succ_Attribute | A_Scaling_Attribute => return Undefined; when others => null; end case; Raise_Error (Internal_Error); return Undefined; end Evaluate; -------------- -- Evaluate -- -------------- function Evaluate (Object : Type_Class; Kind : Asis.Attribute_Kinds; Element : Asis.Expression) return Value is begin case Kind is when An_Alignment_Attribute | A_Denorm_Attribute | A_Machine_Emax_Attribute | A_Machine_Emin_Attribute | A_Machine_Mantissa_Attribute | A_Machine_Overflows_Attribute | A_Machine_Radix_Attribute | A_Machine_Rounds_Attribute | A_Max_Size_In_Storage_Elements_Attribute | A_Model_Emin_Attribute | A_Model_Epsilon_Attribute | A_Model_Mantissa_Attribute | A_Model_Small_Attribute | A_Safe_First_Attribute | A_Safe_Last_Attribute | A_Signed_Zeros_Attribute | A_Size_Attribute | A_Stream_Size_Attribute | A_Wide_Wide_Width_Attribute | A_Wide_Width_Attribute | A_Width_Attribute => return Undefined; when A_Digits_Attribute => declare use Asis.Definitions; Def : constant Asis.Definition := Classes.Get_Definition (Object.Info); begin return Evaluate (Digits_Expression (Def)); end; when A_First_Attribute => declare Rng : Static_Range := Static_Range_Attribute (Element); begin return Rng (Lower); end; when A_Last_Attribute => declare Rng : Static_Range := Static_Range_Attribute (Element); begin return Rng (Upper); end; when others => null; end case; Raise_Error (Internal_Error); return Undefined; end Evaluate; ------- -- V -- ------- function V (Data : F.Fraction) return Value is begin return (Static_Float, Data); end V; -------------- -- Is_Float -- -------------- function Is_Float (Right : Value) return Boolean is begin return Right.Kind = Static_Float; end Is_Float; end XASIS.Static.Float; ------------------------------------------------------------------------------ -- 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. ------------------------------------------------------------------------------
with Ada.Integer_Text_IO; with Ada.Text_IO; package body Problem_28 is package IO renames Ada.Text_IO; package I_IO renames Ada.Integer_Text_IO; procedure Solve is sum : Positive := 1; last : Positive := 1; begin for row in 2 .. 1_001 loop declare adder : constant Positive := (row - 1)*2; begin sum := 4*last + (1 + 2 + 3 + 4)*adder; last := last + 4*adder; end; end loop; I_IO.Put(sum); IO.New_Line; end Solve; end Problem_28;
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <!DOCTYPE boost_serialization> <boost_serialization signature="serialization::archive" version="14"> <syndb class_id="0" tracking_level="0" version="0"> <userIPLatency>-1</userIPLatency> <userIPName></userIPName> <cdfg class_id="1" tracking_level="1" version="0" object_id="_0"> <name>hls_target</name> <ret_bitwidth>0</ret_bitwidth> <ports class_id="2" tracking_level="0" version="0"> <count>4</count> <item_version>0</item_version> <item class_id="3" tracking_level="1" version="0" object_id="_1"> <Value class_id="4" tracking_level="0" version="0"> <Obj class_id="5" tracking_level="0" version="0"> <type>1</type> <id>1</id> <name>hw_input_V_value_V</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo class_id="6" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>hw_input.V.value.V</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>8</bitwidth> </Value> <direction>0</direction> <if_type>0</if_type> <array_size>0</array_size> <bit_vecs class_id="7" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> <item class_id_reference="3" object_id="_2"> <Value> <Obj> <type>1</type> <id>2</id> <name>hw_input_V_last_V</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>hw_input.V.last.V</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>1</bitwidth> </Value> <direction>0</direction> <if_type>0</if_type> <array_size>0</array_size> <bit_vecs> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> <item class_id_reference="3" object_id="_3"> <Value> <Obj> <type>1</type> <id>3</id> <name>hw_output_V_value_V</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>hw_output.V.value.V</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>8</bitwidth> </Value> <direction>1</direction> <if_type>0</if_type> <array_size>0</array_size> <bit_vecs> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> <item class_id_reference="3" object_id="_4"> <Value> <Obj> <type>1</type> <id>4</id> <name>hw_output_V_last_V</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>hw_output.V.last.V</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>1</bitwidth> </Value> <direction>1</direction> <if_type>0</if_type> <array_size>0</array_size> <bit_vecs> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> </ports> <nodes class_id="8" tracking_level="0" version="0"> <count>8</count> <item_version>0</item_version> <item class_id="9" tracking_level="1" version="0" object_id="_5"> <Value> <Obj> <type>0</type> <id>11</id> <name>p_hw_input_stencil_st</name> <fileName>hls_target.cpp</fileName> <fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/paper_apps_8_shifts/conv2d_b2b</fileDirectory> <lineNumber>50</lineNumber> <contextFuncName>hls_target</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item class_id="10" tracking_level="0" version="0"> <first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/paper_apps_8_shifts/conv2d_b2b</first> <second class_id="11" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="12" tracking_level="0" version="0"> <first class_id="13" tracking_level="0" version="0"> <first>hls_target.cpp</first> <second>hls_target</second> </first> <second>50</second> </item> </second> </item> </inlineStackInfo> <originalName>_hw_input_stencil_stream.V.value.V</originalName> <rtlName></rtlName> <coreName>FIFO_SRL</coreName> </Obj> <bitwidth>72</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>33</item> </oprand_edges> <opcode>alloca</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_6"> <Value> <Obj> <type>0</type> <id>15</id> <name>p_mul_stencil_update_1</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName>FIFO_SRL</coreName> </Obj> <bitwidth>32</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>34</item> </oprand_edges> <opcode>alloca</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_7"> <Value> <Obj> <type>0</type> <id>19</id> <name>p_mul_stencil_stream_s</name> <fileName>hls_target.cpp</fileName> <fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/paper_apps_8_shifts/conv2d_b2b</fileDirectory> <lineNumber>164</lineNumber> <contextFuncName>hls_target</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/paper_apps_8_shifts/conv2d_b2b</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>hls_target.cpp</first> <second>hls_target</second> </first> <second>164</second> </item> </second> </item> </inlineStackInfo> <originalName>_mul_stencil_stream.V.value.V</originalName> <rtlName></rtlName> <coreName>FIFO_SRL</coreName> </Obj> <bitwidth>128</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>35</item> </oprand_edges> <opcode>alloca</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_8"> <Value> <Obj> <type>0</type> <id>26</id> <name></name> <fileName>hls_target.cpp</fileName> <fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/paper_apps_8_shifts/conv2d_b2b</fileDirectory> <lineNumber>54</lineNumber> <contextFuncName>hls_target</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/paper_apps_8_shifts/conv2d_b2b</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>hls_target.cpp</first> <second>hls_target</second> </first> <second>54</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>37</item> <item>38</item> <item>39</item> <item>40</item> </oprand_edges> <opcode>call</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_9"> <Value> <Obj> <type>0</type> <id>27</id> <name></name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>5</count> <item_version>0</item_version> <item>42</item> <item>43</item> <item>44</item> <item>247</item> <item>248</item> </oprand_edges> <opcode>call</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_10"> <Value> <Obj> <type>0</type> <id>28</id> <name></name> <fileName>hls_target.cpp</fileName> <fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/paper_apps_8_shifts/conv2d_b2b</fileDirectory> <lineNumber>168</lineNumber> <contextFuncName>hls_target</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/paper_apps_8_shifts/conv2d_b2b</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>hls_target.cpp</first> <second>hls_target</second> </first> <second>168</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>5</count> <item_version>0</item_version> <item>46</item> <item>47</item> <item>48</item> <item>246</item> <item>249</item> </oprand_edges> <opcode>call</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_11"> <Value> <Obj> <type>0</type> <id>29</id> <name></name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>6</count> <item_version>0</item_version> <item>50</item> <item>51</item> <item>52</item> <item>53</item> <item>245</item> <item>250</item> </oprand_edges> <opcode>call</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_12"> <Value> <Obj> <type>0</type> <id>30</id> <name></name> <fileName>hls_target.cpp</fileName> <fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/paper_apps_8_shifts/conv2d_b2b</fileDirectory> <lineNumber>264</lineNumber> <contextFuncName>hls_target</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/paper_apps_8_shifts/conv2d_b2b</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>hls_target.cpp</first> <second>hls_target</second> </first> <second>264</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>0</count> <item_version>0</item_version> </oprand_edges> <opcode>ret</opcode> <m_Display>0</m_Display> </item> </nodes> <consts class_id="15" tracking_level="0" version="0"> <count>5</count> <item_version>0</item_version> <item class_id="16" tracking_level="1" version="0" object_id="_13"> <Value> <Obj> <type>2</type> <id>32</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>64</bitwidth> </Value> <const_type>0</const_type> <content>1</content> </item> <item class_id_reference="16" object_id="_14"> <Value> <Obj> <type>2</type> <id>36</id> <name>linebuffer_1</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <const_type>6</const_type> <content>&lt;constant:linebuffer.1&gt;</content> </item> <item class_id_reference="16" object_id="_15"> <Value> <Obj> <type>2</type> <id>41</id> <name>Loop_1_proc</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <const_type>6</const_type> <content>&lt;constant:Loop_1_proc&gt;</content> </item> <item class_id_reference="16" object_id="_16"> <Value> <Obj> <type>2</type> <id>45</id> <name>linebuffer_2</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <const_type>6</const_type> <content>&lt;constant:linebuffer.2&gt;</content> </item> <item class_id_reference="16" object_id="_17"> <Value> <Obj> <type>2</type> <id>49</id> <name>Block_preheader39_p</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <const_type>6</const_type> <content>&lt;constant:Block_.preheader39.p&gt;</content> </item> </consts> <blocks class_id="17" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="18" tracking_level="1" version="0" object_id="_18"> <Obj> <type>3</type> <id>31</id> <name>hls_target</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>8</count> <item_version>0</item_version> <item>11</item> <item>15</item> <item>19</item> <item>26</item> <item>27</item> <item>28</item> <item>29</item> <item>30</item> </node_objs> </item> </blocks> <edges class_id="19" tracking_level="0" version="0"> <count>23</count> <item_version>0</item_version> <item class_id="20" tracking_level="1" version="0" object_id="_19"> <id>33</id> <edge_type>1</edge_type> <source_obj>32</source_obj> <sink_obj>11</sink_obj> </item> <item class_id_reference="20" object_id="_20"> <id>34</id> <edge_type>1</edge_type> <source_obj>32</source_obj> <sink_obj>15</sink_obj> </item> <item class_id_reference="20" object_id="_21"> <id>35</id> <edge_type>1</edge_type> <source_obj>32</source_obj> <sink_obj>19</sink_obj> </item> <item class_id_reference="20" object_id="_22"> <id>37</id> <edge_type>1</edge_type> <source_obj>36</source_obj> <sink_obj>26</sink_obj> </item> <item class_id_reference="20" object_id="_23"> <id>38</id> <edge_type>1</edge_type> <source_obj>1</source_obj> <sink_obj>26</sink_obj> </item> <item class_id_reference="20" object_id="_24"> <id>39</id> <edge_type>1</edge_type> <source_obj>2</source_obj> <sink_obj>26</sink_obj> </item> <item class_id_reference="20" object_id="_25"> <id>40</id> <edge_type>1</edge_type> <source_obj>11</source_obj> <sink_obj>26</sink_obj> </item> <item class_id_reference="20" object_id="_26"> <id>42</id> <edge_type>1</edge_type> <source_obj>41</source_obj> <sink_obj>27</sink_obj> </item> <item class_id_reference="20" object_id="_27"> <id>43</id> <edge_type>1</edge_type> <source_obj>11</source_obj> <sink_obj>27</sink_obj> </item> <item class_id_reference="20" object_id="_28"> <id>44</id> <edge_type>1</edge_type> <source_obj>15</source_obj> <sink_obj>27</sink_obj> </item> <item class_id_reference="20" object_id="_29"> <id>46</id> <edge_type>1</edge_type> <source_obj>45</source_obj> <sink_obj>28</sink_obj> </item> <item class_id_reference="20" object_id="_30"> <id>47</id> <edge_type>1</edge_type> <source_obj>15</source_obj> <sink_obj>28</sink_obj> </item> <item class_id_reference="20" object_id="_31"> <id>48</id> <edge_type>1</edge_type> <source_obj>19</source_obj> <sink_obj>28</sink_obj> </item> <item class_id_reference="20" object_id="_32"> <id>50</id> <edge_type>1</edge_type> <source_obj>49</source_obj> <sink_obj>29</sink_obj> </item> <item class_id_reference="20" object_id="_33"> <id>51</id> <edge_type>1</edge_type> <source_obj>19</source_obj> <sink_obj>29</sink_obj> </item> <item class_id_reference="20" object_id="_34"> <id>52</id> <edge_type>1</edge_type> <source_obj>3</source_obj> <sink_obj>29</sink_obj> </item> <item class_id_reference="20" object_id="_35"> <id>53</id> <edge_type>1</edge_type> <source_obj>4</source_obj> <sink_obj>29</sink_obj> </item> <item class_id_reference="20" object_id="_36"> <id>245</id> <edge_type>4</edge_type> <source_obj>28</source_obj> <sink_obj>29</sink_obj> </item> <item class_id_reference="20" object_id="_37"> <id>246</id> <edge_type>4</edge_type> <source_obj>27</source_obj> <sink_obj>28</sink_obj> </item> <item class_id_reference="20" object_id="_38"> <id>247</id> <edge_type>4</edge_type> <source_obj>26</source_obj> <sink_obj>27</sink_obj> </item> <item class_id_reference="20" object_id="_39"> <id>248</id> <edge_type>4</edge_type> <source_obj>26</source_obj> <sink_obj>27</sink_obj> </item> <item class_id_reference="20" object_id="_40"> <id>249</id> <edge_type>4</edge_type> <source_obj>27</source_obj> <sink_obj>28</sink_obj> </item> <item class_id_reference="20" object_id="_41"> <id>250</id> <edge_type>4</edge_type> <source_obj>28</source_obj> <sink_obj>29</sink_obj> </item> </edges> </cdfg> <cdfg_regions class_id="21" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="22" tracking_level="1" version="0" object_id="_42"> <mId>1</mId> <mTag>hls_target</mTag> <mType>0</mType> <sub_regions> <count>0</count> <item_version>0</item_version> </sub_regions> <basic_blocks> <count>1</count> <item_version>0</item_version> <item>31</item> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>-1</mMinTripCount> <mMaxTripCount>-1</mMaxTripCount> <mMinLatency>33</mMinLatency> <mMaxLatency>-1</mMaxLatency> <mIsDfPipe>1</mIsDfPipe> <mDfPipe class_id="23" tracking_level="1" version="0" object_id="_43"> <port_list class_id="24" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </port_list> <process_list class_id="25" tracking_level="0" version="0"> <count>4</count> <item_version>0</item_version> <item class_id="26" tracking_level="1" version="0" object_id="_44"> <type>0</type> <name>linebuffer_1_U0</name> <ssdmobj_id>26</ssdmobj_id> <pins class_id="27" tracking_level="0" version="0"> <count>3</count> <item_version>0</item_version> <item class_id="28" tracking_level="1" version="0" object_id="_45"> <port class_id="29" tracking_level="1" version="0" object_id="_46"> <name>in_axi_stream_V_value_V</name> <dir>3</dir> <type>0</type> </port> <inst class_id="30" tracking_level="1" version="0" object_id="_47"> <type>0</type> <name>linebuffer_1_U0</name> <ssdmobj_id>26</ssdmobj_id> </inst> </item> <item class_id_reference="28" object_id="_48"> <port class_id_reference="29" object_id="_49"> <name>in_axi_stream_V_last_V</name> <dir>3</dir> <type>0</type> </port> <inst class_id_reference="30" object_id_reference="_47"></inst> </item> <item class_id_reference="28" object_id="_50"> <port class_id_reference="29" object_id="_51"> <name>out_stream_V_value_V</name> <dir>0</dir> <type>1</type> </port> <inst class_id_reference="30" object_id_reference="_47"></inst> </item> </pins> </item> <item class_id_reference="26" object_id="_52"> <type>0</type> <name>Loop_1_proc_U0</name> <ssdmobj_id>27</ssdmobj_id> <pins> <count>2</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_53"> <port class_id_reference="29" object_id="_54"> <name>p_hw_input_stencil_stream_V_value_V</name> <dir>0</dir> <type>0</type> </port> <inst class_id_reference="30" object_id="_55"> <type>0</type> <name>Loop_1_proc_U0</name> <ssdmobj_id>27</ssdmobj_id> </inst> </item> <item class_id_reference="28" object_id="_56"> <port class_id_reference="29" object_id="_57"> <name>p_mul_stencil_update_stream_V_value_V</name> <dir>0</dir> <type>1</type> </port> <inst class_id_reference="30" object_id_reference="_55"></inst> </item> </pins> </item> <item class_id_reference="26" object_id="_58"> <type>0</type> <name>linebuffer_2_U0</name> <ssdmobj_id>28</ssdmobj_id> <pins> <count>2</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_59"> <port class_id_reference="29" object_id="_60"> <name>in_stream_V_value_V</name> <dir>0</dir> <type>0</type> </port> <inst class_id_reference="30" object_id="_61"> <type>0</type> <name>linebuffer_2_U0</name> <ssdmobj_id>28</ssdmobj_id> </inst> </item> <item class_id_reference="28" object_id="_62"> <port class_id_reference="29" object_id="_63"> <name>out_stream_V_value_V</name> <dir>0</dir> <type>1</type> </port> <inst class_id_reference="30" object_id_reference="_61"></inst> </item> </pins> </item> <item class_id_reference="26" object_id="_64"> <type>0</type> <name>Block_preheader39_p_U0</name> <ssdmobj_id>29</ssdmobj_id> <pins> <count>3</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_65"> <port class_id_reference="29" object_id="_66"> <name>p_mul_stencil_stream_V_value_V</name> <dir>0</dir> <type>0</type> </port> <inst class_id_reference="30" object_id="_67"> <type>0</type> <name>Block_preheader39_p_U0</name> <ssdmobj_id>29</ssdmobj_id> </inst> </item> <item class_id_reference="28" object_id="_68"> <port class_id_reference="29" object_id="_69"> <name>hw_output_V_value_V</name> <dir>3</dir> <type>1</type> </port> <inst class_id_reference="30" object_id_reference="_67"></inst> </item> <item class_id_reference="28" object_id="_70"> <port class_id_reference="29" object_id="_71"> <name>hw_output_V_last_V</name> <dir>3</dir> <type>1</type> </port> <inst class_id_reference="30" object_id_reference="_67"></inst> </item> </pins> </item> </process_list> <channel_list class_id="31" tracking_level="0" version="0"> <count>3</count> <item_version>0</item_version> <item class_id="32" tracking_level="1" version="0" object_id="_72"> <type>1</type> <name>p_hw_input_stencil_st</name> <ssdmobj_id>11</ssdmobj_id> <ctype>0</ctype> <depth>1</depth> <bitwidth>72</bitwidth> <source class_id_reference="28" object_id="_73"> <port class_id_reference="29" object_id="_74"> <name>in</name> <dir>3</dir> <type>0</type> </port> <inst class_id_reference="30" object_id_reference="_47"></inst> </source> <sink class_id_reference="28" object_id="_75"> <port class_id_reference="29" object_id="_76"> <name>out</name> <dir>3</dir> <type>1</type> </port> <inst class_id_reference="30" object_id_reference="_55"></inst> </sink> </item> <item class_id_reference="32" object_id="_77"> <type>1</type> <name>p_mul_stencil_update_1</name> <ssdmobj_id>15</ssdmobj_id> <ctype>0</ctype> <depth>1</depth> <bitwidth>32</bitwidth> <source class_id_reference="28" object_id="_78"> <port class_id_reference="29" object_id="_79"> <name>in</name> <dir>3</dir> <type>0</type> </port> <inst class_id_reference="30" object_id_reference="_55"></inst> </source> <sink class_id_reference="28" object_id="_80"> <port class_id_reference="29" object_id="_81"> <name>out</name> <dir>3</dir> <type>1</type> </port> <inst class_id_reference="30" object_id_reference="_61"></inst> </sink> </item> <item class_id_reference="32" object_id="_82"> <type>1</type> <name>p_mul_stencil_stream_s</name> <ssdmobj_id>19</ssdmobj_id> <ctype>0</ctype> <depth>1</depth> <bitwidth>128</bitwidth> <source class_id_reference="28" object_id="_83"> <port class_id_reference="29" object_id="_84"> <name>in</name> <dir>3</dir> <type>0</type> </port> <inst class_id_reference="30" object_id_reference="_61"></inst> </source> <sink class_id_reference="28" object_id="_85"> <port class_id_reference="29" object_id="_86"> <name>out</name> <dir>3</dir> <type>1</type> </port> <inst class_id_reference="30" object_id_reference="_67"></inst> </sink> </item> </channel_list> <net_list class_id="33" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </net_list> </mDfPipe> </item> </cdfg_regions> <fsm class_id="34" tracking_level="1" version="0" object_id="_87"> <states class_id="35" tracking_level="0" version="0"> <count>8</count> <item_version>0</item_version> <item class_id="36" tracking_level="1" version="0" object_id="_88"> <id>1</id> <operations class_id="37" tracking_level="0" version="0"> <count>4</count> <item_version>0</item_version> <item class_id="38" tracking_level="1" version="0" object_id="_89"> <id>11</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="38" object_id="_90"> <id>15</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="38" object_id="_91"> <id>19</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="38" object_id="_92"> <id>26</id> <stage>2</stage> <latency>2</latency> </item> </operations> </item> <item class_id_reference="36" object_id="_93"> <id>2</id> <operations> <count>1</count> <item_version>0</item_version> <item class_id_reference="38" object_id="_94"> <id>26</id> <stage>1</stage> <latency>2</latency> </item> </operations> </item> <item class_id_reference="36" object_id="_95"> <id>3</id> <operations> <count>1</count> <item_version>0</item_version> <item class_id_reference="38" object_id="_96"> <id>27</id> <stage>2</stage> <latency>2</latency> </item> </operations> </item> <item class_id_reference="36" object_id="_97"> <id>4</id> <operations> <count>1</count> <item_version>0</item_version> <item class_id_reference="38" object_id="_98"> <id>27</id> <stage>1</stage> <latency>2</latency> </item> </operations> </item> <item class_id_reference="36" object_id="_99"> <id>5</id> <operations> <count>1</count> <item_version>0</item_version> <item class_id_reference="38" object_id="_100"> <id>28</id> <stage>2</stage> <latency>2</latency> </item> </operations> </item> <item class_id_reference="36" object_id="_101"> <id>6</id> <operations> <count>1</count> <item_version>0</item_version> <item class_id_reference="38" object_id="_102"> <id>28</id> <stage>1</stage> <latency>2</latency> </item> </operations> </item> <item class_id_reference="36" object_id="_103"> <id>7</id> <operations> <count>1</count> <item_version>0</item_version> <item class_id_reference="38" object_id="_104"> <id>29</id> <stage>2</stage> <latency>2</latency> </item> </operations> </item> <item class_id_reference="36" object_id="_105"> <id>8</id> <operations> <count>20</count> <item_version>0</item_version> <item class_id_reference="38" object_id="_106"> <id>5</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="38" object_id="_107"> <id>6</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="38" object_id="_108"> <id>7</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="38" object_id="_109"> <id>8</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="38" object_id="_110"> <id>9</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="38" object_id="_111"> <id>10</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="38" object_id="_112"> <id>12</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="38" object_id="_113"> <id>13</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="38" object_id="_114"> <id>14</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="38" object_id="_115"> <id>16</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="38" object_id="_116"> <id>17</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="38" object_id="_117"> <id>18</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="38" object_id="_118"> <id>20</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="38" object_id="_119"> <id>21</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="38" object_id="_120"> <id>22</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="38" object_id="_121"> <id>23</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="38" object_id="_122"> <id>24</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="38" object_id="_123"> <id>25</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="38" object_id="_124"> <id>29</id> <stage>1</stage> <latency>2</latency> </item> <item class_id_reference="38" object_id="_125"> <id>30</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> </states> <transitions class_id="39" tracking_level="0" version="0"> <count>7</count> <item_version>0</item_version> <item class_id="40" tracking_level="1" version="0" object_id="_126"> <inState>1</inState> <outState>2</outState> <condition class_id="41" tracking_level="0" version="0"> <id>0</id> <sop class_id="42" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="43" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="40" object_id="_127"> <inState>2</inState> <outState>3</outState> <condition> <id>1</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="40" object_id="_128"> <inState>3</inState> <outState>4</outState> <condition> <id>2</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="40" object_id="_129"> <inState>4</inState> <outState>5</outState> <condition> <id>3</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="40" object_id="_130"> <inState>5</inState> <outState>6</outState> <condition> <id>4</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="40" object_id="_131"> <inState>6</inState> <outState>7</outState> <condition> <id>5</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="40" object_id="_132"> <inState>7</inState> <outState>8</outState> <condition> <id>6</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> </transitions> </fsm> <res class_id="-1"></res> <node_label_latency class_id="45" tracking_level="0" version="0"> <count>8</count> <item_version>0</item_version> <item class_id="46" tracking_level="0" version="0"> <first>11</first> <second class_id="47" tracking_level="0" version="0"> <first>0</first> <second>0</second> </second> </item> <item> <first>15</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>19</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>26</first> <second> <first>0</first> <second>1</second> </second> </item> <item> <first>27</first> <second> <first>2</first> <second>1</second> </second> </item> <item> <first>28</first> <second> <first>4</first> <second>1</second> </second> </item> <item> <first>29</first> <second> <first>6</first> <second>1</second> </second> </item> <item> <first>30</first> <second> <first>7</first> <second>0</second> </second> </item> </node_label_latency> <bblk_ent_exit class_id="48" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="49" tracking_level="0" version="0"> <first>31</first> <second class_id="50" tracking_level="0" version="0"> <first>0</first> <second>7</second> </second> </item> </bblk_ent_exit> <regions class_id="51" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="52" tracking_level="1" version="0" object_id="_133"> <region_name>hls_target</region_name> <basic_blocks> <count>1</count> <item_version>0</item_version> <item>31</item> </basic_blocks> <nodes> <count>26</count> <item_version>0</item_version> <item>5</item> <item>6</item> <item>7</item> <item>8</item> <item>9</item> <item>10</item> <item>11</item> <item>12</item> <item>13</item> <item>14</item> <item>15</item> <item>16</item> <item>17</item> <item>18</item> <item>19</item> <item>20</item> <item>21</item> <item>22</item> <item>23</item> <item>24</item> <item>25</item> <item>26</item> <item>27</item> <item>28</item> <item>29</item> <item>30</item> </nodes> <anchor_node>-1</anchor_node> <region_type>16</region_type> <interval>0</interval> <pipe_depth>0</pipe_depth> </item> </regions> <dp_fu_nodes class_id="53" tracking_level="0" version="0"> <count>7</count> <item_version>0</item_version> <item class_id="54" tracking_level="0" version="0"> <first>58</first> <second> <count>1</count> <item_version>0</item_version> <item>11</item> </second> </item> <item> <first>62</first> <second> <count>1</count> <item_version>0</item_version> <item>15</item> </second> </item> <item> <first>66</first> <second> <count>1</count> <item_version>0</item_version> <item>19</item> </second> </item> <item> <first>70</first> <second> <count>2</count> <item_version>0</item_version> <item>26</item> <item>26</item> </second> </item> <item> <first>79</first> <second> <count>2</count> <item_version>0</item_version> <item>28</item> <item>28</item> </second> </item> <item> <first>85</first> <second> <count>2</count> <item_version>0</item_version> <item>27</item> <item>27</item> </second> </item> <item> <first>91</first> <second> <count>2</count> <item_version>0</item_version> <item>29</item> <item>29</item> </second> </item> </dp_fu_nodes> <dp_fu_nodes_expression class_id="56" tracking_level="0" version="0"> <count>3</count> <item_version>0</item_version> <item class_id="57" tracking_level="0" version="0"> <first>p_hw_input_stencil_st_fu_58</first> <second> <count>1</count> <item_version>0</item_version> <item>11</item> </second> </item> <item> <first>p_mul_stencil_stream_s_fu_66</first> <second> <count>1</count> <item_version>0</item_version> <item>19</item> </second> </item> <item> <first>p_mul_stencil_update_1_fu_62</first> <second> <count>1</count> <item_version>0</item_version> <item>15</item> </second> </item> </dp_fu_nodes_expression> <dp_fu_nodes_module> <count>4</count> <item_version>0</item_version> <item> <first>grp_Block_preheader39_p_fu_91</first> <second> <count>2</count> <item_version>0</item_version> <item>29</item> <item>29</item> </second> </item> <item> <first>grp_Loop_1_proc_fu_85</first> <second> <count>2</count> <item_version>0</item_version> <item>27</item> <item>27</item> </second> </item> <item> <first>grp_linebuffer_1_fu_70</first> <second> <count>2</count> <item_version>0</item_version> <item>26</item> <item>26</item> </second> </item> <item> <first>grp_linebuffer_2_fu_79</first> <second> <count>2</count> <item_version>0</item_version> <item>28</item> <item>28</item> </second> </item> </dp_fu_nodes_module> <dp_fu_nodes_io> <count>0</count> <item_version>0</item_version> </dp_fu_nodes_io> <return_ports> <count>0</count> <item_version>0</item_version> </return_ports> <dp_mem_port_nodes class_id="58" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </dp_mem_port_nodes> <dp_reg_nodes> <count>3</count> <item_version>0</item_version> <item> <first>100</first> <second> <count>1</count> <item_version>0</item_version> <item>11</item> </second> </item> <item> <first>106</first> <second> <count>1</count> <item_version>0</item_version> <item>15</item> </second> </item> <item> <first>112</first> <second> <count>1</count> <item_version>0</item_version> <item>19</item> </second> </item> </dp_reg_nodes> <dp_regname_nodes> <count>3</count> <item_version>0</item_version> <item> <first>p_hw_input_stencil_st_reg_100</first> <second> <count>1</count> <item_version>0</item_version> <item>11</item> </second> </item> <item> <first>p_mul_stencil_stream_s_reg_112</first> <second> <count>1</count> <item_version>0</item_version> <item>19</item> </second> </item> <item> <first>p_mul_stencil_update_1_reg_106</first> <second> <count>1</count> <item_version>0</item_version> <item>15</item> </second> </item> </dp_regname_nodes> <dp_reg_phi> <count>0</count> <item_version>0</item_version> </dp_reg_phi> <dp_regname_phi> <count>0</count> <item_version>0</item_version> </dp_regname_phi> <dp_port_io_nodes class_id="59" tracking_level="0" version="0"> <count>4</count> <item_version>0</item_version> <item class_id="60" tracking_level="0" version="0"> <first>hw_input_V_last_V</first> <second> <count>1</count> <item_version>0</item_version> <item> <first>call</first> <second> <count>1</count> <item_version>0</item_version> <item>26</item> </second> </item> </second> </item> <item> <first>hw_input_V_value_V</first> <second> <count>1</count> <item_version>0</item_version> <item> <first>call</first> <second> <count>1</count> <item_version>0</item_version> <item>26</item> </second> </item> </second> </item> <item> <first>hw_output_V_last_V</first> <second> <count>1</count> <item_version>0</item_version> <item> <first>call</first> <second> <count>1</count> <item_version>0</item_version> <item>29</item> </second> </item> </second> </item> <item> <first>hw_output_V_value_V</first> <second> <count>1</count> <item_version>0</item_version> <item> <first>call</first> <second> <count>1</count> <item_version>0</item_version> <item>29</item> </second> </item> </second> </item> </dp_port_io_nodes> <port2core class_id="61" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </port2core> <node2core> <count>3</count> <item_version>0</item_version> <item class_id="62" tracking_level="0" version="0"> <first>11</first> <second>FIFO_SRL</second> </item> <item> <first>15</first> <second>FIFO_SRL</second> </item> <item> <first>19</first> <second>FIFO_SRL</second> </item> </node2core> </syndb> </boost_serialization>
------------------------------------------------------------------------------ -- -- -- GNAT LIBRARY COMPONENTS -- -- -- -- G N A T . S E C U R E _ H A S H E S -- -- -- -- B o d y -- -- -- -- Copyright (C) 2009-2019, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ with System; use System; with Interfaces; use Interfaces; package body GNAT.Secure_Hashes is Hex_Digit : constant array (Stream_Element range 0 .. 15) of Character := "0123456789abcdef"; type Fill_Buffer_Access is access procedure (M : in out Message_State; S : String; First : Natural; Last : out Natural); -- A procedure to transfer data from S, starting at First, into M's block -- buffer until either the block buffer is full or all data from S has been -- consumed. procedure Fill_Buffer_Copy (M : in out Message_State; S : String; First : Natural; Last : out Natural); -- Transfer procedure which just copies data from S to M procedure Fill_Buffer_Swap (M : in out Message_State; S : String; First : Natural; Last : out Natural); -- Transfer procedure which swaps bytes from S when copying into M. S must -- have even length. Note that the swapping is performed considering pairs -- starting at S'First, even if S'First /= First (that is, if -- First = S'First then the first copied byte is always S (S'First + 1), -- and if First = S'First + 1 then the first copied byte is always -- S (S'First). procedure To_String (SEA : Stream_Element_Array; S : out String); -- Return the hexadecimal representation of SEA ---------------------- -- Fill_Buffer_Copy -- ---------------------- procedure Fill_Buffer_Copy (M : in out Message_State; S : String; First : Natural; Last : out Natural) is Buf_String : String (M.Buffer'Range); for Buf_String'Address use M.Buffer'Address; pragma Import (Ada, Buf_String); Length : constant Natural := Natural'Min (M.Block_Length - M.Last, S'Last - First + 1); begin pragma Assert (Length > 0); Buf_String (M.Last + 1 .. M.Last + Length) := S (First .. First + Length - 1); M.Last := M.Last + Length; Last := First + Length - 1; end Fill_Buffer_Copy; ---------------------- -- Fill_Buffer_Swap -- ---------------------- procedure Fill_Buffer_Swap (M : in out Message_State; S : String; First : Natural; Last : out Natural) is pragma Assert (S'Length mod 2 = 0); Length : constant Natural := Natural'Min (M.Block_Length - M.Last, S'Last - First + 1); begin Last := First; while Last - First < Length loop M.Buffer (M.Last + 1 + Last - First) := (if (Last - S'First) mod 2 = 0 then S (Last + 1) else S (Last - 1)); Last := Last + 1; end loop; M.Last := M.Last + Length; Last := First + Length - 1; end Fill_Buffer_Swap; --------------- -- To_String -- --------------- procedure To_String (SEA : Stream_Element_Array; S : out String) is pragma Assert (S'Length = 2 * SEA'Length); begin for J in SEA'Range loop declare S_J : constant Natural := 1 + Natural (J - SEA'First) * 2; begin S (S_J) := Hex_Digit (SEA (J) / 16); S (S_J + 1) := Hex_Digit (SEA (J) mod 16); end; end loop; end To_String; ------- -- H -- ------- package body H is procedure Update (C : in out Context; S : String; Fill_Buffer : Fill_Buffer_Access); -- Internal common routine for all Update procedures procedure Final (C : Context; Hash_Bits : out Ada.Streams.Stream_Element_Array); -- Perform final hashing operations (data padding) and extract the -- (possibly truncated) state of C into Hash_Bits. ------------ -- Digest -- ------------ function Digest (C : Context) return Message_Digest is Hash_Bits : Stream_Element_Array (1 .. Stream_Element_Offset (Hash_Length)); begin Final (C, Hash_Bits); return MD : Message_Digest do To_String (Hash_Bits, MD); end return; end Digest; function Digest (S : String) return Message_Digest is C : Context; begin Update (C, S); return Digest (C); end Digest; function Digest (A : Stream_Element_Array) return Message_Digest is C : Context; begin Update (C, A); return Digest (C); end Digest; function Digest (C : Context) return Binary_Message_Digest is Hash_Bits : Stream_Element_Array (1 .. Stream_Element_Offset (Hash_Length)); begin Final (C, Hash_Bits); return Hash_Bits; end Digest; function Digest (S : String) return Binary_Message_Digest is C : Context; begin Update (C, S); return Digest (C); end Digest; function Digest (A : Stream_Element_Array) return Binary_Message_Digest is C : Context; begin Update (C, A); return Digest (C); end Digest; ----------- -- Final -- ----------- -- Once a complete message has been processed, it is padded with one 1 -- bit followed by enough 0 bits so that the last block is 2 * Word'Size -- bits short of being completed. The last 2 * Word'Size bits are set to -- the message size in bits (excluding padding). procedure Final (C : Context; Hash_Bits : out Stream_Element_Array) is FC : Context := C; Zeroes : Natural; -- Number of 0 bytes in padding Message_Length : Unsigned_64 := FC.M_State.Length; -- Message length in bytes Size_Length : constant Natural := 2 * Hash_State.Word'Size / 8; -- Length in bytes of the size representation begin Zeroes := (Block_Length - 1 - Size_Length - FC.M_State.Last) mod FC.M_State.Block_Length; declare Pad : String (1 .. 1 + Zeroes + Size_Length) := (1 => Character'Val (128), others => ASCII.NUL); Index : Natural; First_Index : Natural; begin First_Index := (if Hash_Bit_Order = Low_Order_First then Pad'Last - Size_Length + 1 else Pad'Last); Index := First_Index; while Message_Length > 0 loop if Index = First_Index then -- Message_Length is in bytes, but we need to store it as -- a bit count. Pad (Index) := Character'Val (Shift_Left (Message_Length and 16#1f#, 3)); Message_Length := Shift_Right (Message_Length, 5); else Pad (Index) := Character'Val (Message_Length and 16#ff#); Message_Length := Shift_Right (Message_Length, 8); end if; Index := Index + (if Hash_Bit_Order = Low_Order_First then 1 else -1); end loop; Update (FC, Pad); end; pragma Assert (FC.M_State.Last = 0); Hash_State.To_Hash (FC.H_State, Hash_Bits); -- HMAC case: hash outer pad if C.KL /= 0 then declare Outer_C : Context; Opad : Stream_Element_Array := (1 .. Stream_Element_Offset (Block_Length) => 16#5c#); begin for J in C.Key'Range loop Opad (J) := Opad (J) xor C.Key (J); end loop; Update (Outer_C, Opad); Update (Outer_C, Hash_Bits); Final (Outer_C, Hash_Bits); end; end if; end Final; -------------------------- -- HMAC_Initial_Context -- -------------------------- function HMAC_Initial_Context (Key : String) return Context is begin if Key'Length = 0 then raise Constraint_Error with "null key"; end if; return C : Context (KL => (if Key'Length <= Key_Length'Last then Key'Length else Stream_Element_Offset (Hash_Length))) do -- Set Key (if longer than block length, first hash it) if C.KL = Key'Length then declare SK : String (1 .. Key'Length); for SK'Address use C.Key'Address; pragma Import (Ada, SK); begin SK := Key; end; else C.Key := Digest (Key); end if; -- Hash inner pad declare Ipad : Stream_Element_Array := (1 .. Stream_Element_Offset (Block_Length) => 16#36#); begin for J in C.Key'Range loop Ipad (J) := Ipad (J) xor C.Key (J); end loop; Update (C, Ipad); end; end return; end HMAC_Initial_Context; ---------- -- Read -- ---------- procedure Read (Stream : in out Hash_Stream; Item : out Stream_Element_Array; Last : out Stream_Element_Offset) is pragma Unreferenced (Stream, Item, Last); begin raise Program_Error with "Hash_Stream is write-only"; end Read; ------------ -- Update -- ------------ procedure Update (C : in out Context; S : String; Fill_Buffer : Fill_Buffer_Access) is Last : Natural; begin C.M_State.Length := C.M_State.Length + S'Length; Last := S'First - 1; while Last < S'Last loop Fill_Buffer (C.M_State, S, Last + 1, Last); if C.M_State.Last = Block_Length then Transform (C.H_State, C.M_State); C.M_State.Last := 0; end if; end loop; end Update; ------------ -- Update -- ------------ procedure Update (C : in out Context; Input : String) is begin Update (C, Input, Fill_Buffer_Copy'Access); end Update; ------------ -- Update -- ------------ procedure Update (C : in out Context; Input : Stream_Element_Array) is S : String (1 .. Input'Length); for S'Address use Input'Address; pragma Import (Ada, S); begin Update (C, S, Fill_Buffer_Copy'Access); end Update; ----------------- -- Wide_Update -- ----------------- procedure Wide_Update (C : in out Context; Input : Wide_String) is S : String (1 .. 2 * Input'Length); for S'Address use Input'Address; pragma Import (Ada, S); begin Update (C, S, (if System.Default_Bit_Order /= Low_Order_First then Fill_Buffer_Swap'Access else Fill_Buffer_Copy'Access)); end Wide_Update; ----------------- -- Wide_Digest -- ----------------- function Wide_Digest (W : Wide_String) return Message_Digest is C : Context; begin Wide_Update (C, W); return Digest (C); end Wide_Digest; function Wide_Digest (W : Wide_String) return Binary_Message_Digest is C : Context; begin Wide_Update (C, W); return Digest (C); end Wide_Digest; ----------- -- Write -- ----------- procedure Write (Stream : in out Hash_Stream; Item : Stream_Element_Array) is begin Update (Stream.C.all, Item); end Write; end H; ------------------------- -- Hash_Function_State -- ------------------------- package body Hash_Function_State is ------------- -- To_Hash -- ------------- procedure To_Hash (H : State; H_Bits : out Stream_Element_Array) is Hash_Words : constant Natural := H'Size / Word'Size; Result : State (1 .. Hash_Words) := H (H'Last - Hash_Words + 1 .. H'Last); R_SEA : Stream_Element_Array (1 .. Result'Size / 8); for R_SEA'Address use Result'Address; pragma Import (Ada, R_SEA); begin if System.Default_Bit_Order /= Hash_Bit_Order then for J in Result'Range loop Swap (Result (J)'Address); end loop; end if; -- Return truncated hash pragma Assert (H_Bits'Length <= R_SEA'Length); H_Bits := R_SEA (R_SEA'First .. R_SEA'First + H_Bits'Length - 1); end To_Hash; end Hash_Function_State; end GNAT.Secure_Hashes;
-- Copyright 2017-2021 Jeff Foley. All rights reserved. -- Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. local json = require("json") name = "Sublist3rAPI" type = "api" function start() set_rate_limit(1) end function vertical(ctx, domain) local page, err = request(ctx, {['url']=build_url(domain)}) if (err ~= nil and err ~= "") then log(ctx, "vertical request to service failed: " .. err) return end local resp = json.decode(page) if (resp == nil or #resp == 0) then return end for i, v in pairs(resp) do new_name(ctx, v) end end function build_url(domain) return "https://api.sublist3r.com/search.php?domain=" .. domain end
package Employee_Data is type Employee_T is limited private; type Hourly_Rate_T is new Integer; -- better implementation type Id_T is new Integer; -- better implementation function Create (Name : String; Rate : Hourly_Rate_T) return Employee_T; function Id (Employee : Employee_T) return Id_T; function Name (Employee : Employee_T) return String; function Rate (Employee : Employee_T) return Hourly_Rate_T; private -- finish implementation type Employee_T is limited null record; end Employee_Data;
-- Copyright (c) 1990 Regents of the University of California. -- All rights reserved. -- -- This software was developed by John Self of the Arcadia project -- at the University of California, Irvine. -- -- Redistribution and use in source and binary forms are permitted -- provided that the above copyright notice and this paragraph are -- duplicated in all such forms and that any documentation, -- advertising materials, and other materials related to such -- distribution and use acknowledge that the software was developed -- by the University of California, Irvine. The name of the -- University may not be used to endorse or promote products derived -- from this software without specific prior written permission. -- THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR -- IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED -- WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. -- TITLE miscellaneous definitions -- AUTHOR: John Self (UCI) -- DESCRIPTION contains all global variables used in aflex. -- also some subprograms which are commonly used. -- NOTES The real purpose of this file is to contain all miscellaneous -- items (functions, MACROS, variables definitions) which were at the -- top level of flex. -- $Header: /co/ua/self/arcadia/alex/ada/RCS/misc_defsS.a,v 1.8 90/01/04 13:39: -- 33 self Exp Locker: self $ with text_io, tstring; use text_io, tstring; package misc_defs is -- UMASS CODES : Ayacc_Extension_Flag : Boolean := False; -- Indicates whether or not aflex generated codes will be -- used by Ayacc extension. Ayacc extension has more power -- in error recovery. True means that generated codes will -- be used by Ayacc extension. -- END OF UMASS CODES. -- various definitions that were in parse.y PAT, SCNUM, EPS, HEADCNT, TRAILCNT, ANYCCL, LASTCHAR, ACTVP, RULELEN : INTEGER ; TRLCONTXT, XCLUFLG, CCLSORTED, VARLENGTH, VARIABLE_TRAIL_RULE : BOOLEAN; MADEANY : BOOLEAN := FALSE; -- whether we've made the '.' character class PREVIOUS_CONTINUED_ACTION : BOOLEAN; -- whether the previous rule's action wa -- s '|' -- maximum line length we'll have to deal with MAXLINE : constant INTEGER := 1024; -- These typees are needed for the various allocators. type UNBOUNDED_INT_ARRAY is array ( INTEGER range <> ) of INTEGER; type INT_PTR is access UNBOUNDED_INT_ARRAY; type INT_STAR is access INTEGER; type UNBOUNDED_INT_STAR_ARRAY is array ( INTEGER range <> ) of INT_PTR; type INT_STAR_PTR is access UNBOUNDED_INT_STAR_ARRAY; type UNBOUNDED_VSTRING_ARRAY is array ( INTEGER range <> ) of VSTRING; type VSTRING_PTR is access UNBOUNDED_VSTRING_ARRAY; type BOOLEAN_ARRAY is array ( INTEGER range <> ) of BOOLEAN; type BOOLEAN_PTR is access BOOLEAN_ARRAY; type CHAR_ARRAY is array ( INTEGER range <> ) of CHARACTER; type CHAR_PTR is access CHAR_ARRAY; -- different types of states; values are useful as masks, as well, for -- routines like check_trailing_context() type STATE_ENUM is (STATE_NORMAL, STATE_TRAILING_CONTEXT); type UNBOUNDED_STATE_ENUM_ARRAY is array ( INTEGER range <> ) of STATE_ENUM; type STATE_ENUM_PTR is access UNBOUNDED_STATE_ENUM_ARRAY; -- different types of rules type RULE_ENUM is (RULE_NORMAL, RULE_VARIABLE); type UNBOUNDED_RULE_ENUM_ARRAY is array ( INTEGER range <> ) of RULE_ENUM; type RULE_ENUM_PTR is access UNBOUNDED_RULE_ENUM_ARRAY; type DFAACC_TYPE is record DFAACC_SET : INT_PTR; DFAACC_STATE : INTEGER; end record; type UNBOUNDED_DFAACC_ARRAY is array ( INTEGER range <> ) of DFAACC_TYPE; type DFAACC_PTR is access UNBOUNDED_DFAACC_ARRAY; -- maximum size of file name FILENAMESIZE : constant INTEGER := 1024; function MIN (X, Y : in INTEGER) return INTEGER; function MAX (X, Y : in INTEGER) return INTEGER; -- special chk[] values marking the slots taking by end-of-buffer and action -- numbers EOB_POSITION : constant INTEGER := - 1; ACTION_POSITION : constant INTEGER := - 2; -- number of data items per line for -f output NUMDATAITEMS : constant INTEGER := 10; -- number of lines of data in -f output before inserting a blank line for -- readability. NUMDATALINES : constant INTEGER := 10; -- transition_struct_out() definitions TRANS_STRUCT_PRINT_LENGTH : constant INTEGER := 15; -- returns true if an nfa state has an epsilon out-transition slot -- that can be used. This definition is currently not used. function FREE_EPSILON ( STATE : in INTEGER) return BOOLEAN; -- returns true if an nfa state has an epsilon out-transition character -- and both slots are free function SUPER_FREE_EPSILON (STATE : in INTEGER) return BOOLEAN; -- maximum number of NFA states that can comprise a DFA state. It's real -- big because if there's a lot of rules, the initial state will have a -- huge epsilon closure. INITIAL_MAX_DFA_SIZE : constant INTEGER := 750; MAX_DFA_SIZE_INCREMENT : constant INTEGER := 750; -- a note on the following masks. They are used to mark accepting numbers -- as being special. As such, they implicitly limit the number of accepting -- numbers (i.e., rules) because if there are too many rules the rule numbers -- will overload the mask bits. Fortunately, this limit is \large/ (0x2000 == -- 8192) so unlikely to actually cause any problems. A check is made in -- new_rule() to ensure that this limit is not reached. -- mask to mark a trailing context accepting number -- #define YY_TRAILING_MASK 0x2000 YY_TRAILING_MASK : constant INTEGER := 16#2000#; -- mask to mark the accepting number of the "head" of a trailing context rule -- #define YY_TRAILING_HEAD_MASK 0x4000 YY_TRAILING_HEAD_MASK : constant INTEGER := 16#4000#; -- maximum number of rules, as outlined in the above note MAX_RULE : constant INTEGER := YY_TRAILING_MASK - 1; -- NIL must be 0. If not, its special meaning when making equivalence classes -- (it marks the representative of a given e.c.) will be unidentifiable NIL : constant INTEGER := 0; JAM : constant INTEGER := - 1; -- to mark a missing DFA transition NO_TRANSITION : constant INTEGER := NIL; UNIQUE : constant INTEGER := - 1; -- marks a symbol as an e.c. representative INFINITY : constant INTEGER := - 1; -- for x{5,} constructions -- size of input alphabet - should be size of ASCII set CSIZE : constant INTEGER := 127; INITIAL_MAX_CCLS : constant INTEGER := 100; -- max number of unique character -- classes MAX_CCLS_INCREMENT : constant INTEGER := 100; -- size of table holding members of character classes INITIAL_MAX_CCL_TBL_SIZE : constant INTEGER := 500; MAX_CCL_TBL_SIZE_INCREMENT : constant INTEGER := 250; INITIAL_MAX_RULES : constant INTEGER := 100; -- default maximum number of rules MAX_RULES_INCREMENT : constant INTEGER := 100; INITIAL_MNS : constant INTEGER := 2000; -- default maximum number of nfa stat -- es MNS_INCREMENT : constant INTEGER := 1000; -- amount to bump above by if it's -- not enough INITIAL_MAX_DFAS : constant INTEGER := 1000; -- default maximum number of dfa -- states MAX_DFAS_INCREMENT : constant INTEGER := 1000; JAMSTATE_CONST : constant INTEGER := - 32766; -- marks a reference to the sta -- te that always jams -- enough so that if it's subtracted from an NFA state number, the result -- is guaranteed to be negative MARKER_DIFFERENCE : constant INTEGER := 32000; MAXIMUM_MNS : constant INTEGER := 31999; -- maximum number of nxt/chk pairs for non-templates INITIAL_MAX_XPAIRS : constant INTEGER := 2000; MAX_XPAIRS_INCREMENT : constant INTEGER := 2000; -- maximum number of nxt/chk pairs needed for templates INITIAL_MAX_TEMPLATE_XPAIRS : constant INTEGER := 2500; MAX_TEMPLATE_XPAIRS_INCREMENT : constant INTEGER := 2500; SYM_EPSILON : constant INTEGER := 0; -- to mark transitions on the symbol eps -- ilon INITIAL_MAX_SCS : constant INTEGER := 40; -- maximum number of start conditio -- ns MAX_SCS_INCREMENT : constant INTEGER := 40; -- amount to bump by if it's not -- enough ONE_STACK_SIZE : constant INTEGER := 500; -- stack of states with only one ou -- t-transition SAME_TRANS : constant INTEGER := - 1; -- transition is the same as "default" -- entry for state -- the following percentages are used to tune table compression: -- -- the percentage the number of out-transitions a state must be of the -- number of equivalence classes in order to be considered for table -- compaction by using protos PROTO_SIZE_PERCENTAGE : constant INTEGER := 15; -- the percentage the number of homogeneous out-transitions of a state -- must be of the number of total out-transitions of the state in order -- that the state's transition table is first compared with a potential -- template of the most common out-transition instead of with the first --proto in the proto queue CHECK_COM_PERCENTAGE : constant INTEGER := 50; -- the percentage the number of differences between a state's transition -- table and the proto it was first compared with must be of the total -- number of out-transitions of the state in order to keep the first -- proto as a good match and not search any further FIRST_MATCH_DIFF_PERCENTAGE : constant INTEGER := 10; -- the percentage the number of differences between a state's transition -- table and the most similar proto must be of the state's total number -- of out-transitions to use the proto as an acceptable close match ACCEPTABLE_DIFF_PERCENTAGE : constant INTEGER := 50; -- the percentage the number of homogeneous out-transitions of a state -- must be of the number of total out-transitions of the state in order -- to consider making a template from the state TEMPLATE_SAME_PERCENTAGE : constant INTEGER := 60; -- the percentage the number of differences between a state's transition -- table and the most similar proto must be of the state's total number -- of out-transitions to create a new proto from the state NEW_PROTO_DIFF_PERCENTAGE : constant INTEGER := 20; -- the percentage the total number of out-transitions of a state must be -- of the number of equivalence classes in order to consider trying to -- fit the transition table into "holes" inside the nxt/chk table. INTERIOR_FIT_PERCENTAGE : constant INTEGER := 15; -- size of region set aside to cache the complete transition table of -- protos on the proto queue to enable quick comparisons PROT_SAVE_SIZE : constant INTEGER := 2000; MSP : constant INTEGER := 50; -- maximum number of saved protos (protos on th -- e proto queue) -- maximum number of out-transitions a state can have that we'll rummage -- around through the interior of the internal fast table looking for a -- spot for it MAX_XTIONS_FULL_INTERIOR_FIT : constant INTEGER := 4; -- maximum number of rules which will be reported as being associated -- with a DFA state MAX_ASSOC_RULES : constant INTEGER := 100; -- number that, if used to subscript an array, has a good chance of producing -- an error; should be small enough to fit into a short BAD_SUBSCRIPT : constant INTEGER := - 32767; -- Declarations for global variables. -- variables for symbol tables: -- sctbl - start-condition symbol table -- ndtbl - name-definition symbol table -- ccltab - character class text symbol table type HASH_ENTRY; type HASH_LINK is access HASH_ENTRY; type HASH_ENTRY is record PREV, NEXT : HASH_LINK; NAME, STR_VAL : VSTRING; INT_VAL : INTEGER; end record; type HASH_TABLE is array ( INTEGER range <> ) of HASH_LINK; NAME_TABLE_HASH_SIZE : constant INTEGER := 101; START_COND_HASH_SIZE : constant INTEGER := 101; CCL_HASH_SIZE : constant INTEGER := 101; subtype NDTBL_TYPE is HASH_TABLE (0 .. NAME_TABLE_HASH_SIZE - 1); NDTBL : NDTBL_TYPE; subtype SCTBL_TYPE is HASH_TABLE (0 .. START_COND_HASH_SIZE - 1); SCTBL : SCTBL_TYPE; subtype CCLTAB_TYPE is HASH_TABLE (0 .. CCL_HASH_SIZE); CCLTAB : CCLTAB_TYPE; -- variables for flags: -- printstats - if true (-v), dump statistics -- syntaxerror - true if a syntax error has been found -- eofseen - true if we've seen an eof in the input file -- ddebug - if true (-d), make a "debug" scanner -- trace - if true (-T), trace processing -- spprdflt - if true (-s), suppress the default rule -- interactive - if true (-I), generate an interactive scanner -- caseins - if true (-i), generate a case-insensitive scanner -- useecs - if true (-ce flag), use equivalence classes -- fulltbl - if true (-cf flag), don't compress the DFA state table -- usemecs - if true (-cm flag), use meta-equivalence classes -- gen_line_dirs - if true (i.e., no -L flag), generate #line directives -- performance_report - if true (i.e., -p flag), generate a report relating -- to scanner performance -- backtrack_report - if true (i.e., -b flag), generate "lex.backtrack" file -- listing backtracking states -- continued_action - true if this rule's action is to "fall through" to -- the next rule's action (i.e., the '|' action) PRINTSTATS, DDEBUG, SPPRDFLT, INTERACTIVE, CASEINS, USEECS, FULLTBL, USEMECS, GEN_LINE_DIRS, PERFORMANCE_REPORT, BACKTRACK_REPORT, TRACE, EOFSEEN, CONTINUED_ACTION : BOOLEAN; SYNTAXERROR : BOOLEAN; -- variables used in the aflex input routines: -- datapos - characters on current output line -- dataline - number of contiguous lines of data in current data -- statement. Used to generate readable -f output -- skelfile - the skeleton file -- yyin - input file -- temp_action_file - temporary file to hold actions -- backtrack_file - file to summarize backtracking states to -- infilename - name of input file -- linenum - current input line number DATAPOS, DATALINE, LINENUM : INTEGER; SKELFILE, YYIN, TEMP_ACTION_FILE, BACKTRACK_FILE, DEF_FILE : FILE_TYPE; INFILENAME : VSTRING; -- variables for stack of states having only one out-transition: -- onestate - state number -- onesym - transition symbol -- onenext - target state -- onedef - default base entry -- onesp - stack pointer ONESTATE, ONESYM, ONENEXT, ONEDEF : array (0 .. ONE_STACK_SIZE - 1) of INTEGER ; ONESP : INTEGER; -- variables for nfa machine data: -- current_mns - current maximum on number of NFA states -- num_rules - number of the last accepting state; also is number of -- rules created so far -- current_max_rules - current maximum number of rules -- lastnfa - last nfa state number created -- firstst - physically the first state of a fragment -- lastst - last physical state of fragment -- finalst - last logical state of fragment -- transchar - transition character -- trans1 - transition state -- trans2 - 2nd transition state for epsilons -- accptnum - accepting number -- assoc_rule - rule associated with this NFA state (or 0 if none) -- state_type - a STATE_xxx type identifying whether the state is part -- of a normal rule, the leading state in a trailing context -- rule (i.e., the state which marks the transition from -- recognizing the text-to-be-matched to the beginning of -- the trailing context), or a subsequent state in a trailing -- context rule -- rule_type - a RULE_xxx type identifying whether this a a ho-hum -- normal rule or one which has variable head & trailing -- context -- rule_linenum - line number associated with rule CURRENT_MNS, NUM_RULES, CURRENT_MAX_RULES, LASTNFA : INTEGER; FIRSTST, LASTST, FINALST, TRANSCHAR, TRANS1, TRANS2 : INT_PTR; ACCPTNUM, ASSOC_RULE, RULE_LINENUM : INT_PTR; RULE_TYPE : RULE_ENUM_PTR; STATE_TYPE : STATE_ENUM_PTR; -- global holding current type of state we're making CURRENT_STATE_ENUM : STATE_ENUM; -- true if the input rules include a rule with both variable-length head -- and trailing context, false otherwise VARIABLE_TRAILING_CONTEXT_RULES : BOOLEAN; -- variables for protos: -- numtemps - number of templates created -- numprots - number of protos created -- protprev - backlink to a more-recently used proto -- protnext - forward link to a less-recently used proto -- prottbl - base/def table entry for proto -- protcomst - common state of proto -- firstprot - number of the most recently used proto -- lastprot - number of the least recently used proto -- protsave contains the entire state array for protos NUMTEMPS, NUMPROTS, FIRSTPROT, LASTPROT : INTEGER; PROTPREV, PROTNEXT, PROTTBL, PROTCOMST : array (0 .. MSP - 1) of INTEGER; PROTSAVE : array (0 .. PROT_SAVE_SIZE - 1) of INTEGER; -- variables for managing equivalence classes: -- numecs - number of equivalence classes -- nextecm - forward link of Equivalence Class members -- ecgroup - class number or backward link of EC members -- nummecs - number of meta-equivalence classes (used to compress -- templates) -- tecfwd - forward link of meta-equivalence classes members -- * tecbck - backward link of MEC's NUMECS, NUMMECS : INTEGER; subtype C_SIZE_ARRAY is UNBOUNDED_INT_ARRAY (0 .. CSIZE); type C_SIZE_BOOL_ARRAY is array (0 .. CSIZE) of BOOLEAN; NEXTECM, ECGROUP, TECFWD, TECBCK : C_SIZE_ARRAY; -- variables for start conditions: -- lastsc - last start condition created -- current_max_scs - current limit on number of start conditions -- scset - set of rules active in start condition -- scbol - set of rules active only at the beginning of line in a s.c. -- scxclu - true if start condition is exclusive -- sceof - true if start condition has EOF rule -- scname - start condition name -- actvsc - stack of active start conditions for the current rule LASTSC, CURRENT_MAX_SCS : INTEGER; SCSET, SCBOL : INT_PTR; SCXCLU, SCEOF : BOOLEAN_PTR; ACTVSC : INT_PTR; SCNAME : VSTRING_PTR; -- variables for dfa machine data: -- current_max_dfa_size - current maximum number of NFA states in DFA -- current_max_xpairs - current maximum number of non-template xtion pairs -- current_max_template_xpairs - current maximum number of template pairs -- current_max_dfas - current maximum number DFA states -- lastdfa - last dfa state number created -- nxt - state to enter upon reading character -- chk - check value to see if "nxt" applies -- tnxt - internal nxt table for templates -- base - offset into "nxt" for given state -- def - where to go if "chk" disallows "nxt" entry -- tblend - last "nxt/chk" table entry being used -- firstfree - first empty entry in "nxt/chk" table -- dss - nfa state set for each dfa -- dfasiz - size of nfa state set for each dfa -- dfaacc - accepting set for each dfa state (or accepting number, if -- -r is not given) -- accsiz - size of accepting set for each dfa state -- dhash - dfa state hash value -- numas - number of DFA accepting states created; note that this -- is not necessarily the same value as num_rules, which is the analogous -- value for the NFA -- numsnpairs - number of state/nextstate transition pairs -- jambase - position in base/def where the default jam table starts -- jamstate - state number corresponding to "jam" state -- end_of_buffer_state - end-of-buffer dfa state number CURRENT_MAX_DFA_SIZE, CURRENT_MAX_XPAIRS : INTEGER; CURRENT_MAX_TEMPLATE_XPAIRS, CURRENT_MAX_DFAS : INTEGER; LASTDFA, LASTTEMP : INTEGER; NXT, CHK, TNXT : INT_PTR; BASE, DEF , DFASIZ : INT_PTR; TBLEND, FIRSTFREE : INTEGER; DSS : INT_STAR_PTR; DFAACC : DFAACC_PTR; -- type declaration for dfaacc_type moved above ACCSIZ, DHASH : INT_PTR; END_OF_BUFFER_STATE, NUMSNPAIRS, JAMBASE, JAMSTATE, NUMAS : INTEGER; -- variables for ccl information: -- lastccl - ccl index of the last created ccl -- current_maxccls - current limit on the maximum number of unique ccl's -- cclmap - maps a ccl index to its set pointer -- ccllen - gives the length of a ccl -- cclng - true for a given ccl if the ccl is negated -- cclreuse - counts how many times a ccl is re-used -- current_max_ccl_tbl_size - current limit on number of characters needed -- to represent the unique ccl's -- ccltbl - holds the characters in each ccl - indexed by cclmap CURRENT_MAX_CCL_TBL_SIZE, LASTCCL, CURRENT_MAXCCLS, CCLREUSE : INTEGER; CCLMAP, CCLLEN, CCLNG : INT_PTR; CCLTBL : CHAR_PTR; -- variables for miscellaneous information: -- starttime - real-time when we started -- endtime - real-time when we ended -- nmstr - last NAME scanned by the scanner -- sectnum - section number currently being parsed -- nummt - number of empty nxt/chk table entries -- hshcol - number of hash collisions detected by snstods -- dfaeql - number of times a newly created dfa was equal to an old one -- numeps - number of epsilon NFA states created -- eps2 - number of epsilon states which have 2 out-transitions -- num_reallocs - number of times it was necessary to realloc() a group -- of arrays -- tmpuses - number of DFA states that chain to templates -- totnst - total number of NFA states used to make DFA states -- peakpairs - peak number of transition pairs we had to store internally -- numuniq - number of unique transitions -- numdup - number of duplicate transitions -- hshsave - number of hash collisions saved by checking number of states -- num_backtracking - number of DFA states requiring back-tracking -- bol_needed - whether scanner needs beginning-of-line recognition NMSTR : VSTRING; SECTNUM, NUMMT, HSHCOL, DFAEQL, NUMEPS, EPS2, NUM_REALLOCS : INTEGER; TMPUSES, TOTNST, PEAKPAIRS, NUMUNIQ, NUMDUP, HSHSAVE : INTEGER; NUM_BACKTRACKING : INTEGER; BOL_NEEDED : BOOLEAN; function ALLOCATE_INTEGER_ARRAY (SIZE : in INTEGER) return INT_PTR; function ALLOCATE_INT_PTR_ARRAY (SIZE : in INTEGER) return INT_STAR_PTR; function ALLOCATE_VSTRING_ARRAY (SIZE : in INTEGER) return VSTRING_PTR; function ALLOCATE_DFAACC_UNION (SIZE : in INTEGER) return DFAACC_PTR; function ALLOCATE_CHARACTER_ARRAY (SIZE : in INTEGER) return CHAR_PTR; function ALLOCATE_RULE_ENUM_ARRAY (SIZE : in INTEGER) return RULE_ENUM_PTR; function ALLOCATE_STATE_ENUM_ARRAY (SIZE : in INTEGER) return STATE_ENUM_PTR; function ALLOCATE_BOOLEAN_ARRAY (SIZE : in INTEGER) return BOOLEAN_PTR; procedure REALLOCATE_INTEGER_ARRAY (ARR : in out INT_PTR; SIZE : in INTEGER); procedure REALLOCATE_INT_PTR_ARRAY (ARR : in out INT_STAR_PTR; SIZE : in INTEGER); procedure REALLOCATE_VSTRING_ARRAY (ARR : in out VSTRING_PTR; SIZE : in INTEGER); procedure REALLOCATE_DFAACC_UNION (ARR : in out DFAACC_PTR; SIZE : in INTEGER); procedure REALLOCATE_CHARACTER_ARRAY (ARR : in out CHAR_PTR; SIZE : in INTEGER); procedure REALLOCATE_RULE_ENUM_ARRAY (ARR : in out RULE_ENUM_PTR; SIZE : in INTEGER); procedure REALLOCATE_STATE_ENUM_ARRAY (ARR : in out STATE_ENUM_PTR; SIZE : in INTEGER); procedure REALLOCATE_BOOLEAN_ARRAY (ARR : in out BOOLEAN_PTR; SIZE : in INTEGER); end misc_defs;
with Ada.Calendar; use Ada.Calendar; package body Lto16_Pkg is function F return Float is F1 : Float := Float (Seconds (Clock)); F2 : Float := Float (Seconds (Clock)); F : Float; begin if F1 > F2 then F := (F2 - F1) / 2.0; else F := (F1 - F2) / 2.0; end if; return F; end; end Lto16_Pkg;
with Ada.Text_IO; with FunctionX; use Ada.Text_IO; use FunctionX; procedure Exercise is StaffMember : Employee; begin StaffMember.EmployeeNumber := 704702; StaffMember.FirstName := "Jonathan"; StaffMember.LastName := "Jensen"; StaffMember.HourlySalary := 22.84; Put_Line("Employee Record"); Put_Line("Employee #: " & Integer'Image(StaffMember.EmployeeNumber)); Put_Line("First Name: " & StaffMember.FirstName); Put_Line("Last Name: " & StaffMember.LastName); Put_Line("Hourly Salary: " & Float'Image(StaffMember.HourlySalary)); end Exercise;
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Ada Modeling Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2011-2012, Vadim Godunko <vgodunko@gmail.com> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ -- This file is generated, don't edit it. ------------------------------------------------------------------------------ with AMF.Generic_Collections; package AMF.UML.Observations.Collections is pragma Preelaborate; package UML_Observation_Collections is new AMF.Generic_Collections (UML_Observation, UML_Observation_Access); type Set_Of_UML_Observation is new UML_Observation_Collections.Set with null record; Empty_Set_Of_UML_Observation : constant Set_Of_UML_Observation; type Ordered_Set_Of_UML_Observation is new UML_Observation_Collections.Ordered_Set with null record; Empty_Ordered_Set_Of_UML_Observation : constant Ordered_Set_Of_UML_Observation; type Bag_Of_UML_Observation is new UML_Observation_Collections.Bag with null record; Empty_Bag_Of_UML_Observation : constant Bag_Of_UML_Observation; type Sequence_Of_UML_Observation is new UML_Observation_Collections.Sequence with null record; Empty_Sequence_Of_UML_Observation : constant Sequence_Of_UML_Observation; private Empty_Set_Of_UML_Observation : constant Set_Of_UML_Observation := (UML_Observation_Collections.Set with null record); Empty_Ordered_Set_Of_UML_Observation : constant Ordered_Set_Of_UML_Observation := (UML_Observation_Collections.Ordered_Set with null record); Empty_Bag_Of_UML_Observation : constant Bag_Of_UML_Observation := (UML_Observation_Collections.Bag with null record); Empty_Sequence_Of_UML_Observation : constant Sequence_Of_UML_Observation := (UML_Observation_Collections.Sequence with null record); end AMF.UML.Observations.Collections;
with VisitablePackage, EnvironmentPackage, VisitFailurePackage; use VisitablePackage, EnvironmentPackage, VisitFailurePackage; package body NoStrategy is ---------------------------------------------------------------------------- -- Object implementation ---------------------------------------------------------------------------- overriding function toString(n: No) return String is begin return "Not()"; end; ---------------------------------------------------------------------------- -- Strategy implementation ---------------------------------------------------------------------------- overriding function visitLight(str:access No; any: ObjectPtr; i: access Introspector'Class) return ObjectPtr is optr : ObjectPtr; exceptionRaised : Boolean := true; begin optr := visitLight(StrategyPtr(str.arguments(ARG)), any, i); exceptionRaised := false; raise VisitFailure; exception when VisitFailure => if exceptionRaised then return any; else raise; -- exception propagated end if; end; overriding function visit(str: access No; i: access Introspector'Class) return Integer is subject : ObjectPtr := getSubject(str.env.all); status : Integer := visit( StrategyPtr( str.arguments(ARG)), i); begin setSubject(str.env.all, subject); if status /= EnvironmentPackage.SUCCESS then return EnvironmentPackage.SUCCESS; else return EnvironmentPackage.FAILURE; end if; end; ---------------------------------------------------------------------------- procedure makeNo(n : in out No; v : StrategyPtr) is begin initSubterm(n, v); end; function newNo(v : StrategyPtr) return StrategyPtr is ret: StrategyPtr := new No; begin makeNo(No(ret.all), v); return ret; end; ---------------------------------------------------------------------------- end NoStrategy;
-- CE3806G.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 FIXED_IO PUT OPERATES ON FILES OF MODE OUT_FILE AND -- IF NO FILE IS SPECIFIED THE CURRENT DEFAULT OUTPUT FILE IS USED. -- APPLICABILITY CRITERIA: -- THIS TEST IS APPLICABLE ONLY TO IMPLEMENTATIONS WHICH SUPPORT -- TEXT FILES. -- HISTORY: -- JLH 09/13/87 CREATED ORIGINAL TEST. -- BCB 10/03/90 ADDED THE STATEMENT "RAISE INCOMPLETE;" TO -- NAME_ERROR EXCEPTION HANDLER. WITH REPORT; USE REPORT; WITH TEXT_IO; USE TEXT_IO; PROCEDURE CE3806G IS BEGIN TEST ("CE3806G", "CHECK THAT FIXED_IO PUT OPERATES ON FILES " & "OF MODE OUT_FILE AND IF NO FILE IS SPECIFIED " & "THE CURRENT DEFAULT OUTPUT FILE IS USED"); DECLARE FT1, FT2 : FILE_TYPE; TYPE FX IS DELTA 0.5 RANGE -10.0 .. 10.0; PACKAGE FXIO IS NEW FIXED_IO (FX); USE FXIO; INCOMPLETE : EXCEPTION; X : FX := -1.5; BEGIN BEGIN CREATE (FT1, OUT_FILE, LEGAL_FILE_NAME); EXCEPTION WHEN USE_ERROR => NOT_APPLICABLE ("USE_ERROR RAISED ON TEXT CREATE " & "WITH OUT_FILE MODE"); RAISE INCOMPLETE; WHEN NAME_ERROR => NOT_APPLICABLE ("NAME_ERROR RAISED ON TEXT " & "CREATE WITH OUT_FILE MODE"); RAISE INCOMPLETE; END; CREATE (FT2, OUT_FILE, LEGAL_FILE_NAME(2)); SET_OUTPUT (FT2); BEGIN PUT (FT1, X); PUT (X + 1.0); CLOSE (FT1); BEGIN OPEN (FT1, IN_FILE, LEGAL_FILE_NAME); EXCEPTION WHEN USE_ERROR => NOT_APPLICABLE ("USE_ERROR RAISED ON TEXT " & "OPEN WITH IN_FILE MODE"); RAISE INCOMPLETE; END; SET_OUTPUT (STANDARD_OUTPUT); CLOSE (FT2); OPEN (FT2, IN_FILE, LEGAL_FILE_NAME(2)); X := 0.0; GET (FT1, X); IF X /= -1.5 THEN FAILED ("VALUE INCORRECT - FIXED FROM FILE"); END IF; X := 0.0; GET (FT2, X); IF X /= -0.5 THEN FAILED ("VALUE INCORRECT - FIXED FROM DEFAULT"); END IF; END; BEGIN DELETE (FT1); DELETE (FT2); EXCEPTION WHEN USE_ERROR => NULL; END; EXCEPTION WHEN INCOMPLETE => NULL; END; RESULT; END CE3806G;
------------------------------------------------------------------------------ -- -- -- Copyright (C) 2015, AdaCore -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions are -- -- met: -- -- 1. Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- 2. Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in -- -- the documentation and/or other materials provided with the -- -- distribution. -- -- 3. Neither the name of the copyright holder nor the names of its -- -- contributors may be used to endorse or promote products derived -- -- from this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -- -- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -- -- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -- -- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -- -- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -- -- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ with Ada.Unchecked_Conversion; with STM32_SVD.RCC; use STM32_SVD.RCC; with STM32_SVD.PWR; use STM32_SVD.PWR; with STM32_SVD.SYSCFG; use STM32_SVD.SYSCFG; with STM32_SVD.Flash; use STM32_SVD.Flash; package body STM32.RCC is function To_AHBRSTR_T is new Ada.Unchecked_Conversion (UInt32, AHBRSTR_Register); function To_APB1RSTR_T is new Ada.Unchecked_Conversion (UInt32, APB1RSTR_Register); function To_APB2RSTR_T is new Ada.Unchecked_Conversion (UInt32, APB2RSTR_Register); --------------------------------------------------------------------------- ------- Enable/Disable/Reset Routines ----------------------------------- --------------------------------------------------------------------------- procedure BKPSRAM_Clock_Enable is begin RCC_Periph.AHBENR.SRAMEN := True; end BKPSRAM_Clock_Enable; procedure AHB_Force_Reset is begin RCC_Periph.AHBRSTR := To_AHBRSTR_T (16#FFFF_FFFF#); end AHB_Force_Reset; procedure AHB_Release_Reset is begin RCC_Periph.AHBRSTR := To_AHBRSTR_T (0); end AHB_Release_Reset; procedure APB1_Force_Reset is begin RCC_Periph.APB1RSTR := To_APB1RSTR_T (16#FFFF_FFFF#); end APB1_Force_Reset; procedure APB1_Release_Reset is begin RCC_Periph.APB1RSTR := To_APB1RSTR_T (0); end APB1_Release_Reset; procedure APB2_Force_Reset is begin RCC_Periph.APB2RSTR := To_APB2RSTR_T (16#FFFF_FFFF#); end APB2_Force_Reset; procedure APB2_Release_Reset is begin RCC_Periph.APB2RSTR := To_APB2RSTR_T (0); end APB2_Release_Reset; procedure Backup_Domain_Reset is begin RCC_Periph.BDCR.BDRST := True; RCC_Periph.BDCR.BDRST := False; end Backup_Domain_Reset; --------------------------------------------------------------------------- -- Clock Configuration -------------------------------------------------- --------------------------------------------------------------------------- ------------------- -- Set_HSE Clock -- ------------------- procedure Set_HSE_Clock (Enable : Boolean; Bypass : Boolean := False; Enable_CSS : Boolean := False) is begin if Enable and not RCC_Periph.CR.HSEON then RCC_Periph.CR.HSEON := True; loop exit when RCC_Periph.CR.HSERDY; end loop; end if; RCC_Periph.CR.HSEBYP := Bypass; RCC_Periph.CR.CSSON := Enable_CSS; end Set_HSE_Clock; ----------------------- -- HSE Clock_Enabled -- ----------------------- function HSE_Clock_Enabled return Boolean is begin return RCC_Periph.CR.HSEON; end HSE_Clock_Enabled; ------------------- -- Set_LSE Clock -- ------------------- procedure Set_LSE_Clock (Enable : Boolean; Bypass : Boolean := False; Capability : HSE_Capability) is begin if Enable and not RCC_Periph.BDCR.LSEON then RCC_Periph.BDCR.LSEON := True; loop exit when RCC_Periph.BDCR.LSERDY; end loop; end if; RCC_Periph.BDCR.LSEBYP := Bypass; RCC_Periph.BDCR.LSEDRV := Capability'Enum_Rep; end Set_LSE_Clock; ----------------------- -- LSE Clock_Enabled -- ----------------------- function LSE_Clock_Enabled return Boolean is begin return RCC_Periph.BDCR.LSEON; end LSE_Clock_Enabled; ------------------- -- Set_HSI_Clock -- ------------------- procedure Set_HSI_Clock (Enable : Boolean) is begin if Enable then if not RCC_Periph.CR.HSION then RCC_Periph.CR.HSION := True; loop exit when RCC_Periph.CR.HSIRDY; end loop; end if; else RCC_Periph.CR.HSION := False; end if; end Set_HSI_Clock; ----------------------- -- HSI_Clock_Enabled -- ----------------------- function HSI_Clock_Enabled return Boolean is begin return RCC_Periph.CR.HSION; end HSI_Clock_Enabled; ------------------- -- Set_LSI Clock -- ------------------- procedure Set_LSI_Clock (Enable : Boolean) is begin if Enable and not RCC_Periph.CSR.LSION then RCC_Periph.CSR.LSION := True; loop exit when RCC_Periph.CSR.LSIRDY; end loop; end if; end Set_LSI_Clock; ----------------------- -- LSI Clock_Enabled -- ----------------------- function LSI_Clock_Enabled return Boolean is begin return RCC_Periph.CSR.LSION; end LSI_Clock_Enabled; -------------------------------- -- Configure_System_Clock_Mux -- -------------------------------- procedure Configure_System_Clock_Mux (Source : SYSCLK_Clock_Source) is begin RCC_Periph.CFGR.SW := Source'Enum_Rep; loop exit when RCC_Periph.CFGR.SWS = Source'Enum_Rep; end loop; end Configure_System_Clock_Mux; ----------------------------------- -- Configure_AHB_Clock_Prescaler -- ----------------------------------- procedure Configure_AHB_Clock_Prescaler (Value : AHB_Prescaler) is function To_AHB is new Ada.Unchecked_Conversion (AHB_Prescaler, UInt4); begin RCC_Periph.CFGR.HPRE := To_AHB (Value); end Configure_AHB_Clock_Prescaler; ----------------------------------- -- Configure_APB_Clock_Prescaler -- ----------------------------------- procedure Configure_APB_Clock_Prescaler (Bus : APB_Clock_Range; Value : APB_Prescaler) is function To_APB is new Ada.Unchecked_Conversion (APB_Prescaler, UInt3); begin case Bus is when APB_1 => RCC_Periph.CFGR.PPRE.Arr (1) := To_APB (Value); when APB_2 => RCC_Periph.CFGR.PPRE.Arr (2) := To_APB (Value); end case; end Configure_APB_Clock_Prescaler; ------------------------------ -- Configure_PLL_Source_Mux -- ------------------------------ procedure Configure_PLL_Source_Mux (Source : PLL_Clock_Source) is begin RCC_Periph.CFGR.PLLSRC := Source = PLL_SRC_HSE; end Configure_PLL_Source_Mux; ------------------- -- Configure_PLL -- ------------------- procedure Configure_PLL (Enable : Boolean; PREDIV : PREDIV_Range := PREDIV_Range'First; PLLMUL : PLLMUL_Range := PLLMUL_Range'First) is begin -- Disable the main PLL before configuring it RCC_Periph.CR.PLLON := False; loop exit when not RCC_Periph.CR.PLLRDY; end loop; if Enable then RCC_Periph.CFGR.PLLMUL := UInt4 (PLLMUL'Enum_Rep - 2); RCC_Periph.CFGR2.PREDIV := UInt4 (PREDIV'Enum_Rep - 1); -- Setup PLL and wait for stabilization. RCC_Periph.CR.PLLON := Enable; loop exit when RCC_Periph.CR.PLLRDY; end loop; end if; end Configure_PLL; -------------------------------- -- Configure_MCO_Output_Clock -- -------------------------------- procedure Configure_MCO_Output_Clock (Source : MCO_Clock_Source; Value : MCO_Prescaler; Nodiv : Boolean := False) is begin RCC_Periph.CFGR.MCO := Source'Enum_Rep; RCC_Periph.CFGR.MCOPRE := Value'Enum_Rep; RCC_Periph.CFGR.PLLNODIV := Nodiv; end Configure_MCO_Output_Clock; ----------------------- -- Set_FLASH_Latency -- ----------------------- procedure Set_FLASH_Latency (Latency : FLASH_Wait_State) is begin Flash_Periph.ACR.LATENCY := Latency'Enum_Rep; end Set_FLASH_Latency; end STM32.RCC;
------------------------------------------------------------------------------ -- -- -- GNAT LIBRARY COMPONENTS -- -- -- -- ADA.CONTAINERS.GENERIC_ANONYMOUS_ARRAY_SORT -- -- -- -- S p e c -- -- -- -- Copyright (C) 2004-2021, 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/>. -- -- -- -- This unit was originally developed by Matthew J Heaney. -- ------------------------------------------------------------------------------ -- Allows an anonymous array (or array-like container) to be sorted. Generic -- formal Less returns the result of comparing the elements designated by the -- indexes, and generic formal Swap exchanges the designated elements. generic type Index_Type is (<>); with function Less (Left, Right : Index_Type) return Boolean is <>; with procedure Swap (Left, Right : Index_Type) is <>; procedure Ada.Containers.Generic_Anonymous_Array_Sort (First, Last : Index_Type'Base); pragma Pure (Ada.Containers.Generic_Anonymous_Array_Sort); -- Reorders the elements of Container such that the elements are sorted -- smallest first as determined by the generic formal "<" operator provided. -- Any exception raised during evaluation of "<" is propagated. -- -- The actual function for the generic formal function "<" is expected to -- return the same value each time it is called with a particular pair of -- element values. It should not modify Container and it should define a -- strict weak ordering relationship: irreflexive, asymmetric, transitive, and -- in addition, if x < y for any values x and y, then for all other values z, -- (x < z) or (z < y). If the actual for "<" behaves in some other manner, -- the behavior of the instance of Generic_Anonymous_Array_Sort is -- unspecified. The number of times Generic_Anonymous_Array_Sort calls "<" is -- unspecified.
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- S E M _ D I S P -- -- -- -- S p e c -- -- -- -- Copyright (C) 1992-2015, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- -- for more details. You should have received a copy of the GNU General -- -- Public License distributed with GNAT; see file COPYING3. If not, go to -- -- http://www.gnu.org/licenses for a complete copy of the license. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- This package contains routines involved in tagged types and dynamic -- dispatching. with Types; use Types; package Sem_Disp is procedure Check_Controlling_Formals (Typ : Entity_Id; Subp : Entity_Id); -- Check that all controlling parameters of Subp are of type Typ, that -- defaults for controlling parameters are tag-indeterminate, and that the -- nominal subtype of the parameters and result statically match the first -- subtype of the controlling type. Issues appropriate error messages if -- any of these requirements is not met. procedure Check_Dispatching_Call (N : Node_Id); -- Check if the call N is a dispatching call. The subprogram is known to be -- a dispatching operation. The call is dispatching if all the controlling -- actuals are dynamically tagged. This procedure is called after overload -- resolution, so the call is known to be unambiguous. procedure Check_Dispatching_Operation (Subp, Old_Subp : Entity_Id); -- Add Subp to the list of primitive operations of the corresponding type -- if it has a parameter of this type and is defined at a proper place for -- primitive operations (new primitives are only defined in package spec, -- overridden operation can be defined in any scope). If Old_Subp is not -- Empty we are in the overriding case. If the tagged type associated with -- Subp is a concurrent type (case that occurs when the type is declared -- in a generic because the analysis of generics disables generation of the -- corresponding record) then this routine does not add Subp to the list of -- primitive operations but leaves Subp decorated as dispatching operation -- to enable checks associated with the Object.Operation notation. procedure Check_Operation_From_Incomplete_Type (Subp : Entity_Id; Typ : Entity_Id); -- If a primitive operation was defined for the incomplete view of the -- type, and the full type declaration is a derived type definition, -- the operation may override an inherited one. -- Need more description here, what are the parameters, and what does -- this call actually do??? procedure Check_Operation_From_Private_View (Subp, Old_Subp : Entity_Id); -- Add Old_Subp to the list of primitive operations of the corresponding -- tagged type if it is the full view of a private tagged type. The Alias -- of Old_Subp is adjusted to point to the inherited procedure of the -- full view because it is always this one which has to be called. -- What is Subp used for??? function Covers_Some_Interface (Prim : Entity_Id) return Boolean; -- Returns true if Prim covers some interface primitive of its associated -- tagged type. The tagged type of Prim must be frozen when this function -- is invoked. function Find_Controlling_Arg (N : Node_Id) return Node_Id; -- Returns the actual controlling argument if N is dynamically tagged, and -- Empty if it is not dynamically tagged. function Find_Dispatching_Type (Subp : Entity_Id) return Entity_Id; -- Check whether the subprogram Subp is dispatching, and find the tagged -- type of the controlling argument or arguments. Returns Empty if Subp -- is not a dispatching operation. function Find_Primitive_Covering_Interface (Tagged_Type : Entity_Id; Iface_Prim : Entity_Id) return Entity_Id; -- Search the homonym chain for the primitive of Tagged_Type that covers -- Iface_Prim. The homonym chain traversal is required to catch primitives -- associated with the partial view of private types when processing the -- corresponding full view. If the entity is not found, then search for it -- in the list of primitives of Tagged_Type. This latter search is needed -- when the interface primitive is covered by a private subprogram. If the -- primitive has not been covered yet then return the entity that will be -- overridden when the primitive is covered (that is, return the entity -- whose alias attribute references the interface primitive). If none of -- these entities is found then return Empty. type Subprogram_List is array (Nat range <>) of Entity_Id; -- Type returned by Inherited_Subprograms function function Inherited_Subprograms (S : Entity_Id; No_Interfaces : Boolean := False; Interfaces_Only : Boolean := False; One_Only : Boolean := False) return Subprogram_List; -- Given the spec of a subprogram, this function gathers any inherited -- subprograms from direct inheritance or via interfaces. The result is an -- array of Entity_Ids of the specs of inherited subprograms. Returns a -- null array if passed an Empty spec id. Note that the returned array -- only includes subprograms and generic subprograms (and excludes any -- other inherited entities, in particular enumeration literals). If -- No_Interfaces is True, only return inherited subprograms not coming -- from an interface. If Interfaces_Only is True, only return inherited -- subprograms from interfaces. Otherwise, subprograms inherited directly -- come first, starting with the closest ancestors, and are followed by -- subprograms inherited from interfaces. At most one of No_Interfaces -- and Interfaces_Only should be True. -- -- If One_Only is set, the search is discontinued as soon as one entry -- is found. In this case the resulting array is either null or contains -- exactly one element. function Is_Dynamically_Tagged (N : Node_Id) return Boolean; -- Used to determine whether a call is dispatching, i.e. if it is -- an expression of a class_Wide type, or a call to a function with -- controlling result where at least one operand is dynamically tagged. -- Also used to determine whether an entity has a class-wide type, or a -- function call that dispatches on the result. Used to verify that all the -- dependent expressions in a conditional expression are equally tagged. function Is_Null_Interface_Primitive (E : Entity_Id) return Boolean; -- Returns True if E is a null procedure that is an interface primitive function Is_Overriding_Subprogram (E : Entity_Id) return Boolean; -- Returns True if E is an overriding subprogram function Is_Tag_Indeterminate (N : Node_Id) return Boolean; -- Returns true if the expression N is tag-indeterminate. An expression -- is tag-indeterminate if it is a call that dispatches on result, and all -- controlling operands are also indeterminate. Such a function call may -- inherit a tag from an enclosing call. procedure Override_Dispatching_Operation (Tagged_Type : Entity_Id; Prev_Op : Entity_Id; New_Op : Entity_Id; Is_Wrapper : Boolean := False); -- Replace an implicit dispatching operation of the type Tagged_Type -- with an explicit one. Prev_Op is an inherited primitive operation which -- is overridden by the explicit declaration of New_Op. Is_Wrapper is -- True when New_Op is an internally generated wrapper of a controlling -- function. The caller checks that Tagged_Type is indeed a tagged type. procedure Propagate_Tag (Control : Node_Id; Actual : Node_Id); -- If a function call is tag-indeterminate, its controlling argument is -- found in the context: either an enclosing call, or the left-hand side -- of the enclosing assignment statement. The tag must be propagated -- recursively to the tag-indeterminate actuals of the call. -- Need clear description of the parameters Control and Actual, especially -- since the comments above refer to actuals in the plural ??? end Sem_Disp;
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- A D A . W I D E _ W I D E _ T E X T _ I O -- -- -- -- B o d y -- -- -- -- Copyright (C) 1992-2014, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ with Ada.Streams; use Ada.Streams; with Interfaces.C_Streams; use Interfaces.C_Streams; with System.CRTL; with System.File_IO; with System.WCh_Cnv; use System.WCh_Cnv; with System.WCh_Con; use System.WCh_Con; with Ada.Unchecked_Conversion; with Ada.Unchecked_Deallocation; pragma Elaborate_All (System.File_IO); -- Needed because of calls to Chain_File in package body elaboration package body Ada.Wide_Wide_Text_IO is package FIO renames System.File_IO; subtype AP is FCB.AFCB_Ptr; function To_FCB is new Ada.Unchecked_Conversion (File_Mode, FCB.File_Mode); function To_TIO is new Ada.Unchecked_Conversion (FCB.File_Mode, File_Mode); use type FCB.File_Mode; use type System.CRTL.size_t; WC_Encoding : Character; pragma Import (C, WC_Encoding, "__gl_wc_encoding"); -- Default wide character encoding Err_Name : aliased String := "*stderr" & ASCII.NUL; In_Name : aliased String := "*stdin" & ASCII.NUL; Out_Name : aliased String := "*stdout" & ASCII.NUL; -- Names of standard files -- -- Use "preallocated" strings to avoid calling "new" during the elaboration -- of the run time. This is needed in the tasking case to avoid calling -- Task_Lock too early. A filename is expected to end with a null character -- in the runtime, here the null characters are added just to have a -- correct filename length. -- -- Note: the names for these files are bogus, and probably it would be -- better for these files to have no names, but the ACVC tests insist. -- We use names that are bound to fail in open etc. Null_Str : aliased constant String := ""; -- Used as form string for standard files ----------------------- -- Local Subprograms -- ----------------------- function Get_Wide_Wide_Char_Immed (C : Character; File : File_Type) return Wide_Wide_Character; -- This routine is identical to Get_Wide_Wide_Char, except that the reads -- are done in Get_Immediate mode (i.e. without waiting for a line return). function Getc_Immed (File : File_Type) return int; -- This routine is identical to Getc, except that the read is done in -- Get_Immediate mode (i.e. without waiting for a line return). procedure Putc (ch : int; File : File_Type); -- Outputs the given character to the file, which has already been checked -- for being in output status. Device_Error is raised if the character -- cannot be written. procedure Set_WCEM (File : in out File_Type); -- Called by Open and Create to set the wide character encoding method for -- the file, processing a WCEM form parameter if one is present. File is -- IN OUT because it may be closed in case of an error. procedure Terminate_Line (File : File_Type); -- If the file is in Write_File or Append_File mode, and the current line -- is not terminated, then a line terminator is written using New_Line. -- Note that there is no Terminate_Page routine, because the page mark at -- the end of the file is implied if necessary. procedure Ungetc (ch : int; File : File_Type); -- Pushes back character into stream, using ungetc. The caller has checked -- that the file is in read status. Device_Error is raised if the character -- cannot be pushed back. An attempt to push back and end of file character -- (EOF) is ignored. ------------------- -- AFCB_Allocate -- ------------------- function AFCB_Allocate (Control_Block : Wide_Wide_Text_AFCB) return FCB.AFCB_Ptr is pragma Unreferenced (Control_Block); begin return new Wide_Wide_Text_AFCB; end AFCB_Allocate; ---------------- -- AFCB_Close -- ---------------- procedure AFCB_Close (File : not null access Wide_Wide_Text_AFCB) is begin -- If the file being closed is one of the current files, then close -- the corresponding current file. It is not clear that this action -- is required (RM A.10.3(23)) but it seems reasonable, and besides -- ACVC test CE3208A expects this behavior. if File_Type (File) = Current_In then Current_In := null; elsif File_Type (File) = Current_Out then Current_Out := null; elsif File_Type (File) = Current_Err then Current_Err := null; end if; Terminate_Line (File_Type (File)); end AFCB_Close; --------------- -- AFCB_Free -- --------------- procedure AFCB_Free (File : not null access Wide_Wide_Text_AFCB) is type FCB_Ptr is access all Wide_Wide_Text_AFCB; FT : FCB_Ptr := FCB_Ptr (File); procedure Free is new Ada.Unchecked_Deallocation (Wide_Wide_Text_AFCB, FCB_Ptr); begin Free (FT); end AFCB_Free; ----------- -- Close -- ----------- procedure Close (File : in out File_Type) is begin FIO.Close (AP (File)'Unrestricted_Access); end Close; --------- -- Col -- --------- -- Note: we assume that it is impossible in practice for the column -- to exceed the value of Count'Last, i.e. no check is required for -- overflow raising layout error. function Col (File : File_Type) return Positive_Count is begin FIO.Check_File_Open (AP (File)); return File.Col; end Col; function Col return Positive_Count is begin return Col (Current_Out); end Col; ------------ -- Create -- ------------ procedure Create (File : in out File_Type; Mode : File_Mode := Out_File; Name : String := ""; Form : String := "") is Dummy_File_Control_Block : Wide_Wide_Text_AFCB; pragma Warnings (Off, Dummy_File_Control_Block); -- Yes, we know this is never assigned a value, only the tag -- is used for dispatching purposes, so that's expected. begin FIO.Open (File_Ptr => AP (File), Dummy_FCB => Dummy_File_Control_Block, Mode => To_FCB (Mode), Name => Name, Form => Form, Amethod => 'W', Creat => True, Text => True); File.Self := File; Set_WCEM (File); end Create; ------------------- -- Current_Error -- ------------------- function Current_Error return File_Type is begin return Current_Err; end Current_Error; function Current_Error return File_Access is begin return Current_Err.Self'Access; end Current_Error; ------------------- -- Current_Input -- ------------------- function Current_Input return File_Type is begin return Current_In; end Current_Input; function Current_Input return File_Access is begin return Current_In.Self'Access; end Current_Input; -------------------- -- Current_Output -- -------------------- function Current_Output return File_Type is begin return Current_Out; end Current_Output; function Current_Output return File_Access is begin return Current_Out.Self'Access; end Current_Output; ------------ -- Delete -- ------------ procedure Delete (File : in out File_Type) is begin FIO.Delete (AP (File)'Unrestricted_Access); end Delete; ----------------- -- End_Of_File -- ----------------- function End_Of_File (File : File_Type) return Boolean is ch : int; begin FIO.Check_Read_Status (AP (File)); if File.Before_Wide_Wide_Character then return False; elsif File.Before_LM then if File.Before_LM_PM then return Nextc (File) = EOF; end if; else ch := Getc (File); if ch = EOF then return True; elsif ch /= LM then Ungetc (ch, File); return False; else -- ch = LM File.Before_LM := True; end if; end if; -- Here we are just past the line mark with Before_LM set so that we -- do not have to try to back up past the LM, thus avoiding the need -- to back up more than one character. ch := Getc (File); if ch = EOF then return True; elsif ch = PM and then File.Is_Regular_File then File.Before_LM_PM := True; return Nextc (File) = EOF; -- Here if neither EOF nor PM followed end of line else Ungetc (ch, File); return False; end if; end End_Of_File; function End_Of_File return Boolean is begin return End_Of_File (Current_In); end End_Of_File; ----------------- -- End_Of_Line -- ----------------- function End_Of_Line (File : File_Type) return Boolean is ch : int; begin FIO.Check_Read_Status (AP (File)); if File.Before_Wide_Wide_Character then return False; elsif File.Before_LM then return True; else ch := Getc (File); if ch = EOF then return True; else Ungetc (ch, File); return (ch = LM); end if; end if; end End_Of_Line; function End_Of_Line return Boolean is begin return End_Of_Line (Current_In); end End_Of_Line; ----------------- -- End_Of_Page -- ----------------- function End_Of_Page (File : File_Type) return Boolean is ch : int; begin FIO.Check_Read_Status (AP (File)); if not File.Is_Regular_File then return False; elsif File.Before_Wide_Wide_Character then return False; elsif File.Before_LM then if File.Before_LM_PM then return True; end if; else ch := Getc (File); if ch = EOF then return True; elsif ch /= LM then Ungetc (ch, File); return False; else -- ch = LM File.Before_LM := True; end if; end if; -- Here we are just past the line mark with Before_LM set so that we -- do not have to try to back up past the LM, thus avoiding the need -- to back up more than one character. ch := Nextc (File); return ch = PM or else ch = EOF; end End_Of_Page; function End_Of_Page return Boolean is begin return End_Of_Page (Current_In); end End_Of_Page; ----------- -- Flush -- ----------- procedure Flush (File : File_Type) is begin FIO.Flush (AP (File)); end Flush; procedure Flush is begin Flush (Current_Out); end Flush; ---------- -- Form -- ---------- function Form (File : File_Type) return String is begin return FIO.Form (AP (File)); end Form; --------- -- Get -- --------- procedure Get (File : File_Type; Item : out Wide_Wide_Character) is C : Character; begin FIO.Check_Read_Status (AP (File)); if File.Before_Wide_Wide_Character then File.Before_Wide_Wide_Character := False; Item := File.Saved_Wide_Wide_Character; -- Ada.Text_IO checks Before_LM_PM here, shouldn't we do the same??? else Get_Character (File, C); Item := Get_Wide_Wide_Char (C, File); end if; end Get; procedure Get (Item : out Wide_Wide_Character) is begin Get (Current_In, Item); end Get; procedure Get (File : File_Type; Item : out Wide_Wide_String) is begin for J in Item'Range loop Get (File, Item (J)); end loop; end Get; procedure Get (Item : out Wide_Wide_String) is begin Get (Current_In, Item); end Get; ------------------- -- Get_Character -- ------------------- procedure Get_Character (File : File_Type; Item : out Character) is ch : int; begin if File.Before_LM then File.Before_LM := False; File.Before_LM_PM := False; File.Col := 1; if File.Before_LM_PM then File.Line := 1; File.Page := File.Page + 1; File.Before_LM_PM := False; else File.Line := File.Line + 1; end if; end if; loop ch := Getc (File); if ch = EOF then raise End_Error; elsif ch = LM then File.Line := File.Line + 1; File.Col := 1; elsif ch = PM and then File.Is_Regular_File then File.Page := File.Page + 1; File.Line := 1; else Item := Character'Val (ch); File.Col := File.Col + 1; return; end if; end loop; end Get_Character; ------------------- -- Get_Immediate -- ------------------- procedure Get_Immediate (File : File_Type; Item : out Wide_Wide_Character) is ch : int; begin FIO.Check_Read_Status (AP (File)); if File.Before_Wide_Wide_Character then File.Before_Wide_Wide_Character := False; Item := File.Saved_Wide_Wide_Character; elsif File.Before_LM then File.Before_LM := False; File.Before_LM_PM := False; Item := Wide_Wide_Character'Val (LM); else ch := Getc_Immed (File); if ch = EOF then raise End_Error; else Item := Get_Wide_Wide_Char_Immed (Character'Val (ch), File); end if; end if; end Get_Immediate; procedure Get_Immediate (Item : out Wide_Wide_Character) is begin Get_Immediate (Current_In, Item); end Get_Immediate; procedure Get_Immediate (File : File_Type; Item : out Wide_Wide_Character; Available : out Boolean) is ch : int; begin FIO.Check_Read_Status (AP (File)); Available := True; if File.Before_Wide_Wide_Character then File.Before_Wide_Wide_Character := False; Item := File.Saved_Wide_Wide_Character; elsif File.Before_LM then File.Before_LM := False; File.Before_LM_PM := False; Item := Wide_Wide_Character'Val (LM); else -- Shouldn't we use getc_immediate_nowait here, like Text_IO??? ch := Getc_Immed (File); if ch = EOF then raise End_Error; else Item := Get_Wide_Wide_Char_Immed (Character'Val (ch), File); end if; end if; end Get_Immediate; procedure Get_Immediate (Item : out Wide_Wide_Character; Available : out Boolean) is begin Get_Immediate (Current_In, Item, Available); end Get_Immediate; -------------- -- Get_Line -- -------------- procedure Get_Line (File : File_Type; Item : out Wide_Wide_String; Last : out Natural) is begin FIO.Check_Read_Status (AP (File)); Last := Item'First - 1; -- Immediate exit for null string, this is a case in which we do not -- need to test for end of file and we do not skip a line mark under -- any circumstances. if Last >= Item'Last then return; end if; -- Here we have at least one character, if we are immediately before -- a line mark, then we will just skip past it storing no characters. if File.Before_LM then File.Before_LM := False; File.Before_LM_PM := False; -- Otherwise we need to read some characters else -- If we are at the end of file now, it means we are trying to -- skip a file terminator and we raise End_Error (RM A.10.7(20)) if Nextc (File) = EOF then raise End_Error; end if; -- Loop through characters in string loop -- Exit the loop if read is terminated by encountering line mark -- Note that the use of Skip_Line here ensures we properly deal -- with setting the page and line numbers. if End_Of_Line (File) then Skip_Line (File); return; end if; -- Otherwise store the character, note that we know that ch is -- something other than LM or EOF. It could possibly be a page -- mark if there is a stray page mark in the middle of a line, -- but this is not an official page mark in any case, since -- official page marks can only follow a line mark. The whole -- page business is pretty much nonsense anyway, so we do not -- want to waste time trying to make sense out of non-standard -- page marks in the file. This means that the behavior of -- Get_Line is different from repeated Get of a character, but -- that's too bad. We only promise that page numbers etc make -- sense if the file is formatted in a standard manner. -- Note: we do not adjust the column number because it is quicker -- to adjust it once at the end of the operation than incrementing -- it each time around the loop. Last := Last + 1; Get (File, Item (Last)); -- All done if the string is full, this is the case in which -- we do not skip the following line mark. We need to adjust -- the column number in this case. if Last = Item'Last then File.Col := File.Col + Count (Item'Length); return; end if; -- Exit from the loop if we are at the end of file. This happens -- if we have a last line that is not terminated with a line mark. -- In this case we consider that there is an implied line mark; -- this is a non-standard file, but we will treat it nicely. exit when Nextc (File) = EOF; end loop; end if; end Get_Line; procedure Get_Line (Item : out Wide_Wide_String; Last : out Natural) is begin Get_Line (Current_In, Item, Last); end Get_Line; function Get_Line (File : File_Type) return Wide_Wide_String is Buffer : Wide_Wide_String (1 .. 500); Last : Natural; function Get_Rest (S : Wide_Wide_String) return Wide_Wide_String; -- This is a recursive function that reads the rest of the line and -- returns it. S is the part read so far. -------------- -- Get_Rest -- -------------- function Get_Rest (S : Wide_Wide_String) return Wide_Wide_String is -- Each time we allocate a buffer the same size as what we have -- read so far. This limits us to a logarithmic number of calls -- to Get_Rest and also ensures only a linear use of stack space. Buffer : Wide_Wide_String (1 .. S'Length); Last : Natural; begin Get_Line (File, Buffer, Last); declare R : constant Wide_Wide_String := S & Buffer (1 .. Last); begin if Last < Buffer'Last then return R; else return Get_Rest (R); end if; end; end Get_Rest; -- Start of processing for Get_Line begin Get_Line (File, Buffer, Last); if Last < Buffer'Last then return Buffer (1 .. Last); else return Get_Rest (Buffer (1 .. Last)); end if; end Get_Line; function Get_Line return Wide_Wide_String is begin return Get_Line (Current_In); end Get_Line; ------------------------ -- Get_Wide_Wide_Char -- ------------------------ function Get_Wide_Wide_Char (C : Character; File : File_Type) return Wide_Wide_Character is function In_Char return Character; -- Function used to obtain additional characters it the wide character -- sequence is more than one character long. function WC_In is new Char_Sequence_To_UTF_32 (In_Char); ------------- -- In_Char -- ------------- function In_Char return Character is ch : constant Integer := Getc (File); begin if ch = EOF then raise End_Error; else return Character'Val (ch); end if; end In_Char; -- Start of processing for Get_Wide_Wide_Char begin FIO.Check_Read_Status (AP (File)); return Wide_Wide_Character'Val (WC_In (C, File.WC_Method)); end Get_Wide_Wide_Char; ------------------------------ -- Get_Wide_Wide_Char_Immed -- ------------------------------ function Get_Wide_Wide_Char_Immed (C : Character; File : File_Type) return Wide_Wide_Character is function In_Char return Character; -- Function used to obtain additional characters it the wide character -- sequence is more than one character long. function WC_In is new Char_Sequence_To_UTF_32 (In_Char); ------------- -- In_Char -- ------------- function In_Char return Character is ch : constant Integer := Getc_Immed (File); begin if ch = EOF then raise End_Error; else return Character'Val (ch); end if; end In_Char; -- Start of processing for Get_Wide_Wide_Char_Immed begin FIO.Check_Read_Status (AP (File)); return Wide_Wide_Character'Val (WC_In (C, File.WC_Method)); end Get_Wide_Wide_Char_Immed; ---------- -- Getc -- ---------- function Getc (File : File_Type) return int is ch : int; begin ch := fgetc (File.Stream); if ch = EOF and then ferror (File.Stream) /= 0 then raise Device_Error; else return ch; end if; end Getc; ---------------- -- Getc_Immed -- ---------------- function Getc_Immed (File : File_Type) return int is ch : int; end_of_file : int; procedure getc_immediate (stream : FILEs; ch : out int; end_of_file : out int); pragma Import (C, getc_immediate, "getc_immediate"); begin FIO.Check_Read_Status (AP (File)); if File.Before_LM then File.Before_LM := False; File.Before_LM_PM := False; ch := LM; else getc_immediate (File.Stream, ch, end_of_file); if ferror (File.Stream) /= 0 then raise Device_Error; elsif end_of_file /= 0 then return EOF; end if; end if; return ch; end Getc_Immed; ------------------------------- -- Initialize_Standard_Files -- ------------------------------- procedure Initialize_Standard_Files is begin Standard_Err.Stream := stderr; Standard_Err.Name := Err_Name'Access; Standard_Err.Form := Null_Str'Unrestricted_Access; Standard_Err.Mode := FCB.Out_File; Standard_Err.Is_Regular_File := is_regular_file (fileno (stderr)) /= 0; Standard_Err.Is_Temporary_File := False; Standard_Err.Is_System_File := True; Standard_Err.Text_Encoding := Default_Text; Standard_Err.Access_Method := 'T'; Standard_Err.Self := Standard_Err; Standard_Err.WC_Method := Default_WCEM; Standard_In.Stream := stdin; Standard_In.Name := In_Name'Access; Standard_In.Form := Null_Str'Unrestricted_Access; Standard_In.Mode := FCB.In_File; Standard_In.Is_Regular_File := is_regular_file (fileno (stdin)) /= 0; Standard_In.Is_Temporary_File := False; Standard_In.Is_System_File := True; Standard_In.Text_Encoding := Default_Text; Standard_In.Access_Method := 'T'; Standard_In.Self := Standard_In; Standard_In.WC_Method := Default_WCEM; Standard_Out.Stream := stdout; Standard_Out.Name := Out_Name'Access; Standard_Out.Form := Null_Str'Unrestricted_Access; Standard_Out.Mode := FCB.Out_File; Standard_Out.Is_Regular_File := is_regular_file (fileno (stdout)) /= 0; Standard_Out.Is_Temporary_File := False; Standard_Out.Is_System_File := True; Standard_Out.Text_Encoding := Default_Text; Standard_Out.Access_Method := 'T'; Standard_Out.Self := Standard_Out; Standard_Out.WC_Method := Default_WCEM; FIO.Make_Unbuffered (AP (Standard_Out)); FIO.Make_Unbuffered (AP (Standard_Err)); end Initialize_Standard_Files; ------------- -- Is_Open -- ------------- function Is_Open (File : File_Type) return Boolean is begin return FIO.Is_Open (AP (File)); end Is_Open; ---------- -- Line -- ---------- -- Note: we assume that it is impossible in practice for the line -- to exceed the value of Count'Last, i.e. no check is required for -- overflow raising layout error. function Line (File : File_Type) return Positive_Count is begin FIO.Check_File_Open (AP (File)); return File.Line; end Line; function Line return Positive_Count is begin return Line (Current_Out); end Line; ----------------- -- Line_Length -- ----------------- function Line_Length (File : File_Type) return Count is begin FIO.Check_Write_Status (AP (File)); return File.Line_Length; end Line_Length; function Line_Length return Count is begin return Line_Length (Current_Out); end Line_Length; ---------------- -- Look_Ahead -- ---------------- procedure Look_Ahead (File : File_Type; Item : out Wide_Wide_Character; End_Of_Line : out Boolean) is ch : int; -- Start of processing for Look_Ahead begin FIO.Check_Read_Status (AP (File)); -- If we are logically before a line mark, we can return immediately if File.Before_LM then End_Of_Line := True; Item := Wide_Wide_Character'Val (0); -- If we are before a wide character, just return it (this can happen -- if there are two calls to Look_Ahead in a row). elsif File.Before_Wide_Wide_Character then End_Of_Line := False; Item := File.Saved_Wide_Wide_Character; -- otherwise we must read a character from the input stream else ch := Getc (File); if ch = LM or else ch = EOF or else (ch = EOF and then File.Is_Regular_File) then End_Of_Line := True; Ungetc (ch, File); Item := Wide_Wide_Character'Val (0); -- Case where character obtained does not represent the start of an -- encoded sequence so it stands for itself and we can unget it with -- no difficulty. elsif not Is_Start_Of_Encoding (Character'Val (ch), File.WC_Method) then End_Of_Line := False; Ungetc (ch, File); Item := Wide_Wide_Character'Val (ch); -- For the start of an encoding, we read the character using the -- Get_Wide_Wide_Char routine. It will occupy more than one byte so -- we can't put it back with ungetc. Instead we save it in the -- control block, setting a flag that everyone interested in reading -- characters must test before reading the stream. else Item := Get_Wide_Wide_Char (Character'Val (ch), File); End_Of_Line := False; File.Saved_Wide_Wide_Character := Item; File.Before_Wide_Wide_Character := True; end if; end if; end Look_Ahead; procedure Look_Ahead (Item : out Wide_Wide_Character; End_Of_Line : out Boolean) is begin Look_Ahead (Current_In, Item, End_Of_Line); end Look_Ahead; ---------- -- Mode -- ---------- function Mode (File : File_Type) return File_Mode is begin return To_TIO (FIO.Mode (AP (File))); end Mode; ---------- -- Name -- ---------- function Name (File : File_Type) return String is begin return FIO.Name (AP (File)); end Name; -------------- -- New_Line -- -------------- procedure New_Line (File : File_Type; Spacing : Positive_Count := 1) is begin -- Raise Constraint_Error if out of range value. The reason for this -- explicit test is that we don't want junk values around, even if -- checks are off in the caller. if not Spacing'Valid then raise Constraint_Error; end if; FIO.Check_Write_Status (AP (File)); for K in 1 .. Spacing loop Putc (LM, File); File.Line := File.Line + 1; if File.Page_Length /= 0 and then File.Line > File.Page_Length then Putc (PM, File); File.Line := 1; File.Page := File.Page + 1; end if; end loop; File.Col := 1; end New_Line; procedure New_Line (Spacing : Positive_Count := 1) is begin New_Line (Current_Out, Spacing); end New_Line; -------------- -- New_Page -- -------------- procedure New_Page (File : File_Type) is begin FIO.Check_Write_Status (AP (File)); if File.Col /= 1 or else File.Line = 1 then Putc (LM, File); end if; Putc (PM, File); File.Page := File.Page + 1; File.Line := 1; File.Col := 1; end New_Page; procedure New_Page is begin New_Page (Current_Out); end New_Page; ----------- -- Nextc -- ----------- function Nextc (File : File_Type) return int is ch : int; begin ch := fgetc (File.Stream); if ch = EOF then if ferror (File.Stream) /= 0 then raise Device_Error; end if; else if ungetc (ch, File.Stream) = EOF then raise Device_Error; end if; end if; return ch; end Nextc; ---------- -- Open -- ---------- procedure Open (File : in out File_Type; Mode : File_Mode; Name : String; Form : String := "") is Dummy_File_Control_Block : Wide_Wide_Text_AFCB; pragma Warnings (Off, Dummy_File_Control_Block); -- Yes, we know this is never assigned a value, only the tag -- is used for dispatching purposes, so that's expected. begin FIO.Open (File_Ptr => AP (File), Dummy_FCB => Dummy_File_Control_Block, Mode => To_FCB (Mode), Name => Name, Form => Form, Amethod => 'W', Creat => False, Text => True); File.Self := File; Set_WCEM (File); end Open; ---------- -- Page -- ---------- -- Note: we assume that it is impossible in practice for the page -- to exceed the value of Count'Last, i.e. no check is required for -- overflow raising layout error. function Page (File : File_Type) return Positive_Count is begin FIO.Check_File_Open (AP (File)); return File.Page; end Page; function Page return Positive_Count is begin return Page (Current_Out); end Page; ----------------- -- Page_Length -- ----------------- function Page_Length (File : File_Type) return Count is begin FIO.Check_Write_Status (AP (File)); return File.Page_Length; end Page_Length; function Page_Length return Count is begin return Page_Length (Current_Out); end Page_Length; --------- -- Put -- --------- procedure Put (File : File_Type; Item : Wide_Wide_Character) is procedure Out_Char (C : Character); -- Procedure to output one character of a wide character sequence procedure WC_Out is new UTF_32_To_Char_Sequence (Out_Char); -------------- -- Out_Char -- -------------- procedure Out_Char (C : Character) is begin Putc (Character'Pos (C), File); end Out_Char; -- Start of processing for Put begin FIO.Check_Write_Status (AP (File)); WC_Out (Wide_Wide_Character'Pos (Item), File.WC_Method); File.Col := File.Col + 1; end Put; procedure Put (Item : Wide_Wide_Character) is begin Put (Current_Out, Item); end Put; --------- -- Put -- --------- procedure Put (File : File_Type; Item : Wide_Wide_String) is begin for J in Item'Range loop Put (File, Item (J)); end loop; end Put; procedure Put (Item : Wide_Wide_String) is begin Put (Current_Out, Item); end Put; -------------- -- Put_Line -- -------------- procedure Put_Line (File : File_Type; Item : Wide_Wide_String) is begin Put (File, Item); New_Line (File); end Put_Line; procedure Put_Line (Item : Wide_Wide_String) is begin Put (Current_Out, Item); New_Line (Current_Out); end Put_Line; ---------- -- Putc -- ---------- procedure Putc (ch : int; File : File_Type) is begin if fputc (ch, File.Stream) = EOF then raise Device_Error; end if; end Putc; ---------- -- Read -- ---------- -- This is the primitive Stream Read routine, used when a Text_IO file -- is treated directly as a stream using Text_IO.Streams.Stream. procedure Read (File : in out Wide_Wide_Text_AFCB; Item : out Stream_Element_Array; Last : out Stream_Element_Offset) is Discard_ch : int; pragma Unreferenced (Discard_ch); begin -- Need to deal with Before_Wide_Wide_Character ??? if File.Mode /= FCB.In_File then raise Mode_Error; end if; -- Deal with case where our logical and physical position do not match -- because of being after an LM or LM-PM sequence when in fact we are -- logically positioned before it. if File.Before_LM then -- If we are before a PM, then it is possible for a stream read -- to leave us after the LM and before the PM, which is a bit -- odd. The easiest way to deal with this is to unget the PM, -- so we are indeed positioned between the characters. This way -- further stream read operations will work correctly, and the -- effect on text processing is a little weird, but what can -- be expected if stream and text input are mixed this way? if File.Before_LM_PM then Discard_ch := ungetc (PM, File.Stream); File.Before_LM_PM := False; end if; File.Before_LM := False; Item (Item'First) := Stream_Element (Character'Pos (ASCII.LF)); if Item'Length = 1 then Last := Item'Last; else Last := Item'First + Stream_Element_Offset (fread (buffer => Item'Address, index => size_t (Item'First + 1), size => 1, count => Item'Length - 1, stream => File.Stream)); end if; return; end if; -- Now we do the read. Since this is a text file, it is normally in -- text mode, but stream data must be read in binary mode, so we -- temporarily set binary mode for the read, resetting it after. -- These calls have no effect in a system (like Unix) where there is -- no distinction between text and binary files. set_binary_mode (fileno (File.Stream)); Last := Item'First + Stream_Element_Offset (fread (Item'Address, 1, Item'Length, File.Stream)) - 1; if Last < Item'Last then if ferror (File.Stream) /= 0 then raise Device_Error; end if; end if; set_text_mode (fileno (File.Stream)); end Read; ----------- -- Reset -- ----------- procedure Reset (File : in out File_Type; Mode : File_Mode) is begin -- Don't allow change of mode for current file (RM A.10.2(5)) if (File = Current_In or else File = Current_Out or else File = Current_Error) and then To_FCB (Mode) /= File.Mode then raise Mode_Error; end if; Terminate_Line (File); FIO.Reset (AP (File)'Unrestricted_Access, To_FCB (Mode)); File.Page := 1; File.Line := 1; File.Col := 1; File.Line_Length := 0; File.Page_Length := 0; File.Before_LM := False; File.Before_LM_PM := False; end Reset; procedure Reset (File : in out File_Type) is begin Terminate_Line (File); FIO.Reset (AP (File)'Unrestricted_Access); File.Page := 1; File.Line := 1; File.Col := 1; File.Line_Length := 0; File.Page_Length := 0; File.Before_LM := False; File.Before_LM_PM := False; end Reset; ------------- -- Set_Col -- ------------- procedure Set_Col (File : File_Type; To : Positive_Count) is ch : int; begin -- Raise Constraint_Error if out of range value. The reason for this -- explicit test is that we don't want junk values around, even if -- checks are off in the caller. if not To'Valid then raise Constraint_Error; end if; FIO.Check_File_Open (AP (File)); if To = File.Col then return; end if; if Mode (File) >= Out_File then if File.Line_Length /= 0 and then To > File.Line_Length then raise Layout_Error; end if; if To < File.Col then New_Line (File); end if; while File.Col < To loop Put (File, ' '); end loop; else loop ch := Getc (File); if ch = EOF then raise End_Error; elsif ch = LM then File.Line := File.Line + 1; File.Col := 1; elsif ch = PM and then File.Is_Regular_File then File.Page := File.Page + 1; File.Line := 1; File.Col := 1; elsif To = File.Col then Ungetc (ch, File); return; else File.Col := File.Col + 1; end if; end loop; end if; end Set_Col; procedure Set_Col (To : Positive_Count) is begin Set_Col (Current_Out, To); end Set_Col; --------------- -- Set_Error -- --------------- procedure Set_Error (File : File_Type) is begin FIO.Check_Write_Status (AP (File)); Current_Err := File; end Set_Error; --------------- -- Set_Input -- --------------- procedure Set_Input (File : File_Type) is begin FIO.Check_Read_Status (AP (File)); Current_In := File; end Set_Input; -------------- -- Set_Line -- -------------- procedure Set_Line (File : File_Type; To : Positive_Count) is begin -- Raise Constraint_Error if out of range value. The reason for this -- explicit test is that we don't want junk values around, even if -- checks are off in the caller. if not To'Valid then raise Constraint_Error; end if; FIO.Check_File_Open (AP (File)); if To = File.Line then return; end if; if Mode (File) >= Out_File then if File.Page_Length /= 0 and then To > File.Page_Length then raise Layout_Error; end if; if To < File.Line then New_Page (File); end if; while File.Line < To loop New_Line (File); end loop; else while To /= File.Line loop Skip_Line (File); end loop; end if; end Set_Line; procedure Set_Line (To : Positive_Count) is begin Set_Line (Current_Out, To); end Set_Line; --------------------- -- Set_Line_Length -- --------------------- procedure Set_Line_Length (File : File_Type; To : Count) is begin -- Raise Constraint_Error if out of range value. The reason for this -- explicit test is that we don't want junk values around, even if -- checks are off in the caller. if not To'Valid then raise Constraint_Error; end if; FIO.Check_Write_Status (AP (File)); File.Line_Length := To; end Set_Line_Length; procedure Set_Line_Length (To : Count) is begin Set_Line_Length (Current_Out, To); end Set_Line_Length; ---------------- -- Set_Output -- ---------------- procedure Set_Output (File : File_Type) is begin FIO.Check_Write_Status (AP (File)); Current_Out := File; end Set_Output; --------------------- -- Set_Page_Length -- --------------------- procedure Set_Page_Length (File : File_Type; To : Count) is begin -- Raise Constraint_Error if out of range value. The reason for this -- explicit test is that we don't want junk values around, even if -- checks are off in the caller. if not To'Valid then raise Constraint_Error; end if; FIO.Check_Write_Status (AP (File)); File.Page_Length := To; end Set_Page_Length; procedure Set_Page_Length (To : Count) is begin Set_Page_Length (Current_Out, To); end Set_Page_Length; -------------- -- Set_WCEM -- -------------- procedure Set_WCEM (File : in out File_Type) is Start : Natural; Stop : Natural; begin File.WC_Method := WCEM_Brackets; FIO.Form_Parameter (File.Form.all, "wcem", Start, Stop); if Start = 0 then File.WC_Method := WCEM_Brackets; else if Stop = Start then for J in WC_Encoding_Letters'Range loop if File.Form (Start) = WC_Encoding_Letters (J) then File.WC_Method := J; return; end if; end loop; end if; Close (File); raise Use_Error with "invalid WCEM form parameter"; end if; end Set_WCEM; --------------- -- Skip_Line -- --------------- procedure Skip_Line (File : File_Type; Spacing : Positive_Count := 1) is ch : int; begin -- Raise Constraint_Error if out of range value. The reason for this -- explicit test is that we don't want junk values around, even if -- checks are off in the caller. if not Spacing'Valid then raise Constraint_Error; end if; FIO.Check_Read_Status (AP (File)); for L in 1 .. Spacing loop if File.Before_LM then File.Before_LM := False; File.Before_LM_PM := False; else ch := Getc (File); -- If at end of file now, then immediately raise End_Error. Note -- that we can never be positioned between a line mark and a page -- mark, so if we are at the end of file, we cannot logically be -- before the implicit page mark that is at the end of the file. -- For the same reason, we do not need an explicit check for a -- page mark. If there is a FF in the middle of a line, the file -- is not in canonical format and we do not care about the page -- numbers for files other than ones in canonical format. if ch = EOF then raise End_Error; end if; -- If not at end of file, then loop till we get to an LM or EOF. -- The latter case happens only in non-canonical files where the -- last line is not terminated by LM, but we don't want to blow -- up for such files, so we assume an implicit LM in this case. loop exit when ch = LM or else ch = EOF; ch := Getc (File); end loop; end if; -- We have got past a line mark, now, for a regular file only, -- see if a page mark immediately follows this line mark and -- if so, skip past the page mark as well. We do not do this -- for non-regular files, since it would cause an undesirable -- wait for an additional character. File.Col := 1; File.Line := File.Line + 1; if File.Before_LM_PM then File.Page := File.Page + 1; File.Line := 1; File.Before_LM_PM := False; elsif File.Is_Regular_File then ch := Getc (File); -- Page mark can be explicit, or implied at the end of the file if (ch = PM or else ch = EOF) and then File.Is_Regular_File then File.Page := File.Page + 1; File.Line := 1; else Ungetc (ch, File); end if; end if; end loop; File.Before_Wide_Wide_Character := False; end Skip_Line; procedure Skip_Line (Spacing : Positive_Count := 1) is begin Skip_Line (Current_In, Spacing); end Skip_Line; --------------- -- Skip_Page -- --------------- procedure Skip_Page (File : File_Type) is ch : int; begin FIO.Check_Read_Status (AP (File)); -- If at page mark already, just skip it if File.Before_LM_PM then File.Before_LM := False; File.Before_LM_PM := False; File.Page := File.Page + 1; File.Line := 1; File.Col := 1; return; end if; -- This is a bit tricky, if we are logically before an LM then -- it is not an error if we are at an end of file now, since we -- are not really at it. if File.Before_LM then File.Before_LM := False; File.Before_LM_PM := False; ch := Getc (File); -- Otherwise we do raise End_Error if we are at the end of file now else ch := Getc (File); if ch = EOF then raise End_Error; end if; end if; -- Now we can just rumble along to the next page mark, or to the -- end of file, if that comes first. The latter case happens when -- the page mark is implied at the end of file. loop exit when ch = EOF or else (ch = PM and then File.Is_Regular_File); ch := Getc (File); end loop; File.Page := File.Page + 1; File.Line := 1; File.Col := 1; File.Before_Wide_Wide_Character := False; end Skip_Page; procedure Skip_Page is begin Skip_Page (Current_In); end Skip_Page; -------------------- -- Standard_Error -- -------------------- function Standard_Error return File_Type is begin return Standard_Err; end Standard_Error; function Standard_Error return File_Access is begin return Standard_Err'Access; end Standard_Error; -------------------- -- Standard_Input -- -------------------- function Standard_Input return File_Type is begin return Standard_In; end Standard_Input; function Standard_Input return File_Access is begin return Standard_In'Access; end Standard_Input; --------------------- -- Standard_Output -- --------------------- function Standard_Output return File_Type is begin return Standard_Out; end Standard_Output; function Standard_Output return File_Access is begin return Standard_Out'Access; end Standard_Output; -------------------- -- Terminate_Line -- -------------------- procedure Terminate_Line (File : File_Type) is begin FIO.Check_File_Open (AP (File)); -- For file other than In_File, test for needing to terminate last line if Mode (File) /= In_File then -- If not at start of line definition need new line if File.Col /= 1 then New_Line (File); -- For files other than standard error and standard output, we -- make sure that an empty file has a single line feed, so that -- it is properly formatted. We avoid this for the standard files -- because it is too much of a nuisance to have these odd line -- feeds when nothing has been written to the file. elsif (File /= Standard_Err and then File /= Standard_Out) and then (File.Line = 1 and then File.Page = 1) then New_Line (File); end if; end if; end Terminate_Line; ------------ -- Ungetc -- ------------ procedure Ungetc (ch : int; File : File_Type) is begin if ch /= EOF then if ungetc (ch, File.Stream) = EOF then raise Device_Error; end if; end if; end Ungetc; ----------- -- Write -- ----------- -- This is the primitive Stream Write routine, used when a Text_IO file -- is treated directly as a stream using Text_IO.Streams.Stream. procedure Write (File : in out Wide_Wide_Text_AFCB; Item : Stream_Element_Array) is pragma Warnings (Off, File); -- Because in this implementation we don't need IN OUT, we only read Siz : constant size_t := Item'Length; begin if File.Mode = FCB.In_File then raise Mode_Error; end if; -- Now we do the write. Since this is a text file, it is normally in -- text mode, but stream data must be written in binary mode, so we -- temporarily set binary mode for the write, resetting it after. -- These calls have no effect in a system (like Unix) where there is -- no distinction between text and binary files. set_binary_mode (fileno (File.Stream)); if fwrite (Item'Address, 1, Siz, File.Stream) /= Siz then raise Device_Error; end if; set_text_mode (fileno (File.Stream)); end Write; begin -- Initialize Standard Files for J in WC_Encoding_Method loop if WC_Encoding = WC_Encoding_Letters (J) then Default_WCEM := J; end if; end loop; Initialize_Standard_Files; FIO.Chain_File (AP (Standard_In)); FIO.Chain_File (AP (Standard_Out)); FIO.Chain_File (AP (Standard_Err)); end Ada.Wide_Wide_Text_IO;
-- Copyright (c) 2019 Maxim Reznik <reznikmm@gmail.com> -- -- SPDX-License-Identifier: MIT -- License-Filename: LICENSE ------------------------------------------------------------- with Program.Elements.Formal_Type_Definitions; with Program.Lexical_Elements; package Program.Elements.Formal_Ordinary_Fixed_Point_Definitions is pragma Pure (Program.Elements.Formal_Ordinary_Fixed_Point_Definitions); type Formal_Ordinary_Fixed_Point_Definition is limited interface and Program.Elements.Formal_Type_Definitions.Formal_Type_Definition; type Formal_Ordinary_Fixed_Point_Definition_Access is access all Formal_Ordinary_Fixed_Point_Definition'Class with Storage_Size => 0; type Formal_Ordinary_Fixed_Point_Definition_Text is limited interface; type Formal_Ordinary_Fixed_Point_Definition_Text_Access is access all Formal_Ordinary_Fixed_Point_Definition_Text'Class with Storage_Size => 0; not overriding function To_Formal_Ordinary_Fixed_Point_Definition_Text (Self : aliased in out Formal_Ordinary_Fixed_Point_Definition) return Formal_Ordinary_Fixed_Point_Definition_Text_Access is abstract; not overriding function Delta_Token (Self : Formal_Ordinary_Fixed_Point_Definition_Text) return not null Program.Lexical_Elements.Lexical_Element_Access is abstract; not overriding function Box_Token (Self : Formal_Ordinary_Fixed_Point_Definition_Text) return not null Program.Lexical_Elements.Lexical_Element_Access is abstract; end Program.Elements.Formal_Ordinary_Fixed_Point_Definitions;
-- This spec has been automatically generated from STM32L0x3.svd pragma Restrictions (No_Elaboration_Code); pragma Ada_2012; pragma Style_Checks (Off); with HAL; with System; package STM32_SVD.ADC is pragma Preelaborate; --------------- -- Registers -- --------------- -- interrupt and status register type ISR_Register is record -- ADC ready ADRDY : Boolean := False; -- End of sampling flag EOSMP : Boolean := False; -- End of conversion flag EOC : Boolean := False; -- End of sequence flag EOS : Boolean := False; -- ADC overrun OVR : Boolean := False; -- unspecified Reserved_5_6 : HAL.UInt2 := 16#0#; -- Analog watchdog flag AWD : Boolean := False; -- unspecified Reserved_8_10 : HAL.UInt3 := 16#0#; -- End Of Calibration flag EOCAL : Boolean := False; -- unspecified Reserved_12_31 : HAL.UInt20 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for ISR_Register use record ADRDY at 0 range 0 .. 0; EOSMP at 0 range 1 .. 1; EOC at 0 range 2 .. 2; EOS at 0 range 3 .. 3; OVR at 0 range 4 .. 4; Reserved_5_6 at 0 range 5 .. 6; AWD at 0 range 7 .. 7; Reserved_8_10 at 0 range 8 .. 10; EOCAL at 0 range 11 .. 11; Reserved_12_31 at 0 range 12 .. 31; end record; -- interrupt enable register type IER_Register is record -- ADC ready interrupt enable ADRDYIE : Boolean := False; -- End of sampling flag interrupt enable EOSMPIE : Boolean := False; -- End of conversion interrupt enable EOCIE : Boolean := False; -- End of conversion sequence interrupt enable EOSIE : Boolean := False; -- Overrun interrupt enable OVRIE : Boolean := False; -- unspecified Reserved_5_6 : HAL.UInt2 := 16#0#; -- Analog watchdog interrupt enable AWDIE : Boolean := False; -- unspecified Reserved_8_10 : HAL.UInt3 := 16#0#; -- End of calibration interrupt enable EOCALIE : Boolean := False; -- unspecified Reserved_12_31 : HAL.UInt20 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for IER_Register use record ADRDYIE at 0 range 0 .. 0; EOSMPIE at 0 range 1 .. 1; EOCIE at 0 range 2 .. 2; EOSIE at 0 range 3 .. 3; OVRIE at 0 range 4 .. 4; Reserved_5_6 at 0 range 5 .. 6; AWDIE at 0 range 7 .. 7; Reserved_8_10 at 0 range 8 .. 10; EOCALIE at 0 range 11 .. 11; Reserved_12_31 at 0 range 12 .. 31; end record; -- control register type CR_Register is record -- ADC enable command ADEN : Boolean := False; -- ADC disable command ADDIS : Boolean := False; -- ADC start conversion command ADSTART : Boolean := False; -- unspecified Reserved_3_3 : HAL.Bit := 16#0#; -- ADC stop conversion command ADSTP : Boolean := False; -- unspecified Reserved_5_27 : HAL.UInt23 := 16#0#; -- ADC Voltage Regulator Enable ADVREGEN : Boolean := False; -- unspecified Reserved_29_30 : HAL.UInt2 := 16#0#; -- ADC calibration ADCAL : Boolean := False; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for CR_Register use record ADEN at 0 range 0 .. 0; ADDIS at 0 range 1 .. 1; ADSTART at 0 range 2 .. 2; Reserved_3_3 at 0 range 3 .. 3; ADSTP at 0 range 4 .. 4; Reserved_5_27 at 0 range 5 .. 27; ADVREGEN at 0 range 28 .. 28; Reserved_29_30 at 0 range 29 .. 30; ADCAL at 0 range 31 .. 31; end record; subtype CFGR1_RES_Field is HAL.UInt2; subtype CFGR1_EXTSEL_Field is HAL.UInt3; subtype CFGR1_EXTEN_Field is HAL.UInt2; subtype CFGR1_AWDCH_Field is HAL.UInt5; -- configuration register 1 type CFGR1_Register is record -- Direct memory access enable DMAEN : Boolean := False; -- Direct memery access configuration DMACFG : Boolean := False; -- Scan sequence direction SCANDIR : Boolean := False; -- Data resolution RES : CFGR1_RES_Field := 16#0#; -- Data alignment ALIGN : Boolean := False; -- External trigger selection EXTSEL : CFGR1_EXTSEL_Field := 16#0#; -- unspecified Reserved_9_9 : HAL.Bit := 16#0#; -- External trigger enable and polarity selection EXTEN : CFGR1_EXTEN_Field := 16#0#; -- Overrun management mode OVRMOD : Boolean := False; -- Single / continuous conversion mode CONT : Boolean := False; -- Auto-delayed conversion mode AUTDLY : Boolean := False; -- Auto-off mode AUTOFF : Boolean := False; -- Discontinuous mode DISCEN : Boolean := False; -- unspecified Reserved_17_21 : HAL.UInt5 := 16#0#; -- Enable the watchdog on a single channel or on all channels AWDSGL : Boolean := False; -- Analog watchdog enable AWDEN : Boolean := False; -- unspecified Reserved_24_25 : HAL.UInt2 := 16#0#; -- Analog watchdog channel selection AWDCH : CFGR1_AWDCH_Field := 16#0#; -- unspecified Reserved_31_31 : HAL.Bit := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for CFGR1_Register use record DMAEN at 0 range 0 .. 0; DMACFG at 0 range 1 .. 1; SCANDIR at 0 range 2 .. 2; RES at 0 range 3 .. 4; ALIGN at 0 range 5 .. 5; EXTSEL at 0 range 6 .. 8; Reserved_9_9 at 0 range 9 .. 9; EXTEN at 0 range 10 .. 11; OVRMOD at 0 range 12 .. 12; CONT at 0 range 13 .. 13; AUTDLY at 0 range 14 .. 14; AUTOFF at 0 range 15 .. 15; DISCEN at 0 range 16 .. 16; Reserved_17_21 at 0 range 17 .. 21; AWDSGL at 0 range 22 .. 22; AWDEN at 0 range 23 .. 23; Reserved_24_25 at 0 range 24 .. 25; AWDCH at 0 range 26 .. 30; Reserved_31_31 at 0 range 31 .. 31; end record; subtype CFGR2_OVSR_Field is HAL.UInt3; subtype CFGR2_OVSS_Field is HAL.UInt4; subtype CFGR2_CKMODE_Field is HAL.UInt2; -- configuration register 2 type CFGR2_Register is record -- Oversampler Enable OVSE : Boolean := False; -- unspecified Reserved_1_1 : HAL.Bit := 16#0#; -- Oversampling ratio OVSR : CFGR2_OVSR_Field := 16#0#; -- Oversampling shift OVSS : CFGR2_OVSS_Field := 16#0#; -- Triggered Oversampling TOVS : Boolean := False; -- unspecified Reserved_10_29 : HAL.UInt20 := 16#0#; -- ADC clock mode CKMODE : CFGR2_CKMODE_Field := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for CFGR2_Register use record OVSE at 0 range 0 .. 0; Reserved_1_1 at 0 range 1 .. 1; OVSR at 0 range 2 .. 4; OVSS at 0 range 5 .. 8; TOVS at 0 range 9 .. 9; Reserved_10_29 at 0 range 10 .. 29; CKMODE at 0 range 30 .. 31; end record; subtype SMPR_SMPR_Field is HAL.UInt3; -- sampling time register type SMPR_Register is record -- Sampling time selection SMPR : SMPR_SMPR_Field := 16#0#; -- unspecified Reserved_3_31 : HAL.UInt29 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for SMPR_Register use record SMPR at 0 range 0 .. 2; Reserved_3_31 at 0 range 3 .. 31; end record; subtype TR_LT_Field is HAL.UInt12; subtype TR_HT_Field is HAL.UInt12; -- watchdog threshold register type TR_Register is record -- Analog watchdog lower threshold LT : TR_LT_Field := 16#0#; -- unspecified Reserved_12_15 : HAL.UInt4 := 16#0#; -- Analog watchdog higher threshold HT : TR_HT_Field := 16#FFF#; -- unspecified Reserved_28_31 : HAL.UInt4 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for TR_Register use record LT at 0 range 0 .. 11; Reserved_12_15 at 0 range 12 .. 15; HT at 0 range 16 .. 27; Reserved_28_31 at 0 range 28 .. 31; end record; -- CHSELR_CHSEL array type CHSELR_CHSEL_Field_Array is array (0 .. 18) of Boolean with Component_Size => 1, Size => 19; -- Type definition for CHSELR_CHSEL type CHSELR_CHSEL_Field (As_Array : Boolean := False) is record case As_Array is when False => -- CHSEL as a value Val : HAL.UInt19; when True => -- CHSEL as an array Arr : CHSELR_CHSEL_Field_Array; end case; end record with Unchecked_Union, Size => 19; for CHSELR_CHSEL_Field use record Val at 0 range 0 .. 18; Arr at 0 range 0 .. 18; end record; -- channel selection register type CHSELR_Register is record -- Channel-x selection CHSEL : CHSELR_CHSEL_Field := (As_Array => False, Val => 16#0#); -- unspecified Reserved_19_31 : HAL.UInt13 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for CHSELR_Register use record CHSEL at 0 range 0 .. 18; Reserved_19_31 at 0 range 19 .. 31; end record; subtype DR_DATA_Field is HAL.UInt16; -- data register type DR_Register is record -- Read-only. Converted data DATA : DR_DATA_Field; -- unspecified Reserved_16_31 : HAL.UInt16; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for DR_Register use record DATA at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype CALFACT_CALFACT_Field is HAL.UInt7; -- ADC Calibration factor type CALFACT_Register is record -- Calibration factor CALFACT : CALFACT_CALFACT_Field := 16#0#; -- unspecified Reserved_7_31 : HAL.UInt25 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for CALFACT_Register use record CALFACT at 0 range 0 .. 6; Reserved_7_31 at 0 range 7 .. 31; end record; subtype CCR_PRESC_Field is HAL.UInt4; -- ADC common configuration register type CCR_Register is record -- unspecified Reserved_0_17 : HAL.UInt18 := 16#0#; -- ADC prescaler PRESC : CCR_PRESC_Field := 16#0#; -- VREFINT enable VREFEN : Boolean := False; -- Temperature sensor enable TSEN : Boolean := False; -- unspecified Reserved_24_24 : HAL.Bit := 16#0#; -- Low Frequency Mode enable LFMEN : Boolean := False; -- unspecified Reserved_26_31 : HAL.UInt6 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for CCR_Register use record Reserved_0_17 at 0 range 0 .. 17; PRESC at 0 range 18 .. 21; VREFEN at 0 range 22 .. 22; TSEN at 0 range 23 .. 23; Reserved_24_24 at 0 range 24 .. 24; LFMEN at 0 range 25 .. 25; Reserved_26_31 at 0 range 26 .. 31; end record; ----------------- -- Peripherals -- ----------------- -- Analog-to-digital converter type ADC_Peripheral is record -- interrupt and status register ISR : aliased ISR_Register; -- interrupt enable register IER : aliased IER_Register; -- control register CR : aliased CR_Register; -- configuration register 1 CFGR1 : aliased CFGR1_Register; -- configuration register 2 CFGR2 : aliased CFGR2_Register; -- sampling time register SMPR : aliased SMPR_Register; -- watchdog threshold register TR : aliased TR_Register; -- channel selection register CHSELR : aliased CHSELR_Register; -- data register DR : aliased DR_Register; -- ADC Calibration factor CALFACT : aliased CALFACT_Register; -- ADC common configuration register CCR : aliased CCR_Register; end record with Volatile; for ADC_Peripheral use record ISR at 16#0# range 0 .. 31; IER at 16#4# range 0 .. 31; CR at 16#8# range 0 .. 31; CFGR1 at 16#C# range 0 .. 31; CFGR2 at 16#10# range 0 .. 31; SMPR at 16#14# range 0 .. 31; TR at 16#20# range 0 .. 31; CHSELR at 16#28# range 0 .. 31; DR at 16#40# range 0 .. 31; CALFACT at 16#B4# range 0 .. 31; CCR at 16#308# range 0 .. 31; end record; -- Analog-to-digital converter ADC_Periph : aliased ADC_Peripheral with Import, Address => System'To_Address (16#40012400#); end STM32_SVD.ADC;
with Ada.Text_IO; use Ada.Text_IO; with Ada.Command_Line; with Ada.Exceptions; with SPDX; procedure Main is Fail_Cnt : Natural := 0; Pass_Cnt : Natural := 0; procedure Test (Str : String; Expected_Error : String := ""; Allow_Custom : Boolean := False); procedure Test (Str : String; Expected_Error : String := ""; Allow_Custom : Boolean := False) is begin declare Exp : constant SPDX.Expression := SPDX.Parse (Str, Allow_Custom); Error : constant String := (if SPDX.Valid (Exp) then "" else SPDX.Error (Exp)); begin if Error /= Expected_Error then Put_Line ("FAIL: '" & Str & "'"); if Expected_Error /= "" then Put_Line (" Expected error: '" & Expected_Error & "'"); Put_Line (" but got : '" & Error & "'"); else Put_Line (" Unexpected error: '" & Error & "'"); end if; Fail_Cnt := Fail_Cnt + 1; elsif Expected_Error = "" and then Allow_Custom and then not SPDX.Has_Custom (Exp) then Put_Line ("FAIL: '" & Str & "'"); Put_Line (" Has_Custom returned False"); Fail_Cnt := Fail_Cnt + 1; else Put_Line ("PASS: '" & Str & "'"); Pass_Cnt := Pass_Cnt + 1; end if; end; exception when E : others => Put_Line ("FAIL: '" & Str & "'"); Put_Line (" With exception: '" & Ada.Exceptions.Exception_Information (E) & "'"); Fail_Cnt := Fail_Cnt + 1; end Test; begin -- Test all invalid chars for C in Character loop if C not in 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '-' | '.' | '(' | ')' | '+' | ' ' | ASCII.HT then Test ("test" & C, "Invalid character at 5"); end if; end loop; Test ("", "Empty license expression at (0:0)"); Test ("test-3", "Invalid license ID: 'test-3' (1:6)"); Test ("test-3.0", "Invalid license ID: 'test-3.0' (1:8)"); Test ("MIT"); Test ("MIT+"); Test ("MIT OR MIT"); Test ("MIT AND MIT"); Test ("MIT Or MIT", "Operator must be uppercase at (5:6)"); Test ("MIT anD MIT", "Operator must be uppercase at (5:7)"); Test ("MIT WITH AND", "License exception id expected at (10:12)"); Test ("MIT WITH", "License exception id expected at (8:8)"); Test ("MIT WITH plop", "Invalid license exception ID: 'plop' (10:13)"); Test ("MIT WITH GPL-3.0-linking-exception"); Test ("(MIT)"); Test ("(MIT) AND MIT"); Test ("(MIT+) AND (MIT)"); Test ("((MIT) AND (MIT+))"); Test ("((MIT) AND (MIT+ OR MIT AND MIT AND (MIT WITH GPL-3.0-linking-exception AND MIT)))"); Test ("MIT +", "+ operator must follow and indentifier without whitespace (5:5)"); Test ("MIT AND +", "+ operator must follow and indentifier without whitespace (9:9)"); Test ("MIT+AND", "Invalid license ID: 'MIT+AND' (1:7)"); Test ("MIT AND", "Empty license expression at (7:7)"); Test ("MIT OR", "Empty license expression at (6:6)"); Test ("MIT MIT", "Unexpected token at (5:7)"); Test ("(MIT", "Missing closing parentheses ')' at (4:4)"); Test ("MIT)", "Unexpected token at (4:4)"); Test ("(MIT AND (MIT OR MIT)", "Missing closing parentheses ')' at (21:21)"); Test ("MIT AND (MIT OR MIT))", "Unexpected token at (21:21)"); Test ("custom-plop", "Invalid license ID: 'custom-plop' (1:11)", Allow_Custom => False); Test ("custom", "Invalid license ID: 'custom' (1:6)", Allow_Custom => True); Test ("custom-", "Invalid license ID: 'custom-' (1:7)", Allow_Custom => True); Test ("custom-plop", Allow_Custom => True); Test ("custom-plop+", Allow_Custom => True); Test ("custom-test:test", "Invalid character at 12", Allow_Custom => True); Test ("CuStoM-test-1.0.3", Allow_Custom => True); Test ("custom-test AND custom-plop", Allow_Custom => True); Put_Line ("PASS:" & Pass_Cnt'Img); Put_Line ("FAIL:" & Fail_Cnt'Img); if Fail_Cnt /= 0 then Ada.Command_Line.Set_Exit_Status (Ada.Command_Line.Failure); end if; end Main;
with System.Storage_Elements; package body Interfaces.C.Pointers is use type System.Storage_Elements.Storage_Offset; -- no System.Address_To_Access_Conversions for modifying to Pure function To_Pointer (Value : System.Address) return access Element with Import, Convention => Intrinsic; function To_Address (Value : access constant Element) return System.Address with Import, Convention => Intrinsic; -- implementation function Value ( Ref : access constant Element; Terminator : Element := Default_Terminator) return Element_Array is pragma Check (Dynamic_Predicate, Check => Ref /= null or else raise Dereference_Error); -- CXB3014 Length : constant ptrdiff_t := Virtual_Length (Ref, Terminator) + 1; -- including nul begin return Value (Ref, Length); end Value; function Value ( Ref : access constant Element; Length : ptrdiff_t) return Element_Array is pragma Check (Dynamic_Predicate, Check => Ref /= null or else raise Dereference_Error); -- CXB3014 First : Index; Last : Index'Base; begin if Index'First = Index'Base'First and then Length = 0 then First := Index'Succ (Index'First); Last := Index'First; else First := Index'First; Last := Index'Base'Val (Index'Pos (Index'First) + Length - 1); end if; declare Source : Element_Array (First .. Last); for Source'Address use To_Address (Ref); begin return Source; end; end Value; function "+" ( Left : Pointer; Right : ptrdiff_t) return not null Pointer is pragma Check (Dynamic_Predicate, Check => Left /= null or else raise Pointer_Error); -- CXB3015 begin return To_Pointer ( To_Address (Left) + System.Storage_Elements.Storage_Offset (Right) * (Element_Array'Component_Size / Standard'Storage_Unit)); end "+"; function "+" ( Left : ptrdiff_t; Right : not null Pointer) return not null Pointer is begin return Right + Left; end "+"; function "-" ( Left : Pointer; Right : ptrdiff_t) return not null Pointer is pragma Check (Dynamic_Predicate, Check => Left /= null or else raise Pointer_Error); -- CXB3015 begin return To_Pointer ( To_Address (Left) - System.Storage_Elements.Storage_Offset (Right) * (Element_Array'Component_Size / Standard'Storage_Unit)); end "-"; function "-" ( Left : not null Pointer; Right : not null access constant Element) return ptrdiff_t is begin return Constant_Pointer (Left) - Right; end "-"; procedure Increment (Ref : in out not null Pointer) is begin Ref := Ref + 1; end Increment; procedure Decrement (Ref : in out Pointer) is begin Ref := Ref - 1; end Decrement; function "+" (Left : not null Constant_Pointer; Right : ptrdiff_t) return not null Constant_Pointer is begin return To_Pointer ( To_Address (Left) + System.Storage_Elements.Storage_Offset (Right) * (Element_Array'Component_Size / Standard'Storage_Unit)); end "+"; function "+" (Left : ptrdiff_t; Right : not null Constant_Pointer) return not null Constant_Pointer is begin return Right + Left; end "+"; function "-" (Left : not null Constant_Pointer; Right : ptrdiff_t) return not null Constant_Pointer is begin return To_Pointer ( To_Address (Left) - System.Storage_Elements.Storage_Offset (Right) * (Element_Array'Component_Size / Standard'Storage_Unit)); end "-"; function "-" ( Left : not null Constant_Pointer; Right : not null access constant Element) return ptrdiff_t is begin return ptrdiff_t ( (To_Address (Left) - To_Address (Right)) / (Element_Array'Component_Size / Standard'Storage_Unit)); end "-"; procedure Increment (Ref : in out not null Constant_Pointer) is begin Ref := Ref + 1; end Increment; procedure Decrement (Ref : in out not null Constant_Pointer) is begin Ref := Ref - 1; end Decrement; function Virtual_Length ( Ref : access constant Element; Terminator : Element := Default_Terminator) return ptrdiff_t is pragma Check (Dynamic_Predicate, Check => Ref /= null or else raise Dereference_Error); -- CXB3016 Result : ptrdiff_t := 0; begin while Constant_Pointer'(Ref + Result).all /= Terminator loop Result := Result + 1; end loop; return Result; end Virtual_Length; function Virtual_Length ( Ref : not null access constant Element; Limit : ptrdiff_t; Terminator : Element := Default_Terminator) return ptrdiff_t is Result : ptrdiff_t := 0; begin while Result < Limit and then Constant_Pointer'(Ref + Result).all /= Terminator loop Result := Result + 1; end loop; return Result; end Virtual_Length; procedure Copy_Terminated_Array ( Source : access constant Element; Target : access Element; Limit : ptrdiff_t := ptrdiff_t'Last; Terminator : Element := Default_Terminator) is pragma Check (Dynamic_Predicate, Check => Source /= null or else raise Dereference_Error); -- CXB3016 pragma Check (Dynamic_Predicate, Check => Target /= null or else raise Dereference_Error); -- CXB3016 Length : ptrdiff_t; begin if Limit < ptrdiff_t'Last then Length := Virtual_Length (Source, Limit, Terminator); if Length < Limit then Length := Length + 1; -- including nul end if; else -- unlimited Length := Virtual_Length (Source, Terminator) + 1; -- including nul end if; Copy_Array (Source, Target, Length); end Copy_Terminated_Array; procedure Copy_Array ( Source : access constant Element; Target : access Element; Length : ptrdiff_t) is pragma Check (Dynamic_Predicate, Check => Source /= null or else raise Dereference_Error); -- CXB3016 pragma Check (Dynamic_Predicate, Check => Target /= null or else raise Dereference_Error); -- CXB3016 begin if Length > 0 then declare subtype R is Index range Index'First .. Index'Val (Index'Pos (Index'First) + Length - 1); Source_Array : Element_Array (R); for Source_Array'Address use To_Address (Source); Target_Array : Element_Array (R); for Target_Array'Address use To_Address (Target); begin Target_Array := Source_Array; end; end if; end Copy_Array; end Interfaces.C.Pointers;
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <!DOCTYPE boost_serialization> <boost_serialization signature="serialization::archive" version="11"> <syndb class_id="0" tracking_level="0" version="0"> <userIPLatency>-1</userIPLatency> <userIPName></userIPName> <cdfg class_id="1" tracking_level="1" version="0" object_id="_0"> <name>dct_dct_1d</name> <ret_bitwidth>0</ret_bitwidth> <ports class_id="2" tracking_level="0" version="0"> <count>4</count> <item_version>0</item_version> <item class_id="3" tracking_level="1" version="0" object_id="_1"> <Value class_id="4" tracking_level="0" version="0"> <Obj class_id="5" tracking_level="0" version="0"> <type>1</type> <id>1</id> <name>src</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo class_id="6" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>src</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>16</bitwidth> </Value> <direction>0</direction> <if_type>1</if_type> <array_size>64</array_size> <bit_vecs class_id="7" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> <item class_id_reference="3" object_id="_2"> <Value> <Obj> <type>1</type> <id>2</id> <name>tmp_1</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>4</bitwidth> </Value> <direction>0</direction> <if_type>0</if_type> <array_size>0</array_size> <bit_vecs> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> <item class_id_reference="3" object_id="_3"> <Value> <Obj> <type>1</type> <id>3</id> <name>dst</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>dst</originalName> <rtlName></rtlName> <coreName></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> <item class_id_reference="3" object_id="_4"> <Value> <Obj> <type>1</type> <id>4</id> <name>tmp_11</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>4</bitwidth> </Value> <direction>0</direction> <if_type>0</if_type> <array_size>0</array_size> <bit_vecs> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> </ports> <nodes class_id="8" tracking_level="0" version="0"> <count>105</count> <item_version>0</item_version> <item class_id="9" tracking_level="1" version="0" object_id="_5"> <Value> <Obj> <type>0</type> <id>13</id> <name>tmp_11_read</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>4</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>128</item> <item>129</item> </oprand_edges> <opcode>read</opcode> </item> <item class_id_reference="9" object_id="_6"> <Value> <Obj> <type>0</type> <id>14</id> <name>tmp_1_read</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>4</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>130</item> <item>131</item> </oprand_edges> <opcode>read</opcode> </item> <item class_id_reference="9" object_id="_7"> <Value> <Obj> <type>0</type> <id>15</id> <name>tmp_5</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>7</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>133</item> <item>134</item> <item>136</item> </oprand_edges> <opcode>bitconcatenate</opcode> </item> <item class_id_reference="9" object_id="_8"> <Value> <Obj> <type>0</type> <id>16</id> <name>tmp_6</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>61</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item class_id="11" tracking_level="0" version="0"> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</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>dct.cpp</first> <second>dct_1d</second> </first> <second>61</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>64</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>137</item> </oprand_edges> <opcode>zext</opcode> </item> <item class_id_reference="9" object_id="_9"> <Value> <Obj> <type>0</type> <id>17</id> <name>src_addr</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>61</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>61</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>6</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>138</item> <item>140</item> <item>141</item> </oprand_edges> <opcode>getelementptr</opcode> </item> <item class_id_reference="9" object_id="_10"> <Value> <Obj> <type>0</type> <id>18</id> <name>tmp_7</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>7</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>142</item> <item>144</item> </oprand_edges> <opcode>or</opcode> </item> <item class_id_reference="9" object_id="_11"> <Value> <Obj> <type>0</type> <id>19</id> <name>p_addr</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>61</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>61</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>146</item> <item>148</item> <item>149</item> </oprand_edges> <opcode>bitconcatenate</opcode> </item> <item class_id_reference="9" object_id="_12"> <Value> <Obj> <type>0</type> <id>20</id> <name>tmp_9</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>61</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>61</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>64</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>150</item> </oprand_edges> <opcode>zext</opcode> </item> <item class_id_reference="9" object_id="_13"> <Value> <Obj> <type>0</type> <id>21</id> <name>src_addr_1</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>61</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>61</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>6</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>151</item> <item>152</item> <item>153</item> </oprand_edges> <opcode>getelementptr</opcode> </item> <item class_id_reference="9" object_id="_14"> <Value> <Obj> <type>0</type> <id>22</id> <name>tmp_10</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>7</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>154</item> <item>156</item> </oprand_edges> <opcode>or</opcode> </item> <item class_id_reference="9" object_id="_15"> <Value> <Obj> <type>0</type> <id>23</id> <name>p_addr1</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>61</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>61</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>157</item> <item>158</item> <item>159</item> </oprand_edges> <opcode>bitconcatenate</opcode> </item> <item class_id_reference="9" object_id="_16"> <Value> <Obj> <type>0</type> <id>24</id> <name>tmp_12</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>61</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>61</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>64</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>160</item> </oprand_edges> <opcode>zext</opcode> </item> <item class_id_reference="9" object_id="_17"> <Value> <Obj> <type>0</type> <id>25</id> <name>src_addr_2</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>61</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>61</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>6</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>161</item> <item>162</item> <item>163</item> </oprand_edges> <opcode>getelementptr</opcode> </item> <item class_id_reference="9" object_id="_18"> <Value> <Obj> <type>0</type> <id>26</id> <name>tmp_13</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>7</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>164</item> <item>166</item> </oprand_edges> <opcode>or</opcode> </item> <item class_id_reference="9" object_id="_19"> <Value> <Obj> <type>0</type> <id>27</id> <name>p_addr2</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>61</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>61</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>167</item> <item>168</item> <item>169</item> </oprand_edges> <opcode>bitconcatenate</opcode> </item> <item class_id_reference="9" object_id="_20"> <Value> <Obj> <type>0</type> <id>28</id> <name>tmp_14</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>61</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>61</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>64</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>170</item> </oprand_edges> <opcode>zext</opcode> </item> <item class_id_reference="9" object_id="_21"> <Value> <Obj> <type>0</type> <id>29</id> <name>src_addr_3</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>61</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>61</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>6</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>171</item> <item>172</item> <item>173</item> </oprand_edges> <opcode>getelementptr</opcode> </item> <item class_id_reference="9" object_id="_22"> <Value> <Obj> <type>0</type> <id>30</id> <name>tmp_15</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>7</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>174</item> <item>176</item> </oprand_edges> <opcode>or</opcode> </item> <item class_id_reference="9" object_id="_23"> <Value> <Obj> <type>0</type> <id>31</id> <name>p_addr3</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>61</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>61</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>177</item> <item>178</item> <item>179</item> </oprand_edges> <opcode>bitconcatenate</opcode> </item> <item class_id_reference="9" object_id="_24"> <Value> <Obj> <type>0</type> <id>32</id> <name>tmp_16</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>61</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>61</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>64</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>180</item> </oprand_edges> <opcode>zext</opcode> </item> <item class_id_reference="9" object_id="_25"> <Value> <Obj> <type>0</type> <id>33</id> <name>src_addr_4</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>61</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>61</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>6</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>181</item> <item>182</item> <item>183</item> </oprand_edges> <opcode>getelementptr</opcode> </item> <item class_id_reference="9" object_id="_26"> <Value> <Obj> <type>0</type> <id>34</id> <name>tmp_17</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>7</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>184</item> <item>186</item> </oprand_edges> <opcode>or</opcode> </item> <item class_id_reference="9" object_id="_27"> <Value> <Obj> <type>0</type> <id>35</id> <name>p_addr4</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>61</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>61</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>187</item> <item>188</item> <item>189</item> </oprand_edges> <opcode>bitconcatenate</opcode> </item> <item class_id_reference="9" object_id="_28"> <Value> <Obj> <type>0</type> <id>36</id> <name>tmp_18</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>61</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>61</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>64</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>190</item> </oprand_edges> <opcode>zext</opcode> </item> <item class_id_reference="9" object_id="_29"> <Value> <Obj> <type>0</type> <id>37</id> <name>src_addr_5</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>61</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>61</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>6</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>191</item> <item>192</item> <item>193</item> </oprand_edges> <opcode>getelementptr</opcode> </item> <item class_id_reference="9" object_id="_30"> <Value> <Obj> <type>0</type> <id>38</id> <name>tmp_19</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>7</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>194</item> <item>196</item> </oprand_edges> <opcode>or</opcode> </item> <item class_id_reference="9" object_id="_31"> <Value> <Obj> <type>0</type> <id>39</id> <name>p_addr5</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>61</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>61</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>197</item> <item>198</item> <item>199</item> </oprand_edges> <opcode>bitconcatenate</opcode> </item> <item class_id_reference="9" object_id="_32"> <Value> <Obj> <type>0</type> <id>40</id> <name>tmp_20</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>61</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>61</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>64</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>200</item> </oprand_edges> <opcode>zext</opcode> </item> <item class_id_reference="9" object_id="_33"> <Value> <Obj> <type>0</type> <id>41</id> <name>src_addr_6</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>61</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>61</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>6</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>201</item> <item>202</item> <item>203</item> </oprand_edges> <opcode>getelementptr</opcode> </item> <item class_id_reference="9" object_id="_34"> <Value> <Obj> <type>0</type> <id>42</id> <name>tmp_21</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>7</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>204</item> <item>206</item> </oprand_edges> <opcode>or</opcode> </item> <item class_id_reference="9" object_id="_35"> <Value> <Obj> <type>0</type> <id>43</id> <name>p_addr6</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>61</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>61</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>207</item> <item>208</item> <item>209</item> </oprand_edges> <opcode>bitconcatenate</opcode> </item> <item class_id_reference="9" object_id="_36"> <Value> <Obj> <type>0</type> <id>44</id> <name>tmp_22</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>61</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>61</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>64</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>210</item> </oprand_edges> <opcode>zext</opcode> </item> <item class_id_reference="9" object_id="_37"> <Value> <Obj> <type>0</type> <id>45</id> <name>src_addr_7</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>61</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>61</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>6</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>211</item> <item>212</item> <item>213</item> </oprand_edges> <opcode>getelementptr</opcode> </item> <item class_id_reference="9" object_id="_38"> <Value> <Obj> <type>0</type> <id>46</id> <name>tmp_23</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>7</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>214</item> <item>215</item> <item>216</item> </oprand_edges> <opcode>bitconcatenate</opcode> </item> <item class_id_reference="9" object_id="_39"> <Value> <Obj> <type>0</type> <id>47</id> <name>p_addr16_cast</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>57</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>57</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>8</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>217</item> </oprand_edges> <opcode>zext</opcode> </item> <item class_id_reference="9" object_id="_40"> <Value> <Obj> <type>0</type> <id>48</id> <name></name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>57</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>57</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>218</item> </oprand_edges> <opcode>br</opcode> </item> <item class_id_reference="9" object_id="_41"> <Value> <Obj> <type>0</type> <id>50</id> <name>k</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>k</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>4</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>220</item> <item>221</item> <item>222</item> <item>223</item> </oprand_edges> <opcode>phi</opcode> </item> <item class_id_reference="9" object_id="_42"> <Value> <Obj> <type>0</type> <id>51</id> <name>exitcond1</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>57</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>57</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>1</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>224</item> <item>226</item> </oprand_edges> <opcode>icmp</opcode> </item> <item class_id_reference="9" object_id="_43"> <Value> <Obj> <type>0</type> <id>52</id> <name>k_1</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>57</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>57</second> </item> </second> </item> </inlineStackInfo> <originalName>k</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>4</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>227</item> <item>229</item> </oprand_edges> <opcode>add</opcode> </item> <item class_id_reference="9" object_id="_44"> <Value> <Obj> <type>0</type> <id>53</id> <name></name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>57</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>57</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>230</item> <item>231</item> <item>232</item> </oprand_edges> <opcode>br</opcode> </item> <item class_id_reference="9" object_id="_45"> <Value> <Obj> <type>0</type> <id>59</id> <name>tmp</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>60</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>60</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>64</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>233</item> </oprand_edges> <opcode>zext</opcode> </item> <item class_id_reference="9" object_id="_46"> <Value> <Obj> <type>0</type> <id>60</id> <name>dct_coeff_table_0_addr</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>60</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>60</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>3</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>234</item> <item>235</item> <item>236</item> </oprand_edges> <opcode>getelementptr</opcode> </item> <item class_id_reference="9" object_id="_47"> <Value> <Obj> <type>0</type> <id>61</id> <name>dct_coeff_table_0_load</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>60</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>60</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>14</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>237</item> </oprand_edges> <opcode>load</opcode> </item> <item class_id_reference="9" object_id="_48"> <Value> <Obj> <type>0</type> <id>62</id> <name>coeff_cast</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>61</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>61</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>29</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>238</item> </oprand_edges> <opcode>zext</opcode> </item> <item class_id_reference="9" object_id="_49"> <Value> <Obj> <type>0</type> <id>63</id> <name>src_load</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>61</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>61</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>16</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>239</item> </oprand_edges> <opcode>load</opcode> </item> <item class_id_reference="9" object_id="_50"> <Value> <Obj> <type>0</type> <id>64</id> <name>tmp_7_cast</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>61</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>61</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>29</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>240</item> </oprand_edges> <opcode>sext</opcode> </item> <item class_id_reference="9" object_id="_51"> <Value> <Obj> <type>0</type> <id>65</id> <name>tmp_8</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>61</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>61</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>29</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>241</item> <item>242</item> </oprand_edges> <opcode>mul</opcode> </item> <item class_id_reference="9" object_id="_52"> <Value> <Obj> <type>0</type> <id>66</id> <name>dct_coeff_table_1_addr</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>60</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>60</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>3</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>243</item> <item>244</item> <item>245</item> </oprand_edges> <opcode>getelementptr</opcode> </item> <item class_id_reference="9" object_id="_53"> <Value> <Obj> <type>0</type> <id>67</id> <name>dct_coeff_table_1_load</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>60</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>60</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>15</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>246</item> </oprand_edges> <opcode>load</opcode> </item> <item class_id_reference="9" object_id="_54"> <Value> <Obj> <type>0</type> <id>68</id> <name>coeff_1_cast</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>61</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>61</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>29</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>247</item> </oprand_edges> <opcode>sext</opcode> </item> <item class_id_reference="9" object_id="_55"> <Value> <Obj> <type>0</type> <id>69</id> <name>src_load_1</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>61</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>61</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>16</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>248</item> </oprand_edges> <opcode>load</opcode> </item> <item class_id_reference="9" object_id="_56"> <Value> <Obj> <type>0</type> <id>70</id> <name>tmp_7_1_cast</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>61</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>61</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>29</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>249</item> </oprand_edges> <opcode>sext</opcode> </item> <item class_id_reference="9" object_id="_57"> <Value> <Obj> <type>0</type> <id>71</id> <name>tmp_8_1</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>61</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>61</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>29</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>250</item> <item>251</item> </oprand_edges> <opcode>mul</opcode> </item> <item class_id_reference="9" object_id="_58"> <Value> <Obj> <type>0</type> <id>72</id> <name>dct_coeff_table_2_addr</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>60</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>60</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>3</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>252</item> <item>253</item> <item>254</item> </oprand_edges> <opcode>getelementptr</opcode> </item> <item class_id_reference="9" object_id="_59"> <Value> <Obj> <type>0</type> <id>73</id> <name>dct_coeff_table_2_load</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>60</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>60</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>15</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>255</item> </oprand_edges> <opcode>load</opcode> </item> <item class_id_reference="9" object_id="_60"> <Value> <Obj> <type>0</type> <id>74</id> <name>coeff_2_cast</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>61</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>61</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>29</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>256</item> </oprand_edges> <opcode>sext</opcode> </item> <item class_id_reference="9" object_id="_61"> <Value> <Obj> <type>0</type> <id>75</id> <name>src_load_2</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>61</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>61</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>16</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>257</item> </oprand_edges> <opcode>load</opcode> </item> <item class_id_reference="9" object_id="_62"> <Value> <Obj> <type>0</type> <id>76</id> <name>tmp_7_2_cast</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>61</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>61</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>29</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>258</item> </oprand_edges> <opcode>sext</opcode> </item> <item class_id_reference="9" object_id="_63"> <Value> <Obj> <type>0</type> <id>77</id> <name>tmp_8_2</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>61</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>61</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></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>mul</opcode> </item> <item class_id_reference="9" object_id="_64"> <Value> <Obj> <type>0</type> <id>78</id> <name>dct_coeff_table_3_addr</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>60</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>60</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>3</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>261</item> <item>262</item> <item>263</item> </oprand_edges> <opcode>getelementptr</opcode> </item> <item class_id_reference="9" object_id="_65"> <Value> <Obj> <type>0</type> <id>79</id> <name>dct_coeff_table_3_load</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>60</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>60</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>15</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>264</item> </oprand_edges> <opcode>load</opcode> </item> <item class_id_reference="9" object_id="_66"> <Value> <Obj> <type>0</type> <id>80</id> <name>coeff_3_cast</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>61</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>61</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>29</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>265</item> </oprand_edges> <opcode>sext</opcode> </item> <item class_id_reference="9" object_id="_67"> <Value> <Obj> <type>0</type> <id>81</id> <name>src_load_3</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>61</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>61</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>16</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>266</item> </oprand_edges> <opcode>load</opcode> </item> <item class_id_reference="9" object_id="_68"> <Value> <Obj> <type>0</type> <id>82</id> <name>tmp_7_3_cast</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>61</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>61</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>29</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>267</item> </oprand_edges> <opcode>sext</opcode> </item> <item class_id_reference="9" object_id="_69"> <Value> <Obj> <type>0</type> <id>83</id> <name>tmp_8_3</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>61</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>61</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>29</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>268</item> <item>269</item> </oprand_edges> <opcode>mul</opcode> </item> <item class_id_reference="9" object_id="_70"> <Value> <Obj> <type>0</type> <id>84</id> <name>dct_coeff_table_4_addr</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>60</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>60</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>3</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>270</item> <item>271</item> <item>272</item> </oprand_edges> <opcode>getelementptr</opcode> </item> <item class_id_reference="9" object_id="_71"> <Value> <Obj> <type>0</type> <id>85</id> <name>dct_coeff_table_4_load</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>60</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>60</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>15</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>273</item> </oprand_edges> <opcode>load</opcode> </item> <item class_id_reference="9" object_id="_72"> <Value> <Obj> <type>0</type> <id>86</id> <name>coeff_4_cast</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>61</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>61</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>29</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>274</item> </oprand_edges> <opcode>sext</opcode> </item> <item class_id_reference="9" object_id="_73"> <Value> <Obj> <type>0</type> <id>87</id> <name>src_load_4</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>61</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>61</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>16</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>275</item> </oprand_edges> <opcode>load</opcode> </item> <item class_id_reference="9" object_id="_74"> <Value> <Obj> <type>0</type> <id>88</id> <name>tmp_7_4_cast</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>61</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>61</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>29</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>276</item> </oprand_edges> <opcode>sext</opcode> </item> <item class_id_reference="9" object_id="_75"> <Value> <Obj> <type>0</type> <id>89</id> <name>tmp_8_4</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>61</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>61</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>29</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>277</item> <item>278</item> </oprand_edges> <opcode>mul</opcode> </item> <item class_id_reference="9" object_id="_76"> <Value> <Obj> <type>0</type> <id>90</id> <name>dct_coeff_table_5_addr</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>60</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>60</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>3</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>279</item> <item>280</item> <item>281</item> </oprand_edges> <opcode>getelementptr</opcode> </item> <item class_id_reference="9" object_id="_77"> <Value> <Obj> <type>0</type> <id>91</id> <name>dct_coeff_table_5_load</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>60</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>60</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>15</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>282</item> </oprand_edges> <opcode>load</opcode> </item> <item class_id_reference="9" object_id="_78"> <Value> <Obj> <type>0</type> <id>92</id> <name>coeff_5_cast</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>61</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>61</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>29</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>283</item> </oprand_edges> <opcode>sext</opcode> </item> <item class_id_reference="9" object_id="_79"> <Value> <Obj> <type>0</type> <id>93</id> <name>src_load_5</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>61</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>61</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>16</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>284</item> </oprand_edges> <opcode>load</opcode> </item> <item class_id_reference="9" object_id="_80"> <Value> <Obj> <type>0</type> <id>94</id> <name>tmp_7_5_cast</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>61</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>61</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>29</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>285</item> </oprand_edges> <opcode>sext</opcode> </item> <item class_id_reference="9" object_id="_81"> <Value> <Obj> <type>0</type> <id>95</id> <name>tmp_8_5</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>61</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>61</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>29</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>286</item> <item>287</item> </oprand_edges> <opcode>mul</opcode> </item> <item class_id_reference="9" object_id="_82"> <Value> <Obj> <type>0</type> <id>96</id> <name>dct_coeff_table_6_addr</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>60</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>60</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>3</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>288</item> <item>289</item> <item>290</item> </oprand_edges> <opcode>getelementptr</opcode> </item> <item class_id_reference="9" object_id="_83"> <Value> <Obj> <type>0</type> <id>97</id> <name>dct_coeff_table_6_load</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>60</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>60</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>15</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>291</item> </oprand_edges> <opcode>load</opcode> </item> <item class_id_reference="9" object_id="_84"> <Value> <Obj> <type>0</type> <id>98</id> <name>coeff_6_cast</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>61</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>61</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>29</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>292</item> </oprand_edges> <opcode>sext</opcode> </item> <item class_id_reference="9" object_id="_85"> <Value> <Obj> <type>0</type> <id>99</id> <name>src_load_6</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>61</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>61</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>16</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>293</item> </oprand_edges> <opcode>load</opcode> </item> <item class_id_reference="9" object_id="_86"> <Value> <Obj> <type>0</type> <id>100</id> <name>tmp_7_6_cast</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>61</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>61</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>29</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>294</item> </oprand_edges> <opcode>sext</opcode> </item> <item class_id_reference="9" object_id="_87"> <Value> <Obj> <type>0</type> <id>101</id> <name>tmp_8_6</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>61</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>61</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>29</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>295</item> <item>296</item> </oprand_edges> <opcode>mul</opcode> </item> <item class_id_reference="9" object_id="_88"> <Value> <Obj> <type>0</type> <id>102</id> <name>dct_coeff_table_7_addr</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>60</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>60</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>3</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>297</item> <item>298</item> <item>299</item> </oprand_edges> <opcode>getelementptr</opcode> </item> <item class_id_reference="9" object_id="_89"> <Value> <Obj> <type>0</type> <id>103</id> <name>dct_coeff_table_7_load</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>60</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>60</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>15</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>300</item> </oprand_edges> <opcode>load</opcode> </item> <item class_id_reference="9" object_id="_90"> <Value> <Obj> <type>0</type> <id>104</id> <name>coeff_7_cast</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>61</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>61</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>29</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>301</item> </oprand_edges> <opcode>sext</opcode> </item> <item class_id_reference="9" object_id="_91"> <Value> <Obj> <type>0</type> <id>105</id> <name>src_load_7</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>61</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>61</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>16</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>302</item> </oprand_edges> <opcode>load</opcode> </item> <item class_id_reference="9" object_id="_92"> <Value> <Obj> <type>0</type> <id>106</id> <name>tmp_7_7_cast</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>61</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>61</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>29</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>303</item> </oprand_edges> <opcode>sext</opcode> </item> <item class_id_reference="9" object_id="_93"> <Value> <Obj> <type>0</type> <id>107</id> <name>tmp_8_7</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>61</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>61</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>29</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>304</item> <item>305</item> </oprand_edges> <opcode>mul</opcode> </item> <item class_id_reference="9" object_id="_94"> <Value> <Obj> <type>0</type> <id>108</id> <name>tmp2</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>63</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>63</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>29</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>306</item> <item>307</item> </oprand_edges> <opcode>add</opcode> </item> <item class_id_reference="9" object_id="_95"> <Value> <Obj> <type>0</type> <id>109</id> <name>tmp3</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>63</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>63</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>29</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>308</item> <item>309</item> </oprand_edges> <opcode>add</opcode> </item> <item class_id_reference="9" object_id="_96"> <Value> <Obj> <type>0</type> <id>110</id> <name>tmp1</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>63</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>63</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>29</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>310</item> <item>311</item> </oprand_edges> <opcode>add</opcode> </item> <item class_id_reference="9" object_id="_97"> <Value> <Obj> <type>0</type> <id>111</id> <name>tmp5</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>63</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>63</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>29</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>312</item> <item>313</item> </oprand_edges> <opcode>add</opcode> </item> <item class_id_reference="9" object_id="_98"> <Value> <Obj> <type>0</type> <id>112</id> <name>tmp7</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>63</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>63</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>29</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>314</item> <item>316</item> </oprand_edges> <opcode>add</opcode> </item> <item class_id_reference="9" object_id="_99"> <Value> <Obj> <type>0</type> <id>113</id> <name>tmp6</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>63</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>63</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>29</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>317</item> <item>318</item> </oprand_edges> <opcode>add</opcode> </item> <item class_id_reference="9" object_id="_100"> <Value> <Obj> <type>0</type> <id>114</id> <name>tmp4</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>63</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>63</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>29</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>319</item> <item>320</item> </oprand_edges> <opcode>add</opcode> </item> <item class_id_reference="9" object_id="_101"> <Value> <Obj> <type>0</type> <id>115</id> <name>tmp_2</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>63</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>63</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>29</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>321</item> <item>322</item> </oprand_edges> <opcode>add</opcode> </item> <item class_id_reference="9" object_id="_102"> <Value> <Obj> <type>0</type> <id>116</id> <name>tmp_4</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>63</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>63</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>16</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>324</item> <item>325</item> <item>327</item> <item>329</item> </oprand_edges> <opcode>partselect</opcode> </item> <item class_id_reference="9" object_id="_103"> <Value> <Obj> <type>0</type> <id>117</id> <name>tmp_trn_cast</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>63</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>63</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>8</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>330</item> </oprand_edges> <opcode>zext</opcode> </item> <item class_id_reference="9" object_id="_104"> <Value> <Obj> <type>0</type> <id>118</id> <name>p_addr7</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>63</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>63</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>8</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>331</item> <item>332</item> </oprand_edges> <opcode>add</opcode> </item> <item class_id_reference="9" object_id="_105"> <Value> <Obj> <type>0</type> <id>119</id> <name>tmp_24</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>63</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>63</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>64</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>333</item> </oprand_edges> <opcode>zext</opcode> </item> <item class_id_reference="9" object_id="_106"> <Value> <Obj> <type>0</type> <id>120</id> <name>dst_addr</name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>63</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>63</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>6</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>334</item> <item>335</item> <item>336</item> </oprand_edges> <opcode>getelementptr</opcode> </item> <item class_id_reference="9" object_id="_107"> <Value> <Obj> <type>0</type> <id>121</id> <name></name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>63</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>63</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>337</item> <item>338</item> </oprand_edges> <opcode>store</opcode> </item> <item class_id_reference="9" object_id="_108"> <Value> <Obj> <type>0</type> <id>123</id> <name></name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>57</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>57</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>339</item> </oprand_edges> <opcode>br</opcode> </item> <item class_id_reference="9" object_id="_109"> <Value> <Obj> <type>0</type> <id>125</id> <name></name> <fileName>dct.cpp</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</fileDirectory> <lineNumber>65</lineNumber> <contextFuncName>dct_1d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_1d</second> </first> <second>65</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>0</count> <item_version>0</item_version> </oprand_edges> <opcode>ret</opcode> </item> </nodes> <consts class_id="15" tracking_level="0" version="0"> <count>16</count> <item_version>0</item_version> <item class_id="16" tracking_level="1" version="0" object_id="_110"> <Value> <Obj> <type>2</type> <id>135</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>3</bitwidth> </Value> <const_type>0</const_type> <content>0</content> </item> <item class_id_reference="16" object_id="_111"> <Value> <Obj> <type>2</type> <id>139</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>64</bitwidth> </Value> <const_type>0</const_type> <content>0</content> </item> <item class_id_reference="16" object_id="_112"> <Value> <Obj> <type>2</type> <id>143</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>7</bitwidth> </Value> <const_type>0</const_type> <content>1</content> </item> <item class_id_reference="16" object_id="_113"> <Value> <Obj> <type>2</type> <id>147</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>25</bitwidth> </Value> <const_type>0</const_type> <content>0</content> </item> <item class_id_reference="16" object_id="_114"> <Value> <Obj> <type>2</type> <id>155</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>7</bitwidth> </Value> <const_type>0</const_type> <content>2</content> </item> <item class_id_reference="16" object_id="_115"> <Value> <Obj> <type>2</type> <id>165</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>7</bitwidth> </Value> <const_type>0</const_type> <content>3</content> </item> <item class_id_reference="16" object_id="_116"> <Value> <Obj> <type>2</type> <id>175</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>7</bitwidth> </Value> <const_type>0</const_type> <content>4</content> </item> <item class_id_reference="16" object_id="_117"> <Value> <Obj> <type>2</type> <id>185</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>7</bitwidth> </Value> <const_type>0</const_type> <content>5</content> </item> <item class_id_reference="16" object_id="_118"> <Value> <Obj> <type>2</type> <id>195</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>7</bitwidth> </Value> <const_type>0</const_type> <content>6</content> </item> <item class_id_reference="16" object_id="_119"> <Value> <Obj> <type>2</type> <id>205</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>7</bitwidth> </Value> <const_type>0</const_type> <content>7</content> </item> <item class_id_reference="16" object_id="_120"> <Value> <Obj> <type>2</type> <id>219</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>4</bitwidth> </Value> <const_type>0</const_type> <content>0</content> </item> <item class_id_reference="16" object_id="_121"> <Value> <Obj> <type>2</type> <id>225</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>4</bitwidth> </Value> <const_type>0</const_type> <content>8</content> </item> <item class_id_reference="16" object_id="_122"> <Value> <Obj> <type>2</type> <id>228</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>4</bitwidth> </Value> <const_type>0</const_type> <content>1</content> </item> <item class_id_reference="16" object_id="_123"> <Value> <Obj> <type>2</type> <id>315</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>29</bitwidth> </Value> <const_type>0</const_type> <content>4096</content> </item> <item class_id_reference="16" object_id="_124"> <Value> <Obj> <type>2</type> <id>326</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <const_type>0</const_type> <content>13</content> </item> <item class_id_reference="16" object_id="_125"> <Value> <Obj> <type>2</type> <id>328</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <const_type>0</const_type> <content>28</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="_126"> <Obj> <type>3</type> <id>49</id> <name></name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>36</count> <item_version>0</item_version> <item>13</item> <item>14</item> <item>15</item> <item>16</item> <item>17</item> <item>18</item> <item>19</item> <item>20</item> <item>21</item> <item>22</item> <item>23</item> <item>24</item> <item>25</item> <item>26</item> <item>27</item> <item>28</item> <item>29</item> <item>30</item> <item>31</item> <item>32</item> <item>33</item> <item>34</item> <item>35</item> <item>36</item> <item>37</item> <item>38</item> <item>39</item> <item>40</item> <item>41</item> <item>42</item> <item>43</item> <item>44</item> <item>45</item> <item>46</item> <item>47</item> <item>48</item> </node_objs> </item> <item class_id_reference="18" object_id="_127"> <Obj> <type>3</type> <id>54</id> <name></name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>4</count> <item_version>0</item_version> <item>50</item> <item>51</item> <item>52</item> <item>53</item> </node_objs> </item> <item class_id_reference="18" object_id="_128"> <Obj> <type>3</type> <id>124</id> <name></name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>64</count> <item_version>0</item_version> <item>59</item> <item>60</item> <item>61</item> <item>62</item> <item>63</item> <item>64</item> <item>65</item> <item>66</item> <item>67</item> <item>68</item> <item>69</item> <item>70</item> <item>71</item> <item>72</item> <item>73</item> <item>74</item> <item>75</item> <item>76</item> <item>77</item> <item>78</item> <item>79</item> <item>80</item> <item>81</item> <item>82</item> <item>83</item> <item>84</item> <item>85</item> <item>86</item> <item>87</item> <item>88</item> <item>89</item> <item>90</item> <item>91</item> <item>92</item> <item>93</item> <item>94</item> <item>95</item> <item>96</item> <item>97</item> <item>98</item> <item>99</item> <item>100</item> <item>101</item> <item>102</item> <item>103</item> <item>104</item> <item>105</item> <item>106</item> <item>107</item> <item>108</item> <item>109</item> <item>110</item> <item>111</item> <item>112</item> <item>113</item> <item>114</item> <item>115</item> <item>116</item> <item>117</item> <item>118</item> <item>119</item> <item>120</item> <item>121</item> <item>123</item> </node_objs> </item> <item class_id_reference="18" object_id="_129"> <Obj> <type>3</type> <id>126</id> <name></name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>1</count> <item_version>0</item_version> <item>125</item> </node_objs> </item> </blocks> <edges class_id="19" tracking_level="0" version="0"> <count>185</count> <item_version>0</item_version> <item class_id="20" tracking_level="1" version="0" object_id="_130"> <id>129</id> <edge_type>1</edge_type> <source_obj>4</source_obj> <sink_obj>13</sink_obj> </item> <item class_id_reference="20" object_id="_131"> <id>131</id> <edge_type>1</edge_type> <source_obj>2</source_obj> <sink_obj>14</sink_obj> </item> <item class_id_reference="20" object_id="_132"> <id>134</id> <edge_type>1</edge_type> <source_obj>14</source_obj> <sink_obj>15</sink_obj> </item> <item class_id_reference="20" object_id="_133"> <id>136</id> <edge_type>1</edge_type> <source_obj>135</source_obj> <sink_obj>15</sink_obj> </item> <item class_id_reference="20" object_id="_134"> <id>137</id> <edge_type>1</edge_type> <source_obj>15</source_obj> <sink_obj>16</sink_obj> </item> <item class_id_reference="20" object_id="_135"> <id>138</id> <edge_type>1</edge_type> <source_obj>1</source_obj> <sink_obj>17</sink_obj> </item> <item class_id_reference="20" object_id="_136"> <id>140</id> <edge_type>1</edge_type> <source_obj>139</source_obj> <sink_obj>17</sink_obj> </item> <item class_id_reference="20" object_id="_137"> <id>141</id> <edge_type>1</edge_type> <source_obj>16</source_obj> <sink_obj>17</sink_obj> </item> <item class_id_reference="20" object_id="_138"> <id>142</id> <edge_type>1</edge_type> <source_obj>15</source_obj> <sink_obj>18</sink_obj> </item> <item class_id_reference="20" object_id="_139"> <id>144</id> <edge_type>1</edge_type> <source_obj>143</source_obj> <sink_obj>18</sink_obj> </item> <item class_id_reference="20" object_id="_140"> <id>148</id> <edge_type>1</edge_type> <source_obj>147</source_obj> <sink_obj>19</sink_obj> </item> <item class_id_reference="20" object_id="_141"> <id>149</id> <edge_type>1</edge_type> <source_obj>18</source_obj> <sink_obj>19</sink_obj> </item> <item class_id_reference="20" object_id="_142"> <id>150</id> <edge_type>1</edge_type> <source_obj>19</source_obj> <sink_obj>20</sink_obj> </item> <item class_id_reference="20" object_id="_143"> <id>151</id> <edge_type>1</edge_type> <source_obj>1</source_obj> <sink_obj>21</sink_obj> </item> <item class_id_reference="20" object_id="_144"> <id>152</id> <edge_type>1</edge_type> <source_obj>139</source_obj> <sink_obj>21</sink_obj> </item> <item class_id_reference="20" object_id="_145"> <id>153</id> <edge_type>1</edge_type> <source_obj>20</source_obj> <sink_obj>21</sink_obj> </item> <item class_id_reference="20" object_id="_146"> <id>154</id> <edge_type>1</edge_type> <source_obj>15</source_obj> <sink_obj>22</sink_obj> </item> <item class_id_reference="20" object_id="_147"> <id>156</id> <edge_type>1</edge_type> <source_obj>155</source_obj> <sink_obj>22</sink_obj> </item> <item class_id_reference="20" object_id="_148"> <id>158</id> <edge_type>1</edge_type> <source_obj>147</source_obj> <sink_obj>23</sink_obj> </item> <item class_id_reference="20" object_id="_149"> <id>159</id> <edge_type>1</edge_type> <source_obj>22</source_obj> <sink_obj>23</sink_obj> </item> <item class_id_reference="20" object_id="_150"> <id>160</id> <edge_type>1</edge_type> <source_obj>23</source_obj> <sink_obj>24</sink_obj> </item> <item class_id_reference="20" object_id="_151"> <id>161</id> <edge_type>1</edge_type> <source_obj>1</source_obj> <sink_obj>25</sink_obj> </item> <item class_id_reference="20" object_id="_152"> <id>162</id> <edge_type>1</edge_type> <source_obj>139</source_obj> <sink_obj>25</sink_obj> </item> <item class_id_reference="20" object_id="_153"> <id>163</id> <edge_type>1</edge_type> <source_obj>24</source_obj> <sink_obj>25</sink_obj> </item> <item class_id_reference="20" object_id="_154"> <id>164</id> <edge_type>1</edge_type> <source_obj>15</source_obj> <sink_obj>26</sink_obj> </item> <item class_id_reference="20" object_id="_155"> <id>166</id> <edge_type>1</edge_type> <source_obj>165</source_obj> <sink_obj>26</sink_obj> </item> <item class_id_reference="20" object_id="_156"> <id>168</id> <edge_type>1</edge_type> <source_obj>147</source_obj> <sink_obj>27</sink_obj> </item> <item class_id_reference="20" object_id="_157"> <id>169</id> <edge_type>1</edge_type> <source_obj>26</source_obj> <sink_obj>27</sink_obj> </item> <item class_id_reference="20" object_id="_158"> <id>170</id> <edge_type>1</edge_type> <source_obj>27</source_obj> <sink_obj>28</sink_obj> </item> <item class_id_reference="20" object_id="_159"> <id>171</id> <edge_type>1</edge_type> <source_obj>1</source_obj> <sink_obj>29</sink_obj> </item> <item class_id_reference="20" object_id="_160"> <id>172</id> <edge_type>1</edge_type> <source_obj>139</source_obj> <sink_obj>29</sink_obj> </item> <item class_id_reference="20" object_id="_161"> <id>173</id> <edge_type>1</edge_type> <source_obj>28</source_obj> <sink_obj>29</sink_obj> </item> <item class_id_reference="20" object_id="_162"> <id>174</id> <edge_type>1</edge_type> <source_obj>15</source_obj> <sink_obj>30</sink_obj> </item> <item class_id_reference="20" object_id="_163"> <id>176</id> <edge_type>1</edge_type> <source_obj>175</source_obj> <sink_obj>30</sink_obj> </item> <item class_id_reference="20" object_id="_164"> <id>178</id> <edge_type>1</edge_type> <source_obj>147</source_obj> <sink_obj>31</sink_obj> </item> <item class_id_reference="20" object_id="_165"> <id>179</id> <edge_type>1</edge_type> <source_obj>30</source_obj> <sink_obj>31</sink_obj> </item> <item class_id_reference="20" object_id="_166"> <id>180</id> <edge_type>1</edge_type> <source_obj>31</source_obj> <sink_obj>32</sink_obj> </item> <item class_id_reference="20" object_id="_167"> <id>181</id> <edge_type>1</edge_type> <source_obj>1</source_obj> <sink_obj>33</sink_obj> </item> <item class_id_reference="20" object_id="_168"> <id>182</id> <edge_type>1</edge_type> <source_obj>139</source_obj> <sink_obj>33</sink_obj> </item> <item class_id_reference="20" object_id="_169"> <id>183</id> <edge_type>1</edge_type> <source_obj>32</source_obj> <sink_obj>33</sink_obj> </item> <item class_id_reference="20" object_id="_170"> <id>184</id> <edge_type>1</edge_type> <source_obj>15</source_obj> <sink_obj>34</sink_obj> </item> <item class_id_reference="20" object_id="_171"> <id>186</id> <edge_type>1</edge_type> <source_obj>185</source_obj> <sink_obj>34</sink_obj> </item> <item class_id_reference="20" object_id="_172"> <id>188</id> <edge_type>1</edge_type> <source_obj>147</source_obj> <sink_obj>35</sink_obj> </item> <item class_id_reference="20" object_id="_173"> <id>189</id> <edge_type>1</edge_type> <source_obj>34</source_obj> <sink_obj>35</sink_obj> </item> <item class_id_reference="20" object_id="_174"> <id>190</id> <edge_type>1</edge_type> <source_obj>35</source_obj> <sink_obj>36</sink_obj> </item> <item class_id_reference="20" object_id="_175"> <id>191</id> <edge_type>1</edge_type> <source_obj>1</source_obj> <sink_obj>37</sink_obj> </item> <item class_id_reference="20" object_id="_176"> <id>192</id> <edge_type>1</edge_type> <source_obj>139</source_obj> <sink_obj>37</sink_obj> </item> <item class_id_reference="20" object_id="_177"> <id>193</id> <edge_type>1</edge_type> <source_obj>36</source_obj> <sink_obj>37</sink_obj> </item> <item class_id_reference="20" object_id="_178"> <id>194</id> <edge_type>1</edge_type> <source_obj>15</source_obj> <sink_obj>38</sink_obj> </item> <item class_id_reference="20" object_id="_179"> <id>196</id> <edge_type>1</edge_type> <source_obj>195</source_obj> <sink_obj>38</sink_obj> </item> <item class_id_reference="20" object_id="_180"> <id>198</id> <edge_type>1</edge_type> <source_obj>147</source_obj> <sink_obj>39</sink_obj> </item> <item class_id_reference="20" object_id="_181"> <id>199</id> <edge_type>1</edge_type> <source_obj>38</source_obj> <sink_obj>39</sink_obj> </item> <item class_id_reference="20" object_id="_182"> <id>200</id> <edge_type>1</edge_type> <source_obj>39</source_obj> <sink_obj>40</sink_obj> </item> <item class_id_reference="20" object_id="_183"> <id>201</id> <edge_type>1</edge_type> <source_obj>1</source_obj> <sink_obj>41</sink_obj> </item> <item class_id_reference="20" object_id="_184"> <id>202</id> <edge_type>1</edge_type> <source_obj>139</source_obj> <sink_obj>41</sink_obj> </item> <item class_id_reference="20" object_id="_185"> <id>203</id> <edge_type>1</edge_type> <source_obj>40</source_obj> <sink_obj>41</sink_obj> </item> <item class_id_reference="20" object_id="_186"> <id>204</id> <edge_type>1</edge_type> <source_obj>15</source_obj> <sink_obj>42</sink_obj> </item> <item class_id_reference="20" object_id="_187"> <id>206</id> <edge_type>1</edge_type> <source_obj>205</source_obj> <sink_obj>42</sink_obj> </item> <item class_id_reference="20" object_id="_188"> <id>208</id> <edge_type>1</edge_type> <source_obj>147</source_obj> <sink_obj>43</sink_obj> </item> <item class_id_reference="20" object_id="_189"> <id>209</id> <edge_type>1</edge_type> <source_obj>42</source_obj> <sink_obj>43</sink_obj> </item> <item class_id_reference="20" object_id="_190"> <id>210</id> <edge_type>1</edge_type> <source_obj>43</source_obj> <sink_obj>44</sink_obj> </item> <item class_id_reference="20" object_id="_191"> <id>211</id> <edge_type>1</edge_type> <source_obj>1</source_obj> <sink_obj>45</sink_obj> </item> <item class_id_reference="20" object_id="_192"> <id>212</id> <edge_type>1</edge_type> <source_obj>139</source_obj> <sink_obj>45</sink_obj> </item> <item class_id_reference="20" object_id="_193"> <id>213</id> <edge_type>1</edge_type> <source_obj>44</source_obj> <sink_obj>45</sink_obj> </item> <item class_id_reference="20" object_id="_194"> <id>215</id> <edge_type>1</edge_type> <source_obj>13</source_obj> <sink_obj>46</sink_obj> </item> <item class_id_reference="20" object_id="_195"> <id>216</id> <edge_type>1</edge_type> <source_obj>135</source_obj> <sink_obj>46</sink_obj> </item> <item class_id_reference="20" object_id="_196"> <id>217</id> <edge_type>1</edge_type> <source_obj>46</source_obj> <sink_obj>47</sink_obj> </item> <item class_id_reference="20" object_id="_197"> <id>218</id> <edge_type>2</edge_type> <source_obj>54</source_obj> <sink_obj>48</sink_obj> </item> <item class_id_reference="20" object_id="_198"> <id>220</id> <edge_type>1</edge_type> <source_obj>219</source_obj> <sink_obj>50</sink_obj> </item> <item class_id_reference="20" object_id="_199"> <id>221</id> <edge_type>2</edge_type> <source_obj>49</source_obj> <sink_obj>50</sink_obj> </item> <item class_id_reference="20" object_id="_200"> <id>222</id> <edge_type>1</edge_type> <source_obj>52</source_obj> <sink_obj>50</sink_obj> </item> <item class_id_reference="20" object_id="_201"> <id>223</id> <edge_type>2</edge_type> <source_obj>124</source_obj> <sink_obj>50</sink_obj> </item> <item class_id_reference="20" object_id="_202"> <id>224</id> <edge_type>1</edge_type> <source_obj>50</source_obj> <sink_obj>51</sink_obj> </item> <item class_id_reference="20" object_id="_203"> <id>226</id> <edge_type>1</edge_type> <source_obj>225</source_obj> <sink_obj>51</sink_obj> </item> <item class_id_reference="20" object_id="_204"> <id>227</id> <edge_type>1</edge_type> <source_obj>50</source_obj> <sink_obj>52</sink_obj> </item> <item class_id_reference="20" object_id="_205"> <id>229</id> <edge_type>1</edge_type> <source_obj>228</source_obj> <sink_obj>52</sink_obj> </item> <item class_id_reference="20" object_id="_206"> <id>230</id> <edge_type>1</edge_type> <source_obj>51</source_obj> <sink_obj>53</sink_obj> </item> <item class_id_reference="20" object_id="_207"> <id>231</id> <edge_type>2</edge_type> <source_obj>124</source_obj> <sink_obj>53</sink_obj> </item> <item class_id_reference="20" object_id="_208"> <id>232</id> <edge_type>2</edge_type> <source_obj>126</source_obj> <sink_obj>53</sink_obj> </item> <item class_id_reference="20" object_id="_209"> <id>233</id> <edge_type>1</edge_type> <source_obj>50</source_obj> <sink_obj>59</sink_obj> </item> <item class_id_reference="20" object_id="_210"> <id>234</id> <edge_type>1</edge_type> <source_obj>5</source_obj> <sink_obj>60</sink_obj> </item> <item class_id_reference="20" object_id="_211"> <id>235</id> <edge_type>1</edge_type> <source_obj>139</source_obj> <sink_obj>60</sink_obj> </item> <item class_id_reference="20" object_id="_212"> <id>236</id> <edge_type>1</edge_type> <source_obj>59</source_obj> <sink_obj>60</sink_obj> </item> <item class_id_reference="20" object_id="_213"> <id>237</id> <edge_type>1</edge_type> <source_obj>60</source_obj> <sink_obj>61</sink_obj> </item> <item class_id_reference="20" object_id="_214"> <id>238</id> <edge_type>1</edge_type> <source_obj>61</source_obj> <sink_obj>62</sink_obj> </item> <item class_id_reference="20" object_id="_215"> <id>239</id> <edge_type>1</edge_type> <source_obj>17</source_obj> <sink_obj>63</sink_obj> </item> <item class_id_reference="20" object_id="_216"> <id>240</id> <edge_type>1</edge_type> <source_obj>63</source_obj> <sink_obj>64</sink_obj> </item> <item class_id_reference="20" object_id="_217"> <id>241</id> <edge_type>1</edge_type> <source_obj>64</source_obj> <sink_obj>65</sink_obj> </item> <item class_id_reference="20" object_id="_218"> <id>242</id> <edge_type>1</edge_type> <source_obj>62</source_obj> <sink_obj>65</sink_obj> </item> <item class_id_reference="20" object_id="_219"> <id>243</id> <edge_type>1</edge_type> <source_obj>6</source_obj> <sink_obj>66</sink_obj> </item> <item class_id_reference="20" object_id="_220"> <id>244</id> <edge_type>1</edge_type> <source_obj>139</source_obj> <sink_obj>66</sink_obj> </item> <item class_id_reference="20" object_id="_221"> <id>245</id> <edge_type>1</edge_type> <source_obj>59</source_obj> <sink_obj>66</sink_obj> </item> <item class_id_reference="20" object_id="_222"> <id>246</id> <edge_type>1</edge_type> <source_obj>66</source_obj> <sink_obj>67</sink_obj> </item> <item class_id_reference="20" object_id="_223"> <id>247</id> <edge_type>1</edge_type> <source_obj>67</source_obj> <sink_obj>68</sink_obj> </item> <item class_id_reference="20" object_id="_224"> <id>248</id> <edge_type>1</edge_type> <source_obj>21</source_obj> <sink_obj>69</sink_obj> </item> <item class_id_reference="20" object_id="_225"> <id>249</id> <edge_type>1</edge_type> <source_obj>69</source_obj> <sink_obj>70</sink_obj> </item> <item class_id_reference="20" object_id="_226"> <id>250</id> <edge_type>1</edge_type> <source_obj>70</source_obj> <sink_obj>71</sink_obj> </item> <item class_id_reference="20" object_id="_227"> <id>251</id> <edge_type>1</edge_type> <source_obj>68</source_obj> <sink_obj>71</sink_obj> </item> <item class_id_reference="20" object_id="_228"> <id>252</id> <edge_type>1</edge_type> <source_obj>7</source_obj> <sink_obj>72</sink_obj> </item> <item class_id_reference="20" object_id="_229"> <id>253</id> <edge_type>1</edge_type> <source_obj>139</source_obj> <sink_obj>72</sink_obj> </item> <item class_id_reference="20" object_id="_230"> <id>254</id> <edge_type>1</edge_type> <source_obj>59</source_obj> <sink_obj>72</sink_obj> </item> <item class_id_reference="20" object_id="_231"> <id>255</id> <edge_type>1</edge_type> <source_obj>72</source_obj> <sink_obj>73</sink_obj> </item> <item class_id_reference="20" object_id="_232"> <id>256</id> <edge_type>1</edge_type> <source_obj>73</source_obj> <sink_obj>74</sink_obj> </item> <item class_id_reference="20" object_id="_233"> <id>257</id> <edge_type>1</edge_type> <source_obj>25</source_obj> <sink_obj>75</sink_obj> </item> <item class_id_reference="20" object_id="_234"> <id>258</id> <edge_type>1</edge_type> <source_obj>75</source_obj> <sink_obj>76</sink_obj> </item> <item class_id_reference="20" object_id="_235"> <id>259</id> <edge_type>1</edge_type> <source_obj>76</source_obj> <sink_obj>77</sink_obj> </item> <item class_id_reference="20" object_id="_236"> <id>260</id> <edge_type>1</edge_type> <source_obj>74</source_obj> <sink_obj>77</sink_obj> </item> <item class_id_reference="20" object_id="_237"> <id>261</id> <edge_type>1</edge_type> <source_obj>8</source_obj> <sink_obj>78</sink_obj> </item> <item class_id_reference="20" object_id="_238"> <id>262</id> <edge_type>1</edge_type> <source_obj>139</source_obj> <sink_obj>78</sink_obj> </item> <item class_id_reference="20" object_id="_239"> <id>263</id> <edge_type>1</edge_type> <source_obj>59</source_obj> <sink_obj>78</sink_obj> </item> <item class_id_reference="20" object_id="_240"> <id>264</id> <edge_type>1</edge_type> <source_obj>78</source_obj> <sink_obj>79</sink_obj> </item> <item class_id_reference="20" object_id="_241"> <id>265</id> <edge_type>1</edge_type> <source_obj>79</source_obj> <sink_obj>80</sink_obj> </item> <item class_id_reference="20" object_id="_242"> <id>266</id> <edge_type>1</edge_type> <source_obj>29</source_obj> <sink_obj>81</sink_obj> </item> <item class_id_reference="20" object_id="_243"> <id>267</id> <edge_type>1</edge_type> <source_obj>81</source_obj> <sink_obj>82</sink_obj> </item> <item class_id_reference="20" object_id="_244"> <id>268</id> <edge_type>1</edge_type> <source_obj>82</source_obj> <sink_obj>83</sink_obj> </item> <item class_id_reference="20" object_id="_245"> <id>269</id> <edge_type>1</edge_type> <source_obj>80</source_obj> <sink_obj>83</sink_obj> </item> <item class_id_reference="20" object_id="_246"> <id>270</id> <edge_type>1</edge_type> <source_obj>9</source_obj> <sink_obj>84</sink_obj> </item> <item class_id_reference="20" object_id="_247"> <id>271</id> <edge_type>1</edge_type> <source_obj>139</source_obj> <sink_obj>84</sink_obj> </item> <item class_id_reference="20" object_id="_248"> <id>272</id> <edge_type>1</edge_type> <source_obj>59</source_obj> <sink_obj>84</sink_obj> </item> <item class_id_reference="20" object_id="_249"> <id>273</id> <edge_type>1</edge_type> <source_obj>84</source_obj> <sink_obj>85</sink_obj> </item> <item class_id_reference="20" object_id="_250"> <id>274</id> <edge_type>1</edge_type> <source_obj>85</source_obj> <sink_obj>86</sink_obj> </item> <item class_id_reference="20" object_id="_251"> <id>275</id> <edge_type>1</edge_type> <source_obj>33</source_obj> <sink_obj>87</sink_obj> </item> <item class_id_reference="20" object_id="_252"> <id>276</id> <edge_type>1</edge_type> <source_obj>87</source_obj> <sink_obj>88</sink_obj> </item> <item class_id_reference="20" object_id="_253"> <id>277</id> <edge_type>1</edge_type> <source_obj>88</source_obj> <sink_obj>89</sink_obj> </item> <item class_id_reference="20" object_id="_254"> <id>278</id> <edge_type>1</edge_type> <source_obj>86</source_obj> <sink_obj>89</sink_obj> </item> <item class_id_reference="20" object_id="_255"> <id>279</id> <edge_type>1</edge_type> <source_obj>10</source_obj> <sink_obj>90</sink_obj> </item> <item class_id_reference="20" object_id="_256"> <id>280</id> <edge_type>1</edge_type> <source_obj>139</source_obj> <sink_obj>90</sink_obj> </item> <item class_id_reference="20" object_id="_257"> <id>281</id> <edge_type>1</edge_type> <source_obj>59</source_obj> <sink_obj>90</sink_obj> </item> <item class_id_reference="20" object_id="_258"> <id>282</id> <edge_type>1</edge_type> <source_obj>90</source_obj> <sink_obj>91</sink_obj> </item> <item class_id_reference="20" object_id="_259"> <id>283</id> <edge_type>1</edge_type> <source_obj>91</source_obj> <sink_obj>92</sink_obj> </item> <item class_id_reference="20" object_id="_260"> <id>284</id> <edge_type>1</edge_type> <source_obj>37</source_obj> <sink_obj>93</sink_obj> </item> <item class_id_reference="20" object_id="_261"> <id>285</id> <edge_type>1</edge_type> <source_obj>93</source_obj> <sink_obj>94</sink_obj> </item> <item class_id_reference="20" object_id="_262"> <id>286</id> <edge_type>1</edge_type> <source_obj>94</source_obj> <sink_obj>95</sink_obj> </item> <item class_id_reference="20" object_id="_263"> <id>287</id> <edge_type>1</edge_type> <source_obj>92</source_obj> <sink_obj>95</sink_obj> </item> <item class_id_reference="20" object_id="_264"> <id>288</id> <edge_type>1</edge_type> <source_obj>11</source_obj> <sink_obj>96</sink_obj> </item> <item class_id_reference="20" object_id="_265"> <id>289</id> <edge_type>1</edge_type> <source_obj>139</source_obj> <sink_obj>96</sink_obj> </item> <item class_id_reference="20" object_id="_266"> <id>290</id> <edge_type>1</edge_type> <source_obj>59</source_obj> <sink_obj>96</sink_obj> </item> <item class_id_reference="20" object_id="_267"> <id>291</id> <edge_type>1</edge_type> <source_obj>96</source_obj> <sink_obj>97</sink_obj> </item> <item class_id_reference="20" object_id="_268"> <id>292</id> <edge_type>1</edge_type> <source_obj>97</source_obj> <sink_obj>98</sink_obj> </item> <item class_id_reference="20" object_id="_269"> <id>293</id> <edge_type>1</edge_type> <source_obj>41</source_obj> <sink_obj>99</sink_obj> </item> <item class_id_reference="20" object_id="_270"> <id>294</id> <edge_type>1</edge_type> <source_obj>99</source_obj> <sink_obj>100</sink_obj> </item> <item class_id_reference="20" object_id="_271"> <id>295</id> <edge_type>1</edge_type> <source_obj>100</source_obj> <sink_obj>101</sink_obj> </item> <item class_id_reference="20" object_id="_272"> <id>296</id> <edge_type>1</edge_type> <source_obj>98</source_obj> <sink_obj>101</sink_obj> </item> <item class_id_reference="20" object_id="_273"> <id>297</id> <edge_type>1</edge_type> <source_obj>12</source_obj> <sink_obj>102</sink_obj> </item> <item class_id_reference="20" object_id="_274"> <id>298</id> <edge_type>1</edge_type> <source_obj>139</source_obj> <sink_obj>102</sink_obj> </item> <item class_id_reference="20" object_id="_275"> <id>299</id> <edge_type>1</edge_type> <source_obj>59</source_obj> <sink_obj>102</sink_obj> </item> <item class_id_reference="20" object_id="_276"> <id>300</id> <edge_type>1</edge_type> <source_obj>102</source_obj> <sink_obj>103</sink_obj> </item> <item class_id_reference="20" object_id="_277"> <id>301</id> <edge_type>1</edge_type> <source_obj>103</source_obj> <sink_obj>104</sink_obj> </item> <item class_id_reference="20" object_id="_278"> <id>302</id> <edge_type>1</edge_type> <source_obj>45</source_obj> <sink_obj>105</sink_obj> </item> <item class_id_reference="20" object_id="_279"> <id>303</id> <edge_type>1</edge_type> <source_obj>105</source_obj> <sink_obj>106</sink_obj> </item> <item class_id_reference="20" object_id="_280"> <id>304</id> <edge_type>1</edge_type> <source_obj>106</source_obj> <sink_obj>107</sink_obj> </item> <item class_id_reference="20" object_id="_281"> <id>305</id> <edge_type>1</edge_type> <source_obj>104</source_obj> <sink_obj>107</sink_obj> </item> <item class_id_reference="20" object_id="_282"> <id>306</id> <edge_type>1</edge_type> <source_obj>71</source_obj> <sink_obj>108</sink_obj> </item> <item class_id_reference="20" object_id="_283"> <id>307</id> <edge_type>1</edge_type> <source_obj>65</source_obj> <sink_obj>108</sink_obj> </item> <item class_id_reference="20" object_id="_284"> <id>308</id> <edge_type>1</edge_type> <source_obj>83</source_obj> <sink_obj>109</sink_obj> </item> <item class_id_reference="20" object_id="_285"> <id>309</id> <edge_type>1</edge_type> <source_obj>77</source_obj> <sink_obj>109</sink_obj> </item> <item class_id_reference="20" object_id="_286"> <id>310</id> <edge_type>1</edge_type> <source_obj>108</source_obj> <sink_obj>110</sink_obj> </item> <item class_id_reference="20" object_id="_287"> <id>311</id> <edge_type>1</edge_type> <source_obj>109</source_obj> <sink_obj>110</sink_obj> </item> <item class_id_reference="20" object_id="_288"> <id>312</id> <edge_type>1</edge_type> <source_obj>95</source_obj> <sink_obj>111</sink_obj> </item> <item class_id_reference="20" object_id="_289"> <id>313</id> <edge_type>1</edge_type> <source_obj>89</source_obj> <sink_obj>111</sink_obj> </item> <item class_id_reference="20" object_id="_290"> <id>314</id> <edge_type>1</edge_type> <source_obj>107</source_obj> <sink_obj>112</sink_obj> </item> <item class_id_reference="20" object_id="_291"> <id>316</id> <edge_type>1</edge_type> <source_obj>315</source_obj> <sink_obj>112</sink_obj> </item> <item class_id_reference="20" object_id="_292"> <id>317</id> <edge_type>1</edge_type> <source_obj>101</source_obj> <sink_obj>113</sink_obj> </item> <item class_id_reference="20" object_id="_293"> <id>318</id> <edge_type>1</edge_type> <source_obj>112</source_obj> <sink_obj>113</sink_obj> </item> <item class_id_reference="20" object_id="_294"> <id>319</id> <edge_type>1</edge_type> <source_obj>111</source_obj> <sink_obj>114</sink_obj> </item> <item class_id_reference="20" object_id="_295"> <id>320</id> <edge_type>1</edge_type> <source_obj>113</source_obj> <sink_obj>114</sink_obj> </item> <item class_id_reference="20" object_id="_296"> <id>321</id> <edge_type>1</edge_type> <source_obj>110</source_obj> <sink_obj>115</sink_obj> </item> <item class_id_reference="20" object_id="_297"> <id>322</id> <edge_type>1</edge_type> <source_obj>114</source_obj> <sink_obj>115</sink_obj> </item> <item class_id_reference="20" object_id="_298"> <id>325</id> <edge_type>1</edge_type> <source_obj>115</source_obj> <sink_obj>116</sink_obj> </item> <item class_id_reference="20" object_id="_299"> <id>327</id> <edge_type>1</edge_type> <source_obj>326</source_obj> <sink_obj>116</sink_obj> </item> <item class_id_reference="20" object_id="_300"> <id>329</id> <edge_type>1</edge_type> <source_obj>328</source_obj> <sink_obj>116</sink_obj> </item> <item class_id_reference="20" object_id="_301"> <id>330</id> <edge_type>1</edge_type> <source_obj>50</source_obj> <sink_obj>117</sink_obj> </item> <item class_id_reference="20" object_id="_302"> <id>331</id> <edge_type>1</edge_type> <source_obj>47</source_obj> <sink_obj>118</sink_obj> </item> <item class_id_reference="20" object_id="_303"> <id>332</id> <edge_type>1</edge_type> <source_obj>117</source_obj> <sink_obj>118</sink_obj> </item> <item class_id_reference="20" object_id="_304"> <id>333</id> <edge_type>1</edge_type> <source_obj>118</source_obj> <sink_obj>119</sink_obj> </item> <item class_id_reference="20" object_id="_305"> <id>334</id> <edge_type>1</edge_type> <source_obj>3</source_obj> <sink_obj>120</sink_obj> </item> <item class_id_reference="20" object_id="_306"> <id>335</id> <edge_type>1</edge_type> <source_obj>139</source_obj> <sink_obj>120</sink_obj> </item> <item class_id_reference="20" object_id="_307"> <id>336</id> <edge_type>1</edge_type> <source_obj>119</source_obj> <sink_obj>120</sink_obj> </item> <item class_id_reference="20" object_id="_308"> <id>337</id> <edge_type>1</edge_type> <source_obj>116</source_obj> <sink_obj>121</sink_obj> </item> <item class_id_reference="20" object_id="_309"> <id>338</id> <edge_type>1</edge_type> <source_obj>120</source_obj> <sink_obj>121</sink_obj> </item> <item class_id_reference="20" object_id="_310"> <id>339</id> <edge_type>2</edge_type> <source_obj>54</source_obj> <sink_obj>123</sink_obj> </item> <item class_id_reference="20" object_id="_311"> <id>367</id> <edge_type>2</edge_type> <source_obj>49</source_obj> <sink_obj>54</sink_obj> </item> <item class_id_reference="20" object_id="_312"> <id>368</id> <edge_type>2</edge_type> <source_obj>54</source_obj> <sink_obj>126</sink_obj> </item> <item class_id_reference="20" object_id="_313"> <id>369</id> <edge_type>2</edge_type> <source_obj>54</source_obj> <sink_obj>124</sink_obj> </item> <item class_id_reference="20" object_id="_314"> <id>370</id> <edge_type>2</edge_type> <source_obj>124</source_obj> <sink_obj>54</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="_315"> <mId>1</mId> <mTag>dct_dct_1d</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>37</mMinLatency> <mMaxLatency>-1</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> <item class_id_reference="22" object_id="_316"> <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>49</item> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>-1</mMinTripCount> <mMaxTripCount>-1</mMaxTripCount> <mMinLatency>0</mMinLatency> <mMaxLatency>-1</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> <item class_id_reference="22" object_id="_317"> <mId>3</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>54</item> <item>124</item> </basic_blocks> <mII>4</mII> <mDepth>8</mDepth> <mMinTripCount>8</mMinTripCount> <mMaxTripCount>8</mMaxTripCount> <mMinLatency>35</mMinLatency> <mMaxLatency>-1</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> <item class_id_reference="22" object_id="_318"> <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>126</item> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>-1</mMinTripCount> <mMaxTripCount>-1</mMaxTripCount> <mMinLatency>0</mMinLatency> <mMaxLatency>-1</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> </cdfg_regions> <fsm class_id="-1"></fsm> <res class_id="25" tracking_level="1" version="0" object_id="_319"> <dp_component_resource class_id="26" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </dp_component_resource> <dp_expression_resource> <count>0</count> <item_version>0</item_version> </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>0</count> <item_version>0</item_version> </dp_multiplexer_resource> <dp_register_resource> <count>0</count> <item_version>0</item_version> </dp_register_resource> <dp_component_map class_id="27" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </dp_component_map> <dp_expression_map> <count>0</count> <item_version>0</item_version> </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="28" tracking_level="0" version="0"> <count>105</count> <item_version>0</item_version> <item class_id="29" tracking_level="0" version="0"> <first>13</first> <second class_id="30" tracking_level="0" version="0"> <first>0</first> <second>0</second> </second> </item> <item> <first>14</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>15</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>16</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>17</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>18</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>19</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>20</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>21</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>22</first> <second> <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>25</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>26</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>27</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>39</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>40</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>41</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>42</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>43</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>44</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>45</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>46</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>47</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>48</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>50</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>51</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>52</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>53</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>59</first> <second> <first>1</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>4</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>4</first> <second>0</second> </second> </item> <item> <first>65</first> <second> <first>4</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>1</first> <second>1</second> </second> </item> <item> <first>68</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>69</first> <second> <first>1</first> <second>1</second> </second> </item> <item> <first>70</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>71</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>72</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>73</first> <second> <first>3</first> <second>1</second> </second> </item> <item> <first>74</first> <second> <first>5</first> <second>0</second> </second> </item> <item> <first>75</first> <second> <first>3</first> <second>1</second> </second> </item> <item> <first>76</first> <second> <first>5</first> <second>0</second> </second> </item> <item> <first>77</first> <second> <first>5</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>1</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>3</first> <second>0</second> </second> </item> <item> <first>85</first> <second> <first>3</first> <second>1</second> </second> </item> <item> <first>86</first> <second> <first>7</first> <second>0</second> </second> </item> <item> <first>87</first> <second> <first>3</first> <second>1</second> </second> </item> <item> <first>88</first> <second> <first>7</first> <second>0</second> </second> </item> <item> <first>89</first> <second> <first>7</first> <second>0</second> </second> </item> <item> <first>90</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>91</first> <second> <first>3</first> <second>1</second> </second> </item> <item> <first>92</first> <second> <first>5</first> <second>0</second> </second> </item> <item> <first>93</first> <second> <first>2</first> <second>1</second> </second> </item> <item> <first>94</first> <second> <first>5</first> <second>0</second> </second> </item> <item> <first>95</first> <second> <first>5</first> <second>0</second> </second> </item> <item> <first>96</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>97</first> <second> <first>3</first> <second>1</second> </second> </item> <item> <first>98</first> <second> <first>6</first> <second>0</second> </second> </item> <item> <first>99</first> <second> <first>4</first> <second>1</second> </second> </item> <item> <first>100</first> <second> <first>6</first> <second>0</second> </second> </item> <item> <first>101</first> <second> <first>6</first> <second>0</second> </second> </item> <item> <first>102</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>103</first> <second> <first>3</first> <second>1</second> </second> </item> <item> <first>104</first> <second> <first>6</first> <second>0</second> </second> </item> <item> <first>105</first> <second> <first>4</first> <second>1</second> </second> </item> <item> <first>106</first> <second> <first>6</first> <second>0</second> </second> </item> <item> <first>107</first> <second> <first>6</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>5</first> <second>0</second> </second> </item> <item> <first>110</first> <second> <first>5</first> <second>0</second> </second> </item> <item> <first>111</first> <second> <first>7</first> <second>0</second> </second> </item> <item> <first>112</first> <second> <first>6</first> <second>0</second> </second> </item> <item> <first>113</first> <second> <first>6</first> <second>0</second> </second> </item> <item> <first>114</first> <second> <first>7</first> <second>0</second> </second> </item> <item> <first>115</first> <second> <first>7</first> <second>0</second> </second> </item> <item> <first>116</first> <second> <first>7</first> <second>0</second> </second> </item> <item> <first>117</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>118</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>119</first> <second> <first>8</first> <second>0</second> </second> </item> <item> <first>120</first> <second> <first>8</first> <second>0</second> </second> </item> <item> <first>121</first> <second> <first>8</first> <second>0</second> </second> </item> <item> <first>123</first> <second> <first>8</first> <second>0</second> </second> </item> <item> <first>125</first> <second> <first>2</first> <second>0</second> </second> </item> </node_label_latency> <bblk_ent_exit class_id="31" tracking_level="0" version="0"> <count>4</count> <item_version>0</item_version> <item class_id="32" tracking_level="0" version="0"> <first>49</first> <second class_id="33" tracking_level="0" version="0"> <first>0</first> <second>0</second> </second> </item> <item> <first>54</first> <second> <first>1</first> <second>1</second> </second> </item> <item> <first>124</first> <second> <first>1</first> <second>8</second> </second> </item> <item> <first>126</first> <second> <first>2</first> <second>2</second> </second> </item> </bblk_ent_exit> <regions class_id="34" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="35" tracking_level="1" version="0" object_id="_320"> <region_name>DCT_Outer_Loop</region_name> <basic_blocks> <count>2</count> <item_version>0</item_version> <item>54</item> <item>124</item> </basic_blocks> <nodes> <count>0</count> <item_version>0</item_version> </nodes> <anchor_node>-1</anchor_node> <region_type>8</region_type> <interval>4</interval> <pipe_depth>8</pipe_depth> </item> </regions> <dp_fu_nodes class_id="36" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </dp_fu_nodes> <dp_fu_nodes_expression class_id="37" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </dp_fu_nodes_expression> <dp_fu_nodes_module> <count>0</count> <item_version>0</item_version> </dp_fu_nodes_module> <dp_fu_nodes_io> <count>0</count> <item_version>0</item_version> </dp_fu_nodes_io> <return_ports> <count>0</count> <item_version>0</item_version> </return_ports> <dp_mem_port_nodes class_id="38" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </dp_mem_port_nodes> <dp_reg_nodes> <count>0</count> <item_version>0</item_version> </dp_reg_nodes> <dp_regname_nodes> <count>0</count> <item_version>0</item_version> </dp_regname_nodes> <dp_reg_phi> <count>0</count> <item_version>0</item_version> </dp_reg_phi> <dp_regname_phi> <count>0</count> <item_version>0</item_version> </dp_regname_phi> <dp_port_io_nodes class_id="39" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </dp_port_io_nodes> <port2core class_id="40" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </port2core> <node2core> <count>0</count> <item_version>0</item_version> </node2core> </syndb> </boost_serialization>
with RP.Device; with RP.Clock; with RP.GPIO; with Pico; package body BB_Pico_Bsp is begin RP.Clock.Initialize (Pico.XOSC_Frequency); RP.Clock.Enable (RP.Clock.PERI); RP.Device.Timer.Enable; RP.GPIO.Enable; RP.DMA.Enable; end BB_Pico_Bsp;
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Ada Modeling Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2011-2012, Vadim Godunko <vgodunko@gmail.com> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with AMF.Internals.UML_Named_Elements; with AMF.UML.Activities; with AMF.UML.Activity_Edges.Collections; with AMF.UML.Activity_Groups.Collections; with AMF.UML.Activity_Nodes.Collections; with AMF.UML.Activity_Partitions.Collections; with AMF.UML.Classifiers.Collections; with AMF.UML.Clear_Variable_Actions; with AMF.UML.Constraints.Collections; with AMF.UML.Dependencies.Collections; with AMF.UML.Exception_Handlers.Collections; with AMF.UML.Input_Pins.Collections; with AMF.UML.Interruptible_Activity_Regions.Collections; with AMF.UML.Named_Elements; with AMF.UML.Namespaces; with AMF.UML.Output_Pins.Collections; with AMF.UML.Packages.Collections; with AMF.UML.Redefinable_Elements.Collections; with AMF.UML.String_Expressions; with AMF.UML.Structured_Activity_Nodes; with AMF.UML.Variables; with AMF.Visitors; package AMF.Internals.UML_Clear_Variable_Actions is type UML_Clear_Variable_Action_Proxy is limited new AMF.Internals.UML_Named_Elements.UML_Named_Element_Proxy and AMF.UML.Clear_Variable_Actions.UML_Clear_Variable_Action with null record; overriding function Get_Variable (Self : not null access constant UML_Clear_Variable_Action_Proxy) return AMF.UML.Variables.UML_Variable_Access; -- Getter of VariableAction::variable. -- -- Variable to be read. overriding procedure Set_Variable (Self : not null access UML_Clear_Variable_Action_Proxy; To : AMF.UML.Variables.UML_Variable_Access); -- Setter of VariableAction::variable. -- -- Variable to be read. overriding function Get_Context (Self : not null access constant UML_Clear_Variable_Action_Proxy) return AMF.UML.Classifiers.UML_Classifier_Access; -- Getter of Action::context. -- -- The classifier that owns the behavior of which this action is a part. overriding function Get_Input (Self : not null access constant UML_Clear_Variable_Action_Proxy) return AMF.UML.Input_Pins.Collections.Ordered_Set_Of_UML_Input_Pin; -- Getter of Action::input. -- -- The ordered set of input pins connected to the Action. These are among -- the total set of inputs. overriding function Get_Is_Locally_Reentrant (Self : not null access constant UML_Clear_Variable_Action_Proxy) return Boolean; -- Getter of Action::isLocallyReentrant. -- -- If true, the action can begin a new, concurrent execution, even if -- there is already another execution of the action ongoing. If false, the -- action cannot begin a new execution until any previous execution has -- completed. overriding procedure Set_Is_Locally_Reentrant (Self : not null access UML_Clear_Variable_Action_Proxy; To : Boolean); -- Setter of Action::isLocallyReentrant. -- -- If true, the action can begin a new, concurrent execution, even if -- there is already another execution of the action ongoing. If false, the -- action cannot begin a new execution until any previous execution has -- completed. overriding function Get_Local_Postcondition (Self : not null access constant UML_Clear_Variable_Action_Proxy) return AMF.UML.Constraints.Collections.Set_Of_UML_Constraint; -- Getter of Action::localPostcondition. -- -- Constraint that must be satisfied when executed is completed. overriding function Get_Local_Precondition (Self : not null access constant UML_Clear_Variable_Action_Proxy) return AMF.UML.Constraints.Collections.Set_Of_UML_Constraint; -- Getter of Action::localPrecondition. -- -- Constraint that must be satisfied when execution is started. overriding function Get_Output (Self : not null access constant UML_Clear_Variable_Action_Proxy) return AMF.UML.Output_Pins.Collections.Ordered_Set_Of_UML_Output_Pin; -- Getter of Action::output. -- -- The ordered set of output pins connected to the Action. The action -- places its results onto pins in this set. overriding function Get_Handler (Self : not null access constant UML_Clear_Variable_Action_Proxy) return AMF.UML.Exception_Handlers.Collections.Set_Of_UML_Exception_Handler; -- Getter of ExecutableNode::handler. -- -- A set of exception handlers that are examined if an uncaught exception -- propagates to the outer level of the executable node. overriding function Get_Activity (Self : not null access constant UML_Clear_Variable_Action_Proxy) return AMF.UML.Activities.UML_Activity_Access; -- Getter of ActivityNode::activity. -- -- Activity containing the node. overriding procedure Set_Activity (Self : not null access UML_Clear_Variable_Action_Proxy; To : AMF.UML.Activities.UML_Activity_Access); -- Setter of ActivityNode::activity. -- -- Activity containing the node. overriding function Get_In_Group (Self : not null access constant UML_Clear_Variable_Action_Proxy) return AMF.UML.Activity_Groups.Collections.Set_Of_UML_Activity_Group; -- Getter of ActivityNode::inGroup. -- -- Groups containing the node. overriding function Get_In_Interruptible_Region (Self : not null access constant UML_Clear_Variable_Action_Proxy) return AMF.UML.Interruptible_Activity_Regions.Collections.Set_Of_UML_Interruptible_Activity_Region; -- Getter of ActivityNode::inInterruptibleRegion. -- -- Interruptible regions containing the node. overriding function Get_In_Partition (Self : not null access constant UML_Clear_Variable_Action_Proxy) return AMF.UML.Activity_Partitions.Collections.Set_Of_UML_Activity_Partition; -- Getter of ActivityNode::inPartition. -- -- Partitions containing the node. overriding function Get_In_Structured_Node (Self : not null access constant UML_Clear_Variable_Action_Proxy) return AMF.UML.Structured_Activity_Nodes.UML_Structured_Activity_Node_Access; -- Getter of ActivityNode::inStructuredNode. -- -- Structured activity node containing the node. overriding procedure Set_In_Structured_Node (Self : not null access UML_Clear_Variable_Action_Proxy; To : AMF.UML.Structured_Activity_Nodes.UML_Structured_Activity_Node_Access); -- Setter of ActivityNode::inStructuredNode. -- -- Structured activity node containing the node. overriding function Get_Incoming (Self : not null access constant UML_Clear_Variable_Action_Proxy) return AMF.UML.Activity_Edges.Collections.Set_Of_UML_Activity_Edge; -- Getter of ActivityNode::incoming. -- -- Edges that have the node as target. overriding function Get_Outgoing (Self : not null access constant UML_Clear_Variable_Action_Proxy) return AMF.UML.Activity_Edges.Collections.Set_Of_UML_Activity_Edge; -- Getter of ActivityNode::outgoing. -- -- Edges that have the node as source. overriding function Get_Redefined_Node (Self : not null access constant UML_Clear_Variable_Action_Proxy) return AMF.UML.Activity_Nodes.Collections.Set_Of_UML_Activity_Node; -- Getter of ActivityNode::redefinedNode. -- -- Inherited nodes replaced by this node in a specialization of the -- activity. overriding function Get_Is_Leaf (Self : not null access constant UML_Clear_Variable_Action_Proxy) return Boolean; -- Getter of RedefinableElement::isLeaf. -- -- Indicates whether it is possible to further redefine a -- RedefinableElement. If the value is true, then it is not possible to -- further redefine the RedefinableElement. Note that this property is -- preserved through package merge operations; that is, the capability to -- redefine a RedefinableElement (i.e., isLeaf=false) must be preserved in -- the resulting RedefinableElement of a package merge operation where a -- RedefinableElement with isLeaf=false is merged with a matching -- RedefinableElement with isLeaf=true: the resulting RedefinableElement -- will have isLeaf=false. Default value is false. overriding procedure Set_Is_Leaf (Self : not null access UML_Clear_Variable_Action_Proxy; To : Boolean); -- Setter of RedefinableElement::isLeaf. -- -- Indicates whether it is possible to further redefine a -- RedefinableElement. If the value is true, then it is not possible to -- further redefine the RedefinableElement. Note that this property is -- preserved through package merge operations; that is, the capability to -- redefine a RedefinableElement (i.e., isLeaf=false) must be preserved in -- the resulting RedefinableElement of a package merge operation where a -- RedefinableElement with isLeaf=false is merged with a matching -- RedefinableElement with isLeaf=true: the resulting RedefinableElement -- will have isLeaf=false. Default value is false. overriding function Get_Redefined_Element (Self : not null access constant UML_Clear_Variable_Action_Proxy) return AMF.UML.Redefinable_Elements.Collections.Set_Of_UML_Redefinable_Element; -- Getter of RedefinableElement::redefinedElement. -- -- The redefinable element that is being redefined by this element. overriding function Get_Redefinition_Context (Self : not null access constant UML_Clear_Variable_Action_Proxy) return AMF.UML.Classifiers.Collections.Set_Of_UML_Classifier; -- Getter of RedefinableElement::redefinitionContext. -- -- References the contexts that this element may be redefined from. overriding function Get_Client_Dependency (Self : not null access constant UML_Clear_Variable_Action_Proxy) return AMF.UML.Dependencies.Collections.Set_Of_UML_Dependency; -- Getter of NamedElement::clientDependency. -- -- Indicates the dependencies that reference the client. overriding function Get_Name_Expression (Self : not null access constant UML_Clear_Variable_Action_Proxy) return AMF.UML.String_Expressions.UML_String_Expression_Access; -- Getter of NamedElement::nameExpression. -- -- The string expression used to define the name of this named element. overriding procedure Set_Name_Expression (Self : not null access UML_Clear_Variable_Action_Proxy; To : AMF.UML.String_Expressions.UML_String_Expression_Access); -- Setter of NamedElement::nameExpression. -- -- The string expression used to define the name of this named element. overriding function Get_Namespace (Self : not null access constant UML_Clear_Variable_Action_Proxy) return AMF.UML.Namespaces.UML_Namespace_Access; -- Getter of NamedElement::namespace. -- -- Specifies the namespace that owns the NamedElement. overriding function Get_Qualified_Name (Self : not null access constant UML_Clear_Variable_Action_Proxy) return AMF.Optional_String; -- Getter of NamedElement::qualifiedName. -- -- A name which allows the NamedElement to be identified within a -- hierarchy of nested Namespaces. It is constructed from the names of the -- containing namespaces starting at the root of the hierarchy and ending -- with the name of the NamedElement itself. overriding function Context (Self : not null access constant UML_Clear_Variable_Action_Proxy) return AMF.UML.Classifiers.UML_Classifier_Access; -- Operation Action::context. -- -- Missing derivation for Action::/context : Classifier overriding function Is_Consistent_With (Self : not null access constant UML_Clear_Variable_Action_Proxy; Redefinee : AMF.UML.Redefinable_Elements.UML_Redefinable_Element_Access) return Boolean; -- Operation RedefinableElement::isConsistentWith. -- -- The query isConsistentWith() specifies, for any two RedefinableElements -- in a context in which redefinition is possible, whether redefinition -- would be logically consistent. By default, this is false; this -- operation must be overridden for subclasses of RedefinableElement to -- define the consistency conditions. overriding function Is_Redefinition_Context_Valid (Self : not null access constant UML_Clear_Variable_Action_Proxy; Redefined : AMF.UML.Redefinable_Elements.UML_Redefinable_Element_Access) return Boolean; -- Operation RedefinableElement::isRedefinitionContextValid. -- -- The query isRedefinitionContextValid() specifies whether the -- redefinition contexts of this RedefinableElement are properly related -- to the redefinition contexts of the specified RedefinableElement to -- allow this element to redefine the other. By default at least one of -- the redefinition contexts of this element must be a specialization of -- at least one of the redefinition contexts of the specified element. overriding function All_Owning_Packages (Self : not null access constant UML_Clear_Variable_Action_Proxy) return AMF.UML.Packages.Collections.Set_Of_UML_Package; -- Operation NamedElement::allOwningPackages. -- -- The query allOwningPackages() returns all the directly or indirectly -- owning packages. overriding function Is_Distinguishable_From (Self : not null access constant UML_Clear_Variable_Action_Proxy; N : AMF.UML.Named_Elements.UML_Named_Element_Access; Ns : AMF.UML.Namespaces.UML_Namespace_Access) return Boolean; -- Operation NamedElement::isDistinguishableFrom. -- -- The query isDistinguishableFrom() determines whether two NamedElements -- may logically co-exist within a Namespace. By default, two named -- elements are distinguishable if (a) they have unrelated types or (b) -- they have related types but different names. overriding function Namespace (Self : not null access constant UML_Clear_Variable_Action_Proxy) return AMF.UML.Namespaces.UML_Namespace_Access; -- Operation NamedElement::namespace. -- -- Missing derivation for NamedElement::/namespace : Namespace overriding procedure Enter_Element (Self : not null access constant UML_Clear_Variable_Action_Proxy; Visitor : in out AMF.Visitors.Abstract_Visitor'Class; Control : in out AMF.Visitors.Traverse_Control); -- Dispatch call to corresponding subprogram of visitor interface. overriding procedure Leave_Element (Self : not null access constant UML_Clear_Variable_Action_Proxy; Visitor : in out AMF.Visitors.Abstract_Visitor'Class; Control : in out AMF.Visitors.Traverse_Control); -- Dispatch call to corresponding subprogram of visitor interface. overriding procedure Visit_Element (Self : not null access constant UML_Clear_Variable_Action_Proxy; Iterator : in out AMF.Visitors.Abstract_Iterator'Class; Visitor : in out AMF.Visitors.Abstract_Visitor'Class; Control : in out AMF.Visitors.Traverse_Control); -- Dispatch call to corresponding subprogram of iterator interface. end AMF.Internals.UML_Clear_Variable_Actions;
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- A D A . C H A R A C T E R S . W I D E _ L A T I N _ 9 -- -- -- -- S p e c -- -- -- -- Copyright (C) 1992-2005, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 2, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- -- for more details. You should have received a copy of the GNU General -- -- Public License distributed with GNAT; see file COPYING. If not, write -- -- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, -- -- Boston, MA 02110-1301, USA. -- -- -- -- -- -- -- -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- This package provides definitions analogous to those in the GNAT -- package Ada.Characters.Latin_9 except that the type of the constants -- is Wide_Character instead of Character. The provision of this package -- is in accordance with the implementation permission in RM (A.3.3(27)). package Ada.Characters.Wide_Latin_9 is pragma Pure; ------------------------ -- Control Characters -- ------------------------ NUL : constant Wide_Character := Wide_Character'Val (0); SOH : constant Wide_Character := Wide_Character'Val (1); STX : constant Wide_Character := Wide_Character'Val (2); ETX : constant Wide_Character := Wide_Character'Val (3); EOT : constant Wide_Character := Wide_Character'Val (4); ENQ : constant Wide_Character := Wide_Character'Val (5); ACK : constant Wide_Character := Wide_Character'Val (6); BEL : constant Wide_Character := Wide_Character'Val (7); BS : constant Wide_Character := Wide_Character'Val (8); HT : constant Wide_Character := Wide_Character'Val (9); LF : constant Wide_Character := Wide_Character'Val (10); VT : constant Wide_Character := Wide_Character'Val (11); FF : constant Wide_Character := Wide_Character'Val (12); CR : constant Wide_Character := Wide_Character'Val (13); SO : constant Wide_Character := Wide_Character'Val (14); SI : constant Wide_Character := Wide_Character'Val (15); DLE : constant Wide_Character := Wide_Character'Val (16); DC1 : constant Wide_Character := Wide_Character'Val (17); DC2 : constant Wide_Character := Wide_Character'Val (18); DC3 : constant Wide_Character := Wide_Character'Val (19); DC4 : constant Wide_Character := Wide_Character'Val (20); NAK : constant Wide_Character := Wide_Character'Val (21); SYN : constant Wide_Character := Wide_Character'Val (22); ETB : constant Wide_Character := Wide_Character'Val (23); CAN : constant Wide_Character := Wide_Character'Val (24); EM : constant Wide_Character := Wide_Character'Val (25); SUB : constant Wide_Character := Wide_Character'Val (26); ESC : constant Wide_Character := Wide_Character'Val (27); FS : constant Wide_Character := Wide_Character'Val (28); GS : constant Wide_Character := Wide_Character'Val (29); RS : constant Wide_Character := Wide_Character'Val (30); US : constant Wide_Character := Wide_Character'Val (31); ------------------------------------- -- ISO 646 Graphic Wide_Characters -- ------------------------------------- Space : constant Wide_Character := ' '; -- WC'Val(32) Exclamation : constant Wide_Character := '!'; -- WC'Val(33) Quotation : constant Wide_Character := '"'; -- WC'Val(34) Number_Sign : constant Wide_Character := '#'; -- WC'Val(35) Dollar_Sign : constant Wide_Character := '$'; -- WC'Val(36) Percent_Sign : constant Wide_Character := '%'; -- WC'Val(37) Ampersand : constant Wide_Character := '&'; -- WC'Val(38) Apostrophe : constant Wide_Character := '''; -- WC'Val(39) Left_Parenthesis : constant Wide_Character := '('; -- WC'Val(40) Right_Parenthesis : constant Wide_Character := ')'; -- WC'Val(41) Asterisk : constant Wide_Character := '*'; -- WC'Val(42) Plus_Sign : constant Wide_Character := '+'; -- WC'Val(43) Comma : constant Wide_Character := ','; -- WC'Val(44) Hyphen : constant Wide_Character := '-'; -- WC'Val(45) Minus_Sign : Wide_Character renames Hyphen; Full_Stop : constant Wide_Character := '.'; -- WC'Val(46) Solidus : constant Wide_Character := '/'; -- WC'Val(47) -- Decimal digits '0' though '9' are at positions 48 through 57 Colon : constant Wide_Character := ':'; -- WC'Val(58) Semicolon : constant Wide_Character := ';'; -- WC'Val(59) Less_Than_Sign : constant Wide_Character := '<'; -- WC'Val(60) Equals_Sign : constant Wide_Character := '='; -- WC'Val(61) Greater_Than_Sign : constant Wide_Character := '>'; -- WC'Val(62) Question : constant Wide_Character := '?'; -- WC'Val(63) Commercial_At : constant Wide_Character := '@'; -- WC'Val(64) -- Letters 'A' through 'Z' are at positions 65 through 90 Left_Square_Bracket : constant Wide_Character := '['; -- WC'Val (91) Reverse_Solidus : constant Wide_Character := '\'; -- WC'Val (92) Right_Square_Bracket : constant Wide_Character := ']'; -- WC'Val (93) Circumflex : constant Wide_Character := '^'; -- WC'Val (94) Low_Line : constant Wide_Character := '_'; -- WC'Val (95) Grave : constant Wide_Character := '`'; -- WC'Val (96) LC_A : constant Wide_Character := 'a'; -- WC'Val (97) LC_B : constant Wide_Character := 'b'; -- WC'Val (98) LC_C : constant Wide_Character := 'c'; -- WC'Val (99) LC_D : constant Wide_Character := 'd'; -- WC'Val (100) LC_E : constant Wide_Character := 'e'; -- WC'Val (101) LC_F : constant Wide_Character := 'f'; -- WC'Val (102) LC_G : constant Wide_Character := 'g'; -- WC'Val (103) LC_H : constant Wide_Character := 'h'; -- WC'Val (104) LC_I : constant Wide_Character := 'i'; -- WC'Val (105) LC_J : constant Wide_Character := 'j'; -- WC'Val (106) LC_K : constant Wide_Character := 'k'; -- WC'Val (107) LC_L : constant Wide_Character := 'l'; -- WC'Val (108) LC_M : constant Wide_Character := 'm'; -- WC'Val (109) LC_N : constant Wide_Character := 'n'; -- WC'Val (110) LC_O : constant Wide_Character := 'o'; -- WC'Val (111) LC_P : constant Wide_Character := 'p'; -- WC'Val (112) LC_Q : constant Wide_Character := 'q'; -- WC'Val (113) LC_R : constant Wide_Character := 'r'; -- WC'Val (114) LC_S : constant Wide_Character := 's'; -- WC'Val (115) LC_T : constant Wide_Character := 't'; -- WC'Val (116) LC_U : constant Wide_Character := 'u'; -- WC'Val (117) LC_V : constant Wide_Character := 'v'; -- WC'Val (118) LC_W : constant Wide_Character := 'w'; -- WC'Val (119) LC_X : constant Wide_Character := 'x'; -- WC'Val (120) LC_Y : constant Wide_Character := 'y'; -- WC'Val (121) LC_Z : constant Wide_Character := 'z'; -- WC'Val (122) Left_Curly_Bracket : constant Wide_Character := '{'; -- WC'Val (123) Vertical_Line : constant Wide_Character := '|'; -- WC'Val (124) Right_Curly_Bracket : constant Wide_Character := '}'; -- WC'Val (125) Tilde : constant Wide_Character := '~'; -- WC'Val (126) DEL : constant Wide_Character := Wide_Character'Val (127); -------------------------------------- -- ISO 6429 Control Wide_Characters -- -------------------------------------- IS4 : Wide_Character renames FS; IS3 : Wide_Character renames GS; IS2 : Wide_Character renames RS; IS1 : Wide_Character renames US; Reserved_128 : constant Wide_Character := Wide_Character'Val (128); Reserved_129 : constant Wide_Character := Wide_Character'Val (129); BPH : constant Wide_Character := Wide_Character'Val (130); NBH : constant Wide_Character := Wide_Character'Val (131); Reserved_132 : constant Wide_Character := Wide_Character'Val (132); NEL : constant Wide_Character := Wide_Character'Val (133); SSA : constant Wide_Character := Wide_Character'Val (134); ESA : constant Wide_Character := Wide_Character'Val (135); HTS : constant Wide_Character := Wide_Character'Val (136); HTJ : constant Wide_Character := Wide_Character'Val (137); VTS : constant Wide_Character := Wide_Character'Val (138); PLD : constant Wide_Character := Wide_Character'Val (139); PLU : constant Wide_Character := Wide_Character'Val (140); RI : constant Wide_Character := Wide_Character'Val (141); SS2 : constant Wide_Character := Wide_Character'Val (142); SS3 : constant Wide_Character := Wide_Character'Val (143); DCS : constant Wide_Character := Wide_Character'Val (144); PU1 : constant Wide_Character := Wide_Character'Val (145); PU2 : constant Wide_Character := Wide_Character'Val (146); STS : constant Wide_Character := Wide_Character'Val (147); CCH : constant Wide_Character := Wide_Character'Val (148); MW : constant Wide_Character := Wide_Character'Val (149); SPA : constant Wide_Character := Wide_Character'Val (150); EPA : constant Wide_Character := Wide_Character'Val (151); SOS : constant Wide_Character := Wide_Character'Val (152); Reserved_153 : constant Wide_Character := Wide_Character'Val (153); SCI : constant Wide_Character := Wide_Character'Val (154); CSI : constant Wide_Character := Wide_Character'Val (155); ST : constant Wide_Character := Wide_Character'Val (156); OSC : constant Wide_Character := Wide_Character'Val (157); PM : constant Wide_Character := Wide_Character'Val (158); APC : constant Wide_Character := Wide_Character'Val (159); ----------------------------------- -- Other Graphic Wide_Characters -- ----------------------------------- -- Wide_Character positions 160 (16#A0#) .. 175 (16#AF#) No_Break_Space : constant Wide_Character := Wide_Character'Val (160); NBSP : Wide_Character renames No_Break_Space; Inverted_Exclamation : constant Wide_Character := Wide_Character'Val (161); Cent_Sign : constant Wide_Character := Wide_Character'Val (162); Pound_Sign : constant Wide_Character := Wide_Character'Val (163); Euro_Sign : constant Wide_Character := Wide_Character'Val (164); Yen_Sign : constant Wide_Character := Wide_Character'Val (165); UC_S_Caron : constant Wide_Character := Wide_Character'Val (166); Section_Sign : constant Wide_Character := Wide_Character'Val (167); LC_S_Caron : constant Wide_Character := Wide_Character'Val (168); Copyright_Sign : constant Wide_Character := Wide_Character'Val (169); Feminine_Ordinal_Indicator : constant Wide_Character := Wide_Character'Val (170); Left_Angle_Quotation : constant Wide_Character := Wide_Character'Val (171); Not_Sign : constant Wide_Character := Wide_Character'Val (172); Soft_Hyphen : constant Wide_Character := Wide_Character'Val (173); Registered_Trade_Mark_Sign : constant Wide_Character := Wide_Character'Val (174); Macron : constant Wide_Character := Wide_Character'Val (175); -- Wide_Character positions 176 (16#B0#) .. 191 (16#BF#) Degree_Sign : constant Wide_Character := Wide_Character'Val (176); Ring_Above : Wide_Character renames Degree_Sign; Plus_Minus_Sign : constant Wide_Character := Wide_Character'Val (177); Superscript_Two : constant Wide_Character := Wide_Character'Val (178); Superscript_Three : constant Wide_Character := Wide_Character'Val (179); UC_Z_Caron : constant Wide_Character := Wide_Character'Val (180); Micro_Sign : constant Wide_Character := Wide_Character'Val (181); Pilcrow_Sign : constant Wide_Character := Wide_Character'Val (182); Paragraph_Sign : Wide_Character renames Pilcrow_Sign; Middle_Dot : constant Wide_Character := Wide_Character'Val (183); LC_Z_Caron : constant Wide_Character := Wide_Character'Val (184); Superscript_One : constant Wide_Character := Wide_Character'Val (185); Masculine_Ordinal_Indicator : constant Wide_Character := Wide_Character'Val (186); Right_Angle_Quotation : constant Wide_Character := Wide_Character'Val (187); UC_Ligature_OE : constant Wide_Character := Wide_Character'Val (188); LC_Ligature_OE : constant Wide_Character := Wide_Character'Val (189); UC_Y_Diaeresis : constant Wide_Character := Wide_Character'Val (190); Inverted_Question : constant Wide_Character := Wide_Character'Val (191); -- Wide_Character positions 192 (16#C0#) .. 207 (16#CF#) UC_A_Grave : constant Wide_Character := Wide_Character'Val (192); UC_A_Acute : constant Wide_Character := Wide_Character'Val (193); UC_A_Circumflex : constant Wide_Character := Wide_Character'Val (194); UC_A_Tilde : constant Wide_Character := Wide_Character'Val (195); UC_A_Diaeresis : constant Wide_Character := Wide_Character'Val (196); UC_A_Ring : constant Wide_Character := Wide_Character'Val (197); UC_AE_Diphthong : constant Wide_Character := Wide_Character'Val (198); UC_C_Cedilla : constant Wide_Character := Wide_Character'Val (199); UC_E_Grave : constant Wide_Character := Wide_Character'Val (200); UC_E_Acute : constant Wide_Character := Wide_Character'Val (201); UC_E_Circumflex : constant Wide_Character := Wide_Character'Val (202); UC_E_Diaeresis : constant Wide_Character := Wide_Character'Val (203); UC_I_Grave : constant Wide_Character := Wide_Character'Val (204); UC_I_Acute : constant Wide_Character := Wide_Character'Val (205); UC_I_Circumflex : constant Wide_Character := Wide_Character'Val (206); UC_I_Diaeresis : constant Wide_Character := Wide_Character'Val (207); -- Wide_Character positions 208 (16#D0#) .. 223 (16#DF#) UC_Icelandic_Eth : constant Wide_Character := Wide_Character'Val (208); UC_N_Tilde : constant Wide_Character := Wide_Character'Val (209); UC_O_Grave : constant Wide_Character := Wide_Character'Val (210); UC_O_Acute : constant Wide_Character := Wide_Character'Val (211); UC_O_Circumflex : constant Wide_Character := Wide_Character'Val (212); UC_O_Tilde : constant Wide_Character := Wide_Character'Val (213); UC_O_Diaeresis : constant Wide_Character := Wide_Character'Val (214); Multiplication_Sign : constant Wide_Character := Wide_Character'Val (215); UC_O_Oblique_Stroke : constant Wide_Character := Wide_Character'Val (216); UC_U_Grave : constant Wide_Character := Wide_Character'Val (217); UC_U_Acute : constant Wide_Character := Wide_Character'Val (218); UC_U_Circumflex : constant Wide_Character := Wide_Character'Val (219); UC_U_Diaeresis : constant Wide_Character := Wide_Character'Val (220); UC_Y_Acute : constant Wide_Character := Wide_Character'Val (221); UC_Icelandic_Thorn : constant Wide_Character := Wide_Character'Val (222); LC_German_Sharp_S : constant Wide_Character := Wide_Character'Val (223); -- Wide_Character positions 224 (16#E0#) .. 239 (16#EF#) LC_A_Grave : constant Wide_Character := Wide_Character'Val (224); LC_A_Acute : constant Wide_Character := Wide_Character'Val (225); LC_A_Circumflex : constant Wide_Character := Wide_Character'Val (226); LC_A_Tilde : constant Wide_Character := Wide_Character'Val (227); LC_A_Diaeresis : constant Wide_Character := Wide_Character'Val (228); LC_A_Ring : constant Wide_Character := Wide_Character'Val (229); LC_AE_Diphthong : constant Wide_Character := Wide_Character'Val (230); LC_C_Cedilla : constant Wide_Character := Wide_Character'Val (231); LC_E_Grave : constant Wide_Character := Wide_Character'Val (232); LC_E_Acute : constant Wide_Character := Wide_Character'Val (233); LC_E_Circumflex : constant Wide_Character := Wide_Character'Val (234); LC_E_Diaeresis : constant Wide_Character := Wide_Character'Val (235); LC_I_Grave : constant Wide_Character := Wide_Character'Val (236); LC_I_Acute : constant Wide_Character := Wide_Character'Val (237); LC_I_Circumflex : constant Wide_Character := Wide_Character'Val (238); LC_I_Diaeresis : constant Wide_Character := Wide_Character'Val (239); -- Wide_Character positions 240 (16#F0#) .. 255 (16#FF) LC_Icelandic_Eth : constant Wide_Character := Wide_Character'Val (240); LC_N_Tilde : constant Wide_Character := Wide_Character'Val (241); LC_O_Grave : constant Wide_Character := Wide_Character'Val (242); LC_O_Acute : constant Wide_Character := Wide_Character'Val (243); LC_O_Circumflex : constant Wide_Character := Wide_Character'Val (244); LC_O_Tilde : constant Wide_Character := Wide_Character'Val (245); LC_O_Diaeresis : constant Wide_Character := Wide_Character'Val (246); Division_Sign : constant Wide_Character := Wide_Character'Val (247); LC_O_Oblique_Stroke : constant Wide_Character := Wide_Character'Val (248); LC_U_Grave : constant Wide_Character := Wide_Character'Val (249); LC_U_Acute : constant Wide_Character := Wide_Character'Val (250); LC_U_Circumflex : constant Wide_Character := Wide_Character'Val (251); LC_U_Diaeresis : constant Wide_Character := Wide_Character'Val (252); LC_Y_Acute : constant Wide_Character := Wide_Character'Val (253); LC_Icelandic_Thorn : constant Wide_Character := Wide_Character'Val (254); LC_Y_Diaeresis : constant Wide_Character := Wide_Character'Val (255); ------------------------------------------------ -- Summary of Changes from Latin-1 => Latin-9 -- ------------------------------------------------ -- 164 Currency => Euro_Sign -- 166 Broken_Bar => UC_S_Caron -- 168 Diaeresis => LC_S_Caron -- 180 Acute => UC_Z_Caron -- 184 Cedilla => LC_Z_Caron -- 188 Fraction_One_Quarter => UC_Ligature_OE -- 189 Fraction_One_Half => LC_Ligature_OE -- 190 Fraction_Three_Quarters => UC_Y_Diaeresis end Ada.Characters.Wide_Latin_9;
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- G N A T . S O U R C E _ I N F O -- -- -- -- S p e c -- -- -- -- Copyright (C) 2000-2014, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- This package provides some useful utility subprograms that provide access -- to source code information known at compile time. These subprograms are -- intrinsic operations that provide information known to the compiler in -- a form that can be embedded into the source program for identification -- and logging purposes. For example, an exception handler can print out -- the name of the source file in which the exception is handled. package GNAT.Source_Info is pragma Preelaborate; -- Note that this unit is Preelaborate, but not Pure, that's because the -- functions here such as Line are clearly not pure functions, and normally -- we mark intrinsic functions in a Pure unit as Pure, even though they are -- imported. -- -- Historical note: this used to be Pure, but that was when we marked all -- intrinsics as not Pure, even in Pure units, so no problems arose. function File return String with Import, Convention => Intrinsic; -- Return the name of the current file, not including the path information. -- The result is considered to be a static string constant. function Line return Positive with Import, Convention => Intrinsic; -- Return the current input line number. The result is considered to be a -- static expression. function Source_Location return String with Import, Convention => Intrinsic; -- Return a string literal of the form "name:line", where name is the -- current source file name without path information, and line is the -- current line number. In the event that instantiations are involved, -- additional suffixes of the same form are appended after the separating -- string " instantiated at ". The result is considered to be a static -- string constant. function Enclosing_Entity return String with Import, Convention => Intrinsic; -- Return the name of the current subprogram, package, task, entry or -- protected subprogram. The string is in exactly the form used for the -- declaration of the entity (casing and encoding conventions), and is -- considered to be a static string constant. The name is fully qualified -- using periods where possible (this is not always possible, notably in -- the case of entities appearing in unnamed block statements.) -- -- Note: if this function is used at the outer level of a generic package, -- the string returned will be the name of the instance, not the generic -- package itself. This is useful in identifying and logging information -- from within generic templates. function Compilation_Date return String with Import, Convention => Intrinsic; -- Returns date of compilation as a static string "mmm dd yyyy". This is -- in local time form, and is exactly compatible with C macro __DATE__. function Compilation_Time return String with Import, Convention => Intrinsic; -- Returns GMT time of compilation as a static string "hh:mm:ss". This is -- in local time form, and is exactly compatible with C macro __TIME__. end GNAT.Source_Info;
pragma Style_Checks (Off); -- This spec has been automatically generated from ATSAMD51G19A.svd pragma Restrictions (No_Elaboration_Code); with HAL; with System; package SAM_SVD.SUPC is pragma Preelaborate; --------------- -- Registers -- --------------- -- Interrupt Enable Clear type SUPC_INTENCLR_Register is record -- BOD33 Ready BOD33RDY : Boolean := False; -- BOD33 Detection BOD33DET : Boolean := False; -- BOD33 Synchronization Ready B33SRDY : Boolean := False; -- unspecified Reserved_3_7 : HAL.UInt5 := 16#0#; -- Voltage Regulator Ready VREGRDY : Boolean := False; -- unspecified Reserved_9_9 : HAL.Bit := 16#0#; -- VDDCORE Ready VCORERDY : Boolean := False; -- unspecified Reserved_11_31 : HAL.UInt21 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for SUPC_INTENCLR_Register use record BOD33RDY at 0 range 0 .. 0; BOD33DET at 0 range 1 .. 1; B33SRDY at 0 range 2 .. 2; Reserved_3_7 at 0 range 3 .. 7; VREGRDY at 0 range 8 .. 8; Reserved_9_9 at 0 range 9 .. 9; VCORERDY at 0 range 10 .. 10; Reserved_11_31 at 0 range 11 .. 31; end record; -- Interrupt Enable Set type SUPC_INTENSET_Register is record -- BOD33 Ready BOD33RDY : Boolean := False; -- BOD33 Detection BOD33DET : Boolean := False; -- BOD33 Synchronization Ready B33SRDY : Boolean := False; -- unspecified Reserved_3_7 : HAL.UInt5 := 16#0#; -- Voltage Regulator Ready VREGRDY : Boolean := False; -- unspecified Reserved_9_9 : HAL.Bit := 16#0#; -- VDDCORE Ready VCORERDY : Boolean := False; -- unspecified Reserved_11_31 : HAL.UInt21 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for SUPC_INTENSET_Register use record BOD33RDY at 0 range 0 .. 0; BOD33DET at 0 range 1 .. 1; B33SRDY at 0 range 2 .. 2; Reserved_3_7 at 0 range 3 .. 7; VREGRDY at 0 range 8 .. 8; Reserved_9_9 at 0 range 9 .. 9; VCORERDY at 0 range 10 .. 10; Reserved_11_31 at 0 range 11 .. 31; end record; -- Interrupt Flag Status and Clear type SUPC_INTFLAG_Register is record -- BOD33 Ready BOD33RDY : Boolean := False; -- BOD33 Detection BOD33DET : Boolean := False; -- BOD33 Synchronization Ready B33SRDY : Boolean := False; -- unspecified Reserved_3_7 : HAL.UInt5 := 16#0#; -- Voltage Regulator Ready VREGRDY : Boolean := False; -- unspecified Reserved_9_9 : HAL.Bit := 16#0#; -- VDDCORE Ready VCORERDY : Boolean := False; -- unspecified Reserved_11_31 : HAL.UInt21 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for SUPC_INTFLAG_Register use record BOD33RDY at 0 range 0 .. 0; BOD33DET at 0 range 1 .. 1; B33SRDY at 0 range 2 .. 2; Reserved_3_7 at 0 range 3 .. 7; VREGRDY at 0 range 8 .. 8; Reserved_9_9 at 0 range 9 .. 9; VCORERDY at 0 range 10 .. 10; Reserved_11_31 at 0 range 11 .. 31; end record; -- Power and Clocks Status type SUPC_STATUS_Register is record -- Read-only. BOD33 Ready BOD33RDY : Boolean; -- Read-only. BOD33 Detection BOD33DET : Boolean; -- Read-only. BOD33 Synchronization Ready B33SRDY : Boolean; -- unspecified Reserved_3_7 : HAL.UInt5; -- Read-only. Voltage Regulator Ready VREGRDY : Boolean; -- unspecified Reserved_9_9 : HAL.Bit; -- Read-only. VDDCORE Ready VCORERDY : Boolean; -- unspecified Reserved_11_31 : HAL.UInt21; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for SUPC_STATUS_Register use record BOD33RDY at 0 range 0 .. 0; BOD33DET at 0 range 1 .. 1; B33SRDY at 0 range 2 .. 2; Reserved_3_7 at 0 range 3 .. 7; VREGRDY at 0 range 8 .. 8; Reserved_9_9 at 0 range 9 .. 9; VCORERDY at 0 range 10 .. 10; Reserved_11_31 at 0 range 11 .. 31; end record; -- Action when Threshold Crossed type BOD33_ACTIONSelect is (-- No action NONE, -- The BOD33 generates a reset RESET, -- The BOD33 generates an interrupt INT, -- The BOD33 puts the device in backup sleep mode BKUP) with Size => 2; for BOD33_ACTIONSelect use (NONE => 0, RESET => 1, INT => 2, BKUP => 3); subtype SUPC_BOD33_HYST_Field is HAL.UInt4; -- Prescaler Select type BOD33_PSELSelect is (-- Not divided NODIV, -- Divide clock by 4 DIV4, -- Divide clock by 8 DIV8, -- Divide clock by 16 DIV16, -- Divide clock by 32 DIV32, -- Divide clock by 64 DIV64, -- Divide clock by 128 DIV128, -- Divide clock by 256 DIV256) with Size => 3; for BOD33_PSELSelect use (NODIV => 0, DIV4 => 1, DIV8 => 2, DIV16 => 3, DIV32 => 4, DIV64 => 5, DIV128 => 6, DIV256 => 7); subtype SUPC_BOD33_LEVEL_Field is HAL.UInt8; subtype SUPC_BOD33_VBATLEVEL_Field is HAL.UInt8; -- BOD33 Control type SUPC_BOD33_Register is record -- unspecified Reserved_0_0 : HAL.Bit := 16#0#; -- Enable ENABLE : Boolean := False; -- Action when Threshold Crossed ACTION : BOD33_ACTIONSelect := SAM_SVD.SUPC.NONE; -- Configuration in Standby mode STDBYCFG : Boolean := False; -- Run in Standby mode RUNSTDBY : Boolean := False; -- Run in Hibernate mode RUNHIB : Boolean := False; -- Run in Backup mode RUNBKUP : Boolean := False; -- Hysteresis value HYST : SUPC_BOD33_HYST_Field := 16#0#; -- Prescaler Select PSEL : BOD33_PSELSelect := SAM_SVD.SUPC.NODIV; -- unspecified Reserved_15_15 : HAL.Bit := 16#0#; -- Threshold Level for VDD LEVEL : SUPC_BOD33_LEVEL_Field := 16#0#; -- Threshold Level in battery backup sleep mode for VBAT VBATLEVEL : SUPC_BOD33_VBATLEVEL_Field := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for SUPC_BOD33_Register use record Reserved_0_0 at 0 range 0 .. 0; ENABLE at 0 range 1 .. 1; ACTION at 0 range 2 .. 3; STDBYCFG at 0 range 4 .. 4; RUNSTDBY at 0 range 5 .. 5; RUNHIB at 0 range 6 .. 6; RUNBKUP at 0 range 7 .. 7; HYST at 0 range 8 .. 11; PSEL at 0 range 12 .. 14; Reserved_15_15 at 0 range 15 .. 15; LEVEL at 0 range 16 .. 23; VBATLEVEL at 0 range 24 .. 31; end record; -- Voltage Regulator Selection type VREG_SELSelect is (-- LDO selection LDO, -- Buck selection BUCK) with Size => 1; for VREG_SELSelect use (LDO => 0, BUCK => 1); subtype SUPC_VREG_VSPER_Field is HAL.UInt3; -- VREG Control type SUPC_VREG_Register is record -- unspecified Reserved_0_0 : HAL.Bit := 16#0#; -- Enable ENABLE : Boolean := True; -- Voltage Regulator Selection SEL : VREG_SELSelect := SAM_SVD.SUPC.LDO; -- unspecified Reserved_3_6 : HAL.UInt4 := 16#0#; -- Run in Backup mode RUNBKUP : Boolean := False; -- unspecified Reserved_8_15 : HAL.UInt8 := 16#0#; -- Voltage Scaling Enable VSEN : Boolean := False; -- unspecified Reserved_17_23 : HAL.UInt7 := 16#0#; -- Voltage Scaling Period VSPER : SUPC_VREG_VSPER_Field := 16#0#; -- unspecified Reserved_27_31 : HAL.UInt5 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for SUPC_VREG_Register use record Reserved_0_0 at 0 range 0 .. 0; ENABLE at 0 range 1 .. 1; SEL at 0 range 2 .. 2; Reserved_3_6 at 0 range 3 .. 6; RUNBKUP at 0 range 7 .. 7; Reserved_8_15 at 0 range 8 .. 15; VSEN at 0 range 16 .. 16; Reserved_17_23 at 0 range 17 .. 23; VSPER at 0 range 24 .. 26; Reserved_27_31 at 0 range 27 .. 31; end record; -- Voltage Reference Selection type VREF_SELSelect is (-- 1.0V voltage reference typical value Val_1V0, -- 1.1V voltage reference typical value Val_1V1, -- 1.2V voltage reference typical value Val_1V2, -- 1.25V voltage reference typical value Val_1V25, -- 2.0V voltage reference typical value Val_2V0, -- 2.2V voltage reference typical value Val_2V2, -- 2.4V voltage reference typical value Val_2V4, -- 2.5V voltage reference typical value Val_2V5) with Size => 4; for VREF_SELSelect use (Val_1V0 => 0, Val_1V1 => 1, Val_1V2 => 2, Val_1V25 => 3, Val_2V0 => 4, Val_2V2 => 5, Val_2V4 => 6, Val_2V5 => 7); -- VREF Control type SUPC_VREF_Register is record -- unspecified Reserved_0_0 : HAL.Bit := 16#0#; -- Temperature Sensor Output Enable TSEN : Boolean := False; -- Voltage Reference Output Enable VREFOE : Boolean := False; -- Temperature Sensor Selection TSSEL : Boolean := False; -- unspecified Reserved_4_5 : HAL.UInt2 := 16#0#; -- Run during Standby RUNSTDBY : Boolean := False; -- On Demand Contrl ONDEMAND : Boolean := False; -- unspecified Reserved_8_15 : HAL.UInt8 := 16#0#; -- Voltage Reference Selection SEL : VREF_SELSelect := SAM_SVD.SUPC.Val_1V0; -- unspecified Reserved_20_31 : HAL.UInt12 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for SUPC_VREF_Register use record Reserved_0_0 at 0 range 0 .. 0; TSEN at 0 range 1 .. 1; VREFOE at 0 range 2 .. 2; TSSEL at 0 range 3 .. 3; Reserved_4_5 at 0 range 4 .. 5; RUNSTDBY at 0 range 6 .. 6; ONDEMAND at 0 range 7 .. 7; Reserved_8_15 at 0 range 8 .. 15; SEL at 0 range 16 .. 19; Reserved_20_31 at 0 range 20 .. 31; end record; -- Battery Backup Configuration type BBPS_CONFSelect is (-- The power switch is handled by the BOD33 BOD33, -- In Backup Domain, the backup domain is always supplied by battery backup -- power FORCED) with Size => 1; for BBPS_CONFSelect use (BOD33 => 0, FORCED => 1); -- Battery Backup Power Switch type SUPC_BBPS_Register is record -- Battery Backup Configuration CONF : BBPS_CONFSelect := SAM_SVD.SUPC.BOD33; -- unspecified Reserved_1_1 : HAL.Bit := 16#0#; -- Wake Enable WAKEEN : Boolean := False; -- unspecified Reserved_3_31 : HAL.UInt29 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for SUPC_BBPS_Register use record CONF at 0 range 0 .. 0; Reserved_1_1 at 0 range 1 .. 1; WAKEEN at 0 range 2 .. 2; Reserved_3_31 at 0 range 3 .. 31; end record; -- SUPC_BKOUT_ENOUT array type SUPC_BKOUT_ENOUT_Field_Array is array (0 .. 1) of Boolean with Component_Size => 1, Size => 2; -- Type definition for SUPC_BKOUT_ENOUT type SUPC_BKOUT_ENOUT_Field (As_Array : Boolean := False) is record case As_Array is when False => -- ENOUT as a value Val : HAL.UInt2; when True => -- ENOUT as an array Arr : SUPC_BKOUT_ENOUT_Field_Array; end case; end record with Unchecked_Union, Size => 2; for SUPC_BKOUT_ENOUT_Field use record Val at 0 range 0 .. 1; Arr at 0 range 0 .. 1; end record; -- SUPC_BKOUT_CLROUT array type SUPC_BKOUT_CLROUT_Field_Array is array (0 .. 1) of Boolean with Component_Size => 1, Size => 2; -- Type definition for SUPC_BKOUT_CLROUT type SUPC_BKOUT_CLROUT_Field (As_Array : Boolean := False) is record case As_Array is when False => -- CLROUT as a value Val : HAL.UInt2; when True => -- CLROUT as an array Arr : SUPC_BKOUT_CLROUT_Field_Array; end case; end record with Unchecked_Union, Size => 2; for SUPC_BKOUT_CLROUT_Field use record Val at 0 range 0 .. 1; Arr at 0 range 0 .. 1; end record; -- SUPC_BKOUT_SETOUT array type SUPC_BKOUT_SETOUT_Field_Array is array (0 .. 1) of Boolean with Component_Size => 1, Size => 2; -- Type definition for SUPC_BKOUT_SETOUT type SUPC_BKOUT_SETOUT_Field (As_Array : Boolean := False) is record case As_Array is when False => -- SETOUT as a value Val : HAL.UInt2; when True => -- SETOUT as an array Arr : SUPC_BKOUT_SETOUT_Field_Array; end case; end record with Unchecked_Union, Size => 2; for SUPC_BKOUT_SETOUT_Field use record Val at 0 range 0 .. 1; Arr at 0 range 0 .. 1; end record; -- SUPC_BKOUT_RTCTGLOUT array type SUPC_BKOUT_RTCTGLOUT_Field_Array is array (0 .. 1) of Boolean with Component_Size => 1, Size => 2; -- Type definition for SUPC_BKOUT_RTCTGLOUT type SUPC_BKOUT_RTCTGLOUT_Field (As_Array : Boolean := False) is record case As_Array is when False => -- RTCTGLOUT as a value Val : HAL.UInt2; when True => -- RTCTGLOUT as an array Arr : SUPC_BKOUT_RTCTGLOUT_Field_Array; end case; end record with Unchecked_Union, Size => 2; for SUPC_BKOUT_RTCTGLOUT_Field use record Val at 0 range 0 .. 1; Arr at 0 range 0 .. 1; end record; -- Backup Output Control type SUPC_BKOUT_Register is record -- Enable OUT0 ENOUT : SUPC_BKOUT_ENOUT_Field := (As_Array => False, Val => 16#0#); -- unspecified Reserved_2_7 : HAL.UInt6 := 16#0#; -- Clear OUT0 CLROUT : SUPC_BKOUT_CLROUT_Field := (As_Array => False, Val => 16#0#); -- unspecified Reserved_10_15 : HAL.UInt6 := 16#0#; -- Set OUT0 SETOUT : SUPC_BKOUT_SETOUT_Field := (As_Array => False, Val => 16#0#); -- unspecified Reserved_18_23 : HAL.UInt6 := 16#0#; -- RTC Toggle OUT0 RTCTGLOUT : SUPC_BKOUT_RTCTGLOUT_Field := (As_Array => False, Val => 16#0#); -- unspecified Reserved_26_31 : HAL.UInt6 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for SUPC_BKOUT_Register use record ENOUT at 0 range 0 .. 1; Reserved_2_7 at 0 range 2 .. 7; CLROUT at 0 range 8 .. 9; Reserved_10_15 at 0 range 10 .. 15; SETOUT at 0 range 16 .. 17; Reserved_18_23 at 0 range 18 .. 23; RTCTGLOUT at 0 range 24 .. 25; Reserved_26_31 at 0 range 26 .. 31; end record; -- SUPC_BKIN_BKIN array type SUPC_BKIN_BKIN_Field_Array is array (0 .. 1) of Boolean with Component_Size => 1, Size => 2; -- Type definition for SUPC_BKIN_BKIN type SUPC_BKIN_BKIN_Field (As_Array : Boolean := False) is record case As_Array is when False => -- BKIN as a value Val : HAL.UInt2; when True => -- BKIN as an array Arr : SUPC_BKIN_BKIN_Field_Array; end case; end record with Unchecked_Union, Size => 2; for SUPC_BKIN_BKIN_Field use record Val at 0 range 0 .. 1; Arr at 0 range 0 .. 1; end record; -- Backup Input Control type SUPC_BKIN_Register is record -- Read-only. Backup Input 0 BKIN : SUPC_BKIN_BKIN_Field; -- unspecified Reserved_2_31 : HAL.UInt30; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for SUPC_BKIN_Register use record BKIN at 0 range 0 .. 1; Reserved_2_31 at 0 range 2 .. 31; end record; ----------------- -- Peripherals -- ----------------- -- Supply Controller type SUPC_Peripheral is record -- Interrupt Enable Clear INTENCLR : aliased SUPC_INTENCLR_Register; -- Interrupt Enable Set INTENSET : aliased SUPC_INTENSET_Register; -- Interrupt Flag Status and Clear INTFLAG : aliased SUPC_INTFLAG_Register; -- Power and Clocks Status STATUS : aliased SUPC_STATUS_Register; -- BOD33 Control BOD33 : aliased SUPC_BOD33_Register; -- VREG Control VREG : aliased SUPC_VREG_Register; -- VREF Control VREF : aliased SUPC_VREF_Register; -- Battery Backup Power Switch BBPS : aliased SUPC_BBPS_Register; -- Backup Output Control BKOUT : aliased SUPC_BKOUT_Register; -- Backup Input Control BKIN : aliased SUPC_BKIN_Register; end record with Volatile; for SUPC_Peripheral use record INTENCLR at 16#0# range 0 .. 31; INTENSET at 16#4# range 0 .. 31; INTFLAG at 16#8# range 0 .. 31; STATUS at 16#C# range 0 .. 31; BOD33 at 16#10# range 0 .. 31; VREG at 16#18# range 0 .. 31; VREF at 16#1C# range 0 .. 31; BBPS at 16#20# range 0 .. 31; BKOUT at 16#24# range 0 .. 31; BKIN at 16#28# range 0 .. 31; end record; -- Supply Controller SUPC_Periph : aliased SUPC_Peripheral with Import, Address => SUPC_Base; end SAM_SVD.SUPC;
------------------------------------------------------------------------------ -- Copyright (c) 2014-2017, Natacha Porté -- -- -- -- Permission to use, copy, modify, and distribute this software for any -- -- purpose with or without fee is hereby granted, provided that the above -- -- copyright notice and this permission notice appear in all copies. -- -- -- -- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -- -- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -- -- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -- -- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -- -- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -- -- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -- -- OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -- ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ -- Natools.S_Expressions.File_Writers provides a pretty printer -- -- implementation using Stream_IO as backend. -- ------------------------------------------------------------------------------ with Natools.S_Expressions.Printers.Pretty; private with Ada.Finalization; private with Ada.Streams.Stream_IO; package Natools.S_Expressions.File_Writers is type Writer is limited new Printers.Pretty.Printer with private; function Create (Name : String; Form : String := "") return Writer; function Open (Name : String; Form : String := "") return Writer; -- Constructors using respectively Stream_IO.Create and Stream_IO.Open procedure Create (Self : in out Writer; Name : in String; Form : in String := ""); procedure Open (Self : in out Writer; Name : in String; Form : in String := ""); -- Reinitialize Self using Stream_IO.Create or Stream_IO.Open function Open_Or_Create (Name : String; Form : String := "") return Writer; procedure Open_Or_Create (Self : in out Writer; Name : in String; Form : in String := ""); -- Construct or reinitialize a writer, trying a regular open first -- and attempting to create if it doesn't work. -- Note that there is some time between failure to open and actual -- file creation, which might lead to race conditions. function Name (Self : Writer) return String; -- Return the underlying file name private type Autoclose is new Ada.Finalization.Limited_Controlled with record File : Ada.Streams.Stream_IO.File_Type; end record; overriding procedure Finalize (Object : in out Autoclose); -- Close the underlying file if it was opened type Writer is limited new Printers.Pretty.Printer with record Holder : Autoclose; end record; overriding procedure Write_Raw (Output : in out Writer; Data : in Ada.Streams.Stream_Element_Array); -- Write data into the underlying stream end Natools.S_Expressions.File_Writers;
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- XML Processor -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2013-2016, Vadim Godunko <vgodunko@gmail.com> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with League.Characters; with XML.Templates.Processors.Parser; with XML.Templates.Streams.Holders; package body XML.Templates.Processors is use type League.Strings.Universal_String; Template_URI : constant League.Strings.Universal_String := League.Strings.To_Universal_String ("http://forge.ada-ru.org/matreshka/template"); Else_Name : constant League.Strings.Universal_String := League.Strings.To_Universal_String ("else"); Elsif_Name : constant League.Strings.Universal_String := League.Strings.To_Universal_String ("elsif"); Evaluate_Name : constant League.Strings.Universal_String := League.Strings.To_Universal_String ("evaluate"); Expression_Name : constant League.Strings.Universal_String := League.Strings.To_Universal_String ("expression"); If_Name : constant League.Strings.Universal_String := League.Strings.To_Universal_String ("if"); For_Name : constant League.Strings.Universal_String := League.Strings.To_Universal_String ("for"); Boolean_Name : constant League.Strings.Universal_String := League.Strings.To_Universal_String ("boolean."); procedure Substitute (Self : in out Template_Processor'Class; Text : League.Strings.Universal_String; In_Attribute : Boolean; Result : out League.Strings.Universal_String; Success : in out Boolean); -- Process text and substitute parameters. procedure Process_Stream (Content_Handler : in out XML.SAX.Content_Handlers .SAX_Content_Handler'Class; Lexical_Handler : in out XML.SAX.Lexical_Handlers .SAX_Lexical_Handler'Class; Stream : XML.Templates.Streams.XML_Stream_Element_Vectors.Vector; Success : in out Boolean); -- Process specified stream by dispatching each event to the content -- or handler the lexical handler. procedure Process_Characters (Self : in out Template_Processor'Class; Success : in out Boolean); -- Process accumulated character data. ---------------- -- Characters -- ---------------- overriding procedure Characters (Self : in out Template_Processor; Text : League.Strings.Universal_String; Success : in out Boolean) is pragma Unreferenced (Success); begin if Self.Accumulate /= 0 then Self.Stream.Append ((Kind => XML.Templates.Streams.Text, Location => (System_Id => Self.Locator.System_Id, Line => Self.Locator.Line, Column => Self.Locator.Column), Text => Text)); elsif Self.Skip /= 0 then null; else Self.Accumulated_Text.Append (Text); end if; end Characters; ------------- -- Comment -- ------------- overriding procedure Comment (Self : in out Template_Processor; Text : League.Strings.Universal_String; Success : in out Boolean) is begin if Self.Accumulate /= 0 then Self.Stream.Append ((Kind => XML.Templates.Streams.Comment, Location => (System_Id => Self.Locator.System_Id, Line => Self.Locator.Line, Column => Self.Locator.Column), Text => Text)); elsif Self.Skip /= 0 then null; else Self.Process_Characters (Success); if not Success then return; end if; Self.Lexical_Handler.Comment (Text, Success); if not Success then Self.Diagnosis := Self.Lexical_Handler.Error_String; end if; end if; end Comment; --------------- -- End_CDATA -- --------------- overriding procedure End_CDATA (Self : in out Template_Processor; Success : in out Boolean) is begin if Self.Accumulate /= 0 then Self.Stream.Append ((Kind => XML.Templates.Streams.End_CDATA, Location => (System_Id => Self.Locator.System_Id, Line => Self.Locator.Line, Column => Self.Locator.Column))); elsif Self.Skip /= 0 then null; else Self.Process_Characters (Success); if not Success then return; end if; Self.Lexical_Handler.End_CDATA (Success); if not Success then Self.Diagnosis := Self.Lexical_Handler.Error_String; end if; end if; end End_CDATA; ------------------ -- End_Document -- ------------------ overriding procedure End_Document (Self : in out Template_Processor; Success : in out Boolean) is begin Self.Content_Handler.End_Document (Success); if not Success then Self.Diagnosis := Self.Content_Handler.Error_String; end if; end End_Document; ------------- -- End_DTD -- ------------- overriding procedure End_DTD (Self : in out Template_Processor; Success : in out Boolean) is begin if Self.Accumulate /= 0 then Self.Stream.Append ((Kind => XML.Templates.Streams.End_DTD, Location => (System_Id => Self.Locator.System_Id, Line => Self.Locator.Line, Column => Self.Locator.Column))); elsif Self.Skip /= 0 then null; else Self.Lexical_Handler.End_DTD (Success); if not Success then Self.Diagnosis := Self.Lexical_Handler.Error_String; end if; end if; end End_DTD; ----------------- -- End_Element -- ----------------- overriding procedure End_Element (Self : in out Template_Processor; Namespace_URI : League.Strings.Universal_String; Local_Name : League.Strings.Universal_String; Qualified_Name : League.Strings.Universal_String; Success : in out Boolean) is begin if Self.Accumulate /= 0 then Self.Accumulate := Self.Accumulate - 1; if Self.Accumulate /= 0 then Self.Stream.Append ((Kind => XML.Templates.Streams.End_Element, Location => (System_Id => Self.Locator.System_Id, Line => Self.Locator.Line, Column => Self.Locator.Column), Namespace_URI => Namespace_URI, Local_Name => Local_Name, Qualified_Name => Qualified_Name)); elsif Namespace_URI = Template_URI then if Local_Name = For_Name then Self.Namespaces.Pop_Context; declare Cursor : League.Holders.Iterable_Holder_Cursors.Cursor'Class := League.Holders.First (Self.Container_Value); Stream : constant XML.Templates.Streams.XML_Stream_Element_Vectors.Vector := Self.Stream; Name : constant League.Strings.Universal_String := Self.Object_Name; Holder : League.Holders.Holder; Success : Boolean := True; begin Self.Stream.Clear; Self.Object_Name.Clear; while Cursor.Next loop Holder := Cursor.Element; if League.Holders.Is_Empty (Holder) then return; end if; Self.Parameters.Include (Name, Holder); Process_Stream (Self, Self, Stream, Success); Self.Process_Characters (Success); if not Success then return; end if; end loop; end; end if; end if; elsif Self.Skip /= 0 then Self.Skip := Self.Skip - 1; if Self.Skip = 0 then pragma Assert (Local_Name = If_Name); Pop (Self.Run_Else_Stack, Self.Run_Else); end if; else Self.Process_Characters (Success); if not Success then return; end if; Self.Namespaces.Pop_Context; if Namespace_URI = Template_URI then if Local_Name = If_Name then Pop (Self.Run_Else_Stack, Self.Run_Else); end if; else Self.Content_Handler.End_Element (Namespace_URI, Local_Name, Qualified_Name, Success); if not Success then Self.Diagnosis := Self.Content_Handler.Error_String; return; end if; end if; end if; end End_Element; ------------------- -- Set_Parameter -- ------------------- procedure Set_Parameter (Self : in out Template_Processor'Class; Name : League.Strings.Universal_String; Value : League.Holders.Holder) is begin Self.Parameters.Include (Name.To_Casefold, Value); end Set_Parameter; ------------------------ -- End_Prefix_Mapping -- ------------------------ overriding procedure End_Prefix_Mapping (Self : in out Template_Processor; Prefix : League.Strings.Universal_String; Success : in out Boolean) is begin if Self.Accumulate /= 0 then Self.Stream.Append ((Kind => XML.Templates.Streams.End_Prefix_Mapping, Location => (System_Id => Self.Locator.System_Id, Line => Self.Locator.Line, Column => Self.Locator.Column), Prefix => Prefix)); elsif Self.Skip /= 0 then null; else -- if Self.Namespaces.Namespace_URI (Prefix) /= Template_URI then Self.Content_Handler.End_Prefix_Mapping (Prefix, Success); if not Success then Self.Diagnosis := Self.Content_Handler.Error_String; end if; -- end if; end if; end End_Prefix_Mapping; ------------------ -- Error_String -- ------------------ overriding function Error_String (Self : Template_Processor) return League.Strings.Universal_String is begin return Self.Diagnosis; end Error_String; --------- -- Pop -- --------- procedure Pop (Self : in out Boolean_Stack; Value : out Boolean) is begin Value := Boolean'Val (Self and 1); Self := Self / 2; end Pop; ------------------------ -- Process_Characters -- ------------------------ procedure Process_Characters (Self : in out Template_Processor'Class; Success : in out Boolean) is Text : constant League.Strings.Universal_String := Self.Accumulated_Text; Aux : League.Strings.Universal_String; begin if not Text.Is_Empty then Self.Accumulated_Text.Clear; Self.Substitute (Text, False, Aux, Success); end if; end Process_Characters; -------------------- -- Process_Stream -- -------------------- procedure Process_Stream (Content_Handler : in out XML.SAX.Content_Handlers .SAX_Content_Handler'Class; Lexical_Handler : in out XML.SAX.Lexical_Handlers .SAX_Lexical_Handler'Class; Stream : XML.Templates.Streams.XML_Stream_Element_Vectors.Vector; Success : in out Boolean) is begin for Event of Stream loop case Event.Kind is when XML.Templates.Streams.Empty => raise Program_Error; when XML.Templates.Streams.Text => Content_Handler.Characters (Event.Text, Success); when XML.Templates.Streams.Start_Element => Content_Handler.Start_Element (Event.Namespace_URI, Event.Local_Name, Event.Qualified_Name, Event.Attributes, Success); when XML.Templates.Streams.End_Element => Content_Handler.End_Element (Event.Namespace_URI, Event.Local_Name, Event.Qualified_Name, Success); when XML.Templates.Streams.Start_Prefix_Mapping => Content_Handler.Start_Prefix_Mapping (Event.Prefix, Event.Mapped_Namespace_URI, Success); when XML.Templates.Streams.End_Prefix_Mapping => Content_Handler.End_Prefix_Mapping (Event.Prefix, Success); when XML.Templates.Streams.Processing_Instruction => Content_Handler.Processing_Instruction (Event.Target, Event.Data, Success); when XML.Templates.Streams.Comment => Lexical_Handler.Comment (Event.Text, Success); when XML.Templates.Streams.Start_CDATA => Lexical_Handler.Start_CDATA (Success); when XML.Templates.Streams.End_CDATA => Lexical_Handler.End_CDATA (Success); when XML.Templates.Streams.Start_DTD => Lexical_Handler.Start_DTD (Event.Name, Event.Public_Id, Event.System_Id, Success); when XML.Templates.Streams.End_DTD => Lexical_Handler.End_DTD (Success); end case; if not Success then return; end if; end loop; end Process_Stream; ---------------------------- -- Processing_Instruction -- ---------------------------- overriding procedure Processing_Instruction (Self : in out Template_Processor; Target : League.Strings.Universal_String; Data : League.Strings.Universal_String; Success : in out Boolean) is begin if Self.Accumulate /= 0 then Self.Stream.Append ((Kind => XML.Templates.Streams.Processing_Instruction, Location => (System_Id => Self.Locator.System_Id, Line => Self.Locator.Line, Column => Self.Locator.Column), Target => Target, Data => Data)); elsif Self.Skip /= 0 then null; else Self.Process_Characters (Success); if not Success then return; end if; Self.Content_Handler.Processing_Instruction (Target, Data, Success); if not Success then Self.Diagnosis := Self.Content_Handler.Error_String; end if; end if; end Processing_Instruction; ---------- -- Push -- ---------- procedure Push (Self : in out Boolean_Stack; Value : Boolean) is begin Self := Self * 2 + Boolean'Pos (Value); end Push; ------------------------- -- Set_Content_Handler -- ------------------------- procedure Set_Content_Handler (Self : in out Template_Processor'Class; Handler : XML.SAX.Readers.SAX_Content_Handler_Access) is begin Self.Content_Handler := Handler; end Set_Content_Handler; -------------------------- -- Set_Document_Locator -- -------------------------- overriding procedure Set_Document_Locator (Self : in out Template_Processor; Locator : XML.SAX.Locators.SAX_Locator) is begin Self.Locator := Locator; Self.Content_Handler.Set_Document_Locator (Locator); end Set_Document_Locator; ------------------------- -- Set_Lexical_Handler -- ------------------------- procedure Set_Lexical_Handler (Self : in out Template_Processor'Class; Handler : XML.SAX.Readers.SAX_Lexical_Handler_Access) is begin Self.Lexical_Handler := Handler; end Set_Lexical_Handler; ----------------- -- Start_CDATA -- ----------------- overriding procedure Start_CDATA (Self : in out Template_Processor; Success : in out Boolean) is begin if Self.Accumulate /= 0 then Self.Stream.Append ((Kind => XML.Templates.Streams.Start_CDATA, Location => (System_Id => Self.Locator.System_Id, Line => Self.Locator.Line, Column => Self.Locator.Column))); elsif Self.Skip /= 0 then null; else Self.Process_Characters (Success); if not Success then return; end if; Self.Lexical_Handler.Start_CDATA (Success); if not Success then Self.Diagnosis := Self.Lexical_Handler.Error_String; end if; end if; end Start_CDATA; -------------------- -- Start_Document -- -------------------- overriding procedure Start_Document (Self : in out Template_Processor; Success : in out Boolean) is begin Self.Content_Handler.Start_Document (Success); if not Success then Self.Diagnosis := Self.Content_Handler.Error_String; end if; end Start_Document; --------------- -- Start_DTD -- --------------- overriding procedure Start_DTD (Self : in out Template_Processor; Name : League.Strings.Universal_String; Public_Id : League.Strings.Universal_String; System_Id : League.Strings.Universal_String; Success : in out Boolean) is begin if Self.Accumulate /= 0 then Self.Stream.Append ((Kind => XML.Templates.Streams.Start_DTD, Location => (System_Id => Self.Locator.System_Id, Line => Self.Locator.Line, Column => Self.Locator.Column), Name => Name, Public_Id => Public_Id, System_Id => System_Id)); elsif Self.Skip /= 0 then null; else Self.Lexical_Handler.Start_DTD (Name, Public_Id, System_Id, Success); if not Success then Self.Diagnosis := Self.Lexical_Handler.Error_String; end if; end if; end Start_DTD; ------------------- -- Start_Element -- ------------------- overriding procedure Start_Element (Self : in out Template_Processor; Namespace_URI : League.Strings.Universal_String; Local_Name : League.Strings.Universal_String; Qualified_Name : League.Strings.Universal_String; Attributes : XML.SAX.Attributes.SAX_Attributes; Success : in out Boolean) is Result : XML.SAX.Attributes.SAX_Attributes; Aux : League.Strings.Universal_String; Value : Boolean; begin if Self.Accumulate /= 0 then Self.Accumulate := Self.Accumulate + 1; Self.Stream.Append ((Kind => XML.Templates.Streams.Start_Element, Location => (System_Id => Self.Locator.System_Id, Line => Self.Locator.Line, Column => Self.Locator.Column), Namespace_URI => Namespace_URI, Local_Name => Local_Name, Qualified_Name => Qualified_Name, Attributes => Attributes)); elsif Self.Skip > 1 or else (Self.Skip = 1 and not (Self.Run_Else and Namespace_URI = Template_URI and Local_Name in Else_Name | Elsif_Name)) then Self.Skip := Self.Skip + 1; else Self.Process_Characters (Success); Self.Namespaces.Push_Context; if not Success then return; end if; if Namespace_URI = Template_URI then if Local_Name in Evaluate_Name | For_Name | If_Name | Elsif_Name and then not Attributes.Is_Specified (Expression_Name) then -- Expression is not specified. Self.Diagnosis := League.Strings.To_Universal_String ("'expression' attribute is not specified"); Success := False; return; elsif Local_Name = Evaluate_Name then declare Value : League.Holders.Holder; begin Parser.Evaluate_Simple_Expression (Attributes (Expression_Name), Self.Parameters, Value, Success); if League.Holders.Has_Tag (Value, XML.Templates.Streams.Holders.Value_Tag) then Process_Stream (Self, Self, XML.Templates.Streams.Holders.Element (Value), Success); if not Success then return; end if; else raise Program_Error; end if; end; elsif Local_Name = For_Name then Parser.Evaluate_For_Expression (Attributes (Expression_Name), Self.Parameters, Self.Object_Name, Self.Container_Value, Success); if not Success then return; end if; -- Enable accumulation of SAX events for future processing. Self.Accumulate := 1; elsif Local_Name = If_Name then Push (Self.Run_Else_Stack, Self.Run_Else); Self.Run_Else := True; Parser.Evaluate_Boolean_Expression (Attributes (Expression_Name), Self.Parameters, Value, Success); if not Success then return; end if; if Value then Self.Run_Else := False; else Self.Skip := 1; end if; elsif Local_Name = Elsif_Name then if not Self.Run_Else then Self.Skip := 2; -- Skip 'elsif' and everything after it return; end if; Parser.Evaluate_Boolean_Expression (Attributes (Expression_Name), Self.Parameters, Value, Success); if not Success then return; end if; if Value then Self.Run_Else := False; Self.Skip := 0; else Self.Skip := 2; -- Skip 'elsif' and everything after it end if; elsif Local_Name = Else_Name then if Self.Run_Else then Self.Skip := 0; else Self.Skip := 2; -- Skip 'else' and everything after it end if; else raise Program_Error; end if; else for J in 1 .. Attributes.Length loop if Attributes.Namespace_URI (J) = Template_URI then if Attributes.Local_Name (J).Starts_With (Boolean_Name) then Parser.Evaluate_Boolean_Expression (Attributes.Value (J), Self.Parameters, Value, Success); if not Success then return; end if; if Value then Aux := Attributes.Local_Name (J).Tail_From (Boolean_Name.Length + 1); Result.Set_Value (Aux, Aux); end if; else raise Program_Error; end if; elsif Attributes.Namespace_URI (J).Is_Empty then Self.Substitute (Attributes (J), True, Aux, Success); Result.Set_Value (Attributes.Qualified_Name (J), Aux); else Self.Substitute (Attributes (J), True, Aux, Success); Result.Set_Value (Attributes.Namespace_URI (J), Attributes.Local_Name (J), Aux); end if; if not Success then return; end if; end loop; Self.Content_Handler.Start_Element (Namespace_URI, Local_Name, Qualified_Name, Result, Success); if not Success then Self.Diagnosis := Self.Content_Handler.Error_String; end if; end if; end if; end Start_Element; -------------------------- -- Start_Prefix_Mapping -- -------------------------- overriding procedure Start_Prefix_Mapping (Self : in out Template_Processor; Prefix : League.Strings.Universal_String; Namespace_URI : League.Strings.Universal_String; Success : in out Boolean) is begin if Self.Accumulate /= 0 then Self.Stream.Append ((Kind => XML.Templates.Streams.Start_Prefix_Mapping, Location => (System_Id => Self.Locator.System_Id, Line => Self.Locator.Line, Column => Self.Locator.Column), Prefix => Prefix, Mapped_Namespace_URI => Namespace_URI)); elsif Self.Skip /= 0 then null; else Self.Namespaces.Declare_Prefix (Prefix, Namespace_URI); if Namespace_URI /= Template_URI then Self.Content_Handler.Start_Prefix_Mapping (Prefix, Namespace_URI, Success); if not Success then Self.Diagnosis := Self.Content_Handler.Error_String; end if; end if; end if; end Start_Prefix_Mapping; ---------------- -- Substitute -- ---------------- procedure Substitute (Self : in out Template_Processor'Class; Text : League.Strings.Universal_String; In_Attribute : Boolean; Result : out League.Strings.Universal_String; Success : in out Boolean) is use type League.Characters.Universal_Character; procedure Process_Expression (Text : League.Strings.Universal_String; Success : in out Boolean); -- Parse and execute expression. ------------------------ -- Process_Expression -- ------------------------ procedure Process_Expression (Text : League.Strings.Universal_String; Success : in out Boolean) is Value : League.Holders.Holder; begin Parser.Evaluate_Simple_Expression (Text, Self.Parameters, Value, Success); if not Success then raise Program_Error; end if; if League.Holders.Is_Universal_String (Value) then if In_Attribute then Result.Append (League.Holders.Element (Value)); else Self.Content_Handler.Characters (League.Holders.Element (Value), Success); if not Success then Self.Diagnosis := Self.Content_Handler.Error_String; return; end if; end if; elsif League.Holders.Has_Tag (Value, XML.Templates.Streams.Holders.Value_Tag) then if In_Attribute then raise Program_Error; else Process_Stream (Self.Content_Handler.all, Self.Lexical_Handler.all, XML.Templates.Streams.Holders.Element (Value), Success); if not Success then return; end if; end if; else raise Program_Error; end if; end Process_Expression; First : Positive := 1; Dollar : Natural; Last : Natural; begin Result.Clear; while First <= Text.Length loop Dollar := Text.Index (First, '$'); if Dollar = 0 then if In_Attribute then Result.Append (Text.Slice (First, Text.Length)); else Self.Content_Handler.Characters (Text.Slice (First, Text.Length), Success); if not Success then Self.Diagnosis := Self.Content_Handler.Error_String; return; end if; end if; First := Text.Length + 1; else if In_Attribute then Result.Append (Text.Slice (First, Dollar - 1)); else Self.Content_Handler.Characters (Text.Slice (First, Dollar - 1), Success); if not Success then Self.Diagnosis := Self.Content_Handler.Error_String; return; end if; end if; if Dollar = Text.Length or else Text (Dollar + 1) /= '{' then if In_Attribute then Result.Append ('$'); else Self.Content_Handler.Characters (Text.Slice (Dollar, Dollar), Success); if not Success then Self.Diagnosis := Self.Content_Handler.Error_String; return; end if; end if; if Dollar < Text.Length and then Text (Dollar + 1) = '$' then -- Escaped dollar sign. First := Dollar + 2; else First := Dollar + 1; end if; else -- Expression. First := Dollar + 2; Dollar := Text.Index (First, '}'); if Dollar = 0 then raise Program_Error; else Last := Dollar - 1; Process_Expression (Text.Slice (First, Last), Success); First := Dollar + 1; if not Success then return; end if; end if; end if; end if; end loop; end Substitute; end XML.Templates.Processors;
----------------------------------------------------------------------- -- upload_servlet -- Servlet example to upload files on the server -- Copyright (C) 2012, 2015, 2018 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Ada.Streams; with Util.Streams.Pipes; with Util.Strings; with Servlet.Parts; package body Upload_Servlet is -- ------------------------------ -- Write the upload form page with an optional response message. -- ------------------------------ procedure Write (Response : in out Responses.Response'Class; Message : in String) is Output : Streams.Print_Stream := Response.Get_Output_Stream; begin Output.Write ("<html><head><title>Upload servlet example</title></head>" & "<style></style>" & "<body>" & "<h1>Upload files to identify them</h1>"); -- Display the response or some error. if Message /= "" then Output.Write ("<h2>" & Message & "</h2>"); end if; -- Render the form. If we have some existing Radius or Height -- use them to set the initial values. Output.Write ("<p>Identifies images, PDF, tar, tar.gz, zip</p>" & "<form method='post' enctype='multipart/form-data'>" & "<table>" & "<tr><td>File 1</td>" & "<td><input type='file' size='50' name='file1' maxlength='100000'/></td>" & "</tr><tr><td>File 2</td>" & "<td><input type='file' size='50' name='file2' maxlength='100000'/></td>" & "</tr><tr><td>File 3</td>" & "<td><input type='file' size='50' name='file3' maxlength='100000'/></td>" & "</tr>" & "<tr><td></td><td><input type='submit' value='Identify'></input></td></tr>" & "</table></form>" & "</body></html>"); Response.Set_Status (Responses.SC_OK); end Write; -- ------------------------------ -- Called by the servlet container when a GET request is received. -- Display the volume form page. -- ------------------------------ procedure Do_Get (Server : in Servlet; Request : in out Requests.Request'Class; Response : in out Responses.Response'Class) is pragma Unreferenced (Server, Request); begin Write (Response, ""); end Do_Get; -- ------------------------------ -- Execute a command and write the result to the output stream. -- ------------------------------ procedure Execute (Command : in String; Output : in out Streams.Print_Stream) is use type Ada.Streams.Stream_Element_Offset; Proc : Util.Streams.Pipes.Pipe_Stream; Content : Ada.Streams.Stream_Element_Array (0 .. 1024); Pos : Ada.Streams.Stream_Element_Offset; begin Proc.Open (Command); loop Proc.Read (Into => Content, Last => Pos); exit when Pos < 0; Output.Write (Content (0 .. Pos)); end loop; Proc.Close; if Proc.Get_Exit_Status /= 0 then Output.Write ("Command '" & Command & "' exited with code " & Integer'Image (Proc.Get_Exit_Status)); end if; end Execute; -- ------------------------------ -- Guess a file type depending on a content type or a file name. -- ------------------------------ function Get_File_Type (Content_Type : in String; Name : in String) return File_Type is begin if Content_Type = "application/pdf" then return PDF; elsif Content_Type = "image/png" or Content_Type = "image/jpeg" then return IMAGE; elsif Content_Type = "image/gif" then return IMAGE; elsif Content_Type = "application/zip" then return ZIP; end if; declare Ext_Pos : constant Natural := Util.Strings.Rindex (Name, '.'); begin if Ext_Pos > 0 then if Name (Ext_Pos .. Name'Last) = ".gz" or Name (Ext_Pos .. Name'Last) = ".tgz" then return TAR_GZ; elsif Name (Ext_Pos .. Name'Last) = ".tar" then return TAR; elsif Name (Ext_Pos .. Name'Last) = ".jpg" or Name (Ext_Pos .. Name'Last) = ".gif" or Name (Ext_Pos .. Name'Last) = ".xbm" or Name (Ext_Pos .. Name'Last) = ".png" then return IMAGE; elsif Name (Ext_Pos .. Name'Last) = ".zip" or Name (Ext_Pos .. Name'Last) = ".jar" then return ZIP; elsif Name (Ext_Pos .. Name'Last) = ".pdf" then return PDF; end if; end if; return UNKNOWN; end; end Get_File_Type; -- ------------------------------ -- Called by the servlet container when a POST request is received. -- Receives the uploaded files and identify them using some external command. -- ------------------------------ procedure Do_Post (Server : in Servlet; Request : in out Requests.Request'Class; Response : in out Responses.Response'Class) is pragma Unreferenced (Server); procedure Process_Part (Part : in Parts.Part'Class); Output : Streams.Print_Stream := Response.Get_Output_Stream; procedure Process_Part (Part : in Parts.Part'Class) is Name : constant String := Part.Get_Name; Content_Type : constant String := Part.Get_Content_Type; Path : constant String := Part.Get_Local_Filename; Kind : constant File_Type := Get_File_Type (Content_Type, Name); begin Output.Write ("<tr><td>Name: " & Name); Output.Write ("</td><td>Content_Type: " & Content_Type & "</td>"); Output.Write ("<td>Path: " & Path & "</td>"); Output.Write ("<td>Length: " & Natural'Image (Part.Get_Size) & "</td>"); Output.Write ("</tr><tr><td></td><td colspan='3'><pre>"); case Kind is when TAR_GZ => Execute ("tar tvzf " & Path, Output); when TAR => Execute ("tar tvf " & Path, Output); when IMAGE => Execute ("identify " & Path, Output); when ZIP => Execute ("zipinfo " & Path, Output); when PDF => Execute ("pdfinfo " & Path, Output); when others => Output.Write ("Unknown file type"); end case; Output.Write ("</pre></td></tr>"); end Process_Part; begin Response.Set_Content_Type ("text/html"); Output.Write ("<html><body>"); Output.Write ("<table style='width: 100%;'>"); for I in 1 .. Request.Get_Part_Count loop Request.Process_Part (I, Process_Part'Access); end loop; Output.Write ("<tr><td colspan='5'><a href='upload.html'>Upload new files</a></td></tr>"); Output.Write ("</table>"); Output.Write ("</body></html>"); end Do_Post; end Upload_Servlet;
-- Copyright (c) 2019 Maxim Reznik <reznikmm@gmail.com> -- -- SPDX-License-Identifier: MIT -- License-Filename: LICENSE ------------------------------------------------------------- package body Program.Nodes.Entry_Index_Specifications is function Create (For_Token : not null Program.Lexical_Elements .Lexical_Element_Access; Name : not null Program.Elements.Defining_Identifiers .Defining_Identifier_Access; In_Token : not null Program.Lexical_Elements .Lexical_Element_Access; Entry_Index_Subtype : not null Program.Elements.Discrete_Ranges .Discrete_Range_Access) return Entry_Index_Specification is begin return Result : Entry_Index_Specification := (For_Token => For_Token, Name => Name, In_Token => In_Token, Entry_Index_Subtype => Entry_Index_Subtype, Enclosing_Element => null) do Initialize (Result); end return; end Create; function Create (Name : not null Program.Elements.Defining_Identifiers .Defining_Identifier_Access; Entry_Index_Subtype : not null Program.Elements.Discrete_Ranges .Discrete_Range_Access; Is_Part_Of_Implicit : Boolean := False; Is_Part_Of_Inherited : Boolean := False; Is_Part_Of_Instance : Boolean := False) return Implicit_Entry_Index_Specification is begin return Result : Implicit_Entry_Index_Specification := (Name => Name, Entry_Index_Subtype => Entry_Index_Subtype, Is_Part_Of_Implicit => Is_Part_Of_Implicit, Is_Part_Of_Inherited => Is_Part_Of_Inherited, Is_Part_Of_Instance => Is_Part_Of_Instance, Enclosing_Element => null) do Initialize (Result); end return; end Create; overriding function Name (Self : Base_Entry_Index_Specification) return not null Program.Elements.Defining_Identifiers .Defining_Identifier_Access is begin return Self.Name; end Name; overriding function Entry_Index_Subtype (Self : Base_Entry_Index_Specification) return not null Program.Elements.Discrete_Ranges.Discrete_Range_Access is begin return Self.Entry_Index_Subtype; end Entry_Index_Subtype; overriding function For_Token (Self : Entry_Index_Specification) return not null Program.Lexical_Elements.Lexical_Element_Access is begin return Self.For_Token; end For_Token; overriding function In_Token (Self : Entry_Index_Specification) return not null Program.Lexical_Elements.Lexical_Element_Access is begin return Self.In_Token; end In_Token; overriding function Is_Part_Of_Implicit (Self : Implicit_Entry_Index_Specification) return Boolean is begin return Self.Is_Part_Of_Implicit; end Is_Part_Of_Implicit; overriding function Is_Part_Of_Inherited (Self : Implicit_Entry_Index_Specification) return Boolean is begin return Self.Is_Part_Of_Inherited; end Is_Part_Of_Inherited; overriding function Is_Part_Of_Instance (Self : Implicit_Entry_Index_Specification) return Boolean is begin return Self.Is_Part_Of_Instance; end Is_Part_Of_Instance; procedure Initialize (Self : aliased in out Base_Entry_Index_Specification'Class) is begin Set_Enclosing_Element (Self.Name, Self'Unchecked_Access); Set_Enclosing_Element (Self.Entry_Index_Subtype, Self'Unchecked_Access); null; end Initialize; overriding function Is_Entry_Index_Specification_Element (Self : Base_Entry_Index_Specification) return Boolean is pragma Unreferenced (Self); begin return True; end Is_Entry_Index_Specification_Element; overriding function Is_Declaration_Element (Self : Base_Entry_Index_Specification) return Boolean is pragma Unreferenced (Self); begin return True; end Is_Declaration_Element; overriding procedure Visit (Self : not null access Base_Entry_Index_Specification; Visitor : in out Program.Element_Visitors.Element_Visitor'Class) is begin Visitor.Entry_Index_Specification (Self); end Visit; overriding function To_Entry_Index_Specification_Text (Self : aliased in out Entry_Index_Specification) return Program.Elements.Entry_Index_Specifications .Entry_Index_Specification_Text_Access is begin return Self'Unchecked_Access; end To_Entry_Index_Specification_Text; overriding function To_Entry_Index_Specification_Text (Self : aliased in out Implicit_Entry_Index_Specification) return Program.Elements.Entry_Index_Specifications .Entry_Index_Specification_Text_Access is pragma Unreferenced (Self); begin return null; end To_Entry_Index_Specification_Text; end Program.Nodes.Entry_Index_Specifications;
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- A D A . S T R I N G S . W I D E _ W I D E _ U N B O U N D E D . A U X -- -- -- -- S p e c -- -- -- -- Copyright (C) 1992-2009, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- This child package of Ada.Strings.Wide_Wide_Unbounded provides some -- specialized access functions which are intended to allow more efficient -- use of the facilities of Ada.Strings.Wide_Wide_Unbounded, particularly by -- other layered utilities. package Ada.Strings.Wide_Wide_Unbounded.Aux is pragma Preelaborate; subtype Big_Wide_Wide_String is Wide_Wide_String (Positive); type Big_Wide_Wide_String_Access is access all Big_Wide_Wide_String; procedure Get_Wide_Wide_String (U : Unbounded_Wide_Wide_String; S : out Big_Wide_Wide_String_Access; L : out Natural); pragma Inline (Get_Wide_Wide_String); -- This procedure returns the internal string pointer used in the -- representation of an unbounded string as well as the actual current -- length (which may be less than S.all'Length because in general there -- can be extra space assigned). The characters of this string may be -- not be modified via the returned pointer, and are valid only as -- long as the original unbounded string is not accessed or modified. -- -- This procedure is more efficient than the use of To_Wide_Wide_String -- since it avoids the need to copy the string. The lower bound of the -- referenced string returned by this call is always one, so the actual -- string data is always accessible as S (1 .. L). procedure Set_Wide_Wide_String (UP : out Unbounded_Wide_Wide_String; S : Wide_Wide_String) renames Set_Unbounded_Wide_Wide_String; -- This function sets the string contents of the referenced unbounded -- string to the given string value. It is significantly more efficient -- than the use of To_Unbounded_Wide_Wide_String with an assignment, since -- it avoids the necessity of messing with finalization chains. The lower -- bound of the string S is not required to be one. procedure Set_Wide_Wide_String (UP : in out Unbounded_Wide_Wide_String; S : Wide_Wide_String_Access); pragma Inline (Set_Wide_Wide_String); -- This version of Set_Wide_Wide_String takes a string access value, rather -- than string. The lower bound of the string value is required to be one, -- and this requirement is not checked. end Ada.Strings.Wide_Wide_Unbounded.Aux;
-- Copyright 2017-2021 Jeff Foley. All rights reserved. -- Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. local json = require("json") name = "FullHunt" type = "api" function start() set_rate_limit(1) end function vertical(ctx, domain) local resp, err = request(ctx, {['url']=build_url(domain)}) if (err ~= nil and err ~= "") then log(ctx, "vertical request to service failed: " .. err) return end local j = json.decode(resp) if (j == nil or j.hosts == nil or #(j.hosts) == 0) then return end for _, h in pairs(j.hosts) do if (h.domain ~= nil and h.domain == domain and h.host ~= nil and h.host ~= "") then new_name(ctx, h.host) if (h.ip_address ~= nil and h.ip_address ~= "") then new_addr(ctx, h.ip_address, domain) end if (h.dns ~= nil) then if (h.dns.cname ~= nil and #(h.dns.cname) > 0) then names_from_table(ctx, domain, h.dns.cname) end if (h.dns.ptr ~= nil and #(h.dns.ptr) > 0) then names_from_table(ctx, domain, h.dns.ptr) end if (h.dns.a ~= nil and #(h.dns.a) > 0) then addrs_from_table(ctx, domain, h.dns.a) end if (h.dns.aaaa ~= nil and #(h.dns.aaaa) > 0) then addrs_from_table(ctx, domain, h.dns.aaaa) end end end end end function names_from_table(ctx, domain, t) if t == nil then return end for _, name in pairs(t) do if in_scope(ctx, name) then new_name(ctx, name) end end end function addrs_from_table(ctx, domain, t) if t == nil then return end for _, addr in pairs(t) do new_addr(ctx, addr, domain) end end function build_url(domain) return "https://fullhunt.io/api/v1/domain/" .. domain .. "/details" end
with Ada.Containers; use Ada.Containers; with Ada.Directories; use Ada.Directories; with Blueprint; use Blueprint; with AAA.Strings; use AAA.Strings; with Ada.Command_Line; with Templates_Parser; with Filesystem; with Commands; package body Commands.Announce is ------------- -- Execute -- ------------- overriding procedure Execute (Cmd : in out Instance; Args : AAA.Strings.Vector) is begin null; end Execute; -------------------- -- Setup_Switches -- -------------------- overriding procedure Setup_Switches (Cmd : in out Instance; Config : in out CLIC.Subcommand.Switches_Configuration) is use CLIC.Subcommand; begin null; end Setup_Switches; end Commands.Announce;
----------------------------------------------------------------------- -- awa-storages-beans -- Storage Ada Beans -- Copyright (C) 2012 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with ASF.Parts; with ASF.Parts.Upload_Method; with ASF.Events.Faces.Actions; package body AWA.Storages.Beans.Factories is package Upload_Binding is new ASF.Events.Faces.Actions.Action_Method.Bind (Bean => Upload_Bean, Method => Upload, Name => "upload"); package Delete_Binding is new ASF.Events.Faces.Actions.Action_Method.Bind (Bean => Upload_Bean, Method => Delete, Name => "delete"); package Save_Part_Binding is new ASF.Parts.Upload_Method.Bind (Name => "save", Bean => Upload_Bean, Method => Save_Part); Upload_Bean_Binding : aliased constant Util.Beans.Methods.Method_Binding_Array := (1 => Upload_Binding.Proxy'Access, 2 => Save_Part_Binding.Proxy'Access, 3 => Delete_Binding.Proxy'Access); -- ------------------------------ -- This bean provides some methods that can be used in a Method_Expression -- ------------------------------ overriding function Get_Method_Bindings (From : in Upload_Bean) return Util.Beans.Methods.Method_Binding_Array_Access is pragma Unreferenced (From); begin return Upload_Bean_Binding'Access; end Get_Method_Bindings; -- ------------------------------ -- Create the Upload_Bean bean instance. -- ------------------------------ function Create_Upload_Bean (Module : in AWA.Storages.Modules.Storage_Module_Access) return Util.Beans.Basic.Readonly_Bean_Access is Result : constant Upload_Bean_Access := new Upload_Bean; begin Result.Module := Module; return Result.all'Access; end Create_Upload_Bean; package Folder_Save_Binding is new ASF.Events.Faces.Actions.Action_Method.Bind (Bean => Folder_Bean, Method => Save, Name => "save"); Folder_Bean_Binding : aliased constant Util.Beans.Methods.Method_Binding_Array := (1 => Folder_Save_Binding.Proxy'Access); -- ------------------------------ -- Set the value identified by the name. -- ------------------------------ overriding procedure Set_Value (From : in out Folder_Bean; Name : in String; Value : in Util.Beans.Objects.Object) is begin if Name = "name" then From.Set_Name (Util.Beans.Objects.To_String (Value)); end if; end Set_Value; -- ------------------------------ -- This bean provides some methods that can be used in a Method_Expression -- ------------------------------ overriding function Get_Method_Bindings (From : in Folder_Bean) return Util.Beans.Methods.Method_Binding_Array_Access is pragma Unreferenced (From); begin return Folder_Bean_Binding'Access; end Get_Method_Bindings; -- ------------------------------ -- Create the Upload_Bean bean instance. -- ------------------------------ function Create_Folder_Bean (Module : in AWA.Storages.Modules.Storage_Module_Access) return Util.Beans.Basic.Readonly_Bean_Access is Result : constant Folder_Bean_Access := new Folder_Bean; begin Result.Module := Module; return Result.all'Access; end Create_Folder_Bean; end AWA.Storages.Beans.Factories;
------------------------------------------------------------------------------ -- -- -- GNAT LIBRARY COMPONENTS -- -- -- -- A D A . C O N T A I N E R S . B O U N D E D _ O R D E R E D _ M A P S -- -- -- -- B o d y -- -- -- -- Copyright (C) 2004-2015, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- This unit was originally developed by Matthew J Heaney. -- ------------------------------------------------------------------------------ with Ada.Containers.Helpers; use Ada.Containers.Helpers; with Ada.Containers.Red_Black_Trees.Generic_Bounded_Operations; pragma Elaborate_All (Ada.Containers.Red_Black_Trees.Generic_Bounded_Operations); with Ada.Containers.Red_Black_Trees.Generic_Bounded_Keys; pragma Elaborate_All (Ada.Containers.Red_Black_Trees.Generic_Bounded_Keys); with System; use type System.Address; package body Ada.Containers.Bounded_Ordered_Maps is pragma Warnings (Off, "variable ""Busy*"" is not referenced"); pragma Warnings (Off, "variable ""Lock*"" is not referenced"); -- See comment in Ada.Containers.Helpers ----------------------------- -- Node Access Subprograms -- ----------------------------- -- These subprograms provide a functional interface to access fields -- of a node, and a procedural interface for modifying these values. function Color (Node : Node_Type) return Color_Type; pragma Inline (Color); function Left (Node : Node_Type) return Count_Type; pragma Inline (Left); function Parent (Node : Node_Type) return Count_Type; pragma Inline (Parent); function Right (Node : Node_Type) return Count_Type; pragma Inline (Right); procedure Set_Parent (Node : in out Node_Type; Parent : Count_Type); pragma Inline (Set_Parent); procedure Set_Left (Node : in out Node_Type; Left : Count_Type); pragma Inline (Set_Left); procedure Set_Right (Node : in out Node_Type; Right : Count_Type); pragma Inline (Set_Right); procedure Set_Color (Node : in out Node_Type; Color : Color_Type); pragma Inline (Set_Color); ----------------------- -- Local Subprograms -- ----------------------- function Is_Greater_Key_Node (Left : Key_Type; Right : Node_Type) return Boolean; pragma Inline (Is_Greater_Key_Node); function Is_Less_Key_Node (Left : Key_Type; Right : Node_Type) return Boolean; pragma Inline (Is_Less_Key_Node); -------------------------- -- Local Instantiations -- -------------------------- package Tree_Operations is new Red_Black_Trees.Generic_Bounded_Operations (Tree_Types); use Tree_Operations; package Key_Ops is new Red_Black_Trees.Generic_Bounded_Keys (Tree_Operations => Tree_Operations, Key_Type => Key_Type, Is_Less_Key_Node => Is_Less_Key_Node, Is_Greater_Key_Node => Is_Greater_Key_Node); --------- -- "<" -- --------- function "<" (Left, Right : Cursor) return Boolean is begin if Checks and then Left.Node = 0 then raise Constraint_Error with "Left cursor of ""<"" equals No_Element"; end if; if Checks and then Right.Node = 0 then raise Constraint_Error with "Right cursor of ""<"" equals No_Element"; end if; pragma Assert (Vet (Left.Container.all, Left.Node), "Left cursor of ""<"" is bad"); pragma Assert (Vet (Right.Container.all, Right.Node), "Right cursor of ""<"" is bad"); declare LN : Node_Type renames Left.Container.Nodes (Left.Node); RN : Node_Type renames Right.Container.Nodes (Right.Node); begin return LN.Key < RN.Key; end; end "<"; function "<" (Left : Cursor; Right : Key_Type) return Boolean is begin if Checks and then Left.Node = 0 then raise Constraint_Error with "Left cursor of ""<"" equals No_Element"; end if; pragma Assert (Vet (Left.Container.all, Left.Node), "Left cursor of ""<"" is bad"); declare LN : Node_Type renames Left.Container.Nodes (Left.Node); begin return LN.Key < Right; end; end "<"; function "<" (Left : Key_Type; Right : Cursor) return Boolean is begin if Checks and then Right.Node = 0 then raise Constraint_Error with "Right cursor of ""<"" equals No_Element"; end if; pragma Assert (Vet (Right.Container.all, Right.Node), "Right cursor of ""<"" is bad"); declare RN : Node_Type renames Right.Container.Nodes (Right.Node); begin return Left < RN.Key; end; end "<"; --------- -- "=" -- --------- function "=" (Left, Right : Map) return Boolean is function Is_Equal_Node_Node (L, R : Node_Type) return Boolean; pragma Inline (Is_Equal_Node_Node); function Is_Equal is new Tree_Operations.Generic_Equal (Is_Equal_Node_Node); ------------------------ -- Is_Equal_Node_Node -- ------------------------ function Is_Equal_Node_Node (L, R : Node_Type) return Boolean is begin if L.Key < R.Key then return False; elsif R.Key < L.Key then return False; else return L.Element = R.Element; end if; end Is_Equal_Node_Node; -- Start of processing for "=" begin return Is_Equal (Left, Right); end "="; --------- -- ">" -- --------- function ">" (Left, Right : Cursor) return Boolean is begin if Checks and then Left.Node = 0 then raise Constraint_Error with "Left cursor of "">"" equals No_Element"; end if; if Checks and then Right.Node = 0 then raise Constraint_Error with "Right cursor of "">"" equals No_Element"; end if; pragma Assert (Vet (Left.Container.all, Left.Node), "Left cursor of "">"" is bad"); pragma Assert (Vet (Right.Container.all, Right.Node), "Right cursor of "">"" is bad"); declare LN : Node_Type renames Left.Container.Nodes (Left.Node); RN : Node_Type renames Right.Container.Nodes (Right.Node); begin return RN.Key < LN.Key; end; end ">"; function ">" (Left : Cursor; Right : Key_Type) return Boolean is begin if Checks and then Left.Node = 0 then raise Constraint_Error with "Left cursor of "">"" equals No_Element"; end if; pragma Assert (Vet (Left.Container.all, Left.Node), "Left cursor of "">"" is bad"); declare LN : Node_Type renames Left.Container.Nodes (Left.Node); begin return Right < LN.Key; end; end ">"; function ">" (Left : Key_Type; Right : Cursor) return Boolean is begin if Checks and then Right.Node = 0 then raise Constraint_Error with "Right cursor of "">"" equals No_Element"; end if; pragma Assert (Vet (Right.Container.all, Right.Node), "Right cursor of "">"" is bad"); declare RN : Node_Type renames Right.Container.Nodes (Right.Node); begin return RN.Key < Left; end; end ">"; ------------ -- Assign -- ------------ procedure Assign (Target : in out Map; Source : Map) is procedure Append_Element (Source_Node : Count_Type); procedure Append_Elements is new Tree_Operations.Generic_Iteration (Append_Element); -------------------- -- Append_Element -- -------------------- procedure Append_Element (Source_Node : Count_Type) is SN : Node_Type renames Source.Nodes (Source_Node); procedure Set_Element (Node : in out Node_Type); pragma Inline (Set_Element); function New_Node return Count_Type; pragma Inline (New_Node); procedure Insert_Post is new Key_Ops.Generic_Insert_Post (New_Node); procedure Unconditional_Insert_Sans_Hint is new Key_Ops.Generic_Unconditional_Insert (Insert_Post); procedure Unconditional_Insert_Avec_Hint is new Key_Ops.Generic_Unconditional_Insert_With_Hint (Insert_Post, Unconditional_Insert_Sans_Hint); procedure Allocate is new Tree_Operations.Generic_Allocate (Set_Element); -------------- -- New_Node -- -------------- function New_Node return Count_Type is Result : Count_Type; begin Allocate (Target, Result); return Result; end New_Node; ----------------- -- Set_Element -- ----------------- procedure Set_Element (Node : in out Node_Type) is begin Node.Key := SN.Key; Node.Element := SN.Element; end Set_Element; Target_Node : Count_Type; -- Start of processing for Append_Element begin Unconditional_Insert_Avec_Hint (Tree => Target, Hint => 0, Key => SN.Key, Node => Target_Node); end Append_Element; -- Start of processing for Assign begin if Target'Address = Source'Address then return; end if; if Checks and then Target.Capacity < Source.Length then raise Capacity_Error with "Target capacity is less than Source length"; end if; Tree_Operations.Clear_Tree (Target); Append_Elements (Source); end Assign; ------------- -- Ceiling -- ------------- function Ceiling (Container : Map; Key : Key_Type) return Cursor is Node : constant Count_Type := Key_Ops.Ceiling (Container, Key); begin if Node = 0 then return No_Element; end if; return Cursor'(Container'Unrestricted_Access, Node); end Ceiling; ----------- -- Clear -- ----------- procedure Clear (Container : in out Map) is begin Tree_Operations.Clear_Tree (Container); end Clear; ----------- -- Color -- ----------- function Color (Node : Node_Type) return Color_Type is begin return Node.Color; end Color; ------------------------ -- Constant_Reference -- ------------------------ function Constant_Reference (Container : aliased Map; Position : Cursor) return Constant_Reference_Type is begin if Checks and then Position.Container = null then raise Constraint_Error with "Position cursor has no element"; end if; if Checks and then Position.Container /= Container'Unrestricted_Access then raise Program_Error with "Position cursor designates wrong map"; end if; pragma Assert (Vet (Container, Position.Node), "Position cursor in Constant_Reference is bad"); declare N : Node_Type renames Container.Nodes (Position.Node); TC : constant Tamper_Counts_Access := Container.TC'Unrestricted_Access; begin return R : constant Constant_Reference_Type := (Element => N.Element'Access, Control => (Controlled with TC)) do Lock (TC.all); end return; end; end Constant_Reference; function Constant_Reference (Container : aliased Map; Key : Key_Type) return Constant_Reference_Type is Node : constant Count_Type := Key_Ops.Find (Container, Key); begin if Checks and then Node = 0 then raise Constraint_Error with "key not in map"; end if; declare N : Node_Type renames Container.Nodes (Node); TC : constant Tamper_Counts_Access := Container.TC'Unrestricted_Access; begin return R : constant Constant_Reference_Type := (Element => N.Element'Access, Control => (Controlled with TC)) do Lock (TC.all); end return; end; end Constant_Reference; -------------- -- Contains -- -------------- function Contains (Container : Map; Key : Key_Type) return Boolean is begin return Find (Container, Key) /= No_Element; end Contains; ---------- -- Copy -- ---------- function Copy (Source : Map; Capacity : Count_Type := 0) return Map is C : Count_Type; begin if Capacity = 0 then C := Source.Length; elsif Capacity >= Source.Length then C := Capacity; elsif Checks then raise Capacity_Error with "Capacity value too small"; end if; return Target : Map (Capacity => C) do Assign (Target => Target, Source => Source); end return; end Copy; ------------ -- Delete -- ------------ procedure Delete (Container : in out Map; Position : in out Cursor) is begin if Checks and then Position.Node = 0 then raise Constraint_Error with "Position cursor of Delete equals No_Element"; end if; if Checks and then Position.Container /= Container'Unrestricted_Access then raise Program_Error with "Position cursor of Delete designates wrong map"; end if; pragma Assert (Vet (Container, Position.Node), "Position cursor of Delete is bad"); Tree_Operations.Delete_Node_Sans_Free (Container, Position.Node); Tree_Operations.Free (Container, Position.Node); Position := No_Element; end Delete; procedure Delete (Container : in out Map; Key : Key_Type) is X : constant Count_Type := Key_Ops.Find (Container, Key); begin if Checks and then X = 0 then raise Constraint_Error with "key not in map"; end if; Tree_Operations.Delete_Node_Sans_Free (Container, X); Tree_Operations.Free (Container, X); end Delete; ------------------ -- Delete_First -- ------------------ procedure Delete_First (Container : in out Map) is X : constant Count_Type := Container.First; begin if X /= 0 then Tree_Operations.Delete_Node_Sans_Free (Container, X); Tree_Operations.Free (Container, X); end if; end Delete_First; ----------------- -- Delete_Last -- ----------------- procedure Delete_Last (Container : in out Map) is X : constant Count_Type := Container.Last; begin if X /= 0 then Tree_Operations.Delete_Node_Sans_Free (Container, X); Tree_Operations.Free (Container, X); end if; end Delete_Last; ------------- -- Element -- ------------- function Element (Position : Cursor) return Element_Type is begin if Checks and then Position.Node = 0 then raise Constraint_Error with "Position cursor of function Element equals No_Element"; end if; pragma Assert (Vet (Position.Container.all, Position.Node), "Position cursor of function Element is bad"); return Position.Container.Nodes (Position.Node).Element; end Element; function Element (Container : Map; Key : Key_Type) return Element_Type is Node : constant Count_Type := Key_Ops.Find (Container, Key); begin if Checks and then Node = 0 then raise Constraint_Error with "key not in map"; end if; return Container.Nodes (Node).Element; end Element; --------------------- -- Equivalent_Keys -- --------------------- function Equivalent_Keys (Left, Right : Key_Type) return Boolean is begin if Left < Right or else Right < Left then return False; else return True; end if; end Equivalent_Keys; ------------- -- Exclude -- ------------- procedure Exclude (Container : in out Map; Key : Key_Type) is X : constant Count_Type := Key_Ops.Find (Container, Key); begin if X /= 0 then Tree_Operations.Delete_Node_Sans_Free (Container, X); Tree_Operations.Free (Container, X); end if; end Exclude; -------------- -- Finalize -- -------------- procedure Finalize (Object : in out Iterator) is begin if Object.Container /= null then Unbusy (Object.Container.TC); end if; end Finalize; ---------- -- Find -- ---------- function Find (Container : Map; Key : Key_Type) return Cursor is Node : constant Count_Type := Key_Ops.Find (Container, Key); begin if Node = 0 then return No_Element; else return Cursor'(Container'Unrestricted_Access, Node); end if; end Find; ----------- -- First -- ----------- function First (Container : Map) return Cursor is begin if Container.First = 0 then return No_Element; else return Cursor'(Container'Unrestricted_Access, Container.First); end if; end First; function First (Object : Iterator) return Cursor is begin -- The value of the iterator object's Node component influences the -- behavior of the First (and Last) selector function. -- When the Node component is 0, this means the iterator object was -- constructed without a start expression, in which case the (forward) -- iteration starts from the (logical) beginning of the entire sequence -- of items (corresponding to Container.First, for a forward iterator). -- Otherwise, this is iteration over a partial sequence of items. When -- the Node component is positive, the iterator object was constructed -- with a start expression, that specifies the position from which the -- (forward) partial iteration begins. if Object.Node = 0 then return Bounded_Ordered_Maps.First (Object.Container.all); else return Cursor'(Object.Container, Object.Node); end if; end First; ------------------- -- First_Element -- ------------------- function First_Element (Container : Map) return Element_Type is begin if Checks and then Container.First = 0 then raise Constraint_Error with "map is empty"; end if; return Container.Nodes (Container.First).Element; end First_Element; --------------- -- First_Key -- --------------- function First_Key (Container : Map) return Key_Type is begin if Checks and then Container.First = 0 then raise Constraint_Error with "map is empty"; end if; return Container.Nodes (Container.First).Key; end First_Key; ----------- -- Floor -- ----------- function Floor (Container : Map; Key : Key_Type) return Cursor is Node : constant Count_Type := Key_Ops.Floor (Container, Key); begin if Node = 0 then return No_Element; else return Cursor'(Container'Unrestricted_Access, Node); end if; end Floor; ------------------------ -- Get_Element_Access -- ------------------------ function Get_Element_Access (Position : Cursor) return not null Element_Access is begin return Position.Container.Nodes (Position.Node).Element'Access; end Get_Element_Access; ----------------- -- Has_Element -- ----------------- function Has_Element (Position : Cursor) return Boolean is begin return Position /= No_Element; end Has_Element; ------------- -- Include -- ------------- procedure Include (Container : in out Map; Key : Key_Type; New_Item : Element_Type) is Position : Cursor; Inserted : Boolean; begin Insert (Container, Key, New_Item, Position, Inserted); if not Inserted then TE_Check (Container.TC); declare N : Node_Type renames Container.Nodes (Position.Node); begin N.Key := Key; N.Element := New_Item; end; end if; end Include; ------------ -- Insert -- ------------ procedure Insert (Container : in out Map; Key : Key_Type; New_Item : Element_Type; Position : out Cursor; Inserted : out Boolean) is procedure Assign (Node : in out Node_Type); pragma Inline (Assign); function New_Node return Count_Type; pragma Inline (New_Node); procedure Insert_Post is new Key_Ops.Generic_Insert_Post (New_Node); procedure Insert_Sans_Hint is new Key_Ops.Generic_Conditional_Insert (Insert_Post); procedure Allocate is new Tree_Operations.Generic_Allocate (Assign); ------------ -- Assign -- ------------ procedure Assign (Node : in out Node_Type) is begin Node.Key := Key; Node.Element := New_Item; end Assign; -------------- -- New_Node -- -------------- function New_Node return Count_Type is Result : Count_Type; begin Allocate (Container, Result); return Result; end New_Node; -- Start of processing for Insert begin Insert_Sans_Hint (Container, Key, Position.Node, Inserted); Position.Container := Container'Unrestricted_Access; end Insert; procedure Insert (Container : in out Map; Key : Key_Type; New_Item : Element_Type) is Position : Cursor; pragma Unreferenced (Position); Inserted : Boolean; begin Insert (Container, Key, New_Item, Position, Inserted); if Checks and then not Inserted then raise Constraint_Error with "key already in map"; end if; end Insert; procedure Insert (Container : in out Map; Key : Key_Type; Position : out Cursor; Inserted : out Boolean) is procedure Assign (Node : in out Node_Type); pragma Inline (Assign); function New_Node return Count_Type; pragma Inline (New_Node); procedure Insert_Post is new Key_Ops.Generic_Insert_Post (New_Node); procedure Insert_Sans_Hint is new Key_Ops.Generic_Conditional_Insert (Insert_Post); procedure Allocate is new Tree_Operations.Generic_Allocate (Assign); ------------ -- Assign -- ------------ procedure Assign (Node : in out Node_Type) is New_Item : Element_Type; pragma Unmodified (New_Item); -- Default-initialized element (ok to reference, see below) begin Node.Key := Key; -- There is no explicit element provided, but in an instance the element -- type may be a scalar with a Default_Value aspect, or a composite type -- with such a scalar component or with defaulted components, so insert -- possibly initialized elements at the given position. Node.Element := New_Item; end Assign; -------------- -- New_Node -- -------------- function New_Node return Count_Type is Result : Count_Type; begin Allocate (Container, Result); return Result; end New_Node; -- Start of processing for Insert begin Insert_Sans_Hint (Container, Key, Position.Node, Inserted); Position.Container := Container'Unrestricted_Access; end Insert; -------------- -- Is_Empty -- -------------- function Is_Empty (Container : Map) return Boolean is begin return Container.Length = 0; end Is_Empty; ------------------------- -- Is_Greater_Key_Node -- ------------------------- function Is_Greater_Key_Node (Left : Key_Type; Right : Node_Type) return Boolean is begin -- Left > Right same as Right < Left return Right.Key < Left; end Is_Greater_Key_Node; ---------------------- -- Is_Less_Key_Node -- ---------------------- function Is_Less_Key_Node (Left : Key_Type; Right : Node_Type) return Boolean is begin return Left < Right.Key; end Is_Less_Key_Node; ------------- -- Iterate -- ------------- procedure Iterate (Container : Map; Process : not null access procedure (Position : Cursor)) is procedure Process_Node (Node : Count_Type); pragma Inline (Process_Node); procedure Local_Iterate is new Tree_Operations.Generic_Iteration (Process_Node); ------------------ -- Process_Node -- ------------------ procedure Process_Node (Node : Count_Type) is begin Process (Cursor'(Container'Unrestricted_Access, Node)); end Process_Node; Busy : With_Busy (Container.TC'Unrestricted_Access); -- Start of processing for Iterate begin Local_Iterate (Container); end Iterate; function Iterate (Container : Map) return Map_Iterator_Interfaces.Reversible_Iterator'Class is begin -- The value of the Node component influences the behavior of the First -- and Last selector functions of the iterator object. When the Node -- component is 0 (as is the case here), this means the iterator object -- was constructed without a start expression. This is a complete -- iterator, meaning that the iteration starts from the (logical) -- beginning of the sequence of items. -- Note: For a forward iterator, Container.First is the beginning, and -- for a reverse iterator, Container.Last is the beginning. return It : constant Iterator := (Limited_Controlled with Container => Container'Unrestricted_Access, Node => 0) do Busy (Container.TC'Unrestricted_Access.all); end return; end Iterate; function Iterate (Container : Map; Start : Cursor) return Map_Iterator_Interfaces.Reversible_Iterator'Class is begin -- Iterator was defined to behave the same as for a complete iterator, -- and iterate over the entire sequence of items. However, those -- semantics were unintuitive and arguably error-prone (it is too easy -- to accidentally create an endless loop), and so they were changed, -- per the ARG meeting in Denver on 2011/11. However, there was no -- consensus about what positive meaning this corner case should have, -- and so it was decided to simply raise an exception. This does imply, -- however, that it is not possible to use a partial iterator to specify -- an empty sequence of items. if Checks and then Start = No_Element then raise Constraint_Error with "Start position for iterator equals No_Element"; end if; if Checks and then Start.Container /= Container'Unrestricted_Access then raise Program_Error with "Start cursor of Iterate designates wrong map"; end if; pragma Assert (Vet (Container, Start.Node), "Start cursor of Iterate is bad"); -- The value of the Node component influences the behavior of the First -- and Last selector functions of the iterator object. When the Node -- component is positive (as is the case here), it means that this -- is a partial iteration, over a subset of the complete sequence of -- items. The iterator object was constructed with a start expression, -- indicating the position from which the iteration begins. (Note that -- the start position has the same value irrespective of whether this -- is a forward or reverse iteration.) return It : constant Iterator := (Limited_Controlled with Container => Container'Unrestricted_Access, Node => Start.Node) do Busy (Container.TC'Unrestricted_Access.all); end return; end Iterate; --------- -- Key -- --------- function Key (Position : Cursor) return Key_Type is begin if Checks and then Position.Node = 0 then raise Constraint_Error with "Position cursor of function Key equals No_Element"; end if; pragma Assert (Vet (Position.Container.all, Position.Node), "Position cursor of function Key is bad"); return Position.Container.Nodes (Position.Node).Key; end Key; ---------- -- Last -- ---------- function Last (Container : Map) return Cursor is begin if Container.Last = 0 then return No_Element; else return Cursor'(Container'Unrestricted_Access, Container.Last); end if; end Last; function Last (Object : Iterator) return Cursor is begin -- The value of the iterator object's Node component influences the -- behavior of the Last (and First) selector function. -- When the Node component is 0, this means the iterator object was -- constructed without a start expression, in which case the (reverse) -- iteration starts from the (logical) beginning of the entire sequence -- (corresponding to Container.Last, for a reverse iterator). -- Otherwise, this is iteration over a partial sequence of items. When -- the Node component is positive, the iterator object was constructed -- with a start expression, that specifies the position from which the -- (reverse) partial iteration begins. if Object.Node = 0 then return Bounded_Ordered_Maps.Last (Object.Container.all); else return Cursor'(Object.Container, Object.Node); end if; end Last; ------------------ -- Last_Element -- ------------------ function Last_Element (Container : Map) return Element_Type is begin if Checks and then Container.Last = 0 then raise Constraint_Error with "map is empty"; end if; return Container.Nodes (Container.Last).Element; end Last_Element; -------------- -- Last_Key -- -------------- function Last_Key (Container : Map) return Key_Type is begin if Checks and then Container.Last = 0 then raise Constraint_Error with "map is empty"; end if; return Container.Nodes (Container.Last).Key; end Last_Key; ---------- -- Left -- ---------- function Left (Node : Node_Type) return Count_Type is begin return Node.Left; end Left; ------------ -- Length -- ------------ function Length (Container : Map) return Count_Type is begin return Container.Length; end Length; ---------- -- Move -- ---------- procedure Move (Target : in out Map; Source : in out Map) is begin if Target'Address = Source'Address then return; end if; TC_Check (Source.TC); Target.Assign (Source); Source.Clear; end Move; ---------- -- Next -- ---------- procedure Next (Position : in out Cursor) is begin Position := Next (Position); end Next; function Next (Position : Cursor) return Cursor is begin if Position = No_Element then return No_Element; end if; pragma Assert (Vet (Position.Container.all, Position.Node), "Position cursor of Next is bad"); declare M : Map renames Position.Container.all; Node : constant Count_Type := Tree_Operations.Next (M, Position.Node); begin if Node = 0 then return No_Element; end if; return Cursor'(Position.Container, Node); end; end Next; function Next (Object : Iterator; Position : Cursor) return Cursor is begin if Position.Container = null then return No_Element; end if; if Checks and then Position.Container /= Object.Container then raise Program_Error with "Position cursor of Next designates wrong map"; end if; return Next (Position); end Next; ------------ -- Parent -- ------------ function Parent (Node : Node_Type) return Count_Type is begin return Node.Parent; end Parent; -------------- -- Previous -- -------------- procedure Previous (Position : in out Cursor) is begin Position := Previous (Position); end Previous; function Previous (Position : Cursor) return Cursor is begin if Position = No_Element then return No_Element; end if; pragma Assert (Vet (Position.Container.all, Position.Node), "Position cursor of Previous is bad"); declare M : Map renames Position.Container.all; Node : constant Count_Type := Tree_Operations.Previous (M, Position.Node); begin if Node = 0 then return No_Element; end if; return Cursor'(Position.Container, Node); end; end Previous; function Previous (Object : Iterator; Position : Cursor) return Cursor is begin if Position.Container = null then return No_Element; end if; if Checks and then Position.Container /= Object.Container then raise Program_Error with "Position cursor of Previous designates wrong map"; end if; return Previous (Position); end Previous; ---------------------- -- Pseudo_Reference -- ---------------------- function Pseudo_Reference (Container : aliased Map'Class) return Reference_Control_Type is TC : constant Tamper_Counts_Access := Container.TC'Unrestricted_Access; begin return R : constant Reference_Control_Type := (Controlled with TC) do Lock (TC.all); end return; end Pseudo_Reference; ------------------- -- Query_Element -- ------------------- procedure Query_Element (Position : Cursor; Process : not null access procedure (Key : Key_Type; Element : Element_Type)) is begin if Checks and then Position.Node = 0 then raise Constraint_Error with "Position cursor of Query_Element equals No_Element"; end if; pragma Assert (Vet (Position.Container.all, Position.Node), "Position cursor of Query_Element is bad"); declare M : Map renames Position.Container.all; N : Node_Type renames M.Nodes (Position.Node); Lock : With_Lock (M.TC'Unrestricted_Access); begin Process (N.Key, N.Element); end; end Query_Element; ---------- -- Read -- ---------- procedure Read (Stream : not null access Root_Stream_Type'Class; Container : out Map) is procedure Read_Element (Node : in out Node_Type); pragma Inline (Read_Element); procedure Allocate is new Tree_Operations.Generic_Allocate (Read_Element); procedure Read_Elements is new Tree_Operations.Generic_Read (Allocate); ------------------ -- Read_Element -- ------------------ procedure Read_Element (Node : in out Node_Type) is begin Key_Type'Read (Stream, Node.Key); Element_Type'Read (Stream, Node.Element); end Read_Element; -- Start of processing for Read begin Read_Elements (Stream, Container); end Read; procedure Read (Stream : not null access Root_Stream_Type'Class; Item : out Cursor) is begin raise Program_Error with "attempt to stream map cursor"; end Read; procedure Read (Stream : not null access Root_Stream_Type'Class; Item : out Reference_Type) is begin raise Program_Error with "attempt to stream reference"; end Read; procedure Read (Stream : not null access Root_Stream_Type'Class; Item : out Constant_Reference_Type) is begin raise Program_Error with "attempt to stream reference"; end Read; --------------- -- Reference -- --------------- function Reference (Container : aliased in out Map; Position : Cursor) return Reference_Type is begin if Checks and then Position.Container = null then raise Constraint_Error with "Position cursor has no element"; end if; if Checks and then Position.Container /= Container'Unrestricted_Access then raise Program_Error with "Position cursor designates wrong map"; end if; pragma Assert (Vet (Container, Position.Node), "Position cursor in function Reference is bad"); declare N : Node_Type renames Container.Nodes (Position.Node); TC : constant Tamper_Counts_Access := Container.TC'Unrestricted_Access; begin return R : constant Reference_Type := (Element => N.Element'Access, Control => (Controlled with TC)) do Lock (TC.all); end return; end; end Reference; function Reference (Container : aliased in out Map; Key : Key_Type) return Reference_Type is Node : constant Count_Type := Key_Ops.Find (Container, Key); begin if Checks and then Node = 0 then raise Constraint_Error with "key not in map"; end if; declare N : Node_Type renames Container.Nodes (Node); TC : constant Tamper_Counts_Access := Container.TC'Unrestricted_Access; begin return R : constant Reference_Type := (Element => N.Element'Access, Control => (Controlled with TC)) do Lock (TC.all); end return; end; end Reference; ------------- -- Replace -- ------------- procedure Replace (Container : in out Map; Key : Key_Type; New_Item : Element_Type) is Node : constant Count_Type := Key_Ops.Find (Container, Key); begin if Checks and then Node = 0 then raise Constraint_Error with "key not in map"; end if; TE_Check (Container.TC); declare N : Node_Type renames Container.Nodes (Node); begin N.Key := Key; N.Element := New_Item; end; end Replace; --------------------- -- Replace_Element -- --------------------- procedure Replace_Element (Container : in out Map; Position : Cursor; New_Item : Element_Type) is begin if Checks and then Position.Node = 0 then raise Constraint_Error with "Position cursor of Replace_Element equals No_Element"; end if; if Checks and then Position.Container /= Container'Unrestricted_Access then raise Program_Error with "Position cursor of Replace_Element designates wrong map"; end if; TE_Check (Container.TC); pragma Assert (Vet (Container, Position.Node), "Position cursor of Replace_Element is bad"); Container.Nodes (Position.Node).Element := New_Item; end Replace_Element; --------------------- -- Reverse_Iterate -- --------------------- procedure Reverse_Iterate (Container : Map; Process : not null access procedure (Position : Cursor)) is procedure Process_Node (Node : Count_Type); pragma Inline (Process_Node); procedure Local_Reverse_Iterate is new Tree_Operations.Generic_Reverse_Iteration (Process_Node); ------------------ -- Process_Node -- ------------------ procedure Process_Node (Node : Count_Type) is begin Process (Cursor'(Container'Unrestricted_Access, Node)); end Process_Node; Busy : With_Busy (Container.TC'Unrestricted_Access); -- Start of processing for Reverse_Iterate begin Local_Reverse_Iterate (Container); end Reverse_Iterate; ----------- -- Right -- ----------- function Right (Node : Node_Type) return Count_Type is begin return Node.Right; end Right; --------------- -- Set_Color -- --------------- procedure Set_Color (Node : in out Node_Type; Color : Color_Type) is begin Node.Color := Color; end Set_Color; -------------- -- Set_Left -- -------------- procedure Set_Left (Node : in out Node_Type; Left : Count_Type) is begin Node.Left := Left; end Set_Left; ---------------- -- Set_Parent -- ---------------- procedure Set_Parent (Node : in out Node_Type; Parent : Count_Type) is begin Node.Parent := Parent; end Set_Parent; --------------- -- Set_Right -- --------------- procedure Set_Right (Node : in out Node_Type; Right : Count_Type) is begin Node.Right := Right; end Set_Right; -------------------- -- Update_Element -- -------------------- procedure Update_Element (Container : in out Map; Position : Cursor; Process : not null access procedure (Key : Key_Type; Element : in out Element_Type)) is begin if Checks and then Position.Node = 0 then raise Constraint_Error with "Position cursor of Update_Element equals No_Element"; end if; if Checks and then Position.Container /= Container'Unrestricted_Access then raise Program_Error with "Position cursor of Update_Element designates wrong map"; end if; pragma Assert (Vet (Container, Position.Node), "Position cursor of Update_Element is bad"); declare N : Node_Type renames Container.Nodes (Position.Node); Lock : With_Lock (Container.TC'Unrestricted_Access); begin Process (N.Key, N.Element); end; end Update_Element; ----------- -- Write -- ----------- procedure Write (Stream : not null access Root_Stream_Type'Class; Container : Map) is procedure Write_Node (Stream : not null access Root_Stream_Type'Class; Node : Node_Type); pragma Inline (Write_Node); procedure Write_Nodes is new Tree_Operations.Generic_Write (Write_Node); ---------------- -- Write_Node -- ---------------- procedure Write_Node (Stream : not null access Root_Stream_Type'Class; Node : Node_Type) is begin Key_Type'Write (Stream, Node.Key); Element_Type'Write (Stream, Node.Element); end Write_Node; -- Start of processing for Write begin Write_Nodes (Stream, Container); end Write; procedure Write (Stream : not null access Root_Stream_Type'Class; Item : Cursor) is begin raise Program_Error with "attempt to stream map cursor"; end Write; procedure Write (Stream : not null access Root_Stream_Type'Class; Item : Reference_Type) is begin raise Program_Error with "attempt to stream reference"; end Write; procedure Write (Stream : not null access Root_Stream_Type'Class; Item : Constant_Reference_Type) is begin raise Program_Error with "attempt to stream reference"; end Write; end Ada.Containers.Bounded_Ordered_Maps;
with AUnit.Test_Suites; with AUnit.Test_Fixtures; with AUnit.Test_Caller; with Testsuite.Encode; with Testsuite.Decode; private with Test_Utils.Abstract_Decoder; private with Test_Utils.Abstract_Encoder; package Testsuite.Encode_Decode is procedure Set_Kinds (E : Testsuite.Encode.Encoder_Kind; D : Testsuite.Decode.Decoder_Kind); procedure Add_Tests (Suite : in out AUnit.Test_Suites.Test_Suite'Class); private type Encoder_Decoder_Fixture is new AUnit.Test_Fixtures.Test_Fixture with record Encoder : Test_Utils.Abstract_Encoder.Any_Acc; E_Kind : Testsuite.Encode.Encoder_Kind; Decoder : Test_Utils.Abstract_Decoder.Any_Acc; D_Kind : Testsuite.Decode.Decoder_Kind; end record; overriding procedure Set_Up (Test : in out Encoder_Decoder_Fixture); overriding procedure Tear_Down (Test : in out Encoder_Decoder_Fixture); package Encoder_Decoder_Caller is new AUnit.Test_Caller (Encoder_Decoder_Fixture); end Testsuite.Encode_Decode;