From 7a0f884c6b11db6a59cfafce7b53158ad59a365e Mon Sep 17 00:00:00 2001 From: Johannes Stoelp Date: Tue, 8 Aug 2023 00:18:07 +0200 Subject: sc_export2: update comments --- sc_export2.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sc_export2.cc b/sc_export2.cc index adf6e31..c5905bc 100644 --- a/sc_export2.cc +++ b/sc_export2.cc @@ -8,8 +8,12 @@ // other module provides an implementation of the interface and exposes it via a // sc_export. // +// The sc_port deref into the interface and therefore allows to directly call +// any interface method on the sc_port via the operator->(). +// // The sc_port and sc_export are then bound to connect the driver and the -// implementer. +// implementer. The sc_export must additionally be bound against an interface +// implementation. // // This example lays a foundation in understanding how TLM2 sockets work. @@ -59,6 +63,7 @@ struct sender : public sc_module { void do_protocol() { const auto send = [this](msg_if::message msg) { LOGM("%s", to_str(msg)); + // sc_port derefs into msg_if via operator->(). p_msg->send(msg); }; @@ -78,7 +83,7 @@ struct receiver : public sc_module, public msg_if { } // A sc_export instantiated with the custom interface. The sc_export can be - // bound against a sc_port (with the same interface), which effectively bindd + // bound against a sc_port (with the same interface), which effectively binds // the implementation behind the sc_export against the sc_port. sc_export p_msg; -- cgit v1.2.3