Thurs, 18 Oct 2014, 09:56pm

A student writes:

> Hi Dr. Patt,
> In a vector processor, how does the Vln relate to a VST instruction? For
> example, if we are storing 64 values and we want to change Vln afterwards
> to a different number, does vector chaining allow you to change Vln once
> the VST instruction has started, or does it wait for the VST to finish
> completely before changing the Vln to the different number?
> Thanks,
> << name withheld to protect the student who wishes to change VL in midstream >>

Good question!  Normally, in vector processing, vector length is usually
associated with the number of loop iterations, in which case you would
not want to change VL while an operation was going on.  However, that is
not to say you can't.

There are at least two possibilities for a vector machine to handle this.

One way is to simply define the problem away with a statement in the ISA,
saying that if you change VL after a vector instruction has started
processing, the result is "undefined."  That would eliminate the
need to deal with it.

The other way, and the more preferred way, is for the microarchitecture to
load VL into a temp before starting to execute the vector operation.  By
doing that, an instruction that changes VL would be effective for subsequent
instructions.  This is the way the Cray 1 does it and the way we will assume
in our work this semester.

Yale Patt