Changeset 88 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic
- Timestamp:
- Dec 10, 2008, 7:31:39 PM (16 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic
- Files:
-
- 54 added
- 82 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/SelfTest/Makefile
r81 r88 24 24 library_clean : Counter_library_clean 25 25 26 local_clean : 27 26 28 include ../Makefile.deps 27 29 include $(DIR_MORPHEO)/Behavioural/Makefile.flags -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/SelfTest/src/test.cpp
r82 r88 37 37 #endif 38 38 39 Tusage_t _usage = USE_ALL; 40 41 // _usage = usage_unset(_usage,USE_SYSTEMC ); 42 // _usage = usage_unset(_usage,USE_VHDL ); 43 // _usage = usage_unset(_usage,USE_VHDL_TESTBENCH ); 44 // _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT); 45 // _usage = usage_unset(_usage,USE_POSITION ); 46 // _usage = usage_unset(_usage,USE_STATISTICS ); 47 // _usage = usage_unset(_usage,USE_INFORMATION ); 48 39 49 Counter * _Counter = new Counter (name.c_str(), 40 50 #ifdef STATISTICS … … 42 52 #endif 43 53 param, 44 USE_ALL);54 _usage); 45 55 46 56 #ifdef SYSTEMC -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/include/Counter.h
r82 r88 85 85 public : ~Counter (void); 86 86 87 #ifdef SYSTEMC88 87 private : void allocation (void); 89 88 private : void deallocation (void); 90 89 90 #ifdef SYSTEMC 91 91 #if defined(STATISTICS) or defined(VHDL_TESTBENCH) 92 92 public : void transition (void); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/include/Parameters.h
r81 r88 29 29 public : Parameters (uint32_t size_data, 30 30 uint32_t nb_port ); 31 public : Parameters (Parameters & param) ;31 // public : Parameters (Parameters & param) ; 32 32 public : ~Parameters () ; 33 34 public : void copy (void); 33 35 34 36 public : Parameters_test msg_error (void); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter.cpp
r82 r88 32 32 log_printf(FUNC,Counter,"Counter","Begin"); 33 33 34 #ifdef SYSTEMC 34 #if DEBUG_Counter == true 35 log_printf(INFO,Counter,FUNCTION,_("<%s> Parameters"),_name.c_str()); 36 37 std::cout << param << std::endl; 38 #endif 39 40 log_printf(INFO,Core,FUNCTION,_("<%s> Allocation"),_name.c_str()); 35 41 allocation (); 36 #endif37 42 38 43 #ifdef STATISTICS 39 // Allocation of statistics 40 statistics_declaration(param_statistics); 44 if (usage_is_set(_usage,USE_STATISTICS)) 45 { 46 log_printf(INFO,Core,FUNCTION,_("<%s> Allocation of statistics"),_name.c_str()); 47 48 // Allocation of statistics 49 statistics_declaration(param_statistics); 50 } 41 51 #endif 42 52 43 53 #ifdef VHDL 44 // generate the vhdl 45 vhdl(); 54 if (usage_is_set(_usage,USE_VHDL)) 55 { 56 // generate the vhdl 57 log_printf(INFO,Core,FUNCTION,_("<%s> Generate the vhdl"),_name.c_str()); 58 59 vhdl(); 60 } 46 61 #endif 47 62 48 63 #ifdef SYSTEMC 49 64 65 if (usage_is_set(_usage,USE_SYSTEMC)) 66 { 50 67 #if defined(STATISTICS) or defined(VHDL_TESTBENCH) 51 SC_METHOD (transition); 52 dont_initialize (); 53 sensitive << (*(in_CLOCK)).pos(); 68 log_printf(INFO,Core,FUNCTION,_("<%s> Method - transition"),_name.c_str()); 69 70 SC_METHOD (transition); 71 dont_initialize (); 72 sensitive << (*(in_CLOCK)).pos(); 54 73 #endif 55 74 56 SC_METHOD (genMealy); 57 dont_initialize (); 58 for (uint32_t i=0; i<_param._nb_port; i++) 59 sensitive << *(in_COUNTER_DATA [i]) 60 << *(in_COUNTER_ADDSUB [i]); 61 75 log_printf(INFO,Core,FUNCTION,_("<%s> Method - genMealy"),_name.c_str()); 76 SC_METHOD (genMealy); 77 dont_initialize (); 78 for (uint32_t i=0; i<_param._nb_port; i++) 79 sensitive << *(in_COUNTER_DATA [i]) 80 << *(in_COUNTER_ADDSUB [i]); 81 62 82 #ifdef SYSTEMCASS_SPECIFIC 63 // List dependency information 64 for (uint32_t i=0; i<_param._nb_port; i++) 65 { 66 (*(out_COUNTER_DATA [i])) (*(in_COUNTER_DATA [i])); 67 (*(out_COUNTER_DATA [i])) (*(in_COUNTER_ADDSUB [i])); 83 // List dependency information 84 for (uint32_t i=0; i<_param._nb_port; i++) 85 { 86 (*(out_COUNTER_DATA [i])) (*(in_COUNTER_DATA [i])); 87 (*(out_COUNTER_DATA [i])) (*(in_COUNTER_ADDSUB [i])); 88 } 89 #endif 68 90 } 69 #endif70 91 71 92 #endif … … 76 97 { 77 98 log_printf(FUNC,Counter,"~Counter","Begin"); 78 #ifdef SYSTEMC 79 deallocation (); 99 100 #ifdef STATISTICS 101 if (usage_is_set(_usage,USE_STATISTICS)) 102 { 103 delete _stat; 104 } 80 105 #endif 81 106 82 #ifdef STATISTICS 83 de lete _stat;84 #endif 107 log_printf(INFO,Core,FUNCTION,_("<%s> Deallocation"),_name.c_str()); 108 deallocation (); 109 85 110 log_printf(FUNC,Counter,"~Counter","End"); 86 111 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_allocation.cpp
r82 r88 1 #ifdef SYSTEMC2 1 /* 3 2 * $Id$ 4 3 * 5 * [ 4 * [ Description ] 6 5 * 7 6 */ … … 29 28 _interfaces = entity->set_interfaces(); 30 29 31 // ~~~~~[ 30 // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 32 31 { 33 32 Interface * interface = _interfaces->set_interface("" … … 43 42 } 44 43 45 // ~~~~~[ 44 // ~~~~~[ Interface : "counter" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 46 45 { 47 46 in_COUNTER_DATA = new SC_IN (Tdata_t) * [_param._nb_port]; … … 64 63 } 65 64 } 65 66 66 #ifdef POSITION 67 _component->generate_file(); 67 if (usage_is_set(_usage,USE_POSITION)) 68 _component->generate_file(); 68 69 #endif 69 70 70 // ~~~~~[ 71 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 71 72 log_printf(FUNC,Counter,"allocation","End"); 72 73 }; … … 77 78 }; // end namespace behavioural 78 79 }; // end namespace morpheo 79 #endif -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_deallocation.cpp
r81 r88 1 #ifdef SYSTEMC2 1 /* 3 2 * $Id$ … … 19 18 log_printf(FUNC,Counter,"deallocation","Begin"); 20 19 21 delete in_CLOCK; 22 delete in_NRESET; 23 24 delete [] in_COUNTER_DATA ; 25 delete [] in_COUNTER_ADDSUB; 26 delete [] out_COUNTER_DATA ; 27 20 if (usage_is_set(_usage,USE_SYSTEMC)) 21 { 22 delete in_CLOCK; 23 delete in_NRESET; 24 25 delete [] in_COUNTER_DATA ; 26 delete [] in_COUNTER_ADDSUB; 27 delete [] out_COUNTER_DATA ; 28 } 29 28 30 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 29 31 … … 38 40 }; // end namespace behavioural 39 41 }; // end namespace morpheo 40 #endif -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_end_cycle.cpp
r81 r88 20 20 21 21 #ifdef STATISTICS 22 _stat->end_cycle(); 22 if (usage_is_set(_usage,USE_STATISTICS)) 23 _stat->end_cycle(); 23 24 #endif 24 25 … … 26 27 // Evaluation before read the ouput signal 27 28 // sc_start(0); 28 _interfaces->testbench(); 29 if (usage_is_set(_usage,USE_VHDL_TESTBENCH)) 30 _interfaces->testbench(); 29 31 #endif 30 32 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Parameters.cpp
r81 r88 25 25 }; 26 26 27 Parameters::Parameters (Parameters & param):28 _size_data(param._size_data),29 _nb_port (param._nb_port ),30 _data_max (param._data_max )31 {32 log_printf(FUNC,Counter,"Parameters","Begin");33 test();34 log_printf(FUNC,Counter,"Parameters","End");35 };27 // Parameters::Parameters (Parameters & param): 28 // _size_data(param._size_data), 29 // _nb_port (param._nb_port ), 30 // _data_max (param._data_max ) 31 // { 32 // log_printf(FUNC,Counter,"Parameters","Begin"); 33 // test(); 34 // log_printf(FUNC,Counter,"Parameters","End"); 35 // }; 36 36 37 37 Parameters::~Parameters () … … 41 41 }; 42 42 43 void Parameters::copy (void) 44 { 45 log_printf(FUNC,Counter,"copy","Begin"); 46 log_printf(FUNC,Counter,"copy","End"); 47 }; 48 43 49 }; // end namespace counter 44 50 }; // end namespace generic 45 46 51 }; // end namespace behavioural 47 52 }; // end namespace morpheo -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/SelfTest/Makefile
r81 r88 24 24 library_clean : Queue_library_clean 25 25 26 local_clean : 27 26 28 include ../Makefile.deps 27 29 include $(DIR_MORPHEO)/Behavioural/Makefile.flags -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/SelfTest/src/test.cpp
r82 r88 22 22 #endif 23 23 24 Tusage_t _usage = USE_ALL; 25 26 // _usage = usage_unset(_usage,USE_SYSTEMC ); 27 // _usage = usage_unset(_usage,USE_VHDL ); 28 // _usage = usage_unset(_usage,USE_VHDL_TESTBENCH ); 29 // _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT); 30 // _usage = usage_unset(_usage,USE_POSITION ); 31 // _usage = usage_unset(_usage,USE_STATISTICS ); 32 // _usage = usage_unset(_usage,USE_INFORMATION ); 33 24 34 Queue * _Queue = new Queue 25 35 (name.c_str(), … … 28 38 #endif 29 39 _param, 30 USE_ALL);40 _usage); 31 41 32 42 #ifdef SYSTEMC -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/include/Parameters.h
r81 r88 29 29 public : Parameters (uint32_t size_queue, 30 30 uint32_t size_data ); 31 public : Parameters (Parameters & param) ;31 // public : Parameters (Parameters & param) ; 32 32 public : ~Parameters () ; 33 34 public : void copy (void); 33 35 34 36 public : Parameters_test msg_error (void); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/src/Parameters.cpp
r81 r88 26 26 }; 27 27 28 // #undef FUNCTION 29 // #define FUNCTION "Queue::Parameters (copy)" 30 // Parameters::Parameters (Parameters & param): 31 // _size_queue (param._size_queue), 32 // _size_data (param._size_data ) 33 // { 34 // log_printf(FUNC,Queue,FUNCTION,"Begin"); 35 // test(); 36 // log_printf(FUNC,Queue,FUNCTION,"End"); 37 // }; 38 28 39 #undef FUNCTION 29 #define FUNCTION "Queue::Parameters (copy)" 30 Parameters::Parameters (Parameters & param): 31 _size_queue (param._size_queue), 32 _size_data (param._size_data ) 40 #define FUNCTION "Queue::~Parameters" 41 Parameters::~Parameters () 33 42 { 34 43 log_printf(FUNC,Queue,FUNCTION,"Begin"); 35 test();36 44 log_printf(FUNC,Queue,FUNCTION,"End"); 37 45 }; 38 46 39 47 #undef FUNCTION 40 #define FUNCTION "Queue:: ~Parameters"41 Parameters::~Parameters ()48 #define FUNCTION "Queue::copy" 49 void Parameters::copy (void) 42 50 { 43 51 log_printf(FUNC,Queue,FUNCTION,"Begin"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/src/Queue.cpp
r81 r88 35 35 log_printf(FUNC,Queue,FUNCTION,"Begin"); 36 36 37 #if DEBUG_Core == true 38 log_printf(INFO,Core,FUNCTION,_("<%s> Parameters"),_name.c_str()); 39 40 std::cout << *param << std::endl; 41 #endif 42 37 43 log_printf(INFO,Queue,FUNCTION,"Allocation"); 38 44 allocation (); 39 45 40 46 #ifdef STATISTICS 41 if ( _usage & USE_STATISTICS)47 if (usage_is_set(_usage,USE_STATISTICS)) 42 48 { 43 49 log_printf(INFO,Queue,FUNCTION,"Allocation of statistics"); … … 48 54 49 55 #ifdef VHDL 50 if ( _usage & USE_VHDL)56 if (usage_is_set(_usage,USE_VHDL)) 51 57 { 52 58 // generate the vhdl … … 58 64 59 65 #ifdef SYSTEMC 60 if ( _usage & USE_SYSTEMC)66 if (usage_is_set(_usage,USE_SYSTEMC)) 61 67 { 62 68 log_printf(INFO,Queue,FUNCTION,"Method - transition"); … … 92 98 93 99 #ifdef STATISTICS 94 if ( _usage & USE_STATISTICS)100 if (usage_is_set(_usage,USE_STATISTICS)) 95 101 { 96 102 log_printf(INFO,Queue,FUNCTION,"Generate Statistics file"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/src/Queue_allocation.cpp
r81 r88 75 75 } 76 76 77 if (usage_is_set(_usage,USE_SYSTEMC)) 78 { 77 79 // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 78 80 _queue_control = new morpheo::behavioural::generic::queue_control::Queue_Control::Queue_Control(_param->_size_queue); 79 81 _queue_data = new Tdata_t [_param->_size_queue]; 82 } 80 83 81 84 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 82 85 83 86 #ifdef POSITION 84 _component->generate_file(); 87 if (usage_is_set(_usage,USE_POSITION)) 88 _component->generate_file(); 85 89 #endif 86 90 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/src/Queue_deallocation.cpp
r81 r88 20 20 log_printf(FUNC,Queue,FUNCTION,"Begin"); 21 21 22 if ( _usage & USE_SYSTEMC)22 if (usage_is_set(_usage,USE_SYSTEMC)) 23 23 { 24 24 delete in_CLOCK ; … … 33 33 delete out_RETIRE_DATA; 34 34 35 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 36 delete _queue_control; 37 delete _queue_data; 35 38 } 36 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 37 delete _queue_control; 38 delete _queue_data; 39 39 40 delete _component; 40 41 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/src/Queue_end_cycle.cpp
r81 r88 21 21 22 22 #ifdef STATISTICS 23 _stat->end_cycle(); 23 if (usage_is_set(_usage,USE_STATISTICS)) 24 _stat->end_cycle(); 24 25 #endif 25 26 … … 27 28 // Evaluation before read the ouput signal 28 29 // sc_start(0); 29 _interfaces->testbench(); 30 if (usage_is_set(_usage,USE_VHDL_TESTBENCH)) 31 _interfaces->testbench(); 30 32 #endif 31 33 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/SelfTest/Makefile
r81 r88 23 23 library_clean : RegisterFile_Monolithic_library_clean 24 24 25 local_clean : 26 25 27 include ../Makefile.deps 26 28 include $(DIR_MORPHEO)/Behavioural/Makefile.flags -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/SelfTest/src/test.cpp
r82 r88 32 32 exit (EXIT_FAILURE); 33 33 } 34 35 Tusage_t _usage = USE_ALL; 36 37 // _usage = usage_unset(_usage,USE_SYSTEMC ); 38 // _usage = usage_unset(_usage,USE_VHDL ); 39 // _usage = usage_unset(_usage,USE_VHDL_TESTBENCH ); 40 // _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT); 41 // _usage = usage_unset(_usage,USE_POSITION ); 42 // _usage = usage_unset(_usage,USE_STATISTICS ); 43 // _usage = usage_unset(_usage,USE_INFORMATION ); 34 44 35 45 #ifdef STATISTICS … … 42 52 #endif 43 53 ,_param 44 , USE_ALL);54 ,_usage); 45 55 46 56 #ifdef SYSTEMC -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/Parameters.h
r81 r88 34 34 uint32_t nb_word , 35 35 uint32_t size_word ); 36 public : Parameters (Parameters & param) ;36 // public : Parameters (Parameters & param) ; 37 37 public : ~Parameters () ; 38 38 39 public : void copy (void); 40 39 41 public : Parameters_test msg_error (void); 42 40 43 public : std::string print (uint32_t depth); 41 44 public : friend std::ostream& operator<< (std::ostream& output_stream, -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/Parameters.cpp
r81 r88 32 32 }; 33 33 34 Parameters::Parameters (Parameters & param) : 35 _nb_port_read (param._nb_port_read ), 36 _nb_port_write (param._nb_port_write), 37 _nb_port_read_write(param._nb_port_read_write), 38 _nb_word (param._nb_word ), 39 _size_word (param._size_word ), 40 _size_address (param._size_address ), 41 _have_port_address (param._have_port_address) 34 // Parameters::Parameters (Parameters & param) : 35 // _nb_port_read (param._nb_port_read ), 36 // _nb_port_write (param._nb_port_write), 37 // _nb_port_read_write(param._nb_port_read_write), 38 // _nb_word (param._nb_word ), 39 // _size_word (param._size_word ), 40 // _size_address (param._size_address ), 41 // _have_port_address (param._have_port_address) 42 // { 43 // test(); 44 // }; 45 46 Parameters::~Parameters () 42 47 { 43 test();44 48 }; 45 49 46 Parameters::~Parameters () 47 { }; 50 void Parameters::copy (void) 51 { 52 }; 48 53 49 54 }; // end namespace registerfile_monolithic -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic.cpp
r81 r88 33 33 log_printf(FUNC,RegisterFile_Monolithic,"RegisterFile_Monolithic","Begin"); 34 34 35 #if DEBUG_RegisterFile_Monolithic == true 36 log_printf(INFO,RegisterFile_Monolithic,FUNCTION,_("<%s> Parameters"),_name.c_str()); 37 38 std::cout << *param << std::endl; 39 #endif 40 35 41 log_printf(INFO,RegisterFile_Monolithic,"RegisterFile_Monolithic","Allocation"); 36 42 allocation (); 37 43 38 44 #ifdef STATISTICS 39 if ( _usage & USE_STATISTICS)45 if (usage_is_set(_usage,USE_STATISTICS)) 40 46 statistics_declaration(param_statistics); 41 47 #endif … … 47 53 48 54 #ifdef SYSTEMC 49 if ( _usage & USE_SYSTEMC)55 if (usage_is_set(_usage,USE_SYSTEMC)) 50 56 { 51 57 SC_METHOD (transition); … … 102 108 { 103 109 #ifdef STATISTICS 104 if ( _usage & USE_STATISTICS)110 if (usage_is_set(_usage,USE_STATISTICS)) 105 111 delete _stat; 106 112 #endif -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_allocation.cpp
r81 r88 120 120 121 121 // ----- Register 122 reg_DATA = new Tdata_t [_param->_nb_word]; 122 if (usage_is_set(_usage,USE_SYSTEMC)) 123 reg_DATA = new Tdata_t [_param->_nb_word]; 123 124 124 125 #ifdef POSITION 125 _component->generate_file(); 126 if (usage_is_set(_usage,USE_POSITION)) 127 _component->generate_file(); 126 128 #endif 127 129 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_deallocation.cpp
r81 r88 18 18 delete _component; 19 19 20 if ( _usage & USE_SYSTEMC)20 if (usage_is_set(_usage,USE_SYSTEMC)) 21 21 { 22 22 delete in_CLOCK; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_end_cycle.cpp
r81 r88 20 20 21 21 #ifdef STATISTICS 22 _stat->end_cycle(); 22 if (usage_is_set(_usage,USE_STATISTICS)) 23 _stat->end_cycle(); 23 24 #endif 24 25 … … 27 28 28 29 // sc_start(0); 29 _interfaces->testbench(); 30 if (usage_is_set(_usage,USE_VHDL_TESTBENCH)) 31 _interfaces->testbench(); 30 32 #endif 31 33 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_transition.cpp
r81 r88 24 24 { 25 25 #ifdef STATISTICS 26 (*_stat_nb_write) ++; 26 if (usage_is_set(_usage,USE_STATISTICS)) 27 (*_stat_nb_write) ++; 27 28 #endif 28 29 … … 49 50 { 50 51 #ifdef STATISTICS 51 (*_stat_nb_write) ++; 52 if (usage_is_set(_usage,USE_STATISTICS)) 53 (*_stat_nb_write) ++; 52 54 #endif 53 55 … … 67 69 else 68 70 { 69 (*_stat_nb_read) ++; 71 if (usage_is_set(_usage,USE_STATISTICS)) 72 (*_stat_nb_read) ++; 70 73 } 71 74 #endif … … 74 77 75 78 #ifdef STATISTICS 76 for (uint32_t i=0; i<_param->_nb_port_read; i++) 77 if ( PORT_READ(in_READ_VAL [i]) == 1) 78 (*_stat_nb_read) ++; 79 if (usage_is_set(_usage,USE_STATISTICS)) 80 for (uint32_t i=0; i<_param->_nb_port_read; i++) 81 if ( PORT_READ(in_READ_VAL [i]) == 1) 82 (*_stat_nb_read) ++; 79 83 #endif 80 84 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/SelfTest/Makefile
r81 r88 24 24 library_clean : RegisterFile_Multi_Banked_library_clean 25 25 26 local_clean : 27 26 28 include ../Makefile.deps 27 29 include $(DIR_MORPHEO)/Behavioural/Makefile.flags -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/SelfTest/src/test.cpp
r82 r88 23 23 #endif 24 24 25 Tusage_t _usage = USE_ALL; 26 27 // _usage = usage_unset(_usage,USE_SYSTEMC ); 28 // _usage = usage_unset(_usage,USE_VHDL ); 29 // _usage = usage_unset(_usage,USE_VHDL_TESTBENCH ); 30 // _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT); 31 // _usage = usage_unset(_usage,USE_POSITION ); 32 _usage = usage_unset(_usage,USE_STATISTICS ); 33 // _usage = usage_unset(_usage,USE_INFORMATION ); 34 25 35 RegisterFile_Multi_Banked * _RegisterFile_Multi_Banked = new RegisterFile_Multi_Banked 26 36 (name.c_str(), … … 29 39 #endif 30 40 _param, 31 USE_ALL);41 _usage); 32 42 33 43 #ifdef SYSTEMC -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/include/Parameters.h
r81 r88 61 61 uint32_t nb_port_write_by_bank, 62 62 Tcrossbar_t crossbar ); 63 public : Parameters (Parameters & param) ;63 // public : Parameters (Parameters & param) ; 64 64 public : ~Parameters () ; 65 65 66 public : void copy (void); 67 66 68 public : Parameters_test msg_error (void); 67 public : std::string print (uint32_t depth); 68 public : friend std::ostream& operator<< (std::ostream& output_stream, 69 morpheo::behavioural::generic::registerfile::registerfile_multi_banked::Parameters & x); 69 70 public : std::string print (uint32_t depth); 71 public : friend std::ostream& operator<< (std::ostream& output_stream, 72 morpheo::behavioural::generic::registerfile::registerfile_multi_banked::Parameters & x); 70 73 }; 71 74 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/include/RegisterFile_Multi_Banked.h
r82 r88 106 106 public : ~RegisterFile_Multi_Banked (void); 107 107 108 #ifdef SYSTEMC109 108 private : void allocation (void); 110 109 private : void deallocation (void); 111 110 111 #ifdef SYSTEMC 112 112 private : Taddress_t address_bank (Taddress_t address); 113 113 private : Taddress_t address_num_reg (Taddress_t address); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/Parameters.cpp
r81 r88 87 87 }; 88 88 89 Parameters::Parameters (Parameters & param):90 _nb_port_read (param._nb_port_read ),91 _nb_port_write (param._nb_port_write ),92 _nb_word (param._nb_word ),93 _size_word (param._size_word ),94 _nb_bank (param._nb_bank ),95 _nb_port_read_by_bank (param._nb_port_read_by_bank ),96 _nb_port_write_by_bank (param._nb_port_write_by_bank),97 _crossbar (param._crossbar ),98 _size_address (param._size_address ),99 _size_address_by_bank (param._size_address_by_bank ),100 _bank_shift (param._bank_shift ),101 _bank_mask (param._bank_mask ),102 _num_reg_shift (param._num_reg_shift ),103 _num_reg_mask (param._num_reg_mask ),104 _nb_word_by_bank (param._nb_word_by_bank ),105 _have_port_address (param._have_port_address ),106 _have_bank_port_address(param._have_bank_port_address)107 {108 log_printf(FUNC,RegisterFile_Multi_Banked,"Parameters (copy)","Begin");89 // Parameters::Parameters (Parameters & param): 90 // _nb_port_read (param._nb_port_read ), 91 // _nb_port_write (param._nb_port_write ), 92 // _nb_word (param._nb_word ), 93 // _size_word (param._size_word ), 94 // _nb_bank (param._nb_bank ), 95 // _nb_port_read_by_bank (param._nb_port_read_by_bank ), 96 // _nb_port_write_by_bank (param._nb_port_write_by_bank), 97 // _crossbar (param._crossbar ), 98 // _size_address (param._size_address ), 99 // _size_address_by_bank (param._size_address_by_bank ), 100 // _bank_shift (param._bank_shift ), 101 // _bank_mask (param._bank_mask ), 102 // _num_reg_shift (param._num_reg_shift ), 103 // _num_reg_mask (param._num_reg_mask ), 104 // _nb_word_by_bank (param._nb_word_by_bank ), 105 // _have_port_address (param._have_port_address ), 106 // _have_bank_port_address(param._have_bank_port_address) 107 // { 108 // log_printf(FUNC,RegisterFile_Multi_Banked,"Parameters (copy)","Begin"); 109 109 110 if (_crossbar == PARTIAL_CROSSBAR)111 {112 // All port_src is connected with one port_dest on each bank110 // if (_crossbar == PARTIAL_CROSSBAR) 111 // { 112 // // All port_src is connected with one port_dest on each bank 113 113 114 _link_port_read_to_bank_read = new uint32_t [_nb_port_read ];115 // _link_port_read_to_num_bank = new uint32_t [_nb_port_read ];116 _link_port_write_to_bank_write = new uint32_t [_nb_port_write];117 // _link_port_write_to_num_bank = new uint32_t [_nb_port_write];114 // _link_port_read_to_bank_read = new uint32_t [_nb_port_read ]; 115 // // _link_port_read_to_num_bank = new uint32_t [_nb_port_read ]; 116 // _link_port_write_to_bank_write = new uint32_t [_nb_port_write]; 117 // // _link_port_write_to_num_bank = new uint32_t [_nb_port_write]; 118 118 119 for (uint32_t i=0; i<_nb_port_read ;i++)120 {121 _link_port_read_to_bank_read [i] = param._link_port_read_to_bank_read [i];122 // _link_port_read_to_num_bank [i] = param._link_port_read_to_num_bank [i];123 }124 for (uint32_t i=0; i<_nb_port_write ;i++)125 {126 _link_port_write_to_bank_write [i] = param._link_port_write_to_bank_write [i];127 // _link_port_write_to_num_bank [i] = param._link_port_write_to_num_bank [i];128 }129 }119 // for (uint32_t i=0; i<_nb_port_read ;i++) 120 // { 121 // _link_port_read_to_bank_read [i] = param._link_port_read_to_bank_read [i]; 122 // // _link_port_read_to_num_bank [i] = param._link_port_read_to_num_bank [i]; 123 // } 124 // for (uint32_t i=0; i<_nb_port_write ;i++) 125 // { 126 // _link_port_write_to_bank_write [i] = param._link_port_write_to_bank_write [i]; 127 // // _link_port_write_to_num_bank [i] = param._link_port_write_to_num_bank [i]; 128 // } 129 // } 130 130 131 test();132 log_printf(FUNC,RegisterFile_Multi_Banked,"Parameters (copy)","End");133 };131 // test(); 132 // log_printf(FUNC,RegisterFile_Multi_Banked,"Parameters (copy)","End"); 133 // }; 134 134 135 135 Parameters::~Parameters () … … 147 147 }; 148 148 149 void Parameters::copy (void) 150 { 151 log_printf(FUNC,RegisterFile_Multi_Banked,"copy","Begin"); 152 log_printf(FUNC,RegisterFile_Multi_Banked,"copy","End"); 153 }; 154 149 155 }; // end namespace registerfile_multi_banked 150 156 }; // end namespace registerfile -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/RegisterFile_Multi_Banked.cpp
r82 r88 14 14 namespace registerfile_multi_banked { 15 15 16 #undef FUNCTION 17 #define FUNCTION "RegisterFile_Multi_Banked::RegisterFile_Multi_Banked" 16 18 RegisterFile_Multi_Banked::RegisterFile_Multi_Banked 17 19 ( … … 30 32 ,_usage (usage) 31 33 { 32 log_printf(FUNC,RegisterFile_Multi_Banked, "RegisterFile_Multi_Banked","Begin");34 log_printf(FUNC,RegisterFile_Multi_Banked,FUNCTION,"Begin"); 33 35 34 #if def SYSTEMC35 log_printf(INFO,RegisterFile_Multi_Banked, "RegisterFile_Multi_Banked","Allocation");36 #if DEBUG_RegisterFile_Multi_Banked == true 37 log_printf(INFO,RegisterFile_Multi_Banked,FUNCTION,_("<%s> Parameters"),_name.c_str()); 36 38 39 std::cout << *param << std::endl; 40 #endif 41 42 log_printf(INFO,RegisterFile_Multi_Banked,FUNCTION,"Allocation"); 43 37 44 allocation (); 38 #endif39 45 40 46 #ifdef STATISTICS 41 log_printf(INFO,RegisterFile_Multi_Banked,"RegisterFile_Multi_Banked","Allocation of statistics"); 42 43 // Allocation of statistics 44 statistics_declaration(param_statistics); 47 if (usage_is_set(_usage,USE_STATISTICS)) 48 { 49 log_printf(INFO,RegisterFile_Multi_Banked,FUNCTION,"Allocation of statistics"); 50 51 // Allocation of statistics 52 statistics_declaration(param_statistics); 53 } 45 54 #endif 46 55 47 56 #ifdef VHDL 48 // generate the vhdl 49 log_printf(INFO,RegisterFile_Multi_Banked,"RegisterFile_Multi_Banked","Generate the vhdl"); 50 51 vhdl(); 57 if (usage_is_set(_usage,USE_VHDL)) 58 { 59 // generate the vhdl 60 log_printf(INFO,RegisterFile_Multi_Banked,FUNCTION,"Generate the vhdl"); 61 62 vhdl(); 63 } 52 64 #endif 53 65 54 66 #ifdef SYSTEMC 67 if (usage_is_set(_usage,USE_SYSTEMC)) 68 { 55 69 // Function pointer 56 70 if (_param->_crossbar == FULL_CROSSBAR) … … 67 81 } 68 82 69 log_printf(INFO,RegisterFile_Multi_Banked, "RegisterFile_Multi_Banked","Method - transition");83 log_printf(INFO,RegisterFile_Multi_Banked,FUNCTION,"Method - transition"); 70 84 71 85 SC_METHOD (transition); … … 77 91 #endif 78 92 79 log_printf(INFO,RegisterFile_Multi_Banked, "RegisterFile_Multi_Banked","Method - genMealy_write");93 log_printf(INFO,RegisterFile_Multi_Banked,FUNCTION,"Method - genMealy_write"); 80 94 81 95 SC_METHOD (genMealy_read); … … 129 143 } 130 144 #endif 131 145 } 132 146 #endif 133 log_printf(FUNC,RegisterFile_Multi_Banked, "RegisterFile_Multi_Banked","End");147 log_printf(FUNC,RegisterFile_Multi_Banked,FUNCTION,"End"); 134 148 }; 135 149 150 #undef FUNCTION 151 #define FUNCTION "RegisterFile_Multi_Banked::~RegisterFile_Multi_Banked" 136 152 RegisterFile_Multi_Banked::~RegisterFile_Multi_Banked (void) 137 153 { 138 log_printf(FUNC,RegisterFile_Multi_Banked, "~RegisterFile_Multi_Banked","Begin");154 log_printf(FUNC,RegisterFile_Multi_Banked,FUNCTION,"Begin"); 139 155 140 156 #ifdef STATISTICS 141 log_printf(INFO,RegisterFile_Multi_Banked,"~RegisterFile_Multi_Banked","Generate Statistics file"); 142 143 delete _stat; 157 if (usage_is_set(_usage,USE_STATISTICS)) 158 { 159 log_printf(INFO,RegisterFile_Multi_Banked,FUNCTION,"Generate Statistics file"); 160 delete _stat; 161 } 144 162 #endif 145 163 146 #ifdef SYSTEMC 147 log_printf(INFO,RegisterFile_Multi_Banked,"~RegisterFile_Multi_Banked","Deallocation");164 log_printf(INFO,RegisterFile_Multi_Banked,FUNCTION,"Deallocation"); 165 deallocation (); 148 166 149 deallocation (); 150 #endif 151 152 log_printf(FUNC,RegisterFile_Multi_Banked,"~RegisterFile_Multi_Banked","End"); 167 log_printf(FUNC,RegisterFile_Multi_Banked,FUNCTION,"End"); 153 168 }; 154 169 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/RegisterFile_Multi_Banked_allocation.cpp
r82 r88 1 #ifdef SYSTEMC2 1 /* 3 2 * $Id$ 4 3 * 5 * [ 4 * [ Description ] 6 5 * 7 6 */ … … 31 30 _interfaces = entity->set_interfaces(); 32 31 33 // ~~~~~[ 32 // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 34 33 35 34 Interface * interface = _interfaces->set_interface("" … … 44 43 in_NRESET = interface->set_signal_in <Tcontrol_t> ("nreset",1, RESET_VHDL_YES); 45 44 46 // ~~~~~[ 45 // ~~~~~[ Interface : "read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 47 46 48 47 in_READ_VAL = new SC_IN (Tcontrol_t) * [_param->_nb_port_read]; … … 69 68 } 70 69 71 // ~~~~~[ 70 // ~~~~~[ Interface : "write" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 72 71 73 72 in_WRITE_VAL = new SC_IN (Tcontrol_t) * [_param->_nb_port_write]; … … 94 93 } 95 94 96 // ~~~~~[ Registers ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 95 if (usage_is_set(_usage,USE_SYSTEMC)) 96 { 97 // ~~~~~[ Registers ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 97 98 98 99 reg_DATA = new Tdata_t * [_param->_nb_bank]; … … 103 104 } 104 105 105 // ~~~~~[ 106 // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 106 107 internal_WRITE_VAL = new bool [_param->_nb_port_write]; 107 108 internal_WRITE_BANK = new Taddress_t [_param->_nb_port_write]; 108 109 internal_WRITE_NUM_REG = new Taddress_t [_param->_nb_port_write]; 110 } 109 111 110 // ~~~~~[ 112 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 111 113 112 114 #ifdef POSITION 113 _component->generate_file(); 115 if (usage_is_set(_usage,USE_POSITION)) 116 _component->generate_file(); 114 117 #endif 115 118 … … 123 126 }; // end namespace behavioural 124 127 }; // end namespace morpheo 125 #endif -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/RegisterFile_Multi_Banked_deallocation.cpp
r81 r88 1 #ifdef SYSTEMC2 1 /* 3 2 * $Id$ … … 20 19 log_printf(FUNC,RegisterFile_Multi_Banked,"deallocation","Begin"); 21 20 22 delete in_CLOCK; 23 delete in_NRESET; 24 25 // ----- Interface Read 26 delete [] in_READ_VAL ; 27 delete [] out_READ_ACK ; 28 if (_param->_have_port_address == true) 29 delete [] in_READ_ADDRESS; 30 delete [] out_READ_DATA ; 31 32 // ----- Interface Write 33 delete [] in_WRITE_VAL ; 34 delete [] out_WRITE_ACK ; 35 if (_param->_have_port_address == true) 36 delete [] in_WRITE_ADDRESS; 37 delete [] in_WRITE_DATA ; 38 39 // ----- Register 40 delete [] reg_DATA; 41 42 // ----- Internal 43 delete [] internal_WRITE_VAL; 44 delete [] internal_WRITE_BANK; 45 delete [] internal_WRITE_NUM_REG; 21 if (usage_is_set(_usage,USE_SYSTEMC)) 22 { 23 delete in_CLOCK; 24 delete in_NRESET; 25 26 // ----- Interface Read 27 delete [] in_READ_VAL ; 28 delete [] out_READ_ACK ; 29 if (_param->_have_port_address == true) 30 delete [] in_READ_ADDRESS; 31 delete [] out_READ_DATA ; 32 33 // ----- Interface Write 34 delete [] in_WRITE_VAL ; 35 delete [] out_WRITE_ACK ; 36 if (_param->_have_port_address == true) 37 delete [] in_WRITE_ADDRESS; 38 delete [] in_WRITE_DATA ; 39 40 // ----- Register 41 delete [] reg_DATA; 42 43 // ----- Internal 44 delete [] internal_WRITE_VAL; 45 delete [] internal_WRITE_BANK; 46 delete [] internal_WRITE_NUM_REG; 47 } 46 48 47 49 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ … … 58 60 }; // end namespace behavioural 59 61 }; // end namespace morpheo 60 #endif -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/RegisterFile_Multi_Banked_end_cycle.cpp
r81 r88 23 23 24 24 #ifdef STATISTICS 25 _stat->end_cycle(); 25 if (usage_is_set(_usage,USE_STATISTICS)) 26 _stat->end_cycle(); 26 27 #endif 27 28 … … 29 30 // Evaluation before read the ouput signal 30 31 // sc_start(0); 31 _interfaces->testbench(); 32 if (usage_is_set(_usage,USE_VHDL_TESTBENCH)) 33 _interfaces->testbench(); 32 34 #endif 33 35 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/SelfTest/Makefile
r81 r88 24 24 library_clean : RegisterFile_library_clean 25 25 26 local_clean : 27 26 28 include ../Makefile.deps 27 29 include $(DIR_MORPHEO)/Behavioural/Makefile.flags -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/SelfTest/src/main.cpp
r81 r88 58 58 if (instance == instance_RegisterFile_Monolithic) 59 59 { 60 morpheo::behavioural::generic::registerfile::registerfile_monolithic ::Parameters * param1 = new morpheo::behavioural::generic::registerfile::registerfile_monolithic ::Parameters (nb_port_read , 61 nb_port_write , 62 0 , 63 nb_word , 64 size_word ); 60 morpheo::behavioural::generic::registerfile::registerfile_monolithic ::Parameters * param1 = new morpheo::behavioural::generic::registerfile::registerfile_monolithic ::Parameters 61 (nb_port_read , 62 nb_port_write , 63 0 , 64 nb_word , 65 size_word 66 ); 65 67 66 68 param = new morpheo::behavioural::generic::registerfile::Parameters(param1); … … 68 70 else 69 71 { 70 morpheo::behavioural::generic::registerfile::registerfile_multi_banked::Parameters * param2 = new morpheo::behavioural::generic::registerfile::registerfile_multi_banked::Parameters (nb_port_read , 71 nb_port_write , 72 nb_word , 73 size_word , 74 nb_bank , 75 nb_port_read_by_bank , 76 nb_port_write_by_bank, 77 crossbar ); 72 morpheo::behavioural::generic::registerfile::registerfile_multi_banked::Parameters * param2 = new morpheo::behavioural::generic::registerfile::registerfile_multi_banked::Parameters 73 (nb_port_read , 74 nb_port_write , 75 nb_word , 76 size_word , 77 nb_bank , 78 nb_port_read_by_bank , 79 nb_port_write_by_bank, 80 crossbar 81 ); 78 82 79 83 param = new morpheo::behavioural::generic::registerfile::Parameters(param2); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/SelfTest/src/test.cpp
r82 r88 22 22 #endif 23 23 24 Tusage_t _usage = USE_ALL; 25 26 // _usage = usage_unset(_usage,USE_SYSTEMC ); 27 // _usage = usage_unset(_usage,USE_VHDL ); 28 // _usage = usage_unset(_usage,USE_VHDL_TESTBENCH ); 29 // _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT); 30 // _usage = usage_unset(_usage,USE_POSITION ); 31 // _usage = usage_unset(_usage,USE_STATISTICS ); 32 // _usage = usage_unset(_usage,USE_INFORMATION ); 33 24 34 RegisterFile * _RegisterFile = new RegisterFile (name.c_str(), 25 35 #ifdef STATISTICS … … 27 37 #endif 28 38 _param, 29 USE_ALL);39 _usage); 30 40 31 41 #ifdef SYSTEMC -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/include/Parameters.h
r81 r88 40 40 public : Parameters (morpheo::behavioural::generic::registerfile::registerfile_monolithic ::Parameters * param); 41 41 public : Parameters (morpheo::behavioural::generic::registerfile::registerfile_multi_banked::Parameters * param); 42 public : Parameters (Parameters & param) ;42 // public : Parameters (Parameters & param) ; 43 43 public : ~Parameters () ; 44 44 45 public : void copy (void); 46 45 47 public : Parameters_test msg_error (void); 48 46 49 public : std::string print (uint32_t depth); 47 50 public : friend std::ostream& operator<< (std::ostream& output_stream, -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/src/Parameters.cpp
r81 r88 26 26 27 27 _param_registerfile_monolithic = param; 28 28 _param_registerfile_multi_banked = NULL; 29 29 30 test(); 30 31 … … 43 44 log_printf(FUNC,RegisterFile,"Parameters","Begin"); 44 45 46 _param_registerfile_monolithic = NULL; 45 47 _param_registerfile_multi_banked = param; 46 48 … … 50 52 }; 51 53 52 Parameters::Parameters (Parameters & param):53 _instance (param._instance ),54 _nb_port_read (param._nb_port_read ),55 _nb_port_write (param._nb_port_write),56 _nb_word (param._nb_word ),57 _size_word (param._size_word ),58 _size_address (param._size_address ),59 _have_port_address (param._have_port_address)60 {61 log_printf(FUNC,RegisterFile,"Parameters (copy)","Begin");54 // Parameters::Parameters (Parameters & param): 55 // _instance (param._instance ), 56 // _nb_port_read (param._nb_port_read ), 57 // _nb_port_write (param._nb_port_write), 58 // _nb_word (param._nb_word ), 59 // _size_word (param._size_word ), 60 // _size_address (param._size_address ), 61 // _have_port_address (param._have_port_address) 62 // { 63 // log_printf(FUNC,RegisterFile,"Parameters (copy)","Begin"); 62 64 63 _param_registerfile_multi_banked = param._param_registerfile_multi_banked;64 _param_registerfile_monolithic = param._param_registerfile_monolithic;65 test();66 log_printf(FUNC,RegisterFile,"Parameters (copy)","End");67 };65 // _param_registerfile_multi_banked = param._param_registerfile_multi_banked; 66 // _param_registerfile_monolithic = param._param_registerfile_monolithic; 67 // test(); 68 // log_printf(FUNC,RegisterFile,"Parameters (copy)","End"); 69 // }; 68 70 69 71 Parameters::~Parameters () … … 73 75 }; 74 76 77 void Parameters::copy (void) 78 { 79 log_printf(FUNC,RegisterFile,"copy","Begin"); 80 81 throw ERRORMORPHEO("RegisterFile::copy",_("Invalid copy")); 82 83 // if (_instance == instance_RegisterFile_Monolithic) 84 // COPY(_param_registerfile_monolithic); 85 // if (_instance == instance_RegisterFile_Multi_Banked) 86 // COPY(_param_registerfile_multi_banked); 87 88 log_printf(FUNC,RegisterFile,"copy","End"); 89 }; 90 75 91 }; // end namespace registerfile 76 92 }; // end namespace generic -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/SelfTest/Makefile
r81 r88 23 23 library_clean : Select_Priority_Fixed_library_clean 24 24 25 local_clean : 26 25 27 include ../Makefile.deps 26 28 include $(DIR_MORPHEO)/Behavioural/Makefile.flags -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/SelfTest/src/test.cpp
r82 r88 18 18 cout << "<" << name << "> : Simulation SystemC" << endl; 19 19 20 21 20 #ifdef STATISTICS 22 21 morpheo::behavioural::Parameters_Statistics * _param_stat = new morpheo::behavioural::Parameters_Statistics (5,50); 23 22 #endif 23 24 Tusage_t _usage = USE_ALL; 25 26 // _usage = usage_unset(_usage,USE_SYSTEMC ); 27 // _usage = usage_unset(_usage,USE_VHDL ); 28 // _usage = usage_unset(_usage,USE_VHDL_TESTBENCH ); 29 // _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT); 30 // _usage = usage_unset(_usage,USE_POSITION ); 31 // _usage = usage_unset(_usage,USE_STATISTICS ); 32 // _usage = usage_unset(_usage,USE_INFORMATION ); 33 24 34 Select_Priority_Fixed * _Select_Priority_Fixed = new Select_Priority_Fixed 25 35 (name.c_str(), … … 28 38 #endif 29 39 _param, 30 USE_ALL);40 _usage); 31 41 32 42 #ifdef SYSTEMC -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/include/Parameters.h
r81 r88 31 31 bool encoding_one_hot, 32 32 bool encoding_compact); 33 public : Parameters (Parameters & param) ;33 // public : Parameters (Parameters & param) ; 34 34 public : ~Parameters () ; 35 35 36 public : void copy (void); 37 36 38 public : Parameters_test msg_error (void); 39 37 40 public : std::string print (uint32_t depth); 38 41 public : friend std::ostream& operator<< (std::ostream& output_stream, -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/include/Select_Priority_Fixed.h
r82 r88 95 95 public : ~Select_Priority_Fixed (void); 96 96 97 #ifdef SYSTEMC98 97 private : void allocation (void); 99 98 private : void deallocation (void); 100 99 100 #ifdef SYSTEMC 101 101 # if defined(STATISTICS) or defined(VHDL_TESTBENCH) 102 102 public : void transition (void); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/src/Parameters.cpp
r81 r88 28 28 }; 29 29 30 Parameters::Parameters (Parameters & param):31 _nb_entity (param._nb_entity ),32 _encoding_one_hot (param._encoding_one_hot),33 _encoding_compact (param._encoding_compact),34 _size_entity (param._size_entity )35 {36 log_printf(FUNC,Select_Priority_Fixed,"Parameters","Begin");37 test();38 log_printf(FUNC,Select_Priority_Fixed,"Parameters","End");39 };30 // Parameters::Parameters (Parameters & param): 31 // _nb_entity (param._nb_entity ), 32 // _encoding_one_hot (param._encoding_one_hot), 33 // _encoding_compact (param._encoding_compact), 34 // _size_entity (param._size_entity ) 35 // { 36 // log_printf(FUNC,Select_Priority_Fixed,"Parameters","Begin"); 37 // test(); 38 // log_printf(FUNC,Select_Priority_Fixed,"Parameters","End"); 39 // }; 40 40 41 41 Parameters::~Parameters () … … 43 43 log_printf(FUNC,Select_Priority_Fixed,"~Parameters","Begin"); 44 44 log_printf(FUNC,Select_Priority_Fixed,"~Parameters","End"); 45 }; 46 47 void Parameters::copy (void) 48 { 49 log_printf(FUNC,Select_Priority_Fixed,"copy","Begin"); 50 log_printf(FUNC,Select_Priority_Fixed,"copy","End"); 45 51 }; 46 52 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/src/Select_Priority_Fixed.cpp
r81 r88 2 2 * $Id$ 3 3 * 4 * [ 4 * [ Description ] 5 5 * 6 6 */ … … 33 33 log_printf(FUNC,Select_Priority_Fixed,"Select_Priority_Fixed","Begin"); 34 34 35 #if DEBUG_Select_Priority_Fixed == true 36 log_printf(INFO,Select_Priority_Fixed,FUNCTION,_("<%s> Parameters"),_name.c_str()); 37 38 std::cout << *param << std::endl; 39 #endif 40 35 41 log_printf(INFO,Select_Priority_Fixed,"Select_Priority_Fixed","Allocation"); 36 42 allocation (); 37 43 38 44 #ifdef STATISTICS 39 if ( _usage & USE_STATISTICS)45 if (usage_is_set(_usage,USE_STATISTICS)) 40 46 { 41 47 log_printf(INFO,Select_Priority_Fixed,"Select_Priority_Fixed","Allocation of statistics"); … … 46 52 47 53 #ifdef VHDL 48 // generate the vhdl 49 log_printf(INFO,Select_Priority_Fixed,"Select_Priority_Fixed","Generate the vhdl"); 50 51 vhdl(); 54 if (usage_is_set(_usage,USE_VHDL) 55 { 56 // generate the vhdl 57 log_printf(INFO,Select_Priority_Fixed,"Select_Priority_Fixed","Generate the vhdl"); 58 59 vhdl(); 60 } 52 61 #endif 53 62 54 63 #ifdef SYSTEMC 55 if (_usage & USE_SYSTEMC)56 {64 if (usage_is_set(_usage,USE_SYSTEMC)) 65 { 57 66 # if defined(STATISTICS) or defined(VHDL_TESTBENCH) 58 67 log_printf(INFO,Select_Priority_Fixed,"Select_Priority_Fixed","Method - transition"); … … 96 105 97 106 #ifdef STATISTICS 98 if ( _usage & USE_STATISTICS)107 if (usage_is_set(_usage,USE_STATISTICS)) 99 108 { 100 109 log_printf(INFO,Select_Priority_Fixed,"~Select_Priority_Fixed","Generate Statistics file"); … … 104 113 #endif 105 114 106 #ifdef SYSTEMC107 115 log_printf(INFO,Select_Priority_Fixed,"~Select_Priority_Fixed","Deallocation"); 108 109 116 deallocation (); 110 #endif111 117 112 118 log_printf(FUNC,Select_Priority_Fixed,"~Select_Priority_Fixed","End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/src/Select_Priority_Fixed_allocation.cpp
r81 r88 1 #ifdef SYSTEMC2 1 /* 3 2 * $Id$ … … 30 29 _interfaces = entity->set_interfaces(); 31 30 32 // ~~~~~[ 31 // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 33 32 34 33 Interface_fifo * interface = _interfaces->set_interface("" … … 63 62 64 63 #ifdef POSITION 65 _component->generate_file(); 64 if (usage_is_set(_usage,USE_POSITION)) 65 _component->generate_file(); 66 66 #endif 67 67 … … 74 74 }; // end namespace behavioural 75 75 }; // end namespace morpheo 76 #endif -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/src/Select_Priority_Fixed_deallocation.cpp
r81 r88 1 #ifdef SYSTEMC2 1 /* 3 2 * $Id$ … … 20 19 log_printf(FUNC,Select_Priority_Fixed,"deallocation","Begin"); 21 20 22 if ( _usage & USE_SYSTEMC)21 if (usage_is_set(_usage,USE_SYSTEMC)) 23 22 { 24 23 delete in_CLOCK; … … 48 47 }; // end namespace behavioural 49 48 }; // end namespace morpheo 50 #endif -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/src/Select_Priority_Fixed_end_cycle.cpp
r81 r88 22 22 23 23 #ifdef STATISTICS 24 _stat->end_cycle(); 24 if (usage_is_set(_usage,USE_STATISTICS)) 25 _stat->end_cycle(); 25 26 #endif 26 27 … … 28 29 // Evaluation before read the ouput signal 29 30 // sc_start(0); 30 _interfaces->testbench(); 31 if (usage_is_set(_usage,USE_VHDL_TESTBENCH)) 32 _interfaces->testbench(); 31 33 #endif 32 34 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/SelfTest/Makefile
r81 r88 23 23 library_clean : Shifter_library_clean 24 24 25 local_clean : 26 25 27 include ../Makefile.deps 26 28 include $(DIR_MORPHEO)/Behavioural/Makefile.flags -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/SelfTest/src/test.cpp
r82 r88 38 38 morpheo::behavioural::Parameters_Statistics * param_stat = new morpheo::behavioural::Parameters_Statistics(5,50); 39 39 #endif 40 41 Tusage_t _usage = USE_ALL; 42 43 // _usage = usage_unset(_usage,USE_SYSTEMC ); 44 // _usage = usage_unset(_usage,USE_VHDL ); 45 // _usage = usage_unset(_usage,USE_VHDL_TESTBENCH ); 46 // _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT); 47 // _usage = usage_unset(_usage,USE_POSITION ); 48 _usage = usage_unset(_usage,USE_STATISTICS ); 49 // _usage = usage_unset(_usage,USE_INFORMATION ); 50 40 51 Shifter * _Shifter = new Shifter (name.c_str(), 41 52 #ifdef STATISTICS … … 43 54 #endif 44 55 ¶m, 45 USE_ALL);56 _usage); 46 57 47 58 #ifdef SYSTEMC -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/include/Parameters.h
r82 r88 56 56 carry_t carry , 57 57 bool type_completion_bool = false); 58 public : Parameters (Parameters & param) ;58 // public : Parameters (Parameters & param) ; 59 59 public : ~Parameters () ; 60 60 61 public : void copy (void); 62 61 63 public : Parameters_test msg_error (void); 64 62 65 public : std::string print (uint32_t depth); 63 66 public : friend std::ostream& operator<< (std::ostream& output_stream, -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/include/Shifter.h
r82 r88 5 5 * $Id$ 6 6 * 7 * [ 7 * [ Description ] 8 8 * 9 9 */ … … 38 38 #endif 39 39 { 40 // -----[ 40 // -----[ fields ]---------------------------------------------------- 41 41 // Parameters 42 42 protected : const std::string _name; … … 52 52 53 53 #ifdef SYSTEMC 54 // ~~~~~[ 54 // ~~~~~[ Interface ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 55 55 public : SC_CLOCK * in_CLOCK ; 56 56 public : SC_IN (Tcontrol_t) * in_NRESET ; … … 66 66 public : SC_OUT(Tdata_t) ** out_SHIFTER_DATA ; 67 67 68 // ~~~~~[ 68 // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 69 69 70 // ~~~~~[ 70 // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 71 71 #endif 72 72 73 // -----[ 73 // -----[ methods ]--------------------------------------------------- 74 74 75 75 #ifdef SYSTEMC … … 93 93 public : ~Shifter (void); 94 94 95 #ifdef SYSTEMC96 95 private : void allocation (void); 97 96 private : void deallocation (void); 98 97 98 #ifdef SYSTEMC 99 99 #if (defined(STATISTICS) || defined (VHDL_TESTBENCH)) 100 100 public : void transition (void); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Parameters.cpp
r81 r88 80 80 }; 81 81 82 Parameters::Parameters (Parameters & param):83 _size_data (param._size_data ),84 _nb_port (param._nb_port ),85 _shift_value (param._shift_value ),86 _rotate (param._rotate ),87 _direction (param._direction ),88 _carry (param._carry ),89 _size_data_completion (param._size_data_completion ),90 _type_completion_bool (param._type_completion_bool ),82 // Parameters::Parameters (Parameters & param): 83 // _size_data (param._size_data ), 84 // _nb_port (param._nb_port ), 85 // _shift_value (param._shift_value ), 86 // _rotate (param._rotate ), 87 // _direction (param._direction ), 88 // _carry (param._carry ), 89 // _size_data_completion (param._size_data_completion ), 90 // _type_completion_bool (param._type_completion_bool ), 91 91 92 _internal_direction (param._internal_direction ),93 _internal_type (param._internal_type ),94 _internal_carry (param._internal_carry ),92 // _internal_direction (param._internal_direction ), 93 // _internal_type (param._internal_type ), 94 // _internal_carry (param._internal_carry ), 95 95 96 _have_shift_logic_left (param._have_shift_logic_left ),97 _have_shift_logic_right (param._have_shift_logic_right ),98 _have_shift_logic (param._have_shift_logic ),99 _have_shift_arithmetic_left (param._have_shift_arithmetic_left ),100 _have_shift_arithmetic_right (param._have_shift_arithmetic_right ),101 _have_shift_arithmetic (param._have_shift_arithmetic ),102 _have_shift (param._have_shift ),103 _have_rotate_left (param._have_rotate_left ),104 _have_rotate_right (param._have_rotate_right ),105 _have_rotate (param._have_rotate ),96 // _have_shift_logic_left (param._have_shift_logic_left ), 97 // _have_shift_logic_right (param._have_shift_logic_right ), 98 // _have_shift_logic (param._have_shift_logic ), 99 // _have_shift_arithmetic_left (param._have_shift_arithmetic_left ), 100 // _have_shift_arithmetic_right (param._have_shift_arithmetic_right ), 101 // _have_shift_arithmetic (param._have_shift_arithmetic ), 102 // _have_shift (param._have_shift ), 103 // _have_rotate_left (param._have_rotate_left ), 104 // _have_rotate_right (param._have_rotate_right ), 105 // _have_rotate (param._have_rotate ), 106 106 107 _have_direction_left (param._have_direction_left ),108 _have_direction_right (param._have_direction_right )107 // _have_direction_left (param._have_direction_left ), 108 // _have_direction_right (param._have_direction_right ) 109 109 110 // { 111 // test(); 112 // }; 113 114 Parameters::~Parameters () 110 115 { 111 test();112 116 }; 113 117 114 Parameters::~Parameters () 115 { }; 118 void Parameters::copy (void) 119 { 120 }; 116 121 117 122 }; // end namespace shifter -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Shifter.cpp
r82 r88 14 14 15 15 16 #undef FUNCTION 17 #define FUNCTION "Shifter::Shifter" 16 18 Shifter::Shifter ( 17 19 #ifdef SYSTEMC … … 29 31 ,_usage (usage) 30 32 { 31 #ifdef SYSTEMC 33 34 #if DEBUG_Shifter == true 35 log_printf(INFO,Shifter,FUNCTION,_("<%s> Parameters"),_name.c_str()); 36 37 std::cout << *param << std::endl; 38 #endif 39 32 40 allocation (); 33 #endif34 41 35 42 #ifdef STATISTICS 36 // Allocation of statistics 37 statistics_declaration(param_statistics); 43 if (usage_is_set(_usage,USE_STATISTICS)) 44 { 45 // Allocation of statistics 46 statistics_declaration(param_statistics); 47 } 38 48 #endif 39 49 40 50 #ifdef VHDL 41 // generate the vhdl 42 vhdl(); 51 if (usage_is_set(_usage,USE_VHDL)) 52 { 53 // generate the vhdl 54 vhdl(); 55 } 43 56 #endif 44 57 45 58 #ifdef SYSTEMC 59 if (usage_is_set(_usage,USE_SYSTEMC)) 60 { 46 61 #if (defined(STATISTICS) || defined (VHDL_TESTBENCH)) 47 62 SC_METHOD (transition); … … 91 106 } 92 107 #endif 93 108 } 94 109 #endif 95 110 }; 96 111 112 #undef FUNCTION 113 #define FUNCTION "Shifter::~Shifter" 97 114 Shifter::~Shifter (void) 98 115 { 99 #ifdef SYSTEMC 100 deallocation (); 116 #ifdef STATISTICS 117 if (usage_is_set(_usage,USE_STATISTICS)) 118 delete _stat; 101 119 #endif 102 120 103 #ifdef STATISTICS 104 delete _stat; 105 #endif 121 deallocation (); 106 122 }; 107 123 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Shifter_allocation.cpp
r82 r88 1 #ifdef SYSTEMC2 1 /* 3 2 * $Id$ … … 86 85 in_SHIFTER_COMPLETION [i] = interface->set_signal_in <Tdata_t > ("completion",_param->_size_data_completion); 87 86 out_SHIFTER_DATA [i] = interface->set_signal_out <Tdata_t > ("data" ,_param->_size_data); 88 } 87 } 89 88 } 90 89 91 90 #ifdef POSITION 92 _component->generate_file(); 91 if (usage_is_set(_usage,USE_POSITION)) 92 _component->generate_file(); 93 93 #endif 94 94 … … 99 99 }; // end namespace behavioural 100 100 }; // end namespace morpheo 101 #endif -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Shifter_deallocation.cpp
r82 r88 1 #ifdef SYSTEMC2 1 /* 3 2 * $Id$ … … 17 16 void Shifter::deallocation (void) 18 17 { 18 if (usage_is_set(_usage,USE_SYSTEMC)) 19 { 19 20 #if (defined(STATISTICS) || defined (VHDL_TESTBENCH)) 20 21 delete in_CLOCK; … … 36 37 delete [] in_SHIFTER_COMPLETION; 37 38 delete [] out_SHIFTER_DATA ; 39 } 38 40 39 41 delete _component; … … 46 48 }; // end namespace behavioural 47 49 }; // end namespace morpheo 48 #endif -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Shifter_end_cycle.cpp
r81 r88 21 21 22 22 #ifdef STATISTICS 23 _stat->end_cycle(); 23 if (usage_is_set(_usage,USE_STATISTICS)) 24 _stat->end_cycle(); 24 25 #endif 25 26 … … 27 28 // Evaluation before read the ouput signal 28 29 // sc_start(0); 29 _interfaces->testbench(); 30 if (usage_is_set(_usage,USE_VHDL_TESTBENCH)) 31 _interfaces->testbench(); 30 32 #endif 31 33 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Sort/SelfTest/Makefile
r81 r88 24 24 library_clean : Sort_library_clean 25 25 26 local_clean : 27 26 28 include $(DIR_COMPONENT)/Makefile.deps 27 29 include $(DIR_MORPHEO)/Behavioural/Makefile.flags -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Sort/SelfTest/src/test.cpp
r82 r88 31 31 #endif 32 32 33 Tusage_t _usage = USE_ALL; 34 35 // _usage = usage_unset(_usage,USE_SYSTEMC ); 36 // _usage = usage_unset(_usage,USE_VHDL ); 37 // _usage = usage_unset(_usage,USE_VHDL_TESTBENCH ); 38 // _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT); 39 // _usage = usage_unset(_usage,USE_POSITION ); 40 // _usage = usage_unset(_usage,USE_STATISTICS ); 41 // _usage = usage_unset(_usage,USE_INFORMATION ); 42 33 43 Sort * _Sort = new Sort (name.c_str(), 34 44 #ifdef STATISTICS … … 36 46 #endif 37 47 _param, 38 USE_ALL);48 _usage); 39 49 40 50 #ifdef SYSTEMC … … 154 164 tab [ptr]._val = false; 155 165 156 LABEL("OUTPUT [%d] %d - %d",i, out_OUTPUT_VAL [i]->read(), out_OUTPUT_DATA [i]->read(), out_OUTPUT_INDEX [i]->read());166 LABEL("OUTPUT [%d] %d %d - %d",i, out_OUTPUT_VAL [i]->read(), out_OUTPUT_DATA [i]->read(), out_OUTPUT_INDEX [i]->read()); 157 167 158 168 TEST(Tcontrol_t,out_OUTPUT_VAL [i]->read(),find); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Sort/include/Parameters.h
r81 r88 42 42 public : ~Parameters () ; 43 43 44 public : void copy (void); 45 44 46 public : Parameters_test msg_error (void); 45 47 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Sort/src/Parameters.cpp
r81 r88 55 55 }; 56 56 57 #undef FUNCTION 58 #define FUNCTION "Sort::copy" 59 void Parameters::copy (void) 60 { 61 log_printf(FUNC,Sort,FUNCTION,"Begin"); 62 log_printf(FUNC,Sort,FUNCTION,"End"); 63 }; 64 57 65 }; // end namespace sort 58 66 }; // end namespace generic -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Sort/src/Sort.cpp
r81 r88 35 35 log_printf(FUNC,Sort,FUNCTION,"Begin"); 36 36 37 #if DEBUG_Sort == true 38 log_printf(INFO,Sort,FUNCTION,_("<%s> Parameters"),_name.c_str()); 39 40 std::cout << *param << std::endl; 41 #endif 42 37 43 log_printf(INFO,Sort,FUNCTION,"Allocation"); 38 44 … … 44 50 45 51 #ifdef STATISTICS 46 if ( _usage & USE_STATISTICS)52 if (usage_is_set(_usage,USE_STATISTICS)) 47 53 { 48 54 log_printf(INFO,Sort,FUNCTION,"Allocation of statistics"); … … 53 59 54 60 #ifdef VHDL 55 if ( _usage & USE_VHDL)61 if (usage_is_set(_usage,USE_VHDL)) 56 62 { 57 63 // generate the vhdl … … 63 69 64 70 #ifdef SYSTEMC 65 if ( _usage & USE_SYSTEMC)71 if (usage_is_set(_usage,USE_SYSTEMC)) 66 72 { 67 73 log_printf(INFO,Sort,FUNCTION,"Method - transition"); … … 117 123 118 124 #ifdef STATISTICS 119 if ( _usage & USE_STATISTICS)125 if (usage_is_set(_usage,USE_STATISTICS)) 120 126 { 121 127 statistics_deallocation(); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Sort/src/Sort_allocation.cpp
r81 r88 13 13 namespace generic { 14 14 namespace sort { 15 16 17 15 18 16 #undef FUNCTION … … 75 73 76 74 #ifdef POSITION 77 _component->generate_file(); 75 if (usage_is_set(_usage,USE_POSTION)) 76 _component->generate_file(); 78 77 #endif 79 78 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Sort/src/Sort_deallocation.cpp
r81 r88 20 20 log_printf(FUNC,Sort,FUNCTION,"Begin"); 21 21 22 if ( _usage & USE_SYSTEMC)22 if (usage_is_set(_usage,USE_SYSTEMC)) 23 23 { 24 24 delete in_CLOCK ; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Sort/src/Sort_end_cycle.cpp
r81 r88 22 22 23 23 #ifdef STATISTICS 24 _stat->end_cycle(); 24 if (usage_is_set(_usage,USE_STATISTICS)) 25 _stat->end_cycle(); 25 26 #endif 26 27 … … 28 29 // Evaluation before read the ouput signal 29 30 // sc_start(0); 30 _interfaces->testbench(); 31 if (usage_is_set(_usage,USE_VHDL_TESTBENCH)) 32 _interfaces->testbench(); 31 33 #endif 32 34 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/SelfTest/Makefile
r81 r88 24 24 library_clean : Victim_library_clean 25 25 26 local_clean : 27 26 28 include $(DIR_COMPONENT)/Makefile.deps 27 29 include $(DIR_MORPHEO)/Behavioural/Makefile.flags -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/SelfTest/src/test.cpp
r82 r88 23 23 #endif 24 24 25 Tusage_t _usage = USE_ALL; 26 27 // _usage = usage_unset(_usage,USE_SYSTEMC ); 28 // _usage = usage_unset(_usage,USE_VHDL ); 29 // _usage = usage_unset(_usage,USE_VHDL_TESTBENCH ); 30 // _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT); 31 // _usage = usage_unset(_usage,USE_POSITION ); 32 // _usage = usage_unset(_usage,USE_STATISTICS ); 33 // _usage = usage_unset(_usage,USE_INFORMATION ); 34 25 35 Victim * _Victim = new Victim (name.c_str(), 26 36 #ifdef STATISTICS … … 28 38 #endif 29 39 _param, 30 USE_ALL);40 _usage); 31 41 32 42 #ifdef SYSTEMC -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/SelfTest/Makefile
r81 r88 23 23 library_clean : Victim_Pseudo_LRU_library_clean 24 24 25 local_clean : 26 25 27 include ../Makefile.deps 26 28 include $(DIR_MORPHEO)/Behavioural/Makefile.flags -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/SelfTest/src/test.cpp
r82 r88 38 38 #endif 39 39 40 Victim_Pseudo_LRU * _Victim_Pseudo_LRU = new Victim_Pseudo_LRU (name.c_str(), 40 Tusage_t _usage = USE_ALL; 41 42 // _usage = usage_unset(_usage,USE_SYSTEMC ); 43 // _usage = usage_unset(_usage,USE_VHDL ); 44 // _usage = usage_unset(_usage,USE_VHDL_TESTBENCH ); 45 // _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT); 46 // _usage = usage_unset(_usage,USE_POSITION ); 47 // _usage = usage_unset(_usage,USE_STATISTICS ); 48 // _usage = usage_unset(_usage,USE_INFORMATION ); 49 50 Victim_Pseudo_LRU * _Victim_Pseudo_LRU = new Victim_Pseudo_LRU 51 (name.c_str(), 41 52 #ifdef STATISTICS 42 43 #endif 44 45 USE_ALL);53 param_stat, 54 #endif 55 ¶m, 56 _usage); 46 57 47 58 #ifdef SYSTEMC -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/include/Parameters.h
r81 r88 35 35 uint32_t size_table, 36 36 bool table_global); 37 public : Parameters (Parameters & param) ;37 // public : Parameters (Parameters & param) ; 38 38 public : ~Parameters () ; 39 39 40 public : void copy (void); 41 40 42 public : Parameters_test msg_error (void); 43 41 44 public : std::string print (uint32_t depth); 42 45 public : friend std::ostream& operator<< (std::ostream& output_stream, -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/include/Victim_Pseudo_LRU.h
r82 r88 112 112 public : ~Victim_Pseudo_LRU (void); 113 113 114 #ifdef SYSTEMC115 114 private : void allocation (void); 116 115 private : void deallocation (void); 117 116 117 #ifdef SYSTEMC 118 118 public : void transition (void); 119 public : void genM oore(void);119 public : void genMealy (void); 120 120 #endif 121 121 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Parameters.cpp
r81 r88 30 30 }; 31 31 32 Parameters::Parameters (Parameters & param): 33 _nb_entity (param._nb_entity ), 34 _nb_access (param._nb_access ), 35 // _nb_update (param._nb_update ), 36 _size_table (param._size_table), 37 _table_global(param._table_global), 38 _size_address(param._size_address) 39 { 40 test(); 32 // Parameters::Parameters (Parameters & param): 33 // _nb_entity (param._nb_entity ), 34 // _nb_access (param._nb_access ), 35 // // _nb_update (param._nb_update ), 36 // _size_table (param._size_table), 37 // _table_global(param._table_global), 38 // _size_address(param._size_address) 39 // { 40 // test(); 41 // }; 42 43 Parameters::~Parameters () 44 { 41 45 }; 42 46 43 Parameters::~Parameters () 44 { }; 47 void Parameters::copy (void) 48 { 49 }; 45 50 46 51 }; // end namespace victim_pseudo_lru -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Victim_Pseudo_LRU.cpp
r82 r88 32 32 log_printf(FUNC,Victim_Pseudo_LRU,"Victim_Pseudo_LRU","Begin"); 33 33 34 #ifdef SYSTEMC 34 #if DEBUG_Victim_Pseudo_LRU == true 35 log_printf(INFO,Victim_Pseudo_LRU,FUNCTION,_("<%s> Parameters"),_name.c_str()); 36 37 std::cout << *param << std::endl; 38 #endif 39 35 40 log_printf(TRACE,Victim_Pseudo_LRU,"Victim_Pseudo_LRU","Allocation"); 36 41 allocation (); 37 #endif38 42 39 43 #ifdef STATISTICS 40 log_printf(TRACE,Victim_Pseudo_LRU,"Victim_Pseudo_LRU","Allocation of statistics"); 41 42 // Allocation of statistics 43 statistics_declaration(param_statistics); 44 if (usage_is_set(_usage,USE_STATISTICS)) 45 { 46 log_printf(TRACE,Victim_Pseudo_LRU,"Victim_Pseudo_LRU","Allocation of statistics"); 47 48 // Allocation of statistics 49 statistics_declaration(param_statistics); 50 } 44 51 #endif 45 52 46 53 #ifdef VHDL 47 // generate the vhdl 48 log_printf(TRACE,Victim_Pseudo_LRU,"Victim_Pseudo_LRU","Generation of VHDL"); 49 vhdl(); 54 if (usage_is_set(_usage,USE_VHDL)) 55 { 56 // generate the vhdl 57 log_printf(TRACE,Victim_Pseudo_LRU,"Victim_Pseudo_LRU","Generation of VHDL"); 58 vhdl(); 59 } 50 60 #endif 51 61 52 62 #ifdef SYSTEMC 53 log_printf(TRACE,Victim_Pseudo_LRU,"Victim_Pseudo_LRU","Definition of sc_method"); 54 SC_METHOD (transition); 55 dont_initialize (); 56 sensitive << (*(in_CLOCK)).pos(); 57 58 SC_METHOD (genMoore); 59 dont_initialize (); 60 sensitive << (*(in_CLOCK)).neg(); 61 62 #ifdef SYSTEMCASS_SPECIFIC 63 #endif 64 63 if (usage_is_set(_usage,USE_SYSTEMC)) 64 { 65 65 // Constant - ack is always at one 66 66 for (uint32_t i=0; i<_param->_nb_access; i++) … … 70 70 } 71 71 72 log_printf(TRACE,Victim_Pseudo_LRU,"Victim_Pseudo_LRU","Definition of sc_method"); 73 SC_METHOD (transition); 74 dont_initialize (); 75 sensitive << (*(in_CLOCK)).pos(); 76 77 SC_METHOD (genMealy); 78 dont_initialize (); 79 sensitive << (*(in_CLOCK)).neg(); 80 for (uint32_t i=0; i<_param->_nb_access; i++) 81 if (_param->_size_table>1) 82 sensitive << (*(in_ACCESS_ADDRESS[i])); 83 84 #ifdef SYSTEMCASS_SPECIFIC 85 if (_param->_size_table>1) 86 for (uint32_t i=0; i<_param->_nb_access; i++) 87 (*(out_ACCESS_VICTIM[i])) (*(in_ACCESS_ADDRESS[i])); 88 #endif 89 } 72 90 #endif 73 91 log_printf(FUNC,Victim_Pseudo_LRU,"Victim_Pseudo_LRU","End"); … … 77 95 { 78 96 log_printf(FUNC,Victim_Pseudo_LRU,"~Victim_Pseudo_LRU","Begin"); 79 #ifdef SYSTEMC 97 80 98 deallocation (); 81 #endif 99 82 100 83 101 #ifdef STATISTICS 84 delete _stat; 102 if (usage_is_set(_usage,USE_STATISTICS)) 103 delete _stat; 85 104 #endif 86 105 log_printf(FUNC,Victim_Pseudo_LRU,"~Victim_Pseudo_LRU","End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Victim_Pseudo_LRU_allocation.cpp
r82 r88 1 #ifdef SYSTEMC2 1 /* 3 2 * $Id$ … … 53 52 } 54 53 54 if (usage_is_set(_usage,USE_SYSTEMC)) 55 { 55 56 // -----[ Register ]--------------------------------------------------- 56 57 reg_TABLE = new entry_t * [_param->_size_table]; … … 62 63 internal_ACCESS_ACK = new Tcontrol_t [_param->_nb_access]; 63 64 internal_ACCESS_VICTIM = new Tentity_t [_param->_nb_access]; 65 } 64 66 65 67 #ifdef POSITION 66 _component->generate_file(); 68 if (usage_is_set(_usage,USE_POSITION)) 69 _component->generate_file(); 67 70 #endif 68 71 }; … … 74 77 }; // end namespace behavioural 75 78 }; // end namespace morpheo 76 #endif -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Victim_Pseudo_LRU_deallocation.cpp
r81 r88 1 #ifdef SYSTEMC2 1 /* 3 2 * $Id$ … … 17 16 void Victim_Pseudo_LRU::deallocation (void) 18 17 { 18 if (usage_is_set(_usage,USE_SYSTEMC)) 19 { 19 20 delete in_CLOCK; 20 21 delete in_NRESET; … … 34 35 delete [] internal_ACCESS_ACK ; 35 36 delete [] internal_ACCESS_VICTIM; 37 } 36 38 37 39 delete _component; … … 43 45 }; // end namespace behavioural 44 46 }; // end namespace morpheo 45 #endif -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Victim_Pseudo_LRU_end_cycle.cpp
r81 r88 22 22 23 23 #ifdef STATISTICS 24 _stat->end_cycle(); 24 if (usage_is_set(_usage,USE_STATISTICS)) 25 _stat->end_cycle(); 25 26 #endif 26 27 … … 28 29 // Evaluation before read the ouput signal 29 30 // sc_start(0); 30 _interfaces->testbench(); 31 if (usage_is_set(_usage,USE_VHDL_TESTBENCH)) 32 _interfaces->testbench(); 31 33 #endif 32 34 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Victim_Pseudo_LRU_genMealy.cpp
r87 r88 15 15 namespace victim_pseudo_lru { 16 16 17 void Victim_Pseudo_LRU::genM oore(void)17 void Victim_Pseudo_LRU::genMealy (void) 18 18 { 19 19 for (uint32_t i=0; i<_param->_nb_access; i++) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/include/Parameters.h
r81 r88 24 24 namespace generic { 25 25 namespace victim { 26 27 26 28 27 class Parameters : public morpheo::behavioural::Parameters … … 57 56 public : ~Parameters () ; 58 57 58 public : void copy (void); 59 59 60 public : Parameters_test msg_error (void); 60 61 … … 66 67 }; // end namespace victim 67 68 }; // end namespace generic 68 69 69 }; // end namespace behavioural 70 70 }; // end namespace morpheo -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/src/Parameters.cpp
r81 r88 69 69 switch (_victim_scheme) 70 70 { 71 // case VICTIM_RANDOM : delete _param_victim_random ; 72 // case VICTIM_ROUND_ROBIN : delete _param_victim_round_robin; 73 // case VICTIM_NLU : delete _param_victim_nlu ; 74 case VICTIM_PSEUDO_LRU : delete _param_victim_pseudo_lru ; 75 // case VICTIM_LRU : delete _param_victim_lru ; 76 // case VICTIM_FIFO : delete _param_victim_fifo ; 71 // case VICTIM_RANDOM : delete _param_victim_random ; break; 72 // case VICTIM_ROUND_ROBIN : delete _param_victim_round_robin; break; 73 // case VICTIM_NLU : delete _param_victim_nlu ; break; 74 case VICTIM_PSEUDO_LRU : delete _param_victim_pseudo_lru ; break; 75 // case VICTIM_LRU : delete _param_victim_lru ; break; 76 // case VICTIM_FIFO : delete _param_victim_fifo ; break; 77 default : break; 78 } 79 80 log_printf(FUNC,Victim,FUNCTION,"End"); 81 }; 82 83 #undef FUNCTION 84 #define FUNCTION "Victim::copy" 85 void morpheo::behavioural::generic::victim::Parameters::copy (void) 86 { 87 log_printf(FUNC,Victim,FUNCTION,"Begin"); 88 89 switch (_victim_scheme) 90 { 91 // case VICTIM_RANDOM : COPY(_param_victim_random ); break; 92 // case VICTIM_ROUND_ROBIN : COPY(_param_victim_round_robin); break; 93 // case VICTIM_NLU : COPY(_param_victim_nlu ); break; 94 case VICTIM_PSEUDO_LRU : COPY(_param_victim_pseudo_lru ); break; 95 // case VICTIM_LRU : COPY(_param_victim_lru ); break; 96 // case VICTIM_FIFO : COPY(_param_victim_fifo ); break; 77 97 default : break; 78 98 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/src/Parameters_msg_error.cpp
r81 r88 26 26 switch (_victim_scheme) 27 27 { 28 case VICTIM_RANDOM : test.error( "Victim scheme '"+toString(_victim_scheme)+"' is not supported. (Coming Soon)"); break;29 case VICTIM_ROUND_ROBIN : test.error( "Victim scheme '"+toString(_victim_scheme)+"' is not supported. (Coming Soon)"); break;30 case VICTIM_NLU : test.error( "Victim scheme '"+toString(_victim_scheme)+"' is not supported. (Coming Soon)"); break;31 // case VICTIM_PSEUDO_LRU : test.error( "Victim scheme '"+toString(_victim_scheme)+"' is not supported. (Coming Soon)"); break;32 case VICTIM_LRU : test.error( "Victim scheme '"+toString(_victim_scheme)+"' is not supported. (Coming Soon)"); break;33 case VICTIM_FIFO : test.error( "Victim scheme '"+toString(_victim_scheme)+"' is not supported. (Coming Soon)"); break;28 case VICTIM_RANDOM : test.error(toString(_("Victim scheme \"%s\" is not supported. (Coming Soon)\n"),toString(_victim_scheme).c_str())); break; 29 case VICTIM_ROUND_ROBIN : test.error(toString(_("Victim scheme \"%s\" is not supported. (Coming Soon)\n"),toString(_victim_scheme).c_str())); break; 30 case VICTIM_NLU : test.error(toString(_("Victim scheme \"%s\" is not supported. (Coming Soon)\n"),toString(_victim_scheme).c_str())); break; 31 // case VICTIM_PSEUDO_LRU : test.error(toString(_("Victim scheme \"%s\" is not supported. (Coming Soon)\n"),toString(_victim_scheme).c_str())); break; 32 case VICTIM_LRU : test.error(toString(_("Victim scheme \"%s\" is not supported. (Coming Soon)\n"),toString(_victim_scheme).c_str())); break; 33 case VICTIM_FIFO : test.error(toString(_("Victim scheme \"%s\" is not supported. (Coming Soon)\n"),toString(_victim_scheme).c_str())); break; 34 34 default : break; 35 35 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/src/Victim.cpp
r81 r88 39 39 allocation ( 40 40 #ifdef STATISTICS 41 41 param_statistics 42 42 #endif 43 43 ); 44 44 45 45 #ifdef STATISTICS 46 if (_usage & USE_STATISTICS) 47 { 48 switch (_param->_victim_scheme) 49 { 50 // case VICTIM_RANDOM : _stat = _component_victim_random ->_stat; break; 51 // case VICTIM_ROUND_ROBIN : _stat = _component_victim_round_robin ->_stat; break; 52 // case VICTIM_NLU : _stat = _component_victim_nlu ->_stat; break; 53 case VICTIM_PSEUDO_LRU : _stat = _component_victim_pseudo_lru ->_stat; break; 54 // case VICTIM_LRU : _stat = _component_victim_lru ->_stat; break; 55 // case VICTIM_FIFO : _stat = _component_victim_fifo ->_stat; break; 56 default : break; 57 } 46 switch (_param->_victim_scheme) 47 { 48 // case VICTIM_RANDOM : _stat = _component_victim_random ->_stat; break; 49 // case VICTIM_ROUND_ROBIN : _stat = _component_victim_round_robin ->_stat; break; 50 // case VICTIM_NLU : _stat = _component_victim_nlu ->_stat; break; 51 case VICTIM_PSEUDO_LRU : _stat = _component_victim_pseudo_lru ->_stat; break; 52 // case VICTIM_LRU : _stat = _component_victim_lru ->_stat; break; 53 // case VICTIM_FIFO : _stat = _component_victim_fifo ->_stat; break; 54 default : break; 58 55 } 59 56 #endif -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/src/Victim_deallocation.cpp
r81 r88 32 32 } 33 33 34 if ( _usage & USE_SYSTEMC)34 if (usage_is_set(_usage,USE_SYSTEMC)) 35 35 { 36 36 delete in_CLOCK ;
Note: See TracChangeset
for help on using the changeset viewer.