[Coco] 6809/6309 Power Analysis

Mark Marlette mmarlette at frontiernet.net
Fri Jan 22 11:27:19 EST 2010


Boisy,

Sorry for the slow response. Been out ill this whole week.... :(

Need to keep this short as this is a deep subject.

Others have made several good points.

Your MSO is a good one. Hopefully you have a math feature option that can turn on the power of the instrument. At that point you can start to measure the power under the curve or what ever you want to call it.

I would stay away from creating your own circuit or using a shunt unless you are unable to obtain a current probe. As Roy has pointed out there will be several factors that will have to be determined. Using a calibrated probe that is designed to do this type of work is the way to go. Lets you focus on your direct task at hand.

Here is a link to the scope and current probe for a task on a DC fan I just completed. I will send you a plot or two and you will see the power of the tools. The scope is a LeCroy WaveRunner 6100. The current probe is a AP015, DC-50MHZ, 30A cont, 50A peak, 10mA-50A/Div probe. My app I was measuring 400mA PWM spikes with a 82.5mA nominal current at 790Hz.

http://www.lecroy.com/oscilloscope/OscilloscopeSeries.aspx?mseries=17&capid=102&mid=504

http://www.lecroy.com/Options/ProductDetails.aspx?modelid=21&categoryid=3&groupid=7

I am not indicating that you go out and procure this equipment, just using it as a reference point. Your scope looks similar, now the need for the current probe. If they don't have one I bet you can get one. They are a VERY powerful tool.

At 10ma per div I would guess that you should be able to see the power consumption through the different cycles of the op code. With the MSO you will be able to reference to the system clock to the current data from the probe.

You will have to modify your motherboard to allow the current probe access to the power lead but beyond that, that is it. Simple mod.

Something else to consider, not sure you if you remember but......Two of the designer engineers that worked on the 68xx chipset are customers of Cloud-9 and I have had several Emails with them. As I recall both wanted 6309s to play with! The messages and email addresses are in our repository.

Did I say short???

Good luck, got to run....

Regards,

Mark



----- Original Message -----
From: "Boisy G. Pitre" <boisy at tee-boy.com>
To: "CoCoList for Color Computer Enthusiasts" <coco at maltedmedia.com>
Sent: Thursday, January 21, 2010 3:54:48 PM GMT -06:00 US/Canada Central
Subject: [Coco] 6809/6309 Power Analysis

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



More information about the Coco mailing list