Analytical cost estimation for embedded systems