hw: re-organize file structure

fix #1197