- Timestamp:
- Apr 14, 2009, 8:39:12 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Component.h
r82 r113 72 72 public : Entity * _entity ; 73 73 public : Tinstance_t _instance ; 74 public : std::string _architecture; 74 75 } Tcomponent_t; 75 76 … … 102 103 #endif 103 104 ,Tinstance_t instance=INSTANCE_ALL 105 ,std::string architecture="" 104 106 ); 105 107 … … 116 118 117 119 private : Signal * signal_internal (Entity * entity_productor, 118 Signal * signal_productor); 120 Signal * signal_productor, 121 Entity * entity_consumer, 122 Signal * signal_consumer); 119 123 120 124 public : void port_map (std::string component_src , … … 125 129 public : bool test_map (bool recursive=true); 126 130 private : bool test_map (uint32_t depth, bool recursive); 131 132 public : void * get_sc_signal (std::string component, 133 std::string port ); 134 // public : void set_sc_signal (std::string component, 135 // std::string port , 136 // void * sc_signal); 127 137 128 138 // public : bool test_equi (bool recursive=true); … … 141 151 public : friend std::ostream& operator<< (std::ostream& output_stream, 142 152 morpheo::behavioural::Component & x); 153 154 155 #undef FUNCTION 156 #define FUNCTION "Component::set_sc_signal" 157 public : template <typename T> 158 void set_sc_signal (std::string component, 159 std::string port , 160 void * sc_signal) 161 { 162 log_begin(Behavioural,FUNCTION); 163 164 std::string name_entity = _entity->get_name(); 165 166 Entity * entity = find_entity(component); 167 168 if (entity == NULL) 169 throw (ERRORMORPHEO (FUNCTION,"In component \""+name_entity+"\", the component \""+component+"\" is unknow.\n")); 170 171 Signal * signal = entity->find_signal (port); 172 173 if (signal == NULL) 174 throw (ERRORMORPHEO (FUNCTION,"In component \""+name_entity+"\", the component \""+component+"\" have not the signal \""+port+"\".\n")); 175 176 signal->alloc<T>(sc_signal); 177 178 log_end(Behavioural,FUNCTION); 179 }; 143 180 }; 144 181
Note: See TracChangeset
for help on using the changeset viewer.