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

single-copy atomicity question for AHB5

Hi all~

I have some questions about AHB5 specification

1.If CPU(or another slave) is in 32-bit single-copy atomic group, can I only write/read a byte to it ? (HWDATA/HRDATA is 32bit-width, HBUST=SINGLE, HSIZE='b000)

2.What is the description "Byte strobes associated with a transfer do not affect the single-copy atomicity size" in AHB5 specification capter 9.1 mean ?

Thanks a lot.

  • 1.If CPU(or another slave) is in 32-bit single-copy atomic group, can I only write/read a byte to it ? (HWDATA/HRDATA is 32bit-width, HBUST=SINGLE, HSIZE='b000)

    Not exactly.  Single copy atomic means that for a certain granularity you cannot see a partial update or change to that region.  For example with a 32 bit single copy atomicity, a 32 bit write would not be seen as a partial update.  If you were to perform a simultaneous read access to this location, you would either observe the location before the entire write occurred, or after it occurred.  You wouldn't see just 16 bits updated, and then sometime later, the other 16 bits updated.

    This doesn't mean you must write everything in 32 bit quantities, it just means that a partial update of a 32 bit block won't occur if an aligned 32 bit write is made.

    As another example, if the write access was 64 bit with a 32 bit single copy atomicity, then you could theoretically see a partial update, where one or other of the 32 bit regions had been updated, and other hadn't yet.  This would obey the 32 bit single copy atomicity.  If all 64 bits needed to be updated simultaneously, then you would need a 64 bit single copy atomicity.

    2.What is the description "Byte strobes associated with a transfer do not affect the single-copy atomicity size" in AHB5 specification capter 9.1 mean ?

    In other protocols (like AXI), the write data can be partially masked using byte strobes.  This sentence is saying that a 32 bit access with write strobes set would not affect the single copy atomicity. 

    So for example, if you had masked the write data such that only the first and last byte of a 32 bit access were to be written, these would still behave as a single 32 bit write, and have the same atomicity guarantees.  In other words, it wouldn't behave like 2 individual byte writes that would no longer be atomic.

  • Thanks for your clear description.