05.07.2013 Views

Xilinx Synthesis Technology User Guide

Xilinx Synthesis Technology User Guide

Xilinx Synthesis Technology User Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

XST <strong>User</strong> <strong>Guide</strong><br />

Inputs<br />

FSM with 3 Processes<br />

You can also separate the NEXT State function from the state register:<br />

Next<br />

State<br />

Function<br />

Separating the NEXT State function from the state register provides<br />

the following description:<br />

VHDL<br />

RESET<br />

CLOCK<br />

State<br />

Register<br />

Output<br />

Function<br />

Only for Mealy Machine<br />

PROCESS 1 PROCESS 2 PROCESS 3<br />

Following is the VHDL code for an FSM with three processes.<br />

library IEEE;<br />

use IEEE.std_logic_1164.all;<br />

entity fsm is<br />

port (clk, reset, x1 : IN std_logic;<br />

outp : OUT std_logic);<br />

end entity;<br />

architecture beh1 of fsm is<br />

type state_type is (s1,s2,s3,s4);<br />

signal state, next_state: state_type;<br />

begin<br />

process1: process (clk,reset)<br />

begin<br />

if (reset ='1') then<br />

state

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!