source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Prediction_unit_Glue_transition.cpp @ 88

Last change on this file since 88 was 88, checked in by rosiere, 15 years ago

Almost complete design
with Test and test platform

File size: 1.2 KB
Line 
1#ifdef SYSTEMC
2/*
3 * $Id$
4 *
5 * [ Description ]
6 *
7 */
8
9#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/include/Prediction_unit_Glue.h"
10
11namespace morpheo                    {
12namespace behavioural {
13namespace core {
14namespace multi_front_end {
15namespace front_end {
16namespace prediction_unit {
17namespace prediction_unit_glue {
18
19
20#undef  FUNCTION
21#define FUNCTION "Prediction_unit_Glue::transition"
22  void Prediction_unit_Glue::transition (void)
23  {
24    log_begin(Prediction_unit_Glue,FUNCTION);
25
26    if (PORT_READ(in_NRESET) == 0)
27      {
28        reg_PREDICT_PRIORITY = 0;
29        reg_DECOD_PRIORITY   = 0;
30      }
31    else
32      {
33        // Round robin priority
34        reg_PREDICT_PRIORITY = (reg_PREDICT_PRIORITY+_param->_nb_inst_branch_predict)%_param->_nb_context; 
35        reg_DECOD_PRIORITY   = (reg_DECOD_PRIORITY  +1)%_param->_nb_decod_unit;
36      }
37#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
38    end_cycle ();
39#endif
40
41    log_end(Prediction_unit_Glue,FUNCTION);
42  };
43
44}; // end namespace prediction_unit_glue
45}; // end namespace prediction_unit
46}; // end namespace front_end
47}; // end namespace multi_front_end
48}; // end namespace core
49
50}; // end namespace behavioural
51}; // end namespace morpheo             
52#endif
Note: See TracBrowser for help on using the repository browser.