source: trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/src/New_Component_allocation.cpp

Last change on this file was 113, checked in by rosiere, 15 years ago

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 size: 1.7 KB
RevLine 
[2]1/*
2 * $Id$
3 *
[73]4 * [ Description ]
[2]5 *
6 */
7
8#include "Behavioural/@DIRECTORY/include/@COMPONENT.h"
[73]9#include "Behavioural/include/Allocation.h"
[82]10#include "Common/include/Max.h"
[2]11
[113]12namespace morpheo {
[2]13namespace behavioural {
14@NAMESPACE_BEGIN
15
[53]16
17#undef  FUNCTION
18#define FUNCTION "@COMPONENT::allocation"
[74]19  void @COMPONENT::allocation (
20#ifdef STATISTICS
21                               morpheo::behavioural::Parameters_Statistics * param_statistics
22#else
23                               void
24#endif
25                               )
[2]26  {
[82]27    log_begin(@COMPONENT,FUNCTION);
[2]28
[68]29    _component   = new Component (_usage);
[42]30
31    Entity * entity = _component->set_entity (_name       
[113]32                                              ,_param->_type
[40]33#ifdef POSITION
[42]34                                              ,COMBINATORY
35#endif
36                                              );
[2]37
[40]38    _interfaces = entity->set_interfaces();
39
[78]40    // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
41    {
[42]42      Interface * interface = _interfaces->set_interface(""
43#ifdef POSITION
44                                                         ,IN
45                                                         ,SOUTH,
[82]46                                                         _("Generalist interface")
[42]47#endif
48                                                         );
[78]49     
50      in_CLOCK        = interface->set_signal_clk              ("clock" ,1, CLOCK_VHDL_YES);
51      in_NRESET       = interface->set_signal_in  <Tcontrol_t> ("nreset",1, RESET_VHDL_YES);
52    }
[73]53    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
[2]54
[40]55#ifdef POSITION
[81]56    if (usage_is_set(_usage,USE_POSITION))
57        _component->generate_file();
[40]58#endif
59
[113]60#ifdef MODELSIM_COSIMULATION
61    if (usage_is_set(_usage,USE_COSIMULATION))
62      {
63        log_printf(INFO,Execute_queue,FUNCTION,_("<%s> : Create Wrapper"),_name.c_str());
64
65        _wrapper = new Wrapper_@COMPONENT (_name.c_str(),"morpheo_behavioural","work");
66      }
67#endif
68
[82]69    log_end(@COMPONENT,FUNCTION);
[2]70  };
71
72@NAMESPACE_END
73}; // end namespace behavioural
74}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.