|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
×
不知道我的思路会有什么问题,数据总读不出来,是不是加给内存条的时钟振幅太低了,:
1.器件:使用SDRAM内存条,FPGA用ACEX1K-3,外加20MHZ的时钟(速度要求不高),另外,该时钟通过FPGA倒相之后直接加给内存条做为它的运行时钟(不知为什么,振幅只有2.1V左右).
2.上电之后,不立即进行初始设置.只有当FPGA从计算机端口锁存第一个数据时,FPGA才对内存条进行模式设置和初次充电和刷新等初始工作.以后每接一个数据就充电和刷新一次,时间最大不会超过13us .
初始化程序如下:
--process4: Issue the Initialization command first;
initial: Process(clk,reset)
signal initial_temp: std_logic_vector(10 downto 0);
begin
if reset = '0' then
initial_addr_counter<="000000000000";
initial_temp<="0000000000000001";
cmd0<="1111";
initial_end<='0';
elsif clk'event and clk='1' then
if load_mode_con='1' then
if initial_temp(15)='0' then
initial_temp(15 downto 1)<=initial_temp(14 downto 0);
initial_temp(0)<='0';
if initial_temp(2)='1' then
cmd0<="1111";
initial_addr_counter(10) <='1';
elsif initial_temp(3)='1' then
cmd0<="0010"; ------ -----precharge
elsif initial_temp(4)='1' then
cmd0<="1111"; ------ -----precharge
initial_addr_counter(10)<='0';
elsif initial_temp(5)='1' or initial_temp(9)='1' then
cmd0<="0001"; ---auto refresh
initial_addr_counter(10)<='0';
elsif initial_temp(12)='1' then
cmd0<="1111";
initial_addr_counter<="001000100000";
elsif initial_temp(13)='1' then
cmd0<="0000"; ------mode register set
initial_addr_counter<="001000100000";
--A12-A0-13 bits
--burst=1; cas_latency=2;single write and read;
--sequential addressing mode
elsif initial_temp(14)='1' then
cmd0<="1111";
else
cmd0<="1111";
initial_addr_counter<="000000000000";
end if;
initial_end<='0';
else
initial_end<='1';
cmd0<="1111";
initial_addr_counter<="000000000000";
end if;
end if;
end if;
end process;
其中cmd0<=cs&ras&cas&we.
|
|