Xilinx Introductory tutorial
Introduction
The following training material provides detailed instructions on
how to create a sample XACTstep M1 design with the Foundation Series suite.
To effectively explain all important steps in the design process, we will
do a sample design. If you follow the instructions you will be able to
create a design that is identical to the FLASH design, which is provided
as a sample project. The pin assignment (locations) will allow direct design
verification with the Xilinx 4000 DEMO board.
Creating a New Project
-
Start Project Manager by double clicking the Foundation Series icon
-
In the Project Manager Window select the New Project option from the File
menu.
-
In the New Project Window type in the project name: MYFLASH, select the
Type: XACTstep M1, Family: XC4000, Part: 4003EPC84, and Speed: 3. Then
click the OK button to create the project.
After the new project has been created verify that the Hierarchy Browser
shows the correct libraries, which are listed below:
-
MYFLASH is the project library. It is used for storing all macros and symbols
created specifically for this project.
-
X4000E is a system library used in XC4000E devices.
-
SIMPRIMS is a system library needed for simulation of post - layout netlists.
Starting Schematic Editor
-
Click the
button in the Project Manager flow diagram.
-
The Schematic Editor opens a new schematic sheet called MYFLASH1.SCH.
-
In the schematic File menu select the Page Setup command.
-
In the Page Setup window select Sheet Format: Landscape, size A 11 x 8.5
in.
Drawing Wires
-
To draw wires, select the
button located in the left toolbar.
-
Next, click a pin to start the wire and another pin to end it.
-
You can click the existing wire to end or start another wire. This will
automatically place a junction.
NOTES:
-
To exit the wire mode, press the Esc key.
-
To delete a wire, press the Esc key, click the wire and press the
Del key.
Placing Symbols
NOTES:
-
You can mirror the symbol before placing it by pressing Ctrl+M keys.
Apply this to the INV symbol. (Ctrl+L key can also be used to rotate
the component.)
-
If you select a wrong symbol, press the Esc key to remove it from
the cursor.
-
The schematic page scrolls automatically when the cursor with a symbol
gets close to the border.
-
To view the full page, press the PgDn key. To view the previous
zoom, press the PgUp key. These keys are located in the numeric
section of the keyboard.
-
If you accidentally place a wrong symbol, press the Del key to delete
it.
-
To close the Symbol toolbox, press the
button in the left toolbar.
-
To zoom a specific area of the schematic, click the
button in the top toolbar. Then drag the cursor to define a rectangle to
zoom area. Releasing the mouse button zooms on the selected area.
-
To return to a full page ,click the
button in the top toolbar.
-
To Refresh the screen, press the F10 key.
Naming Wires
-
To name a wire, click the
button in the left toolbar.
-
Enter the net name in the Net Name window and press the OK button.
-
Next, move the cursor over the wire itself where the net name should be
placed.
-
A green net name indicates that the name is not attached to the wire.
Adding Pin Locations
Since the design needs to work with the Xilinx Demonstration board,
the pin asignment needs to be specified on the schematic. To specify pin
locations, follow this procedure:
-
Press the Esc key to enter the select mode.
-
Double click on the IPAD symbol U4.
-
Enter the Name: LOC, and Description: P10 (Parameters section).
-
Click the Add button to add the parameter to the list. NOTE: Your reference
designators may be different on your screen or may be invisible. Please
modify the appropriate component.
-
Click the OK button.
-
The P10 parameter should be displayed below the IPAD symbol.
Schematic Changes
All Schematic changes are performed in the select mode. This mode is
active when the
button in the left toolbar is depressed. The quickest way to enter
this mode is by pressing the Esc button.
The following is a list of the most common editing operations:
-
To move a symbol, click it and drag it to the desired location.
-
To move a section of the schematic, draw a box around the desired
schematic objects. Clicking one of the symbols will allow you to drag the
entire selection.
-
To add/remove objects from the selected group, press the Shift
key and click the object.
-
To delete a symbol without deleting wires attached to it, select
the symbol and click the
button in the top toolbar, then press Del button. This will leave
"hanging" wires.
-
To attach the hanging wires to the symbol pins, press the

