Chapter 6. CMOS Functional Cells

Similar documents
Reference Sheet for C112 Hardware

3. Implementing Logic in CMOS

Written exam for IE1204/5 Digital Design Thursday 29/

Microcomputers. Outline. Number Systems and Digital Logic Review

6. Latches and Memories

Digital Integrated CircuitDesign

ESE 570 Cadence Lab Assignment 2: Introduction to Spectre, Manual Layout Drawing and Post Layout Simulation (PLS)

PROGRAMMABLE MODULES SPECIFICATION OF PROGRAMMABLE COMBINATIONAL AND SEQUENTIAL MODULES

Problem Formulation. Specialized algorithms are required for clock (and power nets) due to strict specifications for routing such nets.

IA Digital Electronics - Supervision I

Henry Lin, Department of Electrical and Computer Engineering, California State University, Bakersfield Lecture 7 (Digital Logic) July 24 th, 2012

Injntu.com Injntu.com Injntu.com R16

Topics. Midterm Finish Chapter 7

Redundant States in Sequential Circuits

Computer Architecture (TT 2012)

FPGA. Logic Block. Plessey FPGA: basic building block here is 2-input NAND gate which is connected to each other to implement desired function.

Single-Strip Static CMOS Layout

ECE410 Design Project Spring 2013 Design and Characterization of a CMOS 8-bit pipelined Microprocessor Data Path

UNIT 6 CIRCUIT DESIGN

Prototype of SRAM by Sergey Kononov, et al.

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

Spiral 2-8. Cell Layout

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

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

Lecture 11 SRAM Zhuo Feng. Z. Feng MTU EE4800 CMOS Digital IC Design & Analysis 2010

NADAR SARASWATHI COLLEGE OF ENGINEERING AND TECHNOLOGY Vadapudupatti, Theni

E40M. Binary Numbers, Codes. M. Horowitz, J. Plummer, R. Howe 1

CAD4 The ALU Fall 2009 Assignment. Description

SCHOOL OF ENGINEERING & BUILT ENVIRONMENT. Mathematics. An Introduction to Graph Theory

DIGITAL ELECTRONICS. Vayu Education of India

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

EECS150 - Digital Design Lecture 20 - Finite State Machines Revisited

Code No: R Set No. 1

DESIGN AND SIMULATION OF 1 BIT ARITHMETIC LOGIC UNIT DESIGN USING PASS-TRANSISTOR LOGIC FAMILIES

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

Department of Electrical and Computer Engineering Introduction to Computer Engineering I (ECSE-221) Assignment 3: Sequential Logic

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

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

CHAPTER 3 ASYNCHRONOUS PIPELINE CONTROLLER

Memory. Outline. ECEN454 Digital Integrated Circuit Design. Memory Arrays. SRAM Architecture DRAM. Serial Access Memories ROM

BACKGROUND OF THE INVENTION

Final Exam Solution Sunday, December 15, 10:05-12:05 PM

Code No: R Set No. 1

Lecture 13: SRAM. Slides courtesy of Deming Chen. Slides based on the initial set from David Harris. 4th Ed.

3. The high voltage level of a digital signal in positive logic is : a) 1 b) 0 c) either 1 or 0

Date Performed: Marks Obtained: /10. Group Members (ID):. Experiment # 09 MULTIPLEXERS

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

Digital VLSI Design I

discrete logic do not

CONTENTS CHAPTER 1: NUMBER SYSTEM. Foreword...(vii) Preface... (ix) Acknowledgement... (xi) About the Author...(xxiii)

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

Control and Datapath 8

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

UNIT-III REGISTER TRANSFER LANGUAGE AND DESIGN OF CONTROL UNIT

Code No: R Set No. 1

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

Sequential Logic Design

+1 (479)

(Refer Slide Time: 00:01:53)

EE414 Embedded Systems Ch 2. Custom Single- Purpose Processors: Hardware

Very Large Scale Integration (VLSI)

ECE 341 Midterm Exam

TUTORIAL II ECE 555 / 755 Updated on September 11 th 2006 CADENCE LAYOUT AND PARASITIC EXTRACTION

Synthesis of combinational logic

ECE 331: N0. Professor Andrew Mason Michigan State University. Opening Remarks

Computer-Based Project on VLSI Design Co 3/7

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

ESE370: Circuit-Level Modeling, Design, and Optimization for Digital Systems

SRAM. Introduction. Digital IC

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


END-TERM EXAMINATION

(ii) Simplify and implement the following SOP function using NOR gates:

Contents. Chapter 3 Combinational Circuits Page 1 of 34

EE 3170 Microcontroller Applications

Hours / 100 Marks Seat No.

Chapter 5 Registers & Counters

Lab. Course Goals. Topics. What is VLSI design? What is an integrated circuit? VLSI Design Cycle. VLSI Design Automation

CS8803: Advanced Digital Design for Embedded Hardware

II/IV B.Tech (Regular/Supplementary) DEGREE EXAMINATION. Answer ONE question from each unit.

Programmable Logic Devices

Introduction to SRAM. Jasur Hanbaba

KING FAHD UNIVERSITY OF PETROLEUM & MINERALS COMPUTER ENGINEERING DEPARTMENT

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

Introduction to LogicWorks (Version 5) by: Kevin Su

LECTURE 4. Logic Design

2015 Paper E2.1: Digital Electronics II

Hardware Modeling using Verilog Prof. Indranil Sengupta Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur

CHAPTER 1 INTRODUCTION

10EC33: DIGITAL ELECTRONICS QUESTION BANK

AMD actual programming and testing on a system board. We will take a simple design example and go through the various stages of this design process.

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

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

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

