Fig 1.2 Data Transmission TableSync Data Output100000010000000011011100100001010101101
First Design - Principles and Description
The goal of FSMs is to describe a circuit with inputsand outputs. We modify the FSM, by adding outputsto each state. The first design corresponds to theMoore Machine wherein the FSM uses only entryFig 1.3 Binary State Transition Tableactions, i.e. when you transition into the state, theoutput corresponding to the state is only produced.The first step in building this circuit was makingsome basic assumptions that are needed to make the problem easier. In order to perform the two’scomplement we will use a simplified method to makethe two’s complement. Starting with the leastsignificant bit, copy all bits until we reach the first 1.Then we will copy that 1, and complement all bits moresignificant than it.The following state diagram (Fig. 1.2) describes a finitestate machine with one input X and one output Z. TheFSM asserts its output Z when it recognizes thefollowing input bit sequence: "1011". The machine willkeep checking for the proper bit sequence and does notreset to the initial state after it has recognized the string.The output will assert only when it is in state S4 (after having seen the sequence 1011). The FSM is thus aMoore machine..
1 (B) ..1
2 (C) ..10
3 (D) ..101
Fig 1.4 Moore State MachineState E is a “new” state, because the output of 1 must be associated with some state.
Moore – Programmatic Representation
A programmatic representation of
Moore machineimplementation of the sequence detector
module isas followsModule Seqdetect1Title 'Moore Machine Sequence Detector'Declarations"input and output signals"X, CLOCK, RST PIN;Z PIN istype 'com';Q2, Q1, Q0 PIN istype 'reg';"State register declarationsState Meaning Binary ValueS
Reset State = Initial State – Output= 0 0,0,0S
Receive the first input of the data – Output = 1(No previous one’s has been received.)0,0,1S
Received a second input =1 - Output = 0 0,1,0S
Received continuous 1’s – Output = 1 (initial zero) 0,1,1S
Received continuous 0’s – Output = 0 (initial one) 1,0,0