#ifdef VHDL /* * $Id: RegisterFile_Monolithic_vhdl_declaration.cpp 145 2010-10-13 18:15:51Z rosiere $ * * [ Description ] * */ #include "Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/RegisterFile_Monolithic.h" #include "Behavioural/include/Vhdl.h" #include "Common/include/ToString.h" namespace morpheo { namespace behavioural { namespace generic { namespace registerfile { namespace registerfile_monolithic { void RegisterFile_Monolithic::vhdl_declaration (Vhdl * & vhdl) { #ifndef VHDL_GAISLER vhdl->set_type ("Tregfile", "array " + _std_logic_range(_param->_nb_word) + " of " + std_logic(_param->_size_word)); vhdl->set_signal ("reg_DATA", "Tregfile"); #else // for (uint32_t i=0; i<_param->_nb_word; ++i) // vhdl->set_signal ("reg_DATA_"+toString(i), _param->_size_word); vhdl->set_type ("Tregfile", "array " + _std_logic_range(_param->_nb_word) + " of " + std_logic(_param->_size_word)); vhdl->set_type ("Treg", "record reg : Tregfile; end record"); vhdl->set_signal ("reg_DATA" , "Treg"); vhdl->set_signal ("reg_DATA_next", "Treg"); #endif }; }; // end namespace registerfile_monolithic }; // end namespace registerfile }; // end namespace generic }; // end namespace behavioural }; // end namespace morpheo #endif