Forum Discussion
Altera_Forum
Honored Contributor
15 years agoI feel this is a case for a memory look-up approach. It looks like you have some 256 states checking a stream of 8bit input data. In stead of using logic we now need about 256 (states) * 256 (input stream) * 8 (next state) bits (or 524288 bits in total) of ram to just code the state machine. If you need to do some actions in some states you will have to add extra memory bits. Now the work will shift from writing case statements to fill the RAM. One disadvantage of using memory blocks is the latency as the next_address is registered inside the memory system. Writing the MIF file will be a lot less tedious then enumerating the 256 or so case statements.