Unifying Approach to Software and Hardware Design for Scientific Calculations