AXI5 Data-less Write Transactions and Their Protocol Requirements

The AXI5 protocol, as defined in the ARM IHI 0022 Issue K specification, introduces the concept of data-less write transactions. These transactions are unique in that they do not involve the transfer of data on the WDATA channel, yet they still require a formalized sequence of events to ensure proper communication between the manager (initiator) and the subordinate (target). The primary purpose of data-less writes is to support operations such as Cache Maintenance Operations (CMOs), which do not require data transfer but still need to be acknowledged by the subordinate.

In a typical AXI5 write transaction, the sequence involves three main channels: the Address Write (AW) channel, the Write Data (W) channel, and the Write Response (B) channel. For a standard write operation, the manager sends the address and control information on the AW channel, followed by the data on the W channel, and finally receives a response on the B channel. However, in the case of data-less writes, the W channel is bypassed entirely, which raises questions about how the protocol ensures proper synchronization and acknowledgment.

The confusion often arises from the interpretation of the AXI5 specification, particularly around whether the W channel must still be serviced even in the absence of data. The specification states that the subordinate must wait for WLAST to be asserted before asserting BVALID, which implies that the W channel must be acknowledged even if no data is transferred. However, this interpretation is incorrect for data-less writes. Instead, the protocol allows for a direct transition from the AW channel to the B channel, provided that the AWSNOOP signal is correctly configured to indicate a data-less transaction.

AWSNOOP Encoding and Its Role in Data-less Writes

The key to understanding data-less write transactions lies in the AWSNOOP signal, which is part of the AW channel. The AWSNOOP signal is used to encode the type of transaction being initiated, and it plays a critical role in determining whether a transaction is data-less. Specifically, certain values of AWSNOOP indicate that the transaction does not require data transfer on the W channel. For example, an AWSNOOP value of 0b00110 corresponds to a Cache Maintenance Operation (CMO), which is a common type of data-less write.

When the manager initiates a data-less write, it sets the AWSNOOP signal to the appropriate value to indicate that no data will be transferred. The subordinate, upon decoding the AWSNOOP signal, recognizes that the transaction is data-less and proceeds directly to the B channel without waiting for any activity on the W channel. This allows the transaction to complete more efficiently, as the W channel is entirely bypassed.

However, this mechanism also introduces potential pitfalls, particularly in implementations where the subordinate may not correctly interpret the AWSNOOP signal. If the subordinate fails to recognize a data-less write, it may incorrectly wait for WLAST to be asserted, leading to a deadlock or protocol violation. Therefore, it is crucial for both the manager and the subordinate to correctly implement and interpret the AWSNOOP signal.

Implementing Data-less Writes in SystemVerilog and Ensuring Protocol Compliance

When implementing data-less write transactions in SystemVerilog, particularly for verification purposes, it is essential to ensure that the sequence of events adheres to the AXI5 specification. This involves correctly setting the AWSNOOP signal, bypassing the W channel, and ensuring that the B channel is properly asserted. Below, we outline the steps required to implement and verify data-less write transactions in SystemVerilog.

First, the manager must initiate the transaction by setting the AWSNOOP signal to the appropriate value for a data-less write. For example, if the transaction is a Cache Maintenance Operation, the AWSNOOP signal should be set to 0b00110. The manager must also ensure that the AWVALID signal is asserted, along with the necessary address and control information.

Next, the subordinate must decode the AWSNOOP signal and recognize that the transaction is data-less. Upon recognizing the data-less write, the subordinate should proceed directly to the B channel without waiting for any activity on the W channel. The subordinate must then assert the BVALID signal and provide the appropriate response on the BRESP signal.

In SystemVerilog, this sequence can be captured using assertions and coverage points to ensure that the protocol is being followed correctly. For example, an assertion can be written to check that the AWSNOOP signal is set to the correct value for a data-less write, and that no activity occurs on the W channel. Similarly, a coverage point can be used to track the occurrence of data-less writes and ensure that they are being handled correctly.

To further illustrate the implementation, consider the following SystemVerilog code snippet:

// Assertion to check that a data-less write is correctly handled
property data_less_write;
  @(posedge clk) disable iff (!resetn)
  (AWVALID && (AWSNOOP == 6'b00110)) |-> ##[1:$] (!WVALID && BVALID);
endproperty

assert property (data_less_write)
  else $error("Data-less write protocol violation");

// Coverage point to track data-less writes
covergroup data_less_write_cg @(posedge clk);
  coverpoint AWSNOOP {
    bins data_less = {6'b00110};
  }
  coverpoint BVALID {
    bins response_received = {1'b1};
  }
endgroup

In this code, the assertion checks that when a data-less write is initiated (indicated by AWVALID and the correct AWSNOOP value), no activity occurs on the W channel, and the BVALID signal is eventually asserted. The coverage point tracks the occurrence of data-less writes and ensures that the BVALID signal is asserted in response.

By following these steps and implementing the necessary checks in SystemVerilog, designers and verification engineers can ensure that data-less write transactions are handled correctly and in compliance with the AXI5 specification. This not only prevents protocol violations but also ensures efficient and reliable communication between the manager and subordinate in AXI5-based systems.

Conclusion

Data-less write transactions in AXI5 are a powerful feature that allows for efficient communication in scenarios where data transfer is not required. However, their correct implementation requires a deep understanding of the protocol, particularly the role of the AWSNOOP signal and the sequence of events that must occur on the AW, W, and B channels. By carefully following the AXI5 specification and implementing robust verification checks in SystemVerilog, designers can ensure that data-less writes are handled correctly, avoiding potential pitfalls and ensuring reliable system operation.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *