Title: The STEREO Memory Object Flight Software Architecture
1The STEREO Memory Object Flight Software
Architecture
- Dr. Gary M. Heiligman
- Space Department
- The Johns Hopkins University
- Applied Physics Laboratory
- November 6, 2007
2Solar TErrestrial RElations Observatory
- Two identical solar observatories
- Launched October 25, 2007
- In Earth-receding (trailing and leading) orbits
about the Sun - Science study solar coronal mass ejections
(CMEs) - Two year prime mission
- Planned two year mission extension
3Avionics
IDPUs (3)
RT
IEM
- Two 25 MHz BAE RAD6000 processors
- CDH / EA processor
- Runs CDH application in operational mode
- Runs Earth Acquisition application in EA mode
- Two applications not co-resident
- GC processor
- Runs GC application in all modes
- Only GC processor diagnostics in EA mode
GC RAD6000
Star Tracker
RT
RT
GC
IMU
RT
IMU
PCI
PDU
Sun Sensor
CDH/EA RAD6000
HGARA
BC
Wheels (4)
CDH, EA
RT
Propulsion
PSE
Interface Board / CCD
Serial Relay Commands
I2C
TRIOs (7)
RT
Trans-ponder
Serial Uplink, Downlink Data
1 Gbyte SSR
1553
4What Are Memory Objects?
- Memory objects are structures whose contents in
RAM are of interest to Mission Operations or
System Engineering - Parameter blocks
- Values to control FSW execution, e.g.,
ephemerides - Macros
- Sequences of commands
- Autonomy rules
- IF Condition THEN Commands
- Computed Telemetry
- Equations to calculate values from raw
housekeeping data - Storage Variables
- Values persist, increment, or decrement
- Time-tagged rules
- Execute Commands at a specified time (absolute
or offset) - Data structures
- Diagnostic dump-only values
5Properties of Memory Objects
6EEPROM Constraints
- Must be able to load EA parameters to EEPROM in
any mode - Must be able to load CDH parameters to EEPROM in
any mode - CSCI that uses the parameter may not be running
- Table manager implementation concepts may not
work
7User-FriendlyLoad, Copy, and Dump Operations
- Refer to memory objects by name and/or number
- Examples GC_ST_QI2B AUT_RULE 32
- Avoid user errors associated with raw memory
address and size - Uniform syntax for load, copy, and dump
operations - Regular state-transition behavior for things that
have state - Dont force operators to remember many different
grammars - Provide an Upload buffer area in RAM
- Can confirm contents of load are correct before
using them to control spacecraft operation - Dump checksums rather than complete variable
contents - Reduce downlink needs for configuration
management - If a structure doesnt have a fixed size (e.g.,
macros), load and dump only the portion that is
used - Reduce uplink and downlink needs
- Make it easy to add a new parameter or data
structure during development - Details of allocation should be hidden from the
user
8Class Diagram of Memory Objects
- Memory Objects are grouped into collections
- Some object types have more behaviors
attributes than others
9State-Transition Behavior
10Constraints and Solutions for RAM Implementation
- Constraints
- No dynamic memory allocation
- C language
- Only 8 MB RAM
- Solutions
- Use function pointers for encapsulation and
polymorphism - Remove inheritance
- Null function pointers for nonexistent methods
- Populate a statically-allocated table at
initialization - Implement state-transition behavior for each
object type
11Implementing Polymorphism in the Structured RAM
Implementation
- Object-owning package
- (e.g., Macro Package)
- Provides PutObject, GetObject, and
IsPutObjectValid methods (e.g., PutMacro,
GetMacro, IsMacroValid) - Calls InitializeMemoryObject for each object it
implements - Has private storage with valid compiled-in values
for every object it owns
- Memory Object Package
- Implements Load, Dump, Copy, etc. Memory Object
Commands that call PutObject, GetObject, and
IsPutObjectValid - Provides InitializeMemoryObject method, which
- registers the object in the internal object
table, - stores the function pointers,
- retrieves default values from EEPROM, and
- calls PutObject to replace the compiled-in
values
12Initialization of Objects in RAM
- Mem_obj_return_type InitializeMemoryObject(
- const Int8u in_object_type_id,
// Input - const Int32u in_first_object_id,
// Input - const Int32u in_last_object_id,
// Input - const Int32u in_object_size,
// Input - Mem_obj_return_type (get_func_ptr)(
// Input - const Int32u in_object_id, /
Input / - Int32u object_size_ptr, /
Output / - Int32u object_address_ptr, /
Output / - void object_data), /
Output / - Mem_obj_return_type (put_func_ptr)(
// Input - const Int32u in_object_id, /
Input / - const Int32u in_object_size, /
Input / - const void in_object_data),
/ Input / - Mem_obj_return_type (is_put_valid_func_ptr)(
// Input - const Int32u in_object_id, /
Input / - const Int32u in_object_size, /
Input / - const void in_object_data), /
Input / - Mem_obj_return_type (change_state_func_ptr)(
// Input
13EEPROM Object Collection Structure
Object identifier
Collection identifier
2 spare bytes
Object collection header
Size
Used Size
Allocated size
Checksum
Header 1
Checksum
Data 1
Header 2
Data 2
- Singly-linked list
- Put all the data needed to traverse an EEPROM
collection into the collection itself - EA doesnt need to know about CDH and vice
versa
Header 3
Data 3
Physical location
Object type
14Memory Object Collections
CDH/EA Processor
GC Processor
EEPROM
SRAM
EEPROM
EA parameters 1
Upload buffer
GC parameters 1
CDH parameters 1
parameters or macros or...
GC parameters 2
autonomy rules 1
CDH application data space
SRAM
computed telemetry 1
CDH parameters
Upload buffer
storage variables 1
macros
GC parameters or...
Macros 1
autonomy rules
Macros 2
time-tagged rules
GC application data space
storage variables 2
computed telemetry
GC parameters
computed telemetry 2
storage variables
GC data structures
autonomy rules 2
CDH data structures
CDH parameters 2
EA parameters 2
15Memory Object Commands and Telemetry
- Commands
- Load Memory Object
- Abort Memory Object Load
- Dump Memory Objects
- Dump Memory Object Headers
- Copy Memory Objects
- Clear Memory Objects
- Change Memory Object States
- Initialize Memory Object Collection
- Telemetry (Structure Dumps)
- Memory Object Dump
- Memory Object Headers Dump
16Load Operation and Ground Software
- Load only to RAM or Upload Buffer
- Load to UB or RAM, then copy to EEPROM
- No load to EEPROM simplifies FSW timing
- Parameter load commands always use mnemonics
- Example GC_PARAM_ST_QI2B_LD RAM
- Other load commands use type and number
- Example CD_AUT_RULE_LD 22
- Ground software tool (LDC load, dump,
compare) - Tracks expected memory contents based on load and
copy commands - Tracks actual memory commands based on dump and
dump header commands - Issues warnings when expected and actual disagree
17Conclusions and Lessons Learned
- Load, dump, and compare on STEREO successfully
uses an object-based design in a structured
implementation - Adding new parameters and data structures was
easy during IT minor builds - Maintenance of parameters and autonomy of STEREO
on orbit has been fault-resistance and very
acceptable to operators - Prototype of ExecSpec shows that expansion with
new types is straightforward - STEREO Memory object system planned for use on
RBSP