Previous

Schematic Design Flow Example

This section runs through the entire schematic design process, from creating a design to programming and simulating the design. The following device-independent design, a 4-bit Johnson counter, is used as an example:

Figure 1.2 Example 4-Bit Johnson Counter Design

Simulation results for this design are shown in the “Example Viewlogic Functional Simulation Results” figure.

The design entry and simulation steps are summarized for Viewlogic and Mentor software. Other supported schematic design software will have similar procedures; refer to the appropriate Xilinx interface user guide, if applicable, or the manufacturer's documentation.

Figure 1.3 Example Viewlogic Functional Simulation Results

Step 1 - Configure the Design Entry Tool

Many design entry tools have a project management facility that you can use to create a working directory for your design and to select the vendor component libraries to use in your design.

Workview Office Project Manager

Call up the Viewlogic Project Manager by selecting the Project Manager icon in the Workview Office icon group. Create a new project named jcount.

File New

Select a directory and name the new project jcount.

Next, call up the libraries you need to create your design.

Project Libraries...

The Library Search Order dialog box will appear. Use this tool to add the XC9000 library, plus the builtin and simprims libraries. Use the Browse key to select directories and the Add key to add libraries. For example, browse to installation_path/viewlog/data/xc9000 (for XC9500 target devices) where installation_path is the root directory where the Xilinx software package was installed. Then click on Add and the xc9000 libraries will be added to the list. When you have all the libraries you need for the project, click on OK.

Viewlogic On Workstations

To create a working directory for your design in Viewlogic's Powerview, you would use the Project Create command.

Next, you will need to configure the design entry tool to access the Xilinx CPLD component library for schematics you develop in the project you just created. In Powerview, you would use the Project Search Order command to open a dialog window listing the configured libraries. On the first available library line, enter the directory path where the CPLD Viewlogic library is installed on your system. For example, enter installation_path/viewlog/data/xc9000 (for XC9500 target devices), where installation_path is the root directory where the Xilinx software package was installed. Under the "Library" column, enter XC9000, which is also known as the library alias. Under the Type column, select Megafile (compressed read-only format).

If you are not using the Viewlogic project manager, you can make a copy of the viewdraw.ini file in your project directory (copied from the Viewlogic standard directory) and add one of the following lines to the end of the file:

DIR [m] installation_path/viewlog/data/xc9000 (xc9000)

where installation_path is the root directory where the Xilinx software package was installed.

If you plan to simulate using Viewsim, you also need to include the Xilinx “simprims” and Viewlogic "builtin" library in the Search Order window or the viewdraw.ini file.

DIR [m] installation_path/viewlog/data/simprims (simprims)

DIR [m] installation_path/viewlog/data/builtin (builtin)

Mentor

Call up the Mentor Design Manager as follows:

pld_dmgr

Select the Tools icon, the go to Tools program group and select pld_da (Design Architect).

Step 2- Draw the Design

Invoke the schematic drawing tool and draw the design. If you are using Workview Office or Powerview, you would invoke the ViewDraw tool. If you are using Mentor Graphics you would invoke pld_da (Design Architect).

If you prefer to use the completed schematic shown in “Example 4-bit Johnson Counter” figure as a sample design, you can copy the jcount schematic file from the examples directory of the Xilinx software. For Viewlogic, copy all files and subdirectories under the installation_path\viewlog\tutorial\jcount directory into your local directory (the schematic file is jcount.1 under the sch subdirectory). For Mentor select the Find Comp icon in the Design Architect and browse to installation_path\mentor\tutorial\jcount, then select jcount.

When drawing a schematic representing a CPLD device, or any sub-sheet in a CPLD design, you should not use any symbols from any other library than the Xilinx XC9000 library. For example, be careful not to use symbols from the Viewlogic builtin library. You may, however, create your own custom symbols representing sub-sheets (hierarchical schematics) or behavioral modules, as described in Chapter 2.

It is important that you label the nets that represent device input/output pins in your design. These are the nets connecting between IPAD and IBUF symbols, and between OBUF and OPAD symbols. These names will appear in the fitter reports as your pin names and will be used as your top-level signal names during timing simulation, after design implementation.

Save your schematic when finished. The Viewdraw Write command performs schematic rule checking and writes a "wire-list" file in the wir directory (wir/jcount.1).

Step 3- Perform Functional Simulation (Optional)

