- Timestamp:
- Mar 27, 2008, 11:04:49 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Component.h
r75 r78 25 25 namespace behavioural { 26 26 27 #ifdef DEBUG 28 # define PORT_MAP(x,a,b,c,d) \ 29 do \ 30 { \ 31 try \ 32 { \ 33 x->port_map(a,b,c,d); \ 34 } \ 35 catch (morpheo::ErrorMorpheo & error) \ 36 { \ 37 throw (ErrorMorpheo ("In file "+toString(__FILE__)+", at line "+toString(__LINE__)+"\n"+error.what ())); \ 38 } \ 39 } \ 40 while (0) 41 #else 42 # define PORT_MAP(x,a,b,c,d) \ 43 do \ 44 { \ 45 x->port_map(a,b,c,d); \ 46 } \ 47 while (0) 48 #endif 49 50 #define COMPONENT_MAP(x,a,b,c,d) \ 51 do \ 52 { \ 53 PORT_MAP(x,a,b,c,d); \ 54 PORT_MAP(x,c,d,a,b); \ 55 } \ 56 while (0) 57 58 27 59 typedef uint8_t Tinstance_t; 28 60 … … 35 67 typedef struct 36 68 { 37 public : Tinstance_t _instance; 38 public : Entity * _entity ; 69 //public : Component * _component; 70 public : Entity * _entity ; 71 public : Tinstance_t _instance ; 39 72 } Tcomponent_t; 40 73 … … 42 75 { 43 76 // -----[ fields ]---------------------------------------------------- 44 private : const Tusage_t _usage;45 private : Entity * _entity ;77 private : const Tusage_t _usage; 78 private : Entity * _entity ; 46 79 private : std::list<Tcomponent_t*> * _list_component; 47 80 … … 57 90 #endif 58 91 ); 59 private : std::string 92 private : std::string get_entity (void); 60 93 61 94 public : void set_component (Component * component … … 69 102 ); 70 103 71 private : std::string 104 private : std::string get_component (void); 72 105 73 106 private : Entity * find_entity (std::string name); … … 87 120 std::string component_dest, 88 121 std::string port_dest ); 89 public : void port_map (std::string component_src ,90 std::string port_src );91 122 92 public : bool test_map (void); 123 public : bool test_map (bool recursive=true); 124 private : bool test_map (uint32_t depth, bool recursive); 93 125 94 126 #ifdef POSITION … … 102 134 public : void generate_file (void); 103 135 #endif 104 public : friend std::ostream& 105 136 public : friend std::ostream& operator<< (std::ostream& output_stream, 137 morpheo::behavioural::Component & x); 106 138 }; 107 139
Note: See TracChangeset
for help on using the changeset viewer.