Ignore:
Timestamp:
Mar 18, 2009, 11:36:26 PM (15 years ago)
Author:
rosiere
Message:

1) Stat_list : fix retire old and new register bug
2) Stat_list : remove read_counter and valid flag, because validation of destination is in retire step (not in commit step)
3) Model : add class Model (cf Morpheo.sim)
4) Allocation : alloc_interface_begin and alloc_interface_end to delete temporary array.
5) Script : add distexe.sh
6) Add Comparator, Multiplier, Divider. But this component are not implemented
7) Software : add Dhrystone

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

    r88 r112  
    7575  ALLOC1_SC_SIGNAL( in_RETIRE_VAL               ," in_RETIRE_VAL               ",Tcontrol_t        ,_param->_nb_inst_retire);
    7676  ALLOC1_SC_SIGNAL(out_RETIRE_ACK               ,"out_RETIRE_ACK               ",Tcontrol_t        ,_param->_nb_inst_retire);
     77  ALLOC1_SC_SIGNAL( in_RETIRE_RESTORE           ," in_RETIRE_RESTORE           ",Tcontrol_t        ,_param->_nb_inst_retire);
    7778  ALLOC1_SC_SIGNAL( in_RETIRE_READ_RA           ," in_RETIRE_READ_RA           ",Tcontrol_t        ,_param->_nb_inst_retire);
    7879  ALLOC1_SC_SIGNAL( in_RETIRE_NUM_REG_RA_PHY    ," in_RETIRE_NUM_REG_RA_PHY    ",Tgeneral_address_t,_param->_nb_inst_retire);
     
    121122  INSTANCE1_SC_SIGNAL(_Stat_List_unit, in_RETIRE_VAL               ,_param->_nb_inst_retire);
    122123  INSTANCE1_SC_SIGNAL(_Stat_List_unit,out_RETIRE_ACK               ,_param->_nb_inst_retire);
     124  INSTANCE1_SC_SIGNAL(_Stat_List_unit, in_RETIRE_RESTORE           ,_param->_nb_inst_retire);
    123125  INSTANCE1_SC_SIGNAL(_Stat_List_unit, in_RETIRE_READ_RA           ,_param->_nb_inst_retire);
    124126  INSTANCE1_SC_SIGNAL(_Stat_List_unit, in_RETIRE_NUM_REG_RA_PHY    ,_param->_nb_inst_retire);
     
    234236                  TEST(bool, true,((gpr_status[reg]._is_free  == 0) and
    235237                                   (gpr_status[reg]._is_link  == 0) and
    236                                    (gpr_status[reg]._is_valid == 1) and
    237                                    (gpr_status[reg]._counter  == 0)));
     238                                   (gpr_status[reg]._is_valid == 1)//  and
     239//                                 (gpr_status[reg]._counter  == 0)
     240                                   ));
    238241
    239242                  gpr_status[reg]._is_free = 1;
     
    254257                  TEST(bool, true,((spr_status[reg]._is_free  == 0) and
    255258                                   (spr_status[reg]._is_link  == 0) and
    256                                    (spr_status[reg]._is_valid == 1) and
    257                                    (spr_status[reg]._counter  == 0)));
     259                                   (spr_status[reg]._is_valid == 1)//  and
     260//                                 (spr_status[reg]._counter  == 0)
     261                                   ));
    258262
    259263                  spr_status[reg]._is_free = 1;
     
    301305              Tspecial_address_t re       = (it_spr != free_list_spr.end())?*it_spr:0;
    302306
    303               Tcontrol_t         read_ra  = (gpr_status_insert[ra]._is_link) and (gpr_status_insert[ra]._counter < _param->_max_reader);
    304               Tcontrol_t         read_rb  = (gpr_status_insert[rb]._is_link) and (gpr_status_insert[rb]._counter < _param->_max_reader);
    305               Tcontrol_t         read_rc  = (spr_status_insert[rc]._is_link) and (spr_status_insert[rc]._counter < _param->_max_reader);
     307              Tcontrol_t         read_ra  = (gpr_status_insert[ra]._is_link); // and (gpr_status_insert[ra]._counter < _param->_max_reader);
     308              Tcontrol_t         read_rb  = (gpr_status_insert[rb]._is_link); // and (gpr_status_insert[rb]._counter < _param->_max_reader);
     309              Tcontrol_t         read_rc  = (spr_status_insert[rc]._is_link); // and (spr_status_insert[rc]._counter < _param->_max_reader);
    306310              Tcontrol_t         write_rd = (it_gpr != free_list_gpr.end());
    307311              Tcontrol_t         write_re = (it_spr != free_list_spr.end());
     
    341345              Tspecial_address_t re_new   = (rand()%(_param->_nb_special_register  ))  ;
    342346
    343               Tcontrol_t         read_ra  = (gpr_status_retire[ra]._is_link) and (gpr_status_retire[ra]._counter > 0);
    344               Tcontrol_t         read_rb  = (gpr_status_retire[rb]._is_link) and (gpr_status_retire[rb]._counter > 0);
    345               Tcontrol_t         read_rc  = (spr_status_retire[rc]._is_link) and (spr_status_retire[rc]._counter > 0);
     347              Tcontrol_t         read_ra  = (gpr_status_retire[ra]._is_link); // and (gpr_status_retire[ra]._counter > 0);
     348              Tcontrol_t         read_rb  = (gpr_status_retire[rb]._is_link); // and (gpr_status_retire[rb]._counter > 0);
     349              Tcontrol_t         read_rc  = (spr_status_retire[rc]._is_link); // and (spr_status_retire[rc]._counter > 0);
    346350              Tcontrol_t         write_rd = (    (gpr_status_retire[rd_old]._is_link ) and
    347351                                                 (gpr_status_retire[rd_old]._is_valid) and
     
    355359              in_RETIRE_VAL                [i]->write((rand()%100) < percent_transaction_retire);
    356360              in_RETIRE_READ_RA            [i]->write(read_ra );
    357               in_RETIRE_NUM_REG_RA_PHY     [i]->write(ra);
     361              in_RETIRE_RESTORE            [i]->write(0);
     362              in_RETIRE_NUM_REG_RA_PHY     [i]->write(ra);
    358363              in_RETIRE_READ_RB            [i]->write(read_rb );
    359364              in_RETIRE_NUM_REG_RB_PHY     [i]->write(rb);
     
    502507            if (in_RETIRE_VAL [i]->read() and out_RETIRE_ACK [i]->read())
    503508              {
     509                Tcontrol_t         restore        = in_RETIRE_RESTORE            [i]->read();
    504510                Tcontrol_t         read_ra        = in_RETIRE_READ_RA            [i]->read();
    505511                Tgeneral_address_t ra             = in_RETIRE_NUM_REG_RA_PHY     [i]->read();
     
    518524
    519525                LABEL("RETIRE [%d] - Accepted",i);
     526                LABEL(" * restore          : %d",restore);
    520527                LABEL(" * read_ra          : %d",read_ra );
    521528                LABEL(" * reg_ra           : %d",ra      );
     
    575582                if (write_rd)
    576583                  {
    577                     if (restore_rd_old)
     584                    if (restore)
    578585                      {
    579                         gpr_status[rd_old]._is_link  = 1;
    580                         gpr_status[rd_new]._is_link  = 0;
    581                         gpr_status[rd_new]._is_valid = 1;
     586                        if (restore_rd_old)
     587                          {
     588                            gpr_status[rd_old]._is_link  = 1;
     589                            gpr_status[rd_new]._is_link  = 0;
     590                            gpr_status[rd_new]._is_valid = 1;
     591                          }
     592                        else
     593                          {
     594                            gpr_status[rd_old]._is_link  = 0;
     595                            gpr_status[rd_new]._is_link  = 0;
     596                            gpr_status[rd_new]._is_valid = 1;
     597                          }
    582598                      }
    583599                    else
     
    586602                        gpr_status[rd_new]._is_valid = 1;
    587603                      }
     604
    588605                  }
    589606                if (write_re)
     
    619636                  TEST(bool, true,((gpr_status[reg]._is_free  == 0) and
    620637                                   (gpr_status[reg]._is_link  == 0) and
    621                                    (gpr_status[reg]._is_valid == 1) and
    622                                    (gpr_status[reg]._counter  == 0)));
     638                                   (gpr_status[reg]._is_valid == 1)//  and
     639//                                 (gpr_status[reg]._counter  == 0)
     640                                   ));
    623641
    624642                  gpr_status[reg]._is_free = 1;
     
    639657                  TEST(bool, true,((spr_status[reg]._is_free  == 0) and
    640658                                   (spr_status[reg]._is_link  == 0) and
    641                                    (spr_status[reg]._is_valid == 1) and
    642                                    (spr_status[reg]._counter  == 0)));
     659                                   (spr_status[reg]._is_valid == 1)//  and
     660//                                 (spr_status[reg]._counter  == 0)
     661                                   ));
    643662
    644663                  spr_status[reg]._is_free = 1;
     
    678697  delete []  in_RETIRE_VAL               ;
    679698  delete [] out_RETIRE_ACK               ;
     699  delete []  in_RETIRE_RESTORE           ;
    680700  delete []  in_RETIRE_READ_RA           ;
    681701  delete []  in_RETIRE_NUM_REG_RA_PHY    ;
Note: See TracChangeset for help on using the changeset viewer.