I am creating a system in VHDL that filters the image after it is received through the FTDI USB-to-serial device. As part of this, I believe that I determined the states that my CPLD should be in, but I had never created a complex state machine in VHDL before, so I wonder if my methods are sound. Currently, the main circuit for my state machine is:
begin
process(clk, reset, USB_RXFN, USB_TXEN)
begin
case state is
when IDLE =>
when NEGOTIATING =>
when RECEIVING =>
when FILTERING =>
when TRANSMITTING =>
when OTHERS =>
end process;
My problem is that every textbook on a state computer that I could find changes on every front (or similar, but once per cycle), and this device should sit in IDLE a lot and only go to NEGOTIATION when USB_RXFN goes low, stay in the TALK until it ends, stay in RECEIPT until the whole image is transferred, etc.
Is there anything fundamentally wrong with my approach? Are CPLDs simply unsuitable for this purpose? Or is it possible to remain in a state for more than one hour, and the textbooks are simply written for simplicity?
source
share