-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for word-addressed registers #24
Comments
Actually addresses are always treated as byte addresses by convention since this is the smallest common denominator amongst the variety of systems. This also applies to the registration of resources at the sockets. So your workaround is not a workaround it is the correct implementation. |
I don't see byte-addressing as the one-and-only convention because both ways are used in applications and so both are equally valid. Feel free to pick a datasheet of an arbitrary IC with a digital interface and take a look at the address map. |
Thank you @staskau for that commit! |
fixed the std::max compile isse with 9b587f3 |
Currently, only byte-addressed resources can be used with
scc::tlm_target
. The underlying typeutil::range_lut
throws astd::runtime_error("range already mapped")
if word-addressed entries are added.Use case: Integrated circuits (discrete components) typically communicate over serial interfaces (I2C, SPI, ...) and use word addressing for the registers. To model this properly with TLM, SCC should support this.
The issue can be reproduced with the following register container class.
Note: Multiplying the real addresses by the byte-size of the registers is a work-around but not a decent solution.
The text was updated successfully, but these errors were encountered: