Changeset 43 for trunk/IPs/systemC/processor/Morpheo/Behavioural/src
- Timestamp:
- Jul 9, 2007, 11:04:26 AM (17 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural/src
- Files:
-
- 1 deleted
- 106 edited
Legend:
- Unmodified
- Added
- Removed
-
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.