Changeset 44 for trunk/IPs/systemC
- Timestamp:
- Jul 17, 2007, 4:47:56 PM (17 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo
- Files:
-
- 18 added
- 6 deleted
- 137 edited
- 7 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/SelfTest/src/test.cpp
r42 r44 10 10 11 11 #include "Behavioural/Generic/Counter/SelfTest/include/test.h" 12 #include " Include/Test.h"12 #include "Common/include/Test.h" 13 13 14 14 void test (string name, -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/include/Counter.h
r42 r44 14 14 15 15 #include <iostream> 16 #include " Include/ToString.h"17 #include " Include/Debug.h"16 #include "Common/include/ToString.h" 17 #include "Common/include/Debug.h" 18 18 19 19 #include "Behavioural/Generic/Counter/include/Parameters.h" -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/include/Parameters.h
r2 r44 9 9 */ 10 10 11 #include " Include/Debug.h"11 #include "Common/include/Debug.h" 12 12 #include "Behavioural/include/Parameters.h" 13 13 #include <math.h> -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/include/Statistics.h
r2 r44 10 10 */ 11 11 12 #include " Include/Debug.h"12 #include "Common/include/Debug.h" 13 13 #include "Behavioural/include/Statistics.h" 14 14 #include "Behavioural/include/Parameters_Statistics.h" -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/include/Types.h
r2 r44 10 10 */ 11 11 12 #include " Include/Types.h"12 #include "Common/include/Types.h" 13 13 14 14 namespace morpheo { -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_vhdl_testbench_transition.cpp
r42 r44 19 19 log_printf(FUNC,Counter,"vhdl_testbench_transition","Begin"); 20 20 21 sc_start(0);21 // sc_start(0); 22 22 23 23 _interfaces->testbench(); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/SelfTest/src/test.cpp
r42 r44 8 8 9 9 #include "Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/SelfTest/include/test.h" 10 #include " Include/Test.h"10 #include "Common/include/Test.h" 11 11 12 12 void test (string name, -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/Parameters.h
r15 r44 9 9 */ 10 10 11 #include " Include/Debug.h"11 #include "Common/include/Debug.h" 12 12 #include "Behavioural/include/Parameters.h" 13 13 #include <math.h> -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/RegisterFile_Monolithic.h
r43 r44 13 13 #endif 14 14 15 #include " Include/Debug.h"16 #include " Include/ToString.h"15 #include "Common/include/Debug.h" 16 #include "Common/include/ToString.h" 17 17 #include <iostream> 18 18 using namespace std; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/Statistics.h
r15 r44 10 10 */ 11 11 12 #include " Include/Debug.h"12 #include "Common/include/Debug.h" 13 13 #include "Behavioural/include/Statistics.h" 14 14 #include "Behavioural/include/Parameters_Statistics.h" -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/Types.h
r15 r44 9 9 */ 10 10 11 #include " Include/Types.h"11 #include "Common/include/Types.h" 12 12 13 13 namespace morpheo { -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_vhdl.cpp
r43 r44 9 9 #include "Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/RegisterFile_Monolithic.h" 10 10 #include "Behavioural/include/Vhdl.h" 11 #include " Include/ToString.h"11 #include "Common/include/ToString.h" 12 12 namespace morpheo { 13 13 namespace behavioural { -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_vhdl_testbench_transition.cpp
r41 r44 18 18 { 19 19 // Evaluation before read the ouput signal 20 sc_start(0);21 20 21 // sc_start(0); 22 22 _interfaces->testbench(); 23 23 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/RegisterFile_Multi_Banked_Glue/SelfTest/src/test.cpp
r23 r44 13 13 14 14 #include "Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/RegisterFile_Multi_Banked_Glue/SelfTest/include/test.h" 15 #include " Include/Test.h"16 #include " Include/BitManipulation.h"15 #include "Common/include/Test.h" 16 #include "Common/include/BitManipulation.h" 17 17 18 18 void test (string name, -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/RegisterFile_Multi_Banked_Glue/include/Parameters.h
r23 r44 9 9 */ 10 10 11 #include " Include/Debug.h"12 #include " Include/FromString.h"11 #include "Common/include/Debug.h" 12 #include "Common/include/FromString.h" 13 13 #include "Behavioural/include/Parameters.h" 14 14 #include <math.h> -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/RegisterFile_Multi_Banked_Glue/include/RegisterFile_Multi_Banked_Glue.h
r23 r44 14 14 15 15 #include <iostream> 16 #include " Include/ToString.h"17 #include " Include/Debug.h"16 #include "Common/include/ToString.h" 17 #include "Common/include/Debug.h" 18 18 19 19 #include "Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/RegisterFile_Multi_Banked_Glue/include/Parameters.h" -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/RegisterFile_Multi_Banked_Glue/include/Statistics.h
r15 r44 10 10 */ 11 11 12 #include " Include/Debug.h"12 #include "Common/include/Debug.h" 13 13 #include "Behavioural/include/Statistics.h" 14 14 #include "Behavioural/include/Parameters_Statistics.h" -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/RegisterFile_Multi_Banked_Glue/include/Types.h
r15 r44 9 9 */ 10 10 11 #include " Include/Types.h"11 #include "Common/include/Types.h" 12 12 13 13 namespace morpheo { -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/RegisterFile_Multi_Banked_Glue/src/RegisterFile_Multi_Banked_Glue_vhdl_testbench_transition.cpp
r15 r44 22 22 23 23 // Evaluation before read the ouput signal 24 sc_start(0);24 // sc_start(0); 25 25 26 26 // In order with file RegisterFile_Multi_Banked_Glue_vhdl_testbench_port.cpp -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/SelfTest/src/test.cpp
r15 r44 10 10 11 11 #include "Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/SelfTest/include/test.h" 12 #include " Include/Test.h"12 #include "Common/include/Test.h" 13 13 14 14 void test (string name, -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/include/Parameters.h
r15 r44 9 9 */ 10 10 11 #include " Include/Debug.h"11 #include "Common/include/Debug.h" 12 12 #include "Behavioural/include/Parameters.h" 13 13 #include <math.h> -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/include/RegisterFile_Multi_Banked.h
r15 r44 14 14 15 15 #include <iostream> 16 #include " Include/ToString.h"17 #include " Include/Debug.h"16 #include "Common/include/ToString.h" 17 #include "Common/include/Debug.h" 18 18 19 19 #include "Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/include/Parameters.h" -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/include/Statistics.h
r15 r44 10 10 */ 11 11 12 #include " Include/Debug.h"12 #include "Common/include/Debug.h" 13 13 #include "Behavioural/include/Statistics.h" 14 14 #include "Behavioural/include/Parameters_Statistics.h" -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/include/Types.h
r15 r44 9 9 */ 10 10 11 #include " Include/Types.h"11 #include "Common/include/Types.h" 12 12 13 13 namespace morpheo { -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/RegisterFile_Multi_Banked_vhdl_testbench_transition.cpp
r15 r44 21 21 22 22 // Evaluation before read the ouput signal 23 sc_start(0);23 // sc_start(0); 24 24 25 25 // In order with file RegisterFile_Multi_Banked_vhdl_testbench_port.cpp -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/SelfTest/src/test.cpp
r41 r44 10 10 11 11 #include "Behavioural/Generic/Select/Select_Priority_Fixed/SelfTest/include/test.h" 12 #include " Include/Test.h"12 #include "Common/include/Test.h" 13 13 14 14 void test (string name, -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/include/Parameters.h
r15 r44 9 9 */ 10 10 11 #include " Include/Debug.h"11 #include "Common/include/Debug.h" 12 12 #include "Behavioural/include/Parameters.h" 13 13 #include <math.h> -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/include/Select_Priority_Fixed.h
r43 r44 14 14 15 15 #include <iostream> 16 #include " Include/ToString.h"17 #include " Include/Debug.h"16 #include "Common/include/ToString.h" 17 #include "Common/include/Debug.h" 18 18 19 19 #include "Behavioural/Generic/Select/Select_Priority_Fixed/include/Parameters.h" -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/include/Statistics.h
r15 r44 10 10 */ 11 11 12 #include " Include/Debug.h"12 #include "Common/include/Debug.h" 13 13 #include "Behavioural/include/Statistics.h" 14 14 #include "Behavioural/include/Parameters_Statistics.h" -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/include/Types.h
r15 r44 9 9 */ 10 10 11 #include " Include/Types.h"11 #include "Common/include/Types.h" 12 12 13 13 namespace morpheo { -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/src/Select_Priority_Fixed_vhdl_testbench_transition.cpp
r41 r44 21 21 22 22 // Evaluation before read the ouput signal 23 sc_start(0);23 // sc_start(0); 24 24 25 25 _interfaces->testbench(); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/SelfTest/src/test.cpp
r42 r44 8 8 9 9 #include "Behavioural/Generic/Shifter/SelfTest/include/test.h" 10 #include " Include/BitManipulation.h"11 #include " Include/Test.h"10 #include "Common/include/BitManipulation.h" 11 #include "Common/include/Test.h" 12 12 13 13 #define NB_ITERATION 64 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/include/Shifter.h
r43 r44 14 14 15 15 #include <iostream> 16 #include " Include/ToString.h"16 #include "Common/include/ToString.h" 17 17 18 18 #include "Behavioural/Generic/Shifter/include/Parameters.h" -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/include/Types.h
r2 r44 10 10 */ 11 11 12 #include " Include/Types.h"12 #include "Common/include/Types.h" 13 13 14 14 namespace morpheo { -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Shifter_genMealy_shift.cpp
r2 r44 8 8 9 9 #include "Behavioural/Generic/Shifter/include/Shifter.h" 10 #include " Include/BitManipulation.h"10 #include "Common/include/BitManipulation.h" 11 11 #include <bitset> 12 12 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Shifter_vhdl_testbench_transition.cpp
r42 r44 17 17 void Shifter::vhdl_testbench_transition (void) 18 18 { 19 sc_start(0);19 // sc_start(0); 20 20 21 21 _interfaces->testbench(); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/SelfTest/src/test.cpp
r15 r44 8 8 9 9 #include "Behavioural/Generic/Victim/Victim_Pseudo_LRU/SelfTest/include/test.h" 10 #include " Include/Test.h"10 #include "Common/include/Test.h" 11 11 12 12 void test (string name, -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/include/Types.h
r15 r44 9 9 */ 10 10 11 #include " Include/Types.h"11 #include "Common/include/Types.h" 12 12 13 13 namespace morpheo { -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/include/Victim_Pseudo_LRU.h
r43 r44 29 29 30 30 #include <iostream> 31 #include " Include/ToString.h"32 #include " Include/Debug.h"31 #include "Common/include/ToString.h" 32 #include "Common/include/Debug.h" 33 33 34 34 #include "Behavioural/Generic/Victim/Victim_Pseudo_LRU/include/Parameters.h" -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Victim_Pseudo_LRU_vhdl_testbench_transition.cpp
r42 r44 19 19 { 20 20 // Evaluation before read the ouput signal 21 sc_start(0);21 // sc_start(0); 22 22 23 23 _interfaces->testbench(); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Makefile.Selftest
r43 r44 16 16 #-----[ Variables ]---------------------------------------- 17 17 CFG_FILE_EXTENSION = cfg 18 CFG_FILE_DEBUG = debug.$(CFG_FILE_EXTENSION) 18 19 19 20 OBJECTS = $(OBJECTS_COMMON) … … 46 47 @ \ 47 48 declare -i CPT=0; \ 48 for file in $$($(LS) *.$(CFG_FILE_EXTENSION) ); do \ 49 declare files; \ 50 \ 51 if $(TEST) -f $(CFG_FILE_DEBUG); then \ 52 files=$(CFG_FILE_DEBUG); \ 53 else \ 54 files=$$($(LS) *.$(CFG_FILE_EXTENSION) ); \ 55 fi; \ 56 \ 57 for file in $$files; do \ 49 58 \ 50 59 declare NAME; \ -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Makefile.flags
r43 r44 18 18 -DVHDL_TESTBENCH \ 19 19 -DVHDL_TESTBENCH_ASSERT \ 20 -DDEBUG=DEBUG_ ALL20 -DDEBUG=DEBUG_NONE 21 21 22 22 # -DCONFIGURATION \ -
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component/SelfTest/src/test.cpp
r15 r44 12 12 13 13 #include "Behavioural/@DIRECTORY/SelfTest/include/test.h" 14 #include " Include/Test.h"14 #include "Common/include/Test.h" 15 15 16 16 void test (string name, -
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component/include/New_Component.h
r42 r44 14 14 15 15 #include <iostream> 16 #include " Include/ToString.h"17 #include " Include/Debug.h"16 #include "Common/include/ToString.h" 17 #include "Common/include/Debug.h" 18 18 19 19 #include "Behavioural/@DIRECTORY/include/Parameters.h" -
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component/include/Parameters.h
r2 r44 9 9 */ 10 10 11 #include " Include/Debug.h"11 #include "Common/include/Debug.h" 12 12 #include "Behavioural/include/Parameters.h" 13 13 #include <math.h> -
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component/include/Statistics.h
r2 r44 10 10 */ 11 11 12 #include " Include/Debug.h"12 #include "Common/include/Debug.h" 13 13 #include "Behavioural/include/Statistics.h" 14 14 #include "Behavioural/include/Parameters_Statistics.h" -
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component/include/Types.h
r15 r44 9 9 */ 10 10 11 #include " Include/Types.h"11 #include "Common/include/Types.h" 12 12 13 13 namespace morpheo { -
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component/src/New_Component_vhdl_testbench_transition.cpp
r41 r44 18 18 19 19 // Evaluation before read the ouput signal 20 sc_start(0);20 // sc_start(0); 21 21 22 22 _interfaces->testbench(); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Meta_Predictor_Glue/SelfTest/config0.cfg
r43 r44 13 13 0 1 +1 # predictor_2_have_pht 14 14 4 4 +1 # predictor_2_pht_size_counter 15 1 1+1 # nb_prediction16 1 1+1 # nb_branch_complete15 2 2 +1 # nb_prediction 16 2 2 +1 # nb_branch_complete -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Meta_Predictor_Glue/SelfTest/src/test.cpp
r5 r44 10 10 11 11 #include "Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Meta_Predictor_Glue/SelfTest/include/test.h" 12 #include " Include/Test.h"12 #include "Common/include/Test.h" 13 13 14 14 void test (string name, … … 28 28 *********************************************************************/ 29 29 sc_clock * CLOCK; 30 sc_signal<Tcontrol_t> * NRESET; 30 31 31 32 // Interface Predict … … 65 66 66 67 #if defined(STATISTICS) or defined(VHDL_TESTBENCH) 67 CLOCK = new sc_clock ("clock", 1.0, 0.5); 68 CLOCK = new sc_clock ("clock", 1.0, 0.5); 69 NRESET = new sc_signal<Tcontrol_t> ("nreset"); 68 70 #endif 69 71 … … 170 172 #if defined(STATISTICS) or defined(VHDL_TESTBENCH) 171 173 (*(_Meta_Predictor_Glue->in_CLOCK)) (*(CLOCK)); 174 (*(_Meta_Predictor_Glue->in_NRESET)) (*(NRESET)); 172 175 #endif 173 176 … … 252 255 253 256 sc_start(0); 254 _Meta_Predictor_Glue->vhdl_testbench_label("Initialisation");255 257 cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} Initialisation" << endl; 256 258 259 NRESET->write(0); 260 sc_start(5); 261 NRESET->write(1); 257 262 // No need initialisation 258 263 259 _Meta_Predictor_Glue->vhdl_testbench_label("Loop of Test");260 264 cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} Loop of Test" << endl; 261 265 … … 282 286 //uint32_t shift_6 = shift_5 + _param._predictor_2_pht_size_counter; 283 287 288 cout << "shift_0 : " << shift_0 << endl; 289 cout << "shift_1 : " << shift_1 << endl; 290 cout << "shift_2 : " << shift_2 << endl; 291 cout << "shift_3 : " << shift_3 << endl; 292 cout << "shift_4 : " << shift_4 << endl; 293 cout << "shift_5 : " << shift_5 << endl; 294 284 295 for (uint32_t iteration=0; iteration<NB_ITERATION; iteration ++) 285 296 { 286 _Meta_Predictor_Glue->vhdl_testbench_label("Iteration "+toString(iteration));287 297 288 298 for (uint32_t i=0; i<_param._nb_prediction; i++) … … 365 375 BRANCH_COMPLETE_PREDICTOR_2_ACK [i] ->write (predictor_2_ack); 366 376 367 branch_complete_predictor_0_bht_history [i] = rand() % ( _param._predictor_0_bht_size_shifter+1);368 branch_complete_predictor_0_pht_history [i] = rand() % ( _param._predictor_0_pht_size_counter+1);369 branch_complete_predictor_1_bht_history [i] = rand() % ( _param._predictor_1_bht_size_shifter+1);370 branch_complete_predictor_1_pht_history [i] = rand() % ( _param._predictor_1_pht_size_counter+1);371 branch_complete_predictor_2_bht_history [i] = rand() % ( _param._predictor_2_bht_size_shifter+1);372 branch_complete_predictor_2_pht_history [i] = rand() % ( _param._predictor_2_pht_size_counter+1);377 branch_complete_predictor_0_bht_history [i] = rand() % (1<<_param._predictor_0_bht_size_shifter); 378 branch_complete_predictor_0_pht_history [i] = rand() % (1<<_param._predictor_0_pht_size_counter); 379 branch_complete_predictor_1_bht_history [i] = rand() % (1<<_param._predictor_1_bht_size_shifter); 380 branch_complete_predictor_1_pht_history [i] = rand() % (1<<_param._predictor_1_pht_size_counter); 381 branch_complete_predictor_2_bht_history [i] = rand() % (1<<_param._predictor_2_bht_size_shifter); 382 branch_complete_predictor_2_pht_history [i] = rand() % (1<<_param._predictor_2_pht_size_counter); 373 383 374 BRANCH_COMPLETE_HISTORY [i]->write((branch_complete_predictor_0_bht_history [i] << shift_0) | 375 (branch_complete_predictor_0_pht_history [i] << shift_1) | 376 (branch_complete_predictor_1_bht_history [i] << shift_2) | 377 (branch_complete_predictor_1_pht_history [i] << shift_3) | 378 (branch_complete_predictor_2_bht_history [i] << shift_4) | 379 (branch_complete_predictor_2_pht_history [i] << shift_5) ); 384 Thistory_t history = ((branch_complete_predictor_0_bht_history [i] << shift_0) | 385 (branch_complete_predictor_0_pht_history [i] << shift_1) | 386 (branch_complete_predictor_1_bht_history [i] << shift_2) | 387 (branch_complete_predictor_1_pht_history [i] << shift_3) | 388 (branch_complete_predictor_2_bht_history [i] << shift_4) | 389 (branch_complete_predictor_2_pht_history [i] << shift_5) ); 390 391 BRANCH_COMPLETE_HISTORY [i]->write (history); 392 393 cout << "<test> [" << i << "] : " << endl 394 << hex 395 << " * " << history << endl 396 << " - " << branch_complete_predictor_0_bht_history [i] << endl 397 << " - " << branch_complete_predictor_0_pht_history [i] << endl 398 << " - " << branch_complete_predictor_1_bht_history [i] << endl 399 << " - " << branch_complete_predictor_1_pht_history [i] << endl 400 << " - " << branch_complete_predictor_2_bht_history [i] << endl 401 << " - " << branch_complete_predictor_2_pht_history [i] << endl 402 << dec; 380 403 381 404 Tcontrol_t direction_0 = ((_param._predictor_0_have_pht)?(branch_complete_predictor_0_pht_history [i] >> (_param._predictor_0_pht_size_counter-1)):(branch_complete_predictor_0_bht_history [i] >> (_param._predictor_0_bht_size_shifter-1)))&1; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Meta_Predictor_Glue/include/Meta_Predictor_Glue.h
r5 r44 14 14 15 15 #include <iostream> 16 #include " Include/ToString.h"17 #include " Include/Debug.h"16 #include "Common/include/ToString.h" 17 #include "Common/include/Debug.h" 18 18 19 19 #include "Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Meta_Predictor_Glue/include/Parameters.h" … … 25 25 #include "Behavioural/include/Vhdl.h" 26 26 #endif 27 #ifdef VHDL_TESTBENCH 28 #include "Behavioural/include/Vhdl_Testbench.h" 29 #endif 27 #include "Behavioural/include/Component.h" 30 28 31 29 using namespace std; … … 57 55 #endif 58 56 59 #ifdef VHDL_TESTBENCH 60 private : Vhdl_Testbench * _vhdl_testbench; 61 #endif 57 public : Component * _component; 58 private : Interfaces * _interfaces; 62 59 63 60 #ifdef SYSTEMC … … 65 62 // Interface 66 63 public : SC_CLOCK * in_CLOCK ; 64 public : SC_IN (Tcontrol_t) * in_NRESET ; 67 65 68 66 // Interface Predict … … 146 144 #if VHDL 147 145 public : void vhdl (void); 148 private : void vhdl_port (Vhdl & vhdl); 149 private : void vhdl_declaration (Vhdl & vhdl); 150 private : void vhdl_body (Vhdl & vhdl); 146 private : void vhdl_declaration (Vhdl * & vhdl); 147 private : void vhdl_body (Vhdl * & vhdl); 151 148 #endif 152 153 149 #ifdef VHDL_TESTBENCH 154 private : void vhdl_testbench_port (void);155 150 private : void vhdl_testbench_transition (void); 156 151 #endif 157 public : void vhdl_testbench_label (string label);158 152 }; 159 153 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Meta_Predictor_Glue/include/Parameters.h
r5 r44 9 9 */ 10 10 11 #include " Include/Debug.h"11 #include "Common/include/Debug.h" 12 12 #include "Behavioural/include/Parameters.h" 13 13 #include <math.h> -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Meta_Predictor_Glue/include/Statistics.h
r4 r44 10 10 */ 11 11 12 #include " Include/Debug.h"12 #include "Common/include/Debug.h" 13 13 #include "Behavioural/include/Statistics.h" 14 14 #include "Behavioural/include/Parameters_Statistics.h" -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Meta_Predictor_Glue/include/Types.h
r4 r44 10 10 */ 11 11 12 #include " Include/Types.h"12 #include "Common/include/Types.h" 13 13 14 14 namespace morpheo { -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Meta_Predictor_Glue/src/Meta_Predictor_Glue.cpp
r5 r44 33 33 log_printf(FUNC,Meta_Predictor_Glue,"Meta_Predictor_Glue","Begin"); 34 34 35 log_printf(INFO,Meta_Predictor_Glue,"Meta_Predictor_Glue","Allocation"); 36 allocation (); 37 35 38 #ifdef STATISTICS 36 39 log_printf(INFO,Meta_Predictor_Glue,"Meta_Predictor_Glue","Allocation of statistics"); … … 42 45 #endif 43 46 44 #ifdef VHDL_TESTBENCH45 // Creation of a testbench46 // -> port47 // -> clock's signals48 log_printf(INFO,Meta_Predictor_Glue,"Meta_Predictor_Glue","Creation of a testbench");49 _vhdl_testbench = new Vhdl_Testbench (_name);50 vhdl_testbench_port ();51 _vhdl_testbench->set_clock ("in_CLOCK",false);52 #endif53 54 47 #ifdef VHDL 55 48 // generate the vhdl … … 59 52 60 53 #ifdef SYSTEMC 61 log_printf(INFO,Meta_Predictor_Glue,"Meta_Predictor_Glue","Allocation");62 allocation ();63 64 54 #if defined(STATISTICS) or defined(VHDL_TESTBENCH) 65 55 log_printf(INFO,Meta_Predictor_Glue,"Meta_Predictor_Glue","method - transition"); … … 259 249 log_printf(FUNC,Meta_Predictor_Glue,"~Meta_Predictor_Glue","Begin"); 260 250 261 #ifdef VHDL_TESTBENCH262 log_printf(INFO,Meta_Predictor_Glue,"~Meta_Predictor_Glue","Generate Testbench");263 // generate the test bench264 _vhdl_testbench->generate_file();265 delete _vhdl_testbench;266 #endif267 268 251 #ifdef STATISTICS 269 252 log_printf(INFO,Meta_Predictor_Glue,"~Meta_Predictor_Glue","Generate Statistics"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Meta_Predictor_Glue/src/Meta_Predictor_Glue_allocation.cpp
r5 r44 23 23 log_printf(FUNC,Meta_Predictor_Glue,"allocation","Begin"); 24 24 25 #if defined(STATISTICS) or defined(VHDL_TESTBENCH) 26 in_CLOCK = new SC_CLOCK ("in_CLOCK"); 27 #endif 28 29 // Interface Predict 25 _component = new Component (); 26 27 Entity * entity = _component->set_entity (_name 28 ,"Two_Level_Branch_Predictor_Glue" 29 #ifdef POSITION 30 ,COMBINATORY 31 #endif 32 ); 33 34 _interfaces = entity->set_interfaces(); 35 36 // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 37 { 38 Interface * interface = _interfaces->set_interface("" 39 #ifdef POSITION 40 , IN 41 , SOUTH 42 , "Generalist interface" 43 #endif 44 ); 45 46 in_CLOCK = interface->set_signal_clk ("clock" ,1,CLOCK_VHDL_NO); 47 in_NRESET = interface->set_signal_in <Tcontrol_t> ("nreset",1,RESET_VHDL_NO); 48 } 49 50 51 // ~~~~~[ Interface : "Predict" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 30 52 31 53 if (_param._have_meta_predictor) … … 56 78 for (uint32_t i=0; i<_param._nb_prediction; i++) 57 79 { 58 if (_param._have_meta_predictor) 59 { 60 rename = " in_PREDICT_PREDICTOR_0_ACK_" +toString(i); 61 in_PREDICT_PREDICTOR_0_ACK [i] = new SC_IN (Tcontrol_t) (rename.c_str()); 80 Interface_fifo * interface = _interfaces->set_interface("predict_"+toString(i) 81 #ifdef POSITION 82 , IN 83 , WEST 84 , "Interface Predict" 85 #endif 86 ); 87 88 if (_param._have_meta_predictor) 89 { 90 in_PREDICT_PREDICTOR_0_ACK [i] = interface->set_signal_in <Tcontrol_t> ("predictor_0_ack" , 1); 91 in_PREDICT_PREDICTOR_1_ACK [i] = interface->set_signal_in <Tcontrol_t> ("predictor_1_ack" , 1); 92 } 93 in_PREDICT_PREDICTOR_2_ACK [i] = interface->set_signal_in <Tcontrol_t> ("predictor_2_ack" , 1); 62 94 63 rename = " in_PREDICT_PREDICTOR_1_ACK_" +toString(i); 64 in_PREDICT_PREDICTOR_1_ACK [i] = new SC_IN (Tcontrol_t) (rename.c_str()); 65 } 66 rename = " in_PREDICT_PREDICTOR_2_ACK_" +toString(i); 67 in_PREDICT_PREDICTOR_2_ACK [i] = new SC_IN (Tcontrol_t) (rename.c_str()); 68 69 rename = "out_PREDICT_ACK_" +toString(i); 70 out_PREDICT_ACK [i] = new SC_OUT(Tcontrol_t) (rename.c_str()); 95 out_PREDICT_ACK [i] = interface->set_signal_out <Tcontrol_t> ("ack" , 1); 71 96 72 97 if (_param._have_meta_predictor) 73 98 { 74 99 if (_param._predictor_0_have_bht) 75 { 76 rename = " in_PREDICT_PREDICTOR_0_BHT_HISTORY_"+toString(i); 77 in_PREDICT_PREDICTOR_0_BHT_HISTORY [i] = new SC_IN (Tbht_history_t) (rename.c_str()); 78 } 100 in_PREDICT_PREDICTOR_0_BHT_HISTORY [i] = interface->set_signal_in <Tbht_history_t> ("predictor_0_bht_history", _param._predictor_0_bht_size_shifter); 79 101 if (_param._predictor_0_have_pht) 80 { 81 rename = " in_PREDICT_PREDICTOR_0_PHT_HISTORY_"+toString(i); 82 in_PREDICT_PREDICTOR_0_PHT_HISTORY [i] = new SC_IN (Tpht_history_t) (rename.c_str()); 83 } 102 in_PREDICT_PREDICTOR_0_PHT_HISTORY [i] = interface->set_signal_in <Tpht_history_t> ("predictor_0_pht_history", _param._predictor_0_pht_size_counter); 84 103 if (_param._predictor_1_have_bht) 85 { 86 rename = " in_PREDICT_PREDICTOR_1_BHT_HISTORY_"+toString(i); 87 in_PREDICT_PREDICTOR_1_BHT_HISTORY [i] = new SC_IN (Tbht_history_t) (rename.c_str()); 88 } 104 in_PREDICT_PREDICTOR_1_BHT_HISTORY [i] = interface->set_signal_in <Tbht_history_t> ("predictor_1_bht_history", _param._predictor_1_bht_size_shifter); 89 105 if (_param._predictor_1_have_pht) 90 { 91 rename = " in_PREDICT_PREDICTOR_1_PHT_HISTORY_"+toString(i); 92 in_PREDICT_PREDICTOR_1_PHT_HISTORY [i] = new SC_IN (Tpht_history_t) (rename.c_str()); 93 } 106 in_PREDICT_PREDICTOR_1_PHT_HISTORY [i] = interface->set_signal_in <Tpht_history_t> ("predictor_1_pht_history", _param._predictor_1_pht_size_counter); 94 107 } 95 108 if (_param._predictor_2_have_bht) 96 { 97 rename = " in_PREDICT_PREDICTOR_2_BHT_HISTORY_"+toString(i); 98 in_PREDICT_PREDICTOR_2_BHT_HISTORY [i] = new SC_IN (Tbht_history_t) (rename.c_str()); 99 } 109 in_PREDICT_PREDICTOR_2_BHT_HISTORY [i] = interface->set_signal_in <Tbht_history_t> ("predictor_2_bht_history", _param._predictor_2_bht_size_shifter); 100 110 if (_param._predictor_2_have_pht) 101 { 102 rename = " in_PREDICT_PREDICTOR_2_PHT_HISTORY_"+toString(i); 103 in_PREDICT_PREDICTOR_2_PHT_HISTORY [i] = new SC_IN (Tpht_history_t) (rename.c_str()); 104 } 105 rename = "out_PREDICT_HISTORY_" +toString(i); 106 out_PREDICT_HISTORY [i] = new SC_OUT(Thistory_t) (rename.c_str()); 107 108 rename = "out_PREDICT_DIRECTION_" +toString(i); 109 out_PREDICT_DIRECTION [i] = new SC_OUT(Tcontrol_t) (rename.c_str()); 110 } 111 112 // Interface Branch_complete 111 in_PREDICT_PREDICTOR_2_PHT_HISTORY [i] = interface->set_signal_in <Tpht_history_t> ("predictor_2_pht_history", _param._predictor_2_pht_size_counter); 112 out_PREDICT_HISTORY [i] = interface->set_signal_out <Thistory_t> ("history" , _param._size_history); 113 out_PREDICT_DIRECTION [i] = interface->set_signal_out <Tcontrol_t> ("direction" , 1); 114 } 115 116 // ~~~~~[ Interface : "branch_complete" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 113 117 114 118 if (_param._have_meta_predictor) … … 145 149 for (uint32_t i=0; i<_param._nb_branch_complete; i++) 146 150 { 147 if (_param._have_meta_predictor) 148 { 149 rename = " in_BRANCH_COMPLETE_VAL_" +toString(i); 150 in_BRANCH_COMPLETE_VAL [i] = new SC_IN (Tcontrol_t) (rename.c_str()); 151 152 rename = "out_BRANCH_COMPLETE_PREDICTOR_2_VAL_" +toString(i); 153 out_BRANCH_COMPLETE_PREDICTOR_2_VAL [i] = new SC_OUT(Tcontrol_t) (rename.c_str()); 154 155 rename = " in_BRANCH_COMPLETE_PREDICTOR_0_ACK_" +toString(i); 156 in_BRANCH_COMPLETE_PREDICTOR_0_ACK [i] = new SC_IN (Tcontrol_t) (rename.c_str()); 157 158 rename = " in_BRANCH_COMPLETE_PREDICTOR_1_ACK_" +toString(i); 159 in_BRANCH_COMPLETE_PREDICTOR_1_ACK [i] = new SC_IN (Tcontrol_t) (rename.c_str()); 160 } 161 rename = " in_BRANCH_COMPLETE_PREDICTOR_2_ACK_" +toString(i); 162 in_BRANCH_COMPLETE_PREDICTOR_2_ACK [i] = new SC_IN (Tcontrol_t) (rename.c_str()); 163 164 rename = "out_BRANCH_COMPLETE_ACK_" +toString(i); 165 out_BRANCH_COMPLETE_ACK [i] = new SC_OUT(Tcontrol_t) (rename.c_str()); 166 151 Interface_fifo * interface = _interfaces->set_interface("branch_complete_"+toString(i) 152 #ifdef POSITION 153 , IN 154 , EAST 155 , "Interface branch complete" 156 #endif 157 ); 158 159 if (_param._have_meta_predictor) 160 { 161 in_BRANCH_COMPLETE_VAL [i] = interface->set_signal_in <Tcontrol_t> ("val" , 1); 162 out_BRANCH_COMPLETE_PREDICTOR_2_VAL [i] = interface->set_signal_out <Tcontrol_t> ("predictor_2_val", 1); 163 in_BRANCH_COMPLETE_PREDICTOR_0_ACK [i] = interface->set_signal_in <Tcontrol_t> ("predictor_0_ack", 1); 164 in_BRANCH_COMPLETE_PREDICTOR_1_ACK [i] = interface->set_signal_in <Tcontrol_t> ("predictor_1_ack", 1); 165 } 166 in_BRANCH_COMPLETE_PREDICTOR_2_ACK [i] = interface->set_signal_in <Tcontrol_t> ("predictor_2_ack" , 1); 167 out_BRANCH_COMPLETE_ACK [i] = interface->set_signal_out <Tcontrol_t> ("ack" , 1); 167 168 if (_param._have_meta_predictor) 168 169 { 169 170 if (_param._predictor_0_have_bht) 170 { 171 rename = "out_BRANCH_COMPLETE_PREDICTOR_0_BHT_HISTORY_"+toString(i); 172 out_BRANCH_COMPLETE_PREDICTOR_0_BHT_HISTORY [i] = new SC_OUT(Tbht_history_t) (rename.c_str()); 173 } 171 out_BRANCH_COMPLETE_PREDICTOR_0_BHT_HISTORY [i] = interface->set_signal_out <Tbht_history_t> ("predictor_0_bht_history" , _param._predictor_0_bht_size_shifter ); 174 172 if (_param._predictor_0_have_pht) 175 { 176 rename = "out_BRANCH_COMPLETE_PREDICTOR_0_PHT_HISTORY_"+toString(i); 177 out_BRANCH_COMPLETE_PREDICTOR_0_PHT_HISTORY [i] = new SC_OUT(Tpht_history_t) (rename.c_str()); 178 } 173 out_BRANCH_COMPLETE_PREDICTOR_0_PHT_HISTORY [i] = interface->set_signal_out <Tpht_history_t> ("predictor_0_pht_history" , _param._predictor_0_pht_size_counter); 179 174 if (_param._predictor_1_have_bht) 180 { 181 rename = "out_BRANCH_COMPLETE_PREDICTOR_1_BHT_HISTORY_"+toString(i); 182 out_BRANCH_COMPLETE_PREDICTOR_1_BHT_HISTORY [i] = new SC_OUT(Tbht_history_t) (rename.c_str()); 183 } 175 out_BRANCH_COMPLETE_PREDICTOR_1_BHT_HISTORY [i] = interface->set_signal_out <Tbht_history_t> ("predictor_1_bht_history" , _param._predictor_1_bht_size_shifter ); 184 176 if (_param._predictor_1_have_pht) 185 { 186 rename = "out_BRANCH_COMPLETE_PREDICTOR_1_PHT_HISTORY_"+toString(i); 187 out_BRANCH_COMPLETE_PREDICTOR_1_PHT_HISTORY [i] = new SC_OUT(Tpht_history_t) (rename.c_str()); 188 } 177 out_BRANCH_COMPLETE_PREDICTOR_1_PHT_HISTORY [i] = interface->set_signal_out <Tpht_history_t> ("predictor_1_pht_history" , _param._predictor_1_pht_size_counter ); 189 178 } 190 179 if (_param._predictor_2_have_bht) 191 { 192 rename = "out_BRANCH_COMPLETE_PREDICTOR_2_BHT_HISTORY_"+toString(i); 193 out_BRANCH_COMPLETE_PREDICTOR_2_BHT_HISTORY [i] = new SC_OUT(Tbht_history_t) (rename.c_str()); 194 } 180 out_BRANCH_COMPLETE_PREDICTOR_2_BHT_HISTORY [i] = interface->set_signal_out <Tbht_history_t> ("predictor_2_bht_history" , _param._predictor_2_bht_size_shifter); 195 181 if (_param._predictor_2_have_pht) 196 { 197 rename = "out_BRANCH_COMPLETE_PREDICTOR_2_PHT_HISTORY_"+toString(i); 198 out_BRANCH_COMPLETE_PREDICTOR_2_PHT_HISTORY [i] = new SC_OUT(Tpht_history_t) (rename.c_str()); 199 } 200 rename = " in_BRANCH_COMPLETE_HISTORY_" +toString(i); 201 in_BRANCH_COMPLETE_HISTORY [i] = new SC_IN (Thistory_t) (rename.c_str()); 202 203 if (_param._have_meta_predictor) 204 { 205 rename = " in_BRANCH_COMPLETE_DIRECTION_" +toString(i); 206 in_BRANCH_COMPLETE_DIRECTION [i] = new SC_IN (Tcontrol_t) (rename.c_str()); 207 208 rename = "out_BRANCH_COMPLETE_PREDICTOR_2_DIRECTION_" +toString(i); 209 out_BRANCH_COMPLETE_PREDICTOR_2_DIRECTION [i] = new SC_OUT(Tcontrol_t) (rename.c_str()); 182 out_BRANCH_COMPLETE_PREDICTOR_2_PHT_HISTORY [i] = interface->set_signal_out <Tpht_history_t> ("predictor_2_pht_history" , _param._predictor_2_pht_size_counter); 183 in_BRANCH_COMPLETE_HISTORY [i] = interface->set_signal_in <Thistory_t> ("history" , _param._size_history); 184 if (_param._have_meta_predictor) 185 { 186 in_BRANCH_COMPLETE_DIRECTION [i] = interface->set_signal_in <Tcontrol_t> ("direction" , 1); 187 out_BRANCH_COMPLETE_PREDICTOR_2_DIRECTION [i] = interface->set_signal_out <Tcontrol_t> ("predictor_2_direction" , 1); 210 188 } 211 189 } 212 190 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 191 192 #ifdef POSITION 193 _component->generate_file(); 194 #endif 213 195 214 196 log_printf(FUNC,Meta_Predictor_Glue,"allocation","End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Meta_Predictor_Glue/src/Meta_Predictor_Glue_deallocation.cpp
r5 r44 21 21 log_printf(FUNC,Meta_Predictor_Glue,"deallocation","Begin"); 22 22 23 #if defined(STATISTICS) or defined(VHDL_TESTBENCH) 24 delete in_CLOCK; 25 #endif 26 27 // Interface Predict 28 for (uint32_t i=0; i<_param._nb_prediction; i++) 29 { 30 if (_param._have_meta_predictor) 31 { 32 delete in_PREDICT_PREDICTOR_0_ACK [i]; 33 delete in_PREDICT_PREDICTOR_1_ACK [i]; 34 } 35 delete in_PREDICT_PREDICTOR_2_ACK [i]; 36 delete out_PREDICT_ACK [i]; 37 if (_param._have_meta_predictor) 38 { 39 if (_param._predictor_0_have_bht) 40 delete in_PREDICT_PREDICTOR_0_BHT_HISTORY [i]; 41 if (_param._predictor_0_have_pht) 42 delete in_PREDICT_PREDICTOR_0_PHT_HISTORY [i]; 43 if (_param._predictor_1_have_bht) 44 delete in_PREDICT_PREDICTOR_1_BHT_HISTORY [i]; 45 if (_param._predictor_1_have_pht) 46 delete in_PREDICT_PREDICTOR_1_PHT_HISTORY [i]; 47 } 48 if (_param._predictor_2_have_bht) 49 delete in_PREDICT_PREDICTOR_2_BHT_HISTORY [i]; 50 if (_param._predictor_2_have_pht) 51 delete in_PREDICT_PREDICTOR_2_PHT_HISTORY [i]; 52 delete out_PREDICT_HISTORY [i]; 53 delete out_PREDICT_DIRECTION [i]; 54 } 23 delete in_CLOCK; 24 delete in_NRESET; 55 25 56 26 if (_param._have_meta_predictor) 57 27 { 58 delete in_PREDICT_PREDICTOR_0_ACK;59 delete in_PREDICT_PREDICTOR_1_ACK;28 delete [] in_PREDICT_PREDICTOR_0_ACK; 29 delete [] in_PREDICT_PREDICTOR_1_ACK; 60 30 } 61 delete in_PREDICT_PREDICTOR_2_ACK;62 delete out_PREDICT_ACK ;31 delete [] in_PREDICT_PREDICTOR_2_ACK; 32 delete [] out_PREDICT_ACK ; 63 33 if (_param._have_meta_predictor) 64 34 { 65 35 if (_param._predictor_0_have_bht) 66 delete in_PREDICT_PREDICTOR_0_BHT_HISTORY;36 delete [] in_PREDICT_PREDICTOR_0_BHT_HISTORY; 67 37 if (_param._predictor_0_have_pht) 68 delete in_PREDICT_PREDICTOR_0_PHT_HISTORY;38 delete [] in_PREDICT_PREDICTOR_0_PHT_HISTORY; 69 39 if (_param._predictor_1_have_bht) 70 delete in_PREDICT_PREDICTOR_1_BHT_HISTORY;40 delete [] in_PREDICT_PREDICTOR_1_BHT_HISTORY; 71 41 if (_param._predictor_1_have_pht) 72 delete in_PREDICT_PREDICTOR_1_PHT_HISTORY ;42 delete [] in_PREDICT_PREDICTOR_1_PHT_HISTORY ; 73 43 } 74 44 if (_param._predictor_2_have_bht) 75 delete in_PREDICT_PREDICTOR_2_BHT_HISTORY ;45 delete [] in_PREDICT_PREDICTOR_2_BHT_HISTORY ; 76 46 if (_param._predictor_2_have_pht) 77 delete in_PREDICT_PREDICTOR_2_PHT_HISTORY ; 78 delete out_PREDICT_HISTORY ; 79 delete out_PREDICT_DIRECTION ; 80 81 // Interface Branch_complete 82 for (uint32_t i=0; i<_param._nb_branch_complete; i++) 83 { 84 if (_param._have_meta_predictor) 85 { 86 delete in_BRANCH_COMPLETE_VAL [i]; 87 delete out_BRANCH_COMPLETE_PREDICTOR_2_VAL [i]; 88 89 delete in_BRANCH_COMPLETE_PREDICTOR_0_ACK [i]; 90 delete in_BRANCH_COMPLETE_PREDICTOR_1_ACK [i]; 91 } 92 delete in_BRANCH_COMPLETE_PREDICTOR_2_ACK [i]; 93 delete out_BRANCH_COMPLETE_ACK [i]; 94 95 if (_param._have_meta_predictor) 96 { 97 if (_param._predictor_0_have_bht) 98 delete out_BRANCH_COMPLETE_PREDICTOR_0_BHT_HISTORY [i]; 99 if (_param._predictor_0_have_pht) 100 delete out_BRANCH_COMPLETE_PREDICTOR_0_PHT_HISTORY [i]; 101 if (_param._predictor_1_have_bht) 102 delete out_BRANCH_COMPLETE_PREDICTOR_1_BHT_HISTORY [i]; 103 if (_param._predictor_1_have_pht) 104 delete out_BRANCH_COMPLETE_PREDICTOR_1_PHT_HISTORY [i]; 105 } 106 if (_param._predictor_2_have_bht) 107 delete out_BRANCH_COMPLETE_PREDICTOR_2_BHT_HISTORY [i]; 108 if (_param._predictor_2_have_pht) 109 delete out_BRANCH_COMPLETE_PREDICTOR_2_PHT_HISTORY [i]; 110 delete in_BRANCH_COMPLETE_HISTORY [i]; 111 if (_param._have_meta_predictor) 112 { 113 delete in_BRANCH_COMPLETE_DIRECTION [i]; 114 delete out_BRANCH_COMPLETE_PREDICTOR_2_DIRECTION [i]; 115 } 116 } 47 delete [] in_PREDICT_PREDICTOR_2_PHT_HISTORY ; 48 delete [] out_PREDICT_HISTORY ; 49 delete [] out_PREDICT_DIRECTION ; 117 50 118 51 if (_param._have_meta_predictor) 119 52 { 120 delete in_BRANCH_COMPLETE_VAL ;121 delete out_BRANCH_COMPLETE_PREDICTOR_2_VAL ;53 delete [] in_BRANCH_COMPLETE_VAL ; 54 delete [] out_BRANCH_COMPLETE_PREDICTOR_2_VAL ; 122 55 123 delete in_BRANCH_COMPLETE_PREDICTOR_0_ACK ;124 delete in_BRANCH_COMPLETE_PREDICTOR_1_ACK ;56 delete [] in_BRANCH_COMPLETE_PREDICTOR_0_ACK ; 57 delete [] in_BRANCH_COMPLETE_PREDICTOR_1_ACK ; 125 58 } 126 delete in_BRANCH_COMPLETE_PREDICTOR_2_ACK ;127 delete out_BRANCH_COMPLETE_ACK ;59 delete [] in_BRANCH_COMPLETE_PREDICTOR_2_ACK ; 60 delete [] out_BRANCH_COMPLETE_ACK ; 128 61 if (_param._have_meta_predictor) 129 62 { 130 63 if (_param._predictor_0_have_bht) 131 delete out_BRANCH_COMPLETE_PREDICTOR_0_BHT_HISTORY ;64 delete [] out_BRANCH_COMPLETE_PREDICTOR_0_BHT_HISTORY ; 132 65 if (_param._predictor_0_have_pht) 133 delete out_BRANCH_COMPLETE_PREDICTOR_0_PHT_HISTORY ;66 delete [] out_BRANCH_COMPLETE_PREDICTOR_0_PHT_HISTORY ; 134 67 if (_param._predictor_1_have_bht) 135 delete out_BRANCH_COMPLETE_PREDICTOR_1_BHT_HISTORY ;68 delete [] out_BRANCH_COMPLETE_PREDICTOR_1_BHT_HISTORY ; 136 69 if (_param._predictor_1_have_pht) 137 delete out_BRANCH_COMPLETE_PREDICTOR_1_PHT_HISTORY ;70 delete [] out_BRANCH_COMPLETE_PREDICTOR_1_PHT_HISTORY ; 138 71 } 139 72 if (_param._predictor_2_have_bht) 140 delete out_BRANCH_COMPLETE_PREDICTOR_2_BHT_HISTORY ;73 delete [] out_BRANCH_COMPLETE_PREDICTOR_2_BHT_HISTORY ; 141 74 if (_param._predictor_2_have_pht) 142 delete out_BRANCH_COMPLETE_PREDICTOR_2_PHT_HISTORY ;143 delete in_BRANCH_COMPLETE_HISTORY ;75 delete [] out_BRANCH_COMPLETE_PREDICTOR_2_PHT_HISTORY ; 76 delete [] in_BRANCH_COMPLETE_HISTORY ; 144 77 if (_param._have_meta_predictor) 145 78 { 146 delete in_BRANCH_COMPLETE_DIRECTION ;147 delete out_BRANCH_COMPLETE_PREDICTOR_2_DIRECTION ;79 delete [] in_BRANCH_COMPLETE_DIRECTION ; 80 delete [] out_BRANCH_COMPLETE_PREDICTOR_2_DIRECTION ; 148 81 } 149 82 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 83 delete _component; 150 84 151 85 log_printf(FUNC,Meta_Predictor_Glue,"deallocation","End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Meta_Predictor_Glue/src/Meta_Predictor_Glue_genMealy_branch_complete_history.cpp
r5 r44 8 8 9 9 #include "Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Meta_Predictor_Glue/include/Meta_Predictor_Glue.h" 10 #include " Include/BitManipulation.h"10 #include "Common/include/BitManipulation.h" 11 11 12 12 namespace morpheo { … … 27 27 if (_param._have_meta_predictor) 28 28 { 29 if (_param._predictor_0_have_bht) 29 if (_param._predictor_0_have_bht) 30 30 PORT_WRITE(out_BRANCH_COMPLETE_PREDICTOR_0_BHT_HISTORY [i], (history >> _param._shift_0) & gen_mask<Tbht_history_t>(_param._predictor_0_bht_size_shifter)); 31 31 if (_param._predictor_0_have_pht) … … 34 34 35 35 if (_param._predictor_1_have_bht) 36 {37 36 PORT_WRITE(out_BRANCH_COMPLETE_PREDICTOR_1_BHT_HISTORY [i], (history >> _param._shift_2) & gen_mask<Tbht_history_t>(_param._predictor_1_bht_size_shifter)); 38 39 37 if (_param._predictor_1_have_pht) 40 38 PORT_WRITE(out_BRANCH_COMPLETE_PREDICTOR_1_PHT_HISTORY [i], (history >> _param._shift_3) & gen_mask<Tpht_history_t>(_param._predictor_1_pht_size_counter)); 41 }42 39 43 40 if (_param._predictor_2_have_bht) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Meta_Predictor_Glue/src/Meta_Predictor_Glue_vhdl.cpp
r4 r44 21 21 { 22 22 log_printf(FUNC,Meta_Predictor_Glue,"vhdl","Begin"); 23 Vhdl vhdl (_name);24 23 25 vhdl.set_library_work (_name + "_Pack");24 Vhdl * vhdl = new Vhdl (_name); 26 25 27 vhdl_port (vhdl); 26 _interfaces->set_port (vhdl); 27 _component ->vhdl_instance(vhdl); 28 28 29 vhdl_declaration (vhdl); 29 30 vhdl_body (vhdl); 30 31 31 vhdl.generate_file(); 32 vhdl->generate_file(); 33 34 delete vhdl; 35 32 36 log_printf(FUNC,Meta_Predictor_Glue,"vhdl","End"); 33 37 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Meta_Predictor_Glue/src/Meta_Predictor_Glue_vhdl_body.cpp
r5 r44 17 17 18 18 19 void Meta_Predictor_Glue::vhdl_body (Vhdl & vhdl)19 void Meta_Predictor_Glue::vhdl_body (Vhdl * & vhdl) 20 20 { 21 21 log_printf(FUNC,Meta_Predictor_Glue,"vhdl_body","Begin"); 22 vhdl .set_body ("");23 vhdl .set_body (" -- predict");22 vhdl->set_body (""); 23 vhdl->set_body (" -- predict"); 24 24 25 25 for (uint32_t i=0; i<_param._nb_prediction; i++) 26 26 { 27 string meta_predictor_ack = (_param._have_meta_predictor==true)?("in_PREDICT_ PREDICTOR_0_ACK_"+toString(i)+" and in_PREDICT_PREDICTOR_1_ACK_"+toString(i)):"'1'";27 string meta_predictor_ack = (_param._have_meta_predictor==true)?("in_PREDICT_"+toString(i)+"_PREDICTOR_0_ACK and in_PREDICT_"+toString(i)+"_PREDICTOR_1_ACK"):"'1'"; 28 28 29 vhdl .set_body ("out_PREDICT_ACK_"+toString(i)+" <= "+meta_predictor_ack+" and "+"in_PREDICT_PREDICTOR_2_ACK_"+toString(i)+";");29 vhdl->set_body ("out_PREDICT_"+toString(i)+"_ACK <= "+meta_predictor_ack+" and "+"in_PREDICT_"+toString(i)+"_PREDICTOR_2_ACK;"); 30 30 31 31 uint32_t index=_param._size_history; … … 34 34 if (_param._predictor_2_have_pht) 35 35 { 36 vhdl .set_body ("out_PREDICT_HISTORY_"+toString(i)+std_logic_range(index-1,index-_param._predictor_2_pht_size_counter)+" <= in_PREDICT_PREDICTOR_2_PHT_HISTORY_"+toString(i)+";");36 vhdl->set_body ("out_PREDICT_"+toString(i)+"_HISTORY"+std_logic_range(index-1,index-_param._predictor_2_pht_size_counter)+" <= in_PREDICT_"+toString(i)+"_PREDICTOR_2_PHT_HISTORY;"); 37 37 index-= _param._predictor_2_pht_size_counter; 38 38 } 39 39 if (_param._predictor_2_have_bht) 40 40 { 41 vhdl .set_body ("out_PREDICT_HISTORY_"+toString(i)+std_logic_range(index-1,index-_param._predictor_2_bht_size_shifter)+" <= in_PREDICT_PREDICTOR_2_BHT_HISTORY_"+toString(i)+";");41 vhdl->set_body ("out_PREDICT_"+toString(i)+"_HISTORY"+std_logic_range(index-1,index-_param._predictor_2_bht_size_shifter)+" <= in_PREDICT_"+toString(i)+"_PREDICTOR_2_BHT_HISTORY;"); 42 42 index-= _param._predictor_2_bht_size_shifter; 43 43 } … … 47 47 if (_param._predictor_1_have_pht) 48 48 { 49 vhdl .set_body ("out_PREDICT_HISTORY_"+toString(i)+std_logic_range(index-1,index-_param._predictor_1_pht_size_counter)+" <= in_PREDICT_PREDICTOR_1_PHT_HISTORY_"+toString(i)+";");49 vhdl->set_body ("out_PREDICT_"+toString(i)+"_HISTORY"+std_logic_range(index-1,index-_param._predictor_1_pht_size_counter)+" <= in_PREDICT_"+toString(i)+"_PREDICTOR_1_PHT_HISTORY;"); 50 50 index-= _param._predictor_1_pht_size_counter; 51 51 } 52 52 if (_param._predictor_1_have_bht) 53 53 { 54 vhdl .set_body ("out_PREDICT_HISTORY_"+toString(i)+std_logic_range(index-1,index-_param._predictor_1_bht_size_shifter)+" <= in_PREDICT_PREDICTOR_1_BHT_HISTORY_"+toString(i)+";");54 vhdl->set_body ("out_PREDICT_"+toString(i)+"_HISTORY"+std_logic_range(index-1,index-_param._predictor_1_bht_size_shifter)+" <= in_PREDICT_"+toString(i)+"_PREDICTOR_1_BHT_HISTORY;"); 55 55 index-= _param._predictor_1_bht_size_shifter; 56 56 } … … 58 58 if (_param._predictor_0_have_pht) 59 59 { 60 vhdl .set_body ("out_PREDICT_HISTORY_"+toString(i)+std_logic_range(index-1,index-_param._predictor_0_pht_size_counter)+" <= in_PREDICT_PREDICTOR_0_PHT_HISTORY_"+toString(i)+";");60 vhdl->set_body ("out_PREDICT_"+toString(i)+"_HISTORY"+std_logic_range(index-1,index-_param._predictor_0_pht_size_counter)+" <= in_PREDICT_"+toString(i)+"_PREDICTOR_0_PHT_HISTORY;"); 61 61 index-= _param._predictor_0_pht_size_counter; 62 62 } 63 63 if (_param._predictor_0_have_bht) 64 64 { 65 vhdl .set_body ("out_PREDICT_HISTORY_"+toString(i)+std_logic_range(index-1,index-_param._predictor_0_bht_size_shifter)+" <= in_PREDICT_PREDICTOR_0_BHT_HISTORY_"+toString(i)+";");65 vhdl->set_body ("out_PREDICT_"+toString(i)+"_HISTORY"+std_logic_range(index-1,index-_param._predictor_0_bht_size_shifter)+" <= in_PREDICT_"+toString(i)+"_PREDICTOR_0_BHT_HISTORY;"); 66 66 index-= _param._predictor_0_bht_size_shifter; 67 67 } … … 69 69 70 70 // direction of prediction 71 vhdl .set_body ("");71 vhdl->set_body (""); 72 72 if (_param._have_meta_predictor) 73 vhdl .set_body ("out_PREDICT_DIRECTION_"+toString(i)+" <= predict_predictor_0_direction_"+toString(i)+" when predict_predictor_2_direction_"+toString(i)+"='0' else predict_predictor_1_direction_"+toString(i)+";");73 vhdl->set_body ("out_PREDICT_"+toString(i)+"_DIRECTION <= predict_"+toString(i)+"_predictor_0_direction when predict_"+toString(i)+"_predictor_2_direction='0' else predict_"+toString(i)+"_predictor_1_direction;"); 74 74 else 75 vhdl .set_body ("out_PREDICT_DIRECTION_"+toString(i)+" <= predict_predictor_2_direction_"+toString(i)+";");75 vhdl->set_body ("out_PREDICT_"+toString(i)+"_DIRECTION <= predict_"+toString(i)+"_predictor_2_direction;"); 76 76 } 77 77 78 78 // Interface - branch_complete 79 79 80 vhdl .set_body ("");81 vhdl .set_body (" -- branch_complete");80 vhdl->set_body (""); 81 vhdl->set_body (" -- branch_complete"); 82 82 for (uint32_t i=0; i<_param._nb_branch_complete; i++) 83 83 { … … 85 85 if (_param._have_meta_predictor) 86 86 { 87 vhdl .set_body ("out_BRANCH_COMPLETE_PREDICTOR_2_VAL_"+toString(i)+" <= (branch_complete_predictor_0_direction_"+toString(i)+" xor branch_complete_predictor_1_direction_"+toString(i)+") and "+"in_BRANCH_COMPLETE_VAL_"+toString(i)+";");88 vhdl .set_body ("out_BRANCH_COMPLETE_PREDICTOR_2_DIRECTION_"+toString(i)+" <= (branch_complete_predictor_0_direction_"+toString(i)+" and not in_BRANCH_COMPLETE_DIRECTION_"+toString(i)+") or (branch_complete_predictor_1_direction_"+toString(i)+" and in_BRANCH_COMPLETE_DIRECTION_"+toString(i)+");");87 vhdl->set_body ("out_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_2_VAL <= (branch_complete_"+toString(i)+"_predictor_0_direction xor branch_complete_"+toString(i)+"_predictor_1_direction) and "+"in_BRANCH_COMPLETE_"+toString(i)+"_VAL;"); 88 vhdl->set_body ("out_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_2_DIRECTION <= (branch_complete_"+toString(i)+"_predictor_0_direction and not in_BRANCH_COMPLETE_"+toString(i)+"_DIRECTION) or (branch_complete_"+toString(i)+"_predictor_1_direction and in_BRANCH_COMPLETE_"+toString(i)+"_DIRECTION);"); 89 89 } 90 90 91 string meta_predictor_ack = (_param._have_meta_predictor==true)?("in_BRANCH_COMPLETE_ PREDICTOR_0_ACK_"+toString(i)+" and in_BRANCH_COMPLETE_PREDICTOR_1_ACK_"+toString(i)):"'1'";91 string meta_predictor_ack = (_param._have_meta_predictor==true)?("in_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_0_ACK and in_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_1_ACK"):"'1'"; 92 92 93 vhdl .set_body ("out_BRANCH_COMPLETE_ACK_"+toString(i)+" <= "+meta_predictor_ack+" and "+"in_BRANCH_COMPLETE_PREDICTOR_2_ACK_"+toString(i)+";");93 vhdl->set_body ("out_BRANCH_COMPLETE_"+toString(i)+"_ACK <= "+meta_predictor_ack+" and "+"in_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_2_ACK;"); 94 94 95 95 uint32_t index=_param._size_history; … … 97 97 if (_param._predictor_2_have_pht) 98 98 { 99 vhdl .set_body ("out_BRANCH_COMPLETE_PREDICTOR_2_PHT_HISTORY_"+toString(i)+" <= in_BRANCH_COMPLETE_HISTORY_"+toString(i)+std_logic_range(index-1,index-_param._predictor_2_pht_size_counter)+";");99 vhdl->set_body ("out_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_2_PHT_HISTORY <= in_BRANCH_COMPLETE_"+toString(i)+"_HISTORY"+std_logic_range(index-1,index-_param._predictor_2_pht_size_counter)+";"); 100 100 index-= _param._predictor_2_pht_size_counter; 101 101 } 102 102 if (_param._predictor_2_have_bht) 103 103 { 104 vhdl .set_body ("out_BRANCH_COMPLETE_PREDICTOR_2_BHT_HISTORY_"+toString(i)+" <= in_BRANCH_COMPLETE_HISTORY_"+toString(i)+std_logic_range(index-1,index-_param._predictor_2_bht_size_shifter)+";");104 vhdl->set_body ("out_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_2_BHT_HISTORY <= in_BRANCH_COMPLETE_"+toString(i)+"_HISTORY"+std_logic_range(index-1,index-_param._predictor_2_bht_size_shifter)+";"); 105 105 index-= _param._predictor_2_bht_size_shifter; 106 106 } … … 110 110 if (_param._predictor_1_have_pht) 111 111 { 112 vhdl .set_body ("out_BRANCH_COMPLETE_PREDICTOR_1_PHT_HISTORY_"+toString(i)+" <= in_BRANCH_COMPLETE_HISTORY_"+toString(i)+std_logic_range(index-1,index-_param._predictor_1_pht_size_counter)+";");112 vhdl->set_body ("out_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_1_PHT_HISTORY <= in_BRANCH_COMPLETE_"+toString(i)+"_HISTORY"+std_logic_range(index-1,index-_param._predictor_1_pht_size_counter)+";"); 113 113 index-= _param._predictor_1_pht_size_counter; 114 114 } 115 115 if (_param._predictor_1_have_bht) 116 116 { 117 vhdl .set_body ("out_BRANCH_COMPLETE_PREDICTOR_1_BHT_HISTORY_"+toString(i)+" <= in_BRANCH_COMPLETE_HISTORY_"+toString(i)+std_logic_range(index-1,index-_param._predictor_1_bht_size_shifter)+";");117 vhdl->set_body ("out_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_1_BHT_HISTORY <= in_BRANCH_COMPLETE_"+toString(i)+"_HISTORY"+std_logic_range(index-1,index-_param._predictor_1_bht_size_shifter)+";"); 118 118 index-= _param._predictor_1_bht_size_shifter; 119 119 } … … 121 121 if (_param._predictor_0_have_pht) 122 122 { 123 vhdl .set_body ("out_BRANCH_COMPLETE_PREDICTOR_0_PHT_HISTORY_"+toString(i)+" <= in_BRANCH_COMPLETE_HISTORY_"+toString(i)+std_logic_range(index-1,index-_param._predictor_0_pht_size_counter)+";");123 vhdl->set_body ("out_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_0_PHT_HISTORY <= in_BRANCH_COMPLETE_"+toString(i)+"_HISTORY"+std_logic_range(index-1,index-_param._predictor_0_pht_size_counter)+";"); 124 124 index-= _param._predictor_0_pht_size_counter; 125 125 } 126 126 if (_param._predictor_0_have_bht) 127 127 { 128 vhdl .set_body ("out_BRANCH_COMPLETE_PREDICTOR_0_BHT_HISTORY_"+toString(i)+" <= in_BRANCH_COMPLETE_HISTORY_"+toString(i)+std_logic_range(index-1,index-_param._predictor_0_bht_size_shifter)+";");128 vhdl->set_body ("out_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_0_BHT_HISTORY <= in_BRANCH_COMPLETE_"+toString(i)+"_HISTORY"+std_logic_range(index-1,index-_param._predictor_0_bht_size_shifter)+";"); 129 129 index-= _param._predictor_0_bht_size_shifter; 130 130 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Meta_Predictor_Glue/src/Meta_Predictor_Glue_vhdl_declaration.cpp
r5 r44 17 17 18 18 19 void Meta_Predictor_Glue::vhdl_declaration (Vhdl & vhdl)19 void Meta_Predictor_Glue::vhdl_declaration (Vhdl * & vhdl) 20 20 { 21 21 log_printf(FUNC,Meta_Predictor_Glue,"vhdl_declaration","Begin"); … … 26 26 { 27 27 if (_param._predictor_0_have_pht) 28 vhdl .set_alias ("predict_predictor_0_direction_"+toString(i),std_logic(1), "in_PREDICT_PREDICTOR_0_PHT_HISTORY_"+toString(i),std_logic_range(_param._predictor_0_pht_size_counter-1,_param._predictor_0_pht_size_counter-1));28 vhdl->set_alias ("predict_"+toString(i)+"_predictor_0_direction",std_logic(1), "in_PREDICT_"+toString(i)+"_PREDICTOR_0_PHT_HISTORY",std_logic_range(_param._predictor_0_pht_size_counter-1,_param._predictor_0_pht_size_counter-1)); 29 29 else 30 vhdl .set_alias ("predict_predictor_0_direction_"+toString(i),std_logic(1), "in_PREDICT_PREDICTOR_0_BHT_HISTORY_"+toString(i),std_logic_range(_param._predictor_0_bht_size_shifter-1,_param._predictor_0_bht_size_shifter-1));30 vhdl->set_alias ("predict_"+toString(i)+"_predictor_0_direction",std_logic(1), "in_PREDICT_"+toString(i)+"_PREDICTOR_0_BHT_HISTORY",std_logic_range(_param._predictor_0_bht_size_shifter-1,_param._predictor_0_bht_size_shifter-1)); 31 31 if (_param._predictor_1_have_pht) 32 vhdl .set_alias ("predict_predictor_1_direction_"+toString(i),std_logic(1), "in_PREDICT_PREDICTOR_1_PHT_HISTORY_"+toString(i),std_logic_range(_param._predictor_1_pht_size_counter-1,_param._predictor_1_pht_size_counter-1));32 vhdl->set_alias ("predict_"+toString(i)+"_predictor_1_direction",std_logic(1), "in_PREDICT_"+toString(i)+"_PREDICTOR_1_PHT_HISTORY",std_logic_range(_param._predictor_1_pht_size_counter-1,_param._predictor_1_pht_size_counter-1)); 33 33 else 34 vhdl .set_alias ("predict_predictor_1_direction_"+toString(i),std_logic(1), "in_PREDICT_PREDICTOR_1_BHT_HISTORY_"+toString(i),std_logic_range(_param._predictor_1_bht_size_shifter-1,_param._predictor_1_bht_size_shifter-1));34 vhdl->set_alias ("predict_"+toString(i)+"_predictor_1_direction",std_logic(1), "in_PREDICT_"+toString(i)+"_PREDICTOR_1_BHT_HISTORY",std_logic_range(_param._predictor_1_bht_size_shifter-1,_param._predictor_1_bht_size_shifter-1)); 35 35 } 36 36 37 37 if (_param._predictor_2_have_pht) 38 vhdl .set_alias ("predict_predictor_2_direction_"+toString(i),std_logic(1), "in_PREDICT_PREDICTOR_2_PHT_HISTORY_"+toString(i),std_logic_range(_param._predictor_2_pht_size_counter-1,_param._predictor_2_pht_size_counter-1));38 vhdl->set_alias ("predict_"+toString(i)+"_predictor_2_direction",std_logic(1), "in_PREDICT_"+toString(i)+"_PREDICTOR_2_PHT_HISTORY",std_logic_range(_param._predictor_2_pht_size_counter-1,_param._predictor_2_pht_size_counter-1)); 39 39 else 40 vhdl .set_alias ("predict_predictor_2_direction_"+toString(i),std_logic(1), "in_PREDICT_PREDICTOR_2_BHT_HISTORY_"+toString(i),std_logic_range(_param._predictor_2_bht_size_shifter-1,_param._predictor_2_bht_size_shifter-1));40 vhdl->set_alias ("predict_"+toString(i)+"_predictor_2_direction",std_logic(1), "in_PREDICT_"+toString(i)+"_PREDICTOR_2_BHT_HISTORY",std_logic_range(_param._predictor_2_bht_size_shifter-1,_param._predictor_2_bht_size_shifter-1)); 41 41 } 42 42 … … 46 46 { 47 47 // if (_param._predictor_2_have_pht) 48 // vhdl .set_alias ("branch_complete_predictor_2_direction_"+toString(i),std_logic(1)," in_BRANCH_COMPLETE_HISTORY_"+toString(i),std_logic_range(_param._shift_6-1, _param._shift_6-1));48 // vhdl->set_alias ("branch_complete_"+toString(i)+"_predictor_2_direction",std_logic(1)," in_BRANCH_COMPLETE_"+toString(i)+"_HISTORY",std_logic_range(_param._shift_6-1, _param._shift_6-1)); 49 49 // else 50 // vhdl .set_alias ("branch_complete_predictor_2_direction_"+toString(i),std_logic(1)," in_BRANCH_COMPLETE_HISTORY_"+toString(i),std_logic_range(_param._shift_5-1, _param._shift_5-1));50 // vhdl->set_alias ("branch_complete_"+toString(i)+"_predictor_2_direction",std_logic(1)," in_BRANCH_COMPLETE_"+toString(i)+"_HISTORY",std_logic_range(_param._shift_5-1, _param._shift_5-1)); 51 51 52 52 if (_param._predictor_1_have_pht) 53 vhdl .set_alias ("branch_complete_predictor_1_direction_"+toString(i),std_logic(1)," in_BRANCH_COMPLETE_HISTORY_"+toString(i),std_logic_range(_param._shift_4-1, _param._shift_4-1));53 vhdl->set_alias ("branch_complete_"+toString(i)+"_predictor_1_direction",std_logic(1)," in_BRANCH_COMPLETE_"+toString(i)+"_HISTORY",std_logic_range(_param._shift_4-1, _param._shift_4-1)); 54 54 else 55 vhdl .set_alias ("branch_complete_predictor_1_direction_"+toString(i),std_logic(1)," in_BRANCH_COMPLETE_HISTORY_"+toString(i),std_logic_range(_param._shift_3-1, _param._shift_3-1));55 vhdl->set_alias ("branch_complete_"+toString(i)+"_predictor_1_direction",std_logic(1)," in_BRANCH_COMPLETE_"+toString(i)+"_HISTORY",std_logic_range(_param._shift_3-1, _param._shift_3-1)); 56 56 57 57 if (_param._predictor_0_have_pht) 58 vhdl .set_alias ("branch_complete_predictor_0_direction_"+toString(i),std_logic(1)," in_BRANCH_COMPLETE_HISTORY_"+toString(i),std_logic_range(_param._shift_2-1, _param._shift_2-1));58 vhdl->set_alias ("branch_complete_"+toString(i)+"_predictor_0_direction",std_logic(1)," in_BRANCH_COMPLETE_"+toString(i)+"_HISTORY",std_logic_range(_param._shift_2-1, _param._shift_2-1)); 59 59 else 60 vhdl .set_alias ("branch_complete_predictor_0_direction_"+toString(i),std_logic(1)," in_BRANCH_COMPLETE_HISTORY_"+toString(i),std_logic_range(_param._shift_1-1, _param._shift_1-1));60 vhdl->set_alias ("branch_complete_"+toString(i)+"_predictor_0_direction",std_logic(1)," in_BRANCH_COMPLETE_"+toString(i)+"_HISTORY",std_logic_range(_param._shift_1-1, _param._shift_1-1)); 61 61 62 62 } 63 63 } 64 65 66 64 67 65 log_printf(FUNC,Meta_Predictor_Glue,"vhdl_declaration","End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Meta_Predictor_Glue/src/Meta_Predictor_Glue_vhdl_testbench_transition.cpp
r5 r44 21 21 log_printf(FUNC,Meta_Predictor_Glue,"vhdl_testbench_transition","Begin"); 22 22 23 // Evaluation before read the ouput signal 24 sc_start(0); 25 26 // In order with file Meta_Predictor_Glue_vhdl_testbench_port.cpp 27 // Warning : if a output depend of a subcomponent, take directly the port of subcomponent 28 // (because we have no control on the ordonnancer's policy) 29 30 for (uint32_t i=0; i<_param._nb_prediction; i++) 31 { 32 if (_param._have_meta_predictor) 33 { 34 _vhdl_testbench->add_input (PORT_READ( in_PREDICT_PREDICTOR_0_ACK [i])); 35 _vhdl_testbench->add_input (PORT_READ( in_PREDICT_PREDICTOR_1_ACK [i])); 36 } 37 _vhdl_testbench->add_input (PORT_READ( in_PREDICT_PREDICTOR_2_ACK [i])); 38 _vhdl_testbench->add_output(PORT_READ(out_PREDICT_ACK [i])); 39 40 if (_param._have_meta_predictor) 41 { 42 if (_param._predictor_0_have_bht) 43 _vhdl_testbench->add_input (PORT_READ( in_PREDICT_PREDICTOR_0_BHT_HISTORY [i])); 44 if (_param._predictor_0_have_pht) 45 _vhdl_testbench->add_input (PORT_READ( in_PREDICT_PREDICTOR_0_PHT_HISTORY [i])); 46 if (_param._predictor_1_have_bht) 47 _vhdl_testbench->add_input (PORT_READ( in_PREDICT_PREDICTOR_1_BHT_HISTORY [i])); 48 if (_param._predictor_1_have_pht) 49 _vhdl_testbench->add_input (PORT_READ( in_PREDICT_PREDICTOR_1_PHT_HISTORY [i])); 50 } 51 if (_param._predictor_2_have_bht) 52 _vhdl_testbench->add_input (PORT_READ( in_PREDICT_PREDICTOR_2_BHT_HISTORY [i])); 53 if (_param._predictor_2_have_pht) 54 _vhdl_testbench->add_input (PORT_READ( in_PREDICT_PREDICTOR_2_PHT_HISTORY [i])); 55 56 _vhdl_testbench->add_output(PORT_READ(out_PREDICT_HISTORY [i])); 57 _vhdl_testbench->add_output(PORT_READ(out_PREDICT_DIRECTION [i])); 58 } 59 60 for (uint32_t i=0; i<_param._nb_branch_complete; i++) 61 { 62 if (_param._have_meta_predictor) 63 { 64 _vhdl_testbench->add_input (PORT_READ( in_BRANCH_COMPLETE_VAL [i])); 65 _vhdl_testbench->add_output(PORT_READ(out_BRANCH_COMPLETE_PREDICTOR_2_VAL [i])); 66 67 _vhdl_testbench->add_input (PORT_READ( in_BRANCH_COMPLETE_PREDICTOR_0_ACK [i])); 68 _vhdl_testbench->add_input (PORT_READ( in_BRANCH_COMPLETE_PREDICTOR_1_ACK [i])); 69 } 70 _vhdl_testbench->add_input (PORT_READ( in_BRANCH_COMPLETE_PREDICTOR_2_ACK [i])); 71 _vhdl_testbench->add_output(PORT_READ(out_BRANCH_COMPLETE_ACK [i])); 72 73 if (_param._have_meta_predictor) 74 { 75 if (_param._predictor_0_have_bht) 76 _vhdl_testbench->add_output(PORT_READ(out_BRANCH_COMPLETE_PREDICTOR_0_BHT_HISTORY [i])); 77 if (_param._predictor_0_have_pht) 78 _vhdl_testbench->add_output(PORT_READ(out_BRANCH_COMPLETE_PREDICTOR_0_PHT_HISTORY [i])); 79 if (_param._predictor_1_have_bht) 80 _vhdl_testbench->add_output(PORT_READ(out_BRANCH_COMPLETE_PREDICTOR_1_BHT_HISTORY [i])); 81 if (_param._predictor_1_have_pht) 82 _vhdl_testbench->add_output(PORT_READ(out_BRANCH_COMPLETE_PREDICTOR_1_PHT_HISTORY [i])); 83 } 84 if (_param._predictor_2_have_bht) 85 _vhdl_testbench->add_output(PORT_READ(out_BRANCH_COMPLETE_PREDICTOR_2_BHT_HISTORY [i])); 86 if (_param._predictor_2_have_pht) 87 _vhdl_testbench->add_output(PORT_READ(out_BRANCH_COMPLETE_PREDICTOR_2_PHT_HISTORY [i])); 88 89 _vhdl_testbench->add_input (PORT_READ( in_BRANCH_COMPLETE_HISTORY [i])); 90 if (_param._have_meta_predictor) 91 { 92 _vhdl_testbench->add_input (PORT_READ( in_BRANCH_COMPLETE_DIRECTION [i])); 93 _vhdl_testbench->add_output(PORT_READ(out_BRANCH_COMPLETE_PREDICTOR_2_DIRECTION [i])); 94 } 95 } 96 97 // add_test : 98 // - True : the cycle must be compare with the output of systemC 99 // - False : no test 100 _vhdl_testbench->add_test(true); 101 102 _vhdl_testbench->new_cycle (); // always at the end 23 // sc_start(0); 24 _interfaces->testbench(); 103 25 104 26 log_printf(FUNC,Meta_Predictor_Glue,"vhdl_testbench_transition","End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/SelfTest/src/test.cpp
r15 r44 10 10 11 11 #include "Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/SelfTest/include/test.h" 12 #include " Include/Test.h"12 #include "Common/include/Test.h" 13 13 14 14 void test (string name, … … 128 128 129 129 sc_start(0); 130 _Meta_Predictor->vhdl_testbench_label("Initialisation"); 130 131 NRESET->write(0); 132 sc_start(5); 133 NRESET->write(1); 134 131 135 cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} Initialisation" << endl; 132 136 133 134 _Meta_Predictor->vhdl_testbench_label("Loop of Test");135 137 cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} Loop of Test" << endl; 136 138 137 139 for (uint32_t iteration=0; iteration<NB_ITERATION; iteration ++) 138 140 { 139 _Meta_Predictor->vhdl_testbench_label("Iteration "+toString(iteration));140 141 141 142 sc_start(1); … … 146 147 ********************************************************/ 147 148 149 cout << "Test OK" << endl; 150 148 151 cout << "<" << name << "> ............ Stop Simulation" << endl; 149 152 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Branch_History_Table/SelfTest/src/test.cpp
r42 r44 10 10 11 11 #include "Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Branch_History_Table/SelfTest/include/test.h" 12 #include " Include/BitManipulation.h"13 #include " Include/Test.h"12 #include "Common/include/BitManipulation.h" 13 #include "Common/include/Test.h" 14 14 15 15 void test (string name, -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Branch_History_Table/include/Branch_History_Table.h
r43 r44 13 13 #endif 14 14 15 #include " Include/ToString.h"16 #include " Include/Debug.h"15 #include "Common/include/ToString.h" 16 #include "Common/include/Debug.h" 17 17 18 18 // Internal structure -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Branch_History_Table/include/Parameters.h
r15 r44 9 9 */ 10 10 11 #include " Include/Debug.h"11 #include "Common/include/Debug.h" 12 12 #include "Behavioural/include/Parameters.h" 13 13 // Internal structure -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Branch_History_Table/include/Statistics.h
r15 r44 10 10 */ 11 11 12 #include " Include/Debug.h"12 #include "Common/include/Debug.h" 13 13 #include "Behavioural/include/Statistics.h" 14 14 #include "Behavioural/include/Parameters_Statistics.h" -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Branch_History_Table/include/Types.h
r2 r44 10 10 */ 11 11 12 #include " Include/Types.h"12 #include "Common/include/Types.h" 13 13 14 14 namespace morpheo { -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Branch_History_Table/src/Branch_History_Table_vhdl_body.cpp
r42 r44 20 20 void Branch_History_Table::vhdl_body (Vhdl * & vhdl) 21 21 { 22 // vhdl->set_body ("-- Output : always at '1'");23 // for (uint32_t i=0; i<_param._nb_branch_complete; i++)24 // vhdl->set_body ("out_BRANCH_COMPLETE_ACK_"+toString(i)+" <= '1';");25 // for (uint32_t i=0; i<_param._nb_prediction ; i++)26 // vhdl->set_body ("out_PREDICT_ACK_"+toString(i)+" <= '1';");27 // vhdl->set_body ("");28 29 list<string> list_port_map;30 31 for (uint32_t i=0; i<_param._nb_branch_complete; i++)32 {33 vhdl->set_body_component_port_map (list_port_map," in_SHIFTER_"+toString(i)+"_DATA "," in_BRANCH_COMPLETE_"+toString(i)+"_HISTORY" );34 vhdl->set_body_component_port_map (list_port_map," in_SHIFTER_"+toString(i)+"_CARRY_IN "," in_BRANCH_COMPLETE_"+toString(i)+"_DIRECTION");35 vhdl->set_body_component_port_map (list_port_map,"out_SHIFTER_"+toString(i)+"_DATA ","signal_BRANCH_COMPLETE_"+toString(i)+"_HISTORY" );36 }37 38 vhdl->set_body_component ("component_Shifter",_name+"_Shifter",list_port_map);39 40 list_port_map.clear();41 vhdl->set_body_component_port_map (list_port_map,"in_CLOCK","in_CLOCK");42 vhdl->set_body_component_port_map (list_port_map,"in_NRESET","in_NRESET");43 44 for (uint32_t i=0; i<_param._nb_prediction; i++)45 {46 vhdl->set_body_component_port_map (list_port_map," in_READ_"+toString(i)+"_VAL "," In_PREDICT_"+toString(i)+"_VAL");47 vhdl->set_body_component_port_map (list_port_map,"out_READ_"+toString(i)+"_ACK ","out_PREDICT_"+toString(i)+"_ACK");48 vhdl->set_body_component_port_map (list_port_map," in_READ_"+toString(i)+"_ADDRESS "," in_PREDICT_"+toString(i)+"_ADDRESS");49 vhdl->set_body_component_port_map (list_port_map,"out_READ_"+toString(i)+"_DATA ","out_PREDICT_"+toString(i)+"_HISTORY");50 }51 52 for (uint32_t i=0; i<_param._nb_branch_complete; i++)53 {54 vhdl->set_body_component_port_map (list_port_map," in_WRITE_"+toString(i)+"_VAL "," in_BRANCH_COMPLETE_"+toString(i)+"_VAL");55 vhdl->set_body_component_port_map (list_port_map,"out_WRITE_"+toString(i)+"_ACK "," out_BRANCH_COMPLETE_"+toString(i)+"_ACK");56 vhdl->set_body_component_port_map (list_port_map," in_WRITE_"+toString(i)+"_ADDRESS"," in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS");57 vhdl->set_body_component_port_map (list_port_map," in_WRITE_"+toString(i)+"_DATA ","signal_BRANCH_COMPLETE_"+toString(i)+"_HISTORY");58 }59 vhdl->set_body_component ("component_RegisterFile",_name+"_RegisterFile",list_port_map);60 22 }; 61 23 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Branch_History_Table/src/Branch_History_Table_vhdl_testbench_transition.cpp
r42 r44 20 20 void Branch_History_Table::vhdl_testbench_transition (void) 21 21 { 22 sc_start(0);22 // sc_start(0); 23 23 24 24 _interfaces->testbench(); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table/SelfTest/config0.cfg
r43 r44 2 2 2 8 *2 # size_counter 3 3 2 64 *4 # nb_counter 4 1 2+1 # nb_prediction5 1 2+1 # nb_branch_complete4 1 1 +1 # nb_prediction 5 1 1 +1 # nb_branch_complete -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table/SelfTest/src/test.cpp
r42 r44 10 10 11 11 #include "Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table/SelfTest/include/test.h" 12 #include " Include/Test.h"12 #include "Common/include/Test.h" 13 13 14 14 void test (string name, -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table/include/Parameters.h
r15 r44 9 9 */ 10 10 11 #include " Include/Debug.h"11 #include "Common/include/Debug.h" 12 12 #include "Behavioural/include/Parameters.h" 13 13 // Internal structure -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table/include/Pattern_History_Table.h
r42 r44 14 14 15 15 #include <iostream> 16 #include " Include/ToString.h"17 #include " Include/Debug.h"16 #include "Common/include/ToString.h" 17 #include "Common/include/Debug.h" 18 18 19 19 // Internal structure -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table/include/Statistics.h
r15 r44 10 10 */ 11 11 12 #include " Include/Debug.h"12 #include "Common/include/Debug.h" 13 13 #include "Behavioural/include/Statistics.h" 14 14 #include "Behavioural/include/Parameters_Statistics.h" -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table/include/Types.h
r2 r44 10 10 */ 11 11 12 #include " Include/Types.h"12 #include "Common/include/Types.h" 13 13 14 14 namespace morpheo { -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table/src/Pattern_History_Table_vhdl_testbench_transition.cpp
r42 r44 22 22 log_printf(FUNC,Pattern_History_Table,"vhdl_testbench_transition","Begin"); 23 23 24 sc_start(0);24 // sc_start(0); 25 25 26 26 _interfaces->testbench(); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/SelfTest/config0.cfg
r43 r44 1 1 Two_Level_Branch_Predictor 2 11 +1 # have_bht3 8 8+1 # bht_size_shifter2 0 1 +1 # have_bht 3 4 4 +1 # bht_size_shifter 4 4 32 32 *2 # bht_nb_shifter 5 5 1 1 +1 # have_pht … … 8 8 2 2 +1 # pht_size_address_share 9 9 16 16 +1 # size_address 10 22 +1 # nb_prediction11 22 +1 # nb_branch_complete10 1 2 +1 # nb_prediction 11 1 2 +1 # nb_branch_complete -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/SelfTest/src/test.cpp
r43 r44 10 10 11 11 #include "Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/SelfTest/include/test.h" 12 #include " Include/Test.h"13 #include " Include/BitManipulation.h"12 #include "Common/include/Test.h" 13 #include "Common/include/BitManipulation.h" 14 14 void test (string name, 15 15 morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor::Parameters param) … … 132 132 sc_start(0); 133 133 134 NRESET->write(0); 135 sc_start(5); 136 NRESET->write(1); 137 134 138 for (uint32_t i=0; i<param._nb_prediction; i++) 135 139 PREDICT_VAL [i]->write(0); … … 156 160 uint32_t nb_reg_by_group = (1<<(param._pht_size_address-size_address_shift)); 157 161 162 // cout << "pht_size_address : " << param._pht_size_address << endl; 163 // cout << "size_address_shift : " << size_address_shift << endl; 164 // cout << "nb_group : " << nb_group << endl; 165 // cout << "nb_reg_by_group : " << nb_reg_by_group << endl; 166 158 167 cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} Init pht" << endl; 159 168 … … 168 177 for (uint32_t j=0; j<nb_reg_by_group; j++) 169 178 { 179 cout << "j : " << j << " on " << nb_reg_by_group << endl; 170 180 BRANCH_COMPLETE_ADDRESS [num_port_branch_complete]->write(j); 171 181 172 182 sc_start(1); 173 183 174 184 // wait ackwolegde 175 185 while (BRANCH_COMPLETE_ACK [num_port_branch_complete] -> read() == 0) 176 sc_start(1); 186 { 187 sc_start(1); 188 } 177 189 } 178 190 } … … 195 207 // wait ackwolegde 196 208 while (BRANCH_COMPLETE_ACK [num_port_branch_complete] -> read() == 0) 197 sc_start(1); 209 { 210 sc_start(1); 211 } 198 212 } 199 213 … … 225 239 // wait ackwolegde 226 240 while (PREDICT_ACK [num_port_predict] -> read() == 0) 227 sc_start(1); 241 { 242 sc_start(1); 243 } 228 244 PREDICT_ACK [num_port_predict ]->write(0); 229 245 … … 231 247 232 248 // Test 249 cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} Predict (Test) : " << endl; 233 250 if (param._have_bht) 234 TEST(Tbht_history_t,bht_history ,PREDICT_BHT_HISTORY[num_port_predict]->read()); 251 { 252 cout << "\tbht_history " << PREDICT_BHT_HISTORY[num_port_predict]->read() << endl; 253 TEST(Tbht_history_t,bht_history ,PREDICT_BHT_HISTORY[num_port_predict]->read()); 254 } 235 255 if (param._have_pht) 236 TEST(Tpht_history_t,pht_history[bht_history],PREDICT_PHT_HISTORY[num_port_predict]->read()); 256 { 257 cout << "\tpht_history " << PREDICT_PHT_HISTORY[num_port_predict]->read() << endl; 258 TEST(Tpht_history_t,pht_history[bht_history],PREDICT_PHT_HISTORY[num_port_predict]->read()); 259 } 237 260 238 261 // update … … 267 290 // wait ackwolegde 268 291 while (BRANCH_COMPLETE_ACK [num_port_branch_complete] -> read() == 0) 269 sc_start(1); 270 292 { 293 sc_start(1); 294 } 271 295 BRANCH_COMPLETE_VAL [num_port_branch_complete]->write(0); 272 296 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/SelfTest/config0.cfg
r43 r44 1 1 Two_Level_Branch_Predictor_Glue 2 11 +1 # have_bht2 0 1 +1 # have_bht 3 3 11 11 +1 # bht_size_history 4 4 4 4 +1 # bht_size_address 5 01 +1 # have_pht5 1 1 +1 # have_pht 6 6 13 13 +1 # pht_size_address 7 02 +1 # pht_size_address_share7 2 2 +1 # pht_size_address_share 8 8 16 16 +1 # size_address 9 12 +1 # nb_prediction10 12 +1 # nb_branch_complete9 2 2 +1 # nb_prediction 10 2 2 +1 # nb_branch_complete -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/SelfTest/src/test.cpp
r42 r44 10 10 11 11 #include "Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/SelfTest/include/test.h" 12 #include " Include/BitManipulation.h"13 #include " Include/Test.h"12 #include "Common/include/BitManipulation.h" 13 #include "Common/include/Test.h" 14 14 15 15 void test (string name, -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Parameters.h
r2 r44 9 9 */ 10 10 11 #include " Include/Debug.h"11 #include "Common/include/Debug.h" 12 12 #include "Behavioural/include/Parameters.h" 13 13 #include <math.h> -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Statistics.h
r2 r44 10 10 */ 11 11 12 #include " Include/Debug.h"12 #include "Common/include/Debug.h" 13 13 #include "Behavioural/include/Statistics.h" 14 14 #include "Behavioural/include/Parameters_Statistics.h" -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Two_Level_Branch_Predictor_Glue.h
r43 r44 14 14 15 15 #include <iostream> 16 #include " Include/ToString.h"17 #include " Include/Debug.h"16 #include "Common/include/ToString.h" 17 #include "Common/include/Debug.h" 18 18 19 19 #include "Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Parameters.h" -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Types.h
r2 r44 10 10 */ 11 11 12 #include " Include/Types.h"12 #include "Common/include/Types.h" 13 13 14 14 namespace morpheo { -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Parameters_msg_error.cpp
r2 r44 26 26 string msg = ""; 27 27 28 if ( _have_phtand (_pht_size_address_share >= _pht_size_address))28 if ((_have_bht and _have_pht) and (_pht_size_address_share >= _pht_size_address)) 29 29 { 30 30 msg += " - You can't have higher pht_size_address_share >= pht_size_address\n"; 31 31 msg += " * pht_size_address : " + toString(_pht_size_address ) + "\n"; 32 32 msg += " * pht_size_address_share : " + toString(_pht_size_address_share) + "\n"; 33 } 34 if ((_have_bht and _have_pht) and (_bht_size_history > _pht_size_address)) 35 { 36 msg += " - You can't have higher bht_size_history > pht_size_address\n"; 37 msg += " * bht_size_history : " + toString(_bht_size_history ) + "\n"; 38 msg += " * pht_size_address : " + toString(_pht_size_address ) + "\n"; 33 39 } 34 40 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue.cpp
r42 r44 34 34 log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"Two_Level_Branch_Predictor_Glue","Begin"); 35 35 36 #ifdef SYSTEMC37 36 allocation (); 38 #endif39 37 40 38 #ifdef STATISTICS -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_genMealy_branch_complete_ack.cpp
r2 r44 8 8 9 9 #include "Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Two_Level_Branch_Predictor_Glue.h" 10 #include " Include/BitManipulation.h"10 #include "Common/include/BitManipulation.h" 11 11 12 12 namespace morpheo { -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_genMealy_branch_complete_bht_address.cpp
r2 r44 8 8 9 9 #include "Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Two_Level_Branch_Predictor_Glue.h" 10 #include " Include/BitManipulation.h"10 #include "Common/include/BitManipulation.h" 11 11 12 12 namespace morpheo { -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_genMealy_branch_complete_pht_address.cpp
r3 r44 8 8 9 9 #include "Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Two_Level_Branch_Predictor_Glue.h" 10 #include " Include/BitManipulation.h"10 #include "Common/include/BitManipulation.h" 11 11 12 12 namespace morpheo { -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_genMealy_predict_ack.cpp
r2 r44 8 8 9 9 #include "Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Two_Level_Branch_Predictor_Glue.h" 10 #include " Include/BitManipulation.h"10 #include "Common/include/BitManipulation.h" 11 11 12 12 namespace morpheo { -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_genMealy_predict_bht_address.cpp
r3 r44 8 8 9 9 #include "Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Two_Level_Branch_Predictor_Glue.h" 10 #include " Include/BitManipulation.h"10 #include "Common/include/BitManipulation.h" 11 11 12 12 namespace morpheo { -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_genMealy_predict_pht_address.cpp
r2 r44 8 8 9 9 #include "Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Two_Level_Branch_Predictor_Glue.h" 10 #include " Include/BitManipulation.h"10 #include "Common/include/BitManipulation.h" 11 11 12 12 namespace morpheo { -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_vhdl_testbench_transition.cpp
r42 r44 22 22 log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"vhdl_testbench_transition","Begin"); 23 23 24 sc_start(0);24 // sc_start(0); 25 25 26 26 _interfaces->testbench(); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/include/Parameters.h
r2 r44 9 9 */ 10 10 11 #include " Include/Debug.h"11 #include "Common/include/Debug.h" 12 12 #include "Behavioural/include/Parameters.h" 13 13 // Internal structure -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/include/Statistics.h
r2 r44 10 10 */ 11 11 12 #include " Include/Debug.h"12 #include "Common/include/Debug.h" 13 13 // Internal structure 14 14 #include "Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Branch_History_Table/include/Statistics.h" -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/include/Two_Level_Branch_Predictor.h
r43 r44 14 14 15 15 #include <iostream> 16 #include " Include/ToString.h"17 #include " Include/Debug.h"16 #include "Common/include/ToString.h" 17 #include "Common/include/Debug.h" 18 18 19 19 // Internal structure -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/include/Types.h
r2 r44 10 10 */ 11 11 12 #include " Include/Types.h"12 #include "Common/include/Types.h" 13 13 14 14 namespace morpheo { -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_allocation.cpp
r43 r44 18 18 void Two_Level_Branch_Predictor::allocation (void) 19 19 { 20 string rename;21 22 20 log_printf(FUNC,Two_Level_Branch_Predictor,"allocation","Begin"); 23 21 … … 176 174 if (_param._have_bht) 177 175 { 178 cout << "GEU 1" << endl;179 176 #ifdef POSITION 180 177 _component->interface_map (_name+"_Branch_History_Table","", … … 214 211 if (_param._have_pht) 215 212 { 216 cout << "GEU 2" << endl;217 213 #ifdef POSITION 218 214 _component->interface_map (_name+"_Pattern_History_Table","", … … 250 246 251 247 // =====[ component_Two_Level_Branch_Predictor_Glue - Instanciation ]= 252 cout << "GEU 3" << endl;253 248 #ifdef POSITION 254 249 _component->interface_map (_name+"_Two_Level_Branch_Predictor_Glue","", … … 258 253 _component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "in_NRESET", _name,"in_NRESET"); 259 254 260 cout << "GEU 3.1" << endl;261 255 for (uint32_t i=0; i<_param._nb_prediction; i++) 262 256 { 263 cout << "GEU 3.1.1" << endl;264 257 if (_param._have_bht) 265 258 { … … 267 260 _component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "out_PREDICT_"+toString(i)+"_BHT_ADDRESS", _name+"_Branch_History_Table" , "in_PREDICT_"+toString(i)+"_ADDRESS"); 268 261 } 269 cout << "GEU 3.1.2" << endl;270 262 if (_param._have_pht) 271 263 { … … 273 265 _component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "out_PREDICT_"+toString(i)+"_PHT_ADDRESS", _name+"_Pattern_History_Table", "in_PREDICT_"+toString(i)+"_ADDRESS"); 274 266 } 275 cout << "GEU 3.1.3" << endl;276 267 if (_param._have_bht and _param._have_pht) 277 _component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "in_PREDICT_"+toString(i)+"_BHT_HISTORY" , _name ,"out_PREDICT_"+toString(i)+"_BHT_HISTORY"); 278 cout << "GEU 3.1.4.1" << endl; 268 _component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "in_PREDICT_"+toString(i)+"_BHT_HISTORY" , _name+"_Branch_History_Table" ,"out_PREDICT_"+toString(i)+"_HISTORY"); 279 269 _component->port_map(_name+"_Two_Level_Branch_Predictor_Glue","out_PREDICT_"+toString(i)+"_ACK" , _name ,"out_PREDICT_"+toString(i)+"_ACK"); 280 270 _component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "in_PREDICT_"+toString(i)+"_ADDRESS" , _name , "in_PREDICT_"+toString(i)+"_ADDRESS"); 281 271 } 282 272 283 cout << "GEU 3.2" << endl;284 273 for (uint32_t i=0; i<_param._nb_branch_complete; i++) 285 274 { … … 299 288 _component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS" , _name , "in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS"); 300 289 } 301 cout << "GEU 4" << endl;302 290 #ifdef POSITION 303 291 _component->generate_file(); … … 306 294 log_printf(FUNC,Two_Level_Branch_Predictor,"allocation","End"); 307 295 }; 308 309 310 311 312 313 314 315 // void Two_Level_Branch_Predictor::allocation (void)316 // {317 // string rename;318 319 // log_printf(FUNC,Two_Level_Branch_Predictor,"allocation","Begin");320 321 // _component = new Component ();322 323 // Entity * entity = _component->set_entity (_name324 // #ifdef POSITION325 // ,"Two_Level_Branch_Predictor"326 // ,MIXTE327 // #endif328 // );329 330 // _interfaces = entity->set_interfaces();331 332 // // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~333 // {334 // Interface * interface = _interfaces->set_interface(""335 // #ifdef POSITION336 // , IN337 // , SOUTH338 // , "Generalist interface"339 // #endif340 // );341 342 // in_CLOCK = interface->set_signal_clk ("clock" ,1);343 // in_NRESET = interface->set_signal_in <Tcontrol_t> ("nreset",1,RESET_VHDL_YES);344 // }345 346 // // ~~~~~[ Interface : "predict" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~347 348 // in_PREDICT_VAL = new SC_IN (Tcontrol_t) * [_param._nb_prediction ];349 // out_PREDICT_ACK = new SC_OUT(Tcontrol_t) * [_param._nb_prediction ];350 // in_PREDICT_ADDRESS = new SC_IN (Taddress_t) * [_param._nb_prediction ];351 // if (_param._have_bht)352 // out_PREDICT_BHT_HISTORY = new SC_OUT(Tbht_history_t) * [_param._nb_prediction ];353 // if (_param._have_pht)354 // out_PREDICT_PHT_HISTORY = new SC_OUT(Tpht_history_t) * [_param._nb_prediction ];355 // // if (_param._have_bht)356 // // {357 // // signal_PREDICT_BHT_ACK = new SC_SIGNAL(Tcontrol_t) * [_param._nb_prediction];358 // // signal_PREDICT_BHT_ADDRESS = new SC_SIGNAL(Taddress_t) * [_param._nb_prediction];359 // // }360 // // if (_param._have_pht)361 // // {362 // // signal_PREDICT_PHT_ACK = new SC_SIGNAL(Tcontrol_t) * [_param._nb_prediction];363 // // signal_PREDICT_PHT_ADDRESS = new SC_SIGNAL(Taddress_t) * [_param._nb_prediction];364 // // }365 366 // for (uint32_t i=0; i<_param._nb_prediction; i++)367 // {368 // rename = "in_PREDICT_VAL_" +toString(i);369 // in_PREDICT_VAL [i] = new SC_IN (Tcontrol_t) (rename.c_str());370 371 // rename = "out_PREDICT_ACK_" +toString(i);372 // out_PREDICT_ACK [i] = new SC_OUT(Tcontrol_t) (rename.c_str());373 374 // rename = "in_PREDICT_ADDRESS_" +toString(i);375 // in_PREDICT_ADDRESS [i] = new SC_IN (Taddress_t) (rename.c_str());376 377 // if (_param._have_bht)378 // {379 // rename = "out_PREDICT_BHT_HISTORY_"+toString(i);380 // out_PREDICT_BHT_HISTORY [i] = new SC_OUT(Tbht_history_t) (rename.c_str());381 // }382 383 // if (_param._have_pht)384 // {385 // rename = "out_PREDICT_PHT_HISTORY_"+toString(i);386 // out_PREDICT_PHT_HISTORY [i] = new SC_OUT(Tpht_history_t) (rename.c_str());387 // }388 389 // // if (_param._have_bht)390 // // {391 // // rename = "signal_PREDICT_BHT_ACK_" +toString(i);392 // // signal_PREDICT_BHT_ACK [i] = new SC_SIGNAL(Tcontrol_t) (rename.c_str());393 394 // // rename = "signal_PREDICT_BHT_ADDRESS_"+toString(i);395 // // signal_PREDICT_BHT_ADDRESS [i] = new SC_SIGNAL(Taddress_t) (rename.c_str());396 // // }397 398 // // if (_param._have_pht)399 // // {400 // // rename = "signal_PREDICT_PHT_ACK_" +toString(i);401 // // signal_PREDICT_PHT_ACK [i] = new SC_SIGNAL(Tcontrol_t) (rename.c_str());402 403 // // rename = "signal_PREDICT_PHT_ADDRESS_"+toString(i);404 // // signal_PREDICT_PHT_ADDRESS [i] = new SC_SIGNAL(Taddress_t) (rename.c_str());405 // // }406 // }407 408 // in_BRANCH_COMPLETE_VAL = new SC_IN (Tcontrol_t) * [_param._nb_branch_complete];409 // out_BRANCH_COMPLETE_ACK = new SC_OUT(Tcontrol_t) * [_param._nb_branch_complete];410 // in_BRANCH_COMPLETE_ADDRESS = new SC_IN (Taddress_t) * [_param._nb_branch_complete];411 // if (_param._have_bht)412 // in_BRANCH_COMPLETE_BHT_HISTORY = new SC_IN (Tbht_history_t) * [_param._nb_branch_complete];413 // if (_param._have_pht)414 // in_BRANCH_COMPLETE_PHT_HISTORY = new SC_IN (Tpht_history_t) * [_param._nb_branch_complete];415 // in_BRANCH_COMPLETE_DIRECTION = new SC_IN (Tcontrol_t) * [_param._nb_branch_complete];416 // // if (_param._have_bht)417 // // {418 // // signal_BRANCH_COMPLETE_BHT_ACK = new SC_SIGNAL(Tcontrol_t) * [_param._nb_branch_complete];419 // // signal_BRANCH_COMPLETE_BHT_ADDRESS = new SC_SIGNAL(Taddress_t) * [_param._nb_branch_complete];420 // // }421 // // if (_param._have_pht)422 // // {423 // // signal_BRANCH_COMPLETE_PHT_ACK = new SC_SIGNAL(Tcontrol_t) * [_param._nb_branch_complete];424 // // signal_BRANCH_COMPLETE_PHT_ADDRESS = new SC_SIGNAL(Taddress_t) * [_param._nb_branch_complete];425 // // }426 427 // for (uint32_t i=0; i<_param._nb_branch_complete; i++)428 // {429 // rename = "in_BRANCH_COMPLETE_VAL_" +toString(i);430 // in_BRANCH_COMPLETE_VAL [i] = new SC_IN (Tcontrol_t) (rename.c_str());431 432 // rename = "out_BRANCH_COMPLETE_ACK_" +toString(i);433 // out_BRANCH_COMPLETE_ACK [i] = new SC_OUT(Tcontrol_t) (rename.c_str());434 435 // rename = "in_BRANCH_COMPLETE_ADDRESS_" +toString(i);436 // in_BRANCH_COMPLETE_ADDRESS [i] = new SC_IN (Taddress_t) (rename.c_str());437 438 // if (_param._have_bht)439 // {440 // rename = "in_BRANCH_COMPLETE_BHT_HISTORY_"+toString(i);441 // in_BRANCH_COMPLETE_BHT_HISTORY [i] = new SC_IN (Tbht_history_t) (rename.c_str());442 // }443 // if (_param._have_pht)444 // {445 // rename = "in_BRANCH_COMPLETE_PHT_HISTORY_"+toString(i);446 // in_BRANCH_COMPLETE_PHT_HISTORY [i] = new SC_IN (Tpht_history_t) (rename.c_str());447 // }448 // rename = "in_BRANCH_COMPLETE_DIRECTION_" +toString(i);449 // in_BRANCH_COMPLETE_DIRECTION [i] = new SC_IN (Tcontrol_t) (rename.c_str());450 // // if (_param._have_bht)451 // // {452 // // rename = "signal_BRANCH_COMPLETE_BHT_ACK_" +toString(i);453 // // signal_BRANCH_COMPLETE_BHT_ACK [i] = new SC_SIGNAL(Tcontrol_t) (rename.c_str());454 455 // // rename = "signal_BRANCH_COMPLETE_BHT_ADDRESS_"+toString(i);456 // // signal_BRANCH_COMPLETE_BHT_ADDRESS [i] = new SC_SIGNAL(Taddress_t) (rename.c_str());457 // // }458 // // if (_param._have_pht)459 // // {460 // // rename = "signal_BRANCH_COMPLETE_PHT_ACK_" +toString(i);461 // // signal_BRANCH_COMPLETE_PHT_ACK [i] = new SC_SIGNAL(Tcontrol_t) (rename.c_str());462 463 // // rename = "signal_BRANCH_COMPLETE_PHT_ADDRESS_"+toString(i);464 // // signal_BRANCH_COMPLETE_PHT_ADDRESS [i] = new SC_SIGNAL(Taddress_t) (rename.c_str());465 // // }466 // }467 468 // // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~469 // string name_component;470 471 // // =====[ component_Branch_History_Table ]============================472 // if (_param._have_bht)473 // {474 // name_component = _name+"_Branch_History_Table";475 476 // log_printf(INFO,Two_Level_Branch_Predictor,"allocation","Allocation : %s",name_component.c_str());477 478 // component_Branch_History_Table = new morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor::branch_history_table ::Branch_History_Table (name_component.c_str() ,479 // #ifdef STATISTICS480 // _param_statistics ,481 // #endif482 // *(_param._param_branch_history_table));483 484 // // Instantiation485 // (*(component_Branch_History_Table->in_CLOCK )) (*(in_CLOCK ));486 // (*(component_Branch_History_Table->in_NRESET)) (*(in_NRESET));487 488 // for (uint32_t i=0; i<_param._nb_prediction; i++)489 // {490 // (*(component_Branch_History_Table-> in_PREDICT_VAL [i])) (*( in_PREDICT_VAL [i]));491 // (*(component_Branch_History_Table->out_PREDICT_ACK [i])) (*(signal_PREDICT_BHT_ACK [i]));492 // (*(component_Branch_History_Table-> in_PREDICT_ADDRESS [i])) (*(signal_PREDICT_BHT_ADDRESS [i]));493 // (*(component_Branch_History_Table->out_PREDICT_HISTORY [i])) (*( out_PREDICT_BHT_HISTORY [i]));494 // }495 496 // for (uint32_t i=0; i<_param._nb_branch_complete; i++)497 // {498 // (*(component_Branch_History_Table-> in_BRANCH_COMPLETE_VAL [i])) (*( in_BRANCH_COMPLETE_VAL [i]));499 // (*(component_Branch_History_Table->out_BRANCH_COMPLETE_ACK [i])) (*(signal_BRANCH_COMPLETE_BHT_ACK [i]));500 // (*(component_Branch_History_Table-> in_BRANCH_COMPLETE_ADDRESS [i])) (*(signal_BRANCH_COMPLETE_BHT_ADDRESS [i]));501 // (*(component_Branch_History_Table-> in_BRANCH_COMPLETE_HISTORY [i])) (*( in_BRANCH_COMPLETE_BHT_HISTORY [i]));502 // (*(component_Branch_History_Table-> in_BRANCH_COMPLETE_DIRECTION [i])) (*( in_BRANCH_COMPLETE_DIRECTION [i]));503 // }504 // }505 506 // // =====[ component_Pattern_History_Table ]===========================507 // if (_param._have_pht)508 // {509 // name_component = _name+"_Pattern_History_Table";510 511 // log_printf(INFO,Two_Level_Branch_Predictor,"allocation","Allocation : %s",name_component.c_str());512 513 // component_Pattern_History_Table = new morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor::pattern_history_table::Pattern_History_Table (name_component.c_str() ,514 // #ifdef STATISTICS515 // _param_statistics ,516 // #endif517 // *(_param._param_pattern_history_table));518 519 // // Instantiation520 // (*(component_Pattern_History_Table->in_CLOCK)) (*(in_CLOCK));521 // (*(component_Pattern_History_Table->in_NRESET)) (*(in_NRESET));522 523 // for (uint32_t i=0; i<_param._nb_prediction; i++)524 // {525 // (*(component_Pattern_History_Table-> in_PREDICT_VAL [i])) (*( in_PREDICT_VAL [i]));526 // (*(component_Pattern_History_Table->out_PREDICT_ACK [i])) (*(signal_PREDICT_PHT_ACK [i]));527 // (*(component_Pattern_History_Table-> in_PREDICT_ADDRESS [i])) (*(signal_PREDICT_PHT_ADDRESS [i]));528 // (*(component_Pattern_History_Table->out_PREDICT_HISTORY [i])) (*( out_PREDICT_PHT_HISTORY [i]));529 // }530 531 // for (uint32_t i=0; i<_param._nb_branch_complete; i++)532 // {533 // (*(component_Pattern_History_Table-> in_BRANCH_COMPLETE_VAL [i])) (*( in_BRANCH_COMPLETE_VAL [i]));534 // (*(component_Pattern_History_Table->out_BRANCH_COMPLETE_ACK [i])) (*(signal_BRANCH_COMPLETE_PHT_ACK [i]));535 // (*(component_Pattern_History_Table-> in_BRANCH_COMPLETE_ADDRESS [i])) (*(signal_BRANCH_COMPLETE_PHT_ADDRESS [i]));536 // (*(component_Pattern_History_Table-> in_BRANCH_COMPLETE_HISTORY [i])) (*( in_BRANCH_COMPLETE_PHT_HISTORY [i]));537 // (*(component_Pattern_History_Table-> in_BRANCH_COMPLETE_DIRECTION [i])) (*( in_BRANCH_COMPLETE_DIRECTION [i]));538 // }539 // }540 541 // // =====[ component_Two_Level_Branch_Predictor_Glue ]===========================542 // name_component = _name+"_Two_Level_Branch_Predictor_Glue";543 544 // log_printf(INFO,Two_Level_Branch_Predictor,"allocation","Allocation : %s",name_component.c_str());545 546 // component_Two_Level_Branch_Predictor_Glue = new morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor::two_level_branch_predictor_glue::Two_Level_Branch_Predictor_Glue (name_component.c_str() ,547 // #ifdef STATISTICS548 // _param_statistics ,549 // #endif550 // *(_param._param_two_level_branch_predictor_glue));551 552 // // Instantiation553 // #if defined(STATISTICS) or defined(VHDL_TESTBENCH)554 // (*(component_Two_Level_Branch_Predictor_Glue->in_CLOCK)) (*(in_CLOCK));555 // #endif556 // for (uint32_t i=0; i<_param._nb_prediction; i++)557 // {558 // if (_param._have_bht)559 // {560 // (*(component_Two_Level_Branch_Predictor_Glue-> in_PREDICT_BHT_ACK [i])) (*(signal_PREDICT_BHT_ACK [i]));561 // (*(component_Two_Level_Branch_Predictor_Glue->out_PREDICT_BHT_ADDRESS [i])) (*(signal_PREDICT_BHT_ADDRESS [i]));562 // }563 // if (_param._have_pht)564 // {565 // (*(component_Two_Level_Branch_Predictor_Glue-> in_PREDICT_PHT_ACK [i])) (*(signal_PREDICT_PHT_ACK [i]));566 // (*(component_Two_Level_Branch_Predictor_Glue->out_PREDICT_PHT_ADDRESS [i])) (*(signal_PREDICT_PHT_ADDRESS [i]));567 // }568 // if (_param._have_bht and _param._have_pht)569 // {570 // (*(component_Two_Level_Branch_Predictor_Glue-> in_PREDICT_BHT_HISTORY [i])) (*( out_PREDICT_BHT_HISTORY [i]));571 // }572 // (*(component_Two_Level_Branch_Predictor_Glue->out_PREDICT_ACK [i])) (*( out_PREDICT_ACK [i]));573 // (*(component_Two_Level_Branch_Predictor_Glue-> in_PREDICT_ADDRESS [i])) (*( in_PREDICT_ADDRESS [i]));574 // }575 576 // for (uint32_t i=0; i<_param._nb_branch_complete; i++)577 // {578 // if (_param._have_bht)579 // {580 // (*(component_Two_Level_Branch_Predictor_Glue-> in_BRANCH_COMPLETE_BHT_ACK [i])) (*(signal_BRANCH_COMPLETE_BHT_ACK [i]));581 // (*(component_Two_Level_Branch_Predictor_Glue->out_BRANCH_COMPLETE_BHT_ADDRESS [i])) (*(signal_BRANCH_COMPLETE_BHT_ADDRESS [i]));582 // }583 // if (_param._have_pht)584 // {585 // (*(component_Two_Level_Branch_Predictor_Glue-> in_BRANCH_COMPLETE_PHT_ACK [i])) (*(signal_BRANCH_COMPLETE_PHT_ACK [i]));586 // (*(component_Two_Level_Branch_Predictor_Glue->out_BRANCH_COMPLETE_PHT_ADDRESS [i])) (*(signal_BRANCH_COMPLETE_PHT_ADDRESS [i]));587 // }588 // if (_param._have_bht and _param._have_pht)589 // {590 // (*(component_Two_Level_Branch_Predictor_Glue-> in_BRANCH_COMPLETE_BHT_HISTORY [i])) (*( in_BRANCH_COMPLETE_BHT_HISTORY [i]));591 // }592 // (*(component_Two_Level_Branch_Predictor_Glue->out_BRANCH_COMPLETE_ACK [i])) (*( out_BRANCH_COMPLETE_ACK [i]));593 // (*(component_Two_Level_Branch_Predictor_Glue-> in_BRANCH_COMPLETE_ADDRESS [i])) (*( in_BRANCH_COMPLETE_ADDRESS [i]));594 // }595 596 // log_printf(FUNC,Two_Level_Branch_Predictor,"allocation","End");597 // };598 296 599 297 }; // end namespace two_level_branch_predictor -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_vhdl_body.cpp
r43 r44 21 21 log_printf(FUNC,Two_Level_Branch_Predictor,"vhdl_body","Begin"); 22 22 23 // list<string> list_port_map;24 25 // if (_param._have_bht)26 // {27 // list_port_map.clear();28 29 // vhdl.set_body_component_port_map (list_port_map,"in_CLOCK ","in_CLOCK ");30 // vhdl.set_body_component_port_map (list_port_map,"in_NRESET","in_NRESET");31 32 // for (uint32_t i=0; i<_param._nb_prediction; i++)33 // {34 // vhdl.set_body_component_port_map (list_port_map," in_PREDICT_VAL_"+toString(i)+" "," in_PREDICT_VAL_"+toString(i));35 // vhdl.set_body_component_port_map (list_port_map,"out_PREDICT_ACK_"+toString(i)+" ","signal_PREDICT_BHT_ACK_"+toString(i));36 // vhdl.set_body_component_port_map (list_port_map," in_PREDICT_ADDRESS_"+toString(i)+" ","signal_PREDICT_BHT_ADDRESS_"+toString(i));37 // vhdl.set_body_component_port_map (list_port_map,"out_PREDICT_HISTORY_"+toString(i)+" ","signal_PREDICT_BHT_HISTORY_"+toString(i));38 // }39 40 // for (uint32_t i=0; i<_param._nb_branch_complete; i++)41 // {42 // vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_VAL_"+toString(i)+" "," in_BRANCH_COMPLETE_VAL_"+toString(i));43 // vhdl.set_body_component_port_map (list_port_map,"out_BRANCH_COMPLETE_ACK_"+toString(i)+" ","signal_BRANCH_COMPLETE_BHT_ACK_"+toString(i));44 // vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_ADDRESS_"+toString(i)+" ","signal_BRANCH_COMPLETE_BHT_ADDRESS_"+toString(i));45 // vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_HISTORY_"+toString(i)+" "," in_BRANCH_COMPLETE_BHT_HISTORY_"+toString(i));46 // vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_DIRECTION_"+toString(i)+""," in_BRANCH_COMPLETE_DIRECTION_"+toString(i));47 // }48 49 // vhdl.set_body_component ("component_Branch_History_Table",_name+"_Branch_History_Table",list_port_map);50 // }51 52 // if (_param._have_pht)53 // {54 // list_port_map.clear();55 56 // vhdl.set_body_component_port_map (list_port_map,"in_CLOCK ","in_CLOCK ");57 // vhdl.set_body_component_port_map (list_port_map,"in_NRESET","in_NRESET");58 59 // for (uint32_t i=0; i<_param._nb_prediction; i++)60 // {61 // vhdl.set_body_component_port_map (list_port_map," in_PREDICT_VAL_"+toString(i)+" "," in_PREDICT_VAL_"+toString(i));62 // vhdl.set_body_component_port_map (list_port_map,"out_PREDICT_ACK_"+toString(i)+" ","signal_PREDICT_PHT_ACK_"+toString(i));63 // vhdl.set_body_component_port_map (list_port_map," in_PREDICT_ADDRESS_"+toString(i)+" ","signal_PREDICT_PHT_ADDRESS_"+toString(i));64 // vhdl.set_body_component_port_map (list_port_map,"out_PREDICT_HISTORY_"+toString(i)+" "," out_PREDICT_PHT_HISTORY_"+toString(i));65 // }66 67 // for (uint32_t i=0; i<_param._nb_branch_complete; i++)68 // {69 // vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_VAL_"+toString(i)+" "," in_BRANCH_COMPLETE_VAL_"+toString(i));70 // vhdl.set_body_component_port_map (list_port_map,"out_BRANCH_COMPLETE_ACK_"+toString(i)+" ","signal_BRANCH_COMPLETE_PHT_ACK_"+toString(i));71 // vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_ADDRESS_"+toString(i)+" ","signal_BRANCH_COMPLETE_PHT_ADDRESS_"+toString(i));72 // vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_HISTORY_"+toString(i)+" "," in_BRANCH_COMPLETE_PHT_HISTORY_"+toString(i));73 // vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_DIRECTION_"+toString(i)+""," in_BRANCH_COMPLETE_DIRECTION_"+toString(i));74 // }75 76 // vhdl.set_body_component ("component_Pattern_History_Table",_name+"_Pattern_History_Table",list_port_map);77 // }78 79 // list_port_map.clear();80 81 // for (uint32_t i=0; i<_param._nb_prediction; i++)82 // {83 // if (_param._have_bht)84 // {85 // vhdl.set_body_component_port_map (list_port_map," in_PREDICT_BHT_ACK_"+toString(i)+" ","signal_PREDICT_BHT_ACK_"+toString(i));86 // vhdl.set_body_component_port_map (list_port_map,"out_PREDICT_BHT_ADDRESS_"+toString(i)+" ","signal_PREDICT_BHT_ADDRESS_"+toString(i));87 // }88 // if (_param._have_pht)89 // {90 // vhdl.set_body_component_port_map (list_port_map," in_PREDICT_PHT_ACK_"+toString(i)+" ","signal_PREDICT_PHT_ACK_"+toString(i));91 // vhdl.set_body_component_port_map (list_port_map,"out_PREDICT_PHT_ADDRESS_"+toString(i)+" ","signal_PREDICT_PHT_ADDRESS_"+toString(i));92 // }93 // if (_param._have_bht and _param._have_pht)94 // {95 // vhdl.set_body_component_port_map (list_port_map," in_PREDICT_BHT_HISTORY_"+toString(i)+" ","signal_PREDICT_BHT_HISTORY_"+toString(i));96 // }97 // vhdl.set_body_component_port_map (list_port_map,"out_PREDICT_ACK_"+toString(i)+" "," out_PREDICT_ACK_"+toString(i));98 // vhdl.set_body_component_port_map (list_port_map," in_PREDICT_ADDRESS_"+toString(i)+" "," in_PREDICT_ADDRESS_"+toString(i));99 // }100 101 // for (uint32_t i=0; i<_param._nb_branch_complete; i++)102 // {103 // if (_param._have_bht)104 // {105 // vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_BHT_ACK_"+toString(i)+" ","signal_BRANCH_COMPLETE_BHT_ACK_"+toString(i));106 // vhdl.set_body_component_port_map (list_port_map,"out_BRANCH_COMPLETE_BHT_ADDRESS_"+toString(i)+"","signal_BRANCH_COMPLETE_BHT_ADDRESS_"+toString(i));107 // }108 // if (_param._have_pht)109 // {110 // vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_PHT_ACK_"+toString(i)+" ","signal_BRANCH_COMPLETE_PHT_ACK_"+toString(i));111 // vhdl.set_body_component_port_map (list_port_map,"out_BRANCH_COMPLETE_PHT_ADDRESS_"+toString(i)+"","signal_BRANCH_COMPLETE_PHT_ADDRESS_"+toString(i));112 // }113 // if (_param._have_bht and _param._have_pht)114 // {115 // vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_BHT_HISTORY_"+toString(i)+""," in_BRANCH_COMPLETE_BHT_HISTORY_"+toString(i));116 // }117 // vhdl.set_body_component_port_map (list_port_map,"out_BRANCH_COMPLETE_ACK_"+toString(i)+" "," out_BRANCH_COMPLETE_ACK_"+toString(i));118 // vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_ADDRESS_"+toString(i)+" "," in_BRANCH_COMPLETE_ADDRESS_"+toString(i));119 // }120 121 // vhdl.set_body_component ("component_Two_Level_Branch_Predictor_Glue",_name+"_Two_Level_Branch_Predictor_Glue",list_port_map);122 123 // if (_param._have_bht)124 // for (uint32_t i=0; i<_param._nb_prediction; i++)125 // vhdl.set_body("out_PREDICT_BHT_HISTORY_"+toString(i)+" <= signal_PREDICT_BHT_HISTORY_"+toString(i)+";");126 23 127 24 log_printf(FUNC,Two_Level_Branch_Predictor,"vhdl_body","End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_vhdl_declaration.cpp
r42 r44 21 21 log_printf(FUNC,Two_Level_Branch_Predictor,"vhdl_declaration","Begin"); 22 22 23 for (uint32_t i=0; i<_param._nb_prediction; i++)24 {25 if (_param._have_bht)26 {27 vhdl->set_signal ("signal_PREDICT_BHT_ACK_"+toString(i), 1);28 vhdl->set_signal ("signal_PREDICT_BHT_ADDRESS_"+toString(i), _param._bht_size_address);29 vhdl->set_signal ("signal_PREDICT_BHT_HISTORY_"+toString(i), _param._bht_size_shifter);30 }31 if (_param._have_pht)32 {33 vhdl->set_signal ("signal_PREDICT_PHT_ACK_"+toString(i), 1);34 vhdl->set_signal ("signal_PREDICT_PHT_ADDRESS_"+toString(i), _param._pht_size_address);35 }36 }37 38 for (uint32_t i=0; i<_param._nb_branch_complete; i++)39 {40 if (_param._have_bht)41 {42 vhdl->set_signal ("signal_BRANCH_COMPLETE_BHT_ACK_"+toString(i), 1);43 vhdl->set_signal ("signal_BRANCH_COMPLETE_BHT_ADDRESS_"+toString(i), _param._bht_size_address);44 }45 if (_param._have_pht)46 {47 vhdl->set_signal ("signal_BRANCH_COMPLETE_PHT_ACK_"+toString(i), 1);48 vhdl->set_signal ("signal_BRANCH_COMPLETE_PHT_ADDRESS_"+toString(i), _param._pht_size_address);49 }50 }51 23 log_printf(FUNC,Two_Level_Branch_Predictor,"vhdl_declaration","End"); 52 24 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_vhdl_testbench_transition.cpp
r42 r44 21 21 log_printf(FUNC,Two_Level_Branch_Predictor,"vhdl_testbench_transition","Begin"); 22 22 23 sc_start(0);23 // sc_start(0); 24 24 25 25 _interfaces->testbench(); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/include/Meta_Predictor.h
r15 r44 14 14 15 15 #include <iostream> 16 #include " Include/ToString.h"17 #include " Include/Debug.h"16 #include "Common/include/ToString.h" 17 #include "Common/include/Debug.h" 18 18 19 19 // Internal structure … … 29 29 #include "Behavioural/include/Vhdl.h" 30 30 #endif 31 #ifdef VHDL_TESTBENCH 32 #include "Behavioural/include/Vhdl_Testbench.h" 33 #endif 31 #include "Behavioural/include/Component.h" 34 32 35 33 using namespace std; … … 60 58 #endif 61 59 62 #ifdef VHDL_TESTBENCH 63 private : Vhdl_Testbench * _vhdl_testbench; 64 #endif 60 public : Component * _component; 61 private : Interfaces * _interfaces; 65 62 66 63 #ifdef SYSTEMC … … 155 152 #if VHDL 156 153 public : void vhdl (void); 157 private : void vhdl_port (Vhdl & vhdl); 158 private : void vhdl_declaration (Vhdl & vhdl); 159 private : void vhdl_body (Vhdl & vhdl); 154 private : void vhdl_declaration (Vhdl * & vhdl); 155 private : void vhdl_body (Vhdl * & vhdl); 160 156 #endif 161 162 157 #ifdef VHDL_TESTBENCH 163 private : void vhdl_testbench_port (void);164 158 private : void vhdl_testbench_transition (void); 165 159 #endif 166 public : void vhdl_testbench_label (string label);167 160 }; 168 161 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/include/Parameters.h
r5 r44 9 9 */ 10 10 11 #include " Include/Debug.h"11 #include "Common/include/Debug.h" 12 12 #include "Behavioural/include/Parameters.h" 13 13 #include "Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/include/Parameters.h" -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/include/Statistics.h
r5 r44 10 10 */ 11 11 12 #include " Include/Debug.h"12 #include "Common/include/Debug.h" 13 13 #include "Behavioural/include/Statistics.h" 14 14 #include "Behavioural/include/Parameters_Statistics.h" -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/include/Types.h
r5 r44 9 9 */ 10 10 11 #include " Include/Types.h"11 #include "Common/include/Types.h" 12 12 13 13 namespace morpheo { -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/src/Meta_Predictor.cpp
r5 r44 32 32 log_printf(FUNC,Meta_Predictor,"Meta_Predictor","Begin"); 33 33 34 #ifdef SYSTEMC 35 allocation (); 36 #endif 37 34 38 #ifdef STATISTICS 35 39 // Allocation of statistics … … 37 41 param_statistics , 38 42 param); 39 #endif40 41 #ifdef VHDL_TESTBENCH42 // Creation of a testbench43 // -> port44 // -> clock's signals45 _vhdl_testbench = new Vhdl_Testbench (_name);46 vhdl_testbench_port ();47 _vhdl_testbench->set_clock ("in_CLOCK",true);48 43 #endif 49 44 … … 54 49 55 50 #ifdef SYSTEMC 56 allocation ();57 58 51 #if defined(STATISTICS) or defined(VHDL_TESTBENCH) 59 52 SC_METHOD (transition); … … 73 66 { 74 67 log_printf(FUNC,Meta_Predictor,"~Meta_Predictor","Begin"); 75 76 #ifdef VHDL_TESTBENCH77 // generate the test bench78 _vhdl_testbench->generate_file();79 delete _vhdl_testbench;80 #endif81 68 82 69 #ifdef STATISTICS -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/src/Meta_Predictor_allocation.cpp
r15 r44 18 18 void Meta_Predictor::allocation (void) 19 19 { 20 string rename;21 22 20 log_printf(FUNC,Meta_Predictor,"allocation","Begin"); 23 21 24 in_CLOCK = new SC_CLOCK ("in_CLOCK"); 25 in_NRESET = new SC_IN (Tcontrol_t) ("in_NRESET"); 22 _component = new Component (); 23 24 Entity * entity = _component->set_entity (_name 25 ,"Meta_Predictor" 26 #ifdef POSITION 27 ,MIXTE 28 #endif 29 ); 30 31 _interfaces = entity->set_interfaces(); 32 33 // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 34 { 35 Interface * interface = _interfaces->set_interface("" 36 #ifdef POSITION 37 , IN 38 , SOUTH 39 , "Generalist interface" 40 #endif 41 ); 42 43 in_CLOCK = interface->set_signal_clk ("clock" ,1); 44 in_NRESET = interface->set_signal_in <Tcontrol_t> ("nreset",1,RESET_VHDL_YES); 45 } 46 47 // ~~~~~[ Interface : "predict" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 26 48 27 49 in_PREDICT_VAL = new SC_IN (Tcontrol_t) * [_param._nb_prediction ]; … … 33 55 for (uint32_t i=0; i<_param._nb_prediction; i++) 34 56 { 35 rename = "in_PREDICT_VAL_" +toString(i); 36 in_PREDICT_VAL [i] = new SC_IN (Tcontrol_t) (rename.c_str()); 37 38 rename = "out_PREDICT_ACK_" +toString(i); 39 out_PREDICT_ACK [i] = new SC_OUT(Tcontrol_t) (rename.c_str()); 40 41 rename = "in_PREDICT_ADDRESS_" +toString(i); 42 in_PREDICT_ADDRESS [i] = new SC_IN (Taddress_t) (rename.c_str()); 43 44 rename = "out_PREDICT_HISTORY_" +toString(i); 45 out_PREDICT_HISTORY [i] = new SC_OUT(Thistory_t) (rename.c_str()); 46 47 rename = "out_PREDICT_DIRECTION_" +toString(i); 48 out_PREDICT_DIRECTION [i] = new SC_OUT(Tcontrol_t) (rename.c_str()); 49 } 57 Interface_fifo * interface = _interfaces->set_interface("predict_"+toString(i) 58 #ifdef POSITION 59 , IN 60 , WEST 61 , "Interface Predict" 62 #endif 63 ); 64 65 in_PREDICT_VAL [i] = interface->set_signal_valack_in ("val" , VAL); 66 out_PREDICT_ACK [i] = interface->set_signal_valack_out ("ack" , ACK); 67 in_PREDICT_ADDRESS [i] = interface->set_signal_in <Taddress_t> ("address" , _param._size_address); 68 out_PREDICT_HISTORY [i] = interface->set_signal_out <Thistory_t> ("history" , _param._size_history); 69 out_PREDICT_DIRECTION [i] = interface->set_signal_out <Tcontrol_t> ("direction", 1); 70 } 71 72 // ~~~~~[ Interface : "branch_complete" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 50 73 51 74 in_BRANCH_COMPLETE_VAL = new SC_IN (Tcontrol_t) * [_param._nb_branch_complete]; … … 57 80 for (uint32_t i=0; i<_param._nb_branch_complete; i++) 58 81 { 59 rename = "in_BRANCH_COMPLETE_VAL_" +toString(i); 60 in_BRANCH_COMPLETE_VAL [i] = new SC_IN (Tcontrol_t) (rename.c_str()); 61 62 rename = "out_BRANCH_COMPLETE_ACK_" +toString(i); 63 out_BRANCH_COMPLETE_ACK [i] = new SC_OUT(Tcontrol_t) (rename.c_str()); 64 65 rename = "in_BRANCH_COMPLETE_ADDRESS_" +toString(i); 66 in_BRANCH_COMPLETE_ADDRESS [i] = new SC_IN (Taddress_t) (rename.c_str()); 67 68 rename = "in_BRANCH_COMPLETE_HISTORY_" +toString(i); 69 in_BRANCH_COMPLETE_HISTORY [i] = new SC_IN (Thistory_t) (rename.c_str()); 70 71 rename = "in_BRANCH_COMPLETE_DIRECTION_" +toString(i); 72 in_BRANCH_COMPLETE_DIRECTION [i] = new SC_IN (Tcontrol_t) (rename.c_str()); 73 } 74 75 // ~~~~~[ Signal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 76 77 if (_param._have_meta_predictor) 78 { 79 signal_PREDICT_PREDICTOR_0_ACK = new SC_SIGNAL(Tcontrol_t) * [_param._nb_prediction]; 80 signal_PREDICT_PREDICTOR_1_ACK = new SC_SIGNAL(Tcontrol_t) * [_param._nb_prediction]; 81 } 82 signal_PREDICT_PREDICTOR_2_ACK = new SC_SIGNAL(Tcontrol_t) * [_param._nb_prediction]; 83 84 if (_param._have_meta_predictor) 85 { 86 if (_param._predictor_0_have_bht) 87 signal_PREDICT_PREDICTOR_0_BHT_HISTORY = new SC_SIGNAL(morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor::Tbht_history_t) * [_param._nb_prediction]; 88 if (_param._predictor_0_have_pht) 89 signal_PREDICT_PREDICTOR_0_PHT_HISTORY = new SC_SIGNAL(morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor::Tpht_history_t) * [_param._nb_prediction]; 90 if (_param._predictor_0_have_bht) 91 signal_PREDICT_PREDICTOR_1_BHT_HISTORY = new SC_SIGNAL(morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor::Tbht_history_t) * [_param._nb_prediction]; 92 if (_param._predictor_1_have_pht) 93 signal_PREDICT_PREDICTOR_1_PHT_HISTORY = new SC_SIGNAL(morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor::Tpht_history_t) * [_param._nb_prediction]; 94 } 95 if (_param._predictor_2_have_bht) 96 signal_PREDICT_PREDICTOR_2_BHT_HISTORY = new SC_SIGNAL(morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor::Tbht_history_t) * [_param._nb_prediction]; 97 if (_param._predictor_2_have_pht) 98 signal_PREDICT_PREDICTOR_2_PHT_HISTORY = new SC_SIGNAL(morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor::Tpht_history_t) * [_param._nb_prediction]; 99 100 for (uint32_t i=0; i<_param._nb_prediction; i++) 101 { 102 if (_param._have_meta_predictor) 103 { 104 rename = "signal_PREDICT_PREDICTOR_0_ACK_"+toString(i); 105 signal_PREDICT_PREDICTOR_0_ACK [i] = new SC_SIGNAL(Tcontrol_t) (rename.c_str()); 106 rename = "signal_PREDICT_PREDICTOR_1_ACK_"+toString(i); 107 signal_PREDICT_PREDICTOR_1_ACK [i] = new SC_SIGNAL(Tcontrol_t) (rename.c_str()); 108 } 109 rename = "signal_PREDICT_PREDICTOR_2_ACK_"+toString(i); 110 signal_PREDICT_PREDICTOR_2_ACK [i] = new SC_SIGNAL(Tcontrol_t) (rename.c_str()); 111 112 if (_param._have_meta_predictor) 113 { 114 if (_param._predictor_0_have_bht) 115 { 116 rename = "signal_PREDICT_PREDICTOR_0_BHT_HISTORY_"+toString(i); 117 signal_PREDICT_PREDICTOR_0_BHT_HISTORY [i] = new SC_SIGNAL(morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor::Tbht_history_t) (rename.c_str()); 118 } 119 if (_param._predictor_0_have_pht) 120 { 121 rename = "signal_PREDICT_PREDICTOR_0_PHT_HISTORY_"+toString(i); 122 signal_PREDICT_PREDICTOR_0_PHT_HISTORY [i] = new SC_SIGNAL(morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor::Tpht_history_t) (rename.c_str()); 123 } 124 if (_param._predictor_1_have_bht) 125 { 126 rename = "signal_PREDICT_PREDICTOR_1_BHT_HISTORY_"+toString(i); 127 signal_PREDICT_PREDICTOR_1_BHT_HISTORY [i] = new SC_SIGNAL(morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor::Tbht_history_t) (rename.c_str()); 128 } 129 if (_param._predictor_1_have_pht) 130 { 131 rename = "signal_PREDICT_PREDICTOR_1_PHT_HISTORY_"+toString(i); 132 signal_PREDICT_PREDICTOR_1_PHT_HISTORY [i] = new SC_SIGNAL(morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor::Tpht_history_t) (rename.c_str()); 133 } 134 } 135 if (_param._predictor_2_have_bht) 136 { 137 rename = "signal_PREDICT_PREDICTOR_2_BHT_HISTORY_"+toString(i); 138 signal_PREDICT_PREDICTOR_2_BHT_HISTORY [i] = new SC_SIGNAL(morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor::Tbht_history_t) (rename.c_str()); 139 } 140 if (_param._predictor_2_have_pht) 141 { 142 rename = "signal_PREDICT_PREDICTOR_2_PHT_HISTORY_"+toString(i); 143 signal_PREDICT_PREDICTOR_2_PHT_HISTORY [i] = new SC_SIGNAL(morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor::Tpht_history_t) (rename.c_str()); 144 } 145 } 146 if (_param._have_meta_predictor) 147 { 148 signal_BRANCH_COMPLETE_PREDICTOR_0_ACK = new SC_SIGNAL(Tcontrol_t) * [_param._nb_prediction]; 149 signal_BRANCH_COMPLETE_PREDICTOR_1_ACK = new SC_SIGNAL(Tcontrol_t) * [_param._nb_prediction]; 150 signal_BRANCH_COMPLETE_PREDICTOR_2_VAL = new SC_SIGNAL(Tcontrol_t) * [_param._nb_prediction]; 151 signal_BRANCH_COMPLETE_PREDICTOR_2_DIRECTION = new SC_SIGNAL(Tcontrol_t) * [_param._nb_prediction]; 152 } 153 signal_BRANCH_COMPLETE_PREDICTOR_2_ACK = new SC_SIGNAL(Tcontrol_t) * [_param._nb_prediction]; 154 155 if (_param._have_meta_predictor) 156 { 157 if (_param._predictor_0_have_bht) 158 signal_BRANCH_COMPLETE_PREDICTOR_0_BHT_HISTORY = new SC_SIGNAL(morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor::Tbht_history_t) * [_param._nb_prediction]; 159 if (_param._predictor_0_have_pht) 160 signal_BRANCH_COMPLETE_PREDICTOR_0_PHT_HISTORY = new SC_SIGNAL(morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor::Tpht_history_t) * [_param._nb_prediction]; 161 if (_param._predictor_0_have_bht) 162 signal_BRANCH_COMPLETE_PREDICTOR_1_BHT_HISTORY = new SC_SIGNAL(morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor::Tbht_history_t) * [_param._nb_prediction]; 163 if (_param._predictor_1_have_pht) 164 signal_BRANCH_COMPLETE_PREDICTOR_1_PHT_HISTORY = new SC_SIGNAL(morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor::Tpht_history_t) * [_param._nb_prediction]; 165 } 166 if (_param._predictor_2_have_bht) 167 signal_BRANCH_COMPLETE_PREDICTOR_2_BHT_HISTORY = new SC_SIGNAL(morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor::Tbht_history_t) * [_param._nb_prediction]; 168 if (_param._predictor_2_have_pht) 169 signal_BRANCH_COMPLETE_PREDICTOR_2_PHT_HISTORY = new SC_SIGNAL(morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor::Tpht_history_t) * [_param._nb_prediction]; 170 171 for (uint32_t i=0; i<_param._nb_branch_complete; i++) 172 { 173 if (_param._have_meta_predictor) 174 { 175 rename = "signal_BRANCH_COMPLETE_PREDICTOR_0_ACK_"+toString(i); 176 signal_BRANCH_COMPLETE_PREDICTOR_0_ACK [i] = new SC_SIGNAL(Tcontrol_t) (rename.c_str()); 177 rename = "signal_BRANCH_COMPLETE_PREDICTOR_1_ACK_"+toString(i); 178 signal_BRANCH_COMPLETE_PREDICTOR_1_ACK [i] = new SC_SIGNAL(Tcontrol_t) (rename.c_str()); 179 rename = "signal_BRANCH_COMPLETE_PREDICTOR_2_VAL_"+toString(i); 180 signal_BRANCH_COMPLETE_PREDICTOR_2_VAL [i] = new SC_SIGNAL(Tcontrol_t) (rename.c_str()); 181 rename = "signal_BRANCH_COMPLETE_PREDICTOR_2_DIRECTION_"+toString(i); 182 signal_BRANCH_COMPLETE_PREDICTOR_2_DIRECTION [i] = new SC_SIGNAL(Tcontrol_t) (rename.c_str()); 183 } 184 rename = "signal_BRANCH_COMPLETE_PREDICTOR_2_ACK_"+toString(i); 185 signal_BRANCH_COMPLETE_PREDICTOR_2_ACK [i] = new SC_SIGNAL(Tcontrol_t) (rename.c_str()); 186 187 if (_param._have_meta_predictor) 188 { 189 if (_param._predictor_0_have_bht) 190 { 191 rename = "signal_BRANCH_COMPLETE_PREDICTOR_0_BHT_HISTORY_"+toString(i); 192 signal_BRANCH_COMPLETE_PREDICTOR_0_BHT_HISTORY [i] = new SC_SIGNAL(morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor::Tbht_history_t) (rename.c_str()); 193 } 194 if (_param._predictor_0_have_pht) 195 { 196 rename = "signal_BRANCH_COMPLETE_PREDICTOR_0_PHT_HISTORY_"+toString(i); 197 signal_BRANCH_COMPLETE_PREDICTOR_0_PHT_HISTORY [i] = new SC_SIGNAL(morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor::Tpht_history_t) (rename.c_str()); 198 } 199 if (_param._predictor_1_have_bht) 200 { 201 rename = "signal_BRANCH_COMPLETE_PREDICTOR_1_BHT_HISTORY_"+toString(i); 202 signal_BRANCH_COMPLETE_PREDICTOR_1_BHT_HISTORY [i] = new SC_SIGNAL(morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor::Tbht_history_t) (rename.c_str()); 203 } 204 if (_param._predictor_1_have_pht) 205 { 206 rename = "signal_BRANCH_COMPLETE_PREDICTOR_1_PHT_HISTORY_"+toString(i); 207 signal_BRANCH_COMPLETE_PREDICTOR_1_PHT_HISTORY [i] = new SC_SIGNAL(morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor::Tpht_history_t) (rename.c_str()); 208 } 209 } 210 if (_param._predictor_2_have_bht) 211 { 212 rename = "signal_BRANCH_COMPLETE_PREDICTOR_2_BHT_HISTORY_"+toString(i); 213 signal_BRANCH_COMPLETE_PREDICTOR_2_BHT_HISTORY [i] = new SC_SIGNAL(morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor::Tbht_history_t) (rename.c_str()); 214 } 215 if (_param._predictor_2_have_pht) 216 { 217 rename = "signal_BRANCH_COMPLETE_PREDICTOR_2_PHT_HISTORY_"+toString(i); 218 signal_BRANCH_COMPLETE_PREDICTOR_2_PHT_HISTORY [i] = new SC_SIGNAL(morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor::Tpht_history_t) (rename.c_str()); 219 } 82 Interface_fifo * interface = _interfaces->set_interface("branch_complete_"+toString(i) 83 #ifdef POSITION 84 , IN 85 , EAST 86 , "Interface branch complete" 87 #endif 88 ); 89 90 in_BRANCH_COMPLETE_VAL [i] = interface->set_signal_valack_in ("val" , VAL); 91 out_BRANCH_COMPLETE_ACK [i] = interface->set_signal_valack_out ("ack" , ACK); 92 in_BRANCH_COMPLETE_ADDRESS [i] = interface->set_signal_in <Taddress_t> ("address" , _param._size_address); 93 in_BRANCH_COMPLETE_HISTORY [i] = interface->set_signal_in <Thistory_t> ("history" , _param._size_history); 94 in_BRANCH_COMPLETE_DIRECTION [i] = interface->set_signal_in <Tcontrol_t> ("direction" , 1); 220 95 } 221 96 … … 231 106 component_Meta_Predictor_Glue = new morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::meta_predictor_glue::Meta_Predictor_Glue (name_component.c_str() , 232 107 #ifdef STATISTICS 233 _param_statistics , 234 #endif 235 *(_param._param_meta_predictor_glue)); 236 237 // Instantiation 238 #if defined(STATISTICS) or defined(VHDL_TESTBENCH) 239 (*(component_Meta_Predictor_Glue->in_CLOCK )) (*(in_CLOCK )); 240 #endif 241 242 // Interface Predict 108 _param_statistics , 109 #endif 110 *(_param._param_meta_predictor_glue)); 111 112 113 _component->set_component (component_Meta_Predictor_Glue->_component 114 #ifdef POSITION 115 , 75 116 , 25 117 , 10 118 , 10 119 #endif 120 ); 121 122 123 // =====[ component_Two_Level_Branch_Predictor_2 ]==================== 124 125 name_component = _name+"_Two_Level_Branch_Predictor_2"; 126 127 log_printf(INFO,Meta_Predictor,"allocation","Allocation : %s",name_component.c_str()); 128 129 component_Two_Level_Branch_Predictor_2 = new morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor ::Two_Level_Branch_Predictor (name_component.c_str() , 130 #ifdef STATISTICS 131 _param_statistics , 132 #endif 133 *(_param._param_two_level_branch_predictor_2)); 134 135 136 _component->set_component (component_Two_Level_Branch_Predictor_2->_component 137 #ifdef POSITION 138 , 75 139 , 25 140 , 10 141 , 10 142 #endif 143 ); 144 145 146 147 if (_param._have_meta_predictor) 148 { 149 // =====[ component_Two_Level_Branch_Predictor_1 ]==================== 150 151 name_component = _name+"_Two_Level_Branch_Predictor_1"; 152 153 log_printf(INFO,Meta_Predictor,"allocation","Allocation : %s",name_component.c_str()); 154 155 component_Two_Level_Branch_Predictor_1 = new morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor ::Two_Level_Branch_Predictor (name_component.c_str() , 156 #ifdef STATISTICS 157 _param_statistics , 158 #endif 159 *(_param._param_two_level_branch_predictor_1)); 160 161 _component->set_component (component_Two_Level_Branch_Predictor_1->_component 162 #ifdef POSITION 163 , 75 164 , 25 165 , 10 166 , 10 167 #endif 168 ); 169 170 // =====[ component_Two_Level_Branch_Predictor_0 ]==================== 171 172 name_component = _name+"_Two_Level_Branch_Predictor_0"; 173 174 log_printf(INFO,Meta_Predictor,"allocation","Allocation : %s",name_component.c_str()); 175 176 component_Two_Level_Branch_Predictor_0 = new morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor ::Two_Level_Branch_Predictor (name_component.c_str() , 177 #ifdef STATISTICS 178 _param_statistics , 179 #endif 180 *(_param._param_two_level_branch_predictor_0)); 181 182 _component->set_component (component_Two_Level_Branch_Predictor_0->_component 183 #ifdef POSITION 184 , 75 185 , 25 186 , 10 187 , 10 188 #endif 189 ); 190 191 } 192 193 // ~~~~~[ Component - Instanciation ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 194 195 // =====[ component_Meta_Predictor_Glue - Instanciation ]============= 196 197 name_component = _name+"_Meta_Predictor_Glue"; 198 199 cout << "Instance : " << name_component << endl; 200 201 #ifdef POSITION 202 _component->interface_map ("Meta_Predictor_Glue","", 203 _name ,""); 204 #endif 205 206 _component->port_map(name_component, "in_CLOCK" , _name,"in_CLOCK" ); 207 _component->port_map(name_component, "in_NRESET", _name,"in_NRESET"); 208 209 // Interface Predict 243 210 for (uint32_t i=0; i<_param._nb_prediction; i++) 244 211 { 212 #ifdef POSITION 213 _component->interface_map ("Meta_Predictor_Glue","predict_"+toString(i), 214 _name ,"predict_"+toString(i)); 215 #endif 216 245 217 if (_param._have_meta_predictor) 246 218 { 247 (*(component_Meta_Predictor_Glue-> in_PREDICT_PREDICTOR_0_ACK [i])) (*(signal_PREDICT_PREDICTOR_0_ACK [i]));248 (*(component_Meta_Predictor_Glue-> in_PREDICT_PREDICTOR_1_ACK [i])) (*(signal_PREDICT_PREDICTOR_1_ACK [i]));249 } 250 (*(component_Meta_Predictor_Glue-> in_PREDICT_PREDICTOR_2_ACK [i])) (*(signal_PREDICT_PREDICTOR_2_ACK [i]));251 (*(component_Meta_Predictor_Glue->out_PREDICT_ACK [i])) (*( out_PREDICT_ACK [i]));219 _component->port_map(name_component, "in_PREDICT_"+toString(i)+"_PREDICTOR_0_ACK" , _name+"_Two_Level_Branch_Predictor_0" ,"out_PREDICT_"+toString(i)+"_ACK"); 220 _component->port_map(name_component, "in_PREDICT_"+toString(i)+"_PREDICTOR_1_ACK" , _name+"_Two_Level_Branch_Predictor_1" ,"out_PREDICT_"+toString(i)+"_ACK"); 221 } 222 _component->port_map(name_component, "in_PREDICT_"+toString(i)+"_PREDICTOR_2_ACK" , _name+"_Two_Level_Branch_Predictor_2" ,"out_PREDICT_"+toString(i)+"_ACK"); 223 _component->port_map(name_component, "out_PREDICT_"+toString(i)+"_ACK" , _name , "out_PREDICT_"+toString(i)+"_ACK"); 252 224 if (_param._have_meta_predictor) 253 { 225 { 254 226 if (_param._predictor_0_have_bht) 255 (*(component_Meta_Predictor_Glue-> in_PREDICT_PREDICTOR_0_BHT_HISTORY [i])) (*(signal_PREDICT_PREDICTOR_0_BHT_HISTORY [i]));227 _component->port_map(name_component, "in_PREDICT_"+toString(i)+"_PREDICTOR_0_BHT_HISTORY", _name+"_Two_Level_Branch_Predictor_0" ,"out_PREDICT_"+toString(i)+"_BHT_HISTORY"); 256 228 if (_param._predictor_0_have_pht) 257 (*(component_Meta_Predictor_Glue-> in_PREDICT_PREDICTOR_0_PHT_HISTORY [i])) (*(signal_PREDICT_PREDICTOR_0_PHT_HISTORY [i]));229 _component->port_map(name_component, "in_PREDICT_"+toString(i)+"_PREDICTOR_0_PHT_HISTORY", _name+"_Two_Level_Branch_Predictor_0" ,"out_PREDICT_"+toString(i)+"_PHT_HISTORY"); 258 230 if (_param._predictor_1_have_bht) 259 (*(component_Meta_Predictor_Glue-> in_PREDICT_PREDICTOR_1_BHT_HISTORY [i])) (*(signal_PREDICT_PREDICTOR_1_BHT_HISTORY [i]));231 _component->port_map(name_component, "in_PREDICT_"+toString(i)+"_PREDICTOR_1_BHT_HISTORY", _name+"_Two_Level_Branch_Predictor_1" ,"out_PREDICT_"+toString(i)+"_BHT_HISTORY"); 260 232 if (_param._predictor_1_have_pht) 261 (*(component_Meta_Predictor_Glue-> in_PREDICT_PREDICTOR_1_PHT_HISTORY [i])) (*(signal_PREDICT_PREDICTOR_1_PHT_HISTORY [i]));262 } 233 _component->port_map(name_component, "in_PREDICT_"+toString(i)+"_PREDICTOR_1_PHT_HISTORY", _name+"_Two_Level_Branch_Predictor_1" ,"out_PREDICT_"+toString(i)+"_PHT_HISTORY"); 234 } 263 235 if (_param._predictor_2_have_bht) 264 (*(component_Meta_Predictor_Glue-> in_PREDICT_PREDICTOR_2_BHT_HISTORY [i])) (*(signal_PREDICT_PREDICTOR_2_BHT_HISTORY [i]));236 _component->port_map(name_component, "in_PREDICT_"+toString(i)+"_PREDICTOR_2_BHT_HISTORY", _name+"_Two_Level_Branch_Predictor_2" ,"out_PREDICT_"+toString(i)+"_BHT_HISTORY"); 265 237 if (_param._predictor_2_have_pht) 266 (*(component_Meta_Predictor_Glue-> in_PREDICT_PREDICTOR_2_PHT_HISTORY [i])) (*(signal_PREDICT_PREDICTOR_2_PHT_HISTORY [i])); 267 (*(component_Meta_Predictor_Glue->out_PREDICT_HISTORY [i])) (*( out_PREDICT_HISTORY [i])); 268 (*(component_Meta_Predictor_Glue->out_PREDICT_DIRECTION [i])) (*( out_PREDICT_DIRECTION [i])); 269 } 270 271 // Interface Branch_complete 272 238 _component->port_map(name_component, "in_PREDICT_"+toString(i)+"_PREDICTOR_2_PHT_HISTORY", _name+"_Two_Level_Branch_Predictor_2" ,"out_PREDICT_"+toString(i)+"_PHT_HISTORY"); 239 _component->port_map(name_component, "out_PREDICT_"+toString(i)+"_HISTORY" , _name , "out_PREDICT_"+toString(i)+"_HISTORY"); 240 _component->port_map(name_component, "out_PREDICT_"+toString(i)+"_DIRECTION" , _name , "out_PREDICT_"+toString(i)+"_DIRECTION"); 241 } 242 273 243 for (uint32_t i=0; i<_param._nb_branch_complete; i++) 274 244 { 245 #ifdef POSITION 246 _component->interface_map ("Meta_Predictor_Glue","branch_complete_"+toString(i), 247 _name ,"branch_complete_"+toString(i)); 248 #endif 249 275 250 if (_param._have_meta_predictor) 276 251 { 277 (*(component_Meta_Predictor_Glue-> in_BRANCH_COMPLETE_VAL [i])) (*( in_BRANCH_COMPLETE_VAL [i]));278 (*(component_Meta_Predictor_Glue->out_BRANCH_COMPLETE_PREDICTOR_2_VAL [i])) (*(signal_BRANCH_COMPLETE_PREDICTOR_2_VAL [i]));279 280 (*(component_Meta_Predictor_Glue-> in_BRANCH_COMPLETE_PREDICTOR_0_ACK [i])) (*(signal_BRANCH_COMPLETE_PREDICTOR_0_ACK [i]));281 (*(component_Meta_Predictor_Glue-> in_BRANCH_COMPLETE_PREDICTOR_1_ACK [i])) (*(signal_BRANCH_COMPLETE_PREDICTOR_1_ACK [i]));252 _component->port_map(name_component, "in_BRANCH_COMPLETE_"+toString(i)+"_VAL" , _name , "in_BRANCH_COMPLETE_"+toString(i)+"_VAL"); 253 _component->port_map(name_component, "out_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_2_VAL" , _name+"_Two_Level_Branch_Predictor_2", "in_BRANCH_COMPLETE_"+toString(i)+"_VAL"); 254 255 _component->port_map(name_component, "in_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_0_ACK" , _name+"_Two_Level_Branch_Predictor_0", "out_BRANCH_COMPLETE_"+toString(i)+"_ACK"); 256 _component->port_map(name_component, "in_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_1_ACK" , _name+"_Two_Level_Branch_Predictor_1", "out_BRANCH_COMPLETE_"+toString(i)+"_ACK"); 282 257 } 283 (*(component_Meta_Predictor_Glue-> in_BRANCH_COMPLETE_PREDICTOR_2_ACK [i])) (*(signal_BRANCH_COMPLETE_PREDICTOR_2_ACK [i]));284 (*(component_Meta_Predictor_Glue->out_BRANCH_COMPLETE_ACK [i])) (*( out_BRANCH_COMPLETE_ACK [i]));258 _component->port_map(name_component, "in_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_2_ACK" , _name+"_Two_Level_Branch_Predictor_2", "out_BRANCH_COMPLETE_"+toString(i)+"_ACK"); 259 _component->port_map(name_component, "out_BRANCH_COMPLETE_"+toString(i)+"_ACK" , _name ,"out_BRANCH_COMPLETE_"+toString(i)+"_ACK"); 285 260 286 261 if (_param._have_meta_predictor) 287 262 { 288 263 if (_param._predictor_0_have_bht) 289 (*(component_Meta_Predictor_Glue->out_BRANCH_COMPLETE_PREDICTOR_0_BHT_HISTORY [i])) (*(signal_BRANCH_COMPLETE_PREDICTOR_0_BHT_HISTORY [i]));264 _component->port_map(name_component, "out_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_0_BHT_HISTORY" , _name+"_Two_Level_Branch_Predictor_0", "in_BRANCH_COMPLETE_"+toString(i)+"_BHT_HISTORY" ); 290 265 if (_param._predictor_0_have_pht) 291 (*(component_Meta_Predictor_Glue->out_BRANCH_COMPLETE_PREDICTOR_0_PHT_HISTORY [i])) (*(signal_BRANCH_COMPLETE_PREDICTOR_0_PHT_HISTORY [i]));266 _component->port_map(name_component, "out_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_0_PHT_HISTORY" , _name+"_Two_Level_Branch_Predictor_0", "in_BRANCH_COMPLETE_"+toString(i)+"_PHT_HISTORY" ); 292 267 if (_param._predictor_1_have_bht) 293 (*(component_Meta_Predictor_Glue->out_BRANCH_COMPLETE_PREDICTOR_1_BHT_HISTORY [i])) (*(signal_BRANCH_COMPLETE_PREDICTOR_1_BHT_HISTORY [i]));268 _component->port_map(name_component, "out_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_1_BHT_HISTORY" , _name+"_Two_Level_Branch_Predictor_1", "in_BRANCH_COMPLETE_"+toString(i)+"_BHT_HISTORY" ); 294 269 if (_param._predictor_1_have_pht) 295 (*(component_Meta_Predictor_Glue->out_BRANCH_COMPLETE_PREDICTOR_1_PHT_HISTORY [i])) (*(signal_BRANCH_COMPLETE_PREDICTOR_1_PHT_HISTORY [i]));270 _component->port_map(name_component, "out_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_1_PHT_HISTORY" , _name+"_Two_Level_Branch_Predictor_1", "in_BRANCH_COMPLETE_"+toString(i)+"_PHT_HISTORY" ); 296 271 } 297 272 if (_param._predictor_2_have_bht) 298 (*(component_Meta_Predictor_Glue->out_BRANCH_COMPLETE_PREDICTOR_2_BHT_HISTORY [i])) (*(signal_BRANCH_COMPLETE_PREDICTOR_2_BHT_HISTORY [i]));273 _component->port_map(name_component, "out_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_2_BHT_HISTORY" , _name+"_Two_Level_Branch_Predictor_2", "in_BRANCH_COMPLETE_"+toString(i)+"_BHT_HISTORY" ); 299 274 if (_param._predictor_2_have_pht) 300 (*(component_Meta_Predictor_Glue->out_BRANCH_COMPLETE_PREDICTOR_2_PHT_HISTORY [i])) (*(signal_BRANCH_COMPLETE_PREDICTOR_2_PHT_HISTORY [i]));301 (*(component_Meta_Predictor_Glue-> in_BRANCH_COMPLETE_HISTORY [i])) (*( in_BRANCH_COMPLETE_HISTORY [i]));275 _component->port_map(name_component, "out_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_2_PHT_HISTORY" , _name+"_Two_Level_Branch_Predictor_2", "in_BRANCH_COMPLETE_"+toString(i)+"_PHT_HISTORY" ); 276 _component->port_map(name_component, "in_BRANCH_COMPLETE_"+toString(i)+"_HISTORY" , _name , "in_BRANCH_COMPLETE_"+toString(i)+"_HISTORY"); 302 277 if (_param._have_meta_predictor) 303 278 { 304 (*(component_Meta_Predictor_Glue-> in_BRANCH_COMPLETE_DIRECTION [i])) (*( in_BRANCH_COMPLETE_DIRECTION [i]));305 (*(component_Meta_Predictor_Glue->out_BRANCH_COMPLETE_PREDICTOR_2_DIRECTION [i])) (*(signal_BRANCH_COMPLETE_PREDICTOR_2_DIRECTION [i]));279 _component->port_map(name_component, "in_BRANCH_COMPLETE_"+toString(i)+"_DIRECTION" , _name , "in_BRANCH_COMPLETE_"+toString(i)+"_DIRECTION"); 280 _component->port_map(name_component, "out_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_2_DIRECTION" , _name+"_Two_Level_Branch_Predictor_2" , "in_BRANCH_COMPLETE_"+toString(i)+"_DIRECTION"); 306 281 } 307 282 } 308 283 309 // =====[ component_Two_Level_Branch_Predictor_2 ]==================== 310 284 // =====[ component_Two_Level_Branch_Predictor_2 - Instanciation ]==== 311 285 name_component = _name+"_Two_Level_Branch_Predictor_2"; 312 313 log_printf(INFO,Meta_Predictor,"allocation","Allocation : %s",name_component.c_str()); 314 315 component_Two_Level_Branch_Predictor_2 = new morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor ::Two_Level_Branch_Predictor (name_component.c_str() , 316 #ifdef STATISTICS 317 _param_statistics , 318 #endif 319 *(_param._param_two_level_branch_predictor_2)); 320 321 // Instantiation 322 (*(component_Two_Level_Branch_Predictor_2->in_CLOCK )) (*(in_CLOCK )); 323 (*(component_Two_Level_Branch_Predictor_2->in_NRESET)) (*(in_NRESET)); 324 286 287 cout << "Instance : " << name_component << endl; 288 289 #ifdef POSITION 290 _component->interface_map ("Two_Level_Branch_Predictor_2","", 291 _name ,""); 292 #endif 293 294 _component->port_map(name_component, "in_CLOCK" , _name,"in_CLOCK" ); 295 _component->port_map(name_component, "in_NRESET", _name,"in_NRESET"); 296 325 297 for (uint32_t i=0; i<_param._nb_prediction; i++) 326 298 { 327 (*(component_Two_Level_Branch_Predictor_2-> in_PREDICT_VAL [i])) (*( in_PREDICT_VAL [i])); 328 (*(component_Two_Level_Branch_Predictor_2->out_PREDICT_ACK [i])) (*(signal_PREDICT_PREDICTOR_2_ACK [i])); 329 (*(component_Two_Level_Branch_Predictor_2-> in_PREDICT_ADDRESS [i])) (*( in_PREDICT_ADDRESS [i])); 330 if (_param._predictor_2_have_bht) 331 (*(component_Two_Level_Branch_Predictor_2->out_PREDICT_BHT_HISTORY [i])) (*(signal_PREDICT_PREDICTOR_2_BHT_HISTORY [i])); 299 #ifdef POSITION 300 _component->interface_map ("Two_Level_Branch_Predictor_2","predict_"+toString(i), 301 _name ,"predict_"+toString(i)); 302 #endif 303 304 _component->port_map(name_component, "in_PREDICT_"+toString(i)+"_VAL" , _name, "in_PREDICT_"+toString(i)+"_VAL"); 305 _component->port_map(name_component,"out_PREDICT_"+toString(i)+"_ACK" , _name+"_Meta_Predictor_Glue", "in_PREDICT_"+toString(i)+"_PREDICTOR_2_ACK"); 306 _component->port_map(name_component, "in_PREDICT_"+toString(i)+"_ADDRESS" , _name, "in_PREDICT_"+toString(i)+"_ADDRESS"); 307 if (_param._predictor_2_have_bht) 308 _component->port_map(name_component,"out_PREDICT_"+toString(i)+"_BHT_HISTORY" , _name+"_Meta_Predictor_Glue", "in_PREDICT_"+toString(i)+"_PREDICTOR_2_BHT_HISTORY"); 332 309 if (_param._predictor_2_have_pht) 333 (*(component_Two_Level_Branch_Predictor_2->out_PREDICT_PHT_HISTORY [i])) (*(signal_PREDICT_PREDICTOR_2_PHT_HISTORY [i]));310 _component->port_map(name_component,"out_PREDICT_"+toString(i)+"_PHT_HISTORY" , _name+"_Meta_Predictor_Glue", "in_PREDICT_"+toString(i)+"_PREDICTOR_2_PHT_HISTORY"); 334 311 } 335 312 336 313 for (uint32_t i=0; i<_param._nb_branch_complete; i++) 337 314 { 315 #ifdef POSITION 316 _component->interface_map ("Two_Level_Branch_Predictor_2","branch_complete_"+toString(i), 317 _name ,"branch_complete_"+toString(i)); 318 #endif 338 319 if (_param._have_meta_predictor) 339 (*(component_Two_Level_Branch_Predictor_2-> in_BRANCH_COMPLETE_VAL [i])) (*(signal_BRANCH_COMPLETE_PREDICTOR_2_VAL [i]));320 _component->port_map(name_component, "in_BRANCH_COMPLETE_"+toString(i)+"_VAL" , _name+"_Meta_Predictor_Glue","out_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_2_VAL" ); 340 321 else 341 (*(component_Two_Level_Branch_Predictor_2-> in_BRANCH_COMPLETE_VAL [i])) (*( in_BRANCH_COMPLETE_VAL [i]));342 (*(component_Two_Level_Branch_Predictor_2->out_BRANCH_COMPLETE_ACK [i])) (*(signal_BRANCH_COMPLETE_PREDICTOR_2_ACK [i]));343 (*(component_Two_Level_Branch_Predictor_2-> in_BRANCH_COMPLETE_ADDRESS [i])) (*( in_BRANCH_COMPLETE_ADDRESS [i]));322 _component->port_map(name_component, "in_BRANCH_COMPLETE_"+toString(i)+"_VAL" , _name, "in_BRANCH_COMPLETE_"+toString(i)+"_VAL" ); 323 _component->port_map(name_component,"out_BRANCH_COMPLETE_"+toString(i)+"_ACK" , _name+"_Meta_Predictor_Glue", "in_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_2_ACK" ); 324 _component->port_map(name_component, "in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS" , _name, "in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS" ); 344 325 if (_param._predictor_2_have_bht) 345 (*(component_Two_Level_Branch_Predictor_2-> in_BRANCH_COMPLETE_BHT_HISTORY [i])) (*(signal_BRANCH_COMPLETE_PREDICTOR_2_BHT_HISTORY [i]));326 _component->port_map(name_component, "in_BRANCH_COMPLETE_"+toString(i)+"_BHT_HISTORY" , _name+"_Meta_Predictor_Glue","out_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_2_BHT_HISTORY" ); 346 327 if (_param._predictor_2_have_pht) 347 (*(component_Two_Level_Branch_Predictor_2-> in_BRANCH_COMPLETE_PHT_HISTORY [i])) (*(signal_BRANCH_COMPLETE_PREDICTOR_2_PHT_HISTORY [i]));328 _component->port_map(name_component, "in_BRANCH_COMPLETE_"+toString(i)+"_PHT_HISTORY" , _name+"_Meta_Predictor_Glue","out_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_2_PHT_HISTORY" ); 348 329 if (_param._have_meta_predictor) 349 (*(component_Two_Level_Branch_Predictor_2-> in_BRANCH_COMPLETE_DIRECTION [i])) (*(signal_BRANCH_COMPLETE_PREDICTOR_2_DIRECTION [i]));330 _component->port_map(name_component, "in_BRANCH_COMPLETE_"+toString(i)+"_DIRECTION" , _name+"_Meta_Predictor_Glue","out_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_2_DIRECTION" ); 350 331 else 351 (*(component_Two_Level_Branch_Predictor_2-> in_BRANCH_COMPLETE_DIRECTION [i])) (*( in_BRANCH_COMPLETE_DIRECTION [i]));332 _component->port_map(name_component, "in_BRANCH_COMPLETE_"+toString(i)+"_DIRECTION" , _name, "in_BRANCH_COMPLETE_"+toString(i)+"_DIRECTION" ); 352 333 } 353 334 354 335 if (_param._have_meta_predictor) 355 336 { 356 // =====[ component_Two_Level_Branch_Predictor_1 ]====================337 // =====[ component_Two_Level_Branch_Predictor_1 - Instanciation ]==== 357 338 358 339 name_component = _name+"_Two_Level_Branch_Predictor_1"; 359 360 log_printf(INFO,Meta_Predictor,"allocation","Allocation : %s",name_component.c_str()); 361 362 component_Two_Level_Branch_Predictor_1 = new morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor ::Two_Level_Branch_Predictor (name_component.c_str() , 363 #ifdef STATISTICS 364 _param_statistics , 365 #endif 366 *(_param._param_two_level_branch_predictor_1)); 367 368 // Instantiation 369 (*(component_Two_Level_Branch_Predictor_1->in_CLOCK )) (*(in_CLOCK )); 370 (*(component_Two_Level_Branch_Predictor_1->in_NRESET)) (*(in_NRESET)); 371 340 341 cout << "Instance : " << name_component << endl; 342 343 #ifdef POSITION 344 _component->interface_map ("Two_Level_Branch_Predictor_1","", 345 _name ,""); 346 #endif 347 348 _component->port_map(name_component, "in_CLOCK" , _name,"in_CLOCK" ); 349 _component->port_map(name_component, "in_NRESET", _name,"in_NRESET"); 350 372 351 for (uint32_t i=0; i<_param._nb_prediction; i++) 373 352 { 374 (*(component_Two_Level_Branch_Predictor_1-> in_PREDICT_VAL [i])) (*( in_PREDICT_VAL [i])); 375 (*(component_Two_Level_Branch_Predictor_1->out_PREDICT_ACK [i])) (*(signal_PREDICT_PREDICTOR_1_ACK [i])); 376 (*(component_Two_Level_Branch_Predictor_1-> in_PREDICT_ADDRESS [i])) (*( in_PREDICT_ADDRESS [i])); 377 if (_param._predictor_1_have_bht) 378 (*(component_Two_Level_Branch_Predictor_1->out_PREDICT_BHT_HISTORY [i])) (*(signal_PREDICT_PREDICTOR_1_BHT_HISTORY [i])); 353 #ifdef POSITION 354 _component->interface_map ("Two_Level_Branch_Predictor_1","predict_"+toString(i), 355 _name ,"predict_"+toString(i)); 356 #endif 357 358 _component->port_map(name_component, "in_PREDICT_"+toString(i)+"_VAL" , _name, "in_PREDICT_"+toString(i)+"_VAL"); 359 _component->port_map(name_component,"out_PREDICT_"+toString(i)+"_ACK" , _name+"_Meta_Predictor_Glue", "in_PREDICT_"+toString(i)+"_PREDICTOR_1_ACK"); 360 _component->port_map(name_component, "in_PREDICT_"+toString(i)+"_ADDRESS" , _name, "in_PREDICT_"+toString(i)+"_ADDRESS"); 361 if (_param._predictor_1_have_bht) 362 _component->port_map(name_component,"out_PREDICT_"+toString(i)+"_BHT_HISTORY" , _name+"_Meta_Predictor_Glue", "in_PREDICT_"+toString(i)+"_PREDICTOR_1_BHT_HISTORY"); 379 363 if (_param._predictor_1_have_pht) 380 (*(component_Two_Level_Branch_Predictor_1->out_PREDICT_PHT_HISTORY [i])) (*(signal_PREDICT_PREDICTOR_1_PHT_HISTORY [i]));364 _component->port_map(name_component,"out_PREDICT_"+toString(i)+"_PHT_HISTORY" , _name+"_Meta_Predictor_Glue", "in_PREDICT_"+toString(i)+"_PREDICTOR_1_PHT_HISTORY"); 381 365 } 382 366 383 367 for (uint32_t i=0; i<_param._nb_branch_complete; i++) 384 368 { 385 (*(component_Two_Level_Branch_Predictor_1-> in_BRANCH_COMPLETE_VAL [i])) (*( in_BRANCH_COMPLETE_VAL [i])); 386 (*(component_Two_Level_Branch_Predictor_1->out_BRANCH_COMPLETE_ACK [i])) (*(signal_BRANCH_COMPLETE_PREDICTOR_1_ACK [i])); 387 (*(component_Two_Level_Branch_Predictor_1-> in_BRANCH_COMPLETE_ADDRESS [i])) (*( in_BRANCH_COMPLETE_ADDRESS [i])); 369 #ifdef POSITION 370 _component->interface_map ("Two_Level_Branch_Predictor_1","branch_complete_"+toString(i), 371 _name ,"branch_complete_"+toString(i)); 372 #endif 373 _component->port_map(name_component, "in_BRANCH_COMPLETE_"+toString(i)+"_VAL" , _name, "in_BRANCH_COMPLETE_"+toString(i)+"_VAL" ); 374 _component->port_map(name_component,"out_BRANCH_COMPLETE_"+toString(i)+"_ACK" , _name+"_Meta_Predictor_Glue", "in_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_1_ACK" ); 375 _component->port_map(name_component, "in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS" , _name, "in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS" ); 388 376 if (_param._predictor_1_have_bht) 389 (*(component_Two_Level_Branch_Predictor_1-> in_BRANCH_COMPLETE_BHT_HISTORY [i])) (*(signal_BRANCH_COMPLETE_PREDICTOR_1_BHT_HISTORY [i]));377 _component->port_map(name_component, "in_BRANCH_COMPLETE_"+toString(i)+"_BHT_HISTORY" , _name+"_Meta_Predictor_Glue","out_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_1_BHT_HISTORY" ); 390 378 if (_param._predictor_1_have_pht) 391 (*(component_Two_Level_Branch_Predictor_1-> in_BRANCH_COMPLETE_PHT_HISTORY [i])) (*(signal_BRANCH_COMPLETE_PREDICTOR_1_PHT_HISTORY [i])); 392 (*(component_Two_Level_Branch_Predictor_1-> in_BRANCH_COMPLETE_DIRECTION [i])) (*( in_BRANCH_COMPLETE_DIRECTION [i])); 393 } 394 395 // =====[ component_Two_Level_Branch_Predictor_0 ]==================== 379 _component->port_map(name_component, "in_BRANCH_COMPLETE_"+toString(i)+"_PHT_HISTORY" , _name+"_Meta_Predictor_Glue","out_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_1_PHT_HISTORY" ); 380 _component->port_map(name_component, "in_BRANCH_COMPLETE_"+toString(i)+"_DIRECTION" , _name, "in_BRANCH_COMPLETE_"+toString(i)+"_DIRECTION" ); 381 } 382 // =====[ component_Two_Level_Branch_Predictor_0 - Instanciation ]==== 396 383 397 384 name_component = _name+"_Two_Level_Branch_Predictor_0"; 398 399 log_printf(INFO,Meta_Predictor,"allocation","Allocation : %s",name_component.c_str()); 400 401 component_Two_Level_Branch_Predictor_0 = new morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor ::Two_Level_Branch_Predictor (name_component.c_str() , 402 #ifdef STATISTICS 403 _param_statistics , 404 #endif 405 *(_param._param_two_level_branch_predictor_0)); 406 407 // Instantiation 408 (*(component_Two_Level_Branch_Predictor_0->in_CLOCK )) (*(in_CLOCK )); 409 (*(component_Two_Level_Branch_Predictor_0->in_NRESET)) (*(in_NRESET)); 410 385 386 cout << "Instance : " << name_component << endl; 387 388 #ifdef POSITION 389 _component->interface_map ("Two_Level_Branch_Predictor_0","", 390 _name ,""); 391 #endif 392 393 _component->port_map(name_component, "in_CLOCK" , _name,"in_CLOCK" ); 394 _component->port_map(name_component, "in_NRESET", _name,"in_NRESET"); 395 411 396 for (uint32_t i=0; i<_param._nb_prediction; i++) 412 397 { 413 (*(component_Two_Level_Branch_Predictor_0-> in_PREDICT_VAL [i])) (*( in_PREDICT_VAL [i])); 414 (*(component_Two_Level_Branch_Predictor_0->out_PREDICT_ACK [i])) (*(signal_PREDICT_PREDICTOR_0_ACK [i])); 415 (*(component_Two_Level_Branch_Predictor_0-> in_PREDICT_ADDRESS [i])) (*( in_PREDICT_ADDRESS [i])); 416 if (_param._predictor_0_have_bht) 417 (*(component_Two_Level_Branch_Predictor_0->out_PREDICT_BHT_HISTORY [i])) (*(signal_PREDICT_PREDICTOR_0_BHT_HISTORY [i])); 398 #ifdef POSITION 399 _component->interface_map ("Two_Level_Branch_Predictor_0","predict_"+toString(i), 400 _name ,"predict_"+toString(i)); 401 #endif 402 403 _component->port_map(name_component, "in_PREDICT_"+toString(i)+"_VAL" , _name, "in_PREDICT_"+toString(i)+"_VAL"); 404 _component->port_map(name_component,"out_PREDICT_"+toString(i)+"_ACK" , _name+"_Meta_Predictor_Glue", "in_PREDICT_"+toString(i)+"_PREDICTOR_0_ACK"); 405 _component->port_map(name_component, "in_PREDICT_"+toString(i)+"_ADDRESS" , _name, "in_PREDICT_"+toString(i)+"_ADDRESS"); 406 if (_param._predictor_0_have_bht) 407 _component->port_map(name_component,"out_PREDICT_"+toString(i)+"_BHT_HISTORY" , _name+"_Meta_Predictor_Glue", "in_PREDICT_"+toString(i)+"_PREDICTOR_0_BHT_HISTORY"); 418 408 if (_param._predictor_0_have_pht) 419 (*(component_Two_Level_Branch_Predictor_0->out_PREDICT_PHT_HISTORY [i])) (*(signal_PREDICT_PREDICTOR_0_PHT_HISTORY [i]));409 _component->port_map(name_component,"out_PREDICT_"+toString(i)+"_PHT_HISTORY" , _name+"_Meta_Predictor_Glue", "in_PREDICT_"+toString(i)+"_PREDICTOR_0_PHT_HISTORY"); 420 410 } 421 411 422 412 for (uint32_t i=0; i<_param._nb_branch_complete; i++) 423 413 { 424 (*(component_Two_Level_Branch_Predictor_0-> in_BRANCH_COMPLETE_VAL [i])) (*( in_BRANCH_COMPLETE_VAL [i])); 425 (*(component_Two_Level_Branch_Predictor_0->out_BRANCH_COMPLETE_ACK [i])) (*(signal_BRANCH_COMPLETE_PREDICTOR_0_ACK [i])); 426 (*(component_Two_Level_Branch_Predictor_0-> in_BRANCH_COMPLETE_ADDRESS [i])) (*( in_BRANCH_COMPLETE_ADDRESS [i])); 414 #ifdef POSITION 415 _component->interface_map ("Two_Level_Branch_Predictor_0","branch_complete_"+toString(i), 416 _name ,"branch_complete_"+toString(i)); 417 #endif 418 _component->port_map(name_component, "in_BRANCH_COMPLETE_"+toString(i)+"_VAL" , _name, "in_BRANCH_COMPLETE_"+toString(i)+"_VAL" ); 419 _component->port_map(name_component,"out_BRANCH_COMPLETE_"+toString(i)+"_ACK" , _name+"_Meta_Predictor_Glue", "in_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_0_ACK" ); 420 _component->port_map(name_component, "in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS" , _name, "in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS" ); 427 421 if (_param._predictor_0_have_bht) 428 (*(component_Two_Level_Branch_Predictor_0-> in_BRANCH_COMPLETE_BHT_HISTORY [i])) (*(signal_BRANCH_COMPLETE_PREDICTOR_0_BHT_HISTORY [i]));422 _component->port_map(name_component, "in_BRANCH_COMPLETE_"+toString(i)+"_BHT_HISTORY" , _name+"_Meta_Predictor_Glue","out_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_0_BHT_HISTORY" ); 429 423 if (_param._predictor_0_have_pht) 430 (*(component_Two_Level_Branch_Predictor_0-> in_BRANCH_COMPLETE_PHT_HISTORY [i])) (*(signal_BRANCH_COMPLETE_PREDICTOR_0_PHT_HISTORY [i]));431 (*(component_Two_Level_Branch_Predictor_0-> in_BRANCH_COMPLETE_DIRECTION [i])) (*( in_BRANCH_COMPLETE_DIRECTION [i]));424 _component->port_map(name_component, "in_BRANCH_COMPLETE_"+toString(i)+"_PHT_HISTORY" , _name+"_Meta_Predictor_Glue","out_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_0_PHT_HISTORY" ); 425 _component->port_map(name_component, "in_BRANCH_COMPLETE_"+toString(i)+"_DIRECTION" , _name, "in_BRANCH_COMPLETE_"+toString(i)+"_DIRECTION" ); 432 426 } 433 427 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/src/Meta_Predictor_deallocation.cpp
r15 r44 19 19 log_printf(FUNC,Meta_Predictor,"deallocation","Begin"); 20 20 21 delete in_CLOCK;22 delete in_NRESET;21 delete in_CLOCK; 22 delete in_NRESET; 23 23 24 for (uint32_t i=0; i<_param._nb_prediction; i++) 25 { 26 delete in_PREDICT_VAL [i]; 27 delete out_PREDICT_ACK [i]; 28 delete in_PREDICT_ADDRESS [i]; 29 delete out_PREDICT_HISTORY [i]; 30 delete out_PREDICT_DIRECTION [i]; 31 } 24 delete [] in_PREDICT_VAL ; 25 delete [] out_PREDICT_ACK ; 26 delete [] in_PREDICT_ADDRESS ; 27 delete [] out_PREDICT_HISTORY ; 28 delete [] out_PREDICT_DIRECTION ; 32 29 33 delete in_PREDICT_VAL ; 34 delete out_PREDICT_ACK ; 35 delete in_PREDICT_ADDRESS ; 36 delete out_PREDICT_HISTORY ; 37 delete out_PREDICT_DIRECTION ; 38 39 for (uint32_t i=0; i<_param._nb_branch_complete; i++) 40 { 41 delete in_BRANCH_COMPLETE_VAL [i]; 42 delete out_BRANCH_COMPLETE_ACK [i]; 43 delete in_BRANCH_COMPLETE_ADDRESS [i]; 44 delete in_BRANCH_COMPLETE_HISTORY [i]; 45 delete in_BRANCH_COMPLETE_DIRECTION [i]; 46 } 47 48 delete in_BRANCH_COMPLETE_VAL ; 49 delete out_BRANCH_COMPLETE_ACK ; 50 delete in_BRANCH_COMPLETE_ADDRESS ; 51 delete in_BRANCH_COMPLETE_HISTORY ; 52 delete in_BRANCH_COMPLETE_DIRECTION ; 53 54 // ~~~~~[ Signal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 55 56 for (uint32_t i=0; i<_param._nb_prediction; i++) 57 { 58 if (_param._have_meta_predictor) 59 { 60 delete signal_PREDICT_PREDICTOR_0_ACK [i]; 61 delete signal_PREDICT_PREDICTOR_1_ACK [i]; 62 } 63 delete signal_PREDICT_PREDICTOR_2_ACK [i]; 64 65 if (_param._have_meta_predictor) 66 { 67 if (_param._predictor_0_have_bht) 68 delete signal_PREDICT_PREDICTOR_0_BHT_HISTORY [i]; 69 if (_param._predictor_0_have_pht) 70 delete signal_PREDICT_PREDICTOR_0_PHT_HISTORY [i]; 71 if (_param._predictor_1_have_bht) 72 delete signal_PREDICT_PREDICTOR_1_BHT_HISTORY [i]; 73 if (_param._predictor_1_have_pht) 74 delete signal_PREDICT_PREDICTOR_1_PHT_HISTORY [i]; 75 } 76 if (_param._predictor_2_have_bht) 77 delete signal_PREDICT_PREDICTOR_2_BHT_HISTORY [i]; 78 if (_param._predictor_2_have_pht) 79 delete signal_PREDICT_PREDICTOR_2_PHT_HISTORY [i]; 80 } 81 82 if (_param._have_meta_predictor) 83 { 84 delete signal_PREDICT_PREDICTOR_0_ACK ; 85 delete signal_PREDICT_PREDICTOR_1_ACK ; 86 } 87 delete signal_PREDICT_PREDICTOR_2_ACK ; 88 89 if (_param._have_meta_predictor) 90 { 91 if (_param._predictor_0_have_bht) 92 delete signal_PREDICT_PREDICTOR_0_BHT_HISTORY; 93 if (_param._predictor_0_have_pht) 94 delete signal_PREDICT_PREDICTOR_0_PHT_HISTORY; 95 if (_param._predictor_0_have_bht) 96 delete signal_PREDICT_PREDICTOR_1_BHT_HISTORY; 97 if (_param._predictor_1_have_pht) 98 delete signal_PREDICT_PREDICTOR_1_PHT_HISTORY; 99 } 100 if (_param._predictor_2_have_bht) 101 delete signal_PREDICT_PREDICTOR_2_BHT_HISTORY; 102 if (_param._predictor_2_have_pht) 103 delete signal_PREDICT_PREDICTOR_2_PHT_HISTORY; 104 105 for (uint32_t i=0; i<_param._nb_branch_complete; i++) 106 { 107 if (_param._have_meta_predictor) 108 { 109 delete signal_BRANCH_COMPLETE_PREDICTOR_0_ACK [i]; 110 delete signal_BRANCH_COMPLETE_PREDICTOR_1_ACK [i]; 111 delete signal_BRANCH_COMPLETE_PREDICTOR_2_VAL [i]; 112 delete signal_BRANCH_COMPLETE_PREDICTOR_2_DIRECTION [i]; 113 } 114 delete signal_BRANCH_COMPLETE_PREDICTOR_2_ACK [i]; 115 116 if (_param._have_meta_predictor) 117 { 118 if (_param._predictor_0_have_bht) 119 delete signal_BRANCH_COMPLETE_PREDICTOR_0_BHT_HISTORY [i]; 120 if (_param._predictor_0_have_pht) 121 delete signal_BRANCH_COMPLETE_PREDICTOR_0_PHT_HISTORY [i]; 122 if (_param._predictor_1_have_bht) 123 delete signal_BRANCH_COMPLETE_PREDICTOR_1_BHT_HISTORY [i]; 124 if (_param._predictor_1_have_pht) 125 delete signal_BRANCH_COMPLETE_PREDICTOR_1_PHT_HISTORY [i]; 126 } 127 if (_param._predictor_2_have_bht) 128 delete signal_BRANCH_COMPLETE_PREDICTOR_2_BHT_HISTORY [i]; 129 if (_param._predictor_2_have_pht) 130 delete signal_BRANCH_COMPLETE_PREDICTOR_2_PHT_HISTORY [i]; 131 } 132 133 if (_param._have_meta_predictor) 134 { 135 delete signal_BRANCH_COMPLETE_PREDICTOR_0_ACK ; 136 delete signal_BRANCH_COMPLETE_PREDICTOR_1_ACK ; 137 delete signal_BRANCH_COMPLETE_PREDICTOR_2_VAL ; 138 delete signal_BRANCH_COMPLETE_PREDICTOR_2_DIRECTION ; 139 } 140 delete signal_BRANCH_COMPLETE_PREDICTOR_2_ACK ; 141 142 if (_param._have_meta_predictor) 143 { 144 if (_param._predictor_0_have_bht) 145 delete signal_BRANCH_COMPLETE_PREDICTOR_0_BHT_HISTORY; 146 if (_param._predictor_0_have_pht) 147 delete signal_BRANCH_COMPLETE_PREDICTOR_0_PHT_HISTORY; 148 if (_param._predictor_0_have_bht) 149 delete signal_BRANCH_COMPLETE_PREDICTOR_1_BHT_HISTORY; 150 if (_param._predictor_1_have_pht) 151 delete signal_BRANCH_COMPLETE_PREDICTOR_1_PHT_HISTORY; 152 } 153 if (_param._predictor_2_have_bht) 154 delete signal_BRANCH_COMPLETE_PREDICTOR_2_BHT_HISTORY; 155 if (_param._predictor_2_have_pht) 156 delete signal_BRANCH_COMPLETE_PREDICTOR_2_PHT_HISTORY; 30 delete [] in_BRANCH_COMPLETE_VAL ; 31 delete [] out_BRANCH_COMPLETE_ACK ; 32 delete [] in_BRANCH_COMPLETE_ADDRESS ; 33 delete [] in_BRANCH_COMPLETE_HISTORY ; 34 delete [] in_BRANCH_COMPLETE_DIRECTION ; 157 35 158 36 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ … … 165 43 delete component_Two_Level_Branch_Predictor_2; 166 44 delete component_Meta_Predictor_Glue ; 167 45 delete _component; 168 46 169 47 log_printf(FUNC,Meta_Predictor,"deallocation","End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/src/Meta_Predictor_vhdl.cpp
r5 r44 20 20 { 21 21 log_printf(FUNC,Meta_Predictor,"vhdl","Begin"); 22 Vhdl vhdl (_name);23 22 24 vhdl.set_library_work (_name + "_Pack"); 25 vhdl.set_library_work (_name + "_Meta_Predictor_Glue_Pack"); 26 if (_param._have_meta_predictor) 27 { 28 vhdl.set_library_work (_name + "_Two_Level_Branch_Predictor_0_Pack"); 29 vhdl.set_library_work (_name + "_Two_Level_Branch_Predictor_1_Pack"); 30 } 31 vhdl.set_library_work (_name + "_Two_Level_Branch_Predictor_2_Pack"); 23 Vhdl * vhdl = new Vhdl (_name); 32 24 33 vhdl_port (vhdl); 25 _interfaces->set_port (vhdl); 26 _component ->vhdl_instance(vhdl); 27 34 28 vhdl_declaration (vhdl); 35 29 vhdl_body (vhdl); 36 30 37 vhdl.generate_file(); 31 vhdl->generate_file(); 32 33 delete vhdl; 34 38 35 log_printf(FUNC,Meta_Predictor,"vhdl","End"); 39 36 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/src/Meta_Predictor_vhdl_body.cpp
r15 r44 16 16 17 17 18 void Meta_Predictor::vhdl_body (Vhdl & vhdl)18 void Meta_Predictor::vhdl_body (Vhdl * & vhdl) 19 19 { 20 20 log_printf(FUNC,Meta_Predictor,"vhdl_body","Begin"); 21 vhdl.set_body ("");22 23 list<string> list_port_map;24 25 // =====[ component_Meta_Predictor_Glue ]=============================26 27 list_port_map.clear();28 log_printf(INFO,Meta_Predictor,"vhdl_body","Instanciation : component_Meta_Predictor_Glue");29 30 // Instantiation31 32 // Interface Predict33 for (uint32_t i=0; i<_param._nb_prediction; i++)34 {35 if (_param._have_meta_predictor)36 {37 vhdl.set_body_component_port_map (list_port_map," in_PREDICT_PREDICTOR_0_ACK_"+toString(i)+" ", "signal_PREDICT_PREDICTOR_0_ACK_"+toString(i));38 vhdl.set_body_component_port_map (list_port_map," in_PREDICT_PREDICTOR_1_ACK_"+toString(i)+" ", "signal_PREDICT_PREDICTOR_1_ACK_"+toString(i));39 }40 vhdl.set_body_component_port_map (list_port_map," in_PREDICT_PREDICTOR_2_ACK_"+toString(i)+" ", "signal_PREDICT_PREDICTOR_2_ACK_"+toString(i));41 vhdl.set_body_component_port_map (list_port_map,"out_PREDICT_ACK_"+toString(i)+" ", " out_PREDICT_ACK_"+toString(i));42 if (_param._have_meta_predictor)43 {44 if (_param._predictor_0_have_bht)45 vhdl.set_body_component_port_map (list_port_map," in_PREDICT_PREDICTOR_0_BHT_HISTORY_"+toString(i)+" ", "signal_PREDICT_PREDICTOR_0_BHT_HISTORY_"+toString(i));46 if (_param._predictor_0_have_pht)47 vhdl.set_body_component_port_map (list_port_map," in_PREDICT_PREDICTOR_0_PHT_HISTORY_"+toString(i)+" ", "signal_PREDICT_PREDICTOR_0_PHT_HISTORY_"+toString(i));48 if (_param._predictor_1_have_bht)49 vhdl.set_body_component_port_map (list_port_map," in_PREDICT_PREDICTOR_1_BHT_HISTORY_"+toString(i)+" ", "signal_PREDICT_PREDICTOR_1_BHT_HISTORY_"+toString(i));50 if (_param._predictor_1_have_pht)51 vhdl.set_body_component_port_map (list_port_map," in_PREDICT_PREDICTOR_1_PHT_HISTORY_"+toString(i)+" ", "signal_PREDICT_PREDICTOR_1_PHT_HISTORY_"+toString(i));52 }53 if (_param._predictor_2_have_bht)54 vhdl.set_body_component_port_map (list_port_map," in_PREDICT_PREDICTOR_2_BHT_HISTORY_"+toString(i)+" ", "signal_PREDICT_PREDICTOR_2_BHT_HISTORY_"+toString(i));55 if (_param._predictor_2_have_pht)56 vhdl.set_body_component_port_map (list_port_map," in_PREDICT_PREDICTOR_2_PHT_HISTORY_"+toString(i)+" ", "signal_PREDICT_PREDICTOR_2_PHT_HISTORY_"+toString(i));57 vhdl.set_body_component_port_map (list_port_map,"out_PREDICT_HISTORY_"+toString(i)+" ", " out_PREDICT_HISTORY_"+toString(i));58 vhdl.set_body_component_port_map (list_port_map,"out_PREDICT_DIRECTION_"+toString(i)+" ", " out_PREDICT_DIRECTION_"+toString(i));59 }60 61 // Interface Branch_complete62 63 for (uint32_t i=0; i<_param._nb_branch_complete; i++)64 {65 if (_param._have_meta_predictor)66 {67 vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_VAL_"+toString(i)+" ", " in_BRANCH_COMPLETE_VAL_"+toString(i));68 vhdl.set_body_component_port_map (list_port_map,"out_BRANCH_COMPLETE_PREDICTOR_2_VAL_"+toString(i)+" ", "signal_BRANCH_COMPLETE_PREDICTOR_2_VAL_"+toString(i));69 70 vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_PREDICTOR_0_ACK_"+toString(i)+" ", "signal_BRANCH_COMPLETE_PREDICTOR_0_ACK_"+toString(i));71 vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_PREDICTOR_1_ACK_"+toString(i)+" ", "signal_BRANCH_COMPLETE_PREDICTOR_1_ACK_"+toString(i));72 }73 vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_PREDICTOR_2_ACK_"+toString(i)+" ", "signal_BRANCH_COMPLETE_PREDICTOR_2_ACK_"+toString(i));74 vhdl.set_body_component_port_map (list_port_map,"out_BRANCH_COMPLETE_ACK_"+toString(i)+" ", " out_BRANCH_COMPLETE_ACK_"+toString(i));75 76 if (_param._have_meta_predictor)77 {78 if (_param._predictor_0_have_bht)79 vhdl.set_body_component_port_map (list_port_map,"out_BRANCH_COMPLETE_PREDICTOR_0_BHT_HISTORY_"+toString(i)+"", "signal_BRANCH_COMPLETE_PREDICTOR_0_BHT_HISTORY_"+toString(i));80 if (_param._predictor_0_have_pht)81 vhdl.set_body_component_port_map (list_port_map,"out_BRANCH_COMPLETE_PREDICTOR_0_PHT_HISTORY_"+toString(i)+"", "signal_BRANCH_COMPLETE_PREDICTOR_0_PHT_HISTORY_"+toString(i));82 if (_param._predictor_1_have_bht)83 vhdl.set_body_component_port_map (list_port_map,"out_BRANCH_COMPLETE_PREDICTOR_1_BHT_HISTORY_"+toString(i)+"", "signal_BRANCH_COMPLETE_PREDICTOR_1_BHT_HISTORY_"+toString(i));84 if (_param._predictor_1_have_pht)85 vhdl.set_body_component_port_map (list_port_map,"out_BRANCH_COMPLETE_PREDICTOR_1_PHT_HISTORY_"+toString(i)+"", "signal_BRANCH_COMPLETE_PREDICTOR_1_PHT_HISTORY_"+toString(i));86 }87 if (_param._predictor_2_have_bht)88 vhdl.set_body_component_port_map (list_port_map,"out_BRANCH_COMPLETE_PREDICTOR_2_BHT_HISTORY_"+toString(i)+"", "signal_BRANCH_COMPLETE_PREDICTOR_2_BHT_HISTORY_"+toString(i));89 if (_param._predictor_2_have_pht)90 vhdl.set_body_component_port_map (list_port_map,"out_BRANCH_COMPLETE_PREDICTOR_2_PHT_HISTORY_"+toString(i)+"", "signal_BRANCH_COMPLETE_PREDICTOR_2_PHT_HISTORY_"+toString(i));91 vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_HISTORY_"+toString(i)+" ", " in_BRANCH_COMPLETE_HISTORY_"+toString(i));92 if (_param._have_meta_predictor)93 {94 vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_DIRECTION_"+toString(i)+" ", " in_BRANCH_COMPLETE_DIRECTION_"+toString(i));95 vhdl.set_body_component_port_map (list_port_map,"out_BRANCH_COMPLETE_PREDICTOR_2_DIRECTION_"+toString(i)+" ", "signal_BRANCH_COMPLETE_PREDICTOR_2_DIRECTION_"+toString(i));96 }97 }98 99 vhdl.set_body_component ("component_Meta_Predictor_Glue",_name+"_Meta_Predictor_Glue",list_port_map);100 101 // =====[ component_Two_Level_Branch_Predictor_2 ]====================102 103 list_port_map.clear();104 log_printf(INFO,Meta_Predictor,"vhdl_body","Instanciation : component_Two_Level_Branch_Predictor_2");105 106 // Instantiation107 vhdl.set_body_component_port_map (list_port_map,"in_CLOCK ","in_CLOCK ");108 vhdl.set_body_component_port_map (list_port_map,"in_NRESET","in_NRESET");109 110 for (uint32_t i=0; i<_param._nb_prediction; i++)111 {112 vhdl.set_body_component_port_map (list_port_map," in_PREDICT_VAL_"+toString(i)+" ", " in_PREDICT_VAL_"+toString(i));113 vhdl.set_body_component_port_map (list_port_map,"out_PREDICT_ACK_"+toString(i)+" ", "signal_PREDICT_PREDICTOR_2_ACK_"+toString(i));114 vhdl.set_body_component_port_map (list_port_map," in_PREDICT_ADDRESS_"+toString(i)+" ", " in_PREDICT_ADDRESS_"+toString(i));115 if (_param._predictor_2_have_bht)116 vhdl.set_body_component_port_map (list_port_map,"out_PREDICT_BHT_HISTORY_"+toString(i)+" ", "signal_PREDICT_PREDICTOR_2_BHT_HISTORY_"+toString(i));117 if (_param._predictor_2_have_pht)118 vhdl.set_body_component_port_map (list_port_map,"out_PREDICT_PHT_HISTORY_"+toString(i)+" ", "signal_PREDICT_PREDICTOR_2_PHT_HISTORY_"+toString(i));119 }120 121 for (uint32_t i=0; i<_param._nb_branch_complete; i++)122 {123 if (_param._have_meta_predictor)124 vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_VAL_"+toString(i)+" ", "signal_BRANCH_COMPLETE_PREDICTOR_2_VAL_"+toString(i));125 else126 vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_VAL_"+toString(i)+" ", " in_BRANCH_COMPLETE_VAL_"+toString(i));127 vhdl.set_body_component_port_map (list_port_map,"out_BRANCH_COMPLETE_ACK_"+toString(i)+" ", "signal_BRANCH_COMPLETE_PREDICTOR_2_ACK_"+toString(i));128 vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_ADDRESS_"+toString(i)+" ", " in_BRANCH_COMPLETE_ADDRESS_"+toString(i));129 if (_param._predictor_2_have_bht)130 vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_BHT_HISTORY_"+toString(i)+"", "signal_BRANCH_COMPLETE_PREDICTOR_2_BHT_HISTORY_"+toString(i));131 if (_param._predictor_2_have_pht)132 vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_PHT_HISTORY_"+toString(i)+"", "signal_BRANCH_COMPLETE_PREDICTOR_2_PHT_HISTORY_"+toString(i));133 if (_param._have_meta_predictor)134 vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_DIRECTION_"+toString(i)+" ", "signal_BRANCH_COMPLETE_PREDICTOR_2_DIRECTION_"+toString(i));135 else136 vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_DIRECTION_"+toString(i)+" ", " in_BRANCH_COMPLETE_DIRECTION_"+toString(i));137 }138 139 vhdl.set_body_component ("component_Two_Level_Branch_Predictor_2",_name+"_Two_Level_Branch_Predictor_2",list_port_map);140 141 if (_param._have_meta_predictor)142 {143 // =====[ component_Two_Level_Branch_Predictor_1 ]====================144 145 list_port_map.clear();146 log_printf(INFO,Meta_Predictor,"vhdl_body","Instanciation : component_Two_Level_Branch_Predictor_1");147 148 // Instantiation149 vhdl.set_body_component_port_map (list_port_map,"in_CLOCK ","in_CLOCK ");150 vhdl.set_body_component_port_map (list_port_map,"in_NRESET","in_NRESET");151 152 for (uint32_t i=0; i<_param._nb_prediction; i++)153 {154 vhdl.set_body_component_port_map (list_port_map," in_PREDICT_VAL_"+toString(i)+" ", " in_PREDICT_VAL_"+toString(i));155 vhdl.set_body_component_port_map (list_port_map,"out_PREDICT_ACK_"+toString(i)+" ", "signal_PREDICT_PREDICTOR_1_ACK_"+toString(i));156 vhdl.set_body_component_port_map (list_port_map," in_PREDICT_ADDRESS_"+toString(i)+" ", " in_PREDICT_ADDRESS_"+toString(i));157 if (_param._predictor_1_have_bht)158 vhdl.set_body_component_port_map (list_port_map,"out_PREDICT_BHT_HISTORY_"+toString(i)+" ", "signal_PREDICT_PREDICTOR_1_BHT_HISTORY_"+toString(i));159 if (_param._predictor_1_have_pht)160 vhdl.set_body_component_port_map (list_port_map,"out_PREDICT_PHT_HISTORY_"+toString(i)+" ", "signal_PREDICT_PREDICTOR_1_PHT_HISTORY_"+toString(i));161 }162 163 for (uint32_t i=0; i<_param._nb_branch_complete; i++)164 {165 vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_VAL_"+toString(i)+" ", " in_BRANCH_COMPLETE_VAL_"+toString(i));166 vhdl.set_body_component_port_map (list_port_map,"out_BRANCH_COMPLETE_ACK_"+toString(i)+" ", "signal_BRANCH_COMPLETE_PREDICTOR_1_ACK_"+toString(i));167 vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_ADDRESS_"+toString(i)+" ", " in_BRANCH_COMPLETE_ADDRESS_"+toString(i));168 if (_param._predictor_1_have_bht)169 vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_BHT_HISTORY_"+toString(i)+"", "signal_BRANCH_COMPLETE_PREDICTOR_1_BHT_HISTORY_"+toString(i));170 if (_param._predictor_1_have_pht)171 vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_PHT_HISTORY_"+toString(i)+"", "signal_BRANCH_COMPLETE_PREDICTOR_1_PHT_HISTORY_"+toString(i));172 vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_DIRECTION_"+toString(i)+" ", " in_BRANCH_COMPLETE_DIRECTION_"+toString(i));173 }174 175 vhdl.set_body_component ("component_Two_Level_Branch_Predictor_1",_name+"_Two_Level_Branch_Predictor_1",list_port_map);176 177 // =====[ component_Two_Level_Branch_Predictor_0 ]====================178 179 list_port_map.clear();180 log_printf(INFO,Meta_Predictor,"vhdl_body","Instanciation : component_Two_Level_Branch_Predictor_0");181 182 // Instantiation183 vhdl.set_body_component_port_map (list_port_map,"in_CLOCK ","in_CLOCK ");184 vhdl.set_body_component_port_map (list_port_map,"in_NRESET","in_NRESET");185 186 for (uint32_t i=0; i<_param._nb_prediction; i++)187 {188 vhdl.set_body_component_port_map (list_port_map," in_PREDICT_VAL_"+toString(i)+" ", " in_PREDICT_VAL_"+toString(i));189 vhdl.set_body_component_port_map (list_port_map,"out_PREDICT_ACK_"+toString(i)+" ", "signal_PREDICT_PREDICTOR_0_ACK_"+toString(i));190 vhdl.set_body_component_port_map (list_port_map," in_PREDICT_ADDRESS_"+toString(i)+" ", " in_PREDICT_ADDRESS_"+toString(i));191 if (_param._predictor_0_have_bht)192 vhdl.set_body_component_port_map (list_port_map,"out_PREDICT_BHT_HISTORY_"+toString(i)+" ", "signal_PREDICT_PREDICTOR_0_BHT_HISTORY_"+toString(i));193 if (_param._predictor_0_have_pht)194 vhdl.set_body_component_port_map (list_port_map,"out_PREDICT_PHT_HISTORY_"+toString(i)+" ", "signal_PREDICT_PREDICTOR_0_PHT_HISTORY_"+toString(i));195 }196 197 for (uint32_t i=0; i<_param._nb_branch_complete; i++)198 {199 vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_VAL_"+toString(i)+" ", " in_BRANCH_COMPLETE_VAL_"+toString(i));200 vhdl.set_body_component_port_map (list_port_map,"out_BRANCH_COMPLETE_ACK_"+toString(i)+" ", "signal_BRANCH_COMPLETE_PREDICTOR_0_ACK_"+toString(i));201 vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_ADDRESS_"+toString(i)+" ", " in_BRANCH_COMPLETE_ADDRESS_"+toString(i));202 if (_param._predictor_0_have_bht)203 vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_BHT_HISTORY_"+toString(i)+"", "signal_BRANCH_COMPLETE_PREDICTOR_0_BHT_HISTORY_"+toString(i));204 if (_param._predictor_0_have_pht)205 vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_PHT_HISTORY_"+toString(i)+"", "signal_BRANCH_COMPLETE_PREDICTOR_0_PHT_HISTORY_"+toString(i));206 vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_DIRECTION_"+toString(i)+" ", " in_BRANCH_COMPLETE_DIRECTION_"+toString(i));207 }208 209 vhdl.set_body_component ("component_Two_Level_Branch_Predictor_0",_name+"_Two_Level_Branch_Predictor_0",list_port_map);210 }211 21 212 22 log_printf(FUNC,Meta_Predictor,"vhdl_body","End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/src/Meta_Predictor_vhdl_declaration.cpp
r5 r44 16 16 17 17 18 void Meta_Predictor::vhdl_declaration (Vhdl & vhdl)18 void Meta_Predictor::vhdl_declaration (Vhdl * & vhdl) 19 19 { 20 20 log_printf(FUNC,Meta_Predictor,"vhdl_declaration","Begin"); 21 22 for (uint32_t i=0; i<_param._nb_prediction; i++)23 {24 if (_param._have_meta_predictor)25 {26 vhdl.set_signal("signal_PREDICT_PREDICTOR_0_ACK_"+toString(i)+"", 1);27 vhdl.set_signal("signal_PREDICT_PREDICTOR_1_ACK_"+toString(i)+"", 1);28 }29 vhdl.set_signal("signal_PREDICT_PREDICTOR_2_ACK_"+toString(i)+"", 1);30 31 if (_param._have_meta_predictor)32 {33 if (_param._predictor_0_have_bht)34 vhdl.set_signal("signal_PREDICT_PREDICTOR_0_BHT_HISTORY_"+toString(i)+"", _param._predictor_0_bht_size_shifter);35 if (_param._predictor_0_have_pht)36 vhdl.set_signal("signal_PREDICT_PREDICTOR_0_PHT_HISTORY_"+toString(i)+"", _param._predictor_0_pht_size_counter);37 if (_param._predictor_1_have_bht)38 vhdl.set_signal("signal_PREDICT_PREDICTOR_1_BHT_HISTORY_"+toString(i)+"", _param._predictor_1_bht_size_shifter);39 if (_param._predictor_1_have_pht)40 vhdl.set_signal("signal_PREDICT_PREDICTOR_1_PHT_HISTORY_"+toString(i)+"", _param._predictor_1_pht_size_counter);41 }42 if (_param._predictor_2_have_bht)43 vhdl.set_signal("signal_PREDICT_PREDICTOR_2_BHT_HISTORY_"+toString(i)+"", _param._predictor_2_bht_size_shifter);44 if (_param._predictor_2_have_pht)45 vhdl.set_signal("signal_PREDICT_PREDICTOR_2_PHT_HISTORY_"+toString(i)+"", _param._predictor_2_pht_size_counter);46 }47 48 for (uint32_t i=0; i<_param._nb_branch_complete; i++)49 {50 if (_param._have_meta_predictor)51 {52 vhdl.set_signal("signal_BRANCH_COMPLETE_PREDICTOR_0_ACK_"+toString(i)+" ", 1);53 vhdl.set_signal("signal_BRANCH_COMPLETE_PREDICTOR_1_ACK_"+toString(i)+" ", 1);54 vhdl.set_signal("signal_BRANCH_COMPLETE_PREDICTOR_2_VAL_"+toString(i)+" ", 1);55 vhdl.set_signal("signal_BRANCH_COMPLETE_PREDICTOR_2_DIRECTION_"+toString(i)+"", 1);56 }57 vhdl.set_signal("signal_BRANCH_COMPLETE_PREDICTOR_2_ACK_"+toString(i)+" ", 1);58 59 if (_param._have_meta_predictor)60 {61 if (_param._predictor_0_have_bht)62 vhdl.set_signal("signal_BRANCH_COMPLETE_PREDICTOR_0_BHT_HISTORY_"+toString(i)+"", _param._predictor_0_bht_size_shifter);63 if (_param._predictor_0_have_pht)64 vhdl.set_signal("signal_BRANCH_COMPLETE_PREDICTOR_0_PHT_HISTORY_"+toString(i)+"", _param._predictor_0_pht_size_counter);65 if (_param._predictor_1_have_bht)66 vhdl.set_signal("signal_BRANCH_COMPLETE_PREDICTOR_1_BHT_HISTORY_"+toString(i)+"", _param._predictor_1_bht_size_shifter);67 if (_param._predictor_1_have_pht)68 vhdl.set_signal("signal_BRANCH_COMPLETE_PREDICTOR_1_PHT_HISTORY_"+toString(i)+"", _param._predictor_1_pht_size_counter);69 }70 if (_param._predictor_2_have_bht)71 vhdl.set_signal("signal_BRANCH_COMPLETE_PREDICTOR_2_BHT_HISTORY_"+toString(i)+"", _param._predictor_2_bht_size_shifter);72 if (_param._predictor_2_have_pht)73 vhdl.set_signal("signal_BRANCH_COMPLETE_PREDICTOR_2_PHT_HISTORY_"+toString(i)+"", _param._predictor_2_pht_size_counter);74 }75 76 21 77 22 log_printf(FUNC,Meta_Predictor,"vhdl_declaration","End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/src/Meta_Predictor_vhdl_testbench_transition.cpp
r15 r44 20 20 log_printf(FUNC,Meta_Predictor,"vhdl_testbench_transition","Begin"); 21 21 22 // Evaluation before read the ouput signal 23 sc_start(0); 22 // sc_start(0); 24 23 25 // In order with file Meta_Predictor_vhdl_testbench_port.cpp 26 // Warning : if a output depend of a subcomponent, take directly the port of subcomponent 27 // (because we have no control on the ordonnancer's policy) 28 29 _vhdl_testbench->add_input (PORT_READ( in_NRESET)); 30 31 for (uint32_t i=0; i<_param._nb_prediction; i++) 32 { 33 _vhdl_testbench->add_input (PORT_READ( in_PREDICT_VAL [i])); 34 _vhdl_testbench->add_output(PORT_READ(out_PREDICT_ACK [i])); 35 _vhdl_testbench->add_input (PORT_READ( in_PREDICT_ADDRESS [i])); 36 _vhdl_testbench->add_output(PORT_READ(out_PREDICT_HISTORY [i])); 37 _vhdl_testbench->add_output(PORT_READ(out_PREDICT_DIRECTION [i])); 38 } 39 40 for (uint32_t i=0; i<_param._nb_branch_complete; i++) 41 { 42 _vhdl_testbench->add_input (PORT_READ( in_BRANCH_COMPLETE_VAL [i])); 43 _vhdl_testbench->add_output(PORT_READ(out_BRANCH_COMPLETE_ACK [i])); 44 _vhdl_testbench->add_input (PORT_READ( in_BRANCH_COMPLETE_ADDRESS [i])); 45 _vhdl_testbench->add_input (PORT_READ( in_BRANCH_COMPLETE_HISTORY [i])); 46 _vhdl_testbench->add_input (PORT_READ( in_BRANCH_COMPLETE_DIRECTION [i])); 47 } 48 49 // add_test : 50 // - True : the cycle must be compare with the output of systemC 51 // - False : no test 52 _vhdl_testbench->add_test(true); 53 54 _vhdl_testbench->new_cycle (); // always at the end 24 _interfaces->testbench(); 55 25 56 26 log_printf(FUNC,Meta_Predictor,"vhdl_testbench_transition","End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Component.h
r42 r44 18 18 //#include "Behavioural/include/Description.h" 19 19 #include "Behavioural/include/Entity.h" 20 #include " Include/ToString.h"21 #include " Include/Debug.h"20 #include "Common/include/ToString.h" 21 #include "Common/include/Debug.h" 22 22 23 23 using namespace std; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Configuration_Parameters.h
r40 r44 13 13 #include "Behavioural/include/XML.h" 14 14 #include "Behavioural/include/Environnement.h" 15 #include " Include/ErrorMorpheo.h"16 #include " Include/ToString.h"15 #include "Common/include/ErrorMorpheo.h" 16 #include "Common/include/ToString.h" 17 17 using namespace std; 18 18 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Debug_component.h
r41 r44 2 2 #define DEBUG_COMPONENT_H 3 3 4 #define DEBUG_Behavioural false4 #define DEBUG_Behavioural true 5 5 #define DEBUG_Generic false 6 6 #define DEBUG_Counter false -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Direction.h
r42 r44 2 2 #define morpheo_behavioural_Direction_h 3 3 4 #include " Include/ToString.h"4 #include "Common/include/ToString.h" 5 5 6 6 namespace morpheo { -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Entity.h
r42 r44 15 15 #include "Behavioural/include/Interfaces.h" 16 16 #include "Behavioural/include/Schema.h" 17 #include " Include/ErrorMorpheo.h"18 #include " Include/ToString.h"19 #include " Include/Debug.h"17 #include "Common/include/ErrorMorpheo.h" 18 #include "Common/include/ToString.h" 19 #include "Common/include/Debug.h" 20 20 21 21 using namespace std; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Interface.h
r42 r44 22 22 #include "Behavioural/include/Vhdl.h" 23 23 #endif 24 #include " Include/ToString.h"25 #include " Include/ErrorMorpheo.h"26 #include " Include/Debug.h"24 #include "Common/include/ToString.h" 25 #include "Common/include/ErrorMorpheo.h" 26 #include "Common/include/Debug.h" 27 27 28 28 using namespace std; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Interfaces.h
r42 r44 13 13 #include <list> 14 14 #include "Behavioural/include/Interface_fifo.h" 15 #include " Include/ToString.h"16 #include " Include/Debug.h"15 #include "Common/include/ToString.h" 16 #include "Common/include/Debug.h" 17 17 #ifdef VHDL 18 18 #include "Behavioural/include/Vhdl.h" -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Localisation.h
r42 r44 3 3 #define morpheo_behavioural_Localisation_h 4 4 5 #include " Include/ToString.h"5 #include "Common/include/ToString.h" 6 6 7 7 namespace morpheo { -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Parameters.h
r43 r44 14 14 #include "Behavioural/Constant/Constant_OpenRISC.h" 15 15 #include "Behavioural/include/Environnement.h" 16 #include " Include/ErrorMorpheo.h"17 #include " Include/ToString.h"18 #include " Include/Debug.h"16 #include "Common/include/ErrorMorpheo.h" 17 #include "Common/include/ToString.h" 18 #include "Common/include/Debug.h" 19 19 20 20 using namespace morpheo::behavioural::constant; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Schema.h
r31 r44 4 4 #define morpheo_behavioural_Schema_h 5 5 6 #include " Include/ToString.h"6 #include "Common/include/ToString.h" 7 7 8 8 namespace morpheo { -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Signal.h
r42 r44 22 22 #include "Behavioural/include/Direction.h" 23 23 #include "Behavioural/include/XML.h" 24 #include " Include/ErrorMorpheo.h"25 #include " Include/ToBase2.h"26 #include " Include/ToString.h"27 #include " Include/Debug.h"24 #include "Common/include/ErrorMorpheo.h" 25 #include "Common/include/ToBase2.h" 26 #include "Common/include/ToString.h" 27 #include "Common/include/Debug.h" 28 28 29 29 using namespace std; … … 58 58 private : const presence_port_t _presence_port; 59 59 60 private : Signal * _signal ; 61 private : bool _is_allocate ; 62 private : void * _sc_signal ; 63 private : bool _is_map ; 64 private : void * _sc_signal_map; 60 private : Signal * _connect_to_signal; // the actual implementaion, this signal link with one signal (but if signal is an output, it can be connect with many signal ...) 61 private : Signal * _connect_from_signal; // producter of signal. If NULL, then producteur is the current entity 62 private : bool _is_allocate ; // Have allocate a sc_in or sc_out port 63 private : void * _sc_signal ; // sc_in or sc_out associated at this signal 64 private : bool _is_map ; 65 private : void * _sc_signal_map; // sc_out generated this signal 65 66 private : type_info_t _type_info ; 66 67 … … 79 80 public : string get_name (void); 80 81 public : uint32_t get_size (void); 81 public : Signal * get_signal_link (void); 82 public : bool get_is_map (void); 83 public : Signal * get_connect_to_signal (void); 84 public : Signal * get_connect_from_signal (void); 85 public : direction_t get_direction (void); 82 86 83 87 public : bool presence_vhdl (void); 84 88 public : bool presence_testbench (void); 85 89 86 public : void mapping (Signal * signal); 87 public : void link (Signal * signal); 90 // public : void mapping (Signal * signal); 91 public : void link (Signal * signal , 92 bool is_port_component); 88 93 89 94 #ifdef SYSTEMC … … 127 132 } 128 133 134 #undef FUNCTION 135 #define FUNCTION "Signal::alloc" 129 136 public : template <typename T> 130 void alloc (void * port) 131 { 137 void alloc (void * sc_signal) 138 { 139 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 140 132 141 if (_type_info != UNKNOW) 133 142 throw (ErrorMorpheo ("Signal \""+_name+"\" : already allocate.")); 134 143 135 _is_allocate = true; 136 _sc_signal = port; 137 _sc_signal_map = port; 144 _is_allocate = true; 145 _sc_signal = sc_signal; 146 _sc_signal_map = sc_signal; 147 148 log_printf(TRACE,Behavioural,FUNCTION, "Allocation of %s - %.8x", _name.c_str(), (uint32_t)(_sc_signal_map)); 138 149 139 150 if (typeid(T) == typeid(bool )) … … 153 164 else 154 165 _type_info = UNKNOW; 166 167 log_printf(FUNC,Behavioural,FUNCTION,"End"); 155 168 } 156 169 #endif -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Statistics.h
r40 r44 15 15 #include "Behavioural/include/Environnement.h" 16 16 #include "Behavioural/include/Parameters_Statistics.h" 17 #include " Include/Average.h"18 #include " Include/Percent.h"17 #include "Common/include/Average.h" 18 #include "Common/include/Percent.h" 19 19 20 20 using namespace std; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Vhdl.h
r40 r44 16 16 #include "Behavioural/include/Environnement.h" 17 17 #include "Behavioural/include/Direction.h" 18 #include " Include/ToString.h"19 #include " Include/Debug.h"18 #include "Common/include/ToString.h" 19 #include "Common/include/Debug.h" 20 20 21 21 using namespace std; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/XML.h
r43 r44 13 13 #include <math.h> 14 14 #include <list> 15 #include " Include/ToString.h"16 #include " Include/Debug.h"15 #include "Common/include/ToString.h" 16 #include "Common/include/Debug.h" 17 17 18 18 using namespace std; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_interface_map.cpp
r43 r44 27 27 28 28 if (entity_dest == NULL) 29 throw (ErrorMorpheo (" Component \""+name_entity+"\", port map with unknow component \""+component_dest+"\"."));29 throw (ErrorMorpheo ("<Component::interface_map> Component \""+name_entity+"\", port map with unknow component \""+component_dest+"\".")); 30 30 31 31 bool is_top_level_dest = (name_entity == component_dest); … … 34 34 35 35 if (interface_dest == NULL) 36 throw (ErrorMorpheo (" Component \""+name_entity+"\", port map with component \""+component_dest+"\" and a unknow interface \""+port_dest+"\"."));36 throw (ErrorMorpheo ("<Component::interface_map> Component \""+name_entity+"\", port map with component \""+component_dest+"\" and a unknow interface \""+port_dest+"\".")); 37 37 38 38 // Second entity … … 40 40 41 41 if (entity_src == NULL) 42 throw (ErrorMorpheo (" Component \""+name_entity+"\", port map with unknow component \""+component_src+"\"."));42 throw (ErrorMorpheo ("<Component::interface_map> Component \""+name_entity+"\", port map with unknow component \""+component_src+"\".")); 43 43 44 44 bool is_top_level_src = (name_entity == component_src); … … 47 47 48 48 if (interface_src == NULL) 49 throw (ErrorMorpheo (" Component \""+name_entity+"\", port map with component \""+component_src+"\" and a unknow interface \""+port_src+"\"."));49 throw (ErrorMorpheo ("<Component::interface_map> Component \""+name_entity+"\", port map with component \""+component_src+"\" and a unknow interface \""+port_src+"\".")); 50 50 51 51 // all is ok - link -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_port_map.cpp
r43 r44 45 45 46 46 // If all is ok, mapping 47 48 //cout << " - " << entity_src->get_name() << "("<< signal_src->get_name() << ")" << "\t-> " << entity_dest->get_name() << "(" << signal_dest->get_name() << ")" << endl; 47 log_printf(TRACE,Behavioural,FUNCTION, "Signal \"%s.%s\"\tlink with \"%s.%s\"" 48 ,entity_src ->get_name().c_str() 49 ,signal_src ->get_name().c_str() 50 ,entity_dest->get_name().c_str() 51 ,signal_dest->get_name().c_str()); 49 52 50 signal_src ->link (signal_dest );53 signal_src ->link (signal_dest, entity_dest == _entity); 51 54 //signal_dest->mapping(signal_src ); 52 55 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_vhdl_instance.cpp
r43 r44 20 20 uint32_t cpt = 0; 21 21 map<Signal *,string> tab; 22 23 // buffer all output 24 { 25 vhdl->set_body ("------------------------------------------------------"); 26 vhdl->set_body ("-- Output's Buffer"); 27 vhdl->set_body ("------------------------------------------------------"); 28 29 // for each interface 30 list<Interface_fifo *> * list_interface = (_entity)->get_interfaces_list()->get_interface_list(); 31 list<Interface_fifo *>::iterator j = list_interface->begin(); 32 if (not list_interface->empty()) 33 { 34 while (j != list_interface->end()) 35 { 36 // for each signal 37 list<Signal *> * list_signal = (*j)->get_signal_list(); 38 list<Signal *>::iterator k = list_signal->begin(); 39 if (not list_signal->empty()) 40 { 41 while (k != list_signal->end()) 42 { 43 Signal * signal = (*k); 44 45 // test if is connect with external interface or with an another component AND if this port is mapped. 46 if ( (signal->get_direction() == OUT) and 47 (signal->get_connect_from_signal () != NULL) ) 48 { 49 // Create name 50 string signal_name = "signal_"+toString(cpt++); 51 52 tab [signal ] = signal_name; 53 tab [signal->get_connect_from_signal()] = signal_name; 54 55 // Add a new signal and the affectation 56 vhdl->set_signal (signal_name, signal->get_size()); 57 vhdl->set_body (signal->get_name()+" <= "+signal_name+";"); 58 } 59 else 60 { 61 tab [signal ] = signal->get_name(); 62 } 63 ++k; 64 } 65 } 66 ++j; 67 } 68 } 69 vhdl->set_body (""); 70 vhdl->set_body ("------------------------------------------------------"); 71 vhdl->set_body (""); 72 } 22 73 23 74 vhdl->set_library_work (_entity->get_name() + "_Pack"); … … 50 101 // test if is connect with external interface or with an another component. 51 102 Signal * signal_src = (*k); 103 52 104 if (signal_src->presence_vhdl () == true) 53 105 { 54 Signal * signal_dest = (*k)->get_signal_link();106 Signal * signal_dest = signal_src->get_connect_to_signal(); 55 107 string name_src = signal_src->get_name(); 56 108 string name_dest; 57 109 58 if (_entity->find_signal(signal_dest) == false) 59 { 110 // // Test if destination signal is a interface port ? 111 // if (_entity->find_signal(signal_dest) == false) 112 // { 60 113 // find if signal is already link 61 map<Signal *,string>::iterator it = tab.find(signal_ src);62 if (tab.find(signal_ src) == tab.end())114 map<Signal *,string>::iterator it = tab.find(signal_dest); 115 if (tab.find(signal_dest) == tab.end()) 63 116 { 64 117 // Create name … … 72 125 } 73 126 else 74 name_dest = (*it).second; 75 } 76 else 77 name_dest = signal_dest->get_name(); 127 { 128 // find !!!! 129 name_dest = (*it).second; 130 tab [signal_src ] = name_dest; 131 } 132 // } 133 // else 134 // { 135 // cout << "Kane à dit : " << signal_dest->get_name() << endl; 136 // // Test if output 137 // if (signal_dest->get_direction() == OUT) 138 // { 139 // // Take buffer's signal 140 // map<Signal *,string>::iterator it = tab.find(signal_dest); 141 // name_dest = (*it).second; 142 143 // cout << " * OUT - name : " << name_dest << endl; 144 // } 145 // else 146 // { 147 // name_dest = signal_dest->get_name(); 148 // cout << " * IN - name : " << name_dest << endl; 149 // } 150 // } 78 151 79 152 vhdl->set_body_component_port_map (list_port_map, name_src, name_dest); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_signal_name.cpp
r40 r44 7 7 8 8 #include "Behavioural/include/Interface.h" 9 #include " Include/ChangeCase.h"9 #include "Common/include/ChangeCase.h" 10 10 11 11 namespace morpheo { -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_testbench_generate_file.cpp
r42 r44 87 87 vhdl->set_body("\t\t\t"+counter+" <= "+counter+"+1;"); 88 88 vhdl->set_body(""); 89 vhdl->set_body("\t\t\tassert not ("+counter+" = "+toString(cycle)+") report \"Test OK\" severity FAILURE;");89 vhdl->set_body("\t\t\tassert not ("+counter+" >= "+toString(cycle)+") report \"Test OK\" severity FAILURE;"); 90 90 vhdl->set_body("\t\t\tassert not ("+test_name+" = '0') report \"Test KO\" severity FAILURE;"); 91 91 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal.cpp
r42 r44 23 23 _is_allocate = false; 24 24 _is_map = false; 25 _signal = NULL; 25 _connect_from_signal = NULL; 26 _connect_to_signal = NULL; 26 27 _sc_signal = NULL; 27 28 _sc_signal_map = NULL; … … 42 43 _is_allocate= signal._is_allocate; 43 44 _is_map = signal._is_map ; 45 _connect_from_signal = signal._connect_from_signal; 46 _connect_to_signal = signal._connect_to_signal; 44 47 _sc_signal = signal._sc_signal ; 45 48 _sc_signal_map = signal._sc_signal_map; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_get_connect_to_signal.cpp
r43 r44 13 13 14 14 #undef FUNCTION 15 #define FUNCTION "Signal::get_ signal_link"16 Signal * Signal::get_ signal_link(void)15 #define FUNCTION "Signal::get_connect_to_signal" 16 Signal * Signal::get_connect_to_signal (void) 17 17 { 18 18 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 19 Signal * _return = _ signal;19 Signal * _return = _connect_to_signal; 20 20 log_printf(FUNC,Behavioural,FUNCTION,"End"); 21 21 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_link.cpp
r43 r44 14 14 #undef FUNCTION 15 15 #define FUNCTION "Signal::link" 16 void Signal::link (Signal * signal) 16 void Signal::link (Signal * signal, 17 bool is_port_component) 17 18 { 18 19 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 19 20 20 21 if ( _is_allocate == false) 21 throw (ErrorMorpheo (" Signal \""+_name+"\", can't map with signal \""+ get_name()+"\", because it's not already allocate."));22 throw (ErrorMorpheo ("<Signal::link> Signal \""+_name+"\", can't map with signal \""+ get_name()+"\", because it's not already allocate.")); 22 23 if (signal->_is_allocate == false) 23 throw (ErrorMorpheo ("Signal \""+_name+"\", can't map with signal \""+signal->get_name()+"\", because it's not already allocate.")); 24 throw (ErrorMorpheo ("<Signal::link> Signal \""+_name+"\", can't map with signal \""+signal->get_name()+"\", because it's not already allocate.")); 25 if (_is_map == true) 26 throw (ErrorMorpheo ("<Signal::mapping> Can't mapping signal \""+_name+"\" with \""+signal->get_name()+"\", because it's already map.")); 24 27 25 _signal = signal;26 28 27 if ((_direction == IN ) and (signal->_direction == IN )) 28 switch (_type_info) 29 { 30 case BOOL : {(*(static_cast<sc_in <bool > *>(_sc_signal))) (*(static_cast<sc_in <bool > *>(signal->_sc_signal))); break;} 31 case UINT8_T : {(*(static_cast<sc_in <uint8_t > *>(_sc_signal))) (*(static_cast<sc_in <uint8_t > *>(signal->_sc_signal))); break;} 32 case UINT16_T : {(*(static_cast<sc_in <uint16_t> *>(_sc_signal))) (*(static_cast<sc_in <uint16_t> *>(signal->_sc_signal))); break;} 33 case UINT32_T : {(*(static_cast<sc_in <uint32_t> *>(_sc_signal))) (*(static_cast<sc_in <uint32_t> *>(signal->_sc_signal))); break;} 34 case UINT64_T : {(*(static_cast<sc_in <uint64_t> *>(_sc_signal))) (*(static_cast<sc_in <uint64_t> *>(signal->_sc_signal))); break;} 35 default : {throw (ErrorMorpheo ("Signal \""+_name+"\" : type unknow.")); break;} 36 } 37 else 38 if ((_direction == OUT) and (signal->_direction == OUT)) 39 { 40 signal->_sc_signal_map = _sc_signal_map; 29 // List of all case 30 // 31 // dest src dest src 32 // PORT {IN } ----- {SIG} COMBI 33 // PORT {OUT} ----- {SIG} COMBI 34 // 35 // PORT {IN } --X-- {OUT} COMPONENT {IN } ----- {OUT} COMPONENT 36 // PORT {IN } ----- {IN } COMPONENT {IN } --X-- {IN } COMPONENT 37 // PORT {OUT} ----- {OUT} COMPONENT {OUT} --X-- {OUT} COMPONENT 38 // PORT {OUT} --X-- {IN } COMPONENT {OUT} ----- {IN } COMPONENT 41 39 42 switch (_type_info) 43 { 44 case BOOL : {(*(static_cast<sc_out <bool > *>(_sc_signal))) (*(static_cast<sc_out <bool > *>(signal->_sc_signal))); break;} 45 case UINT8_T : {(*(static_cast<sc_out <uint8_t > *>(_sc_signal))) (*(static_cast<sc_out <uint8_t > *>(signal->_sc_signal))); break;} 46 case UINT16_T : {(*(static_cast<sc_out <uint16_t> *>(_sc_signal))) (*(static_cast<sc_out <uint16_t> *>(signal->_sc_signal))); break;} 47 case UINT32_T : {(*(static_cast<sc_out <uint32_t> *>(_sc_signal))) (*(static_cast<sc_out <uint32_t> *>(signal->_sc_signal))); break;} 48 case UINT64_T : {(*(static_cast<sc_out <uint64_t> *>(_sc_signal))) (*(static_cast<sc_out <uint64_t> *>(signal->_sc_signal))); break;} 49 default : {throw (ErrorMorpheo ("Signal \""+_name+"\" : type unknow.")); break;} 50 } 51 } 52 else 53 if ((_direction == IN ) and (signal->_direction == OUT)) 54 switch (_type_info) 55 { 56 case BOOL : {(*(static_cast<sc_in <bool > *>(_sc_signal))) (*(static_cast<sc_out <bool > *>(signal->_sc_signal))); break;} 57 case UINT8_T : {(*(static_cast<sc_in <uint8_t > *>(_sc_signal))) (*(static_cast<sc_out <uint8_t > *>(signal->_sc_signal))); break;} 58 case UINT16_T : {(*(static_cast<sc_in <uint16_t> *>(_sc_signal))) (*(static_cast<sc_out <uint16_t> *>(signal->_sc_signal))); break;} 59 case UINT32_T : {(*(static_cast<sc_in <uint32_t> *>(_sc_signal))) (*(static_cast<sc_out <uint32_t> *>(signal->_sc_signal))); break;} 60 case UINT64_T : {(*(static_cast<sc_in <uint64_t> *>(_sc_signal))) (*(static_cast<sc_out <uint64_t> *>(signal->_sc_signal))); break;} 61 default : {throw (ErrorMorpheo ("Signal \""+_name+"\" : type unknow.")); break;} 62 } 63 else 64 if ((_direction == OUT) and (signal->_direction == IN )) 40 // log_printf(TRACE,Behavioural,FUNCTION, "Signal \"%s\"\tlink with \"%s\"", _name.c_str(), signal->get_name().c_str()); 41 42 log_printf(TRACE,Behavioural,FUNCTION, " * sc_signal (before) %.8x - %.8x", (uint32_t)(_sc_signal_map), (uint32_t)(signal->_sc_signal_map)); 43 44 _connect_to_signal = signal; 45 signal->_connect_from_signal = this; 46 47 if (is_port_component == true) 48 { 49 if ((_direction == IN ) and (signal->_direction == IN )) 50 { 65 51 switch (_type_info) 66 52 { 67 case BOOL : {(*(static_cast<sc_ out<bool > *>(_sc_signal))) (*(static_cast<sc_in <bool > *>(signal->_sc_signal))); break;}68 case UINT8_T : {(*(static_cast<sc_ out<uint8_t > *>(_sc_signal))) (*(static_cast<sc_in <uint8_t > *>(signal->_sc_signal))); break;}69 case UINT16_T : {(*(static_cast<sc_ out<uint16_t> *>(_sc_signal))) (*(static_cast<sc_in <uint16_t> *>(signal->_sc_signal))); break;}70 case UINT32_T : {(*(static_cast<sc_ out<uint32_t> *>(_sc_signal))) (*(static_cast<sc_in <uint32_t> *>(signal->_sc_signal))); break;}71 case UINT64_T : {(*(static_cast<sc_ out<uint64_t> *>(_sc_signal))) (*(static_cast<sc_in <uint64_t> *>(signal->_sc_signal))); break;}72 default : {throw (ErrorMorpheo (" Signal \""+_name+"\" : type unknow.")); break;}53 case BOOL : {(*(static_cast<sc_in <bool > *>(_sc_signal))) (*(static_cast<sc_in <bool > *>(signal->_sc_signal))); break;} 54 case UINT8_T : {(*(static_cast<sc_in <uint8_t > *>(_sc_signal))) (*(static_cast<sc_in <uint8_t > *>(signal->_sc_signal))); break;} 55 case UINT16_T : {(*(static_cast<sc_in <uint16_t> *>(_sc_signal))) (*(static_cast<sc_in <uint16_t> *>(signal->_sc_signal))); break;} 56 case UINT32_T : {(*(static_cast<sc_in <uint32_t> *>(_sc_signal))) (*(static_cast<sc_in <uint32_t> *>(signal->_sc_signal))); break;} 57 case UINT64_T : {(*(static_cast<sc_in <uint64_t> *>(_sc_signal))) (*(static_cast<sc_in <uint64_t> *>(signal->_sc_signal))); break;} 58 default : {throw (ErrorMorpheo ("<Signal::link> Signal \""+_name+"\" : type unknow.")); break;} 73 59 } 74 else 75 throw (ErrorMorpheo ("Signal \""+_name+"\" : unsupported direction to link.")); 60 } 61 else 62 { 63 if ((_direction == OUT) and (signal->_direction == OUT)) 64 { 65 _is_map = true; 66 signal->_sc_signal_map = _sc_signal_map; 67 68 switch (_type_info) 69 { 70 case BOOL : {(*(static_cast<sc_out <bool > *>(_sc_signal))) (*(static_cast<sc_out <bool > *>(signal->_sc_signal))); break;} 71 case UINT8_T : {(*(static_cast<sc_out <uint8_t > *>(_sc_signal))) (*(static_cast<sc_out <uint8_t > *>(signal->_sc_signal))); break;} 72 case UINT16_T : {(*(static_cast<sc_out <uint16_t> *>(_sc_signal))) (*(static_cast<sc_out <uint16_t> *>(signal->_sc_signal))); break;} 73 case UINT32_T : {(*(static_cast<sc_out <uint32_t> *>(_sc_signal))) (*(static_cast<sc_out <uint32_t> *>(signal->_sc_signal))); break;} 74 case UINT64_T : {(*(static_cast<sc_out <uint64_t> *>(_sc_signal))) (*(static_cast<sc_out <uint64_t> *>(signal->_sc_signal))); break;} 75 default : {throw (ErrorMorpheo ("<Signal::link> Signal \""+_name+"\" : type unknow.")); break;} 76 } 77 } 78 else 79 { 80 throw (ErrorMorpheo ("<Signal::link> Signal \""+_name+"\" can't been linked with signal \""+signal->get_name()+"\" : between two components, illegal direction ("+toString(_direction)+" with "+toString(signal->_direction)+").")); 81 } 82 } 83 } 84 else 85 { 86 if ((_direction == IN ) and (signal->_direction == OUT)) 87 { 88 switch (_type_info) 89 { 90 case BOOL : {(*(static_cast<sc_in <bool > *>(_sc_signal))) (*(static_cast<sc_out <bool > *>(signal->_sc_signal))); break;} 91 case UINT8_T : {(*(static_cast<sc_in <uint8_t > *>(_sc_signal))) (*(static_cast<sc_out <uint8_t > *>(signal->_sc_signal))); break;} 92 case UINT16_T : {(*(static_cast<sc_in <uint16_t> *>(_sc_signal))) (*(static_cast<sc_out <uint16_t> *>(signal->_sc_signal))); break;} 93 case UINT32_T : {(*(static_cast<sc_in <uint32_t> *>(_sc_signal))) (*(static_cast<sc_out <uint32_t> *>(signal->_sc_signal))); break;} 94 case UINT64_T : {(*(static_cast<sc_in <uint64_t> *>(_sc_signal))) (*(static_cast<sc_out <uint64_t> *>(signal->_sc_signal))); break;} 95 default : {throw (ErrorMorpheo ("<Signal::link> Signal \""+_name+"\" : type unknow.")); break;} 96 } 97 } 98 else 99 { 100 if ((_direction == OUT) and (signal->_direction == IN )) 101 { 102 _is_map = true; 103 switch (_type_info) 104 { 105 case BOOL : {(*(static_cast<sc_out <bool > *>(_sc_signal))) (*(static_cast<sc_in <bool > *>(signal->_sc_signal))); break;} 106 case UINT8_T : {(*(static_cast<sc_out <uint8_t > *>(_sc_signal))) (*(static_cast<sc_in <uint8_t > *>(signal->_sc_signal))); break;} 107 case UINT16_T : {(*(static_cast<sc_out <uint16_t> *>(_sc_signal))) (*(static_cast<sc_in <uint16_t> *>(signal->_sc_signal))); break;} 108 case UINT32_T : {(*(static_cast<sc_out <uint32_t> *>(_sc_signal))) (*(static_cast<sc_in <uint32_t> *>(signal->_sc_signal))); break;} 109 case UINT64_T : {(*(static_cast<sc_out <uint64_t> *>(_sc_signal))) (*(static_cast<sc_in <uint64_t> *>(signal->_sc_signal))); break;} 110 default : {throw (ErrorMorpheo ("<Signal::link> Signal \""+_name+"\" : type unknow.")); break;} 111 } 112 } 113 else 114 { 115 throw (ErrorMorpheo ("<Signal::link> Signal \""+_name+"\" can't been linked with signal \""+signal->get_name()+"\" : between a interface's port and one component, illegal direction ("+toString(_direction)+" with "+toString(signal->_direction)+").")); 116 } 117 } 118 } 76 119 120 log_printf(TRACE,Behavioural,FUNCTION, " * sc_signal (after ) %.8x - %.8x", (uint32_t)(_sc_signal_map), (uint32_t)(signal->_sc_signal_map)); 77 121 log_printf(FUNC,Behavioural,FUNCTION,"End"); 78 122 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_mapping.cpp
r43 r44 12 12 namespace behavioural { 13 13 14 #undef FUNCTION15 #define FUNCTION "Signal::mapping"16 void Signal::mapping (Signal * signal)17 {18 log_printf(FUNC,Behavioural,FUNCTION,"Begin");14 // #undef FUNCTION 15 // #define FUNCTION "Signal::mapping" 16 // void Signal::mapping (Signal * signal) 17 // { 18 // log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 19 19 20 if (_is_map == true)21 throw (ErrorMorpheo ("<Signal::mapping> Can't mapping signal \""+_name+"\" with \""+signal->get_name()+"\", because it's already map."));20 // if (_is_map == true) 21 // throw (ErrorMorpheo ("<Signal::mapping> Can't mapping signal \""+_name+"\" with \""+signal->get_name()+"\", because it's already map.")); 22 22 23 if (signal->_is_allocate == false)24 throw (ErrorMorpheo ("<Signal::mapping> Signal \""+_name+"\", can't map with signal \""+signal->get_name()+"\", because it's not already allocate."));23 // if (signal->_is_allocate == false) 24 // throw (ErrorMorpheo ("<Signal::mapping> Signal \""+_name+"\", can't map with signal \""+signal->get_name()+"\", because it's not already allocate.")); 25 25 26 if (_direction == OUT)27 {28 // This output is mapped29 _is_map = true;26 // if (_direction == OUT) 27 // { 28 // // This output is mapped 29 // _is_map = true; 30 30 31 if (signal->_direction == OUT)32 _sc_signal_map = signal->_sc_signal_map;33 }31 // if (signal->_direction == OUT) 32 // _sc_signal_map = signal->_sc_signal_map; 33 // } 34 34 35 log_printf(FUNC,Behavioural,FUNCTION,"End");36 };35 // log_printf(FUNC,Behavioural,FUNCTION,"End"); 36 // }; 37 37 38 38 }; // end namespace behavioural -
trunk/IPs/systemC/processor/Morpheo/Common/include/Debug.h
r43 r44 48 48 } \ 49 49 } \ 50 fprintf(stdout,"In file %s, ",__FILE__); \ 51 fprintf(stdout,"at line %d, ",__LINE__); \ 50 fprintf(stdout,"<%s> ",func); \ 52 51 if (DEBUG >= DEBUG_FUNC) \ 53 { \ 54 fprintf(stdout,"in function \"%s\" ",func); \ 55 } \ 52 { \ 53 fprintf(stdout,"In file %s, ",__FILE__); \ 54 fprintf(stdout,"at line %d, ",__LINE__); \ 55 } \ 56 56 fprintf(stdout,": "); \ 57 57 fprintf(stdout,str); \ -
trunk/IPs/systemC/processor/Morpheo/Common/include/Test.h
r43 r44 5 5 #include <sstream> 6 6 #include <stdint.h> 7 #include " Include/ErrorMorpheo.h"7 #include "Common/include/ErrorMorpheo.h" 8 8 using namespace std; 9 9 … … 42 42 }; 43 43 44 #define TEST(type,exp1,exp2) do { test<type> (exp1,exp2,__FILE__,__LINE__);} while(0) 44 #define TEST(type,exp1,exp2) do { test<type> (exp1,exp2,__FILE__,__LINE__);} while(0) 45 #define TEST_STR(type,exp1,exp2,str...) do { fprintf(stdout,str); test<type> (exp1,exp2,__FILE__,__LINE__);} while(0) 45 46 46 47 #endif -
trunk/IPs/systemC/processor/Morpheo/Documentation/Source/Documents/document-cache-specification/fr/root.tex
r42 r44 1 \Section{Introduction - Motivation} 2 Les processeurs haute performance lancent plusieurs instructions, de manières non ordonnées et spéculativement. Un défaut de cache ne doit pas bloquer le processeur. Le cache doit pouvoir accepter des requêtes pendant le traitement d'un MISS. Il s'agit du concept de cache non bloquant. 1 \Section{Introduction} 2 \subSection{Motivations} 3 Les processeurs haute performance lancent plusieurs instructions, de manière non ordonnée et spéculativement. Un défaut de cache ne doit pas bloquer le processeur. Le cache doit être non blouqant, c'est à dire qu'il doit pouvoir accepter des requêtes venant du processeur pendant le traitement d'un MISS. 4 5 \subSection{Démarche du document} 6 Le document est accès en quatre parties : 7 \begin{itemize} 8 \item Section \ref{overview_partial} : dans un premier temps, nous allons présenter une architecture qui satisfait des requêtes courantes (lectures / écritures, succès / échec) sur des adresses non conflictuelles. Cette première architecture est utilisable dans la majorité des cas. 9 \item Section \ref{problem} : dans cette section, nous allons analyser des problèmes arrivant lors d'accès à des adresses conflictuelles, et/ou dans un environnement multi contexte. Pour chaque problème, nous proposons des solutions. 10 \item Section \ref{overview_full} : cette section est la synthèse des deux précedentes. Nous allons modifier l'architecture de départ afin d'apporter des solutions aux problèmes énumérés dans la section \ref{problem}. 11 \item Section \ref{description} : cette dernière section énumère les structures internes, ainsi que les automates de la solution retenue dans la section \ref{overview_full}. 12 \end{itemize} 3 13 4 14 \subSection{Paramètres nécessaires} 5 15 \subsubSection{Paramètres interne du cache} 6 \begin{itemize} 7 \item Taille du mot 8 \item Nombre de lignes par mot 9 \item Nombre de lignes 10 \item Associativité 11 \item Nombre d'interface 12 \item Taille des files internes 13 \end{itemize} 16 17 \begin{center} 18 \begin{tabular}{|ll|ccc|} 19 \hline 20 Paramètres & & Min & Max & Pas \\ 21 \hline 22 Taille du mot & SIZE\_WORD & 32 bits & 64 bits & *2 \\ 23 Nombre de lignes par mot & NB\_WORD & 1 mot & 64 mots & *2 \\ 24 Nombre de lignes & NB\_LINE & 1 ligne & 1024 lignes & *2 \\ 25 Associativité & ASSOC & 1 banc de NB\_LINE lignes & NB\_LINE/16 bancs de 16 lignes & *2 \\ 26 Taille des files internes & SIZE\_QUEUE & 1 case & 64 cases & *2 \\ 27 \hline 28 \end{tabular} 29 \end{center} 14 30 15 31 \subsubSection{Paramètres de l'interface cache / processeur} 16 \begin{itemize} 17 \item Nombre de bits composant une donnée 18 \item Nombre de bits composant une adresse 19 \item Nombre de bits composant l'identifiant du propriétaire 20 \item Nombre de bits composant l'identifiant de transaction 21 \end{itemize} 32 33 \begin{center} 34 \begin{tabular}{|ll|ccc|} 35 \hline 36 Paramètres & & Min & Max & Pas \\ 37 \hline 38 Taille d'une donnée & SIZE\_DATA & 32 bits & 64 bits & *2 \\ 39 Taille de l'adresse & SIZE\_ADDR & 32 bits & 64 bits & *2 \\ 40 Taille de l'identifiant du propriétaire & SIZE\_TRDID & 0 bits & 4 bits & +1 \\ 41 Taille de l'identifiant de transaction & SIZE\_PKTID & 0 bits & 4 bits & +1 \\ 42 \hline 43 \end{tabular} 44 \end{center} 22 45 23 46 \subSection{Spécification} 24 47 \begin{itemize} 25 \item Write through 26 \item Write no allocate 27 \item Les requêtes envoyé par le processeur ne garantisse pas le stricte ordre séquentielle du programme. 28 \item Associatif : 1, N, Totalement 29 \end{itemize} 30 31 \Section{Vue d'ensemble - Modèle simplifié} 32 33 \printgraphonly{CACHE_overview_save}{.8} 48 \item Write through (Les données sont à la fois écrite dans le bloc du cache et dans le bloc de la mémoire de niveau inférieur). 49 \item Write no allocate (Les échecs d'écriture n'affectent pas le cache, le bloc n'est modifié que dans le niveau mémoire inférieur). 50 \item Cache associatif (Le cache est découpé plusieurs banc et une ligne peut être placé dans n'importe quel banc.) 51 \item Non bloquant (Le cache permet d'avoir plusieurs requêtes en cours de résolution) 52 \item Le modèle de consistance mémoires du processeur est relachés (Nous permettons aux lectures et aux écritures de se lancer et de se terminer de manière non ordonnées.) 53 \end{itemize} 54 55 \subSection{Hypothèse de travail} 56 57 Nous allons supposer que le cache sera connecté à un processeur superscalaire d'ordre 4. Que le code exécuté contient 20\% de lectures et 10 \% d'écritures. Nous avons donc en moyenne 1 accès mémoire par cycle. 58 Si nous ciblons un cache ayant au minimum 90\% de réussites, nous obtenons alors les ratios suivants : 59 \begin{itemize} 60 \item 60 \% de lectures qui réussissent. 61 \item 30 \% d'écritures qui réussissent. 62 \item 6,6\% de lectures qui échouent. 63 \item 3,3\% d'écritures qui échouent. 64 \end{itemize} 65 66 \Section{Vue d'ensemble - Modèle simplifié}\label{overview_partial} 67 68 \printgraphonly{CACHE_overview_basic}{.8} 34 69 35 70 Dans un premier temps, nous allons montrer un modèle qui satisfait les cas de requêtes courantes : read hit, write hit, read miss et write miss, sur des adresses non conflictuelles. 36 71 37 Afin de réaliser un cache non bloquant, nous avons séparé l'interface des requêtes de l'interface des réponses. Pour cela, 4 automates gèrent les interfaces et la gestion des ressources. La micro-architecture du cache ce décompose comme suit : 72 73 Afin de réaliser un cache non bloquant, nous avons séparé l'interface des requêtes, de l'interface des réponses. Pour cela, 4 automates gèrent les interfaces et la gestion des ressources. La micro-architecture du cache ce décompose comme suit : 38 74 \begin{itemize} 39 75 \item Quatre automates : 40 76 \begin{description} 41 77 \item[FSM\_DCACHE\_REQ :] Cet automate gère la consommation des requêtes provenant du cache et, suivant le type d'accès et la réussite de l'accès, l'écriture dans les blocs QUEUE\_REQ et QUEUE\_READ\_HIT 42 \item[FSM\_DCACHE\_RSP :] L'automate gère la consommation de réponses contenue dans la QUEUE\_RSP et s'occupe d'écrire les lignes chargés dans le cache.78 \item[FSM\_DCACHE\_RSP :] L'automate gère la consommation de réponses contenues dans la QUEUE\_RSP et s'occupe d'écrire les lignes chargés dans le cache. 43 79 \item[FSM\_VCI\_REQ :] L'automate s'occupe de consommer une requête contenue dans la QUEUE\_REQ (si la file n'est pas vide) et la lance sur l'interface VCI\_REQ (si l'interface n'est pas occupée). 44 80 \item[FSM\_VCI\_RSP :] L'automate s'occupe de consommer des réponses sur l'interface VCI\_RSP (si l'interface n'est pas occupée) et l'écrit dans la file QUEUE\_RSP (si la file n'est pas pleine). … … 47 83 \begin{description} 48 84 \item[QUEUE\_READ\_HIT :] Cette file d'attente s'occupe de transmettre le plus tôt possible les requêtes de lectures ayant fait un HIT. 49 \item[QUEUE\_REQ :] Cette file est utilisée comme tampon d'écriture et de requête de lecture ayant fait un miss. Elle attend e leur envoieà la mémoire.85 \item[QUEUE\_REQ :] Cette file est utilisée comme tampon d'écriture et de requête de lecture ayant fait un miss. Elle attend leur envoi à la mémoire. 50 86 \item[QUEUE\_RSP :] La file est utilisée comme tampon pour les réponses provenant de la mémoire. 51 87 \end{description} 52 88 \item Trois blocs mémoires : 53 89 \begin{description} 54 \item[RAM\_TAG :] Contient les informations pouvant identifier les adresses contenues dans cette ligne de cache. 55 \item[RAM\_DATA :] Contient les données de la ligne de cache. 90 \item[RAM\_TAG :] Contient les informations pouvant identifier les adresses contenues dans cette ligne de cache. Ce bloc est composé de ASSOC bancs de tailles identiques. 91 \item[RAM\_DATA :] Contient les données de la ligne de cache. Ce bloc est composé de ASSOC bancs de tailles identiques. 56 92 \item[RAM\_INFO :] Contient les informations relative aux requêtes pendantes. 57 93 \end{description} … … 62 98 63 99 \begin{description} 64 \item[Read - Hit :] La requête accède en par ralèle aux RAM\_TAG et au RAM\_DATA. La donnée lu est écrite dans la RAM\_INFO, alors que le pointeur vers RAM\_INFO est sauvegardé dans la QUEUE\_READ\_HIT. Ensuite la requête attendra d'être sélectionnée par l'automate FSM\_DCACHE\_RSP, puis va lire les informations à partir de la RAM\_INFO et seraacheminée vers le port de réponse.100 \item[Read - Hit :] La requête accède en parallèle aux RAM\_TAG et au RAM\_DATA. La donnée lue est écrite dans la RAM\_INFO, alors que le pointeur vers RAM\_INFO est sauvegardé dans le bloc QUEUE\_READ\_HIT. Ensuite la requête attend d'être sélectionnée par l'automate FSM\_DCACHE\_RSP, puis lit les informations à partir de la RAM\_INFO et est acheminée vers le port de réponse. 65 101 \item[Read - Miss :] La requête de lecture réalisant un miss, écrit les informations concernant la requête dans la RAM\_INFO. Le pointeur de RAM\_INFO sera écrit dans la QUEUE\_REQ. L'automate FSM\_VCI\_REQ va envoyer la requête sur le réseau VCI. La réponse reviendra par l'intermédiaire de l'automate FSM\_VCI\_RSP qui enregistre la ligne de cache en cours d'arrivée dans un tampon. Dès la réception de la fin de paquet, le tampon est enregistré dans la QUEUE\_RSP. L'identifiant de requête vci sera un index vers RAM\_INFO, c'est pour cela que lorsque l'automate FSM\_DCACHE\_REQ récupère une réponse dans la QUEUE\_RSP, elle peut retrouver les informations de la requêtes dans RAM\_INFO. 66 \item[Write - Hit :] Un write hit est équivalent àun read-miss : lors de la requête les informations sont stockées dans la RAM\_INFO (ainsi que la donnée à écrire). Lors de la réponse, (à la différence d'un read-miss, il n'y a pas de retour de ligne) la donnée à écrire va l'être dans le bloc RAM\_DATA.102 \item[Write - Hit :] La gestion d'un write hit est équivalent à celle d'un read-miss : lors de la requête les informations sont stockées dans la RAM\_INFO (ainsi que la donnée à écrire). Lors de la réponse, (à la différence d'un read-miss, il n'y a pas de retour de ligne) la donnée à écrire va l'être dans le bloc RAM\_DATA. 67 103 \item[Write - Miss :] Un échec d'écriture est équivalent à une réussite d'écriture mais sans mise à jour du cache. 68 104 \item[Lock et Prefetch :] Ce cache n'implémentant ces fonctionnalités et étant le dernier niveau de cache avant l'accès à l'interconnect, alors ces requêtes sont traitées comme étant des Read Hit (sans lecture du cache) … … 76 112 Nous optons pour la deuxième solution. Ce choix est également motiver pour uniformiser les solutions proposées pour les problèmes de consistances mémoires. 77 113 78 \Section{Quelques problèmes du modèle simplifié} 114 \Section{Quelques problèmes du modèle simplifié}\label{problem} 79 115 Dans cette section, nous allons voir quelques problèmes fonctionnelle du modèle de base et nous allons présenter des solutions. 80 116 … … 179 215 Le cache est optimisé pour utiliser les propriétés de localité spatiale et temporelle d'un programme. Avec le multi-contexte, le cache va être soumit à plusieurs flot qui ne sont pas dépendant entre eux. Ceci va entraîner des évincements de lignes en faveur d'un contexte, alors que la ligne victime pouvait être utilisée par un autre contexte. De plus, ceci va augmenter le phénomène décrit dans la section "Évincement précoce de ligne" : des écritures non encore finalisées vont voir leur lignes cibles évincées. 180 216 181 \Section{Vue d'ensemble - Modèle complet} 217 \Section{Vue d'ensemble - Modèle complet}\label{overview_full} 182 218 Cette section à pour but de montrer les modifications par rapport au modèle de base. 183 219 … … 215 251 \end{tabular} 216 252 217 \Section{Description détaillée} 253 \Section{Description détaillée}\label{description} 218 254 219 255 \subSection{Structure interne} 256 257 Pour chaque composant interne, les interfaces suivent le protocole fifo (le producteur possède une sortie VAL qui indique s'il a une requête valide et le consommateur possède une sortie ACK qui indique s'il peut accepter une transaction. Il y a une transaction si VAL et ACK sont tous les deux à 1 à la fin d'un cycle). L'avantage est qu'il est très facile de faire du contrôle de flux. 258 220 259 Nous allons maintenant détailler les ressources internes du cache non bloquant : 221 260 \begin{itemize} … … 224 263 \item[QUEUE\_READ\_HIT :] Cette file d'attente s'occupe de transmettre le plus tôt possible les requêtes de lecture ayant fait un HIT. 225 264 \begin{description} 226 \item {\it Valid : } Indique si l'entrée correspondante contient une donnée valide265 %\item {\it Valid : } Indique si l'entrée correspondante contient une donnée valide 227 266 \item {\it Index : } Index vers une entrée de RAM\_INFO 228 267 \end{description} 268 \printgraphonly{CACHE_bloc_QUEUE_READ_HIT}{.8} 229 269 \item[QUEUE\_REQ :] Cette file est utilisée comme tampon d'écriture et de requête de lecture ayant fait un miss. Elle attende leur envoie à la mémoire. 230 270 \begin{description} 231 \item {\it Valid : } Indique si l'entrée correspondante contient une donnée valide271 %\item {\it Valid : } Indique si l'entrée correspondante contient une donnée valide 232 272 \item {\it Index : } Index vers une entrée de RAM\_INFO 233 273 \end{description} 274 \printgraphonly{CACHE_bloc_QUEUE_REQ}{.8} 234 275 \item[QUEUE\_RSP :] La file est utilisée comme tampon pour les réponses provenant de la mémoire. 235 276 \begin{description} 236 \item {\it Valid :} Indique si l'entrée correspondante contient une donnée valide277 %\item {\it Valid :} Indique si l'entrée correspondante contient une donnée valide 237 278 \item {\it Index :} Index vers une entrée de RAM\_INFO 238 279 \item {\it Line :} Contient la donnée retournée par l'interface de réponse 239 280 \item {\it Error :} Indique si l'accès effectué à généré une erreur ou pas. 240 281 \end{description} 282 \printgraphonly{CACHE_bloc_QUEUE_RSP}{.8} 241 283 \end{description} 242 284 \item Trois blocs mémoires : … … 246 288 \item {\it Tag :} Numéro du tag correspondant à la ligne 247 289 \end{description} 290 \printgraphonly{CACHE_bloc_RAM_TAG}{.8} 248 291 \item[RAM\_DATA :] Contient les données de la ligne de cache 249 292 \begin{description} 250 293 \item {\it Line :} Contient la ligne de cache proprement dite 251 294 \end{description} 295 \printgraphonly{CACHE_bloc_RAM_DATA}{.8} 252 296 \item[RAM\_LOCK :] Contient les bits de gestions de dépendances 253 297 \begin{description} … … 256 300 \item {\it Lock\_by\_write :} Si le bit est positionné, alors il existe une écriture pendante 257 301 \end{description} 302 \printgraphonly{CACHE_bloc_RAM_LOCK}{.8} 258 303 \item[RAM\_INFO :] Contient les informations relative au requête pendante. Pour plus de détails voir la section \ref{RAM_INFO} 259 304 \begin{description} … … 265 310 \item {\it Data :} Donnée (en cas d'écriture : DCACHE.REQ\_WDATA, en cas de lecture avec succès : contenu d'un mot de la ligne de cache) 266 311 \end{description} 312 \printgraphonly{CACHE_bloc_RAM_INFO}{.8} 267 313 \end{description} 268 314 \item Quatre automates : … … 289 335 Nous pouvons noter alors que nous pouvons accepter une requête sur le l'interface DCACHE\_REQ si la file de destination n'est pas vide ET s'il y a encore une place de libre dans RAM\_INFO. 290 336 337 %@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 291 338 Dans un premier temps, la taille de RAM\_INFO sera le nombre maximal de requêtes pendantes que le processeur peut admettre soit : \{nombre de contexte\} * \{taille de la load store queue\} (dans ce premier cas, RAM\_INFO n'a pas besoin de contenir le pktid et le trdid de la requête). De plus le nombre de port de lecture sera de 2. 292 339 … … 312 359 Dans ce cas ajouter une barrière de pipeline va consommer la requête mais le cache va être dans l'imposibilité de l'accepter et va empêcher d'en choisir une autre. 313 360 361 \subSection{Choix de la victime} 362 Pour la sélection des lignes à evincer, nous allons implémenter un algorithme pseudo aléatoire. 363 L'avantage de cet algorithme est de ne pas avoir besoin de sauvegarder un historique des accès. 364 365 \subSection{RAM mono-port}\label{mono-port} 366 367 La mémoire la plus dense est de la mémoire mono-port (soit une lecture, soit une écriture par cycle). 368 369 Comme chaque interface des blocs de RAM ont une interface fifo, elle intègre donc un contrôle de flux. Ceci les rends indépendant du nombre de port intégrer dans chaque bloc mémoire. (Par exemple, un le bloc RAM\_DATA est implémenté avec de la mémoire dual-port, alors les sorties READ\_ACK et WRITE\_ACK seront toujours égals à 1). 370 371 Néanmoins, nous devons prendre soin à ce que chaque étage du cache ne commande pas deux interfaces d'un même bloc RAM. Or dans la solution retenue, nous avons les blocs RAM\_TAG et RAM\_LOCK qui ont besoin de deux interfaces durant la partie DCACHE\_REQ. Pour cela nous devons réaliser une barrière de pipeline. 372 373 Le premier étages va réaliser les lectures, alors que le second va mettre à jour ces bancs. Il est à noter qu'il va devoir avoir un bypass car comme la RAM\_LOCK ainsi que le bloc RAM\_TAG n'a pas encore été mis à jour, cette requête peut être suivit par une autre requête qui entre en conflit. 374 375 Le graphe \ref{CACHE_overview_mono-port} montre les modifications à apporter au cache pour n'avoir qu'un port par étage. 376 377 \printgraphonly{CACHE_overview_mono-port}{.8} 378 379 \subSection{Structure du pipeline} 380 381 Suivant le type d'une requête, le temps de réponse minimal n'est pas le même (On pose N le nombre de cycle aller retour jusqu'a la mémoire et M le temps pour avoir une ligne de cache complète) : 382 \begin{itemize} 383 \item Read - Hit : 2 cycles. 384 \item Read - Miss : 4 + N + M cycles. 385 \item Write : 5 + N cycles. 386 \item Lock et Prefetch : 2 cycles. 387 \item Invalidate et Flush : 2 cycles. 388 \end{itemize} 389 390 \printgraphonly{CACHE_pipeline}{.8} 391 392 %\subSection{Signaux de contrôles} 393 %Dans cette section, nous allons voir les fonctions combinatoires permettant de gérer les différents signaux de contrôles -
trunk/IPs/systemC/processor/Morpheo/Documentation/Source/Makefile
r42 r44 50 50 PS_FILES = $(patsubst $(DIR_TEX)/%.tex,%.ps ,$(TEX_FILES)) 51 51 PDF_FILES = $(patsubst $(DIR_TEX)/%.tex,%.pdf,$(TEX_FILES)) 52 EPS_FILES = $(patsubst $(DIR_GRAPH)/%.p,$(DIR_SCHEMA_EPS)/%.eps,$(wildcard $(DIR_GRAPH)/*.p)) \53 $(patsubst $(DIR_SCHEMA)/%.fig,$(DIR_SCHEMA_ EPS)/%.eps,$(wildcard $(DIR_SCHEMA)/*.fig)) \54 $(patsubst $(DIR_SCHEMA)/%.eps,$(DIR_SCHEMA_ EPS)/%.eps,$(wildcard $(DIR_SCHEMA)/*.eps))52 PNG_FILES = $(patsubst $(DIR_GRAPH)/%.p,$(DIR_SCHEMA_PNG)/%.png,$(wildcard $(DIR_GRAPH)/*.p)) \ 53 $(patsubst $(DIR_SCHEMA)/%.fig,$(DIR_SCHEMA_PNG)/%.png,$(wildcard $(DIR_SCHEMA)/*.fig)) \ 54 $(patsubst $(DIR_SCHEMA)/%.eps,$(DIR_SCHEMA_PNG)/%.png,$(wildcard $(DIR_SCHEMA)/*.eps)) 55 55 56 56 #-------------------------------------------------------------------------------- … … 58 58 #-------------------------------------------------------------------------------- 59 59 .PHONY : all clean view help doc doc_all new delete 60 .SECONDARY : $(DVI_FILES) $(PS_FILES) $(PDF_FILES) $(EPS_FILES) $(DIR_SCHEMA_EPS) $(DIR_SCHEMA_PNG) 60 .SECONDARY : $(DVI_FILES) $(PS_FILES) $(PDF_FILES) $(PNG_FILES) $(DIR_SCHEMA_EPS) $(DIR_SCHEMA_PNG) 61 .PRECIOUS : %.pdf %.ps %.dvi $(DIR_SCHEMA_PNG)/%.png $(DIR_SCHEMA_EPS)/%.eps 61 62 62 63 all : help 63 64 64 doc : $(DIR_TEX) $( EPS_FILES)65 doc : $(DIR_TEX) $(PNG_FILES) 65 66 @ \ 66 67 for file in $(ALL_FILES); do \ … … 373 374 @$(MKDIR) $@ 374 375 376 $(DIR_SCHEMA_PNG)/%.png : $(DIR_SCHEMA_EPS)/%.eps $(DIR_SCHEMA_PNG) 377 @$(ECHO) "Generate files : $*.png" 378 # @$(EPS2PNG) $< $@ 379 375 380 $(DIR_SCHEMA_EPS)/%.eps : $(DIR_SCHEMA)/%.eps $(DIR_SCHEMA_EPS) $(DIR_SCHEMA_PNG) 376 381 @$(ECHO) "Generate files : $*.eps" 377 382 @$(CP) $(DIR_SCHEMA)/$*.eps $(DIR_SCHEMA_EPS) 378 @$(EPS2PNG) $@ $(DIR_SCHEMA_PNG)/$*.png379 383 380 384 $(DIR_SCHEMA_EPS)/%.eps : $(DIR_SCHEMA)/%.fig $(DIR_SCHEMA_EPS) $(DIR_SCHEMA_PNG) 381 385 @$(ECHO) "Generate files : $*.eps" 382 386 @$(FIG2EPS) $< $@ 383 @$(EPS2PNG) $@ $(DIR_SCHEMA_PNG)/$*.png384 387 385 388 $(DIR_SCHEMA_EPS)/%.eps : $(DIR_GRAPH)/%.p $(DIR_SCHEMA_EPS) $(DIR_SCHEMA_PNG) 386 389 @$(ECHO) "Generate files : $*.eps" 387 390 @$(CD) $(DIR_GRAPH); $(GNUPLOT) $*.p 388 @$(EPS2PNG) $@ $(DIR_SCHEMA_PNG)/$*.png389 391 390 392 #-------------------------------------------------------------------------------- -
trunk/IPs/systemC/processor/Morpheo/Documentation/Source/Package/document-cache-specification.sty
r42 r44 1 \def\review{2007/07/ 02}1 \def\review{2007/07/11} 2 2 %\def\review{\number\day/\number\month/\number\year\xspace} 3 3 4 \title{Cache - Specification}4 \title{Cache de données associatif et non bloquant\\{\it Spécification}} 5 5 6 6 \author{}
Note: See TracChangeset
for help on using the changeset viewer.