Ignore:
Timestamp:
Dec 10, 2008, 7:31:39 PM (16 years ago)
Author:
rosiere
Message:

Almost complete design
with Test and test platform

Location:
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit
Files:
1 added
11 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/SelfTest/Makefile

    r81 r88  
    2424library_clean                   : Register_Address_Translation_unit_library_clean
    2525
     26local_clean                     :
     27
    2628include                         $(DIR_COMPONENT)/Makefile.deps
    2729include                         $(DIR_MORPHEO)/Behavioural/Makefile.flags
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/SelfTest/src/main.cpp

    r81 r88  
    6060         _nb_special_register ,
    6161         _nb_inst_insert      ,
    62          _nb_inst_retire      );
     62         _nb_inst_retire      ,
     63         true //is_toplevel
     64         );
    6365     
    6466      msg(_("%s"),param->print(1).c_str());
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/SelfTest/src/test.cpp

    r82 r88  
    2424#endif
    2525
     26  Tusage_t _usage = USE_ALL;
     27
     28//   _usage = usage_unset(_usage,USE_SYSTEMC              );
     29//   _usage = usage_unset(_usage,USE_VHDL                 );
     30//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH       );
     31//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT);
     32//   _usage = usage_unset(_usage,USE_POSITION             );
     33//   _usage = usage_unset(_usage,USE_STATISTICS           );
     34//   _usage = usage_unset(_usage,USE_INFORMATION          );
     35
    2636  Register_Address_Translation_unit * _Register_Address_Translation_unit = new Register_Address_Translation_unit
    2737    (name.c_str(),
     
    3040#endif
    3141     _param,
    32      USE_ALL);
     42     _usage);
    3343 
    3444#ifdef SYSTEMC
     
    7888  ALLOC1_SC_SIGNAL( in_RETIRE_NUM_REG_RD_PHY_OLD," in_RETIRE_NUM_REG_RD_PHY_OLD",Tgeneral_address_t,_param->_nb_inst_retire);
    7989  ALLOC1_SC_SIGNAL( in_RETIRE_NUM_REG_RE_PHY_OLD," in_RETIRE_NUM_REG_RE_PHY_OLD",Tspecial_address_t,_param->_nb_inst_retire);
     90  ALLOC1_SC_SIGNAL(out_RETIRE_RESTORE_RD_PHY_OLD,"out_RETIRE_RESTORE_RD_PHY_OLD",Tcontrol_t        ,_param->_nb_inst_retire);
     91  ALLOC1_SC_SIGNAL(out_RETIRE_RESTORE_RE_PHY_OLD,"out_RETIRE_RESTORE_RE_PHY_OLD",Tcontrol_t        ,_param->_nb_inst_retire);
    8092 
    8193  /********************************************************
     
    131143  INSTANCE1_SC_SIGNAL(_Register_Address_Translation_unit, in_RETIRE_NUM_REG_RD_PHY_OLD,_param->_nb_inst_retire);
    132144  INSTANCE1_SC_SIGNAL(_Register_Address_Translation_unit, in_RETIRE_NUM_REG_RE_PHY_OLD,_param->_nb_inst_retire);
     145  INSTANCE1_SC_SIGNAL(_Register_Address_Translation_unit,out_RETIRE_RESTORE_RD_PHY_OLD,_param->_nb_inst_retire);
     146  INSTANCE1_SC_SIGNAL(_Register_Address_Translation_unit,out_RETIRE_RESTORE_RE_PHY_OLD,_param->_nb_inst_retire);
    133147
    134148  msg(_("<%s> : Start Simulation ............\n"),name.c_str());
     
    226240            }
    227241
     242          uint32_t retire_max = _param->_nb_inst_retire;
    228243          for (uint32_t i=0; i<_param->_nb_inst_retire; i++)
    229244            {
    230               Tcontrol_t val = (rand()%100)<percent_transaction_retire;
     245              // in order ...........
     246
     247              Tcontrol_t val = (i<retire_max) and ((rand()%100)<percent_transaction_retire);
    231248             
     249              if (not val)
     250                retire_max = i;
     251
    232252              Tcontext_t front_end_id = rand() % _param->_nb_front_end;
    233253
     
    259279                }
    260280            }
     281
     282          for (uint32_t i=0; i<_param->_nb_inst_retire; i++)
     283            {
     284              TEST(Tcontrol_t,out_RETIRE_RESTORE_RD_PHY_OLD[i]->read(), 0);
     285              TEST(Tcontrol_t,out_RETIRE_RESTORE_RE_PHY_OLD[i]->read(), 0);
     286            }
     287
    261288          for (uint32_t i=0; i<_param->_nb_inst_insert; i++)
    262289            {
     
    320347      SC_START(1);
    321348
     349      // EVENT !!!!!!!!
     350
    322351      nb_request = 32;
    323352      while (nb_request > 1)
     
    347376            }
    348377
     378          uint32_t retire_max = _param->_nb_inst_retire;
    349379          for (uint32_t i=0; i<_param->_nb_inst_retire; i++)
    350380            {
    351               Tcontrol_t val = (rand()%100)<percent_transaction_retire;
     381              // in order ...........
     382
     383              Tcontrol_t val = (i<retire_max) and ((rand()%100)<percent_transaction_retire);
     384             
     385              if (not val)
     386                retire_max = i;
     387
    352388              in_RETIRE_VAL                [i]->write(val);
    353389              in_RETIRE_FRONT_END_ID       [i]->write(retire_front_end_id [i]);
     
    362398            }
    363399
    364           SC_START(1);
     400          SC_START(0);
    365401         
    366402
     
    380416          for (uint32_t i=0; i<_param->_nb_inst_retire; i++)
    381417            {
     418              LABEL("RETIRE[%d]",i);
     419
    382420              Tcontext_t front_end_id = in_RETIRE_FRONT_END_ID [i]->read();
    383421              Tcontext_t context_id   = in_RETIRE_CONTEXT_ID   [i]->read();
     422
     423              LABEL("  * front_end_id : %d",front_end_id);
     424              LABEL("  * context_id   : %d",context_id  );
     425
    384426              if (in_RETIRE_VAL [i]->read() and out_RETIRE_ACK [i]->read())
    385427                {
    386428                  if (in_RETIRE_WRITE_RD [i]->read() == 1)
    387429                    {
     430//                       LABEL("  * transaction and write rd");
     431//                       LABEL("    * rd_log       : %d",in_RETIRE_NUM_REG_RD_LOG[i]->read());
     432//                       LABEL("    * rat_gpr_updt : %d",rat_gpr_updt [front_end_id][context_id][in_RETIRE_NUM_REG_RD_LOG[i]->read()]);
     433                      TEST(Tcontrol_t,out_RETIRE_RESTORE_RD_PHY_OLD[i]->read(), (rat_gpr_updt [front_end_id][context_id][in_RETIRE_NUM_REG_RD_LOG[i]->read()] == false));
     434
    388435                      if (rat_gpr_updt [front_end_id][context_id][in_RETIRE_NUM_REG_RD_LOG[i]->read()] == false)
    389436                        rat_gpr[front_end_id][context_id][in_RETIRE_NUM_REG_RD_LOG[i]->read()] = in_RETIRE_NUM_REG_RD_PHY_OLD[i]->read();
     
    392439                  if (in_RETIRE_WRITE_RE [i]->read() == 1)
    393440                    {
     441                      TEST(Tcontrol_t,out_RETIRE_RESTORE_RE_PHY_OLD[i]->read(), (rat_spr_updt [front_end_id][context_id][in_RETIRE_NUM_REG_RE_LOG[i]->read()] == false));
     442
    394443                      if (rat_spr_updt [front_end_id][context_id][in_RETIRE_NUM_REG_RE_LOG[i]->read()] == false)
    395444                        rat_spr[front_end_id][context_id][in_RETIRE_NUM_REG_RE_LOG[i]->read()] = in_RETIRE_NUM_REG_RE_PHY_OLD[i]->read();
     
    398447                }
    399448            }
     449
     450          SC_START(1);
     451
    400452          for (uint32_t i=0; i<_param->_nb_inst_insert; i++)
    401453            {
     
    412464                  TEST(Tspecial_address_t,out_RENAME_NUM_REG_RE_PHY_OLD[i]->read(), rat_spr[front_end_id][context_id][in_RENAME_NUM_REG_RE_LOG[i]->read()]);
    413465                }
    414 
    415             }
     466            }
     467
    416468        }
    417469    }
     
    472524  delete []  in_RETIRE_NUM_REG_RD_PHY_OLD;
    473525  delete []  in_RETIRE_NUM_REG_RE_PHY_OLD;
     526  delete [] out_RETIRE_RESTORE_RD_PHY_OLD;
     527  delete [] out_RETIRE_RESTORE_RE_PHY_OLD;
    474528
    475529#endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/include/Parameters.h

    r82 r88  
    3232  public : uint32_t   _nb_inst_retire        ;   
    3333                     
    34   public : uint32_t   _size_front_end_id     ;
    35   public : uint32_t   _size_context_id       ;
    36   public : uint32_t   _size_general_register ;
    37   public : uint32_t   _size_special_register ;
    38                      
    39   public : uint32_t   _have_port_context_id  ;
    40   public : uint32_t   _have_port_front_end_id;
     34//public : uint32_t   _size_front_end_id     ;
     35//public : uint32_t   _size_context_id       ;
     36//public : uint32_t   _size_general_register ;
     37//public : uint32_t   _size_special_register ;
     38//                   
     39//public : uint32_t   _have_port_context_id  ;
     40//public : uint32_t   _have_port_front_end_id;
    4141
    4242    //-----[ methods ]-----------------------------------------------------------
     
    4646                        uint32_t   nb_special_register,
    4747                        uint32_t   nb_inst_insert     ,
    48                         uint32_t   nb_inst_retire     
     48                        uint32_t   nb_inst_retire     ,
     49                        bool       is_toplevel=false
    4950                        );
    5051//   public : Parameters  (Parameters & param) ;
    5152  public : ~Parameters () ;
     53
     54  public :        void            copy       (void);
    5255
    5356  public :        Parameters_test msg_error  (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/include/Register_Address_Translation_unit.h

    r82 r88  
    103103  public    : SC_IN (Tgeneral_address_t)   **  in_RETIRE_NUM_REG_RD_PHY_OLD;//[nb_inst_retire]
    104104  public    : SC_IN (Tspecial_address_t)   **  in_RETIRE_NUM_REG_RE_PHY_OLD;//[nb_inst_retire]
     105  public    : SC_OUT(Tcontrol_t        )   ** out_RETIRE_RESTORE_RD_PHY_OLD;//[nb_inst_retire]
     106  public    : SC_OUT(Tcontrol_t        )   ** out_RETIRE_RESTORE_RE_PHY_OLD;//[nb_inst_retire]
    105107
    106108    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    107109
    108110    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
     111  private   : Tgeneral_address_t          *** rat_gpr;                      //[nb_front_end][nb_context][nb_general_register_logic]
     112  private   : bool                        *** rat_gpr_update_table;         //[nb_front_end][nb_context][nb_general_register_logic]
     113  private   : Tspecial_address_t          *** rat_spr;                      //[nb_front_end][nb_context][nb_special_register_logic]
     114  private   : bool                        *** rat_spr_update_table;         //[nb_front_end][nb_context][nb_special_register_logic]
    109115
    110116    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     
    113119  private   : Tcontrol_t                    * internal_RETIRE_ACK;          //[nb_inst_retire]
    114120
    115   private   : Tgeneral_address_t          *** rat_gpr;                      //[nb_front_end][nb_context][nb_general_register_logic]
    116   private   : bool                        *** rat_gpr_update_table;         //[nb_front_end][nb_context][nb_general_register_logic]
    117   private   : Tspecial_address_t          *** rat_spr;                      //[nb_front_end][nb_context][nb_special_register_logic]
    118   private   : bool                        *** rat_spr_update_table;         //[nb_front_end][nb_context][nb_special_register_logic]
     121  private   : bool                        *** internal_rat_gpr_update_table;         //[nb_front_end][nb_context][nb_general_register_logic]
     122  private   : bool                        *** internal_rat_spr_update_table;         //[nb_front_end][nb_context][nb_special_register_logic]
    119123#endif
    120124
     
    150154#ifdef SYSTEMC                                 
    151155  public  : void        transition                (void);
    152   public  : void        genMoore                  (void);
     156  public  : void        genMealy_rename           (void);
     157  public  : void        genMealy_retire           (void);
    153158#endif                                         
    154159
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/src/Parameters.cpp

    r81 r88  
    2525                          uint32_t   nb_special_register,
    2626                          uint32_t   nb_inst_insert     ,
    27                           uint32_t   nb_inst_retire     )
     27                          uint32_t   nb_inst_retire     ,
     28                          bool       is_toplevel)
    2829  {
    2930    log_printf(FUNC,Register_Address_Translation_unit,FUNCTION,"Begin");
     
    3637    _nb_inst_retire         = nb_inst_retire     ;
    3738
    38     _size_front_end_id      = log2(nb_front_end       );
    39     _size_context_id        = log2(max<uint32_t>(nb_context, nb_front_end));
    40     _size_general_register  = log2(nb_general_register);
    41     _size_special_register  = log2(nb_special_register);
     39    test();
     40
     41    if (is_toplevel)
     42      {
     43        _size_front_end_id      = log2(nb_front_end       );
     44        _size_context_id        = log2(max<uint32_t>(nb_context, nb_front_end));
     45        _size_general_register  = log2(nb_general_register);
     46        _size_special_register  = log2(nb_special_register);
    4247   
    43     _have_port_front_end_id = _size_front_end_id>0;
    44     _have_port_context_id   = _size_context_id  >0;
    45 
    46     test();
     48        _have_port_front_end_id = _size_front_end_id>0;
     49        _have_port_context_id   = _size_context_id  >0;
     50       
     51        copy();
     52      }
    4753
    4854    log_printf(FUNC,Register_Address_Translation_unit,FUNCTION,"End");
     
    6066#undef  FUNCTION
    6167#define FUNCTION "Register_Address_Translation_unit::~Parameters"
    62   Parameters::~Parameters ()
     68  Parameters::~Parameters (void)
     69  {
     70    log_printf(FUNC,Register_Address_Translation_unit,FUNCTION,"Begin");
     71    log_printf(FUNC,Register_Address_Translation_unit,FUNCTION,"End");
     72  };
     73
     74#undef  FUNCTION
     75#define FUNCTION "Register_Address_Translation_unit::copy"
     76  void Parameters::copy (void)
    6377  {
    6478    log_printf(FUNC,Register_Address_Translation_unit,FUNCTION,"Begin");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/src/Register_Address_Translation_unit.cpp

    r81 r88  
    3939    log_printf(FUNC,Register_Address_Translation_unit,FUNCTION,"Begin");
    4040
     41#if DEBUG_Register_Address_Translation_unit == true
     42    log_printf(INFO,Register_Address_Translation_unit,FUNCTION,_("<%s> Parameters"),_name.c_str());
     43
     44    std::cout << *param << std::endl;
     45#endif   
     46
    4147    log_printf(INFO,Register_Address_Translation_unit,FUNCTION,"Allocation");
    4248
     
    4854
    4955#ifdef STATISTICS
    50     if (_usage & USE_STATISTICS)
     56    if (usage_is_set(_usage,USE_STATISTICS))
    5157      {
    5258        log_printf(INFO,Register_Address_Translation_unit,FUNCTION,"Allocation of statistics");
     
    5763
    5864#ifdef VHDL
    59     if (_usage & USE_VHDL)
     65    if (usage_is_set(_usage,USE_VHDL))
    6066      {
    6167        // generate the vhdl
     
    6773
    6874#ifdef SYSTEMC
    69     if (_usage & USE_SYSTEMC)
     75    if (usage_is_set(_usage,USE_SYSTEMC))
    7076      {
    7177        // Constant : accepted already transaction
     
    95101# endif   
    96102
    97         log_printf(INFO,Register_Address_Translation_unit,FUNCTION,"Method - genMoore");
     103        log_printf(INFO,Register_Address_Translation_unit,FUNCTION,"Method - genMealy_rename");
    98104
    99         SC_METHOD (genMoore);
     105        SC_METHOD (genMealy_rename);
    100106        dont_initialize ();
    101         sensitive << (*(in_CLOCK)).neg();
     107        sensitive << (*(in_CLOCK)).neg(); // need internal register
     108        for (uint32_t i=0; i<_param->_nb_inst_insert; i++)
     109          {
     110            if (_param->_have_port_front_end_id)
     111            sensitive << (*(in_RENAME_FRONT_END_ID   [i]));
     112            if (_param->_have_port_context_id  )
     113            sensitive << (*(in_RENAME_CONTEXT_ID     [i]));
     114           
     115            sensitive << (*(in_RENAME_NUM_REG_RA_LOG [i]))
     116                      << (*(in_RENAME_NUM_REG_RB_LOG [i]))
     117                      << (*(in_RENAME_NUM_REG_RC_LOG [i]))
     118                      << (*(in_RENAME_NUM_REG_RD_LOG [i]))
     119                      << (*(in_RENAME_NUM_REG_RE_LOG [i]));
     120      }
     121
     122
     123# ifdef SYSTEMCASS_SPECIFIC
     124        // List dependency information
     125# endif   
     126
     127        log_printf(INFO,Register_Address_Translation_unit,FUNCTION,"Method - genMealy_retire");
     128
     129        SC_METHOD (genMealy_retire);
     130        dont_initialize ();
     131        sensitive << (*(in_CLOCK)).neg(); // need internal register
     132        for (uint32_t i=0; i<_param->_nb_inst_retire; ++i)
     133          {
     134            if (param->_have_port_front_end_id)
     135            sensitive << (*(in_RETIRE_FRONT_END_ID   [i]));
     136            if (param->_have_port_context_id)
     137            sensitive << (*(in_RETIRE_CONTEXT_ID     [i]));
     138           
     139            sensitive << (*(in_RETIRE_EVENT_STATE    [i]))
     140                      << (*(in_RETIRE_WRITE_RD       [i]))
     141                      << (*(in_RETIRE_WRITE_RE       [i]))
     142                      << (*(in_RETIRE_NUM_REG_RD_LOG [i]))
     143                      << (*(in_RETIRE_NUM_REG_RE_LOG [i]));
     144          }
    102145       
    103146# ifdef SYSTEMCASS_SPECIFIC
     
    117160
    118161#ifdef STATISTICS
    119     if (_usage & USE_STATISTICS)
     162    if (usage_is_set(_usage,USE_STATISTICS))
    120163      {
    121164        log_printf(INFO,Register_Address_Translation_unit,FUNCTION,"Generate Statistics file");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/src/Register_Address_Translation_unit_allocation.cpp

    r81 r88  
    107107      ALLOC1_SIGNAL_IN ( in_RETIRE_NUM_REG_RD_PHY_OLD,"num_reg_rd_phy_old",Tgeneral_address_t,_param->_size_general_register);
    108108      ALLOC1_SIGNAL_IN ( in_RETIRE_NUM_REG_RE_PHY_OLD,"num_reg_re_phy_old",Tspecial_address_t,_param->_size_special_register);
     109      ALLOC1_SIGNAL_OUT(out_RETIRE_RESTORE_RD_PHY_OLD,"restore_rd_phy_old",Tcontrol_t        ,1);
     110      ALLOC1_SIGNAL_OUT(out_RETIRE_RESTORE_RE_PHY_OLD,"restore_re_phy_old",Tcontrol_t        ,1);
    109111    }
    110112
    111     // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
     113    if (usage_is_set(_usage,USE_SYSTEMC))
     114      {
    112115    internal_RENAME_ACK = new Tcontrol_t [_param->_nb_inst_insert];
    113116    internal_INSERT_ACK = new Tcontrol_t [_param->_nb_inst_insert];
    114117    internal_RETIRE_ACK = new Tcontrol_t [_param->_nb_inst_retire];
    115118
    116     rat_gpr              = new Tgeneral_address_t ** [_param->_nb_front_end];
    117     rat_gpr_update_table = new bool               ** [_param->_nb_front_end];
    118     rat_spr              = new Tspecial_address_t ** [_param->_nb_front_end];
    119     rat_spr_update_table = new bool               ** [_param->_nb_front_end];
     119    rat_gpr                       = new Tgeneral_address_t ** [_param->_nb_front_end];
     120    rat_spr                       = new Tspecial_address_t ** [_param->_nb_front_end];
     121    rat_gpr_update_table          = new bool               ** [_param->_nb_front_end];
     122    rat_spr_update_table          = new bool               ** [_param->_nb_front_end];
     123    internal_rat_gpr_update_table = new bool               ** [_param->_nb_front_end];
     124    internal_rat_spr_update_table = new bool               ** [_param->_nb_front_end];
    120125
    121126    for (uint32_t i=0; i<_param->_nb_front_end; i++)
    122127      {
    123         rat_gpr              [i] = new Tgeneral_address_t * [_param->_nb_context[i]];
    124         rat_gpr_update_table [i] = new bool               * [_param->_nb_context[i]];
    125         rat_spr              [i] = new Tspecial_address_t * [_param->_nb_context[i]];
    126         rat_spr_update_table [i] = new bool               * [_param->_nb_context[i]];
     128        rat_gpr                       [i] = new Tgeneral_address_t * [_param->_nb_context[i]];
     129        rat_spr                       [i] = new Tspecial_address_t * [_param->_nb_context[i]];
     130        rat_gpr_update_table          [i] = new bool               * [_param->_nb_context[i]];
     131        rat_spr_update_table          [i] = new bool               * [_param->_nb_context[i]];
     132        internal_rat_gpr_update_table [i] = new bool               * [_param->_nb_context[i]];
     133        internal_rat_spr_update_table [i] = new bool               * [_param->_nb_context[i]];
    127134
    128135        for (uint32_t j=0; j<_param->_nb_context[i]; j++)
    129136          {
    130             rat_gpr              [i][j] = new Tgeneral_address_t [_param->_nb_general_register_logic];
    131             rat_gpr_update_table [i][j] = new bool               [_param->_nb_general_register_logic];
    132             rat_spr              [i][j] = new Tspecial_address_t [_param->_nb_special_register_logic];
    133             rat_spr_update_table [i][j] = new bool               [_param->_nb_special_register_logic];
     137            rat_gpr                       [i][j] = new Tgeneral_address_t [_param->_nb_general_register_logic];
     138            rat_spr                       [i][j] = new Tspecial_address_t [_param->_nb_special_register_logic];
     139            rat_gpr_update_table          [i][j] = new bool               [_param->_nb_general_register_logic];
     140            rat_spr_update_table          [i][j] = new bool               [_param->_nb_special_register_logic];
     141            internal_rat_gpr_update_table [i][j] = new bool               [_param->_nb_general_register_logic];
     142            internal_rat_spr_update_table [i][j] = new bool               [_param->_nb_special_register_logic];
    134143          }
    135144      }
     145      }
     146
     147    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    136148
    137149#ifdef POSITION
    138     _component->generate_file();
     150    if (usage_is_set(_usage,USE_POSITION))
     151      _component->generate_file();
    139152#endif
    140153
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/src/Register_Address_Translation_unit_deallocation.cpp

    r81 r88  
    2424    log_printf(FUNC,Register_Address_Translation_unit,FUNCTION,"Begin");
    2525
    26     if (_usage & USE_SYSTEMC)
     26    if (usage_is_set(_usage,USE_SYSTEMC))
    2727      {
    2828        delete     in_CLOCK ;
     
    7272        delete []  in_RETIRE_NUM_REG_RD_PHY_OLD;
    7373        delete []  in_RETIRE_NUM_REG_RE_PHY_OLD;
     74        delete [] out_RETIRE_RESTORE_RD_PHY_OLD;
     75        delete [] out_RETIRE_RESTORE_RE_PHY_OLD;
     76
     77        delete [] internal_RENAME_ACK;
     78        delete [] internal_INSERT_ACK;
     79        delete [] internal_RETIRE_ACK;
     80       
     81        delete [] rat_gpr             ;
     82        delete [] rat_spr             ;
     83        delete [] rat_gpr_update_table;
     84        delete [] rat_spr_update_table;
     85        delete [] internal_rat_gpr_update_table;
     86        delete [] internal_rat_spr_update_table;
    7487      }
     88
    7589    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    76     delete [] internal_RENAME_ACK;
    77     delete [] internal_INSERT_ACK;
    78     delete [] internal_RETIRE_ACK;
    79 
    80     delete [] rat_gpr             ;
    81     delete [] rat_gpr_update_table;
    82     delete [] rat_spr             ;
    83     delete [] rat_spr_update_table;
    8490    delete    _component;
    8591
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/src/Register_Address_Translation_unit_end_cycle.cpp

    r81 r88  
    2626
    2727#ifdef STATISTICS
    28     _stat->end_cycle();
     28    if (usage_is_set(_usage,USE_STATISTICS))
     29      _stat->end_cycle();
    2930#endif   
    3031
     
    3233    // Evaluation before read the ouput signal
    3334//  sc_start(0);
    34     _interfaces->testbench();
     35    if (usage_is_set(_usage,USE_VHDL_TESTBENCH))
     36      _interfaces->testbench();
    3537#endif
    3638
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/src/Register_Address_Translation_unit_genMealy_rename.cpp

    r87 r88  
    2020
    2121#undef  FUNCTION
    22 #define FUNCTION "Register_Address_Translation_unit::genMoore"
    23   void Register_Address_Translation_unit::genMoore (void)
     22#define FUNCTION "Register_Address_Translation_unit::genMealy_rename"
     23  void Register_Address_Translation_unit::genMealy_rename (void)
    2424  {
    25     log_printf(FUNC,Register_Address_Translation_unit,FUNCTION,"Begin");
     25    log_begin(Register_Address_Translation_unit,FUNCTION);
     26    log_function(Register_Address_Translation_unit,FUNCTION,_name.c_str());
    2627
    2728    for (uint32_t i=0; i<_param->_nb_inst_insert; i++)
     
    3738      }
    3839
    39     log_printf(FUNC,Register_Address_Translation_unit,FUNCTION,"End");
     40    log_end(Register_Address_Translation_unit,FUNCTION);
    4041  };
    4142
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/src/Register_Address_Translation_unit_transition.cpp

    r81 r88  
    2323  void Register_Address_Translation_unit::transition (void)
    2424  {
    25     log_printf(FUNC,Register_Address_Translation_unit,FUNCTION,"Begin");
     25    log_begin(Register_Address_Translation_unit,FUNCTION);
     26    log_function(Register_Address_Translation_unit,FUNCTION,_name.c_str());
    2627
    2728    if (PORT_READ(in_NRESET) == 0)
     
    9091                    }
    9192
    92  
    93                   // Test if write and have not a previous update
     93                  // Test if write and have not a previous update
    9494                  if (PORT_READ(in_RETIRE_WRITE_RD [i]) == 1)
    9595                    {
    9696                      Tgeneral_address_t rd_log = PORT_READ(in_RETIRE_NUM_REG_RD_LOG [i]);
    9797                     
    98                       log_printf(NONE,Register_Address_Translation_unit,FUNCTION,"retire[%d]",i);
    99                       log_printf(NONE,Register_Address_Translation_unit,FUNCTION," * front_end_id : %d",front_end_id);
    100                       log_printf(NONE,Register_Address_Translation_unit,FUNCTION," * context_id   : %d",context_id  );
    101                       log_printf(NONE,Register_Address_Translation_unit,FUNCTION," * rd_log       : %d",rd_log      );
     98                      log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"  * retire[%d]",i);
     99                      log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * front_end_id : %d",front_end_id);
     100                      log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * context_id   : %d",context_id  );
     101                      log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * rd_log       : %d",rd_log      );
    102102                     
     103//                    if (RETIRE_RESTORE_RD_PHY_OLD [i])
    103104                      if (rat_gpr_update_table[front_end_id][context_id][rd_log] == 0)
    104105                        {
     
    112113                      Tspecial_address_t re_log = PORT_READ(in_RETIRE_NUM_REG_RE_LOG [i]);
    113114
     115//                    if (RETIRE_RESTORE_RE_PHY_OLD [i])
    114116                      if (rat_spr_update_table[front_end_id][context_id][re_log] == 0)
    115117                        {
     
    122124      }
    123125
     126#if (DEBUG >= DEBUG_TRACE) and (DEBUG_Register_Address_Translation_unit == true)
     127    log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"  * Dump RAT (Register_Address_Translation_unit)");
     128    for (uint32_t i=0; i<_param->_nb_front_end; ++i)
     129      for (uint32_t j=0; j<_param->_nb_context[i]; ++j)
     130        {
     131          log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * front_end[%d].context[%d]",i,j);
     132
     133          for (uint32_t k=0; k<_param->_nb_general_register_logic; ++k)
     134            log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"      * GPR[%.2d] - %.5d %.1d",k,rat_gpr[i][j][k],rat_gpr_update_table[i][j][k]);
     135
     136          for (uint32_t k=0; k<_param->_nb_special_register_logic; ++k)
     137            log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"      * SPR[%.2d] - %.5d %.1d",k,rat_spr[i][j][k],rat_spr_update_table[i][j][k]);
     138        }
     139#endif
     140
    124141#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
    125142    end_cycle ();
    126143#endif
    127144
    128     log_printf(FUNC,Register_Address_Translation_unit,FUNCTION,"End");
     145    log_end(Register_Address_Translation_unit,FUNCTION);
    129146  };
    130147
Note: See TracChangeset for help on using the changeset viewer.