contents.gifindex.gif

Using := for Alternative Flip-flop Types

In ABEL-HDL you can specify a variety of flip-flop types using attributes such as 'reg_D' and 'reg_JK'. However, the use of these attributes does not enforce the use of a specific flip-flop type when a device is selected later, and does not affect the meaning of the := assignment operator. The := assignment can be thought of as a memory operator. The type of register that most closely matches the := operator's behavior is the D-type flip-flop.

The primary use for attributes such as 'reg_D', 'reg_JK' and 'reg_SR' is to control the generation of logic. Specifying one of the 'reg_' attributes (for example, 'reg_D') instructs the ABEL-HDL compiler to generate equations using the.D extension regardless of whether the design was written using .D, := or some other method (for example, state diagrams).


Note: You need to also specify 'invert' or 'buffer' whenever using detailed syntax.


Using := for flip-flop types other than D-type is only possible if register synthesis features are available to convert the generated equations into equations appropriate for the alternative flip-flop type specified. Since the use of register synthesis to convert D-type flip-flop stimulus into JK or SR-type stimulus usually results in inefficient circuitry, the use of := for these flip-flop types is discouraged. Instead, you should use the .J and .K extensions (for JK-type flip-flops) or the .S and .R extensions (for SR-type flip-flops) and use a detailed description method (including 'invert' or 'buffer' attributes) to describe designs for these register types.

There is no provision in the language for directly writing pin-to-pin equations for registers other than D-type. State diagrams, however, may be used to describe pin-to-pin behavior for any register type.