simulavr-devel
[Top][All Lists]
Advanced

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

[Simulavr-devel] Re: Simulavr / clock


From: Keith Gudger
Subject: [Simulavr-devel] Re: Simulavr / clock
Date: Wed, 11 Feb 2004 07:18:46 -0800 (PST)

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.

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 putting this on the simulavr list too, since we're now discussing
code.

Keith

On Tue, 10 Feb 2004, Theodore A. Roth wrote:

> Here's the patch I just forgot to attach. D'oh!
> 
> Ted Roth
> 
> 
> 
> On Tue, 10 Feb 2004, Keith Gudger wrote:
> 
> > Ted:
> > 
> > Thanks for the reply.  I'm looking for the number of clocks that occur
> > between two breakpoints, for example.  In Studio, there's a CPU clock
> > counter that I use.
> > 
> > The last time I checked, I could not get into CVS on any machine, but that
> > was about a month ago.  I can check again if anything has changed.  I
> > believe it's the signature thing that's stopping me. 
> > 
> > I saw that you had moved the device descriptions into individual files.
> > If you need my help at any point, I can help.
> > 
> > Keith
> > 
> > On Tue, 10 Feb 2004, Theodore A. Roth wrote:
> > 
> > > On Tue, 10 Feb 2004, Keith Gudger wrote:
> > > 
> > > > Ted:
> > > > 
> > > > What is the latest on Simulavr?  I haven't seen any posts on the mailing
> > > > list recently.
> > > 
> > > The latest release is 0.1.2. That includes all the work you've done 
> > > recently. I made the release in January, but never announced it.
> > > 
> > > > 
> > > > I have a question which I did try to find the answer myself, even in the
> > > > code.
> > > > 
> > > > How do you get the CPU cycles / clock information?  I'm using the -D 
> > > > debug
> > > > mode, which is nice, but I still don't know how to get the CPU cycles
> > > > info from gdb.  Thanks.
> > > 
> > > I don't think that is currently available to gdb. If you want a really 
> > > detailed, blow by blow account of what the program is doing, use the VCD 
> > > display program and gtkwave to view the waveforms. Not sure if that is 
> > > what 
> > > you are looking for though. What exactly do you want to look at?
> > > 
> > > On another note, have you had a look at the latest cvs? I've done some 
> > > major 
> > > reworking of the memory system and may need some help from you to get the 
> > > usb devices back up to speed. If you still can't access anon-cvs, I can 
> > > get 
> > > you the latest cvs repo files if that helps.
> > > 
> > > Ted Roth
> > > 
> > > 
> > 
> > 
> 
> 
> Ted Roth
> 






reply via email to

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