At this point in the tutorial, you have created or edited the following four schematic files: calc, alu, andblk2, and orblk2. The design, at this point, is suitable for use only in an XC4000E or XC4000EX device. This is 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.
The RAM stack is implemented 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, so only one fourth of the memory addresses are used. A stack four times as deep could be implemented while still using only two CLBs. An equivalent flip-flop
implementation would require 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:
Figure 9.44 RAM16X4S, XC4000E Implementation |
The device-independent stack is implemented by replacing the RAM16X4S with a register file that emulates a synchronous RAM with a set of flip-flops and multiplexers. This implementation can be used for any Xilinx device, even one from the XC4000E family.
If you are targeting an XC4000E device, you may skip this section to take advantage of the RAM feature of the XC4000E.
Make the stack a device-independent schematic as follows:
Figure 9.45 Replace Instance Dialog Box |
If you are targeting a device family other than the XC9000, be sure to run Convert Design on the RAM4_9K schematic as described before.
Figure 9.46 Device Independent RAM4_9K |
If you are targeting the Calc design to the XC9000 family (or other non-XC4000 family), you must remove the CLOCKGEN circuitry, which includes the OSC4 component, and replace it with an external source.
The XC3000 and XC5200 families also have internal, on-chip oscillators. See the CLKGEN3K and CLKGEN5K components to see how these are used. You may choose to replace the CLOCKGEN component with one of these alternative macros with the Replace selection from the Instance pop-up menu, instead of following the instructions below.
Figure 9.47 Device-Independent Clock Source |