HeMPS  8.0
Classes | Macros | Functions
packet.h File Reference

This module defines the ServiceHeader structure. This structure is used by all software components to send and receive packets. It defines the service header of each packets. More...

#include "../../include/kernel_pkg.h"
Include dependency graph for packet.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ServiceHeader
 This structure is in charge to defines the ServiceHeader field that can be filled by the software part when need to send a packet, or that will be read when the packet is received. More...
 
struct  ServiceHeaderSlot
 This structure is in charge to store a ServiceHeader slot memory space. More...
 

Macros

#define CONSTANT_PKT_SIZE   13
 Constant Service Header size, based on the structure ServiceHeader.
 

Functions

ServiceHeaderget_service_header_slot ()
 
void init_service_header_slots ()
 
void DMNI_read_data (unsigned int, unsigned int)
 
void DMNI_send_data (unsigned int, unsigned int)
 
void send_packet (ServiceHeader *, unsigned int, unsigned int)
 
void read_packet (ServiceHeader *)
 

Detailed Description

This module defines the ServiceHeader structure. This structure is used by all software components to send and receive packets. It defines the service header of each packets.

HEMPS VERSION - 8.0 - support for RT applications

Distribution: June 2016

Created by: Marcelo Ruaro - contact: marce.nosp@m.lo.r.nosp@m.uaro@.nosp@m.acad.nosp@m..pucr.nosp@m.s.br

Research group: GAPH-PUCRS - contact: ferna.nosp@m.ndo..nosp@m.morae.nosp@m.s@pu.nosp@m.crs.b.nosp@m.r

Function Documentation

void DMNI_read_data ( unsigned int  initial_address,
unsigned int  dmni_msg_size 
)

Function that abstracts the DMNI programming for read data from NoC and copy to memory

Parameters
initial_addressInitial memory address to copy the received data
dmni_msg_sizeData size, is represented in memory word of 32 bits
void DMNI_send_data ( unsigned int  initial_address,
unsigned int  dmni_msg_size 
)

Function that abstracts the DMNI programming for send data from memory to NoC

Parameters
initial_addressInitial memory address that will be transmitted to NoC
dmni_msg_sizeData size, is represented in memory word of 32 bits
ServiceHeader* get_service_header_slot ( )

Searches for a free ServiceHeaderSlot (sh_slot1 or sh_slot2) pointer. A free slot is the one which is not being used by DMNI. This function prevents that a given memory space be changed while its is not completely transmitted by DMNI.

Returns
A pointer to a free ServiceHeadeSlot
void init_service_header_slots ( )

Initializes the service slots

void read_packet ( ServiceHeader p)

Function that abstracts the process to read a generic packet from NoC by programming the DMNI

Parameters
pPacket pointer
void send_packet ( ServiceHeader p,
unsigned int  initial_address,
unsigned int  dmni_msg_size 
)

Function that abstracts the process to send a generic packet to NoC by programming the DMNI

Parameters
pPacket pointer
initial_addressInitial memory address of the packet payload (payload, not service header)
Returns
dmni_msg_size Packet payload size represented in memory words of 32 bits