source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Load_Store_pointer_unit/src/Load_Store_pointer_unit_allocation.cpp @ 78

Last change on this file since 78 was 78, checked in by rosiere, 16 years ago

Add :

  • Execute_loop (must be test systemC)
  • Prediction
    • Direction : predifined scheme
    • Branch Target Buffer
  • iFetch_unit
    • ifetch_queue
    • pc management
  • Decod_unit
    • coming soon : support for custom operation
  • Rename_unit
    • RAT
    • Free_list
    • Dependence RAW check
    • Load store unit pointer
  • New Environnement (hierarchy_memory will remove in a next version)


Modif :

  • Manage Custom Operation
  • All component in execute_loop to use the new statistics management

Not Finish :

  • Return Address Stack
  • Environnement
File size: 5.2 KB
Line 
1/*
2 * $Id$
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Load_Store_pointer_unit/include/Load_Store_pointer_unit.h"
9#include "Behavioural/include/Allocation.h"
10
11namespace morpheo                    {
12namespace behavioural {
13namespace core {
14namespace multi_ooo_engine {
15namespace ooo_engine {
16namespace rename_unit {
17namespace load_store_pointer_unit {
18
19
20
21#undef  FUNCTION
22#define FUNCTION "Load_Store_pointer_unit::allocation"
23  void Load_Store_pointer_unit::allocation (
24#ifdef STATISTICS
25                               morpheo::behavioural::Parameters_Statistics * param_statistics
26#else
27                               void
28#endif
29                               )
30  {
31    log_printf(FUNC,Load_Store_pointer_unit,FUNCTION,"Begin");
32
33    _component   = new Component (_usage);
34
35    Entity * entity = _component->set_entity (_name       
36                                              ,"Load_Store_pointer_unit"
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 : "insert" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
59    {
60      ALLOC1_INTERFACE("insert", IN, EAST, "insert to the re order buffer an instruction", _param->_nb_inst_insert); 
61
62      ALLOC1_VALACK_IN ( in_INSERT_VAL                  ,VAL);
63      ALLOC1_VALACK_OUT(out_INSERT_ACK                  ,ACK);
64      ALLOC1_SIGNAL_IN ( in_INSERT_FRONT_END_ID         ,"front_end_id"         ,Tcontext_t  ,_param->_size_front_end_id   );
65      ALLOC1_SIGNAL_IN ( in_INSERT_CONTEXT_ID           ,"context_id"           ,Tcontext_t  ,_param->_size_context_id     );
66      ALLOC1_SIGNAL_IN ( in_INSERT_TYPE                 ,"type"                 ,Ttype_t     ,_param->_size_type           );
67      ALLOC1_SIGNAL_IN ( in_INSERT_OPERATION            ,"operation"            ,Toperation_t,_param->_size_operation      );
68      ALLOC1_SIGNAL_OUT(out_INSERT_STORE_QUEUE_PTR_WRITE,"store_queue_ptr_write",Tlsq_ptr_t  ,_param->_size_store_queue_ptr);
69      ALLOC1_SIGNAL_OUT(out_INSERT_LOAD_QUEUE_PTR_WRITE ,"load_queue_ptr_write" ,Tlsq_ptr_t  ,_param->_size_load_queue_ptr );
70    }
71   
72    // ~~~~~[ Interface : "retire" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
73    {
74      ALLOC1_INTERFACE("retire", IN, EAST, "retire from the re order buffer an instruction", _param->_nb_inst_retire); 
75
76      ALLOC1_VALACK_IN ( in_RETIRE_VAL                  ,VAL);
77      ALLOC1_VALACK_OUT(out_RETIRE_ACK                  ,ACK);
78      ALLOC1_SIGNAL_IN ( in_RETIRE_FRONT_END_ID         ,"front_end_id"         ,Tcontext_t  ,_param->_size_front_end_id   );
79      ALLOC1_SIGNAL_IN ( in_RETIRE_CONTEXT_ID           ,"context_id"           ,Tcontext_t  ,_param->_size_context_id     );
80      ALLOC1_SIGNAL_IN ( in_RETIRE_TYPE                 ,"type"                 ,Ttype_t     ,_param->_size_type           );
81      ALLOC1_SIGNAL_IN ( in_RETIRE_OPERATION            ,"operation"            ,Toperation_t,_param->_size_operation      );
82      ALLOC1_SIGNAL_IN ( in_RETIRE_STORE_QUEUE_PTR_WRITE,"store_queue_ptr_write",Tlsq_ptr_t  ,_param->_size_store_queue_ptr);
83      ALLOC1_SIGNAL_IN ( in_RETIRE_LOAD_QUEUE_PTR_WRITE ,"load_queue_ptr_write" ,Tlsq_ptr_t  ,_param->_size_load_queue_ptr );
84    }
85
86    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
87    reg_STORE_QUEUE_PTR_WRITE     = new Tlsq_ptr_t      [_param->_nb_load_store_queue];
88    reg_STORE_QUEUE_USE           = new bool *          [_param->_nb_load_store_queue];
89    reg_STORE_QUEUE_NB_USE        = new Tlsq_ptr_t      [_param->_nb_load_store_queue];
90    reg_LOAD_QUEUE_PTR_WRITE      = new Tlsq_ptr_t      [_param->_nb_load_store_queue];
91    reg_LOAD_QUEUE_USE            = new bool *          [_param->_nb_load_store_queue];
92   
93    for (uint32_t i=0; i<_param->_nb_load_store_queue; i++)
94      {
95        reg_STORE_QUEUE_USE [i] = new bool [_param->_size_store_queue [i]];
96        reg_LOAD_QUEUE_USE  [i] = new bool [_param->_size_load_queue  [i]];
97      }
98
99    internal_INSERT_ACK           = new Tcontrol_t      [_param->_nb_inst_insert];
100    internal_INSERT_OPERATION_USE = new operation_use_t [_param->_nb_inst_insert];
101    internal_INSERT_LSQ           = new uint32_t        [_param->_nb_inst_insert];
102    internal_INSERT_PTR           = new Tlsq_ptr_t      [_param->_nb_inst_insert];
103
104    internal_RETIRE_ACK           = new Tcontrol_t      [_param->_nb_inst_retire];
105    internal_RETIRE_OPERATION_USE = new operation_use_t [_param->_nb_inst_retire];
106    internal_RETIRE_LSQ           = new uint32_t        [_param->_nb_inst_retire];
107    internal_RETIRE_PTR           = new Tlsq_ptr_t      [_param->_nb_inst_retire];
108
109#ifdef POSITION
110    _component->generate_file();
111#endif
112
113    log_printf(FUNC,Load_Store_pointer_unit,FUNCTION,"End");
114  };
115
116}; // end namespace load_store_pointer_unit
117}; // end namespace rename_unit
118}; // end namespace ooo_engine
119}; // end namespace multi_ooo_engine
120}; // end namespace core
121
122}; // end namespace behavioural
123}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.