30class ace_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();
35 ace_protocol(std::string
const& name,
unsigned bus_width_in_bytes,
unsigned rd_response_timeout,
unsigned wr_response_timeout)
37 , bw(bus_width_in_bytes)
38 , rd_response_timeout(rd_response_timeout)
39 , wr_response_timeout(wr_response_timeout)
41 virtual ~ace_protocol();
42 ace_protocol(
const ace_protocol &other) =
delete;
43 ace_protocol(ace_protocol &&other) =
delete;
44 ace_protocol& operator=(
const ace_protocol &other) =
delete;
45 ace_protocol& operator=(ace_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;
55 std::array<phase_type, 3> req_beat;
56 std::array<phase_type, 3> resp_beat;
57 phase_type dataless_req;
58 std::array<unsigned, 3> req_id{{umax, umax, umax}};
59 std::array<unsigned, 3> resp_id{{umax, umax, umax}};
60 unsigned wr_req_beat_count{0};
61 std::array<std::unordered_map<unsigned, std::deque<uintptr_t>>, 3> open_tx_by_id;
62 std::unordered_map<unsigned, std::deque<uintptr_t>> resp_by_id;
63 std::unordered_map<unsigned, unsigned> rd_resp_beat_count;
64 bool check_phase_change(payload_type
const& trans,
const phase_type &phase);
65 void request_update(payload_type
const& trans);
66 void response_update(payload_type
const& trans);
67 void check_properties(payload_type
const& trans);