source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/src/Branch_Target_Buffer_Glue_genMealy_decod.cpp @ 81

Last change on this file since 81 was 81, checked in by rosiere, 16 years ago
  • Finish Environment (and test)
  • Continue predictor_unit
  • Add external tools
  • svn keyword "Id" set
  • Property svn:keywords set to Id
File size: 1.7 KB
Line 
1#ifdef SYSTEMC
2/*
3 * $Id: Branch_Target_Buffer_Glue_genMealy_decod.cpp 81 2008-04-15 18:40:01Z rosiere $
4 *
5 * [ Description ]
6 *
7 */
8
9#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/include/Branch_Target_Buffer_Glue.h"
10
11namespace morpheo {
12namespace behavioural {
13namespace core {
14namespace multi_front_end {
15namespace front_end {
16namespace prediction_unit {
17namespace branch_target_buffer {
18namespace branch_target_buffer_glue {
19
20#undef  FUNCTION
21#define FUNCTION "Branch_Target_Buffer_Glue::genMealy_decod"
22  void Branch_Target_Buffer_Glue::genMealy_decod (void)
23  {
24    log_printf(FUNC,Branch_Target_Buffer_Glue,FUNCTION,"Begin");
25
26    for (uint32_t i=0; i<_param->_nb_inst_decod; i++)
27      {
28        Tcontrol_t val          = PORT_READ(in_DECOD_VAL          [i]);
29        Tcontrol_t register_ack = PORT_READ(in_DECOD_REGISTER_ACK [i]);
30        Tcontrol_t victim_ack   = (_param->_have_port_victim)?PORT_READ(in_DECOD_VICTIM_ACK [i]):true;
31       
32        PORT_WRITE(out_DECOD_ACK            [i],         register_ack and victim_ack);
33        PORT_WRITE(out_DECOD_REGISTER_VAL   [i], val and                  victim_ack);
34
35        if (_param->_have_port_victim)
36          {
37        PORT_WRITE(out_DECOD_VICTIM_VAL     [i], val and register_ack );
38        if (not _param->_is_full_associative)
39        PORT_WRITE(out_DECOD_VICTIM_ADDRESS [i], (PORT_READ(in_DECOD_ADDRESS_SRC [i]) >> _param->_shift_bank)&_param->_mask_bank);
40          }
41      }
42
43    log_printf(FUNC,Branch_Target_Buffer_Glue,FUNCTION,"End");
44  };
45
46}; // end namespace branch_target_buffer_glue
47}; // end namespace branch_target_buffer
48}; // end namespace prediction_unit
49}; // end namespace front_end
50}; // end namespace multi_front_end
51}; // end namespace core
52}; // end namespace behavioural
53}; // end namespace morpheo             
54#endif
Note: See TracBrowser for help on using the repository browser.