summaryrefslogtreecommitdiffstats
path: root/Bachelor/Digitaltechnik 2/SS07/P6/abel.ex2.html
diff options
context:
space:
mode:
Diffstat (limited to 'Bachelor/Digitaltechnik 2/SS07/P6/abel.ex2.html')
-rw-r--r--Bachelor/Digitaltechnik 2/SS07/P6/abel.ex2.html169
1 files changed, 169 insertions, 0 deletions
diff --git a/Bachelor/Digitaltechnik 2/SS07/P6/abel.ex2.html b/Bachelor/Digitaltechnik 2/SS07/P6/abel.ex2.html
new file mode 100644
index 0000000..006cd54
--- /dev/null
+++ b/Bachelor/Digitaltechnik 2/SS07/P6/abel.ex2.html
@@ -0,0 +1,169 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<html><head><title>Finite State Machine (Moore) example: string detector</title>
+
+
+
+ <meta name="GENERATOR" content="User-Agent: Mozilla/3.0Gold (Macintosh; I; PPC)">
+ <meta name="Author" content="J. Van der Spiegel"></head><body>
+
+<h1 align="center"><i><font size="+1">University of Pennsylvania</font></i>
+</h1>
+
+<center><p><i><font size="+1">Department of Electrical Engineering </font></i><br>
+<br>
+</p></center>
+
+<center><p><b>Finite State Machine implemented as a Moore Machine: </b></p></center>
+
+<center><p><b>a non-resetting sequence recognizer.</b><br>
+</p></center>
+
+<p>The following state diagram (Fig. 1) describes a finite state machine
+with one input X and one output Z. The FSM asserts its output Z when it
+recognizes the following input bit sequence: "1011". The machine
+will keep checking for the proper bit sequence and does not reset to the
+initial state after it has recognized the string. As an example the input
+string X= "..1011011..." will cause the output to go high twice:
+Z = "..0001001.." . The output will asserts only when it is in
+state S4 (after having seen the sequence 1011). The FSM is thus a Moore
+machine.<br>
+<br>
+</p>
+
+<center><p><img src="abel.ex2-Dateien/abel_002.gif" height="94" width="336"></p></center>
+
+<p>Figure 1: State diagram, describing the sequence detector implemented
+as a Moore machine. The number in italics underneath the states indicate
+which part of the sequence the state remembers.<br>
+</p>
+
+<p>This state diagram can be described in ABEL code given in Listing 1.
+The output is described after the STATE Si: statement. <br>
+</p>
+
+<p><font color="#000000">Listing 1: ABEL source code for the Moore machine
+implementation of the sequence detector described in Fig. 1</font><br>
+</p>
+
+<ul>
+<p><font size="-1"><font face="Courier"><font color="#000000">module Seqdet2</font></font>
+<br>
+<font face="Courier"><font color="#000000">Title 'Sequence detector implemented
+as Moore machine'<br>
+Declarations<br>
+"input and output signals</font></font></font></p>
+
+<p><font size="-1"><font face="Courier"><font color="#000000">X, CLOCK, RST
+PIN;</font></font> <br>
+<font face="Courier"><font color="#000000">Z PIN istype 'com';</font></font>
+<br>
+<font face="Courier"><font color="#000000">Q2, Q1, Q0 PIN istype 'reg';</font></font>
+</font></p>
+
+<p><font size="-1"><font face="Courier"><font color="#000000">"State
+register declarations</font></font> </font></p>
+
+<p><font size="-1"><font face="Courier"><font color="#000000">SREG = [Q2,Q1,Q0];</font></font>
+<br>
+<font face="Courier"><font color="#000000">S0 = [0,0,0];</font></font>
+<br>
+<font face="Courier"><font color="#000000">S1 = [0,0,1];</font></font>
+<br>
+<font face="Courier"><font color="#000000">S2 = [0,1,0];</font></font>
+<br>
+<font face="Courier"><font color="#000000">S3 = [0,1,1];</font></font>
+<br>
+<font face="Courier"><font color="#000000">S4 = [1,0,0];</font></font></font><br>
+</p>
+
+<p><font face="Courier"><font color="#000000"><font size="-1">Equations<br>
+"Definition of the state machine clock signal</font></font></font></p>
+
+<p><font size="-1"><font face="Courier"><font color="#000000">[Q2,Q1,Q0].AR
+= RST;</font></font> <br>
+<font face="Courier"><font color="#000000">[Q2,Q1,Q0].CLK = CLOCK;</font></font></font><br>
+</p>
+
+<p><font size="-1"><font face="Courier"><font color="#000000">"Define
+state diagram</font></font> <br>
+<font face="Courier"><font color="#000000">STATE_DIAGRAM SREG</font></font>
+</font></p>
+
+<p><font size="-1"><font face="Courier"><font color="#000000">STATE S0: Z=0;</font></font>
+</font></p>
+
+<ul>
+<p><br>
+<font size="-1"><font face="Courier"><font color="#000000">IF X THEN S1 ELSE
+S0;</font></font> </font></p>
+</ul>
+
+<p><font size="-1"><font face="Courier"><font color="#000000">STATE S1: Z=0;</font></font>
+</font></p>
+
+<ul>
+<p><font size="-1"><font face="Courier"><font color="#000000">IF X THEN S1
+ELSE S2;</font></font> </font></p>
+</ul>
+
+<p><font face="Courier"><font color="#000000"><font size="-1">STATE S2: Z=0;
+</font></font></font></p>
+
+<ul>
+<p><font size="-1"><font face="Courier"><font color="#000000">IF X THEN S3
+ELSE S0;</font></font> </font></p>
+</ul>
+
+<p><font size="-1"><font face="Courier"><font color="#000000">STATE S3: Z=0;</font></font>
+</font></p>
+
+<ul>
+<p><font size="-1"><font face="Courier"><font color="#000000">IF X THEN S4
+ELSE S2;</font></font> </font></p>
+</ul>
+
+<p><font size="-1"><font face="Courier"><font color="#000000">STATE S4: Z=1;</font></font>
+</font></p>
+
+<ul>
+<p><font size="-1"><font face="Courier"><font color="#000000">IF X THEN S1
+ELSE S2;</font></font> </font></p>
+</ul>
+
+<p><font face="Courier"><font color="#000000"><font size="-1">end Seqdet2</font></font></font><br>
+</p>
+</ul>
+
+<p>The corresponding simulation is shown in Figure 2. </p>
+
+<center><p><br>
+<img src="abel.ex2-Dateien/abel.gif" height="334" width="537"><br>
+<br>
+</p></center>
+
+<center><p>Figure 2: Simulation of the sequence detector (for "1011")
+described with the state diagram of Fig. 1. (Screen clip from Xilinx XACTstep(TM)
+Foundation software)<br>
+</p></center>
+
+<p>One notices that the output asserts after the input sequence 1011 as
+specified.<br>
+</p>
+
+<p>
+</p><hr width="100%"><font size="-1">Back to ABEL Primer <a href="http://www.ee.upenn.edu/rca/software/abel/abel.primer.html#Contents">Contents</a>
+| To to <a href="http://www.ee.upenn.edu/rca/software/xilinx/foundation/commistakes.html">Common
+Mistakes</a> list | Go to the <a href="http://www.ee.upenn.edu/rca">EE
+Undergraduate Lab</a> Homepage | Go to <a href="http://www.ee.upenn.edu/rca/software/xilinx.html">Xilinx
+Lab Tutorial</a> Homepage | Go to the <a href="http://www.ee.upenn.edu/rca/software/xilinx/foundation/foundation.sch1.html">Foundation
+Tutorial</a> page | Go to <a href="http://www.seas.upenn.edu/%7Eee200/">EE200
+</a>or <a href="http://www.seas.upenn.edu/%7Eee200/lab/lab.html">EE200 Lab</a>
+Homepage |</font><p></p>
+
+<p>
+</p><hr width="100%">Created by J. Van der Spiegel: November 16, 1997. Updated
+by J. Van der Spiegel, Nov. 19, 1997.<br>
+<p></p>
+
+
+</body></html> \ No newline at end of file