CS 61C Summer 2012 Discussion 11 State, Timing, and CPU (Solutions)

Similar documents
University of California at Berkeley College of Engineering Department of Electrical Engineering and Computer Sciences. Spring 2010 May 10, 2010

CE1911 LECTURE FSM DESIGN PRACTICE DAY 2

University of Toronto Faculty of Applied Science and Engineering Edward S. Rogers Sr. Department of Electrical and Computer Engineering

EECS150 - Digital Design Lecture 20 - Finite State Machines Revisited

CS303 LOGIC DESIGN FINAL EXAM

The University of Alabama in Huntsville ECE Department CPE Midterm Exam February 26, 2003

ECE 2300 Digital Logic & Computer Organization. More Finite State Machines

R07. Code No: V0423. II B. Tech II Semester, Supplementary Examinations, April

One and a half hours. Section A is COMPULSORY UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE

IA Digital Electronics - Supervision I

Computer Architecture: Part III. First Semester 2013 Department of Computer Science Faculty of Science Chiang Mai University

Music. Numbers correspond to course weeks EULA ESE150 Spring click OK Based on slides DeHon 1. !

Question Total Possible Test Score Total 100

KINGS COLLEGE OF ENGINEERING DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING QUESTION BANK NAME OF THE SUBJECT: EE 2255 DIGITAL LOGIC CIRCUITS

Recitation Session 6

EPC6055 Digital Integrated Circuits EXAM 1 Fall Semester 2013

One and a half hours. Section A is COMPULSORY

COMP12111 Fundamentals of Computer Engineering Paul Nutter Vasilis Pavlidis Comments

EECS Components and Design Techniques for Digital Systems. Lec 07 PLAs and FSMs 9/ Big Idea: boolean functions <> gates.

Laboratory Exercise 3 Davide Rossi DEI University of Bologna AA

6.1 Combinational Circuits. George Boole ( ) Claude Shannon ( )

ECE 465, Fall 2013, Instructor: Prof. Shantanu Dutt. Project 2 : Project Files Due Tue Nov. 26, Report Due Wed. Nov. 27, both at midnight

ECE 465, Spring 2010, Instructor: Prof. Shantanu Dutt. Project 2 : Due Fri, April 23, midnight.

University of Toronto Faculty of Applied Science and Engineering Edward S. Rogers Sr. Department of Electrical and Computer Engineering

SHRI ANGALAMMAN COLLEGE OF ENGINEERING. (An ISO 9001:2008 Certified Institution) SIRUGANOOR, TIRUCHIRAPPALLI

Mark Redekopp, All rights reserved. EE 352 Unit 8. HW Constructs

Injntu.com Injntu.com Injntu.com R16

ECE 341 Midterm Exam

10/21/2016. A Finite State Machine (FSM) Models a System. ECE 120: Introduction to Computing. An FSM Consists of Five Parts

ECE 2300 Digital Logic & Computer Organization. More Sequential Logic Verilog

1. Prove that if you have tri-state buffers and inverters, you can build any combinational logic circuit. [4]

R10. II B. Tech I Semester, Supplementary Examinations, May

problem maximum score 1 10pts 2 8pts 3 10pts 4 12pts 5 7pts 6 7pts 7 7pts 8 17pts 9 22pts total 100pts

2015 Paper E2.1: Digital Electronics II

Combinational Circuits

Code No: R Set No. 1

Code No: R Set No. 1

EECS 150 Homework 7 Solutions Fall (a) 4.3 The functions for the 7 segment display decoder given in Section 4.3 are:

Final Exam Review. b) Using only algebra, prove or disprove the following:

Finite State Machines (FSMs) and RAMs and CPUs. COS 116, Spring 2011 Sanjeev Arora

EECS150 - Digital Design Lecture 5 - Verilog Logic Synthesis

EECS150 - Digital Design Lecture 7 - Computer Aided Design (CAD) - Part II (Logic Simulation) Finite State Machine Review

Verilog Sequential Logic. Verilog for Synthesis Rev C (module 3 and 4)

