Lec-6-HW-1-devices Reading: PP, Chapter 3:

Similar documents
Lec-6-HW-2-digitalDesign

EECS150, Fall 2004, Midterm 1, Prof. Culler. Problem 1 (15 points) 1.a. Circle the gate-level circuits that DO NOT implement a Boolean AND function.

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

Homework #4 Problem 1

Logic Circuits II ECE 2411 Thursday 4:45pm-7:20pm. Lecture 3

Combinational Logic Worksheet

Systems Programming. Lecture 2 Review of Computer Architecture I

NAND. Grade (10) Instructor. Logic Design 1 / 13

Digital Design with FPGAs. By Neeraj Kulkarni

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

CENG 241 Digital Design 1

Department of Electrical Engineering McGill University ECSE 221 Introduction to Computer Engineering Assignment 2 Combinational Logic

Levels in Processor Design

QUESTION BANK FOR TEST

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

Lecture 32: SystemVerilog

Verilog Tutorial (Structure, Test)

ENGR 3410: Lab #1 MIPS 32-bit Register File

FPGA Design Challenge :Techkriti 14 Digital Design using Verilog Part 1

Chapter 3. Gate-Level Minimization. Outlines

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

6. Latches and Memories

ECE 2030D Computer Engineering Spring problems, 5 pages Exam Two 8 March 2012

Review. EECS Components and Design Techniques for Digital Systems. Lec 05 Boolean Logic 9/4-04. Seq. Circuit Behavior. Outline.

Digital Integrated Circuits

Federal Urdu University of Arts, Science and Technology, Islamabad VLSI SYSTEM DESIGN. Prepared By: Engr. Yousaf Hameed.

Homework deadline extended to next friday

HW1 Modeling Concepts

Combinational Logic II

Introduction to Digital Design with Verilog HDL

DIGITAL SYSTEM DESIGN

Lecture 3. Behavioral Modeling Sequential Circuits. Registers Counters Finite State Machines

CS429: Computer Organization and Architecture

2/8/2017. SOP Form Gives Good Performance. ECE 120: Introduction to Computing. K-Maps Can Identify Single-Gate Functions

ARM 64-bit Register File

Systems Architecture I

Topics. Midterm Finish Chapter 7

Synthesis of combinational logic

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

Lab 2. Standard Cell layout.

Verilog. What is Verilog? VHDL vs. Verilog. Hardware description language: Two major languages. Many EDA tools support HDL-based design

1. Mark the correct statement(s)

ASL: Auburn Simulation Language and AUSIM: Auburn University SIMulator. Chuck Stroud Professor Electrical & Computer Engineering Auburn University

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

Hardware description languages

Introduction to Verilog. Garrison W. Greenwood, Ph.D, P.E.

211: Computer Architecture Summer 2016

Gate-Level Minimization

3. Implementing Logic in CMOS

VHDL. VHDL History. Why VHDL? Introduction to Structured VLSI Design. Very High Speed Integrated Circuit (VHSIC) Hardware Description Language

Bawar Abid Abdalla. Assistant Lecturer Software Engineering Department Koya University

Logic and Computer Design Fundamentals. Chapter 2 Combinational Logic Circuits. Part 3 Additional Gates and Circuits

HW #5: Digital Logic and Flip Flops

ECE 4514 Digital Design II. Spring Lecture 2: Hierarchical Design

Memory Supplement for Section 3.6 of the textbook

What is Verilog HDL? Lecture 1: Verilog HDL Introduction. Basic Design Methodology. What is VHDL? Requirements

A B A+B

Two HDLs used today VHDL. Why VHDL? Introduction to Structured VLSI Design

Sense Amplifiers 6 T Cell. M PC is the precharge transistor whose purpose is to force the latch to operate at the unstable point.

Logic Gates and Boolean Algebra ENT263

EECS 3201: Digital Logic Design Lecture 4. Ihab Amer, PhD, SMIEEE, P.Eng.

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

Computer Architecture (TT 2012)

DIGITAL CIRCUIT LOGIC UNIT 7: MULTI-LEVEL GATE CIRCUITS NAND AND NOR GATES

Introduction to Verilog

