Changeset 43 for trunk/IPs/systemC/processor/Morpheo/Behavioural
- Timestamp:
- Jul 9, 2007, 11:04:26 AM (17 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural
- Files:
-
- 3 added
- 16 deleted
- 131 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_vhdl.cpp
r42 r43 19 19 { 20 20 log_printf(FUNC,Counter,"vhdl","Begin"); 21 21 22 Vhdl * vhdl = new Vhdl (_name); 22 23 23 vhdl->set_library_work (_name + "_Pack"); 24 _interfaces->set_port (vhdl); 25 _component ->vhdl_instance(vhdl); 24 26 25 vhdl_port (vhdl);26 27 vhdl_declaration (vhdl); 27 28 vhdl_body (vhdl); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/RegisterFile_Monolithic.h
r42 r43 114 114 #if VHDL 115 115 private : void vhdl (void); 116 private : void vhdl_port (Vhdl * & vhdl); 117 private : void vhdl_type (Vhdl * & vhdl); 118 private : void vhdl_signal (Vhdl * & vhdl); 116 private : void vhdl_declaration (Vhdl * & vhdl); 119 117 private : void vhdl_body (Vhdl * & vhdl); 120 118 #endif -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_vhdl.cpp
r41 r43 20 20 Vhdl * vhdl = new Vhdl (_name); 21 21 22 vhdl->set_library_work (_name + "_Pack"); 22 _interfaces->set_port (vhdl); 23 _component ->vhdl_instance(vhdl); 23 24 24 vhdl_port (vhdl); 25 vhdl_type (vhdl); 26 vhdl_signal (vhdl); 27 vhdl_body (vhdl); 25 vhdl_declaration (vhdl); 26 vhdl_body (vhdl); 28 27 29 28 vhdl->generate_file(); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/include/Select_Priority_Fixed.h
r42 r43 110 110 #if VHDL 111 111 public : void vhdl (void); 112 private : void vhdl_port (Vhdl * & vhdl);113 112 private : void vhdl_declaration (Vhdl * & vhdl); 114 113 private : void vhdl_body (Vhdl * & vhdl); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/src/Select_Priority_Fixed_vhdl.cpp
r40 r43 23 23 Vhdl * vhdl = new Vhdl (_name); 24 24 25 vhdl->set_library_work (_name + "_Pack"); 25 _interfaces->set_port (vhdl); 26 _component ->vhdl_instance(vhdl); 26 27 27 vhdl_port (vhdl);28 28 vhdl_declaration (vhdl); 29 29 vhdl_body (vhdl); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/include/Shifter.h
r42 r43 103 103 #if VHDL 104 104 public : void vhdl (void); 105 private : void vhdl_port (Vhdl * & vhdl);106 105 private : void vhdl_declaration (Vhdl * & vhdl); 107 106 private : void vhdl_body (Vhdl * & vhdl); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Shifter_vhdl.cpp
r42 r43 20 20 Vhdl * vhdl = new Vhdl (_name); 21 21 22 vhdl->set_library_work (_name + "_Pack"); 22 _interfaces->set_port (vhdl); 23 _component ->vhdl_instance(vhdl); 23 24 24 vhdl_port (vhdl);25 25 vhdl_declaration (vhdl); 26 26 vhdl_body (vhdl); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/include/Victim_Pseudo_LRU.h
r42 r43 240 240 #if VHDL 241 241 public : void vhdl (void); 242 private : void vhdl_port (Vhdl * & vhdl);243 242 private : void vhdl_declaration (Vhdl * & vhdl); 244 243 private : void vhdl_body (Vhdl * & vhdl); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Victim_Pseudo_LRU_vhdl.cpp
r42 r43 21 21 log_printf(FUNC,Victim_Pseudo_LRU,"vhdl","Begin"); 22 22 23 log_printf(TRACE,Victim_Pseudo_LRU,"vhdl","Construction of vhdl");24 23 Vhdl * vhdl = new Vhdl (_name); 25 24 26 log_printf(TRACE,Victim_Pseudo_LRU,"vhdl","Set library");27 vhdl->set_library_work (_name + "_Pack");25 _interfaces->set_port (vhdl); 26 _component ->vhdl_instance(vhdl); 28 27 29 log_printf(TRACE,Victim_Pseudo_LRU,"vhdl","Set port");30 vhdl_port (vhdl);31 log_printf(TRACE,Victim_Pseudo_LRU,"vhdl","Set declaration");32 28 vhdl_declaration (vhdl); 33 log_printf(TRACE,Victim_Pseudo_LRU,"vhdl","Set body");34 29 vhdl_body (vhdl); 35 log_printf(TRACE,Victim_Pseudo_LRU,"vhdl","Generate File"); 30 36 31 vhdl->generate_file(); 37 32 38 33 delete vhdl; 34 39 35 log_printf(FUNC,Victim_Pseudo_LRU,"vhdl","End"); 40 36 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Makefile.Selftest
r42 r43 15 15 16 16 #-----[ Variables ]---------------------------------------- 17 CFG_FILE = configuration.cfg17 CFG_FILE_EXTENSION = cfg 18 18 19 19 OBJECTS = $(OBJECTS_COMMON) … … 45 45 @$(ECHO) "Generate configuration" 46 46 @ \ 47 declare NAME; \48 declare -ai MIN ; \49 declare -ai MAX ; \50 declare -a STEP; \51 declare -a LINE; \52 47 declare -i CPT=0; \ 53 declare -ai PERIOD; \ 54 declare -a RANGE; \ 55 declare -a RANGE_LOCAL; \ 56 declare -a SIZE; \ 57 PERIOD[0]=1; \ 48 for file in $$($(LS) *.$(CFG_FILE_EXTENSION) ); do \ 58 49 \ 59 while $(READ) line; do \ 60 LINE=($$line); \ 50 declare NAME; \ 51 declare -ai MIN ; \ 52 declare -ai MAX ; \ 53 declare -a STEP; \ 54 declare -a LINE; \ 55 declare -ai PERIOD; \ 56 declare -a RANGE; \ 57 declare -a RANGE_LOCAL; \ 58 declare -a SIZE; \ 59 declare -i IT=0; \ 61 60 \ 62 if $(TEST) $$CPT -eq 0; then \ 63 NAME=$${LINE[0]}; \ 64 else \ 65 MIN[$$CPT]=$${LINE[0]}; \ 66 MAX[$$CPT]=$${LINE[1]}; \ 67 STEP[$$CPT]=$${LINE[2]}; \ 68 RANGE[$$CPT]=$$($(DIR_SCRIPT)/range.sh $${LINE[0]} $${LINE[1]} $${LINE[2]}); \ 69 RANGE_LOCAL=($${RANGE[$$CPT]}); \ 70 SIZE[$$CPT]=$${#RANGE_LOCAL[*]}; \ 71 PERIOD[$$CPT]=$$(($${PERIOD[$$(($$CPT-1))]}*$${SIZE[$$CPT]})); \ 72 fi; \ 61 PERIOD[0]=1; \ 73 62 \ 74 CPT=$$(($$CPT+1));\75 done < $(CFG_FILE);\63 while $(READ) line; do \ 64 LINE=($$line); \ 76 65 \ 77 declare -i x; \ 78 declare -a DATA; \ 79 declare -ai ENUM_CONFIG=($$($(DIR_SCRIPT)/range.sh 0 $$(($${PERIOD[$$(($$CPT-1))]}-1)))); \ 80 declare -ai ENUM_PARAM=($$($(DIR_SCRIPT)/range.sh 1 $${#MIN[*]})); \ 66 if $(TEST) $$IT -eq 0; then \ 67 NAME=$${LINE[0]}; \ 68 else \ 69 MIN[$$IT]=$${LINE[0]}; \ 70 MAX[$$IT]=$${LINE[1]}; \ 71 STEP[$$IT]=$${LINE[2]}; \ 72 RANGE[$$IT]=$$($(DIR_SCRIPT)/range.sh $${LINE[0]} $${LINE[1]} $${LINE[2]}); \ 73 RANGE_LOCAL=($${RANGE[$$IT]}); \ 74 SIZE[$$IT]=$${#RANGE_LOCAL[*]}; \ 75 PERIOD[$$IT]=$$(($${PERIOD[$$(($$IT-1))]}*$${SIZE[$$IT]})); \ 76 fi; \ 81 77 \ 82 $(ECHO) " * they are $${#MIN[*]} parameters";\83 $(ECHO) " * generate $${PERIOD[$$(($$CPT-1))]} configurations";\78 IT=$$(($$IT+1)); \ 79 done < $$file; \ 84 80 \ 85 for i in $${ENUM_CONFIG[*]}; do \ 86 x=$$i; \ 87 for j in $${ENUM_PARAM[*]}; do \ 88 RANGE_LOCAL=($${RANGE[$$j]}); \ 89 DATA[$$j]="$${RANGE_LOCAL[$$((($$x % $${SIZE[$$j]})))]} "; \ 90 x=$$(($$x/$${SIZE[$$j]})); \ 81 declare -i x; \ 82 declare -a DATA; \ 83 declare -ai ENUM_CONFIG=($$($(DIR_SCRIPT)/range.sh 0 $$(($${PERIOD[$$(($$IT-1))]}-1)))); \ 84 declare -ai ENUM_PARAM=($$($(DIR_SCRIPT)/range.sh 1 $${#MIN[*]})); \ 85 \ 86 $(ECHO) " * File : $$file"; \ 87 $(ECHO) " * They are $${#MIN[*]} parameters"; \ 88 $(ECHO) " * Generate $${PERIOD[$$(($$IT-1))]} configurations"; \ 89 \ 90 for i in $${ENUM_CONFIG[*]}; do \ 91 x=$$i; \ 92 for j in $${ENUM_PARAM[*]}; do \ 93 RANGE_LOCAL=($${RANGE[$$j]}); \ 94 DATA[$$j]="$${RANGE_LOCAL[$$((($$x % $${SIZE[$$j]})))]} "; \ 95 x=$$(($$x/$${SIZE[$$j]})); \ 96 done; \ 97 $(ECHO) $${DATA[*]} > "$(DIR_CFG_GEN)/$${NAME}_$$CPT.cfg"; \ 98 $(ECHO) " - {$$CPT} $${DATA[*]}"; \ 99 CPT=$$(($$CPT+1)); \ 91 100 done; \ 92 $(ECHO) $${DATA[*]} > "$(DIR_CFG_GEN)/$${NAME}_$${i}.cfg"; \93 $(ECHO) " - {$$i} $${DATA[*]}"; \94 101 done; 95 102 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Makefile.deps
r2 r43 8 8 # DIR_MORPHEO must be defined 9 9 10 #ifndef Behavioural 11 #include $(DIR_MORPHEO)/Behavioural/Makefile.deps 12 #endif 13 # 10 14 Behavioural = yes 11 15 12 16 #-----[ Library ]------------------------------------------ 13 Behavioural_LIBRARY = -lBehavioural 17 Behavioural_LIBRARY = -lBehavioural 18 19 # $(Common_LIBRARY) 14 20 15 21 Behavioural_DIR_LIBRARY = -L$(DIR_MORPHEO)/Behavioural/lib 22 23 # $(Common_DIR_LIBRARY) 16 24 17 25 #-----[ Rules ]-------------------------------------------- … … 19 27 Behavioural_library : 20 28 @$(MAKE) --directory=$(DIR_MORPHEO)/Behavioural --makefile=Makefile 29 30 # @$(MAKE) Common_library 21 31 22 32 Behavioural_library_clean : 23 33 @$(MAKE) --directory=$(DIR_MORPHEO)/Behavioural --makefile=Makefile clean 34 35 # @$(MAKE) Common_library_clean -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Makefile.flags
r42 r43 18 18 -DVHDL_TESTBENCH \ 19 19 -DVHDL_TESTBENCH_ASSERT \ 20 -DDEBUG=DEBUG_ NONE20 -DDEBUG=DEBUG_ALL 21 21 22 22 # -DCONFIGURATION \ -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Branch_History_Table/include/Branch_History_Table.h
r42 r43 119 119 #if VHDL 120 120 public : void vhdl (void); 121 private : void vhdl_port (Vhdl * & vhdl); 122 private : void vhdl_type (Vhdl * & vhdl); 123 private : void vhdl_signal (Vhdl * & vhdl); 121 private : void vhdl_declaration (Vhdl * & vhdl); 124 122 private : void vhdl_body (Vhdl * & vhdl); 125 123 #endif -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Branch_History_Table/src/Branch_History_Table_vhdl.cpp
r42 r43 23 23 Vhdl * vhdl = new Vhdl (_name); 24 24 25 vhdl->set_library_work (_name + "_Pack"); 26 vhdl->set_library_work (_name + "_RegisterFile_Pack"); 27 vhdl->set_library_work (_name + "_Shifter_Pack"); 25 _interfaces->set_port (vhdl); 26 _component ->vhdl_instance(vhdl); 28 27 29 vhdl_port (vhdl); 30 vhdl_type (vhdl); 31 vhdl_signal (vhdl); 32 vhdl_body (vhdl); 28 vhdl_declaration (vhdl); 29 vhdl_body (vhdl); 33 30 34 31 vhdl->generate_file(); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table/SelfTest/configuration.cfg
r42 r43 1 1 Pattern_History_Table 2 88 *2 # size_counter3 6464 *4 # nb_counter4 22 +1 # nb_prediction5 22 +1 # nb_branch_complete2 2 8 *2 # size_counter 3 2 64 *4 # nb_counter 4 1 2 +1 # nb_prediction 5 1 2 +1 # nb_branch_complete -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table/src/Pattern_History_Table_vhdl.cpp
r42 r43 22 22 { 23 23 log_printf(FUNC,Pattern_History_Table,"vhdl","Begin"); 24 24 25 Vhdl * vhdl = new Vhdl (_name); 25 26 26 _interfaces->set_port (vhdl);27 _component ->vhdl_instance(vhdl);27 _interfaces->set_port (vhdl); 28 _component ->vhdl_instance(vhdl); 28 29 29 30 vhdl_declaration (vhdl); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/SelfTest/config0.cfg
r5 r43 2 2 1 1 +1 # have_bht 3 3 8 8 +1 # bht_size_shifter 4 512 512 *2 # bht_nb_shifter4 32 32 *2 # bht_nb_shifter 5 5 1 1 +1 # have_pht 6 6 8 8 +1 # pht_size_counter 7 512 512 *2 # pht_nb_counter7 32 32 *2 # pht_nb_counter 8 8 2 2 +1 # pht_size_address_share 9 9 16 16 +1 # size_address -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/SelfTest/src/test.cpp
r15 r43 137 137 BRANCH_COMPLETE_VAL [i]->write(0); 138 138 139 _Two_Level_Branch_Predictor->vhdl_testbench_label("Initialisation");140 139 cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} Initialisation" << endl; 141 140 … … 157 156 uint32_t nb_reg_by_group = (1<<(param._pht_size_address-size_address_shift)); 158 157 159 _Two_Level_Branch_Predictor->vhdl_testbench_label("Init pht");160 158 cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} Init pht" << endl; 161 159 … … 186 184 BRANCH_COMPLETE_BHT_HISTORY [num_port_branch_complete]->write(0); 187 185 188 _Two_Level_Branch_Predictor->vhdl_testbench_label("Init bht");189 186 cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} Init bht" << endl; 190 187 … … 206 203 BRANCH_COMPLETE_ADDRESS [num_port_branch_complete]->write(address); 207 204 208 _Two_Level_Branch_Predictor->vhdl_testbench_label("Loop of Test");209 205 cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} Loop of Test" << endl 210 206 << " * predict_address : " << hex << address << dec << endl; … … 219 215 for (uint32_t iteration=0; iteration<NB_ITERATION; iteration ++) 220 216 { 221 _Two_Level_Branch_Predictor->vhdl_testbench_label("Iteration "+toString(iteration));222 223 217 cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} Predict : bht_history " << bht_history << " - pht_history " << pht_history[bht_history] << endl; 224 218 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Two_Level_Branch_Predictor_Glue.h
r42 r43 129 129 #if VHDL 130 130 public : void vhdl (void); 131 private : void vhdl_port (Vhdl * & vhdl);132 131 private : void vhdl_declaration (Vhdl * & vhdl); 133 132 private : void vhdl_body (Vhdl * & vhdl); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_vhdl.cpp
r42 r43 25 25 Vhdl * vhdl = new Vhdl (_name); 26 26 27 vhdl->set_library_work (_name + "_Pack"); 27 _interfaces->set_port (vhdl); 28 _component ->vhdl_instance(vhdl); 28 29 29 vhdl_port (vhdl);30 30 vhdl_declaration (vhdl); 31 31 vhdl_body (vhdl); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/include/Two_Level_Branch_Predictor.h
r42 r43 135 135 #if VHDL 136 136 public : void vhdl (void); 137 private : void vhdl_port (Vhdl * & vhdl);138 137 private : void vhdl_declaration (Vhdl * & vhdl); 139 138 private : void vhdl_body (Vhdl * & vhdl); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_allocation.cpp
r42 r43 89 89 for (uint32_t i=0; i<_param._nb_branch_complete; i++) 90 90 { 91 in_BRANCH_COMPLETE_VAL [i] = new interface->set_signal_valack_in ("val" , VAL); 92 out_BRANCH_COMPLETE_ACK [i] = new interface->set_signal_valack_out ("ack" , ACK); 93 in_BRANCH_COMPLETE_ADDRESS [i] = new interface->set_signal_in <Taddress_t > ("address" , _param._size_address); 91 Interface_fifo * interface = _interfaces->set_interface("branch_complete_"+toString(i) 92 #ifdef POSITION 93 , IN 94 , EAST 95 , "Interface branch complete" 96 #endif 97 ); 98 99 in_BRANCH_COMPLETE_VAL [i] = interface->set_signal_valack_in ("val" , VAL); 100 out_BRANCH_COMPLETE_ACK [i] = interface->set_signal_valack_out ("ack" , ACK); 101 in_BRANCH_COMPLETE_ADDRESS [i] = interface->set_signal_in <Taddress_t > ("address" , _param._size_address); 94 102 if (_param._have_bht) 95 in_BRANCH_COMPLETE_BHT_HISTORY [i] = newinterface->set_signal_in <Tbht_history_t> ("bht_history", _param._bht_size_shifter);103 in_BRANCH_COMPLETE_BHT_HISTORY [i] = interface->set_signal_in <Tbht_history_t> ("bht_history", _param._bht_size_shifter); 96 104 if (_param._have_pht) 97 in_BRANCH_COMPLETE_PHT_HISTORY [i] = newinterface->set_signal_in <Tpht_history_t> ("pht_history", _param._pht_size_counter);98 in_BRANCH_COMPLETE_DIRECTION [i] = newinterface->set_signal_in <Tcontrol_t > ("direction" , 1);105 in_BRANCH_COMPLETE_PHT_HISTORY [i] = interface->set_signal_in <Tpht_history_t> ("pht_history", _param._pht_size_counter); 106 in_BRANCH_COMPLETE_DIRECTION [i] = interface->set_signal_in <Tcontrol_t > ("direction" , 1); 99 107 } 100 108 … … 111 119 ,_param_statistics 112 120 #endif 113 ,*(_param._param_ counter));121 ,*(_param._param_branch_history_table)); 114 122 115 123 _component->set_component (component_Branch_History_Table->_component … … 132 140 ,_param_statistics 133 141 #endif 134 ,*(_param._param_ counter));142 ,*(_param._param_pattern_history_table)); 135 143 136 144 _component->set_component (component_Pattern_History_Table->_component … … 152 160 ,_param_statistics 153 161 #endif 154 ,*(_param._param_ counter));155 156 _component->set_component (component_ Pattern_History_Table->_component162 ,*(_param._param_two_level_branch_predictor_glue)); 163 164 _component->set_component (component_Two_Level_Branch_Predictor_Glue->_component 157 165 #ifdef POSITION 158 166 , 50 … … 164 172 165 173 // ~~~~~[ Component - Instanciation ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 166 174 167 175 // =====[ component_Branch_History_Table - Instanciation ]============ 168 176 if (_param._have_bht) 169 177 { 178 cout << "GEU 1" << endl; 170 179 #ifdef POSITION 171 180 _component->interface_map (_name+"_Branch_History_Table","", … … 205 214 if (_param._have_pht) 206 215 { 216 cout << "GEU 2" << endl; 207 217 #ifdef POSITION 208 218 _component->interface_map (_name+"_Pattern_History_Table","", … … 224 234 _component->port_map(_name+"_Pattern_History_Table","out_PREDICT_"+toString(i)+"_HISTORY", _name ,"out_PREDICT_"+toString(i)+"_PHT_HISTORY"); 225 235 } 226 236 227 237 for (uint32_t i=0; i<_param._nb_branch_complete; i++) 228 238 { … … 240 250 241 251 // =====[ component_Two_Level_Branch_Predictor_Glue - Instanciation ]= 252 cout << "GEU 3" << endl; 242 253 #ifdef POSITION 243 254 _component->interface_map (_name+"_Two_Level_Branch_Predictor_Glue","", … … 247 258 _component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "in_NRESET", _name,"in_NRESET"); 248 259 260 cout << "GEU 3.1" << endl; 249 261 for (uint32_t i=0; i<_param._nb_prediction; i++) 250 262 { 263 cout << "GEU 3.1.1" << endl; 251 264 if (_param._have_bht) 252 265 { 253 _component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "in_PREDICT_"+toString(i)+"_BHT_ACK" , _name+"_Branch_History_Table" , "out_PREDICT_"+toString(i)+"_BHT_ACK" ); 254 _component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "out_PREDICT_"+toString(i)+"_BHT_ADDRESS", _name+"_Branch_History_Table" , "in_PREDICT_"+toString(i)+"_BHT_ADDRESS"); 255 } 266 _component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "in_PREDICT_"+toString(i)+"_BHT_ACK" , _name+"_Branch_History_Table" , "out_PREDICT_"+toString(i)+"_ACK" ); 267 _component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "out_PREDICT_"+toString(i)+"_BHT_ADDRESS", _name+"_Branch_History_Table" , "in_PREDICT_"+toString(i)+"_ADDRESS"); 268 } 269 cout << "GEU 3.1.2" << endl; 256 270 if (_param._have_pht) 257 271 { 258 _component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "in_PREDICT_"+toString(i)+"_PHT_ACK" , _name+"_Pattern_History_Table", "out_PREDICT_"+toString(i)+"_PHT_ACK" ); 259 _component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "out_PREDICT_"+toString(i)+"_PHT_ADDRESS", _name+"_Pattern_History_Table", "in_PREDICT_"+toString(i)+"_PHT_ADDRESS"); 260 } 272 _component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "in_PREDICT_"+toString(i)+"_PHT_ACK" , _name+"_Pattern_History_Table", "out_PREDICT_"+toString(i)+"_ACK" ); 273 _component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "out_PREDICT_"+toString(i)+"_PHT_ADDRESS", _name+"_Pattern_History_Table", "in_PREDICT_"+toString(i)+"_ADDRESS"); 274 } 275 cout << "GEU 3.1.3" << endl; 261 276 if (_param._have_bht and _param._have_pht) 262 _component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "in_PREDICT_"+toString(i)+"_BHT_HISTORY" , _name , "in_PREDICT_"+toString(i)+"_BHT_HISTORY"); 277 _component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "in_PREDICT_"+toString(i)+"_BHT_HISTORY" , _name ,"out_PREDICT_"+toString(i)+"_BHT_HISTORY"); 278 cout << "GEU 3.1.4.1" << endl; 263 279 _component->port_map(_name+"_Two_Level_Branch_Predictor_Glue","out_PREDICT_"+toString(i)+"_ACK" , _name ,"out_PREDICT_"+toString(i)+"_ACK"); 264 280 _component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "in_PREDICT_"+toString(i)+"_ADDRESS" , _name , "in_PREDICT_"+toString(i)+"_ADDRESS"); 265 281 } 266 282 283 cout << "GEU 3.2" << endl; 267 284 for (uint32_t i=0; i<_param._nb_branch_complete; i++) 268 285 { 269 286 if (_param._have_bht) 270 287 { 271 _component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "in_BRANCH_COMPLETE_"+toString(i)+"_BHT_ACK" , _name+"_Branch_History_Table" , "out_BRANCH_COMPLETE_"+toString(i)+"_ BHT_ACK" );272 _component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "out_BRANCH_COMPLETE_"+toString(i)+"_BHT_ADDRESS", _name+"_Branch_History_Table" , "in_BRANCH_COMPLETE_"+toString(i)+"_ BHT_ADDRESS");288 _component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "in_BRANCH_COMPLETE_"+toString(i)+"_BHT_ACK" , _name+"_Branch_History_Table" , "out_BRANCH_COMPLETE_"+toString(i)+"_ACK" ); 289 _component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "out_BRANCH_COMPLETE_"+toString(i)+"_BHT_ADDRESS", _name+"_Branch_History_Table" , "in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS"); 273 290 } 274 291 if (_param._have_pht) 275 292 { 276 _component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "in_BRANCH_COMPLETE_"+toString(i)+"_PHT_ACK" , _name+"_Pattern_History_Table", "out_BRANCH_COMPLETE_"+toString(i)+"_ PHT_ACK" );277 _component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "out_BRANCH_COMPLETE_"+toString(i)+"_PHT_ADDRESS", _name+"_Pattern_History_Table", "in_BRANCH_COMPLETE_"+toString(i)+"_ PHT_ADDRESS");293 _component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "in_BRANCH_COMPLETE_"+toString(i)+"_PHT_ACK" , _name+"_Pattern_History_Table", "out_BRANCH_COMPLETE_"+toString(i)+"_ACK" ); 294 _component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "out_BRANCH_COMPLETE_"+toString(i)+"_PHT_ADDRESS", _name+"_Pattern_History_Table", "in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS"); 278 295 } 279 296 if (_param._have_bht and _param._have_pht) … … 282 299 _component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS" , _name , "in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS"); 283 300 } 284 301 cout << "GEU 4" << endl; 285 302 #ifdef POSITION 286 303 _component->generate_file(); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_vhdl.cpp
r42 r43 21 21 { 22 22 log_printf(FUNC,Two_Level_Branch_Predictor,"vhdl","Begin"); 23 23 24 Vhdl * vhdl = new Vhdl (_name); 24 25 25 vhdl->set_library_work (_name + "_Pack"); 26 if (_param._have_bht) 27 vhdl->set_library_work (_name + "_Branch_History_Table_Pack"); 28 if (_param._have_pht) 29 vhdl->set_library_work (_name + "_Pattern_History_Table_Pack"); 30 vhdl->set_library_work (_name + "_Two_Level_Branch_Predictor_Glue_Pack"); 31 32 vhdl_port (vhdl); 26 _interfaces->set_port (vhdl); 27 _component ->vhdl_instance(vhdl); 28 33 29 vhdl_declaration (vhdl); 34 30 vhdl_body (vhdl); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_vhdl_body.cpp
r42 r43 21 21 log_printf(FUNC,Two_Level_Branch_Predictor,"vhdl_body","Begin"); 22 22 23 list<string> list_port_map;23 // list<string> list_port_map; 24 24 25 if (_param._have_bht)26 {27 list_port_map.clear();25 // if (_param._have_bht) 26 // { 27 // list_port_map.clear(); 28 28 29 vhdl.set_body_component_port_map (list_port_map,"in_CLOCK ","in_CLOCK ");30 vhdl.set_body_component_port_map (list_port_map,"in_NRESET","in_NRESET");29 // vhdl.set_body_component_port_map (list_port_map,"in_CLOCK ","in_CLOCK "); 30 // vhdl.set_body_component_port_map (list_port_map,"in_NRESET","in_NRESET"); 31 31 32 for (uint32_t i=0; i<_param._nb_prediction; i++)33 {34 vhdl.set_body_component_port_map (list_port_map," in_PREDICT_VAL_"+toString(i)+" "," in_PREDICT_VAL_"+toString(i));35 vhdl.set_body_component_port_map (list_port_map,"out_PREDICT_ACK_"+toString(i)+" ","signal_PREDICT_BHT_ACK_"+toString(i));36 vhdl.set_body_component_port_map (list_port_map," in_PREDICT_ADDRESS_"+toString(i)+" ","signal_PREDICT_BHT_ADDRESS_"+toString(i));37 vhdl.set_body_component_port_map (list_port_map,"out_PREDICT_HISTORY_"+toString(i)+" ","signal_PREDICT_BHT_HISTORY_"+toString(i));38 }32 // for (uint32_t i=0; i<_param._nb_prediction; i++) 33 // { 34 // vhdl.set_body_component_port_map (list_port_map," in_PREDICT_VAL_"+toString(i)+" "," in_PREDICT_VAL_"+toString(i)); 35 // vhdl.set_body_component_port_map (list_port_map,"out_PREDICT_ACK_"+toString(i)+" ","signal_PREDICT_BHT_ACK_"+toString(i)); 36 // vhdl.set_body_component_port_map (list_port_map," in_PREDICT_ADDRESS_"+toString(i)+" ","signal_PREDICT_BHT_ADDRESS_"+toString(i)); 37 // vhdl.set_body_component_port_map (list_port_map,"out_PREDICT_HISTORY_"+toString(i)+" ","signal_PREDICT_BHT_HISTORY_"+toString(i)); 38 // } 39 39 40 for (uint32_t i=0; i<_param._nb_branch_complete; i++)41 {42 vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_VAL_"+toString(i)+" "," in_BRANCH_COMPLETE_VAL_"+toString(i));43 vhdl.set_body_component_port_map (list_port_map,"out_BRANCH_COMPLETE_ACK_"+toString(i)+" ","signal_BRANCH_COMPLETE_BHT_ACK_"+toString(i));44 vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_ADDRESS_"+toString(i)+" ","signal_BRANCH_COMPLETE_BHT_ADDRESS_"+toString(i));45 vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_HISTORY_"+toString(i)+" "," in_BRANCH_COMPLETE_BHT_HISTORY_"+toString(i));46 vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_DIRECTION_"+toString(i)+""," in_BRANCH_COMPLETE_DIRECTION_"+toString(i));47 }40 // for (uint32_t i=0; i<_param._nb_branch_complete; i++) 41 // { 42 // vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_VAL_"+toString(i)+" "," in_BRANCH_COMPLETE_VAL_"+toString(i)); 43 // vhdl.set_body_component_port_map (list_port_map,"out_BRANCH_COMPLETE_ACK_"+toString(i)+" ","signal_BRANCH_COMPLETE_BHT_ACK_"+toString(i)); 44 // vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_ADDRESS_"+toString(i)+" ","signal_BRANCH_COMPLETE_BHT_ADDRESS_"+toString(i)); 45 // vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_HISTORY_"+toString(i)+" "," in_BRANCH_COMPLETE_BHT_HISTORY_"+toString(i)); 46 // vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_DIRECTION_"+toString(i)+""," in_BRANCH_COMPLETE_DIRECTION_"+toString(i)); 47 // } 48 48 49 vhdl.set_body_component ("component_Branch_History_Table",_name+"_Branch_History_Table",list_port_map);50 }49 // vhdl.set_body_component ("component_Branch_History_Table",_name+"_Branch_History_Table",list_port_map); 50 // } 51 51 52 if (_param._have_pht)53 {54 list_port_map.clear();52 // if (_param._have_pht) 53 // { 54 // list_port_map.clear(); 55 55 56 vhdl.set_body_component_port_map (list_port_map,"in_CLOCK ","in_CLOCK ");57 vhdl.set_body_component_port_map (list_port_map,"in_NRESET","in_NRESET");56 // vhdl.set_body_component_port_map (list_port_map,"in_CLOCK ","in_CLOCK "); 57 // vhdl.set_body_component_port_map (list_port_map,"in_NRESET","in_NRESET"); 58 58 59 for (uint32_t i=0; i<_param._nb_prediction; i++)60 {61 vhdl.set_body_component_port_map (list_port_map," in_PREDICT_VAL_"+toString(i)+" "," in_PREDICT_VAL_"+toString(i));62 vhdl.set_body_component_port_map (list_port_map,"out_PREDICT_ACK_"+toString(i)+" ","signal_PREDICT_PHT_ACK_"+toString(i));63 vhdl.set_body_component_port_map (list_port_map," in_PREDICT_ADDRESS_"+toString(i)+" ","signal_PREDICT_PHT_ADDRESS_"+toString(i));64 vhdl.set_body_component_port_map (list_port_map,"out_PREDICT_HISTORY_"+toString(i)+" "," out_PREDICT_PHT_HISTORY_"+toString(i));65 }59 // for (uint32_t i=0; i<_param._nb_prediction; i++) 60 // { 61 // vhdl.set_body_component_port_map (list_port_map," in_PREDICT_VAL_"+toString(i)+" "," in_PREDICT_VAL_"+toString(i)); 62 // vhdl.set_body_component_port_map (list_port_map,"out_PREDICT_ACK_"+toString(i)+" ","signal_PREDICT_PHT_ACK_"+toString(i)); 63 // vhdl.set_body_component_port_map (list_port_map," in_PREDICT_ADDRESS_"+toString(i)+" ","signal_PREDICT_PHT_ADDRESS_"+toString(i)); 64 // vhdl.set_body_component_port_map (list_port_map,"out_PREDICT_HISTORY_"+toString(i)+" "," out_PREDICT_PHT_HISTORY_"+toString(i)); 65 // } 66 66 67 for (uint32_t i=0; i<_param._nb_branch_complete; i++)68 {69 vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_VAL_"+toString(i)+" "," in_BRANCH_COMPLETE_VAL_"+toString(i));70 vhdl.set_body_component_port_map (list_port_map,"out_BRANCH_COMPLETE_ACK_"+toString(i)+" ","signal_BRANCH_COMPLETE_PHT_ACK_"+toString(i));71 vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_ADDRESS_"+toString(i)+" ","signal_BRANCH_COMPLETE_PHT_ADDRESS_"+toString(i));72 vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_HISTORY_"+toString(i)+" "," in_BRANCH_COMPLETE_PHT_HISTORY_"+toString(i));73 vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_DIRECTION_"+toString(i)+""," in_BRANCH_COMPLETE_DIRECTION_"+toString(i));74 }67 // for (uint32_t i=0; i<_param._nb_branch_complete; i++) 68 // { 69 // vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_VAL_"+toString(i)+" "," in_BRANCH_COMPLETE_VAL_"+toString(i)); 70 // vhdl.set_body_component_port_map (list_port_map,"out_BRANCH_COMPLETE_ACK_"+toString(i)+" ","signal_BRANCH_COMPLETE_PHT_ACK_"+toString(i)); 71 // vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_ADDRESS_"+toString(i)+" ","signal_BRANCH_COMPLETE_PHT_ADDRESS_"+toString(i)); 72 // vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_HISTORY_"+toString(i)+" "," in_BRANCH_COMPLETE_PHT_HISTORY_"+toString(i)); 73 // vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_DIRECTION_"+toString(i)+""," in_BRANCH_COMPLETE_DIRECTION_"+toString(i)); 74 // } 75 75 76 vhdl.set_body_component ("component_Pattern_History_Table",_name+"_Pattern_History_Table",list_port_map);77 }76 // vhdl.set_body_component ("component_Pattern_History_Table",_name+"_Pattern_History_Table",list_port_map); 77 // } 78 78 79 list_port_map.clear();79 // list_port_map.clear(); 80 80 81 for (uint32_t i=0; i<_param._nb_prediction; i++)82 {83 if (_param._have_bht)84 {85 vhdl.set_body_component_port_map (list_port_map," in_PREDICT_BHT_ACK_"+toString(i)+" ","signal_PREDICT_BHT_ACK_"+toString(i));86 vhdl.set_body_component_port_map (list_port_map,"out_PREDICT_BHT_ADDRESS_"+toString(i)+" ","signal_PREDICT_BHT_ADDRESS_"+toString(i));87 }88 if (_param._have_pht)89 {90 vhdl.set_body_component_port_map (list_port_map," in_PREDICT_PHT_ACK_"+toString(i)+" ","signal_PREDICT_PHT_ACK_"+toString(i));91 vhdl.set_body_component_port_map (list_port_map,"out_PREDICT_PHT_ADDRESS_"+toString(i)+" ","signal_PREDICT_PHT_ADDRESS_"+toString(i));92 }93 if (_param._have_bht and _param._have_pht)94 {95 vhdl.set_body_component_port_map (list_port_map," in_PREDICT_BHT_HISTORY_"+toString(i)+" ","signal_PREDICT_BHT_HISTORY_"+toString(i));96 }97 vhdl.set_body_component_port_map (list_port_map,"out_PREDICT_ACK_"+toString(i)+" "," out_PREDICT_ACK_"+toString(i));98 vhdl.set_body_component_port_map (list_port_map," in_PREDICT_ADDRESS_"+toString(i)+" "," in_PREDICT_ADDRESS_"+toString(i));99 }81 // for (uint32_t i=0; i<_param._nb_prediction; i++) 82 // { 83 // if (_param._have_bht) 84 // { 85 // vhdl.set_body_component_port_map (list_port_map," in_PREDICT_BHT_ACK_"+toString(i)+" ","signal_PREDICT_BHT_ACK_"+toString(i)); 86 // vhdl.set_body_component_port_map (list_port_map,"out_PREDICT_BHT_ADDRESS_"+toString(i)+" ","signal_PREDICT_BHT_ADDRESS_"+toString(i)); 87 // } 88 // if (_param._have_pht) 89 // { 90 // vhdl.set_body_component_port_map (list_port_map," in_PREDICT_PHT_ACK_"+toString(i)+" ","signal_PREDICT_PHT_ACK_"+toString(i)); 91 // vhdl.set_body_component_port_map (list_port_map,"out_PREDICT_PHT_ADDRESS_"+toString(i)+" ","signal_PREDICT_PHT_ADDRESS_"+toString(i)); 92 // } 93 // if (_param._have_bht and _param._have_pht) 94 // { 95 // vhdl.set_body_component_port_map (list_port_map," in_PREDICT_BHT_HISTORY_"+toString(i)+" ","signal_PREDICT_BHT_HISTORY_"+toString(i)); 96 // } 97 // vhdl.set_body_component_port_map (list_port_map,"out_PREDICT_ACK_"+toString(i)+" "," out_PREDICT_ACK_"+toString(i)); 98 // vhdl.set_body_component_port_map (list_port_map," in_PREDICT_ADDRESS_"+toString(i)+" "," in_PREDICT_ADDRESS_"+toString(i)); 99 // } 100 100 101 for (uint32_t i=0; i<_param._nb_branch_complete; i++)102 {103 if (_param._have_bht)104 {105 vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_BHT_ACK_"+toString(i)+" ","signal_BRANCH_COMPLETE_BHT_ACK_"+toString(i));106 vhdl.set_body_component_port_map (list_port_map,"out_BRANCH_COMPLETE_BHT_ADDRESS_"+toString(i)+"","signal_BRANCH_COMPLETE_BHT_ADDRESS_"+toString(i));107 }108 if (_param._have_pht)109 {110 vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_PHT_ACK_"+toString(i)+" ","signal_BRANCH_COMPLETE_PHT_ACK_"+toString(i));111 vhdl.set_body_component_port_map (list_port_map,"out_BRANCH_COMPLETE_PHT_ADDRESS_"+toString(i)+"","signal_BRANCH_COMPLETE_PHT_ADDRESS_"+toString(i));112 }113 if (_param._have_bht and _param._have_pht)114 {115 vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_BHT_HISTORY_"+toString(i)+""," in_BRANCH_COMPLETE_BHT_HISTORY_"+toString(i));116 }117 vhdl.set_body_component_port_map (list_port_map,"out_BRANCH_COMPLETE_ACK_"+toString(i)+" "," out_BRANCH_COMPLETE_ACK_"+toString(i));118 vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_ADDRESS_"+toString(i)+" "," in_BRANCH_COMPLETE_ADDRESS_"+toString(i));119 }101 // for (uint32_t i=0; i<_param._nb_branch_complete; i++) 102 // { 103 // if (_param._have_bht) 104 // { 105 // vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_BHT_ACK_"+toString(i)+" ","signal_BRANCH_COMPLETE_BHT_ACK_"+toString(i)); 106 // vhdl.set_body_component_port_map (list_port_map,"out_BRANCH_COMPLETE_BHT_ADDRESS_"+toString(i)+"","signal_BRANCH_COMPLETE_BHT_ADDRESS_"+toString(i)); 107 // } 108 // if (_param._have_pht) 109 // { 110 // vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_PHT_ACK_"+toString(i)+" ","signal_BRANCH_COMPLETE_PHT_ACK_"+toString(i)); 111 // vhdl.set_body_component_port_map (list_port_map,"out_BRANCH_COMPLETE_PHT_ADDRESS_"+toString(i)+"","signal_BRANCH_COMPLETE_PHT_ADDRESS_"+toString(i)); 112 // } 113 // if (_param._have_bht and _param._have_pht) 114 // { 115 // vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_BHT_HISTORY_"+toString(i)+""," in_BRANCH_COMPLETE_BHT_HISTORY_"+toString(i)); 116 // } 117 // vhdl.set_body_component_port_map (list_port_map,"out_BRANCH_COMPLETE_ACK_"+toString(i)+" "," out_BRANCH_COMPLETE_ACK_"+toString(i)); 118 // vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_ADDRESS_"+toString(i)+" "," in_BRANCH_COMPLETE_ADDRESS_"+toString(i)); 119 // } 120 120 121 vhdl.set_body_component ("component_Two_Level_Branch_Predictor_Glue",_name+"_Two_Level_Branch_Predictor_Glue",list_port_map);121 // vhdl.set_body_component ("component_Two_Level_Branch_Predictor_Glue",_name+"_Two_Level_Branch_Predictor_Glue",list_port_map); 122 122 123 if (_param._have_bht)124 for (uint32_t i=0; i<_param._nb_prediction; i++)125 vhdl.set_body("out_PREDICT_BHT_HISTORY_"+toString(i)+" <= signal_PREDICT_BHT_HISTORY_"+toString(i)+";");123 // if (_param._have_bht) 124 // for (uint32_t i=0; i<_param._nb_prediction; i++) 125 // vhdl.set_body("out_PREDICT_BHT_HISTORY_"+toString(i)+" <= signal_PREDICT_BHT_HISTORY_"+toString(i)+";"); 126 126 127 127 log_printf(FUNC,Two_Level_Branch_Predictor,"vhdl_body","End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Parameters.h
r15 r43 16 16 #include "Include/ErrorMorpheo.h" 17 17 #include "Include/ToString.h" 18 #include "Include/Debug.h" 18 19 19 20 using namespace morpheo::behavioural::constant; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/XML.h
r31 r43 14 14 #include <list> 15 15 #include "Include/ToString.h" 16 #include "Include/Debug.h" 16 17 17 18 using namespace std; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component.cpp
r42 r43 13 13 Component::Component (void) 14 14 { 15 log_printf(FUNC,Behavioural,"Component ","Begin");15 log_printf(FUNC,Behavioural,"Component::Component","Begin"); 16 16 _list_component = new list<Entity *>; 17 log_printf(FUNC,Behavioural,"Component ","End");17 log_printf(FUNC,Behavioural,"Component::Component","End"); 18 18 }; 19 19 20 20 Component::Component (const Component & component) 21 21 { 22 log_printf(FUNC,Behavioural,"Component (copy)","Begin");22 log_printf(FUNC,Behavioural,"Component::Component (copy)","Begin"); 23 23 _entity = component._entity ; 24 24 _list_component = component._list_component; 25 log_printf(FUNC,Behavioural,"Component (copy)","End");25 log_printf(FUNC,Behavioural,"Component::Component (copy)","End"); 26 26 }; 27 27 28 28 Component::~Component () 29 29 { 30 log_printf(FUNC,Behavioural," ~Component","Begin");30 log_printf(FUNC,Behavioural,"Component::~Component","Begin"); 31 31 delete _entity; 32 32 delete _list_component; 33 log_printf(FUNC,Behavioural," ~Component","End");33 log_printf(FUNC,Behavioural,"Component::~Component","End"); 34 34 }; 35 35 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_find_entity.cpp
r42 r43 13 13 Entity * Component::find_entity (string name) 14 14 { 15 log_printf(FUNC,Behavioural,"Component::find_entity", "Begin"); 16 17 Entity * _return = NULL; 15 18 16 19 if (_entity->get_name() == name) 17 return_entity;20 _return = _entity; 18 21 else 19 22 if (_list_component->empty()== false) … … 25 28 if ((*i)->get_name() == name) 26 29 { 27 return*i;30 _return = *i; 28 31 break; 29 32 } … … 32 35 } 33 36 34 return NULL; 37 log_printf(FUNC,Behavioural,"Component::find_entity", "End"); 38 39 return _return; 35 40 }; 36 41 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_generate_file.cpp
r42 r43 14 14 void Component::generate_file (void) 15 15 { 16 log_printf(FUNC,Behavioural,"Component::generate_file","Begin"); 17 16 18 try 17 19 { … … 27 29 throw (ErrorMorpheo ("Component \""+_entity->get_name()+"\" have a bad mapping : "+e.what())); 28 30 } 31 32 log_printf(FUNC,Behavioural,"Component::generate_file","End"); 29 33 }; 30 34 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_get_component.cpp
r42 r43 11 11 namespace behavioural { 12 12 13 #undef FUNCTION 14 #define FUNCTION "Component::get_component" 15 13 16 string Component::get_component (void) 14 17 { 18 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 19 15 20 uint32_t depth = 0; 16 21 string separator = "\n"; … … 43 48 } 44 49 50 log_printf(FUNC,Behavioural,FUNCTION,"End"); 51 45 52 return text.str(); 46 53 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_get_entity.cpp
r42 r43 11 11 namespace behavioural { 12 12 13 #undef FUNCTION 14 #define FUNCTION "Component::get_entity" 13 15 string Component::get_entity (void) 14 16 { 17 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 18 15 19 ostringstream text; 16 20 text << *(_entity); 21 22 log_printf(FUNC,Behavioural,FUNCTION,"End"); 23 17 24 return text.str(); 18 25 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_interface_map.cpp
r42 r43 12 12 namespace behavioural { 13 13 14 #undef FUNCTION 15 #define FUNCTION "Component::interface_map" 14 16 void Component::interface_map (string component_src , 15 17 string port_src , … … 17 19 string port_dest ) 18 20 { 21 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 22 19 23 // First entity 20 24 Entity * entity_dest = find_entity(component_dest); … … 53 57 interface_src->interface_map(static_cast<void *>(entity_dest ), 54 58 static_cast<void *>(interface_dest)); 55 59 60 log_printf(FUNC,Behavioural,FUNCTION,"End"); 56 61 }; 57 62 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_port_map.cpp
r42 r43 11 11 namespace behavioural { 12 12 13 #undef FUNCTION 14 #define FUNCTION "Component::port_map" 13 15 void Component::port_map (string component_src , 14 16 string port_src , … … 16 18 string port_dest ) 17 19 { 20 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 21 18 22 string name_entity = _entity->get_name(); 19 23 … … 22 26 23 27 if (entity_dest == NULL) 24 throw (ErrorMorpheo (" Component \""+name_entity+"\", port map with unknow component \""+component_dest+"\"."));28 throw (ErrorMorpheo ("<Component::port_map> in component \""+name_entity+"\", port map with unknow component \""+component_dest+"\".")); 25 29 26 30 Signal * signal_dest = entity_dest->find_signal (port_dest); 27 31 28 32 if (signal_dest == NULL) 29 throw (ErrorMorpheo (" Component \""+name_entity+"\", port map with component \""+component_dest+"\" and a unknow signal \""+port_dest+"\"."));33 throw (ErrorMorpheo ("<Component::port_map> in component \""+name_entity+"\", port map with component \""+component_dest+"\" and a unknow signal \""+port_dest+"\".")); 30 34 31 35 // Second entity … … 33 37 34 38 if (entity_src == NULL) 35 throw (ErrorMorpheo (" Component \""+name_entity+"\", port map with unknow component \""+component_src+"\"."));39 throw (ErrorMorpheo ("<Component::port_map> in component \""+name_entity+"\", port map with unknow component \""+component_src+"\".")); 36 40 37 41 Signal * signal_src = entity_src->find_signal (port_src); 38 42 39 43 if (signal_src == NULL) 40 throw (ErrorMorpheo (" Component \""+name_entity+"\", port map with component \""+component_src+"\" and a unknow signal \""+port_src+"\"."));44 throw (ErrorMorpheo ("<Component::port_map> in component \""+name_entity+"\", port map with component \""+component_src+"\" and a unknow signal \""+port_src+"\".")); 41 45 42 46 // If all is ok, mapping 47 48 //cout << " - " << entity_src->get_name() << "("<< signal_src->get_name() << ")" << "\t-> " << entity_dest->get_name() << "(" << signal_dest->get_name() << ")" << endl; 49 43 50 signal_src ->link (signal_dest); 44 signal_dest->mapping(signal_src ); 51 //signal_dest->mapping(signal_src ); 52 53 log_printf(FUNC,Behavioural,FUNCTION,"End"); 45 54 }; 46 55 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_print.cpp
r42 r43 12 12 namespace behavioural { 13 13 14 #undef FUNCTION 15 #define FUNCTION "Component::operator<<" 14 16 ostream& operator<< (ostream& output_stream, 15 17 morpheo::behavioural::Component & x) 16 18 { 19 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 20 17 21 output_stream << x.get_entity () << endl; 18 22 output_stream << x.get_component () << endl; 23 24 log_printf(FUNC,Behavioural,FUNCTION,"End"); 25 19 26 return output_stream; 20 27 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_set_component.cpp
r42 r43 11 11 namespace behavioural { 12 12 13 #undef FUNCTION 14 #define FUNCTION "Component::set_component" 13 15 void Component::set_component (Component * component 14 16 #ifdef POSITION … … 20 22 ) 21 23 { 24 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 25 22 26 Entity * entity = component->_entity; 23 27 … … 27 31 entity->mapping( pos_x, pos_y, size_x, size_y); 28 32 #endif 33 34 log_printf(FUNC,Behavioural,FUNCTION,"End"); 29 35 }; 30 36 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_set_entity.cpp
r42 r43 11 11 namespace behavioural { 12 12 13 #undef FUNCTION 14 #define FUNCTION "Component::set_entity" 13 15 Entity * Component::set_entity (string name 14 16 ,string type … … 18 20 ) 19 21 { 22 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 23 20 24 Entity * entity = new Entity (name 21 25 ,type … … 26 30 _entity = entity; 27 31 32 log_printf(FUNC,Behavioural,FUNCTION,"End"); 33 28 34 return entity; 29 35 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_toXML.cpp
r42 r43 12 12 namespace behavioural { 13 13 14 #undef FUNCTION 15 #define FUNCTION "Component::toXML" 16 14 17 XML Component::toXML (void) 15 18 { 19 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 20 16 21 XML xml (_entity->get_name()); 17 22 … … 33 38 xml. balise_close (); 34 39 xml.balise_close (); 35 40 41 log_printf(FUNC,Behavioural,FUNCTION,"End"); 42 36 43 return xml; 37 44 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_vhdl_instance.cpp
r42 r43 12 12 namespace behavioural { 13 13 14 #undef FUNCTION 15 #define FUNCTION "Component::vhdl_instance" 14 16 void Component::vhdl_instance (Vhdl * & vhdl) 15 17 { 18 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 19 16 20 uint32_t cpt = 0; 17 21 map<Signal *,string> tab; … … 85 89 } 86 90 } 91 log_printf(FUNC,Behavioural,FUNCTION,"End"); 87 92 }; 88 93 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Configuration_Parameters.cpp
r3 r43 12 12 namespace behavioural { 13 13 14 #undef FUNCTION 15 #define FUNCTION "Configuration_Parameters::Configuration_Parameters" 14 16 Configuration_Parameters::Configuration_Parameters (string name , 15 17 uint32_t value , … … 29 31 _comment (comment ) 30 32 { 33 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 31 34 if ((value<min) or (value>max)) 32 35 throw (ErrorMorpheo ("Parameters \""+name+"\" is out of bound : "+toString(value)+" not include in ["+toString(min)+":"+toString(max)+"]")); 36 log_printf(FUNC,Behavioural,FUNCTION,"End"); 33 37 }; 34 38 39 40 #undef FUNCTION 41 #define FUNCTION "Configuration_Parameters::~Configuration_Parameters" 35 42 Configuration_Parameters::~Configuration_Parameters () 36 43 { 44 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 45 log_printf(FUNC,Behavioural,FUNCTION,"End"); 37 46 }; 38 47 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Configuration_Parameters_print.cpp
r3 r43 13 13 namespace behavioural { 14 14 15 #undef FUNCTION 16 #define FUNCTION "Configuration_Parameters::print" 15 17 string Configuration_Parameters::print (uint32_t depth) 16 18 { 19 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 17 20 XML * xml = new XML (_name); 18 21 … … 29 32 xml->balise_close(); 30 33 34 log_printf(FUNC,Behavioural,FUNCTION,"End"); 31 35 return xml->get_body(depth); 32 36 }; 33 37 38 #undef FUNCTION 39 #define FUNCTION "Configuration_Parameters::operator<<" 34 40 ostream& operator<< (ostream& output_stream, 35 41 morpheo::behavioural::Configuration_Parameters & x) 36 42 { 43 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 37 44 output_stream << x.print(0); 38 45 log_printf(FUNC,Behavioural,FUNCTION,"End"); 39 46 return output_stream; 40 47 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_find_interface.cpp
r42 r43 11 11 namespace behavioural { 12 12 13 #undef FUNCTION 14 #define FUNCTION "Entity::find_interface" 13 15 Interface * Entity::find_interface (string name) 14 16 { 15 return _interfaces->find_interface(name); 17 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 18 19 Interface* _return = _interfaces->find_interface(name); 20 21 log_printf(FUNC,Behavioural,FUNCTION,"End"); 22 23 return _return; 16 24 }; 17 25 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_find_signal.cpp
r42 r43 11 11 namespace behavioural { 12 12 13 #undef FUNCTION 14 #define FUNCTION "Entity::find_signal" 13 15 Signal * Entity::find_signal (string name) 14 16 { 15 return _interfaces->find_signal(name); 17 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 18 19 Signal * _return = _interfaces->find_signal(name); 20 21 log_printf(FUNC,Behavioural,FUNCTION,"End"); 22 23 return _return; 16 24 }; 17 25 26 #undef FUNCTION 27 #define FUNCTION "Entity::find_signal" 18 28 bool Entity::find_signal (Signal * signal) 19 29 { 20 return _interfaces->find_signal(signal); 30 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 31 32 bool _return = _interfaces->find_signal(signal); 33 34 log_printf(FUNC,Behavioural,FUNCTION,"End"); 35 36 return _return; 21 37 }; 22 38 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_get_comment.cpp
r31 r43 13 13 namespace behavioural { 14 14 15 #undef FUNCTION 16 #define FUNCTION "Entity::get_comment" 15 17 string Entity::get_comment (void) 16 18 { 17 return _comment; 19 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 20 string _return = _comment; 21 log_printf(FUNC,Behavioural,FUNCTION,"End"); 22 return _return; 18 23 }; 19 24 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_get_interfaces.cpp
r42 r43 12 12 namespace behavioural { 13 13 14 #undef FUNCTION 15 #define FUNCTION "Entity::get_interfaces" 14 16 string Entity::get_interfaces (void) 15 17 { 18 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 16 19 ostringstream text; 17 20 text << *(_interfaces); 21 log_printf(FUNC,Behavioural,FUNCTION,"End"); 18 22 return text.str(); 19 23 }; 20 24 25 #undef FUNCTION 26 #define FUNCTION "Entity::get_interfaces_list" 21 27 Interfaces * Entity::get_interfaces_list (void) 22 28 { 23 return _interfaces; 29 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 30 Interfaces * _return = _interfaces; 31 log_printf(FUNC,Behavioural,FUNCTION,"End"); 32 return _return; 24 33 }; 25 34 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_get_name.cpp
r42 r43 12 12 namespace behavioural { 13 13 14 #undef FUNCTION 15 #define FUNCTION "Entity::get_name" 14 16 string Entity::get_name (void) 15 17 { 16 return _name; 18 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 19 string _return = _name; 20 log_printf(FUNC,Behavioural,FUNCTION,"End"); 21 return _return; 17 22 }; 18 23 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_get_type.cpp
r42 r43 12 12 namespace behavioural { 13 13 14 #undef FUNCTION 15 #define FUNCTION "Entity::get_type" 14 16 string Entity::get_type (void) 15 17 { 16 return _type; 18 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 19 string _return = _type; 20 log_printf(FUNC,Behavioural,FUNCTION,"End"); 21 22 return _return; 17 23 }; 18 24 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_mapping.cpp
r42 r43 13 13 namespace behavioural { 14 14 15 #undef FUNCTION 16 #define FUNCTION "Entity::mapping" 15 17 void Entity::mapping (uint32_t pos_x, 16 18 uint32_t pos_y, … … 18 20 uint32_t size_y ) 19 21 { 22 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 23 20 24 if (_is_map != false) 21 25 throw (ErrorMorpheo ("Entity \""+_name+"\" is already mapped")); … … 27 31 _map_pos_x = pos_x ; 28 32 _map_pos_y = pos_y ; 33 34 log_printf(FUNC,Behavioural,FUNCTION,"End"); 29 35 }; 30 36 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_print.cpp
r42 r43 12 12 namespace behavioural { 13 13 14 #undef FUNCTION 15 #define FUNCTION "Entity::operator<<" 14 16 ostream& operator<< (ostream& output_stream, 15 17 morpheo::behavioural::Entity & x) 16 18 { 19 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 20 17 21 #ifdef POSITION 18 22 output_stream << x._name + "\t"+x._type+"\t"+toString(x._schema) << endl; … … 22 26 #endif 23 27 output_stream << x.get_interfaces() << endl; 28 29 log_printf(FUNC,Behavioural,FUNCTION,"End"); 24 30 return output_stream; 25 31 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_set_comment.cpp
r31 r43 13 13 namespace behavioural { 14 14 15 #undef FUNCTION 16 #define FUNCTION "Entity::set_comment" 15 17 void Entity::set_comment (string comment) 16 18 { 19 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 17 20 _comment = _comment + comment; 21 log_printf(FUNC,Behavioural,FUNCTION,"End"); 18 22 }; 19 23 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_set_interfaces.cpp
r42 r43 11 11 namespace behavioural { 12 12 13 #undef FUNCTION 14 #define FUNCTION "Entity::set_interfaces" 13 15 Interfaces * Entity::set_interfaces (void) 14 16 { 15 return _interfaces; 17 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 18 Interfaces * _return = _interfaces; 19 log_printf(FUNC,Behavioural,FUNCTION,"End"); 20 return _return; 16 21 }; 17 22 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_toXML.cpp
r31 r43 12 12 namespace behavioural { 13 13 14 #undef FUNCTION 15 #define FUNCTION "Entity::toXML" 14 16 XML Entity::toXML (void) 15 17 { 18 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 19 16 20 XML xml (_name); 17 21 … … 27 31 xml. balise_close (); 28 32 33 log_printf(FUNC,Behavioural,FUNCTION,"End"); 34 29 35 return xml; 30 36 }; 31 37 38 #undef FUNCTION 39 #define FUNCTION "Entity::toXML_mapping" 32 40 XML Entity::toXML_mapping (void) 33 41 { 42 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 43 34 44 if (_is_map != true) 35 45 throw (ErrorMorpheo ("Entity \""+_name+"\" is never mapped")); … … 56 66 xml. balise_close (); 57 67 68 log_printf(FUNC,Behavioural,FUNCTION,"End"); 69 58 70 return xml; 59 71 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_fifo_get_cycle.cpp
r42 r43 13 13 namespace behavioural { 14 14 15 #undef FUNCTION 16 #define FUNCTION "Interface_fifo::get_cycle" 15 17 uint32_t Interface_fifo::get_cycle (void) 16 18 { 19 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 20 21 uint32_t _return; 22 17 23 if (_test_exhaustive == true) 18 return Interface::get_cycle(); 24 _return = Interface::get_cycle(); 25 else 26 if (_list_cycle->empty() == true) 27 _return = 0; 28 else 29 _return = _list_cycle->back(); 19 30 20 if (_list_cycle->empty() == true) 21 return 0; 22 else 23 return _list_cycle->back(); 31 log_printf(FUNC,Behavioural,FUNCTION,"End"); 32 33 return _return; 24 34 }; 25 35 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_get_clock.cpp
r42 r43 13 13 namespace behavioural { 14 14 15 #undef FUNCTION 16 #define FUNCTION "Interface::" 15 17 Signal * Interface::get_clock (void) 16 18 { 19 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 20 17 21 Signal * clock = NULL; 18 22 … … 35 39 } 36 40 41 log_printf(FUNC,Behavioural,FUNCTION,"End"); 37 42 return clock; 38 43 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_get_cycle.cpp
r41 r43 13 13 namespace behavioural { 14 14 15 #undef FUNCTION 16 #define FUNCTION "Interface::get_cycle" 15 17 uint32_t Interface::get_cycle (void) 16 18 { 17 return _nb_cycle; 19 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 20 uint32_t _return = _nb_cycle; 21 log_printf(FUNC,Behavioural,FUNCTION,"End"); 22 return _return; 18 23 }; 19 24 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_get_reset.cpp
r42 r43 13 13 namespace behavioural { 14 14 15 #undef FUNCTION 16 #define FUNCTION "Interface::get_reset" 15 17 Signal * Interface::get_reset (void) 16 18 { 19 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 20 17 21 Signal * reset = NULL; 18 22 … … 35 39 } 36 40 41 log_printf(FUNC,Behavioural,FUNCTION,"End"); 42 37 43 return reset; 38 44 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_get_signal.cpp
r42 r43 53 53 #ifdef VHDL 54 54 # ifdef VHDL_TESTBENCH 55 56 #undef FUNCTION 57 #define FUNCTION "Interface::get_signal" 55 58 void Interface::get_signal (list<string> * & list_signal) 56 59 { 60 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 61 57 62 if (not _list_signal->empty()) 58 63 { … … 65 70 } 66 71 } 72 73 log_printf(FUNC,Behavioural,FUNCTION,"End"); 67 74 }; 68 75 # endif 69 76 #endif 70 77 78 #undef FUNCTION 79 #define FUNCTION "Interface::get_signal_list" 71 80 list<Signal *> * Interface::get_signal_list (void) 72 81 { 73 return _list_signal; 82 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 83 list<Signal *> * _return = _list_signal; 84 log_printf(FUNC,Behavioural,FUNCTION,"End"); 85 86 return _return; 74 87 } 75 88 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_set_signal.cpp
r42 r43 31 31 #ifdef VHDL 32 32 # ifdef VHDL_TESTBENCH 33 34 #undef FUNCTION 35 #define FUNCTION "Interface::set_signal" 33 36 void Interface::set_signal (Vhdl * & vhdl) 34 37 { 38 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 35 39 if (not _list_signal->empty()) 36 40 { … … 43 47 } 44 48 } 49 log_printf(FUNC,Behavioural,FUNCTION,"End"); 45 50 }; 46 51 # endif -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_find_interface.cpp
r42 r43 11 11 namespace behavioural { 12 12 13 #undef FUNCTION 14 #define FUNCTION "Interfaces::find_interface" 13 15 Interface_fifo * Interfaces::find_interface (string name) 14 16 { 17 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 18 19 Interface_fifo * _return = NULL; 15 20 if (_list_interface->empty()== false) 16 21 { … … 20 25 { 21 26 if ((*i)->get_name() == name) 22 return (*i); 27 { 28 _return = (*i); 29 break; 30 } 23 31 ++i; 24 32 } 25 33 } 26 27 return NULL; 34 35 log_printf(FUNC,Behavioural,FUNCTION,"End"); 36 37 return _return; 28 38 }; 29 39 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_find_signal.cpp
r42 r43 11 11 namespace behavioural { 12 12 13 #undef FUNCTION 14 #define FUNCTION "Interfaces::find_signal" 13 15 Signal * Interfaces::find_signal (string name) 14 16 { 17 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 18 19 Signal * _return = NULL; 15 20 if (_list_interface->empty()== false) 16 21 { … … 23 28 // Warning : Name of signal is uniq 24 29 if (signal != NULL) 25 return signal; 30 { 31 _return = signal; 32 break; 33 } 26 34 27 35 ++i; … … 29 37 } 30 38 31 return NULL; 39 log_printf(FUNC,Behavioural,FUNCTION,"End"); 40 return _return; 32 41 }; 33 42 43 #undef FUNCTION 44 #define FUNCTION "Interfaces::find_signal" 34 45 bool Interfaces::find_signal (Signal * signal) 35 46 { 47 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 48 49 bool _return = false; 50 36 51 if (_list_interface->empty()== false) 37 52 { … … 41 56 { 42 57 if ((*i)->find_signal(signal) == true) 43 return true; 58 { 59 _return = true; 60 break; 61 } 44 62 45 63 ++i; 46 64 } 47 65 } 48 49 return false; 66 67 log_printf(FUNC,Behavioural,FUNCTION,"End"); 68 return _return; 50 69 }; 51 70 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_get_clock.cpp
r42 r43 13 13 namespace behavioural { 14 14 15 #undef FUNCTION 16 #define FUNCTION "Interfaces::get_clock" 15 17 Signal * Interfaces::get_clock (void) 16 18 { 19 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 20 17 21 Signal * clock = NULL; 18 22 … … 37 41 if (clock == NULL) 38 42 throw ErrorMorpheo ("<Interfaces.get_clock> : no clock find."); 39 43 44 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 40 45 return clock; 41 46 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_get_cycle.cpp
r41 r43 13 13 namespace behavioural { 14 14 15 #undef FUNCTION 16 #define FUNCTION "Interfaces::get_cycle" 15 17 uint32_t Interfaces::get_cycle (void) 16 18 { 19 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 17 20 uint32_t cycle = 0; 18 21 … … 31 34 } 32 35 } 33 36 log_printf(FUNC,Behavioural,FUNCTION,"End"); 37 34 38 return cycle; 35 39 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_get_interface.cpp
r42 r43 12 12 namespace behavioural { 13 13 14 #undef FUNCTION 15 #define FUNCTION "Interfaces::get_interface" 14 16 string Interfaces::get_interface (void) 15 17 { 18 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 19 16 20 uint32_t depth = 0; 17 21 string separator = "\n"; … … 44 48 } 45 49 50 log_printf(FUNC,Behavioural,FUNCTION,"End"); 51 46 52 return text.str(); 47 53 }; 48 54 55 #undef FUNCTION 56 #define FUNCTION "Interfaces::get_interface_list" 49 57 list<Interface_fifo*>* Interfaces::get_interface_list (void) 50 58 { 51 return _list_interface; 59 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 60 list<Interface_fifo*>* _return = _list_interface; 61 log_printf(FUNC,Behavioural,FUNCTION,"End"); 62 63 return _return; 52 64 }; 53 65 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_get_reset.cpp
r42 r43 13 13 namespace behavioural { 14 14 15 #undef FUNCTION 16 #define FUNCTION "Interfaces::get_reset" 15 17 Signal * Interfaces::get_reset (void) 16 18 { 19 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 20 17 21 Signal * reset = NULL; 18 22 … … 38 42 throw ErrorMorpheo ("<Interfaces.get_reset> : no reset find."); 39 43 44 log_printf(FUNC,Behavioural,FUNCTION,"End"); 45 40 46 return reset; 41 47 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_get_signal.cpp
r41 r43 14 14 #ifdef VHDL 15 15 # ifdef VHDL_TESTBENCH 16 17 #undef FUNCTION 18 #define FUNCTION "Interfaces::get_signal" 16 19 void Interfaces::get_signal (list<string> * & list_signal) 17 20 { 21 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 22 18 23 if (not _list_interface->empty()) 19 24 { … … 26 31 } 27 32 } 33 log_printf(FUNC,Behavioural,FUNCTION,"End"); 28 34 }; 29 35 # endif -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_print.cpp
r31 r43 12 12 namespace behavioural { 13 13 14 15 #undef FUNCTION 16 #define FUNCTION "Interfaces::operator<<" 14 17 ostream& operator<< (ostream& output_stream , 15 18 morpheo::behavioural::Interfaces & x) 16 19 { 20 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 17 21 output_stream << x.get_interface () << endl; 22 log_printf(FUNC,Behavioural,FUNCTION,"End"); 18 23 return output_stream; 19 24 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_set_interface.cpp
r42 r43 11 11 namespace behavioural { 12 12 13 #undef FUNCTION 14 #define FUNCTION "Interfaces::set_interface" 13 15 Interface_fifo * Interfaces::set_interface (string name 14 16 #ifdef POSITION … … 18 20 ) 19 21 { 22 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 23 20 24 Interface_fifo * interface = new Interface_fifo (name 21 25 #ifdef POSITION … … 27 31 _list_interface->push_back (interface); 28 32 33 log_printf(FUNC,Behavioural,FUNCTION,"End"); 29 34 return interface; 30 35 }; 31 36 32 37 #ifdef POSITION 38 #undef FUNCTION 39 #define FUNCTION "Interfaces::set_interface" 33 40 Interface_fifo * Interfaces::set_interface (string name , 34 direction_t direction ,35 localisation_t localisation,36 string comment )41 direction_t direction , 42 localisation_t localisation, 43 string comment ) 37 44 { 45 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 38 46 Interface_fifo * interface = set_interface(name, direction, localisation); 39 47 40 48 interface->set_comment (comment); 41 49 50 log_printf(FUNC,Behavioural,FUNCTION,"End"); 42 51 return interface; 43 52 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_set_port.cpp
r41 r43 13 13 14 14 #ifdef VHDL 15 #undef FUNCTION 16 #define FUNCTION "Interfaces::set_port" 15 17 void Interfaces::set_port (Vhdl * & vhdl) 16 18 { 19 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 17 20 if (not _list_interface->empty()) 18 21 { … … 25 28 } 26 29 } 30 log_printf(FUNC,Behavioural,FUNCTION,"End"); 27 31 }; 28 32 #endif -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_set_signal.cpp
r41 r43 14 14 #ifdef VHDL 15 15 # ifdef VHDL_TESTBENCH 16 #undef FUNCTION 17 #define FUNCTION "Interfaces::set_signal" 16 18 void Interfaces::set_signal (Vhdl * & vhdl) 17 19 { 20 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 18 21 if (not _list_interface->empty()) 19 22 { … … 26 29 } 27 30 } 31 log_printf(FUNC,Behavioural,FUNCTION,"End"); 28 32 }; 29 33 # endif -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_toXML.cpp
r42 r43 12 12 namespace behavioural { 13 13 14 #undef FUNCTION 15 #define FUNCTION "Interfaces::toXML" 14 16 XML Interfaces::toXML (void) 15 17 { 18 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 19 16 20 XML xml ("interfaces"); 17 21 … … 26 30 } 27 31 } 28 32 33 log_printf(FUNC,Behavioural,FUNCTION,"End"); 29 34 return xml; 30 35 }; 31 36 37 #undef FUNCTION 38 #define FUNCTION "Interfaces::toXML_mapping" 32 39 XML Interfaces::toXML_mapping (void) 33 40 { 41 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 42 34 43 XML xml ("interfaces"); 35 44 … … 44 53 } 45 54 } 46 55 56 log_printf(FUNC,Behavioural,FUNCTION,"End"); 47 57 return xml; 48 58 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Parameters.cpp
r15 r43 11 11 namespace behavioural { 12 12 13 #undef FUNCTION 14 #define FUNCTION "Parameters::Parameters" 13 15 Parameters::Parameters (void) 14 16 { 17 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 18 log_printf(FUNC,Behavioural,FUNCTION,"End"); 15 19 }; 16 20 21 #undef FUNCTION 22 #define FUNCTION "Parameters::~Parameters" 17 23 Parameters::~Parameters () 18 24 { 25 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 26 log_printf(FUNC,Behavioural,FUNCTION,"End"); 19 27 }; 20 28 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Parameters_Statistics.cpp
r2 r43 13 13 14 14 15 #undef FUNCTION 16 #define FUNCTION "Parameters_Statistics::Parameters_Statistics" 15 17 Parameters_Statistics::Parameters_Statistics (uint32_t nb_cycle_before_begin, 16 18 uint32_t period_save ): 17 19 _nb_cycle_before_begin (nb_cycle_before_begin), 18 20 _period_save (period_save ) 19 {}; 21 { 22 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 23 log_printf(FUNC,Behavioural,FUNCTION,"End"); 24 }; 20 25 26 #undef FUNCTION 27 #define FUNCTION "Parameters_Statistics::~Parameters_Statistics" 21 28 Parameters_Statistics::~Parameters_Statistics () 22 {}; 29 { 30 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 31 log_printf(FUNC,Behavioural,FUNCTION,"End"); 32 }; 23 33 24 34 }; // end namespace behavioural -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Parameters_test.cpp
r2 r43 12 12 namespace behavioural { 13 13 14 #undef FUNCTION 15 #define FUNCTION "Parameters::test" 14 16 void Parameters::test (void) 15 17 { 18 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 16 19 string msg = msg_error(); 17 20 18 21 if (msg.length() != 0) 19 22 throw (ErrorMorpheo (msg)); 23 log_printf(FUNC,Behavioural,FUNCTION,"End"); 20 24 }; 21 25 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_get_clock.cpp
r42 r43 13 13 namespace behavioural { 14 14 15 #undef FUNCTION 16 #define FUNCTION "Signal::get_clock" 15 17 Signal * Signal::get_clock (void) 16 18 { 19 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 20 21 Signal * _return; 22 17 23 if ((_presence_port == CLOCK_VHDL_YES) or 18 24 (_presence_port == CLOCK_VHDL_NO )) 19 returnthis;25 _return = this; 20 26 else 21 return NULL; 27 _return = NULL; 28 29 log_printf(FUNC,Behavioural,FUNCTION,"End"); 30 return _return; 22 31 }; 23 32 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_get_name.cpp
r42 r43 12 12 namespace behavioural { 13 13 14 #undef FUNCTION 15 #define FUNCTION "Signal::get_name" 14 16 string Signal::get_name (void) 15 17 { 16 return _name; 18 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 19 string _return = _name; 20 log_printf(FUNC,Behavioural,FUNCTION,"End"); 21 return _return; 17 22 }; 18 23 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_get_name_vhdl.cpp
r42 r43 13 13 namespace behavioural { 14 14 15 #undef FUNCTION 16 #define FUNCTION "Signal::get_name_vhdl" 15 17 void Signal::get_name_vhdl (list<string> *& list_signal) 16 18 { 19 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 17 20 if ((_presence_port == PORT_VHDL_YES_TESTBENCH_YES) or 18 21 (_presence_port == PORT_VHDL_YES_TESTBENCH_NO ) or … … 20 23 (_presence_port == RESET_VHDL_YES)) 21 24 list_signal->push_back(_name); 25 log_printf(FUNC,Behavioural,FUNCTION,"End"); 22 26 }; 23 27 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_get_reset.cpp
r42 r43 13 13 namespace behavioural { 14 14 15 #undef FUNCTION 16 #define FUNCTION "Signal::get_reset" 15 17 Signal * Signal::get_reset (void) 16 18 { 19 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 20 21 Signal * _return; 17 22 if ((_presence_port == RESET_VHDL_YES) or 18 23 (_presence_port == RESET_VHDL_NO )) … … 21 26 throw ErrorMorpheo ("<Signal.get_reset> : size of signal reset is more than one bit."); 22 27 23 returnthis;28 _return = this; 24 29 } 25 30 else 26 return NULL; 31 _return = NULL; 32 33 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 34 return _return; 27 35 }; 28 36 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_get_reset_cycle.cpp
r42 r43 13 13 namespace behavioural { 14 14 15 #undef FUNCTION 16 #define FUNCTION "Signal::get_reset_cycle" 15 17 uint32_t Signal::get_reset_cycle (bool active_low) 16 18 { 19 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 20 17 21 uint32_t num = 0; 18 22 uint32_t cpt = 0; … … 36 40 } 37 41 42 log_printf(FUNC,Behavioural,FUNCTION,"End"); 43 38 44 return num; 39 45 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_get_signal_link.cpp
r42 r43 12 12 namespace behavioural { 13 13 14 #undef FUNCTION 15 #define FUNCTION "Signal::get_signal_link" 14 16 Signal * Signal::get_signal_link (void) 15 17 { 16 return _signal; 18 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 19 Signal * _return = _signal; 20 log_printf(FUNC,Behavioural,FUNCTION,"End"); 21 22 return _return; 17 23 }; 18 24 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_get_size.cpp
r42 r43 12 12 namespace behavioural { 13 13 14 #undef FUNCTION 15 #define FUNCTION "Signal::get_size" 14 16 uint32_t Signal::get_size (void) 15 17 { 16 return _size; 18 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 19 uint32_t _return = _size; 20 log_printf(FUNC,Behavioural,FUNCTION,"End"); 21 22 return _return; 17 23 }; 18 24 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_link.cpp
r42 r43 12 12 namespace behavioural { 13 13 14 #undef FUNCTION 15 #define FUNCTION "Signal::link" 14 16 void Signal::link (Signal * signal) 15 17 { 18 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 19 16 20 if ( _is_allocate == false) 17 21 throw (ErrorMorpheo ("Signal \""+_name+"\", can't map with signal \""+ get_name()+"\", because it's not already allocate.")); … … 33 37 else 34 38 if ((_direction == OUT) and (signal->_direction == OUT)) 35 switch (_type_info) 36 { 37 case BOOL : {(*(static_cast<sc_out <bool > *>(_sc_signal))) (*(static_cast<sc_out <bool > *>(signal->_sc_signal))); break;} 38 case UINT8_T : {(*(static_cast<sc_out <uint8_t > *>(_sc_signal))) (*(static_cast<sc_out <uint8_t > *>(signal->_sc_signal))); break;} 39 case UINT16_T : {(*(static_cast<sc_out <uint16_t> *>(_sc_signal))) (*(static_cast<sc_out <uint16_t> *>(signal->_sc_signal))); break;} 40 case UINT32_T : {(*(static_cast<sc_out <uint32_t> *>(_sc_signal))) (*(static_cast<sc_out <uint32_t> *>(signal->_sc_signal))); break;} 41 case UINT64_T : {(*(static_cast<sc_out <uint64_t> *>(_sc_signal))) (*(static_cast<sc_out <uint64_t> *>(signal->_sc_signal))); break;} 42 default : {throw (ErrorMorpheo ("Signal \""+_name+"\" : type unknow.")); break;} 43 } 39 { 40 signal->_sc_signal_map = _sc_signal_map; 41 42 switch (_type_info) 43 { 44 case BOOL : {(*(static_cast<sc_out <bool > *>(_sc_signal))) (*(static_cast<sc_out <bool > *>(signal->_sc_signal))); break;} 45 case UINT8_T : {(*(static_cast<sc_out <uint8_t > *>(_sc_signal))) (*(static_cast<sc_out <uint8_t > *>(signal->_sc_signal))); break;} 46 case UINT16_T : {(*(static_cast<sc_out <uint16_t> *>(_sc_signal))) (*(static_cast<sc_out <uint16_t> *>(signal->_sc_signal))); break;} 47 case UINT32_T : {(*(static_cast<sc_out <uint32_t> *>(_sc_signal))) (*(static_cast<sc_out <uint32_t> *>(signal->_sc_signal))); break;} 48 case UINT64_T : {(*(static_cast<sc_out <uint64_t> *>(_sc_signal))) (*(static_cast<sc_out <uint64_t> *>(signal->_sc_signal))); break;} 49 default : {throw (ErrorMorpheo ("Signal \""+_name+"\" : type unknow.")); break;} 50 } 51 } 44 52 else 45 53 if ((_direction == IN ) and (signal->_direction == OUT)) … … 66 74 else 67 75 throw (ErrorMorpheo ("Signal \""+_name+"\" : unsupported direction to link.")); 76 77 log_printf(FUNC,Behavioural,FUNCTION,"End"); 68 78 }; 69 79 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_mapping.cpp
r42 r43 12 12 namespace behavioural { 13 13 14 #undef FUNCTION 15 #define FUNCTION "Signal::mapping" 14 16 void Signal::mapping (Signal * signal) 15 17 { 18 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 19 16 20 if (_is_map == true) 17 throw (ErrorMorpheo (" Signal \""+_name+"\", can't map, because it's already map."));21 throw (ErrorMorpheo ("<Signal::mapping> Can't mapping signal \""+_name+"\" with \""+signal->get_name()+"\", because it's already map.")); 18 22 19 23 if (signal->_is_allocate == false) 20 throw (ErrorMorpheo (" Signal \""+_name+"\", can't map with signal \""+signal->get_name()+"\", because it's not already allocate."));24 throw (ErrorMorpheo ("<Signal::mapping> Signal \""+_name+"\", can't map with signal \""+signal->get_name()+"\", because it's not already allocate.")); 21 25 22 26 if (_direction == OUT) … … 29 33 } 30 34 35 log_printf(FUNC,Behavioural,FUNCTION,"End"); 31 36 }; 32 37 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_presence_testbench.cpp
r42 r43 12 12 namespace behavioural { 13 13 14 #undef FUNCTION 15 #define FUNCTION "Signal::presence_vhdl" 14 16 bool Signal::presence_vhdl (void) 15 17 { 16 return ((_presence_port == PORT_VHDL_YES_TESTBENCH_YES) or 17 (_presence_port == PORT_VHDL_NO_TESTBENCH_YES ) or 18 (_presence_port == CLOCK_VHDL_YES ) or 19 (_presence_port == RESET_VHDL_YES ) ); 18 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 19 20 bool _return = ((_presence_port == PORT_VHDL_YES_TESTBENCH_YES) or 21 (_presence_port == PORT_VHDL_NO_TESTBENCH_YES ) or 22 (_presence_port == CLOCK_VHDL_YES ) or 23 (_presence_port == RESET_VHDL_YES ) ); 24 25 log_printf(FUNC,Behavioural,FUNCTION,"End"); 26 27 return _return; 20 28 }; 21 29 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_presence_vhdl.cpp
r42 r43 12 12 namespace behavioural { 13 13 14 #undef FUNCTION 15 #define FUNCTION "Signal::presence_vhdl" 14 16 bool Signal::presence_vhdl (void) 15 17 { 16 return ((_presence_port == PORT_VHDL_YES_TESTBENCH_YES) or 17 (_presence_port == PORT_VHDL_YES_TESTBENCH_NO ) or 18 (_presence_port == CLOCK_VHDL_YES ) or 19 (_presence_port == RESET_VHDL_YES ) ); 18 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 19 bool _return = ((_presence_port == PORT_VHDL_YES_TESTBENCH_YES) or 20 (_presence_port == PORT_VHDL_YES_TESTBENCH_NO ) or 21 (_presence_port == CLOCK_VHDL_YES ) or 22 (_presence_port == RESET_VHDL_YES ) ); 23 log_printf(FUNC,Behavioural,FUNCTION,"End"); 24 25 return _return; 20 26 }; 21 27 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Statistics.cpp
r2 r43 13 13 namespace behavioural { 14 14 15 #undef FUNCTION 16 #define FUNCTION "Statistics::Statistics" 15 17 Statistics::Statistics (string name , 16 18 Parameters_Statistics parameters_statistics): … … 18 20 _parameters_statistics (parameters_statistics) 19 21 { 22 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 20 23 _nb_statistics = 0; 21 24 _period_current = 0; 25 log_printf(FUNC,Behavioural,FUNCTION,"End"); 22 26 }; 23 27 28 #undef FUNCTION 29 #define FUNCTION "Statistics::~Statistics" 24 30 Statistics::~Statistics () 25 31 { 32 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 33 log_printf(FUNC,Behavioural,FUNCTION,"End"); 26 34 }; 27 35 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Statistics_compute_cycle_xxx.cpp
r2 r43 13 13 namespace behavioural { 14 14 15 #undef FUNCTION 16 #define FUNCTION "Statistics::compute_cycle_begin" 15 17 uint32_t Statistics::compute_cycle_begin (uint32_t num_statistics) 16 18 { 17 return _parameters_statistics._nb_cycle_before_begin + num_statistics*_parameters_statistics._period_save; 19 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 20 uint32_t _return = _parameters_statistics._nb_cycle_before_begin + num_statistics*_parameters_statistics._period_save; 21 log_printf(FUNC,Behavioural,FUNCTION,"End"); 22 23 return _return; 18 24 }; 19 25 26 #undef FUNCTION 27 #define FUNCTION "Statistics::compute_cycle_end" 20 28 uint32_t Statistics::compute_cycle_end (uint32_t num_statistics, uint32_t nb_cycle) 21 29 { 30 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 31 32 uint32_t _return; 22 33 if (num_statistics == (_nb_statistics-1)) // Last ? 23 returncompute_cycle_begin(num_statistics ) + nb_cycle;34 _return = compute_cycle_begin(num_statistics ) + nb_cycle; 24 35 else 25 return compute_cycle_begin(num_statistics+1) - 1; 36 _return = compute_cycle_begin(num_statistics+1) - 1; 37 38 log_printf(FUNC,Behavioural,FUNCTION,"End"); 39 40 return _return; 26 41 }; 27 42 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Statistics_generate_file.cpp
r2 r43 17 17 namespace behavioural { 18 18 19 #undef FUNCTION 20 #define FUNCTION "Statistics::generate_file" 19 21 void Statistics::generate_file(string stat) 20 22 { 23 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 24 21 25 ostringstream filename; 22 26 filename << _name << ".stat"; … … 41 45 42 46 file.close(); 47 48 log_printf(FUNC,Behavioural,FUNCTION,"End"); 43 49 } 44 50 51 #undef FUNCTION 52 #define FUNCTION "Statistics::generate_file" 45 53 void Statistics::generate_file(void) 46 54 { 55 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 56 47 57 generate_file(print(0)); 58 59 log_printf(FUNC,Behavioural,FUNCTION,"End"); 48 60 }; 49 61 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Statistics_save.cpp
r2 r43 16 16 namespace behavioural { 17 17 18 #undef FUNCTION 19 #define FUNCTION "Statistics::save" 18 20 template <class Counters, class Parameters_Counters> 19 21 void Statistics::save(Counters ** & counters, Parameters_Counters parameters) 20 22 { 23 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 24 21 25 // Allocation of a new slot -> take param a first count 22 26 Counters ** counters_tmp; … … 34 38 counters = counters_tmp; 35 39 _nb_statistics ++; 40 41 log_printf(FUNC,Behavioural,FUNCTION,"End"); 36 42 }; 37 38 43 39 44 }; // end namespace behavioural -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Statistics_test_if_save.cpp
r2 r43 16 16 namespace behavioural { 17 17 18 #undef FUNCTION 19 #define FUNCTION "Statistics::test_if_save" 18 20 template <class Counters, class Parameters_Counters> 19 21 void Statistics::test_if_save(Counters ** & counters, Parameters_Counters parameters) 20 22 { 23 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 24 21 25 _period_current ++; 22 26 … … 28 32 _period_current = 0; 29 33 } 34 35 log_printf(FUNC,Behavioural,FUNCTION,"End"); 30 36 }; 31 37 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl.cpp
r2 r43 13 13 namespace behavioural { 14 14 15 #undef FUNCTION 16 #define FUNCTION "Vhdl::Vhdl" 15 17 Vhdl::Vhdl (string name): 16 18 _name (name) 17 19 { 20 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 21 log_printf(FUNC,Behavioural,FUNCTION,"End"); 18 22 }; 19 23 24 #undef FUNCTION 25 #define FUNCTION "Vhdl::~Vhdl" 20 26 Vhdl::~Vhdl () 21 27 { 28 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 29 log_printf(FUNC,Behavioural,FUNCTION,"End"); 22 30 }; 23 31 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_direction_toString.cpp
r42 r43 16 16 namespace behavioural { 17 17 18 #undef FUNCTION 19 #define FUNCTION "Vhdl::direction_toString" 18 20 string Vhdl::direction_toString (direction_t direction) 19 21 { 22 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 23 24 string _return; 20 25 switch (direction) 21 26 { 22 case IN : return"in "; break;23 case OUT : return"out "; break;24 default : return" "; break;27 case IN : _return = "in "; break; 28 case OUT : _return = "out "; break; 29 default : _return = " "; break; 25 30 } 31 32 log_printf(FUNC,Behavioural,FUNCTION,"End"); 33 return _return; 26 34 }; 27 35 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_alias.cpp
r2 r43 16 16 namespace behavioural { 17 17 18 #undef FUNCTION 19 #define FUNCTION "Vhdl::get_alias" 18 20 string Vhdl::get_alias (uint32_t depth) 19 21 { 20 return get_list(_list_alias, depth, ";", true); 22 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 23 string _return = get_list(_list_alias, depth, ";", true); 24 log_printf(FUNC,Behavioural,FUNCTION,"End"); 25 26 return _return; 21 27 }; 22 28 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_architecture.cpp
r2 r43 16 16 namespace behavioural { 17 17 18 #undef FUNCTION 19 #define FUNCTION "Vhdl::get_architecture" 18 20 string Vhdl::get_architecture (uint32_t depth , 19 21 string name , 20 22 string entity_name) 21 23 { 24 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 25 22 26 string tab = string(depth,'\t'); 23 27 ostringstream text; … … 31 35 << tab << "end " << name << ";" << endl; 32 36 37 log_printf(FUNC,Behavioural,FUNCTION,"End"); 38 33 39 return text.str(); 34 40 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_body.cpp
r2 r43 16 16 namespace behavioural { 17 17 18 #undef FUNCTION 19 #define FUNCTION "Vhdl::get_body" 18 20 string Vhdl::get_body (uint32_t depth) 19 21 { 20 return get_list(_list_body,depth,"",true); 22 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 23 string _return = get_list(_list_body,depth,"",true); 24 log_printf(FUNC,Behavioural,FUNCTION,"End"); 25 26 return _return; 21 27 }; 22 28 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_component.cpp
r2 r43 16 16 namespace behavioural { 17 17 18 #undef FUNCTION 19 #define FUNCTION "Vhdl::get_component" 18 20 string Vhdl::get_component(uint32_t depth, 19 21 string name) 20 22 { 23 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 24 21 25 string tab = string(depth,'\t'); 22 26 ostringstream text; … … 29 33 << tab << "\t );" << endl; 30 34 text << tab << "end component;" << endl; 31 35 36 log_printf(FUNC,Behavioural,FUNCTION,"End"); 32 37 return text.str(); 33 38 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_entity.cpp
r2 r43 16 16 namespace behavioural { 17 17 18 #undef FUNCTION 19 #define FUNCTION "Vhdl::get_entity" 18 20 string Vhdl::get_entity(uint32_t depth, 19 21 string name) 20 22 { 23 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 24 21 25 string tab = string(depth,'\t'); 22 26 ostringstream text; … … 32 36 text << tab << "end " << name << ";" << endl; 33 37 38 log_printf(FUNC,Behavioural,FUNCTION,"End"); 39 34 40 return text.str(); 35 41 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_header.cpp
r2 r43 16 16 namespace behavioural { 17 17 18 #undef FUNCTION 19 #define FUNCTION "Vhdl::get_header" 18 20 string Vhdl::get_header(uint32_t depth, 19 21 string filename) 20 22 { 23 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 24 21 25 string tab = string(depth,'\t'); 22 26 ostringstream text; … … 31 35 << tab << "-------------------------------------------------------------------------------" << endl; 32 36 37 log_printf(FUNC,Behavioural,FUNCTION,"End"); 38 33 39 return text.str(); 34 40 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_library_ieee.cpp
r2 r43 16 16 namespace behavioural { 17 17 18 #undef FUNCTION 19 #define FUNCTION "Vhdl::get_library_ieee" 18 20 string Vhdl::get_library_ieee (uint32_t depth) 19 21 { 22 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 23 20 24 string tab = string(depth,'\t'); 21 25 ostringstream text; … … 32 36 << tab << "--use ieee.std_logic_textio.all;" << endl; 33 37 38 log_printf(FUNC,Behavioural,FUNCTION,"End"); 39 34 40 return text.str(); 35 41 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_library_work.cpp
r2 r43 16 16 namespace behavioural { 17 17 18 #undef FUNCTION 19 #define FUNCTION "Vhdl::get_library_work" 18 20 string Vhdl::get_library_work (uint32_t depth) 19 21 { 22 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 23 20 24 list<string>::iterator i = _list_library_work.begin(); 21 25 string tab = string(depth,'\t'); … … 27 31 << get_list(_list_library_work,depth,";",true); 28 32 33 log_printf(FUNC,Behavioural,FUNCTION,"End"); 34 29 35 return text.str(); 30 36 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_list.cpp
r2 r43 16 16 namespace behavioural { 17 17 18 #undef FUNCTION 19 #define FUNCTION "Vhdl::get_list" 18 20 string Vhdl::get_list (list<string> liste , 19 21 uint32_t depth , … … 21 23 bool last_separator ) 22 24 { 25 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 26 23 27 list<string>::iterator i = liste.begin(); 24 28 bool empty = liste.empty(); … … 47 51 } 48 52 53 log_printf(FUNC,Behavioural,FUNCTION,"End"); 54 49 55 return text.str(); 50 56 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_package.cpp
r2 r43 16 16 namespace behavioural { 17 17 18 #undef FUNCTION 19 #define FUNCTION "Vhdl::get_package" 18 20 string Vhdl::get_package(uint32_t depth , 19 21 string filename , … … 21 23 string entity_name ) 22 24 { 25 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 26 23 27 string tab = string(depth,'\t'); 24 28 ostringstream text; … … 29 33 << tab << get_component (depth+1,entity_name) << endl 30 34 << tab << "end " << package_name << ";" << endl; 35 36 log_printf(FUNC,Behavioural,FUNCTION,"End"); 31 37 32 38 return text.str(); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_port.cpp
r2 r43 16 16 namespace behavioural { 17 17 18 #undef FUNCTION 19 #define FUNCTION "Vhdl::get_port" 18 20 string Vhdl::get_port (uint32_t depth) 19 21 { 20 return get_list (_list_port, depth, ";", false); 22 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 23 string _return = get_list (_list_port, depth, ";", false); 24 log_printf(FUNC,Behavioural,FUNCTION,"End"); 25 26 return _return; 21 27 }; 22 28 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_signal.cpp
r2 r43 16 16 namespace behavioural { 17 17 18 #undef FUNCTION 19 #define FUNCTION "Vhdl::get_signal" 18 20 string Vhdl::get_signal (uint32_t depth) 19 21 { 20 return get_list (_list_signal, depth, ";", true); 22 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 23 string _return = get_list (_list_signal, depth, ";", true); 24 log_printf(FUNC,Behavioural,FUNCTION,"End"); 25 26 return _return; 21 27 }; 22 28 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_type.cpp
r2 r43 16 16 namespace behavioural { 17 17 18 #undef FUNCTION 19 #define FUNCTION "Vhdl::get_type" 18 20 string Vhdl::get_type (uint32_t depth) 19 21 { 20 return get_list (_list_type, depth, ";", true); 22 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 23 string _return = get_list (_list_type, depth, ";", true); 24 log_printf(FUNC,Behavioural,FUNCTION,"End"); 25 26 return _return; 21 27 }; 22 28 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_alias.cpp
r2 r43 16 16 namespace behavioural { 17 17 18 void Vhdl::set_alias (string name1 , 19 string type1 , 20 string name2 , 21 string range2 ) 18 #undef FUNCTION 19 #define FUNCTION "Vhdl::set_alias" 20 void Vhdl::set_alias (string name1 , 21 string type1 , 22 string name2 , 23 string range2) 22 24 { 25 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 23 26 set_list(_list_alias, "alias "+ name1+"\t: "+type1+"\tis "+name2+"\t"+range2); 27 log_printf(FUNC,Behavioural,FUNCTION,"End"); 24 28 }; 25 29 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_body.cpp
r2 r43 16 16 namespace behavioural { 17 17 18 #undef FUNCTION 19 #define FUNCTION "Vhdl::set_body" 18 20 void Vhdl::set_body (string text ) 19 21 { 22 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 20 23 set_list(_list_body, text); 24 log_printf(FUNC,Behavioural,FUNCTION,"End"); 21 25 }; 22 26 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_body_component.cpp
r2 r43 16 16 namespace behavioural { 17 17 18 #undef FUNCTION 19 #define FUNCTION "Vhdl::set_body_component" 18 20 void Vhdl::set_body_component (string name_instance , 19 21 string name_component , 20 22 list<string> list_port_map ) 21 23 { 24 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 25 22 26 set_body(name_instance + " : " + name_component); 23 27 set_body("port map ("); 24 28 set_list(_list_body, get_list(list_port_map, 1, ",", false)); 25 29 set_body(");"); 30 31 log_printf(FUNC,Behavioural,FUNCTION,"End"); 26 32 }; 27 33 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_body_component_port_map.cpp
r2 r43 16 16 namespace behavioural { 17 17 18 #undef FUNCTION 19 #define FUNCTION "Vhdl::set_body_component_port_map" 18 20 void Vhdl::set_body_component_port_map (list<string> & list_port_map , 19 21 string name_port , 20 22 string name_signal ) 21 23 { 24 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 22 25 set_list(list_port_map, name_port + "\t=>" + name_signal); 26 log_printf(FUNC,Behavioural,FUNCTION,"End"); 23 27 }; 24 28 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_constant.cpp
r2 r43 16 16 namespace behavioural { 17 17 18 #undef FUNCTION 19 #define FUNCTION "Vhdl::set_constant" 18 20 void Vhdl::set_constant (string name , 19 21 string type , 20 22 string init) 21 23 { 24 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 22 25 set_list(_list_type, "constant "+ name+"\t: "+type+"\t:= "+init); 26 log_printf(FUNC,Behavioural,FUNCTION,"End"); 23 27 }; 24 28 … … 27 31 string init) 28 32 { 33 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 29 34 set_constant(name,std_logic(size),init); 35 log_printf(FUNC,Behavioural,FUNCTION,"End"); 30 36 }; 31 37 … … 34 40 uint32_t init) 35 41 { 42 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 36 43 set_constant(name,std_logic(size),std_logic_conv(size,init)); 44 log_printf(FUNC,Behavioural,FUNCTION,"End"); 37 45 }; 38 46 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_library_work.cpp
r2 r43 16 16 namespace behavioural { 17 17 18 #undef FUNCTION 19 #define FUNCTION "Vhdl::set_library_work" 18 20 void Vhdl::set_library_work (string package_name) 19 21 { 22 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 20 23 set_list(_list_library_work, "use work."+ package_name + ".all"); 24 log_printf(FUNC,Behavioural,FUNCTION,"End"); 21 25 }; 22 26 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_list.cpp
r2 r43 16 16 namespace behavioural { 17 17 18 void Vhdl::set_list (list<string> & liste , 19 string text ) 18 #undef FUNCTION 19 #define FUNCTION "Vhdl::set_list" 20 void Vhdl::set_list (list<string> & liste, 21 string text ) 20 22 { 23 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 21 24 liste.push_back (text); 25 log_printf(FUNC,Behavioural,FUNCTION,"End"); 22 26 }; 23 27 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_port.cpp
r2 r43 16 16 namespace behavioural { 17 17 18 #undef FUNCTION 19 #define FUNCTION "Vhdl::set_port" 18 20 void Vhdl::set_port (string name , 19 21 direction_t direction, 20 22 string type ) 21 23 { 24 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 22 25 set_list (_list_port, name + "\t: " + direction_toString(direction) + " " + type); 26 log_printf(FUNC,Behavioural,FUNCTION,"End"); 23 27 }; 24 28 … … 27 31 uint32_t size ) 28 32 { 33 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 29 34 set_port(name,direction,std_logic(size)); 35 log_printf(FUNC,Behavioural,FUNCTION,"End"); 30 36 }; 31 37 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_signal.cpp
r2 r43 16 16 namespace behavioural { 17 17 18 #undef FUNCTION 19 #define FUNCTION "Vhdl::set_signal" 20 18 21 void Vhdl::set_signal (string name , 19 22 string type ) 20 23 { 24 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 21 25 set_list(_list_signal, "signal "+ name + "\t: " + type); 26 log_printf(FUNC,Behavioural,FUNCTION,"End"); 22 27 }; 23 28 … … 25 30 uint32_t size ) 26 31 { 32 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 27 33 set_signal(name,std_logic(size)); 34 log_printf(FUNC,Behavioural,FUNCTION,"End"); 28 35 } 29 36 … … 32 39 string init) 33 40 { 41 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 34 42 _list_signal.push_back ("signal "+ name+"\t: "+type+"\t:= "+init); 43 log_printf(FUNC,Behavioural,FUNCTION,"End"); 35 44 }; 36 45 … … 39 48 string init ) 40 49 { 50 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 41 51 set_signal(name,std_logic(size),init); 52 log_printf(FUNC,Behavioural,FUNCTION,"End"); 42 53 }; 43 54 void Vhdl::set_signal (string name , … … 45 56 uint32_t init ) 46 57 { 58 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 47 59 set_signal(name,std_logic(size),std_logic_conv(size,init)); 60 log_printf(FUNC,Behavioural,FUNCTION,"End"); 48 61 }; 49 62 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_type.cpp
r2 r43 16 16 namespace behavioural { 17 17 18 #undef FUNCTION 19 #define FUNCTION "Vhdl::set_type" 18 20 void Vhdl::set_type (string name , 19 21 string type ) 20 22 { 23 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 21 24 set_list(_list_type, "type "+ name + "\tis " + type); 25 log_printf(FUNC,Behavioural,FUNCTION,"End"); 22 26 }; 23 27 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_std_logic.cpp
r2 r43 14 14 namespace behavioural { 15 15 16 #undef FUNCTION 17 #define FUNCTION "Vhdl::std_logic" 16 18 string std_logic (uint32_t size) 17 19 { 20 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 21 18 22 string type; 19 23 … … 23 27 type = "std_logic_vector(" + toString(size-1) + " downto 0)"; 24 28 29 log_printf(FUNC,Behavioural,FUNCTION,"End"); 30 25 31 return type; 26 32 }; 27 33 34 #undef FUNCTION 35 #define FUNCTION "Vhdl::std_logic_conv" 28 36 string std_logic_conv (uint32_t size, string value) 29 37 { 38 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 39 30 40 string conv; 31 41 … … 35 45 conv = "conv_std_logic_vector("+value+","+toString(size)+")"; 36 46 47 log_printf(FUNC,Behavioural,FUNCTION,"End"); 48 37 49 return conv; 38 50 }; … … 40 52 string std_logic_conv (uint32_t size, uint32_t value) 41 53 { 42 return std_logic_conv(size,toString(value)); 54 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 55 string _return = std_logic_conv(size,toString(value)); 56 log_printf(FUNC,Behavioural,FUNCTION,"End"); 57 58 return _return; 43 59 }; 44 60 61 #undef FUNCTION 62 #define FUNCTION "Vhdl::std_logic_range" 45 63 string std_logic_range (uint32_t max, uint32_t min) 46 64 { 65 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 47 66 string type; 48 67 … … 52 71 type = "("+toString(max)+" downto "+toString(min)+")"; 53 72 73 log_printf(FUNC,Behavioural,FUNCTION,"End"); 74 54 75 return type; 55 76 }; … … 57 78 string std_logic_range (uint32_t size) 58 79 { 59 return std_logic_range(size-1,0); 80 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 81 string _return = std_logic_range(size-1,0); 82 log_printf(FUNC,Behavioural,FUNCTION,"End"); 83 84 return _return; 60 85 } 61 86 87 #undef FUNCTION 88 #define FUNCTION "Vhdl::std_logic_others" 62 89 string std_logic_others (uint32_t size, uint32_t cst ) 63 90 { 91 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 92 93 string _return; 94 64 95 if (size < 2) 65 return"'"+toString(cst)+"'";96 _return = "'"+toString(cst)+"'"; 66 97 else 67 return "(others => '"+toString(cst)+"')"; 98 _return = "(others => '"+toString(cst)+"')"; 99 100 log_printf(FUNC,Behavioural,FUNCTION,"End"); 101 102 return _return; 68 103 } 69 104 }; // end namespace behavioural -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/XML.cpp
r31 r43 11 11 namespace behavioural { 12 12 13 #undef FUNCTION 14 #define FUNCTION "XML::XML" 13 15 XML::XML (string name) : 14 16 _name (name) 15 17 { 18 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 16 19 _filename_extension="xml"; 20 log_printf(FUNC,Behavioural,FUNCTION,"End"); 17 21 }; 18 22 23 #undef FUNCTION 24 #define FUNCTION "XML::~XML" 19 25 XML::~XML () 20 26 { 27 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 28 log_printf(FUNC,Behavioural,FUNCTION,"End"); 21 29 }; 22 30 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/XML_attribut.cpp
r2 r43 11 11 namespace behavioural { 12 12 13 #undef FUNCTION 14 #define FUNCTION "XML::attribut" 13 15 bool XML::attribut (string name, string value) 14 16 { 17 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 15 18 _body += " "+name+"=\""+value+"\""; 19 log_printf(FUNC,Behavioural,FUNCTION,"End"); 16 20 17 21 return true; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/XML_balise_close.cpp
r2 r43 11 11 namespace behavioural { 12 12 13 #undef FUNCTION 14 #define FUNCTION "XML::balise_close" 13 15 bool XML::balise_close () 14 16 { 17 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 15 18 string name=*(_list_balise_name.begin()); 16 19 … … 18 21 19 22 _body += indent()+"</"+name+">\n"; 23 log_printf(FUNC,Behavioural,FUNCTION,"End"); 20 24 21 25 return true; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/XML_balise_open.cpp
r2 r43 11 11 namespace behavioural { 12 12 13 #undef FUNCTION 14 #define FUNCTION "XML::balise_open" 13 15 bool XML::balise_open (string name) 14 16 { 15 if (not balise_open_begin(name)) return false; 16 return balise_open_end (); 17 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 18 19 bool _return; 20 if (not balise_open_begin(name)) 21 _return = false; 22 else 23 _return = balise_open_end (); 24 25 log_printf(FUNC,Behavioural,FUNCTION,"End"); 26 return _return; 17 27 }; 18 28 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/XML_balise_open_begin.cpp
r2 r43 11 11 namespace behavioural { 12 12 13 #undef FUNCTION 14 #define FUNCTION "XML::balise_open_begin" 13 15 bool XML::balise_open_begin (string name) 14 16 { 17 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 18 15 19 _body += indent() + "<"+name; 16 20 17 21 _list_balise_name.push_front(name); 22 23 log_printf(FUNC,Behavioural,FUNCTION,"End"); 18 24 19 25 return true; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/XML_balise_open_end.cpp
r3 r43 11 11 namespace behavioural { 12 12 13 #undef FUNCTION 14 #define FUNCTION "XML::balise_open_end" 13 15 bool XML::balise_open_end (void) 14 16 { 17 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 15 18 _body += " >\n"; 19 log_printf(FUNC,Behavioural,FUNCTION,"End"); 16 20 17 21 return true; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/XML_comment.cpp
r2 r43 11 11 namespace behavioural { 12 12 13 #undef FUNCTION 14 #define FUNCTION "XML::comment" 13 15 bool XML::comment (string texte) 14 16 { 17 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 15 18 _body+=indent()+"<!-- "+texte+" -->\n"; 19 log_printf(FUNC,Behavioural,FUNCTION,"End"); 16 20 17 21 return true; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/XML_depth.cpp
r2 r43 11 11 namespace behavioural { 12 12 13 #undef FUNCTION 14 #define FUNCTION "XML::depth" 13 15 uint32_t XML::depth (void) 14 16 { 15 return _list_balise_name.size(); 17 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 18 uint32_t _return = _list_balise_name.size(); 19 log_printf(FUNC,Behavioural,FUNCTION,"End"); 20 21 return _return; 16 22 }; 17 23 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/XML_filename_extension.cpp
r31 r43 13 13 namespace behavioural { 14 14 15 #undef FUNCTION 16 #define FUNCTION "XML::filename_extension" 15 17 void XML::filename_extension (string extension) 16 18 { 19 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 17 20 _filename_extension = extension; 21 log_printf(FUNC,Behavioural,FUNCTION,"End"); 18 22 }; 19 23 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/XML_generate_file.cpp
r31 r43 13 13 namespace behavioural { 14 14 15 #undef FUNCTION 16 #define FUNCTION "XML::generate_file" 15 17 void XML::generate_file (string encoding) 16 18 { 19 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 20 17 21 header (encoding); 18 22 … … 28 32 29 33 file.close(); 34 35 log_printf(FUNC,Behavioural,FUNCTION,"End"); 30 36 }; 31 37 32 38 void XML::generate_file (void) 33 39 { 40 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 34 41 generate_file("UTF-8"); 42 log_printf(FUNC,Behavioural,FUNCTION,"End"); 35 43 }; 36 44 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/XML_get_body.cpp
r3 r43 11 11 namespace behavioural { 12 12 13 #undef FUNCTION 14 #define FUNCTION "XML::get_body" 13 15 string XML::get_body (void) 14 16 { 17 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 18 log_printf(FUNC,Behavioural,FUNCTION,"End"); 15 19 return _body; 16 20 }; … … 18 22 string XML::get_body (uint32_t depth) 19 23 { 24 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 25 20 26 string body = _body; 21 27 string tabulation = indent(depth); … … 25 31 body.insert(++pos,tabulation); 26 32 33 log_printf(FUNC,Behavioural,FUNCTION,"End"); 27 34 return body; 28 35 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/XML_header.cpp
r3 r43 11 11 namespace behavioural { 12 12 13 #undef FUNCTION 14 #define FUNCTION "XML::header" 13 15 void XML::header (string encoding) 14 16 { 17 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 15 18 _body = "<?xml version=\"1.0\" encoding=\""+encoding+"\" ?>\n" + _body; 19 log_printf(FUNC,Behavioural,FUNCTION,"End"); 16 20 }; 17 21 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/XML_indent.cpp
r2 r43 11 11 namespace behavioural { 12 12 13 #undef FUNCTION 14 #define FUNCTION "XML::indent" 13 15 string XML::indent (uint32_t depth) 14 16 { 15 return string(depth,'\t'); 17 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 18 string _return = string(depth,'\t'); 19 log_printf(FUNC,Behavioural,FUNCTION,"End"); 20 21 return _return; 16 22 }; 17 23 18 24 string XML::indent (void) 19 25 { 20 return indent(depth()); 26 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 27 string _return = indent(depth()); 28 log_printf(FUNC,Behavioural,FUNCTION,"End"); 29 30 return _return; 21 31 }; 22 32 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/XML_insert_XML.cpp
r29 r43 11 11 namespace behavioural { 12 12 13 #undef FUNCTION 14 #define FUNCTION "XML::insert_XML" 13 15 bool XML::insert_XML (XML xml) 14 16 { 17 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 15 18 //return text (xml.get_body()); 16 19 _body += xml.get_body(depth()); 20 log_printf(FUNC,Behavioural,FUNCTION,"End"); 17 21 18 22 return true; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/XML_singleton.cpp
r2 r43 11 11 namespace behavioural { 12 12 13 #undef FUNCTION 14 #define FUNCTION "XML::singleton" 13 15 bool XML::singleton (string name) 14 16 { 15 if (not singleton_begin(name)) return false; 16 return singleton_end (); 17 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 18 19 bool _return; 20 21 if (not singleton_begin(name)) 22 _return = false; 23 else 24 _return = singleton_end (); 25 26 log_printf(FUNC,Behavioural,FUNCTION,"End"); 27 return _return; 17 28 }; 18 29 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/XML_singleton_begin.cpp
r2 r43 11 11 namespace behavioural { 12 12 13 #undef FUNCTION 14 #define FUNCTION "XML::singleton_begin" 13 15 bool XML::singleton_begin (string name) 14 16 { 17 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 15 18 _body += indent() + "<"+name+" "; 19 log_printf(FUNC,Behavioural,FUNCTION,"End"); 16 20 17 21 return true; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/XML_singleton_end.cpp
r2 r43 11 11 namespace behavioural { 12 12 13 #undef FUNCTION 14 #define FUNCTION "XML::singleton_end" 13 15 bool XML::singleton_end (void) 14 16 { 17 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 15 18 _body+=" />\n"; 19 log_printf(FUNC,Behavioural,FUNCTION,"End"); 16 20 17 21 return true; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/XML_text.cpp
r2 r43 11 11 namespace behavioural { 12 12 13 #undef FUNCTION 14 #define FUNCTION "XML::text" 13 15 bool XML::text (string text) 14 16 { 17 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 15 18 _body += indent()+text+"\n"; 19 log_printf(FUNC,Behavioural,FUNCTION,"End"); 16 20 17 21 return true;
Note: See TracChangeset
for help on using the changeset viewer.