source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/src/Execute_queue_allocation.cpp @ 101

Last change on this file since 101 was 101, checked in by rosiere, 15 years ago

1) Add soc test
2) fix bug (Pc management, Decod and execute, Update prediction ...)

  • Property svn:keywords set to Id
File size: 5.4 KB
Line 
1/*
2 * $Id: Execute_queue_allocation.cpp 101 2009-01-15 17:19:08Z rosiere $
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/include/Execute_queue.h"
9#include "Behavioural/include/Allocation.h"
10
11namespace morpheo                    {
12namespace behavioural {
13namespace core {
14namespace multi_execute_loop {
15namespace execute_loop {
16namespace multi_write_unit {
17namespace write_unit {
18namespace execute_queue {
19
20#undef  FUNCTION
21#define FUNCTION "Execute_queue::allocation"
22  void Execute_queue::allocation (void)
23  {
24    log_printf(FUNC,Execute_queue,FUNCTION,"Begin");
25
26    _component   = new Component (_usage);
27
28    Entity * entity = _component->set_entity (_name       
29                                              ,"Execute_queue"
30#ifdef POSITION
31                                              ,COMBINATORY
32#endif
33                                              );
34
35    _interfaces = entity->set_interfaces();
36
37    // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
38
39      Interface * interface = _interfaces->set_interface(""
40#ifdef POSITION
41                                                         ,IN
42                                                         ,SOUTH,
43                                                         "Generalist interface"
44#endif
45                                                         );
46
47     in_CLOCK        = interface->set_signal_clk              ("clock" ,1, CLOCK_VHDL_YES);
48     in_NRESET       = interface->set_signal_in  <Tcontrol_t> ("nreset",1, RESET_VHDL_YES);
49
50    // -----[ Interface "execute_queue_in" ]--------------------------------   
51     {
52       ALLOC_INTERFACE ("execute_queue_in", IN, WEST, "Input of execute_queue");
53       
54       ALLOC_VALACK_IN ( in_EXECUTE_QUEUE_IN_VAL,VAL);
55       ALLOC_VALACK_OUT(out_EXECUTE_QUEUE_IN_ACK,ACK);
56       if(_param->_have_port_context_id)
57       ALLOC_SIGNAL_IN ( in_EXECUTE_QUEUE_IN_CONTEXT_ID   ,"context_id"   ,Tcontext_t        ,_param->_size_context_id       );
58       if(_param->_have_port_front_end_id)
59       ALLOC_SIGNAL_IN ( in_EXECUTE_QUEUE_IN_FRONT_END_ID ,"front_end_id" ,Tcontext_t        ,_param->_size_front_end_id     );
60       if(_param->_have_port_ooo_engine_id)
61       ALLOC_SIGNAL_IN ( in_EXECUTE_QUEUE_IN_OOO_ENGINE_ID,"ooo_engine_id",Tcontext_t        ,_param->_size_ooo_engine_id    );
62       if(_param->_have_port_rob_ptr)
63       ALLOC_SIGNAL_IN ( in_EXECUTE_QUEUE_IN_PACKET_ID    ,"packet_id"    ,Tpacket_t         ,_param->_size_rob_ptr        );
64//     ALLOC_SIGNAL_IN ( in_EXECUTE_QUEUE_IN_OPERATION    ,"operation"    ,Toperation_t      ,_param->_size_operation        );
65//     ALLOC_SIGNAL_IN ( in_EXECUTE_QUEUE_IN_TYPE         ,"type"         ,Ttype_t           ,_param->_size_type             );
66       ALLOC_SIGNAL_IN ( in_EXECUTE_QUEUE_IN_FLAGS        ,"flags"        ,Tspecial_data_t   ,_param->_size_special_data     );
67       ALLOC_SIGNAL_IN ( in_EXECUTE_QUEUE_IN_EXCEPTION    ,"exception"    ,Texception_t      ,_param->_size_exception        );
68       ALLOC_SIGNAL_IN ( in_EXECUTE_QUEUE_IN_NO_SEQUENCE  ,"no_sequence"  ,Tcontrol_t        ,1                              );
69       ALLOC_SIGNAL_IN ( in_EXECUTE_QUEUE_IN_ADDRESS      ,"address"      ,Taddress_t        ,_param->_size_instruction_address);
70       ALLOC_SIGNAL_IN ( in_EXECUTE_QUEUE_IN_DATA         ,"data"         ,Tgeneral_data_t   ,_param->_size_general_data     );
71     }
72
73    // -----[ Interface "execute_queue_out" ]-------------------------------
74     {
75       ALLOC_INTERFACE ("execute_queue_out", OUT, EAST, "Output of execute_queue");
76       
77       ALLOC_VALACK_OUT(out_EXECUTE_QUEUE_OUT_VAL,VAL);
78       ALLOC_VALACK_IN ( in_EXECUTE_QUEUE_OUT_ACK,ACK);
79       if(_param->_have_port_context_id)
80       ALLOC_SIGNAL_OUT(out_EXECUTE_QUEUE_OUT_CONTEXT_ID   ,"context_id"   ,Tcontext_t     ,_param->_size_context_id   );
81       if(_param->_have_port_front_end_id)
82       ALLOC_SIGNAL_OUT(out_EXECUTE_QUEUE_OUT_FRONT_END_ID ,"front_end_id" ,Tcontext_t     ,_param->_size_front_end_id );
83       if(_param->_have_port_ooo_engine_id)
84       ALLOC_SIGNAL_OUT(out_EXECUTE_QUEUE_OUT_OOO_ENGINE_ID,"ooo_engine_id",Tcontext_t     ,_param->_size_ooo_engine_id);
85       if(_param->_have_port_rob_ptr)
86       ALLOC_SIGNAL_OUT(out_EXECUTE_QUEUE_OUT_PACKET_ID    ,"packet_id"    ,Tpacket_t      ,_param->_size_rob_ptr    );
87//     ALLOC_SIGNAL_OUT(out_EXECUTE_QUEUE_OUT_OPERATION    ,"operation"    ,Toperation_t   ,_param->_size_operation    );
88//     ALLOC_SIGNAL_OUT(out_EXECUTE_QUEUE_OUT_TYPE         ,"type"         ,Ttype_t        ,_param->_size_type         );
89       ALLOC_SIGNAL_OUT(out_EXECUTE_QUEUE_OUT_FLAGS        ,"flags"        ,Tspecial_data_t,_param->_size_special_data );
90       ALLOC_SIGNAL_OUT(out_EXECUTE_QUEUE_OUT_EXCEPTION    ,"exception"    ,Texception_t   ,_param->_size_exception    );
91       ALLOC_SIGNAL_OUT(out_EXECUTE_QUEUE_OUT_NO_SEQUENCE  ,"no_sequence"  ,Tcontrol_t     ,1                          );
92       ALLOC_SIGNAL_OUT(out_EXECUTE_QUEUE_OUT_ADDRESS      ,"address"      ,Taddress_t     ,_param->_size_instruction_address);
93       ALLOC_SIGNAL_OUT(out_EXECUTE_QUEUE_OUT_DATA         ,"data"         ,Tgeneral_data_t,_param->_size_general_data );
94     }
95
96    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
97
98     _queue = new std::list<execute_queue_entry_t *>;
99
100#ifdef POSITION
101     if (usage_is_set(_usage,USE_POSITION))
102       _component->generate_file();
103#endif
104
105    log_printf(FUNC,Execute_queue,FUNCTION,"End");
106  };
107
108}; // end namespace execute_queue
109}; // end namespace write_unit
110}; // end namespace multi_write_unit
111}; // end namespace execute_loop
112}; // end namespace multi_execute_loop
113}; // end namespace core
114
115}; // end namespace behavioural
116}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.