VLIW Flashcards

1
Q

What is VLIW?

A

Very Long Instruction Word. A type of processor that doesn’t try to identify ILP, but instead just does what the compiler tells it to do.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Superscalar vs VLIW processors

A

There are two kinds of superscalar processors: out of order and in order. Both of them try to do up N instructions per cycle, while VLIW does only one instruction per cycle, but that instruction accomplishes the work of N on another processor.

Out of order superscalars look at many, many more than N instructions in order to find independent instructions (which can be executed in parallel). This requires significant help from hardware. The compiler CAN help, but isn’t entirely necessary.

In order only look at the next N instructions. This requires less from the hardware, but can only be effective if the compiler does a good job with reordering instructions. A good compiler is absolutely necessary.

VLIW only looks at the next (very large instruction). It requires very little of the hardware, but COMPLETELY dependent on the compiler.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Can VLIW introduce code bloat?

A

Yes! Best case scenario, VLIW code will have the same number of bytes as comparable superscalar code. Worst case, though, each instruction will get its own (very long) VLIW instruction while the rest of the instruction is filled with nothing. That’s a lot of unnecessary bytes!

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Pros and cons of VLIW

A

PROS
- Compiler does the hard work BEFORE runtime, instead of the hardware doing the hard work as the program is running. There’s more time to get it right and make it efficient.
- Simpler hardware. It doesn’t need all the extra stuff that superscalar processors need.
- Can improve energy efficiency because the hardware has “less to do per executed instruction”
- Works well on “regular” code like loops, matrix operations, etc. The predictable stuff.

CONS
- Latencies are not always what the compiler expects. It has to make some assumptions (like a certain cache hit latency), but it can be wrong (like when you have a cache miss!).
- A lot of code is “irregular”, like AI, or anything that uses a lot of pointers.
- Code bloat! Might not be able to fit multiple operations in one instruction.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

VLIW instructions

A
  • Have all the normal ISA opcodes (basic instructions, i guess)
  • Full predication support, because this enables better instruction scheduling, which is exactly how the compiler helps out
  • Lots of architectural registers, because these are used a lot for scheduling optimizations
  • Branch hints: the compiler tells the hardware what to expect from branches
  • VLIW instruction compaction: instead of just filling VLIW insts with nops when there aren’t enough parallelizable isnts to fill it up, we use “stop bits” to break up the long instructions into several. This is mitigates code bloat.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are some examples of VLIW processors?

A

INTEL ITANIUM
- Bad example
- Had a ton of ISA features built in, which made the hardware very complicated. Maybe most complex Intel ever built.
- But it was terrible at irregular code.

DSP PROCESSORS (in general)
- DSP uses a lot of regular code (loops, matrix ops)
- VLIW is very efficient for this purpose
- Energy efficient because they don’t waste power figuring out dependencies

How well did you know this?
1
Not at all
2
3
4
5
Perfectly