main_indirect.cpp

来自「Kluwer.Academic.Pub.Systemc.From.The.Gro」· C++ 代码 · 共 39 行

CPP
39
字号
//FILE: main.cpp (systemc)//# vim600:set sw=2 tw=0 fdm=marker:#include <systemc.h>#include <iostream>#include "/*{SUBMODULE}*/.h"using std::cout;using std::endl;unsigned errors = 0; // global for use registering errorschar* simulation_name = "/*{SIMULATION_NAME}*/";int sc_main(int argc, char* argv[]) {  cout << "INFO: Elaborating "<< simulation_name << endl;  // Establish time  sc_set_time_resolution(1,SC_PS);  sc_set_default_time_unit(1,SC_NS);  // Clocks & Time constants  // Submodule & channel declaration and allocation  /*{SUBMODULE}*/* /*{SUBMODULE}*/_i;  /*{SUBMODULE}*/_i = new /*{SUBMODULE}*/("/*{SUBMODULE}*/_i");  // Connectivity  /*{SUBMODULE}*/_i->/*{PIN_NAME}*/(/*{PORT_OR_CHAN}*/);  cout << "INFO: Simulating "<< simulation_name << endl;  sc_start();  cout << "INFO: Post-processing "<< simulation_name << endl;  // Post processing here  delete wheel_FL;  delete wheel_FR;  // Final error report  cout << "INFO: Simulation " << simulation_name       << " " << (errors?"FAILED":"PASSED")       << " with " << errors << " errors"       << endl;  return errors?1:0;}//Portions COPYRIGHT (C) 2004 Eklectic Ally, Inc.------------------{{{//// Permission granted for anybody to use this template provided this  //// acknowledgement of Eklectic Ally, Inc. remains.                    ////-----------------------------------------------------------------}}}////END $Id: main_indirect.cpp,v 1.2 2004/02/21 21:04:35 dcblack Exp $

⌨️ 快捷键说明

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