Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: Re: Re: time to sleep?
From: Rune (colourless_at_stud.ku.dk)
Date: 2002-08-23


If variables are kept in registers we spare the data fetch in the MEM phase
of the SH1 pipeline. So while we can't avoid the instruction fetch in the IF
phase, we can still spare the latter. While this won't reduce the time to
complete the instruction, it would possibly reduce the instructions usage of
power (provided the mem fetch uses a fair amount of power.) .

Please correct me if I'm wrong. :-)

- Rune

----- Original Message -----
From: "Nielsen Linus (ext)" <Linus.Nielsen_at_elema.siemens.se>
To: <rockbox_at_cool.haxx.se>
Sent: Friday, August 23, 2002 10:33 AM
Subject: RE: Re: time to sleep?

> > So, I'm all for using sleep modes. However, if you are really going to
> > reduce power then you should sleep as much as possible. And
> > you cannot do that if you are using inefficient code.
>
> My point exactly. However, as you put it (or rather, how i interpreted
your
> text) you seemed to think that the memory accesses themselves added to the
> power consumtion even without a sleep mode.
>
> > Now, code that usually is not considered inefficient can be
> > very inefficient if you look at the power usage. I gave some
> > pointers to what I believe are good programming standards.
>
> I'm sure that you know a lot more than I do in this matter. Then please
> explain how the power consumption can be lowered by keeping the variables
in
> registers, when the RAM is accessed for every instruction anyway.
>
> <large cache functionality description removed>
>
> > What is, however, commonly agreed upon as a good thing as to
> > save power is using compiler optimizations to make short
> > efficient code with few memory references and writing
> > efficient code.
>
> Yes, it is always a good thing to write efficient code. What I objected to
> was that you wrote that efficient code in itself will draw less power. I
say
> that it won't unless the CPU sleeps when it is done.
>
> It is self-evident that the optimized code will save power because the CPU
> can go to sleep sooner-
>
> > You mention that the SH is a RISC. I should perhaps mention
> > that IMO "RISC" doesn't really mean anything. The SH is a load-store
> > architecture and that is much more important.
>
> True.
>
> > To me it looks like you believe I'm against using sleep mode.
> > I'm not, never was, and I frankly cannot see how you could
> > deduce that.
>
> I thought so, since you only talked about optimizing the code and nothing
> about the sleep.
>
> > I'm not looking for a fight. I do tend to be bit agitated,
> > though, when people are using arguments that I don't believe
> > are true.
>
> Please point out what was untrue in my arguments, so i can learn something
> for my next "fight". :-)
>
> /Linus
>



Page was last modified "Jan 10 2012" The Rockbox Crew
aaa