DSPRelated.com
Forums

MIPS and cycle

Started by George September 4, 2003
Hi Adrian,

It's all the same thing.
When we say that an algorithm takes 1 MIPS, this means that during one
second it will spend 1 million instructions of the processor.
For example, in telephony applications we normally have a sampling
rate of 8kHz, so we have 125us until the next sample arrives. When we
say that a DTMF decoder requires 1 MIPS, it means that it spends 125
instructions to process each sample.
This were very common in DSP applications, where most DSPs used to
take one cycle per instruction. But now, with SIMD, VLIW, superscalar
cores, etc, to avoid confusion, it's better to inform how many clock
cycles the algorithm takes on that processor.

Luiz Carlos


> I agree with George. I've seen many times people using MIPS (often written > MIPs - like they would be singular MIP and plural MIPS) to denote how much > processing time a specific task would take. And worse, this MIPs is > sometimes a fractional number! And oposed to the real meaning of MIPS > (Million Instructions Per Second), the smaller it is, the better. > > 100 "MIPS" for a 300 MIPS processor, for example, it's supposed to be a > third of the real-time cycle taken by the specific application. In a > similar manner, 0.33 "MIPS" would like to tell 1 (the unit) is the whole > processing time in a real-time cycle. > > But all this is wrong and we should find another name instead of MIPs. Or > maybe there is one and I don't know. > > Adrian
Luiz,

I understand your point of view. I agree it's easy for developers to share 
the sample cycle time (125 usec in your example) between tasks in this way. 
But I still think it's abusive to use "MIPS" - a unit of speed, as a unit 
of time.

Because the way you are doing it, if you sum up the "MIPS" for all tasks, 
you would get the total processor speed, wouldn't you. Ex. you have two 
tasks, a 1 "MIPS" one and a 9 "MIPS" one and ideally, your processor can do 
10 MIPS. You are happy. You can do real-time processing.