Column decoder using PTL for memory

Scheme G. Sample Test Paper-I

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

Introduction to CMOS VLSI Design Lecture 13: SRAM

10. Interconnects in CMOS Technology

Chapter 2 Combinational

Transcription:

Chapter 6 CMOS Functional Cells In the previous chapter we discussed methods of designing layout of logic gates and building blocks like transmission gates, multiplexers and tri-state inverters. In this chapter we consider design methodology, structures and layouts of functional cells like 1-bit adders, latches and flip-flops. We start with a design methodology based on application of circuit graphs and layout matrices. 6 1

6.1. DESIGN METHODOLOGY 6.1 Design methodology 6.1.1 Problem formulation The problem that we would like to study can be stated as follows. Given a schematic of a CMOS cell, create its mask layout in a form of a linear structure of (n-mos, p-mos) pairs placed in two parallel rows, each in its respective well. In other words, the layout of a functional cell should be based on a pseudo-serial connection of nmos transistors in a p-well and pmos transistors in the n-well. This will form continuous horizontal rows of nmos and pmos transistors. If such a continuous connection is electrically not possible, discontinuities in diffusion (active regions) must be created. Complementary transistors should be aligned vertically and their gates should be driven from the vertical polysilicon lines. We will aim at minimisation of discontinuities in the diffusions areas, which indirectly reduces the number of space consuming contacts between layers. A.P.Papliński 6 2 October 14, 2002

6.1. DESIGN METHODOLOGY 6.1.2 An illustrative example. As an illustrative example, we consider a generic tri-state inverter presented earlier in sec.5.10. A logic diagram and a schematic of such a tri-state inverter with an additional inverter to generate a complementary control signal e is presented in Figure 6.1. d a b e c c = a if d = 1 Z if d = 0 a. Logic diagram of a conceptual tri-state inverter VDD p1 p3 p2 e d b c a A tri-state inverter inverts the input signal a when the enable signal d is high, otherwise it disconnects the output c. n1 n3 n2 GND b. A "first-guess" schematic (one discontinuity) Figure 6.1: A logic diagram and a schematic of a tristate inverter based on the transmission gate. The cell consists of 3 pairs of transistors (p1, n1; p2, n2; p3, n3) and seven electrical nodes (V, a, b, c, d, e, G, where V and G denote V DD and GND, respectively). For our purposes, five nodes, V, b, c, e, G, which are connected to sources or drains of the MOS transistors, are of prime interest. October 14, 2002 6 3 A.P.Papliński

6.1. DESIGN METHODOLOGY The structure of the circuit can be described by the following layout matrix. L 1 = V (p1) e! c (p3) b (p2) V d e a d d a G (n1) e! c (n3) b (n2) G (6.1) We note two discontinuities in the diffusion areas between nodes e and c which are marked with!. A.P.Papliński 6 4 October 14, 2002

6.1. DESIGN METHODOLOGY To improve the layout of the tristate inverter of Figure 6.1, the layout matrix can be modified in such a way that the nodes e and c are moved out to the boundaries of the active area, that is, to the first and the last columns of the layout matrix, which eliminates the discontinuity. The resulting layout matrix, schematic and the equivalent layout of the tristate inverter are as follows: L 2 = e (p1) V (p2) b (p3) c d a e d a d e (n1) G (n2) b (n3) c (6.2) VDD VDD p1 p2 p3 p1 p2 p3 a e b c e b c d n1 n2 n3 n1 n2 n3 GND a. An improved schematic of a conceptual tristate inverter GND d a b. The idealised layout of a tristate inverter Figure 6.2: An improved schematic and an idealised layout of a generic tristate inverter In the idealised layout of Figure 6.2 coloured boxes represent respective material, small black squares representing contact cuts. October 14, 2002 6 5 A.P.Papliński

6.1. DESIGN METHODOLOGY The structure of the tristate inverter cell can be further improved by elimination of the node b, as discussed in sec.5.10. The symbol, schematic and the layout of the modified tristate inverter is given in Figure 6.3. d a e c VDD p1 p2 p3 a d e A modified tri-state inverter VDD p1 p2 p3 c e n1 n2 n3 GND d a c n1 n2 n3 GND Figure 6.3: The symbol, schematic and the layout of the modified tri-state inverter The layout can be described by the following layout matrix: L 3 = e (p1) V (p2) (p3) c d a e d a d e (n1) G (n2) (n3) c (6.3) A.P.Papliński 6 6 October 14, 2002

6.1. DESIGN METHODOLOGY In a more formal way, we can state that the reason that the simplification of the layout of Figure 6.1 (eqn 6.1) into a form as in Figure 6.2 (eqn 6.2) has been possible is clearly visible from the circuit graphs of the two diffusion areas, which are presented in Figure 6.4. The graphs of such a simple, linear structure, are known as semi-eulerian graphs. e p1 V p2 b p3 c e n1 G n2 b n3 c Figure 6.4: Circuit graphs representing two diffusion areas for the tristate inverter Hence, if circuit graphs are semi-eulerian, equivalent diffusion paths have no discontinuities. October 14, 2002 6 7 A.P.Papliński

