/*
 * $Id: Parameters.cpp 81 2008-04-15 18:40:01Z rosiere $
 *
 * [ Description ]
 * 
 */

#include "Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/Parameters.h"

namespace morpheo                    {
namespace behavioural                {
namespace generic                    {
namespace registerfile               {
namespace registerfile_monolithic    {

  Parameters::Parameters (uint32_t nb_port_read ,
			  uint32_t nb_port_write,
			  uint32_t nb_port_read_write ,
			  uint32_t nb_word      ,
			  uint32_t size_word     
			  ) :
    _nb_port_read      (nb_port_read ),
    _nb_port_write     (nb_port_write),
    _nb_port_read_write(nb_port_read_write),
    _nb_word           (nb_word      ),
    _size_word         (size_word    ),
    _size_address      (static_cast<uint32_t>(log2(_nb_word))),
    _have_port_address (_size_address != 0)

  { 
    test();
  };
  
  Parameters::Parameters (Parameters & param) :
    _nb_port_read      (param._nb_port_read ),
    _nb_port_write     (param._nb_port_write),
    _nb_port_read_write(param._nb_port_read_write),
    _nb_word           (param._nb_word      ),
    _size_word         (param._size_word    ),
    _size_address      (param._size_address ),
    _have_port_address (param._have_port_address)
  {
    test();
  };

  Parameters::~Parameters () 
  { };

}; // end namespace registerfile_monolithic
}; // end namespace registerfile 
}; // end namespace generic
}; // end namespace behavioural          
}; // end namespace morpheo              