But in fact you don't sum up speeds here, you sum up processing time (t), or 
number of instructions (n). Try summing up n1/t1 + n2/t2 and see you get 
twice the number of MIPS your processor has (because all ni/ti are 
equivalent and equal to n/t: 1250/125=10 MIPS in our case.

In other words all tasks run at the same speed, and TIME is the one shared 
between tasks. So you should sum up time and not speed.

I agree this is maybe too philosofical and if practicians have their ways, 
they will do whatever the the theoreticians would say. It just seems too 
abusive to me.

Adrian


PS. BTW, I consider myself an engineer and not a scientist (you can tell 
from my childish theory above, can't you :-). 


> Hi Adrian, > > It's all the same thing. > When we say that an algorithm takes 1 MIPS, this means that during one > second it will spend 1 million instructions of the processor. > For example, in telephony applications we normally have a sampling > rate of 8kHz, so we have 125us until the next sample arrives. When we > say that a DTMF decoder requires 1 MIPS, it means that it spends 125 > instructions to process each sample. > This were very common in DSP applications, where most DSPs used to > take one cycle per instruction. But now, with SIMD, VLIW, superscalar > cores, etc, to avoid confusion, it's better to inform how many clock > cycles the algorithm takes on that processor. > > Luiz Carlos > > >> I agree with George. I've seen many times people using MIPS (often >> written MIPs - like they would be singular MIP and plural MIPS) to denote >> how much processing time a specific task would take. And worse, this MIPs >> is sometimes a fractional number! And oposed to the real meaning of MIPS >> (Million Instructions Per Second), the smaller it is, the better. >> >> 100 "MIPS" for a 300 MIPS processor, for example, it's supposed to be a >> third of the real-time cycle taken by the specific application. In a >> similar manner, 0.33 "MIPS" would like to tell 1 (the unit) is the whole >> processing time in a real-time cycle. >> >> But all this is wrong and we should find another name instead of MIPs. Or >> maybe there is one and I don't know. >> >> Adrian
-- Adrian
Hi Adrian,

I don't think your poit of view is childish.
I agree that this use of MIPS leads to confusion.
In fact, I understand you very well. But I think my case is worst than yours.
If you are an electric engineer, you will remember the units of power:
W (watt), VA (Volt Ampere), VAr (Volt Ampere reactive). I hate the last two!

Luiz Carlos



> Luiz, > > I understand your point of view. I agree it's easy for developers to share > the sample cycle time (125 usec in your example) between tasks in this way. > But I still think it's abusive to use "MIPS" - a unit of speed, as a unit > of time. > > Because the way you are doing it, if you sum up the "MIPS" for all tasks, > you would get the total processor speed, wouldn't you. Ex. you have two > tasks, a 1 "MIPS" one and a 9 "MIPS" one and ideally, your processor can do > 10 MIPS. You are happy. You can do real-time processing. > > But in fact you don't sum up speeds here, you sum up processing time (t), or > number of instructions (n). Try summing up n1/t1 + n2/t2 and see you get > twice the number of MIPS your processor has (because all ni/ti are > equivalent and equal to n/t: 1250/125=10 MIPS in our case. > > In other words all tasks run at the same speed, and TIME is the one shared > between tasks. So you should sum up time and not speed. > > I agree this is maybe too philosofical and if practicians have their ways, > they will do whatever the the theoreticians would say. It just seems too > abusive to me. > > Adrian > > > PS. BTW, I consider myself an engineer and not a scientist (you can tell > from my childish theory above, can't you :-).
Luiz Carlos wrote:
> > Hi Adrian, > > I don't think your poit of view is childish. > I agree that this use of MIPS leads to confusion. > In fact, I understand you very well. But I think my case is worst than yours. > If you are an electric engineer, you will remember the units of power: > W (watt), VA (Volt Ampere), VAr (Volt Ampere reactive). I hate the last two! > > Luiz Carlos >
... VAs and VARs are important, whether you hate them or not. Do you have better names to propose? Or do propose to simply ignore the concepts? Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Hi Jerry,

The concepts of active and reactive power are important, very
important.
But the unit of power is Watt, it doesn't matter if it is real,
imaginary or complex. If you want to say the power is imaginary, say
Pimag = x Watts, not P= x VAr.
Or maybe, when we go to market, we should buy 5 kgrice (kgrice is the
mass of a kg of rice), 2 kgbean, 3 kgsugar etc. You know what I mean.

Luiz Carlos


> VAs and VARs are important, whether you hate them or not. Do you have > better names to propose? Or do propose to simply ignore the concepts? > > Jerry
"Luiz Carlos" <oen_br@yahoo.com.br> wrote in message
news:8471ba54.0309100917.3f0cfd23@posting.google.com...
> Hi Jerry, > > The concepts of active and reactive power are important, very > important. > But the unit of power is Watt, it doesn't matter if it is real, > imaginary or complex. If you want to say the power is imaginary, say > Pimag = x Watts, not P= x VAr. > Or maybe, when we go to market, we should buy 5 kgrice (kgrice is the > mass of a kg of rice), 2 kgbean, 3 kgsugar etc. You know what I mean.
But they are measuring two very different things. If you want to know how much power a device takes, how much it costs to run and how much heat it will make, then you want power as measured in watts. But for many AC circuits, power is not volts times amps. You also need to know how much current it will use, how big to make the wires, how big the circuit breakers and switches should be, and especially the transformers. With transformers, you can have different voltages and currents, but the volt amps are, more or less, conserved. Well, reactive power I might agree is a little strange. If you have real power and volt amps that should be enough. As for the rice/beans/sugar question, all can be measured on the same scale as units of mass. But consider that in the US most recipes measure such in cups, a unit of volume. The mass of rice, beans, and sugar in one cup is different. Consider the problems of someone converting a recipe between cups and kg. When they are not in cups, they use weight units (pounds), not mass units (kg). (This is a distinction made by physicists and not always by others. There is also a pounds mass unit around.) Consider a recipe that might be used on the moon. What units would you use? Or a recipe to be used by someone in a space station? -- glen
Hi Glen,

> But they are measuring two very different things. If you want to know how > much power a device takes, how much it costs to run and how much heat it > will make, then you want power as measured in watts. But for many AC > circuits, power is not volts times amps. You also need to know how much > current it will use, how big to make the wires, how big the circuit breakers > and switches should be, and especially the transformers. With > transformers, you can have different voltages and currents, but the volt > amps are, more or less, conserved. > > Well, reactive power I might agree is a little strange. If you have real > power and volt amps that should be enough. >
I'm aware of everything you said, and I agree. Yes, they are different, but they use the same units. Example: A DC potential of one Volt applied to a resistor of one Ohm. Current, of course is one Ampere. Power: P=V*I = 1[Volt]*1[Ampere] = 1[Volt*Ampere] = 1[Watt] What I want to show is that, you don't need to go to [Watt], you may stay at [Volt*Ampere]. It's right, as it would be P=1[Volt*Volt/Ohm]! What you have to know is that "P" is a real power. I also dislike [Watt RMS], [Watt PMPO], [Volt DC], [Volt AC], etc. For me, the right way should be: PowerRMS= x[Watt], and PowerPMPO= x[Watt], PotentialDC= x[Volt], PotentialAC= x[volt]. Use the name not the unit to differentiate them.
> As for the rice/beans/sugar question, all can be measured on the same scale > as units of mass. But consider that in the US most recipes measure such in > cups, a unit of volume. The mass of rice, beans, and sugar in one cup is > different. Consider the problems of someone converting a recipe between > cups and kg. When they are not in cups, they use weight units (pounds), > not mass units (kg). (This is a distinction made by physicists and not > always by others. There is also a pounds mass unit around.) Consider a > recipe that might be used on the moon. What units would you use? Or a > recipe to be used by someone in a space station? > > -- glen
It was an example. Here in Brazil, solid things are sold in units of mass (kg). But, what is really important is, a kg of rice has the same mass as a kg of sugar, here, on moon or in Mars. And we don't say kgrige or kgsugar. Luiz Carlos.
"Luiz Carlos" <oen_br@yahoo.com.br> wrote in message
news:8471ba54.0309110519.6776ffa3@posting.google.com...

> > But they are measuring two very different things. If you want to know
how
> > much power a device takes, how much it costs to run and how much heat it > > will make, then you want power as measured in watts. But for many AC > > circuits, power is not volts times amps. You also need to know how much > > current it will use, how big to make the wires, how big the circuit
breakers
> > and switches should be, and especially the transformers. With > > transformers, you can have different voltages and currents, but the volt > > amps are, more or less, conserved. > > > > Well, reactive power I might agree is a little strange. If you have
real
> > power and volt amps that should be enough. > > > > I'm aware of everything you said, and I agree. Yes, they are > different, but they use the same units. > Example: A DC potential of one Volt applied to a resistor of one Ohm. > Current, of course is one Ampere. > Power: P=V*I = 1[Volt]*1[Ampere] = 1[Volt*Ampere] = 1[Watt] > What I want to show is that, you don't need to go to [Watt], you may > stay at [Volt*Ampere]. It's right, as it would be P=1[Volt*Volt/Ohm]! > What you have to know is that "P" is a real power.
> I also dislike [Watt RMS], [Watt PMPO], [Volt DC], [Volt AC], etc. > For me, the right way should be: PowerRMS= x[Watt], and PowerPMPO= > x[Watt], PotentialDC= x[Volt], PotentialAC= x[volt]. > Use the name not the unit to differentiate them.
Well, BTU/hour or kCal/hour are also power units, and are sometimes used, too. They make much more sense as real power units, though. In the US we also have horsepower, which I am told is larger than any horse can produce. Things like transformers and motors should have a volt ampere rating, which is not so well related to the amount of power one can get through it, and probably also a BTU/hour or kCal/hour rating as to how much heat it can dissipate. There are many cases where different units are dimensionally equivalent but measure different things. In CGS units the unit of capacitance is the centimeter. It makes a lot of sense, and no extra unit was needed in that case. Then there is the kilowatt-hour/day, often used by power companies to describe household power usage, which I think is pretty strange, too. We all know how many hours there are per day! RMS power is a strange unit. There is really no such thing. It came about with audio amplifier producers exagerating the power output by using the peak power that an amplifier could produce. It may or may not be able to produce a sine wave with that peak, and if it did the average power would be half that. Then there were people that would claim the power for a stereo amplifier as twice the per channel power. RMS voltage and RMS current make sense, as one can find the amount of power dissipated in a resister by an AC voltage or current that way. But RMS voltage times RMS current is not RMS watts. Note that the FTC (the US agency regulating such) also disallows audio amplifiers whose model number is twice the RMS power/channel, where they also define RMS power. I remember one amplifier that produced 200 watts/channel with a model number of 401 to get around that regulation. -- glen
"Glen Herrmannsfeldt" <gah@ugcs.caltech.edu> wrote in message news:<DqK7b.408564$o%2.186361@sccrnsc02>...
> "Luiz Carlos" <oen_br@yahoo.com.br> wrote in message > news:8471ba54.0309100917.3f0cfd23@posting.google.com... > > Hi Jerry, > > > > The concepts of active and reactive power are important, very > > important. > > But the unit of power is Watt, it doesn't matter if it is real, > > imaginary or complex. If you want to say the power is imaginary, say > > Pimag = x Watts, not P= x VAr. > > Or maybe, when we go to market, we should buy 5 kgrice (kgrice is the > > mass of a kg of rice), 2 kgbean, 3 kgsugar etc. You know what I mean. > > But they are measuring two very different things. If you want to know how > much power a device takes, how much it costs to run and how much heat it > will make, then you want power as measured in watts. But for many AC > circuits, power is not volts times amps. You also need to know how much > current it will use, how big to make the wires, how big the circuit breakers > and switches should be, and especially the transformers. With > transformers, you can have different voltages and currents, but the volt > amps are, more or less, conserved. > > Well, reactive power I might agree is a little strange. If you have real > power and volt amps that should be enough. > > As for the rice/beans/sugar question, all can be measured on the same scale > as units of mass.
Consider the units used for them, and for other grains, on the commodities markets in the United States. Pounds are the mass units used for sugar and some kind of beans. Other beans such as soybeans and rice and other grains such as wheat and barley are measured in mass units called "bushels." The commodity being bought and sold needs to be identified for these units to be well defined, of course, because while a bushel of soybeans is 60 lb (27.22 kg), a bushel of flax is 56 lb (25.40 kg), a bushel of barley is 48 lb (21.77 kg), and a bushel of oats is 32 lb (14.51 kg) in the United States or 34 lb (15.42 kg) in Canada.
>But consider that in the US most recipes measure such in > cups, a unit of volume. The mass of rice, beans, and sugar in one cup is > different. Consider the problems of someone converting a recipe between > cups and kg. When they are not in cups, they use weight units (pounds), > not mass units (kg).
Wrong. http://w0rli.home.att.net/youare.swf Actually, 1 lb = 0.45359237 kg, exactly, by definition. U.K.: Weights and Measures Act of 1963 Canada: Weights and Measures Act of 1953 Australia: Weights and Measures Regulations U.S.A.: Federal Register Notice of 1 July 1959. Read the current U.S. law, a discussion of the definition as a different exact fraction of a kilogram for the 66 years before then, and the 1959 international agreement on the value given above (which was already in use in Canada before then) at one of these sites (same file both places) http://www.ngs.noaa.gov/PUBS_LIB/FedRegister/FRdoc59-5442.pdf http://gssp.wva.net/html.common/refine.pdf Those pounds are "weight" units, of course. But that does not imply "not mass units." The word "weight" is an ambigous word, with several different meanings. Consider, for example, the troy "units of weight." Unlike their avoirdupois cousins, and unlike grams and kilograms, they have never spawned a unit of force of the same name. They are always units of mass.
>(This is a distinction made by physicists and not > always by others. There is also a pounds mass unit around.)
Those pounds defined as 453.59237 grams are, of course, the pounds used in commerce. Pounds force are not legal units for this purpose. That's what pounds were originally, and still are today in the contexts you are discussing--units of mass. Pounds force are a recent bastardization, something that was never well defined before the 20th century, and which even today don't have an official definition. American Society for Testing and Materials, Standard for Metric Practice, E 380-79, ASTM 1979. 3.4.1.4 The use of the same name for units of force and mass causes confusion. When the non-SI units are used, a distinction should be made between force and mass, for example, lbf to denote force in gravimetric engineering units and lb for mass.
> Consider a > recipe that might be used on the moon. What units would you use? Or a > recipe to be used by someone in a space station?
Pounds. Grams. Makes no difference as far as their usefulness, either of these units used on earth would work as well there. On the moon, you could even get away with pounds force if all your measurements were in units of force (no eggs by count or water by volume or anything like that), but you might want to adjust everything downward proportionately from what you'd use on Earth. Gene Nygaard http://ourworld.compuserve.com/homepages/Gene_Nygaard/t_jeff.htm But if it be thought that, either now, or at any future time, the citizens of the United States may be induced to undertake a thorough reformation of their whole system of measures, weights and coins, reducing every branch to the same decimal ratio already established in their coins, and thus bringing the calculation of the principal affairs of life within the arithmetic of every man who can multiply and divide plain numbers, greater changes will be necessary. U.S. Secretary of State Thomas Jefferson, 1790
On 11 Sep 2003 06:19:02 -0700, oen_br@yahoo.com.br (Luiz Carlos)
wrote:

>Hi Glen, > >> But they are measuring two very different things. If you want to know how >> much power a device takes, how much it costs to run and how much heat it >> will make, then you want power as measured in watts. But for many AC >> circuits, power is not volts times amps. You also need to know how much >> current it will use, how big to make the wires, how big the circuit breakers >> and switches should be, and especially the transformers. With >> transformers, you can have different voltages and currents, but the volt >> amps are, more or less, conserved. >> >> Well, reactive power I might agree is a little strange. If you have real >> power and volt amps that should be enough. >> > >I'm aware of everything you said, and I agree. Yes, they are >different, but they use the same units. >Example: A DC potential of one Volt applied to a resistor of one Ohm. >Current, of course is one Ampere. >Power: P=V*I = 1[Volt]*1[Ampere] = 1[Volt*Ampere] = 1[Watt] >What I want to show is that, you don't need to go to [Watt], you may >stay at [Volt*Ampere]. It's right, as it would be P=1[Volt*Volt/Ohm]! >What you have to know is that "P" is a real power. > >I also dislike [Watt RMS], [Watt PMPO], [Volt DC], [Volt AC], etc. >For me, the right way should be: PowerRMS= x[Watt], and PowerPMPO= >x[Watt], PotentialDC= x[Volt], PotentialAC= x[volt]. >Use the name not the unit to differentiate them.
The ideas you are trying to express are expressed quite well by NIST in their Guide for the Use of the International System of Units (SI), Special Publication 811, http://physics.nist.gov/Pubs/SP811/ See especially sections 7.4 Unacceptability of attaching information to units and 7.5 Unacceptability of mixing information with units at http://physics.nist.gov/Pubs/SP811/sec07.html Gene Nygaard http://ourworld.compuserve.com/homepages/Gene_Nygaard/