- Timestamp:
- Dec 10, 2008, 7:31:39 PM (16 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim
- Files:
-
- 16 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
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.