AR# 7537

XPLA Professional - How do I create a soft flip-flop with Q-bar output?

Description

Keywords: XPLA, Professional, CoolRunner, fitter, flip-flop, FF, inverted,
macrocell, q-bar, qbar, combinatorial

Urgency: Standard

General Description:
How do I create a soft flip-flop with Q-bar output?

Solution

The following code creates a combinatorial flip-flop with an
inverted output:

Module qbar
Title 'qbar'

DECLARATIONS

d pin;
clk pin;
rst pin;
il node istype 'com,keep,retain';
q pin istype 'com,keep,retain';

EQUATIONS

" code to create q_not input
" note - rst is active high. rst is required to make this work
il = (!q & !clk) # (il & clk) # (!q & il);
q = (il & clk & !rst ) # (q & !clk & !rst) # (il & q & !rst);

END
AR# 7537
Date 05/28/2002
Status Archive
Type General Article