Changeset 82 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic
- Timestamp:
- May 1, 2008, 6:48:45 PM (17 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic
- Files:
-
- 40 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/SelfTest/src/test.cpp
r81 r82 8 8 9 9 #define NB_ITERATION 1024 10 #define CYCLE_MAX 1024*NB_ITERATION 10 11 11 12 #include "Behavioural/Generic/Counter/SelfTest/include/test.h" … … 40 41 param_stat, 41 42 #endif 42 param); 43 param, 44 USE_ALL); 43 45 44 46 #ifdef SYSTEMC -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/include/Counter.h
r81 r82 26 26 #endif 27 27 #include "Behavioural/include/Component.h" 28 #include "Behavioural/include/Usage.h" 28 29 29 30 namespace morpheo { … … 39 40 // -----[ fields ]---------------------------------------------------- 40 41 // Parameters 41 protected : const std::string 42 43 pr otected : const Parameters _param;42 protected : const std::string _name; 43 protected : const Parameters _param; 44 private : const Tusage_t _usage; 44 45 45 46 #ifdef STATISTICS … … 78 79 morpheo::behavioural::Parameters_Statistics * param_statistics, 79 80 #endif 80 Parameters param ); 81 Parameters param, 82 Tusage_t usage); 81 83 82 84 public : Counter (Parameters param ); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter.cpp
r81 r82 14 14 15 15 16 Counter::Counter 17 ( 16 18 #ifdef SYSTEMC 17 Counter::Counter (sc_module_name name,19 sc_module_name name, 18 20 #else 19 Counter::Counter (string name,21 std::string name, 20 22 #endif 21 23 #ifdef STATISTICS 22 24 morpheo::behavioural::Parameters_Statistics * param_statistics, 23 25 #endif 24 morpheo::behavioural::generic::counter::Parameters param ): 25 _name (name) 26 ,_param (param) 26 morpheo::behavioural::generic::counter::Parameters param, 27 Tusage_t usage): 28 _name (name), 29 _param (param), 30 _usage (usage) 27 31 { 28 32 log_printf(FUNC,Counter,"Counter","Begin"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_allocation.cpp
r81 r82 14 14 namespace counter { 15 15 16 17 16 void Counter::allocation (void) 18 17 { 19 18 log_printf(FUNC,Counter,"allocation","Begin"); 20 19 21 _component = new Component ( );20 _component = new Component (_usage); 22 21 23 22 Entity * entity = _component->set_entity (_name -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/SelfTest/src/test.cpp
r81 r82 7 7 */ 8 8 9 #include "Behavioural/Generic/Queue/SelfTest/include/test.h"10 #include "Common/include/Test.h"11 12 9 #define NB_ITERATION 1 13 10 #define CYCLE_MAX (2048*NB_ITERATION) 14 11 15 #define LABEL(str) \ 16 { \ 17 cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} " << str << endl; \ 18 } while(0) 19 20 static uint32_t cycle = 0; 21 22 #define SC_START(cycle_offset) \ 23 do \ 24 { \ 25 /*cout << "SC_START (begin)" << endl;*/ \ 26 \ 27 uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time()); \ 28 if (cycle_current != cycle) \ 29 { \ 30 cycle = cycle_current; \ 31 cout << "##########[ cycle "<< cycle << " ]" << endl; \ 32 } \ 33 \ 34 if (cycle_current > CYCLE_MAX) \ 35 { \ 36 TEST_KO("Maximal cycles Reached"); \ 37 } \ 38 sc_start(cycle_offset); \ 39 /*cout << "SC_START (end )" << endl;*/ \ 40 } while(0) 12 #include "Behavioural/Generic/Queue/SelfTest/include/test.h" 13 #include "Common/include/Test.h" 41 14 42 15 void test (string name, … … 49 22 #endif 50 23 51 Queue * _Queue = new Queue (name.c_str(), 24 Queue * _Queue = new Queue 25 (name.c_str(), 52 26 #ifdef STATISTICS 53 27 _parameters_statistics, 54 28 #endif 55 _param); 29 _param, 30 USE_ALL); 56 31 57 32 #ifdef SYSTEMC … … 121 96 for (uint32_t iteration=0; iteration<NB_ITERATION; iteration ++) 122 97 { 123 LABEL("Iteration "+toString(iteration));98 LABEL("Iteration %d",iteration); 124 99 125 100 while (data_out <= nb_request) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/include/Queue.h
r81 r82 102 102 #endif 103 103 Parameters * param, 104 morpheo::behavioural::Tusage_t usage =USE_ALL104 morpheo::behavioural::Tusage_t usage 105 105 ); 106 106 public : ~Queue (void); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/SelfTest/src/test.cpp
r81 r82 8 8 9 9 #define NB_ITERATION 16 10 10 #define CYCLE_MAX 1024*NB_ITERATION 11 11 #include "Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/SelfTest/include/test.h" 12 12 #include "Common/include/Test.h" … … 36 36 morpheo::behavioural::Parameters_Statistics * _param_stat = new morpheo::behavioural::Parameters_Statistics (5,100); 37 37 #endif 38 RegisterFile_Monolithic * registerfile = new RegisterFile_Monolithic (name.c_str() 38 RegisterFile_Monolithic * registerfile = new RegisterFile_Monolithic 39 (name.c_str() 39 40 #ifdef STATISTICS 40 41 ,_param_stat 41 42 #endif 42 ,_param); 43 ,_param 44 ,USE_ALL); 43 45 44 46 #ifdef SYSTEMC -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/RegisterFile_Monolithic.h
r81 r82 105 105 #endif 106 106 ,Parameters * param 107 ,morpheo::behavioural::Tusage_t usage =USE_ALL107 ,morpheo::behavioural::Tusage_t usage 108 108 ); 109 109 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/Types.h
r81 r82 17 17 namespace registerfile_monolithic { 18 18 19 typedef uint32_t Taddress_t;19 // typedef uint32_t Taddress_t; 20 20 typedef uint32_t Tdata_t; 21 21 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/SelfTest/src/test.cpp
r81 r82 13 13 #include "Common/include/Test.h" 14 14 15 16 #define LABEL(str) \17 { \18 cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} " << str << endl; \19 } while(0)20 21 #define SC_START(cycle) \22 do \23 { \24 if (static_cast<uint32_t>(sc_simulation_time()) > CYCLE_MAX) \25 { \26 TEST_KO("Maximal cycles Reached"); \27 } \28 sc_start(cycle); \29 } while(0)30 31 15 void test (string name, 32 16 morpheo::behavioural::generic::registerfile::registerfile_multi_banked::Parameters * _param) … … 39 23 #endif 40 24 41 RegisterFile_Multi_Banked * _RegisterFile_Multi_Banked = new RegisterFile_Multi_Banked (name.c_str(), 25 RegisterFile_Multi_Banked * _RegisterFile_Multi_Banked = new RegisterFile_Multi_Banked 26 (name.c_str(), 42 27 #ifdef STATISTICS 43 28 _param_stat, 44 29 #endif 45 _param); 30 _param, 31 USE_ALL); 46 32 47 33 #ifdef SYSTEMC -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/include/RegisterFile_Multi_Banked.h
r81 r82 26 26 #include "Behavioural/include/Vhdl.h" 27 27 #endif 28 #include "Behavioural/include/Usage.h" 28 29 29 30 namespace morpheo { … … 41 42 // -----[ fields ]---------------------------------------------------- 42 43 // Parameters 43 protected : const std::string _name; 44 44 protected : const std::string _name; 45 45 protected : const Parameters * _param; 46 46 private : const Tusage_t _usage; 47 47 48 #ifdef STATISTICS 48 49 public : Stat * _stat; … … 100 101 morpheo::behavioural::Parameters_Statistics * param_statistics, 101 102 #endif 102 Parameters * param ); 103 Parameters * param, 104 Tusage_t usage); 103 105 104 106 public : ~RegisterFile_Multi_Banked (void); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/include/Types.h
r81 r82 18 18 namespace registerfile_multi_banked { 19 19 20 20 //typedef uint32_t Taddress_t; 21 21 typedef uint32_t Tdata_t; 22 22 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/RegisterFile_Multi_Banked.cpp
r81 r82 14 14 namespace registerfile_multi_banked { 15 15 16 16 RegisterFile_Multi_Banked::RegisterFile_Multi_Banked 17 ( 17 18 #ifdef SYSTEMC 18 RegisterFile_Multi_Banked::RegisterFile_Multi_Banked (sc_module_name name,19 sc_module_name name, 19 20 #else 20 RegisterFile_Multi_Banked::RegisterFile_Multi_Banked (string name,21 std::string name, 21 22 #endif 22 23 #ifdef STATISTICS 23 24 morpheo::behavioural::Parameters_Statistics * param_statistics, 24 25 #endif 25 morpheo::behavioural::generic::registerfile::registerfile_multi_banked::Parameters * param ): 26 _name (name) 27 ,_param (param) 26 morpheo::behavioural::generic::registerfile::registerfile_multi_banked::Parameters * param, 27 Tusage_t usage): 28 _name (name) 29 ,_param (param) 30 ,_usage (usage) 28 31 { 29 32 log_printf(FUNC,RegisterFile_Multi_Banked,"RegisterFile_Multi_Banked","Begin"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/RegisterFile_Multi_Banked_allocation.cpp
r81 r82 20 20 log_printf(FUNC,RegisterFile_Multi_Banked,"allocation","Begin"); 21 21 22 _component = new Component ( );22 _component = new Component (_usage); 23 23 24 24 Entity * entity = _component->set_entity (_name -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/SelfTest/src/test.cpp
r81 r82 7 7 */ 8 8 9 #define NB_ITERATION 1 10 #define CYCLE_MAX (256*NB_ITERATION) 11 9 12 #include "Behavioural/Generic/RegisterFile/SelfTest/include/test.h" 10 13 #include "Common/include/Test.h" 11 12 #define NB_ITERATION 113 #define CYCLE_MAX (256*NB_ITERATION)14 15 #define LABEL(str) \16 { \17 cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} " << str << endl; \18 } while(0)19 20 #define SC_START(cycle) \21 do \22 { \23 if (static_cast<uint32_t>(sc_simulation_time()) > CYCLE_MAX) \24 { \25 TEST_KO("Maximal cycles Reached"); \26 } \27 sc_start(cycle); \28 } while(0)29 14 30 15 void test (string name, … … 41 26 _param_stat, 42 27 #endif 43 _param); 28 _param, 29 USE_ALL); 44 30 45 31 #ifdef SYSTEMC -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/include/RegisterFile.h
r81 r82 29 29 #include "Behavioural/include/Vhdl.h" 30 30 #endif 31 #include "Behavioural/include/Usage.h" 31 32 32 33 namespace morpheo { … … 43 44 // -----[ fields ]---------------------------------------------------- 44 45 // Parameters 45 protected : const std::string _name; 46 46 protected : const std::string _name; 47 47 protected : const Parameters * _param; 48 private : const Tusage_t _usage; 48 49 49 50 #ifdef STATISTICS … … 95 96 morpheo::behavioural::Parameters_Statistics * param_statistics, 96 97 #endif 97 Parameters * param ); 98 Parameters * param , 99 Tusage_t usage); 98 100 99 101 public : ~RegisterFile (void); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/src/RegisterFile.cpp
r81 r82 14 14 15 15 16 RegisterFile::RegisterFile ( 16 17 #ifdef SYSTEMC 17 RegisterFile::RegisterFile (sc_module_name name,18 sc_module_name name, 18 19 #else 19 RegisterFile::RegisterFile (string name,20 std::string name, 20 21 #endif 21 22 #ifdef STATISTICS 22 23 morpheo::behavioural::Parameters_Statistics * param_statistics, 23 24 #endif 24 morpheo::behavioural::generic::registerfile::Parameters * param ): 25 _name (name) 26 ,_param (param) 25 morpheo::behavioural::generic::registerfile::Parameters * param, 26 Tusage_t usage): 27 _name (name) 28 ,_param (param) 29 ,_usage (usage) 27 30 { 28 31 log_printf(FUNC,RegisterFile,"RegisterFile","Begin"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/src/RegisterFile_allocation.cpp
r81 r82 87 87 #endif 88 88 ,_param->_param_registerfile_monolithic 89 );89 ,_usage); 90 90 91 91 } … … 98 98 #endif 99 99 ,_param->_param_registerfile_multi_banked 100 );100 ,_usage); 101 101 102 102 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/SelfTest/src/test.cpp
r81 r82 8 8 9 9 #define NB_ITERATION 512 10 #define CYCLE_MAX (1024*NB_ITERATION) 10 11 11 12 #include "Behavioural/Generic/Select/Select_Priority_Fixed/SelfTest/include/test.h" … … 21 22 morpheo::behavioural::Parameters_Statistics * _param_stat = new morpheo::behavioural::Parameters_Statistics (5,50); 22 23 #endif 23 Select_Priority_Fixed * _Select_Priority_Fixed = new Select_Priority_Fixed (name.c_str(), 24 Select_Priority_Fixed * _Select_Priority_Fixed = new Select_Priority_Fixed 25 (name.c_str(), 24 26 #ifdef STATISTICS 25 27 _param_stat, 26 28 #endif 27 _param); 29 _param, 30 USE_ALL); 28 31 29 32 #ifdef SYSTEMC -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/include/Select_Priority_Fixed.h
r81 r82 91 91 #endif 92 92 Parameters * param , 93 morpheo::behavioural::Tusage_t usage =USE_ALL);93 morpheo::behavioural::Tusage_t usage); 94 94 95 95 public : ~Select_Priority_Fixed (void); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/SelfTest/src/test.cpp
r81 r82 7 7 */ 8 8 9 #define NB_ITERATION 64 10 #define CYCLE_MAX (1024*NB_ITERATION) 11 9 12 #include "Behavioural/Generic/Shifter/SelfTest/include/test.h" 10 13 #include "Common/include/BitManipulation.h" 11 14 #include "Common/include/Test.h" 12 13 #define NB_ITERATION 6414 15 15 16 void test (string name, … … 41 42 param_stat, 42 43 #endif 43 param); 44 ¶m, 45 USE_ALL); 44 46 45 47 #ifdef SYSTEMC -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/include/Parameters.h
r81 r82 59 59 public : ~Parameters () ; 60 60 61 public : std::stringmsg_error (void);62 public : std::string print (uint32_t depth);63 public : friend std::ostream& operator<< (std::ostream& output_stream,64 morpheo::behavioural::generic::shifter::Parameters & x);61 public : Parameters_test msg_error (void); 62 public : std::string print (uint32_t depth); 63 public : friend std::ostream& operator<< (std::ostream& output_stream, 64 morpheo::behavioural::generic::shifter::Parameters & x); 65 65 }; 66 66 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/include/Shifter.h
r81 r82 25 25 #endif 26 26 #include "Behavioural/include/Component.h" 27 #include "Behavioural/include/Usage.h" 27 28 28 29 namespace morpheo { … … 39 40 // -----[ fields ]---------------------------------------------------- 40 41 // Parameters 41 protected : const std::string _name; 42 protected : const std::string _name; 43 protected : const Parameters * _param; 44 private : const Tusage_t _usage; 42 45 43 protected : const Parameters _param;44 46 #ifdef STATISTICS 45 47 public : Stat * _stat; … … 84 86 morpheo::behavioural::Parameters_Statistics * param_statistics, 85 87 #endif 86 Parameters param ); 88 Parameters * param, 89 morpheo::behavioural::Tusage_t usage 90 ); 87 91 88 92 public : Shifter (Parameters param ); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Parameters_msg_error.cpp
r81 r82 15 15 namespace shifter { 16 16 17 std::stringParameters::msg_error(void)17 Parameters_test Parameters::msg_error(void) 18 18 { 19 std::string msg = "";19 Parameters_test test ("Shifter"); 20 20 21 21 if (_size_data < 2) 22 { 23 msg += " - size_data must be > 1\n"; 24 msg += " * size_data : " + toString(_size_data) + "\n"; 25 } 26 22 test.error("size_data must be > 1\n"); 23 27 24 if (is_positive(_nb_port) == false) 28 { 29 msg += " - nb_port must be > 0\n"; 30 msg += " * nb_port : " + toString(_nb_port) + "\n"; 31 } 32 25 test.error("nb_port must be > 0\n"); 26 33 27 if (_shift_value > _size_data) 34 { 35 msg += " - shift_value must be < size_data\n"; 36 msg += " * shift_value : " + toString(_shift_value) + "\n"; 37 msg += " * size_data : " + toString(_size_data) + "\n"; 38 } 39 28 test.error("shift_value must be < size_data\n"); 29 40 30 if ( (_rotate == internal_rotate) && (_carry != internal_logic)) 41 { 42 msg += " - Incompatible parameters : internal_rotate have never carry (must be set at \"internal_logic\"\n"; 43 msg += " * rotate : " + toString(_rotate) + "\n"; 44 msg += " * carry : " + toString(_carry ) + "\n"; 45 } 46 31 test.error("Incompatible parameters : internal_rotate have never carry (must be set at \"internal_logic\"\n"); 32 47 33 if (_type_completion_bool && (_size_data_completion != 1)) 48 { 49 msg += " - Incompatible parameters : you can't have the type of port in_SHIFTER_COMPLETION at bool. Because, This port must be more bits\n"; 50 msg += " * size_data_completion : " + toString (_size_data_completion) + "\n"; 51 } 34 test.error("Incompatible parameters : you can't have the type of port in_SHIFTER_COMPLETION at bool. Because, This port must be more bits\n"); 52 35 53 return msg;36 return test; 54 37 }; 55 38 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Shifter.cpp
r81 r82 14 14 15 15 16 Shifter::Shifter ( 16 17 #ifdef SYSTEMC 17 Shifter::Shifter (sc_module_name name18 sc_module_name name 18 19 #else 19 Shifter::Shifter (string name20 std::string name 20 21 #endif 21 22 #ifdef STATISTICS 22 23 ,morpheo::behavioural::Parameters_Statistics * param_statistics 23 24 #endif 24 ,morpheo::behavioural::generic::shifter::Parameters param ): 25 _name (name) 26 ,_param (param) 25 ,morpheo::behavioural::generic::shifter::Parameters *param 26 ,morpheo::behavioural::Tusage_t usage ): 27 _name (name) 28 ,_param (param) 29 ,_usage (usage) 27 30 { 28 31 #ifdef SYSTEMC … … 50 53 dont_initialize (); 51 54 sensitive << (*(in_CLOCK)).neg(); 52 for (uint32_t i=0; i<param ._nb_port; i++)55 for (uint32_t i=0; i<param->_nb_port; i++) 53 56 { 54 57 sensitive << (*(in_SHIFTER_DATA [i])); 55 if (param ._shift_value == 0)58 if (param->_shift_value == 0) 56 59 sensitive << (*(in_SHIFTER_SHIFT [i])); 57 if (param ._direction == external_direction)60 if (param->_direction == external_direction) 58 61 sensitive << (*(in_SHIFTER_DIRECTION [i])); 59 if (_param ._rotate == external_rotate)62 if (_param->_rotate == external_rotate) 60 63 sensitive << (*(in_SHIFTER_TYPE [i])); 61 if (param ._carry == external_carry)64 if (param->_carry == external_carry) 62 65 sensitive << (*(in_SHIFTER_CARRY [i])); 63 if (param ._carry == external_completion)64 if (_param ._type_completion_bool == true)66 if (param->_carry == external_completion) 67 if (_param->_type_completion_bool == true) 65 68 sensitive << (*(in_SHIFTER_CARRY_IN [i])); 66 69 else … … 70 73 #ifdef SYSTEMCASS_SPECIFIC 71 74 // List dependency information 72 for (uint32_t i=0; i<param ._nb_port; i++)75 for (uint32_t i=0; i<param->_nb_port; i++) 73 76 { 74 77 (*(out_SHIFTER_DATA [i])) (*(in_SHIFTER_DATA [i])); 75 if (param ._shift_value == 0)78 if (param->_shift_value == 0) 76 79 (*(out_SHIFTER_DATA [i])) (*(in_SHIFTER_SHIFT [i])); 77 if (param ._direction == external_direction)80 if (param->_direction == external_direction) 78 81 (*(out_SHIFTER_DATA [i])) (*(in_SHIFTER_DIRECTION [i])); 79 if (_param ._rotate == external_rotate)82 if (_param->_rotate == external_rotate) 80 83 (*(out_SHIFTER_DATA [i])) (*(in_SHIFTER_TYPE [i])); 81 if (param ._carry == external_carry)84 if (param->_carry == external_carry) 82 85 (*(out_SHIFTER_DATA [i])) (*(in_SHIFTER_CARRY [i])); 83 if (param ._carry == external_completion)84 if (_param ._type_completion_bool == true)86 if (param->_carry == external_completion) 87 if (_param->_type_completion_bool == true) 85 88 (*(out_SHIFTER_DATA [i])) (*(in_SHIFTER_CARRY_IN [i])); 86 89 else -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Shifter_allocation.cpp
r81 r82 17 17 void Shifter::allocation (void) 18 18 { 19 _component = new Component ( );19 _component = new Component (_usage); 20 20 21 21 Entity * entity = _component->set_entity (_name … … 45 45 { 46 46 // Interface "shifter" 47 in_SHIFTER_DATA = new SC_IN (Tdata_t) * [_param ._nb_port];48 if (_param ._shift_value == 0)49 in_SHIFTER_SHIFT = new SC_IN (Tshift_t) * [_param ._nb_port];50 if (_param ._direction == external_direction)51 in_SHIFTER_DIRECTION = new SC_IN (Tdirection_t) * [_param ._nb_port];52 if (_param ._rotate == external_rotate)53 in_SHIFTER_TYPE = new SC_IN (Ttype_t) * [_param ._nb_port];54 if (_param ._carry == external_carry)55 in_SHIFTER_CARRY = new SC_IN (Tcarry_t) * [_param ._nb_port];56 if (_param ._carry == external_completion)57 if (_param ._type_completion_bool == true)58 in_SHIFTER_CARRY_IN = new SC_IN (Tcontrol_t) * [_param ._nb_port];47 in_SHIFTER_DATA = new SC_IN (Tdata_t) * [_param->_nb_port]; 48 if (_param->_shift_value == 0) 49 in_SHIFTER_SHIFT = new SC_IN (Tshift_t) * [_param->_nb_port]; 50 if (_param->_direction == external_direction) 51 in_SHIFTER_DIRECTION = new SC_IN (Tdirection_t) * [_param->_nb_port]; 52 if (_param->_rotate == external_rotate) 53 in_SHIFTER_TYPE = new SC_IN (Ttype_t) * [_param->_nb_port]; 54 if (_param->_carry == external_carry) 55 in_SHIFTER_CARRY = new SC_IN (Tcarry_t) * [_param->_nb_port]; 56 if (_param->_carry == external_completion) 57 if (_param->_type_completion_bool == true) 58 in_SHIFTER_CARRY_IN = new SC_IN (Tcontrol_t) * [_param->_nb_port]; 59 59 else 60 in_SHIFTER_COMPLETION= new SC_IN (Tdata_t) * [_param ._nb_port];61 out_SHIFTER_DATA = new SC_OUT(Tdata_t) * [_param ._nb_port];60 in_SHIFTER_COMPLETION= new SC_IN (Tdata_t) * [_param->_nb_port]; 61 out_SHIFTER_DATA = new SC_OUT(Tdata_t) * [_param->_nb_port]; 62 62 63 for (uint32_t i=0; i<_param ._nb_port; i++)63 for (uint32_t i=0; i<_param->_nb_port; i++) 64 64 { 65 65 Interface_fifo * interface = _interfaces->set_interface("shifter_"+toString(i) … … 71 71 ); 72 72 73 in_SHIFTER_DATA [i] = interface->set_signal_in <Tdata_t > ("data" ,_param ._size_data);74 if (_param ._shift_value == 0)75 in_SHIFTER_SHIFT [i] = interface->set_signal_in <Tshift_t > ("shift" ,static_cast<uint32_t>(ceil(log2(_param ._size_data))));76 if (_param ._direction == external_direction)73 in_SHIFTER_DATA [i] = interface->set_signal_in <Tdata_t > ("data" ,_param->_size_data); 74 if (_param->_shift_value == 0) 75 in_SHIFTER_SHIFT [i] = interface->set_signal_in <Tshift_t > ("shift" ,static_cast<uint32_t>(ceil(log2(_param->_size_data)))); 76 if (_param->_direction == external_direction) 77 77 in_SHIFTER_DIRECTION [i] = interface->set_signal_in <Tdirection_t> ("direction" ,1); 78 if (_param ._rotate == external_rotate)78 if (_param->_rotate == external_rotate) 79 79 in_SHIFTER_TYPE [i] = interface->set_signal_in <Ttype_t > ("type" ,1); 80 if (_param ._carry == external_carry)80 if (_param->_carry == external_carry) 81 81 in_SHIFTER_CARRY [i] = interface->set_signal_in <Tcarry_t > ("carry" ,1); 82 if (_param ._carry == external_completion)83 if (_param ._type_completion_bool == true)82 if (_param->_carry == external_completion) 83 if (_param->_type_completion_bool == true) 84 84 in_SHIFTER_CARRY_IN [i] = interface->set_signal_in <Tcontrol_t > ("carry_in" ,1); 85 85 else 86 in_SHIFTER_COMPLETION [i] = interface->set_signal_in <Tdata_t > ("completion",_param ._size_data_completion);87 out_SHIFTER_DATA [i] = interface->set_signal_out <Tdata_t > ("data" ,_param ._size_data);86 in_SHIFTER_COMPLETION [i] = interface->set_signal_in <Tdata_t > ("completion",_param->_size_data_completion); 87 out_SHIFTER_DATA [i] = interface->set_signal_out <Tdata_t > ("data" ,_param->_size_data); 88 88 } 89 89 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Shifter_deallocation.cpp
r81 r82 22 22 23 23 delete [] in_SHIFTER_DATA ; 24 if (_param ._shift_value == 0)24 if (_param->_shift_value == 0) 25 25 delete [] in_SHIFTER_SHIFT ; 26 if (_param ._direction == external_direction )26 if (_param->_direction == external_direction ) 27 27 delete [] in_SHIFTER_DIRECTION ; 28 if (_param ._rotate == external_rotate )28 if (_param->_rotate == external_rotate ) 29 29 delete [] in_SHIFTER_TYPE ; 30 if (_param ._carry == external_carry )30 if (_param->_carry == external_carry ) 31 31 delete [] in_SHIFTER_CARRY ; 32 if (_param ._carry == external_completion)33 if (_param ._type_completion_bool == true)32 if (_param->_carry == external_completion) 33 if (_param->_type_completion_bool == true) 34 34 delete [] in_SHIFTER_CARRY_IN ; 35 35 else -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Shifter_genMealy_shift.cpp
r81 r82 18 18 void Shifter::genMealy_shift (void) 19 19 { 20 for (uint32_t i=0; i<_param ._nb_port; i++)20 for (uint32_t i=0; i<_param->_nb_port; i++) 21 21 { 22 22 // Read 23 23 Tdata_t data_in = PORT_READ(in_SHIFTER_DATA [i]); 24 24 Tdata_t data_out = data_in; 25 Tshift_t shift_value = _param ._shift_value;25 Tshift_t shift_value = _param->_shift_value; 26 26 if (shift_value == 0) 27 27 shift_value = PORT_READ(in_SHIFTER_SHIFT [i]); 28 28 29 29 Tdirection_t direction; 30 if (_param ._direction == external_direction)30 if (_param->_direction == external_direction) 31 31 direction = PORT_READ(in_SHIFTER_DIRECTION [i]); 32 32 else 33 direction = _param ._internal_direction;33 direction = _param->_internal_direction; 34 34 35 35 Ttype_t type; 36 if (_param ._rotate == external_rotate)36 if (_param->_rotate == external_rotate) 37 37 type = PORT_READ(in_SHIFTER_TYPE [i]); 38 38 else 39 type = _param ._internal_type;39 type = _param->_internal_type; 40 40 41 41 Tcarry_t carry; 42 if (_param ._carry == external_carry)42 if (_param->_carry == external_carry) 43 43 carry = PORT_READ(in_SHIFTER_CARRY [i]); 44 44 else 45 carry = _param ._internal_carry;45 carry = _param->_internal_carry; 46 46 47 47 if (type == _shift) 48 48 { 49 data_out = shift <Tdata_t> (_param ._size_data, data_in, shift_value, direction == _left, carry == _arithmetic);49 data_out = shift <Tdata_t> (_param->_size_data, data_in, shift_value, direction == _left, carry == _arithmetic); 50 50 51 if (_param ._size_data_completion > 0)51 if (_param->_size_data_completion > 0) 52 52 { 53 53 Tdata_t completion; 54 54 55 if (_param ._type_completion_bool == true)55 if (_param->_type_completion_bool == true) 56 56 completion = (PORT_READ(in_SHIFTER_CARRY_IN [i])==true)?1:0; 57 57 else … … 66 66 else 67 67 { 68 mask = gen_mask<Tdata_t> (shift_value) << (_param ._size_data-shift_value);68 mask = gen_mask<Tdata_t> (shift_value) << (_param->_size_data-shift_value); 69 69 } 70 70 … … 73 73 } 74 74 else 75 data_out = rotate <Tdata_t> (_param ._size_data, data_in, shift_value, direction == _left);75 data_out = rotate <Tdata_t> (_param->_size_data, data_in, shift_value, direction == _left); 76 76 77 77 // Write -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Shifter_vhdl_body.cpp
r81 r82 17 17 void Shifter::vhdl_body (Vhdl * & vhdl) 18 18 { 19 //uint32_t log2_size_data = static_cast<uint32_t>(ceil(log2(_param ._size_data)));19 //uint32_t log2_size_data = static_cast<uint32_t>(ceil(log2(_param->_size_data))); 20 20 21 21 vhdl->set_body ("-- Compute all case of shift"); 22 22 23 for (uint32_t i=0; i<_param ._nb_port; i++)23 for (uint32_t i=0; i<_param->_nb_port; i++) 24 24 { 25 25 //-----[ Shift logic Left ]-------------------------------------------- 26 if (_param ._have_shift_logic_left)26 if (_param->_have_shift_logic_left) 27 27 vhdl->set_body ("shift_logic_left_"+toString(i)+" <= TO_STDLOGICVECTOR(TO_BITVECTOR(in_SHIFTER_"+toString(i)+"_DATA) sll CONV_INTEGER(shift_"+toString(i)+"));"); 28 28 //-----[ Shift logic Right ]------------------------------------------- 29 if (_param ._have_shift_logic_right)29 if (_param->_have_shift_logic_right) 30 30 vhdl->set_body ("shift_logic_right_"+toString(i)+" <= TO_STDLOGICVECTOR(TO_BITVECTOR(in_SHIFTER_"+toString(i)+"_DATA) srl CONV_INTEGER(shift_"+toString(i)+"));"); 31 31 //-----[ Shift arithmetic Left ]--------------------------------------- 32 if (_param ._have_shift_arithmetic_left)32 if (_param->_have_shift_arithmetic_left) 33 33 vhdl->set_body ("shift_arithmetic_left_"+toString(i)+" <= TO_STDLOGICVECTOR(TO_BITVECTOR(in_SHIFTER_"+toString(i)+"_DATA) sla CONV_INTEGER(shift_"+toString(i)+"));"); 34 34 //-----[ Shift arithmetic Right ]-------------------------------------- 35 if (_param ._have_shift_arithmetic_right)35 if (_param->_have_shift_arithmetic_right) 36 36 vhdl->set_body ("shift_arithmetic_right_"+toString(i)+" <= TO_STDLOGICVECTOR(TO_BITVECTOR(in_SHIFTER_"+toString(i)+"_DATA) sra CONV_INTEGER(shift_"+toString(i)+"));"); 37 37 //-----[ Rotate Left ]------------------------------------------------- 38 if (_param ._have_rotate_left)38 if (_param->_have_rotate_left) 39 39 vhdl->set_body ("rotate_left_"+toString(i)+" <= TO_STDLOGICVECTOR(TO_BITVECTOR(in_SHIFTER_"+toString(i)+"_DATA) rol CONV_INTEGER(shift_"+toString(i)+"));"); 40 40 //-----[ Rotate Right ]------------------------------------------------ 41 if (_param ._have_rotate_right)41 if (_param->_have_rotate_right) 42 42 vhdl->set_body ("rotate_right_"+toString(i)+" <= TO_STDLOGICVECTOR(TO_BITVECTOR(in_SHIFTER_"+toString(i)+"_DATA) ror CONV_INTEGER(shift_"+toString(i)+"));"); 43 43 } 44 44 45 if (_param ._size_data_completion > 0)45 if (_param->_size_data_completion > 0) 46 46 { 47 47 vhdl->set_body (""); 48 48 vhdl->set_body ("-- Mask"); 49 49 50 for (uint32_t i=0; i<_param ._nb_port; i++)50 for (uint32_t i=0; i<_param->_nb_port; i++) 51 51 { 52 52 std::string print_shifter_completion; 53 53 54 if (_param ._type_completion_bool == true)54 if (_param->_type_completion_bool == true) 55 55 print_shifter_completion = "in_SHIFTER_"+toString(i)+"_CARRY_IN"; 56 56 else 57 57 print_shifter_completion = "in_SHIFTER_"+toString(i)+"_COMPLETION"; 58 58 59 if (_param ._size_data == _param._size_data_completion)59 if (_param->_size_data == _param->_size_data_completion) 60 60 { 61 61 vhdl->set_body ("shifter_completion_left_"+toString(i)+" <= "+print_shifter_completion+";"); … … 64 64 else 65 65 { 66 vhdl->set_body ("shifter_completion_left_"+toString(i)+std_logic_range(_param ._size_data-1,_param._size_data_completion)+" <= "+std_logic_others(_param._size_data-_param._size_data_completion,0)+";");67 vhdl->set_body ("shifter_completion_left_"+toString(i)+std_logic_range(_param ._size_data_completion )+" <= "+print_shifter_completion+";");68 69 vhdl->set_body ("shifter_completion_right_"+toString(i)+std_logic_range(_param ._size_data-1,_param._size_data-_param._size_data_completion)+" <= "+print_shifter_completion+";");70 vhdl->set_body ("shifter_completion_right_"+toString(i)+std_logic_range(_param ._size_data-_param._size_data_completion )+" <= "+std_logic_others(_param._size_data-_param._size_data_completion,0)+";");66 vhdl->set_body ("shifter_completion_left_"+toString(i)+std_logic_range(_param->_size_data-1,_param->_size_data_completion)+" <= "+std_logic_others(_param->_size_data-_param->_size_data_completion,0)+";"); 67 vhdl->set_body ("shifter_completion_left_"+toString(i)+std_logic_range(_param->_size_data_completion )+" <= "+print_shifter_completion+";"); 68 69 vhdl->set_body ("shifter_completion_right_"+toString(i)+std_logic_range(_param->_size_data-1,_param->_size_data-_param->_size_data_completion)+" <= "+print_shifter_completion+";"); 70 vhdl->set_body ("shifter_completion_right_"+toString(i)+std_logic_range(_param->_size_data-_param->_size_data_completion )+" <= "+std_logic_others(_param->_size_data-_param->_size_data_completion,0)+";"); 71 71 } 72 72 … … 80 80 vhdl->set_body ("-- Multiplexor"); 81 81 82 for (uint32_t i=0; i<_param ._nb_port; i++)82 for (uint32_t i=0; i<_param->_nb_port; i++) 83 83 { 84 84 vhdl->set_body ("out_SHIFTER_"+toString(i)+"_DATA <="); … … 86 86 87 87 //-----[ Shift arithmetic Left ]--------------------------------------- 88 if (_param ._have_shift_arithmetic_left)89 { 90 bool have_when = false; 91 std::string print_when = ""; 92 std::string print_and = ""; 93 94 if (_param ._direction == external_direction)88 if (_param->_have_shift_arithmetic_left) 89 { 90 bool have_when = false; 91 std::string print_when = ""; 92 std::string print_and = ""; 93 94 if (_param->_direction == external_direction) 95 95 { 96 96 have_when = true; … … 98 98 print_and = " and "; 99 99 } 100 if (_param ._rotate == external_rotate)100 if (_param->_rotate == external_rotate) 101 101 { 102 102 have_when = true; … … 104 104 print_and = " and "; 105 105 } 106 if (_param ._carry == external_carry)106 if (_param->_carry == external_carry) 107 107 { 108 108 have_when = true; … … 117 117 } 118 118 //-----[ Shift arithmetic Right ]-------------------------------------- 119 if (_param ._have_shift_arithmetic_right)120 { 121 bool have_when = false; 122 std::string print_when = ""; 123 std::string print_and = ""; 124 125 if (_param ._direction == external_direction)119 if (_param->_have_shift_arithmetic_right) 120 { 121 bool have_when = false; 122 std::string print_when = ""; 123 std::string print_and = ""; 124 125 if (_param->_direction == external_direction) 126 126 { 127 127 have_when = true; … … 129 129 print_and = " and "; 130 130 } 131 if (_param ._rotate == external_rotate)131 if (_param->_rotate == external_rotate) 132 132 { 133 133 have_when = true; … … 135 135 print_and = " and "; 136 136 } 137 if (_param ._carry == external_carry)137 if (_param->_carry == external_carry) 138 138 { 139 139 have_when = true; … … 148 148 } 149 149 //-----[ Shift logic Left ]-------------------------------------------- 150 if (_param ._have_shift_logic_left)151 { 152 bool have_when = false; 153 std::string print_when = ""; 154 std::string print_and = ""; 155 156 if (_param ._direction == external_direction)150 if (_param->_have_shift_logic_left) 151 { 152 bool have_when = false; 153 std::string print_when = ""; 154 std::string print_and = ""; 155 156 if (_param->_direction == external_direction) 157 157 { 158 158 have_when = true; … … 160 160 print_and = " and "; 161 161 } 162 if (_param ._rotate == external_rotate)162 if (_param->_rotate == external_rotate) 163 163 { 164 164 have_when = true; … … 166 166 print_and = " and "; 167 167 } 168 if (_param ._carry == external_carry)168 if (_param->_carry == external_carry) 169 169 { 170 170 have_when = true; … … 177 177 std::string print_expr_completion; 178 178 179 if (_param ._size_data_completion == 0)179 if (_param->_size_data_completion == 0) 180 180 print_expr_completion = "shift_logic_left_"+toString(i)+" "; 181 181 else … … 186 186 } 187 187 //-----[ Shift logic Right ]------------------------------------------- 188 if (_param ._have_shift_logic_right)189 { 190 bool have_when = false; 191 std::string print_when = ""; 192 std::string print_and = ""; 193 194 if (_param ._direction == external_direction)188 if (_param->_have_shift_logic_right) 189 { 190 bool have_when = false; 191 std::string print_when = ""; 192 std::string print_and = ""; 193 194 if (_param->_direction == external_direction) 195 195 { 196 196 have_when = true; … … 198 198 print_and = " and "; 199 199 } 200 if (_param ._rotate == external_rotate)200 if (_param->_rotate == external_rotate) 201 201 { 202 202 have_when = true; … … 204 204 print_and = " and "; 205 205 } 206 if (_param ._carry == external_carry)206 if (_param->_carry == external_carry) 207 207 { 208 208 have_when = true; … … 215 215 std::string print_expr_completion; 216 216 217 if (_param ._size_data_completion == 0)217 if (_param->_size_data_completion == 0) 218 218 print_expr_completion = "shift_logic_right_"+toString(i); 219 219 else … … 224 224 } 225 225 //-----[ Rotate Left ]------------------------------------------------- 226 if (_param ._have_rotate_left)227 { 228 bool have_when = false; 229 std::string print_when = ""; 230 std::string print_and = ""; 231 232 if (_param ._direction == external_direction)226 if (_param->_have_rotate_left) 227 { 228 bool have_when = false; 229 std::string print_when = ""; 230 std::string print_and = ""; 231 232 if (_param->_direction == external_direction) 233 233 { 234 234 have_when = true; … … 236 236 print_and = " and "; 237 237 } 238 if (_param ._rotate == external_rotate)238 if (_param->_rotate == external_rotate) 239 239 { 240 240 have_when = true; … … 250 250 } 251 251 //-----[ Rotate Right ]------------------------------------------------ 252 if (_param ._have_rotate_right)253 { 254 bool have_when = false; 255 std::string print_when = ""; 256 std::string print_and = ""; 257 258 if (_param ._direction == external_direction)252 if (_param->_have_rotate_right) 253 { 254 bool have_when = false; 255 std::string print_when = ""; 256 std::string print_and = ""; 257 258 if (_param->_direction == external_direction) 259 259 { 260 260 have_when = true; … … 262 262 print_and = " and "; 263 263 } 264 if (_param ._rotate == external_rotate)264 if (_param->_rotate == external_rotate) 265 265 { 266 266 have_when = true; … … 281 281 /* 282 282 //-----[ Shift logic Left ]-------------------------------------------- 283 if (_param ._have_shift_logic_left)283 if (_param->_have_shift_logic_left) 284 284 { 285 285 … … 287 287 288 288 //-----[ Shift logic Right ]------------------------------------------- 289 if (_param ._have_shift_logic_right)289 if (_param->_have_shift_logic_right) 290 290 { 291 291 … … 293 293 294 294 //-----[ Shift arithmetic Left ]--------------------------------------- 295 if (_param ._have_shift_arithmetic_left)295 if (_param->_have_shift_arithmetic_left) 296 296 { 297 297 … … 299 299 300 300 //-----[ Shift arithmetic Right ]-------------------------------------- 301 if (_param ._have_shift_arithmetic_right)301 if (_param->_have_shift_arithmetic_right) 302 302 { 303 303 … … 305 305 306 306 //-----[ Rotate Left ]------------------------------------------------- 307 if (_param ._have_rotate_left)307 if (_param->_have_rotate_left) 308 308 { 309 309 … … 311 311 312 312 //-----[ Rotate Right ]------------------------------------------------ 313 if (_param ._have_rotate_right)313 if (_param->_have_rotate_right) 314 314 { 315 315 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Sort/SelfTest/src/test.cpp
r81 r82 7 7 */ 8 8 9 #define NB_ITERATION 1024 10 #define CYCLE_MAX (128*NB_ITERATION) 11 9 12 #include "Behavioural/Generic/Sort/SelfTest/include/test.h" 10 13 #include "Common/include/Test.h" 11 14 #include "Common/include/BitManipulation.h" 12 15 #include "Behavioural/include/Allocation.h" 13 14 #define NB_ITERATION 102415 #define CYCLE_MAX (128*NB_ITERATION)16 17 #define LABEL(str...) \18 { \19 msg (_("{%d} "),static_cast<uint32_t>(sc_simulation_time())); \20 msg (str); \21 msg (_("\n")); \22 } while(0)23 24 #define SC_START(cycle_offset) \25 do \26 { \27 /*cout << "SC_START (begin)" << endl;*/ \28 \29 uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time()); \30 if (cycle_offset != 0) \31 { \32 cout << "##########[ cycle "<< cycle_current+cycle_offset << " ]" << endl; \33 } \34 \35 if (cycle_current > CYCLE_MAX) \36 { \37 TEST_KO("Maximal cycles Reached"); \38 } \39 \40 sc_start(cycle_offset); \41 \42 /*cout << "SC_START (end )" << endl;*/ \43 } while(0)44 45 16 46 17 class entry_t … … 62 33 Sort * _Sort = new Sort (name.c_str(), 63 34 #ifdef STATISTICS 64 35 _parameters_statistics, 65 36 #endif 66 _param); 37 _param, 38 USE_ALL); 67 39 68 40 #ifdef SYSTEMC -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Sort/include/Sort.h
r81 r82 91 91 #endif 92 92 Parameters * param, 93 morpheo::behavioural::Tusage_t usage =USE_ALL93 morpheo::behavioural::Tusage_t usage 94 94 ); 95 95 public : ~Sort (void); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Sort/include/Types.h
r81 r82 16 16 namespace sort { 17 17 18 typedef uint32_t Taddress_t;18 // typedef uint32_t Taddress_t; 19 19 typedef uint32_t Tdata_t; 20 20 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/SelfTest/src/test.cpp
r81 r82 7 7 */ 8 8 9 #define NB_ITERATION 10 10 #define CYCLE_MAX (128*NB_ITERATION) 11 9 12 #include "Behavioural/Generic/Victim/SelfTest/include/test.h" 10 13 #include "Common/include/Test.h" 11 14 #include "Behavioural/include/Allocation.h" 12 13 #define NB_ITERATION 1014 #define CYCLE_MAX (128*NB_ITERATION)15 16 #define LABEL(str...) \17 { \18 msg (_("{%d} "),static_cast<uint32_t>(sc_simulation_time())); \19 msg (str); \20 msg (_("\n")); \21 } while(0)22 23 #define SC_START(cycle_offset) \24 do \25 { \26 /*cout << "SC_START (begin)" << endl;*/ \27 \28 uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time()); \29 if (cycle_offset != 0) \30 { \31 cout << "##########[ cycle "<< cycle_current+cycle_offset << " ]" << endl; \32 } \33 \34 if (cycle_current > CYCLE_MAX) \35 { \36 TEST_KO("Maximal cycles Reached"); \37 } \38 \39 sc_start(cycle_offset); \40 \41 /*cout << "SC_START (end )" << endl;*/ \42 } while(0)43 15 44 16 void test (string name, … … 53 25 Victim * _Victim = new Victim (name.c_str(), 54 26 #ifdef STATISTICS 55 27 _parameters_statistics, 56 28 #endif 57 _param); 29 _param, 30 USE_ALL); 58 31 59 32 #ifdef SYSTEMC -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/SelfTest/src/test.cpp
r81 r82 7 7 */ 8 8 9 #define NB_ITERATION 1 10 #define CYCLE_MAX (128*NB_ITERATION) 11 9 12 #include "Behavioural/Generic/Victim/Victim_Pseudo_LRU/SelfTest/include/test.h" 10 13 #include "Common/include/Test.h" … … 39 42 param_stat, 40 43 #endif 41 ¶m); 44 ¶m, 45 USE_ALL); 42 46 43 47 #ifdef SYSTEMC -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/include/Victim_Pseudo_LRU.h
r81 r82 41 41 #endif 42 42 #include "Behavioural/include/Component.h" 43 #include "Behavioural/include/Usage.h" 43 44 44 45 namespace morpheo { … … 55 56 // -----[ fields ]---------------------------------------------------- 56 57 // Parameters 57 protected : const std::string _name; 58 protected : const std::string _name; 59 protected : const Parameters * _param; 60 private : const Tusage_t _usage; 58 61 59 protected : const Parameters * _param;60 62 #ifdef STATISTICS 61 63 public : Stat * _stat; … … 104 106 morpheo::behavioural::Parameters_Statistics * param_statistics, 105 107 #endif 106 Parameters * param ); 108 Parameters * param , 109 morpheo::behavioural::Tusage_t usage); 107 110 108 111 public : Victim_Pseudo_LRU (Parameters param ); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Victim_Pseudo_LRU.cpp
r81 r82 14 14 namespace victim_pseudo_lru { 15 15 16 Victim_Pseudo_LRU::Victim_Pseudo_LRU 17 ( 16 18 #ifdef SYSTEMC 17 Victim_Pseudo_LRU::Victim_Pseudo_LRU (sc_module_name name,19 sc_module_name name, 18 20 #else 19 Victim_Pseudo_LRU::Victim_Pseudo_LRU (std::string name,21 std::string name, 20 22 #endif 21 23 #ifdef STATISTICS 22 24 morpheo::behavioural::Parameters_Statistics * param_statistics, 23 25 #endif 24 morpheo::behavioural::generic::victim::victim_pseudo_lru::Parameters * param ): 25 _name (name) 26 ,_param (param) 26 morpheo::behavioural::generic::victim::victim_pseudo_lru::Parameters * param , 27 morpheo::behavioural::Tusage_t usage): 28 _name (name) 29 ,_param (param) 30 ,_usage (usage) 27 31 { 28 32 log_printf(FUNC,Victim_Pseudo_LRU,"Victim_Pseudo_LRU","Begin"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Victim_Pseudo_LRU_allocation.cpp
r81 r82 18 18 void Victim_Pseudo_LRU::allocation (void) 19 19 { 20 _component = new Component ( );20 _component = new Component (_usage); 21 21 22 22 Entity * entity = _component->set_entity (_name -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/include/Types.h
r81 r82 16 16 namespace victim { 17 17 18 typedef uint32_t Taddress_t;18 // typedef uint32_t Taddress_t; 19 19 typedef uint32_t Tentity_t; 20 20 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/include/Victim.h
r81 r82 102 102 #endif 103 103 Parameters * param, 104 morpheo::behavioural::Tusage_t usage =USE_ALL104 morpheo::behavioural::Tusage_t usage 105 105 ); 106 106 public : ~Victim (void); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/src/Victim_allocation.cpp
r81 r82 65 65 ,param_statistics 66 66 #endif 67 ,_param->_param_victim_pseudo_lru); 67 ,_param->_param_victim_pseudo_lru 68 ,_usage); 68 69 break; 69 70 }
Note: See TracChangeset
for help on using the changeset viewer.