Boolean Matching for LUT-Based Logic Blocks With Applications to Architecture Evaluation and Technology Mapping