6.1. DESIGN METHODOLOGY 6.1.3 Basic facts from the graph theory We will need the following the basic definitions and theorems used in the graphs theory. A connected graph is a graph in which any two nodes (vertices) are connected by a path. A path is a walk in which no edge appears more than once. A walk is a sequence of edges. A trail is a walk in which all the edges are distinct. A connected graph is called Eulerian if there exists a closed trail which includes every edge of the graph; such a trail is called an Eulerian trail. If the trail is not closed, as is the case in the layout problem, we call it a semi-eulerian trail. The degree of a node (vertex) of a graph is the number of edges incident at that node. The fundamental for the layout problem theorem states that: A connected graph is semi-eulerian if and only if there are 0 or 2 nodes of odd degree If a semi-eulerian graph has exactly two nodes of odd degree, then any semi-eulerian trail must start at one of them and terminate at the other. Note that a graph cannot have exactly one node of odd degree (the handshaking lemma). A.P.Papliński 6 8 October 14, 2002

6.1. DESIGN METHODOLOGY 1 1 Number of nodes of the odd degree: 2 yes Does a semi- Eulerian trail exist? 2 2 0 yes 1 3 2 2 yes 1 3 3 1 1 3 4 2 4 no 2 yes Figure 6.5: Simple graphs annotated with degrees of nodes In Figure 6.5 a collection of simple graphs is given. Each node is annotated with its degree. October 14, 2002 6 9 A.P.Papliński

6.1. DESIGN METHODOLOGY 6.1.4 Layout Generation Methodology Form the graph of the circuit and calculate the degree of each node. If zero or two nodes are of odd degree, semi-eulerian trails for n-diffusion and p-diffusion exist. Find these trails by traversing all the edges representing n-mos and p-mos transistors in the circuit graph, respectively. A constructive method of finding Eulerian trails is known as Fleury s algorithm. In order to simplify the layout further align vertically the corresponding p-mos and n-mos transistors. If Eulerian trails do not exist: It may be possible to modify the circuit knowing its logical and functional properties, Alternatively, duplicate some transistors, thus increasing the degree of corresponding nodes, If discontinuities must exist, it may be possible to minimise their number. Partial solutions to the above problems will be discussed in the next section. A.P.Papliński 6 10 October 14, 2002

6.1. DESIGN METHODOLOGY 6.1.5 Designing a CMOS functional cell an illustrative example. In this section we will employ the layout generation methodology to the typical CMOS functional cells, in order to demonstrate its application in practical situations. Firstly, we concentrate on the problem of arranging p-diffusion and n-diffusion areas in an optimal way, that is forming the Eulerian trails, if possible. Related to this issue is the optimal way of arranging first metal paths, in the context of interconnections between sources and drains of transistors. Occasionally, we refer to the optimal way of arranging polysilicon paths in the context of the gate signals. The general optimality problem of the complete circuit layout is not addressed. A static CMOS functional cell consists of two complementary circuits often referred to as a pull-up circuit (p-mos transistors) and a pull-down circuit (n-mos transistors), respectively. The p-mos and n-mos transistors always appear in pairs, and such a pair is often driven by the same gate signals. Therefore, in the layout, transistors belongings to the pair are kept aligned vertically, which simplifies the layout further. October 14, 2002 6 11 A.P.Papliński

6.1. DESIGN METHODOLOGY Obtaining Eulerian trails by circuit manipulations Consider a circuit diagram of a combinational cell implementing the function: e = a + b c + d p-mos circuit: n-mos circuit: e p = ā ( b + c) d e n = a + b c + d A schematic and equivalent layout graphs for p-type and n-type diffusion for the above cell is given in Figure 6.6. VDD V a p1 p1 b p2 f g p3 c p2 f p3 a d n1 p4 n2 h n3 b c e n4 d n1 g p4 e e n2 h n3 n4 GND G Figure 6.6: A schematic and layout graphs of a combinational cell Calculations of the node degrees give: p-graph node: V f g e node degree: 1 3 3 1 n-graph e h G 3 2 3 A.P.Papliński 6 12 October 14, 2002

6.1. DESIGN METHODOLOGY The n-graph is Eulerian, because exactly two nodes are of odd degree, however, the p-graph is not, because more than two nodes are of odd degree, therefore, the p-diffusion trail without discontinuities does not exist. The layout matrix resulting from the above graphs is of the form: L 1 = V (p1) f (p2) g (p3) f! e (p4) g a b c d G (n1) e (n2) h (n3) G (n4) e and the related layout is presented in Figure 6.7. (6.4) VDD 1 2 3 4 a b c GND d Figure 6.7: Layout of the cell with one discontinuity There is one discontinuity in the p-diffusion. It can be removed by the following circuit manipulation. By swapping the transistor p4 with the parallel connection of p2 and p3, which is equivalent to rewriting the logic equation for the p-mos circuit in the form: e p = ā d ( b + c) we obtain the Eulerian layout graphs, which are presented in Figure 6.8. After this modifications both graphs are Eulerian, however, in both October 14, 2002 6 13 A.P.Papliński

6.1. DESIGN METHODOLOGY V p1 f p4 g n1 e n2 h n3 n4 p2 p3 G e Figure 6.8: The improved layout graphs of the combinational cell cases, there are two nodes of an odd degree (V, g and G, e), therefore, the diffusion paths must start at one of those nodes. The layout matrix which satisfies all the requirements is of the following form: L 2 = V (p1) f (p4) g (p3) e (p2) g a d b c G (n1) e (n4) G (n3) h (n2) e The simplified layout of the above cell is given in Figure 6.9. Note VDD (6.5) 1 4 2 3 a d b c GND Figure 6.9: The improved layout of the combinational cell that the reduction of the cell area is substantial. A.P.Papliński 6 14 October 14, 2002

