Automatic Generation of Hardware Abstractions from Register-Transfer Level (RTL) Designs