simulavr-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Simulavr-devel] Re: Simulavr / clock


From: Theodore A. Roth
Subject: Re: [Simulavr-devel] Re: Simulavr / clock
Date: Wed, 11 Feb 2004 09:30:45 -0800 (PST)


On Wed, 11 Feb 2004, Keith Gudger wrote:

> Ted:
>
> Thanks for the info and the patch.  I applied it instead to the debug
> output in avrcore.c:
>
> @@ -893,8 +893,8 @@
>      result = opi->func (core, opcode, opi->arg1, opi->arg2);
>
>      if (global_debug_inst_output)
> -        fprintf (stderr, "0x%06x (0x%06x) : 0x%04x : %s\n", pc, pc * 2,
> -                 opcode, global_opcode_name[result]);
> +        fprintf (stderr, "0x%06x (0x%06x) : 0x%04x : %s \t: clock =
> %lld\n", pc, pc * 2,
> +                 opcode, global_opcode_name[result], avr_core_CK_get
> (core));
>
>      return result;
>  }
>
> The clock information is very useful when benchmarking various ways to
> perform the same problem, especially when they were written in C.

Ah yes, that seems like a sensible place to print out the clock count.
This and the output from handling a BREAK opcode should give you plenty
of information for tuning code.

>
> I'm going to look into the "named registers" which get returned with an
> "info all-registers".  Could I put the cpu clock into some such register
> so that gdb can find it and print it with "p $r21" style?

I'm not sure that this should go into gdb. When you are running gdb
using avarice/jtagice as a back end, there is no way that I know of to
get clock information. Also, gdb with avarice is slow enough as it is
and something like this could slow it down even more.

Ted Roth




reply via email to

[Prev in Thread] Current Thread [Next in Thread]