Are risc-v instructions such as sb and sh allowed to access the cache? Or does it communicate directly with the main memory? I have seen the Wstrb event in main memory structures, but generally not in caches. Does this depend on whether the person is programming with Verilog? I don't ask because sw will already be 32 bit, but sb and sh confuse me.
I will program cache based on the answer given.
Cache should see informations about the operation such as address, store/load, width of the operation and store data. Caches make this strobe operation inside, by looking at the offset of the address and the width of the operation.