ENGR 3410: MP #1 MIPS 32-bit Register File

Memory and Programmable Logic

ECE 2030B 1:00pm Computer Engineering Spring problems, 5 pages Exam Two 10 March 2010

EE 101 Homework 4 Redekopp Name: Due: See Blackboard

Gate-Level Minimization. section instructor: Ufuk Çelikcan

Review. EECS Components and Design Techniques for Digital Systems. Lec 03 Field Programmable Gate Arrays

EGC220 - Digital Logic Fundamentals

VALLIAMMAI ENGINEERING COLLEGE. SRM Nagar, Kattankulathur DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING EC6302 DIGITAL ELECTRONICS

Introduction to Verilog design. Design flow (from the book) Hierarchical Design. Lecture 2

Following the advice of breaking the longest (uppermost) bar first, I'll begin by breaking the bar covering the entire expression as a first step:

DIGITAL SYSTEM DESIGN

Lec-6-HW-3-ALUarithmetic-SOLN

ENGR 3410: MP #1 MIPS 32-bit Register File

Verilog HDL. Testing & Verification Dept. of Computer Science & Engg,, IIT Kharagpur

The Verilog Language COMS W Prof. Stephen A. Edwards Fall 2002 Columbia University Department of Computer Science

Design Using Verilog

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

Experiment 4 Boolean Functions Implementation

Introduction to Verilog design. Design flow (from the book)

Combinational Circuits Digital Logic (Materials taken primarily from:

ELCT201: DIGITAL LOGIC DESIGN

Programmable machines

END-TERM EXAMINATION

N-input EX-NOR gate. N-output inverter. N-input NOR gate

Memory, Latches, & Registers

Many ways to build logic out of MOSFETs

Lecture 2: Data Types, Modeling Combinational Logic in Verilog HDL. Variables and Logic Value Set. Data Types. Why use an HDL?

INSTITUTE OF AERONAUTICAL ENGINEERING Dundigal, Hyderabad ELECTRONICS AND COMMUNICATIONS ENGINEERING

CAD4 The ALU Fall 2009 Assignment. Description

ELCT201: DIGITAL LOGIC DESIGN

EE 8351 Digital Logic Circuits Ms.J.Jayaudhaya, ASP/EEE

Verilog Fundamentals. Shubham Singh. Junior Undergrad. Electrical Engineering

Memory, Latches, & Registers

United States Patent (19) Haines

Chapter 2. Boolean Expressions:

Transcription:

Lec-6-HW-1-devices Reading: PP, Chapter 3: 3.1 (transistors), Problems, PP, Chp 3: 3.1 (n and p transistors), 3.2 (cmos inverter), 3.3 (how many 2-input functions?), 3.5 (trans. ckt. => truth table), 3.2 (OR, NOR, AND, NAND, and DeMorgan), 3.3 (DEC, MUX, FA, PLA)

3.6 (as 3.5, but tricky ckt.), 3.7 (fix broken trans. NAND ckt.), 3.8 (label ckt. to match func.), 3.9 (expression to truth-table),

3.10 (NOR truth-table), 3.11a (trans. ckt. for 3-AND, 3-OR), 3.11b (conduction diagram for 3.11a using input vectors),

3.16 (truth-table to PLA [connect parts of fig. 3.17])

A = 0: Then D = C, C can change and D will change with C. A = 1: Then D = B, B can change and D will change with B. B = 0: Then D is forced to 0. B = 1: Then remains D = 1. A = 0: D is forced to 1, regardless of B If B changes, then D will remain = 0 thereafter, regardless of how B changes, assuming A remains = 1.

(Problem)-------------- Basic CMOS gates are NOR, NAND, NOT. Electric comes with three basic gates: Components.schematic.{AND} Components.schematic.{OR} Components.schematic.{BUF} Invert the outputs to get (NAND, NOR, NOT): ^{output crosshair} Edit.TechnologySpecific.TogglePortNegation (There must be a wire already attached to the gate's output for this to work.) Make a testbench which sets all possible inputs for the NOR. Record the input and output results as a truth table. You will need reg types to drive the gate's inputs: in your test bench define a "reg" for each input, use "assign" to connect the reg-type to the input wire, and assign values to those regs in an "initial" statement. Do the same for the NAND. Turn in the truth tables on paper and checkin the circuits to you branch (perhaps use a separate library). Here's testbench code for both gate types: /**/ reg Asrc; reg Bsrc; /**/ assign A = Asrc; assign B = Bsrc; /**/ initial begin /**/ Asrc = 0; Bsrc = 0; #1 $display("(a, B) = (%b, %b), out = %b", A, B, out); /**/ #1 Asrc = 0; Bsrc = 1; #1 $display("(a, B) = (%b, %b), out = %b", A, B, out); /**/ #1 Asrc = 1; Bsrc = 0; #1 $display("(a, B) = (%b, %b), out = %b", A, B, out); /**/ #1 Asrc = 1; Bsrc = 1; #1 $display("(a, B) = (%b, %b), out = %b", A, B, out); /**/ $finish; /**/ end Here's the output using NAND: (A, B) = (0, 0), out = 1 (A, B) = (0, 1), out = 1 (A, B) = (1, 0), out = 1 (A, B) = (1, 1), out = 0

(Problem)---------------- In Electric, implement a NAND-NAND latch. Test its behavior by driving your circuit with all possible sequences of inputs. For latches, the history of inputs is important, not just the current input, because latches have state. That is, they remember what happened before. Do the same for the NOR-NOR latch, and comment on the difference between the NAND-NAND latch and the NOR-NOR latch. Turn your answers in on paper and check in your testbench and its output. Note: For the NAND-NAND latch, we are interested in 3- step sequences that begin and end with A=1, B=1 (for NOR-NOR, A=0, B=0). For instance, here is a 3-step NAND-NAND sequence: (1,1), (0,1), (1,1). Here is another that is particularly interesting: Asrc = 1; Bsrc = 1; #1 Asrc = 0; Bsrc = 0; #1 Asrc = 1; Bsrc = 1; That sequence might give different results from this one. Why? Does this mean we should use random delays for signal propagation through our gates to be more physically realistic? HINT--metastability problem. Asrc = 1; Bsrc = 1; #1 Bsrc = 0; Asrc = 0; #1 Asrc = 1; Bsrc = 1; The difference between the two latch types is that the NAND latch is stable (keeps its last state) for input (A,B) = (1,1) while the NOR latch is stable for (0,0). For both types, (0,1) sets Q to 1 and (1,0) resets Q to 0. The input sequence (0,0), (1, 1) to the NAND latch should result in an unknown value for Q. Symmetrically, the sequence (1,1), (0,0) should make Q unknown for the NOR latch. However, this happens for some verilog simulated circuts and not others. For me, unknowns did not occur for these latches, except for the first state. For the NAND latch, inputs (A, B) are (-S, -R). For the NOR latch, (A, B) = (R, S). (Setting "R" to 1 forces Q to 0; setting "S" to 1 forces Q to 1. "R" is for "reset"; "S" is for "set". "-S" means "NOT( S )", and setting "-S" to 0 forces Q to 1.) The NOR-NOR solution is similar. /**/ reg Asrc; reg Bsrc; /**/ assign A = Asrc; assign B = Bsrc; /**/ initial begin /**/ #1 Asrc = 1; Bsrc = 1; /**/ #1 Asrc = 0; Bsrc = 1; /**/ #1 Asrc = 1; Bsrc = 1; /**/ #1 Asrc = 1; Bsrc = 0; /**/ #1 Asrc = 1; Bsrc = 1; /**/ #1 Asrc = 0; Bsrc = 0; /**/ #1 Bsrc = 1; Asrc = 1; /**/ #1 Asrc = 0; Bsrc = 0; /**/ #1 Bsrc = 1; Asrc = 1; /**/ $finish; /**/ end Testbench output: (A, B) = 11 Q=x (A, B) = 01 Q=1 (A, B) = 11 Q=1 (A, B) = 10 Q=0 (A, B) = 11 Q=0 (A, B) = 00 Q=1 (A, B) = 11 Q=1 (A, B) = 00 Q=1 (A, B) = 11 Q=1 Note that the simulation does not show unknowns for the indeterminate input (0,0).