test.cc

来自「SystemC片上系统设计的源代码: 书籍介绍: SystemC是被实践证明」· CC 代码 · 共 28 行

CC
28
字号
#include "data_ext.h"int sc_main(int argc, char** argv) {  scv_smart_ptr<data_t> data_p("data");  //set the global seed to that results will be consistent  scv_random::set_global_seed(100);        // nbcode "disable" start  //set the values of the array element  for(unsigned i=0; i<5; ++i) data_p->payload[i] = i*i;  //turn off randomization for the even array elements  for(unsigned i=0; i<5; i+=2)     data_p->payload[i].disable_randomization();  // nbcode "disable" end  //randomize composit  data_p->next();  scv_out << "Random value for " << data_p->get_name() << ":" << endl;  data_p->print(scv_out);  return 0;}

⌨️ 快捷键说明

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