Changeset 94 for trunk/IPs/systemC/processor/Morpheo/Behavioural/src
- Timestamp:
- Dec 15, 2008, 12:04:03 PM (16 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural/src
- Files:
-
- 2 added
- 23 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_get_component.cpp
r81 r94 7 7 8 8 #include "Behavioural/include/Component.h" 9 #include "Common/include/Tabulation.h" 9 10 10 11 namespace morpheo { … … 25 26 bool empty = _list_component->empty(); 26 27 27 std::string tab = std::string(depth,'\t'); 28 std::string tab=morpheo::tab(depth); 29 28 30 std::ostringstream text; 29 31 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_test_map.cpp
r88 r94 2 2 * $Id$ 3 3 * 4 * [ 4 * [ Description ] 5 5 * 6 6 */ 7 7 8 8 #include "Behavioural/include/Component.h" 9 #include "Common/include/Tabulation.h" 9 10 10 11 namespace morpheo { … … 23 24 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 24 25 25 std::string tab = std::string(depth,' ');26 std::string tab = morpheo::tab(depth); 26 27 std::string name = _entity->get_name(); 27 28 bool test_ok = true; … … 80 81 // log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 81 82 82 // std::string tab = std::string(depth,'\t');83 // std::string tab = tab(depth); 83 84 // std::string name = _entity->get_name(); 84 85 // bool test_ok = true; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_test_map.cpp
r88 r94 7 7 8 8 #include "Behavioural/include/Entity.h" 9 #include "Common/include/Tabulation.h" 9 10 #include <iostream> 10 11 … … 18 19 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 19 20 20 std::string tab = std::string(depth,' '); 21 std::string tab=morpheo::tab(depth); 22 21 23 log_printf(INFO,Interface,FUNCTION,"%s* Entity \"%s\"",tab.c_str(),_name.c_str()); 22 24 … … 41 43 // log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 42 44 43 // std::string tab = std::string(depth,'\t');45 // std::string tab = tab(depth); 44 46 // log_printf(INFO,Behavioural,FUNCTION, "%s* Entity \"%s\"",tab.c_str(),_name.c_str()); 45 47 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_fifo_testbench_assert.cpp
r88 r94 39 39 ++i; 40 40 } 41 42 vhdl->set_body("");43 41 } 44 42 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_get_signal.cpp
r81 r94 7 7 8 8 #include "Behavioural/include/Interface.h" 9 9 #include "Common/include/Tabulation.h" 10 10 11 11 namespace morpheo { … … 24 24 bool empty = _list_signal->empty(); 25 25 26 std::string tab = std::string(depth,'\t');26 std::string tab = morpheo::tab(depth); 27 27 std::ostringstream text; 28 28 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_test_map.cpp
r88 r94 7 7 8 8 #include "Behavioural/include/Interface.h" 9 9 #include "Common/include/Tabulation.h" 10 10 11 11 namespace morpheo { … … 18 18 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 19 19 20 std::string tab = std::string(depth,' ');20 std::string tab = morpheo::tab(depth); 21 21 bool _return = true; 22 22 … … 39 39 // log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 40 40 41 // std::string tab = std::string(depth,'\t');41 // std::string tab = tab(depth); 42 42 // bool _return = true; 43 43 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_get_interface.cpp
r81 r94 7 7 8 8 #include "Behavioural/include/Interfaces.h" 9 9 #include "Common/include/Tabulation.h" 10 10 11 11 namespace morpheo { … … 25 25 bool empty = _list_interface->empty(); 26 26 27 std::string tab = std::string(depth,'\t');27 std::string tab = morpheo::tab(depth); 28 28 std::ostringstream text; 29 29 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_test_map.cpp
r88 r94 7 7 8 8 #include "Behavioural/include/Interfaces.h" 9 9 #include "Common/include/Tabulation.h" 10 10 11 11 namespace morpheo { … … 18 18 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 19 19 20 std::string tab = std::string(depth,' ');20 std::string tab = morpheo::tab(depth); 21 21 22 22 bool _return = true; … … 40 40 // log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 41 41 42 // std::string tab = std::string(depth,'\t');42 // std::string tab = tab(depth); 43 43 44 44 // bool _return = true; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_testbench_generate_file.cpp
r88 r94 99 99 (*it)->testbench_assert (vhdl_assert,counter); 100 100 101 vhdl->set_body( vhdl_assert);101 vhdl->set_body(3,vhdl_assert); 102 102 103 103 delete vhdl_assert; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_test_map.cpp
r88 r94 7 7 8 8 #include "Behavioural/include/Signal.h" 9 9 #include "Common/include/Tabulation.h" 10 10 11 11 namespace morpheo { … … 19 19 20 20 std::string str = ""; 21 std::string tab = std::string(depth,' ');21 std::string tab = morpheo::tab(depth); 22 22 bool _return = true; 23 23 … … 166 166 167 167 // std::string str = ""; 168 // std::string tab = std::string(depth,'\t');168 // std::string tab = tab(depth); 169 169 // bool _return = true; 170 170 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Stat_binary_tree_valid.cpp
r88 r94 29 29 } 30 30 31 void Stat_binary_tree::print (uint32_t depth)32 {33 std::string tab = std::string(depth,'\t');34 std::string sep = " ";35 if (_data_type == NONE)36 {37 std::cout << tab << "<node> NONE (error)" << std::endl;38 39 if (_left != NULL)40 _left ->print(depth+1);41 if (_right != NULL)42 _right->print(depth+1);43 }44 45 if ((_data_type == VARIABLE) or46 (_data_type == CONSTANT))47 {48 std::cout << tab << "<leaf>"49 << " "50 << ((_left == NULL)?"left == NULL ":"left != NULL (error)")51 << " "52 << ((_right == NULL)?"right == NULL ":"right != NULL (error)")53 << std::endl;54 55 if (_left != NULL)56 _left ->print(depth+1);57 if (_right != NULL)58 _right->print(depth+1);59 }60 61 if (_data_type == OPERATOR_UNARY)62 {63 std::cout << tab << "<unary>"64 << " "65 << ((_left == NULL)?"left == NULL (error)":"left != NULL ")66 << " "67 << ((_right == NULL)?"right == NULL ":"right != NULL (error)")68 << std::endl;69 70 if (_left != NULL)71 _left ->print(depth+1);72 if (_right != NULL)73 _right->print(depth+1);74 }75 76 if (_data_type == OPERATOR_BINARY)77 {78 std::cout << tab << "<binary>"79 << " "80 << ((_left == NULL)?"left == NULL (error)":"left != NULL ")81 << " "82 << ((_right == NULL)?"right == NULL (error)":"right != NULL ")83 << std::endl;84 85 if (_left != NULL)86 _left ->print(depth+1);87 if (_right != NULL)88 _right->print(depth+1);89 }90 }91 92 31 }; 93 32 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_architecture.cpp
r81 r94 4 4 * $Id$ 5 5 * 6 * [ 6 * [ Description ] 7 7 * 8 8 */ 9 9 10 10 #include "Behavioural/include/Vhdl.h" 11 #include "Common/include/Tabulation.h" 11 12 12 13 #include <sstream> … … 23 24 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 24 25 25 std::string tab = std::string(depth,'\t');26 std::string tab = morpheo::tab(depth); 26 27 std::ostringstream text; 27 28 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_component.cpp
r81 r94 9 9 10 10 #include "Behavioural/include/Vhdl.h" 11 #include "Common/include/Tabulation.h" 11 12 12 13 #include <sstream> … … 22 23 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 23 24 24 std::string tab = std::string(depth,'\t');25 std::string tab = morpheo::tab(depth); 25 26 std::ostringstream text; 26 27 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_entity.cpp
r81 r94 9 9 10 10 #include "Behavioural/include/Vhdl.h" 11 #include "Common/include/Tabulation.h" 11 12 12 13 #include <sstream> … … 22 23 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 23 24 24 std::string tab = std::string(depth,'\t');25 std::string tab = morpheo::tab(depth); 25 26 std::ostringstream text; 26 27 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_header.cpp
r88 r94 23 23 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 24 24 25 std::string tab = std::string(depth,'\t');26 25 std::string text; 27 26 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_library_ieee.cpp
r81 r94 9 9 10 10 #include "Behavioural/include/Vhdl.h" 11 #include "Common/include/Tabulation.h" 11 12 12 13 #include <sstream> … … 21 22 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 22 23 23 std::string tab = std::string(depth,'\t');24 std::string tab = morpheo::tab(depth); 24 25 std::ostringstream text; 25 26 26 text << tab << std::endl27 << tab << "library ieee;" << std::endl28 << tab << " use ieee.numeric_bit.all;"<< std::endl29 << tab << " use ieee.numeric_std.all;"<< std::endl30 << tab << " use ieee.std_logic_1164.all;"<< std::endl31 << tab << " use ieee.std_logic_arith.all;"<< std::endl32 << tab << " use ieee.std_logic_misc.all;"<< std::endl33 << tab << "--use ieee.std_logic_signed.all; " << std::endl34 << tab << " use ieee.std_logic_unsigned.all;" << std::endl35 << tab << "--use ieee.std_logic_textio.all; " << std::endl;27 text << tab << std::endl 28 << tab << "library ieee;" << std::endl 29 << tab << " use ieee.numeric_bit.all; " << std::endl 30 << tab << " use ieee.numeric_std.all; " << std::endl 31 << tab << " use ieee.std_logic_1164.all; " << std::endl 32 << tab << " use ieee.std_logic_arith.all; " << std::endl 33 << tab << " use ieee.std_logic_misc.all; " << std::endl 34 << tab << "--use ieee.std_logic_signed.all; " << std::endl 35 << tab << " use ieee.std_logic_unsigned.all;" << std::endl 36 << tab << "--use ieee.std_logic_textio.all; " << std::endl; 36 37 37 38 log_printf(FUNC,Behavioural,FUNCTION,"End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_library_work.cpp
r81 r94 9 9 10 10 #include "Behavioural/include/Vhdl.h" 11 11 #include "Common/include/Tabulation.h" 12 12 #include <sstream> 13 13 … … 22 22 23 23 std::list<std::string>::iterator i = _list_library_work.begin(); 24 std::string tab = std::string(depth,'\t');24 std::string tab = morpheo::tab(depth); 25 25 std::ostringstream text; 26 26 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_model.cpp
r81 r94 9 9 10 10 #include "Behavioural/include/Vhdl.h" 11 11 #include "Common/include/Tabulation.h" 12 12 #include <sstream> 13 13 … … 22 22 log_printf(FUNC,Behavioural,"get_model","Begin"); 23 23 24 std::string tab = std::string(depth,'\t');24 std::string tab = morpheo::tab(depth); 25 25 std::ostringstream text; 26 26 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_package.cpp
r81 r94 9 9 10 10 #include "Behavioural/include/Vhdl.h" 11 11 #include "Common/include/Tabulation.h" 12 12 #include <sstream> 13 13 … … 24 24 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 25 25 26 std::string tab = std::string(depth,'\t');26 std::string tab = morpheo::tab(depth); 27 27 std::ostringstream text; 28 28 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_body.cpp
r88 r94 9 9 10 10 #include "Behavioural/include/Vhdl.h" 11 11 #include "Common/include/Tabulation.h" 12 12 #include <sstream> 13 13 … … 20 20 { 21 21 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 22 set_list(_list_body, text); 22 set_body(0, text); 23 log_printf(FUNC,Behavioural,FUNCTION,"End"); 24 }; 25 26 #undef FUNCTION 27 #define FUNCTION "Vhdl::set_body" 28 void Vhdl::set_body (uint32_t depth, 29 std::string text) 30 { 31 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 32 set_list(_list_body, morpheo::tab(depth)+text); 23 33 log_printf(FUNC,Behavioural,FUNCTION,"End"); 24 34 }; … … 26 36 #undef FUNCTION 27 37 #define FUNCTION "Vhdl::set_body" 28 void Vhdl::set_body (Vhdl * vhdl) 38 void Vhdl::set_body (uint32_t depth, 39 Vhdl * vhdl) 29 40 { 30 41 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 31 42 43 std::string tab=morpheo::tab(depth); 44 32 45 for (std::list<std::string>::iterator it=vhdl->_list_body.begin(); 33 46 it!=vhdl->_list_body.end(); 34 47 ++it) 35 set_list(_list_body, 48 set_list(_list_body,tab+*it); 36 49 37 50 log_printf(FUNC,Behavioural,FUNCTION,"End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_std_logic.cpp
r81 r94 61 61 #undef FUNCTION 62 62 #define FUNCTION "Vhdl::std_logic_range" 63 std::string 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, bool force) 64 64 { 65 65 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 66 66 std::string type; 67 67 68 if (size < 2) 69 type = ""; 68 if (force) 69 { 70 type = "("+toString(max)+" downto "+toString(min)+")"; 71 } 70 72 else 71 if (max == min) 72 type = "("+toString(max)+")"; 73 else 74 type = "("+toString(max)+" downto "+toString(min)+")"; 73 { 74 if (max == min) 75 { 76 type = "("+toString(max)+")"; 77 } 78 else 79 { 80 if (size < 2) 81 type = ""; 82 else 83 type = "("+toString(max)+" downto "+toString(min)+")"; 84 } 85 } 75 86 76 87 log_printf(FUNC,Behavioural,FUNCTION,"End"); … … 79 90 }; 80 91 81 std::string std_logic_range (uint32_t max, uint32_t min )92 std::string std_logic_range (uint32_t max, uint32_t min, bool force) 82 93 { 83 94 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 84 95 std::string type; 85 96 86 if (max == 0) 87 type = ""; 97 if (force) 98 { 99 type = "("+toString(max)+" downto "+toString(min)+")"; 100 } 88 101 else 89 if (max == min) 90 type = "("+toString(max)+")"; 91 else 92 type = "("+toString(max)+" downto "+toString(min)+")"; 102 { 103 if (max == min) 104 { 105 type = "("+toString(max)+")"; 106 } 107 else 108 { 109 if (max == 0) 110 type = ""; 111 else 112 type = "("+toString(max)+" downto "+toString(min)+")"; 113 } 114 } 93 115 94 116 log_printf(FUNC,Behavioural,FUNCTION,"End"); … … 97 119 }; 98 120 99 std::string std_logic_range (uint32_t size )121 std::string std_logic_range (uint32_t size, bool force) 100 122 { 101 123 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 102 std::string _return = std_logic_range(size-1,0 );124 std::string _return = std_logic_range(size-1,0,force); 103 125 log_printf(FUNC,Behavioural,FUNCTION,"End"); 104 126 … … 108 130 #undef FUNCTION 109 131 #define FUNCTION "Vhdl::std_logic_others" 110 std::string std_logic_others (uint32_t size, uint32_tcst )132 std::string std_logic_others (uint32_t size, bool cst ) 111 133 { 112 134 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); … … 124 146 } 125 147 126 127 128 148 }; // end namespace behavioural 129 149 }; // end namespace morpheo -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/XML_get_body.cpp
r88 r94 7 7 8 8 #include "Behavioural/include/XML.h" 9 #include "Common/include/Tabulation.h" 9 10 10 11 namespace morpheo { -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/XML_indent.cpp
r81 r94 7 7 8 8 #include "Behavioural/include/XML.h" 9 #include "Common/include/Tabulation.h" 9 10 10 11 namespace morpheo { … … 16 17 { 17 18 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 18 std::string _return = std::string(depth,'\t');19 std::string _return = tab(depth); 19 20 log_printf(FUNC,Behavioural,FUNCTION,"End"); 20 21
Note: See TracChangeset
for help on using the changeset viewer.