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

Almost complete design
with Test and test platform

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Stat_List_unit/SelfTest/src/test.cpp

    r82 r88  
    3434#endif
    3535
     36  Tusage_t _usage = USE_ALL;
     37
     38//   _usage = usage_unset(_usage,USE_SYSTEMC              );
     39//   _usage = usage_unset(_usage,USE_VHDL                 );
     40//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH       );
     41//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT);
     42//   _usage = usage_unset(_usage,USE_POSITION             );
     43//   _usage = usage_unset(_usage,USE_STATISTICS           );
     44//   _usage = usage_unset(_usage,USE_INFORMATION          );
     45
    3646  Stat_List_unit * _Stat_List_unit = new Stat_List_unit
    3747    (name.c_str(),
     
    4050#endif
    4151     _param,
    42      USE_ALL);
     52     _usage);
    4353 
    4454#ifdef SYSTEMC
     
    7282  ALLOC1_SC_SIGNAL( in_RETIRE_NUM_REG_RC_PHY    ," in_RETIRE_NUM_REG_RC_PHY    ",Tspecial_address_t,_param->_nb_inst_retire);
    7383  ALLOC1_SC_SIGNAL( in_RETIRE_WRITE_RD          ," in_RETIRE_WRITE_RD          ",Tcontrol_t        ,_param->_nb_inst_retire);
     84  ALLOC1_SC_SIGNAL( in_RETIRE_RESTORE_RD_PHY_OLD," in_RETIRE_RESTORE_RD_PHY_OLD",Tcontrol_t        ,_param->_nb_inst_retire);
    7485  ALLOC1_SC_SIGNAL( in_RETIRE_NUM_REG_RD_PHY_OLD," in_RETIRE_NUM_REG_RD_PHY_OLD",Tgeneral_address_t,_param->_nb_inst_retire);
    7586  ALLOC1_SC_SIGNAL( in_RETIRE_NUM_REG_RD_PHY_NEW," in_RETIRE_NUM_REG_RD_PHY_NEW",Tgeneral_address_t,_param->_nb_inst_retire);
    7687  ALLOC1_SC_SIGNAL( in_RETIRE_WRITE_RE          ," in_RETIRE_WRITE_RE          ",Tcontrol_t        ,_param->_nb_inst_retire);
     88  ALLOC1_SC_SIGNAL( in_RETIRE_RESTORE_RE_PHY_OLD," in_RETIRE_RESTORE_RE_PHY_OLD",Tcontrol_t        ,_param->_nb_inst_retire);
    7789  ALLOC1_SC_SIGNAL( in_RETIRE_NUM_REG_RE_PHY_OLD," in_RETIRE_NUM_REG_RE_PHY_OLD",Tspecial_address_t,_param->_nb_inst_retire);
    7890  ALLOC1_SC_SIGNAL( in_RETIRE_NUM_REG_RE_PHY_NEW," in_RETIRE_NUM_REG_RE_PHY_NEW",Tspecial_address_t,_param->_nb_inst_retire);
     
    116128  INSTANCE1_SC_SIGNAL(_Stat_List_unit, in_RETIRE_NUM_REG_RC_PHY    ,_param->_nb_inst_retire);
    117129  INSTANCE1_SC_SIGNAL(_Stat_List_unit, in_RETIRE_WRITE_RD          ,_param->_nb_inst_retire);
     130  INSTANCE1_SC_SIGNAL(_Stat_List_unit, in_RETIRE_RESTORE_RD_PHY_OLD,_param->_nb_inst_retire);
    118131  INSTANCE1_SC_SIGNAL(_Stat_List_unit, in_RETIRE_NUM_REG_RD_PHY_OLD,_param->_nb_inst_retire);
    119132  INSTANCE1_SC_SIGNAL(_Stat_List_unit, in_RETIRE_NUM_REG_RD_PHY_NEW,_param->_nb_inst_retire);
    120133  INSTANCE1_SC_SIGNAL(_Stat_List_unit, in_RETIRE_WRITE_RE          ,_param->_nb_inst_retire);
     134  INSTANCE1_SC_SIGNAL(_Stat_List_unit, in_RETIRE_RESTORE_RE_PHY_OLD,_param->_nb_inst_retire);
    121135  INSTANCE1_SC_SIGNAL(_Stat_List_unit, in_RETIRE_NUM_REG_RE_PHY_OLD,_param->_nb_inst_retire);
    122136  INSTANCE1_SC_SIGNAL(_Stat_List_unit, in_RETIRE_NUM_REG_RE_PHY_NEW,_param->_nb_inst_retire);
     
    347361              in_RETIRE_NUM_REG_RC_PHY     [i]->write(rc);
    348362              in_RETIRE_WRITE_RD           [i]->write(write_rd);
     363              in_RETIRE_RESTORE_RD_PHY_OLD [i]->write(0);
    349364              in_RETIRE_NUM_REG_RD_PHY_OLD [i]->write(rd_old);
    350365              in_RETIRE_NUM_REG_RD_PHY_NEW [i]->write(rd_new);
    351366              in_RETIRE_WRITE_RE           [i]->write(write_re);
     367              in_RETIRE_RESTORE_RE_PHY_OLD [i]->write(0);
    352368              in_RETIRE_NUM_REG_RE_PHY_OLD [i]->write(re_old);
    353369              in_RETIRE_NUM_REG_RE_PHY_NEW [i]->write(re_new);
     
    486502            if (in_RETIRE_VAL [i]->read() and out_RETIRE_ACK [i]->read())
    487503              {
    488                 Tcontrol_t         read_ra  = in_RETIRE_READ_RA            [i]->read();
    489                 Tgeneral_address_t ra       = in_RETIRE_NUM_REG_RA_PHY     [i]->read();
    490                 Tcontrol_t         read_rb  = in_RETIRE_READ_RB            [i]->read();
    491                 Tgeneral_address_t rb       = in_RETIRE_NUM_REG_RB_PHY     [i]->read();
    492                 Tcontrol_t         read_rc  = in_RETIRE_READ_RC            [i]->read();
    493                 Tspecial_address_t rc       = in_RETIRE_NUM_REG_RC_PHY     [i]->read();
    494                 Tcontrol_t         write_rd = in_RETIRE_WRITE_RD           [i]->read();
    495                 Tgeneral_address_t rd_old   = in_RETIRE_NUM_REG_RD_PHY_OLD [i]->read();
    496                 Tgeneral_address_t rd_new   = in_RETIRE_NUM_REG_RD_PHY_NEW [i]->read();
    497                 Tcontrol_t         write_re = in_RETIRE_WRITE_RE           [i]->read();
    498                 Tgeneral_address_t re_old   = in_RETIRE_NUM_REG_RE_PHY_OLD [i]->read();
    499                 Tgeneral_address_t re_new   = in_RETIRE_NUM_REG_RE_PHY_NEW [i]->read();         
     504                Tcontrol_t         read_ra        = in_RETIRE_READ_RA            [i]->read();
     505                Tgeneral_address_t ra             = in_RETIRE_NUM_REG_RA_PHY     [i]->read();
     506                Tcontrol_t         read_rb        = in_RETIRE_READ_RB            [i]->read();
     507                Tgeneral_address_t rb             = in_RETIRE_NUM_REG_RB_PHY     [i]->read();
     508                Tcontrol_t         read_rc        = in_RETIRE_READ_RC            [i]->read();
     509                Tspecial_address_t rc             = in_RETIRE_NUM_REG_RC_PHY     [i]->read();
     510                Tcontrol_t         write_rd       = in_RETIRE_WRITE_RD           [i]->read();
     511                Tcontrol_t         restore_rd_old = in_RETIRE_RESTORE_RD_PHY_OLD [i]->read();
     512                Tgeneral_address_t rd_old         = in_RETIRE_NUM_REG_RD_PHY_OLD [i]->read();
     513                Tgeneral_address_t rd_new         = in_RETIRE_NUM_REG_RD_PHY_NEW [i]->read();
     514                Tcontrol_t         write_re       = in_RETIRE_WRITE_RE           [i]->read();
     515                Tcontrol_t         restore_re_old = in_RETIRE_RESTORE_RE_PHY_OLD [i]->read();
     516                Tgeneral_address_t re_old         = in_RETIRE_NUM_REG_RE_PHY_OLD [i]->read();
     517                Tgeneral_address_t re_new         = in_RETIRE_NUM_REG_RE_PHY_NEW [i]->read();           
    500518
    501519                LABEL("RETIRE [%d] - Accepted",i);
     
    519537                LABEL("   * status[%d]._counter  : %d",rc,spr_status[rc]._counter );
    520538                LABEL(" * read_rd          : %d",write_rd);
     539                LABEL(" * restore_rd_old   : %d",restore_rd_old);
    521540                LABEL(" * reg_rd_old       : %d",rd_old  );
    522541                LABEL("   * status[%d]._is_free  : %d",rd_old,spr_status[rd_old]._is_free );
     
    530549                LABEL("   * status[%d]._counter  : %d",rd_new,spr_status[rd_new]._counter );
    531550                LABEL(" * read_re          : %d",write_re);
     551                LABEL(" * restore_re_old   : %d",restore_re_old);
    532552                LABEL(" * reg_re_old       : %d",re_old  );
    533553                LABEL("   * status[%d]._is_free  : %d",re_old,spr_status[re_old]._is_free );
     
    555575                if (write_rd)
    556576                  {
    557                     gpr_status[rd_old]._is_link  = 0;
    558                     gpr_status[rd_new]._is_valid = 1;
     577                    if (restore_rd_old)
     578                      {
     579                        gpr_status[rd_old]._is_link  = 1;
     580                        gpr_status[rd_new]._is_link  = 0;
     581                        gpr_status[rd_new]._is_valid = 1;
     582                      }
     583                    else
     584                      {
     585                        gpr_status[rd_old]._is_link  = 0;
     586                        gpr_status[rd_new]._is_valid = 1;
     587                      }
    559588                  }
    560589                if (write_re)
    561590                  {
    562                     spr_status[re_old]._is_link  = 0;
    563                     spr_status[re_new]._is_valid = 1;
    564                   }
     591                    if (restore_re_old)
     592                      {
     593                        spr_status[re_old]._is_link  = 1;
     594                        spr_status[re_new]._is_link  = 0;
     595                        spr_status[re_new]._is_valid = 1;
     596                      }
     597                    else
     598                      {
     599                        spr_status[re_old]._is_link  = 0;
     600                        spr_status[re_new]._is_valid = 1;
     601                      }
     602                  }
    565603              }
    566604
     
    647685  delete []  in_RETIRE_NUM_REG_RC_PHY    ;
    648686  delete []  in_RETIRE_WRITE_RD          ;
     687  delete []  in_RETIRE_RESTORE_RD_PHY_OLD;
    649688  delete []  in_RETIRE_NUM_REG_RD_PHY_OLD;
    650689  delete []  in_RETIRE_NUM_REG_RD_PHY_NEW;
    651690  delete []  in_RETIRE_WRITE_RE          ;
     691  delete []  in_RETIRE_RESTORE_RE_PHY_OLD;
    652692  delete []  in_RETIRE_NUM_REG_RE_PHY_OLD;
    653693  delete []  in_RETIRE_NUM_REG_RE_PHY_NEW;
Note: See TracChangeset for help on using the changeset viewer.