source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Execute_loop_Glue/src/Execute_loop_Glue_allocation.cpp @ 88

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

Almost complete design
with Test and test platform

  • Property svn:keywords set to Id
File size: 6.2 KB
Line 
1/*
2 * $Id: Execute_loop_Glue_allocation.cpp 88 2008-12-10 18:31:39Z rosiere $
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Execute_loop_Glue/include/Execute_loop_Glue.h"
9#include "Behavioural/include/Allocation.h"
10#include "Common/include/Max.h"
11
12namespace morpheo                    {
13namespace behavioural {
14namespace core {
15namespace multi_execute_loop {
16namespace execute_loop {
17namespace execute_loop_glue {
18
19
20
21#undef  FUNCTION
22#define FUNCTION "Execute_loop_Glue::allocation"
23  void Execute_loop_Glue::allocation (
24#ifdef STATISTICS
25                               morpheo::behavioural::Parameters_Statistics * param_statistics
26#else
27                               void
28#endif
29                               )
30  {
31    log_begin(Execute_loop_Glue,FUNCTION);
32
33    _component   = new Component (_usage);
34
35    Entity * entity = _component->set_entity (_name       
36                                              ,"Execute_loop_Glue"
37#ifdef POSITION
38                                              ,COMBINATORY
39#endif
40                                              );
41
42    _interfaces = entity->set_interfaces();
43
44    // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
45    {
46      Interface * interface = _interfaces->set_interface(""
47#ifdef POSITION
48                                                         ,IN
49                                                         ,SOUTH,
50                                                         _("Generalist interface")
51#endif
52                                                         );
53     
54      in_CLOCK        = interface->set_signal_clk              ("clock" ,1, CLOCK_VHDL_YES);
55      in_NRESET       = interface->set_signal_in  <Tcontrol_t> ("nreset",1, RESET_VHDL_YES);
56    }
57
58    // -----[ Interface "gpr_write_write_unit" ]--------------------------
59    {
60      ALLOC1_INTERFACE("gpr_write_write_unit", IN, EAST, _("General register write (from write_unit)"), _param->_nb_gpr_write);
61     
62      ALLOC1_VALACK_IN ( in_GPR_WRITE_WRITE_UNIT_VAL               ,VAL);
63      ALLOC1_VALACK_OUT(out_GPR_WRITE_WRITE_UNIT_ACK               ,ACK);
64      ALLOC1_SIGNAL_IN ( in_GPR_WRITE_WRITE_UNIT_OOO_ENGINE_ID     ,"ooo_engine_id",Tcontext_t        ,_param->_size_ooo_engine_id);
65      ALLOC1_SIGNAL_IN ( in_GPR_WRITE_WRITE_UNIT_NUM_REG           ,"num_reg"      ,Tgeneral_address_t,_param->_size_general_register);
66      ALLOC1_SIGNAL_IN ( in_GPR_WRITE_WRITE_UNIT_DATA              ,"data"         ,Tgeneral_data_t   ,_param->_size_general_data);
67    }
68
69    // -----[ Interface "gpr_write_register_file" ]-----------------------
70    {
71      ALLOC1_INTERFACE("gpr_write_register_file",OUT,SOUTH, _("General register write (to register file)"), _param->_nb_gpr_write);
72
73      ALLOC1_VALACK_OUT(out_GPR_WRITE_REGISTER_FILE_VAL            ,VAL);                                                         
74      ALLOC1_VALACK_IN ( in_GPR_WRITE_REGISTER_FILE_ACK            ,ACK);                                                         
75      ALLOC1_SIGNAL_OUT(out_GPR_WRITE_REGISTER_FILE_OOO_ENGINE_ID  ,"ooo_engine_id",Tcontext_t        ,_param->_size_ooo_engine_id);
76      ALLOC1_SIGNAL_OUT(out_GPR_WRITE_REGISTER_FILE_NUM_REG        ,"num_reg"      ,Tgeneral_address_t,_param->_size_general_register);
77      ALLOC1_SIGNAL_OUT(out_GPR_WRITE_REGISTER_FILE_DATA           ,"data"         ,Tgeneral_data_t   ,_param->_size_general_data);
78    }
79
80    // -----[ Interface "gpr_write_read_unit" ]---------------------------
81    {
82      ALLOC1_INTERFACE("gpr_write_read_unit",OUT,SOUTH, _("General register write (to read unit)"), _param->_nb_gpr_write);
83
84      ALLOC1_VALACK_OUT(out_GPR_WRITE_READ_UNIT_VAL                ,VAL);                                                         
85      ALLOC1_SIGNAL_OUT(out_GPR_WRITE_READ_UNIT_OOO_ENGINE_ID      ,"ooo_engine_id",Tcontext_t        ,_param->_size_ooo_engine_id);
86      ALLOC1_SIGNAL_OUT(out_GPR_WRITE_READ_UNIT_NUM_REG            ,"num_reg"      ,Tgeneral_address_t,_param->_size_general_register);
87      ALLOC1_SIGNAL_OUT(out_GPR_WRITE_READ_UNIT_DATA               ,"data"         ,Tgeneral_data_t   ,_param->_size_general_data);
88    }
89
90    // -----[ Interface "spr_write_write_unit" ]--------------------------
91    {
92      ALLOC1_INTERFACE("spr_write_write_unit", IN, EAST, _("Special register write (from write_unit)"), _param->_nb_spr_write);
93     
94      ALLOC1_VALACK_IN ( in_SPR_WRITE_WRITE_UNIT_VAL               ,VAL);
95      ALLOC1_VALACK_OUT(out_SPR_WRITE_WRITE_UNIT_ACK               ,ACK);
96      ALLOC1_SIGNAL_IN ( in_SPR_WRITE_WRITE_UNIT_OOO_ENGINE_ID     ,"ooo_engine_id",Tcontext_t        ,_param->_size_ooo_engine_id);
97      ALLOC1_SIGNAL_IN ( in_SPR_WRITE_WRITE_UNIT_NUM_REG           ,"num_reg"      ,Tspecial_address_t,_param->_size_special_register);
98      ALLOC1_SIGNAL_IN ( in_SPR_WRITE_WRITE_UNIT_DATA              ,"data"         ,Tspecial_data_t   ,_param->_size_special_data);
99    }
100
101    // -----[ Interface "spr_write_register_file" ]-----------------------
102    {
103      ALLOC1_INTERFACE("spr_write_register_file",OUT,SOUTH, _("Special register write (to register file)"), _param->_nb_spr_write);
104
105      ALLOC1_VALACK_OUT(out_SPR_WRITE_REGISTER_FILE_VAL            ,VAL);                                                         
106      ALLOC1_VALACK_IN ( in_SPR_WRITE_REGISTER_FILE_ACK            ,ACK);                                                         
107      ALLOC1_SIGNAL_OUT(out_SPR_WRITE_REGISTER_FILE_OOO_ENGINE_ID  ,"ooo_engine_id",Tcontext_t        ,_param->_size_ooo_engine_id);
108      ALLOC1_SIGNAL_OUT(out_SPR_WRITE_REGISTER_FILE_NUM_REG        ,"num_reg"      ,Tspecial_address_t,_param->_size_special_register);
109      ALLOC1_SIGNAL_OUT(out_SPR_WRITE_REGISTER_FILE_DATA           ,"data"         ,Tspecial_data_t   ,_param->_size_special_data);
110    }
111
112    // -----[ Interface "spr_write_read_unit" ]---------------------------
113    {
114      ALLOC1_INTERFACE("spr_write_read_unit",OUT,SOUTH, _("Special register write (to read unit)"), _param->_nb_spr_write);
115
116      ALLOC1_VALACK_OUT(out_SPR_WRITE_READ_UNIT_VAL                ,VAL);                                                         
117      ALLOC1_SIGNAL_OUT(out_SPR_WRITE_READ_UNIT_OOO_ENGINE_ID      ,"ooo_engine_id",Tcontext_t        ,_param->_size_ooo_engine_id);
118      ALLOC1_SIGNAL_OUT(out_SPR_WRITE_READ_UNIT_NUM_REG            ,"num_reg"      ,Tspecial_address_t,_param->_size_special_register);
119      ALLOC1_SIGNAL_OUT(out_SPR_WRITE_READ_UNIT_DATA               ,"data"         ,Tspecial_data_t   ,_param->_size_special_data);
120    }
121
122    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
123
124#ifdef POSITION
125    if (usage_is_set(_usage,USE_POSITION))
126        _component->generate_file();
127#endif
128
129    log_end(Execute_loop_Glue,FUNCTION);
130  };
131
132}; // end namespace execute_loop_glue
133}; // end namespace execute_loop
134}; // end namespace multi_execute_loop
135}; // end namespace core
136
137}; // end namespace behavioural
138}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.