wr_ready<='1';-- wr side uses latency of 0, so wr_ready<='1' acknowledges a successful write request.
wr_snk_out.ready<='1';-- wr side uses latency of 0, so wr_snk_out.ready<='1' acknowledges a successful write request.
IFUNSIGNED(req_burst_cycles)=1THEN-- Then we're in the last cycle of this burst sequence
nxt_state<=s_wr_request;-- We can only initiate a burst through the wr_request state
ENDIF;
...
...
@@ -206,21 +195,21 @@ BEGIN
IFUNSIGNED(reg_addresses_rem)=0THEN-- end address reached
nxt_dvr_done<='1';
nxt_state<=s_idle;
ELSIFctlr_waitrequest_n='1'THEN
IFwr_val='1'THEN
ELSIFctlr_miso.waitrequest_n='1'THEN
IFwr_snk_in.valid='1'THEN
-- Always perform 1st write here
ctlr_burst<='1';-- assert burst begin: strictly this is a burst of 1.
ctlr_wr_req<='1';
wr_ready<='1';
i_ctlr_burst_size<=TO_DDR_CTLR_BURSTSIZE(1);-- Set ctlr_burst_size to 1 by default
wr_snk_out.ready<='1';
ctlr_mosi.wr<='1';
ctlr_mosi.burstbegin<='1';-- assert burst begin: strictly this is a burst of 1.
ctlr_mosi_burstsize<=TO_DDR_CTLR_BURSTSIZE(1);-- Set ctlr_mosi_burstsize to 1 by default
IFwr_burst_size>1THEN
-- Perform any remaining writes in a burst
nxt_state<=s_wr_burst;
nxt_req_burst_cycles<=TO_DDR_CTLR_BURSTSIZE(wr_burst_size-1);-- Forward the required nof burst cycles (-1 as we've done the 1st in this state already) to burst state