This example uses FLEX 10K embedded array blocks (EABs) to implement a state machine. The top level of the design is named sseabtop.gdf, which calls the two lower-level AHDL designs counts and ss_eab.
This state machine has the following states: left(l), left-center(lc), center(c), right-center(rc), and right(r). The inputs left and right are active-low and send the state machine in the corresponding direction. The outputs ledx and ledy are outputs that depend on the state. This function is meant to be implemented in a FLEX® 10K design and uses EABs. The current state is an input that is fed by the output of the EAB.
The AHDL design ss_eab.tdf is the actual state machine and you must assign a logic option to it in order to implement it in an EAB. To implement the assignment:
- Select the
ss_eabsymbol in the Graphic Editor and choose Logic Options (Assign menu). The Logic Options dialog box will appear. - Choose the Individual Logic Options button.
- In the Individual Logic Options dialog box, select Implement in EAB.
- Choose OK twice.
The AHDL design counts.tdf is peripheral logic and is therefore not assigned to the EAB. Note that the state-machine has a feed-back line which must be routed back into the state machine.
The Graphic Editor and AHDL files for this example are provided below. To download the Graphic Editor file, click on the link below with the right mouse button and choose Save Link As from the drop-down list box.
The use of this design is governed by, and subject to, the terms and conditions of the Altera Hardware Reference Design License Agreement.
For more information on using this example in your project, go to:
- How to Use Graphic Editor Examples
- How to Use AHDL Examples
- MAX+PLUS® II Help
Design Examples Disclaimer
These design examples may only be used within Altera Corporation devices and remain the property of Altera. They are being provided on an “as-is” basis and as an accommodation; therefore, all warranties, representations, or guarantees of any kind (whether express, implied, or statutory) including, without limitation, warranties of merchantability, non-infringement, or fitness for a particular purpose, are specifically disclaimed. Altera expressly does not recommend, suggest, or require that these examples be used in combination with any other product not provided by Altera.
