Ignore:
Timestamp:
Jun 17, 2009, 2:11:25 PM (15 years ago)
Author:
rosiere
Message:

1) Add test and configuration
2) Fix Bug
3) Add log file in load store unit
4) Fix Bug in environment

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

Legend:

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

    r88 r124  
    2525        XML xml = toXML();
    2626
    27         xml.filename_extension (".pos");
     27        xml.filename_extension ("pos");
    2828       
    2929        xml.generate_file(MORPHEO_POSITION,"ISO-8859-1");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Simulation.cpp

    r112 r124  
    1414
    1515  static bool          simulation_initialized;
     16  bool                _simulation_stop_exception;
    1617  double              _simulation_nb_cycle;
    1718  double              _simulation_nb_instruction;
    1819  std::vector<double> _simulation_nb_instruction_commited;
     20  bool                _simulation_file_with_date;
     21  bool                _simulation_file_with_pid ;
     22
    1923  Model               _model;
    2024
    2125  void simulation_init (double nb_cycle,
    22                         double nb_instruction)
     26                        double debug_nb_cycle,
     27                        double nb_instruction,
     28                        bool   file_with_date,
     29                        bool   file_with_pid )
    2330  {
    2431    if (not simulation_initialized)
    2532      {
    26         _simulation_nb_cycle                = nb_cycle;
     33        if (debug_nb_cycle == 0)
     34          {
     35            _simulation_nb_cycle                = nb_cycle;
     36            _simulation_stop_exception          = false;
     37          }
     38        else
     39          {
     40            _simulation_nb_cycle                = (debug_nb_cycle<nb_cycle)?debug_nb_cycle:nb_cycle;
     41            _simulation_stop_exception          = (debug_nb_cycle<nb_cycle);
     42          }
     43
    2744        _simulation_nb_instruction          = nb_instruction;
    2845//      _simulation_nb_instruction_commited = new std::vector<double>;
     46        _simulation_file_with_date          = file_with_date;
     47        _simulation_file_with_pid           = file_with_pid ;
    2948
    3049        simulation_initialized = true;
     
    3453        msg_printf(WARNING,_("Multi instance of Morpheo : stop condition, take the highest."));
    3554
    36         if (_simulation_nb_cycle < nb_cycle)
    37           _simulation_nb_cycle = nb_cycle;
     55        if (//(_simulation_nb_cycle == 0) or
     56            (_simulation_nb_cycle < debug_nb_cycle))
     57          {
     58            _simulation_nb_cycle       = debug_nb_cycle;
     59            _simulation_stop_exception = true;
     60          }
    3861
    39         if (_simulation_nb_instruction < nb_instruction)
     62        if (//(_simulation_nb_cycle == 0) or
     63            (_simulation_nb_cycle < nb_cycle))
     64          {
     65            _simulation_nb_cycle       = nb_cycle;
     66            _simulation_stop_exception = false;
     67          }
     68       
     69        if (//(_simulation_nb_instruction == 0) or
     70            (_simulation_nb_instruction < nb_instruction))
    4071          _simulation_nb_instruction = nb_instruction;
     72
     73        _simulation_file_with_date          |= file_with_date;
     74        _simulation_file_with_pid           |= file_with_pid ;
    4175      }
    4276  }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Simulation_test_end.cpp

    r117 r124  
    99#include "Behavioural/include/Simulation.h"
    1010#include "Common/include/Systemc.h"
     11#include "Common/include/ErrorMorpheo.h"
    1112
    1213namespace morpheo              {
     
    4748      end_inst = true;
    4849   
    49     return end_cycle and end_inst;
     50    if (end_cycle and _simulation_stop_exception)
     51      {
     52        throw ErrorMorpheo(_("Maximal cycles Reached"));
     53        return false;
     54      }
     55    else
     56      return end_cycle and end_inst;
    5057  }
    5158
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Stat.cpp

    r81 r124  
    1919
    2020    _cycle         = create_variable("cycle");
     21//  _cycle         = create_counter("cycle","","");
    2122    *_cycle        = 0; // for the first period
    2223
     
    3940
    4041    _cycle         = create_variable("cycle");
     42//  _cycle         = create_counter("cycle","","");
    4143    *_cycle        = 0; // for the first period
    4244
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Stat_end_cycle.cpp

    r113 r124  
    1717        test_and_save(false);
    1818      }
     19    else
     20      if ((_cycle_sum+1) == _nb_cycle_before_begin)
     21        {
     22          // Init counter
     23          reset (false);
     24        }
    1925  }
    2026}; 
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Stat_generate_file.cpp

    r113 r124  
    3030    xml->balise_close();
    3131
    32     xml->filename_extension (".stat");
     32    xml->filename_extension ("stat");
    3333    xml->generate_file(MORPHEO_STATISTICS);
    3434
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Stat_test_and_save.cpp

    r81 r124  
    99      {
    1010        eval_exprs(false); // evalue les expression non periodique au cycle
    11        
    12         for (std::map<std::string, var_t>::iterator i=_list_operand->begin();
    13              i!= _list_operand->end();
    14              ++i)
    15           {
    16             // save and reset !
    17             i->second.save_counter.push_back(*(i->second.counter));
    18             *(i->second.counter) = 0;
    19           }
     11
     12        reset (true);
    2013      }
    2114  }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/XML.cpp

    r88 r124  
    1717  {
    1818    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
    19     _filename_extension=".xml";
     19    _filename_extension="xml";
    2020    log_printf(FUNC,Behavioural,FUNCTION,"End");
    2121  };
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/XML_generate_file.cpp

    r88 r124  
    88#include "Behavioural/include/XML.h"
    99#include "Common/include/ErrorMorpheo.h"
     10#include "Common/include/Filename.h"
    1011#include <fstream>
    1112
     
    2122    header (encoding);
    2223
    23     std::string filename = dirname + "/" + _name + _filename_extension;
     24    std::string filename = morpheo::filename(dirname,
     25                                             _name,
     26                                             "",
     27                                             _filename_extension,
     28                                             _simulation_file_with_date,
     29                                             _simulation_file_with_pid ,
     30                                             true);
    2431
    2532    msg_printf(INFORMATION,_("Generate file \"%s\"."),filename.c_str());
Note: See TracChangeset for help on using the changeset viewer.