1 / 35

MAVEN Particles and Fields Flight Software Acceptance Test Readiness Review Peter R. Harvey

MAVEN Particles and Fields Flight Software Acceptance Test Readiness Review Peter R. Harvey. Agenda. Agenda Introduction Project Overview Development Status Test Process Test Results to Date Acceptance Test Readiness Test Schedule Abbreviations and Acronyms

kamil
Download Presentation

MAVEN Particles and Fields Flight Software Acceptance Test Readiness Review Peter R. Harvey

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. MAVEN • Particles and Fields • Flight Software • Acceptance Test Readiness Review • Peter R. Harvey

  2. Agenda Agenda Introduction Project Overview Development Status Test Process Test Results to Date Acceptance Test Readiness Test Schedule Abbreviations and Acronyms Agenda defined by MAVEN Software Management Plan, rev B format for SwATRR

  3. Introduction • Introduction • Goals of this review • Review prerequisites : • SwPDR Complete • iPDR Complete • iCDR Complete • Scope : • Boot FSW • CPT Test Scripts • LDS Test Scripts • Products : • Review Report

  4. Project Overview • Purpose and overview of the software project • Boot FSW : • Software in PROM • Used at Cold and Warm Resets • Loads Operational FSW from EEPROM • Safes Instrument if no Operational Program Available • Receives & Transmits Limited Set of Commands and Telemetry • Operational FSW • Controls the Instruments, Power Systems • Collects and Processes Instrument Data • Receives Commands, Distributes to Instruments • Sends Telemetry to Spacecraft • Software project organization and key personnel under D. Curtis • FSW Developer : P. Harvey • FSW Test : Tony Mercer • FSW Quality : J. Fischer • DCB Developer : D. Gordon • GSE Developer : T. Quinn • Inst Simulator : B. Mochizuki

  5. Development Status • Software Products: • Boot FSW (PROM) Build Plan • Build1 : Support ETU DCB Test, S/C Interface tests • Build2 : Updated, Built for Flight Unit PROM • Operational FSW (EEPROM) • Build1 : Support S/C Interface, ETU Instrument I&T • Build2 : Support Storage Capabilities, Onboard Data Processing, FLT I&T • Build3 : Updated, Built for Flight EEPROM • Command and Telemetry Database • FSW Simulations • FSW Test Scripts (ETU) (BOOT CPT and LDS) • Software Personnel: • One Software Engineer • One Test Engineer (new)

  6. Development Status • Development Status • Confirm that documentation baselined in previous reviews • (SRR, PDR, CDR) are updated and current • SwCDR Complete : RFA 12 Complete (Operational Code) • iCDR Complete : No Action Items • FSW Level 4 Up to Date • FSW Level 5 Rev E • S/C-PFDPU ICD is being modified Reviewed/Implemented/Tested changes to Boot Source code per IV&V comments • MAVEN-IVV-1334 Non-void functions do not return a value • MAVEN-IVV-1335 Null pointer dereference in startcf.c • MAVEN-IVV-1337 Error Function not used consistently • Changes pending to Boot Design • None

  7. Development Status • Development Status • Confirm code and peer review documentation has been reviewed and approved • SwPDR, SwCDR, iPDR, iCDR, • IV&V Requirements & Code Reviews • Confirm test plan includes all possible test scenarios Functional/Non Functional EEPROM SRAM/EEPROM Loading • Confirm Software Requirements Traceability Matrix (SRTM) has been updated with all requirements plus any necessary corrections due to discrepancy reports MAVEN_PF_FSW_002_SRS_Tables.xls • Confirm all requirements have been included in test procedure document and these test requirements are uniquely identified and traceable in the SRTM. Module requirements are listed in Module scripts Individual tests list the requirements they are testing.

  8. Code Development Code Development & Test Summary Test Value : 50% Reqmt Test, 25% Module, 25% Qual

  9. Test & Inspection Results • Tests & Inspection results • Tests Performed: • All 55 Testable requirements, 10 modules, CPT • Problems - None • Waivers - None • Issues - None

  10. Software Assurance Plan Assurance Products Quality Assessments to Coding Standard Boot FSW CPT Review/Approval Operational FSW CPT Review/Approval Inspection Report Review/Approval Problem Report/Change Request Closure Review/Approval PR/CR Document Maintenance Test Bed ESD Verification FSW Review Support Support to IV&V Assurance Personnel PF Quality Assurance Src: MAVEN_PF_SYS_008A_PFDPUFlightSoftwareDevelopmentPlan.doc

  11. Risk Chart

  12. Risk Table

  13. Real-Time, LDS, CPT Using DVF Simulations CodeWarrior PF I&T Support Test Process • Test Levels • Function Simulation w/Single Stepping, Standard Log Book Records • Function Simulation w/Scripted Input, Standard Log Book Records • Function Real-Time on DVF System, Standard Log Book Records • Module Real-Time on DVF System w/Script, Automated Log • Long Duration Stress Test on DVF w/Script, Automated Log • Comp. Performance Test on DVF System w/Script, Automated Log • FSW Support to DCB, PFDPU I&T

  14. Test Process • Test Process • Configuration Management • Procedures & scripts developed • Placed under CM using SubVersion • Copies are downloaded from the SVN site to the DVF • Describe Discrepancy Reporting System • Described below • Describe how Test Progress is tracked • On Verification matrix • 50% for a requirement test procedure passing • 25% for a module procedure passing • 25% for qualification tests (CPT&LDS) passing • Describe any safety and security issues relevant to the testing activity • None • Describe all workarounds and non-functioning software components • DPU FPGA rev 9 is not planned for flight (should not matter) • S/C 1 Hz Tick Cannot be Turned Off (Handled by FSW patch)

  15. Software Test Environment Test Environment Test Platform ETU DCB or ETU PFDPU Test Equipment: GSE PC GSEOS Software Spacecraft Sim. Instrument Sim. Logic Analyzer* Digital Scope* Data Storage: All instrument data and housekeeping Command/Event logs Network access (to Science and Remote GSE computers) *: Not shown, Connected when needed X Src: MAVEN_PF_FSW_006_STP Revision -, 4/22/2011

  16. Software Problem Reports Problem Reports/Change Requests Analyses of Cause Before/After Code sections Test procs included Rerun CPT/LDS Signed by PM, QA

  17. Acceptance Test Readiness • Status of Acceptance Test Readiness • List all Requirements Documents that are relevant to this testing • MAVEN_PF_FSW_002E_SRS.doc • Describe how Test Results will be Analyzed including the division of responsibility • Review the Summary at the End • Review Log (CPT ~ 15000 lines) by searching for “FAIL” orredanything… • Describe the Acceptance Test testbed setup (hardware) • DVF without Instrument Message Simulator • Describe the setup and use of Simulators or other Test tools • Same as above • Describe the limitations of the testbed • Power Supply Housekeeping not available • Actuators (EUV, SEP1, SEP2) not simulated • Command/Data Interface to Instruments not received/checked • UART Errors Cannot Be Generated on DVF (PFPXMTIFERR) • Transaction Length Non-4-byte Length Cannot be Sim’d (PFPCMDLNGERR) • CDI Buffer Full Error Cannot Be Sim’d (PFPCDIFULERR) • Known Script Shortcomings • Missing Tests for PFPLDCCNTERR and PFPEEPENAERR • Describe those tests that require hardware for verification • Housekeeping Module A/D sampling of Power Supply Voltages AP23 • Fault ProtectionActuator Closures (EUV, SEP1, SEP2) • CDI Commands to Instrument boards

  18. CPT and Stress Tests • Acceptance Testing (High Level Description) • Performed on the DVF System • Highly Automated Using Approved Test Scripts • CPT requires approximately 30-60 minutes to run, 1-2 hours to review results • LDS requires 72 hours • Long Duration & Stress Test • High Rate of Commands • Command Pass Simulation Every Hour for 72 hours • Memory Load – Uplink of Script Database • Serial Commands – Max commands rate for 250 commands • Execute Script and Verify Results • High Rate of Telemetry • Telemetry Data (All Available Packets) • Memory Dumping at Max Length • CPU Intensive Processing • Not applicable to boot • Verification • Test Status Logged Every Hour • No Errors in FSW or Resets • No Memory Leaks • Comprehensive Performance Test All Requirements Verified All Arms/Disarms Verified All Errors and Events Verified All Telemetry and Commands Used All PF Mode Configurations Used CPU Resource Usage Measured

  19. Test Schedule

  20. Issues/Concerns • Issues and Concerns • Continued discussions of Fault Protection may waste this effort • SC-PFDPU ICD must be signed off for the ATP readiness Software Test Plan delivered, responses provided, no decision on these items • Issue : No Problem Failure Reports at ETU level • Propose to Use PFR’s for delivered code on ETU • Issue : Does not include tests on the Flight boards • Propose to run CPT at the computer board level only • Issue : Does not detail scope of memory loading tests • Propose for Boot, full Operational load to SRAM & EEPROM • Issue : Does not detail scope of all faults handled • Propose to Detail the Boot Safing Sequence in the STP • Issue : No verification matrix for commands, tm, errors, faults • Propose to Add Verification Columns to CTM for these • Issue : Does not detail Configuration management of DVF • Propose discussing this in more depth later

  21. Summary • SwATRR Summary • Collect Requests For Action (RFAs) • Evaluate preparedness for Acceptance Testing • Decision to proceed to Acceptance Testing

  22. Test Script Stds • Script Demonstration • Requirement identification • Overall Consistent Format • Library Support (efw, util) • Function Definitions """ TEST_SPIN_1 : TEST SPIN FIT Computations REV -, 8/21/09 PRH SPIN_1 : SPIN shall compute a sine wave least squares fit of a 32 element array of 16-bit A/D values. The basic formula is x[i] = A + B*cos(i) + C*sin(i) """ from math import * from efw import * from util import * from __main__ import * # required for access to APID_nnn telemetry blocks def load_waveform( adr, A, B, C): cmd.EFW_CMDS( 1 ) wait(APID_263, lambda: APID_263.CMDFLAG==1, flTimeout=20) adstr = "0000" + hex(0x10000+adr)[3:7] bytes = " " for i in range(32): phi = 2*pi*i/32 val = A + B*cos(phi) + C*sin(phi) ival= int(val) bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " efw.idpu_load(adstr, bytes) wait(APID_263, lambda: APID_263.CMDFLAG==0, flTimeout=20) def ffptoflt( val ): sign = val & 0x800000 exp = ((val & 0x7F0000) >> 16) - 64 - 16 mant = val&0xffff if((val&0x8000)==0): return(0) flt = mant*2**exp if(sign!=0): flt = -flt return(flt)

  23. Test Script Names • Script Development • Uses Cmds & Tlm names • Result Logging • Pass/Fail criteria • Error Accounting def spin_test( adr, OffsetA, CostermB, SintermC): log('------ GENERATING NEW WAVEFORM --------- ', color=BLUE, attr=BOLD ) PF=("FAIL","PASS") load_waveform( adr, OffsetA, CostermB, SintermC) fcnt = APID_267.FITCOUNT #We'll watch this count up cmd.EFW_FITSIM() #Perform Fit wait(APID_267, lambda: APID_267.FITCOUNT>fcnt, flTimeout=20) log(" Simulated A,B,C = %8.3f %8.3f %8.3f" %(OffsetA,CostermB,SintermC),\ color=BROWN, attr=BOLD ) wait(APID_26A, lambda:True, flTimeout=20) #SW packet scale = 32768.0 A = ffptoflt(APID_26A.Ex_OFFSET)*scale B = ffptoflt(APID_26A.Ex_COSINE)*scale C = ffptoflt(APID_26A.Ex_SINE)*scale S = ffptoflt(APID_26A.Ex_STDDEV)*scale log(" SPIN Results A,B,C,S = %8.3f %8.3f %8.3f %8.3f" %(A,B,C,S), color=BROWN, attr=BOLD ) difA = abs(A-OffsetA) difB = abs(B-CostermB) difC = abs(C-SintermC) A_range = B_range = C_range = 1 #PASS if( difA > max(1,.002*abs(OffsetA) ) ): A_range=0 #FAIL if( difB > max(1,.002*abs(CostermB)) ): B_range=0 if( difC > max(1,.002*abs(SintermC)) ): C_range=0 log(" Verification A,B,C = %8s %8s %8s" % (PF[A_range],PF[B_range],PF[C_range]),\ color=BROWN, attr=BOLD ) return( 3 - A_range - B_range - C_range) #number of errors TEST_SPIN_1.py RBSP_EFW_FSW_005_CTM.XLS

  24. Test Script Format • Script Development • Script Banner • Consistent Format • Name match to requirements • Section 1 typical setup • Section 2-N subtests • Section N+1 Cleanup&Summary def main(): log('========================================', color=BLUE, attr=BOLD ) log('SPIN_1 : Spin Fit Calculations Check ', color=BLUE, attr=BOLD ) log('========================================', color=BLUE, attr=BOLD ) PF=("FAIL","PASS") errs=0 ebuf = 0x9a00 #EFIELD BUFFER START bbuf = ebuf+0x100 #BFIELD BUFFER START log('1.1 Increasing TM Rate, Clear Start ', color=BLUE, attr=BOLD ) cmd.EFW_FITMODE(0,1,1) #No Sampling, E12,Bx calcs cmd.EFW_TABLE(4,4) #OUTPTR=0 (start of buffer) cmd.EFW_LOAD(0) # SC_SPIN(6) #Get Space Weather faster DUMPADR(ebuf) cmd.EFW_TMDUMPSIZE(128) cmd.EFW_CLEAR() log('---------------------------------------', color=BLUE, attr=BOLD ) log('2.0 Injecting Cosine Scales ', color=BLUE, attr=BOLD ) log('---------------------------------------', color=BLUE, attr=BOLD ) OffsetA=0. CostermB=0. SintermC=0. for CostermB in (32768.0, 16384.0, 0.0, -8192.0, -8192.0*3): errs = errs+spin_test( ebuf, OffsetA, CostermB, SintermC) log('---------------------------------------', color=BLUE, attr=BOLD ) log('3.0 Injecting Sine Scales ', color=BLUE, attr=BOLD ) log('---------------------------------------', color=BLUE, attr=BOLD ) OffsetA=0. CostermB=0. for SintermC in (32768.0, 16384.0, 0.0, -8192.0, -8192.0*3): errs = errs+spin_test( ebuf, OffsetA, CostermB, SintermC) log('---------------------------------------', color=BLUE, attr=BOLD ) log('4.0 Injecting Offset Errors ', color=BLUE, attr=BOLD ) log('---------------------------------------', color=BLUE, attr=BOLD ) CostermB=0. SintermC=16384. for OffsetA in (1024.0, 128.0, -256.0, -768.0 ): errs = errs+spin_test( ebuf, OffsetA, CostermB, SintermC) log('5.0 Cleaning Up ', color=BLUE, attr=BOLD ) log('Error Summary = %d errors found.'% errs, color=BLUE, attr=BOLD ) log('Spin Fit Calculations : %s'% PF[errs==0], color=BLUE, attr=BOLD ) log('================END=====================', color=BLUE, attr=BOLD )

  25. CPT Script """ BOOT_CPT,py BOOT Comprehensive Performance Test REV A, 8/5/2011 PRH All functional modules are tested Supporting modules, UTIL and IO, are tested indirectly """ # Import statements. Always do these. from MAVEN import * from fswutil import * import maven_log log = maven_log.log() from __main__ import * # required for access to APID_nnn telemetry blocks # Setup the commanding shortcut mechanism (cmd.CMDNAME(arg=value)) cmd = maven_cmd() def logpf( name, errs ): if(errs!=0): log('%s : %2d errors, FAIL'%(name,errs), color=RED, attr=BOLD ) else: log('%s : %2d errors, PASS'%(name,errs), color=BLUE, attr=BOLD ) def main(): log('========================================', color=BLUE, attr=BOLD ) log('BOOT_CPT: Comprehensive Performance Test ', color=BLUE, attr=BOLD ) log('========================================', color=BLUE, attr=BOLD ) prog=1 exe =tryscriptprog("TEST_EXEC",prog) bkg =tryscriptprog("TEST_BKG",prog) cmd =tryscriptprog("TEST_CMD",prog) tm =tryscriptprog("TEST_TM",prog) hsk =tryscriptprog("TEST_HSK",prog) ld =tryscriptprog("TEST_LD",prog) pwr =tryscriptprog("TEST_PWR",prog) fp =tryscriptprog("TEST_FP",prog) log('========================================', color=BLUE, attr=BOLD ) log('BOOT_CPT: Results by Module ', color=BLUE, attr=BOLD ) log('========================================', color=BLUE, attr=BOLD ) logpf('EXEC',exe ) logpf('BKG ',bkg ) logpf('CMD ',cmd ) logpf('TM ',tm ) logpf('HSK ',hsk ) logpf('LD ',ld ) logpf('PWR ',pwr ) logpf('FP ',fp ) log('================END=====================', color=BLUE, attr=BOLD )

  26. EXEC Module Script """ TEST_EXEC.py Comprehensive Performance Test - EXEC module REV A, 6/7/2011 // FSW.EXEC-1 : EXEC_INIT shall initialize the module and all submodules as needed to make the Boot program function properly. // FSW.EXEC-2 : EXEC shall receive and execute commands to the module at up to 32Hz, and complete those commands in <1/10 interrupt period. // FSW.EXEC-3 : EXEC shall provide housekeeping telemetry data as listed in MAVEN PF Command and Telemetry document // FSW.EXEC-4 : EXEC shall automatically mask Enable bits by Mode // FSW.EXEC-5 : EXEC shall measure available CPU percentage. // FSW.EXEC-6 : EXEC shall provide a service loop which will run a user-provided program concurrently. // FSW.EXEC-7 : Operational FSW shall Generate Event Packets [a] including one or more time-tagged events [b] time-tagged to 1-second accuracy ; [c] including an event type code and associated data; [d] sent out when the selected number of events has been collected." FSW.EXEC-8 : At initialization, EXEC shall increment the reset counter. If the Reset Counter mod 4==3, Implement Safing Directly (abandon loading the operational program). Ref: MAV_CR1 FSW.EXEC-9 : At initialization, EXEC shall begin accepting commands and generating housekeeping telemetry within 2 seconds. FSW.EXEC-10: At initialization, EXEC shall initiate a Boot Command sequence which does the following: [1] Checks EEPROM directory, calculates Checksums, Selects a program; [2] Delays 4 seconds to allow user intervention; [3] Runs selected program; [4] Delays 1 second to allow Operational program to stop this sequence; [5] Turns Off all HVs (STATIC, SWIA, SWEA); [6] Delays 30 seconds to allow Actuator Guardband lockout to timeout; [7] Closes EUV, SEP1 and SEP2 doors; [8] Delays 30 more seconds to allow HV to dissipate; [9] Turns Off all Instruments. Ref: ICD2357 " // FSW.EXEC-11 : EXEC shall implement a CPU Reset command. Ref. ICD1102" """

  27. EXEC Module Script # Import statements. Always do these. from MAVEN import * from fswutil import * import maven_log log = maven_log.log() from __main__ import * # required for access to APID_nnn telemetry blocks # Setup the commanding shortcut mechanism (cmd.CMDNAME(arg=value)) cmd = maven_cmd() def main(prog=0): set_output_location('EXEC_Module_') log('========================================', color=BLUE, attr=BOLD ) log('******* EXEC MODULE TEST *********', color=BLUE, attr=BOLD ) log('========================================', color=BLUE, attr=BOLD ) RESET_CPU() vers = APID_20.PFP_VER_HIGH vers = vers + APID_20.PFP_VER_LOW/100.0 log('========================================', color=BLUE, attr=BOLD ) log('******* FSW VERSION %5.2f *********'% vers, color=BLUE, attr=BOLD ) log('========================================', color=BLUE, attr=BOLD ) errcnt = 0 errcnt += tryscriptprog("TEST_EXEC_2",prog) errcnt += tryscriptprog("TEST_EXEC_3",prog) errcnt += tryscriptprog("TEST_EXEC_5",prog) errcnt += tryscriptprog("TEST_EXEC_7",prog) errcnt += tryscriptprog("TEST_EXEC_8",prog) errcnt += tryscriptprog("TEST_EXEC_9",prog) errcnt += tryscriptprog("TEST_EXEC_10",prog) errcnt += tryscriptprog("TEST_EXEC_11",prog) log('========================================', color=BLUE, attr=BOLD ) if( errcnt == 0 ): log('******* EXEC Module PASS ******' , color=GREEN, attr=BOLD ) else: log('******* EXEC Module FAIL %d Errors ******' % errcnt, color=RED, attr=BOLD ) log('========================================', color=BLUE, attr=BOLD ) return( errcnt )

  28. EXEC_7 Script """ TEST_EXEC_7 Test Event Packet Logic REV A, 8/8/2011 PRH FSW.EXEC-7 : Operational FSW shall Generate Event Packets [a] including one or more time-tagged events [b] time-tagged to 1-second accuracy ; [c] including an event type code and associated data; [d] sent out when the selected number of events has been collected." """ # Import statements. Always do these. from MAVEN import * from fswutil import * import maven_log log = maven_log.log() from __main__ import * # required for access to APID_nnn telemetry blocks # Setup the commanding shortcut mechanism (cmd.CMDNAME(arg=value)) cmd = maven_cmd() def main(prog=0): title='EXEC_7: Test Event packets ' test_init(title) errcnt=0 d=0.5 log('EXEC_7.1. Start Up CPU, Get Event ', color=BLUE, attr=BOLD ) cmd.PFP_RESET() #Command Reset the CPU log('EXEC_7.2. Verify Reset Event Message ', color=BLUE, attr=BOLD ) wait(APID_24, lambda: APID_24.PFP_EVNTCODE==0xE8, flTimeout=10) errcnt += limchk("EVNTDTA0", APID_24.PFP_EVNTDTA0, 1, 1) errcnt += limchk("EVNTDTA1", APID_24.PFP_EVNTDTA1, 0, 0) errcnt += limchk("EVNTDTA2", APID_24.PFP_EVNTDTA2, 0, 1) errcnt += limchk("EVNTCTR ", APID_24.PFP_EVNTCTR , 1, 1) RESET_CPU(1) sleep(1) cmd.PFP_CLEAR() sleep(1)

  29. EXEC_7 Script log('EXEC_7.3. Verify Command Error Message ', color=BLUE, attr=BOLD ) cmd.PFP_RTSSTART(31) # Bad RTS No. wait(APID_24, lambda: APID_24.PFP_EVNTCODE==0xCA, flTimeout=10) errcnt += limchk("EVNTDTA0", APID_24.PFP_EVNTDTA0, 0, 0) errcnt += limchk("EVNTDTA1", APID_24.PFP_EVNTDTA1,31,31) errcnt += limchk("EVNTDTA2", APID_24.PFP_EVNTDTA2, 1, 2) errcnt += limchk("EVNTCTR ", APID_24.PFP_EVNTCTR , 1, 3) vt = APID_24.CCSDS_Data[2]<<24 #Vt = Event Time vt += APID_24.CCSDS_Data[3]<<16 vt += APID_24.CCSDS_Data[4]<<8 vt += APID_24.CCSDS_Data[5] log(' Packet Time = %8X, Event Time = %8X'%(APID_24.CCSDS_MET,vt), color=BLUE, attr=BOLD ) errcnt += limchk("EVNTTIME ", APID_24.CCSDS_MET ,vt,vt+1) log('EXEC_7.4. Verify Multi-Event Message (15 long)', color=BLUE, attr=BOLD ) stevt = APID_24.PFP_EVNTCTR # Record events so far log('EXEC_7.4.1 Currently have %d events'%stevt, color=BLUE, attr=BOLD ) cmd.PFP_EVTMAX(15) sleep(1) cmd.PFP_CLEAR() # First ErrCtr == 1 for i in range(15): sleep(1) cmd.PFP_RTSSTART(30) # Bad RTS # sleep(5) expevt = APID_24.PFP_EVNTCTR-stevt # Should be 15 more log('EXEC_7.4.2 Now We have %d events'%APID_24.PFP_EVNTCTR, color=BLUE, attr=BOLD ) errcnt += limchk("EVNTCODE", APID_24.PFP_EVNTCODE, 0xCA, 0xCA) errcnt += limchk("EVNTDTA0", APID_24.PFP_EVNTDTA0, 0, 0) errcnt += limchk("EVNTDTA1", APID_24.PFP_EVNTDTA1,30,30) errcnt += limchk("EVNTDTA2", APID_24.PFP_EVNTDTA2, 1, 1) #first ErrCtr==1 errcnt += limchk("EVNTCTR (change)", expevt ,15,15) vt = APID_24.CCSDS_Data[2]<<24 #Vt = Event Time vt += APID_24.CCSDS_Data[3]<<16 vt += APID_24.CCSDS_Data[4]<<8 vt += APID_24.CCSDS_Data[5] log(' Packet Time = %8X, Event Time = %8X'%(APID_24.CCSDS_MET,vt), color=BLUE, attr=BOLD ) errcnt += limchk("EVNTTIME ", APID_24.CCSDS_MET ,vt+16,vt+17) evip = (APID_24.Block[5]+7-12)/8 errcnt += limchk("EVENTS in PACKET", evip ,15,15)

  30. EXEC_7 Script log('EXEC_9.2. Cleanup ', color=BLUE, attr=BOLD ) RESET_CPU(prog) # Reset, Clear Errors sleep(5) cmd.PFP_CLRRSTCTR() #Clear Reset Counter sleep(d) cmd.PFP_CLEAR() #Clear Error Counter (reset) sleep(3) test_end(title, errcnt) return( errcnt )

  31. LDS Script """ BOOT_LDS,py BOOT Long Duration Stress Test REV -, 8/7/2011 PRH High Rate of Commands >Command Pass Simulation Every Hour for 72 hours >Memory Load – Uplink of Script Database (1KB) >Serial Commands – Max commands rate for 250 commands >Memory Dump Script Database >Execute Script and Verify Results High Rate of Telemetry >Continuous Telemetry at 200% nominal >Real Time Data @ 200% Verification >Test Status Logged Every Hour >No Errors in FSW or GSE Not Applicable to Boot >Archive Playback @ 200% CPU Intensive Processing >Calculations @ 100% >Archive Writing (200% nominal) >Data Compression Enabled >SDRAM and SRAM Memory Scrubbing Enabled >No Memory Leaks """ # Import statements. Always do these. from MAVEN import * from fswutil import * import maven_log log = maven_log.log() from __main__ import * # required for access to APID_nnn telemetry blocks # Setup the commanding shortcut mechanism (cmd.CMDNAME(arg=value)) cmd = maven_cmd()

  32. LDS Script def clean_start(): cmd.PFP_CLEAR() wait(APID_20, lambda: APID_20.PFP_ERRCODE==0, flTimeout=10) cmd.PFP_CLRRSTCTR() wait(APID_20, lambda: APID_20.PFP_RSTCTR==0, flTimeout=10) return(0) def cmd_highrate(leng): errcnt=0 d=0.2 log('LDS_CMD.1 Loading %d APID_10 Commands At High Rate '%leng, color=BLUE, attr=BOLD ) cmd.PFP_CMDS( leng ) wait(APID_20, lambda: APID_20.PFP_CMDEXP==leng, flTimeout=10) wait(APID_20, lambda: APID_20.PFP_CMDTOT==0, flTimeout=10) log('LDS_CMD_7.1.1 Commands starting ', color=BLUE, attr=BOLD ) stime= APID_20.CCSDS_MET for i in range( leng ): cmd.PFP_WRITELEDS( i ) sleep(d) try: wait(APID_20, lambda: APID_20.PFP_CMDTOT==leng, flTimeout=30) except: log('LDS_CMD_7.1.2 Command Count Expected %d, Got %d : FAIL' % (leng,APID_20.PFP_CMDTOT), color=RED, attr=BOLD ) errcnt += 1 log('LDS_CMD_7.2 Loading %d APID_11 Commands At High Rate '%leng, color=BLUE, attr=BOLD ) d=0.2 cmd.PFP_CMDS( leng ) wait(APID_20, lambda: APID_20.PFP_CMDEXP==leng, flTimeout=10) wait(APID_20, lambda: APID_20.PFP_CMDTOT==0, flTimeout=10) log('LDS_CMD_7.2.1 Commands starting ', color=BLUE, attr=BOLD ) stime= APID_20.CCSDS_MET for i in range( leng ): pfdpu_load("6410","2F 0E 2C 7C 00 FF 00 00 4E BA 00 E2 4A 80 66 22 4E BA 00 DA 4A 80 67 F8 24 2E 00 08 52 82 A7 41 C4 81 22 2E 00 08 02 81 00 00 00 FC 82 82 2D 41 00 08 2C 5F 4E 75 2F 0E 2C 7C 00 FF 00 00 4E BA 00 AC A9 41 B0 81 66 24 4E BA 00 A2 A9 41 B0 81 67 F6 24 2E 00 08 58 82 72 0C C4 81 22 2E 00 08 02 81 00 00 00 F3 82 82 2D 41 00 08 2C 5F 4E 75") sleep(d) try: wait(APID_20, lambda: APID_20.PFP_CMDTOT==leng, flTimeout=30) except: log('LDS_CMD_7.2.2 Command Count Expected %d, Got %d : FAIL' % (leng,APID_20.PFP_CMDTOT), color=RED, attr=BOLD ) errcnt += 1 return(errcnt)

  33. LDS Script def cmd_scripts(): errcnt=0 log('LDS_CMD_9.2 Load up Scripts, Check Enables ', color=BLUE, attr=BOLD ) run("LOAD_SCR_0001") #Load Diag Script Set wait(APID_20,lambda: (APID_20.PFP_RTSENA>>24)==0xc0, flTimeout=20) log('LDS_CMD_9.3.1 Run RTS 30 (LEDs) ', color=BLUE, attr=BOLD ) cmd.PFP_RTSSTART( 30 ) for i in range(0,5): wait(APID_20,lambda: APID_20.PFP_DIAGPORT==0xD1, flTimeout=5) wait(APID_20,lambda: APID_20.PFP_DIAGPORT==0xD2, flTimeout=5) log('CMD_9.3.2 Check Completion ', color=BLUE, attr=BOLD ) try: wait(APID_20,lambda: APID_20.PFP_RTSACT==0x00000000, flTimeout=20) except: log('LDS_CMD_9.3.3 RTS Completion Expected : FAIL', color=RED, attr=BOLD ) errcnt += 1 return(errcnt) def generate_report( ps, errcnt ): if(APID_20.PFP_ERRCTR>0): log("%s:%d ERR_CTR!" %(title, APID_20.PFP_ERRCTR), color=RED, attr=BOLD ) errcnt = errcnt + APID_20.PFP_ERRCTR if(APID_20.PFP_RSTCTR>0): log("%s:%d RESETCTR!" %(title, APID_20.PFP_RSTCTR), color=RED, attr=BOLD ) errcnt = errcnt + APID_20.PFP_ERRCTR if(errcnt>0): log("Pass[%d]:%d Errors" %(ps, errcnt), color=RED, attr=BOLD ) else: log("Pass[%d]:%d Errors" %(ps, errcnt), color=BLUE, attr=BOLD )

  34. LDS Script def main( passnum=0): title='BOOT_CPT: Long Duration Performance Test ' test_init(title) totcnt = 0 # Total Error Count d = 0.2 # Command period log('LDS.1 Reset to Boot ', color=BLUE, attr=BOLD ) RESET_CPU(1) sleep(5) log('LDS.2 Turn up TM all the way ', color=BLUE, attr=BOLD ) cmd.PFP_TMPKTRATE(0, 1) # AP20 at 1Hz sleep(d) cmd.PFP_TMDUMPSIZE( 252 ) # AP22 at 1 Hz/longest size sleep(d) cmd.PFP_TMPKTRATE(3, 1) # AP23 at 1Hz sleep(d) cmd.PFP_HSKOPTIONS(0x1c, 1, 0) #Fast HSK of 3.3V DC sleep(d) for ps in range( passnum, 72 ): log('LDS.3 PASS[%d] COMMAND PASS SIMULATION ' % ps, color=BLUE, attr=BOLD ) errcnt=0 if(APID_20.PFP_VER_HIGH>1): RESET_CPU(1) clean_start() errcnt += cmd_highrate(250) errcnt += cmd_scripts() generate_report(ps,errcnt) totcnt += errcnt sleep(3600) test_end(title, totcnt) return(errcnt)

  35. Sample CPT Results Sat Aug 06 00:16:06 2011 BOOT_CPT: Script LOAD_BADUSER.py completedSat Aug 06 00:16:06 2011 maven_dpucmd_logger: PFP_CMDS(1)Sat Aug 06 00:16:06 2011 maven_dpucmd_logger: 1F, 02, 7F, 49, 00, 14, 00, 03, 10, 10, C0, DA, 00, 05, C0, 00, 00, 01, 00, 00Sat Aug 06 00:16:07 2011 maven_dpucmd_logger: PFP_EXEC(0, 25616)Sat Aug 06 00:16:07 2011 maven_dpucmd_logger: 1F, 02, 7F, 49, 00, 14, 00, 03, 10, 10, C0, DA, 00, 05, D8, 00, 64, 10, 00, 00Sat Aug 06 00:16:11 2011 BOOT_CPT: FP_4.3 Verify TM StopsSat Aug 06 00:16:12 2011 BOOT_CPT: FP_4.4 Verified TM Stopped : PASSSat Aug 06 00:16:13 2011 BOOT_CPT: FP_4.5 Verified SAFEME : PASSSat Aug 06 00:16:13 2011 BOOT_CPT: FP_4.6 Clean UpSat Aug 06 00:16:13 2011 maven_dpucmd_logger: PFP_CLRRSTCTR()Sat Aug 06 00:16:13 2011 maven_dpucmd_logger: 1F, 02, 7F, 49, 00, 14, 00, 03, 10, 10, C0, DA, 00, 05, E7, 00, 00, 00, 00, 00Sat Aug 06 00:16:15 2011 maven_dpucmd_logger: SSG_RESETON()Sat Aug 06 00:16:15 2011 maven_dpucmd_logger: 1F, 02, 7F, 49, 00, 12, 00, 16, 10, DA, C0, DA, 00, 03, E7, 00, 00, 00Sat Aug 06 00:16:16 2011 maven_dpucmd_logger: SSG_RESETOFF()Sat Aug 06 00:16:16 2011 maven_dpucmd_logger: 1F, 02, 7F, 49, 00, 12, 00, 17, 10, DA, C0, DA, 00, 03, E7, 00, 00, 00Sat Aug 06 00:16:18 2011 maven_dpucmd_logger: PFP_LOADTABLE(0, 0, 255)Sat Aug 06 00:16:18 2011 maven_dpucmd_logger: 1F, 02, 7F, 49, 00, 14, 00, 03, 10, 10, C0, DA, 00, 05, D2, 00, 00, FF, 00, 00Sat Aug 06 00:16:18 2011 maven_dpucmd_logger: PFP_RTSSTOP(0)Sat Aug 06 00:16:18 2011 maven_dpucmd_logger: 1F, 02, 7F, 49, 00, 14, 00, 03, 10, 10, C0, DA, 00, 05, C2, 00, 00, 00, 00, 00Sat Aug 06 00:16:23 2011 maven_dpucmd_logger: PFP_RTSSTOP(2)Sat Aug 06 00:16:23 2011 maven_dpucmd_logger: 1F, 02, 7F, 49, 00, 14, 00, 03, 10, 10, C0, DA, 00, 05, C2, 00, 00, 02, 00, 00Sat Aug 06 00:16:24 2011 maven_dpucmd_logger: PFP_CLEAR()Sat Aug 06 00:16:24 2011 maven_dpucmd_logger: 1F, 02, 7F, 49, 00, 14, 00, 03, 10, 10, C0, DA, 00, 05, E1, 00, 00, 00, 00, 00Sat Aug 06 00:16:26 2011 maven_dpucmd_logger: PFP_CLEAR()Sat Aug 06 00:16:26 2011 maven_dpucmd_logger: 1F, 02, 7F, 49, 00, 14, 00, 03, 10, 10, C0, DA, 00, 05, E1, 00, 00, 00, 00, 00Sat Aug 06 00:16:27 2011 BOOT_CPT: FP_4 : Verifies SAFEME occurs if FGND==0:0 ErrorsSat Aug 06 00:16:27 2011 BOOT_CPT: ================END=====================Sat Aug 06 00:16:27 2011 BOOT_CPT: Script TEST_FP_4.py completedSat Aug 06 00:16:27 2011 BOOT_CPT: ========================================Sat Aug 06 00:16:27 2011 BOOT_CPT: **** FP Module PASS ****Sat Aug 06 00:16:27 2011 BOOT_CPT: ========================================Sat Aug 06 00:16:27 2011 BOOT_CPT: Script TEST_FP.py completedSat Aug 06 00:16:27 2011 BOOT_CPT: ========================================Sat Aug 06 00:16:27 2011 BOOT_CPT: BOOT_CPT: Results by Module Sat Aug 06 00:16:27 2011 BOOT_CPT: ========================================Sat Aug 06 00:16:27 2011 BOOT_CPT: EXEC : 4 errors, FAILSat Aug 06 00:16:27 2011 BOOT_CPT: BKG : 0 errors, PASSSat Aug 06 00:16:27 2011 BOOT_CPT: CMD : 2 errors, FAILSat Aug 06 00:16:27 2011 BOOT_CPT: TM : 0 errors, PASSSat Aug 06 00:16:27 2011 BOOT_CPT: HSK : 0 errors, PASSSat Aug 06 00:16:27 2011 BOOT_CPT: LD : 0 errors, PASSSat Aug 06 00:16:27 2011 BOOT_CPT: PWR : 0 errors, PASSSat Aug 06 00:16:27 2011 BOOT_CPT: FP : 0 errors, PASSSat Aug 06 00:16:27 2011 BOOT_CPT: ================END=====================Sat Aug 06 00:16:27 2011 BOOT_CPT: Script BOOT_CPT.py completed

More Related