VX/FPT - The Gould-SEL DATAPOOL

What is a DATAPOOL?

The Gould-SEL DATAPOOL was a first step towards the Fortran 90 MODULE construct. A DATAPOOL declaration is written in the same way as an ordinary COMMON block, with the COMMON block name /DATAPOOL/. However, the names in the declaration do not occupy consecutive memory locations starting from the beginning of the COMMON. The addresses of DATAPOOL variables are stored centrally in a database maintained by the operating system. The DATAPOOL typically contains thousands of variables, but each sub-program need declare only the names which it uses. For example:

       SUBROUTINE WHREACT(WH,WHFORCE)
C
C     Oleo force, wheel
C
      COMMON /DATAPOOL/ SHIPP, SHIPQ, SHIPTH, SHIPPHI, DECKHT,
     1 H, HDOT, X, Y, P, Q, SHIPX, SHIPY, SHIPPHI, GHMAX,
     1 WHEELX(3), WHEELY(3), WHEELH(3)
C
C     Find vehicle position in ship coordinates (X fore-aft)
      XSH = (X-SHIPX) * SIN(SHIPPHI)
      YSH = (Y-SHIPY) * COS(SHIPPHI)
C     Deck height, corrected for pitch (neglect roll)
      CDKHT = DECKHT + XSH*SIN(SHIPTH)
      HSH = H - CDKHT
C
C     Quit if gear is clear of deck
      IF (HSH .GT. GHMAX) THEN
WHFORCE=0.0
RETURN
      ENDIF
C
:
:

The MPX operating system generates a listing to show the contents of the DATAPOOL. A short extract is shown below.

	  LOG	  X	   EQU X:QDO   +X'00028' EW001 X Pos, World, ft					  0028	     0	0
	  LOG	  Y	   EQU X:QDO   +X'0002C' EW001 Y Pos, World, ft					  002C	     0	0
	  LOG	  H	   EQU X:QDO   +X'00030' EW001 Height absolute ft				  0030	     0	0
	  LOG	  THETA	   EQU X:QDO   +X'0003C' EW001 Degrees						  003C	     0	0
	  LOG	  PHI	   EQU X:QDO   +X'00040' EW001 Degrees						  0040	     0	0
	  LOG	  PSI	   EQU X:QD0   +X'00044' EW001 Degrees +- 180					  0044	     0	0
	  LOG	  P	   EQU X:QDO   +X'00048' EW001 Degrees/sec					  0048	     0	0
	  LOG	  Q	   EQU X:QDO   +X'0004C' EW001 Degrees/sec					  004C	     0	0
	  LOG	  R	   EQU X:QDO   +X'00050' EW001 Degrees/sec					  0050	     0	0
	    :
	    :
	  LOG	  SHIPX	   EQU X:QDO   +X'00440' EW001 FT						  0440	     0	0
	  LOG	  SHIPY	   EQU X:QDO   +X'00444' EW001 FT						  0444	     0	0
	  LOG	  SHIPTH   EQU X:QDO   +X'00448' EW001 Degrees/sec					  0448	     0	0
	  LOG	  SHIPPHI  EQU X:QDO   +X'0044C' EW001 Degrees/sec					  044C	     0	0
	  LOG	  SHIPPSI  EQU X:QDO   +X'00400' EW001 Degrees/sec					  0400	     0	0
	  LOG	  SHIPP	   EQU X:QDO   +X'00450' EW001 Degrees/sec					  0450	     0	0
	  LOG	  SHIPQ	   EQU X:QDO   +X'00454' EW001 Degrees/sec					  0454	     0	0
	  LOG	  SHIPR	   EQU X:QDO   +X'00458' EW001 Degrees/sec					  0458	     0	0
	    :
	    :
	  LOG	  WHEELX   EQU X:QDO   +X'003C0' EW003 FT						  03C0	     0	0
	  LOG	  WHEELY   EQU X:QDO   +X'003CC' EW003 FT						  03CC	     0	0
	  LOG	  WHEELH   EQU X:QDO   +X'003D8' EW003 FT						  03D8	     0	0

