It all depends on the project and its requirements, of course. Both are interdependent.
So yeah, what should come first are the requirements, not the solutions.
Now, a related question can be: what takes the most design time in a given project, hardware or software? This would again depend on the project of course, but unless you are dealing with particularly tricky hardware, and/or required to work reliably in harsh environments, etc, then most often *software* is going to be the time eater, while many people find themselves convinced of the opposite when starting a project. Software is so easy with few constraints, right? Yeah.