Beispiel #1
0
static void run(tool_options_t &opts)
{
	netlist_tool_t nt;
	osd_ticks_t t = osd_ticks();

	nt.m_opts = &opts;
	nt.init();
	nt.read_netlist(filetobuf(opts.opt_file()), opts.opt_name());

	plist_t<input_t> *inps = read_input(&nt, opts.opt_inp());

	double ttr = opts.opt_ttr();

	printf("startup time ==> %5.3f\n", (double) (osd_ticks() - t) / (double) osd_ticks_per_second() );
	printf("runnning ...\n");
	t = osd_ticks();

	unsigned pos = 0;
	netlist::netlist_time nlt = netlist::netlist_time::zero;

	while (pos < inps->size() && (*inps)[pos].m_time < netlist::netlist_time::from_double(ttr))
	{
		nt.process_queue((*inps)[pos].m_time - nlt);
		(*inps)[pos].setparam();
		nlt = (*inps)[pos].m_time;
		pos++;
	}
	nt.process_queue(netlist::netlist_time::from_double(ttr) - nlt);
	nt.stop();
	pfree(inps);

	double emutime = (double) (osd_ticks() - t) / (double) osd_ticks_per_second();
	printf("%f seconds emulation took %f real time ==> %5.2f%%\n", ttr, emutime, ttr/emutime*100.0);
}
Beispiel #2
0
static void run(tool_options_t &opts)
{
    netlist_tool_t nt;
    osd_ticks_t t = osd_ticks();

    nt.init();
    nt.m_logs = opts.opt_logs();
    nt.m_verbose = opts.opt_verb();
    nt.read_netlist(filetobuf(opts.opt_file()), opts.opt_name());
    double ttr = opts.opt_ttr();

    printf("startup time ==> %5.3f\n", (double) (osd_ticks() - t) / (double) osd_ticks_per_second() );
    printf("runnning ...\n");
    t = osd_ticks();

    nt.process_queue(netlist::netlist_time::from_double(ttr));
    nt.stop();

    double emutime = (double) (osd_ticks() - t) / (double) osd_ticks_per_second();
    printf("%f seconds emulation took %f real time ==> %5.2f%%\n", ttr, emutime, ttr/emutime*100.0);
}
Beispiel #3
0
static void run(tool_options_t &opts)
{
	netlist_tool_t nt("netlist");
	plib::ticks_t t = plib::ticks();

	nt.m_opts = &opts;
	nt.init();

	if (!opts.opt_verb())
		nt.log().verbose.set_enabled(false);
	if (opts.opt_quiet())
		nt.log().warning.set_enabled(false);

	nt.read_netlist(opts.opt_file(), opts.opt_name());

	std::vector<input_t> *inps = read_input(&nt, opts.opt_inp());

	double ttr = opts.opt_ttr();

	pout("startup time ==> {1:5.3f}\n", (double) (plib::ticks() - t) / (double) plib::ticks_per_second() );
	pout("runnning ...\n");
	t = plib::ticks();

	unsigned pos = 0;
	netlist::netlist_time nlt = netlist::netlist_time::zero();

	while (pos < inps->size() && (*inps)[pos].m_time < netlist::netlist_time::from_double(ttr))
	{
		nt.process_queue((*inps)[pos].m_time - nlt);
		(*inps)[pos].setparam();
		nlt = (*inps)[pos].m_time;
		pos++;
	}
	nt.process_queue(netlist::netlist_time::from_double(ttr) - nlt);
	nt.stop();
	plib::pfree(inps);

	double emutime = (double) (plib::ticks() - t) / (double) plib::ticks_per_second();
	pout("{1:f} seconds emulation took {2:f} real time ==> {3:5.2f}%\n", ttr, emutime, ttr/emutime*100.0);
}