Carregar apresentação
A apresentação está carregando. Por favor, espere
1
Chapter Six Pipelining
2
Pipelining: analogia com linha de produção
tempo Tempo de fabricação de um carro: C+M+C+P+A Taxa de produção (carros/h): medido na saída throughput: depende do número de estágios e do balanceamento Objetivo do pipeline: distribuir e balancear o tempo em cada estágio otimizar o uso de HW dos estágios (taxa de ocupação) resumo: aumentar a velocidade e diminuir o hardware
3
Pipelining Improve perfomance by increasing instruction throughput
tempo de execução de uma instrução: 8 ns e 9 ns (com ou sem pipe) throughput: 1 instr / 8ns (sem pipeline) ou 1 instr / 2 ns (com) # de estágios = 5; ganho de 4:1; para obter 5:1 ?? I n s t r u c i o f e h R g A L U D a 8 T m l w $ 1 , ( ) 2 3 4 6 . P x d
4
Pipelining What makes it easy all instructions are the same length
just a few instruction formats memory operands appear only in loads and stores What makes it hard? structural hazards: suppose we had only one memory control hazards: need to worry about branch instructions data hazards: an instruction depends on a previous instruction We’ll build a simple pipeline and look at these issues We’ll talk about modern processors and what really makes it hard: exception handling trying to improve performance with out-of-order execution, etc.
5
Basic Idea What do we need to add to actually split the datapath into stages? I n s t r u c i o m e y A d 4 3 2 l S h f M x 1 P C W a R g 6 D L U Z F : / E X B b k
6
Uma representação para o pipeline
g D A L U C 1 2 3 4 5 6 7 T i m ( n c l o k y s ) w $ , P r a x u t d Hachurado representa “atividade” Representação alternativa: imaginando que cada instrução tenha a sua própria via de dados Outra representação: foto no tempo
7
Pipelined Datapath O que é produzido em cada estágio é armazenado em um registrador de pipeline para uso pelo próximo estágio Problemas com o endereço do registrador de escrita?? Caminhando para esquerda? I n s t r u c i o m e y A d 4 3 2 l S h f F / D E X M W B x 1 P C a R g 6 L U Z
8
Corrected Datapath I n s t r u c i o m e y A d 4 3 2 l S h f F / D E X
l S h f F / D E X M W B x 1 P C a R g 6 L U Z
9
Exemplo com sub e lw (1)
10
Exemplo com sub e lw (2)
11
Exemplo com sub e lw (3)
12
Graphically Representing Pipelines
M R e g D C 1 2 3 4 5 6 T i m ( n c l o k y s ) w $ , P r a x u t d b A L U Can help with answering questions like: how many cycles does it take to execute this code? what is the ALU doing during cycle 4? use this representation to help understand datapaths
Apresentações semelhantes
© 2024 SlidePlayer.com.br Inc.
All rights reserved.