1. 概念的引入:
port是一个指针,它指向模块外部的channel。 sc_export<T>是一个指针,它指向其他模块内部的channel。
interface是一个抽象类(定义了一些纯虚函数),它也可被看成API,可派生出各个类。
2. 定义:
A SystemC interface is an abstract class that inherits from sc_interface and provides only pure virtual declarations of methods referenced by SystemC channels and ports. No implementations or data are provided in a SystemC interface.
SystemC interface 是个抽象类,它由sc_interface派生而来,仅仅声明了纯虚函数(这些纯虚函数会被channel以及port引用),而不含有任何数据成员。
A SystemC channel is a class that inherits from either sc_channel or from sc_prim_channel, and the channel should1 inherit and implement one or more SystemC interface classes. A channel implements all the pure virtual methods of the inherited interface classes.
SystemC channel 由sc_channel或sc_prim_channel派生而来,channel必须至少由一个interface派生而来,并

本文详细介绍了SystemC中的关键概念,包括接口(interface)、通道(channel)和端口(port)。接口是抽象类,继承自sc_interface,提供纯虚函数声明;通道类继承自sc_channel或sc_prim_channel,实现接口类的纯虚函数;端口是模板类,继承自接口,用于模块间的通信。文中还提到了不同类型的通信方式,如process之间的通信,以及通过port与外部或子模块的交互。
最低0.47元/天 解锁文章
835

被折叠的 条评论
为什么被折叠?



