Hi,
In AMBA® 3 AHB-Lite Protocol, there is a description about the HSIZE signal:
"The transfer size set by HSIZE must be less than or equal to the width of the data bus.For example, with a 32-bit data bus, HSIZE must only use the values b000, b001, orb010. "
If our design is 23-bit bus, HSIZE could be set to 8/16/32-bit.
My question is: In what situation does the compiler decide use 8-bit or 16-bit?
how about a byte(8bit)/halfword(16bit) read/write to memory/peripheral-register?
Not very sure about your question. If the application needs to access a byte or half-word from the memory, then the compiler can generate instruction which can be issued out byte or half-word access. I think the compiler will do this relating to your code style of application too.