1.2.3 Using Variable Extensions
Extensions can be added to variable names to indicate specific functions associated with major nodes within a programmable device, including capabilities such as flip-flop description and programmable tri-state enables. The compiler checks the usage of the extension to determine whether it is valid for the specified device and whether its usage conflicts with any other extension used. CUPL uses these extensions to configure the macrocells within a device. This way, the designer does not have to know which fuses control which in the macrocells. A complete list of CUPL extensions can be found in the CUPL Programmer’s Reference Guide in the Extensions section of the CUPL Language Reference chapter.
| Extension | Side Used | Description |
|---|---|---|
| .AP | L | Asynchronous preset of flip-flop |
| .AR | L | Asynchronous reset of flip-flop |
| .CE | L | CE input of enabled D-CE type flip-flop |
| .CK | L | Programmable clock of flip-flop |
| .CKMUX | L | Clock multiplexer selection |
| .D | L | D input of D-type flip-flop |
| .DFB | R | D registered feedback path selection |
| .DQ | R | Q output of D-type flip-flop |
| .INT | R | Internal feedback path for registered macrocell |
| .IO | R | Pin feedback path selection |
| .J | L | J input of JK-type output flip-flop |
| .K | L | K input of JK-type output flip-flop |
| .L | L | D input of transparent latch |
| .LE | L | Programmable latch enable |
| .LQ | R | Q output of transparent input latch |
| .OE | L | Programmable output enable |
| .R | L | R input of SR-type output flip-flop |
| .S | L | S input of SR-type output flip-flop |
| .SP | L | Synchronous preset of flip-flop |
| .T | L | T input of toggle output flip-flop |
| .TFB | R | T registered feedback path selection |

Figure 1-2 shows the use of extensions. Note that this figure does not represent an actual circuit but demonstrates how to use extensions to write equations for different functions in a circuit.
.AP Extension
The .AP extension is used to set the Asynchronous Preset of a register to an expression. For example, the equation "Y.AP = A&B;" causes the register to be asynchronously preset when A and B are logically true. This feature is supported by the ATF15XX family of devices.
.AR Extension
The .AR extension is used to define the expression for Asynchronous Reset for a register. This is used in devices that have one or more product terms connected to the Asynchronous Reset of the register. Devices that have pin-controlled reset inputs, such as the Microchip ATF15XX family, also use this suffix.
.CE Extension
The .CE extension is used for D-type registers that have a clock enable input (D-CE registers). It serves to specify the input to the clock enable term of the register. In devices that have D-CE registers, such as the ATF2500C and the ATF15XX, the CE terms, if not used, must be set to binary 1 so that the registers behave as D registers. Normally, the CUPL compiler or ATF15XX fitter will automatically do this for you.
.CK Extension
The .CK extension is used to select a product term driven clock. Some devices have the capability to connect the clock for a register to one or more pins or to a product term. The .CK extension will select the product term. Use this suffix to connect the clock for a register to the dedicated clock pin for any Microchip PLD that has this feature, except the ATF750C (refer to the .CKMUX Extension).
.CKMUX Extension
The .CKMUX extension is used to connect the pin clock to the register. This extension is used on the ATF750C device. Using this extension can reduce the number of products needed to implement the design into the Microchip PLD and can increase the AC timing performance of the design. Other Microchip PLDs, such as the ATF2500C and ATF15XX family, also have dedicated clock pins, but they are not specified with the .CKMUX extension. They use the .CK extension instead.
.D Extension
The .D extension is used to specify the D input to a D-type register. This option causes the compiler to configure the macrocells in the Microchip PLD device to D-type registers. For Microchip PLDs such as the ATF16V8B/C, ATF22V10B/C, ATF750C, and ATF2500C, the .D extension must be used for registered logic. Otherwise, CUPL will generate an error.
.DFB Extension
The .DFB extension is used when the macrocell on a Microchip device is configured for a combinatorial output, but the D register still remains connected to the output. This configuration is supported on the ATF750C and ATF2500C devices. The .DFB allows the registered representation of the combinatorial output to be fed back internally into the Microchip PLD.
.DQ Extension
The .DQ extension is used to specify an input D register. The use of the .DQ extension actually configures the input as registered. The .DQ extension is not used to specify the Q output from an output D register. This feature is available on the ATF15XX CPLDs.
.INT Extension
The .INT extension is used for selecting an internal feedback path. This can be used to specify the buried combinatorial feedback path for either a registered or combinatorial output. This feature is available for the ATF15XX CPLDs.
.IO Extension
The .IO extension is used to select pin feedback within the macrocell. This is useful when a design requires using an I/O pin as an input and also requires buried logic to be used within the same macrocell. It is also useful for implementing bi-directional outputs in CUPL. For examples of how to implement bi-directional I/O in CUPL, refer to the Tips on Using Test Vectors application note.
.J and .K Extensions
The .J and .K extensions are used to specify J and K inputs to a J-K register. Logic equations using these extensions can be written with the REGISTER SELECT keyword when the D or T-type target register is specified.
.L Extension
The .L extension is used to specify input into a latch. This extension is required to use the level-triggered latch feature available on the ATF15XX family of devices. The use of the .L extension causes the compiler to configure the macrocell as a latched output.
.LE Extension
The .LE extension is used to specify the latch enable equation for a latch. It is required for designs using the level-triggered latch feature available on the ATF15XX family of devices. The .LE extension causes a product term to be connected to the latch enable.
.LQ Extension
The .LQ extension is used to specify an input latch. The use of the .LQ extension configures the input as latched. The .LQ extension is not used to specify the Q output from an output latch. This feature is available on the ATF15XX family of devices.
.OE Extension
The .OE extension is used to specify a product term-driven output enable signal. It is required for using bi-directional I/O and the individually programmable output-enable product terms available on the ATF750C, ATF2500C and ATF15XX family of devices. Microchip PLDs that have pin-controlled OE inputs, such as the ATF15xx family, also use this suffix.
.S and .R Extensions
The .R and .S extensions are used to specify R (Reset) and S (Set) inputs to an SR register. Logic equations for the ATF15XX family can be written using these extensions if the REGISTER SELECT keyword is used and a D or T-type target register is specified.
.SP Extension
| Y.SP = A & B ; /* A and B are inputs */ |
causes the output Y to be preset synchronously with the local clock used in the macro-cell when inputs A and B are true. This feature is supported on the ATF22V10B/C, ATF750C and ATF2500C devices, which share synchronous preset product terms.
.T Extension
The .T Extension specifies the T input for a T register. The use of the T extension causes the compiler to configure the macrocell as a T-type register. This feature is supported on the ATF750C/2500C and ATF15XX family of devices.
.TFB Extension
The .TFB extension is used when the macrocell on a Microchip device is configured for a combinatorial output, but the T register still remains connected to the output. This configuration is supported on the ATF750C and ATF2500C devices. The .TFB allows the registered representation of the combinatorial output to be fed back internally into the Microchip PLD.
