Changeset 71 for trunk/IPs/systemC/processor/Morpheo/Behavioural/src
- Timestamp:
- Jan 19, 2008, 12:09:01 PM (17 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural/src
- Files:
-
- 23 added
- 46 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Parameters_test.cpp
r43 r71 17 17 { 18 18 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 19 st ring msg = msg_error();19 std::string msg = msg_error(); 20 20 21 21 if (msg.length() != 0) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Statistics.cpp
r53 r71 15 15 #undef FUNCTION 16 16 #define FUNCTION "Statistics::Statistics" 17 Statistics::Statistics (st ring name ,17 Statistics::Statistics (std::string name , 18 18 Parameters_Statistics * parameters_statistics): 19 19 _name (name ), -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Statistics_generate_file.cpp
r43 r71 12 12 #include <sstream> 13 13 #include <fstream> 14 using namespace std;15 14 16 15 namespace morpheo { … … 19 18 #undef FUNCTION 20 19 #define FUNCTION "Statistics::generate_file" 21 void Statistics::generate_file(st ring stat)20 void Statistics::generate_file(std::string stat) 22 21 { 23 22 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 24 23 25 ostringstream filename;24 std::stringstream filename; 26 25 filename << _name << ".stat"; 27 26 28 cout << "Generate file \""<< filename.str() << "\"" <<endl;27 std::cout << "Generate file \""<< filename.str() << "\"" << std::endl; 29 28 30 ofstream file;31 file.open(filename.str().c_str(), ios::out |ios::trunc);29 std::ofstream file; 30 file.open(filename.str().c_str(),std::ios::out | std::ios::trunc); 32 31 33 32 time_t current_time; … … 35 34 36 35 // print header 37 file << "<!-- " << endl38 << "\tfile : " << filename.str() << endl36 file << "<!-- " << std::endl 37 << "\tfile : " << filename.str() << std::endl 39 38 << "\tdate : " << ctime (¤t_time ) 40 << "\tcomment : it's a autogenerated file : don't modify" << endl41 << "-->" << endl42 << endl;39 << "\tcomment : it's a autogenerated file : don't modify" << std::endl 40 << "-->" << std::endl 41 << std::endl; 43 42 44 43 file << stat; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl.cpp
r43 r71 15 15 #undef FUNCTION 16 16 #define FUNCTION "Vhdl::Vhdl" 17 Vhdl::Vhdl (st ringname):17 Vhdl::Vhdl (std::string name): 18 18 _name (name) 19 19 { -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_direction_toString.cpp
r43 r71 11 11 12 12 #include <sstream> 13 using namespace std;14 13 15 14 namespace morpheo { … … 18 17 #undef FUNCTION 19 18 #define FUNCTION "Vhdl::direction_toString" 20 st ring Vhdl::direction_toString (direction_t direction)19 std::string Vhdl::direction_toString (direction_t direction) 21 20 { 22 21 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 23 22 24 st ring _return;23 std::string _return; 25 24 switch (direction) 26 25 { -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_generate_file_model.cpp
r15 r71 11 11 #include <sstream> 12 12 #include <fstream> 13 using namespace std;14 13 15 14 namespace morpheo { … … 20 19 log_printf(FUNC,Behavioural,"generate_file_model","Begin"); 21 20 22 st ring filename = _name + ".vhdl";21 std::string filename = _name + ".vhdl"; 23 22 24 23 log_printf(TRACE,Behavioural,"generate_file_model","print %s",filename.c_str()); 25 cout << "Generate file \""<< filename << "\"" <<endl;24 std::cout << "Generate file \""<< filename << "\"" << std::endl; 26 25 27 26 log_printf(TRACE,Behavioural,"generate_file_model","declaration"); 28 ofstream file;27 std::ofstream file; 29 28 30 29 log_printf(TRACE,Behavioural,"generate_file_model","open file"); 31 file.open(filename.c_str(), ios::out |ios::trunc);30 file.open(filename.c_str(),std::ios::out | std::ios::trunc); 32 31 33 32 log_printf(TRACE,Behavioural,"generate_file_model","get model"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_generate_file_package.cpp
r2 r71 11 11 #include <sstream> 12 12 #include <fstream> 13 using namespace std;14 13 15 14 namespace morpheo { … … 20 19 log_printf(FUNC,Behavioural,"generate_file_package","Begin"); 21 20 22 st ring name = _name + "_Pack";23 st ring filename = name + ".vhdl";21 std::string name = _name + "_Pack"; 22 std::string filename = name + ".vhdl"; 24 23 25 cout << "Generate file \""<< filename << "\"" <<endl;24 std::cout << "Generate file \""<< filename << "\"" << std::endl; 26 25 27 ofstream file;28 file.open(filename.c_str(), ios::out |ios::trunc);26 std::ofstream file; 27 file.open(filename.c_str(),std::ios::out | std::ios::trunc); 29 28 30 29 file << get_package (0,filename, name, _name); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_alias.cpp
r43 r71 11 11 12 12 #include <sstream> 13 using namespace std;14 13 15 14 namespace morpheo { … … 18 17 #undef FUNCTION 19 18 #define FUNCTION "Vhdl::get_alias" 20 st ring Vhdl::get_alias (uint32_t depth)19 std::string Vhdl::get_alias (uint32_t depth) 21 20 { 22 21 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 23 st ring _return = get_list(_list_alias, depth, ";", true);22 std::string _return = get_list(_list_alias, depth, ";", true); 24 23 log_printf(FUNC,Behavioural,FUNCTION,"End"); 25 24 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_architecture.cpp
r43 r71 11 11 12 12 #include <sstream> 13 using namespace std;14 13 15 14 namespace morpheo { … … 18 17 #undef FUNCTION 19 18 #define FUNCTION "Vhdl::get_architecture" 20 st ring Vhdl::get_architecture (uint32_t depth ,21 st ring name ,22 st ring entity_name)19 std::string Vhdl::get_architecture (uint32_t depth , 20 std::string name , 21 std::string entity_name) 23 22 { 24 23 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 25 24 26 st ring tab =string(depth,'\t');27 ostringstream text;25 std::string tab = std::string(depth,'\t'); 26 std::ostringstream text; 28 27 29 text << tab << "architecture " << name << " of " << entity_name << " is" << endl30 << tab << get_type (depth+1) << endl31 << tab << get_signal (depth+1) << endl32 << tab << get_alias (depth+1) << endl33 << tab << "begin" << endl34 << tab << get_body (depth+1) << endl35 << tab << "end " << name << ";" << endl;28 text << tab << "architecture " << name << " of " << entity_name << " is" << std::endl 29 << tab << get_type (depth+1) << std::endl 30 << tab << get_signal (depth+1) << std::endl 31 << tab << get_alias (depth+1) << std::endl 32 << tab << "begin" << std::endl 33 << tab << get_body (depth+1) << std::endl 34 << tab << "end " << name << ";" << std::endl; 36 35 37 36 log_printf(FUNC,Behavioural,FUNCTION,"End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_body.cpp
r43 r71 11 11 12 12 #include <sstream> 13 using namespace std;14 13 15 14 namespace morpheo { … … 18 17 #undef FUNCTION 19 18 #define FUNCTION "Vhdl::get_body" 20 st ring Vhdl::get_body (uint32_t depth)19 std::string Vhdl::get_body (uint32_t depth) 21 20 { 22 21 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 23 st ring _return = get_list(_list_body,depth,"",true);22 std::string _return = get_list(_list_body,depth,"",true); 24 23 log_printf(FUNC,Behavioural,FUNCTION,"End"); 25 24 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_component.cpp
r43 r71 11 11 12 12 #include <sstream> 13 using namespace std;14 13 15 14 namespace morpheo { … … 18 17 #undef FUNCTION 19 18 #define FUNCTION "Vhdl::get_component" 20 st ring Vhdl::get_component(uint32_t depth,21 st ring name)19 std::string Vhdl::get_component(uint32_t depth, 20 std::string name) 22 21 { 23 22 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 24 23 25 st ring tab =string(depth,'\t');26 ostringstream text;24 std::string tab = std::string(depth,'\t'); 25 std::ostringstream text; 27 26 28 text << endl29 << tab << "component " << name << endl;27 text << std::endl 28 << tab << "component " << name << std::endl; 30 29 if (_list_port.empty() == false) 31 text << tab << "\tport (" << endl32 << tab << get_port(depth+1) << endl33 << tab << "\t );" << endl;34 text << tab << "end component;" << endl;35 30 text << tab << "\tport (" << std::endl 31 << tab << get_port(depth+1) << std::endl 32 << tab << "\t );" << std::endl; 33 text << tab << "end component;" << std::endl; 34 36 35 log_printf(FUNC,Behavioural,FUNCTION,"End"); 37 36 return text.str(); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_entity.cpp
r43 r71 11 11 12 12 #include <sstream> 13 using namespace std;14 13 15 14 namespace morpheo { … … 18 17 #undef FUNCTION 19 18 #define FUNCTION "Vhdl::get_entity" 20 st ring Vhdl::get_entity(uint32_t depth,21 string name)19 std::string Vhdl::get_entity(uint32_t depth, 20 std::string name) 22 21 { 23 22 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 24 23 25 st ring tab =string(depth,'\t');26 ostringstream text;24 std::string tab = std::string(depth,'\t'); 25 std::ostringstream text; 27 26 28 text << endl29 << tab << "entity " << name << " is" << endl;30 27 text << std::endl 28 << tab << "entity " << name << " is" << std::endl; 29 31 30 if (_list_port.empty() == false) 32 text << tab << "\tport (" << endl33 << tab << get_port(depth+1) << endl34 << tab << "\t );" << endl;31 text << tab << "\tport (" << std::endl 32 << tab << get_port(depth+1) << std::endl 33 << tab << "\t );" << std::endl; 35 34 36 text << tab << "end " << name << ";" << endl;35 text << tab << "end " << name << ";" << std::endl; 37 36 38 37 log_printf(FUNC,Behavioural,FUNCTION,"End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_header.cpp
r43 r71 11 11 #include <time.h> 12 12 #include <sstream> 13 using namespace std;14 13 15 14 namespace morpheo { … … 18 17 #undef FUNCTION 19 18 #define FUNCTION "Vhdl::get_header" 20 st ring Vhdl::get_header(uint32_t depth,21 st ring filename)19 std::string Vhdl::get_header(uint32_t depth, 20 std::string filename) 22 21 { 23 22 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 24 23 25 st ring tab =string(depth,'\t');26 ostringstream text;24 std::string tab = std::string(depth,'\t'); 25 std::ostringstream text; 27 26 28 27 time_t current_time; 29 28 time (¤t_time); 30 29 31 text << tab << "-------------------------------------------------------------------------------" << endl32 << tab << "-- file : " << filename << endl30 text << tab << "-------------------------------------------------------------------------------" << std::endl 31 << tab << "-- file : " << filename << std::endl 33 32 << tab << "-- date : " << ctime (¤t_time ) 34 << tab << "-- comment : it's a autogenerated file : don't modify" << endl35 << tab << "-------------------------------------------------------------------------------" << endl;33 << tab << "-- comment : it's a autogenerated file : don't modify" << std::endl 34 << tab << "-------------------------------------------------------------------------------" << std::endl; 36 35 37 36 log_printf(FUNC,Behavioural,FUNCTION,"End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_library_ieee.cpp
r43 r71 11 11 12 12 #include <sstream> 13 using namespace std;14 13 15 14 namespace morpheo { … … 18 17 #undef FUNCTION 19 18 #define FUNCTION "Vhdl::get_library_ieee" 20 st ring Vhdl::get_library_ieee (uint32_t depth)19 std::string Vhdl::get_library_ieee (uint32_t depth) 21 20 { 22 21 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 23 22 24 st ring tab =string(depth,'\t');25 ostringstream text;23 std::string tab = std::string(depth,'\t'); 24 std::ostringstream text; 26 25 27 text << tab << endl28 << tab << "library ieee;" << endl29 << tab << "use ieee.numeric_bit.all;" << endl30 << tab << "use ieee.numeric_std.all;" << endl31 << tab << "use ieee.std_logic_1164.all;" << endl32 << tab << "use ieee.std_logic_arith.all;" << endl33 << tab << "use ieee.std_logic_misc.all;" << endl34 << tab << "--use ieee.std_logic_signed.all;" <<endl35 << tab << "use ieee.std_logic_unsigned.all;" << endl36 << tab << "--use ieee.std_logic_textio.all;" <<endl;26 text << tab << std::endl 27 << tab << "library ieee;" << std::endl 28 << tab << "use ieee.numeric_bit.all;" << std::endl 29 << tab << "use ieee.numeric_std.all;" << std::endl 30 << tab << "use ieee.std_logic_1164.all;" << std::endl 31 << tab << "use ieee.std_logic_arith.all;" << std::endl 32 << tab << "use ieee.std_logic_misc.all;" << std::endl 33 << tab << "--use ieee.std_logic_signed.all;" << std::endl 34 << tab << "use ieee.std_logic_unsigned.all;" << std::endl 35 << tab << "--use ieee.std_logic_textio.all;" << std::endl; 37 36 38 37 log_printf(FUNC,Behavioural,FUNCTION,"End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_library_work.cpp
r43 r71 11 11 12 12 #include <sstream> 13 using namespace std;14 13 15 14 namespace morpheo { … … 18 17 #undef FUNCTION 19 18 #define FUNCTION "Vhdl::get_library_work" 20 st ring Vhdl::get_library_work (uint32_t depth)19 std::string Vhdl::get_library_work (uint32_t depth) 21 20 { 22 21 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 23 22 24 list<string>::iterator i = _list_library_work.begin();25 st ring tab =string(depth,'\t');26 ostringstream text;23 std::list<std::string>::iterator i = _list_library_work.begin(); 24 std::string tab = std::string(depth,'\t'); 25 std::ostringstream text; 27 26 28 27 if (i != _list_library_work.end()) 29 text << tab << endl30 << tab << "library work;" << endl28 text << tab << std::endl 29 << tab << "library work;" << std::endl 31 30 << get_list(_list_library_work,depth,";",true); 32 31 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_list.cpp
r43 r71 11 11 12 12 #include <sstream> 13 using namespace std;14 13 15 14 namespace morpheo { … … 18 17 #undef FUNCTION 19 18 #define FUNCTION "Vhdl::get_list" 20 st ring Vhdl::get_list (list<string> liste ,21 uint32_t depth ,22 string separator ,23 bool last_separator )19 std::string Vhdl::get_list (std::list<std::string> liste , 20 uint32_t depth , 21 std::string separator , 22 bool last_separator ) 24 23 { 25 24 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 26 25 27 list<string>::iterator i = liste.begin();28 bool empty = liste.empty();26 std::list<std::string>::iterator i = liste.begin(); 27 bool empty = liste.empty(); 29 28 30 st ring tab =string(depth,'\t');31 ostringstream text;29 std::string tab = std::string(depth,'\t'); 30 std::ostringstream text; 32 31 33 32 if (not empty) … … 42 41 while (i != liste.end()) 43 42 { 44 text << separator << endl;43 text << separator << std::endl; 45 44 text << tab << *i; 46 45 ++i; … … 48 47 49 48 if (last_separator) 50 text << separator << endl;49 text << separator << std::endl; 51 50 } 52 51 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_model.cpp
r2 r71 11 11 12 12 #include <sstream> 13 using namespace std;14 13 15 14 namespace morpheo { 16 15 namespace behavioural { 17 16 18 st ring Vhdl::get_model(uint32_t depth ,19 st ring filename ,20 st ring entity_name ,21 st ring architecture_name)17 std::string Vhdl::get_model(uint32_t depth , 18 std::string filename , 19 std::string entity_name , 20 std::string architecture_name) 22 21 { 23 22 log_printf(FUNC,Behavioural,"get_model","Begin"); 24 23 25 st ring tab =string(depth,'\t');26 ostringstream text;24 std::string tab = std::string(depth,'\t'); 25 std::ostringstream text; 27 26 28 text << tab << get_header (depth,filename) << endl29 << tab << get_library_ieee (depth) << endl30 << tab << get_library_work (depth) << endl31 << tab << get_entity (depth,entity_name) << endl32 << tab << get_architecture (depth,architecture_name,entity_name) << endl;27 text << tab << get_header (depth,filename) << std::endl 28 << tab << get_library_ieee (depth) << std::endl 29 << tab << get_library_work (depth) << std::endl 30 << tab << get_entity (depth,entity_name) << std::endl 31 << tab << get_architecture (depth,architecture_name,entity_name) << std::endl; 33 32 34 33 log_printf(FUNC,Behavioural,"get_model","End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_package.cpp
r43 r71 11 11 12 12 #include <sstream> 13 using namespace std;14 13 15 14 namespace morpheo { … … 18 17 #undef FUNCTION 19 18 #define FUNCTION "Vhdl::get_package" 20 st ring Vhdl::get_package(uint32_t depth ,21 st ring filename ,22 st ring package_name,23 st ring entity_name )19 std::string Vhdl::get_package(uint32_t depth , 20 std::string filename , 21 std::string package_name, 22 std::string entity_name ) 24 23 { 25 24 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 26 25 27 st ring tab =string(depth,'\t');28 ostringstream text;26 std::string tab = std::string(depth,'\t'); 27 std::ostringstream text; 29 28 30 text << tab << get_header (depth,filename) << endl31 << tab << get_library_ieee (depth) << endl32 << tab << "package " << package_name << " is" << endl33 << tab << get_component (depth+1,entity_name) << endl34 << tab << "end " << package_name << ";" << endl;29 text << tab << get_header (depth,filename) << std::endl 30 << tab << get_library_ieee (depth) << std::endl 31 << tab << "package " << package_name << " is" << std::endl 32 << tab << get_component (depth+1,entity_name) << std::endl 33 << tab << "end " << package_name << ";" << std::endl; 35 34 36 35 log_printf(FUNC,Behavioural,FUNCTION,"End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_port.cpp
r43 r71 11 11 12 12 #include <sstream> 13 using namespace std;14 13 15 14 namespace morpheo { … … 18 17 #undef FUNCTION 19 18 #define FUNCTION "Vhdl::get_port" 20 st ring Vhdl::get_port (uint32_t depth)19 std::string Vhdl::get_port (uint32_t depth) 21 20 { 22 21 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 23 st ring _return = get_list (_list_port, depth, ";", false);22 std::string _return = get_list (_list_port, depth, ";", false); 24 23 log_printf(FUNC,Behavioural,FUNCTION,"End"); 25 24 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_signal.cpp
r43 r71 11 11 12 12 #include <sstream> 13 using namespace std;14 13 15 14 namespace morpheo { … … 18 17 #undef FUNCTION 19 18 #define FUNCTION "Vhdl::get_signal" 20 st ring Vhdl::get_signal (uint32_t depth)19 std::string Vhdl::get_signal (uint32_t depth) 21 20 { 22 21 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 23 st ring _return = get_list (_list_signal, depth, ";", true);22 std::string _return = get_list (_list_signal, depth, ";", true); 24 23 log_printf(FUNC,Behavioural,FUNCTION,"End"); 25 24 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_type.cpp
r43 r71 11 11 12 12 #include <sstream> 13 using namespace std;14 13 15 14 namespace morpheo { … … 18 17 #undef FUNCTION 19 18 #define FUNCTION "Vhdl::get_type" 20 st ring Vhdl::get_type (uint32_t depth)19 std::string Vhdl::get_type (uint32_t depth) 21 20 { 22 21 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 23 st ring _return = get_list (_list_type, depth, ";", true);22 std::string _return = get_list (_list_type, depth, ";", true); 24 23 log_printf(FUNC,Behavioural,FUNCTION,"End"); 25 24 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_alias.cpp
r69 r71 11 11 12 12 #include <sstream> 13 using namespace std;14 13 15 14 namespace morpheo { … … 18 17 #undef FUNCTION 19 18 #define FUNCTION "Vhdl::set_alias" 20 void Vhdl::set_alias (st ring name1 ,21 st ring type1 ,22 st ring name2 ,23 st ring range2)19 void Vhdl::set_alias (std::string name1 , 20 std::string type1 , 21 std::string name2 , 22 std::string range2) 24 23 { 25 24 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); … … 28 27 }; 29 28 30 void Vhdl::set_alias (st ring name1 ,29 void Vhdl::set_alias (std::string name1 , 31 30 uint32_t size1 , 32 st ring name2 ,33 st ring range2)31 std::string name2 , 32 std::string range2) 34 33 { 35 34 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_body.cpp
r43 r71 11 11 12 12 #include <sstream> 13 using namespace std;14 13 15 14 namespace morpheo { … … 18 17 #undef FUNCTION 19 18 #define FUNCTION "Vhdl::set_body" 20 void Vhdl::set_body (st ring text )19 void Vhdl::set_body (std::string text ) 21 20 { 22 21 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_body_component.cpp
r43 r71 11 11 12 12 #include <sstream> 13 using namespace std;14 13 15 14 namespace morpheo { … … 18 17 #undef FUNCTION 19 18 #define FUNCTION "Vhdl::set_body_component" 20 void Vhdl::set_body_component (st ring name_instance ,21 st ring name_component ,22 list<string> list_port_map )19 void Vhdl::set_body_component (std::string name_instance , 20 std::string name_component , 21 std::list<std::string> list_port_map ) 23 22 { 24 23 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_body_component_port_map.cpp
r65 r71 11 11 12 12 #include <sstream> 13 using namespace std;14 13 15 14 namespace morpheo { … … 18 17 #undef FUNCTION 19 18 #define FUNCTION "Vhdl::set_body_component_port_map" 20 void Vhdl::set_body_component_port_map ( list<string> & list_port_map ,21 st ring name_port ,19 void Vhdl::set_body_component_port_map (std::list<std::string> & list_port_map , 20 std::string name_port , 22 21 uint32_t size_port , 23 st ring name_signal ,22 std::string name_signal , 24 23 uint32_t size_signal ) 25 24 { … … 29 28 throw (ErrorMorpheo ("<Vhdl::set_body_component_port_map> size of port '"+name_port+"' ("+toString(size_port)+") is greater than size of signal '"+name_signal+"' ("+toString(size_signal)+").")); 30 29 31 st ring str_size = "";30 std::string str_size = ""; 32 31 33 32 // test if size is different (possible if multi write -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_constant.cpp
r43 r71 11 11 12 12 #include <sstream> 13 using namespace std;14 13 15 14 namespace morpheo { … … 18 17 #undef FUNCTION 19 18 #define FUNCTION "Vhdl::set_constant" 20 void Vhdl::set_constant (st ring name ,21 st ring type ,22 st ring init)19 void Vhdl::set_constant (std::string name , 20 std::string type , 21 std::string init) 23 22 { 24 23 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); … … 27 26 }; 28 27 29 void Vhdl::set_constant (st ring name ,28 void Vhdl::set_constant (std::string name , 30 29 uint32_t size , 31 st ring init)30 std::string init) 32 31 { 33 32 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); … … 36 35 }; 37 36 38 void Vhdl::set_constant (st ring name ,37 void Vhdl::set_constant (std::string name , 39 38 uint32_t size , 40 39 uint32_t init) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_library_work.cpp
r43 r71 11 11 12 12 #include <sstream> 13 using namespace std;14 13 15 14 namespace morpheo { … … 18 17 #undef FUNCTION 19 18 #define FUNCTION "Vhdl::set_library_work" 20 void Vhdl::set_library_work (st ring package_name)19 void Vhdl::set_library_work (std::string package_name) 21 20 { 22 21 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_list.cpp
r43 r71 11 11 12 12 #include <sstream> 13 using namespace std;14 13 15 14 namespace morpheo { … … 18 17 #undef FUNCTION 19 18 #define FUNCTION "Vhdl::set_list" 20 void Vhdl::set_list ( list<string> & liste,21 st ring text )19 void Vhdl::set_list (std::list<std::string> & liste, 20 std::string text ) 22 21 { 23 22 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_port.cpp
r43 r71 11 11 12 12 #include <sstream> 13 using namespace std;14 13 15 14 namespace morpheo { … … 18 17 #undef FUNCTION 19 18 #define FUNCTION "Vhdl::set_port" 20 void Vhdl::set_port (st ring name ,19 void Vhdl::set_port (std::string name , 21 20 direction_t direction, 22 st ring type )21 std::string type ) 23 22 { 24 23 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); … … 27 26 }; 28 27 29 void Vhdl::set_port (st ring name ,28 void Vhdl::set_port (std::string name , 30 29 direction_t direction, 31 30 uint32_t size ) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_signal.cpp
r43 r71 11 11 12 12 #include <sstream> 13 using namespace std;14 13 15 14 namespace morpheo { … … 19 18 #define FUNCTION "Vhdl::set_signal" 20 19 21 void Vhdl::set_signal (st ring name ,22 st ring type )20 void Vhdl::set_signal (std::string name , 21 std::string type ) 23 22 { 24 23 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); … … 27 26 }; 28 27 29 void Vhdl::set_signal (st ring name ,28 void Vhdl::set_signal (std::string name , 30 29 uint32_t size ) 31 30 { … … 35 34 } 36 35 37 void Vhdl::set_signal (st ring name ,38 st ring type ,39 st ring init)36 void Vhdl::set_signal (std::string name , 37 std::string type , 38 std::string init) 40 39 { 41 40 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); … … 44 43 }; 45 44 46 void Vhdl::set_signal (st ring name ,45 void Vhdl::set_signal (std::string name , 47 46 uint32_t size , 48 st ring init )47 std::string init ) 49 48 { 50 49 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); … … 52 51 log_printf(FUNC,Behavioural,FUNCTION,"End"); 53 52 }; 54 void Vhdl::set_signal (st ring name ,53 void Vhdl::set_signal (std::string name , 55 54 uint32_t size , 56 55 uint32_t init ) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_type.cpp
r43 r71 11 11 12 12 #include <sstream> 13 using namespace std;14 13 15 14 namespace morpheo { … … 18 17 #undef FUNCTION 19 18 #define FUNCTION "Vhdl::set_type" 20 void Vhdl::set_type (st ring name ,21 st ring type )19 void Vhdl::set_type (std::string name , 20 std::string type ) 22 21 { 23 22 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_std_logic.cpp
r67 r71 16 16 #undef FUNCTION 17 17 #define FUNCTION "Vhdl::std_logic" 18 st ring std_logic (uint32_t size)18 std::string std_logic (uint32_t size) 19 19 { 20 20 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 21 21 22 st ring type;22 std::string type; 23 23 24 24 if (size == 1) … … 34 34 #undef FUNCTION 35 35 #define FUNCTION "Vhdl::std_logic_conv" 36 st ring std_logic_conv (uint32_t size,string value)36 std::string std_logic_conv (uint32_t size, std::string value) 37 37 { 38 38 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 39 39 40 st ring conv;40 std::string conv; 41 41 42 42 if (size == 1) … … 50 50 }; 51 51 52 st ring std_logic_conv (uint32_t size, uint32_t value)52 std::string std_logic_conv (uint32_t size, uint32_t value) 53 53 { 54 54 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 55 cout << toString(value) << endl; 56 string _return = std_logic_conv(size,toString(value)); 55 std::string _return = std_logic_conv(size,toString(value)); 57 56 log_printf(FUNC,Behavioural,FUNCTION,"End"); 58 57 … … 62 61 #undef FUNCTION 63 62 #define FUNCTION "Vhdl::std_logic_range" 64 st ring std_logic_range (uint32_t size, uint32_t max, uint32_t min)63 std::string std_logic_range (uint32_t size, uint32_t max, uint32_t min) 65 64 { 66 65 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 67 st ring type;66 std::string type; 68 67 69 68 if (size < 2) … … 80 79 }; 81 80 82 st ring std_logic_range (uint32_t max, uint32_t min)81 std::string std_logic_range (uint32_t max, uint32_t min) 83 82 { 84 83 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 85 st ring type;84 std::string type; 86 85 87 86 if (max == 0) … … 98 97 }; 99 98 100 st ring std_logic_range (uint32_t size)99 std::string std_logic_range (uint32_t size) 101 100 { 102 101 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 103 st ring _return = std_logic_range(size-1,0);102 std::string _return = std_logic_range(size-1,0); 104 103 log_printf(FUNC,Behavioural,FUNCTION,"End"); 105 104 … … 109 108 #undef FUNCTION 110 109 #define FUNCTION "Vhdl::std_logic_others" 111 st ring std_logic_others (uint32_t size, uint32_t cst )110 std::string std_logic_others (uint32_t size, uint32_t cst ) 112 111 { 113 112 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 114 113 115 st ring _return;114 std::string _return; 116 115 117 116 if (size < 2) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/XML.cpp
r43 r71 13 13 #undef FUNCTION 14 14 #define FUNCTION "XML::XML" 15 XML::XML (st ring name) :15 XML::XML (std::string name) : 16 16 _name (name) 17 17 { -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/XML_attribut.cpp
r43 r71 13 13 #undef FUNCTION 14 14 #define FUNCTION "XML::attribut" 15 bool XML::attribut (st ring name,string value)15 bool XML::attribut (std::string name, std::string value) 16 16 { 17 17 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/XML_balise_close.cpp
r43 r71 16 16 { 17 17 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 18 st ring name=*(_list_balise_name.begin());18 std::string name=*(_list_balise_name.begin()); 19 19 20 20 _list_balise_name.pop_front(); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/XML_balise_open.cpp
r43 r71 13 13 #undef FUNCTION 14 14 #define FUNCTION "XML::balise_open" 15 bool XML::balise_open (st ring name)15 bool XML::balise_open (std::string name) 16 16 { 17 17 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/XML_balise_open_begin.cpp
r43 r71 13 13 #undef FUNCTION 14 14 #define FUNCTION "XML::balise_open_begin" 15 bool XML::balise_open_begin (st ring name)15 bool XML::balise_open_begin (std::string name) 16 16 { 17 17 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/XML_comment.cpp
r43 r71 13 13 #undef FUNCTION 14 14 #define FUNCTION "XML::comment" 15 bool XML::comment (st ring texte)15 bool XML::comment (std::string texte) 16 16 { 17 17 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/XML_filename_extension.cpp
r43 r71 8 8 #include "Behavioural/include/XML.h" 9 9 #include <fstream> 10 using namespace std;11 10 12 11 namespace morpheo { … … 15 14 #undef FUNCTION 16 15 #define FUNCTION "XML::filename_extension" 17 void XML::filename_extension (st ring extension)16 void XML::filename_extension (std::string extension) 18 17 { 19 18 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/XML_generate_file.cpp
r43 r71 8 8 #include "Behavioural/include/XML.h" 9 9 #include <fstream> 10 using namespace std;11 10 12 11 namespace morpheo { … … 15 14 #undef FUNCTION 16 15 #define FUNCTION "XML::generate_file" 17 void XML::generate_file (st ring encoding)16 void XML::generate_file (std::string encoding) 18 17 { 19 18 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); … … 21 20 header (encoding); 22 21 23 string name = _name; 24 string filename = name + "." + _filename_extension; 22 std::string filename = _name + "." + _filename_extension; 25 23 26 cout << "Generate file \""<< filename << "\"" <<endl;24 std::cout << "Generate file \""<< filename << "\"" << std::endl; 27 25 28 ofstream file;29 file.open(filename.c_str(), ios::out |ios::trunc);26 std::ofstream file; 27 file.open(filename.c_str(),std::ios::out | std::ios::trunc); 30 28 31 29 file << get_body(); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/XML_get_body.cpp
r43 r71 13 13 #undef FUNCTION 14 14 #define FUNCTION "XML::get_body" 15 st ring XML::get_body (void)15 std::string XML::get_body (void) 16 16 { 17 17 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); … … 20 20 }; 21 21 22 st ring XML::get_body (uint32_t depth)22 std::string XML::get_body (uint32_t depth) 23 23 { 24 24 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 25 25 26 st ring body = _body;27 st ring tabulation = indent(depth);26 std::string body = _body; 27 std::string tabulation = indent(depth); 28 28 29 body.insert(0,tabulation);29 // body.insert(0,tabulation); 30 30 for (size_t pos=body.find('\n',0); pos<body.length()-1; pos=body.find('\n',++pos)) 31 31 body.insert(++pos,tabulation); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/XML_header.cpp
r43 r71 13 13 #undef FUNCTION 14 14 #define FUNCTION "XML::header" 15 void XML::header (st ring encoding)15 void XML::header (std::string encoding) 16 16 { 17 17 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 18 _body = "<?xml version=\"1.0\" encoding=\""+encoding+"\" ?>\n" + _body; 18 19 time_t current_time; 20 time (¤t_time); 21 22 std::string str_time = ctime (¤t_time ); 23 24 std::string str; 25 26 str = "<?xml version=\"1.0\" encoding=\""+encoding+"\" ?>\n"; 27 str += "\n"; 28 str += "<!--\n"; 29 str += "\tFile : " + _name+"."+_filename_extension + "\n"; 30 str += "\tDate : " + str_time +"\n"; 31 str += "\tComment : it's a autogenerated file : don't modify\n"; 32 str += "-->\n"; 33 str += "\n"; 34 35 _body = str + _body; 36 19 37 log_printf(FUNC,Behavioural,FUNCTION,"End"); 20 38 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/XML_indent.cpp
r43 r71 13 13 #undef FUNCTION 14 14 #define FUNCTION "XML::indent" 15 st ring XML::indent (uint32_t depth)15 std::string XML::indent (uint32_t depth) 16 16 { 17 17 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 18 st ring _return =string(depth,'\t');18 std::string _return = std::string(depth,'\t'); 19 19 log_printf(FUNC,Behavioural,FUNCTION,"End"); 20 20 … … 22 22 }; 23 23 24 st ring XML::indent (void)24 std::string XML::indent (void) 25 25 { 26 26 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 27 st ring _return = indent(depth());27 std::string _return = indent(depth()); 28 28 log_printf(FUNC,Behavioural,FUNCTION,"End"); 29 29 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/XML_singleton.cpp
r43 r71 13 13 #undef FUNCTION 14 14 #define FUNCTION "XML::singleton" 15 bool XML::singleton (st ring name)15 bool XML::singleton (std::string name) 16 16 { 17 17 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/XML_singleton_begin.cpp
r43 r71 13 13 #undef FUNCTION 14 14 #define FUNCTION "XML::singleton_begin" 15 bool XML::singleton_begin (st ring name)15 bool XML::singleton_begin (std::string name) 16 16 { 17 17 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/XML_text.cpp
r43 r71 13 13 #undef FUNCTION 14 14 #define FUNCTION "XML::text" 15 bool XML::text (st ring text)15 bool XML::text (std::string text) 16 16 { 17 17 log_printf(FUNC,Behavioural,FUNCTION,"Begin");
Note: See TracChangeset
for help on using the changeset viewer.