HeMPS  8.0
packet.h
Go to the documentation of this file.
1 
15 #ifndef SOFTWARE_INCLUDE_PACKET_PACKET_H_
16 #define SOFTWARE_INCLUDE_PACKET_PACKET_H_
17 
18 #include "../../include/kernel_pkg.h"
19 
20 #define CONSTANT_PKT_SIZE 13
21 
22 
26 typedef struct {
27  unsigned int header;
28  unsigned int payload_size;
29  unsigned int service;
30  union {
31  unsigned int producer_task;
32  unsigned int task_ID;
33  unsigned int app_ID;
34  };
35 
36  union {
37  unsigned int consumer_task;
38  unsigned int cluster_ID;
39  unsigned int master_ID;
40  unsigned int hops;
41  unsigned int period;
42  };
43 
44  unsigned int source_PE;
45  unsigned int timestamp;
46  unsigned int transaction;
47 
48  union {
49  unsigned int msg_lenght;
50  unsigned int resolution;
51  unsigned int priority;
52  unsigned int latency_deadline;
53  unsigned int pkt_latency;
54  unsigned int stack_size;
55  unsigned int requesting_task;
56  unsigned int released_proc;
57  unsigned int app_task_number;
58  unsigned int app_descriptor_size;
59  unsigned int allocated_processor;
60  unsigned int requesting_processor;
61  };
62 
63  union {
64  unsigned int pkt_size;
65  unsigned int data_size;
66  };
67 
68  union {
69  unsigned int code_size;
70  unsigned int max_free_procs;
71  unsigned int execution_time;
72  };
73 
74  union {
75  unsigned int bss_size;
76  unsigned int cpu_slack_time;
77  unsigned int request_size;
78  };
79 
80  union {
81  unsigned int initial_address;
82  unsigned int program_counter;
83  unsigned int utilization;
84  };
85 
86  //Add new variables here ...
87 
89 
93 typedef struct {
94 
95  ServiceHeader service_header;
96  unsigned int status;
97 
99 
100 
102 
104 
105 void DMNI_read_data(unsigned int, unsigned int);
106 
107 void DMNI_send_data(unsigned int, unsigned int);
108 
109 void send_packet(ServiceHeader *, unsigned int, unsigned int);
110 
111 void read_packet(ServiceHeader *);
112 
113 
114 #endif /* SOFTWARE_INCLUDE_PACKET_PACKET_H_ */
unsigned int service
Store the packet service code (see services.h file)
Definition: packet.h:29
unsigned int msg_lenght
<Generic union
Definition: packet.h:49
unsigned int bss_size
<Generic union
Definition: packet.h:75
void read_packet(ServiceHeader *)
Definition: packet.c:115
void init_service_header_slots()
Definition: packet.c:48
unsigned int consumer_task
<Generic union
Definition: packet.h:37
unsigned int producer_task
<Generic union
Definition: packet.h:31
void DMNI_read_data(unsigned int, unsigned int)
Definition: packet.c:57
unsigned int code_size
<Generic union
Definition: packet.h:69
This structure is in charge to defines the ServiceHeader field that can be filled by the software par...
Definition: packet.h:26
unsigned int initial_address
<Generic union
Definition: packet.h:81
This structure is in charge to store a ServiceHeader slot memory space.
Definition: packet.h:93
ServiceHeader * get_service_header_slot()
Definition: packet.c:30
unsigned int transaction
Unused field for while.
Definition: packet.h:46
void DMNI_send_data(unsigned int, unsigned int)
Definition: packet.c:70
void send_packet(ServiceHeader *, unsigned int, unsigned int)
Definition: packet.c:85
unsigned int source_PE
Store the packet source PE address.
Definition: packet.h:44
unsigned int timestamp
Store the packet timestamp, filled automatically by send_packet function.
Definition: packet.h:45
unsigned int header
Is the first flit of packet, keeps the target NoC router.
Definition: packet.h:27
unsigned int payload_size
Stores the number of flits that forms the remaining of packet.
Definition: packet.h:28
unsigned int pkt_size
<Generic union
Definition: packet.h:64