41struct tcp4tlm_client :
public sc_core::sc_module,
protected tcp4tlm::client<tcp4tlm::request_message, tcp4tlm::response_message> {
42 SC_HAS_PROCESS(tcp4tlm_client);
44 cci::cci_param<std::string> other_host_name{
"other_host_name",
""};
45 cci::cci_param<unsigned> other_host_port{
"other_host_port", 0};
46 cci::cci_param<unsigned> this_host_port{
"this_host_port", 32000u};
47 cci::cci_param<bool> wall_time_simulation_speed{
"wall_time_simulation_speed",
false};
48 cci::cci_param<bool> write_no_response{
"write_no_response",
false};
50 tlm_utils::simple_target_socket<tcp4tlm_client, ::scc::LT> tsckt;
52 sc_core::sc_vector<sc_core::sc_out<bool>> signals{
"signals"};
54 tcp4tlm_client(sc_core::sc_module_name name,
size_t no_of_ports = 0);
56 virtual ~tcp4tlm_client();
60 void end_connection();
63 void btransport_cb(tlm::tlm_generic_payload&, sc_core::sc_time&);
64 unsigned transport_dbg_cb(tlm::tlm_generic_payload&);
65 virtual void do_access(tlm::tlm_generic_payload& gp, sc_core::sc_time& delay,
bool debug =
false);
67 void start_of_simulation()
override;
68 void end_of_simulation()
override;
69 std::shared_ptr<tcp4tlm::response_message> resp_msg;
72#ifdef GENERATE_STATISTICS
73 std::vector<unsigned long> rtto, txt, rxt;
77 std::vector<unsigned long> histogram;
78 unsigned long min, max;
79 unsigned long long sum;
80 tlm_genip::addr_decoder_if& indexer;
83 statistics(tlm_genip::addr_decoder_if& indexer_,
size_t hsize,
unsigned long initval)
90 , print_histogram(
false) {}
91 void updateStat(
unsigned long rt);