TLM-2.0  2.0.3
Accellera TLM-2.0 proof-of-concept library
Classes | Namespaces | Macros | Enumerations | Functions
tlm_phase.h File Reference
#include <string>
#include <iostream>
#include <vector>
Include dependency graph for tlm_phase.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  tlm::tlm_phase
 

Namespaces

 tlm
 

Macros

#define TLM_DECLARE_EXTENDED_PHASE(name_arg)
 
#define DECLARE_EXTENDED_PHASE(NameArg)   TLM_DECLARE_EXTENDED_PHASE( NameArg )
 

Enumerations

enum  tlm::tlm_phase_enum {
  tlm::UNINITIALIZED_PHASE =0, tlm::BEGIN_REQ =1, tlm::END_REQ, tlm::BEGIN_RESP,
  tlm::END_RESP
}
 

Functions

unsigned int tlm::create_phase_number ()
 
std::vector< const char * > & tlm::get_phase_name_vec ()
 
std::ostream & tlm::operator<< (std::ostream &s, const tlm_phase &p)
 

Macro Definition Documentation

#define DECLARE_EXTENDED_PHASE (   NameArg)    TLM_DECLARE_EXTENDED_PHASE( NameArg )

Definition at line 80 of file tlm_phase.h.

#define TLM_DECLARE_EXTENDED_PHASE (   name_arg)
Value:
class tlm_phase_##name_arg:public tlm::tlm_phase{ \
public:\
static const tlm_phase_##name_arg& get_phase(){static tlm_phase_##name_arg tmp; return tmp;}\
private:\
tlm_phase_##name_arg():tlm::tlm_phase(tlm::create_phase_number()){tlm::get_phase_name_vec().push_back(get_char_##name_arg());};\
tlm_phase_##name_arg(const tlm_phase_##name_arg&); \
tlm_phase_##name_arg& operator=(const tlm_phase_##name_arg&); \
static inline const char* get_char_##name_arg(){static const char* tmp=#name_arg; return tmp;} \
}; \
static const tlm_phase_##name_arg& name_arg=tlm_phase_##name_arg::get_phase()
tlm_phase & operator=(const tlm_phase_enum &standard)
Definition: tlm_phase.h:46
unsigned int create_phase_number()
Definition: tlm_phase.h:31
std::vector< const char * > & get_phase_name_vec()
Definition: tlm_phase.h:36

Definition at line 67 of file tlm_phase.h.