Learning Objectives: Practice designing and simulating digital circuits including flip flops Experience state machine design procedure

Similar documents
Designing Information Devices and Systems I Spring 2019 Lecture Notes Note 17

Lab #2: Kinematics in 1-Dimension

Topic Astable Circuits. Recall that an astable circuit has two unstable states;

More Digital Logic. t p output. Low-to-high and high-to-low transitions could have different t p. V in (t)

LabQuest 24. Capacitors

EE 301 Lab 2 Convolution

Phys1112: DC and RC circuits

Simulation-Solving Dynamic Models ABE 5646 Week 2, Spring 2010

EECE251. Circuit Analysis I. Set 4: Capacitors, Inductors, and First-Order Linear Circuits

CHAPTER 12 DIRECT CURRENT CIRCUITS

A First Course on Kinetics and Reaction Engineering. Class 19 on Unit 18

1. Kinematics I: Position and Velocity

EECS 2602 Winter Laboratory 3 Fourier series, Fourier transform and Bode Plots in MATLAB

LAB 5: Computer Simulation of RLC Circuit Response using PSpice

SPH3U: Projectiles. Recorder: Manager: Speaker:

Problem Set 11(Practice Problems) Spring 2014

Constant Acceleration

HW6: MRI Imaging Pulse Sequences (7 Problems for 100 pts)

Reading from Young & Freedman: For this topic, read sections 25.4 & 25.5, the introduction to chapter 26 and sections 26.1 to 26.2 & 26.4.

RC, RL and RLC circuits

Lab 10: RC, RL, and RLC Circuits

2.7. Some common engineering functions. Introduction. Prerequisites. Learning Outcomes

The equation to any straight line can be expressed in the form:

EE100 Lab 3 Experiment Guide: RC Circuits

04. Kinetics of a second order reaction

Two Coupled Oscillators / Normal Modes

The average rate of change between two points on a function is d t

( ) ( ) if t = t. It must satisfy the identity. So, bulkiness of the unit impulse (hyper)function is equal to 1. The defining characteristic is

Chapter 2: Logical levels, timing and delay

THE UNIVERSITY OF TEXAS AT AUSTIN McCombs School of Business

i L = VT L (16.34) 918a i D v OUT i L v C V - S 1 FIGURE A switched power supply circuit with diode and a switch.

V AK (t) I T (t) I TRM. V AK( full area) (t) t t 1 Axial turn-on. Switching losses for Phase Control and Bi- Directionally Controlled Thyristors

EECS 141: FALL 00 MIDTERM 2

Basic Circuit Elements Professor J R Lucas November 2001

Biol. 356 Lab 8. Mortality, Recruitment, and Migration Rates

Section 3.5 Nonhomogeneous Equations; Method of Undetermined Coefficients

Decimal moved after first digit = 4.6 x Decimal moves five places left SCIENTIFIC > POSITIONAL. a) g) 5.31 x b) 0.

FITTING EQUATIONS TO DATA

PET467E-Analysis of Well Pressure Tests/2008 Spring Semester/İTÜ Midterm Examination (Duration 3:00 hours) Solutions

Notes 04 largely plagiarized by %khc

non-linear oscillators

Some Basic Information about M-S-D Systems

Overview. COMP14112: Artificial Intelligence Fundamentals. Lecture 0 Very Brief Overview. Structure of this course

d 1 = c 1 b 2 - b 1 c 2 d 2 = c 1 b 3 - b 1 c 3

Physical Limitations of Logic Gates Week 10a

KINEMATICS IN ONE DIMENSION

Predator - Prey Model Trajectories and the nonlinear conservation law

Linear Circuit Elements

Linear Time-invariant systems, Convolution, and Cross-correlation

Lecture 2-1 Kinematics in One Dimension Displacement, Velocity and Acceleration Everything in the world is moving. Nothing stays still.

EXERCISES FOR SECTION 1.5

Spring Ammar Abu-Hudrouss Islamic University Gaza

Single and Double Pendulum Models

L1, L2, N1 N2. + Vout. C out. Figure 2.1.1: Flyback converter

HV513 8-Channel Serial to Parallel Converter with High Voltage Push-Pull Outputs, POL, Hi-Z, and Short Circuit Detect

HOMEWORK # 2: MATH 211, SPRING Note: This is the last solution set where I will describe the MATLAB I used to make my pictures.

