Definition: Vector processor is basically a central processing unit that has the ability to execute the complete vector input in a single instruction. More specifically we can say, it is a complete unit of hardware resources that executes a sequential set of similar data items in the memory using a single instruction.
We know elements of the vector are ordered properly so as to have successive addressing format of the memory. This is the reason why we have mentioned that it implements the data sequentially.
It holds a single control unit but has multiple execution units that perform the same operation on different data elements of the vector.
Unlike scalar processors that operate on only a single pair of data, a vector processor operates on multiple pair of data. However, one can convert a scalar code into vector code. This conversion process is known as vectorization. So, we can say vector processing allows operation on multiple data elements by the help of single instruction.
These instructions are said to be single instruction multiple data or vector instructions. The CPU used in recent time makes use of vector processing as it is advantageous than scalar processing.
Let us now move further to understand how the vector processor functions.
Architecture and Working
The figure below represents the typical diagram showing vector processing by a vector computer:
The functional units of a vector computer are as follows:
- IPU or instruction processing unit
- Vector register
- Scalar register
- Scalar processor
- Vector instruction controller
- Vector access controller
- Vector processor
Let us now understand the overall operation performed by the vector computer.
As it has several functional pipes thus it can execute the instructions over the operands. We know that both data and instructions are present in the memory at the desired memory location. So, the instruction processing unit i.e., IPU fetches the instruction from the memory.
Once the instruction is fetched then IPU determines either the fetched instruction is scalar or vector in nature. If it is scalar in nature, then the instruction is transferred to the scalar register and then further scalar processing is performed.
While, when the instruction is a vector in nature then it is fed to the vector instruction controller. This vector instruction controller first decodes the vector instruction then accordingly determines the address of the vector operand present in the memory.
Then it gives a signal to the vector access controller about the demand of the respective operand. This vector access controller then fetches the desired operand from the memory. Once the operand is fetched then it is provided to the instruction register so that it can be processed at the vector processor.
At times when multiple vector instructions are present, then the vector instruction controller provides the multiple vector instructions to the task system. And in case the task system shows that the vector task is very long then the processor divides the task into subvectors.
These subvectors are fed to the vector processor that makes use of several pipelines in order to execute the instruction over the operand fetched from the memory at the same time.
The various vector instructions are scheduled by the vector instruction controller.
Classification of Vector Processor
The classification of vector processor relies on the ability of vector formation as well as the presence of vector instruction for processing. So, depending on these criteria, vector processing is classified as follows:
Register to Register Architecture
This architecture is highly used in vector computers. As in this architecture, the fetching of the operand or previous results indirectly takes place through the main memory by the use of registers.
The several vector pipelines present in the vector computer help in retrieving the data from the registers and also storing the results in the desired register. These vector registers are user instruction programmable.
This means that according to the register address present in the instruction, the data is fetched and stored in the desired register. These vector registers hold fixed length like the register length in a normal processing unit.
Some examples of a supercomputer using the register to register architecture are Cray – 1, Fujitsu etc.
Memory to Memory Architecture
Here in memory to memory architecture, the operands or the results are directly fetched from the memory despite using registers. However, it is to be noted here that the address of the desired data to be accessed must be present in the vector instruction.
This architecture enables the fetching of data of size 512 bits from memory to pipeline. However, due to high memory access time, the pipelines of the vector computer requires higher startup time, as higher time is required to initiate the vector instruction.
Some examples of supercomputers that possess memory to memory architecture are Cyber 205, CDC etc.
Advantages of Vector Processor
- Vector processor uses vector instructions by which code density of the instructions can be improved.
- The sequential arrangement of data helps to handle the data by the hardware in a better way.
- It offers a reduction in instruction bandwidth.
So, from the above discussion, we can conclude that register to register architecture is better than memory to memory architecture because it offers a reduction in vector access time.