Answers Database


XPLA Professional: Creating a soft flip-flop with Q-bar output.


Record #7537

Product Family: Software

Product Line: CoolRunner

Product Part: XPLA Fitter

Problem Title:
XPLA Professional: Creating a soft flip-flop with Q-bar output.


Problem Description:
Urgency: Standard

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


Solution 1:

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




End of Record #7537 - Last Modified: 10/11/99 17:12

For the latest news, design tips, and patch information on the Xilinx design environment, check out the Technical Tips!