HeMPS  8.0
Functions | Variables
packet.c File Reference

This module implements function relative to programming the DMNI to send and receibe a packet. It is a abstraction from the NoC to the software components. This module is used by both manager and slave kernel. More...

#include "packet.h"
#include "../include/plasma.h"
Include dependency graph for packet.c:

Functions

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

Variables

ServiceHeaderSlot sh_slot1
 
ServiceHeaderSlot sh_slot2
 Slots to prevent memory writing while is sending a packet.
 
unsigned int global_inst = 0
 Global CPU instructions counter.
 

Detailed Description

This module implements function relative to programming the DMNI to send and receibe a packet. It is a abstraction from the NoC to the software components. This module is used by both manager and slave kernel.

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