Xilinx schematic capture libraries contain simulation models allowing you to perform functional simulation directly from your schematic. In most libraries, models for all registered symbols contain a global signal named PRLD which, when pulsed high, initializes all the flip-flops inside the symbol's model. Remember to pulse the PRLD signal high and drive all your top-level input signals (pins) to valid logic levels before running your simulation vectors.

Viewlogic

If you are using Viewlogic, Xilinx provides a Viewsim command file for the jcount design that can be found in installation_path/viewlog/tutorial/jcount/jcount.cmd. The JCOUNT design is simulated using the following Viewsim commands:

vector Q Q[3:0]
wave jcount.wfm CLK CE CLR Q
clock c 1 0
step 50ns
h prld
h CE
l CLR
cycle
l prld
cycle 5
l CE
cycle 2
h CE
cycle 5
h CLR
cycle 2
l CLR
cycle 3

The wave command automatically invokes a ViewTrace window which displays the input and output simulation waveforms graphically.

Mentor

You can functionally simulate XNF or EDIF based designs by using pld_xnf2sim or pld_edif2sim to convert the designs to a Mentor simulation model. The EDIF design must be Xilinx compatible and expressed in Unified Library components.

Performing functional simulation on a pure schematic design consists of creating a viewpoint in pld_dve from the schematic that you created in Design Architect and using pld_quicksim to simulate the design. For more information see the Mentor Graphics Interface/Tutorial Guide.

Step 4- Implement the Design

Before implementing the design, your schematic must first be translated into an EDIF 2.0.0 formatted netlist.When netlisting, make sure the netlist hierarchy stops at the Xilinx library primitives and does not expand into any functional simulation models that may exist beneath the Xilinx primitive symbols.

Create EDIF Netlist

From Viewlogic Workview Office, go to the ViewDraw tool and select:

Tools Export EDIF

The EDIF Interfaces Dialog Box appears. Select the EDIF Netlist Writer tab and Browse to the jcount.1 schematic. Enter xilinx in the level field. To create the .edn file click once on Apply.

For Viewlogic Powerview, invoke the edifneto command and specify “XILINX” as the “level” attribute (“-l xilinx” option on the edifneto command line).

From Mentor you must convert to EDIF with the pld_men2edif utility before implementing the design with the Design Manager.

To convert your design to EDIF, follow these steps.

  1. In the Mentor Design Manager, double-click the left mouse button on the pld_men2edif icon.

    The dialog box labeled “Mentor to EDIF Netlist appears.

  2. In the Component Name field, enter the component name, or click on Navigator to browse a list of design names.

  3. In the From Viewpoint field, you can enter the viewpoint name if you do not want to use the default viewpoint. Alternatively, in step 2 you can select a viewpoint under the component.

  4. Select the appropriate architecture for your design in the PLD Technology field.

  5. Select the appropriate Bus Dimension Separator Style.

    This is important if you are merging components from other design-entry tools into a single design. Choosing a bus-index delimiter lets you insure that the bus-index delimiters that pld_men2edif writes out are consistent with those of any other design-entry tools with which you are interfacing. Mentor EDIF uses parentheses. Synopsys EDIF uses angle brackets.

  6. Click OK.

    Pld_men2edif now produces an EDIF file that you can submit to the Xilinx Design Manager. The output name is component_name.edif.

Implementing from Design Manager

Start the Xilinx Design Manager. From the Windows Program Manager click on the Design Manager icon. If you are using the UNIX command line enter the following command.

dsgnmgr

From the Design Manager, create a new project and select jcount.edn as its input.

File New Project

The New Project dialog box appears. Select Browse for Input Design and find jcount.edn, then click on OK. The project should appear in the Design Manager.

Next, implement the design.

Design Implement

The Implement dialog box appears. This box allows you to select a specific Xilinx device to implement your design. Click once on Select and select for XC9500 or XC9500XL Family; leave Device, Package and Speed Grade set to AUTO. Click on OK when you have finished. Click on Run to implement the design.

Step 5 - Examine the Reports

Examine the reports to verify that the design was implemented as you expected. The following report files (plain text) are automatically produced by the fitter. If you are using a Design Manager you may select a report from the report browser as follows:

Utilities Report Browser

or select the report browser icon. The following reports are most useful for schematic designs:

Figure 1.4 Report Browser

Step 6 - Timing Simulation

To perform timing simulation you must extract a new EDIF netlist from the implemented design. To avoid overwriting, you may want to specify and output filename different than your design entry netlist.

