--{-----------------------------------------------------------------------------}
--{ Process
--{ Describe : Main CF control process
--{-----------------------------------------------------------------------------}
process (iCLK, iRST)
begin
if (iRST = '1') then
wCF_STATE <= CF_IDLE;
wDLL_START <= '0';
elsif (iCLK'event) and (iCLK = '1') then
case wCF_STATE is
when CF_IDLE =>
if (wATREG_RD = '1') or (wATREG_WR = '1') or (wIO_RD = '1') or (wIO_WR = '1') or (wIOCON_RD = '1') or (wIOCON_WR = '1') then
wCF_STATE <= ADR_SETUP;
else
wCF_STATE <= CF_IDLE;
end if;
when ADR_SETUP =>
if (pDLL_COMP = '1') then
wDLL_START <= '0';
wCF_STATE <= CMD_SETUP;
else
wDLL_START <= '1';
wCF_STATE <= ADR_SETUP;
end if;
when CMD_SETUP =>
if (pDLL_COMP = '1') then
wDLL_START <= '0';
wCF_STATE <= CHK_WAIT;
else
wDLL_START <= '1';
wCF_STATE <= CMD_SETUP;
end if;
when CHK_WAIT =>
if (iWAIT_L = '1') then
wCF_STATE <= RD_DATA;
else
wCF_STATE <= CHK_WAIT;
end if;
when RD_DATA =>
wCF_STATE <= ADR_HOLD;
when ADR_HOLD =>
if (pDLL_COMP = '1') then
wDLL_START <= '0';
wCF_STATE <= SEND_ACK;
else
wDLL_START <= '1';
wCF_STATE <= ADR_HOLD;
end if;
when SEND_ACK =>
wCF_STATE <= NEGATE_ALL;
when NEGATE_ALL =>
wCF_STATE <= CF_IDLE;
end case;
end if;
end process;
--{-----------------------------------------------------------------------------}
--{ Process
--{ Describe : Attribute memory access delay time control process
--{-----------------------------------------------------------------------------}
process (iCLK, iRST)
begin
if (iRST = '1') then
wDLL_VAL1 <= 60;
elsif (iCLK'event) and (iCLK = '1') then
if (wATREG_RD = '1') or (wATREG_WR = '1') then
case wCF_STATE is
when CF_IDLE =>
wDLL_VAL1 <= 60;
when ADR_SETUP =>
if (wATREG_RD = '1') then
wDLL_VAL1 <= kADR_ACC;
else -- (ATREG_WR = '1')
wDLL_VAL1 <= kADR_SET;
end if;
when CMD_SETUP =>
if (wATREG_RD = '1') then
wDLL_VAL1 <= kOE_ACC;
else -- (ATREG_WR = '1')
wDLL_VAL1 <= kWR_ACC;
end if;
when CHK_WAIT =>
when RD_DATA =>
when ADR_HOLD =>
if (wATREG_RD = '1') then
wDLL_VAL1 <= kRD_DIS;
else -- (ATREG_WR = '1')
wDLL_VAL1 <= kDAT_HD;
end if;
when SEND_ACK =>
when NEGATE_ALL =>
end case;
else
wDLL_VAL1 <= 0;
end if;
end if;
end process;
--{-----------------------------------------------------------------------------}
--{ Process
--{ Describe : wREG_L control process
--{-----------------------------------------------------------------------------}
process (iCLK, iRST)
begin
if (iRST = '1') then
wREG_L <= '1';
elsif (iCLK'event) and (iCLK = '1') then
if (wATREG_RD = '1') or (wATREG_WR = '1') then
case wCF_STATE is
when CF_IDLE =>
wREG_L <= '1';
when ADR_SETUP =>
wREG_L <= '0';
when NEGATE_ALL =>
wREG_L <= '1';
when others =>
wREG_L <= wREG_L;
end case;
else
wREG_L <= '1';
end if;
end if;
end process;