channel是具体化interface的,port是channel的一个代理,那么它是如何实现代理的呢?有一个关键的函数需要知道,也就是对间接操作符的重载。 在sc_port中定义了这个函数: templateclass IF class sc_port_b: public sc_port_base{ ........ IF* operator-();   ...
Port makes module have a clear boundary to the others; With interfaces, we can easily plug in different versions of a channel into a model, though the old one and the new one may vary vastly! Yet you can still substitue one for the other without having to worry about the details of modules that us ...
In SystemC scheme, channels are the workhorses for holding and transmitting data, and an interface is a "window" into a channel that describes the set of operations, or a subset thereof, that the channel provides. Ports are proxy objects that facilitate access to channels through interfaces. port ...