-
Notifications
You must be signed in to change notification settings - Fork 0
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
Const Generics and Async features for Peripherals #186
Comments
This is definitely something that merits further discussion; some initial thoughts: Async PeripheralsSurface level this looks a little like #185 but I am not sure: the intent of #185 (and #184) is to support host platforms where implementations of the peripheral traits (and the RPC traits) will require However it sounds like what you're describing is actually a change in the semantics of the LC-3 userspace APIs?
I totally understand the appeal of exposing non-blocking interfaces to the LC-3 userspace but I think it's worth pointing out that we have an existing interface for this: interrupts. Given that I don't think there's a way to retrofit a non-blocking I/O model onto the existing mem-mapped interfaces while retaining the benefits of being non-blocking (there's not really much work we can do (other than replying to rpc messages, perhaps?) when an memory mapped access comes back as "not ready", we just have to wait for the access to finish before we can have the interpreter continue) I think interrupts are our best bet for exposing interfaces where we expect blocking I/O to be too slow to be practical. I am unsure if this is what you had in mind but to me an interesting angle is leveraging @pranav12321 perhaps you can clarify what you had in mind? Const Generics
Stable const generics can definitely help us make cleaner abstractions for several components in our stack and we've already started to use them in places (i.e. our However, I'm not sure they're a good fit for modeling the number of pins on peripherals (like GPIO, ADC, Timers, and PWM). I think we actually want pin counts to be static and not something device implementators can tune for a few reasons:
@pranav12321 what do you see as being the upside to using const generics for pins? |
what
To use future based model for Peripherals and have non blocking implementation on reading peripherals. Particularly useful for DMA based peripheral accesses, cached accesses and devices where access time is too long.
Also implement support for const generics for Number of pins.
steps
[[ What steps will we need to take to implement this feature? ]]
where
branch:
feat-
[[
This should be:
feat-<feature-name>
if this is being worked on in this repoorg/repo#<branch-name>
if this is being worked on in another repo]]
open questions
[[
Unknowns and questions about the design/implementation of this feature.
This is kind of a catch all for anything that doesn't fit in the above categories.
]]
The text was updated successfully, but these errors were encountered: