hardware abstraction layer design