Automated Implementation and Optimization of ASIPs