--******************************************************************************************************************** -- Created: 30-Mar-2010 17:35:38 by OpenVMS SDL EV3-3 -- Source: 19-MAY-1993 14:01:22 $1$DGA7274:[LIB_ADA.LIS]PCSAMPLEDEF.SDL;1 --******************************************************************************************************************** with SYSTEM; use SYSTEM; with STARLET; use STARLET; with CONDITION_HANDLING; use CONDITION_HANDLING; package PCSAMPLEDEF is -- module PCSAMPLEDEF PCBUF_C_STRUCTURE_VERSION : constant := 2; -- -- Slot constraining values -- PCBUF_C_MAX_SLOT_CNT : constant := 32768; -- Maximum number of slots PCBUF_C_MIN_SLOT_CNT : constant := 128; -- Minimum number of slots -- -- Slot structure definition -- PCSLT_C_LENGTH : constant := 16; PCSLT_S_PCSLTDEF : constant := 16; -- Old size name - synonym type PCSLT_TYPE is record PC : ADDRESS; -- Program counter PS : UNSIGNED_LONGWORD; -- Process status COUNTER : UNSIGNED_LONGWORD; -- Indicates which counter fired PID : UNSIGNED_LONGWORD; -- ID of current process end record; for PCSLT_TYPE use record PC at 0 range 0 .. 31; PS at 4 range 0 .. 31; COUNTER at 8 range 0 .. 31; PID at 12 range 0 .. 31; end record; for PCSLT_TYPE'SIZE use 128; PCSLT_TYPE_INIT : constant PCSLT_TYPE := (PC => ADDRESS_ZERO, PS => 0, COUNTER => 0, PID => 0); -- -- Buffer descriptor structure -- PCDSC_C_LENGTH : constant := 20; PCDSC_S_PCDSCDEF : constant := 20; -- Old size name - synonym type PCDSC_COUNTER_INFO_TYPE is record COUNTER_0 : UNSIGNED_LONGWORD; COUNTER_1 : UNSIGNED_LONGWORD; end record; for PCDSC_COUNTER_INFO_TYPE use record COUNTER_0 at 0 range 0 .. 31; COUNTER_1 at 4 range 0 .. 31; end record; for PCDSC_COUNTER_INFO_TYPE'SIZE use 64; PCDSC_COUNTER_INFO_TYPE_INIT : constant PCDSC_COUNTER_INFO_TYPE := (COUNTER_0 => 0, COUNTER_1 => 0); type PCDSC_OVER_1_TYPE is record CUR_SLOT : UNSIGNED_LONGWORD; -- Index of next slot SLOT_CNT : UNSIGNED_LONGWORD; -- Number of slots in the buffer ----Component(s) below are defined as comments since they ----overlap other fields ---- ----COUNTER_INFO : PCDSC_COUNTER_INFO_TYPE; end record; for PCDSC_OVER_1_TYPE use record CUR_SLOT at 0 range 0 .. 31; SLOT_CNT at 4 range 0 .. 31; ----Component representation spec(s) below are defined as ----comments since they overlap other fields ---- ----COUNTER_INFO at 0 range 0 .. 63; end record; for PCDSC_OVER_1_TYPE'SIZE use 64; PCDSC_OVER_1_TYPE_INIT : constant PCDSC_OVER_1_TYPE := (CUR_SLOT => 0, SLOT_CNT => 0); type PCDSC_TYPE is record BUFFER : ADDRESS; -- Pointer to buffer in use OVER_1 : PCDSC_OVER_1_TYPE; BUFF_SIZE : UNSIGNED_LONGWORD; -- Size of memory block for descriptor RING_PTR : ADDRESS; -- Fake buffer pointer to next buffer end record; for PCDSC_TYPE use record BUFFER at 0 range 0 .. 31; OVER_1 at 4 range 0 .. 63; BUFF_SIZE at 12 range 0 .. 31; RING_PTR at 16 range 0 .. 31; end record; for PCDSC_TYPE'SIZE use 160; PCDSC_TYPE_INIT : constant PCDSC_TYPE := (BUFFER => ADDRESS_ZERO, OVER_1 => PCDSC_OVER_1_TYPE_INIT, BUFF_SIZE => 0, RING_PTR => ADDRESS_ZERO); -- -- Buffer structure -- PCBUF_C_HDR_SIZE : constant := 32; -- Buffer header size PCBUF_C_MAX_LENGTH : constant := 524320; -- Maximum buffer size PCBUF_S_PCBUFDEF : constant := 524320; -- Old size name - synonym type PCBUF_TYPE is record NEXT_BUFF : ADDRESS; -- Pointer to next buffer BUFF_SIZE : UNSIGNED_LONGWORD; -- Size of memory block used for buffer FULL_FLAG : UNSIGNED_LONGWORD; -- Buffer is full CPU_ID : UNSIGNED_LONGWORD; -- CPU index BEGIN_TIME : UNSIGNED_QUADWORD; -- Time buffer was started SCRATCH : INTEGER_8_ARRAY (1 .. 8); -- Used to force slot alignment DATA_AREA : INTEGER_8_ARRAY (1 .. 524288); -- Data slots end record; for PCBUF_TYPE use record NEXT_BUFF at 0 range 0 .. 31; BUFF_SIZE at 4 range 0 .. 31; FULL_FLAG at 8 range 0 .. 31; CPU_ID at 12 range 0 .. 31; BEGIN_TIME at 16 range 0 .. 63; SCRATCH at 24 range 0 .. 63; DATA_AREA at 32 range 0 .. 4194303; end record; for PCBUF_TYPE'SIZE use 4194560; PCBUF_TYPE_INIT : constant PCBUF_TYPE := (NEXT_BUFF => ADDRESS_ZERO, BUFF_SIZE => 0, FULL_FLAG => 0, CPU_ID => 0, BEGIN_TIME => (0, 0), SCRATCH => (others => 0), DATA_AREA => (others => 0)); PCBUF_C_MIN_LENGTH : constant := 2080; -- Minimum buffer size end PCSAMPLEDEF;