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
RevLine 
[76]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"
[82]18  void @COMPONENT::allocation
19  (
[76]20#ifdef STATISTICS
[82]21   morpheo::behavioural::Parameters_Statistics * param_statistics
[76]22#else
[82]23   void
[76]24#endif
[82]25   )
[76]26  {
[83]27    log_begin(@COMPONENT,FUNCTION);
[76]28
29    _component   = new Component (_usage);
30
31    Entity * entity = _component->set_entity (_name       
[113]32                                              ,_param->_type
[76]33#ifdef POSITION
34                                              ,COMBINATORY
35#endif
36                                              );
37
38    _interfaces = entity->set_interfaces();
[78]39   
40    // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
41    {
[76]42      Interface * interface = _interfaces->set_interface(""
43#ifdef POSITION
44                                                         ,IN
45                                                         ,SOUTH,
46                                                         "Generalist interface"
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    }
53   
54    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
55   
56    // ~~~~~[ Instanciation ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
57    std::string src,dest;
[76]58
[78]59    // ~~~~~[ Others ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[82]60     if (DEBUG_@COMPONENT == true)
61       _component->test_map();
[76]62
63#ifdef POSITION
[81]64     if (usage_is_set(_usage,USE_POSITION))
[82]65       _component->generate_file();
[76]66#endif
67
[82]68     log_end(@COMPONENT,FUNCTION);
[76]69  };
70
71@NAMESPACE_END
72}; // end namespace behavioural
73}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.