All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
generic_payload_attributes.h
Go to the documentation of this file.
1 #ifndef GENERIC_PAYLOAD_ATTRIBUTES_H_INCLUDED_
2 #define GENERIC_PAYLOAD_ATTRIBUTES_H_INCLUDED_
3 
4 #include "rose.h"
5 #include "port_call_path.h"
6 
7 #include<set>
8 #include<unordered_map>
9 #include<list>
10 
11 namespace risc {
12 
13 namespace sg {
14 
15 /*
16  the reason why we need these three attributes:
17  a generic payload (GP) object is used both in an initiator and
18  refered in the customized_b_transport. So, we somehow need a
19  way to know that how the initiator field data pointed to by the GP
20  object is used (read, write) in the customized_b_transport
21 */
22 
23 class OriginalDataAttribute: public AstAttribute {
24 
25 public:
26 
27  // for the new rose release
28  virtual AstAttribute::OwnershipPolicy getOwnershipPolicy() const ROSE_OVERRIDE
29  {
30  return CONTAINER_OWNERSHIP;
31  }
32 
36  SgVariableSymbol* data_symbol_;
37 };
38 
39 class MappedDataAttribute: public AstAttribute {
40 public:
41 
42  // for the new rose release
43  virtual AstAttribute::OwnershipPolicy getOwnershipPolicy() const ROSE_OVERRIDE
44  {
45  return CONTAINER_OWNERSHIP;
46  }
47 
51  SgVariableSymbol* data_symbol_;
52 };
53 
54 //for now, can be dmi or generic payload
55 class Tlm2ContainerOfMappedDataAttribute: public AstAttribute {
56 public:
57 
58  // for the new rose release
59  virtual AstAttribute::OwnershipPolicy getOwnershipPolicy() const ROSE_OVERRIDE
60  {
61  return CONTAINER_OWNERSHIP;
62  }
63 
67  SgVariableSymbol* container_;
68 };
69 
70 class MappedContainersOfContainerAttribute: public AstAttribute {
71 public:
72 
73  // for the new rose release
74  virtual AstAttribute::OwnershipPolicy getOwnershipPolicy() const ROSE_OVERRIDE
75  {
76  return CONTAINER_OWNERSHIP;
77  }
78 
83  std::unordered_map<SgVariableSymbol*, std::list<SgVariableDefinition*> > symbols_sockets_;
84 };
85 
86 class DmiSocketAttribute: public AstAttribute {
87 public:
88 
89  // for the new rose release
90  virtual AstAttribute::OwnershipPolicy getOwnershipPolicy() const ROSE_OVERRIDE
91  {
92  return CONTAINER_OWNERSHIP;
93  }
94 
98  SgVariableDefinition* socket_;
99 };
100 
101 //currently, the methods include b_transport and get_direct_mem_ptr
102 class SocketMethodParameterReferenceAttribute: public AstAttribute {
103 
104 public:
105 
106  // for the new rose release
107  virtual AstAttribute::OwnershipPolicy getOwnershipPolicy() const ROSE_OVERRIDE
108  {
109  return CONTAINER_OWNERSHIP;
110  }
111 
115  std::unordered_map<SgVariableSymbol*, SgVariableDefinition* > reference_and_socket_;
116 };
117 
118 } // end of namespace sg
119 
120 } // end of namespace risc
121 
122 #endif /* GENERIC_PAYLOAD_ATTRIBUTES_H_INCLUDED_ */
123 
124 /* ex: set softtabstop=2 tabstop=2 shiftwidth=2 expandtab: */
Definition: generic_payload_attributes.h:39
Definition: generic_payload_attributes.h:102
std::unordered_map< SgVariableSymbol *, std::list< SgVariableDefinition * > > symbols_sockets_
If a container (say, generic payload) is approached with socket S, then, its mapped containers are th...
Definition: generic_payload_attributes.h:83
virtual AstAttribute::OwnershipPolicy getOwnershipPolicy() const ROSE_OVERRIDE
Definition: generic_payload_attributes.h:74
virtual AstAttribute::OwnershipPolicy getOwnershipPolicy() const ROSE_OVERRIDE
Definition: generic_payload_attributes.h:43
virtual AstAttribute::OwnershipPolicy getOwnershipPolicy() const ROSE_OVERRIDE
Definition: generic_payload_attributes.h:59
Definition: generic_payload_attributes.h:86
virtual AstAttribute::OwnershipPolicy getOwnershipPolicy() const ROSE_OVERRIDE
Definition: generic_payload_attributes.h:28
std::unordered_map< SgVariableSymbol *, SgVariableDefinition * > reference_and_socket_
The container is approached by what socket.
Definition: generic_payload_attributes.h:115
SgVariableSymbol * data_symbol_
SgVariableSymbol for the original variable.
Definition: generic_payload_attributes.h:36
SgVariableSymbol * data_symbol_
SgVariableSymbol for the alias variable.
Definition: generic_payload_attributes.h:51
virtual AstAttribute::OwnershipPolicy getOwnershipPolicy() const ROSE_OVERRIDE
Definition: generic_payload_attributes.h:107
Definition: generic_payload_attributes.h:55
SgVariableDefinition * socket_
The socket that calls the b_transport.
Definition: generic_payload_attributes.h:98
Definition: generic_payload_attributes.h:70
Definition: generic_payload_attributes.h:23
SgVariableSymbol * container_
SgVariableSymbol for the generic payload.
Definition: generic_payload_attributes.h:67
virtual AstAttribute::OwnershipPolicy getOwnershipPolicy() const ROSE_OVERRIDE
Definition: generic_payload_attributes.h:90