1 | /* |
---|
2 | * $Id$ |
---|
3 | * |
---|
4 | * [ Description ] |
---|
5 | * |
---|
6 | */ |
---|
7 | |
---|
8 | #include "Behavioural/@DIRECTORY/include/@COMPONENT.h" |
---|
9 | #include "Behavioural/include/Allocation.h" |
---|
10 | #include "Common/include/Max.h" |
---|
11 | |
---|
12 | namespace morpheo { |
---|
13 | namespace behavioural { |
---|
14 | @NAMESPACE_BEGIN |
---|
15 | |
---|
16 | |
---|
17 | #undef FUNCTION |
---|
18 | #define FUNCTION "@COMPONENT::allocation" |
---|
19 | void @COMPONENT::allocation ( |
---|
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 | // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
54 | |
---|
55 | #ifdef POSITION |
---|
56 | if (usage_is_set(_usage,USE_POSITION)) |
---|
57 | _component->generate_file(); |
---|
58 | #endif |
---|
59 | |
---|
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 | |
---|
69 | log_end(@COMPONENT,FUNCTION); |
---|
70 | }; |
---|
71 | |
---|
72 | @NAMESPACE_END |
---|
73 | }; // end namespace behavioural |
---|
74 | }; // end namespace morpheo |
---|