In previous lessons we have seen, that a Superscalar processor will try to
execute more than one instruction per cycle. The VLIW processors,
are trying to achieve the same amount of work per cycle but in a different way.
So let's compare the two approaches and see how the VLIW processors differ from
the out of order, and in order Superscalar processors that we have been already
seeing. So what we will do is compare the out of order Superscalar processor.
The in-order Superscalar processor, and the very long instruction word, or
the VLIW processor according to several things.
First, how many instructions per cycle do we try to do.
An N issue out-of-order Superscalar processor is trying to do
up to N instructions per cycle. And in-order Superscalar processor,
is also trying to do up to N instructions per cycle. A VLIW processor
is different in that it tries to execute 1 large instruction per cycle, but
that one large instruction does the same work as N normal instructions would do,
so really we're trying to do the same work per cycle. But the Superscalar
processors are trying to do more than one simple instruction per cycle,
where as [UNKNOWN] VLIW processor does one large instruction that really does
the same work as N of these; but it needs to be given a single instruction to do
per cycle. In terms of, how do we find independent instructions that we can
do in a cycle, the out-of-order Superscaler processor finds its N instructions,
by looking at much than this number of instructions in its instruction window.
So it fetches the code is, and
then kind of has a window of more than n instructions. And
among these it's trying to find the N, that it needs to execute. In contrast,
an in-order Superscalar processor is trying to execute up to N instructions per
cycle by looking at only the next N instructions in program order. So it
doesn't maintain this huge instruction window among which it is trying to find N
instructions, instead it just tries to see whether the next N instructions or
some subset of them can be executed in program order in parallel.
A VLIW processor doesn't. Even try to find independent instructions.
It simply tries to do the next large instruction. So
it behaves like a non-Superscalar processor that executes instructions in order.
It's just that each of these instructions is really, describing a lot of work.
In terms of hardware cost, this. Looking at many instructions,
in order to find the N that we are looking for in an out-of-order Superscalar
processor is really expensive. The in-order Superscalar processor,
does a lot less work and needs a lot less hardware to find the instructions.
So it's less expensive in terms of harder costs than they're out-of-order
Superscalar cousins. The VLIW processor reduces that cost even further, so
it's even less expensive than an in-order Superscalar processor for
the same amount of work per cycle, assuming we can find that work
because we are now even simpler in finding that work. And that brings us to
our last point, which is does the processor need help from the compiler?
In an out-of-order Superscalar processor, it does pretty well, even without any
compiler help. But the compiler can help improve the program performance.
An in-order Superscalar processor is more dependent on the compiler. If
the compiler doesn't do anything to put independent instructions. Consecutively
than an in-order Superscalar processor will not have good performance,
it performance will lack significantly. The performance that an out-of-order
Superscalar processor with the same issue with would be able to achieve. So
an in-order Superscalar processor really needs help from the compiler,
without such help it is going to perform significantly worse. Then,
an out-of-order Superscalar processor would. And finally,
VLIW processor completely depends on the compiler, to produce performance.
If we don' have a good compiler, a VLIW processor will fail miserably as
far as performance is concerned. So as we can see among this three,
the out-of-order Superscalar processor is trying to do,
kind of like a hardware intensive. I don't need much help from anybody, but
it sacrifices hardware to do that. An in-order Superscalar processor tries to
reduce the hardware cost, but still can execute the same program that
an out-of-order Superscalar processor could. And in some programs,
it really needs compiler help in order to achieve good performance. And
finally, a VLIW processor goes to the extreme of completely depending on
the compiler to provide and express the parallelism it needs to do work.
But in exchange, it gives us much lower cost.