lnls-dig / uhal

HAL for LNLS's μTCA platform
https://lnls-dig.github.io/uhal/
GNU General Public License v3.0
0 stars 1 forks source link

Create Controllers based on Decoder information #41

Closed ericonr closed 8 months ago

ericonr commented 9 months ago

Ok, I'm comfortable with merging this version. Will probably do it next week so it can have some more time to stew.

ericonr commented 9 months ago

@henriquesimoes one thing I wish I knew how to implement would be avoiding costly operations for checking things every time a mask is passed to extract_value and get_bit, given that they receive constant arguments which could somehow be evaluated during compilation. But adding constexpr isn't an option if the template receives non-constant arguments anywhere.

So I'm feeling like I shouldn't skimp on these verifications, but I would like to be able to optimize them, which improves developer experience (get compile time warnings/errors) and avoids technically unnecessary run-time checks.