Device and method for refactoring hardware code | AMiner