Changeset 129 for trunk/IPs


Ignore:
Timestamp:
Jun 29, 2009, 6:38:40 PM (15 years ago)
Author:
rosiere
Message:

1) Debug_Signal

Location:
trunk/IPs/systemC/processor/Morpheo
Files:
5 added
16 edited

Legend:

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

    r128 r129  
    3030
    3131  simulation_init(0,0,0,false,false);
     32  _model.set_model(NAME_Commit_unit, MODEL_SYSTEMC, true);
    3233
    3334  debug_idle_cycle = CYCLE_MAX;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_genMealy_commit.cpp

    r123 r129  
    4545    for (uint32_t i=0; i<_param->_nb_inst_commit; i++)
    4646      {
    47         commit_ack        [i] = false;
     47        commit_ack [i] = false;
    4848
    4949        // Test if have valid instruction
     
    5151          {
    5252            // packet_id number can
    53             Tpacket_t packet_id       = (_param->_have_port_rob_ptr  )?PORT_READ(in_COMMIT_PACKET_ID [i]):0;
     53            Tpacket_t packet_id       = (_param->_have_port_rob_ptr)?PORT_READ(in_COMMIT_PACKET_ID [i]):0;
    5454            uint32_t  num_bank        = packet_id & _param->_mask_num_bank;
    5555            uint32_t  num_bank_access = bank_nb_access [num_bank];
     
    5959              {
    6060                // find
    61                 bank_nb_access    [num_bank] ++;
    62                 commit_ack        [i] = true;
     61                bank_nb_access  [num_bank] ++;
     62                commit_ack      [i] = true;
    6363
    6464                internal_BANK_COMMIT_VAL      [num_bank][num_bank_access] = true;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_genMoore.cpp

    r124 r129  
    3030    // ===================================================================
    3131    {
    32       uint32_t nb_scan_bank = 0; // last scan bank
     32      uint32_t num_scan_bank = 0; // last scan bank
    3333      bool     can_continue = true;
    3434
     
    4848          Tcontrol_t val = false;
    4949
    50           for (uint32_t j=nb_scan_bank; j<_param->_nb_bank; j++)
     50          for (uint32_t j=num_scan_bank; j<_param->_nb_bank; j++)
    5151            {
    52               nb_scan_bank ++;
     52              num_scan_bank ++;
    5353             
    5454              // translate bank number
     
    8282                            );
    8383                 
     84                  event_nb_inst [front_end_id][context_id] ++;
     85
    8486                  can_continue &= (((state == ROB_STORE_OK          ) or
    8587                                    (state == ROB_STORE_OK_WAIT_END ) or
     
    9092                                        (reg_EVENT_PACKET[front_end_id][context_id] == num_packet)) and
    9193                                   not ((reg_EVENT_NB_INST [front_end_id][context_id] > 0) and
    92                                         ((++event_nb_inst [front_end_id][context_id]) >= reg_EVENT_NB_INST [front_end_id][context_id]))
     94                                        ((event_nb_inst [front_end_id][context_id]) >= reg_EVENT_NB_INST [front_end_id][context_id]))
    9395                                   );
    9496
     
    129131      // Branchement must be send at the prediction unit
    130132
    131       uint32_t nb_scan_bank = 0; // last scan bank
     133      uint32_t num_scan_bank = 0; // last scan bank
    132134
    133135      // for each port, find a valid branchement.
     
    138140          Tcontrol_t  val  = false;
    139141         
    140           for (uint32_t j=nb_scan_bank; j<_param->_nb_bank; j++)
     142          for (uint32_t j=num_scan_bank; j<_param->_nb_bank; j++)
    141143            {
    142               nb_scan_bank ++;
     144              num_scan_bank ++;
    143145
    144146              // translate bank number
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/SelfTest/src/test.cpp

    r128 r129  
    1818  morpheo::behavioural::Parameters_Statistics * _parameters_statistics = new morpheo::behavioural::Parameters_Statistics (5,CYCLE_MAX);
    1919#endif
     20
     21  simulation_init(0,0,0,false,false);
     22  _model.set_model(NAME_Rename_unit                      , MODEL_SYSTEMC, true);
     23  _model.set_model(NAME_Load_Store_pointer_unit          , MODEL_SYSTEMC, true);
     24  _model.set_model(NAME_Register_translation_unit        , MODEL_SYSTEMC, true);
     25  _model.set_model(NAME_Dependency_checking_unit         , MODEL_SYSTEMC, true);
     26  _model.set_model(NAME_Free_List_unit                   , MODEL_SYSTEMC, true);
     27  _model.set_model(NAME_Register_Address_Translation_unit, MODEL_SYSTEMC, true);
     28  _model.set_model(NAME_Register_translation_unit_Glue   , MODEL_SYSTEMC, true);
     29  _model.set_model(NAME_Stat_List_unit                   , MODEL_SYSTEMC, true);
     30  _model.set_model(NAME_Rename_select                    , MODEL_SYSTEMC, true);
     31  _model.set_model(NAME_Rename_unit_Glue                 , MODEL_SYSTEMC, true);
    2032
    2133  Tusage_t _usage = USE_ALL;
     
    386398  in_NRESET->write(1); 
    387399
     400#ifdef SELFTEST
    388401  LABEL("Loop of Test");
    389402
     
    394407      SC_START(1);
    395408    }
     409#else
     410  SC_START(1000);
     411#endif
    396412
    397413  /********************************************************
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Signal.h

    r113 r129  
    2323#include "Behavioural/include/Direction.h"
    2424#include "Behavioural/include/XML.h"
     25#include "Behavioural/include/Debug_signal.h"
    2526#include "Common/include/ErrorMorpheo.h"
    2627#include "Common/include/ToBase2.h"
     
    159160      _sc_signal      = sc_signal;
    160161      _sc_signal_map  = sc_signal;
     162
     163      DEBUG_SIGNAL_ADD(sc_signal);
    161164
    162165      if (typeid(T) == typeid(bool    ))
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Version.h

    r128 r129  
    1010#define MORPHEO_MAJOR_VERSION "0"
    1111#define MORPHEO_MINOR_VERSION "2"
    12 #define MORPHEO_REVISION      "128"
     12#define MORPHEO_REVISION      "129"
    1313#define MORPHEO_CODENAME      "Castor"
    1414
    15 #define MORPHEO_DATE_DAY      "26
     15#define MORPHEO_DATE_DAY      "29
    1616#define MORPHEO_DATE_MONTH    "06"
    1717#define MORPHEO_DATE_YEAR     "2009"
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Model.cpp

    r118 r129  
    1616  Model::Model (void)
    1717  {
    18     log_begin(Behavioural,FUNCTION);
     18//     log_begin(Behavioural,FUNCTION);
    1919
    2020    set_model(NAME_true ,MODEL_SYSTEMC,true );
    2121    set_model(NAME_false,MODEL_SYSTEMC,false);
    2222
    23     log_end(Behavioural,FUNCTION);
     23//     log_end(Behavioural,FUNCTION);
    2424  }
    2525
     
    2828  Model::~Model(void)
    2929  {
    30     log_begin(Behavioural,FUNCTION);
    31     log_end(Behavioural,FUNCTION);
     30//     log_begin(Behavioural,FUNCTION);
     31//     log_end(Behavioural,FUNCTION);
    3232  }
    3333
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Model_get_debug.cpp

    r118 r129  
    1616  bool Model::get_debug (std::string component)
    1717  {
    18     log_begin(Behavioural,FUNCTION);
     18//     log_begin(Behavioural,FUNCTION);
    1919
    2020    bool _return;
     
    2727      _return = default_debug;
    2828   
    29     log_end(Behavioural,FUNCTION);
     29//     log_end(Behavioural,FUNCTION);
    3030
    3131    return _return;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Model_get_type.cpp

    r118 r129  
    1616  model_type_t Model::get_type (std::string component)
    1717  {
    18     log_begin(Behavioural,FUNCTION);
     18//     log_begin(Behavioural,FUNCTION);
    1919
    2020    model_type_t _return;
     
    2727      _return = default_type;
    2828
    29     log_end(Behavioural,FUNCTION);
     29//     log_end(Behavioural,FUNCTION);
    3030
    3131    return _return;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Model_print.cpp

    r118 r129  
    1616  void Model::print (void)
    1717  {
    18     log_begin(Behavioural,FUNCTION);
     18//     log_begin(Behavioural,FUNCTION);
    1919
    2020    msgInformation("Model Information [type, model simulation, debug verbosity]\n");
     
    2424      msgInformation("  * %s\t%s\t%s\n",(it->first).c_str(), toString(it->second.type).c_str(), toString(it->second.debug).c_str());
    2525
    26     log_end(Behavioural,FUNCTION);
     26//     log_end(Behavioural,FUNCTION);
    2727  }
    2828
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Model_set_model.cpp

    r118 r129  
    1616  void Model::set_model (std::string component, model_type_t type, bool debug)
    1717  {
    18     log_begin(Behavioural,FUNCTION);
     18//     log_begin(Behavioural,FUNCTION);
    1919
    2020    model_t model;
     
    2424    models [component] = model;
    2525
    26     log_end(Behavioural,FUNCTION);
     26//     log_end(Behavioural,FUNCTION);
    2727  }
    2828
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_link.cpp

    r128 r129  
    2727      throw (ERRORMORPHEO (FUNCTION,"Signal \""+_name+"\", can't map with signal \""+        get_name()+"\", because the first signal is not already allocate."));
    2828    if (signal_dest->_is_allocate == false)
    29       throw (ERRORMORPHEO (FUNCTION,"Signal \""+_name+"\", can't map with signal \""+signal_dest->get_name()+"\", because the second signal is not already allocate."));
     29      throw (ERRORMORPHEO (FUNCTION,"Signal \""+_name+"\", can't map with signal \""+signal_dest->get_name()+"\", because the second signal is not already allocate.\n"));
    3030
    3131    // Test if type is compatible
    3232    if (_type_info != signal_dest->_type_info)
    33       throw (ERRORMORPHEO (FUNCTION,toString(_("Signal \"%s\" can't been linked with signal \"%s\" : incompatible type (%s != %s)."),
     33      throw (ERRORMORPHEO (FUNCTION,toString(_("Signal \"%s\" can't been linked with signal \"%s\" : incompatible type (%s != %s).\n"),
    3434                                             _name.c_str(),
    3535                                             signal_dest->get_name().c_str(),
     
    5454      throw (ERRORMORPHEO (FUNCTION,"Signal \""+_name+"\" can't been linked with signal \""+signal_dest->get_name()+"\" : illegal direction ("+toString(signal_src->_direction)+" with "+toString(signal_dest->_direction)+")."));
    5555
     56
     57    if (_size != signal_dest->get_size())
     58      msgWarning(_("The size of the signal \"%s\" (%d) is different with the signal \"%s\" (%d).\n"),
     59                 _name.c_str(),
     60                 _size,
     61                 signal_dest->get_name().c_str(),
     62                 signal_dest->get_size());
    5663
    5764    // Multi consumer is authorized , no to multi producer!
  • trunk/IPs/systemC/processor/Morpheo/Common/include/Debug.h

    r118 r129  
    8181      debug_init();                                                     \
    8282                                                                        \
    83       if (debug_test_simulation_time)                                   \
    84         if ((debug == DEBUG_ALL ) or                                    \
    85             (DEBUG_ ## level == DEBUG_NONE) or                          \
    86             (( DEBUG_ ## level <= debug) and                            \
    87              ( morpheo::behavioural::_model.get_debug(NAME_ ## component))) ) \
    88           {                                                             \
    89             if (DEBUG_ ## level <= DEBUG_INFO)                          \
    90               {                                                         \
    91                 msg("%s ",MSG_INFORMATION);                             \
    92               }                                                         \
    93             else                                                        \
    94               {                                                         \
    95                 msg("%s ",MSG_DEBUG);                                   \
    96               }                                                         \
     83      if (debug_test_simulation_time and                                \
     84          ((debug == DEBUG_ALL ) or                                     \
     85           (( DEBUG_ ## level <= debug) and                             \
     86            ( morpheo::behavioural::_model.get_debug(NAME_ ## component))))) \
     87        {                                                               \
     88          if (DEBUG_ ## level <= DEBUG_INFO)                            \
     89            {                                                           \
     90              msg("%s ",MSG_INFORMATION);                               \
     91            }                                                           \
     92          else                                                          \
     93            {                                                           \
     94              msg("%s ",MSG_DEBUG);                                     \
     95            }                                                           \
    9796                                                                        \
    98             if (debug >= DEBUG_ALL )                                    \
    99               {                                                         \
    100                 switch (DEBUG_ ## level)                                \
    101                   {                                                     \
    102                   case DEBUG_NONE  : msg(_("(none       ) ")); break;   \
    103                   case DEBUG_INFO  : msg(_("(information) ")); break;   \
    104                   case DEBUG_TRACE : msg(_("(trace      ) ")); break;   \
    105                   case DEBUG_FUNC  : msg(_("(function   ) ")); break;   \
    106                   case DEBUG_ALL   : msg(_("(all        ) ")); break;   \
    107                   default          : msg(_("(undefine   ) ")); break;   \
    108                   }                                                     \
    109               }                                                         \
    110             if (debug >= DEBUG_FUNC)                                    \
    111               {                                                         \
    112                 msg(  "<%s> " ,func);                                   \
    113                 msg(_("In file %s, "),__FILE__);                        \
    114                 msg(_("at line %d " ),__LINE__);                        \
    115                 msg(  ": " );                                           \
    116               }                                                         \
    117             msg(str);                                                   \
    118             msg("\n");                                                  \
    119           }                                                             \
     97          if (debug >= DEBUG_FUNC)                                      \
     98            {                                                           \
     99              msg(  "<%s> " ,func);                                     \
     100              msg(_("In file %s, "),__FILE__);                          \
     101              msg(_("at line %d " ),__LINE__);                          \
     102              msg(  ": " );                                             \
     103            }                                                           \
     104          msg(str);                                                     \
     105          msg("\n");                                                    \
     106        }                                                               \
    120107    } while(0)
    121108
  • trunk/IPs/systemC/processor/Morpheo/Common/include/Types.h

    r88 r129  
    1010
    1111#include <stdint.h>
     12#include "Behavioural/include/Debug_signal.h"
    1213
    1314namespace morpheo              {
     
    4142#  define SC_OUT(type)             sc_out   <type >
    4243                                 
    43 #  define PORT_READ(sig)           sig->read()
    44 #  define PORT_WRITE(sig,val)      sig->write(val)
     44#  define PORT_READ(sig)                                      sig->read()
     45#  define PORT_WRITE(sig,val)      do {DEBUG_SIGNAL_ACCESS(sig); sig->write(val);} while(0)
    4546//#define INTERNAL_READ(sig)       (*sig)
    4647//#define INTERNAL_WRITE(sig,val)  (*sig) = val
  • trunk/IPs/systemC/processor/Morpheo/Files/Instance_x1_w8_2.cfg

    r128 r129  
    77    <parameter name="nb_inst_fetch"                         value="8" />
    88    <parameter name="ras_size_queue"                        value="16" />
    9     <parameter name="upt_size_queue"                        value="16" />
     9    <parameter name="upt_size_queue"                        value="8" />
    1010    <parameter name="ufpt_size_queue"                       value="8" />
    1111
  • trunk/IPs/systemC/processor/Morpheo/Files/debug.sim

    r128 r129  
    2525  <parameter  name="simulation_file_with_date"              value="0"       />
    2626                                                           
    27   <parameter  name="debug_level"                            value="3"       />
     27  <parameter  name="debug_level"                            value="2"       />
    2828  <parameter  name="debug_cycle_start"                      value="0"       />
    2929  <parameter  name="debug_cycle_stop"                       value="100"     />
     
    109109
    110110  <component  name="Behavioural"                            model="systemc" debug="1" />
    111   <component  name="Interface"                              model="systemc" debug="1" />
    112   <component  name="Allocation"                             model="systemc" debug="1" />
     111  <component  name="Interface"                              model="systemc" debug="0" />
     112  <component  name="Allocation"                             model="systemc" debug="0" />
    113113
    114114</parameters>
Note: See TracChangeset for help on using the changeset viewer.