diff options
author | Johannes Stoelp <johannes.stoelp@gmail.com> | 2023-08-08 00:18:07 +0200 |
---|---|---|
committer | Johannes Stoelp <johannes.stoelp@gmail.com> | 2023-08-08 00:18:07 +0200 |
commit | 7a0f884c6b11db6a59cfafce7b53158ad59a365e (patch) | |
tree | ba039a26d2941c9f5560bdefe40732da1420ae6c | |
parent | 173622e9e82b7c2b1c6f8146056661b2a6577735 (diff) | |
download | sysc-playground-7a0f884c6b11db6a59cfafce7b53158ad59a365e.tar.gz sysc-playground-7a0f884c6b11db6a59cfafce7b53158ad59a365e.zip |
sc_export2: update comments
-rw-r--r-- | sc_export2.cc | 9 |
1 files 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<msg_if> p_msg; |