Chapters 6 & 7: Trigonometric Functions of Angles and Real Numbers. Divide both Sides by 180

dy dx = xey (a) y(0) = 2 (b) y(1) = 2.5 SOLUTION: See next page

Electrical Circuits. 1. Circuit Laws. Tools Used in Lab 13 Series Circuits Damped Vibrations: Energy Van der Pol Circuit

h[n] is the impulse response of the discrete-time system:

Dual Current-Mode Control for Single-Switch Two-Output Switching Power Converters

Signal and System (Chapter 3. Continuous-Time Systems)

Matlab and Python programming: how to get started

Brock University Physics 1P21/1P91 Fall 2013 Dr. D Agostino. Solutions for Tutorial 3: Chapter 2, Motion in One Dimension

Let us start with a two dimensional case. We consider a vector ( x,

Morning Time: 1 hour 30 minutes Additional materials (enclosed):

8. Basic RL and RC Circuits

Testing What You Know Now

The problem with linear regulators

Electrical and current self-induction

1.6. Slopes of Tangents and Instantaneous Rate of Change

a 10.0 (m/s 2 ) 5.0 Name: Date: 1. The graph below describes the motion of a fly that starts out going right V(m/s)

Modal identification of structures from roving input data by means of maximum likelihood estimation of the state space model

INDEX. Transient analysis 1 Initial Conditions 1

Chapter 7: Solving Trig Equations

15. Bicycle Wheel. Graph of height y (cm) above the axle against time t (s) over a 6-second interval. 15 bike wheel

Math 333 Problem Set #2 Solution 14 February 2003

UNC resolution Uncertainty Learning Objectives: measurement interval ( You will turn in two worksheets and

1. VELOCITY AND ACCELERATION

Chapter 7 Response of First-order RL and RC Circuits

Chapter 8 The Complete Response of RL and RC Circuits

AP Chemistry--Chapter 12: Chemical Kinetics

Synthesis of Reversible Synchronous Counters

Università degli Studi di Roma Tor Vergata Dipartimento di Ingegneria Elettronica. Analogue Electronics. Paolo Colantonio A.A.

ADDITIONAL PROBLEMS (a) Find the Fourier transform of the half-cosine pulse shown in Fig. 2.40(a). Additional Problems 91

first-order circuit Complete response can be regarded as the superposition of zero-input response and zero-state response.

IB Physics Kinematics Worksheet

13.3 Term structure models

You must fully interpret your results. There is a relationship doesn t cut it. Use the text and, especially, the SPSS Manual for guidance.

RL Lecture 7: Eligibility Traces. R. S. Sutton and A. G. Barto: Reinforcement Learning: An Introduction 1

Inventory Analysis and Management. Multi-Period Stochastic Models: Optimality of (s, S) Policy for K-Convex Objective Functions

Chapter 3 Kinematics in Two Dimensions

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Department of Physics Spring Experiment 9: Faraday s Law of Induction

STATE-SPACE MODELLING. A mass balance across the tank gives:

LAB 6: SIMPLE HARMONIC MOTION

V L. DT s D T s t. Figure 1: Buck-boost converter: inductor current i(t) in the continuous conduction mode.

Math Week 14 April 16-20: sections first order systems of linear differential equations; 7.4 mass-spring systems.

Lesson 3.1 Recursive Sequences

23.2. Representing Periodic Functions by Fourier Series. Introduction. Prerequisites. Learning Outcomes

Random Walk with Anti-Correlated Steps

Transcription:

Lab 4: Synchronous Sae Machine Design Summary: Design and implemen synchronous sae machine circuis and es hem wih simulaions in Cadence Viruoso. Learning Objecives: Pracice designing and simulaing digial circuis including flip flops Experience sae machine design procedure Resources and Supplies: Engineering PC wih PuTTY and Xming Lab4A.x & Lab4B.x* Sae Machine Inroducion* All documens* are available on he class websie Imporan Noe Spring 203: We have made a change o he 33 Viruoso library. Before using Viruoso again, you mus re-run he seup scrip below in your ECE33/viruoso direcory o insall he new library. source $SOFT/cadence-auo Pre-lab Assignmen: Each suden mus complee his/her own pre-lab before coming o he lab. Pre-lab checkoff shees mus be urned in o he TA before saring he lab assignmen.. Read he Background secions of his lab. 2. Prin he Pre-lab 4 Check-off Shee near he end of his documen and perform he required asks. Show he compleed shee o he TA a he beginning of your lab. 3. Read hrough he enire Laboraory Assignmen secion so you know wha o expec in he lab. Background: D-ype Flip Flop Flip flops (FF) are daa sorage elemens for synchronous circuis ha have circui blocks riggered simulaneously and periodically by a clock signal. FFs are used o sore he logic sae of a signal unil he nex rising (or falling) edge of he clock signal when he oupu is reevaluaed and sored again. FFs are conrolled by a clock signal and one or wo daa inpu signals, and hey ypically have differenial (invered) oupus Q and Q. There are several variaions of FFs including JK and SR ype FFs. However, he mos common FF used in digial inegraed circuis is he D-ype FF (DFF). In a DFF, he value of inpu D is ransferred o he oupu Q a he rising (or falling) clock edge and held here unil he nex rising (or falling) edge. The sandard schemaic symbol for a DFF is shown below along wih a iming diagram for a posiive edge riggered DFF. In his lab you will use a DFF o creae sae machines. The DFF cell provided in your Viruoso cell library is a posiive edge riggered circui. Refer o ECE33 Handou 0: 230 Review for addiional background informaion on flip flops. p.

Synchronous sae sequencer: Unless you are very familiar wih sae machine design, you firs need o carefully read he Sae Machine Inroducion documen for a horough descripion of he implemenaion of sae machines using flip flops. Once you are familiar wih he sae machine design process, reurn here for informaion on implemening sae machines using DFFs. Figure illusraes he sae ransiions for an example 2-bi sequencer. Synchronous sae machines are ypically implemened using flip-flop circuis. In his lab you will be asked o design and implemen a sae machine using D-ype flip flops (DFF). Figure. Saes in an example 2-bi synchronous sae sequencer. To consruc he Figure sae sequencer using DFFs, you would follow he same seps as shown in he Sae Machine Inroducion documen for an SR flip flop. However, because he DFF is funcionally differen han he SR or JK flip flops, i has a differen ruh able and exciaion able resuling in a differen sae machine implemenaion. Table shows he ruh able and exciaion able for a DFF. Because he DFF only has one daa inpu, i has fewer funcions and is exciaion able is less complex han he SR or JK. This feaure generally resuls in more complex glue logic needed o implemen a sae sequencer. ruh able exciaion able D Q + acion Q Q + acion D 0 0 hold 0 0 hold 0 se 0 se 0 rese 0 rese 0 hold ---------- hold Table. Truh able and exciaion able for a DFF. Table shows he operaion of he DFF is really quie simple; he nex sae oupu, Q +, is always he same as he inpu D a he ime of he clock edge rigger. The following seps provide an example of how he sae sequencer in Figure could be designed using DFFs. p. 2

Sep : nex-sae exciaion able Table 2 shows each curren sae of he Figure sequencer and is associaed nex sae ha defines he sequencing of he sae machine. Using he DFF exciaion able (Table ), he required inpu values for each sae can hen be deermined, as shown in Table 2. As you should expec for a DFF implemenaion, he required inpus are simply he nex sae oupu values. I is imperaive ha you undersand how Table 2 was generaed because you will be repeaing his in he pre-lab for a more complex sequencer. curren sae nex sae Bi inpu Bi 0 inpu Q + Q + D D 0 0 0 0 0 0 0 0 0 Table 2. Nex-sae exciaion able for Fig. sequencer. Sep 2: Inpu ruh ables The daa in Table 2 can be rearranged o show he ruh able for each inpu bi (D, D 0 ) based on he curren-sae oupu values. Table 3 shows he ruh ables for all inpus, uniquely defining he inpus needed o mach he sequence in Figure. I is imporan ha you undersand how Table 3 was generaed because you will be repeaing his in he pre-lab for a more complex sequencer. Q D Q D 0 0 0 0 0 0 0 0 0 Table 3. Inpu ruh ables based on curren-sae oupus of Fig. sequencer. Sep 3: Minimize logic expression for all inpus Table 3 defines each flip flop inpu as a funcion of he 2-bi sae oupus (Q - ). We mus nex minimize his expression o define he simples logic circui possible for each inpu. The K-maps in describe he relaionship for each inpu and can be used o deermine he minimized logic expression shown below each K-map. Again, you mus be able o perform his sep in he pre-lab for a more complex sequencer. D Q 0 D 0 Q 0 0 D =, D 0 = Q --- p. 3

Sep 4: Circui implemenaion Based on he equaions from sep 3, you should now be able o skech he schemaic of he Figure 2-bi sequencer using he DFF and, as necessary, basic logic gaes. This ask will be compleed as a pre-lab exercise. Noe ha he DFF provides Q and Q oupus, so you do no need an INV gae o complemen he Q oupu. Sae machine: non-sequenced saes: Figure 2 shows he sae model of a specific 3-bi sequence generaor ha operaes only in he 00, 00, 0, 0 saes. Any of he remaining non-sequenced saes (000, 00, 0, ) should reurn o 0 so he sequencer can coninue o operae wihin he four sequenced saes. Figure 2. 3-bi sae sequencer. Laboraory Assignmen: This lab consiss of wo pars. A check-off shee is included a he end of his lab documen o record your design work and resuls. Afer you successfully finish each par of he lab, show he TA your resuls and ask him/her o sign he check-off shee. Prin he check off shee. Ask he TA o check your Pre-lab 4 workshee o ensure you have he correc design and plans for he sae sequencers. Fix any misakes and ask he TA o sign your pre-lab o indicae you have compleed he assignmen. Keep he pre-lab workshee afer he TA signs i and hen aach i o your lab repor. Imporan Noe Spring 203: We have made a change o he 33 Viruoso library. Before using Viruoso again, you mus re-run he seup scrip below in your ECE33/viruoso direcory o insall he new library. source $SOFT/cadence-auo Par : Two bi sequence generaor. In his par you will implemen he Figure 2-bi sae sequencer using D flip-flops based on your pre-lab design. p. 4

Implemenaion in Cadence Viruoso:. Sar Viruoso and creae a new schemaic named 2biSae in your projec library. 2. Using your design from pre-lab, insaniae he necessary gaes and DFFs o implemen your design. Make all necessary wire connecions. To make your schemaic less cluered, you can press he L key o open he label window. This allows you o label a wire. Any wires assigned o he same label as anoher wire, or an inpu pin, will ac as if he wires were conneced. This will preven you from having wires spanning he enire schemaic and cluering up he schemaic. 3. Afer you have compleed your schemaic check and save he schemaic and make sure here are no warnings or errors. Demonsraion: 4. Sar he ADE-L simulaor from he launch menu. For he 2bi sequence, use he simulus file named Lab4A.x ha you can download from he ECE 33 websie. 5. Se he run ime for 5ms. 6. Selec he CLK, Q0, and Q as he oupus o be grapghed. 7. Run he simulaion, review your resuls and answer he quesions on he check off shee. 8. Save/prin your 2biSae schemaic and simulaion plos o include in your repor. 9. Ask he TA o check your resuls and iniial your check off shee. Par 2: Sae machine design challenge. In par 2 you will design and implemen he 3-bi sae sequencer shown in Figure 2 based on your preparaion from he pre-lab. Design:. In he Lab 4 Check-off Shee, skech a schemaic showing all he circuiry needed o implemen he 3-bi sequencer from Figure 2. This circui should be based on your pre-lab preparaions and should use DFF s and any necessary basic logic gaes (included he 3-inpu AND, as noed in he pre-lab). As wih he 2-bi sequencer, he only exernal inpu o his circui should be a CLK signal. Implemenaion: 2. Creae a new schemaic named 3biSae. 3. Insaniae he necessary gaes and DFFs and add wires o implemen your pre-lab design for he 3bi sae sequencer. Remember ha you can label wires in order o keep your schemaic clear and make i easier o view. 4. Check and save he schemaic and make sure here are no errors or warnings. Demonsraion: p. 5

5. Sar he ADE L simulaor from he Launch menu in he schemaic window. Use he file Lab4B.x as he simulus file which you can download from he ECE33 websie. To es ha your sae machine will correcly go o sae 0 from any of he nonsequence saes, he simulus file imposes an iniial sae ha is ouside he sequence saes. 6. Se he run ime for 5ms. Selec CLK, Q0, Q, and Q2 o be graphed. 7. Run he simulaion, review your resuls and answer he quesions on he check off shee. 8. Save/prin your 3biSae schemaic and simulaion plos o include in your repor. 9. Ask he TA o check your resuls and sign your check off shee. Wrap Up Clean up your lab bench before you exi he lab. Remember, your Lab 4 repor will be due in lab nex week. Each suden mus submi his/her own lab repor. Include your check-off shee and waveform prinous wih your repor. You may wan o review he Discussion Poins below and alk o he TA abou anyhing ha is no clear o you. Discussion Poins As explained in he Lab Repor Guide, you should address hese discussion poins in a designaed secion of your repor.. How many flip flops (bis) are needed for a sequencer for 4 saes? How many are needed for 8 saes? Can you wrie a general expression relaing he number of flip flops, n, o he number of sequencer saes, m? 2. Explain why he saes 000, 00, 0 and in Par 2 mus be mapped ino a sequenial sae even hough hey are no in he desired sequence. Wha could happen if his was no done? 3. How could he 2-bi sequencer be modified o implemen an asynchronous rese, where an addiional rese signal was used o force he sae machine ino a given iniial sae (e.g., 00)? Briefly describe he required rese circuiry. 4. Oher han a sae machine, briefly describe a useful digial circui ha requires flip flops (raher han sandard logic gaes). Do you hink you have he experience need o implemen such a circui in Viruoso? If no, wha knowledge do you feel you lack? Remember o include your resuls graphs as aachmens o your repor. p. 6

PRE-LAB 4 Due: A he beginning of lab. Suden Name: Lab. Secion (ime): Make sure you read he Lab 4 Background before you sar he pre-lab. Afer compleing he pre-lab, please review he enire Lab 4 assignmen so you will know wha o expec when you come o lab.. To ensure you are familiar wih he basic seps of implemening a sae machine, read he Sae Machine Inroducion documen. 2. Review he example D flip flop implemenaion of he Figure sae sequencer in he Background secion. Below, record he logic expression ha define each of he sequencer inpus (D, D 0 ) as a funcion of curren-sae oupus (Q, ). D =, D 0 = 3. Based on your equaions from #2, draw a schemaic of he complee 2-sae sequencer using wo DFF cells and any necessary basic logic gaes. Noe, he only exernal inpu o his circui should be a CLK signal. You can draw your schemaic below or aach separaely. <pre-lab coninues on nex page> p. 7

In Par 2 of he lab, you will design and implemen he 3-bi sae sequencer shown in Figure 2. Based on he 2-bi example (from Background and earlier pre-lab quesions), complee he following seps o design he 3-bi sequencer. a. How many D flip-flops are needed for a 3-bi sequencer? b. Complee he nex-sae exciaion able below for he Figure 2 sequencer where Q 2 n Q n n are he curren saes and Q 2 n+ Q n+ n+ are he nex saes. Q 2 n Q n n Q 2 n+ Q n+ n+ D 2 D D 0 c. Complee he K-map for each flip flop inpu. Noe each K-map is assigned o a specific combinaion of D and Q 2. Q 0 D 2 Q 2 = 0 Q 0 D Q 2 = 0 Q 0 D 0 Q 2 = 0 Q 0 D 2 Q 2 = Q 0 D Q 2 = Q 0 D 0 Q 2 = d. Based on he K-maps above, deermine he minimized Boolean expressions for all inpus o he 3 flip flops. D 2 =, D =, D 0 =, Noe: A 3-inpu AND gae will be provided o simplify your design. Choose a logic funcion for each inpu ha can be implemened wih only he 3-inpu AND and he basic logic gaes used in Labs -3. You will be asked o design he schemaic o implemen hese inpu funcions during Par 2 of he in-lab assignmen. TA pre-lab sign off Iniial p. 8

LAB 4 CHECK-OFF SHEET Suden Name: Lab. Secion (ime): Complee his shee as you complee he lab. Remember o have he TA check off each secion of he assignmen. This shee mus be included in your lab repor. Par : Two bi sequence generaor Sep 7. Is he sae value changing wih he clock? Record he observed sae sequence (e.g., 0 0 ) Does i agree wih he correc sae sequence? Par : TA sign off Iniial Par 2: Sae machine design challenge Sep 7 Record he observed iniial sae value (Q 2,Q, ). Is he sae value changing wih he clock? Sep 7. Wha sae follows he iniial non-sequenced sae? Is his correc? Sep 7. Record he observed sae sequence (e.g., 0 0 ) Does i agree wih he desired sequence? Par 2: TA sign off Iniial p. 9