Vectors
Vectors
– CISC approach: There will be a single command or instruction for this like
ADD which will perform the task.
– RISC approach: Here programmer will write the first load command to load
data in registers then it will use a suitable operator and then it will store the
result in the desired location.
Difference b/w RISC & CISC
RISC CISC
• This causes the instruction fetch and execute phases to overlap and
perform simultaneous operations.
• In that case the pipeline must be emptied and all the instructions
that have been read from memory after the branch instruction must
be discarded.
Instruction Pipeline
• Computers with complex instructions require other phases in
addition to the fetch and execute to process an instruction
completely.
• In general case, the computer needs to process each instruction
with the following sequence of steps.
– Fetch the instruction from memory.
– Decode the instruction.
– Calculate the effective address.
– Fetch the operands from memory.
– Execute the instruction.
– Store the result in the proper place.
Instruction Pipeline
• In instruction pipeline a stream of instructions can be executed by
overlapping fetch, decode and execute phases of an instruction
cycle.
• This type of technique is used to increase the throughput of the
computer system.
• An instruction pipeline reads instruction from the memory while
previous instructions are being executed in other segments of the
pipeline.
• Thus we can execute multiple instructions simultaneously.
• The pipeline will be more efficient if the instruction cycle is divided
into segments of equal duration.
Instruction Pipeline
• In the most case computer needs to process each instruction in
following sequence of steps:
• 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.
• 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.
VECTOR PROCESSING
• 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.