- Timestamp:
- Mar 27, 2008, 11:04:49 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_test_map.cpp
r75 r78 13 13 #undef FUNCTION 14 14 #define FUNCTION "Component::test_map" 15 bool Component::test_map (void) 15 bool Component::test_map (bool recursive) 16 { 17 return test_map (0, recursive); 18 } 19 20 bool Component::test_map (uint32_t depth, bool recursive) 16 21 { 17 22 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 18 23 24 std::string tab = std::string(depth,'\t'); 19 25 std::string name = _entity->get_name(); 20 26 bool test_ok = true; 27 21 28 if (_list_component->empty () == true) 22 log_printf(NONE,Behavioural,FUNCTION, "Component \"%s\" is a behavioural description",name.c_str()); 29 { 30 log_printf(NONE,Behavioural,FUNCTION, "%s* Component \"%s\" is a behavioural description",tab.c_str(),name.c_str()); 31 } 23 32 else 24 33 { 25 log_printf(NONE,Behavioural,FUNCTION, " Component \"%s\" is a structural description",name.c_str());34 log_printf(NONE,Behavioural,FUNCTION, "%s* Component \"%s\" is a structural description",tab.c_str(),name.c_str()); 26 35 27 log_printf(INFO,Behavioural,FUNCTION, " Test port I/O");36 log_printf(INFO,Behavioural,FUNCTION, "%s* Test port I/O",tab.c_str()); 28 37 29 test_ok &= _entity->test_map( true);38 test_ok &= _entity->test_map(1,true); 30 39 31 log_printf(INFO,Behavioural,FUNCTION, " Test all internal component");40 log_printf(INFO,Behavioural,FUNCTION, "%s* Test all internal component",tab.c_str()); 32 41 33 42 for (std::list<Tcomponent_t *>::iterator i= _list_component->begin(); 34 43 i != _list_component->end(); 35 44 ++i) 36 test_ok &= (*i)->_entity->test_map(false); 45 test_ok &= (*i)->_entity->test_map(1,false); 46 47 // if (recursive) 48 // for (std::list<Tcomponent_t *>::iterator i= _list_component->begin(); 49 // i != _list_component->end(); 50 // ++i) 51 // test_ok &= (*i)->_component->test_map(1,recursive); 37 52 } 38 53 … … 40 55 41 56 if (test_ok == false) 42 throw (E rrorMorpheo ("<Component::test_map>A lot of port is not connected."));57 throw (ERRORMORPHEO (FUNCTION,"A lot of port is not connected.")); 43 58 44 59 return test_ok;
Note: See TracChangeset
for help on using the changeset viewer.