source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Victim_Pseudo_LRU_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: 2.3 KB
RevLine 
[10]1#ifdef SYSTEMC
2/*
3 * $Id$
4 *
5 * [ Description ]
6 *
7 */
8
[15]9#include "Behavioural/Generic/Victim/Victim_Pseudo_LRU/include/Victim_Pseudo_LRU.h"
[78]10#include "Behavioural/include/Allocation.h"
[10]11
12namespace morpheo {
13namespace behavioural {
14namespace generic {
15namespace victim {
[15]16namespace victim_pseudo_lru {
[10]17
[15]18  void Victim_Pseudo_LRU::allocation (void)
[10]19  {
[42]20    _component   = new Component ();
[10]21
[75]22    Entity * entity = _component->set_entity (_name                 
23                                              ,"Select_Priority_Fixed"
24#ifdef POSITION
25                                              ,COMBINATORY           
26#endif
27                                              );
[10]28   
[42]29    _interfaces = entity->set_interfaces();
[10]30
[42]31    // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
32    {
[75]33      Interface_fifo * interface = _interfaces->set_interface(""
34#ifdef POSITION
35                                                              , IN  ,WEST, "Generalist interface"
36#endif
37                                                              );
[42]38     
39      in_CLOCK        = interface->set_signal_clk              ("clock" ,1);
40      in_NRESET       = interface->set_signal_in  <Tcontrol_t> ("nreset",1);
41    }
[10]42
[42]43    // ~~~~~[ Interface : "access" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
44    {
[78]45      ALLOC1_INTERFACE("access",IN,WEST, "Access", _param->_nb_access);
[10]46
[78]47      ALLOC1_VALACK_IN ( in_ACCESS_VAL    ,VAL);
48      ALLOC1_VALACK_OUT(out_ACCESS_ACK    ,ACK);
49      ALLOC1_SIGNAL_IN ( in_ACCESS_HIT    ,"hit"    ,Tcontrol_t,1);
50      ALLOC1_SIGNAL_IN ( in_ACCESS_ADDRESS,"address",Taddress_t,log2(_param->_size_address));
51      ALLOC1_SIGNAL_IN ( in_ACCESS_ENTITY ,"entity" ,Tentity_t ,log2(_param->_nb_entity   ));
52      ALLOC1_SIGNAL_OUT(out_ACCESS_VICTIM ,"victim" ,Tentity_t ,log2(_param->_nb_entity   ));
[42]53    }
[10]54
55    // -----[ Register ]---------------------------------------------------
[78]56    reg_TABLE = new entry_t *  [_param->_size_table];
[10]57
[78]58    for (uint32_t i=0; i<_param->_size_table; i++)
59      reg_TABLE [i] = new entry_t (_param->_nb_entity);
[10]60   
61    // -----[ Internal ]---------------------------------------------------
[78]62    internal_ACCESS_ACK    = new Tcontrol_t [_param->_nb_access];
63    internal_ACCESS_VICTIM = new Tentity_t  [_param->_nb_access];
[42]64
65#ifdef POSITION
66    _component->generate_file();
67#endif
[10]68  };
69
[15]70}; // end namespace victim_pseudo_lru
[10]71}; // end namespace victim
72}; // end namespace generic
73
74}; // end namespace behavioural
75}; // end namespace morpheo             
76#endif
Note: See TracBrowser for help on using the repository browser.