Changeset 131 for trunk/IPs/systemC/processor/Morpheo/Behavioural/src
- Timestamp:
- Jul 8, 2009, 8:40:08 PM (15 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_port_map.cpp
r113 r131 51 51 52 52 // If all is ok, mapping 53 log_printf(TRACE,Behavioural,FUNCTION, _("Signal \"%s.%s\"\tlink with \"%s.%s\"") 54 ,entity_src ->get_name().c_str() 55 ,signal_src ->get_name().c_str() 56 ,entity_dest->get_name().c_str() 57 ,signal_dest->get_name().c_str()); 53 log_printf(TRACE,Behavioural,FUNCTION, _("Signal \"%s.%s\" (0x%x) \tlink with \"%s.%s\" (0x%x)") 54 , entity_src ->get_name().c_str() 55 , signal_src ->get_name().c_str() 56 ,(int)signal_src ->get_sc_signal() 57 , entity_dest->get_name().c_str() 58 , signal_dest->get_name().c_str() 59 ,(int)signal_dest->get_sc_signal() 60 ); 58 61 59 62 // need an internal signal ? -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Model.cpp
r129 r131 18 18 // log_begin(Behavioural,FUNCTION); 19 19 20 default_type = MODEL_SYSTEMC; 21 default_debug = false; 22 20 23 set_model(NAME_true ,MODEL_SYSTEMC,true ); 21 24 set_model(NAME_false,MODEL_SYSTEMC,false); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Model_set_model.cpp
r129 r131 11 11 namespace morpheo { 12 12 namespace behavioural { 13 14 #undef FUNCTION 15 #define FUNCTION "Model::set_model" 16 void Model::set_model (model_type_t type, bool debug) 17 { 18 // log_begin(Behavioural,FUNCTION); 19 20 default_type = type ; 21 default_debug = debug; 22 23 // log_end(Behavioural,FUNCTION); 24 } 13 25 14 26 #undef FUNCTION -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_connect.cpp
r82 r131 18 18 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 19 19 20 // log_printf(TRACE,Behavioural,FUNCTION,"Connection between : %s with %s",get_name().c_str(),signal_dest->get_name().c_str());21 // log_printf(ALL,Behavioural,FUNCTION," * source");22 // log_printf(ALL,Behavioural,FUNCTION," * direction : %s",toString(_direction).c_str());23 // log_printf(ALL,Behavioural,FUNCTION," * sc_signal : %.8x",_sc_signal);24 // log_printf(ALL,Behavioural,FUNCTION," * type_info : %s",toString(_type_info).c_str());25 // log_printf(ALL,Behavioural,FUNCTION," * destination");26 // log_printf(ALL,Behavioural,FUNCTION," * direction : %s",toString(signal_dest->_direction).c_str());27 // log_printf(ALL,Behavioural,FUNCTION," * sc_signal : %.8x",signal_dest->_sc_signal);28 // log_printf(ALL,Behavioural,FUNCTION," * type_info : %s",toString(signal_dest->_type_info).c_str());20 log_printf(TRACE,Behavioural,FUNCTION," * Connection between : %s with %s",get_name().c_str(),signal_dest->get_name().c_str()); 21 // log_printf(ALL,Behavioural,FUNCTION," * source"); 22 // log_printf(ALL,Behavioural,FUNCTION," * direction : %s",toString(_direction).c_str()); 23 // log_printf(ALL,Behavioural,FUNCTION," * sc_signal : %.8x",_sc_signal); 24 // log_printf(ALL,Behavioural,FUNCTION," * type_info : %s",toString(_type_info).c_str()); 25 // log_printf(ALL,Behavioural,FUNCTION," * destination"); 26 // log_printf(ALL,Behavioural,FUNCTION," * direction : %s",toString(signal_dest->_direction).c_str()); 27 // log_printf(ALL,Behavioural,FUNCTION," * sc_signal : %.8x",signal_dest->_sc_signal); 28 // log_printf(ALL,Behavioural,FUNCTION," * type_info : %s",toString(signal_dest->_type_info).c_str()); 29 29 30 TEST_PTR( _sc_signal);30 TEST_PTR( _sc_signal); 31 31 TEST_PTR(signal_dest->_sc_signal); 32 32 33 33 if ((_direction == IN ) and (signal_dest->_direction == IN )) 34 switch (_type_info) 35 { 36 case BOOL : {(*(static_cast<sc_in <bool > *>(_sc_signal))) (*(static_cast<sc_in <bool > *>(signal_dest->_sc_signal))); break;} 37 case UINT8_T : {(*(static_cast<sc_in <uint8_t > *>(_sc_signal))) (*(static_cast<sc_in <uint8_t > *>(signal_dest->_sc_signal))); break;} 38 case UINT16_T : {(*(static_cast<sc_in <uint16_t> *>(_sc_signal))) (*(static_cast<sc_in <uint16_t> *>(signal_dest->_sc_signal))); break;} 39 case UINT32_T : {(*(static_cast<sc_in <uint32_t> *>(_sc_signal))) (*(static_cast<sc_in <uint32_t> *>(signal_dest->_sc_signal))); break;} 40 case UINT64_T : {(*(static_cast<sc_in <uint64_t> *>(_sc_signal))) (*(static_cast<sc_in <uint64_t> *>(signal_dest->_sc_signal))); break;} 41 default : {throw (ErrorMorpheo ("<Signal::connect> Signal \""+_name+"\" : type unknow.")); break;} 42 } 34 { 35 switch (_type_info) 36 { 37 case BOOL : {(*(static_cast<sc_in <bool > *>(_sc_signal))) (*(static_cast<sc_in <bool > *>(signal_dest->_sc_signal))); break;} 38 case UINT8_T : {(*(static_cast<sc_in <uint8_t > *>(_sc_signal))) (*(static_cast<sc_in <uint8_t > *>(signal_dest->_sc_signal))); break;} 39 case UINT16_T : {(*(static_cast<sc_in <uint16_t> *>(_sc_signal))) (*(static_cast<sc_in <uint16_t> *>(signal_dest->_sc_signal))); break;} 40 case UINT32_T : {(*(static_cast<sc_in <uint32_t> *>(_sc_signal))) (*(static_cast<sc_in <uint32_t> *>(signal_dest->_sc_signal))); break;} 41 case UINT64_T : {(*(static_cast<sc_in <uint64_t> *>(_sc_signal))) (*(static_cast<sc_in <uint64_t> *>(signal_dest->_sc_signal))); break;} 42 default : {throw (ErrorMorpheo ("<Signal::connect> Signal \""+_name+"\" : type unknow.")); break;} 43 } 44 } 43 45 else 44 if ((_direction == IN ) and (signal_dest->_direction == OUT)) 45 switch (_type_info) 46 { 47 case BOOL : {(*(static_cast<sc_in <bool > *>(_sc_signal))) (*(static_cast<sc_out <bool > *>(signal_dest->_sc_signal))); break;} 48 case UINT8_T : {(*(static_cast<sc_in <uint8_t > *>(_sc_signal))) (*(static_cast<sc_out <uint8_t > *>(signal_dest->_sc_signal))); break;} 49 case UINT16_T : {(*(static_cast<sc_in <uint16_t> *>(_sc_signal))) (*(static_cast<sc_out <uint16_t> *>(signal_dest->_sc_signal))); break;} 50 case UINT32_T : {(*(static_cast<sc_in <uint32_t> *>(_sc_signal))) (*(static_cast<sc_out <uint32_t> *>(signal_dest->_sc_signal))); break;} 51 case UINT64_T : {(*(static_cast<sc_in <uint64_t> *>(_sc_signal))) (*(static_cast<sc_out <uint64_t> *>(signal_dest->_sc_signal))); break;} 52 default : {throw (ErrorMorpheo ("<Signal::connect> Signal \""+_name+"\" : type unknow.")); break;} 53 } 54 else 55 if ((_direction == IN ) and (signal_dest->_direction == INTERNAL)) 56 switch (_type_info) 57 { 58 case BOOL : {(*(static_cast<sc_in <bool > *>(_sc_signal))) (*(static_cast<sc_signal<bool > *>(signal_dest->_sc_signal))); break;} 59 case UINT8_T : {(*(static_cast<sc_in <uint8_t > *>(_sc_signal))) (*(static_cast<sc_signal<uint8_t > *>(signal_dest->_sc_signal))); break;} 60 case UINT16_T : {(*(static_cast<sc_in <uint16_t> *>(_sc_signal))) (*(static_cast<sc_signal<uint16_t> *>(signal_dest->_sc_signal))); break;} 61 case UINT32_T : {(*(static_cast<sc_in <uint32_t> *>(_sc_signal))) (*(static_cast<sc_signal<uint32_t> *>(signal_dest->_sc_signal))); break;} 62 case UINT64_T : {(*(static_cast<sc_in <uint64_t> *>(_sc_signal))) (*(static_cast<sc_signal<uint64_t> *>(signal_dest->_sc_signal))); break;} 63 default : {throw (ErrorMorpheo ("<Signal::connect> Signal \""+_name+"\" : type unknow.")); break;} 64 } 65 else 46 { 47 if ((_direction == IN ) and (signal_dest->_direction == OUT)) 48 { 49 switch (_type_info) 50 { 51 case BOOL : {(*(static_cast<sc_in <bool > *>(_sc_signal))) (*(static_cast<sc_out <bool > *>(signal_dest->_sc_signal))); break;} 52 case UINT8_T : {(*(static_cast<sc_in <uint8_t > *>(_sc_signal))) (*(static_cast<sc_out <uint8_t > *>(signal_dest->_sc_signal))); break;} 53 case UINT16_T : {(*(static_cast<sc_in <uint16_t> *>(_sc_signal))) (*(static_cast<sc_out <uint16_t> *>(signal_dest->_sc_signal))); break;} 54 case UINT32_T : {(*(static_cast<sc_in <uint32_t> *>(_sc_signal))) (*(static_cast<sc_out <uint32_t> *>(signal_dest->_sc_signal))); break;} 55 case UINT64_T : {(*(static_cast<sc_in <uint64_t> *>(_sc_signal))) (*(static_cast<sc_out <uint64_t> *>(signal_dest->_sc_signal))); break;} 56 default : {throw (ErrorMorpheo ("<Signal::connect> Signal \""+_name+"\" : type unknow.")); break;} 57 } 58 } 59 else 60 { 61 if ((_direction == IN ) and (signal_dest->_direction == INTERNAL)) 62 { 63 switch (_type_info) 64 { 65 case BOOL : {(*(static_cast<sc_in <bool > *>(_sc_signal))) (*(static_cast<sc_signal<bool > *>(signal_dest->_sc_signal))); break;} 66 case UINT8_T : {(*(static_cast<sc_in <uint8_t > *>(_sc_signal))) (*(static_cast<sc_signal<uint8_t > *>(signal_dest->_sc_signal))); break;} 67 case UINT16_T : {(*(static_cast<sc_in <uint16_t> *>(_sc_signal))) (*(static_cast<sc_signal<uint16_t> *>(signal_dest->_sc_signal))); break;} 68 case UINT32_T : {(*(static_cast<sc_in <uint32_t> *>(_sc_signal))) (*(static_cast<sc_signal<uint32_t> *>(signal_dest->_sc_signal))); break;} 69 case UINT64_T : {(*(static_cast<sc_in <uint64_t> *>(_sc_signal))) (*(static_cast<sc_signal<uint64_t> *>(signal_dest->_sc_signal))); break;} 70 default : {throw (ErrorMorpheo ("<Signal::connect> Signal \""+_name+"\" : type unknow.")); break;} 71 } 72 } 73 else 74 { 66 75 #ifdef SYSTEMCASS_SPECIFIC 67 68 69 70 71 72 73 74 75 76 77 76 if ((_direction == OUT) and (signal_dest->_direction == IN )) 77 switch (_type_info) 78 { 79 case BOOL : {(*(static_cast<sc_out <bool > *>(_sc_signal))) (*(static_cast<sc_in <bool > *>(signal_dest->_sc_signal))); break;} 80 case UINT8_T : {(*(static_cast<sc_out <uint8_t > *>(_sc_signal))) (*(static_cast<sc_in <uint8_t > *>(signal_dest->_sc_signal))); break;} 81 case UINT16_T : {(*(static_cast<sc_out <uint16_t> *>(_sc_signal))) (*(static_cast<sc_in <uint16_t> *>(signal_dest->_sc_signal))); break;} 82 case UINT32_T : {(*(static_cast<sc_out <uint32_t> *>(_sc_signal))) (*(static_cast<sc_in <uint32_t> *>(signal_dest->_sc_signal))); break;} 83 case UINT64_T : {(*(static_cast<sc_out <uint64_t> *>(_sc_signal))) (*(static_cast<sc_in <uint64_t> *>(signal_dest->_sc_signal))); break;} 84 default : {throw (ErrorMorpheo ("<Signal::connect> Signal \""+_name+"\" : type unknow.")); break;} 85 } 86 else 78 87 #endif 79 if ((_direction == OUT) and (signal_dest->_direction == OUT)) 80 switch (_type_info) 81 { 82 case BOOL : {(*(static_cast<sc_out <bool > *>(_sc_signal))) (*(static_cast<sc_out <bool > *>(signal_dest->_sc_signal))); break;} 83 case UINT8_T : {(*(static_cast<sc_out <uint8_t > *>(_sc_signal))) (*(static_cast<sc_out <uint8_t > *>(signal_dest->_sc_signal))); break;} 84 case UINT16_T : {(*(static_cast<sc_out <uint16_t> *>(_sc_signal))) (*(static_cast<sc_out <uint16_t> *>(signal_dest->_sc_signal))); break;} 85 case UINT32_T : {(*(static_cast<sc_out <uint32_t> *>(_sc_signal))) (*(static_cast<sc_out <uint32_t> *>(signal_dest->_sc_signal))); break;} 86 case UINT64_T : {(*(static_cast<sc_out <uint64_t> *>(_sc_signal))) (*(static_cast<sc_out <uint64_t> *>(signal_dest->_sc_signal))); break;} 87 default : {throw (ErrorMorpheo ("<Signal::connect> Signal \""+_name+"\" : type unknow.")); break;} 88 } 89 else 90 if ((_direction == OUT) and (signal_dest->_direction == INTERNAL)) 91 switch (_type_info) 92 { 93 case BOOL : {(*(static_cast<sc_out <bool > *>(_sc_signal))) (*(static_cast<sc_signal<bool > *>(signal_dest->_sc_signal))); break;} 94 case UINT8_T : {(*(static_cast<sc_out <uint8_t > *>(_sc_signal))) (*(static_cast<sc_signal<uint8_t > *>(signal_dest->_sc_signal))); break;} 95 case UINT16_T : {(*(static_cast<sc_out <uint16_t> *>(_sc_signal))) (*(static_cast<sc_signal<uint16_t> *>(signal_dest->_sc_signal))); break;} 96 case UINT32_T : {(*(static_cast<sc_out <uint32_t> *>(_sc_signal))) (*(static_cast<sc_signal<uint32_t> *>(signal_dest->_sc_signal))); break;} 97 case UINT64_T : {(*(static_cast<sc_out <uint64_t> *>(_sc_signal))) (*(static_cast<sc_signal<uint64_t> *>(signal_dest->_sc_signal))); break;} 98 default : {throw (ErrorMorpheo ("<Signal::connect> Signal \""+_name+"\" : type unknow.")); break;} 99 } 88 { 89 if ((_direction == OUT) and (signal_dest->_direction == OUT)) 90 { 91 switch (_type_info) 92 { 93 case BOOL : {(*(static_cast<sc_out <bool > *>(_sc_signal))) (*(static_cast<sc_out <bool > *>(signal_dest->_sc_signal))); break;} 94 case UINT8_T : {(*(static_cast<sc_out <uint8_t > *>(_sc_signal))) (*(static_cast<sc_out <uint8_t > *>(signal_dest->_sc_signal))); break;} 95 case UINT16_T : {(*(static_cast<sc_out <uint16_t> *>(_sc_signal))) (*(static_cast<sc_out <uint16_t> *>(signal_dest->_sc_signal))); break;} 96 case UINT32_T : {(*(static_cast<sc_out <uint32_t> *>(_sc_signal))) (*(static_cast<sc_out <uint32_t> *>(signal_dest->_sc_signal))); break;} 97 case UINT64_T : {(*(static_cast<sc_out <uint64_t> *>(_sc_signal))) (*(static_cast<sc_out <uint64_t> *>(signal_dest->_sc_signal))); break;} 98 default : {throw (ErrorMorpheo ("<Signal::connect> Signal \""+_name+"\" : type unknow.")); break;} 99 } 100 } 101 else 102 { 103 if ((_direction == OUT) and (signal_dest->_direction == INTERNAL)) 104 { 105 switch (_type_info) 106 { 107 case BOOL : {(*(static_cast<sc_out <bool > *>(_sc_signal))) (*(static_cast<sc_signal<bool > *>(signal_dest->_sc_signal))); break;} 108 case UINT8_T : {(*(static_cast<sc_out <uint8_t > *>(_sc_signal))) (*(static_cast<sc_signal<uint8_t > *>(signal_dest->_sc_signal))); break;} 109 case UINT16_T : {(*(static_cast<sc_out <uint16_t> *>(_sc_signal))) (*(static_cast<sc_signal<uint16_t> *>(signal_dest->_sc_signal))); break;} 110 case UINT32_T : {(*(static_cast<sc_out <uint32_t> *>(_sc_signal))) (*(static_cast<sc_signal<uint32_t> *>(signal_dest->_sc_signal))); break;} 111 case UINT64_T : {(*(static_cast<sc_out <uint64_t> *>(_sc_signal))) (*(static_cast<sc_signal<uint64_t> *>(signal_dest->_sc_signal))); break;} 112 default : {throw (ErrorMorpheo ("<Signal::connect> Signal \""+_name+"\" : type unknow.")); break;} 113 } 114 } 100 115 // else 101 116 // if ((_direction == INTERNAL) and (signal_dest->_direction == IN )) … … 131 146 // default : {throw (ErrorMorpheo ("<Signal::connect> Signal \""+_name+"\" : type unknow.")); break;} 132 147 // } 133 else 134 throw (ErrorMorpheo ("<Signal::connect> Signal \""+_name+"\" can't been connected with signal \""+signal_dest->get_name()+"\" : illegal direction ("+toString(_direction)+" with "+toString(signal_dest->_direction)+").")); 148 else 149 { 150 throw (ErrorMorpheo ("<Signal::connect> Signal \""+_name+"\" can't been connected with signal \""+signal_dest->get_name()+"\" : illegal direction ("+toString(_direction)+" with "+toString(signal_dest->_direction)+").")); 151 } 152 } 153 } 154 } 155 } 156 } 135 157 136 158 log_printf(FUNC,Behavioural,FUNCTION,"End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_link.cpp
r129 r131 102 102 if (not source_have_multi_consumer) 103 103 connect (signal_dest); 104 else 105 msgWarning(_("Source have multi consumer !\n")); 104 106 105 107 log_printf(FUNC,Behavioural,FUNCTION,"End");
Note: See TracChangeset
for help on using the changeset viewer.