30class axi_protocol :
public checker_if<axi::axi_protocol_types> {
31 using payload_type = axi::axi_protocol_types::tlm_payload_type;
32 using phase_type = axi::axi_protocol_types::tlm_phase_type;
33 constexpr static unsigned umax = std::numeric_limits<unsigned>::max();
36 axi_protocol(std::string
const& name,
unsigned bus_width_in_bytes,
unsigned rd_response_timeout,
unsigned wr_response_timeout)
38 , bw(bus_width_in_bytes)
39 , rd_response_timeout(rd_response_timeout)
40 , wr_response_timeout(wr_response_timeout) {}
41 virtual ~axi_protocol() =
default;
42 axi_protocol(
const axi_protocol& other) =
delete;
43 axi_protocol(axi_protocol&& other) =
delete;
44 axi_protocol& operator=(
const axi_protocol& other) =
delete;
45 axi_protocol& operator=(axi_protocol&& other) =
delete;
46 void fw_pre(payload_type
const& trans, phase_type
const& phase)
override;
47 void fw_post(payload_type
const& trans, phase_type
const& phase, tlm::tlm_sync_enum rstat)
override;
48 void bw_pre(payload_type
const& trans, phase_type
const& phase)
override;
49 void bw_post(payload_type
const& trans, phase_type
const& phase, tlm::tlm_sync_enum rstat)
override;
50 std::string
const name;
52 unsigned const rd_response_timeout;
53 unsigned const wr_response_timeout;
56 std::array<phase_type, 3> req_beat;
57 std::array<phase_type, 3> resp_beat;
58 phase_type dataless_req;
59 std::array<unsigned, 3> req_id{{umax, umax, umax}};
60 std::array<unsigned, 3> resp_id{{umax, umax, umax}};
61 unsigned wr_req_beat_count{0};
62 std::array<std::unordered_map<unsigned, std::deque<uintptr_t>>, 3> open_tx_by_id;
63 std::unordered_map<unsigned, std::deque<uintptr_t>> resp_by_id;
64 std::unordered_map<unsigned, unsigned> rd_resp_beat_count;
65 bool check_phase_change(payload_type
const& trans,
const phase_type& phase);
66 void request_update(payload_type
const& trans);
67 void response_update(payload_type
const& trans);
68 void check_properties(payload_type
const& trans);
69 void check_datawith_settings(payload_type
const& trans);