6.2. 1-BIT ADDERS 6.2 1-bit Adders A 1-bit adder is a fundamental building block of all arithmetic circuits. It has three inputs, a, b, c, and two outputs, d, s, known as the output carry and the sum, respectively. The 1-bit adder counts the number of ones at its three inputs and represents the result as a two-bit binary number. Hence, the defining arithmetic relationship between inputs and outputs can be written as: a + b + c = (d, a) 2 = 2 d + s (6.6) All three inputs are equivalent, but normally c is called the input carry. Eqn. (6.6) can be converted into a truth table which describes the relationship between three adder inputs c, b, a and two adder outputs, d, s. d a b Σ s c c b a 1 s d s 0 0 0 0 0 0 0 0 1 1 0 1 0 1 0 1 0 1 0 1 1 2 1 0 1 0 0 1 0 1 1 0 1 2 1 0 1 1 0 2 1 0 1 1 1 3 1 1 s = a b c d = a b + b c + c a Figure 6.10: A 1-bit adder, its truth table and generic logic equations From the truth table we can derive a generic logic equations for s and d which are shown in Figure 6.10. We consider first three switch logic implementations of a 1-bit adder based on three XOR cells considered in sec. 5.9. Finally, we present a gate logic implementation with an interesting bridge-like structure of the sum circuit. October 14, 2002 6 15 A.P.Papliński

IC design 6.2. 1-BIT ADDERS All three switch logic implementations are based on the following modified logic equations: f = a b, s = f c, d = b f + c f (6.7) Note that the intermediate signal f is used in generation of both the sum signal, s, and the output carry, d. It can be verified that these equations satisfy the truth table of Figure 6.10. The logic diagram equivalent to eqns (6.7) is given in Figure 6.11. a b c f s. 1 0 d Figure 6.11: The logic diagram of a possible implementation of the 1-bit adder A.P.Papliński 6 16 October 14, 2002

6.2. 1-BIT ADDERS 6.2.1 The switch-logic, solution A In our first implementation of a switch logic 1-bit adder we use the XOR cell presented in Figure 5.40 which is based on a buffered weak multiplexer. This implementation of the XOR function requires two complemented input signals, b and c. These complemented signals can be used in the carry out multiplexer to implement the complemented signal d. d = b f + c f We also need one buffering inverter in the carry out circuitry. The resulting 1-bit adder comprises 8 pairs of transistors. A relevant schematic is shown in Figure 6.12. Figure 6.12: A schematic of a switch logic 1-bit adder solution A If we number the transistors in the top row of the schematic from October 14, 2002 6 17 A.P.Papliński

6.2. 1-BIT ADDERS 1... 5 and those in the bottom row from 6... 8, then the diffusion circuits (graphs) can be represented by the following table: The orders of nodes are: p-mos n-mos V (p1) bn bn (n1) G bn (p2) fn fn (n2) b V (p3) f f (n3) G bn (p4) dn dn (n4) cn V (p5) d d (n5) G V (p6) cn cn (n6) G cn (p7) sn sn (n7) c V (p8) s s (n8) G V G b bn c cn f n f sn s dn d #odd pmos: 5 3 2 1 1 1 1 1 1 8 nmos: 5 1 1 1 2 1 1 1 1 1 1 10 Since the number of odd degree nodes is high semi-eulerian trails do not exist, and there will be a number of discontinuities both in p diffusion and in n diffusion. Optimization of the circuit by hand is difficult and one possible layout matrix can be written in the following form: V (p1) bn (p2) fn! bn (p4) dn! f (p3) V (p5) d! sn (p7) cn (p6) V (p8) s b a f f n dn f c sn G (n1) bn! b (n2) fn! dn (n4) cn! f (n3) G (n5) d! sn (n7) c! cn (n6) G (p8) s (6.8) From the layout matrix (6.8) it is relatively straightforward to derive an equivalent stick diagram which is presented in Figure 6.13. A.P.Papliński 6 18 October 14, 2002

6.2. 1-BIT ADDERS p1 p2 p4 p3 p5 p7 p6 VDD p8 b bn a fn dn f d f c cn sn s n1 n2 n4 n3 n5 n7 n6 n8 GND Figure 6.13: A stick diagram of the switch logic 1-bit adder, solution A Simulation results for the switch logic 1-bit adder, solution A, implemented in the TSMC035 technology are presented in Figure 6.14. Propagation delays vary from 0.1ns to 0.6ns for the worst case when signal A goes low with B=0 and C=1 as indicated by the third cursor. Analyse the waveforms and the schematic to explain why this is the worst case. October 14, 2002 6 19 A.P.Papliński

6.2. 1-BIT ADDERS Y9 (Voltage:v ) Y8 (Voltage:v ) Y7 (Voltage:v ) Y6 (Voltage:v ) Y5 (Voltage:v ) Y4 (Voltage:v ) Y3 (Voltage:v ) Y2 (Voltage:v ) Y (Voltage:v ) 5.00 3.00 1.50 5.00 3.00 1.50 7.00 4.00 2.00-2.00 6.00 3.00 1.00-1.00 5.00 3.00 1.50 6.00 3.00 1.00-1.00 7.00 5.00 3.00 1.00-1.00 6.00 3.00 1.00-1.00 6.00 3.00 1.00 A B FN F C SN S DN D 5.00 3.74 0.04 4.93 1.60 3.72 1.49 3.55 0.05 4.99 2.06 1.01-1.00 t1 t2 t3 1.00 2.00 2.50 3.00 3.50 4.00 5.00 6.00 7.00 7.608.00 9.00 1 Base 1.00 X (Time:ns ) 5.10 4.77 0.01 5.00 1.56 3.84 4.78 Figure 6.14: Simulation results for the switch logic 1-bit adder, solution A A.P.Papliński 6 20 October 14, 2002

