WHENs_wr_burst=>-- Performs the rest of burst when burst_size > 1
IFctlr_miso.waitrequest_n='1'THEN
IFwr_snk_in.valid='1'THEN-- it is allowed that valid is not always active during a burst
IFwr_snk_in.valid='1'THEN-- it is allowed that valid is not always active during a burst
ctlr_mosi.wr<='1';
IFctlr_miso.waitrequest_n='1'THEN
wr_snk_out.ready<='1';-- wr side uses latency of 0, so wr_snk_out.ready<='1' acknowledges a successful write request.
ctlr_mosi.wr<='1';
nxt_burst_wr_cnt<=burst_wr_cnt-1;
IFburst_wr_cnt=1THEN-- check for the last cycle of this burst sequence
nxt_state<=s_wr_request;-- initiate a new wr burst or goto idle via the wr_request state, simulation shows going directly idle by checking address_cnt_is_0 here does not save a cycle
IFrd_src_in.ready='1'THEN-- the external FIFO uses almost full level assert its snk_out.ready and can then still accept the maximum rd burst of words
ctlr_mosi.rd<='1';
ctlr_mosi.burstbegin<='1';-- assert burstbegin,
ELSIFrd_src_in.ready='1'THEN-- the external FIFO uses almost full level assert its snk_out.ready and can then still accept the maximum rd burst of words