1 | /* |
---|
2 | * $Id: Meta_Predictor_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/include/Meta_Predictor.h" |
---|
9 | #include "Behavioural/include/Allocation.h" |
---|
10 | |
---|
11 | namespace morpheo { |
---|
12 | namespace behavioural { |
---|
13 | namespace core { |
---|
14 | namespace multi_front_end { |
---|
15 | namespace front_end { |
---|
16 | namespace prediction_unit { |
---|
17 | namespace direction { |
---|
18 | namespace meta_predictor { |
---|
19 | |
---|
20 | |
---|
21 | |
---|
22 | #undef FUNCTION |
---|
23 | #define FUNCTION "Meta_Predictor::allocation" |
---|
24 | void Meta_Predictor::allocation |
---|
25 | ( |
---|
26 | #ifdef STATISTICS |
---|
27 | morpheo::behavioural::Parameters_Statistics * param_statistics |
---|
28 | #else |
---|
29 | void |
---|
30 | #endif |
---|
31 | ) |
---|
32 | { |
---|
33 | log_begin(Meta_Predictor,FUNCTION); |
---|
34 | |
---|
35 | _component = new Component (_usage); |
---|
36 | |
---|
37 | Entity * entity = _component->set_entity (_name |
---|
38 | ,"Meta_Predictor" |
---|
39 | #ifdef POSITION |
---|
40 | ,COMBINATORY |
---|
41 | #endif |
---|
42 | ); |
---|
43 | |
---|
44 | _interfaces = entity->set_interfaces(); |
---|
45 | |
---|
46 | // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
47 | { |
---|
48 | Interface * interface = _interfaces->set_interface("" |
---|
49 | #ifdef POSITION |
---|
50 | ,IN |
---|
51 | ,SOUTH, |
---|
52 | "Generalist interface" |
---|
53 | #endif |
---|
54 | ); |
---|
55 | |
---|
56 | in_CLOCK = interface->set_signal_clk ("clock" ,1, CLOCK_VHDL_YES); |
---|
57 | in_NRESET = interface->set_signal_in <Tcontrol_t> ("nreset",1, RESET_VHDL_YES); |
---|
58 | } |
---|
59 | |
---|
60 | // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
61 | |
---|
62 | // ~~~~~[ Instanciation ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
63 | std::string src,dest; |
---|
64 | |
---|
65 | // ~~~~~[ Others ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
66 | if (DEBUG_Meta_Predictor == true) |
---|
67 | _component->test_map(); |
---|
68 | |
---|
69 | #ifdef POSITION |
---|
70 | if (usage_is_set(_usage,USE_POSITION)) |
---|
71 | _component->generate_file(); |
---|
72 | #endif |
---|
73 | |
---|
74 | log_end(Meta_Predictor,FUNCTION); |
---|
75 | }; |
---|
76 | |
---|
77 | }; // end namespace meta_predictor |
---|
78 | }; // end namespace direction |
---|
79 | }; // end namespace prediction_unit |
---|
80 | }; // end namespace front_end |
---|
81 | }; // end namespace multi_front_end |
---|
82 | }; // end namespace core |
---|
83 | |
---|
84 | }; // end namespace behavioural |
---|
85 | }; // end namespace morpheo |
---|