[Coco] 6809/6309 Power Analysis

Gene Heskett gene.heskett at verizon.net
Thu Jan 21 21:14:38 EST 2010


On Thursday 21 January 2010, Boisy G. Pitre wrote:
>Calling all hardware/electrical engineering gurus on the list...
>
>As some of you know, I am working on my thesis this semester where I am
> exploring power-aware compiler optimizations.  I've selected (surprise)
> the 6809/6309 as my evaluation processor and will be retooling RELIC to
> use the power information that I am attempting to gather to make decisions
> about instruction use based on the current that they draw.
>
>I'm hoping you hardware gurus can give me some input on the measurement
> part, in which I am attempting to determine the current draw of the 6809
> when executing specific instructions.  The absolute value is not
> important; it is the relative difference of current draw for different
> instructions that I need to move forward.
>
>Just to give you an idea of the type of equipment that I have access to at
> the UL campus:
>
>	- Agilent Technologies MS06104A Mixed Signal Oscilloscope with analog
> probes as well as two 54620-61601 8-wire Logic Analyzer probe cables -
> Agilent Portable Logic Analyzer, don't have the exact model number but
> looks like a microwave oven and I am told costs around $55K.
>
>The ideas brought up so far for measuring current at the instruction level:
>	- use a PIC with an A/D convertor to measure the voltage.
>	- use a shunt resistor (james recommended this method to me as well in
> private email) to measure current and outlined here:
> http://jet-server.commtest.co.nz/kb2/11624.htm
>
>On the software side, I have constructed several test executables that run
> under NitrOS-9 and execute a particular instruction over and over (with
> interrupts masked of course). The baseline measurement instruction is
> CWAI, which puts the processor in sleep mode.  The code looks something
> like this:
>
>    cwai #^IntMasks
>
>With interrupts masked there should be no activity and the cwai should put
> the processor to a wait mode.  I would then take the measuring device of
> choice and measure the current for a fixed amount of time (say 1 second).
>
>Afterwards, I would run the following program which has a series of 100 MUL
> instructions (MUL is chosen for presumably higher use of CPU):
>
>     ldd       #$0000
>     orcc     #IntMasks
>toploop:
>     mul
>     mul
>     mul
>     ....
>     mul          * 100th instruction
>     bra       toploop
>
>And again, use the same measuring device to measure the current draw for 1
> second.
>
>With a low and high mark, I could then begin measuring other instructions
> and see where they fall with the high-low current range.
>
>My concern is the accuracy of the measurement, since I expect that the
> difference in current draw between instructions is small.  This is just a
> guess, but the level of accuracy that I would need to measure the
> difference in current draw between instructions would have to be AT LEAST
> 10e-3, or .001 amp (1 milliamp).

I think your 6809 guess may be a little small, but not outrageously so.

>Suggestions?  How would you guys do this? Do I really need the high dollar
> equipment that I have access to, or do I need a high accuracy, sensitive
> multimeter that can measure current in very very small amounts?

I personally would do as I discuss below, using a common, maybe 75 dollar 
digital meter similar to what many of us who fix hardware already have.

>Any input from the hardware experts here would be much appreciated.
>--
>Boisy G. Pitre
>http://www.tee-boy.com

Boisy, I have NDI how the best measurement could be made, as the dynamics for 
the NMOS 6809 shouldn't show any really huge changes. 10% maybe, and possibly 
within the noise margin unless a large enough number of samples is made for 
each example.

Because of the effect of the measuring devices sensing resistor, I believe I 
would make the current measurements at a point upstream of the regulation 
thereby allowing the regulator the ability to maintain the 5 volt line at 5 
volts.  An LM317 has a small and relatively well known draw for its internal 
circuitry that can be subtracted from the current draw shown if needed.  Its 
response time is more than sufficient for the clock speeds of the 6809.  I 
have used it as the write pulse generator in an eprom burner where it was 
able to switch the vpp on those older eproms from 5 or 12 volts, depending on 
the chip, to a 25 volt write in half a microsecond, and 1 microsecond coming 
back down to do the verifying read.

What I do know is that the 6809 runs warm enough to feel it, so its using a 
watt or more.

Measurements for a 6309 will be much smaller, but I'd expect to also see at 
least a 10/1 change in draw for those two examples if measuring just the 6309 
draw.  I my coco3, its easily the coldest chip on the motherboard, and this 
is considering that the really big sources of heat, the power tranny and the 
pass transistor and its drivers circuitry have all been removed., leaving the 
GIME as the warmest chip in it.

-- 
Cheers, Gene
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)

Executive ability is deciding quickly and getting somebody else to do
the work.
		-- John G. Pollard



More information about the Coco mailing list