Ignore:
Timestamp:
May 12, 2010, 7:34:01 PM (14 years ago)
Author:
rosiere
Message:

1) add counters_t type for interface
2) fix in check load in load_store_unit
3) add parameters (but not yet implemented)
4) change environment and add script (distcc_env.sh ...)
5) add warning if an unser change rename flag with l.mtspr instruction
6) ...

Location:
trunk/IPs/systemC/processor/Morpheo/Behavioural/src
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Debug_signal.cpp

    r137 r138  
    3838  void debug_signal::print (void)
    3939  {
    40     msg("List of access signal\n");
     40    msgInformation("List of access signal\n");
    4141    for (std::list<std::string>::iterator it = _signal_access.begin();
    4242         it != _signal_access.end();
    4343         ++ it)
    4444      {
    45         msg(" * %s\n",(*it).c_str());
     45        msgInformation(" * %s\n",(*it).c_str());
    4646      }
    4747  }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface.cpp

    r135 r138  
    7777        if ((_usage & USE_SYSTEMC) and
    7878            ((*it)->get_direction() == INTERNAL))
    79           delete (*it)->get_sc_signal();
     79          (*it)->dealloc();
    8080        delete (*it);
    8181      }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Simulation.cpp

    r124 r138  
    1818  double              _simulation_nb_instruction;
    1919  std::vector<double> _simulation_nb_instruction_commited;
     20  stop_type_t         _simulation_stop_type;
    2021  bool                _simulation_file_with_date;
    2122  bool                _simulation_file_with_pid ;
     
    2324  Model               _model;
    2425
    25   void simulation_init (double nb_cycle,
    26                         double debug_nb_cycle,
    27                         double nb_instruction,
    28                         bool   file_with_date,
    29                         bool   file_with_pid )
     26  void simulation_init (double      nb_cycle,
     27                        double      debug_nb_cycle,
     28                        double      nb_instruction,
     29                        stop_type_t stop_type,
     30                        bool        file_with_date,
     31                        bool        file_with_pid )
    3032  {
    3133    if (not simulation_initialized)
     
    4446        _simulation_nb_instruction          = nb_instruction;
    4547//      _simulation_nb_instruction_commited = new std::vector<double>;
     48        _simulation_stop_type               = stop_type;
    4649        _simulation_file_with_date          = file_with_date;
    4750        _simulation_file_with_pid           = file_with_pid ;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Simulation_test_end.cpp

    r124 r138  
    3535      {
    3636        end_inst = true;
     37        std::vector<double>::iterator it=_simulation_nb_instruction_commited.begin();
    3738
    38         std::vector<double>::iterator it=_simulation_nb_instruction_commited.begin();
    39        
    40         // Scan all context and test if all can finish
    41         while (end_inst and it!=_simulation_nb_instruction_commited.end())
     39        switch (_simulation_stop_type)
    4240          {
    43             end_inst &= (_simulation_nb_instruction <= *it);
    44             it ++;
     41          case ALL_THREAD :
     42            {
     43              double sum_inst = 0;
     44
     45              // Scan all context and test if all can finish
     46              while (it!=_simulation_nb_instruction_commited.end())
     47                {
     48                  sum_inst += *it;
     49                  it ++;
     50                }
     51             
     52              // Stop if sum of all instruction is higher of "simulation_nb_instruction"
     53              end_inst &= (_simulation_nb_instruction <= sum_inst);
     54
     55              break;
     56            }
     57          case EACH_THREAD_AND_CONTINUE :
     58          case EACH_THREAD_AND_STOP :
     59            {
     60              // Scan all context and test if all can finish
     61              while (end_inst and it!=_simulation_nb_instruction_commited.end())
     62                {
     63
     64                  // Stop if all thread have executed more that "simulation_nb_instruction" instructions.
     65                  end_inst &= (_simulation_nb_instruction <= *it);
     66                  it ++;
     67                }
     68              break;
     69            }
    4570          }
    4671      }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Stat.cpp

    r124 r138  
    1414    _save_periodic         (_period>0)
    1515  {
     16    _generate_file = true;
     17
    1618    _list_operand  = new std::map<std::string, var_t>;
    1719    _list_expr     = new std::list<expr_t>;
    1820    _list_stat     = new std::list<Stat *>;
     21    _list_counters = new std::list<counters_t *>;
    1922
    2023    _cycle         = create_variable("cycle");
    2124//  _cycle         = create_counter("cycle","","");
    2225    *_cycle        = 0; // for the first period
    23 
    24     _generate_file = true;
    2526  }
    2627
     
    3536    _save_periodic         (period>0)
    3637  {
     38    _generate_file = true;
     39
    3740    _list_operand  = new std::map<std::string, var_t>;
    3841    _list_expr     = new std::list<expr_t>;
    3942    _list_stat     = new std::list<Stat *>;
     43    _list_counters = new std::list<counters_t *>;
    4044
    4145    _cycle         = create_variable("cycle");
    4246//  _cycle         = create_counter("cycle","","");
    4347    *_cycle        = 0; // for the first period
    44 
    45     _generate_file = true;
    4648  }
    4749
     
    6870      }
    6971    delete _list_expr;
     72
     73    // parcourir la liste et desallouer les arbres
     74    for (std::list<counters_t*>::iterator i=_list_counters->begin();
     75         i!= _list_counters->end();
     76         ++i)
     77      {
     78        delete *i;
     79      }
     80    delete _list_counters;
     81
    7082    delete _list_stat;
    7183  }
Note: See TracChangeset for help on using the changeset viewer.