button in the schematic toolbar, or drag the end of each wire on top of
the pin and release the mouse button.
Importing a Viewlogic Macro Schematic
To demonstrate the Viewlogic schematic import, one of the schematic
macros will be imported into the current design.
-
Select the Import Viewlogic Schematic command from the schematic File menu.
-
Select the Schematic (*.*) in the List Files of Type field (in the Select
Viewlogic Schematics window), and then the schematic file in the File Name
field. Note: Using the Ctrl key, you can select both schematics
at the same time.
-
Press the OK button to begin the Viewlogic schematic import.
-
The schematic macro will be added to the project library.
-
The dialog box appears asking if you want to see the report file.
-
Select Update Libraries from the File menu to be sure that imported symbols
are placed in libraries.
-
Place the imported macro on the schematic as shown below.
Repeating Net Names
-
Place the 8LED symbol as shown above and connect the wires.
-
To add net names, select the
button in the left toolbar and enter the name.
-
To speed up naming of similar nets, click the Repeat button.
-
The program will enter the repeat mode. Every time you click the net, a
new name will be placed and the net name index will be incremented by one.
NOTE: To display the symbol name, press Esc to enter the select
mode. Next, double click the symbol and select the Attributes button in
the Symbol Properties window. Select the Symbol Name in the Visible Text
section of the Symbol Attributes window and press OK. Next, press the OK
button in the Symbol Properties window to display the symbol name.
Creating a New Symbol
To demonstrate the VHDL capabilities, a decoder will be created
to convert HEX numbers to seven segment display codes.
-
Create a new schematic by selecting the New Sheet command from the schematic
File menu.
-
Select the New Symbol Wizard in the Hierarchy menu.
-
Click Next in the welcome screen of the Design Wizard window. The Design
Wizard - Contents window will appear.
-
Enter the symbol name in the Symbol Name box.
-
In the Contents field select the following options:
-
Contents: HDL Code
-
HDL Language: VHDL.
-
Click the Next button. The Design Wizard - Ports window will appear.
-
In the Design Wizard - Ports window
-
Click the New button
-
Enter HEX[0:3] in the Name: field
-
Select Input in the Direction field
-
Click the Next button.The Design Wizard - Attributes window will appear.
-
In the Design Wizard - Attributes window enter a comment.
-
Press Next to continue to create a symbol. The new symbol is placed in
the project library.
-
Press Finish to create a symbol. The new macro is placed in the project
library.
-
Place the symbol on the new schematic page (MYFLASH2.SCH).
Editing a VHDL Macro
-
Select the button in the left toolbar.
-
Double-click the symbol on the schematic.
-
The HDL Editor opens a window displaying the macro’s port definition.
-
Delete all the lines before the entity section. (This is required to compile
the macro with the DEMO version of METAMOR compiler).
-
Change declarations in port section to HEX: in BIT_VECTOR (3 downto 0);
LED: out BIT_VECTOR (6 downto 0) This is required to define bit 0 as the
least significant.
-
Delete the line with <<enter your statements here>>
-
Place the cursor in the architecture section and then select Language Assistant
from the Tools menu.
-
Select Synthesis Templates and then find the HEX2LED Converter on the Select
Template list.
-
Press Show preview>> button. The text of the template will be displayed
in the right panel of the Language Assistant window.
-
Press the Use button to copy the template to the editor.
-
Make the necessary changes to create the listed below code.
Creating a Schematic Macro
After you have updated the HEX2LED macro, the rest of the counter will
be completed.
-
Click the Projects button to switch to Project Manager.
-
Choose LogiBLOX from the Tools menu. This will invoke the LBGUI program
that displays the LogiBLOX Module Selector dialog.
-
Select Counter from the Module Type box and 4 from the Bus Width box.
-
Enter LXCOUNT0 in the Module Name box.
-
In the Details group clear the D_IN and Clock Enable boxes. Select UP in
Operation, Binary in Encoding, and enter 2#1001# in the Count Limit field.
-
Click OK to put the LXCOUNT0 logiblox symbol into the project library.
-
Confirm the message reporting the successful symbol creating.
-
Place the LXCOUNT0 component on the schematic.
-
Start drawing a wire from pin C of that macro to the left.
-
Press the right mouse button to end drawing.
-
Click the
button on the
left-hand toolbar.
-
Enter the CLK name, as shown below:
-
Using the
button on the
left-hand toolbar, draw a bus from the LED[6:0] pin of the HEX2LED macro
to the right.
-
Press the right mouse button to stop drawing a bus and click the
button.
-
Enter the bus I/O terminal name LED[6:0].
-
Draw a bus from the output pin of the LXCOUNT0 to the HEX[3:0] input of
the HEX2LED macro.
-
Press the
button.
-
Enter the bus name HEX[3:0]
Saving the Macro Schematic
-
When the macro schematic is completed select the Create Macro Symbol From
Current Sheet command from the Hierarchy menu.
-
Enter the name LXROLL7, in the Create Macro window
-
Enter the comment "7 segment LED counter" in the Comment field.
-
Next click the OK button to create a macro.
-
The message about the successful creation of the macro will be displayed.
When prompted if further editing of the macro will be needed, select No.
This will close the macro schematic.
Finishing the Top Level Schematic
-
Return to the top level schematic and place the LXROLL7 symbol. This symbol
has been automatically created by the software while the macro has been
saved in the project library.
-
Place the 7SEG macro and connect the wires and a bus as shown below
-
Click the
button
-
Click the bus name (LED[6:0])
-
The status line will display that the first bus tap LED0 has been selected
for placement.
-
Click the A pin of the counter. The bus tap will be drawn to the bus and
named LED0
-
Keep clicking the following pins B, C, D, E, F,G.
-
Press the Esc key twice to exit bus tap mode.
NOTES:
-
To push into a macro schematic, select the button and double-click the
desired macro symbol.
-
To pop back to the upper level, double-click the background of the lower
level schematic.
Functional Simulation
-
To start the functional simulation, click the
button in the schematic toolbar. The current version of the design will
be loaded into the simulator.
-
The Netlist Warnings dialog box will appear .
-
To select the test points for simulation, go back to the schematic window
by clicking the
button
in the simulator toolbox. Than click the
button in Schematic Editor to enter the Test Points mode.
-
Click the following nets on the schematic: CLKIN, HALFCLK, LED[6:0], Q0,
Q1...Q7. NOTE: The Waveform Viewer window can display buses either as
expanded or compacted. To change the display mode, click the
button.
-
Go back to the simulator and verify that the signals have been added to
the Waveform Viewer window as shown below. NOTE: To leave the Text Points
mode press Esc.
Running Simulation
-
Click the
button in the
Simulator toolbox
-
The Waveform will be generated as shown below.
-
Click the
button several
times.
-
Save the simulation results in a file, using the Save Wafeform command
from the File menu.
Creating Test Vectors
-
To specify the clock test vector, click the CLKIN signal in the Waveform
Viewer, so that it is highlighted.
-
Select Add Stimulators option from the Signal menu
-
The yellow and red light emitting diode (LED) icons are the graphical representations
of the binary clock generator. The first yellow icon from the right is
the clock B0 which has the 5ns halfperiod, the next one is 10ns, etc.
-
Click the second yellow icon from the right so that the B1 clock is displayed
next to the CLKIN signal in the Waveform Viewer.
-
To save this selection of signals, use the Save Test Vectors command in
the simulator File menu.
-
Type in the name "signals" and click the OK button.
Viewing Results on the Schematic
-
Switch to the schematic window.
-
Notice that the color probes are shown on the selected signals. The colors
correspond to the logical state as follows
-
Green = ‘0’
-
Red = ‘1’
-
Blue = ‘X’ (Unknown)
-
Yelow - High Impedance/Not driven
-
To proceed with the simulation from the schematic, press the Step button
in the SC Probes toolbox.
-
Notice that the red icon on the Q0...Q7 signal lines is moving up and down
as expected.
Adding TIMESPEC Symbol
-
Select the TIMESPEC Symbol and place it on the schematic.
-
Press the Esc key and double click the TIMESPEC symbol. The Symbol
Properties dialog box will appear.
-
To add new parameters:
-
Type in TS01 in the Name field
-
Type in FROM:PADS:TO:FFS=15 in the description field
-
Click Add.
-
Repeat the same procedure to add the following parameters:
-
TS02=FROM:FFS:TO:FFS=20
-
TS03=FROM:FFS:TO:PADS=25
-
Click the added parameters so that the name and description marks (diamonds)
appear
-
Click OK. NOTE: The diamonds are responsible for displaying the parameters
on the schematic.
-
The following symbol is a result of adding a TIMESPEC.
-
Click the Save button to save the changes to the schematic file.