Altera Home Page
Literature Licensing
Buy On-Line Download

  Home   |   Products   |   Support   |   End Markets   |   Technology Center   |   Education & Events   |   Corporate   |   Buy On-Line  
  Knowledge Database   |   Devices   |   Design Software   |   Intellectual Property   |   Design Examples   |   mySupport   |   Reference Designs  

 Products
      MAX/MAX II
      Stratix/Stratix GX
      Nios II
  
 Functionality
      Arithmetic
      Memory
      Bus & I/O
      Logic
      Interfaces & Peripherals
      DSP
      Communications
      PLL & Clocking
  
 Design Entry
      Quartus II Project
      Tcl
      VHDL
      Verilog HDL
      C Code Examples
      DSP Builder
      TimeQuest
   On-Chip Debugging
  
 Simulation Tools
      Mentor Graphics ModelSim
      Cadence NCsim
      Synopsys VCS
  
 Legacy Examples
      Graphic Editor
      AHDL
  

State Machine Implemented in an EAB

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:

  1. Select the ss_eab symbol in the Graphic Editor and choose Logic Options (Assign menu). The Logic Options dialog box will appear.
  2. Choose the Individual Logic Options button.
  3. In the Individual Logic Options dialog box, select Implement in EAB.
  4. 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. For more information on using this example in your project, go to:

  Please Give Us Feedback