Previous

Modifying the Design for non-XC4000E/EX Devices

At this point in the tutorial, you have created or edited the following four schematic files: calc, alu1, andblk2, and orblk2. You can use the design, at this point, for only an XC4000E or XC4000EX device because these devices have several advanced features not found in other Xilinx device families. Two of these advanced features include the on-chip memory built into the XC4000E CLB and wide-edge decoders.

Targeting the Design for the XC9500 Family

The incomplete calc_sch design is configured for an XC4003E-PC84 part. If you want to target a demonstration board with this device, go to the “RAM Stack Implementation” section. If targeting the tutorial design for an XC95108-PC84 (no demonstration board available) or other device family, you must convert the design to reference the XC9500 library instead of the XC4000E library.

The procedure provided below allows you to change every Xilinx component in the Calc design from the XC4000E library to the XC9500 library. Because design creation used the Unified Libraries, the parts in the XC4000E and XC9500 libraries have identical footprints and pinouts. You can easily retarget designs to a different device family. However, you must use only library parts common to the two families. You must manually replace any library parts not common to both families. The following example shows such a situation.


NOTE

Although an XC4000E-to-XC9500 conversion appears here, you can use this procedure to retarget from any family to any other family.


To retarget the Calc design to the XC9500 family, use the following procedure.

  1. Exit from Concept by entering “quit” in the Message Window.

  2. Open the global.cmd file, and change the “xce4000e” reference to “xce9000.”

  3. Open the master.local file, and replace all “xce4000e” references with “xce9000.” If your Xilinx tools reside in /xilinx, for example, use the following valid master.local.

    file_type = master_library; "xce9000" '/xilinx/cadence/data/xce9000/xce9000.lib'; "xcepads" '/xilinx/cadence/data/xcepads/xcepads.lib'; end.

  4. Modify the cds.lib file to have “xce9000” references. If your Xilinx tools reside in /xilinx, for example, then use the following valid cds.lib.

    define xce9000_syn /xilinx/cadence/data/ \
    xce9000_syn


  5. Open Concept. You can ignore the following warning message, if it or something similar appears.

      The default property PINTYPE (with value IN) is no longer on the body OBUF.

When you write the schematic again, these warnings disappear.

Targeting the Design for the 3000A and 5200 Family

To target the XC3000A, XC3100A, or XC5200 family, follow the previous procedure for the XC9500 family to retarget the design. Simply substitute “xce3000” or “xce5200” where you see “xce9000” in the procedure.

RAM Stack Implementation

The RAM stack implements using a 16x4 RAM macro from the XC4000E library. Although the stack is 4x4, RAM and ROM are only available in 16x1 or 32x1 increments, using only one fourth of the
memory addresses. A stack four times as deep can implement using only two CLBs. An equivalent flip-flop implementation requires 64 flip-flops or 32 CLBs. In this case, with a stack only four words deep, using the static memory feature of the XC4000E CLB reduces the stack from eight CLBs to two CLBs.

To view the XC4000E stack implementation, follow these steps.

  1. Make sure the top-level “Calc” schematic displays and type in “edit.” Select the STACK symbol with the mouse. Alternatively, you can enter “edit stack.”

  2. On the stack schematic is a RAM16X4S component, which represents four 16x1 synchronous RAMs. Select this component while in “edit” mode to view its schematic.


NOTE

If targeting a Spartan or non-XC4000 family, the RAM16X4S does not display in the schematic because it does not exist in the target library. See the “Using the Device-Independent Register File” section for instructions on replacing this missing part.


The schematic for RAM16X4S appears in the following figure.

Figure 9.32 RAM16X4S, XC4000E Implementation

Using the Device-Independent Register File

The device-independent stack implements by replacing the RAM16X4S with a register file that emulates a synchronous RAM with a set of flip-flops and multiplexers. You can use this implementation for any Xilinx device, even one from the XC4000E family.

If targeting an XC4000E device, you can skip this section to take advantage of the RAM feature of the XC4000E.

Make the stack a device-independent schematic as the following procedure describes.

  1. Return to the stack schematic (using “ret”). Enter the command “replace ram4_9k.”

  2. Use the left mouse button to select the RAM16X4S.


    NOTE

    If you changed the libraries to non-4000 or non-Spartan libraries, the RAM16X4S does not appear in the schematic. In this case, click on the empty space between the dangling DATA<3..0> and STACKOUT<3..0> wires to place the RAM4_9K component.


  3. The RAM4_9K replaces the RAM16X4S as shown below. Note that Concept removes the label RAM_BLOCK. Change the PATH property on this component in the same manner as you changed the components in the ALU1 schematic.

    Figure 9.33 Replacing RAM with REG_9K

  4. Write the updated stack schematic.

Removing the XC4000E Oscillator

If targeting the Calc design to an XC9500 or other device outside the XC4000 or Spartan family, you must also remove the CLOCKGEN circuitry. This circuitry includes the OSC4 component, and you must replace it with an external source.


NOTE

The XC3000 and XC5200 families also have internal, on-chip oscillators. See the CLKGEN3K and CLKGEN5K components to see how to use these. You can replace the CLOCKGEN component with one of these alternative macros with the replace command, instead of using the instructions that follow.


  1. On the Calc schematic (“edit calc”), enter into Delete mode and select the CLOCKGEN component with the left mouse button.

  2. Add components, nets, and labels as shown in the “Device-Independent Clock Source” figure. Select the IPAD symbol from the library xcepads and the BUFG symbol from the xce4000e library.

  3. Write the Calc schematic.

Because a signal now sources the CLK signal, it must generate externally.

Figure 9.34 Device-Independent Clock Source

Next