VX/FPT uses this listing to generate an INCLUDE file which represents the DATAPOOL as a standard FORTRAN 77 COMMON block. For example:

!H!****************************************************************************
!H! File: HELISHIP5.FPI
!H! Output by FPT 3.2-p DEC-VF	 On 10-APR-00  At 11:42:06    Input files:
!H! Main:    E:\Projects\FPT\FPTTEST\WHREACT.FOR
!H! Licensee:  Software Validation Ltd. Development licence.
!H!****************************************************************************
      BYTE DP_BYTE(0:4095)
      REAL*4 X                  ! X Pos, World, ft
      REAL*4 Y                  ! Y Pos, World, ft
      REAL*4 H                  ! Height absolute ft
      REAL*4 THETA              ! Degrees
      REAL*4 PHI                ! Degrees
      REAL*4 PSI                ! Degrees +- 180
      REAL*4 P                  ! Degrees/sec
      REAL*4 Q                  ! Degrees/sec
      REAL*4 R                  ! Degrees/sec
      REAL*4 HDOT               ! FT/SEC
	  :
	  :
      REAL*8 LAT                ! Latitude, degrees
      REAL*8 LONG               ! Longitude, degrees
	  :
	  :
      REAL*4 WHEELX(3)          ! FT
      REAL*4 WHEELY(3)          ! FT
      REAL*4 WHEELH(3)          ! FT
      REAL*4 DECKHT             ! FT
      REAL*4 GHMAX              ! FT
      REAL*4 SHIPPSI            ! Degrees/sec
      REAL*4 SHIPX              ! FT
      REAL*4 SHIPY              ! FT
      REAL*4 SHIPTH             ! Degrees/sec
      REAL*4 SHIPPHI            ! Degrees/sec
      REAL*4 SHIPP              ! Degrees/sec
      REAL*4 SHIPQ              ! Degrees/sec
      REAL*4 SHIPR              ! Degrees/sec
C
      COMMON /DATAPOOL/DP_BYTE
C
      EQUIVALENCE (X,DP_BYTE(40))
      EQUIVALENCE (Y,DP_BYTE(44))
      EQUIVALENCE (H,DP_BYTE(48))
      EQUIVALENCE (THETA,DP_BYTE(60))
      EQUIVALENCE (PHI,DP_BYTE(64))
      EQUIVALENCE (PSI,DP_BYTE(68))
      EQUIVALENCE (P,DP_BYTE(72))
      EQUIVALENCE (Q,DP_BYTE(76))
      EQUIVALENCE (R,DP_BYTE(80))
      EQUIVALENCE (HDOT,DP_BYTE(84))
	  :
	  :
      EQUIVALENCE (LAT,DP_BYTE(520))
      EQUIVALENCE (LONG,DP_BYTE(528))
	  :
	  :
      EQUIVALENCE (WHEELX,DP_BYTE(960))
      EQUIVALENCE (WHEELY,DP_BYTE(972))
      EQUIVALENCE (WHEELH,DP_BYTE(984))
      EQUIVALENCE (DECKHT,DP_BYTE(996))
      EQUIVALENCE (GHMAX,DP_BYTE(1020))
      EQUIVALENCE (SHIPPSI,DP_BYTE(1024))
      EQUIVALENCE (SHIPX,DP_BYTE(1088))
      EQUIVALENCE (SHIPY,DP_BYTE(1092))
      EQUIVALENCE (SHIPTH,DP_BYTE(1096))
      EQUIVALENCE (SHIPPHI,DP_BYTE(1100))
      EQUIVALENCE (SHIPP,DP_BYTE(1104))
      EQUIVALENCE (SHIPQ,DP_BYTE(1108))
      EQUIVALENCE (SHIPR,DP_BYTE(1112))

The INCLUDE file is typically several thousand lines long.

The original DATAPOOL declarations are replaced in the code by INCLUDE statements for this file. For example:

     SUBROUTINE WHREACT(WH,WHFORCE)
C
C     Oleo force, wheel
C
C
      INCLUDE 'heliship5.fpi'
C
C
C     Find vehicle position in ship coordinates (X fore-aft)
      XSH=(X-SHIPX)*SIN(SHIPPHI)
      YSH=(Y-SHIPY)*COS(SHIPPHI)
C     Deck height, corrected for pitch (neglect roll)
      CDKHT=DECKHT+XSH*SIN(SHIPTH)
	 :
	 :

These changes are sufficient to convert the DATAPOOL construct to standard FORTRAN.

However, some of the advantages of the original DATAPOOL construct are lost. Also the entire DATAPOOL INCLUDE file is included in every sub-program which references any DATAPOOL variable. This has the effect of adding several thousand irrelevant declarations to the compilation of every sub-program. On some systems, the impact on compilation time is significant.

 

The DATAPOOL Toolkit, DPTK

A set of tools was developed to manipulate the standard FORTRAN 77 DATAPOOL in collaboration with Applied Dynamics Internatonal Inc. The components are:

An extract from a DATAPOOL text file is shown below:

!******************************************************************************
! File: DATAPOOL.dpt
! Output by FPT 3.2-p DEC-VF   On 10-APR-00  At 11:42:06
!******************************************************************************
X		REAL*4		    40	  X Pos, World, ft
    10-APR-00 11:42:06 FPT
Y		REAL*4		    44	  Y Pos, World, ft
    10-APR-00 11:42:06 FPT
H		REAL*4		    48	  Height absolute ft
    10-APR-00 11:42:06 FPT
THETA		REAL*4		    60	  Degrees
    10-APR-00 11:42:06 FPT
PHI		REAL*4		    64	  Degrees
    10-APR-00 11:42:06 FPT
PSI		REAL*4		    68	  Degrees +- 180
    10-APR-00 11:42:06 FPT
P		REAL*4		    72	  Degrees/sec
    10-APR-00 11:42:06 FPT
Q		REAL*4		    76	  Degrees/sec
    10-APR-00 11:42:06 FPT
R		REAL*4		    80	  Degrees/sec
    10-APR-00 11:42:06 FPT

This file is used by DPSCAN to generate INCLUDE statements for every DATAPOOL variable, for example:

     SUBROUTINE WHREACT(WH,WHFORCE)
C
C     Oleo force, wheel
C
C
      INCLUDE 'dp_byte.dpi
C
      INCLUDE 'shipp.dpi'
      INCLUDE 'shipq.dpi'
      INCLUDE 'shipth.dpi'
      INCLUDE 'shipphi.dpi'
      INCLUDE 'deckht.dpi'
      INCLUDE 'h.dpi'
      INCLUDE 'hdot.dpi'
      INCLUDE 'x.dpi'
      INCLUDE 'y.dpi'
      INCLUDE 'p.dpi'
      INCLUDE 'q.dpi'
      INCLUDE 'shipx.dpi'
      INCLUDE 'shipy.dpi'
      INCLUDE 'shipphi.dpi'
      INCLUDE 'ghmax.dpi'
C
C
C     Find vehicle position in ship coordinates (X fore-aft)
      XSH=(X-SHIPX)*SIN(SHIPPHI)
      YSH=(Y-SHIPY)*COS(SHIPPHI)
C     Deck height, corrected for pitch (neglect roll)
      CDKHT=DECKHT+XSH*SIN(SHIPTH)
	 :
	 :

The INCLUDE files are maintained by the toolkit. They contain the declarations of the DATAPOOL variables, and comments which indicate the date, time and author of the last change. For example:

C *****************************************************************************
C     Author:  Brian Farrimond
C     Date:    20-Apr-1994 17:21:04
C
      REAL*4 SHIPX		!  Ship X Position, FT.
      EQUIVALENCE (SHIPX,DP_BYTE(1088))
C
C *****************************************************************************

 

Back to the VX/FPT Home Page