Altera_Forum
Honored Contributor
15 years agoGood practice for handling user commands in an FPGA
Hello
In my applications, I am using an FPGA that is connected to a RS232. The PC sends commands including data that has to be processed by the FPGA. Sometimes the FPGA sends respond data if requested back to the PC. Currently im am using a state machine for reading and processing the commands. As the number of commands grows the state machines is getting longer and longer. As this could be a typical task in many applications I assume there is a good practice or maybe there is a reference archticture available. In my opinion the approach should at least fulfill following requirements: 1.) easy extensions if there are new commands 2.) modular programming (Split logical function in different files or modules 3.) easy readable code 4.) suited use of FPGA ressources 5.) fault-prone I am beginner in FPGA and come from micro controller programming. There I am also working with state machines and it works very well but maybe in the FPGA-world there are better approaches or at least the design of the state machine differs. How would you manage this problem? Best regards Geri