- Timestamp:
- Jan 31, 2008, 6:46:41 PM (16 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src
- Files:
-
- 4 deleted
- 6 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Parameters_msg_error.cpp
r2 r75 9 9 #include "Behavioural/Generic/Shifter/include/Types.h" 10 10 #include <sstream> 11 using namespace std;12 11 13 12 namespace morpheo { … … 16 15 namespace shifter { 17 16 18 st ring Parameters::msg_error(void)17 std::string Parameters::msg_error(void) 19 18 { 20 st ring msg = "";19 std::string msg = ""; 21 20 22 21 if (_size_data < 2) … … 42 41 { 43 42 msg += " - Incompatible parameters : internal_rotate have never carry (must be set at \"internal_logic\"\n"; 44 msg += " * rotate : " + toString _rotate(_rotate) + "\n";45 msg += " * carry : " + toString _carry(_carry ) + "\n";43 msg += " * rotate : " + toString(_rotate) + "\n"; 44 msg += " * carry : " + toString(_carry ) + "\n"; 46 45 } 47 46 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Parameters_print.cpp
r2 r75 7 7 8 8 #include "Behavioural/Generic/Shifter/include/Parameters.h" 9 #include <sstream> 10 using namespace std; 9 #include "Behavioural/include/XML.h" 11 10 12 11 namespace morpheo { … … 16 15 17 16 18 st ring Parameters::print (uint32_t depth)17 std::string Parameters::print (uint32_t depth) 19 18 { 20 string tab = string(depth,'\t'); 21 ostringstream msg; 22 msg << tab << "<shifter>" << endl 23 << tab << "\t<size_data value=\"" << _size_data << "\" />" << endl 24 << tab << "\t<nb_port value=\"" << _nb_port << "\" />" << endl 25 << tab << "\t<shift_value value=\"" << _shift_value << "\" />" << endl 26 << tab << "\t<rotate value=\"" << toString_rotate (_rotate ) << "\" />" << endl 27 << tab << "\t<direction value=\"" << toString_direction (_direction) << "\" />" << endl 28 << tab << "\t<carry value=\"" << toString_carry (_carry ) << "\" />" << endl 29 << tab << "\t<!-- port_completion is type bool : " << toString(_type_completion_bool) << " -->" << endl 30 << tab << "</shifter>" << endl; 19 XML xml ("shifter"); 20 21 xml.balise_open("shifter"); 22 xml.singleton_begin("size_data "); xml.attribut("value",toString(_size_data )); xml.singleton_end(); 23 xml.singleton_begin("nb_port "); xml.attribut("value",toString(_nb_port )); xml.singleton_end(); 24 xml.singleton_begin("shift_value"); xml.attribut("value",toString(_shift_value)); xml.singleton_end(); 25 xml.singleton_begin("rotate "); xml.attribut("value",toString(_rotate )); xml.singleton_end(); 26 xml.singleton_begin("direction "); xml.attribut("value",toString(_direction )); xml.singleton_end(); 27 xml.singleton_begin("carry "); xml.attribut("value",toString(_carry )); xml.singleton_end(); 31 28 32 return msg.str();29 return xml.get_body(depth); 33 30 }; 34 31 35 ostream& operator<< (ostream& output_stream ,36 32 std::ostream& operator<< (std::ostream& output_stream , 33 morpheo::behavioural::generic::shifter::Parameters & x) 37 34 { 38 35 output_stream << x.print(0); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Shifter.cpp
r66 r75 20 20 #endif 21 21 #ifdef STATISTICS 22 ,morpheo::behavioural::Parameters_Statistics 22 ,morpheo::behavioural::Parameters_Statistics * param_statistics 23 23 #endif 24 24 ,morpheo::behavioural::generic::shifter::Parameters param ): … … 32 32 #ifdef STATISTICS 33 33 // Allocation of statistics 34 _stat = new Statistics (static_cast<string>(_name), 35 param_statistics , 36 param); 34 statistics_declaration(param_statistics); 37 35 #endif 38 36 … … 101 99 102 100 #ifdef STATISTICS 103 _stat->generate_file(statistics(0));104 105 101 delete _stat; 106 102 #endif -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Shifter_end_cycle.cpp
r59 r75 1 #if def VHDL_TESTBENCH1 #if defined(STATISTICS) or defined(VHDL_TESTBENCH) 2 2 /* 3 3 * $Id$ … … 14 14 namespace shifter { 15 15 16 #undef FUNCTION 17 #define FUNCTION "Shifter::end_cycle" 18 void Shifter::end_cycle () 19 { 20 log_printf(FUNC,Shifter,FUNCTION,"Begin"); 16 21 17 void Shifter::vhdl_testbench_transition (void) 18 {19 // sc_start(0); 22 #ifdef STATISTICS 23 _stat->end_cycle(); 24 #endif 20 25 26 #ifdef VHDL_TESTBENCH 27 // Evaluation before read the ouput signal 28 // sc_start(0); 21 29 _interfaces->testbench(); 30 #endif 31 32 log_printf(FUNC,Shifter,FUNCTION,"End"); 22 33 }; 34 23 35 24 36 }; // end namespace shifter -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Shifter_genMealy_shift.cpp
r44 r75 11 11 #include <bitset> 12 12 13 using namespace std;14 13 namespace morpheo { 15 14 namespace behavioural { -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Shifter_statistics_declaration.cpp
r59 r75 14 14 namespace shifter { 15 15 16 #undef FUNCTION 17 #define FUNCTION "Shifter::statistics_declaration" 18 void Shifter::statistics_declaration (morpheo::behavioural::Parameters_Statistics * param_statistics) 19 { 20 log_printf(FUNC,Shifter,FUNCTION,"Begin"); 16 21 17 string Shifter::statistics (uint32_t depth) 18 { 19 return _stat->print(depth); 22 _stat = new Stat (static_cast<std::string>(_name), 23 "Shifter", 24 param_statistics); 25 26 log_printf(FUNC,Shifter,FUNCTION,"End"); 20 27 }; 21 28 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Shifter_transition.cpp
r42 r75 18 18 void Shifter::transition (void) 19 19 { 20 #ifdef STATISTICS 21 _stat->add(); 22 #endif 23 24 #ifdef VHDL_TESTBENCH 25 vhdl_testbench_transition (); 20 #if defined(STATISTICS) or defined(VHDL_TESTBENCH) 21 end_cycle (); 26 22 #endif 27 23 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Shifter_vhdl_body.cpp
r42 r75 50 50 for (uint32_t i=0; i<_param._nb_port; i++) 51 51 { 52 st ring print_shifter_completion;52 std::string print_shifter_completion; 53 53 54 54 if (_param._type_completion_bool == true) … … 83 83 { 84 84 vhdl->set_body ("out_SHIFTER_"+toString(i)+"_DATA <="); 85 st ring print_else = " ";85 std::string print_else = " "; 86 86 87 87 //-----[ Shift arithmetic Left ]--------------------------------------- … … 89 89 { 90 90 bool have_when = false; 91 st ring print_when = "";92 st ring print_and = "";91 std::string print_when = ""; 92 std::string print_and = ""; 93 93 94 94 if (_param._direction == external_direction) … … 120 120 { 121 121 bool have_when = false; 122 st ring print_when = "";123 st ring print_and = "";122 std::string print_when = ""; 123 std::string print_and = ""; 124 124 125 125 if (_param._direction == external_direction) … … 151 151 { 152 152 bool have_when = false; 153 st ring print_when = "";154 st ring print_and = "";153 std::string print_when = ""; 154 std::string print_and = ""; 155 155 156 156 if (_param._direction == external_direction) … … 175 175 print_when = "when " + print_when; 176 176 177 st ring print_expr_completion;177 std::string print_expr_completion; 178 178 179 179 if (_param._size_data_completion == 0) … … 189 189 { 190 190 bool have_when = false; 191 st ring print_when = "";192 st ring print_and = "";191 std::string print_when = ""; 192 std::string print_and = ""; 193 193 194 194 if (_param._direction == external_direction) … … 213 213 print_when = "when " + print_when; 214 214 215 st ring print_expr_completion;215 std::string print_expr_completion; 216 216 217 217 if (_param._size_data_completion == 0) … … 227 227 { 228 228 bool have_when = false; 229 st ring print_when = "";230 st ring print_and = "";229 std::string print_when = ""; 230 std::string print_and = ""; 231 231 232 232 if (_param._direction == external_direction) … … 253 253 { 254 254 bool have_when = false; 255 st ring print_when = "";256 st ring print_and = "";255 std::string print_when = ""; 256 std::string print_and = ""; 257 257 258 258 if (_param._direction == external_direction)
Note: See TracChangeset
for help on using the changeset viewer.