Difference between revisions of "SpaceWire Solar Orbiter Case Study"

From TASTE
Jump to: navigation, search
(Building and testing)
 
m (1 revision imported)
 
(No difference)

Latest revision as of 21:01, 4 August 2017

Overview

Solar Orbiter case study

This case study aims to check the feasibility and performance of the packet utilization standard (PUS) communication scheme of the Solar Orbiter (SolO) instruments, over SpaceWire. The scientific payload of SolO consists in a combination of in-situ and remote-sensing instruments, built to address the main goal of the mission, which is the study of the Sun heliosphere. The development of this case study is divided in two distinct stages: i) to implement of the PUS communication scheme; ii) to evaluate the performance of the communication.

Application description

The system developed to support this case study concerns two applications, which are in fact two different systems. One of them represents the onboard computer (OBC) whereas the other represents a scientific instrument. Succinctly, the OBC receives a small set of data from each instrument in the mission, gather these data and broadcasts them to all the instruments. The main purpose of this simple application is to measure the performance of the communication, according to different configurations (different processor frequency, cache enabled/disabled, number of tasks in execution, etc.). The several phases of development of this project are supported by the TASTE tool-set. The development of this project benefits from the Black Box Device abstraction provided in TASTE, that allows the use of user-defined protocols.

Message details

The application data are encapsulated in specific PUS messages. Each instrument sends a PUS message composed by 8 Bytes of application data. In its turn, the onboard computer sends a PUS message containing 80 Bytes of application data. The transfer of data between the two parties is done through SpaceWire. In the context of the this project, the black box device can be seen as a middleware between the application and the hardware driver.


TASTE Interface views

Obc.png Instrument.png

TASTE Deployment views

Obc-dv.png Instrument-dv.png

Hardware specifications

The OBC interfaces with the payload units via a SpaceWire network.


Functions

Description of onboard computer functions

(source files: onboardcomputer/onboardcomputer.c, dummy1/dummy1.c and dummy2/dummy2.c)

  • onboardcomputer_startup() - Allows the initialization of global variables.
  • onboardcomputer_PI_group_values() - When the onboard computer has received the required information from all the instruments, it creates and initializes a new onboard computer packet containing the data collected. Then, the program execution is given to the black box device through a call to the function onboardcomputer_RI_send_to_spacewire(), passing the data packet as its argument. This function is issued at every 125 ms (8 Hz).
  • onboardcomputer_PI_receive_from_bbdevice() - This function expects to receive an instrument packet. It takes the 8 Bytes of data contained in the instrument packet and stores it in memory locally.
  • dummy1_PI_do_something() and dummy2_PI_do_something() - The purpose of these two functions is to create some additional overhead in the onboard computer, in order to help to provide more representative performance measurements. These functions are called cyclically, as follows: dummy1_PI_do_something() is called each 500 ms; dummy2_PI_do_something() is called each 750 ms.


Description of instrument functions

(source file: instrument/instrument.c)

  • instrument_startup() - Allows the initialization of global variables.
  • instrument_PI_get_value() - This function creates and initializes a new instrument packet, with the current value read from its memory. Then, the packet with the instrument data is passed to the black box device through a call to instrument_RI_send_to_spacewire(). Finally, this function generates a new instrument value. This function is issued at every 12,5 ms (80 Hz).
  • instrument_PI_receive_from_bbdevice() - This function is called by the black box device, upon a reception of a data packet. It prints the content of the information sent by the onboard computer, which corresponds to all the values gathered from each instrument in the mission.


Description of common functions

(source files: blackboxdevice/blackboxdevice.c and blackboxdevice/driver_rasta_spacewire.c)

  • init_blackboxdevice() - This function issues the initialization of the spacewire driver, calling c_driver_spacewire_rasta_init().
  • blackboxdevice_send_to_spacewire() - This function is called by the application (onboard computer or instrument) and sends the data content to the spacewire driver, giving the number of bytes sent, as output, if no error has occurred.
  • blackboxdevice_poll_from_spacewire() - Polls the spacewire for data, through a call to c_driver_spacewire_rasta_poller(). This call returns the number of bytes read from the spacewire. If some content was received, this function sends it and its size to the application (onboard computer or instrument), through a call to vm_async_blackboxdevice_receive_from_bbdevice(). This function is issued at every 1000 ms.


  • c_driver_spacewire_rasta_init() - Initializes the spacewire driver according to a predefined configuration. The spacewire is accessed through a file descriptor.
  • c_driver_spacewire_rasta_sender() - Write a number of bytes to the spacewire.
  • c_driver_spacewire_rasta_poller() - Read a number of bytes from the spacewire.
  • c_driver_rasta_common_init() - Performs rasta initialization procedures.


Building and testing

Herein are described the steps/commands for building and testing the applications. The commands are similar for the onboard computer and the instrument systems.


Build the project (in the obc or instrument directories)

$ rm -rf ./binary
$ ./build-script.sh



Start grmon to monitor the program execution:

$ grmon -u -uart /dev/ttyUSB<port_number> -leon2 -ramws 2


Load the binary file to the LEON board:

$ load ./binaries/<binary>


Execute the program:

$ run


Exit grmon and close ssh session:

$ exit
$ exit

References