[Coco] 6809/6309 Power Analysis

Boisy G. Pitre boisy at tee-boy.com
Thu Jan 21 17:57:05 EST 2010


On Jan 21, 2010, at 4:05 PM, Stephen Adolph wrote:

> I gotta say, I think this can be a challenge to define, let alone measure.

Yes, but that's what makes this so interesting and compelling, and a great topic of research.

> Certainly there is the dynamic supply power that is feeding the
> toggling gates.  This is coming from the main supply.  I would just
> measure the power on the main lead.

Just to clarify, I'm using a CoCo 3.

I would think that measuring current variations on the main lead would be problematic, as you have to contend with all other components on the board.  Why not just hook a probe up to the Vss and Vcc of the CPU and have a very fine instrument measuring current differences?

> But, there is also power related to I/O.

Yes, I realize that in spite of using some instructions that THEMSELVES do not fetch data from memory (MUL), the instruction ITSELF must be fetched.  

> I'm sure there is an industry standard technique and definition of
> what and how to measure this, but I'm not aware of it.

I'm researching that angle too.

> I would probably just do the main supply lead and assume it is the
> majority of the power.

Thanks for the feedback Steve.

> ...Steve
> 
> On Thu, Jan 21, 2010 at 4:54 PM, Boisy G. Pitre <boisy at tee-boy.com> 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).
>> 
>> 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?
>> 
>> Any input from the hardware experts here would be much appreciated.
>> --
>> Boisy G. Pitre
>> http://www.tee-boy.com/
>> 
>> 
>> 
>> --
>> Coco mailing list
>> Coco at maltedmedia.com
>> http://five.pairlist.net/mailman/listinfo/coco
>> 
> 
> --
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco




More information about the Coco mailing list