state_ext.h

来自「《SystemC片上系统设计》——高等院校教材 陈曦, 徐宁仪」· C头文件 代码 · 共 43 行

H
43
字号
// nbcode "decl" start#ifndef STATE_EXT_H#define STATE_EXT_H#include "scv.h"#include "state.h"// nbcode "decl" end// nbcode "onehot" starttemplate<>class scv_extensions<onehot_t> : public scv_enum_base<onehot_t> {public:  SCV_ENUM_CTOR(onehot_t) {    SCV_ENUM(STATE_0);    SCV_ENUM(STATE_1);    SCV_ENUM(STATE_2);    SCV_ENUM(STATE_3);    SCV_ENUM(STATE_4);    SCV_ENUM(STATE_5);    SCV_ENUM(STATE_6);  }};// nbcode "onehot" end// nbcode "state" starttemplate<>class scv_extensions<state_t> : public scv_extensions_base<state_t> {public:  scv_extensions<onehot_t > state;  scv_extensions<int      > delay;  scv_extensions<unsigned > data;  SCV_EXTENSIONS_CTOR(state_t) {    //must be in order    SCV_FIELD(state);    SCV_FIELD(delay);    SCV_FIELD(data);  }};// nbcode "state" end#endif //STATE_EXT_H

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?