EXTENSIONS TO WFG SOFTWARE

Flexible formulas, cubic spline interpolation,
and other WaveForm Generator modifications
Bruce A. Martin (1997 Nov 3)
Revised/B.A.M. (1998 Jan 21)

Evolution / Precision / Computation
Requirements
Notes
WBS

WFG EVOLUTION

ORIGINAL WFG SOFTWARE (See Software Requirements document)

RELEASE FOR AtR (See "RHIC Ramps" and other web documents)

RELEASE FOR SEXTANT TEST
At the beginning of Sextant Test, a WFG firware release was made. (It is designated 70e .)
PROMs containing this rev level are in all spares and most operational WFGs . (However, a few modules, such as wfgB of 5s-rfdev, now have "experimental" versions with additional features.)

This firmware release included all features specified for the "WFG Enhancements", as defined and documented by the Ramps Task Force which Steve Peggs chaired after AtR. -- See slides

WFG EXTENSIONS
After Sextant Test, some new requirements were developed, and in November a firm definition was written for a set of "WFG Extensions". (As distinct from "Enhancements" made after AtR.) These extensions, which are detailed below, break down into two categories which are summarized here:

PRECISION ISSUES

  • Original WFG requirements specified 32-bit integer arithmetic, for computing 24-bit WFG output. (See the original documents, on the web.) One consequence of the 32-bit limitation was that large delta-F steps had to be broken down into multiple rows, especially for 23-bit main-magnet values.

  • Enhancements after AtR added some shifting to extend dynamic range while avoiding overflow. Nevertheless, some F(t) steps still had to be broken down into multiple rows.

  • Last year, we investigated the possiblity of using software-simulated floating-point in the embedded i960-CA processors. However, that approach was eventually discarded as impractical (and slow). (N.B. There is no processor or compiler support for integers longer than 32 bits.)

  • The new WFG "Extensions" use only 32-bit integer arithmetic, and simulate extended precision where necessary (multiplication, stepping).

  • These extensions will preserve 48-bits of during multiplication (before shifting). Linear table steps may be any length.

    COMPUTATION & OTHER ISSUES

  • Aside from precision issues, the WFG "Extensions" will replace the calculation method, discarding the predefined formula and using an "interpreter" to process a set of commands in a "Flexible Formula".

  • Other new requirements include cubic spline fits, relative tables, "chaining" of formulas, and other computational extensions, as well as error-handling, detecting timeouts, and other features. (See below.)


    REQUIREMENTS CHANGES for V115 WaveForm Generator extensions

    Following is a summary of new requirements, followed by a
    tentative work breakdown for recently-defined "extensions" to the V115 WaveForm Generator software.

    POSSIBLE ADDITIONAL REQUIREMENTS


    NOTES & DETAILS FOR THE REQUIREMENTS:

        Computation of flexible formula includes:
      • Implement Jorg's "interpreter" scheme in WFG firmware, and
      • Extensions/completion of interpretive language

        Cubic Spline Interpolation includes New table type (triple rows)

        Modify Data Structures, tables, etc. including:

      • Formula descriptors
      • New struct for "registers", New "scratchpad" struct for F(t), Scoreboard modifications
      • Changes to error report
      • Impacts of data struct changes on command messages, etc.
      • ADO parameter changes, impacts on PET pages, diagnostics, etc.

        Changes to error detection & reporting

      • Detect, report, handle calc. timeouts
      • Syntax errors in flexible formula
      • Semantic errors during interpretation
      • Register trace (upload)
      • Bad tables for cubic spline (during download, during use)
      • F(t) errors (overflow), other calc errors
      • Corrupted calcs (e.g. bad RTDL frame) - discard result.
      • Include an arbitrary set of RTDL frames in shared memory.
        
        OTHER
        
        - Testing & integration of the above
        - Retrofit of existing FECs (RHIC PS/ATR, RHIC RF, AGS)
        - Performance measurement " " "
        - Impacts on applications, diagnostics, etc.
        - Impacts on installation/checkout/commissioning (of FECs by RAP)
        - Impacts on post mortem, persistence, etc. (if any)
        - (Impacts on config, database, etc. -- none expected)
        
        

    WORK BREAKDOWN & SEQUENCE OF TASKS

    
    1. INITIAL MODS
    
    	1.1  F(t) stepping; preserve F.result	.  .  .  .  (done)
    	1.2  Fix F-step real-time problem	.  .  .  .  (done)
    	1.3  Multiply & shift (hi precision).	.  .  .  .  (done)
    	1.4  Suppress corrupt calculations	.  .  .  .  (done)
    	1.5  Move error table			.  .  .  .  (done)
    	1.6  Commands to upload, reset it	.  .  .  .  (done)
    	1.6  Driver (Tom)			.  .  .  .  (done)
    
    
    2.  FLEXIBLE FORMULA - 2 testing/release levels:
    
    2A. NEW STRUCTURES, OLD FORMULA
    
    	2A.1  Add "scratchpad", move values	.  .  .  .  (done)
    	2A.2  Modify calc to use scratchpad	.  .  .  .  (in progress)
    	2A.3  Add "registers", etc.		.  .  .  .
    	2A.4  Relative F(t) tables.		.  .  .  .  (in progress)
    
    
    2B. FLEXIBLE FORMULA
    
    	2B.1  Extend/complete interp. lang.	.  .  .  .  (done)
    	2A.2  Mods to formula descriptors	.  .  .  .
    	2B.3  Interpreter (decode)		.  .  .  .
    	2B.4  Operations (functions)		.  .  .  .
    	2B.5  Changes to commands; other impact	.  .  .  .
    
    
    3.  CUBIC INTERPOLATION, OTHER MODS
    
    	3.1  New table type (3-row struct,flag)	.  .  .  .
    	3.2  Function to perform cubic interp.	.  .  .  .
    	3.3  Once-only event			.  .  .  .
    	3.4  Formula "chaining"			.  .  .  .
    	3.5  RTDL frames in shared memory	.  .  .  .  (partial)
    	3.6  Errors, other impacts		.  .  .  .
    
    
    4. ERROR DETECT
    
    	4.1  Detect timeout of flex. calculation
    	4.2  Detect new overflow conditions
    	4.3  Detect & reject "corrupted" calcs
    	4.4  Changes to err detect & report	.  .  .  .  (partial)
    	4.5  Processing of RTDL frames 		.  .  .  .
    	4.6  ADO mods				.  .  .  .
    	4.7  Remove unused scoreboard values	.  .  .  .  (partial)
    
    
    
    
    5. TESTING & INTEGRATION, PERFORMANCE MEAS.
    
    	5.1  TEST, INTEGRATE, UPGRADE / ADOs	.  .  .  .
    	5.2  PERFORMANCE MEASUREMENT / RHIC ADO	.  .  .  .
    	5.3  AGS INTEGRATION & PERF. MEAS.	.  .  .  .
    	5.4  Support - RHIC install/upgrade	.  .  .  .
    	5.5  Support AGS       			.  .  .  .
    
    
    6. SAVE (NVRAM) INDIVIDUAL TABLES
    
    	6.1  Structure for tables.		.  .  .  .
    	6.2  Code to save single table		.  .  .  .
    	6.3  Restore tables			.  .  .  .
    	6,4  Persistence?			?
    	6.5  Post Mortem??			?
    
    
    NOTES: Since many of the items are interrelated, the detailed breakdown does not represent code modularity. 1-4 can be done as sequential tasks. Projected completion dates: 1. 12/19 (done) 2A. 2/13 2B. 3/20 3. (During or after Dry Run) 4. (During or after Dry Run) 5-7 could be done somewhat concurrently with 1-4. The above does not include "Possible Requirements" such as Post Mortem Services, Table Creation in FECs

    Top