linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "John Zhou" <zjzhou@newrocktech.com>
To: "'linuxppc-embedded'" <linuxppc-embedded@lists.linuxppc.org>
Subject: question on PPC performance
Date: Fri, 30 Jan 2004 18:22:24 +0800	[thread overview]
Message-ID: <000001c3e71a$f4d68010$b702a8c0@newrock2> (raw)
In-Reply-To: <001b01c3e70d$3654e3f0$0100a8c0@pc002>


Dear all,

I have an question on PPC performance:

I have linux running based on mpc8250 with 200/166/66 clock configuration. But, I found that every CPU instruction used about 5 ns when accessing SDRAM, otherwise, every CPU instruction used about 15 ns when accessing other devices such as port A/B/C/D, immr, etc, except accessing SDRAM.

Thanks any help!

John
=================================================
The function I used is:
void performance_test(void)
{
					unsigned long i, d1, d2;
					static unsigned long kkk;
					unsigned short time;
					volatile unsigned long* portC = ( volatile unsigned long*)0xF0010D50;

					volatile unsigned long * tmp = &kkk;
					*(volatile unsigned char*)0xF0010D80 &= ~0xB0;
					*(volatile unsigned short*)0xF0010D92 = 0x0002;
					*(volatile unsigned char*)0xF0010D80 |= 0x10;

 					*(volatile unsigned long*)0xF0010D44 &= ~0x00000002;
					d1 = *(volatile unsigned long*)0xF0010D50;
					d1 &= ~0x00000003;
					d2 = d1 | 0x00000002;
					d1 |= 0x00000001;

					*(volatile unsigned short*)0xF0010D9E = 0;
					for (i=0; i<1000; i++)
					{

						*portC = d1;
						*portC = d2;
					}
					time = *(volatile unsigned short*)0xF0010D9E;
					printk ("#test2: 2 access loop 1000 times use %dns\r\n", time*15);

					*(volatile unsigned short*)0xF0010D9E = 0;
					for (i=0; i<1000; i++)
					{

						*tmp = d1;
						*tmp = d2;
					}
					time = *(volatile unsigned short*)0xF0010D9E;
					printk ("#test3: 2 access loop 1000 times use %dns\r\n", time*15);
}

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

  reply	other threads:[~2004-01-30 10:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200401300952.AA178585798@actinium.org>
2004-01-30  8:43 ` Problem in Cross compiling Pwlib for LINUX Ale ppc
2004-01-30 10:22   ` John Zhou [this message]
2004-01-30 11:32     ` question on PPC performance John Zhou
2004-01-30 13:33 VanBaren, Gerald (AGRE)
2004-02-02  5:17 ` John Zhou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='000001c3e71a$f4d68010$b702a8c0@newrock2' \
    --to=zjzhou@newrocktech.com \
    --cc=linuxppc-embedded@lists.linuxppc.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).