Firmware is not a type of hardware. It is completely different from the hardware. Hardware refers to the components of a device, like Integrated Circuit (IC), CPU, GPU, RAM, etc. On the other hand, firmware is a program embedded into a piece of hardware. Read more about firmware here.