Behavioral Emulation for Scalable Design-Space Exploration of Algorithms and Architectures