N
Nikolai
Guest
hallo ..
Jeg har skrevet følgende kode for et 64x16 ram ..
Etter syntese rapportene viser at slice utnyttelse er 41%.
Isnt at for mye ..Kan jeg redusere området okkupert.?
Im nye begrensninger, så har det noe å gjøre med området begrensninger.?
Her er koden
library IEEE;
bruk IEEE.STD_LOGIC_1164.ALL;
bruk IEEE.STD_LOGIC_ARITH.ALL;
bruk IEEE.STD_LOGIC_UNSIGNED.ALL;
enhet Ram_1k er
Port (addr: i STD_LOGIC_VECTOR (15 downto 0);
sel: i STD_LOGIC;
rw: i STD_LOGIC;
klar: out STD_LOGIC;
data: Inout STD_LOGIC_VECTOR (15 downto 0));
end Ram_1k;
architecture Behavioral of Ram_1k er
begynne
Prosessen (addr, Sel, rw)
type t_mem er array (0 til 63) av STD_LOGIC_VECTOR (15 downto 0);
variabel mem_data: t_mem: =
( "0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000");
begynne
data <= "ZZZZZZZZZZZZZZZZ";
klar <= '0 ';
hvis sel = '1 'da
hvis rw = '1 'da
data <= mem_data (CONV_INTEGER (addr (15 downto 0))) etter 1 ns;
klar <= '1 ';
elsif rw = '0 'da
mem_data (CONV_INTEGER (addr (15 downto 0))): = data;
end if;
ellers
data <= "ZZZZZZZZZZZZZZZZ" after 1 ns;
end if;
end process;
end Behavioral;
Jeg har skrevet følgende kode for et 64x16 ram ..
Etter syntese rapportene viser at slice utnyttelse er 41%.
Isnt at for mye ..Kan jeg redusere området okkupert.?
Im nye begrensninger, så har det noe å gjøre med området begrensninger.?
Her er koden
library IEEE;
bruk IEEE.STD_LOGIC_1164.ALL;
bruk IEEE.STD_LOGIC_ARITH.ALL;
bruk IEEE.STD_LOGIC_UNSIGNED.ALL;
enhet Ram_1k er
Port (addr: i STD_LOGIC_VECTOR (15 downto 0);
sel: i STD_LOGIC;
rw: i STD_LOGIC;
klar: out STD_LOGIC;
data: Inout STD_LOGIC_VECTOR (15 downto 0));
end Ram_1k;
architecture Behavioral of Ram_1k er
begynne
Prosessen (addr, Sel, rw)
type t_mem er array (0 til 63) av STD_LOGIC_VECTOR (15 downto 0);
variabel mem_data: t_mem: =
( "0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000",
"0000000000000000");
begynne
data <= "ZZZZZZZZZZZZZZZZ";
klar <= '0 ';
hvis sel = '1 'da
hvis rw = '1 'da
data <= mem_data (CONV_INTEGER (addr (15 downto 0))) etter 1 ns;
klar <= '1 ';
elsif rw = '0 'da
mem_data (CONV_INTEGER (addr (15 downto 0))): = data;
end if;
ellers
data <= "ZZZZZZZZZZZZZZZZ" after 1 ns;
end if;
end process;
end Behavioral;