Logo SoCRocket

Transaction-Level Modeling Framework for Space Applications

Functions
vendian.h File Reference
#include <stdint.h>
Include dependency graph for vendian.h:
This graph shows which files directly or indirectly include this file:

Functions

void swap_Endianess (uint64_t &datum)
 
void swap_Endianess (uint32_t &datum)
 
void swap_Endianess (uint16_t &datum)
 
void swap_Endianess (uint8_t &datum)
 

Detailed Description

The header vendian.h provides endianess conversion functions for data types of different lengths. If the host system is little endian, CPU and unit tests must swap byte order. The latter is defined by the macro LITTLE_ENDIAN_BO.

It has to be kept in mind that the LEON processor is a big endian CPU. Hence, memory images generated with the SPARC compiler (e.g. BCC) are also big endian. If the host system simulates the CPU, or testbench, in little endian byte order, all data items going to/from memory must be reordered!

Date
2010-2015
Author
Rolf Meyer