Commit ef5dcbc7 authored by Michael Munch's avatar Michael Munch
Browse files

Only handle BERR when not in BERR_HIGH_WAIT

parent 959d3636
Pipeline #25958 failed with stage
in 13 seconds
...@@ -257,6 +257,7 @@ architecture rtl of vme_data_bus is ...@@ -257,6 +257,7 @@ architecture rtl of vme_data_bus is
signal timeout_cnt : integer range 0 to 255 := TIMEOUT_CNT_MAX; signal timeout_cnt : integer range 0 to 255 := TIMEOUT_CNT_MAX;
signal last_ds : std_logic_vector(1 downto 0); signal last_ds : std_logic_vector(1 downto 0);
signal last_berr : std_logic;
begin begin
...@@ -664,6 +665,7 @@ begin ...@@ -664,6 +665,7 @@ begin
busy <= '0'; busy <= '0';
when BERR_HIGH_WAIT => when BERR_HIGH_WAIT =>
--if (last_berr_n = '1' and vme_berr_n_i = '1') then
if (vme_berr_n_i = '1') then if (vme_berr_n_i = '1') then
state <= IDLE; state <= IDLE;
end if; end if;
...@@ -687,6 +689,7 @@ begin ...@@ -687,6 +689,7 @@ begin
-- Data present (error) -- Data present (error)
int_data_strobe <= c_DATA_PRESENT; int_data_strobe <= c_DATA_PRESENT;
int_go_consumed_strobe <= '1';
int_err_code <= ( int_err_code <= (
c_ERR_BERR_I => not vme_berr_n_i, c_ERR_BERR_I => not vme_berr_n_i,
c_ERR_TIMEOUT_I => '1', c_ERR_TIMEOUT_I => '1',
...@@ -731,15 +734,16 @@ begin ...@@ -731,15 +734,16 @@ begin
-- drives the data strobe(s) low in response to data transfer -- drives the data strobe(s) low in response to data transfer
-- acknowledgments from the Slave -- acknowledgments from the Slave
last_ds <= vme_ds_n_i;
if (last_ds /= vme_ds_n_i or -- if (last_ds_n /= vme_ds_n_i or --
state = IDLE or state = IDLE or
state = IDLE_DELAY or state = IDLE_DELAY or
state = TIMEOUT or state = TIMEOUT or
state = TIMEOUT_WAIT) then state = TIMEOUT_WAIT) then
-- Things are good, or we have fired (no need to fire again). -- Things are good, or we have fired (no need to fire again).
timeout_cnt <= TIMEOUT_CNT_MAX; timeout_cnt <= TIMEOUT_CNT_MAX;
elsif (vme_berr_n_i & int_timeout_n /= "11") then elsif ((state /= BERR_HIGH_WAIT and vme_berr_n_i = '0') or
int_timeout_n = '0')
state <= TIMEOUT; state <= TIMEOUT;
elsif (timeout_cnt = 0) then elsif (timeout_cnt = 0) then
-- We have been operating for too long, timeout. -- We have been operating for too long, timeout.
...@@ -747,7 +751,10 @@ begin ...@@ -747,7 +751,10 @@ begin
else else
timeout_cnt <= timeout_cnt - 1; timeout_cnt <= timeout_cnt - 1;
end if; end if;
last_ds_n <= vme_ds_n_i;
last_berr_n <= vme_berr_n_i
end if; end if;
end process; end process;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment