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 />

VHDL<br />

Following is VHDL code for an FSM with two 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: state_type;<br />

begin<br />

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

begin<br />

if (reset ='1') then state

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

Saved successfully!

Ooh no, something went wrong!