-
Notifications
You must be signed in to change notification settings - Fork 457
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
Refactor sysfs usage in HAL #104
Comments
I agree, this looks like some dangerous implicit assumptions about sysfs. Absolutely should be factored into one access point of some sort. |
I'll clean it up. |
Max I’m working on it.
This is why we need the ability to assign issues. Right now you need Write permission to do this.
…Sent from my iPhone
On Jul 18, 2018, at 5:25 PM, Max Zhen <notifications@github.com<mailto:notifications@github.com>> wrote:
EXTERNAL EMAIL
I'll clean it up.
What is the danger you're seeing here other than duplicate code?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#104 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/Ae94RJDhGUCdbgdNBk0Qc_MY-MKYPb3eks5uH9H2gaJpZM4VVgl_>.
|
Oops, I just removed myself from the assignee. Maybe all of us, in this team, should have write permission? |
Please use C++ templatized methods to modularize this code. The same templatized function should be used to read data types of different types and will be type safe. |
* Experiment with templates to open sysfs/.../ip_layout and / mem_topology. This is complicated and currently doesn't compile. * The function for getting xclbinid works. * Refs Xilinx#104
post 2018.2_XDF |
Implemented in PR#399. |
Lots of code duplication exists in HAL for accessing sysfs. As such, we have many instances of slight variations of the same functions. This can cause issues in the future. It would be best to have a sysfs access class or something like that.
Examples:
flasher.cpp L166,175
memaccess.h L62
debug.cpp L137
hwmon.h L38
scan.h L24
shim.cpp L637,749,1362,1366,1388
xbsak.h L197,318,537
xbsak_debug.cpp L42,236
appdebug.cpp L1029
The text was updated successfully, but these errors were encountered: