📄 channel.h
字号:
/************************************************************************
* 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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -