source: 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 @ 3

Last change on this file since 3 was 3, checked in by kane, 17 years ago

1) Ajout d'un "printer" XML pour la configuration de paramètres

2) Fin du composant "Two_Level_Branch_Predictor"

validation * systemc

  • vhdl
File size: 2.3 KB
Line 
1#ifdef VHDL_TESTBENCH
2/*
3 * $Id$
4 *
5 * [ Description ]
6 *
7 */
8
9#include "Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table/include/Pattern_History_Table.h"
10
11namespace morpheo                    {
12namespace behavioural {
13namespace stage_1_ifetch {
14namespace predictor {
15namespace meta_predictor {
16namespace two_level_branch_predictor {
17namespace pattern_history_table {
18
19
20  void Pattern_History_Table::vhdl_testbench_transition ()
21  {
22    log_printf(FUNC,Pattern_History_Table,"vhdl_testbench_transition","Begin");
23
24#ifndef SYSTEMCASS_SPECIFIC
25    sc_cycle(0);
26#endif   
27
28    // In order with file Pattern_History_Table_vhdl_testbench_port.cpp
29    // Warning : if a output depend of a subcomponent, take directly the port of subcomponent
30    // (because we have no control on the ordonnancer's policy)
31
32    for (uint32_t i=0; i<_param._nb_prediction; i++)
33      {
34        _vhdl_testbench->add_input  (PORT_READ( in_PREDICT_VAL     [i]));
35        _vhdl_testbench->add_output (PORT_READ(out_PREDICT_ACK     [i]));
36        _vhdl_testbench->add_input  (PORT_READ( in_PREDICT_ADDRESS [i]));
37        _vhdl_testbench->add_output (PORT_READ(component_RegisterFile->out_READ_DATA [i]));
38      //_vhdl_testbench->add_output (PORT_READ(out_PREDICT_HISTORY [i]));
39      }
40
41     for (uint32_t i=0; i<_param._nb_branch_complete; i++)
42       {
43         _vhdl_testbench->add_input  (PORT_READ( in_BRANCH_COMPLETE_VAL      [i]));
44         _vhdl_testbench->add_output (PORT_READ(out_BRANCH_COMPLETE_ACK      [i]));
45         _vhdl_testbench->add_input  (PORT_READ( in_BRANCH_COMPLETE_ADDRESS  [i]));
46         _vhdl_testbench->add_input  (PORT_READ( in_BRANCH_COMPLETE_HISTORY  [i]));
47         _vhdl_testbench->add_input  (PORT_READ( in_BRANCH_COMPLETE_DIRECTION[i]));
48       }
49       
50    // add_test :
51    //  - True  : the cycle must be compare with the output of systemC
52    //  - False : no test
53    _vhdl_testbench->add_test(true);
54
55    _vhdl_testbench->new_cycle (); // always at the end
56
57    log_printf(FUNC,Pattern_History_Table,"vhdl_testbench_transition","End");
58  };
59
60}; // end namespace pattern_history_table
61}; // end namespace two_level_branch_predictor
62}; // end namespace meta_predictor
63}; // end namespace predictor
64}; // end namespace stage_1_ifetch
65
66}; // end namespace behavioural
67}; // end namespace morpheo             
68#endif
Note: See TracBrowser for help on using the repository browser.