What should hardware do and What should software do

embeddedhardwaremicrocontrollersoftware

I am studying embedded system which typically includes MCU and so on. I use the thinking method of using 8051 that using peripheral unit must be done in software. But I learned that some MCUs like S3C2440 have special interface that can map SDRAM into internal RAM address, which is done by using any software.

So What should hardware do and What should software do? How do we know it?

Best Answer

Simply put, you use whatever tools and talents you have available to get the job done, in the time required, and within budget. In the end, that is all that matters.

While some tasks naturally lend themselves to a hardware or a software solution, there are a lot of tasks which it does not matter. For example, I could use a 555 timer to blink an LED, or I could use a US$0.30 MCU. There are pros and cons for either, but in the end it really doesn't matter so long as you get the job done. I have seen blinking LEDs done with either approach in commercial products.

I cannot give you a list of things that should be done in software, or a list for hardware. That list would be long, boring, and mostly meaningless. Technology progresses. 20 years ago I would have never thought of using an MCU just to blink an LED. The tasks that are appropriate for hardware/software is always changing. If I gave you a list now, it would be out of date tomorrow.

To make matters worse, the line between hardware and software is blurring. FPGAs come to mind, which are programmed in a way similar to writing software, but the end result is hardware. And even FPGAs frequently have logic inside of them that resembles some form of CPU. But even GPUs and some CPUs have FPGA-like features that may or may not remain hidden from the software programmer.

Knowledge and experience will have to guide you in knowing what is appropriate for hardware and software. Your first step is to know the problem that you are trying to solve and how to solve it. The second step is knowing different ways to solve it-- CPUs, FPGAs, analog circuits, etc. In many cases you will need to know several different CPUs, or several different FPGAs in order to figure out what the best approach is.

There is no substitute for knowing your craft.