/******************************************************
 * This is the main file for the nios32 ArchC model   *
 * This file is automatically generated by ArchC      *
 * WITHOUT WARRANTY OF ANY KIND, either express       *
 * or implied.                                        *
 * For more information on ArchC, please visit:       *
 * http://www.archc.org                               *
 *                                                    *
 * The ArchC Team                                     *
 * Computer Systems Laboratory (LSC)                  *
 * IC-UNICAMP                                         *
 * http://www.lsc.ic.unicamp.br                       *
 ******************************************************/

const char* project_name = "nios32";
const char* project_file = "nios32.ac";
const char* archc_version = "2.0";
const char* archc_options = "-abi ";

#include <systemc.h>
#include "ac_stats_base.h"
#include "nios32.H"

int sc_main(int ac, char** av)
{
 //! Clock.
 sc_clock clk("clk", 20, 0.5, true);
 //! ISA simulator.
 nios32 nios32_p0("nios32", clk.period().to_double());

 nios32_p0.clock(clk.signal());
#ifdef AC_DEBUG
 ac_trace("nios32.trace");
#endif
 nios32_p0.init(ac, av);
 sc_start(-1); // Starts SystemC simulation.
#ifdef AC_STATS
 ac_stats_base::print_all_stats(std::cerr);
#endif
#ifdef AC_DEBUG
 ac_close_trace();
#endif
 return nios32_p0.ac_exit_status;
}
