fix missing-override warnings on Scilab types
[scilab.git] / scilab / modules / xcos / help / en_US / palettes / Integer_pal / JKFLIPFLOP_content.dbk
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3  * Xcos
4  *
5  * Copyright (C) INRIA - METALAU Project <scicos@inria.fr> (HTML version)
6  * Copyright (C) DIGITEO - Scilab Consortium (XML Docbook version)
7  * Copyright 2011 - Bernard DUJARDIN <bernard.dujardin@contrib.scilab.org>
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  *  (at your option) any later version.
13  * 
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU General Public License for more details.
18  * 
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22  * 
23  * See the file ./license.txt
24  -->
25 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xmln.mml="http://www.w3.org/1998/Math/MathML">
26     <refnamediv>
27         <refname>JKFLIPFLOP</refname>
28         <refpurpose id="Purpose_JKFLIPFLOP">JK flip-flop</refpurpose>
29     </refnamediv>
30     <refsection id="Description_JKFLIPFLOP">
31         <title>Description</title>
32         <para>
33             The JK flip flop is the most versatile of the basic flip-flops. It has two inputs traditionally labeled
34             <emphasis role="bold">J</emphasis> (Set) and <emphasis role="bold">K</emphasis> (Reset).
35         </para>
36         <itemizedlist>
37             <listitem>
38                 <para>
39                     When the inputs  <emphasis role="bold">J</emphasis> and <emphasis role="bold">K</emphasis>
40                     are different, the output <emphasis role="bold">Q</emphasis> takes the value of
41                     <emphasis role="bold">J</emphasis> at the next falling edge.
42                 </para>
43                 <para/>
44             </listitem>
45             <listitem>
46                 <para>
47                     When the inputs <emphasis role="bold">J</emphasis> and <emphasis role="bold">K</emphasis> are both low, no change occurs in the output state.
48                 </para>
49                 <para/>
50             </listitem>
51             <listitem>
52                 <para>
53                     When the inputs are both high the output <emphasis role="bold">Q</emphasis> will toggle from
54                     one state to other. It can perform the functions of the set/reset (SR) flip-flop and has the advantage that there are no ambiguous states.
55                 </para>
56             </listitem>
57         </itemizedlist>
58         <para>
59             The <emphasis role="bold">!Q</emphasis> output is the logical negation of <emphasis role="bold">Q</emphasis>
60         </para>
61         <para>
62             It can also act as a T flip-flop to accomplish toggling action if <emphasis role="bold">J</emphasis>
63             and <emphasis role="bold">K</emphasis> are tied together. This toggle application finds extensive use
64             in binary counters.
65         </para>
66         <para>
67             The user can set the initial output state with <emphasis role="bold">Initial Value</emphasis>
68             parameter.
69         </para>
70         <para> The truth table of this block is:</para>
71         <para/>
72         <informaltable border="1" cellpadding="3">
73             <tr>
74                 <td align="left">
75                     <latex><![CDATA[\boldsymbol{J}]]></latex>
76                 </td>
77                 <td align="left">
78                     <latex><![CDATA[\boldsymbol{K}]]></latex>
79                 </td>
80                 <td align="left">
81                     <latex><![CDATA[\boldsymbol{Q_n}]]></latex>
82                 </td>
83                 <td align="left">
84                     <latex><![CDATA[\boldsymbol{!Q_n}]]></latex>
85                 </td>
86                 <td align="left"/>
87             </tr>
88             <tr>
89                 <td align="left">
90                     <latex><![CDATA[0]]></latex>
91                 </td>
92                 <td align="left">
93                     <latex><![CDATA[0]]></latex>
94                 </td>
95                 <td align="left">
96                     <latex><![CDATA[Q_{n-1}]]></latex>
97                 </td>
98                 <td align="left">
99                     <latex><![CDATA[!Q_{n-1}]]></latex>
100                 </td>
101                 <td align="left">Hold</td>
102             </tr>
103             <tr>
104                 <td align="left">
105                     <latex><![CDATA[0]]></latex>
106                 </td>
107                 <td align="left">
108                     <latex><![CDATA[1]]></latex>
109                 </td>
110                 <td align="left">
111                     <latex><![CDATA[0]]></latex>
112                 </td>
113                 <td align="left">
114                     <latex><![CDATA[1]]></latex>
115                 </td>
116                 <td align="left">Reset</td>
117             </tr>
118             <tr>
119                 <td align="left">
120                     <latex><![CDATA[1]]></latex>
121                 </td>
122                 <td align="left">
123                     <latex><![CDATA[0]]></latex>
124                 </td>
125                 <td align="left">
126                     <latex><![CDATA[1]]></latex>
127                 </td>
128                 <td align="left">
129                     <latex><![CDATA[0]]></latex>
130                 </td>
131                 <td align="left">Set</td>
132             </tr>
133             <tr>
134                 <td align="left">
135                     <latex><![CDATA[1]]></latex>
136                 </td>
137                 <td align="left">
138                     <latex><![CDATA[1]]></latex>
139                 </td>
140                 <td align="left">
141                     <latex><![CDATA[!Q_{n-1}]]></latex>
142                 </td>
143                 <td align="left">
144                     <latex><![CDATA[Q_{n-1}]]></latex>
145                 </td>
146                 <td align="left">Toggle</td>
147             </tr>
148         </informaltable>
149         <para>
150             where 
151             <emphasis><literal>
152                     Q<subscript>n-1</subscript>
153                 </literal>
154             </emphasis>
155             is the previous state of
156             <emphasis><literal>
157                     Q<subscript>n</subscript>
158                 </literal>
159             </emphasis>
160             .
161         </para>
162         <refsection id="Data_Type_JKFLIPFLOP">
163             <title>Data types</title>
164             <para>
165                 The block supports the following types :
166             </para>
167             <itemizedlist>
168                 <listitem>
169                     <para>
170                         Inputs:
171                     </para>
172                     <itemizedlist>
173                         <listitem>
174                             <para>
175                                 <emphasis role="bold">J</emphasis>: scalar. Scilab's int8 data type only.
176                             </para>
177                         </listitem>
178                         <listitem>
179                             <para>
180                                 <emphasis role="bold">clk</emphasis>: scalar. Scilab's real double.
181                             </para>
182                         </listitem>
183                         <listitem>
184                             <para>
185                                 <emphasis role="bold">K</emphasis>: scalar. Scilab's int8 data type only.
186                             </para>
187                         </listitem>
188                     </itemizedlist>
189                     <para>
190                         A positive input is considered as logical 1, a negative or a null input as logical 0.
191                     </para>
192                     <para/>
193                 </listitem>
194                 <listitem>
195                     <para>
196                         Outputs: scalar. Scilab's int8 data type.
197                     </para>
198                 </listitem>
199             </itemizedlist>
200         </refsection>
201     </refsection>
202     <refsection id="Examples_JKFLIPFLOP">
203         <title>Example</title>
204         <para>
205             The following example builds a 3 bits asynchronous counter with JK flipflops wired as T flipflops. You can show on the
206             right the timing diagram of the 
207             <emphasis><literal>
208                     Q<subscript>0</subscript>
209                 </literal>
210             </emphasis>
211             to 
212             <emphasis><literal>
213                     Q<subscript>2</subscript>
214                 </literal>
215             </emphasis>
216             outputs of counter.
217         </para>
218         <para>
219             <link type="scilab" linkend="scilab.zcos/xcos/examples/integer_pal/en_US/JKFLIPFLOP_en_US.zcos">
220                 <inlinemediaobject>
221                     <imageobject>
222                         <imagedata fileref="../../../../examples/integer_pal/en_US/JKFLIPFLOP_en_US.zcos" align="center" valign="middle"/>
223                     </imageobject>
224                 </inlinemediaobject>
225             </link>
226                 </para>
227         <scilab:image><![CDATA[
228 importXcosDiagram(SCI + "/modules/xcos/examples/integer_pal/en_US/JKFLIPFLOP_en_US.zcos");
229 xcos_simulate(scs_m, 4);
230 ]]></scilab:image>
231     </refsection>
232     <refsection role="see also" id="Seealso_JKFLIPFLOP">
233         <title>See also</title>
234         <itemizedlist>
235             <listitem>
236                 <link linkend="DLATCH">DLATCH</link>
237             </listitem>
238             <listitem>
239                 <link linkend="DFLIPFLOP">DFLIPFLOP</link>
240             </listitem>
241             <listitem>
242                 <link linkend="SRFLIPFLOP">SRFLIPFLOP</link>
243             </listitem>
244         </itemizedlist>
245     </refsection>
246 </refentry>