DW EditSeite anzeigenÄltere VersionenLinks hierherAlles aus-/einklappenNach oben Diese Seite ist nicht editierbar. Sie können den Quelltext sehen, jedoch nicht verändern. Kontaktieren Sie den Administrator, wenn Sie glauben, dass hier ein Fehler vorliegt. CKG Editor ====== 6. Sequential Logic ====== "I Know What You Did Last Cycle" ===== 6.1 State Diagram, State Transition Diagram ===== ==== 6.1.1 Motivation ==== The diagrams of different states are well known from physics for example the state diagram (or better: phase diagram) of water, where its three states are: solid ice, liquid water and gaseous steam. The possible state transitions are due to temperature increase or decrease. In <imgref pic01> image (1) the states of water are shown on the temperature axis. When only the state transistions are relevant, the states are simplified to a circle, showing the state name and behaviour. The transitions are depict as arrows, where the needed condititon is written onto (See <imgref pic01> image (2) ). This diagram is called **state transition diagram**. <WRAP> <imgcaption pic01| States of Water> </imgcaption> {{drawio>SDwater}} </WRAP> For matter not only the dimension "temperature" is important, but also the "pressure". The full phase diagram is shown in <imgref pic02> image (1). By this, another variable is available and more transistions. These can be drawn into the state transition diagram (<imgref pic02> image (2)). <WRAP> <imgcaption pic02| States of Water> </imgcaption> {{drawio>SDwater2}} </WRAP> ==== 6.1.2 Simple logic Example ==== In German, often one has to pay for entering the toilet. An example of such a entrance control system is shown in <imgref pic03>. At this (artificial) example, one can pay either 50ct or 1€. \\ Once paid, the turnstile will release and one can enter. Once the turnstile was pushed the entrance is closed again. <WRAP> <imgcaption pic03| Entrance Control for Toilets> </imgcaption> {{drawio>EntranceFee}} </WRAP> The <imgref pic04> the state transition diagram is drawn. * The two states are that (1) the turnstile is opened and one is able to go through and (2) the turnstile is closed and one cannot enter anymore. * The transitions are given by the done actions: one can either insert a coin or push on the turnstile. Important here are some additional considerations: * For the state transition diagram one has to **look for all possible transitions**. So, also pushing a closed turnstile or inserting more coins have to taken into account. * A state transition diagram is not complete without a **legend** and without an **beginning/reset point**. The reset point is given by an arrow with "reset" written onto it <WRAP> <imgcaption pic04| State Transition Diagramm of the Entrance Control for Toilets> </imgcaption> {{drawio>STDEntranceFee}} </WRAP> Out of this state transition diagram one can create a table-like representation, see <imgref pic05>. <WRAP> <imgcaption pic05| State Transition Diagramm of the Entrance Control for Toilets> </imgcaption> {{drawio>STDEntranceFee2}} </WRAP> the inputs, outputs and states have to be encoded into binary, in order to investigate this table a bit more. How the binary value is connected to the outputs does not matter. We will choose the following coding: * Encoding of the states: turnstile closed ≙ $Q=0$, turnstile opened ≙ $Q=1$, * Encoding of the inputs: no coin inserted ≙ $Xc=0$, coin inserted ≙ $Xc=1$, turnstile not pushed ≙ $Xp=0$, turnstile pushed ≙ $Xp=1$, * Encoding of the outputs: disallow entrance ≙ $Y=0$, allow entrance ≙ $Y=1$, This table is shown in <imgref pic06> and is called **state transition table**. <WRAP> <imgcaption pic06| State Transition Diagramm of the Entrance Control for Toilets> </imgcaption> {{drawio>STDRSFF}} </WRAP> Interestingly, the logic circuit for this state transition table was already part of the course: it is the RS flip-flop! When looking deeper onto the table in <imgref pic06> one can substitute $Xc$ with $S$ (as in Set) and $Xp$ with $R$ (as in Reset) to directly get the truthtable of the RS flip flop. <WRAP><well> <imgcaption pic20|x ></imgcaption>\\ {{url>https://www.falstad.com/circuit/circuitjs.html?hideSidebar=true&ctz=CQAgjCAMB0l3BWcMBMcUHYMGZIA4UA2ATmIxAUgpABZsKBTAWjDACgwEls1xCrsCFHypUEHLiB5VMwwcNlQKEqq2FgMhcJu1aZ1cZxog0eESYzr+S4WInHTFhZac2l4mino1CxmmC0aM389Nk9vXylCYLNsaKgwr1pY+KCpIQTw5PTbKTwzSET6AXzsulEistwygMykn2M44MiQhIB3VwCBXi72qV5FQZdCjscNLXHdPtbFIJlhtg7W3ppiCesR5JlSubzjTd3sPH296bWTBEDzmjgzwNuWe4rR-HAaPzMwd77HFB2zP4FRYmV4oS4gSJg0IAJRATDwAkgxhYYDkSPAJmQMmgSBQOKUMHEABk4ZFeiirPoIAAzACGABsAM4MaibeGIxro3D7YHc8DEOQ9AV9PlgYV8vmbCVc3iS4FMMnWRXPCHGXpqcybZWqi6hDolE5i2zy2o3KiPN48joWr4fS19VTCtJG6afYUal0HN3CNKAzJiiGvF2EFye2jA-gA8GrLRQhIAI364FRJnF1UKif89EEsRQEA1B3OcZjmrYaHICrV1kr4D+tBAAA0y5ByLtZgiTDd6wBFQrlwNRrQIYUoLvGABa7AAHv01ZBvOiwJBAp2QIyAC4AewATrSAOYMNgzhD0DAAr7IYKrgDGm4AtvGAJYAO1pW+3j+vDIAOozv9-n2vR9t2vABXR911-I9aDiZBvFKJcV1HNd1zfQ8Z0IOsl3oEg5yQ4xN1A9cAAciObchIxMUph2cH0QHHL1thieZjSWDs-Uov1CiAA noborder}} </well></WRAP> <WRAP><well> <imgcaption pic21|x ></imgcaption>\\ {{url>https://www.falstad.com/circuit/circuitjs.html?hideSidebar=true&ctz=CQAgjCAMB0l3BWcMBMcUHYMGZIA4UA2ATmIxAUgpABZsKBTAWjDACgwEls1xCrsCFHypUEHLiB5VMwwcNlQoEqq2FgMhcJu1aZS8Zxog0eESYzr+S4UkMJjpiwsvOb1cTRT0ahYzTAtGjMAvTYvHz8pQhCzbBjlCNo4hOCpIUTvZPThATwzSHCsvNjaXEyfEPK00IraKPiQqNrCgHc3QIFeTuV26TdFRTaTfF0xjTD22sVgmVdh2p6aYi0ehbw54VmpPGN1vL2dvbYplZMaKmWguF7aM4uqFmvRE5GzMBp-d8-bpxR87L-AqvP4ILRRFBg5QAJRATA2UkgxhYYDkSPAJmQMmgSBQOKUMHEABk4VEeiirPoIAAzACGABsAM4MajDeECdG4Yxc248sDEOTdAW89H8tHc9HDHnS3g8tlk6wKl7tJXgVHmYaqiFQ4YHJRi25PWg3I0fY7tU0-NJm26qYXW4XrcDCtTO3KvB1bMxAxL8kAYDIGvCBN1KGivQhQlAoYwBhQx25xkxQyNaSFhABGUnU6pQwuw5UKWYC9EEcRQEFdCzOMcuZzWbDQ5CYqpbxlRIRAAA1G5ByFdzAOO7QQABFdhN5KbKfnS5jwqTpPR2PxN4jgBaKF75CXUJwaYuG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