wr_rdy<='1';-- wr side uses latency of 0, so wr_rdy<='1' acknowledges a successful write request.
wr_ready<='1';-- wr side uses latency of 0, so wr_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;
...
...
@@ -189,18 +206,18 @@ BEGIN
IFUNSIGNED(reg_addresses_rem)=0THEN-- end address reached
nxt_dvr_done<='1';
nxt_state<=s_idle;
ELSIFctlr_rdy='1'THEN
ELSIFctlr_waitrequest_n='1'THEN
IFwr_val='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_rdy<='1';
i_ctlr_burst_size<=TO_UVEC(1,g_tech_ddr.maxburstsize_w);-- Set ctlr_burst_size to 1 by default
wr_ready<='1';
i_ctlr_burst_size<=TO_DDR_CTLR_BURSTSIZE(1);-- Set ctlr_burst_size 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_UVEC(wr_burst_size-1,g_tech_ddr.maxburstsize_w);-- Forward the required nof burst cycles (-1 as we've done the 1st in this state already) to burst state
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