Ignore:
Timestamp:
Mar 27, 2008, 11:04:49 AM (16 years ago)
Author:
rosiere
Message:

Add :

  • Execute_loop (must be test systemC)
  • Prediction
    • Direction : predifined scheme
    • Branch Target Buffer
  • iFetch_unit
    • ifetch_queue
    • pc management
  • Decod_unit
    • coming soon : support for custom operation
  • Rename_unit
    • RAT
    • Free_list
    • Dependence RAW check
    • Load store unit pointer
  • New Environnement (hierarchy_memory will remove in a next version)


Modif :

  • Manage Custom Operation
  • All component in execute_loop to use the new statistics management

Not Finish :

  • Return Address Stack
  • Environnement
Location:
trunk/IPs/systemC/processor/Morpheo/Behavioural/src
Files:
1 added
14 edited
1 moved

Legend:

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

    r76 r78  
    2020    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
    2121
     22//     log_printf(NONE,Behavioural,FUNCTION,"Map %s.%s with %s.%s",
     23//             component_src.c_str(),
     24//             port_src.c_str(),
     25//             component_dest.c_str(),
     26//             port_dest.c_str());
     27
    2228    std::string name_entity = _entity->get_name();
    2329
    2430    // First entity
    2531    Entity * entity_dest = find_entity(component_dest);
    26 
    2732
    2833    if (entity_dest == NULL)
     
    5358
    5459    // need an internal signal ?
    55     bool src_is_port  = entity_src  == _entity;
    56     bool dest_is_port = entity_dest == _entity;
     60    bool src_is_port  = (entity_src  == _entity);
     61    bool dest_is_port = (entity_dest == _entity);
    5762
    5863    if (src_is_port == true)
     
    6772        //       
    6873        // Interface      Component
    69         //    |          |         
     74        //    |              |     
    7075        //  ----> (IN)     --X-> (IN)
    71         //    |          |         
     76        //    |              |     
    7277        //  <-X-- (OUT)    <---- (OUT)
    7378        //    |              |       
     
    8994          }
    9095
     96        // Create internal signal
    9197        signal_dest= signal_internal (entity_productor, signal_productor);
    9298        signal_dest->set_size_max(signal_src->get_size());
    93 
    94         dest_is_port = false;
    9599      }
    96100   
     
    111115  };
    112116
    113   void Component::port_map (std::string component_src ,
    114                             std::string port_src      )
    115   {
    116     log_printf(FUNC,Behavioural,FUNCTION,"Begin");
    117    
    118     Entity * entity_src = find_entity(component_src);
    119    
    120     if (entity_src == NULL)
    121       throw (ErrorMorpheo ("<Component::port_map> in component \""+_entity->get_name()+"\", port map with unknow component \""+component_src+"\"."));
    122    
    123     Signal * signal_src = entity_src->find_signal (port_src);
    124    
    125     if (signal_src == NULL)
    126       throw (ErrorMorpheo ("<Component::port_map> in component \""+_entity->get_name()+"\", port map with component \""+component_src+"\" and a unknow signal \""+port_src+"\"."));
    127    
    128     // need an internal signal ?
    129    
    130     if (entity_src == _entity)
    131       throw (ErrorMorpheo ("<Component::port_map> src can't be an interface's port of the top level."));
    132    
    133     if (signal_src->get_direction() != OUT)
    134       throw (ErrorMorpheo ("<Component::port_map> the direction of the signal '"+signal_src->get_name()+"' must be OUT."));
    135 
    136     Signal * signal_dest;
    137 
    138     signal_dest= signal_internal (entity_src, signal_src);
    139     signal_dest->set_size_max(signal_src->get_size());
    140    
    141     try
    142       {
    143         signal_src->link(signal_dest,
    144                          false);
    145       }
    146     catch (morpheo::ErrorMorpheo & error)
    147       {
    148         throw (ErrorMorpheo ("<Component::port_map> Error in mapping "+entity_src ->get_name()+"."+signal_src ->get_name()+" :\n"+error.what ()));
    149       }
    150     //catch (...)
    151     //  {
    152     //  }
    153 
    154     log_printf(FUNC,Behavioural,FUNCTION,"End");
    155   };
    156 
    157117}; // end namespace behavioural         
    158118}; // end namespace morpheo             
    159119
     120
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_set_component.cpp

    r57 r78  
    2929    Tcomponent_t * entry = new Tcomponent_t;
    3030   
     31//     entry->_component= component;
    3132    entry->_instance = instance;
    3233    entry->_entity   = entity;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_test_map.cpp

    r75 r78  
    1313#undef  FUNCTION
    1414#define FUNCTION "Component::test_map"
    15   bool Component::test_map (void)
     15  bool Component::test_map (bool recursive)
     16  {
     17    return test_map (0, recursive);
     18  }
     19
     20  bool Component::test_map (uint32_t depth, bool recursive)
    1621  {
    1722    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
    1823
     24    std::string tab  = std::string(depth,'\t');
    1925    std::string name = _entity->get_name();
    2026    bool test_ok = true;
     27
    2128    if (_list_component->empty () == true)
    22       log_printf(NONE,Behavioural,FUNCTION, "Component \"%s\" is a behavioural description",name.c_str());
     29      {
     30        log_printf(NONE,Behavioural,FUNCTION, "%s* Component \"%s\" is a behavioural description",tab.c_str(),name.c_str());
     31      }
    2332    else
    2433      {
    25         log_printf(NONE,Behavioural,FUNCTION, "Component \"%s\" is a structural description",name.c_str());
     34        log_printf(NONE,Behavioural,FUNCTION, "%s* Component \"%s\" is a structural description",tab.c_str(),name.c_str());
    2635
    27         log_printf(INFO,Behavioural,FUNCTION, "Test port I/O");
     36        log_printf(INFO,Behavioural,FUNCTION, "%s* Test port I/O",tab.c_str());
    2837       
    29         test_ok &= _entity->test_map(true);
     38        test_ok &= _entity->test_map(1,true);
    3039
    31         log_printf(INFO,Behavioural,FUNCTION, "Test all internal component");
     40        log_printf(INFO,Behavioural,FUNCTION, "%s* Test all internal component",tab.c_str());
    3241       
    3342        for (std::list<Tcomponent_t *>::iterator i= _list_component->begin();
    3443             i != _list_component->end();
    3544             ++i)
    36           test_ok &= (*i)->_entity->test_map(false);
     45          test_ok &= (*i)->_entity->test_map(1,false);
     46
     47//      if (recursive)
     48//        for (std::list<Tcomponent_t *>::iterator i= _list_component->begin();
     49//             i != _list_component->end();
     50//             ++i)
     51//          test_ok &= (*i)->_component->test_map(1,recursive);
    3752      }
    3853   
     
    4055   
    4156    if (test_ok == false)
    42       throw (ErrorMorpheo ("<Component::test_map> A lot of port is not connected."));
     57      throw (ERRORMORPHEO (FUNCTION,"A lot of port is not connected."));
    4358
    4459    return test_ok;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_test_map.cpp

    r62 r78  
    77
    88#include "Behavioural/include/Entity.h"
    9 
     9#include <iostream>
    1010
    1111namespace morpheo              {
     
    1414#undef  FUNCTION
    1515#define FUNCTION "Entity::test_map"
    16   bool Entity::test_map (bool top_level)
     16  bool Entity::test_map (uint32_t depth, bool top_level)
    1717  {
    1818    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
    1919 
    20     log_printf(NONE,Behavioural,FUNCTION, " * Test mapping : Entity \"%s\"",_name.c_str());
     20    std::string tab  = std::string(depth,'\t');
     21    log_printf(NONE,Behavioural,FUNCTION, "%s* Test mapping : Entity \"%s\"",tab.c_str(),_name.c_str());
    2122 
    22     bool _return = _interfaces->test_map(top_level);
     23    bool _return = _interfaces->test_map(depth+1,top_level);
     24
     25#ifndef DEBUG
     26    if (_return == false)
     27      {
     28        std::cerr << "In entity \"" << _name << "\" (type : \"" << _type << "\"), a lot of port is not connected !" << std::endl;
     29      }
     30#endif
    2331
    2432    log_printf(FUNC,Behavioural,FUNCTION,"End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_test_map.cpp

    r75 r78  
    1414#undef  FUNCTION
    1515#define FUNCTION "Interface::test_map"
    16   bool Interface::test_map (bool top_level)
     16  bool Interface::test_map (uint32_t depth, bool top_level)
    1717  {
    1818    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
    1919
     20    std::string tab  = std::string(depth,'\t');
    2021    bool _return = true;
    2122
    22     log_printf(INFO,Behavioural,FUNCTION, "   * Interface \"%s\"",_name.c_str());
     23    log_printf(NONE,Behavioural,FUNCTION, "%s* Interface \"%s\"",tab.c_str(),_name.c_str());
    2324   
    2425    for (std::list<Signal*>::iterator i  = _list_signal->begin();
    2526         i != _list_signal->end();
    2627         ++i)
    27       _return &= (*i)->test_map(top_level);
     28      _return &= (*i)->test_map(depth+1,top_level);
    2829
    2930    log_printf(FUNC,Behavioural,FUNCTION,"End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_test_map.cpp

    r75 r78  
    1414#undef  FUNCTION
    1515#define FUNCTION "Interfaces::test_map"
    16   bool Interfaces::test_map (bool top_level)
     16  bool Interfaces::test_map (uint32_t depth, bool top_level)
    1717  {
    1818    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
    1919
     20    std::string tab  = std::string(depth,'\t');
     21
    2022    bool _return = true;
    2123
    22     log_printf(INFO,Behavioural,FUNCTION, "   * Interfaces \"%s\"",_name.c_str());
     24    log_printf(NONE,Behavioural,FUNCTION, "%s* Interfaces \"%s\"",tab.c_str(),_name.c_str());
    2325   
    2426    for (std::list<Interface_fifo*>::iterator i  = _list_interface->begin();
    2527         i != _list_interface->end();
    2628         ++i)
    27       _return &= (*i)->test_map(top_level);
     29      _return &= (*i)->test_map(depth+1, top_level);
    2830
    2931    log_printf(FUNC,Behavioural,FUNCTION,"End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Parameters_test.cpp

    r71 r78  
    1717  {
    1818    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
    19     std::string msg = msg_error();
     19 
     20    Parameters_test x = msg_error();
    2021   
    21     if (msg.length() != 0)
    22       throw (ErrorMorpheo (msg));
     22    std::cerr << x.print() << std::endl;
     23
     24    if (x.have_error())
     25      throw (ErrorMorpheo ("Error(s) in parameters"));
     26
    2327    log_printf(FUNC,Behavioural,FUNCTION,"End");
    2428  };
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal.cpp

    r75 r78  
    2020  {
    2121    log_printf(FUNC,Behavioural,"Signal","Begin");
    22     _size                = size;
    23     _is_allocate         = false;
    24     _is_map_as_src       = false;
    25     _is_map_as_dest      = false;
    26     _connect_from_signal = NULL;
    27     _connect_to_signal   = NULL;
    28     _sc_signal           = NULL;
    29     _sc_signal_map       = NULL;
    30     _type_info           = UNKNOW;
     22    _size                     = size;
     23    _is_allocate              = false;
     24    _is_map_as_component_src  = false;
     25    _is_map_as_component_dest = false;
     26    _is_map_as_toplevel_dest  = false;
     27    _connect_from_signal      = NULL;
     28    _connect_to_signal        = NULL;
     29    _sc_signal                = NULL;
     30    _sc_signal_map            = NULL;
     31    _type_info                = UNKNOW;
    3132#ifdef VHDL_TESTBENCH
    3233    _list_value          = new std::list<std::string>;
    3334#endif
     35   
     36    if (_size == 0)
     37      throw ERRORMORPHEO(FUNCTION,"Size of signal '"+_name+"' is nul");
     38
     39
    3440    log_printf(FUNC,Behavioural,"Signal","End");
    3541  };
     
    4147  {
    4248    log_printf(FUNC,Behavioural,"Signal (copy)","Begin");
    43     _size                = signal._size;
    44     _is_allocate         = signal._is_allocate;
    45     _is_map_as_src       = signal._is_map_as_src ;
    46     _is_map_as_dest      = signal._is_map_as_dest;
    47     _connect_from_signal = signal._connect_from_signal;
    48     _connect_to_signal   = signal._connect_to_signal;
    49     _sc_signal           = signal._sc_signal    ;
    50     _sc_signal_map       = signal._sc_signal_map;
    51     _type_info           = signal._type_info ;
     49    _size                     = signal._size;
     50    _is_allocate              = signal._is_allocate;
     51    _is_map_as_component_src  = signal._is_map_as_component_src ;
     52    _is_map_as_component_dest = signal._is_map_as_component_dest;
     53    _is_map_as_toplevel_dest  = signal._is_map_as_component_dest;
     54    _connect_from_signal      = signal._connect_from_signal;
     55    _connect_to_signal        = signal._connect_to_signal;
     56    _sc_signal                = signal._sc_signal    ;
     57    _sc_signal_map            = signal._sc_signal_map;
     58    _type_info                = signal._type_info ;
    5259#ifdef VHDL_TESTBENCH
    53     _list_value          = signal._list_value;
     60    _list_value               = signal._list_value;
    5461#endif
    5562    log_printf(FUNC,Behavioural,"Signal (copy)","End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_connect.cpp

    r75 r78  
    1717  {
    1818    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
    19    
    20     //std::cout << "connected : " << get_name() << "\twith " << signal_dest->get_name() << std::endl;
    21    
     19
     20//     log_printf(TRACE,Behavioural,FUNCTION,"Connection between : %s with %s",get_name().c_str(),signal_dest->get_name().c_str());
     21//     log_printf(ALL,Behavioural,FUNCTION," * source");
     22//     log_printf(ALL,Behavioural,FUNCTION,"   * direction : %s",toString(_direction).c_str());
     23//     log_printf(ALL,Behavioural,FUNCTION,"   * sc_signal : %.8x",_sc_signal);
     24//     log_printf(ALL,Behavioural,FUNCTION,"   * type_info : %s",toString(_type_info).c_str());
     25//     log_printf(ALL,Behavioural,FUNCTION," * destination");
     26//     log_printf(ALL,Behavioural,FUNCTION,"   * direction : %s",toString(signal_dest->_direction).c_str());
     27//     log_printf(ALL,Behavioural,FUNCTION,"   * sc_signal : %.8x",signal_dest->_sc_signal);
     28//     log_printf(ALL,Behavioural,FUNCTION,"   * type_info : %s",toString(signal_dest->_type_info).c_str());
     29
    2230    if ((_direction == IN ) and (signal_dest->_direction == IN ))
    2331      switch (_type_info)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_link.cpp

    r65 r78  
    1717                     bool     signal_dest_is_port)
    1818  {
     19    // signal_dest_is_port == 1 when the signal dest is in a top level interface. (else, signal_dest is type "INTERNAL")
     20   
    1921    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
    2022
     
    2325    // Test
    2426    if (signal_src ->_is_allocate == false)
    25       throw (ErrorMorpheo ("<Signal::link> Signal \""+_name+"\", can't map with signal \""+        get_name()+"\", because the first signal is not already allocate."));
     27      throw (ERRORMORPHEO (FUNCTION,"Signal \""+_name+"\", can't map with signal \""+        get_name()+"\", because the first signal is not already allocate."));
    2628    if (signal_dest->_is_allocate == false)
    27       throw (ErrorMorpheo ("<Signal::link> Signal \""+_name+"\", can't map with signal \""+signal_dest->get_name()+"\", because the second signal is not already allocate."));
    28     if (signal_src ->_is_map_as_src  == true)
    29       throw (ErrorMorpheo ("<Signal::mapping> Can't mapping signal \""+_name+"\" with \""+signal_dest->get_name()+"\", because the first signal is already mapped."));
     29      throw (ERRORMORPHEO (FUNCTION,"Signal \""+_name+"\", can't map with signal \""+signal_dest->get_name()+"\", because the second signal is not already allocate."));
    3030
    3131    // List of all case
     
    4343        not (not signal_dest_is_port and (((signal_src->_direction == IN ) and (signal_dest->_direction == INTERNAL)) or
    4444                                          ((signal_src->_direction == OUT) and (signal_dest->_direction == INTERNAL)))))
    45       throw (ErrorMorpheo ("<Signal::link> Signal \""+_name+"\" can't been linked with signal \""+signal_dest->get_name()+"\" : illegal direction ("+toString(signal_src->_direction)+" with "+toString(signal_dest->_direction)+")."));
     45      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)+")."));
     46
     47
     48    // Multi consumer is authorized , no to multi producer!
     49    bool source_have_multi_consumer      = (signal_src ->_connect_to_signal != NULL);
     50//     bool destination_have_multi_producer = (signal_dest->_connect_from_signal != NULL) and (signal_dest_is_port == false);
     51//     if (destination_have_multi_producer)
     52// //       throw (ERRORMORPHEO (FUNCTION,"Signal \""+_name+"\" can't been linked with signal \""+signal_dest->get_name()+"\" : destination have multi producer."));
     53//       log_printf(NONE,Behavioural,FUNCTION,"Signal \"%s\" can't been linked with signal \"%s\" : destination have multi producer.",_name.c_str(),signal_dest->get_name().c_str());
    4654
    4755    // update info source
    48     signal_src ->_connect_to_signal   = signal_dest;
    49     signal_src ->_is_map_as_src       = true;
     56    signal_src ->_connect_to_signal       = signal_dest;
     57    signal_src ->_is_map_as_component_src = true;
     58
     59    // update info destination
     60    if (signal_dest_is_port == true)
     61      signal_dest->_is_map_as_toplevel_dest = true; // because toplevel port can't be a source
     62    else
     63      // signal_dest is a internal signal
     64      if (signal_src->_direction == OUT)
     65        signal_dest->_is_map_as_component_dest = true;
     66      else
     67        signal_dest->_is_map_as_component_src  = true;
    5068   
    51     // update info destination
    52     signal_dest->_connect_from_signal = signal_src;
    53     signal_dest->_is_map_as_dest      = true;
    54 
    5569    // an internal signal and port can't be a source.
    5670    // also, to fill the connect_to_signal's field
    57     if ((signal_src->_direction == OUT) and
    58         (signal_dest->_direction == INTERNAL))
    59       {
    60         signal_dest->_connect_to_signal = signal_src;
    61       }
     71    if (signal_dest->_direction == INTERNAL)
     72      if (signal_src->_direction == OUT)
     73        signal_dest->_connect_from_signal = signal_src;
     74      else
     75        signal_dest->_connect_to_signal   = signal_src;
     76    else
     77      signal_dest->_connect_from_signal   = signal_src;
     78   
     79
    6280
    6381    // vhdl_testbench : to read an output producte by a internal component
     
    6684        (signal_src ->_direction == OUT))
    6785      signal_dest->_sc_signal_map = signal_src ->_sc_signal_map;
    68    
    69     connect (signal_dest);
     86
     87    // A signal can be connect once
     88    if (not source_have_multi_consumer)
     89      connect (signal_dest);
    7090
    7191    log_printf(FUNC,Behavioural,FUNCTION,"End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_test_map.cpp

    r75 r78  
    1414#undef  FUNCTION
    1515#define FUNCTION "Signal::test_map"
    16   bool Signal::test_map (bool top_level)
     16  bool Signal::test_map (uint32_t depth, bool top_level)
    1717  {
    1818    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
    1919
    20     log_printf(INFO,Behavioural,FUNCTION, "     * Signal \"%s\"",_name.c_str());
    21 
    22     bool _return = false;
     20    std::string str = "";
     21    std::string tab = std::string(depth,'\t');
     22//     log_printf(NONE,Behavioural,FUNCTION, "%s* Signal \"%s\"",tab.c_str(),_name.c_str());
     23//     log_printf(NONE,Behavioural,FUNCTION, "%s%d - %d - %d",tab.c_str(),
     24//             _is_map_as_toplevel_dest,
     25//             _is_map_as_component_src,
     26//             _is_map_as_component_dest);
     27    bool _return = true;
    2328
    2429    if (top_level == true)
    2530      {
    26         _return = _is_map_as_dest;
    27              
    2831        switch (_direction)
    2932          {
    3033          case morpheo::behavioural::IN       :
    3134            {
    32               if (_return == false)
    33                 std::cerr << "Signal \"" << _name << "\" is not mapped with an outpout port or a component." << std::endl;
     35              if (_is_map_as_toplevel_dest == false)
     36                {
     37                  _return = false;
     38
     39                  str = "Signal \""+_name+"\" is not mapped with an outpout port top-level's interface or a input port component's interface.";
     40                }
    3441              break;
    3542            }
    3643          case morpheo::behavioural::OUT      :
    3744            {
    38               if (_return == false)
    39                 std::cerr << "Signal \"" << _name << "\" is not mapped with an input port or a component." << std::endl;
     45              if (_is_map_as_toplevel_dest == false)
     46                {
     47                  _return = false;
     48                  str = "Signal \""+_name+"\" is not mapped with an input port top-level's interface or a output port component's interface.";
     49                }
    4050              break;
    4151            }
    42             //case morpheo::behavioural::INTERNAL : return "internal" ; break;
    43             //case morpheo::behavioural::INOUT    : return "inout"    ; break;
     52            //case morpheo::behavioural::INTERNAL :
     53            //case morpheo::behavioural::INOUT    :
    4454          default    : break;
    4555          }
     
    4757    else
    4858      {
    49         _return = _is_map_as_src and _is_map_as_dest;
     59        // internal signal :
     60        // Component --- I/O       (as_src)
     61        // Component --- Component (as_src and as_dest)
    5062
    51         if (_return == false)
     63        switch (_direction)
    5264          {
    53             if (_is_map_as_src  == false)
    54               std::cerr << "Signal \"" << _name << "\" is not mapped as source" << std::endl;
    55             if (_is_map_as_dest == false)
    56               std::cerr << "Signal \"" << _name << "\" is not mapped as destination" << std::endl;
     65          case morpheo::behavioural::IN       :
     66            {
     67              if (_is_map_as_component_src == false)
     68                {
     69                  _return = false;
     70                 
     71                  str = "Signal \""+_name+"\" is not mapped with an input port top-level's interface or a output port component's interface.";
     72                }
     73              break;
     74            }
     75          case morpheo::behavioural::OUT      :
     76            {
     77              if (_is_map_as_component_src == false)
     78                {
     79                  _return = false;
     80                 
     81                  str = "Signal \""+_name+"\" is not mapped with an outpout port top-level's interface or a input port component's interface.";
     82                }
     83              break;
     84            }
     85          case morpheo::behavioural::INTERNAL :
     86            {
     87              if (_is_map_as_component_src  == false)
     88                {
     89                  _return = false;
     90                 
     91                  str = "Internal signal \""+_name+"\" is not mapped with an outpout port top-level's interface or a input port component's interface.";
     92                }
     93
     94              if (_is_map_as_component_dest == false)
     95                {
     96                  if (_return == false)
     97                    str+="\n";
     98
     99                  _return = false;
     100                 
     101                  str += "Internal signal \""+_name+"\" is not mapped with an input port top-level's interface or a output port component's interface.";
     102                }
     103
     104              break;
     105            }
     106            //case morpheo::behavioural::INOUT    :
     107          default    : break;
    57108          }
    58109      }
    59110   
    60111    log_printf(FUNC,Behavioural,FUNCTION,"End");
     112
     113
     114
     115    if (_return == false)
     116      {
     117        log_printf(NONE,Behavioural,FUNCTION, "%s* %s",tab.c_str(),str.c_str());
     118       
     119#ifndef DEBUG
     120        std::cerr << str << std::endl;
     121#endif
     122      }
     123    else
     124      {
     125//      log_printf(NONE,Behavioural,FUNCTION, "%s* Signal \"%s\" is OK.",tab.c_str(),_name.c_str());
     126      }
    61127   
    62128    return _return;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Stat_create_expr.cpp

    r71 r78  
    44namespace morpheo {
    55namespace behavioural {
    6   void        Stat::create_expr     (std::string varname, std::string expr, bool each_cycle)
     6
     7  void Stat::create_expr (std::string varname,
     8                          std::string expr,
     9                          bool each_cycle)
    710  {
    811    if (is_valid_var (varname))
     
    1720    _list_expr->push_back(expression);
    1821  }
     22
     23  void Stat::create_expr_average (std::string varname,
     24                                  std::string expr_sum,
     25                                  std::string expr_deps,
     26                                  std::string unit,
     27                                  std::string description)
     28  {
     29    create_counter(varname,unit,description);
     30    create_expr   (varname, "/ "+expr_sum+" "+expr_deps, false);
     31  }
     32
     33  void Stat::create_expr_average_by_cycle (std::string varname,
     34                                           std::string expr_sum,
     35                                           std::string unit,
     36                                           std::string description)
     37  {
     38    create_expr_average (varname, expr_sum, "cycle", unit, description);
     39  }
     40
     41  void Stat::create_expr_percent (std::string varname,
     42                                  std::string expr_sum,
     43                                  std::string expr_max,
     44                                  std::string description)
     45  {
     46    create_counter(varname,"%",description);
     47    create_expr   (varname, "/ * "+expr_sum+" 100 "+expr_max, false);
     48  }
     49
     50
    1951};
    2052};
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Stat_string2tree.cpp

    r71 r78  
    99  Stat_binary_tree * Stat::string2tree     (std::string expr)
    1010  {
    11     std::cout << "expr : " << expr << std::endl;
    12 
    1311    const std::string delims  (" ");          // délimiteur : " "
    1412    const std::string numbers ("0123456789"); // délimiteur : " "
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Test.cpp

    r59 r78  
    22 * $Id$
    33 *
    4  * [ Description ]
     4 * [ Description ]
    55 *
    66 */
     
    1212namespace behavioural          {
    1313
    14   bool Parameters::is_natural            (double  val )  { return ( (val >= 0) && (floor(val) == ceil(val)));};
    15   bool Parameters::is_positive           (double  val )  { return ( (val >= 1) && (floor(val) == ceil(val)));};
    16   bool Parameters::is_multiple           (uint32_t val1,
    17                                           uint32_t val2) { return is_positive((1.0*val1)/(1.0*val2));};
    18   bool Parameters::is_between_inclusive  (uint32_t val,
    19                                           uint32_t min,
    20                                           uint32_t max)  { return ((val >= min) && (val <= max));};
    21   bool Parameters::is_between_exclusive  (uint32_t val,
    22                                           uint32_t min,
    23                                           uint32_t max)  { return ((val >  min) && (val <  max));};
    24  
     14  bool is_natural            (double  val )  { return ( (val >= 0) && (floor(val) == ceil(val)));};
     15  bool is_positive           (double  val )  { return ( (val >= 1) && (floor(val) == ceil(val)));};
     16  bool is_power2             (uint32_t val)  { return is_natural(::log2(static_cast<double>(val)));};
     17  bool is_multiple           (uint32_t val1,
     18                              uint32_t val2) { return is_positive((1.0*val1)/(1.0*val2));};
     19  bool is_between_inclusive  (uint32_t val,
     20                              uint32_t min,
     21                              uint32_t max)  { return ((val >= min) && (val <= max));};
     22  bool is_between_exclusive  (uint32_t val,
     23                              uint32_t min,
     24                              uint32_t max)  { return ((val >  min) && (val <  max));};
    2525}; // end namespace behavioural         
    2626}; // end namespace morpheo             
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/XML_get_body.cpp

    r71 r78  
    2727    std::string tabulation = indent(depth);
    2828
    29 //     body.insert(0,tabulation);
     29    body.insert(0,tabulation);
    3030    for (size_t pos=body.find('\n',0); pos<body.length()-1; pos=body.find('\n',++pos))
    3131      body.insert(++pos,tabulation);
Note: See TracChangeset for help on using the changeset viewer.