ROCK L0 library - rockframes


This module implements the field operations on the FIFO; this is the only part of the library to know where are the fields in the FIFO.

The routines present in this module do not access the ROCK!
Normally they are used in conjunction with the routines present in rockhard.

Directly should only be used in test applications.


Index:


Determine the type of data

The data in a FIFO can be one of the following: This routine determine the type of the data.

rockf_whatis()
Syntax:
#define rockf_whatis(/* unsigned int */ nr)
Parameters:
IN: nr
FIFO value
Returns:
ROCKF_IS_HEADER
iff nr is a header
ROCKF_IS_SLAVE
iff nr is a slave
ROCKF_IS_FOOTER
iff nr is a footer
ROCKF_IS_EMPTY
iff nr is an empty frame
no other results are possible
Note:
The routine is implemented as a macro.

Decode/Encode routines

After finding out the type of data, use this functions to convert from raw data to a record of fields and vice versa.

The general form of a

decode routine
Decode the FIFO value into a record of fields.

Syntax:
#define rockf_nr2<type>(/* unsigned int */ nr, /* ROCKF_<TYPE>_bits */ fields)
Parameters:
IN: nr
FIFO value
OUT: fields
record of fields
Returns:
not defined
Note:
The routines are implemented as macros.
encode routine
Encode the record of fields to a FIFO value.

Syntax:
#define rockf_<type>2nr(/* ROCKF_<TYPE>_bits */ fields)
Parameters:
IN: fields
record of fields
Returns:
FIFO value
Note:
The routines are implemented as macros.
Follows the list of encode/decode specific types and the list of encode/decode routines:

Examples

Follows a simple example:
If you want something more complex, see the L2 library module rockfifo source code.

List of types and routines

Types:
Routines:
Top of the page. Rock library.
Send comments to: Igor Sfiligoi

Created:25.2.1997
Last modified:26.2.1997