Changeset 144 for trunk/IPs/systemC
- Timestamp:
- Sep 28, 2010, 1:19:10 PM (14 years ago)
- Location:
- trunk/IPs/systemC
- Files:
-
- 32 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/Environment/Cache/src/Cache_latence.cpp
r117 r144 1 1 #include "../include/Cache.h" 2 #include <stdio.h> 2 3 3 4 namespace environment { -
trunk/IPs/systemC/Environment/Common/include/Debug.h
r143 r144 2 2 #define ENVIRONMENT_COMMON_DEBUG_H 3 3 4 #include < cstdio>4 #include <stdio.h> 5 5 6 6 #define DEBUG_true true -
trunk/IPs/systemC/Environment/Data/include/Data.h
r81 r144 4 4 #include "Data_Parameters.h" 5 5 #include "Entity.h" 6 #include <stdint.h> 6 7 7 8 namespace environment { -
trunk/IPs/systemC/Environment/Data/include/Data_Parameters.h
r81 r144 3 3 4 4 #include <iostream> 5 #include <stdint.h> 5 6 #include "../../../shared/soclib_segment_table.h" 6 7 -
trunk/IPs/systemC/Environment/Data/include/Segment.h
r134 r144 6 6 7 7 #include <iomanip> 8 #include <stdint.h> 8 9 9 10 extern "C" void loadexec(void **emem, int *esize, int *eoffset, const char *file, const char ** sections); -
trunk/IPs/systemC/Environment/Data/src/Data.cpp
r81 r144 1 1 #include "../include/Data.h" 2 #include <stdlib.h> 2 3 3 4 namespace environment { -
trunk/IPs/systemC/Environment/Data/src/Segment.cpp
r134 r144 1 1 #include "../include/Segment.h" 2 #include <string.h> 2 3 3 4 namespace environment { -
trunk/IPs/systemC/Environment/Data/src/Segment_init.cpp
r138 r144 1 1 #include "../include/Segment.h" 2 2 #include "../../Common/include/Debug.h" 3 #include <string.h> 4 #include <stdlib.h> 3 5 4 6 namespace environment { -
trunk/IPs/systemC/Environment/Endianness/src/Endianness_swapBytes.cpp
r81 r144 1 1 #include "../include/Endianness.h" 2 2 #include <iostream> 3 #include <stdlib.h> 4 #include <string.h> 3 5 4 6 namespace environment { -
trunk/IPs/systemC/Environment/Sim2OS/src/Sim2OS_convert_address.cpp
r88 r144 1 1 #include "../include/Sim2OS.h" 2 #include <stdlib.h> 2 3 3 4 namespace environment { -
trunk/IPs/systemC/Environment/TTY/include/TTY.h
r81 r144 7 7 // #include <unistd.h> 8 8 #include <signal.h> 9 #include <stdint.h> 9 10 10 11 namespace environment { -
trunk/IPs/systemC/Environment/TTY/include/TTY_Parameters.h
r81 r144 3 3 4 4 #include <iostream> 5 #include <stdint.h> 5 6 6 7 namespace environment { -
trunk/IPs/systemC/Environment/TTY/selftest/main.cpp
r138 r144 34 34 cout << *tty << endl; 35 35 36 c har * message_0 = "Ici Londre : Adeline aime la saucisse de Frankort.\nJe repete : Adeline aime la saucisse de Frankort" ;37 c har * message_1 = "Ici Londre : Maurice a garer le camion de bernard dans la cour.\nJe repete Maurice a garer le camion de bernard dans la cour";38 c har * message_2 = "Ici Londre : Londre est la ville qui diffuse des messages a la con.\nJe repete : Londre est la ville qui diffuse des messages a la con";39 c har * message_3 = "Ici Londre : Non, le debarquement n'aura pas lieu le 6 juin 1944 en Normandie, et je ne me repete pas";36 const char * message_0 = "Ici Londre : Adeline aime la saucisse de Frankort.\nJe repete : Adeline aime la saucisse de Frankort" ; 37 const char * message_1 = "Ici Londre : Maurice a garer le camion de bernard dans la cour.\nJe repete Maurice a garer le camion de bernard dans la cour"; 38 const char * message_2 = "Ici Londre : Londre est la ville qui diffuse des messages a la con.\nJe repete : Londre est la ville qui diffuse des messages a la con"; 39 const char * message_3 = "Ici Londre : Non, le debarquement n'aura pas lieu le 6 juin 1944 en Normandie, et je ne me repete pas"; 40 40 41 c har * message [nb_tty];41 const char * message [nb_tty]; 42 42 message[0] = message_0; 43 43 message[1] = message_1; -
trunk/IPs/systemC/Environment/TTY/src/TTY.cpp
r82 r144 1 1 #include "../include/TTY.h" 2 #include <stdlib.h> 3 #include <stdio.h> 2 4 3 5 namespace environment { … … 40 42 // Childen -> transform in a xtty 41 43 close(0); // s 42 dup (canal_output.CanalPipe [0]); 44 if (dup (canal_output.CanalPipe [0]) == -1) 45 { 46 std::cerr << "<Tty> Error in dupplicate file descriptor." << std::endl; 47 exit (1); 48 }; 43 49 close(1); 44 50 execlp("xtty","xtty", param->name_tty [i].c_str() ,NULL); // devient un tty -
trunk/IPs/systemC/Environment/TTY/src/TTY_write.cpp
r117 r144 1 1 #include "../include/TTY.h" 2 #include <stdio.h> 2 3 3 4 namespace environment { … … 10 11 11 12 if (param->with_xtty == true) 12 ::write (xtty[num_tty].pipe_output, &data, 1); 13 { 14 if (::write (xtty[num_tty].pipe_output, &data, 1) == -1) 15 std::cerr << "<TTY::write> write error.\n" << std::endl; 16 } 13 17 14 18 fputc (data, xtty[num_tty].log_file); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/src/Branch_Target_Buffer_Glue.cpp
r132 r144 99 99 << (*(in_PREDICT_REGISTER_ACK [i])); 100 100 if (_param->_have_port_victim) 101 sensitive << (*(in_PREDICT_SORT_VAL [i]))101 sensitive //<< (*(in_PREDICT_SORT_VAL [i])) 102 102 << (*(in_PREDICT_SORT_INDEX [i])) 103 103 << (*(in_PREDICT_VICTIM_ACK [i])); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/src/Branch_Target_Buffer_Glue_genMealy_predict.cpp
r128 r144 33 33 Tcontrol_t val = PORT_READ(in_PREDICT_VAL [i]); 34 34 Tcontrol_t register_ack = PORT_READ(in_PREDICT_REGISTER_ACK [i]); 35 Tcontrol_t sort_val = (_param->_have_port_victim)?PORT_READ(in_PREDICT_SORT_VAL [i]):true;35 // Tcontrol_t sort_val = (_param->_have_port_victim)?PORT_READ(in_PREDICT_SORT_VAL [i]):true; 36 36 Tcontrol_t victim_ack = (_param->_have_port_victim)?PORT_READ(in_PREDICT_VICTIM_ACK [i]):true; 37 37 … … 39 39 log_printf(TRACE,Branch_Target_Buffer_Glue,FUNCTION," * register_ack : %d",register_ack); 40 40 log_printf(TRACE,Branch_Target_Buffer_Glue,FUNCTION," * port_victim : %d",_param->_have_port_victim); 41 log_printf(TRACE,Branch_Target_Buffer_Glue,FUNCTION," * sort_val : %d",sort_val );41 // log_printf(TRACE,Branch_Target_Buffer_Glue,FUNCTION," * sort_val : %d",sort_val ); 42 42 log_printf(TRACE,Branch_Target_Buffer_Glue,FUNCTION," * victim_ack : %d",victim_ack ); 43 43 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_transition.cpp
r142 r144 721 721 // Take num instruction 722 722 uint32_t x = internal_BANK_RETIRE_NUM_RENAME_UNIT [num_bank]; 723 #ifdef DEBUG 723 724 uint32_t y = internal_BANK_RETIRE_NUM_INST [num_bank]; 724 725 #endif 725 726 log_printf(TRACE,Commit_unit,FUNCTION," * RETIRE [%d][%d]",x,y); 726 727 log_printf(TRACE,Commit_unit,FUNCTION," * num_bank : %d",num_bank ); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/src/Parameters.cpp
r139 r144 8 8 #include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/include/Parameters.h" 9 9 #include "Common/include/Max.h" 10 10 11 namespace morpheo { 11 12 namespace behavioural { … … 16 17 namespace register_translation_unit { 17 18 namespace register_address_translation_unit { 18 19 19 20 20 #undef FUNCTION -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/src/Register_Address_Translation_unit_function_depth_save_transition.cpp
r139 r144 190 190 // the retire interface became of the Re Order Buffer, also is in program sequence ! 191 191 192 #ifdef DEBUG 192 193 Tcontext_t front_end_id = (_param->_have_port_front_end_id)?PORT_READ(in_RETIRE_FRONT_END_ID [i]):0; 193 194 Tcontext_t context_id = (_param->_have_port_context_id )?PORT_READ(in_RETIRE_CONTEXT_ID [i]):0; 195 #endif 194 196 Tcontrol_t write_rd = PORT_READ(in_RETIRE_WRITE_RD [i]); 195 197 Tcontrol_t write_re = PORT_READ(in_RETIRE_WRITE_RE [i]); … … 204 206 if (write_rd == 1) 205 207 { 208 #ifdef DEBUG 206 209 Tgeneral_address_t num_reg_rd_log = PORT_READ(in_RETIRE_NUM_REG_RD_LOG [i]); 210 #endif 207 211 208 212 log_printf(TRACE,Register_Address_Translation_unit,FUNCTION," * num_reg_rd_log : %d",num_reg_rd_log ); … … 210 214 if (not restore) 211 215 { 216 #ifdef DEBUG 212 217 Tgeneral_address_t num_reg_rd_phy_new = PORT_READ(in_RETIRE_NUM_REG_RD_PHY_NEW [i]); 213 218 #endif 214 219 log_printf(TRACE,Register_Address_Translation_unit,FUNCTION," * num_reg_rd_phy_new : %d",num_reg_rd_phy_new); 215 220 … … 221 226 if (write_re == 1) 222 227 { 228 #ifdef DEBUG 223 229 Tspecial_address_t num_reg_re_log = PORT_READ(in_RETIRE_NUM_REG_RE_LOG [i]); 230 #endif 224 231 225 232 log_printf(TRACE,Register_Address_Translation_unit,FUNCTION," * num_reg_re_log : %d",num_reg_re_log ); … … 227 234 if (not restore) 228 235 { 236 #ifdef DEBUG 229 237 Tspecial_address_t num_reg_re_phy_new = PORT_READ(in_RETIRE_NUM_REG_RE_PHY_NEW [i]); 238 #endif 230 239 231 240 log_printf(TRACE,Register_Address_Translation_unit,FUNCTION," * num_reg_re_phy_new : %d",num_reg_re_phy_new); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Multiplier/src/Multiplier_transition.cpp
r116 r144 184 184 default : 185 185 { 186 data.LSB = 0; 187 data.MSB = 0; 188 186 189 break; 187 190 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Shifter.cpp
r132 r144 8 8 #include "Behavioural/Generic/Shifter/include/Shifter.h" 9 9 10 namespace morpheo 10 namespace morpheo { 11 11 namespace behavioural { 12 12 namespace generic { 13 13 namespace shifter { 14 15 14 16 15 #undef FUNCTION … … 81 80 sensitive << (*(in_SHIFTER_CARRY [i])); 82 81 if (param->_carry == external_completion) 83 if (_param->_type_completion_bool == true) 84 sensitive << (*(in_SHIFTER_CARRY_IN [i])); 85 else 86 sensitive << (*(in_SHIFTER_COMPLETION[i])); 82 {// BURP : ajout de la parenthèse 83 if (_param->_type_completion_bool == true) 84 sensitive << (*(in_SHIFTER_CARRY_IN [i])); 85 else 86 sensitive << (*(in_SHIFTER_COMPLETION[i])); 87 } 87 88 } 88 89 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Sort/src/Sort_genMealy.cpp
r132 r144 8 8 9 9 #include "Behavioural/Generic/Sort/include/Sort.h" 10 #include <algorithm> 10 11 11 12 namespace morpheo { -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Stat_type.h
r138 r144 7 7 #include <utility> 8 8 #include <cassert> 9 #include <stdint.h> 9 10 10 11 namespace morpheo { -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_dealloc.cpp
r142 r144 19 19 20 20 #warning "FIXME : Signal::dealloc" 21 21 22 // switch (_direction) 22 23 // { -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_test_map.cpp
r139 r144 40 40 41 41 if (not (is_behavioural and top_level)) 42 if (top_level == true) 43 { 44 switch (_direction) 45 { 46 case morpheo::behavioural::IN : 42 {//BURP : ajoue de la parenthÚse ... 43 if (top_level == true) 44 { 45 switch (_direction) 47 46 { 48 if (_is_map_as_toplevel_dest == false) 49 { 50 _return = false; 51 52 str = "Signal \""+signame+"\" is not mapped with an outpout port top-level's interface or a input port component's interface."; 53 } 54 break; 47 case morpheo::behavioural::IN : 48 { 49 if (_is_map_as_toplevel_dest == false) 50 { 51 _return = false; 52 53 str = "Signal \""+signame+"\" is not mapped with an outpout port top-level's interface or a input port component's interface."; 54 } 55 break; 56 } 57 case morpheo::behavioural::OUT : 58 { 59 if (_is_map_as_toplevel_dest == false) 60 { 61 _return = false; 62 str = "Signal \""+signame+"\" is not mapped with an input port top-level's interface or a output port component's interface."; 63 } 64 break; 65 } 66 case morpheo::behavioural::INTERNAL : 67 { 68 if (_is_map_as_component_src == false) 69 { 70 _return = false; 71 72 str = "Internal signal \""+signame+"\" is not mapped with an outpout port top-level's interface or a input port component's interface."; 73 } 74 75 if (_is_map_as_component_dest == false) 76 { 77 if (_return == false) 78 str+="\n"; 79 80 _return = false; 81 82 str += "Internal signal \""+signame+"\" is not mapped with an input port top-level's interface or a output port component's interface."; 83 } 84 85 break; 86 } 87 //case morpheo::behavioural::INOUT : 88 default : break; 55 89 } 56 case morpheo::behavioural::OUT : 90 } 91 else 92 { 93 // internal signal : 94 // Component --- I/O (as_src) 95 // Component --- Component (as_src and as_dest) 96 97 switch (_direction) 57 98 { 58 if (_is_map_as_toplevel_dest == false) 59 { 60 _return = false; 61 str = "Signal \""+signame+"\" is not mapped with an input port top-level's interface or a output port component's interface."; 62 } 63 break; 99 case morpheo::behavioural::IN : 100 { 101 if (_is_map_as_component_src == false) 102 { 103 _return = false; 104 105 str = "Signal \""+signame+"\" is not mapped with an input port top-level's interface or a output port component's interface."; 106 } 107 break; 108 } 109 case morpheo::behavioural::OUT : 110 { 111 if (_is_map_as_component_src == false) 112 { 113 _return = false; 114 115 str = "Signal \""+signame+"\" is not mapped with an outpout port top-level's interface or a input port component's interface."; 116 } 117 break; 118 } 119 case morpheo::behavioural::INTERNAL : 120 { 121 if (_is_map_as_component_src == false) 122 { 123 _return = false; 124 125 str = "Internal signal \""+signame+"\" is not mapped with an outpout port top-level's interface or a input port component's interface."; 126 } 127 128 if (_is_map_as_component_dest == false) 129 { 130 if (_return == false) 131 str+="\n"; 132 133 _return = false; 134 135 str += "Internal signal \""+signame+"\" is not mapped with an input port top-level's interface or a output port component's interface."; 136 } 137 138 break; 139 } 140 //case morpheo::behavioural::INOUT : 141 default : break; 64 142 } 65 case morpheo::behavioural::INTERNAL : 66 { 67 if (_is_map_as_component_src == false) 68 { 69 _return = false; 70 71 str = "Internal signal \""+signame+"\" is not mapped with an outpout port top-level's interface or a input port component's interface."; 72 } 73 74 if (_is_map_as_component_dest == false) 75 { 76 if (_return == false) 77 str+="\n"; 78 79 _return = false; 80 81 str += "Internal signal \""+signame+"\" is not mapped with an input port top-level's interface or a output port component's interface."; 82 } 83 84 break; 85 } 86 //case morpheo::behavioural::INOUT : 87 default : break; 88 } 89 } 90 else 91 { 92 // internal signal : 93 // Component --- I/O (as_src) 94 // Component --- Component (as_src and as_dest) 95 96 switch (_direction) 97 { 98 case morpheo::behavioural::IN : 99 { 100 if (_is_map_as_component_src == false) 101 { 102 _return = false; 103 104 str = "Signal \""+signame+"\" is not mapped with an input port top-level's interface or a output port component's interface."; 105 } 106 break; 107 } 108 case morpheo::behavioural::OUT : 109 { 110 if (_is_map_as_component_src == false) 111 { 112 _return = false; 113 114 str = "Signal \""+signame+"\" is not mapped with an outpout port top-level's interface or a input port component's interface."; 115 } 116 break; 117 } 118 case morpheo::behavioural::INTERNAL : 119 { 120 if (_is_map_as_component_src == false) 121 { 122 _return = false; 123 124 str = "Internal signal \""+signame+"\" is not mapped with an outpout port top-level's interface or a input port component's interface."; 125 } 126 127 if (_is_map_as_component_dest == false) 128 { 129 if (_return == false) 130 str+="\n"; 131 132 _return = false; 133 134 str += "Internal signal \""+signame+"\" is not mapped with an input port top-level's interface or a output port component's interface."; 135 } 136 137 break; 138 } 139 //case morpheo::behavioural::INOUT : 140 default : break; 141 } 142 } 143 } 144 } 143 145 144 146 if (_return == false) -
trunk/IPs/systemC/processor/Morpheo/Common/include/Environment.h
r137 r144 47 47 // Environment variable 48 48 extern std::string MORPHEO_HOME; 49 extern std::string MORPHEO_ TOPLEVEL;49 extern std::string MORPHEO_PREFIX; 50 50 extern std::string MORPHEO_VERSION; 51 51 extern std::string MORPHEO_HEADER; -
trunk/IPs/systemC/processor/Morpheo/Common/src/Basename.cpp
r143 r144 13 13 std::string basename (std::string str, bool keep_extension) 14 14 { 15 std::string res = ::basename( str.c_str());15 std::string res = ::basename(const_cast<char *>(str.c_str())); 16 16 17 17 if (not keep_extension) -
trunk/IPs/systemC/processor/Morpheo/Common/src/Environment.cpp
r137 r144 11 11 #include "Common/include/Message.h" 12 12 #include <sys/stat.h> 13 #include <errno.h> 13 14 14 15 namespace morpheo { … … 16 17 static bool environment_initialized; 17 18 std::string MORPHEO_HOME; 18 std::string MORPHEO_ TOPLEVEL;19 std::string MORPHEO_PREFIX; 19 20 std::string MORPHEO_VERSION; 20 21 std::string MORPHEO_HEADER; … … 28 29 { 29 30 { 30 char * TOPLEVEL = getenv("MORPHEO_TOPLEVEL");31 char * PREFIX = getenv("MORPHEO_PREFIX"); 31 32 32 if ( TOPLEVEL== NULL)33 if (PREFIX == NULL) 33 34 throw ERRORMORPHEO(FUNCTION,_("Error morpheo environment is not positioned.\n")); 34 35 35 MORPHEO_ TOPLEVEL = TOPLEVEL;36 MORPHEO_PREFIX = PREFIX; 36 37 } 37 38 … … 91 92 if (chdir(dir.c_str())!=0) 92 93 throw ERRORMORPHEO(FUNCTION,toString(_("Error in opening directory \"%s\".\n"),dir.c_str())); 93 chdir(pwd); 94 95 assert(chdir(pwd)==0); 94 96 } 95 97 -
trunk/IPs/systemC/processor/Morpheo/Common/src/Translation.cpp
r131 r144 23 23 environment(); 24 24 25 std::string dirname = MORPHEO_ TOPLEVEL;26 dirname += "/ IPs/systemC/processor/Morpheo/locale";25 std::string dirname = MORPHEO_PREFIX; 26 dirname += "/locale"; 27 27 28 28 if (bindtextdomain(MORPHEO_PACKAGE,dirname.c_str()) == NULL) -
trunk/IPs/systemC/processor/Morpheo/Makefile
r91 r144 35 35 @\ 36 36 for i in $(DIR_LOCALE)/*/*/*.po; do \ 37 dir=$$($(DIRNAME) $$i); \ 37 dir_src=$$($(DIRNAME) $$i); \ 38 dir_dest=$(MORPHEO_PREFIX)/$$dir_src; \ 38 39 file=$$($(BASENAME) $$i .po); \ 40 $(MKDIR) $$dir_dest; \ 39 41 $(ECHO) "Translate : $$i"; \ 40 $(MSGFMT) $$i -o $$dir /$$file.mo; \42 $(MSGFMT) $$i -o $$dir_dest/$$file.mo; \ 41 43 done 42 44 -
trunk/IPs/systemC/shared/soclib_segment_table.h
r138 r144 73 73 #include <list> 74 74 #include <iostream> 75 #include <stdio.h> 75 76 // using namespace std; 76 77 … … 323 324 { 324 325 std::cout << "\n MSB ROUTING_TABLE\n\n" ; 325 int size = 1 << MSBNumber+LSBNumber;326 int size = 1 << (MSBNumber+LSBNumber); 326 327 unsigned int *tab = new unsigned int[size]; 327 328 initRoutingTable(tab); … … 337 338 { 338 339 printf( "\n LSB_ROUTING_TABLE OF GLOBAL TARGET :%d \n\n", glt ); 339 int size = 1 << MSBNumber+LSBNumber;340 int size = 1 << (MSBNumber+LSBNumber); 340 341 unsigned int *tab = new unsigned int[size]; 341 342 initLocalRoutingTable(tab,glt); … … 371 372 } 372 373 373 int RoutingTableSize = 1 << MSBNumber+LSBNumber;374 int RoutingTableSize = 1 << (MSBNumber+LSBNumber); 374 375 int PageSize = 1 << (32 - MSBNumber - LSBNumber); 375 376 … … 511 512 } 512 513 513 int RoutingTableSize = 1 << MSBNumber+LSBNumber;514 int RoutingTableSize = 1 << (MSBNumber+LSBNumber); 514 515 int PageSize = 1 << (32 - MSBNumber - LSBNumber ); 515 516
Note: See TracChangeset
for help on using the changeset viewer.