I am trying to get a design to simulate but I consistently receive this error in ISim:
ERROR: In process nearfield_processing.vhd:distance_to_delay
FATAL ERROR:ISim: This application has discovered an exceptional condition from which it cannot recover. Process will terminate. To search for possible resolutions to this issue, refer to the Xilinx answer database by going to http://www.xilinx.com/support/answers/index.htm and search with keywords 'ISim' and 'FATAL ERROR'. For technical support on this issue, please open a WebCase with this project attached at http://www.xilinx.com/support.
INFO: Simulator is stopped.
I have no idea what the problem is here, but below is the method in which the error occurs.
distance_to_delay : process (i_clock)
begin
if(i_reset = '1') then
delay_1 <= 0;
delay_2 <= 0;
delay_3 <= 0;
delay_4 <= 0;
ds_squared <= 0;
ds_squareroot <= 0;
elsif(rising_edge(i_clock)) then
-- Delay 1 calculations
ds_squared <= (distance*distance + (speaker_distance)*(speaker_distance));
for n in 0 to 20 loop
ds_squareroot <= ((50 + ds_squared/ds_squareroot)/2);
end loop;
delay_1 <= (ds_squareroot - distance)/ speed_sound;
-- Delay 2 calculations
ds_squared <= (distance*distance + (speaker_distance*2)*(speaker_distance*2));
for n in 0 to 20 loop
ds_squareroot <= ((50 + ds_squared/ds_squareroot)/2);
end loop;
delay_2 <= (ds_squareroot - distance)/ speed_sound;
-- Delay 3 calculations
ds_squared <= (distance*distance + (speaker_distance*3)*(speaker_distance*3));
for n in 0 to 20 loop
ds_squareroot <= ((50 + ds_squared/ds_squareroot)/2);
end loop;
delay_3 <= (ds_squareroot - distance)/ speed_sound;
-- Delay 4 calculations
ds_squared <= (distance*distance + (speaker_distance*4)*(speaker_distance*4));
for n in 0 to 20 loop
ds_squareroot <= ((50 + ds_squared/ds_squareroot)/2);
end loop;
delay_4 <= (ds_squareroot - distance)/ speed_sound;
end if;
--********** Manually Set Delays ****************--
-- delay_1 <= (22+2); --42
-- delay_2 <= (44+2); --72
-- delay_3 <= (66+2); --91
-- delay_4 <= (88+2); --97
-- sample_period <= 22;
--********** End Manually Set Delays ************--
end process;
Additionally, here is the link to the full design files https://github.com/srohrer32/beamformer/tree/delay_calc/hdl. I have a feeling it has something to do with the for loop that I am using to try and approximate a square root function, but I'm not sure. Any help is appreciated.