Changeset 113 for trunk/IPs/systemC/processor/Morpheo/Behavioural/src
- Timestamp:
- Apr 14, 2009, 8:39:12 PM (16 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural/src
- Files:
-
- 11 added
- 52 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component.cpp
r81 r113 15 15 { 16 16 log_printf(FUNC,Behavioural,"Component::Component","Begin"); 17 _entity = NULL; 17 18 _list_component = new std::list<Tcomponent_t *>; 18 19 log_printf(FUNC,Behavioural,"Component::Component","End"); … … 31 32 { 32 33 log_printf(FUNC,Behavioural,"Component::~Component","Begin"); 33 delete _entity; 34 if (_entity != NULL) 35 delete _entity; 36 while (not _list_component->empty()) 37 { 38 delete _list_component->front(); 39 _list_component->pop_front(); 40 } 34 41 delete _list_component; 35 42 log_printf(FUNC,Behavioural,"Component::~Component","End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_port_map.cpp
r88 r113 80 80 Signal * signal_productor; 81 81 Entity * entity_productor; 82 Signal * signal_consumer ; 83 Entity * entity_consumer ; 82 84 83 85 bool src_is_productor = (signal_src->get_direction() == OUT); … … 85 87 if (src_is_productor == true) 86 88 { 87 signal_productor = signal_src; 88 entity_productor = entity_src; 89 signal_productor = signal_src ; 90 entity_productor = entity_src ; 91 signal_consumer = signal_dest; 92 entity_consumer = entity_dest; 89 93 } 90 94 else … … 92 96 signal_productor = signal_dest; 93 97 entity_productor = entity_dest; 98 signal_consumer = signal_src ; 99 entity_consumer = entity_src ; 94 100 } 95 101 96 102 // Create internal signal 97 signal_dest= signal_internal (entity_productor, signal_productor); 103 signal_dest= signal_internal (entity_productor, 104 signal_productor, 105 entity_consumer , 106 signal_consumer ); 98 107 signal_dest->set_size_max(signal_src->get_size()); 99 108 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_set_component.cpp
r82 r113 2 2 * $Id$ 3 3 * 4 * [ 4 * [ Description ] 5 5 * 6 6 */ … … 21 21 #endif 22 22 ,Tinstance_t instance 23 ,std::string architecture 23 24 ) 24 25 { … … 29 30 Tcomponent_t * entry = new Tcomponent_t; 30 31 31 entry->_component= component; 32 entry->_instance = instance; 33 entry->_entity = entity; 32 entry->_component = component; 33 entry->_instance = instance; 34 entry->_architecture = architecture; 35 entry->_entity = entity; 34 36 35 37 _list_component->push_back(entry); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_set_entity.cpp
r81 r113 13 13 #undef FUNCTION 14 14 #define FUNCTION "Component::set_entity" 15 Entity * Component::set_entity (std::string name16 ,std::string type15 Entity * Component::set_entity (std::string name 16 ,std::string type 17 17 #ifdef POSITION 18 ,schema_t 18 ,schema_t schema 19 19 #endif 20 20 ) 21 21 { 22 22 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 23 24 if (_entity != NULL) 25 throw ERRORMORPHEO(FUNCTION,_("Entity is already allocated.\n")); 23 26 24 27 Entity * entity = new Entity (name … … 29 32 ,_usage 30 33 ); 34 31 35 _entity = entity; 32 36 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_signal_internal.cpp
r81 r113 2 2 * $Id$ 3 3 * 4 * [ 4 * [ Description ] 5 5 * 6 6 */ … … 14 14 #define FUNCTION "Component::signal_internal" 15 15 Signal * Component::signal_internal (Entity * entity_productor, 16 Signal * signal_productor) 16 Signal * signal_productor, 17 Entity * entity_consumer, 18 Signal * signal_consumer) 17 19 { 18 20 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 19 21 22 bool productor_is_cosimulation = usage_is_set(entity_productor->get_usage(),USE_COSIMULATION); 23 bool consumer_is_cosimulation = usage_is_set(entity_consumer ->get_usage(),USE_COSIMULATION); 24 bool is_cosimulation = consumer_is_cosimulation or productor_is_cosimulation; 25 if (productor_is_cosimulation and consumer_is_cosimulation) 26 throw ERRORMORPHEO (FUNCTION,toString(_("Entity \"%s\" and Entity \"%s\" use both cosimulation. It's not supported.\n"),entity_productor->get_name().c_str(),entity_consumer->get_name().c_str())); 27 20 28 // create name of internal's signal 21 std::string str_entity = entity_productor->get_name(); 22 std::string str_signal = signal_productor->get_name(); 29 Entity * entity = (consumer_is_cosimulation)?entity_consumer:entity_productor; 30 Signal * signal = (consumer_is_cosimulation)?signal_consumer:signal_productor; 31 32 std::string str_entity = entity->get_name(); 33 std::string str_signal = signal->get_name(); 23 34 24 UpperCase (str_entity);25 UpperCase (str_signal);35 // UpperCase (str_entity); 36 // UpperCase (str_signal); 26 37 27 std::string name_internal = "internal_"+str_entity+"_"+str_signal;38 std::string name_internal = (is_cosimulation)?str_signal:("internal_"+str_entity+"_"+str_signal); 28 39 29 40 // test if internal's signal exist ... else, create … … 38 49 39 50 if (interface == NULL) 40 throw (ErrorMorpheo ("<Component::port_map> Component \""+_entity->get_name()+"\", doesn't have an interface \"\".")); 41 42 std::string signame = entity_productor->get_name()+"_"+signal_productor->get_name(); 43 51 throw ERRORMORPHEO (FUNCTION,toString(_("Component \"%s\", doesn't have an interface \"\".\n"),_entity->get_name().c_str())); 52 53 // std::string signame = entity->get_name()+"_"+signal->get_name(); 54 std::string signame = name_internal; 55 type_info_t type_info = signal->get_type_info(); 56 44 57 // Signal's creation 45 switch ( signal_productor->get_type_info())58 switch (type_info) 46 59 { 47 case BOOL : 48 { 49 interface->set_signal_internal<bool >(signame, signal_productor->get_size()); 50 break; 51 } 52 case UINT8_T : 53 { 54 interface->set_signal_internal<uint8_t >(signame, signal_productor->get_size()); 55 break; 56 } 57 case UINT16_T : 58 { 59 interface->set_signal_internal<uint16_t>(signame, signal_productor->get_size()); 60 break; 61 } 62 case UINT32_T : 63 { 64 interface->set_signal_internal<uint32_t>(signame, signal_productor->get_size()); 65 break; 66 } 67 case UINT64_T : 68 { 69 interface->set_signal_internal<uint64_t>(signame, signal_productor->get_size()); 70 break; 71 } 72 default : 73 throw (ErrorMorpheo ("Signal \""+name_internal+"\" : type unknow.")); 60 case BOOL : interface->set_signal_internal<bool >(signame, signal->get_size()); break; 61 case UINT8_T : interface->set_signal_internal<uint8_t >(signame, signal->get_size()); break; 62 case UINT16_T : interface->set_signal_internal<uint16_t>(signame, signal->get_size()); break; 63 case UINT32_T : interface->set_signal_internal<uint32_t>(signame, signal->get_size()); break; 64 case UINT64_T : interface->set_signal_internal<uint64_t>(signame, signal->get_size()); break; 65 default :throw (ErrorMorpheo ("Signal \""+name_internal+"\" : type unknow.")); 74 66 } 75 67 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_vhdl_instance.cpp
r95 r113 92 92 while (i != list_component->end()) 93 93 { 94 Entity * entity = (*i)->_entity; 95 Tinstance_t instance = (*i)->_instance; 94 Entity * entity = (*i)->_entity; 95 Tinstance_t instance = (*i)->_instance; 96 std::string architecture = (*i)->_architecture; 97 std::string package = "work"; 96 98 97 99 if (instance & INSTANCE_LIBRARY) … … 176 178 } 177 179 } 178 vhdl->set_body_component ("instance_"+entity->get_name(),entity->get_name(),list_port_map); 180 vhdl->set_body_component ("instance_"+entity->get_name(), 181 entity->get_name(), 182 architecture, 183 package, 184 list_port_map); 179 185 180 186 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface.cpp
r112 r113 73 73 it != _list_signal->end(); 74 74 ++it) 75 delete (*it); 75 { 76 if ((_usage & USE_SYSTEMC) and 77 ((*it)->get_direction() == INTERNAL)) 78 delete (*it)->get_sc_signal(); 79 delete (*it); 80 } 76 81 77 82 delete _list_signal; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_fifo_testbench_assert.cpp
r94 r113 34 34 while (i != _list_cycle->end()) 35 35 { 36 vhdl->set_body("assert not (("+counter_name+" = "+toString(*i)+" and "+test_name+" = '1')) report \"***** <"+_name+"> Test number "+toString(j)+" is OK *****\" severity NOTE;");37 vhdl->set_body("assert not (("+counter_name+" = "+toString(*i)+" and "+test_name+" = '0')) report \"@@@@@ <"+_name+"> Test number "+toString(j)+" is KO !!! @@@@@\" severity NOTE;");36 vhdl->set_body("assert not (("+counter_name+" = "+toString(*i)+" and "+test_name+" = '1')) report \"***** <"+_name+"> Test number "+toString(j)+" is OK *****\" severity "+toString(VHDL_SEVERITY_NOTE)+";"); 37 vhdl->set_body("assert not (("+counter_name+" = "+toString(*i)+" and "+test_name+" = '0')) report \"@@@@@ <"+_name+"> Test number "+toString(j)+" is KO !!! @@@@@\" severity "+toString(VHDL_SEVERITY_NOTE)+";"); 38 38 j++; 39 39 ++i; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_fifo_testbench_cycle.cpp
r81 r113 9 9 #include "Behavioural/include/Interface_fifo.h" 10 10 #include "Behavioural/include/Entity.h" 11 #include "Common/include/Systemc.h" 11 12 12 13 namespace morpheo { … … 18 19 19 20 // note : if defined(VHDL_TESTBENCH) then defined(SYSTEMC) 20 _list_cycle->push_back(static_cast<uint32_t>(s c_simulation_time()));21 _list_cycle->push_back(static_cast<uint32_t>(simulation_cycle())); 21 22 22 23 log_printf(FUNC,Behavioural,"testbench_cycle","End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_find_signal.cpp
r81 r113 15 15 { 16 16 log_printf(FUNC,Behavioural,"find_signal","Begin"); 17 18 LowerCase(name); 17 19 18 20 std::list<Signal*>::iterator i = _list_signal->begin(); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_set_port.cpp
r81 r113 26 26 } 27 27 } 28 28 29 log_printf(FUNC,Behavioural,"set_port (Vhdl)","End"); 29 30 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_set_signal.cpp
r112 r113 11 11 namespace behavioural { 12 12 13 #undef FUNCTION 14 #define FUNCTION "Interface::set_signal" 13 15 Signal * Interface::set_signal (std::string name , 14 16 direction_t direction, … … 16 18 presence_port_t presence_port) 17 19 { 18 log_ printf(FUNC,Behavioural,"set_signal","Begin");20 log_begin(Behavioural,FUNCTION); 19 21 20 22 std::string signame = signal_name(_name, name, direction); … … 24 26 _list_signal->push_back (sig); 25 27 26 log_ printf(FUNC,Behavioural,"set_signal","End");28 log_end(Behavioural,FUNCTION); 27 29 28 30 return sig; … … 36 38 void Interface::set_signal (Vhdl * & vhdl) 37 39 { 38 log_ printf(FUNC,Behavioural,FUNCTION,"Begin");40 log_begin(Behavioural,FUNCTION); 39 41 if (not _list_signal->empty()) 40 42 { … … 47 49 } 48 50 } 49 log_ printf(FUNC,Behavioural,FUNCTION,"End");51 log_end(Behavioural,FUNCTION); 50 52 }; 51 53 # endif -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_signal_name.cpp
r81 r113 17 17 log_printf(FUNC,Behavioural,"signal_name","Begin"); 18 18 19 std::string str_direction = toString(direction);19 std::string str_direction = (direction==INTERNAL)?"":toString(direction); 20 20 std::string str_interface = name_interface; 21 21 std::string str_signal = name_signal; 22 22 23 LowerCase(str_direction);24 UpperCase(str_interface);25 UpperCase(str_signal );23 // LowerCase(str_direction); 24 // LowerCase(str_interface); 25 // LowerCase(str_signal ); 26 26 27 std::string signame = str_direction; 27 std::string signame = ""; 28 bool need_underscore = false; 29 30 if (str_direction != "") 31 { 32 signame += str_direction; 33 need_underscore = true; 34 } 28 35 if (str_interface != "") 29 signame += "_"+str_interface; 30 if (str_signal != "") 31 signame += "_"+str_signal; 36 { 37 signame += ((need_underscore)?"_":"")+str_interface; 38 need_underscore = true; 39 } 40 if (str_signal != "") 41 { 42 signame += ((need_underscore)?"_":"")+str_signal; 43 // need_underscore = true; 44 } 32 45 33 46 log_printf(FUNC,Behavioural,"signal_name","End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces.cpp
r112 r113 11 11 namespace behavioural { 12 12 13 Interfaces::Interfaces (std::string 13 Interfaces::Interfaces (std::string name, 14 14 Tusage_t usage): 15 15 _name (name), -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_set_port.cpp
r81 r113 27 27 ++i; 28 28 } 29 30 // Signal * clock = get_clock(); 31 // if (clock != NULL) 32 // vhdl->set_port_clock (clock->get_name()); 29 33 } 34 30 35 log_printf(FUNC,Behavioural,FUNCTION,"End"); 31 36 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_testbench_generate_file.cpp
r94 r113 66 66 vhdl->set_body(""); 67 67 vhdl->set_body("-- if the systemC simulate have multiple reset, we make the last"); 68 vhdl->set_body(reset_name+" <= '1' after 150 ns;");68 vhdl->set_body(reset_name+" <= '1' after "+toString(2.*VHDL_TIME_PERIOD)+" "+toString(VHDL_TIME_UNIT)+";"); 69 69 70 70 vhdl->set_body(""); … … 73 73 vhdl->set_body("------------------------------------------------------"); 74 74 vhdl->set_body(""); 75 vhdl->set_body(clock_name+" <= not "+clock_name+" after 50 ns;");75 vhdl->set_body(clock_name+" <= not "+clock_name+" after "+toString(VHDL_TIME_PERIOD/2.)+" "+toString(VHDL_TIME_UNIT)+";"); 76 76 vhdl->set_body(""); 77 77 vhdl->set_body("process ("+clock_name+")"); … … 89 89 #ifdef VHDL_TESTBENCH_ASSERT 90 90 for (uint32_t cpt=0; cpt<=cycle; cpt++) 91 vhdl->set_body("\t\t\tassert not ("+counter+" = "+toString(cpt)+") report \"===== Test number "+toString(cpt)+" =====\" severity NOTE;");91 vhdl->set_body("\t\t\tassert not ("+counter+" = "+toString(cpt)+") report \"===== Test number "+toString(cpt)+" =====\" severity "+toString(VHDL_SEVERITY_NOTE)+";"); 92 92 93 93 for (std::list<Interface_fifo*>::iterator it=_list_interface->begin(); … … 106 106 107 107 vhdl->set_body(""); 108 vhdl->set_body("\t\t\tassert not ("+counter+" >= "+toString(cycle)+") report \"Test OK\" severity FAILURE;");109 vhdl->set_body("\t\t\tassert not ("+test_name+" = '0') report \"Test KO\" severity FAILURE;");108 vhdl->set_body("\t\t\tassert not ("+counter+" >= "+toString(cycle)+") report \"Test OK\" severity "+toString(VHDL_SEVERITY_FAILURE)+";"); 109 vhdl->set_body("\t\t\tassert not ("+test_name+" = '0') report \"Test KO\" severity "+toString(VHDL_SEVERITY_FAILURE)+";"); 110 110 vhdl->set_body("\t\tend if;"); 111 111 vhdl->set_body("\tend if;"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Model_set_model.cpp
r112 r113 12 12 13 13 #undef FUNCTION 14 #define FUNCTION "Model:: get_type"14 #define FUNCTION "Model::set_model" 15 15 void Model::set_model (std::string component, model_type_t type, debug_verbosity_t debug) 16 16 { -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Parameters.cpp
r81 r113 13 13 #undef FUNCTION 14 14 #define FUNCTION "Parameters::Parameters" 15 Parameters::Parameters (void) 15 Parameters::Parameters (void) : 16 _type ("") 17 { 18 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 19 log_printf(FUNC,Behavioural,FUNCTION,"End"); 20 }; 21 22 #undef FUNCTION 23 #define FUNCTION "Parameters::Parameters" 24 Parameters::Parameters (std::string type) : 25 _type (type) 16 26 { 17 27 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Parameters_test.cpp
r88 r113 20 20 Parameters_test x = msg_error(); 21 21 22 std::cerr << x.print();22 msg("%s",x.print().c_str()); 23 23 24 24 if (x.have_error()) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal.cpp
r81 r113 11 11 namespace behavioural { 12 12 13 Signal::Signal (std::string 13 Signal::Signal (std::string name , 14 14 direction_t direction , 15 15 uint32_t size , … … 20 20 { 21 21 log_printf(FUNC,Behavioural,"Signal","Begin"); 22 _size = size; 22 23 23 _is_allocate = false; 24 24 _is_map_as_component_src = false; … … 33 33 _list_value = new std::list<std::string>; 34 34 #endif 35 set_size(size); 35 36 36 37 if (_size == 0) 37 38 throw ERRORMORPHEO(FUNCTION,"Size of signal '"+_name+"' is nul"); 38 39 39 40 40 log_printf(FUNC,Behavioural,"Signal","End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_get_size.cpp
r81 r113 7 7 8 8 #include "Behavioural/include/Signal.h" 9 9 #include "Common/include/Environment.h" 10 10 11 11 namespace morpheo { … … 18 18 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 19 19 uint32_t _return = _size; 20 21 #ifdef MODELSIM_COSIMULATION 22 switch (_type_info) 23 { 24 case BOOL : _return = 1; break; 25 case UINT8_T : _return = 8; break; 26 case UINT16_T : _return = 16; break; 27 case UINT32_T : _return = 32; break; 28 case UINT64_T : _return = 64; break; 29 default : break; 30 } 31 #endif 32 20 33 log_printf(FUNC,Behavioural,FUNCTION,"End"); 21 34 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_link.cpp
r88 r113 2 2 * $Id$ 3 3 * 4 * [ 4 * [ Description ] 5 5 * 6 6 */ -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_presence_testbench.cpp
r81 r113 13 13 14 14 #undef FUNCTION 15 #define FUNCTION "Signal::presence_ vhdl"16 bool Signal::presence_ vhdl(void)15 #define FUNCTION "Signal::presence_testbench" 16 bool Signal::presence_testbench (void) 17 17 { 18 18 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_set_port.cpp
r81 r113 21 21 (_presence_port == CLOCK_VHDL_YES) or 22 22 (_presence_port == RESET_VHDL_YES)) 23 vhdl->set_port (_name,_direction, _size);23 vhdl->set_port (_name,_direction,get_size()); 24 24 25 25 log_printf(FUNC,Behavioural,"set_port (Vhdl)","End"); … … 38 38 // or (_presence_port == RESET_VHDL_NO ) 39 39 ) 40 vhdl->set_signal (_name , _size);40 vhdl->set_signal (_name ,get_size()); 41 41 42 42 if (_direction == OUT) 43 vhdl->set_signal (_name+"_test", _size);43 vhdl->set_signal (_name+"_test",get_size()); 44 44 45 45 log_printf(FUNC,Behavioural,"set_signal (Vhdl)","End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_set_size.cpp
r81 r113 18 18 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 19 19 _size = size; 20 20 21 log_printf(FUNC,Behavioural,FUNCTION,"End"); 21 22 }; … … 27 28 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 28 29 if (size > _size) 29 _size = size;30 set_size(size); 30 31 log_printf(FUNC,Behavioural,FUNCTION,"End"); 31 32 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_testbench.cpp
r81 r113 44 44 switch (_direction) 45 45 { 46 case IN : {str = toBase2 (value, _size); break;}47 case OUT : {str = toBase2 (value, _size); break;}46 case IN : {str = toBase2 (value,get_size()); break;} 47 case OUT : {str = toBase2 (value,get_size()); break;} 48 48 default : {break;} 49 49 } … … 56 56 switch (_direction) 57 57 { 58 case IN : {str = toBase2 (value, _size); break;}59 case OUT : {str = toBase2 (value, _size); break;}58 case IN : {str = toBase2 (value,get_size()); break;} 59 case OUT : {str = toBase2 (value,get_size()); break;} 60 60 default : {break;} 61 61 } … … 68 68 switch (_direction) 69 69 { 70 case IN : {str = toBase2 (value, _size); break;}71 case OUT : {str = toBase2 (value, _size); break;}70 case IN : {str = toBase2 (value,get_size()); break;} 71 case OUT : {str = toBase2 (value,get_size()); break;} 72 72 default : {break;} 73 73 } … … 80 80 switch (_direction) 81 81 { 82 case IN : {str = toBase2 (value, _size); break;}83 case OUT : {str = toBase2 (value, _size); break;}82 case IN : {str = toBase2 (value,get_size()); break;} 83 case OUT : {str = toBase2 (value,get_size()); break;} 84 84 default : {break;} 85 85 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_testbench_body.cpp
r81 r113 25 25 { 26 26 std::string separator; 27 if ( _size== 1)27 if (get_size() == 1) 28 28 separator = "\'"; 29 29 else … … 48 48 } 49 49 50 if ( _size== 1)50 if (get_size() == 1) 51 51 vhdl->set_body ("\t'0' when others;"); 52 52 else -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Simulation_test_end.cpp
r110 r113 8 8 9 9 #include "Behavioural/include/Simulation.h" 10 #include "Common/include/Systemc.h" 10 11 11 12 namespace morpheo { … … 14 15 bool simulation_test_end (void) 15 16 { 16 msg("##########[ cycle %d ]\n",static_cast<uint32_t>(s c_simulation_time()));17 msg("##########[ cycle %d ]\n",static_cast<uint32_t>(simulation_cycle())); 17 18 18 19 // Test if a stop condition is activate … … 26 27 27 28 if (_simulation_nb_cycle != 0) 28 end_cycle = (_simulation_nb_cycle <= s c_simulation_time());29 end_cycle = (_simulation_nb_cycle <= simulation_cycle()); 29 30 else 30 31 end_cycle = true; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Stat_end_cycle.cpp
r81 r113 1 1 #ifdef STATISTICS 2 2 #include "Behavioural/include/Stat.h" 3 #include "Common/include/Systemc.h" 3 4 4 5 namespace morpheo { … … 6 7 void Stat::end_cycle (void) 7 8 { 8 cycle_t _cycle_sum = s c_simulation_time();9 cycle_t _cycle_sum = simulation_cycle(); 9 10 10 11 if (_cycle_sum >= _nb_cycle_before_begin) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Stat_generate_file.cpp
r88 r113 3 3 #include "Behavioural/include/Version.h" 4 4 #include "Common/include/Environment.h" 5 #include "Common/include/Systemc.h" 5 6 6 7 namespace morpheo { … … 13 14 std::string body = print(1); 14 15 15 cycle_t _cycle_sum = s c_simulation_time();16 cycle_t _cycle_sum = simulation_cycle(); 16 17 17 18 morpheo::behavioural::XML * xml = new morpheo::behavioural::XML (_name_instance); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Stat_print.cpp
r88 r113 1 1 #ifdef STATISTICS 2 2 #include "Behavioural/include/Stat.h" 3 #include "Common/include/Systemc.h" 3 4 4 5 namespace morpheo { … … 12 13 end_simulation(); 13 14 14 cycle_t _cycle_sum = s c_simulation_time();15 cycle_t _cycle_sum = simulation_cycle(); 15 16 16 17 morpheo::behavioural::XML xml (_name_instance); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Usage.cpp
r88 r113 5 5 namespace morpheo { 6 6 namespace behavioural { 7 8 #ifdef MODELSIM_COSIMULATION 9 Tusage_t usage_cosimulation(Tusage_t usage) 10 { 11 Tusage_t _return = usage; 12 // _return = usage_unset(_return,USE_SYSTEMC ); 13 _return = usage_unset(_return,USE_SYSTEMC_INTERFACE ); 14 _return = usage_unset(_return,USE_SYSTEMC_BODY ); 15 _return = usage_unset(_return,USE_VHDL ); 16 _return = usage_unset(_return,USE_VHDL_TESTBENCH ); 17 _return = usage_unset(_return,USE_VHDL_TESTBENCH_ASSERT); 18 // _return = usage_unset(_return,USE_POSITION ); 19 _return = usage_unset(_return,USE_STATISTICS ); 20 // _return = usage_unset(_return,USE_INFORMATION ); 21 // _return = usage_unset(_return,USE_HEADER ); 22 _return = usage_set (_return,USE_COSIMULATION ); 23 24 return _return; 25 } 26 #endif 7 27 8 28 Tusage_t usage_set (Tusage_t usage, Tusage_t flag) … … 22 42 #undef FUNCTION 23 43 #define FUNCTION "usage_environment" 24 voidusage_environment (Tusage_t usage)44 Tusage_t usage_environment (Tusage_t usage) 25 45 { 26 46 #ifndef SYSTEMC 27 if (usage_is_set(usage,USE_SYSTEMC)) 28 throw ERRORMORPHEO(FUNCTION,_("Component use the flag \"USE_SYSTEMC\", but the macro's compiler \"SYSTEMC\" is unset.\n")); 47 if (usage_is_set(usage,USE_SYSTEMC_INTERFACE)) 48 throw ERRORMORPHEO(FUNCTION,_("Component use the flag \"USE_SYSTEMC_INTERFACE\", but the macro's compiler \"SYSTEMC\" is unset.\n")); 49 if (usage_is_set(usage,USE_SYSTEMC_BODY)) 50 throw ERRORMORPHEO(FUNCTION,_("Component use the flag \"USE_SYSTEMC_BODY\", but the macro's compiler \"SYSTEMC\" is unset.\n")); 29 51 #endif 30 52 #ifndef VHDL … … 48 70 throw ERRORMORPHEO(FUNCTION,_("Component use the flag \"USE_STATISTICS\", but the macro's compiler \"STATISTICS\" is unset.\n")); 49 71 #endif 50 #ifndef INFORMATION51 if (usage_is_set(usage,USE_INFORMATION))52 throw ERRORMORPHEO(FUNCTION,_("Component use the flag \"USE_INFORMATION\", but the macro's compiler \"INFORMATION\" is unset.\n"));53 #endif72 // #ifndef INFORMATION 73 // if (usage_is_set(usage,USE_INFORMATION)) 74 // throw ERRORMORPHEO(FUNCTION,_("Component use the flag \"USE_INFORMATION\", but the macro's compiler \"INFORMATION\" is unset.\n")); 75 // #endif 54 76 55 77 #ifndef DEBUG 56 78 #endif 57 79 58 if (usage_is_set(usage,USE_STATISTICS) and not usage_is_set(usage,USE_SYSTEMC ))59 throw ERRORMORPHEO(FUNCTION,_("Usage flags conflit : to use the statistics, you must set flag USE_SYSTEMC \n"));80 if (usage_is_set(usage,USE_STATISTICS) and not usage_is_set(usage,USE_SYSTEMC_BODY)) 81 throw ERRORMORPHEO(FUNCTION,_("Usage flags conflit : to use the statistics, you must set flag USE_SYSTEMC_BODY\n")); 60 82 61 if (usage_is_set(usage,USE_INFORMATION) and not usage_is_set(usage,USE_STATISTICS))62 throw ERRORMORPHEO(FUNCTION,_("Usage flags conflit : to use the information, you must set flag USE_STATISTICS\n"));83 // if (usage_is_set(usage,USE_INFORMATION) and not usage_is_set(usage,USE_STATISTICS)) 84 // throw ERRORMORPHEO(FUNCTION,_("Usage flags conflit : to use the information, you must set flag USE_STATISTICS\n")); 63 85 64 if (usage_is_set(usage,USE_VHDL_TESTBENCH) and not usage_is_set(usage,USE_SYSTEMC ))65 throw ERRORMORPHEO(FUNCTION,_("Usage flags conflit : to use the vhdl's test bench, you must set flag USE_SYSTEMC \n"));86 if (usage_is_set(usage,USE_VHDL_TESTBENCH) and not usage_is_set(usage,USE_SYSTEMC_BODY)) 87 throw ERRORMORPHEO(FUNCTION,_("Usage flags conflit : to use the vhdl's test bench, you must set flag USE_SYSTEMC_BODY\n")); 66 88 67 89 if (usage_is_set(usage,USE_VHDL_TESTBENCH) and not usage_is_set(usage,USE_VHDL)) … … 70 92 if (usage_is_set(usage,USE_VHDL_TESTBENCH_ASSERT) and not usage_is_set(usage,USE_VHDL_TESTBENCH)) 71 93 throw ERRORMORPHEO(FUNCTION,_("Usage flags conflit : to use an assert in vhdl's test bench, you must set flag USE_VHDL_TESTBENCH\n")); 94 95 return usage; 72 96 } 73 97 … … 77 101 78 102 #ifdef SYSTEMC 79 usage = usage_set(usage,USE_SYSTEMC); 103 usage = usage_set(usage,USE_SYSTEMC_INTERFACE); 104 usage = usage_set(usage,USE_SYSTEMC_BODY); 80 105 #endif 81 106 #ifdef VHDL … … 94 119 usage = usage_set(usage,USE_STATISTICS); 95 120 #endif 96 #ifdef INFORMATION97 usage = usage_set(usage,USE_INFORMATION);98 #endif121 // #ifdef INFORMATION 122 // usage = usage_set(usage,USE_INFORMATION); 123 // #endif 99 124 usage = usage_set(usage,USE_HEADER); 100 125 #ifdef DEBUG -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl.cpp
r81 r113 15 15 #undef FUNCTION 16 16 #define FUNCTION "Vhdl::Vhdl" 17 Vhdl::Vhdl (std::string name): 18 _name (name) 17 Vhdl::Vhdl (std::string name, 18 std::string id): 19 _name (name), 20 _id (id), 21 _name_architecture_default ("morpheo_behavioural") 19 22 { 20 23 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 24 25 _name_architecture = _name_architecture_default; 26 // _port_clock = ""; 27 28 set_library_default(); 29 21 30 log_printf(FUNC,Behavioural,FUNCTION,"End"); 22 31 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_generate_file_model.cpp
r98 r113 22 22 directory(); 23 23 24 std::string filename = MORPHEO_VHDL + "/" + _name + ".vhdl";24 std::string filename = MORPHEO_VHDL + "/" + _name + VHDL_EXTENSION; 25 25 26 26 msg_printf(INFORMATION,_("Generate file \"%s\"."),filename.c_str()); … … 30 30 file.open(filename.c_str(),std::ios::out | std::ios::trunc); 31 31 32 file << get_model (0,filename,_name ,"behavioural");32 file << get_model (0,filename,_name); 33 33 file.close(); 34 34 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_generate_file_package.cpp
r88 r113 4 4 * $Id$ 5 5 * 6 * [ 6 * [ Description ] 7 7 * 8 8 */ … … 23 23 24 24 std::string name = _name + "_Pack"; 25 std::string filename = MORPHEO_VHDL + "/" + name + ".vhdl";25 std::string filename = MORPHEO_VHDL + "/" + name + VHDL_EXTENSION; 26 26 27 27 msg_printf(INFORMATION,_("Generate file \"%s\"."),filename.c_str()); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_alias.cpp
r81 r113 20 20 { 21 21 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 22 std::string _return = get_list(_list_alias, depth, ";", true); 22 23 test_architecture(); 24 25 std::string _return = get_list(_architecture[_name_architecture]._list_alias, depth, ";", true); 23 26 log_printf(FUNC,Behavioural,FUNCTION,"End"); 24 27 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_architecture.cpp
r94 r113 11 11 #include "Common/include/Tabulation.h" 12 12 13 #include <sstream>14 15 13 namespace morpheo { 16 14 namespace behavioural { … … 18 16 #undef FUNCTION 19 17 #define FUNCTION "Vhdl::get_architecture" 20 std::string Vhdl::get_architecture (uint32_t depth , 21 std::string name , 22 std::string entity_name) 18 std::string Vhdl::get_architecture (uint32_t depth , 19 std::string entity_name) 23 20 { 24 21 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 25 22 26 std::string tab = morpheo::tab(depth);27 23 std::ostringstream text; 24 std::string name_architecture_old = _name_architecture; 25 std::string tab=morpheo::tab(depth); 28 26 29 text << tab << "architecture " << name << " of " << entity_name << " is" << std::endl 30 << tab << get_type (depth+1) << std::endl 31 << tab << get_signal (depth+1) << std::endl 32 << tab << get_alias (depth+1) << std::endl 33 << tab << "begin" << std::endl 34 << tab << get_body (depth+1) << std::endl 35 << tab << "end " << name << ";" << std::endl; 27 for (std::map<std::string,vhdl_architecture_t>::iterator it = _architecture.begin(); 28 it!=_architecture.end(); 29 ++it) 30 { 31 std::string name = it->first; 32 set_architecture(name); 33 34 text << tab << "architecture " << name << " of " << entity_name << " is" << std::endl 35 << tab << get_type (depth+1) << std::endl 36 << tab << get_signal (depth+1) << std::endl 37 << tab << get_alias (depth+1) << std::endl 38 << tab << "begin" << std::endl 39 << tab << get_body (depth+1) << std::endl 40 << tab << "end " << name << ";" << std::endl; 41 } 42 43 set_architecture (name_architecture_old); 36 44 37 45 log_printf(FUNC,Behavioural,FUNCTION,"End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_body.cpp
r81 r113 20 20 { 21 21 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 22 std::string _return = get_list(_list_body,depth,"",true); 22 23 test_architecture(); 24 std::string _return = get_list(_architecture[_name_architecture]._list_body,depth,"",true); 25 26 _return = _return + get_debug(depth); 27 23 28 log_printf(FUNC,Behavioural,FUNCTION,"End"); 24 29 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_header.cpp
r98 r113 12 12 #include <time.h> 13 13 #include <sstream> 14 #include <fstream> 14 15 15 16 namespace morpheo { … … 21 22 std::string filename) 22 23 { 23 log_ printf(FUNC,Behavioural,FUNCTION,"Begin");24 log_begin(Behavioural,FUNCTION); 24 25 25 26 std::string text; … … 32 33 text += "-- "+toString(_("Date : ")) + ctime (¤t_time ); 33 34 text += "-- "+toString(_("Version : ")) + MORPHEO_HEADER +"\n"; 35 text += "-- "+toString(_("Id : ")) + _id +" \n"; 34 36 text += "-- "+toString(_("Comment : ")) + _("it's a autogenerated file, don't modify") +"\n"; 35 37 text += "-------------------------------------------------------------------------------\n"; 36 38 37 log_ printf(FUNC,Behavioural,FUNCTION,"End");39 log_end(Behavioural,FUNCTION); 38 40 39 41 return text; 42 }; 43 44 #undef FUNCTION 45 #define FUNCTION "vhdl_get_id" 46 std::string vhdl_get_id(std::string model_name) 47 { 48 log_begin(Behavioural,FUNCTION); 49 50 std::string id=""; 51 52 directory(); 53 54 std::string filename = MORPHEO_VHDL + "/" + model_name + VHDL_EXTENSION; 55 std::ifstream file; 56 57 file.open(filename.c_str(),std::ios::in); 58 59 // open file 60 if (!file) 61 { 62 log_printf(INFO,Behavioural,FUNCTION,_("Can't open file : \"%s\""),filename.c_str()); 63 } 64 else 65 { 66 // get line with Id 67 do 68 { 69 std::getline(file,id,'\n'); // comment 70 } while ((id.find("Id :") == std::string::npos) and 71 (not file.eof())); 72 73 if (file.eof()) 74 log_printf(INFO,Behavioural,FUNCTION,_("\"Id\" not find in file : \"%s\""),filename.c_str()); 75 else 76 { 77 // get id 78 id = id.substr(id.find_first_of(':',0)+1,std::string::npos); 79 80 // Erase all ' ' 81 size_t i=id.find_first_of(' ',0); 82 while (i!=std::string::npos) 83 { 84 id.erase(i,i+1); 85 i=id.find_first_of(' ',i); 86 } 87 } 88 } 89 90 log_end(Behavioural,FUNCTION); 91 92 return id; 40 93 }; 41 94 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_library.cpp
r111 r113 16 16 17 17 #undef FUNCTION 18 #define FUNCTION "Vhdl::get_library _work"19 std::string Vhdl::get_library _work(uint32_t depth)18 #define FUNCTION "Vhdl::get_library" 19 std::string Vhdl::get_library (uint32_t depth) 20 20 { 21 21 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 22 22 23 std::list<std::string>::iterator i = _list_library _work.begin();23 std::list<std::string>::iterator i = _list_library.begin(); 24 24 std::string tab = morpheo::tab(depth); 25 25 std::ostringstream text; 26 26 27 if (i != _list_library_work.end()) 28 text << tab << std::endl 29 << tab << "library work;" << std::endl 30 << get_list(_list_library_work,depth,";",true); 27 if (i != _list_library.end()) 28 text << get_list(_list_library,depth,";",true); 31 29 32 30 log_printf(FUNC,Behavioural,FUNCTION,"End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_list.cpp
r81 r113 17 17 #undef FUNCTION 18 18 #define FUNCTION "Vhdl::get_list" 19 std::string Vhdl::get_list (std::list<std::string> liste 20 uint32_t depth,21 std::string separator,22 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) 23 23 { 24 24 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_model.cpp
r94 r113 15 15 namespace behavioural { 16 16 17 std::string Vhdl::get_model(uint32_t depth , 18 std::string filename , 19 std::string entity_name , 20 std::string architecture_name) 17 std::string Vhdl::get_model(uint32_t depth , 18 std::string filename , 19 std::string entity_name ) 21 20 { 22 21 log_printf(FUNC,Behavioural,"get_model","Begin"); … … 25 24 std::ostringstream text; 26 25 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; 26 std::string configuration_name = "configuration_"+entity_name; 27 28 text << tab << get_header (depth,filename) << std::endl 29 << tab << get_library (depth) << std::endl 30 << tab << get_entity (depth,entity_name) << std::endl 31 << tab << get_architecture (depth,entity_name) << std::endl 32 << tab << get_configuration(depth,entity_name,configuration_name) << std::endl 33 ; 32 34 33 35 log_printf(FUNC,Behavioural,"get_model","End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_package.cpp
r94 r113 27 27 std::ostringstream text; 28 28 29 text << tab << get_header (depth,filename)<< std::endl30 << tab << get_library_ieee (depth)<< std::endl31 << tab << "package " << package_name << " is" 32 << tab << get_component (depth+1,entity_name) 33 << tab << "end " << package_name << ";" 29 text << tab << get_header (depth,filename) << std::endl 30 << tab << get_library_default (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; 34 34 35 35 log_printf(FUNC,Behavioural,FUNCTION,"End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_signal.cpp
r81 r113 20 20 { 21 21 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 22 std::string _return = get_list (_list_signal, depth, ";", true); 22 23 test_architecture(); 24 25 std::string _return = get_list (_architecture[_name_architecture]._list_signal, depth, ";", true); 26 23 27 log_printf(FUNC,Behavioural,FUNCTION,"End"); 24 28 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_type.cpp
r81 r113 20 20 { 21 21 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 22 std::string _return = get_list (_list_type, depth, ";", true); 22 23 test_architecture(); 24 std::string _return = get_list (_architecture[_name_architecture]._list_type, depth, ";", true); 25 23 26 log_printf(FUNC,Behavioural,FUNCTION,"End"); 24 27 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_alias.cpp
r81 r113 23 23 { 24 24 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 25 set_list(_list_alias, "alias "+ name1+"\t: "+type1+"\tis "+name2+"\t"+range2); 25 26 test_architecture(); 27 28 set_list(_architecture[_name_architecture]._list_alias, "alias "+ name1+"\t: "+type1+"\tis "+name2+"\t"+range2); 29 26 30 log_printf(FUNC,Behavioural,FUNCTION,"End"); 27 31 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_body.cpp
r94 r113 30 30 { 31 31 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 32 set_list(_list_body, morpheo::tab(depth)+text); 32 33 test_architecture(); 34 35 set_list(_architecture[_name_architecture]._list_body, morpheo::tab(depth)+text); 33 36 log_printf(FUNC,Behavioural,FUNCTION,"End"); 34 37 }; … … 40 43 { 41 44 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 45 46 test_architecture(); 42 47 43 48 std::string tab=morpheo::tab(depth); 44 49 45 for (std::list<std::string>::iterator it=vhdl->_ list_body.begin();46 it!=vhdl->_ list_body.end();50 for (std::list<std::string>::iterator it=vhdl->_architecture[_name_architecture]._list_body.begin(); 51 it!=vhdl->_architecture[_name_architecture]._list_body.end(); 47 52 ++it) 48 set_list(_ list_body,tab+*it);53 set_list(_architecture[_name_architecture]._list_body,tab+*it); 49 54 50 55 log_printf(FUNC,Behavioural,FUNCTION,"End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_body_component.cpp
r81 r113 17 17 #undef FUNCTION 18 18 #define FUNCTION "Vhdl::set_body_component" 19 void Vhdl::set_body_component (std::string name_instance , 20 std::string name_component , 21 std::list<std::string> list_port_map ) 19 void Vhdl::set_body_component (std::string name_instance , 20 std::string name_component , 21 std::string name_architecture, 22 std::string name_package , 23 std::list<std::string> list_port_map ) 22 24 { 23 25 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 24 26 25 set_body(name_instance + " : " + name_component); 27 name_architecture = test_architecture(name_architecture); 28 29 set_body(name_instance + " : entity " + name_package + "." + name_component + " (" + name_architecture + ")"); 30 // set_body(name_instance + " : " + name_component); 26 31 set_body("port map ("); 27 set_list(_ list_body, get_list(list_port_map, 1, ",", false));32 set_list(_architecture[name_architecture]._list_body, get_list(list_port_map, 1, ",", false)); 28 33 set_body(");"); 29 34 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_constant.cpp
r95 r113 22 22 { 23 23 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 24 set_list(_list_type, "constant "+ name+"\t: "+type+"\t:= "+init); 24 25 test_architecture(); 26 27 set_list(_architecture[_name_architecture]._list_type, "constant "+ name+"\t: "+type+"\t:= "+init); 28 25 29 log_printf(FUNC,Behavioural,FUNCTION,"End"); 26 30 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_library_default.cpp
r111 r113 4 4 * $Id$ 5 5 * 6 * [ 6 * [ Description ] 7 7 * 8 8 */ … … 17 17 18 18 #undef FUNCTION 19 #define FUNCTION "Vhdl:: get_library_ieee"20 std::string Vhdl::get_library_ieee (uint32_t depth)19 #define FUNCTION "Vhdl::set_library_default" 20 void Vhdl::set_library_default (void) 21 21 { 22 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 23 24 std::string tab = morpheo::tab(depth); 25 std::ostringstream text; 26 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; 22 log_begin(Behavioural,FUNCTION); 23 24 set_library("ieee","numeric_bit" ,"all"); 25 set_library("ieee","numeric_std" ,"all"); 26 set_library("ieee","std_logic_1164" ,"all"); 27 set_library("ieee","std_logic_arith" ,"all"); 28 set_library("ieee","std_logic_misc" ,"all"); 29 // set_library("ieee","std_logic_signed" ,"all"); 30 set_library("ieee","std_logic_unsigned","all"); 31 // set_library("ieee","std_logic_textio" ,"all"); 37 32 38 log_printf(FUNC,Behavioural,FUNCTION,"End"); 39 40 return text.str(); 33 log_end(Behavioural,FUNCTION); 41 34 }; 42 35 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_library_work.cpp
r81 r113 19 19 void Vhdl::set_library_work (std::string package_name) 20 20 { 21 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 22 set_list(_list_library_work, "use work."+ package_name + ".all"); 23 log_printf(FUNC,Behavioural,FUNCTION,"End"); 21 log_begin(Behavioural,FUNCTION); 22 23 set_library("work",package_name,"all"); 24 25 log_end(Behavioural,FUNCTION); 24 26 }; 25 27 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_port.cpp
r81 r113 34 34 log_printf(FUNC,Behavioural,FUNCTION,"End"); 35 35 }; 36 37 // #undef FUNCTION 38 // #define FUNCTION "Vhdl::set_port_clock" 39 // void Vhdl::set_port_clock (std::string name) 40 // { 41 // log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 42 43 // _port_clock = name; 44 45 // log_printf(FUNC,Behavioural,FUNCTION,"End"); 46 // }; 36 47 37 48 }; // end namespace behavioural -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_signal.cpp
r95 r113 22 22 { 23 23 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 24 set_list(_list_signal, "signal "+ name + "\t: " + type); 24 25 test_architecture(); 26 27 set_list(_architecture[_name_architecture]._list_signal, "signal "+ name + "\t: " + type); 28 25 29 log_printf(FUNC,Behavioural,FUNCTION,"End"); 26 30 }; … … 39 43 { 40 44 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 41 _list_signal.push_back ("signal "+ name+"\t: "+type+"\t:= "+init); 45 46 test_architecture(); 47 48 _architecture[_name_architecture]._list_signal.push_back ("signal "+ name+"\t: "+type+"\t:= "+init); 49 42 50 log_printf(FUNC,Behavioural,FUNCTION,"End"); 43 51 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_type.cpp
r81 r113 21 21 { 22 22 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 23 set_list(_list_type, "type "+ name + "\tis " + type); 23 24 test_architecture(); 25 26 set_list(_architecture[_name_architecture]._list_type, "type "+ name + "\tis " + type); 27 24 28 log_printf(FUNC,Behavioural,FUNCTION,"End"); 25 29 };
Note: See TracChangeset
for help on using the changeset viewer.