/* * $Id: Parameters.cpp 135 2009-07-17 08:59:05Z rosiere $ * * [ Description ] * */ #include "Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/include/Parameters.h" #include "Common/include/Max.h" namespace morpheo { namespace behavioural { namespace core { namespace multi_front_end { namespace front_end { namespace decod_unit { namespace decod_queue { #undef FUNCTION #define FUNCTION "Decod_queue::Parameters" Parameters::Parameters (uint32_t nb_context , uint32_t nb_inst_decod , uint32_t size_queue , Tdecod_queue_scheme_t queue_scheme , uint32_t size_general_data , uint32_t * nb_branch_speculated, bool is_toplevel) { log_begin(Decod_queue,FUNCTION); _nb_context = nb_context ; _nb_inst_decod = nb_inst_decod ; _size_queue = size_queue/nb_inst_decod; _queue_scheme = queue_scheme ; // _size_general_data = size_general_data ; _nb_branch_speculated = nb_branch_speculated ; _nb_instruction_in_queue = size_queue ; _nb_bank = nb_inst_decod ; test(); _size_internal_queue = (1 + // _val _size_context_id + // _context_id _size_depth + // _depth _size_type + // _type _size_operation + // _operation 1 + // _no_execute 1 + // _is_delay_slot #ifdef DEBUG _size_instruction_address + // _address #endif _size_instruction_address + // _address_next 1 + // _has_immediat _size_general_data + // _immediat 1 + // _read_ra _size_general_register_logic + // _num_reg_ra 1 + // _read_rb _size_general_register_logic + // _num_reg_rb 1 + // _read_rc _size_special_register_logic + // _num_reg_rc 1 + // _write_rd _size_general_register_logic + // _num_reg_rd 1 + // _write_re _size_special_register_logic + // _num_reg_re _size_exception_use + // _exception_use _size_exception_decod // _exception ) * _nb_inst_decod; if (is_toplevel) { _size_context_id = log2(nb_context); _size_nb_inst_decod = log2(_size_queue)+1; _size_depth = log2(max(_nb_branch_speculated,_nb_context)); _size_general_data = size_general_data; _size_instruction_address = size_general_data-2; _have_port_context_id = _size_context_id > 0; _have_port_depth = _size_depth > 0; copy (); } log_end(Decod_queue,FUNCTION); }; // #undef FUNCTION // #define FUNCTION "Decod_queue::Parameters (copy)" // Parameters::Parameters (Parameters & param) // { // log_begin(Decod_queue,FUNCTION); // test(); // log_end(Decod_queue,FUNCTION); // }; #undef FUNCTION #define FUNCTION "Decod_queue::~Parameters" Parameters::~Parameters () { log_begin(Decod_queue,FUNCTION); log_end(Decod_queue,FUNCTION); }; #undef FUNCTION #define FUNCTION "Decod_queue::copy" void Parameters::copy (void) { log_begin(Decod_queue,FUNCTION); log_end(Decod_queue,FUNCTION); }; }; // end namespace decod_queue }; // end namespace decod_unit }; // end namespace front_end }; // end namespace multi_front_end }; // end namespace core }; // end namespace behavioural }; // end namespace morpheo