/*
 * SecBus - This file is part of SecBus
 * Copyright (C) 2012 - Telecom ParisTech
 * 
 * This file must be used under the terms of the CeCILL.
 * This source file is licensed as described in the file COPYING, which
 * you should have received as part of this distribution.  The terms
 * are also available at    
 * http://www.cecill.info/licences/Licence_CeCILL_V1.1-US.txt
 *
 */

#ifndef _REGISTERS_H_
#define _REGISTERS_H_

#include <systemc>

#include "my_interfaces.h"

#include "secbus_lib.h"

SC_MODULE(DataRegister)
{
public:
  sc_in<bool> p_clk;
  sc_in<bool> p_resetn;
 
  DATA_REGISTER_WRITE_IN in;
  DATA_REGISTER_READ_OUT out;

  DataRegister(sc_module_name name);
  ~DataRegister();
  
protected:
  SC_HAS_PROCESS(DataRegister);

private:
  sc_signal<int>          *data_s;
  sc_signal<unsigned int> be_s;
  sc_signal<addr_t>       address_s;
  
  void transition();
  void genMoore();
};
#endif