6.2. 1-BIT ADDERS 6.2.2 The switch-logic, solution B In this implementation we use the best XOR cells presented in Figure 5.43. The carry out circuit will be implemented using a weak multiplexer followed by two inverters: d = a f + c f We now need 9 pairs of transistors to build such an adder. A relevant schematic is shown in Figure 6.15. Figure 6.15: A schematic of a switch logic 1-bit adder, solution B If we number the transistors in XOR circuits from 1... 6 (the top row) and those used in the output carry multiplexer and inverters 7, 8, 9 (the bottom row), respectively, then the diffusion circuits (graphs) can be represented by the following table: October 14, 2002 6 21 A.P.Papliński

6.2. 1-BIT ADDERS p-mos n-mos a (p1) f b n12 (n1) G f b (p2) a f b (n2) n12 V (p3) f f (n3) G sb (p4) c n45 (n4) G f (p5) sb sb (n5) n45 V (p6) s s (n6) G a (p7) dd dd (n7) c V (p8) db db (n8) G V (p9) d d (n9) G where n12, n45 indicates nodes between serially connected nmos transistors. The orders of nodes are: V G a c f b f sb s dd db d #odd pmos: 4 3 1 2 1 2 1 1 1 1 7 nmos: 6 1 1 1 1 1 1 1 1 8 As in the previous solution the number of odd degree nodes is high, hence, semi-eulerian trails do not exist, and there will be a number of discontinuities both in p diffusion and in n diffusion. Optimization of the circuit by hand is difficult and one possible layout matrix can be written in the following form: s (p6) V (p3) f (p5) sb (p4) c! b (p1) fb (p2) a (p7) dd! db (p8) V (p9) d sb f b c f a b f dd db s (n6) G (n3) f! sb (n5) (n4) G (n1) (n2) fb! c (n7) dd! db (p8) G (p9) d (6.9) In Figure 6.16 we give the stick diagram equivalent to the layout matrix (6.9). A.P.Papliński 6 22 October 14, 2002

6.2. 1-BIT ADDERS VDD p4 p1 p2 p6 p3 p5 b p7 p8 p9 s sb fb f sb c a fb dd db d n6 n3 n5 n4 n1 n2 n7 n8 n9 GND Figure 6.16: A stick diagram of the switch logic 1-bit adder, solution B Simulation results in the TSMC035 technology are presented in Figure 6.17. Propagation delays vary from 0.2ns to 0.9ns for the worst case when signal A goes low with B=0 and C=1 as indicated by the third cursor. Analyse the waveforms and the schematic to explain why this is the worst case. October 14, 2002 6 23 A.P.Papliński

6.2. 1-BIT ADDERS Y (Voltage:v Y2 ) (Voltage:v ) Y4 (Voltage:v Y5 ) (Voltage:v ) Y7 (Voltage:v Y8 ) (Voltage:v ) Y3 (Voltage:v ) Y6 (Voltage:v ) Y9 (Voltage:v Y10 ) (Voltage:v ) 5.00 3.00 1.50 5.00 3.00 1.50 7.00 4.00 1.00-2.00 7.00 4.00 1.00-2.00 5.00 3.00 1.50 6.00 1.00-2.00 7.00 2.00-1.00 4.00 2.00 6.00 3.00 1.00-1.00 6.00 A B FB F SB S C DD DB 5.00 0.04 4.73 0.07 4.90 0.03 4.99 5.00-5.01 5.00 3.74 0.04 3.42 0.35 4.91 3.00 D 0.30 1.00-1.00 t1 t2 t3 0.500.70 1.00 1.50 2.002.20 2.50 3.00 3.50 3.90 4.00 4.50 5.00 Base 1.50 X (Time:ns ) 3.20 4.97-5.00-5.00 1.63 3.57 Figure 6.17: Simulation results of the switch logic 1-bit adder, solution B A.P.Papliński 6 24 October 14, 2002

6.2. 1-BIT ADDERS 6.2.3 The switch-logic: solution C Finally, we consider a switch logic 1-bit adder based on the XOR cell built from a week multiplexer and a transmission gate as in Figure 5.41. In addition, we implement the carry out multiplexer using transmission gates. The schematic of such an adder is shown in Figure 6.18. There are 11 pair of transistors, which makes the adder structure b a p,n1 bn p2 p3 p,n4 fn f p6 p7 p,n8 sn s c n2 n3 p,n5 cn n6 n7 p9 n9 p,n11 dn d p10 n10 Figure 6.18: Symbolic schematic of a switch logic 1-bit adder based on transmission gates, solution C. rather complicated, also because the transistors in transmission gates are driven by different signals. The first step in designing the circuit layout is to for a list of transistors and electric nodes, which can be of the following form: October 14, 2002 6 25 A.P.Papliński

6.2. 1-BIT ADDERS p-mos Gate signals n-mos V (p1) bn b bn (n1) G a (p2) f n bn b f n (n2) a bn (p3) f n a f n (n3) b V (p4) f f n f (n4) G V (p5) cn c cn (n5) G f (p6) sn cn c sn (n6) f cn (p7) sn f sn (n7) c V (p8) s sn s (n8) G cn (p9) dn f f n dn (n9) cn bn (p10) dn f n f dn (n10) bn V (p11) d dn d (n11) G The orders of nodes (diffusion only) are: V G a b bn c cn f n f sn dn s d #odd pmos: 5 1 3 3 2 2 2 2 1 1 6 nmos: 5 1 1 2 1 2 2 2 2 2 1 1 6 Design of the layout provides a challenge, as the number of the odd degree nodes is significant. We can start with drawing graphs of the diffusion circuits and then partition the circuits into sub-circuits for which semi-eularian trails exist. One possible solution is described by the following layout matrix: a(p2)f n(p3)bn! V (p1)bn(p10)dn(p9)cn(p5)v (p4)f (p6)sn(p7)cn! s(p8)v (p11)d bn a b f n f c f n cn f sn dn b a b f fn c fn c f sn dn a(n2)f n(n3) b! G (n1)bn(n10)dn(n9)cn(n5)g(n4)f(n6)sn(n7) c! s (n8)g(n11)d (6.10) A.P.Papliński 6 26 October 14, 2002

6.2. 1-BIT ADDERS 6.2.4 A Cell with a bridge-like structure All circuit that we have considered by now consists of serial/parallel connections of transistors. In this example we consider a circuit having a different topology, namely, a bridge-like structure. A schematic of a 1-bit adder with such a structure is shown in Figure 6.19. The bridge implements the sum using a complement of the output carry. The output carry is implemented using a composite gate concept. Implementation equations for this adder are of the form: Output Carry, d = a b + (a + b) c p-mos: d p = d = a b + (a + b) c n-mos: d n = d = a b + (a + b) c Sum, s = a b c p-mos: s p = s = (a + b + c) d + a b c n-mos: s n = s = (a + b + c) d + a b c VDD a b e p5 p4 a b a p1 p2 f c p3 d m p9 p6 p8 b p10 p7 n c s d b a h n4 n5 a c n3 l n1 n2 b a p n6 n9 b n8 n7 n10 q c d GND Figure 6.19: A 1-bit adder with the bridge-like sum circuit October 14, 2002 6 27 A.P.Papliński

6.2. 1-BIT ADDERS The structure of the adder is presented in Figure 6.20 in the form of the graphs for the p-mos and n-mos parts of the circuit. V V d s p5 p2 p9 p10 n4 n3 n6 n7 e p1 f m p8 n h n1 lk p n8 q p4 p3 p6 p7 n5 n2 n9 n10 d s G G a. p MOS networks b. n MOS networks Figure 6.20: Circuit graphs of the adder There are two interesting points to be made about this circuit. Firstly, it can be noted that the structures of the p-mos part and the n-mos part of the output carry circuit are identical, despite complementation, because the output carry is described by the symmetric boolean function. Secondly, both parts of the sum circuit have an interesting bridge-like structure which is not of a serial/parallel form. Although this fact makes formal properties of the underlying graphs to be more complicated, it does not change the design procedure. As usual, the next step, after obtaining the p-mos and n-mos graphs, is to calculate the degree of each node. The results of this calculations are presented in the following table: p-graph (d) node: V e d f node degree : 3 2 2 3 n-graph (d) node: d h G k node degree : 2 2 3 3 p-graph (s) V m s n 2 3 2 3 n-graph (d) s p G q 2 3 2 3 A.P.Papliński 6 28 October 14, 2002

6.2. 1-BIT ADDERS All of the graphs meet the conditions to be Eulerian. In order to obtain an Eulerian trail, we have to traverse the graphs at nodes with odd degrees, which results in the following layout matrices: L D = L S = V (p5) e (p4) d (p3) f (p2) V (p1) f a b c b a G (n5) h (n4) d (n3) k (n2) G (n1) k n (p10) V (p9) m (p8) n (p7) s m d a b c d q (n10) G (n9) p (n8) q (n7) s (n6) p (6.11) (6.12) From the layout matrices (6.11) and (6.12) we note that although both circuits are Eulerian, they cannot be laid together without a gap, because the bordering nodes are different. If, in addition, we add inverters for d and s signals, the stick diagram of the 1-bit adder can be arranged as presented in Figure 6.21. m VDD d f k n q a b c d s s p 5 4 3 2 1 10 9 8 7 6 GND Figure 6.21: A stick diagram of the 1-bit adder The stick diagram, which symbolically specifies the actual topology in silicon, can be easily converted into the mask layout. October 14, 2002 6 29 A.P.Papliński

6.3. BUILDING BLOCKS OF SEQUENTIAL CIRCUITS 6.3 Building Blocks of Sequential Circuits Basic blocks of sequential circuits can be divided into two groups: Latches are level-triggered asynchronous sequential circuits containing just one feedback which is equivalent to two asynchronous states. Flip-Flops are edge-triggered sequential circuits which contain two synchronous states, or at least four asynchronous states that is at least two internal feedback loops. 6.3.1 D Latch The D latch is an asynchronous sequential circuit specified by the following function table: D Ld D Latch Q Ld operation 0 Q <= Q Hold 1 Q <= D Load The function table can be converted into an equivalent state equation: Q + = Ld Q + Ld D (6.13) where Q represents the current value of the state signal and Q + represents its next value. Equation (6.13) give rise to the generic implementation of the D latch as in Figure 6.22 in which a multiplexer sends to the output either the current state Q or the input signal D. The feedback loop connects the next state with the current one. A.P.Papliński 6 30 October 14, 2002

6.3. BUILDING BLOCKS OF SEQUENTIAL CIRCUITS D Ld 0 1 Y Qn Q Figure 6.22: A generic implementation of the D Latch. A weak multiplexer implementation If a weak multiplexer is employed, then the transistor level schematic equivalent to the generic circuit from Figure 6.22 can be of the form as in Figure 6.23. Ld Y p1 Q p3 VDD p2 Qn n1 D n3 n2 GND Figure 6.23: A transistor level schematic of the D Latch based on the weak multiplexer. The layout matrix equivalent to the schematic of Figure 6.23 can be written as follows: L = Y (p1) Q (p3) V (p2) Qn Ld Qn Y D (n1) Y! Q (n3) G (n2) Qn October 14, 2002 6 31 A.P.Papliński

6.3. BUILDING BLOCKS OF SEQUENTIAL CIRCUITS Note that in the layout matrix we have flipped the n1 nmos transistor to shorten the net Y. The resulting stick diagram that flows from the schematic and the layout matrix is shown in Figure 6.24. p1 p3 p2 VDD Ld Q Qn D n1 Y n3 n2 GND Figure 6.24: The stick diagram of a D latch based on a weak multiplexer. Note that the input-output ports are available on the metal2 layer and are ready to be connected using the vertical metal2 paths. The stick diagram has been converted into a circuit layout in the TSMC 0.35µ technology which is presented in Figure 6.25. A.P.Papliński 6 32 October 14, 2002

6.3. BUILDING BLOCKS OF SEQUENTIAL CIRCUITS Figure 6.25: A possible layout of a D latch in the TSMC 0.35µ technology. Figure 6.26: A back annotated schematic October 14, 2002 6 33 A.P.Papliński

6.3. BUILDING BLOCKS OF SEQUENTIAL CIRCUITS 5.00 5.00 5.00 5.00 Ld (Voltage:v ) 4.00 3.00 2.00 1.00 5.00 Ld 5.00 5.00 D (Voltage:v ) 4.00 3.00 2.00 1.00 D 7.00 Y (Voltage:v ) 4.00 2.00-2.00 Y 3.38 3.38 0.10 Qn (Voltage:v ) 6.00 5.00 4.00 3.00 2.00 1.00-1.00 Qn 0.56 0.54 3.70 Q (Voltage:v ) 8.00 6.00 4.73 4.75 4.00 Q 2.00 0.74-2.00 t1 t2 t3 0.50 0.70 1.00 1.50 2.00 2.40 2.50 3.00 3.503.62 4.00 Base X (Time:ns ) 1.70 2.92 Figure 6.27: Simulation results A.P.Papliński 6 34 October 14, 2002

6.3. BUILDING BLOCKS OF SEQUENTIAL CIRCUITS A composite gate implementation From eqn (6.13) we can also derive a composite gate implementation of the D latch. This equation can be written in the following inverted form: Qn = A + D Ld, A = Q + Ld, Q = Qn which is equivalent to the logic diagram as in Figure 6.25. Ld D A Qn Q Figure 6.28: A logic diagram of the D latch based on a composite gate The logic diagram of Figure 6.28 can be converted into a transistor-level schematics as presented in Figure 6.29. In the VDD Ld p2 D p5 Ld p4 Qn p1 A A B p3 Qn p6 Q Ld Qn n2 n1 D Ld n5 n4 A n3 n6 GND Figure 6.29: A schematic of the D latch based on a composite gate schematics you should identify the NOR gate, the AOI gate and the inverter. October 14, 2002 6 35 A.P.Papliński

6.3. BUILDING BLOCKS OF SEQUENTIAL CIRCUITS In a process of a systematic design the next step is to convert the schematic into two circuits graphs, for the nmos and pmos sections, respectively, as presented in Figure 6.30. (4) VDD p2 p5 p4 pmos (2) (3) B p6 p1 p3 (1) A (1)Qn (1)Q four odd degrees NOT Eulerian nmos (2) A n1 n2 (5) (2) Qn (1)Q n5 (2) n3 n6 n4 GND two odd degrees Eulerian Figure 6.30: Circuit graphs of the D latch based on a composite gate The pmos is not Eularian and as a result of the p diffusion area cannot be continuous. In order to minimise the number of gaps the p graph has been rearranged as in Figure 6.31. (2) p2 pmos (2) VDD (1) VDD p3 (3) B p6 p1 p5 p4 (1) A (2) Qn (1)Q Figure 6.31: The graph of the p section after rearrangements The layout matrix which results from the above graphs can be written in the following form: L = A (p1) (p2) V (p3) B p4) Qn (p5) B! V (p6) Q Ld Qn A Ld D Qn G (n1) A (n2) G (n3) Qn (n4) (n5) G (n6) Q A.P.Papliński 6 36 October 14, 2002

6.3. BUILDING BLOCKS OF SEQUENTIAL CIRCUITS The stick diagram which results from the above layout matrix is presented in Figure 6.32. VDD p1 p2 p3 p4 B p5 p6 A Qn D Q n1 n2 n3 n4 Ld n5 n6 GND Figure 6.32: A Stick diagram of the D latch based on a composite gate. October 14, 2002 6 37 A.P.Papliński

6.3. BUILDING BLOCKS OF SEQUENTIAL CIRCUITS 6.3.2 Designing an Edge-Triggered D-type Flip-Flop An edge-triggered D-type flip-flop is an example of a relatively complex asynchronous sequential circuit. Once designed it will be a building block practically all registers and counters. There are formal methods of designing asynchronous sequential circuits, however, because they are relatively complex, we start here with the following state diagram which precisely specifies the behaviour of the flip-flop. CLK CLK D CLK C/L Q P CLK&D P Q 0 0 CLK CLK&D CLK P Q 0 1 CLK&D D CLK Q CLK CLK P Q 1 0 CLK&D P Q 1 1 Figure 6.33: A block-diagram, the state diagram and the symbol of a positive-edgetriggered D-type flip-flop There are four states coded by 2-bit binary words which represent two state signals, P and Q. There are two input signals, D (data) and CLK (clock). Both state signals can be used as outputs, the Q signal being of the principal interest. A.P.Papliński 6 38 October 14, 2002

