;=================================================== ; mkstr+13 ; ; MDI Structure Program ; ; This file contains the structure program and most of ; the routines to generate dynamics and low rate data ; products. ; ;--------------------------------------------------- ; ; V1.0 - 9 Aug 95 ; Constructed from the 60 second version (1.0). ; ; V1.1 - 23 Aug 95 ; High Rate TLM handling ; ; V1.2 - 29 Sep 95 ; Fix re-initialization of register lists at ; mode switch (Prime60 -> Prime30). ; ; V1.3 - 5 Oct 95 ; 1. Move List page from page 17 to page 14. ; 2. Divide velocity data by 8 before downlinking. ; 3. Added code to save LOI data in circular buffers. ; ; V1.5 - 16 Oct 95 ; 1. Implemented CALLBACK feature in Prime30 ; ; V1.06 - 31 Oct 95 ; 1. The IP error dump register list overlapped the med-l working ; register list. This caused the npix_total to be overwritten ; and thus caused more segments to be downlinked than necessary. ; As the number of segments was initialized to 1, this resulted ; in negative segment numbers as the segment number is decremented ; after each call to LRDXFR. ; The med-l register list has been moved to 476-491. ; 2. Register Initialization is controlled by a flag regiser. ; Initialization is undertaken only if the flag is zero. This avoids ; the problem of re-initialization when PRIME30 rusn for the first ; time. ; 3. Added a check at frame 20 to disable re-processing if another ; frmae 20 is recieved from the camera. ; 4. Modified the velocity and Continuum (MKCNTNM) routines to ; to include header constructions and cropping. Thus Page 5 now ; contains the VELOCITY *data product*. Similarly, page 9 contains ; the CONTINUUM data product. ; 5. Modified LOI LRDXFR parameters for new LOI (LOI5) list. ; 6. Modified VEL and CNTNM DPC's to reflect new CROP parameters. ; ; V1.07 - 3 Nov 95 ; 1. Changed source page for LOI-v CB and LOI-c CB data products. ; Now uses page 4 instead of page 1. Page 4 already had a header ; from CNTNM instruction. ; 2. The Velocity and Continuum data is used by 5k routines. Therefore ; it can not be processed into a data product until the 5k processing ; is complete. Two new routines to convert Vel and Ic data into data ; products have been created. The final product is directed to the ; page specified by IPRL_STR_VELDEST and IPRL_STR_ICDEST respectively. ; These routines are called by FRM10, FRM20 and the DMPHR modules. ; 3. Moved temporary headers for vel and Ic data products to page ; 19:0x110000 and 19:0x110226 respectively (from 12:0x0F000 and ; 12:0x0F226). This is to avoid conflicting with campaign headers. ; ; V1.08 - 15 Nov 95 ; 1. Move HRDINIT register lists for VEL60, VEL30, Ic60, Ic30, CB-v ; and CB-I to REGINI routine. These lists can then be modified ; without making any changes to the mkstr program. ; 2. Move data products to offset 0x500 in the page. ; ; V1.09 - 21 Nov 95 ; 1. Purge pages 10, 12, 14 and 16. ; ; V1.10 - 29 Nov 95 ; 1. Use a single DPC code for circular buffer data products; i.e. ; the dpc code does not reflect 30 or 60 second accumulation since ; circular buffer data contains both types of data. ; 2. Save accumulation period in $IPRL_STR_ACCTIM ; 3. Set or clear 30 sec accumulation bit for med-l, loi-v and loi-c ; data products. ; ; V1.11 - 30 Nov 95 ; 1. Modified dispatch code in STR60 and STR30. The new code does not ; use register based jumps. ; 2. Modified Register Dump and Error Dump dpc's. ; ; V1.12 - 1 Dec 95 ; 1. Chnaged size of MP and FB to 16k and Limb figure to 20k. ; Corresponding changes to TWA RL's and list load instructions in ; scitbls.src. ; 2. Changed Flat Field Offset to 0 (from 0x20000). ; 3. Changed List_Count parameter in RWBIN register lists for ; Mag Proxy and Flux Budget. ; ; V1.13, V1.14, V1.15 - 18 Jan 96 ; 1. Check R3075 to determine VC2 status at frame 4 (not R3077). ; 2. Remove SAVEMODE from FR07 processing. ; 3. Construct Mag Proxy and Flux Budget data using 2 calls to RWBIN ; for each. A single call generates more than 8K words of output ; data which overflows IP internal buffer. ; ; V1.16 - 1 Mar 96 Dnyanesh Mathur ; 1. The number of times LRDXFR is called for Med-l is determined by ; the number of segments specified in the VWBIN list load command ; in the scitbls.src control file. ; V1.17 - 5 Mar 96 Dnyanesh Mathur ; 1. Multiply L-Depth and Continuum by 2 for 30s observations. ; 2. Downlink of V and Ic enabled during ALT periods while in dynamics ; mode. ; 3. The location of med-l changed to accomodate larger data product. ; 4. Page 11 is used as a scratch page instead of 1 because the new ; VWBIN list causes construction of med-l to take longer thus pushing ; the construction of other 5k data products to a time after page 1 ; becomes unavailable. ; ; V1.18 - 13 Mar 96 Dnyanesh Mathur ; 1. The temporary register list used for constructing Ic data product ; contained incorrect source and destination addresses. The ls address ; word was not 0. ; ; V1.19 - 2 Apr 96 Dnyanesh Mathur ; 1. Change the order of 5k data product output. The uncompressed, small ; data products are now downlinked first. ; 2. Incorporate a routine to check frame number of the new frame to ; track camera errors. ; 3. Allow line depth or continuum to be downlinked with velocity in ; dynamics mode. ; 4. Purge List and Table pages in smaller chunks. Purge larger areas ; per minute. Move purges to frame 6. ; ; V1.20 - 4 Apr 96 Dnyanesh Mathur ; 1. Replaced high rate downlink code by the code using the high rate ; routines. ; ; V1.21 - 8 Apr 96 Dnyanesh Mathur ; 1. Corrected Circular Buffer headers source address. ; 2. Increased "count" parameter in LF TWA RL to 0x6000 (in str_rlinit). ; ;------------------------------------------------------------------------------ QPROG_STR60:: GETHEADER R0105 CALLQUE &QSR_STR_FRMCHK ; SETREG $IPRL_STR_VELXFR $IPRL_STR_VEL60 SETREG $IPRL_STR_LDXFR $IPRL_STR_LD60 SETREG $IPRL_STR_VHDR $IPRL_STR_V60HDR SETREG $IPRL_STR_ICHDR $IPRL_STR_IC60HDR SETREG $IPRL_STR_LDHDR $IPRL_STR_LD60HDR SETREG $IPRL_STR_ACCTIM 60 ; SETREG $IPRL_STR_EP60 &CKFRM60 ; CKFRM60: BRANCHEQ R3072 1 &FRM01 BRANCHEQ R3072 2 &FRM02 BRANCHEQ R3072 4 &FRM04 BRANCHEQ R3072 5 &FRM05 BRANCHEQ R3072 6 &FRM06 BRANCHEQ R3072 7 &FRM07 BRANCHEQ R3072 8 &FRM08 BRANCHEQ R3072 19 &FRM19 ; BRANCHEQ R3072 20 &FRM20 END ; ;................................................................. ; QPROG_STR30:: GETHEADER R0105 CALLQUE &QSR_STR_FRMCHK ; SETREG $IPRL_STR_VELXFR $IPRL_STR_VEL30 SETREG $IPRL_STR_LDXFR $IPRL_STR_LD30 SETREG $IPRL_STR_VHDR $IPRL_STR_V30HDR SETREG $IPRL_STR_ICHDR $IPRL_STR_IC30HDR SETREG $IPRL_STR_LDHDR $IPRL_STR_LD30HDR SETREG $IPRL_STR_ACCTIM 30 ; SETREG $IPRL_STR_EP30 &CKFRM30 ; CKFRM30: CALLQUE $QSR_CB_CALLBACK ; BRANCHEQ R3072 1 &FRM01 BRANCHEQ R3072 2 &FRM02 BRANCHEQ R3072 4 &FRM04 BRANCHEQ R3072 5 &FRM05 BRANCHEQ R3072 6 &FRM06 BRANCHEQ R3072 7 &FRM07 BRANCHEQ R3072 8 &FRM08 BRANCHEQ R3072 9 &FRM09 BRANCHEQ R3072 10 &FRM10 END ; ;......................................................................... FRM01: END ;................................................ FRM02: AVGTEMPS 3:0x00134 12 END ;................................................ FRM04: ; If HR board hang problem has been detected at frame 20, reset the IP here ; and re-start the downlink. Reset done at this point allows all 5k processing ; to be completed but still leave enough time to downlink the full velocity ; image. Part of continuum image will however be lost. ; This code should execute if ; in dynamics mode ; HR problem detected at Frame 20. ; BRANCHIF R3075 &DONE04 ; skip if not in Dynamics (Check frm #3-3075) BRANCHNR 0x4000 &DONE04 ; Page 8 busy-presumably sending out velocity BRANCHEQ R0081 0 &DONE04 ; No HR problem; downlink restart not needed SAVEMODE ; IP Reset SETREG R0082 1 ; Set flag for Frame 5 to initiate downlink END DONE04: SETREG R0082 0 ; Don't initiate downlink at frame 5 END ;................................................ FRM05: BRANCHIF R0082 &DONE05 START2HR 0x49 0x4000 0x4800 R518 R534 DONE05: SETREG R0082 0 END ;................................................ FRM06: ; All of pages 10 (flat field table) and 12 (circular ; buffer data) are purged here. Purge block length is ; set to 16 (=128k words) and loop count is 8. ; 8 * 128k = 1 MW ; This processing should take ~1.31 seconds ; (2 pages * (82ms/page * 16blks/page)) ; SETREG R512 8 SETREG R159 16 SETREG R151 16 PURG1012: PURGELST R152 ; Purge Page 12 PURGELST R144 ; Purge Page 10 ADDREGD R512 0xFFFF ; R512 = R512 - 1 BRANCHNE R512 0 &PURG1012 ; END ;................................................ FRM07: SAVEMODE NOOP COPYTAB R1116 ; Copy Vel Table COPYTAB R1124 ; Copy Reciprocal Table END ; ;................................................ FRM08: SETREG R512 128 SETREG R143 1 SETREG R135 1 PURG1416: PURGELST R136 ; Purge Page 14 PURGETAB R128 ; Purge Page 16 ADDREGD R512 0xFFFF ; R512 = R512 - 1 BRANCHNE R512 0 &PURG1416 ; END ;................................................ FRM09: COPYREG $IPRL_STR_CADC30 $IPRL_STR_CADC SETREG $IPRL_STR_SCLF 2 CALLQUE &MKVEL CALLQUE &MKLDPTH END ;................................................ FRM19: COPYREG $IPRL_STR_CADC60 $IPRL_STR_CADC SETREG $IPRL_STR_SCLF 1 CALLQUE &MKVEL CALLQUE &MKLDPTH END ;................................................ FRM10: BRANCHIF $IPRL_STR_FRMCHK &DO_FRM10 THROW 0xFBAD SETREG $IPRL_STR_FRMCHK 0 END ; DO_FRM10: SETREG $IPRL_STR_FRMCHK 1 LRDINIT 0 MOVBLK 0:0x0002D 5:0x11491C 4L ; Ref time -> LOI-c MOVBLK 0:0x0002D 7:0x11473C 4L ; Ref Time -> LOI-v ; CALLQUE &MKCNTNM ; BRANCHEQ R3076 1 &SETCF ; Cmpg Mode; Skip V+Ic D/L BRANCHIF $IPRF_STR_CF &CHKALT SETREG $IPRF_STR_CF 0 GOTO &ALTHRDL ; ; The state of flags is preserved for ALT repeats CHKALT: BRANCHNE $IPRL_STR_COUNT 0 &CHKFLG COPYREG $IPRL_STR_ALTRPTS $IPRL_STR_COUNT ADDREGD $IPRL_STR_COUNT 1 COPYREG R3075 $IPRL_STR_VC COPYREG R3077 $IPRL_STR_MAGHR ; CHKFLG: ADDREGD $IPRL_STR_COUNT 0xFFFF BRANCHEQ R3075 0 &DO5K ; skip hi rate D/L if VC = 0 BRANCHEQ R3077 1 &DO5K ; MAG D/L in 160K ; ALTHRDL: CALLQUE &DMPHR GOTO &DO5K ; SETCF: SETREG $IPRF_STR_CF 1 ; DO5K: CALLQUE &STRDPS SETREGS $IPRL_STR_VELDEST 2 5:0x00500 CALLQUE &MKVELDP SETREGS $IPRL_STR_ICDEST 2 7:0x00500 CALLQUE &MKICDP ; SETREG $IPRL_CB_ADDR 0 SETREG $IPRL_STR_FRMCHK 0 END ;................................................ FRM20: BRANCHIF $IPRL_STR_FRMCHK &DO_FRM20 THROW 0xFBAD SETREG $IPRL_STR_FRMCHK 0 END ; DO_FRM20: SETREG $IPRL_STR_FRMCHK 1 LRDINIT 0 MOVBLK 0:0x0002D 5:0x11491C 4L ; Ref time -> LOI-c MOVBLK 0:0x0002D 7:0x11473C 4L ; Ref Time -> LOI-v COPYREG $IPRL_STR_CADC60 $IPRL_STR_CADC CALLQUE &MKCNTNM BRANCHIF R3075 &DP5K ; skip hi rate if VC = 0 BRANCHIF $IPRF_MAG_HR &V_I_DL ; D/L stored mags if IPRF_MAG_HR set CALLQUE &QSR_MAG_HRDL BRANCHIF $IPRF_MAG_HR &V_I_DL ; If all mags done, d/l v+Ic GOTO &DP5K V_I_DL: CALLQUE &DMPHR DP5K: CALLQUE &STRDPS SETREGS $IPRL_STR_VELDEST 2 5:0x00500 CALLQUE &MKVELDP SETREGS $IPRL_STR_ICDEST 2 7:0x00500 CALLQUE &MKICDP ; SETREG $IPRL_STR_FRMCHK 0 END ;................................................ ; MKVEL: ; Velocity: ; Source Page Sa : Page 0, Offset 1300 ; Source Page Sc : Page 1, Offset 1300 ; Destination Page : Page 5, Offset 0 ; Shift Count : 3 (Sum of 4 images) ; Block Count : 127 ; ; ; SETREGS R800 8 0:0x00514 1:0x00514 5:0x00000 3 127 ; COPYRI2D $IPRL_STR_VELXFR $IPRL_STR_VELWRK $#IPRL_STR_VELWRK VLCTY $IPRL_STR_VELWRK ; ; SETREGS R512 6 1 0x0000 0x2000 0xE4 0xCFFF 0xFF3A COPYRI2D $IPRL_STR_VHDR R512 6 ; COPYRD2D $IPRL_STR_V60HDR R512 6 HRDINIT R512 MOVBLK 4:0x00000 19:0x110000 0x00226L ; Save Header ; RTNQUE ; ;....................... ; MKLDPTH: ; ; Line Depth: ; Source Page Sa : Page 0, Offset 1300 ; Source Page Sc : Page 1, Offset 1300 ; Destination Page : Page 6, Offset 0 ; Shift Count : 16 ; Block Count : 127 (Process data per call ~150ms) ; Lookup Segment : 8 (Depends on SQRT table location) ; ; SETREGS R808 9 0:0x00514 1:0x00514 6:0x00000 16 127 8 ; COPYRI2D $IPRL_STR_LDHDR R512 6 HRDINIT R512 MOVBLK 4:0x00000 19:0x110500 0x00226L ; COPYRI2D $IPRL_STR_LDXFR $IPRL_STR_LDWRK $#IPRL_STR_LDWRK LDEPTH $IPRL_STR_LDWRK ; SETREGS R811 8 6:0x00000 4:0x00000 0x100000L 2 16 ;COPYREG $IPRL_STR_LDWRK+5 R812 COPYREG $IPRL_STR_SCLF R817 ; SCLF is set at F10 or F20 SCALE R811 SETREGS R811 6 4:0x00000 6:0x00000 0x100000L ;COPYREG $IPRL_STR_LDWRK+5 R814 MOVBLKI R811 ; RTNQUE ; ;..................................................... ; MKCNTNM: ; ; Continuum: ; ; ; SETREGS R528 6 1 0x0000 0x2000 0xE2 0xCFFF 0xFF3B COPYRI2D $IPRL_STR_ICHDR R512 6 HRDINIT R512 MOVBLK 4:0x00000 19:0x110226 0x00226L ; ; Extract 1024^2 Sd from page 2 to page 1 ; Source Page : page 2, Offset 1300 ; Destination : Page 1, Offset 0 ; X-Length : 1024 ; Y-Length : 1024 ; Row Length : 1040 ; Global Offset Reg.: 69 ; ; SETREGS R811 8 2:0x00514 1:0x00000 1024 1024 1040 69 COPYRD2D $IPRL_STR_EXTRSD R811 8 EXTRACT R811 ; ; Extract 1024^2 Si from page 3 to page 4 ; Source Page : page 3, Offset 1300 ; Destination : Page 4, Offset 550 ; X-Length : 1024 ; Y-Length : 1024 ; Row Length : 1040 ; Global Offset Reg.: 69 ; ; SETREGS R819 8 1300 0x1800 4:0x00226 1024 1024 1040 69 COPYRD2D $IPRL_STR_EXTRSI R811 8 EXTRACT R811 ; ; Construct Continuum image in Page 7, from Sd, Si and Ld ; Source (Si) : Page 4, Offset 0 ; Source (Ld) : Page 6, Offset 0 ; Source (Sd) : Page 1, Offset 0 ; Destination : Page 7, Offset 0 ; Block Count : 63 (1/2 image processed, each call < 300 ms) ; Cadc : 200 ; ; SETREGS R821 10 4:0x00226 6:0x00000 1:0x00000 7:0x00000 63 200 COPYRD2D $IPRL_STR_MKIC R811 10 COPYREG $IPRL_STR_CADC R820 ; Use Cadc offset set by F10 or F20 CNTNM R811 CNTNM R811 ; SETREGS R811 8 7:0x00000 4:0x00000 0x100000L 2 16 COPYREG $IPRL_STR_SCLF R817 ; SCLF is set at F10 or F20 SCALE R811 SETREGS R811 6 4:0x00000 7:0x00000 0x100000L ; COPYREG $IPRL_STR_LDWRK+5 R814 MOVBLKI R811 ; RTNQUE ; ;....................... ; STRDPS: ; MKMEDL: ; Construct Medium-l ; ; This routine assumes that X and Y vectors as well as a Vector weighted ; bin list for Solar radius of 3264 units has already been loaded at ; 14:0x07000. Such a bin list consists of 29 bins generating 14509 words of ; data. ; ; Construct vector weighted binned image ; Velocity Page 5 ; Destination Address 7:0x110000 ; List Count 0 ; List Count 6 (*5=30; 5 bins processed on last call) ; VWBIN List Address 14:0x07000 ; Global Offset Reg. 69 ; ; Velocity -> Bad Pixel Removed -> Med-l ; 5 -> 1 -> 7:0x110000 ; COPYRD2D R3052 R1092 8 BADPIX R1092 ; COPYRD2D R1072 R832 8 VWBIN R832 VWBIN R832 VWBIN R832 VWBIN R832 ;VWBIN R832 ; ;........................ ; MKGP: ; ; Construct Golf Proxy ; (RWBinned Line Depth - 11289 pixels) ; ; COPYRD2D R3040 R1100 12 FLATFLD R1100 ; COPYRD2D R1024 R900 8 RWBIN R900 ; Multiple RWBIN calls to avoid RWBIN R900 ;_generating more than 8192 output words RWBIN R900 ;_per call. RWBIN R900 ; COPYRD2D R1032 R920 8 RWBIN R920 RWBIN R920 RWBIN R920 RWBIN R920 ; ;.......................... ; MKFB: ; ; Construct Flux Budget ; (RWBinned Continuum) ; COPYRD2D R3060 R1080 12 FLATFLD R1080 COPYRD2D R1040 R952 8 RWBIN R952 RWBIN R952 RWBIN R952 RWBIN R952 ; COPYRD2D R1048 R972 8 RWBIN R972 RWBIN R972 RWBIN R972 RWBIN R972 ; ; ;........................... ; MKLF: ; ; Construct Limb Figure ; ; Construct 1st Limb Figure from image in page 7 into page 6 (110000) ;SETREGS R856 8 0x5800 6:0x110000 0 2000 14:0x03000 69 ;test ; ;SETREGS R856 8 0x3800 6:0x110000 0 2000 14:0x03000 69 ; COPYRD2D R1056 R856 8 CROP R856 ; TWAVG R864 ; ; Construct 2nd Limb Figure from image in page 7 into page 6 (114000) ;SETREGS R880 8 0x5000 6:0x115000 0 2000 14:0x05000 69 ;test ;SETREGS R880 8 0x3800 6:0x115000 0 2000 14:0x05000 69 ; COPYRD2D R1064 R880 8 CROP R880 ; TWAVG R888 ; ; ; ADDREGD R3583 2 ; GOTOREG R3583 ; GOTO &SCITLM ; Start 5k data downlink ; ; ;-------------------------------------------------------- ; Program to downlink data via the 5k channel ; ; SCITLM: ; ; Structure Mode Telemetry output program ; --------- ---- --------- ------ ------- ; (Uses Registers R210-R293) ; ; Get System Time From Page 0 ; LRDINIT 0x1800 NOOP NOOP NOOP NOOP NOOP ; ; Error log output (if needed) COPYELOG $IPRL_STR_ERRDMP+4 ; R464 BRANCHIF $IPRL_STR_ERRDMP+6 &CHDUMP ; R466 LRDXFR $IPRL_STR_ERRDMP ; ; Camera Headers Dump CHDUMP: BRANCHIF $IPRL_STR_CAMHDMP ®DMP _LRDXFR $IPRL_STR_CAMHDR ; ; ; Register Block Data Product ; REGDMP: CALLQUE ®DP ; ; ; LOI-v ; Source Page: 5 ; Destination Addr.: 7:0x114740 ; List Pointer: 0 ; List Count: 5 ; List Addr.: 14:0x030000 ; Offset Reg: 69 ; ; SETREGS $IPRL_STR_MKLOIV 8 0x2800 7:0x114740 0 45 14:0x034000 R69 _IRBIN $IPRL_STR_MKLOIV ; ; Register List R416-R429 is initialized by Irregular Bin load ; command in the control file loi3b.src ; COPYRD2D R416 $IPRL_STR_LVLRDP_W 16 SETREG $IPRL_STR_DPCW 0xFF3F REGAND $IPRL_STR_LVLRDP_W+10 $IPRL_STR_DPCW $IPRL_STR_DPCW+1 BRANCHEQ $IPRL_STR_ACCTIM 60 &DOLVLRD SETREG $IPRL_STR_DPCW 0x0040 ; Set 30s DP bit REGOR $IPRL_STR_DPCW+1 $IPRL_STR_DPCW $IPRL_STR_LVLRDP_W+10 DOLVLRD: LRDXFR $IPRL_STR_LVLRDP_W ; ; SETREGS R512 6 4:0x00001 0x3000 0 0xCFFF 0xFF2E MOVBLK 19:0x110000 11:0x00000 0x0226L COPYRD2D $IPRL_STR_CBVHDR R512 6 HRDINIT R512 ; SETREGS R512 6 6:0x00000 12:0x010000 0x0228L DAT2LST R512 COPYCB $IPRL_STR_LOIV2CB ; ; LOI-c ; Source Page: 7 ; Destination Addr.: 5:0x114920 ; List Pointer: 0 ; List Count: 5 ; List Addr.: 14:0x030000 ; Offset Reg: 69 ; ; ; SETREGS $IPRL_STR_MKLOIC 8 0x3800 5:0x114920 0 45 14:0x030000 R69 _IRBIN $IPRL_STR_MKLOIC ; ; Register List R430-R443 is initialized by Irregular Bin load ; command in the control file loi3b.src ; COPYRD2D R430 $IPRL_STR_LCLRDP_W 16 SETREG $IPRL_STR_DPCW 0xFF3F REGAND $IPRL_STR_LCLRDP_W+10 $IPRL_STR_DPCW $IPRL_STR_DPCW+1 BRANCHEQ $IPRL_STR_ACCTIM 60 &DOLCLRD SETREG $IPRL_STR_DPCW 0x0040 ; Set 30s DP bit REGOR $IPRL_STR_DPCW+1 $IPRL_STR_DPCW $IPRL_STR_LCLRDP_W+10 DOLCLRD: LRDXFR $IPRL_STR_LCLRDP_W ; ; SETREGS R512 6 4:0x00001 0x3000 0 0xCFFF 0xFF2F MOVBLK 19:0x110000 11:0x00000 0x0226L COPYRD2D $IPRL_STR_CBIHDR R512 6 HRDINIT R512 ; SETREGS R512 6 6:0x00000 12:0x050000 0x0228L DAT2LST R512 COPYCB $IPRL_STR_LOIC2CB ; ; Limb Figure ; LRDXFR R402 ; ; GOLF Proxy LRDXFR R374 ; ; Continuum Intensity ; LRDXFR R388 ; ; Output Magnetogram if VC <> 0 && CmpgF == 0 && NSeg <> 0 MAG_DL: BRANCHIF R3075 &ENDMAG ; No 160k BRANCHEQ R3076 1 &ENDMAG ; Campaign Mode BRANCHIF $IPRL_MAG_LRDPRM+3 &MED_L ; REGSUB $IPRL_MAG_LRDPRM+13 $IPRL_MAG_LRDPRM+1 $IPRL_MAG_TMP BRANCHGT $IPRL_MAG_TMP 0 &DO_MAG5K REGSUB $IPRL_MAG_LRDPRM+12 $IPRL_MAG_LRDPRM $IPRL_MAG_TMP BRANCHGT $IPRL_MAG_TMP 0 &DO_MAG5K ENDMAG: SETREG $IPRL_MAG_LRDPRM+3 0 ; No more Mag data GOTO &MED_L ; DO_MAG5K: LRDXFR $IPRL_MAG_LRDPRM LRDXFR $IPRL_MAG_LRDPRM LRDXFR $IPRL_MAG_LRDPRM LRDXFR $IPRL_MAG_LRDPRM ; MED_L: ; ; Medium-l Data output ; ; LRDXFR R360 ; NpixTotal 0 ; NpixSeg 0 ; Seqment 4 ; Source 7:0x110000 ; MaxSource 3584 ; N 0 ; K 0 ; SegLength 3584 ; DPID 0xBFFFFFB0L ; NPixImage 14336L ; ; SETREGS R360 9 0 0 0 4 7:0x110000 3584 0 0 ; SETREGS R369 5 3584 0xBFFF 0xFFB0 14336 0 COPYRD2D $IPRL_STR_MEDL_L $IPRL_STR_MEDL_W 14 ; Copy Med-l LRDXFR RL ; SETREG $IPRL_STR_DPCW 0xFF3F REGAND $IPRL_STR_MEDL_W+10 $IPRL_STR_DPCW $IPRL_STR_DPCW+1 BRANCHEQ $IPRL_STR_ACCTIM 60 &DOLRDM SETREG $IPRL_STR_DPCW 0x0040 ; Set 30s DP bit REGOR $IPRL_STR_DPCW+1 $IPRL_STR_DPCW $IPRL_STR_MEDL_W+10 DOLRDM: LRDXFR $IPRL_STR_MEDL_W BRANCHNE $IPRL_STR_MEDL_W+3 0 &DOLRDM ; ; LRDEND SETIRPT 1 ; ;.................................................................. ; ; Construct Time Weighted Averages ; TWAVG R908 ; MP #1 TWAVG R928 ; MP #2 ; TWAVG R960 ; FB #1 TWAVG R980 ; FB #2 ; TWAVG R864 ; LF #1 TWAVG R888 ; LF #2 ; ;.................................................................. ; BRANCHEQ R873 0 &PATH1 BRANCHEQ R897 0 &PATH2 GOTO &DONE5K ; PATH1: ; _COPYLST R216 ; MP RWBin 1 <- New MP RWBin List ; _COPYLST R280 ; FB RWBin 1 <- New FB RWBin List _COPYLST R344 ; LFCropList1 <- New LF Crop List GOTO &CPYLRD ; PATH2: ; _COPYLST R288 ; FB RWBin 2 <- New FB RWBin List _COPYLST R352 ; LFCropList2 <- New LF Crop List GOTO &CPYLRD ; CPYLRD: COPYRD2D R168 R374 14 COPYRD2D R232 R388 14 COPYRD2D R296 R402 14 ; Set LRDXFR from set 1 ; DONE5K: RTNQUE ; ;................................................................... ; Subroutine to make a velocity data product ; MKVELDP: ; Scale Velocity data; Source Page 5, Dest Page 4 SETREGS R504 8 5:0x00000 11:0x00000 0x100000L 1 13 SCALE R504 ; ; Copy Velocity from page 4 to destination page (5 or 8) SETREGS R520 8 0x5800 5:0x00726 0 1010 14:0x00000 R69 COPYREG $IPRL_STR_VELDEST R521 ADDREGD R521 0x0226 COPYREG $IPRL_STR_VELDEST+1 R522 CROP R520 ; SETREGS R512 6 19:0x110000 5:0x00500 550L COPYREG $IPRL_STR_VELDEST R514 COPYREG $IPRL_STR_VELDEST+1 R515 MOVBLKI R512 RTNQUE ; ;................................................................... ; Subroutine to make Continuum / Line-Depth data product ; MKICDP: MKLDDP: ; Jump to either GENICDP or GENLDDP BRANCHIF $IPRL_STR_ICLDOPT &GENICDP GOTO &GENLDDP ; GENICDP: SETREGS R544 8 7:0x00000 11:0x00000 0x100000L 0x0000 9 SETREG $IPRL_STR_HDOFST 0x0226 GOTO &MKDP ; GENLDDP: SETREGS R544 8 6:0x00000 11:0x00000 0x100000L 0x0002 9 SETREG $IPRL_STR_HDOFST 0x0500 GOTO &MKDP ; MKDP: ; Apply Square-Root (Table @ Seg 9) scaling to the Uncropped image ; SETREGS R544 8 7:0x00000 11:0x00000 0x100000L 0x0000 9 LOOKUP R544 ; ; Crop Continuum from page 11 to Destination Page (7 or 9) SETREGS R536 8 0x5800 7:0x00226 0 1010 14:0x00000 R69 COPYREG $IPRL_STR_ICDEST R537 ADDREGD R537 0x0226 COPYREG $IPRL_STR_ICDEST+1 R538 CROP R536 ; ; Copy Header to destination page (7 or 9) SETREGS R512 6 19:0x110226 7:0x00500 550L COPYREG $IPRL_STR_HDOFST R512 COPYREG $IPRL_STR_ICDEST R514 COPYREG $IPRL_STR_ICDEST+1 R515 MOVBLKI R512 ; ; Load length in R534 COPYREG R71 R534 COPYREG R72 R535 ; RTNQUE ; ;-------------------------------------------------------------- ; Function to create data product containing IP registers. ; ; Register Usage: ; Register(s) Usage ; R1130 R_init: Initialization Flag ; R1131 R_r0_addr_lo: Low order Address of R0 ; R1132-1133 R_startaddr: Address of 1st register of D/L Block ; R1134 R_startnum: Start register Number ; R1135-1136 R_endaddr: Address of last regsier of D/L Block ; R1137 R_endnum: End register number ; R1138 R_diff: = (R_movreg - R_endaddr) ; R1139 R_movreg: RL for moving a block of registers ; R1145 R_lrdxfr: RL to create dp entry. ; ; Address ; 7:0x113C00 dp_buf0: CCD Temperatures ; 7:0x113C14 dp_buf1: Fixed Registers (R126-R159) ; 7:0x113C36 dp_buf2: Register Block ; ; 40 Count ; 94 max_src ; ;...................................................................... ; REGDP: BRANCHIF R1130 &MKDPC ; CALLQUE &INITREG ; SETREG R1131 0xE000 ; SETREG R1130 0 ; MKDPC: ; ; Copy CCD temperatures to output buffer SAVERLST R0 20 7:0x113C00 ; ; Copy current pointer in the register block to R126 REGSUB R1140 R1131 R126 ; ; Save Register pointer and Memory Purge registers to o/p buffer SAVERLST R126 34 7:0x113C14 ; ; Set destination address in MOVBLKI register list SETREGS R1142 2 7:0x113C36 SETREGS R1144 2 40L ; Copy register sub-block and setup dpc header MOVBLKI R1140 ; SETREGS R1146 6 0 0 0 1 7:0x113C00 ; SETREGS R1152 6 94 0 0 94 0xA000 0xffb6 ; SETREGS R1158 2 94 0 COPYREG R126 $IPRL_STR_RDUMP+11 ; _LRDXFR R1146 _LRDXFR $IPRL_STR_RDUMP ; ; Check if Register block downlink is completed REGSUB R1140 R1136 R1160 BRANCHLT R1160 0 &DONER CALLQUE &INITREG DONER: RTNQUE ; ;....................................................... ; Initialize Registers ; ; Registers area is 16:0x0BE000 to 16:0x0BFFFF ; ; R1134, R1135 - Contains the Register Block Start Number ; R1138, R1139 - Contains Register Block End Number ; R1132, R1133 - Address of Start Register Number ; R1135, R1136 - Address of end Register Number ; R1140, R1141 - Address of next register to be downlinked ; INITREG: SETREGS R1132 2 16:0x0BE000 ADDADR R1132 R1134 R1132 SETREGS R1136 2 16:0x0BE000 ADDADR R1136 R1138 R1136 COPYREG R1132 R1140 COPYREG R1133 R1141 RTNQUE ;....................................................... ;-------------------------------------------------------------- ; dmphr.ips ; ; This file contains modules to downlink Med-l, MP, FB ; and LF data. ; ; R0081 - High Rate Board Status; 0 = OK; 1 = NOK ; ;----------------------------------------------------- ;................................................... ; DMPHR: CALLQUE &QSR_TLM_RESET BRANCHNE $IPRL_TLM_STATUS 0 &DMPHR_EXIT ; VELIMG: SETREGS $IPRL_STR_VELDEST 2 8:0x00000 CALLQUE &MKVELDP COPYREG R71 R518 COPYREG R72 R519 ; IcIMG: SETREGS $IPRL_STR_ICDEST 2 9:0x00000 CALLQUE &MKICDP COPYREG R71 R534 COPYREG R72 R535 ; NOOP ; ; Start Hi-Rate START2HR 0x49 0x4000 0x4800 R518 R534 CALLQUE &QSR_STR_CHKDL8 ; DMPHR_EXIT: RTNQUE ; ;----------------------------------------------------- ;============================================================