R07

/90 TOTAL. 1(a) 8pts. fiv(a,b) is called the function.

L11: Major/Minor FSMs

ECE 449 OOP and Computer Simulation Lecture 09 Logic Simulation

PROGRAMMABLE LOGIC DEVICES

EECS150 - Digital Design Lecture 6 - Logic Simulation. Encoder Example

In the previous lecture, we examined how to analyse a FSM using state table, state diagram and waveforms. In this lecture we will learn how to design

In the previous lecture, we examined how to analyse a FSM using state table, state diagram and waveforms. In this lecture we will learn how to design

Sequential Circuit Design: Principle

University of California, Berkeley College of Engineering

(Refer Slide Time: 1:43)

Principles of Digital Techniques PDT (17320) Assignment No State advantages of digital system over analog system.

Laboratory Exercise 7

BUILDING BLOCKS OF A BASIC MICROPROCESSOR. Part 1 PowerPoint Format of Lecture 3 of Book

CS 151 Final. (Last Name) (First Name)

EECS150 - Digital Design Lecture 6 - Logic Simulation

Outline. EECS Components and Design Techniques for Digital Systems. Lec 11 Putting it all together Where are we now?

Student Number: UTORid: Question 0. [1 mark] Read and follow all instructions on this page, and fill in all fields.

(Refer Slide Time: 00:01:53)

PART B. 3. Minimize the following function using K-map and also verify through tabulation method. F (A, B, C, D) = +d (0, 3, 6, 10).

Storage Elements & Sequential Circuits

Part 4: VHDL for sequential circuits. Introduction to Modeling and Verification of Digital Systems. Memory elements. Sequential circuits

Chapter 6. CMOS Functional Cells

CS61C : Machine Structures

Chapter 4. Operations on Data

Scheme G. Sample Test Paper-I

Quick Introduction to SystemVerilog: Sequental Logic

Hours / 100 Marks Seat No.

McGill University Faculty of Engineering FINAL EXAMINATION Fall 2007 (DEC 2007)

CS232 VHDL Lecture. Types

Integer Encoding and Manipulation

EE 231 Fall EE 231 Homework 8 Due October 20, 2010

Laboratory Finite State Machines and Serial Communication

R a) Simplify the logic functions from binary to seven segment display code converter (8M) b) Simplify the following using Tabular method

CENG 3420 Computer Organization and Design. Lecture 06: MIPS Processor - I. Bei Yu

Reference Sheet for C112 Hardware

Finite State Machines

EECS 151/251A Fall 2017 Digital Design and Integrated Circuits. Instructor: John Wawrzynek and Nicholas Weaver. Lecture 14 EE141

Microcomputers. Outline. Number Systems and Digital Logic Review

Links, clocks, optics and radios

Sequential Circuit Design: Principle

Designing Safe Verilog State Machines with Synplify

Digital Fundamentals. Lab 6 2 s Complement / Digital Calculator

ECE 574: Modeling and Synthesis of Digital Systems using Verilog and VHDL. Fall 2017 Final Exam (6.00 to 8.30pm) Verilog SOLUTIONS

EECS150 Homework 2 Solutions Fall ) CLD2 problem 2.2. Page 1 of 15

CS150 Fall 2012 Solutions to Homework 6

B.Tech II Year I Semester (R13) Regular Examinations December 2014 DIGITAL LOGIC DESIGN

Finite State Machines

Combinational Circuits

Finite-State Machine (FSM) Design

Finite State Machine Lab

DigSim Assignment 2: Finite State Machine Simplifications

HANSABA COLLEGE OF ENGINEERING & TECHNOLOGY (098) SUBJECT: DIGITAL ELECTRONICS ( ) Assignment

EE 3170 Microcontroller Applications

VHDL: RTL Synthesis Basics. 1 of 59

PART 1. Simplification Using Boolean Algebra

University of California, Berkeley College of Engineering

Transcription:

