CPHUN
New Contributor
5 years agoLogic for WVALID and AWVALID in AXI Master
For this AXI master coding, how do I guarantee AW* payloads are sent first, followed by W* payloads without violating AXI protocol (a master must not wait for AWREADY to be asserted before driving WVALID) ?
always @(posedge clk)
begin
if(reset)
begin
o_axi_wvalid <= 0;
end
else if(!(o_axi_wvalid && !i_axi_wready))
begin
// Note that both o_axi_awsize , o_axi_awlen are of hardware constants, so no multiply hardware
// since this is for testing, WDATA just uses some values up to the total size of the write address space
// see [url]https://i.imgur.com/LBO9pQz.png[/url] in which AW* payloads are sent first, followed by W* payloads
// Note: a master must not wait for AWREADY to be asserted before driving WVALID
o_axi_wvalid <= (o_axi_wlast) ? 0 :
(o_axi_wdata < (o_axi_awsize*o_axi_awlen)) && o_axi_awvalid;
end
end