When simulating the MIG v2.0 Virtex-5 DDR2 SDRAM design using ModelSim, the following problems might be encountered:
if (cal2_detect_edge = '1') then
cal2_curr_sel <= '1';
-- next_count_dqs <= count_dqs + 1; -- Prevent "extra" incrementation of NEXT_COUNT_DQS
cal2_state <= CAL2_DONE;
-- set all DQS groups to be the same for simulation
if (SIM_ONLY /= 0) then
cal2_rd_data_sel <= (others => '1');
else
cal2_rd_data_sel(TO_INTEGER(count_dqs)) <= '1';
end if;
if ((count_dqs = TO_UNSIGNED(DQS_WIDTH-1,DQS_BITS_FIX)) or
(SIM_ONLY /= 0)) then
calib_done_tmp(1) <= '1';
else
next_count_dqs <= count_dqs + 1; -- Prevent "extra" incrementation of NEXT_COUNT_DQS
end if;
if (cal2_detect_edge = '1') then
cal2_curr_sel <= '0';
-- next_count_dqs <= count_dqs + 1; -- Prevent "extra" incrementation of NEXT_COUNT_DQS
cal2_state <= CAL2_DONE;
-- set all DQS groups to be the same for simulation
if (SIM_ONLY /= 0) then
cal2_rd_data_sel <= (others => '0');
else
cal2_rd_data_sel(TO_INTEGER(count_dqs)) <= '0';
end if;
if ((count_dqs = TO_UNSIGNED(DQS_WIDTH-1,DQS_BITS_FIX)) or
(SIM_ONLY /= 0)) then
calib_done_tmp(1) <= '1';
else
next_count_dqs <= count_dqs + 1; -- Prevent "extra" incrementation of NEXT_COUNT_DQS
end if;
cal2_idel_dec_cnt <= ('0' & cal2_idel_tap_limit(5 downto 1));
cal2_state <= CAL2_DEC_IDEL;
-- next_count_dqs <= count_dqs + 1; -- Prevent "extra" incrementation of NEXT_COUNT_DQS
if ((count_dqs = TO_UNSIGNED(DQS_WIDTH-1,DQS_BITS_FIX)) or
(SIM_ONLY /= 0)) then
calib_done_tmp(1) <= '1';
else
next_count_dqs <= count_dqs + 1; -- Prevent "extra" incrementation of NEXT_COUNT_DQS
end if;
ecc_dm_error_r <= ( (~wdf_mask_r1[35] && (|wdf_mask_r1[34:27])) || (~wdf_mask_r1[26] && (|wdf_mask_r1[25:18])) || (~wdf_mask_r1[17] && (|wdf_mask_r1[16:9])) || (~wdf_mask_r1[8] && (|wdf_mask_r1[7:0]))) && phy_init_data_sel;
wdf_mask_r <= (and_br(wdf_mask_data(34 downto 27)) & wdf_mask_data(34 downto 27) & and_br(wdf_mask_data(25 downto 18) & wdf_mask_data(25 downto 18) & and_br(wdf_mask_data(16 downto 9)) & wdf_mask_data(16 downto 9) & and_br(wdf_mask_data(7 downto 0)) & wdf_mask_data(7 downto 0));
ecc_dm_error_r <= ((not(wdf_mask_r1(35)) and (or_br(wdf_mask_r1(34 downto 27)))) or (not(wdf_mask_r1(26)) and (or_br(wdf_mask_r1(25 downto 18)))) or (not(wdf_mask_r1(17)) and (or_br(wdf_mask_r1(16 downto 9)))) or (not(wdf_mask_r1(8)) and (or_br(wdf_mask_r1(7 downto 0))))) and phy_init_data_sel;