Changeset 38 for trunk


Ignore:
Timestamp:
May 31, 2007, 11:22:29 PM (17 years ago)
Author:
rosiere
Message:

Interface et vhdl_testbench : l'appel aux fonction add_input et add_ouput est maintenant réalisé par la classe Interface (et autre).

2 remarques :

  • tester avec des sous composants (en particulier les sorties d'un est directement relié au sortie d'un autre)
  • Signal_testbench.cpp -> l'optimisé (par exemple pointeur de fonction afin d'éviter le test et le switch)
Location:
trunk/IPs/systemC/processor/Morpheo
Files:
4 added
30 edited

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/src/Select_Priority_Fixed_vhdl_testbench_transition.cpp

    r15 r38  
    2727    // (because we have no control on the ordonnancer's policy)
    2828
    29     _vhdl_testbench->add_input (PORT_READ( in_NRESET));
    30    
    31     for (uint32_t i=0; i<_param._nb_entity; i++)
    32       {
    33         _vhdl_testbench->add_input (PORT_READ( in_VAL [i]));
    34         if (_param._encoding_one_hot)
    35         _vhdl_testbench->add_output(PORT_READ(out_ACK [i]));
    36       }
    37    
    38     if (_param._encoding_compact)
    39       {
    40     _vhdl_testbench->add_output(PORT_READ(out_ENTITY));
    41     _vhdl_testbench->add_output(PORT_READ(out_ENTITY_ACK));
    42       }
     29    _interfaces->testbench(_vhdl_testbench);
     30
    4331    // add_test :
    4432    //  - True  : the cycle must be compare with the output of systemC
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Makefile.flags

    r29 r38  
    2020                                        -DPOSITION              \
    2121                                        -DCONFIGURATION         \
    22                                         -DDEBUG=DEBUG_ALL   
     22                                        -DDEBUG=DEBUG_ALL   
     23
    2324                                       
    2425# Flags :
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Debug_component.h

    r15 r38  
    88#define     DEBUG_Shifter                                   false
    99#define     DEBUG_Register_File                             false
    10 #define     DEBUG_RegisterFile_Multi_Banked                 true
    11 #define       DEBUG_RegisterFile_Multi_Banked_Glue          true
     10#define     DEBUG_RegisterFile_Multi_Banked                 false
     11#define       DEBUG_RegisterFile_Multi_Banked_Glue          false
    1212#define     DEBUG_Select                                    false
    13 #define       DEBUG_Select_Priority_Fixed                   true
     13#define       DEBUG_Select_Priority_Fixed                   false
    1414#define     DEBUG_Victim                                    false
    1515#define       DEBUG_Victim_Pseudo_LRU                       false
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Entity.h

    r31 r38  
    5757  public    : Interface  *          find_interface    (string name);
    5858
    59   public    : void                  mapping           (uint32_t size_x,
    60                                                        uint32_t size_y,
    61                                                        uint32_t pos_x ,
    62                                                        uint32_t pos_y );
     59  public    : void                  mapping           (uint32_t pos_x,
     60                                                       uint32_t pos_y,
     61                                                       uint32_t size_x ,
     62                                                       uint32_t size_y );
    6363
    6464  public    : XML                   toXML             (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Interface.h

    r31 r38  
    4444  private   :       string          _comment      ;
    4545
     46  private   : list<Signal *>      * _list_signal  ;
     47
     48
    4649#ifdef POSITION
    4750  private   :       bool            _is_map       ;
     
    4952  private   :       void          * _interface_map; // pour être homogène avec _entity_map
    5053#endif
    51   private   : list<Signal>        * _list_signal  ;
    5254
    5355    // -----[ methods ]---------------------------------------------------
     
    7375                                                          presence_port_t presence_port=PORT_VHDL_YES_TESTBENCH_YES)
    7476    {
     77      log_printf(FUNC,Behavioural,"set_signal_clk","Begin");
     78
    7579      Signal * sig = set_signal (name, IN , size, presence_port);
    7680      sc_in_clk * signal = new sc_in_clk (sig->_name.c_str());
     81
     82      log_printf(FUNC,Behavioural,"set_signal_clk","End");
     83
    7784      return signal;
    7885    };
     
    8390                                                         presence_port_t presence_port=PORT_VHDL_YES_TESTBENCH_YES)
    8491    {
     92      log_printf(FUNC,Behavioural,"set_signal_in","Begin");
     93
    8594      Signal * sig = set_signal (name, IN , size, presence_port);
    86       sc_in <T> * signal = new sc_in <T> (sig->_name.c_str());
    87       return signal;
     95      sc_in <T> * port = new sc_in <T> (sig->_name.c_str());
     96#ifdef VHDL_TESTBENCH
     97      sig->alloc<T> (static_cast<void *>(port));
     98#endif
     99
     100      log_printf(FUNC,Behavioural,"set_signal_in","End");
     101
     102      return port;
    88103    };
    89104
     
    93108                                                         presence_port_t presence_port=PORT_VHDL_YES_TESTBENCH_YES)
    94109    {
     110      log_printf(FUNC,Behavioural,"set_signal_out","Begin");
     111
    95112      Signal * sig = set_signal (name, OUT , size, presence_port);
    96       sc_out <T> * signal = new sc_out <T> (sig->_name.c_str());
    97       return signal;
     113      sc_out <T> * port = new sc_out <T> (sig->_name.c_str());
     114#ifdef VHDL_TESTBENCH
     115      sig->alloc<T> (static_cast<void *>(port));
     116#endif
     117
     118      log_printf(FUNC,Behavioural,"set_signal_out","End");
     119
     120      return port;
    98121    };
    99122#endif
     
    111134#endif
    112135
     136#ifdef VHDL_TESTBENCH
     137  public    : void                  testbench            (Vhdl_Testbench * & vhdl_testbench);
     138#endif
     139
    113140  public    : XML                   toXML                (void);
    114141#ifdef POSITION
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Interfaces.h

    r31 r38  
    3030  {
    3131    // -----[ fields ]----------------------------------------------------
    32   private   : list<Interface>     * _list_interface;
     32  private   : list<Interface*>    * _list_interface;
    3333
    3434    // -----[ methods ]---------------------------------------------------
     
    5555  public    : Interface  *          find_interface        (string name);
    5656
     57#ifdef VHDL_TESTBENCH
     58  public    : void                  testbench             (Vhdl_Testbench * & vhdl_testbench);
     59#endif
     60
    5761  public    : XML                   toXML                 (void);
    5862#ifdef POSITION
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Position.h

    r31 r38  
    3838  private   : string                get_entity        (void);
    3939
    40   public    : void                  set_component     (Entity * entity,
    41                                                        uint32_t size_x,
    42                                                        uint32_t size_y,
    43                                                        uint32_t pos_x ,
    44                                                        uint32_t pos_y );
     40  public    : void                  set_component     (Position * position,
     41                                                       uint32_t   pos_x  ,
     42                                                       uint32_t   pos_y  ,
     43                                                       uint32_t   size_x ,
     44                                                       uint32_t   size_y );
    4545
    4646  private   : string                get_component     (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Signal.h

    r31 r38  
    99 */
    1010
     11#ifdef SYSTEMC
     12#include "systemc.h"
     13#endif
     14
    1115#include <stdint.h>
    1216#include <iostream>
     17
     18#ifdef VHDL_TESTBENCH
     19#include "Behavioural/include/Vhdl_Testbench.h"
     20#endif
     21
    1322#include "Behavioural/include/Direction.h"
    1423#include "Behavioural/include/XML.h"
     24#include "Include/ErrorMorpheo.h"
    1525#include "Include/ToString.h"
    1626#include "Include/Debug.h"
     
    2030namespace morpheo              {
    2131namespace behavioural          {
     32
     33  typedef enum {UNKNOW                     ,
     34                BOOL                       ,
     35                UINT8_T                    ,
     36                UINT16_T                   ,
     37                UINT32_T                   ,
     38                UINT64_T                   } type_info_t;
    2239
    2340  typedef enum {PORT_VHDL_YES_TESTBENCH_YES,
     
    3653  private   : const presence_port_t _presence_port;
    3754
     55#ifdef VHDL_TESTBENCH
     56  private   : void *                _signal       ;
     57  private   : type_info_t           _type_info    ;
     58#endif
     59
    3860    // -----[ methods ]---------------------------------------------------
    3961  public    :                   Signal          (string          name          ,
     
    4365  public    :                   Signal          (const Signal &);
    4466  public    :                   ~Signal         ();
     67
     68#ifdef VHDL_TESTBENCH
     69  public    : void              testbench       (Vhdl_Testbench * & vhdl_testbench);
     70
     71  public    : template <typename T>
     72              void              alloc           (void * port)
     73    {
     74      if (_type_info != UNKNOW)
     75        throw (ErrorMorpheo ("Signal \""+_name+"\" : already allocate."));
     76
     77      _signal    = port;
     78
     79      if (typeid(T) == typeid(bool    ))
     80        _type_info = BOOL;
     81      else
     82      if (typeid(T) == typeid(uint8_t ))
     83        _type_info = UINT8_T;
     84      else
     85      if (typeid(T) == typeid(uint16_t))
     86        _type_info = UINT16_T;
     87      else
     88      if (typeid(T) == typeid(uint32_t))
     89        _type_info = UINT32_T;
     90      else
     91      if (typeid(T) == typeid(uint64_t))
     92        _type_info = UINT64_T;
     93      else
     94        _type_info = UNKNOW;
     95    }
     96#endif
    4597
    4698  public    : XML               toXML           (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity.cpp

    r31 r38  
    1919    _schema     (schema    )
    2020  {
     21    log_printf(FUNC,Behavioural,"Entity","Begin");
    2122    _is_map = false;
     23    log_printf(FUNC,Behavioural,"Entity","End");
    2224  };
    2325
     
    2729    _schema     (entity._schema    )
    2830  {
     31    log_printf(FUNC,Behavioural,"Entity (copy)","Begin");
    2932    _is_map     = entity._is_map    ;
    3033    _interfaces = entity._interfaces;
    3134    _comment    = entity._comment   ;
     35    log_printf(FUNC,Behavioural,"Entity (copy)","End");
    3236  };
    3337 
    3438  Entity::~Entity ()
    3539  {
     40    log_printf(FUNC,Behavioural,"~Entity","Begin");
    3641    delete _interfaces;
     42    log_printf(FUNC,Behavioural,"~Entity","End");
    3743  };
    3844 
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_map.cpp

    r31 r38  
    1313namespace behavioural          {
    1414
    15   void Entity::mapping (uint32_t size_x,
    16                         uint32_t size_y,
    17                         uint32_t pos_x ,
    18                         uint32_t pos_y )
     15  void Entity::mapping (uint32_t pos_x,
     16                        uint32_t pos_y,
     17                        uint32_t size_x ,
     18                        uint32_t size_y )
    1919  {
    2020    if (_is_map != false)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface.cpp

    r31 r38  
    1818    _localisation (localisation)
    1919  {
    20     _list_signal = new list<Signal>;
     20    log_printf(FUNC,Behavioural,"Interface","Begin");
     21
     22    _comment     = "";
     23    _list_signal = new (list<Signal*>);
     24
    2125#ifdef POSITION
    22     _is_map      = false;
     26     _is_map        = false;
     27     _entity_map    = NULL;
     28     _interface_map = NULL;
    2329#endif
     30
     31    log_printf(FUNC,Behavioural,"Interface","End");
    2432  };
    2533
     
    2937    _localisation (interface._localisation)
    3038  {
    31     _comment     = interface._comment    ;
    32     _list_signal = interface._list_signal;
     39    log_printf(FUNC,Behavioural,"Interface (copy)","Begin");
     40    _comment       = interface._comment    ;
     41    _list_signal   = interface._list_signal;
    3342#ifdef POSITION
    34     _is_map      = interface._is_map     ;
     43    _is_map        = interface._is_map     ;
     44    _entity_map    = interface._entity_map   ;
     45    _interface_map = interface._interface_map;
    3546#endif
     47    log_printf(FUNC,Behavioural,"Interface (copy)","End");
    3648  };
    3749 
    3850  Interface::~Interface ()
    3951  {
     52    log_printf(FUNC,Behavioural,"~Interface","Begin");
     53
     54    if (_list_signal->empty()== false)
     55      {
     56        list<Signal*>::iterator i     = _list_signal->begin();
     57
     58        while (i != _list_signal->end())
     59          {
     60            delete (*i);
     61            ++i;
     62          }
     63      }
     64
    4065    delete _list_signal;
     66    log_printf(FUNC,Behavioural,"~Interface","End");
    4167  };
    4268 
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_get_comment.cpp

    r29 r38  
    1414  string Interface::get_comment (void)
    1515  {
    16     return _comment;
     16    log_printf(FUNC,Behavioural,"get_comment","Begin");
     17    string res = _comment;
     18    log_printf(FUNC,Behavioural,"get_comment","End");
     19    return res;
    1720  };
    1821
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_get_signal.cpp

    r31 r38  
    1414  string Interface::get_signal (void)
    1515  {
     16    log_printf(FUNC,Behavioural,"get_signal","Begin");
    1617    uint32_t               depth          = 0;
    1718    string                 separator      = ",\n";
     
    1920
    2021
    21     list<Signal>::iterator i     = _list_signal->begin();
     22    list<Signal*>::iterator i    = _list_signal->begin();
    2223    bool                   empty = _list_signal->empty();
    2324
     
    3031        if (i != _list_signal->end())
    3132          {
    32             text << tab << *i;
     33            text << tab << **i;
    3334            ++i;
    3435          }
     
    3738          {
    3839            text << separator;
    39             text << tab << *i;
     40            text << tab << **i;
    4041            ++i;
    4142          }
    42        
    4343        if (last_separator)
    4444          text << separator;
    4545      }
     46
     47    log_printf(FUNC,Behavioural,"get_signal","End");
    4648
    4749    return text.str();
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_port_map.cpp

    r31 r38  
    1616                            void * interface)
    1717  {
     18    log_printf(FUNC,Behavioural,"port_map","Begin");
    1819    _is_map        = true     ;
    1920    _entity_map    = entity   ;
    2021    _interface_map = interface;
    21 
     22    log_printf(FUNC,Behavioural,"port_map","End");
    2223  };
    2324
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_print.cpp

    r29 r38  
    1515                       morpheo::behavioural::Interface & x)
    1616  {
     17    log_printf(FUNC,Behavioural,"operator<<","Begin");
    1718    output_stream << x._name + "\t"+toString(x._localisation)+"\t"+toString(x._direction) << endl;
    1819    output_stream << x.get_comment() << endl;
    1920    output_stream << x.get_signal () << endl;
     21    log_printf(FUNC,Behavioural,"operator<<","End");
    2022    return output_stream;
    2123  };
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_set_comment.cpp

    r29 r38  
    1414  void Interface::set_comment (string comment)
    1515  {
     16    log_printf(FUNC,Behavioural,"set_comment","Begin");
    1617    _comment = _comment + comment;
     18    log_printf(FUNC,Behavioural,"set_comment","End");
    1719  };
    1820
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_set_port.cpp

    r31 r38  
    1515  void Interface::set_port (Vhdl * & vhdl)
    1616  {
     17    log_printf(FUNC,Behavioural,"set_port (Vhdl)","Begin");
    1718    if (not _list_signal->empty())
    1819      {
    19         list<Signal>::iterator i     = _list_signal->begin();
     20        list<Signal*>::iterator i     = _list_signal->begin();
    2021       
    2122        while (i != _list_signal->end())
    2223          {
    23             presence_port_t p = (*i)._presence_port;
     24            presence_port_t p = (*i)->_presence_port;
    2425            if ((p == PORT_VHDL_YES_TESTBENCH_YES) or
    2526                (p == PORT_VHDL_YES_TESTBENCH_NO ) )
    26               vhdl->set_port ((*i)._name,(*i)._direction,(*i)._size);
     27              vhdl->set_port ((*i)->_name,(*i)->_direction,(*i)->_size);
    2728            ++i;
    2829          }
    2930      }
     31    log_printf(FUNC,Behavioural,"set_port (Vhdl)","End");
    3032  };
    3133
    3234  void Interface::set_port (Vhdl_Testbench * & vhdl_testbench)
    3335  {
     36    log_printf(FUNC,Behavioural,"set_port (Testbench)","Begin");
    3437    if (not _list_signal->empty())
    3538      {
    36         list<Signal>::iterator i     = _list_signal->begin();
     39        list<Signal*>::iterator i     = _list_signal->begin();
    3740       
    3841        while (i != _list_signal->end())
    3942          {
    40             presence_port_t p = (*i)._presence_port;
     43            presence_port_t p = (*i)->_presence_port;
    4144            if ((p == PORT_VHDL_YES_TESTBENCH_YES) or
    4245                (p == PORT_VHDL_NO_TESTBENCH_YES ) )
    43               vhdl_testbench->set_port ((*i)._name,(*i)._direction,(*i)._size);
     46              vhdl_testbench->set_port ((*i)->_name,(*i)->_direction,(*i)->_size);
    4447            ++i;
    4548          }
    4649      }
     50    log_printf(FUNC,Behavioural,"set_port (Testbench)","End");
    4751  };
    4852
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_set_signal.cpp

    r31 r38  
    1212namespace behavioural          {
    1313
    14 //   string Interface::set_signal (Signal signal)
    15 //   {
    16 //     return set_signal(signal._name     ,
    17 //                    signal._direction,
    18 //                    signal._size     );
    19 //   };
    20 
    2114  Signal * Interface::set_signal (string          name     ,
    2215                                  direction_t     direction,
     
    2417                                  presence_port_t presence_port)
    2518  {
     19    log_printf(FUNC,Behavioural,"set_signal","Begin");
    2620    string str_direction =  toString(direction);
    2721    string str_interface = _name;
     
    3731    if (name  != "")
    3832      signame += "_"+str_signal;
    39    
     33
    4034    Signal * sig = new Signal (signame      ,
    4135                               direction    ,
    4236                               size         ,
    4337                               presence_port);
    44     _list_signal->push_back (*sig);
     38
     39    _list_signal->push_back (sig);
     40
     41    log_printf(FUNC,Behavioural,"set_signal","End");
    4542
    4643    return sig;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_toXML.cpp

    r31 r38  
    1414  XML Interface::toXML (void)
    1515  {
     16    log_printf(FUNC,Behavioural,"toXML","Begin");
     17
    1618    XML xml ("interface");
    1719   
     
    2527    if (_list_signal->empty()== false)
    2628      {
    27         list<Signal>::iterator i     = _list_signal->begin();
     29        list<Signal*>::iterator i     = _list_signal->begin();
    2830
    2931        while (i != _list_signal->end())
    3032          {
    31             xml.  insert_XML ((*i).toXML());
     33            xml.  insert_XML ((*i)->toXML());
    3234            ++i;
    3335          }
     
    3537
    3638    xml.balise_close      ();
    37      
     39
     40    log_printf(FUNC,Behavioural,"toXML","End");
     41   
    3842    return xml;
    3943  };
     
    4246  XML Interface::toXML_mapping (void)
    4347  {
     48    log_printf(FUNC,Behavioural,"toXML_mapping","Begin");
     49
    4450    if (_is_map != true)
    4551      throw (ErrorMorpheo ("Interface \""+_name+"\" is never mapped"));
     
    5258    xml.  attribut      ("port"     ,(static_cast<Interface *>(_interface_map))->_name);
    5359    xml.singleton_end   ();
     60
     61    log_printf(FUNC,Behavioural,"toXML_mapping","End");
    5462     
    5563    return xml;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces.cpp

    r31 r38  
    1313  Interfaces::Interfaces  (void)
    1414  {
    15     _list_interface = new list<Interface>;
     15    log_printf(FUNC,Behavioural,"Interfaces","Begin");
     16    _list_interface = new list<Interface*>;
     17    log_printf(FUNC,Behavioural,"Interfaces","End");
    1618  };
    1719
    1820  Interfaces::Interfaces  (const Interfaces & interfaces)
    1921  {
     22    log_printf(FUNC,Behavioural,"Interfaces (copy)","Begin");
    2023    _list_interface = interfaces._list_interface;
     24    log_printf(FUNC,Behavioural,"Interfaces (copy)","End");
    2125  };
    2226 
    2327  Interfaces::~Interfaces ()
    2428  {
     29    log_printf(FUNC,Behavioural,"~Interfaces","Begin");
     30
     31    if (_list_interface->empty()== false)
     32      {
     33        list<Interface*>::iterator i     = _list_interface->begin();
     34
     35        while (i != _list_interface->end())
     36          {
     37            delete (*i);
     38            ++i;
     39          }
     40      }
     41
    2542    delete _list_interface;
     43    log_printf(FUNC,Behavioural,"~Interfaces","End");
    2644  };
    2745 
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_find_interface.cpp

    r31 r38  
    1515    if (_list_interface->empty()== false)
    1616      {
    17         list<Interface>::iterator i     = _list_interface->begin();
     17        list<Interface*>::iterator i     = _list_interface->begin();
    1818
    1919        while (i != _list_interface->end())
    2020          {
    21             if ((*i)._name == name)
    22               return &(*i);
     21            if ((*i)->_name == name)
     22              return (*i);
    2323            ++i;
    2424          }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_get_interface.cpp

    r31 r38  
    1818    bool                   last_separator = false;
    1919
    20     list<Interface>::iterator i  = _list_interface->begin();
     20    list<Interface*>::iterator i  = _list_interface->begin();
    2121    bool                   empty = _list_interface->empty();
    2222
     
    2929        if (i != _list_interface->end())
    3030          {
    31             text << tab << *i;
     31            text << tab << **i;
    3232            ++i;
    3333          }
     
    3636          {
    3737            text << separator;
    38             text << tab << *i;
     38            text << tab << **i;
    3939            ++i;
    4040          }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_set_interface.cpp

    r31 r38  
    1717    Interface * interface = new Interface (name, direction, localisation);
    1818   
    19     _list_interface->push_back (*interface);
     19    _list_interface->push_back (interface);
    2020
    21     return interface;
     21     return interface;
    2222  };
    2323
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_set_port.cpp

    r31 r38  
    1717    if (not _list_interface->empty())
    1818      {
    19         list<Interface>::iterator i     = _list_interface->begin();
     19        list<Interface*>::iterator i     = _list_interface->begin();
    2020       
    2121        while (i != _list_interface->end())
    2222          {
    23             (*i).set_port (vhdl);
     23            (*i)->set_port (vhdl);
    2424            ++i;
    2525          }
     
    3131    if (not _list_interface->empty())
    3232      {
    33         list<Interface>::iterator i     = _list_interface->begin();
     33        list<Interface*>::iterator i     = _list_interface->begin();
    3434       
    3535        while (i != _list_interface->end())
    3636          {
    37             (*i).set_port (vhdl_testbench);
     37            (*i)->set_port (vhdl_testbench);
    3838            ++i;
    3939          }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_toXML.cpp

    r31 r38  
    1717    if (_list_interface->empty()== false)
    1818      {
    19         list<Interface>::iterator i     = _list_interface->begin();
     19        list<Interface*>::iterator i     = _list_interface->begin();
    2020
    2121        while (i != _list_interface->end())
    2222          {
    23             xml.  insert_XML ((*i).toXML());
     23            xml.  insert_XML ((*i)->toXML());
    2424            ++i;
    2525          }
     
    3636    if (_list_interface->empty()== false)
    3737      {
    38         list<Interface>::iterator i     = _list_interface->begin();
     38        list<Interface*>::iterator i     = _list_interface->begin();
    3939
    4040        while (i != _list_interface->end())
    4141          {
    42             xml.  insert_XML ((*i).toXML_mapping());
     42            xml.  insert_XML ((*i)->toXML_mapping());
    4343            ++i;
    4444          }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Position.cpp

    r31 r38  
    1414  Position::Position  (void)
    1515  {
     16    log_printf(FUNC,Behavioural,"Position","Begin");
    1617    _list_component = new list<Entity *>;
     18    log_printf(FUNC,Behavioural,"Position","End");
    1719  };
    1820
    1921  Position::Position  (const Position & position)
    2022  {
     23    log_printf(FUNC,Behavioural,"Position (copy)","Begin");
    2124    _entity         = position._entity        ;
    2225    _list_component = position._list_component;
     26    log_printf(FUNC,Behavioural,"Position (copy)","End");
    2327  };
    2428 
    2529  Position::~Position ()
    2630  {
     31    log_printf(FUNC,Behavioural,"~Position","Begin");
    2732    delete _entity;
     33
     34//     if (_list_component->empty()== false)
     35//       {
     36//      list<Entity *>::iterator i = _list_component->begin();
     37
     38//      while (i != _list_component->end())
     39//        {
     40//          delete (*i);
     41//          ++i;
     42//        }
     43//       }
     44
    2845    delete _list_component;
     46    log_printf(FUNC,Behavioural,"~Position","End");
    2947  };
    3048 
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Position_set_component.cpp

    r31 r38  
    1212namespace behavioural          {
    1313
    14   void Position::set_component (Entity * entity,
    15                                 uint32_t size_x,
    16                                 uint32_t size_y,
    17                                 uint32_t pos_x ,
    18                                 uint32_t pos_y )
     14  void Position::set_component (Position * position,
     15                                uint32_t   pos_x  ,
     16                                uint32_t   pos_y  ,
     17                                uint32_t   size_x ,
     18                                uint32_t   size_y )
    1919  {
     20    Entity * entity = position->_entity;
     21
    2022    _list_component->push_back(entity);
    2123
    22     entity->mapping(size_x, size_y, pos_x, pos_y);
     24    entity->mapping( pos_x, pos_y, size_x, size_y);
    2325  };
    2426
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal.cpp

    r31 r38  
    2020    _presence_port (presence_port)
    2121  {
     22    log_printf(FUNC,Behavioural,"Signal","Begin");
     23#ifdef VHDL_TESTBENCH
     24    _signal    = NULL;
     25    _type_info = UNKNOW;
     26#endif
     27    log_printf(FUNC,Behavioural,"Signal","End");
    2228  };
    2329
     
    2834    _presence_port (signal._presence_port)
    2935  {
     36    log_printf(FUNC,Behavioural,"Signal (copy)","Begin");
     37#ifdef VHDL_TESTBENCH
     38    _signal    = signal._signal   ;
     39    _type_info = signal._type_info;
     40#endif
     41    log_printf(FUNC,Behavioural,"Signal (copy)","End");
    3042  };
    3143
    3244  Signal::~Signal ()
    3345  {
     46    log_printf(FUNC,Behavioural,"~Signal","Begin");
     47    log_printf(FUNC,Behavioural,"~Signal","End");
    3448  };
    3549
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_print.cpp

    r29 r38  
    1717                       morpheo::behavioural::Signal & x)
    1818  {
    19     output_stream << x._name + "\t{"+toString(x._size)+"}\t"+toString(x._direction) +"\t"+toString(x._presence_port);
     19    log_printf(FUNC,Behavioural,"operator<<","Begin");
     20
     21    output_stream << x._name ;
     22    output_stream << "\t{" << x._size << "}\t"
     23                  << toString(x._direction)    << "\t"
     24                  << toString(x._presence_port)<< endl;
     25
     26    log_printf(FUNC,Behavioural,"operator<<","End");
    2027
    2128    return output_stream;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_toXML.cpp

    r29 r38  
    1313  XML Signal::toXML (void)
    1414  {
     15    log_printf(FUNC,Behavioural,"toXML","Begin");
     16
    1517    XML xml ("signal");
    1618   
     
    2022    xml.attribut        ("size"     ,toString(_size     ));
    2123    xml.singleton_end   ();
    22      
     24 
     25    log_printf(FUNC,Behavioural,"toXML","End");
     26   
    2327    return xml;
    2428  };
Note: See TracChangeset for help on using the changeset viewer.