channel.h
来自「systemc源码」· C头文件 代码 · 共 47 行
H
47 行
/************************************************************************
* file name: channel.h
* description: for test use.
* modification history
* --------------------
* 2003-5-3 8:44:52, created by zhuwei
*/
#ifndef _CHANNEL_H
#define _CHANNEL_H
/* includes----------------------------------------------------------- */
#include "packet.h"
/* defines------------------------------------------------------------ */
/* typedefs----------------------------------------------------------- */
SC_MODULE(channel)
{
sc_in<packet_type> tpackin; // input port
sc_in<packet_type> rpackin; // input port
sc_out<packet_type> tpackout; // output port
sc_out<packet_type> rpackout; // output port
packet_type packin;
packet_type packout;
packet_type ackin;
packet_type ackout;
void receive_data();
void send_ack();
// Constructor
SC_CTOR(channel) /* zhuwei (2003-5-5 16:20:12) 构造函数,实例化时即被运行 */
{
SC_METHOD(receive_data); // Method Process
sensitive << tpackin;
SC_METHOD(send_ack); // Method Process
sensitive << rpackin;
}
};
/* externs------------------------------------------------------------ */
/* globals------------------------------------------------------------ */
/* forward declarations----------------------------------------------- */
#endif /* _CHANNEL_H */
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?