Ignore:
Timestamp:
Dec 19, 2008, 4:34:00 PM (16 years ago)
Author:
rosiere
Message:

1) Update Prediction Table : statistics
2) Size instruction address on 30 bits
3) Change Log File
4) Add debug_level in simulation configuration file

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/src/Load_store_unit_function_speculative_load_commit_transition.cpp

    r88 r97  
    2323  void Load_store_unit::function_speculative_load_commit_transition (void)
    2424  {
    25     log_printf(FUNC,Load_store_unit,FUNCTION,"Begin");
     25    log_begin(Load_store_unit,FUNCTION);
     26    log_function(Load_store_unit,FUNCTION,_name.c_str());
    2627
    2728    if (PORT_READ(in_NRESET) == 0)
     
    5354
    5455        // solution 1)
    55         log_printf(TRACE,Load_store_unit,FUNCTION,"CHECK");
     56        log_printf(TRACE,Load_store_unit,FUNCTION,"  * CHECK");
    5657        for (uint32_t i=0, nb_check=0; (nb_check<_param->_nb_port_check) and (i<_param->_size_load_queue); i++)
    5758          {
     
    6364                is_operation_memory_load(_load_queue[index_load]._operation))
    6465              {
    65                 log_printf(TRACE,Load_store_unit,FUNCTION,"  * Find a load : %d",index_load);
     66                log_printf(TRACE,Load_store_unit,FUNCTION,"    * Find a load : %d",index_load);
    6667
    6768                nb_check++; // use one port
     
    283284                //   - second is the information of re order buffer : the store become not speculative and can access at the data cache
    284285
    285                 log_printf(TRACE,Load_store_unit,FUNCTION,"store_queue");
    286                 log_printf(TRACE,Load_store_unit,FUNCTION," * PUSH");
     286                log_printf(TRACE,Load_store_unit,FUNCTION,"    * store_queue");
     287                log_printf(TRACE,Load_store_unit,FUNCTION,"      * PUSH");
    287288               
    288289                // Write pointer is define in rename stage :
    289290                Tlsq_ptr_t           index         = PORT_READ(in_MEMORY_IN_STORE_QUEUE_PTR_WRITE[internal_MEMORY_IN_PORT]);
    290                 log_printf(TRACE,Load_store_unit,FUNCTION,"   * index         : %d",index);
     291                log_printf(TRACE,Load_store_unit,FUNCTION,"      * index         : %d",index);
    291292               
    292293                // Need read : state and exception.
     
    373374                if (update_info == true)
    374375                  {
    375                     log_printf(TRACE,Load_store_unit,FUNCTION,"   * Update information");
     376                    log_printf(TRACE,Load_store_unit,FUNCTION,"      * Update information");
    376377
    377378                    _store_queue [index]._context_id           = (not _param->_have_port_context_id   )?0:PORT_READ(in_MEMORY_IN_CONTEXT_ID   [internal_MEMORY_IN_PORT]);
     
    395396
    396397                // In speculative access queue, they are many type's request
    397                 log_printf(TRACE,Load_store_unit,FUNCTION,"speculative_access_queue");
    398                 log_printf(TRACE,Load_store_unit,FUNCTION," * PUSH");
     398                log_printf(TRACE,Load_store_unit,FUNCTION,"    * speculative_access_queue");
     399                log_printf(TRACE,Load_store_unit,FUNCTION,"      * PUSH");
    399400               
    400401                // Write in reservation station
    401402                uint32_t     index = _speculative_access_queue_control->push();
    402403
    403                 log_printf(TRACE,Load_store_unit,FUNCTION,"   * index : %d", index);
     404                log_printf(TRACE,Load_store_unit,FUNCTION,"      * index : %d", index);
    404405
    405406                Texception_t exception;
     
    428429                _speculative_access_queue [index]._exception            = exception;
    429430               
    430                 log_printf(TRACE,Load_store_unit,FUNCTION,"   * index         : %d",index);
     431                log_printf(TRACE,Load_store_unit,FUNCTION,"      * index         : %d",index);
    431432              }
    432433          }
     
    439440            (PORT_READ(in_MEMORY_OUT_ACK[0]) == 1))
    440441          {
    441             log_printf(TRACE,Load_store_unit,FUNCTION,"MEMORY_OUT transaction");
     442            log_printf(TRACE,Load_store_unit,FUNCTION,"  * MEMORY_OUT transaction");
    442443
    443444            switch (internal_MEMORY_OUT_SELECT_QUEUE)
     
    449450                  // =======================
    450451                 
    451                   log_printf(TRACE,Load_store_unit,FUNCTION," * store_queue [%d]",reg_STORE_QUEUE_PTR_READ);
     452                  log_printf(TRACE,Load_store_unit,FUNCTION,"    * store_queue [%d]",reg_STORE_QUEUE_PTR_READ);
    452453           
    453454                  // Entry flush and increase the read pointer
     
    464465                  // ======================
    465466                 
    466                   log_printf(TRACE,Load_store_unit,FUNCTION," * load_queue  [%d]",internal_MEMORY_OUT_PTR);
     467                  log_printf(TRACE,Load_store_unit,FUNCTION,"    * load_queue  [%d]",internal_MEMORY_OUT_PTR);
    467468                 
    468469                  // Entry flush and increase the read pointer
     
    476477              case SELECT_LOAD_QUEUE_SPECULATIVE :
    477478                {
    478                   log_printf(TRACE,Load_store_unit,FUNCTION," * load_queue  [%d] (speculative)",internal_MEMORY_OUT_PTR);
     479                  log_printf(TRACE,Load_store_unit,FUNCTION,"    * load_queue  [%d] (speculative)",internal_MEMORY_OUT_PTR);
    479480                 
    480481                  _load_queue [internal_MEMORY_OUT_PTR]._state    = LOAD_QUEUE_CHECK;
     
    497498            (PORT_READ(in_DCACHE_REQ_ACK[0]) == 1))
    498499          {
    499             log_printf(TRACE,Load_store_unit,FUNCTION,"DCACHE_REQ");
     500            log_printf(TRACE,Load_store_unit,FUNCTION,"  * DCACHE_REQ");
    500501
    501502            switch (internal_DCACHE_REQ_SELECT_QUEUE)
     
    587588            _load_queue [ptr_write]._rdata             = address; // to the exception
    588589           
    589             log_printf(TRACE,Load_store_unit,FUNCTION,"  * speculative_access_queue");
    590             log_printf(TRACE,Load_store_unit,FUNCTION,"    * POP[%d]",(*_speculative_access_queue_control)[0]);
     590            log_printf(TRACE,Load_store_unit,FUNCTION,"    * speculative_access_queue");
     591            log_printf(TRACE,Load_store_unit,FUNCTION,"      * POP[%d]",(*_speculative_access_queue_control)[0]);
    591592           
    592593            _speculative_access_queue [(*_speculative_access_queue_control)[0]]._state = SPECULATIVE_ACCESS_QUEUE_EMPTY;
     
    601602            (    internal_DCACHE_RSP_ACK == 1))
    602603          {
    603             log_printf(TRACE,Load_store_unit,FUNCTION,"DCACHE_RSP");
     604            log_printf(TRACE,Load_store_unit,FUNCTION,"  * DCACHE_RSP");
    604605
    605606            // don't use context_id : because there are one queue for all thread
     
    609610            Tdcache_error_t error      = PORT_READ(in_DCACHE_RSP_ERROR     [0]);
    610611
    611             log_printf(TRACE,Load_store_unit,FUNCTION," * original packet_id : %d", packet_id);
     612            log_printf(TRACE,Load_store_unit,FUNCTION,"    * original packet_id : %d", packet_id);
    612613           
    613614            if (DCACHE_RSP_IS_LOAD(packet_id) == 1)
     
    615616                packet_id >>= 1;
    616617
    617                 log_printf(TRACE,Load_store_unit,FUNCTION," * packet is a LOAD  : %d", packet_id);
     618                log_printf(TRACE,Load_store_unit,FUNCTION,"    * packet is a LOAD  : %d", packet_id);
    618619 
    619620
     
    626627                if (error != DCACHE_ERROR_NONE)
    627628                  {
    628                     log_printf(TRACE,Load_store_unit,FUNCTION," * have a bus error !!!");
     629                    log_printf(TRACE,Load_store_unit,FUNCTION,"    * have a bus error !!!");
    629630
    630631                    _load_queue [packet_id]._exception = EXCEPTION_MEMORY_BUS_ERROR;
     
    633634                else
    634635                  {
    635                     log_printf(TRACE,Load_store_unit,FUNCTION," * have no bus error.");
    636                     log_printf(TRACE,Load_store_unit,FUNCTION,"   * previous state : %d.",_load_queue [packet_id]._state);
     636                    log_printf(TRACE,Load_store_unit,FUNCTION,"    * have no bus error.");
     637                    log_printf(TRACE,Load_store_unit,FUNCTION,"      * previous state : %d.",_load_queue [packet_id]._state);
    637638
    638639                    // FIXME : convention : if bus error, the cache return the fautive address !
     
    650651            else
    651652              {
    652                 log_printf(TRACE,Load_store_unit,FUNCTION," * packet is a STORE");
     653                log_printf(TRACE,Load_store_unit,FUNCTION,"    * packet is a STORE");
    653654               
    654655                // TODO : les stores ne génére pas de réponse sauf quand c'est un bus error !!!
     
    664665#if defined(DEBUG) and (DEBUG>=DEBUG_TRACE)
    665666        // ***** dump store queue
    666         std::cout << "Dump STORE_QUEUE :" << std::endl
    667                   << "ptr_read : " << toString(static_cast<uint32_t>(reg_STORE_QUEUE_PTR_READ)) << std::endl;
     667        log_printf(TRACE,Load_store_unit,FUNCTION,"  * Dump STORE_QUEUE");
     668        log_printf(TRACE,Load_store_unit,FUNCTION,"    * ptr_read : %d",reg_STORE_QUEUE_PTR_READ);
    668669       
    669670        for (uint32_t i=0; i<_param->_size_store_queue; i++)
    670671          {
    671672            uint32_t j = (reg_STORE_QUEUE_PTR_READ+i)%_param->_size_store_queue;
    672             std::cout << "{" << j << "}" << std::endl
    673                       << _store_queue[j] << std::endl;
     673
     674            log_printf(TRACE,Load_store_unit,FUNCTION,"    [%.4d] %.4d %.4d %.4d, %.4d, %.4d, %.4d, %.8x %.8x, %.2d, %s",
     675                       j,
     676                       _store_queue[j]._context_id          ,
     677                       _store_queue[j]._front_end_id        ,
     678                       _store_queue[j]._ooo_engine_id       ,
     679                       _store_queue[j]._packet_id           ,
     680                       _store_queue[j]._operation           ,
     681                       _store_queue[j]._load_queue_ptr_write,
     682                       _store_queue[j]._address             ,
     683                       _store_queue[j]._wdata               ,
     684                     //_store_queue[j]._write_rd            ,
     685                     //_store_queue[j]._num_reg_rd          ,
     686                       _store_queue[j]._exception           ,
     687                       toString(_store_queue[j]._state).c_str());
    674688          }
    675689
    676690        // ***** dump speculative_access queue
    677         std::cout << "Dump SPECULATIVE_ACCESS_QUEUE :" << std::endl;
     691        log_printf(TRACE,Load_store_unit,FUNCTION,"  * Dump SPECULATIVE_ACCESS_QUEUE");
    678692       
    679693        for (uint32_t i=0; i<_param->_size_speculative_access_queue; i++)
    680694          {
    681695            uint32_t j = (*_speculative_access_queue_control)[i];
    682             std::cout << "{" << j << "}" << std::endl
    683                  << _speculative_access_queue[j] << std::endl;
     696
     697            log_printf(TRACE,Load_store_unit,FUNCTION,"    [%.4d] %.4d %.4d %.4d, %.4d, %.4d, %.4d %.4d, %.8x, %.1d %.6d, %.2d, %s",
     698                       j,
     699                       _speculative_access_queue[j]._context_id          ,
     700                       _speculative_access_queue[j]._front_end_id        ,
     701                       _speculative_access_queue[j]._ooo_engine_id       ,
     702                       _speculative_access_queue[j]._packet_id           ,
     703                       _speculative_access_queue[j]._operation           ,
     704                       _speculative_access_queue[j]._load_queue_ptr_write,
     705                       _speculative_access_queue[j]._store_queue_ptr_write,
     706                       _speculative_access_queue[j]._address             ,
     707                       _speculative_access_queue[j]._write_rd            ,
     708                       _speculative_access_queue[j]._num_reg_rd          ,
     709                       _speculative_access_queue[j]._exception           ,
     710                       toString(_speculative_access_queue[j]._state).c_str());
    684711          }
    685712
    686713        // ***** dump load queue
    687         std::cout << "Dump LOAD_QUEUE :" << std::endl
    688              << "ptr_read_check_priority : " << toString(static_cast<uint32_t>(reg_LOAD_QUEUE_CHECK_PRIORITY)) << std::endl;
     714        log_printf(TRACE,Load_store_unit,FUNCTION,"  * Dump LOAD_QUEUE");
     715        log_printf(TRACE,Load_store_unit,FUNCTION,"    * ptr_read_check_priority : %d",reg_LOAD_QUEUE_CHECK_PRIORITY);
    689716       
    690717        for (uint32_t i=0; i<_param->_size_load_queue; i++)
    691718          {
    692719            uint32_t j = i;
    693             std::cout << "{" << j << "}" << std::endl
    694                  << _load_queue[j] << std::endl;
     720
     721            log_printf(TRACE,Load_store_unit,FUNCTION,"    [%.4d] %.4d %.4d %.4d, %.4d, %.4d, %.4d, %.8x %.1x %.1d %.2d %.1d %.2d, %.8x, %.1d %.6d, %.2d, %s",
     722                       j,
     723                       _load_queue[j]._context_id          ,
     724                       _load_queue[j]._front_end_id        ,
     725                       _load_queue[j]._ooo_engine_id       ,
     726                       _load_queue[j]._packet_id           ,
     727                       _load_queue[j]._operation           ,
     728                       _load_queue[j]._store_queue_ptr_write,
     729                       _load_queue[j]._address             ,
     730                       _load_queue[j]._check_hit_byte      ,
     731                       _load_queue[j]._check_hit           ,
     732                       _load_queue[j]._shift               ,
     733                       _load_queue[j]._is_load_signed      ,
     734                       _load_queue[j]._access_size         ,
     735                       _load_queue[j]._rdata               ,
     736                       _load_queue[j]._write_rd            ,
     737                       _load_queue[j]._num_reg_rd          ,
     738                       _load_queue[j]._exception           ,
     739                       toString(_load_queue[j]._state).c_str());
    695740          }
    696741#endif
     
    712757      }
    713758
    714     log_printf(FUNC,Load_store_unit,FUNCTION,"End");
     759    log_end(Load_store_unit,FUNCTION);
    715760  };
    716761
Note: See TracChangeset for help on using the changeset viewer.