source: trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/src/New_Component_allocation.cpp @ 113

Last change on this file since 113 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
Line 
1/*
2 * $Id$
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/@DIRECTORY/include/@COMPONENT.h"
9#include "Behavioural/include/Allocation.h"
10
11namespace morpheo                    {
12namespace behavioural {
13@NAMESPACE_BEGIN
14
15
16#undef  FUNCTION
17#define FUNCTION "@COMPONENT::allocation"
18  void @COMPONENT::allocation
19  (
20#ifdef STATISTICS
21   morpheo::behavioural::Parameters_Statistics * param_statistics
22#else
23   void
24#endif
25   )
26  {
27    log_begin(@COMPONENT,FUNCTION);
28
29    _component   = new Component (_usage);
30
31    Entity * entity = _component->set_entity (_name       
32                                              ,_param->_type
33#ifdef POSITION
34                                              ,COMBINATORY
35#endif
36                                              );
37
38    _interfaces = entity->set_interfaces();
39   
40    // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
41    {
42      Interface * interface = _interfaces->set_interface(""
43#ifdef POSITION
44                                                         ,IN
45                                                         ,SOUTH,
46                                                         "Generalist interface"
47#endif
48                                                         );
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    }
53   
54    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
55   
56    // ~~~~~[ Instanciation ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
57    std::string src,dest;
58
59    // ~~~~~[ Others ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
60     if (DEBUG_@COMPONENT == true)
61       _component->test_map();
62
63#ifdef POSITION
64     if (usage_is_set(_usage,USE_POSITION))
65       _component->generate_file();
66#endif
67
68     log_end(@COMPONENT,FUNCTION);
69  };
70
71@NAMESPACE_END
72}; // end namespace behavioural
73}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.