State Elements State elements provide a means of storing values, and controlling the flow of information in the circuit. The most basic state element (we re concerned with) is a DQ Flip-Flop: D is a single bit input, Q is a single bit output. On the rising edge of the clock, the value from D is copied to Q, after a small delay (known as the CLK-to-Q delay). At all other times, Q presents the value last copied and ignores D. An n-bit register is just n DQ Flip-Flops aligned in parallel, tied to the same clock. Timing Diagram 1: Fill out the timing diagram for the circuit below Note: An unknown value is shaded. Timing Diagram 2: Fill out the timing diagram for the circuit below Note: An unknown value is shaded.

Finite State Machines FSMs can be an incredibly useful computational tool. They have a straightforward implementation in hardware: The register holds the current state (encoded as a particular combination of bits), and the combinational logic block maps from {current state, input} to {next state, output}. Exercises Draw a transition diagram for an FSM that can take in an input sequence one bit at a time, and after each input is received, output whether the number of 1s is divisible by 3. Write out the truth table that the combinational logic block must implement (remember to assign each state a binary encoding). Finally, write the Boolean algebra expressions that implement the FSM s truth table.

The states each correspond to the number of 1s seen so far, mod 3. When this quantity is 0, 1s seen so far is divisible by 3, and we output 1. We assign our three states the encodings 00, 01, 10. Note that these encodings are completely arbitrary but other encodings (i.e. 01, 10, 11) will lead to a different truth table and final combinational logic. cur. state input 00 0 00 1 01 0 01 1 10 0 10 1 next state output 00 1 01 0 01 0 10 0 10 0 00 1 11 0 11 1 XX XX X X Behavior for current state 11 is undefined since we don t expect our machine to ever reach that state. We represent this in the truth table above using an X to stand for don t care. We can use this to our advantage by choosing values (0 or 1 for each X) that will simplify our combinational logic. Boolean logic expressions (CS[1],CS[0] bits of current state, I input, NS[1], NS[0] next state, Out output). Overbar means complement. NS[1]: Direct method: CS[1] CS[0] I+CS[1] CS[0] I Simplest possible: CS[0] I+CS[1] I (Simplest version assumes NS[1]=1 for both CS[1] CS[0]) NS[0]:

Direct method: CS[1] CS[0] I+CS[1] CS[0] I Simplest possible: CS[1] CS[0] I+CS[0] I (Simplest version assumes NS[0]=1 for CS[1] CS[0] I and NS[0]=0 for CS[1] CS[0] I) Out: Direct method: CS[1] CS[0] I +CS[1] CS[0] I Simplest possible: CS[1] CS[0] I +CS[1] I (Simplest version assumes Out=0 for CS[1] CS[0] I and Out=1 for CS[1] CS[0] I)

Clocking Methodology - The input signal to each state element must stabilize before each rising edge. - Critical path: Longest delay path between state elements in the circuit. - Min clock period = t clk-to-q + t CL + t setup, where t CL is the Combinational Logic delay in the critical path. - If we place registers in the critical path, we can shorten the period by reducing the amount of logic between registers Clocking Problem - The circuit below computes the weighted average of 4 values - Logic Delays - tmult = 55ns, tadd = 19ns, tshift = 2ns - Register Parameters - t setup = 2ns, t hold = 1ns, t clk-to-q = 3ns What is the critical path delay and the maximum clock rate this circuit can operate at? Critical path path from a top register to the bottom register. Clk-to-q + mult + add + add + shift + setup = 3 + 55 + 19 + 19 + 2 + 2 = 100 ns. Max frequency = 1/Min period = 10 MHz If you add one stage of registers (pipelining), what is the highest clock rate you can get? Best to add registers in a place that minimizes the longest path through the circuit. This would be right after the multiplication. Path from top registers to middle registers is clk-to-q + mult + setup = 3 + 55 + 2 = 60 ns. Path from middle to bottom registers is clk-to-q + add + add + shift + setup = 3 + 19 + 19 + 2 + 2 = 45 ns. So our new critical path has Min period of 60 ns, so our Max frequency = 16.67 MHz.