The Design Manager will optionally produce timing simulation data when you implement your design. To produce timing data go to the options menu:

Design Implement

The Implementation menu will appear. Click once on the Options key to get the Options dialog box.

Select Produce Timing Simulation Data.

Go to the Interface template and select EDIF as the simulation netlist format. When the fitter runs it will generate the appropriate data. If you have already run the fitter, go back to the Flow Engine; a Timing block will appear in the flow. Press the forward arrow to resume the program from the Fit block.

Workview Office and Powerview

In most cases, you can use the same command file you used during functional simulation to perform the timing simulation. You may need to make minor adjustments to the command file used to functionally simulate the design before it can be used to perform a timing simulation.

The typical procedure for performing a timing simulation is as follows.

  1. Import the EDIF file with timing information produced by the fitter to create a wire-list file.

  2. Create the timing simulation network (VSM file).

  3. Start ViewSim.

  4. Load the VSM file into ViewSim.

  5. Simulate the device's startup sequence.

  6. Execute the command file used during functional simulation. For the JCOUNT sample design, a Viewsim command file can be found in installation_path/viewlog/tutorial/jcount/jcount.cmd

  7. VewTrace is automatically opened in response to the WAVE command. View the waveforms produced by the simulation.

  8. Repeat steps 5 and 6 as necessary to verify the timing information.

See the Viewlogic Interface/Tutorial Guide for detailed information on each of the above steps.

Mentor

During design implementation, the Xilinx Design Manager can produce an EDIF (EDN) file. For EDIF files, the process of timing simulation consists of converting the EDIF netlist to a Mentor EDDM model, creating a component and a viewpoint, and simulating the design with pld_quicksim.

  1. Double-click the left mouse button on the pld_edif2tim icon in the Mentor Design Manager Tools window.

    The dialog box labeled EDIF to Mentor Eddm Sing Object appears.

  2. Enter the name of the EDN file in the EDIF Input File field, or click on Navigator to browse the available files.

    The component created from the EDN file is put into a design library called my_design_lib. If you have already implemented your design at least once, this directory already exists. If you don't wish to copy over it, move it to another directory before proceding.

  3. Click on OK.

  4. Invoke DVE, by double-clicking the left mouse button on the pld_dve icon in the Mentor Design Manager Tools window.

    The Pld_dve Dialog Box appears.

  5. Enter the top-level component name created by pld_edif2tim in the my_design_lib directory.

  6. Use the Navigate button to navigate all the way down to the “default” viewpoint and select the viewpoint.

  7. Select the Simulation Button.

  8. Select the appropriate technology from the PLD Technology box.

  9. Click OK.

You can now submit the design to pld_quicksim for timing simulation.

  1. To invoke pld_quicksim, double-click the left mouse button on the pld_quicksim icon in the Design Manger Tools window.

    The pld_quicksim dialog box appears. For more detailed information on the dialog box options, refer to the Mentor Graphics documentation.

  2. In the Design field, enter the name of the top-level design created by pld_edif2tim.

  3. In the Select Desired Mode field, select Cross-Probing.

    Normally, you select cross-probing for back-end EDDM designs but not for front-end designs. You can only cross-probe back-end designs that contain either pure schematic or schematics that contain EDDM hierarchical models. You cannot cross-probe designs written in HDL or that contain HDL models.


    WARNING

    In order for cross-probing to work, other sessions of Design Viewpoint Editor and QuickSim must be closed. Otherwise, the interprocess communication gets confused. This includes another user's session invoked by rlogin from another workstation.


  4. Set the timing modes as desired.

  5. Click on OK.

    Pld_quicksim now simulates the design. The QuickSim graphical user interface appears. If you selected cross-probing, DVE is invoked as well.

  6. In DVE, open the viewpoint of the front-end schematic design, that is, the viewpoint submitted to pld_men2edif.

  7. Open the sheet of the design, and select signals that you wish to trace.

These signals will automatically be added to the QuickSim trace window. If you have a file that sets up your trace window and stimulus, use that instead. Any signals selected in the trace window will select the same on the schematic on which they reside in the DVE window. If such sheets have not been opened in DVE yet, you must open them to see the selections.

Step 7 - Device Programming

The fitter automatically creates a JEDEC programming file, jcount.jed, whenever a design is successfully implemented. Once you are satisfied with the results of the fitter (reports and timing simulation), you can download the programming file to the device using the techniques described in the JTAG Programmer Guide.

Next