- Timestamp:
- Dec 10, 2008, 7:31:39 PM (16 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
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
Note: See TracChangeset
for help on using the changeset viewer.