Ignore:
Timestamp:
Dec 10, 2008, 7:31:39 PM (16 years ago)
Author:
rosiere
Message:

Almost complete design
with Test and test platform

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/src/Parameters.cpp

    r85 r88  
    2121                          uint32_t nb_instruction               ,
    2222                          uint32_t size_branch_update_prediction,
    23                           uint32_t size_address                 )
     23                          uint32_t size_address                 ,
     24                          bool     is_toplevel
     25                          )
    2426  {
    2527    log_printf(FUNC,Ifetch_unit,FUNCTION,"Begin");
     
    2729    _size_queue                            = size_queue                   ;
    2830    _nb_instruction                        = nb_instruction               ;
    29     _size_branch_update_prediction         = size_branch_update_prediction;
    30     _size_address                          = size_address                 ;
    31 
    32     _size_queue_ptr                        = log2(size_queue);
    33     _size_instruction_ptr                  = log2(nb_instruction);
    34 
    35     _have_port_queue_ptr                   = _size_queue_ptr > 0;
    36     _have_port_instruction_ptr             = _size_instruction_ptr > 0;
    37     _have_port_branch_update_prediction_id = size_branch_update_prediction > 0;
     31//  _size_branch_update_prediction         = size_branch_update_prediction;
     32//  _size_address                          = size_address                 ;
    3833
    3934    test();
     
    5045    _param_ifetch_unit_glue   = new morpheo::behavioural::core::multi_front_end::front_end::ifetch_unit::ifetch_unit_glue::  Parameters
    5146      (size_address);
    52    
     47
     48    if (is_toplevel)
     49      {
     50        _size_instruction_address   = size_address;
     51        _size_ifetch_queue_ptr      = log2(size_queue);
     52        _size_inst_ifetch_ptr       = log2(nb_instruction);
     53        _size_depth                 = size_branch_update_prediction;
     54
     55        _have_port_ifetch_queue_ptr = _size_ifetch_queue_ptr > 0;
     56        _have_port_inst_ifetch_ptr  = _size_inst_ifetch_ptr > 0;
     57        _have_port_depth            = _size_depth > 0;
     58
     59        copy ();
     60      }
     61
    5362    log_printf(FUNC,Ifetch_unit,FUNCTION,"End");
    5463  };
     
    7483  };
    7584
     85#undef  FUNCTION
     86#define FUNCTION "Ifetch_unit::copy"
     87  void Parameters::copy (void)
     88  {
     89    log_printf(FUNC,Ifetch_unit,FUNCTION,"Begin");
     90   
     91    COPY(_param_address_management);
     92    COPY(_param_ifetch_queue      );
     93    COPY(_param_ifetch_unit_glue  );
     94
     95    log_printf(FUNC,Ifetch_unit,FUNCTION,"End");
     96  };
     97
    7698}; // end namespace ifetch_unit
    7799}; // end namespace front_end
Note: See TracChangeset for help on using the changeset viewer.