[54] | 1 | #ifdef VHDL |
---|
| 2 | /* |
---|
| 3 | * $Id: Read_queue_vhdl.cpp 101 2009-01-15 17:19:08Z 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" |
---|
[68] | 10 | #include "Behavioural/Generic/Queue/include/Queue.h" |
---|
[54] | 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"); |
---|
[68] | 26 | |
---|
| 27 | //----- Queue ----- |
---|
[98] | 28 | |
---|
[68] | 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, |
---|
[100] | 34 | _param->_size_internal_queue, |
---|
[101] | 35 | 0, |
---|
| 36 | false, |
---|
| 37 | false |
---|
[68] | 38 | ); |
---|
| 39 | |
---|
[75] | 40 | std::string queue_name = _name + "_queue"; |
---|
[68] | 41 | queue = new morpheo::behavioural::generic::queue::Queue |
---|
| 42 | (queue_name.c_str() |
---|
| 43 | #ifdef STATISTICS |
---|
| 44 | ,NULL |
---|
| 45 | #endif |
---|
| 46 | ,param_queue |
---|
| 47 | ,USE_VHDL); |
---|
| 48 | |
---|
| 49 | _component->set_component(queue->_component |
---|
| 50 | #ifdef POSITION |
---|
| 51 | , 0, 0, 0, 0 |
---|
| 52 | #endif |
---|
| 53 | , INSTANCE_LIBRARY |
---|
| 54 | ); |
---|
[54] | 55 | |
---|
[68] | 56 | |
---|
[54] | 57 | Vhdl * vhdl = new Vhdl (_name); |
---|
| 58 | |
---|
| 59 | _interfaces->set_port(vhdl); |
---|
| 60 | _component->vhdl_instance(vhdl); |
---|
| 61 | |
---|
| 62 | vhdl_declaration (vhdl); |
---|
| 63 | vhdl_body (vhdl); |
---|
| 64 | |
---|
| 65 | vhdl->generate_file(); |
---|
| 66 | |
---|
| 67 | delete vhdl; |
---|
[68] | 68 | delete param_queue; |
---|
| 69 | delete queue; |
---|
[54] | 70 | |
---|
| 71 | log_printf(FUNC,Read_queue,"vhdl","End"); |
---|
| 72 | }; |
---|
| 73 | |
---|
| 74 | }; // end namespace read_queue |
---|
| 75 | }; // end namespace read_unit |
---|
| 76 | }; // end namespace multi_read_unit |
---|
| 77 | }; // end namespace execute_loop |
---|
| 78 | }; // end namespace multi_execute_loop |
---|
| 79 | }; // end namespace core |
---|
| 80 | |
---|
| 81 | }; // end namespace behavioural |
---|
| 82 | }; // end namespace morpheo |
---|
| 83 | #endif |
---|