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

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

1) Stat_list : fix retire old and new register bug
2) Stat_list : remove read_counter and valid flag, because validation of destination is in retire step (not in commit step)
3) Model : add class Model (cf Morpheo.sim)
4) Allocation : alloc_interface_begin and alloc_interface_end to delete temporary array.
5) Script : add distexe.sh
6) Add Comparator, Multiplier, Divider. But this component are not implemented
7) Software : add Dhrystone

  • Property svn:keywords set to Id
File size: 6.5 KB
Line 
1/*
2 * $Id: Execute_loop_Glue_allocation.cpp 112 2009-03-18 22:36:26Z 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_BEGIN("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      ALLOC1_INTERFACE_END(_param->_nb_gpr_write);
69    }
70
71    // -----[ Interface "gpr_write_register_file" ]-----------------------
72    {
73      ALLOC1_INTERFACE_BEGIN("gpr_write_register_file",OUT,SOUTH, _("General register write (to register file)"), _param->_nb_gpr_write);
74
75      ALLOC1_VALACK_OUT(out_GPR_WRITE_REGISTER_FILE_VAL            ,VAL);                                                         
76      ALLOC1_VALACK_IN ( in_GPR_WRITE_REGISTER_FILE_ACK            ,ACK);                                                         
77      ALLOC1_SIGNAL_OUT(out_GPR_WRITE_REGISTER_FILE_OOO_ENGINE_ID  ,"ooo_engine_id",Tcontext_t        ,_param->_size_ooo_engine_id);
78      ALLOC1_SIGNAL_OUT(out_GPR_WRITE_REGISTER_FILE_NUM_REG        ,"num_reg"      ,Tgeneral_address_t,_param->_size_general_register);
79      ALLOC1_SIGNAL_OUT(out_GPR_WRITE_REGISTER_FILE_DATA           ,"data"         ,Tgeneral_data_t   ,_param->_size_general_data);
80
81      ALLOC1_INTERFACE_END(_param->_nb_gpr_write);
82    }
83
84    // -----[ Interface "gpr_write_read_unit" ]---------------------------
85    {
86      ALLOC1_INTERFACE_BEGIN("gpr_write_read_unit",OUT,SOUTH, _("General register write (to read unit)"), _param->_nb_gpr_write);
87
88      ALLOC1_VALACK_OUT(out_GPR_WRITE_READ_UNIT_VAL                ,VAL);                                                         
89      ALLOC1_SIGNAL_OUT(out_GPR_WRITE_READ_UNIT_OOO_ENGINE_ID      ,"ooo_engine_id",Tcontext_t        ,_param->_size_ooo_engine_id);
90      ALLOC1_SIGNAL_OUT(out_GPR_WRITE_READ_UNIT_NUM_REG            ,"num_reg"      ,Tgeneral_address_t,_param->_size_general_register);
91      ALLOC1_SIGNAL_OUT(out_GPR_WRITE_READ_UNIT_DATA               ,"data"         ,Tgeneral_data_t   ,_param->_size_general_data);
92
93      ALLOC1_INTERFACE_END(_param->_nb_gpr_write);
94    }
95
96    // -----[ Interface "spr_write_write_unit" ]--------------------------
97    {
98      ALLOC1_INTERFACE_BEGIN("spr_write_write_unit", IN, EAST, _("Special register write (from write_unit)"), _param->_nb_spr_write);
99     
100      ALLOC1_VALACK_IN ( in_SPR_WRITE_WRITE_UNIT_VAL               ,VAL);
101      ALLOC1_VALACK_OUT(out_SPR_WRITE_WRITE_UNIT_ACK               ,ACK);
102      ALLOC1_SIGNAL_IN ( in_SPR_WRITE_WRITE_UNIT_OOO_ENGINE_ID     ,"ooo_engine_id",Tcontext_t        ,_param->_size_ooo_engine_id);
103      ALLOC1_SIGNAL_IN ( in_SPR_WRITE_WRITE_UNIT_NUM_REG           ,"num_reg"      ,Tspecial_address_t,_param->_size_special_register);
104      ALLOC1_SIGNAL_IN ( in_SPR_WRITE_WRITE_UNIT_DATA              ,"data"         ,Tspecial_data_t   ,_param->_size_special_data);
105
106      ALLOC1_INTERFACE_END(_param->_nb_spr_write);
107    }
108
109    // -----[ Interface "spr_write_register_file" ]-----------------------
110    {
111      ALLOC1_INTERFACE_BEGIN("spr_write_register_file",OUT,SOUTH, _("Special register write (to register file)"), _param->_nb_spr_write);
112
113      ALLOC1_VALACK_OUT(out_SPR_WRITE_REGISTER_FILE_VAL            ,VAL);                                                         
114      ALLOC1_VALACK_IN ( in_SPR_WRITE_REGISTER_FILE_ACK            ,ACK);                                                         
115      ALLOC1_SIGNAL_OUT(out_SPR_WRITE_REGISTER_FILE_OOO_ENGINE_ID  ,"ooo_engine_id",Tcontext_t        ,_param->_size_ooo_engine_id);
116      ALLOC1_SIGNAL_OUT(out_SPR_WRITE_REGISTER_FILE_NUM_REG        ,"num_reg"      ,Tspecial_address_t,_param->_size_special_register);
117      ALLOC1_SIGNAL_OUT(out_SPR_WRITE_REGISTER_FILE_DATA           ,"data"         ,Tspecial_data_t   ,_param->_size_special_data);
118
119      ALLOC1_INTERFACE_END(_param->_nb_spr_write);
120    }
121
122    // -----[ Interface "spr_write_read_unit" ]---------------------------
123    {
124      ALLOC1_INTERFACE_BEGIN("spr_write_read_unit",OUT,SOUTH, _("Special register write (to read unit)"), _param->_nb_spr_write);
125
126      ALLOC1_VALACK_OUT(out_SPR_WRITE_READ_UNIT_VAL                ,VAL);                                                         
127      ALLOC1_SIGNAL_OUT(out_SPR_WRITE_READ_UNIT_OOO_ENGINE_ID      ,"ooo_engine_id",Tcontext_t        ,_param->_size_ooo_engine_id);
128      ALLOC1_SIGNAL_OUT(out_SPR_WRITE_READ_UNIT_NUM_REG            ,"num_reg"      ,Tspecial_address_t,_param->_size_special_register);
129      ALLOC1_SIGNAL_OUT(out_SPR_WRITE_READ_UNIT_DATA               ,"data"         ,Tspecial_data_t   ,_param->_size_special_data);
130
131      ALLOC1_INTERFACE_END(_param->_nb_spr_write);
132    }
133
134    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
135
136#ifdef POSITION
137    if (usage_is_set(_usage,USE_POSITION))
138        _component->generate_file();
139#endif
140
141    log_end(Execute_loop_Glue,FUNCTION);
142  };
143
144}; // end namespace execute_loop_glue
145}; // end namespace execute_loop
146}; // end namespace multi_execute_loop
147}; // end namespace core
148
149}; // end namespace behavioural
150}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.