URL
https://opencores.org/ocsvn/mlite/mlite/trunk
[/] [mlite/] [trunk/] [vhdl/] [ddr_ctrl.vhd] - Diff between revs 259 and 278
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 259 |
Rev 278 |
Line 141... |
Line 141... |
end if;
|
end if;
|
end if;
|
end if;
|
|
|
when STATE_IDLE =>
|
when STATE_IDLE =>
|
if refresh_cnt(7) = '1' then
|
if refresh_cnt(7) = '1' then
|
if write_prev = '0' then
|
|
state_current := STATE_PRECHARGE;
|
state_current := STATE_PRECHARGE;
|
command := COMMAND_AUTO_REFRESH;
|
command := COMMAND_AUTO_REFRESH;
|
end if;
|
|
elsif active = '1' then
|
elsif active = '1' then
|
state_current := STATE_ROW_ACTIVATE;
|
state_current := STATE_ROW_ACTIVATE;
|
command := COMMAND_ACTIVE;
|
command := COMMAND_ACTIVE;
|
end if;
|
end if;
|
|
|
Line 223... |
Line 221... |
write_active <= '1';
|
write_active <= '1';
|
elsif cycle_count2 = "100" then
|
elsif cycle_count2 = "100" then
|
write_active <= '0';
|
write_active <= '0';
|
end if;
|
end if;
|
|
|
if state_current = STATE_ROW_ACTIVATE then
|
if command = COMMAND_ACTIVE then
|
bank_open(bank_index) <= '1';
|
bank_open(bank_index) <= '1';
|
address_row(bank_index) := address(25 downto 13);
|
address_row(bank_index) := address(25 downto 13);
|
end if;
|
end if;
|
|
|
if state_current = COMMAND_AUTO_REFRESH then
|
if command = COMMAND_PRECHARGE then
|
bank_open <= "0000";
|
bank_open <= "0000";
|
|
end if;
|
|
|
|
if command = COMMAND_AUTO_REFRESH then
|
refresh_cnt <= ZERO(7 downto 0);
|
refresh_cnt <= ZERO(7 downto 0);
|
else
|
else
|
refresh_cnt <= refresh_cnt + 1;
|
refresh_cnt <= refresh_cnt + 1;
|
end if;
|
end if;
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.