Algorithmic State Machines

examples

The statements of an algorithmic state machine description have the same format as those of an FHDL statement. The first statement of an algorithmic state machine is a circuit statement that gives the name of the circuit. The last statement is an endcircuit statement. The body of an ASM is declared using the statements asm_state, asm_test, and asm_cond. These statements cannot be mixed with FHDL gate declarations. (However, a file may contain several different types of circuits.) An asm_state statement is used to declare each state of a state machine, the asm_test statement is used to declare tests for conditional state transfers and conditional outputs, while the asm_cond statement is used to declare conditional outputs.