6.3. BUILDING BLOCKS OF SEQUENTIAL CIRCUITS The expected behaviour described by the state diagram is that during the rising edge of the clock signal the 1-bit data from the input D is loaded into the flip-flop, that is, Q <= D Outside the rising edge of the clock signal the state Q is to be unchanged, regardless of the variations of the D input and possibly the second state signal, P. Details of such a behaviour should be visible by inspecting the state diagram: Assume that PQ=00. If CLK=0, we remain in this stage. If CLK=1, we go either to state PQ=01, or PQ=10 depending on the value of the D signal. If CLK=1 and we have just move to PQ=01 or 10, we stay in such a state regardless of the value of the signal D. In other words, the value of signal D is sampled only when we move from PQ=00 (11) to PQ=01 or 10. This is the essence of sensitivity to the positive edge of the clock signal. In states PQ=01 or 10 we wait for clock signal to go to zero and then we go either to PQ=11 or 00, respectively. October 14, 2002 6 39 A.P.Papliński

6.3. BUILDING BLOCKS OF SEQUENTIAL CIRCUITS The above behaviour can be best described by the following timing diagrams: CLK D Q P Figure 6.34: The timing diagram of the edge-triggered D-type flip-flop In order to design the flip-flop we have to design a combinatorial circuit (C/L in Figure 6.33) which implements the required behaviour specified by the state diagram. For this, we convert the state diagram into the state transition table. The state transition table describes the relationship between the current state signal, P, Q, the input signals, CLK, D, and the next state signals P +, Q +. The symbol * denotes the don t care conditions. CLK D P Q P + Q + 0 * 0 0 0 0 1 0 0 0 1 0 1 1 0 0 0 1 0 * 0 1 1 1 1 * 0 1 0 1 0 * 1 0 0 0 1 * 1 0 1 0 0 * 1 1 1 1 1 0 1 1 1 0 1 1 1 1 0 1 A.P.Papliński 6 40 October 14, 2002

6.3. BUILDING BLOCKS OF SEQUENTIAL CIRCUITS The state transition table is equivalent to the truth table for the following combinatorial circuits: P + = f P (CLK, D, P, Q) Q + = f Q (CLK, D, P, Q) The functions f P and f Q can be obtained from the following Karnaugh maps generated from the state transition table. CLK D PQ 0 0 01 11 10 00 0 0 0 1 01 1 1 0 0 11 1 1 0 1 10 0 0 1 1 P + Q + CLK D PQ 0 0 01 11 10 00 0 0 1 0 01 1 1 1 1 11 0 0 0 0 10 0 0 1 1 From the Karnaugh maps it is possible to find a suitable gate implementation of the combinatorial part of the flip-flop. Two feedback loops, for P and Q, complete the design. As an exercise please complete the design developing a logic diagram, a transistor level schematic, a stick diagram and a possible circuit layout. Verify your design using your favourite CAD package. October 14, 2002 6 41 A.P.Papliński

6.3. BUILDING BLOCKS OF SEQUENTIAL CIRCUITS It should be realised that the gate logic solution for the edge-triggered D flip-flop is unnecessary big and the smaller solutions are based on the switch logic. In Figure 6.35 we present a DFF from the AMI 0.5µ technology which is based on the tri-state inverters. Figure 6.35: A schematic of a D flip-flop based on tri-state inverters (from the AMI 0.5µ library) As an exercises, analyse this solution in detail and derive an equivalent logic/block diagram. A.P.Papliński 6 42 October 14, 2002

6.3. BUILDING BLOCKS OF SEQUENTIAL CIRCUITS 6.3.3 Edge-Triggered T Flip-Flop The edge-triggered T flip-flop can be easily built from a D flip-flop so that on the rising edge of the clock, CLK, one of the following two operations are performed: T operation 0 Q <= Q hold 1 Q <= Q toggle Alternatively, the T flip-flop can be designed as an asynchronous sequential circuit with the state diagram as in Figure 6.36. CLK&T CLK T CLK C/L Q P CLK P Q 0 0 CLK&T P Q 0 1 CLK T CLK Q CLK CLK&T P Q 1 0 CLK&T P Q 1 1 Figure 6.36: A block-diagram, the state diagram and the symbol of a positive-edgetriggered T-type flip-flop Comparing with the D flip-flop the state diagram is a bit simpler which should result in a simpler implementation. October 14, 2002 6 43 A.P.Papliński

6.3. BUILDING BLOCKS OF SEQUENTIAL CIRCUITS In order to design the flip-flop we convert the state diagram into the state transition table, possible in the form of a Karnaugh map. The resulting map is as follows: P + Q + Clk T PQ 0 0 01 11 10 00 00 00 01 00 01 11 11 01 01 11 11 11 10 11 10 00 00 10 10 From the above table we can derive the following logic equations: P + = Q Clk + P Clk Q + = Q Clk + Clk (T P + T Q) The signal P + can be generated using a 2-to-1 multiplexer driven by Clk which switches between Q and P. To generate the signal Q + we can use two 2-to-1 multiplexers. The first one is driven by T which switches between Q and P. The second multiplexer is driven by Clk which switches between Q and the output from the first one. A.P.Papliński 6 44 October 14, 2002

6.3. BUILDING BLOCKS OF SEQUENTIAL CIRCUITS A weak-multiplexer implementation of the positive edge triggered T flip-flop is given in Figure 6.37. A P Pn T B C Qn Q Clk Figure 6.37: A schematic of a positive edge triggered T flip-flop based on weak multiplexers. The above implementation consists of three weak 2-to-1 multiplexers generating signals A, B, C. Signals which are fed back are amplified by a pair of inverters. The complete implementation contains of seven pair of MOS transistors. Exercise: Derive the layout matrix and the resulting circuit layout. October 14, 2002 6 45 A.P.Papliński