Changeset 15 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/SelfTest/src
- Timestamp:
- Apr 5, 2007, 4:17:30 PM (17 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/SelfTest/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/SelfTest/src/main.cpp
r10 r15 6 6 */ 7 7 8 #include "Behavioural/Generic/Select/ Priority_Fixed/SelfTest/include/test.h"8 #include "Behavioural/Generic/Select/Select_Priority_Fixed/SelfTest/include/test.h" 9 9 10 10 #define NB_PARAMS 3 … … 42 42 try 43 43 { 44 morpheo::behavioural::generic::select:: priority_fixed::Parameters param (nb_entity ,44 morpheo::behavioural::generic::select::select_priority_fixed::Parameters param (nb_entity , 45 45 encoding_one_hot, 46 46 encoding_compact); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/SelfTest/src/test.cpp
r10 r15 9 9 #define NB_ITERATION 512 10 10 11 #include "Behavioural/Generic/Select/ Priority_Fixed/SelfTest/include/test.h"11 #include "Behavioural/Generic/Select/Select_Priority_Fixed/SelfTest/include/test.h" 12 12 #include "Include/Test.h" 13 13 14 14 void test (string name, 15 morpheo::behavioural::generic::select:: priority_fixed::Parameters _param)15 morpheo::behavioural::generic::select::select_priority_fixed::Parameters _param) 16 16 { 17 17 cout << "<" << name << "> : Simulation SystemC" << endl; 18 18 19 Priority_Fixed * _Priority_Fixed = newPriority_Fixed (name.c_str(),19 Select_Priority_Fixed * _Select_Priority_Fixed = new Select_Priority_Fixed (name.c_str(), 20 20 #ifdef STATISTICS 21 21 morpheo::behavioural::Parameters_Statistics(5,50), … … 28 28 *********************************************************************/ 29 29 sc_clock * CLOCK ; 30 sc_signal<Tcontrol_t> * NRESET; 30 31 sc_signal<Tcontrol_t> ** VAL ; 31 32 sc_signal<Tcontrol_t> ** ACK ; … … 36 37 37 38 CLOCK = new sc_clock ("clock", 1.0, 0.5); 39 NRESET = new sc_signal<Tcontrol_t> ("NRESET"); 38 40 VAL = new sc_signal<Tcontrol_t> * [_param._nb_entity]; 39 41 ACK = new sc_signal<Tcontrol_t> * [_param._nb_entity]; … … 54 56 ********************************************************/ 55 57 56 cout << "<" << name << "> Instanciation of _ Priority_Fixed" << endl;58 cout << "<" << name << "> Instanciation of _Select_Priority_Fixed" << endl; 57 59 58 (*(_Priority_Fixed->in_CLOCK)) (*(CLOCK)); 60 (*(_Select_Priority_Fixed->in_CLOCK )) (*(CLOCK )); 61 (*(_Select_Priority_Fixed->in_NRESET)) (*(NRESET)); 62 59 63 for (uint32_t i=0; i<_param._nb_entity; i++) 60 64 { 61 (*(_ Priority_Fixed-> in_VAL [i])) (*(VAL [i]));65 (*(_Select_Priority_Fixed-> in_VAL [i])) (*(VAL [i])); 62 66 if (_param._encoding_one_hot) 63 (*(_ Priority_Fixed->out_ACK [i])) (*(ACK [i]));67 (*(_Select_Priority_Fixed->out_ACK [i])) (*(ACK [i])); 64 68 } 65 69 if (_param._encoding_compact) 66 70 { 67 (*(_ Priority_Fixed->out_ENTITY )) (*(ENTITY ));68 (*(_ Priority_Fixed->out_ENTITY_ACK)) (*(ENTITY_ACK));71 (*(_Select_Priority_Fixed->out_ENTITY )) (*(ENTITY )); 72 (*(_Select_Priority_Fixed->out_ENTITY_ACK)) (*(ENTITY_ACK)); 69 73 } 70 74 /******************************************************** … … 86 90 87 91 sc_start(0); 88 //_ Priority_Fixed->vhdl_testbench_label("Initialisation");92 //_Select_Priority_Fixed->vhdl_testbench_label("Initialisation"); 89 93 //cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} Initialisation" << endl; 90 94 91 _ Priority_Fixed->vhdl_testbench_label("Loop of Test");95 _Select_Priority_Fixed->vhdl_testbench_label("Loop of Test"); 92 96 cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} Loop of Test" << endl; 93 97 94 98 for (uint32_t iteration=0; iteration<NB_ITERATION; iteration ++) 95 99 { 96 _ Priority_Fixed->vhdl_testbench_label("Iteration "+toString(iteration));100 _Select_Priority_Fixed->vhdl_testbench_label("Iteration "+toString(iteration)); 97 101 98 102 entity = 0; … … 133 137 cout << "<" << name << "> ............ Stop Simulation" << endl; 134 138 139 delete CLOCK; 140 delete NRESET; 135 141 136 137 delete CLOCK; 138 142 for (uint32_t i=0; i<_param._nb_entity; i++) 143 { 144 delete VAL [i]; 145 delete ACK [i]; 146 } 147 148 delete VAL ; 149 delete ACK ; 150 delete ENTITY ; 151 delete ENTITY_ACK; 139 152 #endif 140 153 141 delete _ Priority_Fixed;154 delete _Select_Priority_Fixed; 142 155 }
Note: See TracChangeset
for help on using the changeset viewer.