This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Write Hit in Shared State is there any way where i could do the write operation without wait in for invalidation ACK in ACE

Hello, In AMBA ACE for a write miss we could us the ReadUnique Transaction, it says the transaction will snoop and get the data and invalidate the copies, the ACK from the Invalidated snoop masters/slave is required for the completer to do give the response, So on a hit in a shared state cache line still required to invalidate the copies and wait for the ACK to complete the Write right.consider my interconnect is slow take about 100 cycles for snoop req and resp, there any way where i could save those cycles..?

  • Hi ,

    If your CPU supports it, you could try to prefetch the data for store in advance.

    The A64 instruction is PRFM PSTxxx.

    This is available from the C language as __builtin_prefetch(p, 1/*for write*/) with gcc for example.

    Here is an example C function with disassembly on godbolt.

    Best regards,

    Vincent.

  • I appreciate the replay Vincent,

    The recommendation that you made will definitely reduce the no of cycle for the store operation.

    However, I am worried about is there any way where i could do the store operation in shared state without waiting for the ACK - is it possible.(Currently i am using ReadUnique transaction in shared Hit even if i use CleanUnique there is no difference right i have to wait for the ACK for the Invalidation - if i can do something in that, that may reflect my IPC)

    Regards,

    Firoz

  • I don't see how you could transition the cache line state without a transaction, but is the MakeUnique transaction closer to what you describe, maybe? It would allow the SC -> UD transition. Also, the snoop filter will play a role in the performances here.

  • Actually what i am saying that transaction is there
    consider a scenario in multicore where i have a cache line with Shared State now a write request from the CPU came and it is a HIT, so what i have to do is invalidate the other copies right? for that i am giving a transation request with ReadUnique/CleanUnique to the Interconnect. Invalidation ACK will be recived after other copies get invalidated , then only i could give response to the Write Request.
    What i am asking is that in a Write Hit Condition after senting the Invalidation REQ is there any way i could give response to the Write Hit Request without waiting for the Invalidation ACK Response
  • I think you do not need a ReadUnique transaction here as you already have the data locally; no need to re-obtain it. Therefore CleanUnique/MakeUnique make more sense here.

    One way to avoid waiting for the ACK would be to decouple the "local" write from the coherency with a write buffer, for example. This might necessitates additional synchronization mechanisms (barriers) as well.

  • Thank You Vincent.

    I believe the suggestion you made will benefit me.