1 | #ifdef VHDL |
---|
2 | /* |
---|
3 | * $Id: Read_queue_vhdl.cpp 81 2008-04-15 18:40:01Z rosiere $ |
---|
4 | * |
---|
5 | * [ Description ] |
---|
6 | * |
---|
7 | */ |
---|
8 | |
---|
9 | #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/include/Read_queue.h" |
---|
10 | #include "Behavioural/Generic/Queue/include/Queue.h" |
---|
11 | #include "Behavioural/include/Vhdl.h" |
---|
12 | |
---|
13 | namespace morpheo { |
---|
14 | namespace behavioural { |
---|
15 | namespace core { |
---|
16 | namespace multi_execute_loop { |
---|
17 | namespace execute_loop { |
---|
18 | namespace multi_read_unit { |
---|
19 | namespace read_unit { |
---|
20 | namespace read_queue { |
---|
21 | |
---|
22 | |
---|
23 | void Read_queue::vhdl (void) |
---|
24 | { |
---|
25 | log_printf(FUNC,Read_queue,"vhdl","Begin"); |
---|
26 | |
---|
27 | //----- Queue ----- |
---|
28 | |
---|
29 | morpheo::behavioural::generic::queue::Parameters * param_queue; |
---|
30 | morpheo::behavioural::generic::queue::Queue * queue; |
---|
31 | |
---|
32 | param_queue = new morpheo::behavioural::generic::queue::Parameters |
---|
33 | (_param->_size_queue, |
---|
34 | _param->_size_internal_queue |
---|
35 | ); |
---|
36 | |
---|
37 | std::string queue_name = _name + "_queue"; |
---|
38 | queue = new morpheo::behavioural::generic::queue::Queue |
---|
39 | (queue_name.c_str() |
---|
40 | #ifdef STATISTICS |
---|
41 | ,NULL |
---|
42 | #endif |
---|
43 | ,param_queue |
---|
44 | ,USE_VHDL); |
---|
45 | |
---|
46 | _component->set_component(queue->_component |
---|
47 | #ifdef POSITION |
---|
48 | , 0, 0, 0, 0 |
---|
49 | #endif |
---|
50 | , INSTANCE_LIBRARY |
---|
51 | ); |
---|
52 | |
---|
53 | |
---|
54 | Vhdl * vhdl = new Vhdl (_name); |
---|
55 | |
---|
56 | _interfaces->set_port(vhdl); |
---|
57 | _component->vhdl_instance(vhdl); |
---|
58 | |
---|
59 | vhdl_declaration (vhdl); |
---|
60 | vhdl_body (vhdl); |
---|
61 | |
---|
62 | vhdl->generate_file(); |
---|
63 | |
---|
64 | delete vhdl; |
---|
65 | delete param_queue; |
---|
66 | delete queue; |
---|
67 | |
---|
68 | log_printf(FUNC,Read_queue,"vhdl","End"); |
---|
69 | }; |
---|
70 | |
---|
71 | }; // end namespace read_queue |
---|
72 | }; // end namespace read_unit |
---|
73 | }; // end namespace multi_read_unit |
---|
74 | }; // end namespace execute_loop |
---|
75 | }; // end namespace multi_execute_loop |
---|
76 | }; // end namespace core |
---|
77 | |
---|
78 | }; // end namespace behavioural |
---|
79 | }; // end namespace morpheo |
---|
80 | #endif |
---|