关于ASIC中的RAM
一般来说RAM是由Foudry提供的memory-compiler生成出来的。
他会生成相应的verilog-model,用于simulation,也会生成一些backend需要的database。
数据的加载是通过$readmemh类似的系统函数完成的。
需要记忆元件的前端模型。
路过学习了
学习了
感谢各位的回答
再请教:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity ram is
generic(width: integer := 16; -- used to change the memory data's width
depth: integer := 8); -- used to change the memery address' width during
-- instantiation.
port(
clk : in std_logic; --clock
addr : in std_logic_vector(depth - 1 downto 0); --address bus
cs : in std_logic; --chip select
oe : in std_logic; --output enable
--high for write
--low for read
data_i: in std_logic_vector(width - 1 downto 0); --write data bus
data_o: out std_logic_vector(width - 1 downto 0) --read data bus
);
end ram;
architecture Behavioral of ram is
type ram is array(2 ** depth - 1 downto 0) of std_logic_vector(width - 1 downto 0);
signal ram1 : ram;
begin
process(clk)
begin
if(clk'event and clk = '1') then
if(cs = '0') then
if(oe = '0') then
data_o <= ram1(conv_integer(addr));
else
ram1(conv_integer(addr)) <= data_i;
end if;
end if;
end if;
end process;
end Behavioral;
这个程序能用于ASIC中RAM的仿真和综合吗?
你这个程序生不成RAM,只能生成寄存器。
路过学习一下
这人好像不是Fountry提供的吧,可以向fountry要一个memory compiler然后根据需要自己生成ram的仿真模型。
要是综合用的话,得向Fountry要他们的library才可以的。
memory compiler个人能要到吗?如果要做顶层的仿真,ram作为子模块,在testbench中怎么把RAM的数据加进去?
fountry 有现成的IP,也有仿真模型
你可以根据你的需要 和 fountry 提供的IP 进行选择,多个拼接或使用单个的
不过接口时序控制要做好
