[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] Success running the testsuite with avrtest
From: |
Paulo Marques |
Subject: |
Re: [avr-gcc-list] Success running the testsuite with avrtest |
Date: |
Fri, 18 Jan 2008 03:28:59 +0000 |
User-agent: |
Internet Messaging Program (IMP) H3 (4.1.2) |
Quoting "Dmitry K." <address@hidden>:
On Thursday 17 January 2008 22:13, Paulo Marques wrote:
[...]
How do you come up with these tests? You're actually reading avrtest
source code , finding bugs and then coming up with code that exposes
them, aren't you?
Hi Paulo, hi all.
Hi, Dmitry
Of course, a reading of source is the best debug method.
It sure is.
Note, it was only a quick and superficial look. I skip
instructions and flags, which C compiler does not use.
Yes, but a different pair of eyes always catches different bugs. The
code always looks better to the person who wrote it ;)
If it will a time at the week-end, I will to apply
yours avrtest to the Avr-libc's set of tests.
Great :)
Say, one of the things I wanted to implement, was something like an
include file with (just a rough sketch):
#define COUNTER_CTRL_PORT 0x56
static void avrtest_counter_start(byte counter)
{
*((volatile unsigned char *) COUNTER_CTRL_PORT) = counter;
}
static void avrtest_counter_stop(byte counter)
{
*((volatile unsigned char *) COUNTER_CTRL_PORT) = 0x80 | counter;
}
So that you could do things like:
void main(void)
{
volatile float a, b;
// test log performance
a = 1.2345;
avrtest_counter_start(0);
b = log(a);
avrtest_counter_stop(0);
// test sin performance
a = 1.2345;
avrtest_counter_start(1);
b = sin(a);
avrtest_counter_stop(1);
}
and then avrtest would output something like:
counter 0: 234 cycles
counter 1: 576 cycles
but I still am not too fond of this interface...
What I would like this interface to achieve:
- be able to start / stop the counters without affecting cycle counts
- format the output in a way that makes it easier to automate tests and
compare results
- when a program reuses the same counter, we could be able to give
maximum, minimum and average cycle counts
Since you seem to frequently produce cycle counts for your floating
point operations and other libc functions, what would you like this
interface to be able to do?
--
Paulo Marques
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
- Re: [avr-gcc-list] Success running the testsuite with avrtest, (continued)
- Re: [avr-gcc-list] Success running the testsuite with avrtest, Dmitry K., 2008/01/16
- Re: [avr-gcc-list] Success running the testsuite with avrtest, Paulo Marques, 2008/01/16
- Re: [avr-gcc-list] Success running the testsuite with avrtest, Paulo Marques, 2008/01/16
- Re: [avr-gcc-list] Success running the testsuite with avrtest, Paulo Marques, 2008/01/17
- Re: [avr-gcc-list] Success running the testsuite with avrtest, Dmitry K., 2008/01/17
- Re: [avr-gcc-list] Success running the testsuite with avrtest, Paulo Marques, 2008/01/17
- RE: [avr-gcc-list] Success running the testsuite with avrtest, Weddington, Eric, 2008/01/17
- Re: [avr-gcc-list] Success running the testsuite with avrtest, Dmitry K., 2008/01/17
- RE: [avr-gcc-list] Success running the testsuite with avrtest, Weddington, Eric, 2008/01/17
- Re: [avr-gcc-list] Success running the testsuite with avrtest, Dmitry K., 2008/01/17
- Re: [avr-gcc-list] Success running the testsuite with avrtest,
Paulo Marques <=
- [avr-gcc-list] Problem where R0 gets used, Andrew Hutchinson, 2008/01/18
- Re: [avr-gcc-list] Problem where R0 gets used, Erik Christiansen, 2008/01/18
- Re: [avr-gcc-list] Success running the testsuite with avrtest, Dmitry K., 2008/01/18
- Re: [avr-gcc-list] Success running the testsuite with avrtest, Paulo Marques, 2008/01/18