wb2axip icon indicating copy to clipboard operation
wb2axip copied to clipboard

Is the OPT_NONESEL option currently the same as the multiple slaves?

Open aylons opened this issue 3 years ago • 1 comments

Hi, first, thank you for all the content and code you publish, I've been following for a while. Right now I'm studying your crossbar code and realized that the request array has the same implementation for OPT_NONESEL and for !(OPT_NONESEL) & !(NS == 1).

I'm guessing a "nonesel slave" is missing as indicated by the comment, but is the code supposed to be duplicated this way or some difference in the actual request decoding is to be implemented?

https://github.com/ZipCPU/wb2axip/blob/c36b2a8db311a05eec7a47fe5a3df5f86d960886/rtl/addrdecode.v#L124-L161

aylons avatar Mar 19 '22 21:03 aylons

The nothing is selected slave decoding is handled in the next block down. The logic you are pointing out is the decoding logic for everything else. What makes address 0 special in this logic is that it's used as a catch all address. If nothing else is selected, and slave zero would work (mask == 0), then slave zero becomes the default instead of the extra "nothing is selected" error generating slave.

Yes, the two blocks you point out could be merged. Thanks for pointing that out. No, they don't do the same thing, but the difference is captured by parameter settings in if (!OPT_NONESEL && NS > 1 ..., so the logic looks the same as you've pointed out. Feel free to submit a patch if you would like, or I might do it myself ...

ZipCPU avatar Mar 20 '22 02:03 ZipCPU