Ignore:
Timestamp:
Apr 14, 2009, 8:39:12 PM (15 years ago)
Author:
rosiere
Message:

1) Add modelsim simulation systemC
2) Modelsim cosimulation systemC / VHDL is not finish !!!! (cf execute_queue and write_unit)
3) Add multi architecture
5) Add template for comparator, multiplier and divider
6) Change Message
Warning) Various test macro have change, many selftest can't compile

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Component.h

    r82 r113  
    7272    public : Entity    * _entity   ;
    7373    public : Tinstance_t _instance ;
     74    public : std::string _architecture;
    7475    } Tcomponent_t;   
    7576 
     
    102103#endif
    103104                                                       ,Tinstance_t instance=INSTANCE_ALL
     105                                                       ,std::string architecture=""
    104106                                                       );
    105107
     
    116118
    117119  private   : Signal *              signal_internal   (Entity * entity_productor,
    118                                                        Signal * signal_productor);
     120                                                       Signal * signal_productor,
     121                                                       Entity * entity_consumer,
     122                                                       Signal * signal_consumer);
    119123
    120124  public    : void                  port_map          (std::string component_src ,
     
    125129  public    : bool                  test_map          (bool recursive=true);
    126130  private   : bool                  test_map          (uint32_t depth, bool recursive);
     131
     132  public    : void *                get_sc_signal     (std::string component,
     133                                                       std::string port     );
     134//   public    : void                  set_sc_signal     (std::string component,
     135//                                                     std::string port     ,
     136//                                                        void *      sc_signal);
    127137
    128138//   public    : bool                  test_equi         (bool recursive=true);
     
    141151  public    : friend std::ostream&  operator<<        (std::ostream& output_stream,
    142152                                                       morpheo::behavioural::Component & x);
     153
     154
     155#undef  FUNCTION
     156#define FUNCTION "Component::set_sc_signal"
     157  public    : template <typename T>
     158  void set_sc_signal (std::string component,
     159                      std::string port     ,
     160                      void *      sc_signal)
     161    {
     162      log_begin(Behavioural,FUNCTION);
     163     
     164      std::string name_entity = _entity->get_name();
     165     
     166      Entity * entity = find_entity(component);
     167     
     168      if (entity == NULL)
     169        throw (ERRORMORPHEO (FUNCTION,"In component \""+name_entity+"\", the component \""+component+"\" is unknow.\n"));
     170     
     171      Signal * signal = entity->find_signal (port);
     172     
     173      if (signal == NULL)
     174        throw (ERRORMORPHEO (FUNCTION,"In component \""+name_entity+"\", the component \""+component+"\" have not the signal \""+port+"\".\n"));
     175     
     176      signal->alloc<T>(sc_signal);
     177     
     178      log_end(Behavioural,FUNCTION);
     179    };
    143180  };
    144181
Note: See TracChangeset for help on using the changeset viewer.