General Description: How do I create a soft flip-flop with Q-bar output?
ソリューション
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);