Design patterns for hardware datapath library design