160 likes | 167 Views
Learn about registers, state machines, and analysis techniques in section 7-1 and section 5-4 of the course. Understand the definition of registers, their functions, and how to design state machines that go through a sequence of events. Analyze sequential circuits using state tables and state diagrams.
E N D
Registers; State Machines Analysis Section 7-1 Section 5-4
Definition • Register – a set of flip-flops • May include extensive logic to control state transition • register also refers to fast memory for storing data in a computer
Simple Register • Store D = (D0 D1 D2 D3) • On positive edge of Clock • Clear signal normally high • Power-up reset
Register with Load Control • If load signal is H • D0 , D1 , D2 , D3 reach inputs of FFs • If load signal is L, Q is fed back • Q0 , Q1 , Q2 , Q3 reach inputs of FFs • FFs Keep same value
State Machines: Analysis and Design • How to design machines that go through a sequence of events • Basically close this loop
Analysis of Sequential Circuits • Earlier we learned how to analyze combinational circuits • Now extend to synchronous sequential • Include time • We’ll use state tables and state diagrams
Input Equations: D FF Example Describe inputs to FF with logic equations
Determining Next State and Output Current state= {A(t), B(t)} = values stored in FFs during clock t Next state= {A(t+1), B(t+1) = values stored in FFs during clock t+1}
Determining Next State and Output The current state {A(t), B(t)} & input X are used to determine next state {A(t+1), B(t+1)}
Determining Next State and Output (cont.) Current state & input X are used to determine output, Y • Synchronous circuit • State transitions are at positive edge of clock
At time t+1 At time t State Table • Just truth table with state added
Two Dimensional State Table • Same thing, different layout
Sequential Circuit Types • Moore model – outputs depend on states • Mealy model – outputs also depend on inputs
Inputs State/Output State Diagram • Alternative representation for state table • Moore: outputs depend only on states
Input/Output --------------------------------------------- State Table for Circuit of Figure 5-15 Mealy Model • Output depends on input and state State Table for Circuit of Figure 6-17
State Table vs. Diagram • Same information • Table is perhaps easier to fill in from description • Diagram is easier for understanding and writing code • You can label states with English description