Ignore:
Timestamp:
May 15, 2008, 9:23:42 PM (16 years ago)
Author:
rosiere
Message:

Test Decod and Decod_unit.

Location:
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/src/Decod_genMealy.cpp

    r86 r87  
    4848        internal_CONTEXT_ADDRESS_PREVIOUS [i] = reg_CONTEXT_ADDRESS_PREVIOUS [i];
    4949        internal_CONTEXT_IS_DELAY_SLOT    [i] = reg_CONTEXT_IS_DELAY_SLOT    [i];
    50 
     50       
    5151        can_continue                      [i] = PORT_READ(in_CONTEXT_DECOD_ENABLE [i]);
    5252        can_continue_next                 [i] = PORT_READ(in_CONTEXT_DECOD_ENABLE [i]);
     
    5757    //-----------------------------------
    5858    // scan all decod "slot_out"
     59    log_printf(TRACE,Decod,FUNCTION,"KANE LIVE");   
    5960    std::list<select_t>::iterator it=select.begin();
    6061    for (uint32_t i=0; i<_param->_nb_inst_decod; i++)
     
    6465               (context_event_val == false)) // Have not a context_event (spr_access, exception, ...)
    6566          {
     67            log_printf(TRACE,Decod,FUNCTION,"loop");   
     68
    6669            predict_val [i] = false;
    67             context_event_val = false;
    6870
    6971            Tcontext_t x = it->_context ;
     
    123125                if (type == TYPE_BRANCH)
    124126                  {
     127                    log_printf(TRACE,Decod,FUNCTION,"  * type is branch");
     128
    125129                    predict_val [i]     = ifetch_ack  [x][y] // and decod_val [i]
    126130                      ;
     
    173177                if (have_transaction)
    174178                  {
    175 #ifdef STATISTICS
    176                     (*_stat_sum_inst_decod) ++;
    177 #endif
    178179                    internal_CONTEXT_ADDRESS_PREVIOUS [x] = addr;
    179180                    internal_CONTEXT_IS_DELAY_SLOT    [x] = (type == TYPE_BRANCH); // next is a delay slot if current have branch type
     
    182183                can_continue [x] &= have_transaction; // to have a in order decod !!! if a previous instruction can decod, also next instruction can't decod.
    183184              }
     185
     186            log_printf(TRACE,Decod,FUNCTION,"  - num_(decod, context, fetch) : %d %d %d",i, x, y);
     187            log_printf(TRACE,Decod,FUNCTION,"    - ifetch_ack        : %d",ifetch_ack  [x][y]);
     188            log_printf(TRACE,Decod,FUNCTION,"    - context_event_val : %d",context_event_val );
     189            log_printf(TRACE,Decod,FUNCTION,"    - predict_val       : %d",predict_val [i]   );
     190            log_printf(TRACE,Decod,FUNCTION,"    - decod_val         : %d",decod_val   [i]   );
    184191           
    185192            it ++;
    186193          }
    187194      }
    188 
    189195    //-----------------------------------
    190196    // Write output
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/src/Decod_transition.cpp

    r81 r87  
    2929
    3030        for (uint32_t i=0; i<_param->_nb_context; i++)
    31           reg_CONTEXT_ADDRESS_PREVIOUS [i] = 0xfc; // 0x100-4. (0x100 : reset address)
     31          {
     32            reg_CONTEXT_ADDRESS_PREVIOUS [i] = 0xfc; // 0x100-4. (0x100 : reset address)
     33            reg_CONTEXT_IS_DELAY_SLOT    [i] = 0;
     34          }
    3235      }
    3336    else
     
    9497          if (internal_CONTEXT_HAVE_TRANSACTION[i])
    9598            {
     99#ifdef STATISTICS
     100              (*_stat_sum_inst_decod) ++;
     101#endif
     102
    96103              reg_CONTEXT_ADDRESS_PREVIOUS [i] = internal_CONTEXT_ADDRESS_PREVIOUS [i];
    97104              reg_CONTEXT_IS_DELAY_SLOT    [i] = internal_CONTEXT_IS_DELAY_SLOT    [i];
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/src/Parameters.cpp

    r86 r87  
    11/*
     2
    23 * $Id$
    34 *
     
    5354    _max_nb_inst_fetch                     = max<uint32_t>(nb_inst_fetch,nb_context);
    5455
    55     _size_address_inst                     = size_address-2;
     56    _size_address_inst                     = size_general_data-2;
    5657    _size_context_id                       = log2(nb_context          );
    5758    _size_depth                            = log2(nb_branch_speculated);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/src/Parameters_msg_error.cpp

    r82 r87  
    88#include "Behavioural/include/Types.h"
    99#include "Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/include/Parameters.h"
     10#include "Common/include/Max.h"
    1011#include <sstream>
    1112
     
    4243      test.error(_("nb_context_select must be in [1:nb_context].\n"));
    4344
     45    uint32_t sum_inst_fetch = 0;
     46    for (uint32_t i=0; i<_nb_context_select; i++)
     47      sum_inst_fetch += max<uint32_t>(_nb_inst_fetch,_nb_context,i+1);
     48
     49    if (sum_inst_fetch < _nb_inst_decod)
     50      test.error(_("The sum of the _nb_context_select most nb_inst_fetch must be greater that _nb_inst_decod"));
     51
    4452    if ((_priority != PRIORITY_ROUND_ROBIN))
    4553      test.error(toString(_("Unsupported priority scheme. Supported scheme are : %s.\n"),toString(PRIORITY_ROUND_ROBIN).c_str()));
Note: See TracChangeset for help on using the changeset viewer.