Вы находитесь на странице: 1из 20

Desempenho

MO801/MC912
Caminho Crtico
Como ficaria o circuito? Foque no sinal
Critical
if ((( Critical='0' and Obi='1' and Sar='1')
or CpuG='0') and CpuR='0') then
Des <= Adr;
elsif (((Critical='0' and Obi='1' and Sar='1')
or CpuG='0') and CpuR='1') then
Des <= Bdr;
elsif (Sar='0' and ..........

Caminho Crtico
Quantos nveis lgicos?
Alternativa de Circuito
if ((( Critical='0' and Obi='1'
and Sar='1') or CpuG='0')
and CpuR='0') then
Des <= Adr;
elsif (((Critical='0' and
Obi='1' and Sar='1') or
CpuG='0') and CpuR='1')
then
Des <= Bdr;
elsif (Sar='0' and ..........

if (Critical='0') then
if (((Obi='1' and Sar='1')
or CpuG='0') and
CpuR='0') then
Des <= Adr;
elsif (((Obi='1' and
Sar='1') or CpuG='0' and
CpuR='1') then
Des <= Bdr;
end if;
end if;
Circuito Resultante

Outro Exemplo
if (clk'event and clk ='1') then
if (non_critical and critical) then
out1 <= in1
else
out1 <= in2
end if;
end if;

Modelo Alternativo
signal out_temp : std_logic

if (non_critical)
out_temp <= in1;
else
out_temp <= in2;
if (clk'event and clk ='1') then
if (critical) then
out1 <= out_temp;
else out1 <= in2;
end if;
end if;
end if;
Original vs Modificado
Compartilhamento de Recursos
if (...(siz = 1)...)
count <= count + 1;
else if (...((siz =2)...)
count <= count + 2;
else if (...(siz = 3)...)
count <= count + 3;
else if (...(siz = 0)...)
count <= count + 4;
Quantos somadores
sero gerados pela
descrio ao lado?
Alternativa de Cdigo
E com o cdigo abaixo?

if (...(siz = 0)...) then
count <= count + 4;
else if (...) then
count <= count + siz;

Quantos somadores?
if (select) then
sum <= A + B;
else
sum <= C + D;

E agora?
if (sel) then
temp1 <= A;
temp2 <= B;
else
temp1 <= C;
temp2 <= D;
end if;
sum <= temp1 + temp2;
Operadores dentro de laos
Quantos somadores?

vsum := sum;
for i in 0 to 3 loop
if (req(i)='1') then
vsum <= vsum + offset(i);
end if;
end loop;
Quantos somadores?







Qual a soluo?
E agora?
vsum := sum;
for i in 0 to 3 loop
if (req(i)='1') then
offset_1 <= offset(i);
end if;
end loop;
vsum <= vsum + offset_1;

Qual melhor?
Pense nas clulas das FPGAs
Qual melhor?
one :process (clk, a, b, c, en)
begin
if (clk'event and clk ='1') then
if (en = '1') then
q2 <= a and b and c;
end if;
q1 <= a and b and c;
end if;
end process one;

part_one: process (clk, a, b, c, en)
begin
if (clk'event and clk ='1') then
if (en = '1') then
q2 <= a and b and c;
end if;
end if;
end process part_one;
part_two: process (clk, a, b, c)
begin
if (clk'event and clk ='1') then
q1 <= a and b and c;
end if;
end process part_two;

Duplicao de Componentes
Serve para diminuir o fanout
As ferramentas costumam fazer
automaticamente
Para fazer manualmente, em geral,
necessrio duplicar o processo onde est
o sinal
Tamanho de Projetos
Cada ferramenta possui um tamanho
tpico de projeto
Projetos gastam recursos como memria do
processador, processamento
Os algoritmos nem sempre so lineares
Quebre os arquivos em pedaos menores
para ficar na faixa tpica
Qual a faixa tpica????
Posicionamento dos Registradores
melhor ter os registradores nos
extremos, preferencialmente nas sadas

Вам также может понравиться