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