1 | /* |
---|
2 | * $Id: Divider_allocation.cpp 112 2009-03-18 22:36:26Z rosiere $ |
---|
3 | * |
---|
4 | * [ Description ] |
---|
5 | * |
---|
6 | */ |
---|
7 | |
---|
8 | #include "Behavioural/Generic/Divider/include/Divider.h" |
---|
9 | #include "Behavioural/include/Allocation.h" |
---|
10 | #include "Common/include/Max.h" |
---|
11 | |
---|
12 | namespace morpheo { |
---|
13 | namespace behavioural { |
---|
14 | namespace generic { |
---|
15 | namespace divider { |
---|
16 | |
---|
17 | |
---|
18 | |
---|
19 | #undef FUNCTION |
---|
20 | #define FUNCTION "Divider::allocation" |
---|
21 | void Divider::allocation ( |
---|
22 | #ifdef STATISTICS |
---|
23 | morpheo::behavioural::Parameters_Statistics * param_statistics |
---|
24 | #else |
---|
25 | void |
---|
26 | #endif |
---|
27 | ) |
---|
28 | { |
---|
29 | log_begin(Divider,FUNCTION); |
---|
30 | |
---|
31 | _component = new Component (_usage); |
---|
32 | |
---|
33 | Entity * entity = _component->set_entity (_name |
---|
34 | ,"Divider" |
---|
35 | #ifdef POSITION |
---|
36 | ,COMBINATORY |
---|
37 | #endif |
---|
38 | ); |
---|
39 | |
---|
40 | _interfaces = entity->set_interfaces(); |
---|
41 | |
---|
42 | // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
43 | { |
---|
44 | Interface * interface = _interfaces->set_interface("" |
---|
45 | #ifdef POSITION |
---|
46 | ,IN |
---|
47 | ,SOUTH, |
---|
48 | _("Generalist interface") |
---|
49 | #endif |
---|
50 | ); |
---|
51 | |
---|
52 | in_CLOCK = interface->set_signal_clk ("clock" ,1, CLOCK_VHDL_YES); |
---|
53 | in_NRESET = interface->set_signal_in <Tcontrol_t> ("nreset",1, RESET_VHDL_YES); |
---|
54 | } |
---|
55 | // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
56 | |
---|
57 | #ifdef POSITION |
---|
58 | if (usage_is_set(_usage,USE_POSITION)) |
---|
59 | _component->generate_file(); |
---|
60 | #endif |
---|
61 | |
---|
62 | log_end(Divider,FUNCTION); |
---|
63 | }; |
---|
64 | |
---|
65 | }; // end namespace divider |
---|
66 | }; // end namespace generic |
---|
67 | |
---|
68 | }; // end namespace behavioural |
---|
69 | }; // end namespace morpheo |
---|