Method and system for performing hardware tasks using a hardware state
machine and a processor is provided. The method includes, setting a
breakpoint for a state machine state; running the processor in a parallel
mode with the state machine; passing control to the processor after a
breakpoint condition is encountered; performing a task, wherein the
processor performs the task which was meant to be performed by the state
machine; and transferring control back to the state machine after the
processor performs the task. The system includes an Application Specific
Integrated Circuit (ASIC) with the state machine, and the processor.