applies clang format
This commit is contained in:
@ -1,10 +1,10 @@
|
||||
#define SC_INCLUDE_FX
|
||||
#include <cxs/tlm_network_cxs.h>
|
||||
#include <scc/cci_util.h>
|
||||
#include <scc/configurer.h>
|
||||
#include <scc/observer.h>
|
||||
#include <scc/sc_variable.h>
|
||||
#include <scc/tracer.h>
|
||||
#include <cxs/tlm_network_cxs.h>
|
||||
#include <string>
|
||||
#include <systemc>
|
||||
|
||||
@ -12,10 +12,10 @@ using namespace sc_dt;
|
||||
using namespace std;
|
||||
using namespace cxs;
|
||||
|
||||
enum {PHIT_WIDTH=664};
|
||||
enum { PHIT_WIDTH = 664 };
|
||||
struct testbench : public sc_core::sc_module,
|
||||
public tlm::nw::tlm_network_fw_transport_if<tlm_network_cxs_types>,
|
||||
public tlm::nw::tlm_network_bw_transport_if<tlm_network_cxs_types> {
|
||||
public tlm::nw::tlm_network_fw_transport_if<tlm_network_cxs_types>,
|
||||
public tlm::nw::tlm_network_bw_transport_if<tlm_network_cxs_types> {
|
||||
|
||||
using transaction_type = tlm_network_cxs_types::tlm_payload_type;
|
||||
using phase_type = tlm_network_cxs_types::tlm_phase_type;
|
||||
@ -46,19 +46,17 @@ public tlm::nw::tlm_network_bw_transport_if<tlm_network_cxs_types> {
|
||||
auto phase{tlm::nw::REQUEST};
|
||||
auto status = isck->nb_transport_fw(*trans_ptr, phase, t);
|
||||
if(status == tlm::TLM_UPDATED) {
|
||||
sc_assert(phase==tlm::nw::CONFIRM);
|
||||
sc_assert(phase == tlm::nw::CONFIRM);
|
||||
}
|
||||
wait(target_received_evt);
|
||||
sc_core::sc_stop();
|
||||
}
|
||||
|
||||
void b_transport(transaction_type& trans, sc_core::sc_time& t) override {
|
||||
SCCINFO(SCMOD)<<"Received blocking transaction";
|
||||
}
|
||||
void b_transport(transaction_type& trans, sc_core::sc_time& t) override { SCCINFO(SCMOD) << "Received blocking transaction"; }
|
||||
|
||||
tlm::tlm_sync_enum nb_transport_fw(transaction_type& trans, phase_type& phase, sc_core::sc_time& t) override {
|
||||
if(phase==tlm::nw::INDICATION) {
|
||||
SCCINFO(SCMOD)<<"Received non-blocking transaction with phase " << phase.get_name();
|
||||
if(phase == tlm::nw::INDICATION) {
|
||||
SCCINFO(SCMOD) << "Received non-blocking transaction with phase " << phase.get_name();
|
||||
target_received_evt.notify(sc_core::SC_ZERO_TIME);
|
||||
phase = tlm::nw::RESPONSE;
|
||||
return tlm::TLM_UPDATED;
|
||||
@ -67,15 +65,13 @@ public tlm::nw::tlm_network_bw_transport_if<tlm_network_cxs_types> {
|
||||
}
|
||||
|
||||
tlm::tlm_sync_enum nb_transport_bw(transaction_type& trans, phase_type& phase, sc_core::sc_time& t) override {
|
||||
if(phase==tlm::nw::CONFIRM) {
|
||||
if(phase == tlm::nw::CONFIRM) {
|
||||
return tlm::TLM_ACCEPTED;
|
||||
}
|
||||
throw std::runtime_error("illegal response in backward path");
|
||||
}
|
||||
|
||||
unsigned int transport_dbg(transaction_type& trans) override {
|
||||
return 0;
|
||||
}
|
||||
unsigned int transport_dbg(transaction_type& trans) override { return 0; }
|
||||
|
||||
sc_core::sc_event target_received_evt;
|
||||
};
|
||||
|
Reference in New Issue
Block a user