Commit 1d0d3d91 authored by Tristan Gingold's avatar Tristan Gingold

vme_bus: avoid possible wrap-around.

parent 3ed18b06
......@@ -78,7 +78,7 @@
if for whatever reason you stay longer in DECODE_ACCESS waiting for
decode_done_i='1' you might end up going to WAIT_FOR_DS when your counter is
already 0, then after your decrement your counter rolls over
OK.
Done.
--------------------------
-- VME_CR_CSR_Space.vhd --
......
......@@ -452,7 +452,9 @@ begin
-- VITAL-1 Table 4-1
-- For interrupts ack, the handler MUST NOT drive WRITE* low
s_WRITElatched_n <= VME_WRITE_n_i;
s_DS_latch_count <= s_DS_latch_count - 1;
if s_DS_latch_count /= 0 then
s_DS_latch_count <= s_DS_latch_count - 1;
end if;
s_mainFSMstate <= LATCH_DS;
else
s_mainFSMstate <= WAIT_FOR_DS;
......
Markdown is supported
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