int sc_main(int argc, char** argv) { //sc_core::sc_report_handler::set_actions(sc_core::SC_ERROR, sc_core::SC_ABORT); // make a breakpoint in SystemC file sc_stop_here.cpp //sc_core::sc_report_handler::set_actions(sc_core::SC_WARNING, sc_core::SC_ABORT); // make a breakpoint in SystemC file sc_stop_here.cpp // Configure warnings about accesses to write protected register bits: sc_core::sc_report_handler::set_actions("/GreenSocs/GreenReg/write_protected/unequal_current", sc_core::SC_DISPLAY); sc_core::sc_report_handler::set_actions("/GreenSocs/GreenReg/write_protected/unequal_zero", sc_core::SC_DO_NOTHING); sc_core::sc_report_handler::set_actions("/GreenSocs/GreenReg/write_protected/bit_range_access", sc_core::SC_DISPLAY); sc_core::sc_report_handler::set_actions("/GreenSocs/GreenReg/write_protected/bit_access", sc_core::SC_DISPLAY); int opt = 0; if (argc!=2) {helpMsg;} else { opt = atoi(argv[1]); std::cout << "You gave " << opt << "\n"; if ((opt!=1) && (opt!=2) && (opt!=3) && (opt!=4)) helpMsg; } /// GreenControl and GreenConfig gs::ctr::GC_Core core("ControlCore"); gs::cnf::ConfigDatabase cnfdatabase("ConfigDatabase"); gs::cnf::ConfigPlugin configPlugin(&cnfdatabase); newMod nmod("newMod", opt); std::cout << "\nEntering sc_start : simulation starting\n"; sc_core::sc_start(); // (1000, SC_NS); // Start the simulation std::cout << "Exited sc_start : simulation finished\n\n"; return( 0); }
// ---------------------------------------------------------------------- void makeAll() { noise(); for (int i = 400; i < 800; i +=100) { nmod(i); } for (int i = 4000; i < 4300; i +=100) { dac(i); } }