📄 arbiter_tb.h
字号:
/************************************************************************
* file name:
* description:
*
* modification history
* --------------------
* 2004-1-13 19:32:19, created by zhuwei
*/
#ifndef _ARBITER_TB_H
#define _ARBITER_TB_H
/* includes----------------------------------------------------------- */
#include "systemc.h"
/* defines------------------------------------------------------------ */
/* typedefs----------------------------------------------------------- */
struct arbiter_tb: sc_module
{
sc_in<bool> clk;
sc_out<bool> rst_n;
sc_out<sc_bit> req[3];
void initial()
{
sc_bit b1, b0;
b1 = 1;
b0 = 0;
rst_n = 0;
wait(15, SC_NS);
rst_n = 1;
req[0] = b1;
req[1] = b1;
req[2] = b1;
wait(30, SC_NS);
req[0] = b1;
req[1] = b0;
req[2] = b1;
wait(30, SC_NS);
req[0] = b1;
req[1] = b1;
req[2] = b0;
wait(30, SC_NS);
sc_stop();
}
// Constructor
SC_CTOR(arbiter_tb)
{
SC_THREAD(initial);
}
};
/* externs------------------------------------------------------------ */
/* globals------------------------------------------------------------ */
/* forward declarations----------------------------------------------- */
#endif /* _ARBITER_TB_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -