1 | /* |
---|
2 | * $Id$ |
---|
3 | * |
---|
4 | * [ Description ] |
---|
5 | * |
---|
6 | */ |
---|
7 | |
---|
8 | #include "Behavioural/@DIRECTORY/include/@COMPONENT.h" |
---|
9 | #include "Behavioural/include/Allocation.h" |
---|
10 | |
---|
11 | namespace morpheo { |
---|
12 | namespace 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 | ,"@COMPONENT" |
---|
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 |
---|