risc-v-tlm/inc/MemoryInterface.h

38 lines
754 B
C
Raw Normal View History

/*!
\file MemoryInterface.h
\brief CPU to Memory Interface class
\author Màrius Montón
\date May 2020
*/
// SPDX-License-Identifier: GPL-3.0-or-later
#ifndef INC_MEMORYINTERFACE_H_
#define INC_MEMORYINTERFACE_H_
#include "systemc"
#include "tlm.h"
#include "tlm_utils/simple_initiator_socket.h"
#include "tlm_utils/tlm_quantumkeeper.h"
#include "memory.h"
2021-11-30 03:35:26 +08:00
namespace riscv_tlm {
/**
* @brief Memory Interface
*/
2021-11-30 03:35:26 +08:00
class MemoryInterface {
public:
tlm_utils::simple_initiator_socket<MemoryInterface> data_bus;
2021-11-30 03:35:26 +08:00
MemoryInterface();
2021-11-30 03:35:26 +08:00
std::uint32_t readDataMem(std::uint32_t addr, int size);
2021-11-30 03:35:26 +08:00
void writeDataMem(std::uint32_t addr, std::uint32_t data, int size);
};
}
#endif /* INC_MEMORYINTERFACE_H_ */