Changed TlmRecorderWrapper to simple_sockets
This commit is contained in:
@@ -20,7 +20,8 @@ TlmRecorderWrapper::TlmRecorderWrapper(const sc_core::sc_module_name& name,
|
||||
sc_module(name),
|
||||
tlmRecorder(tlmRecorder)
|
||||
{
|
||||
// TODO: Nothing??
|
||||
iSocket.register_nb_transport_bw(this, &TlmRecorderWrapper::nb_transport_bw);
|
||||
tSocket.register_nb_transport_fw(this, &TlmRecorderWrapper::nb_transport_fw);
|
||||
}
|
||||
|
||||
tlm::tlm_sync_enum TlmRecorderWrapper::nb_transport_fw(tlm::tlm_generic_payload& trans,
|
||||
@@ -39,27 +40,4 @@ tlm::tlm_sync_enum TlmRecorderWrapper::nb_transport_bw(tlm::tlm_generic_payload&
|
||||
return tSocket->nb_transport_bw(trans, phase, delay);
|
||||
}
|
||||
|
||||
void TlmRecorderWrapper::b_transport(tlm::tlm_generic_payload& trans, sc_core::sc_time& delay)
|
||||
{
|
||||
// TODO: Implement me
|
||||
}
|
||||
|
||||
unsigned int TlmRecorderWrapper::transport_dbg(tlm::tlm_generic_payload& trans)
|
||||
{
|
||||
// TODO: Implement me
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool TlmRecorderWrapper::get_direct_mem_ptr(tlm::tlm_generic_payload& trans, tlm::tlm_dmi& dmi_data)
|
||||
{
|
||||
// TODO: Implement me
|
||||
return false;
|
||||
}
|
||||
|
||||
void TlmRecorderWrapper::invalidate_direct_mem_ptr(sc_dt::uint64 start_range,
|
||||
sc_dt::uint64 end_range)
|
||||
{
|
||||
// TODO: Implement me
|
||||
}
|
||||
|
||||
} // namespace DRAMSys
|
||||
|
||||
@@ -7,18 +7,18 @@
|
||||
#include "TlmRecorder.h"
|
||||
|
||||
#include <tlm>
|
||||
#include <tlm_utils/simple_initiator_socket.h>
|
||||
#include <tlm_utils/simple_target_socket.h>
|
||||
|
||||
namespace DRAMSys
|
||||
{
|
||||
|
||||
class TlmRecorderWrapper : public sc_core::sc_module,
|
||||
public tlm::tlm_fw_transport_if<tlm::tlm_base_protocol_types>,
|
||||
public tlm::tlm_bw_transport_if<tlm::tlm_base_protocol_types>
|
||||
class TlmRecorderWrapper : public sc_core::sc_module
|
||||
|
||||
{
|
||||
public:
|
||||
tlm::tlm_initiator_socket<> iSocket;
|
||||
tlm::tlm_target_socket<> tSocket;
|
||||
tlm_utils::simple_initiator_socket<TlmRecorderWrapper> iSocket;
|
||||
tlm_utils::simple_target_socket<TlmRecorderWrapper> tSocket;
|
||||
|
||||
// TlmRecorderWrapper(const std::string& name,
|
||||
// const SimConfig& simConfig,
|
||||
@@ -39,16 +39,13 @@ public:
|
||||
|
||||
tlm::tlm_sync_enum nb_transport_fw(tlm::tlm_generic_payload& trans,
|
||||
tlm::tlm_phase& phase,
|
||||
sc_core::sc_time& delay) override;
|
||||
sc_core::sc_time& delay);
|
||||
tlm::tlm_sync_enum nb_transport_bw(tlm::tlm_generic_payload& trans,
|
||||
tlm::tlm_phase& phase,
|
||||
sc_core::sc_time& delay) override;
|
||||
void b_transport(tlm::tlm_generic_payload& trans, sc_core::sc_time& delay) override;
|
||||
unsigned int transport_dbg(tlm::tlm_generic_payload& trans) override;
|
||||
bool get_direct_mem_ptr(tlm::tlm_generic_payload& trans, tlm::tlm_dmi& dmi_data) override;
|
||||
void invalidate_direct_mem_ptr(sc_dt::uint64 start_range, sc_dt::uint64 end_range) override;
|
||||
sc_core::sc_time& delay);
|
||||
|
||||
private:
|
||||
// TODO: Refactor with shared pointers?
|
||||
TlmRecorder& tlmRecorder;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user