State Machine Rman Interface

Loading a Machine Description
Parameter List Functions

RmanStateMach
RmanStateMachSetSrcDst
RmanStateMachSetDimensions
RmanStateMachSetSampling

The State Machine Rman interface consists of a single function (RmanStateMach) used to create an Rman pipeline descriptor, and additional functions for modifying pipeline descriptors after their creation. Additional functions are provided for constructing the list of parameters and the machine description to be passed to the function.


RmanStateMach

Arguments Returns QueueElem *q - Pointer to a State Machine queue element

This functions builds a pipe (or a number of pipes) that performs the state machine function specified by the machine description, passing it the parameter list provided.


RmanStateMachSetSrcDst

Arguments Returns void

This function modifies a queue element containing a State Machine processing element (i.e. it was generated by RmanStateMach.) If any of it's source or destination buffer pointers are non-NULL, the corresponding input or output buffer value in the State Machine processing element will be changed to the new pointer.


RmanStateMachSetDimensions

Arguments Returns void

This function changes the dimensions of the source and destination buffers of a State Machine queue element.

NOTE: NOT IMPLEMENTED AS OF 7/13/96


RmanStateMachSetSampling

Arguments Returns void

This function changes the sampling rate used by a State Machine processing pipeline.

NOTE: NOT IMPLEMENTED AS OF 7/13/96


There is also a version which is better suited to multiphase transfers (such as the holo calculations). Instead of a single dst pointer, it takes a pointer to an array of pointers. The number of dsts is given by num_phases - 1. The x_size and y_size arguments are likewise now each an array of num_phases values. The 0th entry are the source dimensions.

NOTE: NOT IMPLEMENTED AS OF 7/13/96

extern QueueElem *RmanStateMachineMulti( short *src, short **dst,
		 int *x_size, int *y_size, int num_phases,
		 int pipe_delay, void (*done)() );


Loading a Machine Description

The State Machine is configured by selecting a combination of hardware and software modules to perform a particular task. This configuration information must also be stored with the request to process a piece of data, as it may change from application to appplication or even within an application. The StateMachDesc structure is used to store the configuration information for a particular "function".

An application must initialize the StateMachDesc structure before creating any State Machine processing pipes using RmanStateMach. This initialization generally includes loading hardware and/or software modules into memory from the host's filesystem.

In order to facilitate this loading process, a single function is provided to initialize a StateMachDesc :

RmanLoadFunction

Arguments Returns StateMachDesc * , a ptr to the new descriptor

This function looks in a particular directory (hypothetically ${CHEOPS_BASE}/statemac/bin) for a function descriptor file with that name. If found, it loads the machine configuration data located through it into local memory and returns a pointer to a StateMachDesc.

If there are any problem in the loading process, the function causes the application to exit, after printing a message on the debug console.


Parameter List Support

These functions each take a pointer to an existing parameter list and a single data value. They all return void.
Example Declaration:

inline void param_add_ulong( parameter_list *list, unsigned long value );

Complete Listing of Functions


Jump to
State Machine Software Overview
Jump to the State Machine Stream Processor
Jump to the Cheops Homepage
wad@media.mit.edu
This is a "fix it yourself" page, located at ${CHEOPS_BASE}/WWW/statemac/software/rman.html