#ifndef morpheo_behavioural_generic_registerfile_registerfile_internal_banked_RegisterFile_Internal_Banked #define morpheo_behavioural_generic_registerfile_registerfile_internal_banked_RegisterFile_Internal_Banked /* * $Id: RegisterFile_Internal_Banked.h 145 2010-10-13 18:15:51Z rosiere $ * * [ Description ] * */ #ifdef SYSTEMC #include "systemc.h" #endif #include "Common/include/Debug.h" #include "Common/include/ToString.h" #include #include "Behavioural/Generic/RegisterFile/RegisterFile_Internal_Banked/include/Parameters.h" #include "Behavioural/Generic/RegisterFile/RegisterFile_Internal_Banked/include/Types.h" #ifdef STATISTICS #include "Behavioural/include/Stat.h" #endif #include "Behavioural/include/Component.h" #ifdef VHDL #include "Behavioural/include/Vhdl.h" #endif #include "Behavioural/include/Usage.h" namespace morpheo { namespace behavioural { namespace generic { namespace registerfile { namespace registerfile_internal_banked { typedef enum {RW_READ, RW_WRITE} rw_t; class RegisterFile_Internal_Banked #if SYSTEMC : public sc_module #endif { // -----[ fields ]---------------------------------------------------- // Parameters protected : const std::string _name; protected : const Parameters * _param; private : const Tusage_t _usage; #ifdef STATISTICS public : Stat * _stat; // private : counter_t * _stat_nb_read; // private : counter_t * _stat_nb_write; private : counters_t * _stat_port_read; private : counters_t * _stat_port_write; #endif public : Component * _component; private : Interfaces * _interfaces; #ifdef SYSTEMC // ~~~~~[ Interface ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Interface public : SC_CLOCK * in_CLOCK ; public : SC_IN (Tcontrol_t) * in_NRESET ; // ----- Interface Read public : SC_IN (Tcontrol_t) ** in_READ_VAL ; public : SC_OUT (Tcontrol_t) ** out_READ_ACK ; public : SC_IN (Taddress_t) ** in_READ_ADDRESS ; public : SC_OUT (Tdata_t) ** out_READ_DATA ; // ----- Interface Write public : SC_IN (Tcontrol_t) ** in_WRITE_VAL ; public : SC_OUT (Tcontrol_t) ** out_WRITE_ACK ; public : SC_IN (Taddress_t) ** in_WRITE_ADDRESS; public : SC_IN (Tdata_t) ** in_WRITE_DATA ; // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ private : Tdata_t * reg_DATA; // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #endif // -----[ methods ]--------------------------------------------------- #ifdef SYSTEMC SC_HAS_PROCESS (RegisterFile_Internal_Banked); #endif public : RegisterFile_Internal_Banked ( #ifdef SYSTEMC sc_module_name name #else std::string name #endif #ifdef STATISTICS ,morpheo::behavioural::Parameters_Statistics * param_statistics #endif ,Parameters * param ,morpheo::behavioural::Tusage_t usage ); public : ~RegisterFile_Internal_Banked (void); private : void allocation (void); private : void deallocation (void); #ifdef SYSTEMC public : void constant (void); public : void transition (void); //public : void genMoore (void) {/* empty */}; public : void genMealy_read (void); #endif #ifdef STATISTICS public : void statistics_declaration (morpheo::behavioural::Parameters_Statistics * param_statistics); #endif #if VHDL private : void vhdl (void); private : void vhdl_declaration (Vhdl * & vhdl); private : void vhdl_body (Vhdl * & vhdl); #endif #if defined(STATISTICS) or defined(VHDL_TESTBENCH) private : void end_cycle (void); #endif }; }; // end namespace registerfile_internal_banked }; // end namespace registerfile }; // end namespace generic }; // end namespace behavioural }; // end namespace morpheo #endif