





Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!






State Diagram Tutorial
In general, a state diagram can be used to model the transition of a sequential machine. The sequence is determined by the present state of the machine and the input(s) given. After completing this tutorial you should be able to create a state diagram in Xilinx, make I/O assignments, load your design on the FPGA, and test your design using the Read to- Write to software or using external hardware such as the proto box. As you may have seen, it is often desired to create a design in a CAD software such as Xilinx. Once the design is created, Xilinx can easily compile a VHDL source code for it that can in turn be program on a chip, the FPGA (Field Programmable Gate Array). If I/O pin numbers were assigned while you were creating your state diagram, then the FPGA will be able to communicate with the outside world.
This tutorial walks you through creating a two bit counter in order to help you become familiar with State CAD, the state diagram editor in the Xilinx ISE Tools.
change. Like all other names in Xilinx a state name cannot begin with a number and cannot contain spaces.
Aside: If we happened to have a 4 bit input, say WXYZ, we could use the notation W&X&Y&Z for 1111 and !(W&X&Y&Z) for 0000 as our conditions. In addition !W&X&Y&Z represents 0111.
s0 p67 (d) s1 p39 (c) s2 p62 (e) s3 p62 (g) s4 p60 (b) s5 p57 (f) s6 p49 (a)
If the configuration of the 7-Segemnt displays seems ackward, that’s because it is. If you look back at the figure in step 16 you’ll see SEGMENT=1110111 is used to display 0. That’s because of the relationship between s0..s6 and a…g as shown
above. If you were connecting to an external 7-segment the figure below could be used directly.
Clear p Upcount p c0 p c1 p clock p
The pin assignments can be make by going to User Constraints > Edit Implementation Constraints (Constraints Editor) and selecting the Ports tab in the center of the screen as shown. The only additional pin assignment that must be made is p41 that you will need to tie to Vcc in your schematic. Note that pin 41 (Flash_CE) does not get physically connected by you, its an internal thing. To do this select and place the symbol Vcc in the schematic window and attach an output marker to it.