1.3.3 Defining Multiple State Machines
The CUPL syntax allows for more than one state machine to be defined within the same PLD design. When multiple state machines are defined, occasionally the designer would like to have the state machines communicate with each other. That is, when one state machine reaches a certain state, another state machine may begin. There are two methods of accomplishing state machine communication: using set operations on the state bits or defining a “global” register that can be accessed by both state machines.
In one state machine, a conditional statement can contain another state machine’s name followed by a state number or range of state numbers. The conditional statement will become TRUE when the other state machine reaches that particular state or states. The same case is true when using a register that is accessed by multiple state machines. However, this method requires the use of one of the device's output or buried registers. Depending on the situation, the global register could also be combinatorial, which may make a difference as to when the state machine receives the information from another state machine.
