Previous

Modifying the Design for non-XC4000E Devices

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

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. This means the design uses only one fourth of the memory addresses. You can implement a stack four times as deep while still 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 still reduces the stack from eight CLBs to two CLBs.

To view the XC4000E stack implementation, follow these steps.

  1. Place the cursor above the STACK symbol in the Calc schematic, and push into the STACK schematic by clicking the right mouse button and selecting Schematic.

  2. On the stack schematic contains a RAM16X4S component, which represents four 16x1 synchronous RAMs. Select this component and push down into its schematic.

The schematic for RAM16X4S appears in the following figure.

Figure 8.40 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. 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 follows.

  1. Return to the stack schematic and use the left mouse button to select the RAM16X4S.

  2. Select Edit Replace. The Find dialog box appears as shown in the next illustration. Fill out the fields as indicated and click OK.

    Figure 8.41 Replace Instance Dialog Box

  3. The device-independent RAM4_9K replaces the RAM16X4S, as shown in the “Device-Independent Clock Source” figure.

  4. The unused A3 pin that exists on RAM16X4S does not exist on RAM4_9K. Although the implementation process trims the detached GND symbol and net, you can clean up the schematic by deleting them. To do this, unselect everything by pressing F2, then select the GND component with the left mouse button. Press the Delete key to delete the component. The net connected to the GND deletes as well.


    NOTE

    You can use the RAM4_9K component only in an XC9500 design, as the aliases in the macro refer to that family library.


  5. Check and save the updated STACK schematic.

Removing the XC4000E Oscillator

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

  1. Select the CLOCKGEN component with the left mouse button. Press the Delete key to delete this component.

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

  3. Check and save the Calc schematic.

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

Figure 8.42 Device-Independent Clock Source

Next